Advertisement
Guest User

Untitled

a guest
May 31st, 2011
513
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.99 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.3.0
  8. * @ Author : DeZender
  9. * @ Release on : 17.05.2011
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function ($fijgihdbj = '1', $cidedahcch, $dajjidbhfa = '') {
  15. if ($fijgihdbj != '1') {
  16. $dbgfhfhbed = 'http://licensing5.soluslabs.net/clients/';
  17. } else {
  18. $dbgfhfhbed = 'http://licensing1.soluslabs.net/clients/';
  19. }
  20.  
  21. $cdedbefib = 'QG8X3g9HbHQ33nU7HR1hC793SnbUHD6g47dg32GJqs234DGkhkl782gsjHD6g47dg32GJqs234DGkhkl782gsjmcmcdfjei8sab3QG8X3g9HbHQ33nU7HR1hC793SnbUHD6g47dg32GJ1hC793SnbUHD6g47dg32GJqs234DG';
  22. $caecbbdccj = cjefhjdhgd( 'Ymd' );
  23. $dhbgjibihe = (isset( $_SERVER['SERVER_ADDR'] ) ? $_SERVER['SERVER_ADDR'] : $_SERVER['LOCAL_ADDR']);
  24. $bjggfcijb = 5;
  25. $bhbicehefg = 5;
  26. $cfgcddedhg = false;
  27.  
  28. if ($dajjidbhfa) {
  29. $dajjidbhfa = bijbaiefji( '
  30. ', '', $dajjidbhfa );
  31. $fihbegdib = ddbdeecjaa( $dajjidbhfa, 0, dahhfdbiaf( $dajjidbhfa ) - 32 );
  32. $ghfgfjecd = ddbdeecjaa( $dajjidbhfa, dahhfdbiaf( $dajjidbhfa ) - 32 );
  33.  
  34. if ($ghfgfjecd == babhhahahb( $fihbegdib . $cdedbefib )) {
  35. $fihbegdib = cjgcidfeej( $fihbegdib );
  36. $ghfgfjecd = ddbdeecjaa( $fihbegdib, 0, 32 );
  37. $fihbegdib = ddbdeecjaa( $fihbegdib, 32 );
  38. $fihbegdib = ghejgbjfg( $fihbegdib );
  39. $bcafjceaif = jbdhbfgeg( $fihbegdib );
  40. $fehbfhddg = $bcafjceaif['checkdate'];
  41.  
  42. if ($ghfgfjecd == babhhahahb( $fehbfhddg . $cdedbefib )) {
  43. $ccgegcedde = cjefhjdhgd( 'Ymd', cedhcdece( 0, 0, 0, cjefhjdhgd( 'm' ), cjefhjdhgd( 'd' ) - $bjggfcijb, cjefhjdhgd( 'Y' ) ) );
  44.  
  45. if ($ccgegcedde < $fehbfhddg) {
  46. $cfgcddedhg = true;
  47. $bbfhacihb = $bcafjceaif;
  48. $hgbjdjic = gbjigdaed( ',', $bbfhacihb['validdomain'] );
  49. $dcciccehhg = gbjigdaed( ',', $bbfhacihb['validip'] );
  50.  
  51. if (!dgjdjbbgg( $dhbgjibihe, $dcciccehhg )) {
  52. $cfgcddedhg = false;
  53. $bcafjceaif['status'] = 'Invalid';
  54. $bbfhacihb = array( );
  55. }
  56. }
  57. }
  58. }
  59. }
  60.  
  61. if (!$cfgcddedhg) {
  62. $bfdgfiedeh['licensekey'] = $cidedahcch;
  63. $bfdgfiedeh['domain'] = $_SERVER['SERVER_NAME'];
  64. $bfdgfiedeh['ip'] = $dhbgjibihe;
  65. $bfdgfiedeh['dir'] = cbhaffgjii( __FILE__ );
  66.  
  67. if (deejcgejgb( 'curl_exec' )) {
  68. $iahaehbj = gjgdbfbbd( );
  69. dcaecadeii( $iahaehbj, CURLOPT_URL, $dbgfhfhbed . 'modules/servers/licensing/verifylicense.php' );
  70. dcaecadeii( $iahaehbj, CURLOPT_POST, 1 );
  71. dcaecadeii( $iahaehbj, CURLOPT_POSTFIELDS, $bfdgfiedeh );
  72. dcaecadeii( $iahaehbj, CURLOPT_TIMEOUT, 30 );
  73. dcaecadeii( $iahaehbj, CURLOPT_RETURNTRANSFER, 1 );
  74. $dghhibihfb = ccabighigf( $iahaehbj );
  75. ccdhhcccad( $iahaehbj );
  76. } else {
  77. $cifhahfiee = bicbfedfcc( $dbgfhfhbed, 80, $cagajcahaj, $dgehgigcig, 5 );
  78.  
  79. if ($cifhahfiee) {
  80. $dbdhfbhcbb = '';
  81.  
  82. foreach ($bfdgfiedeh as $cdddcbhdjd => $daaebbdhej) {
  83. $dbdhfbhcbb .= '' . $cdddcbhdjd . '=' . dfdbdgiefc( $daaebbdhej ) . '&';
  84. }
  85.  
  86. $cdaigjeddb = 'POST ' . $dbgfhfhbed . 'modules/servers/licensing/verifylicense.php HTTP/1.0
  87. ';
  88. $cdaigjeddb .= 'Host: ' . $dbgfhfhbed . '
  89. ';
  90. $cdaigjeddb .= 'Content-type: application/x-www-form-urlencoded
  91. ';
  92. $cdaigjeddb .= 'Content-length: ' . @dahhfdbiaf( $dbdhfbhcbb ) . '
  93. ';
  94. $cdaigjeddb .= 'Connection: close
  95.  
  96. ';
  97. $cdaigjeddb .= $dbdhfbhcbb;
  98. $dghhibihfb = '';
  99. @decibiecae( $cifhahfiee, 20 );
  100. @dhgcjcighe( $cifhahfiee, $cdaigjeddb );
  101. $ijgecaiag = @cfhicceeeb( $cifhahfiee );
  102.  
  103. while (( !@gfedbfhhh( $cifhahfiee ) && $ijgecaiag )) {
  104. $dghhibihfb .= @cgebfhfheg( $cifhahfiee, 1024 );
  105. $ijgecaiag = @cfhicceeeb( $cifhahfiee );
  106. }
  107.  
  108. @cicajebbbc( $cifhahfiee );
  109. }
  110. }
  111.  
  112.  
  113. if (!$dghhibihfb) {
  114. $ccgegcedde = cjefhjdhgd( 'Ymd', cedhcdece( 0, 0, 0, cjefhjdhgd( 'm' ), cjefhjdhgd( 'd' ) - ( $bjggfcijb + $bhbicehefg ), cjefhjdhgd( 'Y' ) ) );
  115.  
  116. if ($ccgegcedde < $fehbfhddg) {
  117. $bbfhacihb = $bcafjceaif;
  118. } else {
  119. $bbfhacihb['status'] = 'Remote Check Failed';
  120. return $bbfhacihb;
  121. }
  122. }
  123.  
  124. dcjifaiajd( '/<(.*?)>([^<]+)<\/\1>/i', $dghhibihfb, $dbejaeibga );
  125. $bbfhacihb = array( );
  126.  
  127. foreach ($dbejaeibga[1] as $cdddcbhdjd => $daaebbdhej) {
  128. $bbfhacihb[$daaebbdhej] = $dbejaeibga[2][$cdddcbhdjd];
  129. }
  130.  
  131.  
  132. if ($bbfhacihb['status'] == 'Active') {
  133. $bbfhacihb['checkdate'] = $caecbbdccj;
  134. $cjhgfiihih = bgddadhgcj( $bbfhacihb );
  135. $cjhgfiihih = bahifbegjh( $cjhgfiihih );
  136. $cjhgfiihih = babhhahahb( $caecbbdccj . $cdedbefib ) . $cjhgfiihih;
  137. $cjhgfiihih = cjgcidfeej( $cjhgfiihih );
  138. $cjhgfiihih = $cjhgfiihih . babhhahahb( $cjhgfiihih . $cdedbefib );
  139. $cjhgfiihih = cfadjghci( $cjhgfiihih, 80, '
  140. ', true );
  141. $bbfhacihb['localkey'] = $cjhgfiihih;
  142. }
  143.  
  144. $bbfhacihb['remotecheck'] = true;
  145. }
  146.  
  147. unset( $bfdgfiedeh );
  148. unset( $dghhibihfb );
  149. unset( $dbejaeibga );
  150. unset( $dbgfhfhbed );
  151. unset( $cdedbefib );
  152. unset( $caecbbdccj );
  153. unset( $dhbgjibihe );
  154. unset( $bjggfcijb );
  155. unset( $bhbicehefg );
  156. unset( $ghfgfjecd );
  157. return $bbfhacihb;
  158. }
  159.  
  160. djdfidcaja( 'NO_DIRECT_ACCESS_ALLOWED', 1 );
  161. require( '../../includes/config.php' );
  162. require( '../../includes/database.php' );
  163. require( '../../includes/admininit.php' );
  164. require( '../../includes/proc.php' );
  165. require( '../../includes/initcore.php' );
  166. require( '../../includes/session.php' );
  167. require( '../../includes/functions.php' );
  168. jbejjehic( );
  169. require( '../../includes/adminverify.php' );
  170. require( '../../includes/admincore.php' );
  171. $adminid = $_SESSION['adminid'];
  172. $act = ddijeahba( '17' );
  173.  
  174. if ($act == true) {
  175. cdaigjeddb( 'Location: aclerror.php' );
  176. exit( );
  177. } else {
  178. unset( $act );
  179. }
  180.  
  181. $id = (int)$_GET['id'];
  182. $code = (int)$_GET['code'];
  183.  
  184. if ($code == '100') {
  185. $msg = ' <div id=\'adminwarn\'><strong>Warning!</strong><br>You have too many slaves for your license. You must update your license before you continue.</div>';
  186. } else {
  187. if ($code == '101') {
  188. $msg = ' <div id=\'adminwarn\'><strong>Warning!</strong><br>Your license is invalid. You must update your license before you continue.</div>';
  189. } else {
  190. if ($code == '102') {
  191. $msg = ' <div id=\'adminwarn\'><strong>Warning!</strong><br>Your license has expired. You must update your license before you continue.</div>';
  192. } else {
  193. if ($code == '103') {
  194. $msg = ' <div id=\'adminwarn\'><strong>Warning!</strong><br>Your license has been suspended. Please contact SolusVM support.</div>';
  195. } else {
  196. if ($code == '198') {
  197. $msg = ' <div id=\'adminwarn\'><strong>Warning!</strong><br>No license found. You must enter a valid license key before you continue.</div>';
  198. } else {
  199. if ($code == '199') {
  200. $msg = ' <div id=\'adminwarn\'><strong>Warning!</strong><br>Unknown error. Please contact SolusVM support.</div>';
  201. } else {
  202. if ($code == '998') {
  203. $msg = ' <div id=\'adminwarn\'><strong>Warning!</strong><br>A trial license will only support 1 slave. Remove the extra slave or purchase a full license to continue.</div>';
  204. } else {
  205. if ($code == '1000') {
  206. $nqslave2 = $db->query( 'SELECT * FROM nodes WHERE nodeid !=\'1\' AND licensetype=\'0\'' );
  207. $nqmini2 = $db->query( 'SELECT * FROM nodes WHERE nodeid !=\'1\' AND licensetype=\'1\'' );
  208. $nqmicro2 = $db->query( 'SELECT * FROM nodes WHERE nodeid !=\'1\' AND licensetype=\'2\'' );
  209. $nc2 = array( );
  210. $nc2['slave_count'] = $db->numRows( $nqslave2 );
  211. $nc2['mini_count'] = $db->numRows( $nqmini2 );
  212. $nc2['micro_count'] = $db->numRows( $nqmicro2 );
  213. $slavesinlicense2 = gbjigdaed( '|', $results['configoptions'] );
  214. $svmslaves2 = array( );
  215.  
  216. foreach ($slavesinlicense2 as $value2) {
  217. $v2 = gbjigdaed( '=', $value2 );
  218. $n = $v2[0];
  219. $z = $v2[1];
  220. $svmslaves2[$n] = $z;
  221. }
  222.  
  223. $slaves2 = $svmslaves2['Slaves'];
  224.  
  225. if ($svmslaves2['Mini Slaves'] == '') {
  226. $minislaves2 = '0';
  227. } else {
  228. $minislaves2 = $svmslaves2['Mini Slaves'];
  229. }
  230.  
  231.  
  232. if ($svmslaves2['Micro Slaves'] == '') {
  233. $microslaves2 = '0';
  234. } else {
  235. $microslaves2 = $svmslaves2['Micro Slaves'];
  236. }
  237.  
  238. $erroroutput = '' . '<strong>Your license contains:</strong><br><br>' . $slaves2 . ' Unlimited Licenses | ' . $minislaves2 . ' Mini Licenses | ' . $microslaves2 . ' Micro Licenses</strong>';
  239. $erroroutput2 = '' . '<strong>Your licenses are currently assigned in the following way:</strong><br><br>' . $nc2['slave_count'] . ' nodes assigned with a Unlimited License<br>' . $nc2['mini_count'] . ' nodes assigned with a Mini License<br>' . $nc2['micro_count'] . ' nodes assigned with a Micro Licenses';
  240. $msg = '' . ' <div id=\'adminwarn\'><strong>Warning!</strong><br>A slave license mismatch has occured. One or more of your slaves have an incorrect license type.<br><br>' . $erroroutput . '<br><br>' . $erroroutput2 . '</div>';
  241. } else {
  242. if ($code == '2000') {
  243. $checkvpsnumbers = $db->query( 'SELECT * FROM nodes WHERE nodeid !=\'1\'' );
  244.  
  245. while ($numbersearch = $db->fetchArray( $checkvpsnumbers )) {
  246. if ($numbersearch[licensetype] == '1') {
  247. $cvps = $db->query( '' . 'SELECT * FROM vservers WHERE nodeid =\'' . $numbersearch['nodeid'] . '\'' );
  248.  
  249. if (5 < $db->numRows( $cvps )) {
  250. $errorarray[] = '' . '<strong> Node ID ' . $numbersearch['nodeid'] . ' (' . $numbersearch['name'] . ') has ' . $db->numRows( $cvps ) . ' virtual servers when only 5 is allowed with it\'s assigned license type (Mini).</strong><br>';
  251. continue;
  252. }
  253.  
  254. continue;
  255. }
  256.  
  257. if ($numbersearch[licensetype] == '2') {
  258. $cvps = $db->query( '' . 'SELECT * FROM vservers WHERE nodeid =\'' . $numbersearch['nodeid'] . '\'' );
  259.  
  260. if (2 < $db->numRows( $cvps )) {
  261. $errorarray[] = '' . '<strong> Node ID ' . $numbersearch['nodeid'] . ' (' . $numbersearch['name'] . ') has ' . $db->numRows( $cvps ) . ' virtual servers when only 2 is allowed with it\'s assigned license type (Micro).</strong>';
  262. continue;
  263. }
  264.  
  265. continue;
  266. }
  267. }
  268.  
  269. $erroroutput = baafhajcje( '<br>', $errorarray );
  270. $msg = '' . ' <div id=\'adminwarn\'><strong>Warning!</strong><br>You have too many virtual servers on one of the slaves. Either upgrade your license or remove the vps.<br><br>' . $erroroutput . '</div>';
  271. } else {
  272. if ($code == '400') {
  273. $msg = ' <div id=\'adminok\'>License updated.</div>';
  274. }
  275. }
  276. }
  277. }
  278. }
  279. }
  280. }
  281. }
  282. }
  283. }
  284.  
  285.  
  286. if ($_POST['updatekey']) {
  287. $act = ddijeahba( '17|18' );
  288.  
  289. if ($act == true) {
  290. cdaigjeddb( 'Location: aclerror.php' );
  291. exit( );
  292. } else {
  293. unset( $act );
  294. }
  295.  
  296. $newkey = $db->prepare( cahdhjjdae( ecceebdbff( $_POST[key] ) ) );
  297. $localkey = '';
  298. $llserver = '1';
  299. $results = [obfuscated]( $llserver, $newkey, $localkey );
  300.  
  301. if (( $results['status'] == 'Active' && $results['productid'] == '1' )) {
  302. if ($results['localkey']) {
  303. $localkeydata = $results['localkey'];
  304. $updtime = cjefhjdhgd( 'd F Y g:i A' );
  305.  
  306. if ($llserver == '1') {
  307. $serverarray = array( '1', '3', '4', '5', '6' );
  308. $srnum = $serverarray[bfdggfjgij( $serverarray )];
  309. } else {
  310. $srnum = '2';
  311. }
  312.  
  313. $db->query( '' . 'UPDATE license SET lupdate=\'' . $updtime . '\'' );
  314. $db->query( '' . 'UPDATE license SET lsrv=\'' . $srnum . '\'' );
  315. $db->query( '' . 'UPDATE license SET localkey=\'' . $localkeydata . '\'' );
  316. $db->query( '' . 'UPDATE license SET licensekey=\'' . $newkey . '\'' );
  317. }
  318.  
  319. $msg = ' <div id=\'adminok\'><strong>Successful!</strong><br>Key updated.</div>';
  320. } else {
  321. if (( $results['status'] == 'Active' && $results['productid'] == '2' )) {
  322. if ($results['localkey']) {
  323. $localkeydata = $results['localkey'];
  324. $updtime = cjefhjdhgd( 'd F Y g:i A' );
  325.  
  326. if ($llserver == '1') {
  327. $serverarray = array( '1', '3', '4', '5', '6' );
  328. $srnum = $serverarray[bfdggfjgij( $serverarray )];
  329. } else {
  330. $srnum = '2';
  331. }
  332.  
  333. $db->query( '' . 'UPDATE license SET lupdate=\'' . $updtime . '\'' );
  334. $db->query( '' . 'UPDATE license SET lsrv=\'' . $srnum . '\'' );
  335. $db->query( '' . 'UPDATE license SET localkey=\'' . $localkeydata . '\'' );
  336. $db->query( '' . 'UPDATE license SET licensekey=\'' . $newkey . '\'' );
  337. }
  338.  
  339. $msg = ' <div id=\'adminok\'><strong>Successful!</strong><br>Key updated.</div>';
  340. } else {
  341. if (( $results['status'] == 'Active' && $results['productid'] == '4' )) {
  342. if ($results['localkey']) {
  343. $localkeydata = $results['localkey'];
  344.  
  345. if ($llserver == '1') {
  346. $serverarray = array( '1', '3', '4', '5', '6' );
  347. $srnum = $serverarray[bfdggfjgij( $serverarray )];
  348. } else {
  349. $srnum = '2';
  350. }
  351.  
  352. $updtime = cjefhjdhgd( 'd F Y g:i A' );
  353. $db->query( '' . 'UPDATE license SET lupdate=\'' . $updtime . '\'' );
  354. $db->query( '' . 'UPDATE license SET lsrv=\'' . $srnum . '\'' );
  355. $db->query( '' . 'UPDATE license SET localkey=\'' . $localkeydata . '\'' );
  356. $db->query( '' . 'UPDATE license SET licensekey=\'' . $newkey . '\'' );
  357. }
  358.  
  359. $msg = ' <div id=\'adminok\'><strong>Successful!</strong><br>Key updated.</div>';
  360. } else {
  361. if (( $results['status'] == 'Active' && $results['productid'] == '23' )) {
  362. if ($results['localkey']) {
  363. $localkeydata = $results['localkey'];
  364.  
  365. if ($llserver == '1') {
  366. $serverarray = array( '1', '3', '4', '5', '6' );
  367. $srnum = $serverarray[bfdggfjgij( $serverarray )];
  368. } else {
  369. $srnum = '2';
  370. }
  371.  
  372. $updtime = cjefhjdhgd( 'd F Y g:i A' );
  373. $db->query( '' . 'UPDATE license SET lupdate=\'' . $updtime . '\'' );
  374. $db->query( '' . 'UPDATE license SET lsrv=\'' . $srnum . '\'' );
  375. $db->query( '' . 'UPDATE license SET localkey=\'' . $localkeydata . '\'' );
  376. $db->query( '' . 'UPDATE license SET licensekey=\'' . $newkey . '\'' );
  377. }
  378.  
  379. $msg = ' <div id=\'adminok\'><strong>Successful!</strong><br>Key updated.</div>';
  380. } else {
  381. if (( $results['status'] == 'Active' && $results['productid'] == '22' )) {
  382. if ($results['localkey']) {
  383. $localkeydata = $results['localkey'];
  384. $updtime = cjefhjdhgd( 'd F Y g:i A' );
  385.  
  386. if ($llserver == '1') {
  387. $serverarray = array( '1', '3', '4', '5', '6' );
  388. $srnum = $serverarray[bfdggfjgij( $serverarray )];
  389. } else {
  390. $srnum = '2';
  391. }
  392.  
  393. $db->query( '' . 'UPDATE license SET lupdate=\'' . $updtime . '\'' );
  394. $db->query( '' . 'UPDATE license SET lsrv=\'' . $srnum . '\'' );
  395. $db->query( '' . 'UPDATE license SET localkey=\'' . $localkeydata . '\'' );
  396. $db->query( '' . 'UPDATE license SET licensekey=\'' . $newkey . '\'' );
  397. }
  398.  
  399. $msg = ' <div id=\'adminok\'><strong>Successful!</strong><br>Key updated.</div>';
  400. } else {
  401. if (( $results['status'] == 'Active' && $results['productid'] == '20' )) {
  402. if ($results['localkey']) {
  403. $localkeydata = $results['localkey'];
  404. $updtime = cjefhjdhgd( 'd F Y g:i A' );
  405. $db->query( '' . 'UPDATE license SET lupdate=\'' . $updtime . '\'' );
  406.  
  407. if ($llserver == '1') {
  408. $serverarray = array( '1', '3', '4', '5', '6' );
  409. $srnum = $serverarray[bfdggfjgij( $serverarray )];
  410. } else {
  411. $srnum = '2';
  412. }
  413.  
  414. $db->query( '' . 'UPDATE license SET lsrv=\'' . $srnum . '\'' );
  415. $db->query( '' . 'UPDATE license SET localkey=\'' . $localkeydata . '\'' );
  416. $db->query( '' . 'UPDATE license SET licensekey=\'' . $newkey . '\'' );
  417. }
  418.  
  419. $msg = ' <div id=\'adminok\'><strong>Successful!</strong><br>Key updated.</div>';
  420. } else {
  421. if ($results['status'] == 'Invalid') {
  422. $msg = ' <div id=\'adminerror\'><strong>Error!</strong><br>License invalid.</div>';
  423. } else {
  424. if ($results['status'] == 'Expired') {
  425. $msg = ' <div id=\'adminerror\'><strong>Error!</strong><br>License expired.</div>';
  426. } else {
  427. if ($results['status'] == 'Suspended') {
  428. $msg = ' <div id=\'adminerror\'><strong>Error!</strong><br>License suspended.</div>';
  429. } else {
  430. $msg = ' <div id=\'adminerror\'><strong>Error!</strong><br>License invalid.</div>';
  431. }
  432. }
  433. }
  434. }
  435. }
  436. }
  437. }
  438. }
  439. }
  440. }
  441.  
  442. if ($_POST['update']) {
  443. $act = ddijeahba( '17|19' );
  444.  
  445. if ($act == true) {
  446. cdaigjeddb( 'Location: aclerror.php' );
  447. exit( );
  448. } else {
  449. unset( $act );
  450. }
  451.  
  452. $licenseq = $db->query( 'SELECT * FROM license' );
  453. $licenseqr = $db->fetchArray( $licenseq );
  454. $licensekey = $licenseqr[key];
  455. $localkey = '';
  456. $licsrv = '1';
  457. $results = [obfuscated]( $licsrv, $licensekey );
  458.  
  459. if ($results['status'] == '') {
  460. $licsrv = '2';
  461. $results = [obfuscated]( $licsrv, $licensekey );
  462. }
  463.  
  464. if (( ( ( ( ( ( $results['status'] == 'Active' && $results['productid'] == '1' ) || ( $results['status'] == 'Active' && $results['productid'] == '2' ) ) || ( $results['status'] == 'Active' && $results['productid'] == '4' ) ) || ( $results['status'] == 'Active' && $results['productid'] == '20' ) ) || ( $results['status'] == 'Active' && $results['productid'] == '22' ) ) || ( $results['status'] == 'Active' && $results['productid'] == '23' ) )) {
  465. if ($results['localkey']) {
  466. $localkeydata = $results['localkey'];
  467. $db->query( 'UPDATE license SET localkey=\'0\'' );
  468. }
  469.  
  470. $msg = ' <div id=\'adminok\'><strong>Successful!</strong><br>License updated.</div>';
  471. } else {
  472. if ($results['status'] == 'Invalid') {
  473. ( $db->query( 'UPDATE license SET localkey=\'0\'' ) || $db->raise_error( ) );
  474. cdaigjeddb( 'Location: license.php?code=400' );
  475. } else {
  476. if ($results['status'] == 'Expired') {
  477. ( $db->query( 'UPDATE license SET localkey=\'0\'' ) || $db->raise_error( ) );
  478. cdaigjeddb( 'Location: license.php?code=400' );
  479. } else {
  480. if ($results['status'] == 'Suspended') {
  481. ( $db->query( 'UPDATE license SET localkey=\'0\'' ) || $db->raise_error( ) );
  482. $header( 'Location: license.php?code=400' );
  483. } else {
  484. $localkey = '';
  485. $licsrv = '1';
  486. $results = [obfuscated]( $licsrv, $licensekey, $localkey );
  487.  
  488. if ($results['status'] == '') {
  489. $licsrv = '2';
  490. $results = [obfuscated]( $licsrv, $licensekey, $localkey );
  491. }
  492.  
  493. if ($results['status'] == '') {
  494. $msg = ' <div id=\'adminerror\'><strong>Error!</strong><br>Could not update license.</div>';
  495. } else {
  496. $updtime = cjefhjdhgd( 'd F Y g:i A' );
  497. $db->query( '' . 'UPDATE license SET lupdate=\'' . $updtime . '\'' );
  498.  
  499. if ($licsrv == '1') {
  500. $serverarray = array( '1', '3', '4', '5', '6' );
  501. $srnum = $serverarray[bfdggfjgij( $serverarray )];
  502. } else {
  503. $srnum = '2';
  504. }
  505.  
  506. $db->query( '' . 'UPDATE license SET lsrv=\'' . $srnum . '\'' );
  507. $db->query( 'UPDATE license SET localkey=\'0\'' );
  508. cdaigjeddb( 'Location: license.php?code=400' );
  509. }
  510. }
  511. }
  512. }
  513. }
  514. }
  515.  
  516. $licenseq = $db->query( 'SELECT * FROM license LIMIT 1' );
  517. $cl = $db->numRows( $licenseq );
  518.  
  519. if ($cl == 0) {
  520. $licensekey = '';
  521. $localkey = '';
  522. } else {
  523. $licenseqr = $db->fetchArray( $licenseq );
  524. $licensekey = $licenseqr[licensekey];
  525. $localkey = $licenseqr[localkey];
  526. }
  527.  
  528.  
  529. if (!empty( $licensekey )) {
  530. $results = [obfuscated]( $lsrv = '1', $licensekey, $localkey );
  531.  
  532. if ($results['status'] == 'Active') {
  533. $smarty->assign( 'licensestatus', '<div style=\'color: green\'>Active</div>' );
  534. } else {
  535. if ($results['status'] == 'Invalid') {
  536. $smarty->assign( 'licensestatus', '<div style=\'color: red\'>Invalid</div>' );
  537. } else {
  538. if ($results['status'] == 'Expired') {
  539. $smarty->assign( 'licensestatus', '<div style=\'color: red\'>Expired</div>' );
  540. } else {
  541. if ($results['status'] == 'Suspended') {
  542. $smarty->assign( 'licensestatus', '<div style=\'color: red\'>Suspended</div>' );
  543. } else {
  544. $smarty->assign( 'licensestatus', '<div style=\'color: yellow\'>Unknown</div>' );
  545. }
  546. }
  547. }
  548. }
  549.  
  550.  
  551. if ($results['companyname']) {
  552. $smarty->assign( 'licenseto', $results['companyname'] );
  553. } else {
  554. $smarty->assign( 'licenseto', $results['registeredname'] );
  555. }
  556.  
  557. $smarty->assign( 'licenseemail', $results['email'] );
  558.  
  559. if ($results['productid'] == '20') {
  560. $smarty->assign( 'licensebilling', 'N/A' );
  561. } else {
  562. if ($results['productid'] == '2') {
  563. $smarty->assign( 'licensebilling', '15 day trial' );
  564. } else {
  565. $smarty->assign( 'licensebilling', $results['billingcycle'] );
  566. }
  567. }
  568.  
  569.  
  570. if ($results['productid'] == '20') {
  571. $smarty->assign( 'licenseip', 'N/A' );
  572. } else {
  573. $smarty->assign( 'licenseip', $results['validip'] );
  574. }
  575.  
  576.  
  577. if ($results['productid'] == '20') {
  578. $smarty->assign( 'licenseexpire', 'N/A' );
  579. } else {
  580. $smarty->assign( 'licenseexpire', $results['nextduedate'] );
  581. }
  582.  
  583. $slavesinlicense = gbjigdaed( '|', $results['configoptions'] );
  584. $svmslaves = array( );
  585.  
  586. foreach ($slavesinlicense as $value) {
  587. $v = gbjigdaed( '=', $value );
  588. $n = $v[0];
  589. $z = $v[1];
  590. $svmslaves[$n] = $z;
  591. }
  592.  
  593. $slaves = $svmslaves['Slaves'];
  594.  
  595. if ($results['productid'] == '2') {
  596. $smarty->assign( 'licenseslaves', '1' );
  597. } else {
  598. if ($results['productid'] == '20') {
  599. $nslaves = $slaves + 1;
  600. $smarty->assign( 'licenseslaves', $nslaves );
  601. } else {
  602. $smarty->assign( 'licenseslaves', $slaves );
  603. }
  604. }
  605.  
  606.  
  607. if ($svmslaves['Mini Slaves'] == '') {
  608. $smarty->assign( 'minislaves', '0' );
  609. } else {
  610. $smarty->assign( 'minislaves', $svmslaves['Mini Slaves'] );
  611. }
  612.  
  613.  
  614. if ($svmslaves['Micro Slaves'] == '') {
  615. $smarty->assign( 'microslaves', '0' );
  616. } else {
  617. $smarty->assign( 'microslaves', $svmslaves['Micro Slaves'] );
  618. }
  619.  
  620. $extras = array( );
  621.  
  622. if ($svmaddon['SMS Addon']) {
  623. $extras[] = '<tr><td align=\'left\' bgcolor=\'#eeeeee\' style=\'padding: 5px;\'><strong>SMS Addon</strong></td><td align=\'left\' bgcolor=\'#efefef\' style=\'padding: 5px; color: green;\'><strong>Active</strong></td> </tr>';
  624. } else {
  625. $extras[] = '<tr><td align=\'left\' bgcolor=\'#eeeeee\' style=\'padding: 5px;\'><strong>SMS Addon</strong></td><td align=\'left\' bgcolor=\'#efefef\' style=\'padding: 5px; color: black;\'>Disabled</td> </tr>';
  626. }
  627.  
  628. $ext = baafhajcje( ' ', $extras );
  629. $smarty->assign( 'extras', $ext );
  630. $smarty->assign( 'licensekey', $lockey[licensekey] );
  631.  
  632. if ($results['productid'] == '2') {
  633. $smarty->assign( 'licensetype', 'Trial' );
  634. } else {
  635. if ($results['productid'] == '4') {
  636. $smarty->assign( 'licensetype', 'SolusVM Enterprise (Slave Only)' );
  637. } else {
  638. if ($results['productid'] == '20') {
  639. $smarty->assign( 'licensetype', 'SolusVM Enterprise (NOC)' );
  640. } else {
  641. if ($results['productid'] == '22') {
  642. $smarty->assign( 'licensetype', 'SolusVM Enterprise (RS)' );
  643. } else {
  644. if ($results['productid'] == '23') {
  645. $smarty->assign( 'licensetype', 'SolusVM Enterprise Slave Only (RS)' );
  646. } else {
  647. $smarty->assign( 'licensetype', 'SolusVM Enterprise (Full)' );
  648. }
  649. }
  650. }
  651. }
  652. }
  653. } else {
  654. $smarty->assign( 'licensestatus', '<div style=\'color: black\'>Not Found</div>' );
  655. }
  656.  
  657.  
  658. if ($licenseqr['lsrv'] == '1') {
  659. $smarty->assign( 'lsrv', '<img src=\'../template_assets/admin/default/images/icons/gb.gif\' alt=\'UK\' /> UK Hub 1' );
  660. } else {
  661. if ($licenseqr['lsrv'] == '2') {
  662. $smarty->assign( 'lsrv', '<img src=\'../template_assets/admin/default/images/icons/us.gif\' alt=\'USA\' /> USA Hub 2' );
  663. } else {
  664. if ($licenseqr['lsrv'] == '3') {
  665. $smarty->assign( 'lsrv', '<img src=\'../template_assets/admin/default/images/icons/de.gif\' alt=\'Germany\' /> Germany Hub 4' );
  666. } else {
  667. if ($licenseqr['lsrv'] == '4') {
  668. $smarty->assign( 'lsrv', '<img src=\'../template_assets/admin/default/images/icons/fr.gif\' alt=\'France\' /> France Hub 3' );
  669. } else {
  670. if ($licenseqr['lsrv'] == '5') {
  671. $smarty->assign( 'lsrv', '<img src=\'../template_assets/admin/default/images/icons/jp.gif\' alt=\'Japan\' /> Japan Hub 5' );
  672. } else {
  673. if ($licenseqr['lsrv'] == '6') {
  674. $smarty->assign( 'lsrv', '<img src=\'../template_assets/admin/default/images/icons/es.gif\' alt=\'Spain\' /> Spain Hub 7' );
  675. } else {
  676. $smarty->assign( 'lsrv', 'No Hub Registered' );
  677. }
  678. }
  679. }
  680. }
  681. }
  682. }
  683.  
  684.  
  685. if ($licenseqr['lupdate'] != '') {
  686. $smarty->assign( 'lupdate', $licenseqr[lupdate] );
  687. } else {
  688. $smarty->assign( 'lupdate', 'Unknown' );
  689. }
  690.  
  691. $smarty->assign( 'msg', $msg );
  692. $smarty->display( $template . '/license.tpl' );
  693. $db->close( );
  694. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement