Beispiel #1
0
             }
         }
         $configoptionsarray[sanitize($opid)] = sanitize($opid2);
     }
 }
 $addonsarray = is_array($addons) ? array_keys($addons) : "";
 $errormessage .= bundlesValidateProductConfig($i, $billingcycle, $configoptionsarray, $addonsarray);
 $_SESSION['cart']['products'][$i]['billingcycle'] = $billingcycle;
 $_SESSION['cart']['products'][$i]['server'] = $serverarray;
 $_SESSION['cart']['products'][$i]['configoptions'] = $configoptionsarray;
 $_SESSION['cart']['products'][$i]['customfields'] = $customfield;
 $_SESSION['cart']['products'][$i]['addons'] = $addonsarray;
 if ($calctotal) {
     $i = $whmcs->get_req_var("i");
     $productinfo = $orderfrm->setPid($_SESSION['cart']['products'][$i]['pid']);
     $ordersummarytemp = "/templates/orderforms/" . $orderfrm->getTemplate() . "/ordersummary.tpl";
     if (file_exists(ROOTDIR . $ordersummarytemp)) {
         $carttotals = calcCartTotals(false, true);
         $templatevars = array("producttotals" => $carttotals['products'][$i], "carttotals" => $carttotals);
         echo processSingleTemplate($ordersummarytemp, $templatevars);
     }
     exit;
 }
 if (!$ajax && !$nocyclerefresh && $previousbillingcycle != $billingcycle) {
     redir("a=confproduct&i=" . $i);
     exit;
 }
 $validate = new WHMCS_Validate();
 $validate->validateCustomFields("product", $pid, true);
 run_validate_hook($validate, "ShoppingCartValidateProductUpdate", $_REQUEST);
 if ($validate->hasErrors()) {
Beispiel #2
0
                            }
                        }
                        if ($CONFIG['AutoRedirectoInvoice'] == "on") {
                            redir("id=" . (int) $invoiceid, "viewinvoice.php");
                        }
                        if ($CONFIG['AutoRedirectoInvoice'] == "gateway") {
                            $clientsdetails = getClientsDetails($_SESSION['uid']);
                            $params = getGatewayVariables($paymentmethod, $invoiceid, $total);
                            $paymentbutton = call_user_func($paymentmethod . "_link", $params);
                            $templatefile = "forwardpage";
                            $smarty->assign("message", $_LANG['forwardingtogateway']);
                            $smarty->assign("code", $paymentbutton);
                            $smarty->assign("invoiceid", $invoiceid);
                            outputClientArea($templatefile);
                            exit;
                        }
                    } else {
                        $smarty->assign("ispaid", true);
                    }
                }
                $templatefile = "complete";
                $smarty->assign("orderid", (int) $orderid);
                $smarty->assign("ordernumber", $order_number);
                $smarty->assign("invoiceid", $invoiceid);
                $smarty->assign("carttpl", $orderfrm->getTemplate());
                $orderform = "true";
            }
        }
    }
}
outputClientArea($templatefile);