Advertisement
Guest User

Untitled

a guest
Jun 26th, 2012
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.67 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. class tekssh {
  15. var $contyp = null;
  16. var $connection = null;
  17. var $constream = null;
  18.  
  19. function connect($sshdaemon, $daemonpasswd, $serverip, $sshport, $sshuser, $idrsapub, $idrsa, $rootpw) {
  20. if ($sshdaemon == 0) {
  21. $this->contyp = 0;
  22.  
  23. if (!$this->connection = ssh2_connect( $serverip, $sshport )) {
  24. return 'error_00001';
  25. }
  26.  
  27.  
  28. if ($rootpw != '') {
  29. if (!ssh2_auth_password( $this->connection, $sshuser, $rootpw )) {
  30. $this->connection = null;
  31. return 'error_00003';
  32. }
  33. } else {
  34. if (!ssh2_auth_pubkey_file( $this->connection, $sshuser, $idrsapub, $idrsa, '' )) {
  35. $this->connection = null;
  36. return 'error_00002';
  37. }
  38. }
  39. }
  40.  
  41.  
  42. if ($sshdaemon == 1) {
  43. $this->contyp = 1;
  44. $localserv = $_SERVER['SERVER_ADDR'];
  45.  
  46. if ($serverip == $localserv) {
  47. $serverip = 'localhost';
  48. }
  49.  
  50. $this->constream = @fsockopen( $serverip, $sshport, $errno, $errstr, 3 );
  51.  
  52. if (!$this->constream) {
  53. fclose( $this->constream );
  54. $this->connection = null;
  55. return 'error_00001';
  56. }
  57.  
  58. $d_random = rand( 3, 1000 );
  59. $daemonpasswd = crypt( $daemonpasswd, $d_random ) . ' ' . $d_random;
  60. fwrite( $this->constream, ( '' . $daemonpasswd . '
  61. ' ) );
  62. $buf = fread( $this->constream, 4096 );
  63.  
  64. if ($buf != 'ID100') {
  65. fclose( $this->constream );
  66. $this->connection = null;
  67. return 'error_00004';
  68. }
  69. }
  70.  
  71.  
  72. if ($sshdaemon == 2) {
  73. $this->contyp = 2;
  74. $localserv = $_SERVER['SERVER_ADDR'];
  75.  
  76. if ($serverip == $localserv) {
  77. $serverip = 'localhost';
  78. }
  79.  
  80. $this->constream = @fsockopen( $serverip, $sshport, $errno, $errstr, 3 );
  81.  
  82. if (!$this->constream) {
  83. fclose( $this->constream );
  84. $this->connection = null;
  85. return 'error_00001';
  86. }
  87.  
  88. fwrite( $this->constream, ( '' . $daemonpasswd . '
  89. ' ) );
  90. $buf = fread( $this->constream, 4096 );
  91. $buf = preg_replace( '/\r\n|\r|\n/', '', $buf );
  92.  
  93. if ($buf != 'ID1') {
  94. fclose( $this->constream );
  95. $this->connection = null;
  96. return 'error_00004';
  97. }
  98. }
  99.  
  100. return 'ok_00001';
  101. }
  102.  
  103. function exefull($cmd) {
  104. if ($this->contyp == '0') {
  105. if (!$this->constream = ssh2_exec( $this->connection, $cmd )) {
  106. return 'error_00005';
  107. }
  108.  
  109. stream_set_blocking( $this->constream, true );
  110. $data = '';
  111.  
  112. if ($buf = fread( $this->constream, 4096 )) {
  113. flush( );
  114. $data .= $buf;
  115. }
  116.  
  117. return $data;
  118. }
  119.  
  120.  
  121. if ($this->contyp == '1') {
  122. $data = '';
  123. fwrite( $this->constream, base64_encode( $cmd ) . '
  124. ' );
  125.  
  126. while (!feof( $this->constream )) {
  127. $data .= fread( $this->constream, 4096 );
  128. }
  129.  
  130. return $data;
  131. }
  132.  
  133.  
  134. if ($this->contyp == '2') {
  135. $data = '';
  136. fwrite( $this->constream, $cmd );
  137.  
  138. while (!feof( $this->constream )) {
  139. $datacache = fread( $this->constream, 4096 );
  140. $data .= preg_replace( '/\r\n|\r|\n/', '', $datacache );
  141. }
  142.  
  143. return $data;
  144. }
  145.  
  146. return 'error_00006';
  147. }
  148.  
  149. function exelite($cmd) {
  150. if ($this->contyp == '0') {
  151. if (!$this->constream = ssh2_exec( $this->connection, $cmd )) {
  152. return 'error_00005';
  153. }
  154.  
  155. stream_set_blocking( $this->constream, true );
  156. $data = fread( $this->constream, 4096 );
  157. return $data;
  158. }
  159.  
  160.  
  161. if ($this->contyp == '1') {
  162. fwrite( $this->constream, base64_encode( $cmd ) . '
  163. ' );
  164. $data = fread( $this->constream, 4096 );
  165. return $data;
  166. }
  167.  
  168.  
  169. if ($this->contyp == '2') {
  170. fwrite( $this->constream, $cmd );
  171. $data = fread( $this->constream, 4096 );
  172. $data = preg_replace( '/\r\n|\r|\n/', '', $data );
  173. return $data;
  174. }
  175.  
  176. return 'error_00006';
  177. }
  178.  
  179. function disconnect() {
  180. if ($this->contyp == '0') {
  181. $this->exelite( 'exit' );
  182. }
  183.  
  184. @fclose( $this->constream );
  185. $this->connection = null;
  186. }
  187.  
  188. function __destruct() {
  189. $this->disconnect( );
  190. }
  191. }
  192.  
  193. function tekinstall($sshdaemon, $daemonpasswd, $sshport, $sshuser, $scriptpath, $user, $userid, $ftppw, $serverip, $path, $name, $typ, $status) {
  194. global $wioption;
  195. global $prefix;
  196. global $db;
  197.  
  198. $tekssh = new tekssh( );
  199. $tekssh_stat = $tekssh->connect( $sshdaemon, $daemonpasswd, $serverip, $sshport, $sshuser, $wioption[idrsapub], $wioption[idrsa], '' );
  200.  
  201. if ($tekssh_stat == 'ok_00001') {
  202. if ($sshdaemon == 2) {
  203. $image = '' . $wioption['imagepath'] . '/' . $name . '.zip';
  204. } else {
  205. $image = '' . $wioption['imagepath'] . '/' . $name . '.tar';
  206. }
  207.  
  208. $timeout = 704;
  209. $old = ini_set( 'default_socket_timeout', $timeout );
  210. $file = fopen( '' . $image, 'r' );
  211. ini_set( 'default_socket_timeout', $old );
  212. stream_set_timeout( $file, $timeout );
  213. stream_set_blocking( $file, 0 );
  214.  
  215. if ($file == FALSE) {
  216. $timeout = 704;
  217. $old = ini_set( 'default_socket_timeout', $timeout );
  218.  
  219. if ($sshdaemon == 2) {
  220. $image = '' . $wioption['imagepathtwo'] . '/' . $name . '.zip';
  221. } else {
  222. $image = '' . $wioption['imagepathtwo'] . '/' . $name . '.tar';
  223. }
  224.  
  225. $image = '' . $wioption['imagepathtwo'] . '/' . $name . '.tar';
  226. $file = @fopen( '' . $image, 'r' );
  227. ini_set( 'default_socket_timeout', $old );
  228. stream_set_timeout( $file, $timeout );
  229. stream_set_blocking( $file, 0 );
  230.  
  231. if ($file == FALSE) {
  232. $imagepath = '' . $wioption['imagepath'];
  233. } else {
  234. $imagepath = '' . $wioption['imagepathtwo'];
  235. }
  236. } else {
  237. $imagepath = '' . $wioption['imagepath'];
  238. }
  239.  
  240.  
  241. if ($imagepath) {
  242. if ($status != 'delete') {
  243. $aprow = $db->sql_numrows( $db->sql_query( 'SELECT * FROM ' . $prefix . ( '' . '_applications WHERE serverip=\'' . $serverip . '\' AND memberid=\'' . $userid . '\'' ) ) );
  244. $gsrow = $db->sql_numrows( $db->sql_query( 'SELECT * FROM ' . $prefix . ( '' . '_gameserver WHERE serverip=\'' . $serverip . '\' AND memberid=\'' . $userid . '\'' ) ) );
  245. $vsrow = $db->sql_numrows( $db->sql_query( 'SELECT * FROM ' . $prefix . ( '' . '_voiceserver WHERE serverip=\'' . $serverip . '\' AND memberid=\'' . $userid . '\' AND typ!=\'Teamspeak\' AND typ!=\'Teamspeak3\'' ) ) );
  246. $ssrow = $db->sql_numrows( $db->sql_query( 'SELECT * FROM ' . $prefix . ( '' . '_streamserver WHERE serverip=\'' . $serverip . '\' AND memberid=\'' . $userid . '\'' ) ) );
  247. $virow = $db->sql_numrows( $db->sql_query( 'SELECT * FROM ' . $prefix . ( '' . '_vstreamserver WHERE serverip=\'' . $serverip . '\' AND memberid=\'' . $userid . '\'' ) ) );
  248.  
  249. if (( ( ( ( $aprow == 0 && $gsrow == 0 ) && $vsrow == 0 ) && $ssrow == 0 ) && $virow == 0 )) {
  250. if ($sshdaemon == 2) {
  251. $cmd = '' . '\'useradd\'|\'' . $user . '\'|\'' . $ftppw . '\'
  252. ';
  253. } else {
  254. $cmd = '' . 'cd ' . $scriptpath . ';sudo ./tekbase 1 \'' . $user . '\' \'' . $ftppw . '\'';
  255. }
  256.  
  257. $tekssh_stat = $tekssh->exelite( $cmd );
  258. $tekssh_stat = substr( $tekssh_stat, 0, 3 );
  259.  
  260. if ($tekssh_stat == 'ID1') {
  261. $tekssh_stat = 'ok_00001';
  262. } else {
  263. $tekssh_stat = 'error_00009';
  264. }
  265. }
  266. }
  267.  
  268.  
  269. if ($tekssh_stat == 'ok_00001') {
  270. if ($sshdaemon == 2) {
  271. $cmd = '' . '\'install\'|\'' . $typ . '\'|\'' . $user . '\'|\'' . $path . '\'|\'' . $name . '\'|\'' . $imagepath . '\'|\'' . $status . '\'
  272. ';
  273. } else {
  274. $cmd = '' . 'cd ' . $scriptpath . ';sudo ./tekbase 5 \'' . $user . '\' \'' . $path . '\' \'' . $name . '\' \'' . $imagepath . '\' \'' . $typ . '\' \'' . $status . '\'';
  275. }
  276.  
  277. $tekssh_stat = $tekssh->exelite( $cmd );
  278. $tekssh_stat = substr( $tekssh_stat, 0, 3 );
  279. $tekssh->disconnect( );
  280.  
  281. if ($tekssh_stat == 'ID1') {
  282. return 'ok_00001';
  283. }
  284.  
  285. return 'error_00007';
  286. }
  287. }
  288.  
  289. return 'error_00008';
  290. }
  291.  
  292. return $tekssh_stat;
  293. }
  294.  
  295. function tekdelete($sshdaemon, $daemonpasswd, $sshport, $sshuser, $scriptpath, $user, $serverip, $path, $typ) {
  296. global $wioption;
  297.  
  298. $tekssh = new tekssh( );
  299. $tekssh_stat = $tekssh->connect( $sshdaemon, $daemonpasswd, $serverip, $sshport, $sshuser, $wioption[idrsapub], $wioption[idrsa], '' );
  300.  
  301. if ($tekssh_stat == 'ok_00001') {
  302. if ($sshdaemon == 2) {
  303. $cmd = '' . '\'delete\'|\'' . $typ . '\'|\'' . $user . '\'|\'' . $path . '\'
  304. ';
  305. } else {
  306. $cmd = '' . 'cd ' . $scriptpath . ';sudo ./tekbase 7 \'' . $user . '\' \'' . $path . '\' \'' . $typ . '\'';
  307. }
  308.  
  309. $tekssh_stat = $tekssh->exelite( $cmd );
  310. $tekssh_stat = substr( $tekssh_stat, 0, 3 );
  311. $tekssh->disconnect( );
  312.  
  313. if ($tekssh_stat == 'ID1') {
  314. return 'ok_00001';
  315. }
  316.  
  317. return 'error_00007';
  318. }
  319.  
  320. return $tekssh_stat;
  321. }
  322.  
  323. function tekdeleteuser($sshdaemon, $daemonpasswd, $sshport, $sshuser, $scriptpath, $user, $serverip, $deleteall) {
  324. global $wioption;
  325.  
  326. $tekssh = new tekssh( );
  327. $tekssh_stat = $tekssh->connect( $sshdaemon, $daemonpasswd, $serverip, $sshport, $sshuser, $wioption[idrsapub], $wioption[idrsa], '' );
  328.  
  329. if ($tekssh_stat == 'ok_00001') {
  330. if ($sshdaemon == 2) {
  331. $cmd = '' . '\'userdel\'|\'' . $user . '\'|\'' . $deleteall . '\'
  332. ';
  333. } else {
  334. $cmd = '' . 'cd ' . $scriptpath . ';sudo ./tekbase 3 \'' . $user . '\' \'' . $deleteall . '\'';
  335. }
  336.  
  337. $tekssh_stat = $tekssh->exelite( $cmd );
  338. $tekssh_stat = substr( $tekssh_stat, 0, 3 );
  339. $tekssh->disconnect( );
  340.  
  341. if ($tekssh_stat == 'ID1') {
  342. return 'ok_00001';
  343. }
  344.  
  345. return 'error_00007';
  346. }
  347.  
  348. return $tekssh_stat;
  349. }
  350.  
  351. function tekmoduser($sshdaemon, $daemonpasswd, $sshport, $sshuser, $scriptpath, $user, $serverip, $ftppasswd) {
  352. global $wioption;
  353.  
  354. $tekssh = new tekssh( );
  355. $tekssh_stat = $tekssh->connect( $sshdaemon, $daemonpasswd, $serverip, $sshport, $sshuser, $wioption[idrsapub], $wioption[idrsa], '' );
  356.  
  357. if ($tekssh_stat == 'ok_00001') {
  358. if ($sshdaemon == 2) {
  359. $cmd = '' . '\'usermod\'|\'' . $user . '\'|\'' . $ftppasswd . '\'
  360. ';
  361. } else {
  362. $cmd = '' . 'cd ' . $scriptpath . ';sudo ./tekbase 2 \'' . $user . '\' \'' . $ftppasswd . '\'';
  363. }
  364.  
  365. $tekssh_stat = $tekssh->exelite( $cmd );
  366. $tekssh_stat = substr( $tekssh_stat, 0, 3 );
  367. $tekssh->disconnect( );
  368.  
  369. if ($tekssh_stat == 'ID1') {
  370. return 'ok_00001';
  371. }
  372.  
  373. return 'error_00007';
  374. }
  375.  
  376. return $tekssh_stat;
  377. }
  378.  
  379. function tekchmod($sshdaemon, $daemonpasswd, $sshport, $sshuser, $scriptpath, $user, $typ, $path, $files, $serverip) {
  380. global $wioption;
  381.  
  382. $tekssh = new tekssh( );
  383. $tekssh_stat = $tekssh->connect( $sshdaemon, $daemonpasswd, $serverip, $sshport, $sshuser, $wioption[idrsapub], $wioption[idrsa], '' );
  384.  
  385. if ($tekssh_stat == 'ok_00001') {
  386. $cmd = '' . 'cd ' . $scriptpath . ';sudo ./tekbase 28 \'' . $user . '\' \'' . $typ . '\' \'' . $path . '\' \'' . $files . '\'';
  387. $tekssh_stat = $tekssh->exelite( $cmd );
  388. $tekssh_stat = substr( $tekssh_stat, 0, 3 );
  389. $tekssh->disconnect( );
  390.  
  391. if ($tekssh_stat == 'ID1') {
  392. return 'ok_00001';
  393. }
  394.  
  395. return 'error_00007';
  396. }
  397.  
  398. return $tekssh_stat;
  399. }
  400.  
  401. function tekcopy($sshdaemon, $daemonpasswd, $sshport, $sshuser, $scriptpath, $user, $typ, $path, $files, $serverip) {
  402. global $wioption;
  403.  
  404. $tekssh = new tekssh( );
  405. $tekssh_stat = $tekssh->connect( $sshdaemon, $daemonpasswd, $serverip, $sshport, $sshuser, $wioption[idrsapub], $wioption[idrsa], '' );
  406.  
  407. if ($tekssh_stat == 'ok_00001') {
  408. $cmd = '' . 'cd ' . $scriptpath . ';sudo ./tekbase 29 \'' . $user . '\' \'' . $typ . '\' \'' . $path . '\' \'' . $files . '\'';
  409. $tekssh_stat = $tekssh->exelite( $cmd );
  410. $tekssh_stat = substr( $tekssh_stat, 0, 3 );
  411. $tekssh->disconnect( );
  412.  
  413. if ($tekssh_stat == 'ID1') {
  414. return 'ok_00001';
  415. }
  416.  
  417. return 'error_00007';
  418. }
  419.  
  420. return $tekssh_stat;
  421. }
  422.  
  423. function tekmd5check($sshdaemon, $daemonpasswd, $sshport, $sshuser, $scriptpath, $user, $serverip, $path, $typ) {
  424. global $wioption;
  425.  
  426. $tekssh = new tekssh( );
  427. $tekssh_stat = $tekssh->connect( $sshdaemon, $daemonpasswd, $serverip, $sshport, $sshuser, $wioption[idrsapub], $wioption[idrsa], '' );
  428.  
  429. if ($tekssh_stat == 'ok_00001') {
  430. $cmd = '' . 'cd ' . $scriptpath . ';sudo ./tekbase 30 \'' . $user . '\' \'' . $typ . '\' \'' . $path . '\'';
  431. $tekssh_stat = $tekssh->exelite( $cmd );
  432. $tekssh_stat = substr( $tekssh_stat, 0, 3 );
  433. $tekssh->disconnect( );
  434.  
  435. if ($tekssh_stat == 'ID1') {
  436. return 'ok_00001';
  437. }
  438.  
  439. return 'error_00007';
  440. }
  441.  
  442. return $tekssh_stat;
  443. }
  444.  
  445. function tekscript($sshdaemon, $daemonpasswd, $sshport, $sshuser, $scriptpath, $serverip) {
  446. global $wioption;
  447.  
  448. $tekssh = new tekssh( );
  449. $tekssh_stat = $tekssh->connect( $sshdaemon, $daemonpasswd, $serverip, $sshport, $sshuser, $wioption[idrsapub], $wioption[idrsa], '' );
  450.  
  451. if ($tekssh_stat == 'ok_00001') {
  452. if ($sshdaemon == 2) {
  453. $cmd = 'version
  454. ';
  455. } else {
  456. $cmd = '' . 'cd ' . $scriptpath . ';sudo ./tekbase 18';
  457. }
  458.  
  459. $tekssh_stat = $tekssh->exelite( $cmd );
  460. $tekssh_stat = substr( $tekssh_stat, 0, 3 );
  461. $tekssh->disconnect( );
  462. return '' . $tekssh_stat;
  463. }
  464.  
  465. return '';
  466. }
  467.  
  468. function tekscriptinst($sshdaemon, $daemonpasswd, $sshport, $sshuser, $scriptpath, $serverip) {
  469. global $wioption;
  470.  
  471. $tekssh = new tekssh( );
  472. $tekssh_stat = $tekssh->connect( $sshdaemon, $daemonpasswd, $serverip, $sshport, $sshuser, $wioption[idrsapub], $wioption[idrsa], '' );
  473.  
  474. if ($tekssh_stat == 'ok_00001') {
  475. $cmd = '' . 'cd ' . $scriptpath . ';sudo ./tekbase 19';
  476.  
  477. if ($sshdaemon == 2) {
  478. $tekssh_stat = 'ID1';
  479. } else {
  480. $tekssh_stat = $tekssh->exelite( $cmd );
  481. substr( $tekssh_stat, 0, 3 );
  482. $tekssh_stat = $cmd = '' . 'cd ' . $scriptpath . ';sudo ./tekbase 19';
  483. $tekssh->disconnect( );
  484. }
  485.  
  486.  
  487. if ($tekssh_stat == 'ID1') {
  488. return 'ok_00001';
  489. }
  490.  
  491. return 'error_00007';
  492. }
  493.  
  494. return $tekssh_stat;
  495. }
  496.  
  497. function tekrootstatus($sshdaemon, $daemonpasswd, $sshport, $sshuser, $scriptpath, $serverip, $typ, $trafficmonth, $trafficmonthtwo) {
  498. global $wioption;
  499.  
  500. $tekssh = new tekssh( );
  501. $tekssh_stat = $tekssh->connect( $sshdaemon, $daemonpasswd, $serverip, $sshport, $sshuser, $wioption[idrsapub], $wioption[idrsa], '' );
  502.  
  503. if ($tekssh_stat == 'ok_00001') {
  504. $cmd = ( '' . 'cd ' . $scriptpath . ';sudo ./tekbase 20 \'' . $typ . '\' "' . $trafficmonth . '" "' . $trafficmonthtwo . '"' );
  505. $tekssh_stat = $tekssh->exelite( $cmd );
  506. $tekssh->disconnect( );
  507. return $tekssh_stat;
  508. }
  509.  
  510. return '';
  511. }
  512.  
  513. function tekquota($sshdaemon, $daemonpasswd, $sshport, $sshuser, $scriptpath, $serverip, $quotapath, $vara, $varb, $varc, $vard) {
  514. global $wioption;
  515.  
  516. $tekssh = new tekssh( );
  517. $tekssh_stat = $tekssh->connect( $sshdaemon, $daemonpasswd, $serverip, $sshport, $sshuser, $wioption[idrsapub], $wioption[idrsa], '' );
  518.  
  519. if ($tekssh_stat == 'ok_00001') {
  520. $cmd = '' . 'cd ' . $scriptpath . ';sudo ./tekbase 31 \'' . $quotapath . '\' \'' . $vara . '\' \'' . $varb . '\' \'' . $varc . '\' \'' . $vard . '\'';
  521. $tekssh_stat = $tekssh->exelite( $cmd );
  522. $tekssh->disconnect( );
  523. return $tekssh_stat;
  524. }
  525.  
  526. return $tekssh_stat;
  527. }
  528.  
  529. function tekaddonexec($sshdaemon, $daemonpasswd, $sshport, $sshuser, $scriptpath, $serverip, $typ, $user, $vara, $varb, $varc, $vard, $vare, $varf, $varg, $varh) {
  530. global $wioption;
  531.  
  532. $tekssh = new tekssh( );
  533. $tekssh_stat = $tekssh->connect( $sshdaemon, $daemonpasswd, $serverip, $sshport, $sshuser, $wioption[idrsapub], $wioption[idrsa], '' );
  534.  
  535. if ($tekssh_stat == 'ok_00001') {
  536. if ($sshdaemon == 2) {
  537. $image = '' . $wioption['imagepath'] . '/' . $typ . '/' . $name . '.zip';
  538. } else {
  539. $image = '' . $wioption['imagepath'] . '/' . $typ . '/' . $name . '.tar';
  540. }
  541.  
  542. $timeout = 558;
  543. $old = ini_set( 'default_socket_timeout', $timeout );
  544. $file = @fopen( '' . $image, 'r' );
  545. ini_set( 'default_socket_timeout', $old );
  546. stream_set_timeout( $file, $timeout );
  547. stream_set_blocking( $file, 0 );
  548.  
  549. if ($file == FALSE) {
  550. $timeout = 558;
  551. $old = ini_set( 'default_socket_timeout', $timeout );
  552.  
  553. if ($sshdaemon == 2) {
  554. $image = '' . $wioption['imagepathtwo'] . '/' . $typ . '/' . $name . '.zip';
  555. } else {
  556. $image = '' . $wioption['imagepathtwo'] . '/' . $typ . '/' . $name . '.tar';
  557. }
  558.  
  559. $file = @fopen( '' . $image, 'r' );
  560. ini_set( 'default_socket_timeout', $old );
  561. stream_set_timeout( $file, $timeout );
  562. stream_set_blocking( $file, 0 );
  563.  
  564. if ($file == FALSE) {
  565. $imagepath = '' . $wioption['imagepath'];
  566. } else {
  567. $imagepath = '' . $wioption['imagepathtwo'];
  568. }
  569. } else {
  570. $imagepath = '' . $wioption['imagepath'];
  571. }
  572.  
  573.  
  574. if ($imagepath) {
  575. if (( $tekssh_stat == 'ok_00001' || $tekssh_stat == 'ID1' )) {
  576. if ($sshdaemon == 2) {
  577. $statuscode = tekjsonstop( $vara, 'gserver', 'GSERVER', '', $user );
  578. $cmd = '' . '\'games\'|\'' . $typ . '\'|\'' . $user . '\'|\'' . $vara . '\'|\'' . $varb . '\'|\'' . $varc . '\'|\'' . $vard . '\'|\'' . $imagepath . '\'
  579. ';
  580. } else {
  581. $cmd = '' . 'cd ' . $scriptpath . ';sudo -u ' . $user . ' ./games ' . $typ . ' \'' . $user . '\' \'' . $vara . '\' \'' . $varb . '\' \'' . $varc . '\' \'' . $vard . '\' \'' . $imagepath . '\'';
  582. }
  583.  
  584. $tekssh_stat = $tekssh->exelite( $cmd );
  585. $tekssh_stat = substr( $tekssh_stat, 0, 3 );
  586. $tekssh->disconnect( );
  587.  
  588. if ($tekssh_stat == 'ID1') {
  589. return 'ok_00001';
  590. }
  591.  
  592. return 'error_00007';
  593. }
  594. }
  595.  
  596. return 'error_00008';
  597. }
  598.  
  599. return $tekssh_stat;
  600. }
  601. ..............................................
  602. .............................
  603. ...........
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement