if(isset($_GET['id']) && ctype_digit($_GET['id']) && strlen($_GET['id'])<="13" && strlen($_GET['id'])>="0"){ $id=filter_var($_GET['id'], FILTER_VALIDATE_INT); /* $expire=time()-2592000; // valable dix minutes $expires=2592000; $cache=($_SERVER['DOCUMENT_ROOT']."/_cache/page-".$id.".html"); if(file_exists($cache)){ $size=filesize($cache);header("Content-Length:$size"); }else{} header('Expires:' . gmdate('D, d M Y H:i:s', time()+$expires) . ' GMT, +1'); if(file_exists($cache) && filemtime($cache)>$expire && $size!="0"){ ob_start("ob_gzhandler_no_errors"); header("Last-Modified:".gmdate("D, d M Y H:i:s", filemtime($cache))." GMT, +1"); readfile($cache); }else{ ob_start(); */ include($_SERVER['DOCUMENT_ROOT']."/test/databases/new/db_eyar.php"); include($_SERVER['DOCUMENT_ROOT']."/test/databases/new/db_vekirin.php"); function dateaffichee($time, $mode = 'long' ) { setlocale( LC_TIME, "fr" ); // Recuperation du nom du mois $mi = strftime( "%m" , strtotime( $time ) ); switch ($mi){ case '1' : $mi = 'janvier'; break; case '2' : $mi = 'février'; break; case '3' : $mi = 'mars'; break; case '4' : $mi = 'avril'; break; case '5' : $mi = 'mai'; break; case '6' : $mi = 'juin'; break; case '7' : $mi = 'juillet'; break; case '8' : $mi = 'août'; break; case '9' : $mi = 'septembre'; break; case '10' : $mi = 'octobre'; break; case '11' : $mi = 'novembre'; break; case '12' : $mi = 'decembre'; break; } // Recuperation du nom du jour $w = strftime( "%u" , strtotime( $time ) ); switch ($w){ case '1' : $w = 'Lundi'; break; case '2' : $w = 'Mardi'; break; case '3' : $w = 'Mercredi'; break; case '4' : $w = 'Jeudi'; break; case '5' : $w = 'Vendredi'; break; case '6' : $w = 'Samedi'; break; case '7' : $w = 'Dimanche'; break; } // Recuperation du jour $mor1 = strftime( "%e " , strtotime( $time ) ); // Recupera de l'année $mor2 = strftime( "%Y" , strtotime( $time ) ); if ( $mode == 'long' ) { // Recupere de l'heure+minute+seconde $mor3 = strftime( "à %Hh%M" , strtotime( $time ) ); //$mor3 = strftime( "à %Hh %Mm %Ss" , strtotime( $time ) ); }else{ $mor3 = NULL; } return $w.' '.$mor1.' '. $mi. ' '.$mor2. ' '.$mor3; //return $w.' '.$mor1.' '. $mi. ' '.$mor2. ' '.$mor3; } /* AND lng='1' */ if(isset($id) && strlen($id)>="1"){ $query=("SELECT * FROM newsarticles WHERE status='1' AND id=".$id.""); $result = mysqli_query($conn,$query) or die(mysqli_error()); $num_rows = mysqli_num_rows($result); if($num_rows=='1'){ $data=mysqli_fetch_object($result); $id=$data->id; $title=$data->title; $head=$data->head; $full=$data->full; $category=$data->category; $added=$data->added; $status=$data->status; $redirect=$data->redirect; $showfiles=$data->showfiles; if($redirect!=NULL){ header("HTTP/1.1 301 Moved Permanently"); header("Location: ".$redirect); exit; } $head=stripslashes($head); $full=stripslashes($full); if($status=='1'){ include($_SERVER['DOCUMENT_ROOT']."/x_html.php"); $keywordhead=strip_tags($head); $keywordhead=dateaffichee($added)." - ".htmlspecialchars($keywordhead, ENT_QUOTES); $xtitle=htmlspecialchars($title); $xdescription="$keywordhead"; $xkeywords="$keywordhead"; include($_SERVER['DOCUMENT_ROOT']."/x_meta.php"); ?> echo"