0){ $record['noDownloads'] = 0; $record['expire'] = time()+$config['dnLoadExpire']; $where = "id = ".$_GET['reset']; $update = $db->update($glob['dbprefix']."CubeCart_Downloads", $record, $where); } if(isset($_POST['ship_date'])){ $data['comments'] = $db->mySQLsafe($_POST['comments']); $data['status'] = $db->mySQLsafe($_POST['status']); $data['ship_date'] = $db->mySQLsafe($_POST['ship_date']); $update = $db->update($glob['dbprefix']."CubeCart_order_sum", $data,"cart_order_id=".$db->mySQLsafe($_GET['cart_order_id'])); if($_POST['inform']==1){ // make email include("../../classes/htmlMimeMail.php"); $mail = new htmlMimeMail(); $text = sprintf($lang['admin']['orders']['order_email'],$_POST['name'],$_GET['cart_order_id'],orderStatus($_POST['status'])); if(!empty($_POST['customerComments'])){ $text .= sprintf($lang['admin']['orders']['email_staff_comments'],$_POST['customerComments']); } $text .= sprintf($lang['admin']['orders']['email_sent_from'],$glob['storeURL']); $mail->setText($text); $mail->setReturnPath($config['masterEmail']); $mail->setFrom($config['masterName'].' <'.$config['masterEmail'].'>'); $mail->setSubject($lang['admin']['orders']['email_subj_status_change'].' '.$_GET['cart_order_id']); $mail->setHeader('X-Mailer', 'CubeCart Mailer'); $result = $mail->send(array($_POST['email']), $config['mailMethod']); } if($_POST['status']==2){ $msg = "

".$lang['admin']['orders']['send_invoice_q']."".$lang['admin']['orders']['click_here']."

\n"; } } include("../includes/header.inc.php"); $result = $db->select("SELECT * FROM ".$glob['dbprefix']."CubeCart_order_sum INNER JOIN ".$glob['dbprefix']."CubeCart_customer ON ".$glob['dbprefix']."CubeCart_order_sum.customer_id = ".$glob['dbprefix']."CubeCart_customer.customer_id WHERE ".$glob['dbprefix']."CubeCart_order_sum.cart_order_id = ".$db->mySQLSafe($_GET['cart_order_id'])); ?>



"; ?> ,



"; } ?> ,

select("SELECT * FROM ".$glob['dbprefix']."CubeCart_order_inv WHERE cart_order_id = ".$db->mySQLSafe($_GET['cart_order_id'])); ?> select("SELECT useStockLevel FROM ".$glob['dbprefix']."CubeCart_inventory WHERE productId = ".$db->mySQLSafe($results[$i]['productId'])); if($_POST['status']==2 && $results[$i]['digital']==0 && $useStock[0]['useStockLevel']==1 && $results[$i]['stockUpdated']==0){ $query = "UPDATE ".$glob['dbprefix']."CubeCart_inventory SET stock_level = stock_level - ".$results[$i]['quantity']." WHERE productId = ".$results[$i]['productId']; $update = $db->misc($query); $query = "UPDATE ".$glob['dbprefix']."CubeCart_order_inv SET stockUpdated = 1 WHERE productId = ".$results[$i]['productId']." AND product_options = '".$results[$i]['product_options']."' AND cart_order_id = '".$results[$i]['cart_order_id']."'"; $update = $db->misc($query); } elseif($_POST['status']==1 && $results[$i]['digital']==0 && $useStock[0]['useStockLevel']==1 && $results[$i]['stockUpdated']==1) { $query = "UPDATE ".$glob['dbprefix']."CubeCart_inventory SET stock_level = stock_level + ".$results[$i]['quantity']." WHERE productId = ".$results[$i]['productId']; $update = $db->misc($query); $query = "UPDATE ".$glob['dbprefix']."CubeCart_order_inv SET stockUpdated = 0 WHERE productId = ".$results[$i]['productId']." AND product_options = '".$results[$i]['product_options']."' AND cart_order_id = '".$results[$i]['cart_order_id']."'"; $update = $db->misc($query); } ?>

mySQLSafe($_GET['cart_order_id'])." AND ".$glob['dbprefix']."CubeCart_Downloads.productId = ".$db->mySQLSafe($results[$i]['productId']); $download = $db->select($query); ?>
[]