'' AND `link`='".$link."'"; $res = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_assoc($res); if(isset($row['post_id']) && !empty($row['post_id'])) { $_GET['post_id']= $row['post_id']; $post_title = $row['title']; } } if(empty($_GET['post_id']) && empty($_GET['cat']) && empty($_SERVER['QUERY_STRING'])) { $req_path = $_SERVER['DOCUMENT_ROOT'] . "/" . $_SERVER['REQUEST_URI']; if(!is_file($req_path) && !file_exists($req_path)) { header("HTTP/1.1 404 Not found"); include('404.php'); exit; } } include("includes/setup_meta.php"); include_once 'includes/functions.php'; ?>