本文整理汇总了PHP中main::tr方法的典型用法代码示例。如果您正苦于以下问题:PHP main::tr方法的具体用法?PHP main::tr怎么用?PHP main::tr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类main
的用法示例。
在下文中一共展示了main::tr方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: acp_form
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:";
$help = "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:";
$help = "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;
}
示例2: acp_form
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:";
$help = "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:";
$help = "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;
}