Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include_once("config.php");
- if(!isset($_GET['action']) or empty($_GET['action'])) $action = 'index'; else $action = trim(htmlspecialchars($_GET['action']));
- include($dir.'/header.tpl');
- $query = "SELECT * FROM `pages` WHERE `page`='$action' LIMIT 1";
- $result = mysql_query($query);
- if(mysql_num_rows($result) == 1) {
- echo"Да, такая страница в базе есть, скора выдадим ее";
- $row = mysql_fetch_assoc($result);
- } else {
- echo"Простите, но данной странице не существует";
- }
- include($dir.'/footer.tpl');
- ?>
Add Comment
Please, Sign In to add comment