ob_start("ob_gzhandler"); session_start(); require_once("../url_functions.php"); include("../db_functions.php"); include("../string_functions.php"); include("../datetime_functions.php"); define( 'RELPATH', '../' ); define( 'IMGPATH', RELPATH . 'images/' ); if (!connecttodb($db)) { echo "Παρουσιάστηκε πρόβλημα στην σύνδεση με τη βάση δεδομένων. Δοκιμάστε αργότερα."; exit; } $id= -1; $viewCategory= true; // εμφάνιση όλων των νέων if ( isset($_GET['id']) ) { $id= intval($_GET['id']); $q= "SELECT * FROM entities AS t1 ". "WHERE t1.type = 'news' ". "AND t1.id = $id ". "AND t1.active = 1 ". "LIMIT 1;"; $rs= mysql_query($q); $n= mysql_num_rows($rs); if ( $n > 0 ) { // βρέθηκε new με αυτό το id $r= mysql_fetch_array($rs); $title= stripslashes($r["title"]); $sub_text= stripslashes( $r["sub_text"] ); $text= stripslashes($r["text"]); $type= stripslashes($r["type"]); $posted= date("d-m-Y H:i", $r["posted"]); $updated= date("d-m-Y H:i", $r["updated"]); $active= stripslashes($r["active"]); $promote= stripslashes($r["promote"]); $viewCategory= false; // εμφάνιση μίας εγγραφής new } } $pageTitle= $title . ' - Magnifique II'; $pageDescription= strip_tags($sub_text); $pageKeywords= ''; $extraLines= ''; // this includes
include(RELPATH."header.php"); ?>