Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2013
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.16 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 1.1.5.0
  8. * @ Author : DeZender
  9. * @ Release on : 09.06.2012
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. session_start( );
  15. require_once( 'include/lib.inc.php' );
  16. require_once( 'include/lib_router.inc.php' );
  17. sql_login( );
  18. test_access( $PHPSESSID );
  19. require_once( 'include/lib_diskusage.php' );
  20. unset( $_SESSION[securityAlerts] );
  21. unset( $_SESSION[updateAlerts] );
  22. $_SESSION['updateAlerts'] = $_SESSION['securityAlerts'] = array( );
  23.  
  24. if (isset( $_GET['saveBeta'] )) {
  25. set_config( 'show_beta_version', $_GET['saveBeta'] );
  26. }
  27.  
  28.  
  29. if (isset( $_GET['clearVoipexError'] )) {
  30. set_config( 'voipex_error', 0 );
  31. }
  32.  
  33.  
  34. if (get_config( 'show_beta_version' )) {
  35. $betaChecked = 'checked';
  36. }
  37.  
  38. $handle = @fopen( 'http://update.ispadmin.cz/online_info.txt', 'r' );
  39.  
  40. if ($handle) {
  41. $online_info = fread( $handle, 8192 );
  42. fclose( $handle );
  43. } else {
  44. $online_info = '';
  45. }
  46.  
  47.  
  48. if ($online_info != '') {
  49. $arr_online_info = explode( chr( 10 ), $online_info );
  50. foreach ($arr_online_info as $index => $item) {
  51. $arr_online_info[$index] = explode( '|', $item );
  52. }
  53.  
  54. foreach ($arr_online_info as $index => $item) {
  55.  
  56. if (strpos( $arr_online_info[$index][0], '_' ) !== false) {
  57. $val = substr( $arr_online_info[$index][0], 1 );
  58.  
  59. if ($val == 1) {
  60. $query = 'DELETE FROM mikrotik_version';
  61. @sql_go( $query );
  62. foreach ($arr_online_info as $sInd => $sItem) {
  63.  
  64. if ($sItem[0] == 1) {
  65. $version = explode( '.', $sItem[1] );
  66.  
  67. if (!isset( $sItem[5] )) {
  68. $sItem[5] = '';
  69. }
  70.  
  71. $ispVers = explode( ',', $sItem[5] );
  72.  
  73. if (( $sItem[5] == '' || in_array( VERSION, $ispVers ) )) {
  74. $query = '' . 'INSERT INTO mikrotik_version (main_version,version,status,cz_info,en_info)
  75. VALUES(\'' . $version['0'] . '\',\'' . $version['1'] . '\',\'' . $sItem['2'] . '\',\'' . $sItem['3'] . '\',\'' . $sItem['4'] . '\')';
  76. @sql_go( $query );
  77. continue;
  78. }
  79.  
  80. continue;
  81. }
  82. }
  83. }
  84.  
  85. $query = '' . 'SELECT * FROM online_info WHERE section = ' . $val;
  86. $result = @sql_go( $query );
  87.  
  88. if (mysql_num_rows( $result )) {
  89. $row = mysql_fetch_assoc( $result );
  90.  
  91. if ($row['valid_to'] == $arr_online_info[$index][1]) {
  92. continue;
  93. }
  94.  
  95. $query = 'UPDATE online_info SET valid_to=\'' . $arr_online_info[$index][1] . ( '' . '\', alert=\'1\', shown_admin_id=\'\' WHERE section = ' . $val );
  96. @sql_go( $query );
  97. continue;
  98. }
  99.  
  100. $query = '' . 'INSERT INTO online_info (section,valid_to,alert,shown_admin_id) VALUES(\'' . $val . '\',\'' . $arr_online_info[$index][1] . '\',1,\'\')';
  101. @sql_go( $query );
  102. continue;
  103. }
  104. }
  105. }
  106.  
  107. $rok = date( 'Y', time( ) );
  108. $mesic = date( 'm', time( ) );
  109. $xaccounttable = 'ipaccount_' . $rok . '_' . $mesic;
  110. sql_go( '' . 'CREATE TABLE IF NOT EXISTS ' . $xaccounttable . ' (
  111. `id` int(11) NOT NULL default \'0\',
  112. `den` smallint(6) NOT NULL default \'0\',
  113. `mesic` smallint(6) NOT NULL default \'0\',
  114. `rok` smallint(6) NOT NULL default \'0\',
  115. `in_bytes` bigint(20) NOT NULL default \'0\',
  116. `out_bytes` bigint(20) NOT NULL default \'0\',
  117. `ins_time` int(11) NOT NULL default \'0\',
  118. `rtrid` int(11) NOT NULL default \'0\',
  119. KEY `id` (`id`),
  120. KEY `in_bytes` (`in_bytes`),
  121. KEY `out_bytes` (`out_bytes`),
  122. KEY `mesic` (`mesic`),
  123. KEY `den` (`den`),
  124. KEY `rok` (`rok`),
  125. KEY `rtrid` (`rtrid`)
  126. ) ENGINE=MyISAM;
  127. ' );
  128.  
  129. if (!file_exists( 'tmp' )) {
  130. mkdir( 'tmp' );
  131. }
  132.  
  133. unset( $_SESSION[ISPADMIN_LATEST_VERSION] );
  134. unset( $_SESSION[ISPADMIN_LATEST_BETA_VERSION] );
  135. $handle = @fopen( 'http://update.ispadmin.eu/latest.txt', 'r' );
  136.  
  137. if ($handle) {
  138. $last_version = fread( $handle, 8192 );
  139. fclose( $handle );
  140. $last_version = preg_replace( '/
  141. /', '', $last_version );
  142. $_SESSION['ISPADMIN_LATEST_VERSION'] = $last_version;
  143. } else {
  144. $last_version = 12;
  145. }
  146. .....................................................................
  147. .........................................
  148. .................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement