Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2012
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.81 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. function onlinenic_getConfigArray() {
  15. $query = 'CREATE TABLE IF NOT EXISTS `mod_onlinenic` (`id` int(10) NOT NULL auto_increment,`domain` VARCHAR(255) NOT NULL,`lockstatus` BOOL NOT NULL DEFAULT \'0\',PRIMARY KEY (`id`),KEY `domainid` (`domain`))';
  16. $result = mysql_query( $query );
  17. $configarray = array( 'FriendlyName' => array( 'Type' => 'System', 'Value' => 'OnlineNIC' ), 'Username' => array( 'Type' => 'text', 'Size' => '20', 'Description' => 'Onlinenic ID' ), 'Password' => array( 'Type' => 'password', 'Size' => '20', 'Description' => 'Password' ), 'TestMode' => array( 'Type' => 'yesno' ), 'SyncNextDueDate' => array( 'Type' => 'yesno', 'Description', 'Tick this box if you want the expiry date sync script to update the expiry and next due dates (cron must be configured)' ) );
  18. return $configarray;
  19. }
  20.  
  21. function onlinenic_GetNameservers($params) {
  22. $username = $params['Username'];
  23. $password = md5( $params['Password'] );
  24. $testmode = $params['TestMode'];
  25. $tld = $params['tld'];
  26. $sld = $params['sld'];
  27. $domain = $sld . '.' . $tld;
  28.  
  29. if ($testmode) {
  30. $username = 135613;
  31. $password = md5( '654123' );
  32. }
  33.  
  34. $values = onlinenic_Login( $fp, $username, $password, $testmode );
  35.  
  36. if ($values['error']) {
  37. return $values;
  38. }
  39.  
  40. $domain_type = onlinenic_getDomainType( $tld );
  41. $clTrid = substr( md5( $domain ), 0, 10 ) . mt_rand( 1000000000, 9999999999 );
  42. $checksum = md5( $username . $password . $clTrid . 'getdomaininfo' );
  43. $xml = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>
  44. <epp>
  45. <command>
  46. <getdomaininfo>
  47. <clID>' . $username . '</clID>
  48. <domain>' . $domain . '</domain>
  49. <domain:type>' . $domain_type . '</domain:type>
  50. <options>
  51. <version>1.0</version>
  52. <lang>en</lang>
  53. </options>
  54. </getdomaininfo>
  55. <clTRID>' . $clTrid . '</clTRID>
  56. <chksum>' . $checksum . '</chksum>
  57. </command>
  58. </epp>';
  59. $result = onlinenic_sendCommand( $fp, $xml );
  60.  
  61. if (!$result) {
  62. return array( 'error' => 'Domain not found' );
  63. }
  64.  
  65. $resultcode = onlinenic_getResultCode( $result );
  66. onlinenic_Logout( $fp, $username, $password );
  67.  
  68. if ($resultcode != '1000') {
  69. $msg = onlinenic_GetValue( $result, '<msg>', '</msg>' );
  70. $error = onlinenic_GetValue( $result, '<value>', '</value>' );
  71. $error = $msg . ' - ' . $error;
  72. $errormsg = onlinenic_getResultText( $resultcode );
  73. $values['error'] = '' . $resultcode . ' - ' . $errormsg . ': ' . $error;
  74. } else {
  75. $nameserver1 = onlinenic_GetValue( $result, '<dns1>', '</dns1>' );
  76. $nameserver2 = onlinenic_GetValue( $result, '<dns2>', '</dns2>' );
  77. $values['ns1'] = trim( $nameserver1 );
  78. $values['ns2'] = trim( $nameserver2 );
  79. $values['ns3'] = trim( $nameserver3 );
  80. $values['ns4'] = trim( $nameserver4 );
  81. $values['ns5'] = trim( $nameserver5 );
  82. }
  83.  
  84. return $values;
  85. }
  86.  
  87. function onlinenic_SaveNameservers($params) {
  88. $username = $params['Username'];
  89. $password = md5( $params['Password'] );
  90. $testmode = $params['TestMode'];
  91. $tld = $params['tld'];
  92. $sld = $params['sld'];
  93.  
  94. if ($testmode) {
  95. $username = 135613;
  96. $password = md5( '654123' );
  97. }
  98.  
  99. $domain = $sld . '.' . $tld;
  100. $values = onlinenic_Login( $fp, $username, $password, $testmode );
  101.  
  102. if ($values['error']) {
  103. return $values;
  104. }
  105.  
  106. $domain_type = onlinenic_getDomainType( $tld );
  107. $dns1 = $params['ns1'];
  108. $dns2 = $params['ns2'];
  109. $dns3 = $params['ns3'];
  110. $dns4 = $params['ns4'];
  111. $dns5 = $params['ns5'];
  112. .............................................................
  113. ..................................
  114. ...............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement