<?php
defined('CORE_FOLDER') OR
exit('You can not get in here!');
class Controller extends Controllers
{
public $params,$data=[];
public $error;
public function __construct($arg=[])
{
parent::__construct();
$this->params = $arg['params'];
header("Content-Type:text/plain");
}
public function main()
{
Helper::Load(["Orders","Products"]);
$order_id = 123; // table users_products.id
$order = Orders::get($order_id);
$order_options = $order["options"];
$server_id = $order_options["server_id"] ?? 0;
$server = Products::get_server($server_id);
$module_name = $server["type"]."_Module"; // get module name
Modules::Load("Servers",$server["type"]); // Load module name
$class = new $module_name($server); // Initialising module class file
if(method_exists($class,"set_order")) $class->set_order($order); // set order details
$params = [];
if(isset($order_options["disk_limit"])) $params["disk_limit"] = $order_options["disk_limit"];
if(isset($order_options["bandwidth_limit"]))
$params["bandwidth_limit"] = $order_options["bandwidth_limit"];
if(isset($order_options["email_limit"])) $params["email_limit"] = $order_options["email_limit"];
if(isset($order_options["database_limit"])) $params["database_limit"] = $order_options["database_limit"];
if(isset($order_options["addons_limit"])) $params["addons_limit"] = $order_options["addons_limit"];
if(isset($order_options["subdomain_limit"]))
$params["subdomain_limit"] = $order_options["subdomain_limit"];
if(isset($order_options["ftp_limit"]))
$params["ftp_limit"] = $order_options["ftp_limit"];
if(isset($order_options["park_limit"]))
$params["park_limit"] = $order_options["park_limit"];
if(isset($order_options["max_email_per_hour"]))
$params["max_email_per_hour"] = $order_options["max_email_per_hour"];
if(isset($order_options["creation_info"]))
$params["creation_info"] = $order_options["creation_info"];
$params["username"] = "testuser";
$params["password"] = "testpassword";
$domain = $order_options["domain"];
$domain = idn_to_ascii($domain,0,INTL_IDNA_VARIANT_UTS46);
$create = $class->create($domain,$params);
if($create)
else
echo 'Error: '.$class->error;
}
}
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}