Advertisement
Guest User

Untitled

a guest
Aug 21st, 2013
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.97 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for Zend Encoder/SafeGuard & PhpExpress)
  6. *
  7. * @ Version : 1.1.6.0
  8. * @ Author : DeZender
  9. * @ Release on : 02.06.2013
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. session_start( );
  15. set_time_limit( 0 );
  16. define( 'ROOT', realpath( dirname( 'e:\webservers\home\direct\zend\index.php' ) ) . '/' );
  17. include_once( ROOT . 'config.php' );
  18. include_once( ROOT . 'include/time.class.php' );
  19. include_once( ROOT . 'include/db.class.php' );
  20. include_once( ROOT . 'include/user.class.php' );
  21. include_once( ROOT . 'include/mode.class.php' );
  22. include_once( ROOT . 'include/company.class.php' );
  23. include_once( ROOT . 'include/stats.class.php' );
  24. include_once( ROOT . 'include/pclzip.lib.class.php' );
  25. include_once( ROOT . 'include/yandexjson.class.php' );
  26. $time = new timecontrol( );
  27. $db = new db( $db_host, $db_user, $db_pass, $db_name );
  28. $user = new user( );
  29. $mode = new mode( );
  30. $company = new company( );
  31. $stats = new stats( );
  32. $action = $_REQUEST['action'];
  33. $id = (int)$_REQUEST['id'];
  34. $uid = (int)$_REQUEST['uid'];
  35. $is_active = (int)$_REQUEST['is_active'];
  36. $page = (int)$_REQUEST['page'];
  37.  
  38. if (!( $action)) {
  39. $action = 'company';
  40. }
  41.  
  42.  
  43. if ($action == 'ajax_login') {
  44. require_once( ROOT . 'js/JsHttpRequest/JsHttpRequest.php' );
  45. $JsHttpRequest = &new jshttprequest( 'utf-8' );
  46.  
  47. $pass = $_REQUEST['pass'];
  48. $user->admlogin( $pass );
  49. $_RESULT = array( 'out' => 1 );
  50. exit( );
  51. }
  52.  
  53.  
  54. if ($user->is_admin == false) {
  55. include( ROOT . 'templates/user_login.php' );
  56. exit( );
  57. }
  58.  
  59.  
  60. if ($action == 'logout') {
  61. $user->admlogout( );
  62. exit( );
  63. }
  64.  
  65.  
  66. if ($action == 'company') {
  67. if (0 < $id) {
  68. if (isset( $_GET['is_active'] )) {
  69. $_SESSION['url_position']['advert']->is_active = (int)$_GET['is_active'];
  70. header( 'Location: /company/' . $id . '/' );
  71. }
  72.  
  73. $is_active = (int)$_SESSION['url_position']['advert']->is_active;
  74. $_SESSION['url_position']['advert']->is_active = $is_active;
  75. $modeList = $company->listmode( );
  76. $advertList = $company->listadvert( $id, $is_active );
  77. $crontabList = $company->listcrontab( $id );
  78. $title = 'Кампания: ' . $advertList[0]->company_name;
  79. $fincl = 'advert_list.php';
  80. }
  81. } else {
  82. if ($action == 'advert') {
  83. if (0 < $id) {
  84. $modeList = $company->listmode( );
  85. $page -= 1;
  86.  
  87. if ($page < 0) {
  88. $page = 0;
  89. }
  90.  
  91. $count_on_page = 50;
  92. $count = $company->countphrases( $id );
  93. $count_page = ceil( $count / $count_on_page );
  94. $sql_start = $count_on_page * $page;
  95. $advertList = $company->listphrases( $id, $sql_start, $count_on_page );
  96. $crontabList = $company->listcrontab( 0, $id );
  97. $title = 'Объявление: ' . $advertList[0]->advert_name;
  98. $fincl = 'phrases_list.php';
  99. }
  100. } else {
  101. ......................................................................
  102. ...................................
  103. ..............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement