Example #1
0
         $orderbutch = $order->FetchData($_POST['orderid']);
         if ($orderbutch['accountid'] == $userid) {
             $order->Update($_POST['orderid'], 'lastinv', $invoice->invid);
         }
     }
     Page::ManageInvoices();
     break;
 case 'activategatewaymodule':
     $gm = GatewayModule::getInstance();
     $gm->Create($_POST['modulename']);
     Page::ManageGatewayModules();
     break;
 case 'disactivategatewaymodule':
     $gm = GatewayModule::getInstance();
     $gm->Delete($_POST['moduleid']);
     Page::ManageGatewayModules();
     break;
 case 'currencysetupdate':
     $setting = Settings::getInstance();
     if (!is_string($_POST['defcurrency']) || !is_string($_POST['defcurrencysource']) || !is_string($_POST['currencysymbol']) || !isset($_POST['defpaymodule'])) {
         throw new Exception("Wrong data specified");
     }
     $setting->Update('system.currency', $_POST['defcurrency']);
     $setting->Update('system.currency.autoupdate', $_POST['defcurrencysource']);
     $setting->Update('system.currency.symbol', $_POST['currencysymbol']);
     $setting->Update('system.paygateway.default', $_POST['defpaymodule']);
     Page::GeneralSettings();
     break;
 case 'editgateway':
     $gw = GatewayModule::getInstance();
     $gw->name = $_POST['gwname'];