public function acp_form($serverId = null) { global $dbh, $postvar, $getvar, $instance; if ($serverId) { $servers_data = $dbh->select("servers", array("id", "=", $serverId)); } $yesno_opts[] = array("Yes", 1); $yesno_opts[] = array("No", 0); $text = "API Port:"; $help = "The port for THT to use to talk to the server on.<br><br>Standard ports:<br>2222 = HTTP / 2222 = HTTPS"; $input_type = "input"; $values = $servers_data['apiport']; $name = "apiport"; $response .= main::tr($text, $help, $input_type, $values, $name); $text = "Connect via HTTPS?"; $help = "Should THT connect to the server via HTTPS?"; $input_type = "select"; $values = main::dropdown("https", $yesno_opts, $servers_data['https']); $response .= main::tr($text, $help, $input_type, $values); $text = "Username:"******"Username to connect to the server"; $input_type = "input"; $values = $servers_data['user']; $name = "user"; $response .= main::tr($text, $help, $input_type, $values, $name); $text = "Password:"******"Password to connect to the server"; $input_type = "password"; $values = $servers_data['pass']; $name = "pass"; $response .= main::tr($text, $help, $input_type, $values, $name); return $response; }
public function acp_form($serverId = null) { global $dbh, $postvar, $getvar, $instance; if ($serverId) { $servers_data = $dbh->select("servers", array("id", "=", $serverId)); } $yesno_opts[] = array("Yes", 1); $yesno_opts[] = array("No", 0); $text = "API Port:"; $help = "The port for THT to use to talk to the server on.<br><br>Standard ports:<br>ZPanel: 80 = HTTP / 443 = HTTPS<br>WHM: 2086 = HTTP / 2087 = HTTPS<br>Kloxo: 7778 = HTTP / 7777 = HTTPS<br>DA: 2222 = HTTP / 2222 = HTTPS"; $input_type = "input"; $values = $servers_data['apiport']; $name = "apiport"; $response .= main::tr($text, $help, $input_type, $values, $name); $text = "Connect via HTTPS?"; $help = "Should THT connect to the server via HTTPS?"; $input_type = "select"; $values = main::dropdown("https", $yesno_opts, $servers_data['https']); $response .= main::tr($text, $help, $input_type, $values); $text = "Username:"******"Username to connect to the server"; $input_type = "input"; $values = $servers_data['user']; $name = "user"; $response .= main::tr($text, $help, $input_type, $values, $name); $text = "Access Hash:"; $help = "Access hash to connect to the server"; $input_type = "textarea"; $values = $servers_data['accesshash']; $name = "hash"; $response .= main::tr($text, $help, $input_type, $values, $name); return $response; }
public function acp_form($serverId = null) { global $dbh, $postvar, $getvar, $instance; if ($serverId) { $servers_data = $dbh->select("servers", array("id", "=", $serverId)); } $yesno_opts[] = array("Yes", 1); $yesno_opts[] = array("No", 0); $text = "API Port:"; $help = "The port for THT to use to talk to the server on.<br><br>Standard ports:<br>7778 = HTTP / 7777 = HTTPS"; $input_type = "input"; $values = $servers_data['apiport']; $name = "apiport"; $response .= main::tr($text, $help, $input_type, $values, $name); $text = "Connect via HTTPS?"; $help = "Should THT connect to the server via HTTPS?"; $input_type = "select"; $values = main::dropdown("https", $yesno_opts, $servers_data['https']); $response .= main::tr($text, $help, $input_type, $values); $text = "Username:"******"Username to connect to the server"; $input_type = "input"; $values = $servers_data['user']; $name = "user"; $response .= main::tr($text, $help, $input_type, $values, $name); $text = "Password:"******"Password to connect to the server"; $input_type = "password"; $values = $servers_data['pass']; $name = "pass"; $response .= main::tr($text, $help, $input_type, $values, $name); $text = "DNS Template:"; $help = "The DNS template for creating new domains with - Check out the documentation for your control panel for more information."; $input_type = "input"; $values = $servers_data['dnstemplate'] == "" ? $this->dnstemplate : $servers_data['dnstemplate']; $name = "nstmp"; $response .= main::tr($text, $help, $input_type, $values, $name); $text = "Backend Welcome Email Too?"; $help = "Should the server's welcome email be sent out in addition to THT's welcome email?"; $input_type = "select"; $values = main::dropdown("welcome", $yesno_opts, $servers_data['welcome']); $response .= main::tr($text, $help, $input_type, $values); return $response; }