Advertisement
plas71k

@streetmedic ioncube file => decoded

Feb 25th, 2013
425
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 12.50 KB | None | 0 0
  1. <?php
  2. /*
  3. * @ Pirate-Sky Crew :: PHP Decoder v2
  4. * @ Author: pLa$71k
  5. * @ Web: http://pirate-sky.com
  6. * @ Pirate-Sky Crew © 2008 - 2013
  7. */
  8.  
  9. ob_start();
  10. include("../config.php");
  11. include("constants.php");
  12. $_SESSION = array();
  13. include("table.php");
  14. include("session.php");
  15. include("function.php");
  16. include("config_smarty_sub.php");
  17. require_once("../ups/upsavs.php");
  18. if ($_SESSION['submit'] == $strButton_update && $uid != "" && $_REQUEST['update_address_id']) {
  19.     $user_sql    = "UPDATE " . EDX_ADDRESS . " SET company = '" . $U_company . "', first_name = '" . $U_first_name . "', last_name = '" . $U_last_name . "', address1 = '" . $U_address1 . "', address2 = '" . $U_address2 . "', zip = '" . $U_zip . "', city = '" . $U_ship_city . "', state = '" . $U_ship_state . "', country = '" . $U_country . "', phone = '" . $U_phone . "', province = '" . $U_province . "' WHERE address_id = '" . $_REQUEST['update_address_id'] . "'";
  20.     $user_result = mysql_query($user_sql);
  21. }
  22. echo "<!doctype html public \"-// W3C// DTD HTML 4.0 Transitional// EN\"><html><head><title>";
  23. print "{$strEdit}";
  24. echo " ";
  25. print "{$strAddress}";
  26. echo "</title><link rel=\"stylesheet\" type=\"text/css\" href=\"../";
  27. print "{$styles_dir}";
  28. echo "/frontend.css\" />";
  29. echo "<s";
  30. echo "cript language=\"JavaScript\"><!-- //function refreshParent() {window.opener.location.href = window.opener.location.href;}// --></script> </head><div class=\"bodytext\" align=\"center\">";
  31. echo "<s";
  32. echo "pan class=\"h5\" align=\"center\">EDIT SHIPPING ADDRESS</span> ";
  33. if ($_SESSION['feedback_sub'] != "") {
  34.     print "<br /><span class=\"smallheadred\">" . $_SESSION['feedback_sub'] . "</span>";
  35.     unset_var("feedback_sub");
  36. } else {
  37.     print "<br /><img src=\"{$image_dir}/pixel.gif\" width=\"1\" height=\"5\" />";
  38. }
  39. echo "<br />Select the address to edit in the drop down, make modifications and click update.<br /><br /><form action=\"\" method=\"post\">";
  40. echo "<s";
  41. echo "elect class=\"forminputrequired\" name=\"U_address_id\" style=\"font-size:12px;\" onchange=\"submit();\"><option value=\"\">Please select an address to edit</option>";
  42. $ship_to_sql    = "SELECT * FROM " . EDX_ADDRESS . " WHERE user_id = '" . $_REQUEST['uid'] . "' and delete_flag = 'N' ORDER BY first_name";
  43. $ship_to_result = mysql_query($ship_to_sql);
  44. if ($ship_to_result == 0 && $report == "Y") {
  45.     report("Edit-X Address Select Failed", mysql_errno(), mysql_error(), $ship_to_sql, __FILE__, 56, "", "");
  46. }
  47. while ($ship_to_result_row = mysql_fetch_array($ship_to_result)) {
  48.     if ($U_address_id == $ship_to_result_row['address_id'] || $_REQUEST['U_address_id'] == $ship_to_result_row['address_id']) {
  49.         $selected = " selected";
  50.     } else {
  51.         $selected = "";
  52.     }
  53.     $address = $ship_to_result_row['first_name'] . " " . $ship_to_result_row['last_name'] . " " . $ship_to_result_row['address1'] . " " . $ship_to_result_row['address2'] . " " . $ship_to_result_row['city'] . " " . $ship_to_result_row['state'] . " " . $ship_to_result_row['zip'];
  54.     $address = str_replace("South", "S.", $address);
  55.     $address = str_replace("North", "N.", $address);
  56.     $address = str_replace("East", "E.", $address);
  57.     $address = str_replace("West", "W.", $address);
  58.     $address = str_replace("Street", "St.", $address);
  59.     $address = str_replace("Avenue", "Ave.", $address);
  60.     $address = str_replace("Boulevard", "Blvd.", $address);
  61.     print "<option value=\"" . $ship_to_result_row['address_id'] . "\"" . $selected . ">" . $address . "</option>";
  62. }
  63. echo "</select></form><br />";
  64. form_validate_open("formvalidate");
  65. form_validate("validform", "U_first_name", "{$strPleaseEnter} First Name");
  66. form_validate_add();
  67. form_validate("validform", "U_last_name", "{$strPleaseEnter} Last Name");
  68. form_validate_add();
  69. form_validate("validform", "U_address1", "{$strPleaseEnter} Address");
  70. form_validate_add();
  71. form_validate("validform", "U_ship_city", "{$strPleaseEnter} City");
  72. form_validate_add();
  73. form_validate("validform", "U_zip", "{$strPleaseEnter} Zip");
  74. form_validate_add();
  75. form_validate("validform", "U_country", "{$strPleaseEnter} Country");
  76. form_validate_add();
  77. print "if(document.validform.U_country.value==\"USA\") {";
  78. form_validate("validform", "U_ship_state", "Please Enter your state.");
  79. print "}";
  80. print "if(document.validform.U_country.value!=\"USA\") {";
  81. form_validate("validform", "U_province", "Please Enter your province.");
  82. print "}";
  83. form_validate_close();
  84. if ($_REQUEST['U_address_id'] != "") {
  85.     $address_sql    = "SELECT * FROM " . EDX_ADDRESS . " WHERE address_id = '" . $_REQUEST['U_address_id'] . "'";
  86.     $address_result = mysql_query($address_sql);
  87.     if ($address_result == 0 && $report == "Y") {
  88.         report("Edit-X Address Select Failed", mysql_errno(), mysql_error(), $address_sql, __FILE__, 100, "", "");
  89.     }
  90.     $address_result_row = mysql_fetch_array($address_result);
  91.     $U_address_id       = $address_result_row['address_id'];
  92.     $U_first_name       = $address_result_row['first_name'];
  93.     $U_last_name        = $address_result_row['last_name'];
  94.     $U_company          = $address_result_row['company'];
  95.     $U_address1         = $address_result_row['address1'];
  96.     $U_address2         = $address_result_row['address2'];
  97.     $U_phone            = $address_result_row['phone'];
  98.     $U_ship_city        = $address_result_row['city'];
  99.     $U_ship_state       = $address_result_row['state'];
  100.     $U_zip              = $address_result_row['zip'];
  101.     $U_country          = $address_result_row['country'];
  102.     $U_province         = $address_result_row['province'];
  103.     $addy_found         = false;
  104.     $addy_select        = false;
  105.     $addys              = array();
  106.     $error_array        = array();
  107.     if ($_SESSION['submit'] == $strButton_update && $update_address_id != "") {
  108.         upsAvs();
  109.         $avs   = new $UN_10733098();
  110.         $addys = $avs->avs($U_zip);
  111.         if (isset($_REQUEST['avs_pair'])) {
  112.             $pair         = explode(";", $_REQUEST['avs_pair']);
  113.             $U_ship_city  = $pair[0];
  114.             $U_ship_state = $pair[1];
  115.         }
  116.         foreach ($addys as $key => $val) {
  117.             if (trim(strtolower($U_ship_city)) == trim(strtolower($key)) && trim(strtolower($U_ship_state)) == trim(strtolower($val))) {
  118.                 $address_sql        = "INSERT INTO " . EDX_ADDRESS . " (user_id, first_name, last_name, company, address1, address2, phone, city, state, zip, country, province, active_flag) VALUES ('" . $uid . "', '" . $U_first_name . "', '" . $U_last_name . "', '" . $U_company . "', '" . $U_address1 . "', '" . $U_address2 . "', '" . $U_phone . "', '" . $U_ship_city . "', '" . $U_ship_state . "', '" . $U_zip . "', '" . $U_country . "', '" . $U_province . "', 'Y')";
  119.                 $address_sql_result = mysql_query($address_sql);
  120.                 if ($address_sql_result == 0 && $report == "Y") {
  121.                     report("Address Insert Failed", mysql_errno(), mysql_error(), $address_sql, __FILE__, 135, "", "");
  122.                 }
  123.                 unset($U_first_name);
  124.                 unset($U_last_name);
  125.                 unset($U_company);
  126.                 unset($U_address1);
  127.                 unset($U_address2);
  128.                 unset($U_phone);
  129.                 unset($U_ship_city);
  130.                 unset($U_ship_state);
  131.                 unset($U_zip);
  132.                 unset($U_country);
  133.                 unset($U_province);
  134.                 unset($submit);
  135.                 unset_var("submit");
  136.                 unset($change_submit);
  137.                 $_SESSION['feedback_sub'] .= " Address inserted.";
  138.                 $addy_found = true;
  139.                 break;
  140.             }
  141.         }
  142.         if ($_SESSION['submit'] == $strButton_add && $addy_found == false) {
  143.             $addy_select = true;
  144.             $errors      = true;
  145.             $_SESSION['feedback_sub'] .= " The City/State does not match ZIP code.";
  146.             $refresh = "Y";
  147.         }
  148.         if ($_SESSION['submit'] == $strButton_add && strlen($U_zip) < 5) {
  149.             $addy_select = false;
  150.             $errors      = true;
  151.             $_SESSION['feedback_sub'] .= " Please provide a valid ZIP code.";
  152.             $refresh = "Y";
  153.         }
  154.     }
  155.     if ($_SESSION['submit'] == $strButton_add && (strlen($U_first_name) < 2 || strlen($U_last_name) < 2)) {
  156.         $_SESSION['feedback_sub'] .= " Please correct name fields.";
  157.         $refresh = "Y";
  158.     }
  159.     if ($_SESSION['submit'] == $strButton_add && strlen($U_address1) < 2) {
  160.         $_SESSION['feedback_sub'] .= " Please correct address field.";
  161.         $refresh = "Y";
  162.     }
  163.     echo "<form name=\"validform\" action=\"\" method=\"post\" onsubmit=\"return formvalidate(this)\"><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\"><tr><td valign=\"top\" class=\"bodytext\"><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td valign=\"top\"><div class=\"h5\">";
  164.     print "{$strFirst}";
  165.     echo " ";
  166.     print "{$strName}";
  167.     echo "</div><input class=\"forminput\" type=\"text\" name=\"U_first_name\" value=\"";
  168.     print $U_first_name;
  169.     echo "\" size=\"15\" /></td><td>&nbsp;</td><td valign=\"top\"><div class=\"h5\">";
  170.     print "{$strLast}";
  171.     echo " ";
  172.     print "{$strName}";
  173.     echo "</div><input class=\"forminput\" type=\"text\" name=\"U_last_name\" value=\"";
  174.     print $U_last_name;
  175.     echo "\" size=\"15\" /></td></tr></table><div class=\"h5\">Company</div><input class=\"forminput\" type=\"text\" name=\"U_company\" value=\"";
  176.     print $U_company;
  177.     echo "\" size=\"30\" /><div class=\"h5\">";
  178.     print "{$strAddress}";
  179.     echo "</div><input class=\"forminput\" type=\"text\" name=\"U_address1\" value=\"";
  180.     print $U_address1;
  181.     echo "\" size=\"30\" /><div class=\"h5\">";
  182.     print "{$strAddress}";
  183.     echo " 2</div><input class=\"forminput\" type=\"text\" name=\"U_address2\" value=\"";
  184.     print $U_address2;
  185.     echo "\" size=\"30\" /><div class=\"h5\">Phone</div><input class=\"forminput\" type=\"text\" name=\"U_phone\" value=\"";
  186.     print $U_phone;
  187.     echo "\" size=\"30\" /><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td valign=\"top\" class=\"bodytext\">";
  188.     if ($addy_select == false) {
  189.         echo "<div class=\"h5\">";
  190.         print "{$strCity}";
  191.         echo "</div><input class=\"forminput\" type=\"text\" name=\"U_ship_city\" value=\"";
  192.         print $U_ship_city;
  193.         echo "\" maxlength=\"25\" size=\"14\" /></td>";
  194.     } else {
  195.         echo "<div class=\"h5\">";
  196.         print "{$strCity}, {$strState}";
  197.         echo "</div>";
  198.         echo "<s";
  199.         echo "elect class=\"forminput\" name=\"avs_pair\">";
  200.         foreach ($addys as $key => $val) {
  201.             echo "<option value=\"";
  202.             print $key . ";" . $val;
  203.             echo "\">";
  204.             print $key . ", " . $val;
  205.             echo "</option>";
  206.         }
  207.         echo "</select>";
  208.     }
  209.     echo "<td>&nbsp;</td>";
  210.     if ($addy_select == false) {
  211.         echo "<td valign=\"top\"><div class=\"h5\">";
  212.         print "{$strState}";
  213.         echo "</div><input class=\"forminput\" type=\"text\" name=\"U_ship_state\" value=\"";
  214.         print $U_ship_state;
  215.         echo "\" maxlength=\"25\" size=\"3\" /></td>";
  216.     } else {
  217.         echo "<td>&nbsp;</td>";
  218.     }
  219.     echo "<td>&nbsp;</td><td valign=\"top\" class=\"bodytext\"><div class=\"h5\">";
  220.     print "{$strZip}";
  221.     echo "</div><input class=\"forminput\" type=\"text\" name=\"U_zip\" value=\"";
  222.     print $U_zip;
  223.     echo "\" size=\"6\" /></td></tr></table><div class=\"h5\">";
  224.     print "{$strCountry}";
  225.     echo "</div>";
  226.     include("country_name_drop.php");
  227.     echo "";
  228.     $smarty->assign("U_country", $U_country);
  229.     $smarty->display("country_name_drop." . TPL);
  230.     echo "</td></tr></table><br />";
  231. }
  232. echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr>";
  233. if ($_REQUEST['U_address_id'] != "") {
  234.     echo "<td><input type=\"hidden\" value=\"";
  235.     echo $_REQUEST['U_address_id'];
  236.     echo "\" name=\"update_address_id\" /><input type=\"hidden\" value=\"";
  237.     echo $_REQUEST['uid'];
  238.     echo "\" name=\"uid\" /><input class=\"forminput\" type=\"submit\" name=\"change_submit\" value=\"UPDATE\" onclick=\"refreshParent();\" /></form></td><td>&nbsp;</td>";
  239. }
  240. echo "<td><form method=\"post\" action=\"javascript:window.close();\"><input class=\"forminput\" type=\"submit\" name=\"change_submit\" value=\"CLOSE\" onclick=\"refreshParent();\" /></form></td><td>&nbsp;</td><td><form method=\"post\" action=\"\"><input class=\"forminput\" type=\"submit\" name=\"change_submit\" value=\"CANCEL\" /></form></td></tr></table></div></body></html>";
  241. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement