Просмотр файла zagrcent/admin.php

Размер файла: 1.75Kb
  1. <?php
  2.  
  3. require_once ("../includes/start.php");
  4. require_once ("../includes/functions.php");
  5. require_once ("../includes/header.php");
  6. include_once ("../themes/".$config['themes']."/index.php");
  7.  
  8. $t=microtime();
  9. session_name('ad');
  10. session_start();
  11. $s=session_id();
  12. print '<?xml version="1.0" encoding="utf-8"?>
  13. <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
  14.  
  15. <html xmlns="http://www.w3.org/1999/xhtml">
  16.  
  17. <head>
  18. <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
  19. <meta name="generator" content="Adobe GoLive"/>
  20. <title>Админ-панель</title>
  21. </head>
  22.  
  23. <p align="left"><small>';
  24. if (!@$act)
  25. {
  26. print
  27. '<form method="post" action="admin.php?act=do">
  28. Пароль:<br/>
  29. <input name="pass" maxlength="30" value=""/><br/>
  30. <input value="Войти" name="do" type="submit"/></form><br/>';
  31. }
  32. else
  33. {if (@$_SESSION['admin']!='yes')
  34. $pass=@$_POST['pass'];
  35. //Тут нужно задать пароль от админ-панели
  36. include 'nast.php';
  37. if (@$pass!=$passw and @$_SESSION['admin']!='yes')
  38. print 'неверный пароль<br/><a href="admin.php">Повторить ввод</a><br/>';
  39. else{
  40. $_SESSION['admin']='yes';
  41. $sess_id=session_id();
  42. include('db.php');
  43. print "<a href=\"upload.php?ad=$s\">Загрузка файлов</a><br/>";
  44. print "<a href=\"updatefile.php?ad=$s\">Обновление списка файлов</a><br/>";
  45. print "<a href=\"import.php?ad=$s\">Импорт файлов</a><br/>";
  46. $tim=time()-300;
  47.  
  48.  
  49. print "<a href=\"exitadmin.php?ad=$s\">Выход из системы</a><br/>
  50. ";
  51. }
  52. }
  53. include_once ("themes/".$config['themes']."/foot.php");
  54. ?>
  55. </small></p></body></html>
  56.  
  57.