if($_SERVER['REMOTE_ADDR']!='83.50.255.250'){
//die("
www.frioelect.com
Estamos realizando operaciones de mantenimiento. Disculpe las molestias, volvemos en unos minutos.");
}
error_reporting(9);
if(isset($_GET['content'])){
$seo=$_GET['content'];
}
else{
$seo="default";
}
$f=fopen('./seo.txt','r');
while(!feof($f)){
$str=rtrim(fgets($f));
if($str==("[default]")){
//echo strtoupper($seo);
$defdesc=rtrim(fgets($f));
$defkeywords=rtrim(fgets($f));
}
elseif($str==("[".$seo."]")){
//echo strtoupper($seo);
$desc=rtrim(fgets($f));
$keywords=rtrim(fgets($f));
}
}
error_reporting(1);
if(strlen($keywords)<2){
$keywords=$seo.",".$defkeywords;
}
if(strlen($desc)<2){
$desc=$seo.",".$defdesc;
}
function getFeed($feed_url) {
$content = file_get_contents($feed_url);
$x = new SimpleXmlElement($content);
foreach($x->channel->item as $entry) {
$dates=date("d-m-Y",strtotime($entry->pubDate));
$filename=date("Ymd",strtotime($entry->pubDate))."_".urlencode($entry->title).".html";
$str="". utf8_decode($entry->title) . "
";
$str.="".$dates."
";
$str.= utf8_decode(str_replace("Electricista Autorizado Madrid","",$entry->description));
// $str.=$filename."
";
$str=utf8_encode($str);
if(!file_exists("./news/".$filename)){
$file = fopen ("./news/".$filename, "w");
fwrite($file, $str);
fclose ($file);
}
}
}
?>
error_reporting(3);
if($_GET['content']=='presupuestos'){
$_GET['content']='solicitar_presupuesto';
}
$t="";
if(isset($_GET['content'])){
$t.=strtoupper(str_replace('_',' ',$_GET['content']));
}
if(isset($_GET['noticia'])){
$t.=strtoupper(str_replace('_',' ',str_replace(".html","",urldecode($_GET['noticia']))));
}
$t.=' - INSTALADOR ELECTRICISTA AUTORIZADO MADRID-918657251-626280012-Urgencias-24 horas';
?>
echo $t; ?>
// INICIO: CONTENIDO
if(!isset($_GET['content'])){
$_GET['content']='inicio';
}
$f="contenidos/inc_".$_GET['content'].".php";
if(isset($_GET['noticia'])){
$n="news/".urlencode($_GET['noticia']);
$f="";
}
$n=str_replace("%5C%27","%27",$n);
if(file_exists($f)){
require_once($f);
}
elseif(file_exists($n)){
?>
require_once($n);
?>
}
else {
echo "ERROR: No encontrado $n
";
}
// FIN: CONTENIDO
?>
|
|
|