if (isOK($_GET['gametype']) && preg_match('#^[0-9]+-#', $_GET['gametype']) != 0) { $url .= '/' . substr($_GET['gametype'], strpos($_GET['gametype'], '-') + 1); } if (isOK($_GET['q'])) { $url .= '/search/' . $_GET['q']; } if (isOK($_GET['p'])) { $url .= '/' . $_GET['p']; } header('HTTP/1.1 301 Moved Permanently'); header('Location: ' . $url); exit; } header("HTTP/1.0 404 Not Found"); // mail404(); log404('map_list.php'); $tpl->clearLayout(); $tpl->clearSection(); $tpl->assignVar('PAGE_TITLE', 'Map Factory - 404 not Found'); $tpl->assignTemplate('template/bloc/header.tpl'); $tpl->assignTemplate('template/404.tpl'); $tpl->assignTemplate('template/bloc/footer.tpl'); $tpl->display(); exit; } } } ///////////////////////// // PAGINATION ///////////////////////// if ($_GET['p'] > 0) {
<?php include 'bloc/search.php'; log404('404.php'); ///////////////////////// // PAGE INFOS ///////////////////////// $tpl->assignVar(array('PAGE_TITLE' => 'Map Factory - 404 not Found', 'PAGE_DESCRIPTION' => 'Download custom Maps for your favorit FPS (First Person Shooters) games, and submit your own maps.', 'PAGE_KEYWORDS' => implode(', ', $keywordList)));
<?php include 'inc/conf.php'; if (file_exists('page/' . $page . '.php')) { include 'page/' . $page . '.php'; } else { header("HTTP/1.0 404 Not Found"); // mail404(); log404('index.php'); $tpl->clearLayout(); $tpl->clearSection(); $tpl->assignVar('PAGE_TITLE', 'Map Factory - 404 not Found'); $tpl->assignTemplate('template/bloc/header.tpl'); $tpl->assignTemplate('template/404.tpl'); $tpl->assignTemplate('template/bloc/footer.tpl'); $tpl->display(); exit; } if (ereg('MSIE 6', $_SERVER['HTTP_USER_AGENT'])) { $tpl->assignSection('ie6warning'); } else { $tpl->assignSection('notIE6'); } $tpl->assignTemplate('template/bloc/header.tpl'); $tpl->assignTemplate('template/' . $page . '.tpl'); $tpl->assignTemplate('template/bloc/footer.tpl'); $tpl->display(); echo '<!-- '; echo 'SQL : ' . number_format($db->execTime, 3, ',', ' ') . ' sec (' . $db->nbReq . ' req) | '; echo 'PHP : ' . number_format(microtime_float() - $start_time - $db->execTime, 3, ',', ' ') . ' sec | '; echo 'TOTAL : ' . number_format(microtime_float() - $start_time, 3, ',', ' ') . ' sec';
<?php include 'bloc/search.php'; header("HTTP/1.1 400 Bad Request"); log404('400.php'); ///////////////////////// // PAGE INFOS ///////////////////////// $tpl->assignVar(array('PAGE_TITLE' => 'Map Factory - 400 Bad Request', 'PAGE_DESCRIPTION' => 'Download custom Maps for your favorit FPS (First Person Shooters) games, and submit your own maps.', 'PAGE_KEYWORDS' => implode(', ', $keywordList)));
$gameId = $item['game_id']; $imageId = $item['image']; $fileId = $item['file_id']; $authorName = $item['author']; $gameName = $item['game']; $gametypeName = $item['gametype']; $mapTitle = $item['title']; } $file = ROOT_DIR . 'media/map/' . $fileId . '.zip'; if (file_exists($file)) { $tpl->assignVar('size', number_format(round(filesize($file) / 1024 / 1024))); } } else { header("HTTP/1.0 404 Not Found"); // mail404(); log404('map.php'); $tpl->clearLayout(); $tpl->clearSection(); $tpl->assignVar('PAGE_TITLE', 'Map Factory - 404 not Found'); $tpl->assignTemplate('template/bloc/header.tpl'); $tpl->assignTemplate('template/404.tpl'); $tpl->assignTemplate('template/bloc/footer.tpl'); $tpl->display(); exit; } ///////////////////////// // IMAGES ///////////////////////// $rs = $db->select('SELECT id FROM map_image WHERE parent_id=' . $_GET['map']); if ($rs['total'] > 0) { $tpl->assignSection('previewList');