Query("SELECT * FROM tutorial_cats WHERE title = '$Category' LIMIT 1"); $NumRows = $DB->NumRows($CheckCategory); die($NumRows); if ($NumRows < 1) { header("Location: index.php"); } $C = $DB->FetchArray($CheckCategory); $CategoryID = $C['id']; $CategoryIconAlt = $C['icon_alt']; $CategoryIconSRC = $C['icon_src']; $TutorialID = PostClean(trim($_GET['t'])); if (ctype_digit($TutorialID)) { $CheckTutorial = $DB->Query("SELECT * FROM tutorials WHERE id = '$TutorialID' LIMIT 1"); $NumRows = $DB->NumRows($CheckTutorial); if ($NumRows < 1) { header("Location: index.php"); } $T = $DB->FetchArray($CheckTutorial); //$Clicks = $T['clicks']; $Title = $T['title']; $Description = $T['desc']; $Content = $T['message']; $Author = $T['author']; $AuthorSRC = $T['author_src']; $IconAlt = $T['icon_alt']; $IconSRC = $T['avatar']; $Date = $T['date']; } else { header("Location: index.php"); } /** * Get Page Settings */ $PageSettingsQuery = $DB->Query("SELECT description, keywords, title FROM page_settings WHERE page = 'Tutorials$Page'"); while($PS = $DB->FetchArray($PageSettingsQuery)) { if (!empty($PS['description'])) { $Settings['Description'] = $PS['description']; } if (!empty($PS['keywords'])) { $Settings['Keywords'] = $PS['keywords']; } if (!empty($PS['title'])) { $Settings['Title'] = $PS['title']; } } /** * Include Theme */ require_once($Dir . "themes/" . $Theme . "/Tutorials/" . strtolower($Page) . ".php"); ?>