Exemplo n.º 1
0
}


if ($pageinfo=="delete" and $shopcoinsorder) {
    
	$rows5 = $order_class->getRowByParams(array('`order`'=>$shopcoinsorder)); 	

	if ($rows5['check']==0) {
		//удаляем позицию из заказа				
		$orderdetails_class->deletePostion($shopcoins);		
		$data = array('reserve'=>0,'reserveorder'=>0,'doubletimereserve'=>0,'userreserve'=>0);  
		$shopcoins_class->updateRow($data,"shopcoins='$shopcoins' and reserveorder='$shopcoinsorder'");				
		$orderdetails_class->deletePostionHelpshopcoinsorder($shopcoins);	
		$orderdetails_class->removeOrderCache($tpl['user']['user_id']);			
	}	 else {
		$order_class->clearOrder();
		$shopcoinsorder =0;
	}
}

if ($amount>0){
	$rows5 = $order_class->getRowByParams(array('`order`'=>$shopcoinsorder));
	   	
	if ($rows5['check']==0) {	
		
		for ($i=0; $i<=$amount; $i++) {
			${"sqlamount".$i} = request("sqlamount".$i);
			${"amount_".$i} = request("amount_".$i);
			${"shopcoins".$i}  = request("shopcoins".$i);
			if ((${"sqlamount".$i}!=${"amount_".$i})){
			    $rows = $orderdetails_class->getPostion(${"shopcoins".$i},true);