| Server IP : 210.245.233.93 / Your IP : 216.73.216.226 Web Server : Apache/2.2.15 (CentOS) System : Linux webserver2.onesolution.com.hk 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64 User : apache ( 48) PHP Version : 5.3.3 Disable Function : exec, shell_exec, system, passthru, popen, proc_open, pcntl_exec MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/hkosl.com/littleark/webadmin/ |
Upload File : |
<?php
include_once('configure.php');
if (!isset($_POST)) {
exit;
} else {
if ($_POST["for_page"] == "discount_addform_discount_3") {
$num_of_discount_3 = $_POST["num_of_discount_3"];
echo '<table class="discount_3_clone_table" id="discount_3_clone_table"><tr class="discount_3 discount discount_3_flag clone_' . $num_of_discount_3 . '">
<td width="120" align="right" valign="top" class=" required_field">' . _lang("Product Group") . '</td>
<td class="" valign="top" style="width: 1px;">: </td>
<td class="">
<select name="condition_product_group_id[]" class="select_product_group" id="condition_product_group_id" data-placeholder="Choose a Item Group">';
$sql = "select * from product_group_master where deleted = 0 order by name_" . $_SESSION["wlangcode"];
$product_group_item = bind_pdo($sql, NULL, "selectall");
foreach ($product_group_item as $group) {
echo "<option value='" . $group["id"] . "'>" . $group["name_" . $_SESSION["wlangcode"]] . "</option>";
}
echo '</select>
<br><br>
</td>
</tr>
<tr class="discount_3 discount clone_' . $num_of_discount_3 . '">
<td width="120" align="right" valign="top" class=" required_field">' . _lang("Min Quantity") . '</td>
<td class="" valign="top">: </td>
<td class="">
<input type="number" name="condition_min_qty[]" min="1" class="condition_min_qty small_textfield"/> <br><br>
<button type="button" onclick="remove_discount_3_clone(' . $num_of_discount_3 . ');">- ' . _lang("Remove") . '</button>
</td>
</tr>
<tr class="discount_3 discount clone_' . $num_of_discount_3 . '">
<td colspan="3"><hr></td>
</tr></table>
';
} else if ($_POST["for_page"] == "discount_addform_discount_4") {
$num_of_discount_4 = $_POST["num_of_discount_4"];
/*echo '<tr id="discount_condition" class="clone_' . $num_of_discount_4 . '">
<td colspan="3">
<hr>
</td>
</tr>';*/
/*echo '<tr id="discount_condition" class="clone_' . $num_of_discount_4 . ' discount_4_flag">
<td width="120" align="right" valign="top" class=""></td>
<td class="" valign="top"></td>
<td class="">
<span style="font-size: 13px; font-weight: bold;">'._lang("Discount Conditions").'</span>
<br><br>
</td>
</tr>';*/
echo '<div class="col-md-12 form-group clone_' . $num_of_discount_4 . ' discount_4_flag" id="discount_condition">
<hr>
<label for="" class="col-sm-2 control-label"></label>
<div class="col-sm-10">
<label for="" class="col-sm-10 control-label" style="padding-left: 0;">' . _lang("Discount Conditions") . '</label>
</div>
</div>';
/*echo '<tr class="discount_4 discount clone_' . $num_of_discount_4 . '">
<td width="120" align="right" valign="top" class="">'._lang("Quantity Range").'</td>
<td class="" valign="top">: </td>
<td class="">
'._lang("Quantity From").': <input type="text" name="condition_min_from_qty[]" value="1" class="small_textfield"/>
'._lang("Quantity To").': <input type="text" name="condition_min_to_qty[]" value="999" class="small_textfield"/>
<br><br>
</td>
</tr>';*/
echo '<div class="col-md-12 form-group discount_4 discount clone_' . $num_of_discount_4 . '">
<label for="" class="col-sm-2 control-label required_field">' . _lang("Quantity Range") . '</label>
<div class="col-sm-10">
' . _lang("Quantity From") . ':
<input type="number" name="condition_min_from_qty[]" value="1" min="1" class="form-control input-sm"><br>
' . _lang("Quantity To") . '":
<input type="number" name="condition_min_to_qty[]" value="999" min="1" class="form-control input-sm">
</div>
</div>';
/*echo '<tr id = "discount_result" class="clone_' . $num_of_discount_4 . '">
<td width = "120" align = "right" valign = "top" class="" ></td >
<td class="" valign = "top" ></td >
<td class="" >
<span style = "font-size: 13px; font-weight: bold;" > '._lang("Discount Result").' </span >
<br ><br >
</td >
</tr > ';*/
echo '<div class="col-md-12 form-group clone_' . $num_of_discount_4 . '" id="discount_result">
<hr>
<label for="" class="col-sm-2 control-label"></label>
<div class="col-sm-10">
<label for="" class="col-sm-10 control-label" style="padding-left: 0;">' . _lang("Discount Result") . '</label>
</div>
</div>';
/*echo '<tr class="discount_4 discount clone_' . $num_of_discount_4 . '">
<td width="120" align="right" valign="top" class="">'._lang("Deduct Type").'</td>
<td class="" valign="top">: </td>
<td class="">
'._lang("Percentage").'
<br><br>
</td>
</tr>';*/
echo '<div class="col-md-12 form-group discount_4 discount clone_' . $num_of_discount_4 . '">
<label for="" class="col-sm-2 control-label required_field">' . _lang("Deduct Type") . '</label>
<div class="col-sm-2">
<label> ' . _lang("Percentage") . ' </label>
</div>
</div>';
/*echo '<tr class="discount_4 discount clone_' . $num_of_discount_4 . '">
<td width="120" align="right" valign="top" class="">' . _lang("Deduct Value") . '</td>
<td class="" valign="top">: </td>
<td class="">
<input type="text" name="result_discount_value[]" class="small_textfield" />
<br>
<div class="msg">' . _lang("If deduct type is \"Percentage\", it means that this discount will deduct x%.") . '</div>
<br>
<button type="button" onclick="remove_discount_4_clone(' . $num_of_discount_4 . ');">- ' . _lang("Remove") . '</button>
<br><br>
</td>
</tr>';*/
echo '<div class="col-md-12 form-group discount_4 discount clone_' . $num_of_discount_4 . '">
<label for="" class="col-sm-2 control-label required_field">' . _lang("Deduct Value") . '</label>
<div class="col-sm-10">
<input type="text" name="result_discount_value[]" class="form-control input-sm">
<span class="msg deduct_value_remark" ></span>
<p class="help-block">' . _lang('If deduct type is "Percentage", it means that this discount will deduct x%.<br>If deduct type is "Fixed", it means that this discount will deduct x.') . '</p>
<br>
<button type="button" onclick="remove_discount_4_clone(' . $num_of_discount_4 . ');">- ' . _lang("Remove") . '</button>
</div>
</div>';
} else if ($_POST["for_page"] == "discount_itemgroup") {
$list = "";
if (!empty($_POST["item_group_list"])) {
$all_item_group = $_POST["item_group_list"];
foreach ($all_item_group as $itemgroup_id) {
$sql = "select * from jPOS_ItemGroupProdCodeList codelist INNER JOIN jPOS_ItemMaster itemmaster ON codelist.prod_code = itemmaster.PROD_CODE where codelist.item_group_id = ?";
$parameters = array($itemgroup_id);
$item_info = bind_pdo($sql, $parameters, "selectall");
foreach ($item_info as $item) {
$list .= $item["ITEM_DESC"] . "(" . $item["PROD_CODE"] . "), ";
}
}
$list = substr_replace($list, "", -2);
}
echo $list;
} else if ($_POST["for_page"] == "customer_points_status") {
if (!empty($_POST["customer_points_id"])) {
foreach ($_POST["customer_points_id"] as $key => $customer_points_id) {
$sql = "update customer_point set status = ?, lastupdate=?, lastupby=? where id = ?";
$parameters = array($_POST["customer_points_status"][$key], date("Y-m-d H:i:s"), $_SESSION["cmsloginid"], $customer_points_id);
bind_pdo($sql, $parameters);
}
echo "success";
}
}
}