include_once("config/config.php");
include_once("inc/top_code.php");
$tableName = "content";
$current_url = mysql_real_escape_string($_SERVER['REQUEST_URI']);
//
$cur = explode("?", $current_url);
//
$query = mysql_query("SELECT * FROM $tableName WHERE namePage = '$url' ");
$content_show = mysql_fetch_assoc($query);
//
if ($content_show && $url && count($cur) < 2)
{
$text = $content_show["content"];
//print $content_show["content"];
//
//if ($url == "contacts") include_once("contact_form.php");
}
else
{
header("HTTP/1.0 404 Not Found");
//exit();
/*$sapi_name = php_sapi_name();
if ($sapi_name == 'cgi' || $sapi_name == 'cgi-fcgi') {
header('Status: 404 Not Found');
} else {
header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
}*/
}
?>
=$title;?>
include_once("meta.php"); ?>
include_once("top.php"); ?>
|
|
if ($text)
{
print $text;
if ($url == "contacts") include_once("contact_form.php");
}
else print "Ошибка 404. Страницы не существует";
?>
|
include_once("right_menu.php"); ?> |
|
|
include_once("bottom.php"); ?>