Advertisement
Guest User

Untitled

a guest
Apr 7th, 2012
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.55 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.3.0
  8. * @ Author : DeZender
  9. * @ Release on : 17.05.2011
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. class IntroAction extends CommonAction {
  15. function index() {
  16. $this->data['aName'] = $this->data['global']['software_name_short'] . '首页';
  17. $this->data['introduction'] = file_get_contents( APP_PATH . 'introduction.html' );
  18. $this->data['license'] = file_get_contents( APP_PATH . 'license.html' );
  19.  
  20. if ($this->data['auth']['Payments'] != -1) {
  21. $this->data['balance'] = $this->find( array( 'module_name' => 'Users', 'where' => array( 'id' => $_SESSION['user_info']['uid'] ), 'field' => 'balance' ) );
  22. } else {
  23. $this->data['balance'] = 0;
  24. }
  25.  
  26. $this->data['os'] = os_info( );
  27. $this->data['server_name'] = trim( shell_exec( 'uname -n' ) );
  28. $this->data['free_space_home'] = byte_format( ai_disk_free_space( (DIRECTORY_SEPARATOR == '/' ? c( 'FTP_ROOT' ) : './') ) );
  29. $this->data['free_space_var'] = byte_format( ai_disk_free_space( (DIRECTORY_SEPARATOR == '/' ? '/var' : './') ) );
  30. $this->data['new_nginx_log_size'] = byte_format( $this->bdjahdcgce( c( 'HOSTS_LOG_ROOT' ) ) );
  31. $this->data['client_ip'] = get_client_ip( );
  32.  
  33. if (isset( $_GET['hardware_test_int'] )) {
  34. $cdecjgbhh['test']['int'] = $this->deehcfjibg( );
  35. f( 'hardware_test_int', $cdecjgbhh['test']['int'] );
  36. } else {
  37. if (f( 'hardware_test_int' )) {
  38. $cdecjgbhh['test']['int'] = f( 'hardware_test_int' );
  39. }
  40. }
  41.  
  42.  
  43. if (isset( $_GET['hardware_test_float'] )) {
  44. $cdecjgbhh['test']['float'] = $this->dhhcfeaech( );
  45. f( 'hardware_test_float', $cdecjgbhh['test']['float'] );
  46. } else {
  47. if (f( 'hardware_test_float' )) {
  48. $cdecjgbhh['test']['float'] = f( 'hardware_test_float' );
  49. }
  50. }
  51.  
  52.  
  53. if (isset( $_GET['hardware_test_read'] )) {
  54. $cdecjgbhh['test']['read'] = $this->bdhcjbhhia( );
  55. f( 'hardware_test_read', $cdecjgbhh['test']['read'] );
  56. } else {
  57. if (f( 'hardware_test_read' )) {
  58. $cdecjgbhh['test']['read'] = f( 'hardware_test_read' );
  59. }
  60. }
  61.  
  62.  
  63. if (isset( $_GET['hardware_test_write'] )) {
  64. $cdecjgbhh['test']['write'] = $this->cgdadfcggf( );
  65. f( 'hardware_test_write', $cdecjgbhh['test']['write'] );
  66. } else {
  67. if (f( 'hardware_test_write' )) {
  68. $cdecjgbhh['test']['write'] = f( 'hardware_test_write' );
  69. }
  70. }
  71.  
  72. $this->data['hardware_test'] = $cdecjgbhh['test'];
  73. $ciacdjfcgi = ai_ps( 'apache/bin|nginx|mysqld_safe|pure-ftpd|php-cgi|sshd|named|apache_LuManager/bin' );
  74. $this->data['apache_status'] = stristr( $ciacdjfcgi, 'apache/bin' );
  75. $this->data['apache_status'] = substr_count( $ciacdjfcgi, 'apache/bin' );
  76. $this->data['apache_vhosts'] = substr_count( file_get_contents( '/usr/local/apache/conf/vhost.conf' ), '</VirtualHost>' );
  77. $this->data['nginx_status'] = substr_count( $ciacdjfcgi, 'nginx' );
  78. $this->data['mysql_status'] = substr_count( $ciacdjfcgi, 'mysqld_safe' );
  79.  
  80. if (!( $this->data['mysql_status'])) {
  81. $this->data['mysql_status'] = 1;
  82. }
  83.  
  84. $this->data['pureftpd_status'] = substr_count( $ciacdjfcgi, 'pure-ftpd' );
  85.  
  86. if (!( $this->data['pureftpd_status'])) {
  87. $this->data['ftp_count'] = $this->count( array( 'module_name' => 'Ftps' ) );
  88. }
  89.  
  90. $this->data['php_cgi_status'] = substr_count( $ciacdjfcgi, 'php-cgi' );
  91. $this->data['sshd_status'] = substr_count( $ciacdjfcgi, 'sshd' );
  92. $this->data['bind_status'] = substr_count( $ciacdjfcgi, 'named' );
  93. $this->data['dns_count'] = $this->count( array( 'module_name' => 'Dnss' ) );
  94. $this->data['lum_status'] = substr_count( $ciacdjfcgi, 'apache_LuManager/bin' );
  95. $caffjbciij = preg_replace( '#\s+#s', ' ', shell_exec( 'df -h' ) );
  96. $caffjbciij = substr( $caffjbciij, strpos( $caffjbciij, '/dev/' ) );
  97. $bjgeifdjch = explode( ' ', $caffjbciij );
  98.  
  99. foreach ($bjgeifdjch as $djggfdjigc => $cajecdhbch) {
  100. if ($djggfdjigc) {
  101. if ($djggfdjigc % 6 == 0) {
  102. $bjgeifdjch->$djggfdjigc - 1 .= '
  103. ';
  104. continue;
  105. }
  106.  
  107. continue;
  108. }
  109. }
  110.  
  111. $caffjbciij = join( ' ', $bjgeifdjch );
  112. $caffjbciij = preg_replace( '#^\s+#m', '', $caffjbciij );
  113. preg_match_all( '#^/dev/.+$#Um', $caffjbciij, $ebijcihc );
  114. $fbecfhagj = array( );
  115.  
  116. foreach ($ebijcihc[0] as $djggfdjigc => $cajecdhbch) {
  117. $cajecdhbch = trim( $cajecdhbch );
  118. $cajecdhbch = preg_replace( '#\s+#', ' ', $cajecdhbch );
  119.  
  120. if ($cajecdhbch) {
  121. $dgggjeaieg = explode( ' ', $cajecdhbch );
  122. $dgggjeaieg = ai_trim( $dgggjeaieg );
  123. $fbecfhagj[$djggfdjigc] = $dgggjeaieg;
  124. continue;
  125. }
  126. }
  127.  
  128. $this->data['df'] = $fbecfhagj;
  129. $this->data['hardware'] = hardware( );
  130. $cgahfceadc = m( 'Logs' );
  131. $dhhgifceif = $cgahfceadc->where( array( 'uid' => $_SESSION['user_info']['uid'] ) )->count( );
  132.  
  133. if (!( c( 'IS_DEMO' ))) {
  134. if (86400 < $this->data['timestamp'] - $_SESSION['user_info']['dateline']) {
  135. if (!( is_file( SAFE_ROOT . 'safe_passwords/' . $_SESSION['user_info']['uid'] . '.key' ))) {
  136. if (!( ( !( 50 < $dhhgifceif ) && !( 3 <= substr_count( file_get_contents( '/usr/local/nginx/conf/vhost.conf' ), 'Welcome to our website!' ) ) ))) {
  137. $this->difadjjifd( '为了保证数据安全,必须设置保护密码。正跳转至设置页面...', u( 'Safes/index' ) . '#safe_password_tr', 5 );
  138. }
  139. }
  140. }
  141. }
  142.  
  143. if (f( 'soft_ver' ) == null) {
  144. $dacacbfdgh = $this->ifcjfchcd( '/usr/local/mysql/bin/mysqladmin --version' );
  145. preg_match( '#(\d+\.\d+\.\d+)#s', $dacacbfdgh, $ebijcihc );
  146. $cehgbjicea['mysql'] = $ebijcihc[1];
  147. $dacacbfdgh = $this->ifcjfchcd( '/usr/local/nginx/sbin/nginx -v ' . basic_output_suf( ) );
  148. preg_match( '#nginx/(\d+\.\d+\.\d+)#si', $dacacbfdgh, $ebijcihc );
  149. $cehgbjicea['nginx'] = $ebijcihc[1];
  150.  
  151. if (stristr( $dacacbfdgh, 'tengine' )) {
  152. preg_match( '#Tengine/(\d+\.\d+\.\d+)#s', $dacacbfdgh, $ebijcihc );
  153. $cehgbjicea['tengine'] = $ebijcihc[1];
  154. }
  155.  
  156. $dacacbfdgh = $this->ifcjfchcd( '/usr/local/apache/bin/apachectl -v ' . basic_output_suf( ) );
  157. preg_match( '#(\d+\.\d+\.\d+)#s', $dacacbfdgh, $ebijcihc );
  158. $cehgbjicea['apache'] = $ebijcihc[1];
  159. $dacacbfdgh = $this->ifcjfchcd( '/usr/local/php_fcgi/bin/php -v ' . basic_output_suf( ) );
  160. preg_match( '#PHP (\d+\.\d+\.\d+)#s', $dacacbfdgh, $ebijcihc );
  161. $cehgbjicea['php_fcgi'] = $ebijcihc[1];
  162. preg_match( '#(Zend Optimizer|Zend Guard Loader)(.+v\d+.+), Copyright#Us', $dacacbfdgh, $cffchcjjcj );
  163. $cehgbjicea['zend_fcgi'] = $cffchcjjcj[1] . $cffchcjjcj[2];
  164. $dacacbfdgh = $this->ifcjfchcd( '/usr/local/php/bin/php -v ' . basic_output_suf( ) );
  165. preg_match( '#PHP (\d+\.\d+\.\d+)#s', $dacacbfdgh, $ebijcihc );
  166. $cehgbjicea['php'] = $ebijcihc[1];
  167. preg_match( '#(Zend Optimizer|Zend Guard Loader)(.+v\d+.+), Copyright#Us', $dacacbfdgh, $cffchcjjcj );
  168. $cehgbjicea['zend'] = $cffchcjjcj[1] . $cffchcjjcj[2];
  169. preg_match( '#eAccelerator v(\d+\.\d+\.\d+\.\d+)#s', $dacacbfdgh, $ddggddiceh );
  170. $cehgbjicea['eAccelerator'] = $ddggddiceh[1];
  171. $dacacbfdgh = $this->ifcjfchcd( '/usr/local/pureftpd/sbin/pure-ftpd --help ' . basic_output_suf( ) );
  172. preg_match( '#(\d+\.\d+\.\d+)#s', $dacacbfdgh, $ebijcihc );
  173. $cehgbjicea['pureftpd'] = $ebijcihc[1];
  174.  
  175. if (PHP_OS == 'Linux') {
  176. $dacacbfdgh = $this->ifcjfchcd( 'cat /etc/issue' );
  177. } else {
  178. $dacacbfdgh = shell_exec( 'uname -r' );
  179. }
  180.  
  181. preg_match( '#(\d+\.\d+)#s', $dacacbfdgh, $ebijcihc );
  182. $cehgbjicea['os'] = $ebijcihc[1];
  183. f( 'soft_ver', $cehgbjicea );
  184. $this->data['soft_ver'] = $cehgbjicea;
  185. } else {
  186. $this->data['soft_ver'] = f( 'soft_ver' );
  187. }
  188.  
  189. $_SESSION['mysql_ver'] = $this->data['soft_ver']['mysql'];
  190.  
  191. if (!( c( 'IS_DEMO' ))) {
  192. if ($_SESSION['user_info']['sys_admin']) {
  193. if (!( isset( $_SESSION['lu_ad_contents'] ))) {
  194. $chhdhfbfah = curl_file_get_contents( $this->data['global']['down_url'] . '/lum_Intro_index_ad.zip', 3 );
  195. $djcgibcbd = explode( '
  196. ', $chhdhfbfah );
  197.  
  198. if ($djcgibcbd) {
  199. foreach ($djcgibcbd as $djggfdjigc => $cajecdhbch) {
  200. if (trim( $cajecdhbch )) {
  201. $djcgibcbd[$djggfdjigc] = '<li>' . h( $cajecdhbch ) . '</li>';
  202. continue;
  203. }
  204. }
  205.  
  206. $chhdhfbfah = '<ul>' . join( '
  207. ', $djcgibcbd ) . '</ul>';
  208. }
  209.  
  210. if (stristr( $chhdhfbfah, '<ul><li>' )) {
  211. $this->data['lu_ad_contents'] = $chhdhfbfah;
  212. $_SESSION['lu_ad_contents'] = ;
  213. }
  214. } else {
  215. $this->data['lu_ad_contents'] = $_SESSION['lu_ad_contents'];
  216. }
  217. }
  218. } else {
  219. $this->data['lu_ad_contents'] = '';
  220. }
  221.  
  222.  
  223. if (!( ( ( !( PGSQL_DB_PWD == 'zijidelu' ) && !( MYSQL_DB_PWD == 'zijidelu' ) ) && !( $_SESSION['password'] == 'dd8eb031789b6a0664709455e7d512ce' ) ))) {
  224. if (!( ai_cookie( 'change_db_password' ))) {
  225. ai_cookie( 'change_db_password', 1 );
  226. $this->data['please_change_password'] = 1;
  227. }
  228. } else {
  229. $this->data['please_change_password'] = 0;
  230. }
  231.  
  232.  
  233. if ($_SESSION['user_info']['sys_admin']) {
  234. if (abs( time( ) - $this->data['global']['first_runtime'] ) <= 86400) {
  235. $this->data['show_prompt'] = 1;
  236. }
  237. }
  238.  
  239. if (is_file( LUM_ROOT . DATA_PATH . 'try_lum.lock' )) {
  240. $this->data['try_lum_ing'] = 1;
  241. } else {
  242. $this->data['try_lum_ing'] = 0;
  243. }
  244.  
  245.  
  246. if ($_SESSION['user_pro_count']) {
  247. $this->data['user_pro_count'] = $_SESSION['user_pro_count'];
  248. } else {
  249. $this->data['user_pro_count'] = array( );
  250. $ccicebgdcg = $this->dhaghcihji( );
  251. $this->data['user_pro_count']['Solutions'] = ($ccicebgdcg == 0 ? 0 : count( $ccicebgdcg ));
  252. $ecfheijaij = array( 'Hosts', 'Ftps', 'Mysqls', 'Zones', 'Orders' );
  253.  
  254. foreach ($ecfheijaij as $djggfdjigc => $cajecdhbch) {
  255. if (!( null == $cajecdhbch)) {
  256. $this->data['user_pro_count'][$cajecdhbch] = $this->count( array( 'module_name' => $cajecdhbch, 'where' => array( 'uid' => $_SESSION['user_info']['uid'] ) ) );
  257. $this->data['user_pro_count'][$cajecdhbch . '_active'] = $this->count( array( 'module_name' => $cajecdhbch, 'where' => array( 'uid' => $_SESSION['user_info']['uid'], 'status' => 1 ) ) );
  258. continue;
  259. }
  260. }
  261.  
  262. $_SESSION['user_pro_count'] = $this->data['user_pro_count'];
  263. ( !LU_DEBUG && );
  264. }
  265.  
  266. $this->output( );
  267. }
  268.  
  269. function p%njn)inf() {
  270. sleep( 1 );
  271. $bbdjacjidi = microtime( true );
  272.  
  273. for ($diadgeibaa = 0; $diadgeibaa < 10000000; ++$diadgeibaa) {
  274. $dbgbafhgec = 2;
  275. }
  276.  
  277. $eaghjggehd = microtime( true );
  278. $bahaaeaihi = $eaghjggehd - $bbdjacjidi;
  279. $cejbfdgeih = round( 3.5 / $bahaaeaihi, 2 );
  280.  
  281. if ($cejbfdgeih < 0.1) {
  282. $cejbfdgeih = 0.1;
  283. } else {
  284. if (9.90000000000000035527137 < $cejbfdgeih) {
  285. $cejbfdgeih = 9.90000000000000035527137;
  286. }
  287. }
  288.  
  289. return array( 'score' => $cejbfdgeih, 'time' => $bahaaeaihi );
  290. }
  291.  
  292. function ,aee.
  293. }a() {
  294. sleep( 1 );
  295. $dbgbafhgec = pi( );
  296. $bbdjacjidi = microtime( true );
  297.  
  298. for ($diadgeibaa = 0; $diadgeibaa < 10000000; ++$diadgeibaa) {
  299. sqrt( $dbgbafhgec );
  300. }
  301.  
  302. $eaghjggehd = microtime( true );
  303. $bahaaeaihi = $eaghjggehd - $bbdjacjidi;
  304. $cejbfdgeih = round( 8 / $bahaaeaihi, 2 );
  305.  
  306. if ($cejbfdgeih < 0.1) {
  307. $cejbfdgeih = 0.1;
  308. } else {
  309. if (9.90000000000000035527137 < $cejbfdgeih) {
  310. $cejbfdgeih = 9.90000000000000035527137;
  311. }
  312. }
  313.  
  314. return array( 'score' => $cejbfdgeih, 'time' => $bahaaeaihi );
  315. }
  316.  
  317. function  b=dwtp() {
  318. sleep( 1 );
  319. $bbdjacjidi = microtime( true );
  320.  
  321. for ($diadgeibaa = 0; $diadgeibaa < 40000; ++$diadgeibaa) {
  322. clearstatcache( );
  323. file_get_contents( CONFIG_PATH . 'config.php' );
  324. }
  325.  
  326. $eaghjggehd = microtime( true );
  327. fclose( $dfafeebiab );
  328. $bahaaeaihi = $eaghjggehd - $bbdjacjidi;
  329. $cejbfdgeih = round( 3 / $bahaaeaihi, 2 );
  330.  
  331. if ($cejbfdgeih < 0.1) {
  332. $cejbfdgeih = 0.1;
  333. } else {
  334. if (9.90000000000000035527137 < $cejbfdgeih) {
  335. $cejbfdgeih = 9.90000000000000035527137;
  336. }
  337. }
  338.  
  339. return array( 'score' => $cejbfdgeih, 'time' => $bahaaeaihi );
  340. }
  341.  
  342. function q1fp9qnt us,() {
  343. sleep( 1 );
  344. $bbdjacjidi = microtime( true );
  345.  
  346. for ($diadgeibaa = 0; $diadgeibaa < 12000; ++$diadgeibaa) {
  347. clearstatcache( );
  348. file_put_contents( '/tmp/test_write.txt', 'test_write' . $diadgeibaa );
  349. }
  350.  
  351. $eaghjggehd = microtime( true );
  352. fclose( $dfafeebiab );
  353. $bahaaeaihi = $eaghjggehd - $bbdjacjidi;
  354. $cejbfdgeih = round( 1.5 / $bahaaeaihi, 2 );
  355.  
  356. if ($cejbfdgeih < 0.1) {
  357. $cejbfdgeih = 0.1;
  358. } else {
  359. if (9.90000000000000035527137 < $cejbfdgeih) {
  360. $cejbfdgeih = 9.90000000000000035527137;
  361. }
  362. }
  363.  
  364. return array( 'score' => $cejbfdgeih, 'time' => $bahaaeaihi );
  365. }
  366.  
  367. function lum_update_public() {
  368. if ($_POST['lum_update_check'] == 1) {
  369. $this->djffaijfgi( 1 );
  370. return null;
  371. }
  372.  
  373. $this->djffaijfgi( );
  374. }
  375.  
  376. function cancel_try_lum() {
  377. if (unlink( LUM_ROOT . DATA_PATH . 'try_lum.lock' )) {
  378. $this->success( '取消试用成功' );
  379. return null;
  380. }
  381.  
  382. $this->error( '取消试用失败' );
  383. }
  384.  
  385. function try_lum() {
  386. $djdehdihag = $this->count( array( 'module_name' => 'Hosts' ) );
  387.  
  388. if (5 < $djdehdihag) {
  389. $this->error( '网站数量少于5个才可以试用API功能' );
  390. }
  391.  
  392. $djdehdihag = $this->count( array( 'module_name' => 'Ftps' ) );
  393.  
  394. if (5 < $djdehdihag) {
  395. $this->error( 'FTP数量少于5个才可以试用API功能' );
  396. }
  397.  
  398. $djdehdihag = $this->count( array( 'module_name' => 'Hosts' ) );
  399.  
  400. if (5 < $djdehdihag) {
  401. $this->error( 'MySQL数量少于5个才可以试用API功能' );
  402. }
  403.  
  404. if (file_put_contents( LUM_ROOT . DATA_PATH . 'try_lum.lock', '1' )) {
  405. $this->ebjdggijii( array( 'msg' => '开启试用成功', 'log' => 'msg' ) );
  406. return null;
  407. }
  408.  
  409. $this->ebjdggijii( array( 'msg' => '开启试用失败' ) );
  410. }
  411.  
  412. function hecixaz;($dhfeddihhi = 0) {
  413. if (!( $this->data['global']['down_url'])) {
  414. $bhijjcciec = array( );
  415. $bhijjcciec[] = '不能连接官方下载服务器,请清空缓存后再试,如果还是不行,大致有以下3个原因::';
  416. $bhijjcciec[] = '1. 您的服务器不能连接外网';
  417. $bhijjcciec[] = '2. 官方服务器暂时失效';
  418. $bhijjcciec[] = '3. 您的服务器NS服务器(nameserver)设置错误,请检查/etc/resolv.conf文件!';
  419. $this->error( join( '<p>', $bhijjcciec ) );
  420. }
  421.  
  422. $ieeabijhe = $this->cfaifbdjej( $this->data['global']['down_url'] . '/update_list2.0.X.zip' );
  423.  
  424. if (!( $ieeabijhe)) {
  425. $this->error( '校验文件下载失败或者格式错误' );
  426. }
  427.  
  428. if (!( stristr( $ieeabijhe, a_b_c( c( 'SOFTWARE_VERSION' ), ' ' ) ))) {
  429. $this->error( '当前版本不能使用在线升级功能,升级失败' );
  430. }
  431.  
  432. $bgbcffgcjd = explode( '
  433. ', $ieeabijhe );
  434.  
  435. if ($dhfeddihhi == 1) {
  436. foreach ($bgbcffgcjd as $cajecdhbch) {
  437. $bagjbicbcf = explode( '---', $cajecdhbch );
  438. $bagjbicbcf = ai_trim( $bagjbicbcf );
  439.  
  440. if (c( 'SOFTWARE_VERSION' ) < trim( $bagjbicbcf[3] )) {
  441. if (!( stristr( $bagjbicbcf[2], 'allow' ))) {
  442. $this->error( '下一版本:LuManager ' . $bagjbicbcf[3] . ',但该版本不允许在线升级,请使用ssh进行升级!' );
  443. }
  444.  
  445. $bhijjcciec = array( );
  446. $bhijjcciec[] = '存在可用更新:LuManager ' . $bagjbicbcf[3] . ' ';
  447. $this->success( join( '<p>', $bhijjcciec ) );
  448. continue;
  449. }
  450. }
  451.  
  452. $this->error( '暂无更新,多谢关注!' );
  453. }
  454.  
  455. $badhfdefbb = 0;
  456.  
  457. foreach ($bgbcffgcjd as $cajecdhbch) {
  458. if ($badhfdefbb == 1) {
  459. $bagjbicbcf = explode( '---', $cajecdhbch );
  460. $bagjbicbcf = ai_trim( $bagjbicbcf );
  461.  
  462. if (stristr( $cajecdhbch, 'allow' )) {
  463. $bgaeedjjia = $this->ifcjfchcd( os_cmd( 'curl' ) . ' -I ' . $this->data['global']['down_url'] . '/lum' . $bagjbicbcf[3] . '/LuManager_last.tar.gz' );
  464.  
  465. if (!( stristr( $bgaeedjjia, '200 OK' ))) {
  466. $this->error( '无法连接官方服务器或者升级文件不存在,请稍候再试' );
  467. }
  468.  
  469. $dggfdciiab = array( );
  470. $dggfdciiab[] = 'cd /home/lum_tmp_files/';
  471. $dggfdciiab[] = 'rm -rf /home/lum_tmp_files/LuManager_last.tar.gz /home/lum_tmp_files/LuManager';
  472. $dggfdciiab[] = os_cmd( 'wget' ) . $this->data['global']['down_url'] . '/lum' . $bagjbicbcf[3] . '/LuManager_last.tar.gz';
  473. $dggfdciiab[] = 'tar -zxf LuManager_last.tar.gz';
  474. $this->ifcjfchcd( $dggfdciiab );
  475.  
  476. if (!( is_file( '/home/lum_tmp_files/LuManager_last.tar.gz' ))) {
  477. $this->error( '升级文件下载失败,请稍候再试' );
  478. }
  479.  
  480. if (!( stristr( md5_file( '/home/lum_tmp_files/LuManager_last.tar.gz' ) . sha1_file( '/home/lum_tmp_files/LuManager_last.tar.gz' ), trim( $bagjbicbcf[0] ) ))) {
  481. $this->error( '升级文件指纹校验错误,请暂时不要升级!' );
  482. }
  483.  
  484. if (!( is_dir( '/home/lum_tmp_files/LuManager' ))) {
  485. $this->error( $dggfdciiab . '升级文件解压失败,可能是下载不完整,请稍候再试' );
  486. }
  487.  
  488. $this->ifcjfchcd( 'chmod -R 700 /home/lum_tmp_files/LuManager*' );
  489. $this->ifcjfchcd( 'chown -R LuManager:LuManager /home/lum_tmp_files/LuManager*' );
  490. $dggfdciiab = array( );
  491. $cbdjghjif = '/home/hosts_backup/LuManager' . c( 'SOFTWARE_VERSION' ) . '/' . date( 'Y-m-d_H-i:s' ) . '/';
  492. $dggfdciiab[] = 'mkdir -p ' . $cbdjghjif;
  493. $dggfdciiab[] = 'cp -R ' . LUM_ROOT . '* ' . $cbdjghjif;
  494. $dggfdciiab[] = 'rm -rf ' . LUM_ROOT . '*';
  495. $dggfdciiab[] = 'cp -R /home/lum_tmp_files/LuManager/* ' . LUM_ROOT;
  496. $dggfdciiab[] = CMD_ROOT . 'lu-repair';
  497. $this->ifcjfchcd( $dggfdciiab );
  498.  
  499. if (stristr( file_get_contents( LUM_ROOT . 'Conf/config.php' ), $bagjbicbcf[3] )) {
  500. $bhijjcciec = '升级至LuManager ' . $bagjbicbcf[3] . '成功,请刷新并重新登陆!';
  501. $this->dabhjghhch( $bhijjcciec );
  502. $this->success( $bhijjcciec );
  503. } else {
  504. $this->ifcjfchcd( 'cp -R ' . $cbdjghjif . './* ' . LUM_ROOT );
  505. $bhijjcciec = '升级至LuManager ' . $bagjbicbcf[3] . '失败,请使用zijidelu_update.sh升级';
  506. $this->dabhjghhch( $bhijjcciec );
  507. $this->success( $bhijjcciec );
  508. }
  509. } else {
  510. $this->error( '下一版本:LuManager ' . $bagjbicbcf[3] . ',但该版本不允许在线升级,请使用ssh进行升级!' );
  511. }
  512. }
  513.  
  514. if (stristr( $cajecdhbch, c( 'SOFTWARE_VERSION' ) )) {
  515. $badhfdefbb = 1;
  516. continue;
  517. }
  518. }
  519.  
  520. }
  521. }
  522.  
  523. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement