} if ($whmcs->get_req_var("cancel")) { check_token("WHMCS.admin.default"); changeOrderStatus($id, "Cancelled"); redir("action=view&id=" . $id . "&cancelled=true"); exit; } if ($whmcs->get_req_var("fraud")) { check_token("WHMCS.admin.default"); changeOrderStatus($id, "Fraud"); redir("action=view&id=" . $id . "&frauded=true"); exit; } if ($whmcs->get_req_var("pending")) { check_token("WHMCS.admin.default"); changeOrderStatus($id, "Pending"); redir("action=view&id=" . $id . "&backpending=true"); exit; } if ($whmcs->get_req_var("cancelrefund")) { check_token("WHMCS.admin.default"); checkPermission("Refund Invoice Payments"); $error = cancelRefundOrder($id); redir("action=view&id=" . $id . "&cancelledrefunded=true&error=" . $error); exit; } if ($whmcs->get_req_var("activated") && isset($_COOKIE['WHMCSOrderAccept'])) { $errors = wGetCookie("OrderAccept", 1); wDelCookie("OrderAccept"); if (count($errors)) { infoBox($aInt->lang("orders", "statusaccepterror"), implode("<br>", $errors), "error");
/** * * @ WHMCS FULL DECODED & NULLED * * @ Version : 5.2.15 * @ Author : MTIMER * @ Release on : 2013-12-24 * @ Website : http://www.mtimer.cn * **/ if (!defined("WHMCS")) { exit("This file cannot be accessed directly"); } if (!function_exists("getRegistrarConfigOptions")) { require ROOTDIR . "/includes/registrarfunctions.php"; } if (!function_exists("ModuleBuildParams")) { require ROOTDIR . "/includes/modulefunctions.php"; } if (!function_exists("changeOrderStatus")) { require ROOTDIR . "/includes/orderfunctions.php"; } $result = select_query("tblorders", "", array("id" => $orderid)); $data = mysql_fetch_array($result); $orderid = $data['id']; if (!$orderid) { $apiresults = array("result" => "error", "message" => "Order ID Not Found"); return null; } changeOrderStatus($orderid, "Fraud"); $apiresults = array("result" => "success");
changeOrderStatus($order_id, MISSDAM_PRODUCT_STATUS); //SEND NOTIFICATION "DOA Orders" $order_query = tep_db_query("SELECT * FROM orders WHERE orders_id={$order_id}"); $order = tep_db_fetch_array($order_query); $to_name = $order['customers_name']; $to_email_address = $order['customers_email_address']; include DIR_WS_EMAILS . $languages[2]['path'] . '/orders-doa.php'; $from_email_name = FROM_EMAIL_NAME; $from_email_address = FROM_EMAIL_ADDRESS; $sent = tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address); if ($sent) { tep_db_query("UPDATE orders_status_history SET customer_notified='1' WHERE orders_id={$order_id} AND orders_status_id=" . MISSDAM_PRODUCT_STATUS); } } else { //$messagebox->add("Change Status Order $order_id to ".RECEIVED_PRODUCT_STATUS); changeOrderStatus($order_id, RECEIVED_PRODUCT_STATUS); $opp_email = array(); foreach ($op_problem as $opp) { $opid = $opp['orders_products_id']; //$messagebox->add("Change Status Order Product $opp qty:".$_POST['products_qty_'.$opp]." to ".MISSDAM_PRODUCT_STATUS); changeOrderProductStatus(null, $opid, $_POST['products_qty_' . $opid], MISSDAM_PRODUCT_STATUS); $opp_email[] = $opid; } //SEND NOTIFICATION "DOA Products" $order_query = tep_db_query("SELECT * FROM orders WHERE orders_id={$order_id}"); $order = tep_db_fetch_array($order_query); $to_name = $order['customers_name']; $to_email_address = $order['customers_email_address']; $order_products_filter = implode(',', $opp_email); $order_products_query = tep_db_query("SELECT * FROM orders_products WHERE orders_id={$order_id} AND orders_products_id IN ({$order_products_filter})"); $oplist = array();
$ot_box .= '<div id="paid_status" class="order-paid-status paid">ORDER PAID</div>'; } else { $ot_box .= '<div id="paid_status" class="order-paid-status unpaid">ORDER UNPAID</div>'; } $ot_box .= '<div> </div>'; $ot_box .= '</div>'; return $ot_box; } //SUBMIT ACTION if (isset($_POST['me_action'])) { if ($_POST['me_action'] == 'SETNEWSTATUS') { if (isset($_POST['id']) && $_POST['order_status'] != '') { $order_id = tep_db_prepare_input($_POST['id']); $order_status = tep_db_prepare_input($_POST['order_status']); $comment = tep_db_input($_POST['comment']); changeOrderStatus($order_id, $order_status, $comment); if ($order_status == '13') { //SEND NOTIFICATION ORDER: "MONEY CHARGED BACK" $order_query = tep_db_query("SELECT * FROM orders WHERE orders_id={$order_id}"); $order = tep_db_fetch_array($order_query); $cb_amount_query = tep_db_query("SELECT value FROM orders_total WHERE orders_id={$order_id} AND class='ot_total'"); $cb_amount_result = tep_db_fetch_array($cb_amount_query); $cb_amount = $cb_amount_result['value']; $op_query = tep_db_query("SELECT * FROM orders_products WHERE orders_id={$order_id}"); $order_product_list_array = array(); while ($row = tep_db_fetch_array($op_query)) { $order_product_list_array[] = $row['products_name'] . ' (' . $row['products_model'] . ')'; } $order_product_list = implode(', ', $order_product_list_array); $to_name = $order['customers_name']; $to_email_address = $order['customers_email_address'];
/** * * @ WHMCS FULL DECODED & NULLED * * @ Version : 5.2.15 * @ Author : MTIMER * @ Release on : 2013-12-24 * @ Website : http://www.mtimer.cn * **/ if (!defined("WHMCS")) { exit("This file cannot be accessed directly"); } if (!function_exists("getRegistrarConfigOptions")) { require ROOTDIR . "/includes/registrarfunctions.php"; } if (!function_exists("ModuleBuildParams")) { require ROOTDIR . "/includes/modulefunctions.php"; } if (!function_exists("changeOrderStatus")) { require ROOTDIR . "/includes/orderfunctions.php"; } $result = select_query("tblorders", "", array("id" => $orderid, "status" => "Pending")); $data = mysql_fetch_array($result); $orderid = $data['id']; if (!$orderid) { $apiresults = array("result" => "error", "message" => "Order ID not found or Status not Pending"); return null; } changeOrderStatus($orderid, "Cancelled"); $apiresults = array("result" => "success");
<?php //SUBMIT ACTION if (isset($_POST['me_action'])) { if ($_POST['me_action'] == 'PACKAGESETSEND') { if (isset($_POST['package_id'])) { $package_id = $_POST['package_id']; if (isset($_POST['cb_orders']) && is_array($_POST['cb_orders'])) { foreach ($_POST['cb_orders'] as $order_id) { changeOrderStatus($order_id, '10'); //SEND NOTIFICATION "SENT TO CUSTOMER" $order_query = tep_db_query("SELECT * FROM orders WHERE orders_id={$order_id}"); $order = tep_db_fetch_array($order_query); $to_name = $order['customers_name']; $to_email_address = $order['customers_email_address']; $products_query = tep_db_query("SELECT op.*,pc.customers_id FROM orders_products op" . " LEFT JOIN products_configurator pc" . " \tON pc.products_id=op.products_id" . " LEFT JOIN orders_products_problem opp" . " \tON opp.orders_products_id=op.orders_products_id" . " WHERE op.orders_id={$order_id} AND opp.orders_products_problem_id IS NULL" . " GROUP BY op.orders_products_id"); $products = array(); while ($row = tep_db_fetch_array($products_query)) { $products[] = $row; } $email_date = date('d.m.Y', strtotime("+1 day")); include DIR_WS_EMAILS . $languages[2]['path'] . '/orders-sent-tocust.php'; $from_email_name = FROM_EMAIL_NAME; $from_email_address = FROM_EMAIL_ADDRESS; $sent = tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address); if ($sent) { tep_db_query("UPDATE orders_status_history SET customer_notified='1' WHERE orders_id={$order_id} AND orders_status_id=10"); tep_mail(EMAIL_NAME_SERVICE, EMAIL_ADDRESS_SERVICE, $email_subject, $email_text, $from_email_name, $from_email_address); } unset($order); unset($products);