當前位置: 首頁>>代碼示例>>PHP>>正文


PHP main::tr方法代碼示例

本文整理匯總了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;
 }
開發者ID:cozylife,項目名稱:tht-reworked,代碼行數:33,代碼來源:da.php

示例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;
 }
開發者ID:cozylife,項目名稱:tht-reworked,代碼行數:44,代碼來源:kloxo.php


注:本文中的main::tr方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。