Advertisement
johnburn

Decode for owner@waraxe.us

Jan 16th, 2012
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 11.33 KB | None | 0 0
  1. <?php
  2. include ('../../../../includes/ini.inc.php');
  3. include ('../../../../includes/global.inc.php');
  4. include ('../../../../classes/db.inc.php');
  5. $db = new db();
  6. include_once ('../../../../includes/functions.inc.php');
  7. $config = fetchDbConfig('config');
  8. include_once ('../../../../language/' . $config['defaultLang'] . '/lang.inc.php');
  9. $enableSSl = 1;
  10. include ('../../../../includes/sslSwitch.inc.php');
  11. include ('../../../includes/auth.inc.php');
  12. include ('../../../../includes/currencyVars.inc.php');
  13. $productsPerPage = 25;
  14. if (permission('settings', 'read') == FALSE) {
  15.     header('Location: ' . $GLOBALS['rootRel'] . 'admin/401.php');
  16.     exit;
  17. }
  18. $table_there = $db->select('check table ' . $glob['dbprefix'] . 'CubeCart_adg_mustlogin_mod quick');
  19. if ($table_there[0]['Msg_type'] == 'error' || $table_there[0]['Msg_type'] == 'Error') {
  20.     $install_sql1 = 'CREATE TABLE `' . $glob['dbprefix'] . 'CubeCart_adg_mustlogin_mod` (`id` int(11) NOT NULL auto_increment,  PRIMARY KEY  (`id`)) TYPE=MyISAM AUTO_INCREMENT=1 ;';
  21.     $install_sql2 = 'ALTER TABLE `' . $glob['dbprefix'] . "CubeCart_customer` ADD `prices` INT(11) DEFAULT '0' NOT NULL ;";
  22.     $run_sql1 = $db->misc($install_sql1);
  23.     $run_sql2 = $db->misc($install_sql2);
  24.     if ($run_sql1 == FALSE) {
  25.         $msg = 'Error CubeCart_adg_mustlogin_mod Table, Contact cubemods@alexgoldberg.com for support';
  26.     } elseif ($run_sql2 == FALSE) {
  27.         $msg = 'Error Updating CubeCart_customer Table, Contact cubemods@alexgoldberg.com for support';
  28.     } else {
  29.         $msg = 'You can now configure your mod';
  30.     }
  31. }
  32. if (isset($_POST['module'])) {
  33.     include ('../../status.php');
  34.     include ('../../../includes/functions.inc.php');
  35.     $module = fetchDbConfig('Must_Login');
  36.     $msg = writeDbConf($_POST['module'], 'Must_Login', $module);
  37. }
  38. $module = fetchDbConfig('Must_Login');
  39. if (isset($_POST['licensekey'])) {
  40.     $module['modSecurityKey'] = $_POST['licensekey'];
  41.     $module['badserver'] = '';
  42.     $module['badsip'] = '';
  43.     $msg = writeDbConf($module, 'Must_Login', $module);
  44. }
  45. if (isset($_GET['resetkey'])) {
  46.     include ('../../../includes/functions.inc.php');
  47.     $module = fetchDbConfig('Must_Login');
  48.     $module['modSecurityKey'] = '';
  49.     $msg = writeDbConf($module, 'Must_Login', $module);
  50. }
  51. if ($_SERVER['SERVER_ADDR'] != '127.0.0.1') {
  52.     if (isset($module['modSecurityKey'])) {
  53.         $domain_parts = explode('.', $_SERVER['SERVER_NAME']);
  54.         switch (count($domain_parts)) {
  55.             case 5:
  56.                 switch ($domain_parts[4]) {
  57.                     case 'com':
  58.                     case 'org':
  59.                     case 'net':
  60.                     case 'com':
  61.                     case 'ws':
  62.                     case 'ie':
  63.                     case 'info':
  64.                         $domain_to_encode = $domain_parts[3];
  65.                         $tld = $domain_parts[4];
  66.                     break;
  67.                     default:
  68.                         $domain_to_encode = $domain_parts[2];
  69.                         $tld = $domain_parts[3] . '.' . $domain_parts[4];
  70.                     break;
  71.                 }
  72.             break;
  73.             case 4:
  74.                 switch ($domain_parts[3]) {
  75.                     case 'com':
  76.                     case 'org':
  77.                     case 'net':
  78.                     case 'com':
  79.                     case 'ws':
  80.                     case 'ie':
  81.                     case 'info':
  82.                         $domain_to_encode = $domain_parts[2];
  83.                         $tld = $domain_parts[3];
  84.                     break;
  85.                     default:
  86.                         $domain_to_encode = $domain_parts[1];
  87.                         $tld = $domain_parts[2] . '.' . $domain_parts[3];
  88.                     break;
  89.                 }
  90.             break;
  91.             case 3:
  92.                 switch ($domain_parts[2]) {
  93.                     case 'au':
  94.                     case 'ca':
  95.                     case 'cz':
  96.                     case 'de':
  97.                     case 'dk':
  98.                     case 'fr':
  99.                     case 'in':
  100.                     case 'it':
  101.                     case 'nl':
  102.                     case 'no':
  103.                     case 'pt':
  104.                     case 'ru':
  105.                     case 'uk':
  106.                         if ($domain_parts[1] == 'co' || $domain_parts[1] == 'com') {
  107.                             $domain_to_encode = $domain_parts[0];
  108.                             $tld = $domain_parts[1] . '.' . $domain_parts[2];
  109.                         } else {
  110.                             $domain_to_encode = $domain_parts[1];
  111.                             $tld = $domain_parts[2];
  112.                         }
  113.                     break;
  114.                     default:
  115.                         $domain_to_encode = $domain_parts[1];
  116.                         $tld = $domain_parts[2];
  117.                 }
  118.             break;
  119.             default:
  120.                 $domain_to_encode = $domain_parts[0];
  121.                 $tld = $domain_parts[1];
  122.             break;
  123.         }
  124.         $ssl_domains = array('secure-secure', 'bluehost', 'omnis', 'startlogic', 'powweb', 'myhosting', 'silverlinestudio');
  125.         $ip_domains = array('208.109.193.82', '69.89.31.102');
  126.         if ($module['modSecurityKey'] == md5('supper' . $domain_to_encode . 'goober_1992' . 'Must_Login') || in_array($domain_to_encode, $ssl_domains) || in_array($_SERVER['SERVER_ADDR'], $ip_domains)) {
  127.             $module['badserver'] = '';
  128.             $module['badsip'] = '';
  129.         } else {
  130.             $msg = 'There appears to be a missmatch in the configured web site address.<br>Please check your configuration or contact keys@cubecartmodder.com for assistance';
  131.             $modSecurityError = TRUE;
  132.             $license_error = '<br>Unlicensed server: ' . $module['badserver'];
  133.             $license_error = $license_error . '<br>Unlicensed address: ' . $module['badsip'];
  134.         }
  135.     } else {
  136.         $getSecurityKey = TRUE;
  137.     }
  138. } else {
  139.     $msg = "<p class='warnText'>Goober Mod is running in <b><i>TEST</i></b> mode</p>";
  140. }
  141. include ('../../../includes/header.inc.php');
  142. ?><p class="pageTitle"><?php echo $lang['mods']['mustlogin']['mod_title']; ?><br/>
  143. </br>
  144. <span class="infoText" style="font-size:60%">
  145. CubeCart mod by Goober <a href="http://www.cubecartmodder.com/">www.cubecartmodder.com</a>
  146. </span></p>
  147. <?php
  148. if (isset($msg)) {
  149.     echo $msg;
  150. }
  151. if ($getSecurityKey or $modSecurityError) { ?>    
  152. <form action="<?php echo $GLOBALS['rootRel']; ?>admin/modules/3rdparty/Must_Login/index.php?module=3rdparty&amp;folder=Must_Login" method="post" enctype="multipart/form-data">
  153. <table border="0" cellspacing="0" cellpadding="3" class="mainTable">
  154.   <tr>
  155.     <td colspan="2" class="tdTitle">Please Enter License Key</td>
  156.     <td colspan="2" class="tdText">The mod found your domain name as: <b>
  157.         <?php echo $_SERVER['SERVER_NAME']; ?></b><br>Use this name to generate license key.
  158.         <?php
  159.     $license_error = '<br>Unlicensed Domain: ' . $module['badserver'];
  160.     $license_error = $license_error . '<br>Unlicensed address: ' . $module['badsip'];
  161.     echo $license_error;
  162. ?>        </td>
  163.   </tr>
  164.   <tr>
  165.     <td align="left" class="tdText"><strong>Key:</strong></td>
  166.     <td class="tdText">
  167.         <input type="text" name="licensekey">
  168.     </td>
  169.     <td colspan="2" class="tdText" align="right">Please visit <a href="http://www.cubecartmodder.com/" target="_NEW">www.cubecartmodder.com</a> and login to your account to get a copy of your key.</td>
  170.   </tr>
  171.   <tr>
  172.     <td align="right" class="tdText">&nbsp;</td>
  173.     <td class="tdText">
  174.     <input name="module[default]" value="0" type="hidden" />
  175.     <input name="module[status]" value="0" type="hidden" />
  176.     <input type="submit" class="submit" value="Submit Key" />
  177.     </td>
  178.     <td colspan="2" class="tdText"></td>
  179.   </tr>
  180. </table>
  181. </form>
  182. <?php
  183.     exit;
  184. }
  185. ?><p>
  186. <form action="<?php echo $GLOBALS['rootRel']; ?>admin/modules/3rdparty/Must_Login/index.php?module=3rdparty&folder=Must_Login" method="post" enctype="multipart/form-data">
  187.  
  188. <table border="0" cellspacing="0" cellpadding="3" class="mainTable">
  189.   <tr>
  190.     <td colspan="2" class="tdTitle"><?php echo $lang['mods']['mustlogin']['config_settings']; ?></td>
  191.   </tr>
  192.   <tr>
  193.     <td rowspan="4" align="left" class="tdText" valign="top"><strong><?php echo $lang['mods']['mustlogin']['must_auth_for_prices']; ?>:</strong></td>
  194.     <td class="tdText"><table><tr><td valign="top">
  195.     <input type="radio" value="3" name="module[must_auth]" <?php if ($module['must_auth'] == 3) echo "checked='checked'"; ?>>
  196.     </td>
  197.     <td class="tdText"><?php echo $lang['mods']['mustlogin']['must_auth_for_all_prices']; ?></td>
  198.     </tr></table></td>
  199.   </tr>
  200.   <tr>
  201.   <td class="tdText"><table><tr><td valign="top">
  202.     <input type="radio" value="2" name="module[must_auth]" <?php if ($module['must_auth'] == 2) echo "checked='checked'"; ?>>
  203.     </td>
  204.     <td class="tdText"><?php echo $lang['mods']['mustlogin']['must_auth_for_login_and_sale_prices']; ?></td>
  205.     </tr></table></td>
  206.   </tr>
  207.   <tr>
  208.   <td class="tdText"><table><tr><td valign="top">
  209.     <input type="radio" value="1" name="module[must_auth]" <?php if ($module['must_auth'] == 1) echo "checked='checked'"; ?>>
  210.     </td>
  211.     <td class="tdText"><?php echo $lang['mods']['mustlogin']['must_auth_for_no_prices']; ?>    </td>
  212.     </tr></table></td>
  213.   </tr>
  214.   <tr>
  215.   <td class="tdText"><table><tr><td valign="top">
  216.     <input type="radio" value="0" name="module[must_auth]" <?php if ($module['must_auth'] == 0) echo "checked='checked'"; ?>>
  217.     </td>
  218.     <td class="tdText"><?php echo $lang['mods']['mustlogin']['must_auth_for_sale_prices']; ?>    </td>
  219.     </tr></table></td>
  220.   </tr>
  221.   <tr>
  222.     <td align="left" class="tdText"><strong><?php echo $lang['mods']['mustlogin']['view_button']; ?>:</strong></td>
  223.     <td class="tdText">
  224.     <select name="module[view_button]">
  225.         <option value="1" <?php if ($module['view_button'] == 1) echo "selected='selected'"; ?>><?php echo $lang['admin']['yes']; ?></option>
  226.         <option value="0" <?php if ($module['view_button'] == 0) echo "selected='selected'"; ?>><?php echo $lang['admin']['no']; ?></option>
  227.     </select>
  228.     </td>
  229.   </tr>
  230.   <tr>
  231.     <td align="left" class="tdText"><strong><?php echo $lang['mods']['mustlogin']['status']; ?>:</strong></td>
  232.     <td class="tdText">
  233.     <select name="module[status]">
  234.         <option value="1" <?php if ($module['status'] == 1) echo "selected='selected'"; ?>><?php echo $lang['mods']['mustlogin']['enabled']; ?></option>
  235.         <option value="0" <?php if ($module['status'] == 0) echo "selected='selected'"; ?>><?php echo $lang['mods']['mustlogin']['disabled']; ?></option>
  236.     </select>
  237.     </td>
  238.   </tr>
  239. <?php
  240. if ($module['badserver'] != '' || $module['badsip'] != '') { ?>  <tr>
  241.     <td align="left" class="tdText">Unlicensed Domain</strong></td>
  242.     <td class="tdText"><?php echo $module['badserver']; ?></td>
  243.   </tr>
  244.   <tr>
  245.     <td align="left" class="tdText">Unlicensed Address</strong></td>
  246.     <td class="tdText"><?php echo $module['badsip']; ?></td>
  247.   </tr>
  248. <?php
  249. } ?>    <tr>
  250.     <td align="right" class="tdText">&nbsp;</td>
  251.     <td class="tdText">
  252.         <input type="hidden" name="module[default]" value="0" />
  253.         <input type="submit" class="submit" value="Edit Config" />
  254.     </td>
  255.   </tr>
  256.   </table>
  257. </form>
  258.  
  259.  
  260. <?php include ('../../../includes/footer.inc.php'); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement