Просмотр файла mp.php

Размер файла: 1.67Kb
  1. <?php
  2.  
  3. //Coding by Studentsov
  4. //ICQ: 161971
  5. //Jabber: studentsov@jabber.ru
  6. //Выполняю создание модификаций для популярных CMS, быстро и не дорого!
  7.  
  8. require_once 'includes/start.php';
  9. require_once 'includes/functions.php';
  10. require_once 'includes/header.php';
  11. require_once 'themes/' . $config['themes'] . '/index.php';
  12.  
  13. if (!is_user () or !is_admin (array (101, 102, 103, 105)) or (isset ($_SESSION['mpanel_password']) and $_SESSION['mpanel_password'] === trim (file_get_contents (DATADIR . 'mpanel_password.dat'))))
  14. {
  15. header ('Location: pages/error.php?error=404');
  16. exit;
  17. }
  18.  
  19. if (isset ($_POST['mp_password']))
  20. {
  21. $mp_password = check ($_POST['mp_password']);
  22. if ($mp_password === trim (file_get_contents (DATADIR . 'mpanel_password.dat')))
  23. {
  24. $_SESSION['mpanel_password'] = $mp_password;
  25. if (isset ($_SESSION['return_url']))
  26. {
  27. header ('Location: ' . $config['home'] . base64_decode ($_SESSION['return_url']));
  28. unset ($_SESSION['return_url']);
  29. }else
  30. {
  31. header ('Location: ' . $config['home'] . '/' . ADMINDIR . 'index.php');
  32. }
  33. }else
  34. {
  35. header ('Location: mp.php?isset=bad_mpanel_password');
  36. }
  37. exit;
  38. }
  39.  
  40. show_title ('admin.gif', 'Проверка доступа');
  41.  
  42. echo '<form action="mp.php" method="post">';
  43. echo '<b>Введите код доступа:</b><br />';
  44. echo '<input type="password" name="mp_password" /><br /><br />';
  45. echo '<input type="submit" value="Далее" /></form><br />';
  46.  
  47. echo '<img src="../images/img/homepage.gif" alt=""> <a href="index.php">На главную</a>';
  48.  
  49. require_once 'themes/' . $config['themes'] . '/foot.php';
  50.  
  51. ?>