Advertisement
plas71k

waraxe: ioncube file 1 - decoded

Nov 20th, 2012
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.35 KB | None | 0 0
  1. <?php
  2. function shiping_charge($comp_id, $subcat_id, $country_id, $qty)
  3. {
  4.     if (!($select_price = mysql_query("select * from fixed_shipping_price FP, ship_con_com SC where FP.f_sp_subcat2='{$subcat_id}' and SC.f_spid=FP.f_sp_id and SC.shcc_conid='{$country_id}' and SC.shcc_comid='{$comp_id}'"))) {
  5.         exit(mysql_error());
  6.     }
  7.     $seelct_num = mysql_num_rows($select_price);
  8.     if ($seelct_num == 0) {
  9.         $select_defalut = mysql_fetch_array(mysql_query("select * from fixed_shipping_price where f_sp_subcat2='{$subcat_id}'"));
  10.         $shipping_price = $select_defalut['f_sp_default_value'] * $qty;
  11.     } else {
  12.         $select_ship    = mysql_fetch_array($select_price);
  13.         $shipping_price = $select_ship['shcc_price'] * $qty;
  14.     }
  15.     return $shipping_price;
  16. }
  17.  
  18. function main()
  19. {
  20.     include("language.php");
  21.     $amt       = mysql_real_escape_string($_SESSION['amt']);
  22.     $amt       = $_SESSION['total_amount'];
  23.     $amtpaypal = mysql_real_escape_string($_SESSION['amtpaypal']);
  24.     if (isset($_SESSION['memid'])) {
  25.         $memid = mysql_real_escape_string($_SESSION['memid']);
  26.     } else {
  27.         $memid = mysql_real_escape_string($_SESSION['normal_memid']);
  28.     }
  29.     $price           = mysql_real_escape_string($_SESSION['total_amount']);
  30.     $rs0             = mysql_fetch_array(mysql_query("select * from zw_websetting"));
  31.     $weburl          = $rs0['weburl'];
  32.     $date            = date("Y-m-d");
  33.     $sessionid       = session_id();
  34.     $productid       = mysql_real_escape_string($_SESSION['cartproid123']);
  35.     $cartvalue       = mysql_real_escape_string($_REQUEST['cartvalue']);
  36.     $product_fetch   = mysql_fetch_array(mysql_query("select * from products where id='{$productid}' and user_id!='{$memid}'"));
  37.     $name            = $product_fetch['product_name'];
  38.     $retail_price    = $product_fetch['retail_price'];
  39.     $buynow          = $product_fetch['buynow_price'];
  40.     $shipping_price  = $product_fetch['shipping_charge'];
  41.     $mrchnt_id       = mysql_real_escape_string($_SESSION['merchantid']);
  42.     $empid           = mysql_real_escape_string($_SESSION['memid']);
  43.     $shipping_cost   = mysql_real_escape_string($_SESSION['ship_ment']);
  44.     $upgrade         = mysql_real_escape_string($_REQUEST['upgrade']);
  45.     $rs0             = mysql_fetch_array(mysql_query("select * from zw_websetting"));
  46.     $paypal_currency = $rs0['paypalcurrency'];
  47.     $plan_query      = mysql_query("select * from plans where id='{$upgrade}'");
  48.     $plan_fetch      = mysql_fetch_array($plan_query);
  49.     $emp_select      = mysql_fetch_array(mysql_query("select * from job_seeker where id='{$empid}'"));
  50.     $emp_grade1      = $emp_select['memid'];
  51.     $plan_select     = mysql_fetch_array(mysql_query("select * from plans where id='{$emp_grade1}'"));
  52.     $emp_grade       = $plan_select['planname'];
  53.     $payment_modes   = $plan_select['payment_modes'];
  54.     $exp_payments    = explode("|", $payment_modes);
  55.     if (isset($_REQUEST['contine_order'])) {
  56.         $ship_country = mysql_real_escape_string($_REQUEST['ship_country']);
  57.         $ship_company = mysql_real_escape_string($_REQUEST['ship_company']);
  58.         $cargo_id     = mysql_real_escape_string($_REQUEST['hidden_val']);
  59.         $company_id   = mysql_real_escape_string($_REQUEST['hidden_val1']);
  60.         $value        = mysql_real_escape_string($_REQUEST['hidden_val2']);
  61.         if (!($select_cart = mysql_query("select * from products PR, cart CR, cart_insert CI where CI.session_id='{$sessionid}' and CR.product_id=CI.product_id and PR.id=CR.product_id"))) {
  62.             exit(mysql_error());
  63.         }
  64.         while ($fetch_array = mysql_fetch_array($select_cart)) {
  65.             $selet_cargo_price = mysql_fetch_array(mysql_query("select * from cargo_shipping_cost where cargo_ship_cost_id='{$cargo_id}'"));
  66.             $subcat_id         = $fetch_array['sub_subcat'];
  67.             $toatl_qty         = $fetch_array['qty'];
  68.             $shipping_price    = shiping_charge($company_id, $subcat_id, $ship_country, $toatl_qty);
  69.             $total_ship        = $shipping_price + $fetch_array['shipping_charge'];
  70.             $cart_sele_pro_id  = $fetch_array['product_id'];
  71.             if (!($update_cart = mysql_query("update cart set   shipping_country='{$selet_cargo_price['cargo_cost_con_id']}',  shipping_company='{$company_id}',  shipping_qty='{$total_ship}'  where product_id='{$cart_sele_pro_id}'"))) {
  72.                 exit(mysql_error());
  73.             }
  74.         }
  75.         echo "<script>window.location='order_details.php'</script>";
  76.         exit();
  77.     }
  78.     echo "<s";
  79.     echo "cript src=\"change_country.js\" type=\"text/javascript\" ></script>";
  80.     echo "<s";
  81.     echo "cript type=\"text/javascript\">function change_ajax(div_id,values) {if(values.indexOf(' ')>0) { alert(\"White Spaces Restricted\"); values=values.replace(/ /g,''); }\$(document).ready(function() {\$.ajaxSetup({ cache: false });\$('#'+div_id).load('";
  82.     echo $weburl;
  83.     echo "/ajax.php?'+values);  }); }function value_cargo(val_id,com_id,total,hidden_id) {var hidden=document.getElementById(hidden_id);document.getElementById(\"hidden_val1\").value=com_id;document.getElementById(\"hidden_val2\").value=total;hidden.value=val_id; }</script><center><!-- " . __FILE__ . " body--><div class=\"div\">";
  84.     include("shopping_header.php");
  85.     echo "<div class=\"clr\"></div><br /><form action=\"#\" name=\"ship_count_form\" id=\"ship_count_form\" method=\"post\"><input type=\"hidden\" name=\"hidden_val\" id=\"hidden_val\" value=\"\" /><input type=\"hidden\" name=\"hidden_val1\" id=\"hidden_val1\" value=\"\" /><input type=\"hidden\" name=\"hidden_val2\" id=\"hidden_val2\" value=\"\" /><fieldset  class=\"shopping_cart\" ><legend >Select Your Shipping Country</legend><br />";
  86.     echo "<s";
  87.     echo "elect name=\"ship_country\" id=\"ship_country\" style=\"color:#666666;\" ";
  88.     echo " onchange=\"change_country(this.value)\">";
  89.     display_country();
  90.     echo "</select><!--<input type=\"text\" value=\"\$99.00\" disabled=\"disabled\" style=\"width:65px; margin-right:5px; height:22px; font-weight:bold; color:#666;\" /> --><br /><br /><div id=\"ship_companies\"></div><br /><!--<a href=\"order_details.php\"> --><button name=\"contine_order\" class=\"button2\">Continue To Order</button><!--</a> --><br /><br /></fieldset></form></div><br /></center>";
  91. }
  92.  
  93. session_start();
  94. include_once("conn.php");
  95. include("template_shop.php");
  96. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement