Размер файла: 2.21Kb
- <?php
- error_reporting(0);
- include '../connect.php';
- include '../functions.php';
- include '../config.php';
- header("Content-type: text/html; charset=utf-8");
- header("Cache-Control: no-cache");
- $path=$_SERVER['PHP_SELF'];
- $folder=dirname($path);
- if (!isset($_GET['password']) and !isset($_GET['p']))
- {echo '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html><head><title>Admin</title></head>
- <form method="get" action="?">
- <input type="password" name="password"><br/>
- <input type="hidden" name="get" value="1">
- <input type="submit" value="Вход">
- </form></html>';
- exit();}
- if (isset($_GET['get']))
- {
- $get_pass=md5(trim($_GET['password']));
- if ($get_pass==$pass){echo '<a href="?p=0&password='.$get_pass.'">Вход</a>';}
- else {echo 'error';}
- exit();
- }
- $p=$_GET['p'];
- if ($_GET['password']<>$pass){echo 'err'; exit();}
-
- switch ($p)
- {
- case '0':
- echo '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html><head><title>Админ панель</title>
- '.$css.'
- </head>
- <div class="zag" align="center">Админ панель</div>
- <div class="c">
- <a href="?p=1&password='.$_GET['password'].'&pp=0">Управление категориями</a><br/>
- <a href="?p=2&password='.$_GET['password'].'">Опубликовать файлы</a><br/>
- <a href="?p=3&password='.$_GET['password'].'">Управление файлами</a><br/>
- <a href="'.str_replace('_X_admin_X_','',$folder).'?password='.$_GET['password'].'">Описание файлов</a><br/>
- </div>
- <div class="kon" align="center"><a href="'.str_replace('/_X_admin_X_','',$folder).'/">В ZC</a></div>
- </html>';
- break;
- ///---------------------------------------------///
- case '1':
- include $_SERVER['DOCUMENT_ROOT'].$folder.'/pages/1.php';
- break;
- ///---------------------------------------------///
- case '2':
- include $_SERVER['DOCUMENT_ROOT'].$folder.'/pages/2.php';
- break;
- ///---------------------------------------------///
- case '3':
- include $_SERVER['DOCUMENT_ROOT'].$folder.'/pages/3.php';
- break;
- ///---------------------------------------------///
- case '4':
- include $_SERVER['DOCUMENT_ROOT'].$folder.'/pages/4.php';
- break;
- ///---------------------------------------------///
- }
- ?>