本文整理汇总了PHP中ui_language::translate方法的典型用法代码示例。如果您正苦于以下问题:PHP ui_language::translate方法的具体用法?PHP ui_language::translate怎么用?PHP ui_language::translate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ui_language
的用法示例。
在下文中一共展示了ui_language::translate方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getZpanelUpdates
public static function getZpanelUpdates()
{
if (ctrl_options::GetSystemOption('dbversion') < ctrl_options::GetSystemOption('latestzpversion')) {
$msg = ui_language::translate("There are currently new updates for your ZPanel installation, please download the latest release") . " (<strong>" . ctrl_options::GetSystemOption('latestzpversion') . "</strong>) from <a href=\"http://www.zpanelcp.com/\">http://www.zpanelcp.com/</a>.";
} elseif (ctrl_options::GetSystemOption('dbversion') == ctrl_options::GetSystemOption('latestzpversion')) {
$msg = "Congratulations, You are running the most recent version of ZPanel (<strong>" . ctrl_options::GetSystemOption('latestzpversion') . "</strong>)!";
} else {
$msg = "You appear to be running a BETA release, unless you are testing or developing we recommend you download and use the latest stable release (<strong>" . ctrl_options::GetSystemOption('latestzpversion') . "</strong>).";
}
return $msg;
}
示例2: Template
public static function Template()
{
global $controller;
if (!$controller->GetControllerRequest('URL', 'module')) {
$line = "";
$modcats = ui_moduleloader::GetModuleCats();
foreach ($modcats as $modcat) {
$mods = ui_moduleloader::GetModuleList($modcat['mc_id_pk'], "modadmin");
if ($mods) {
$line .= "<table class=\"zcat\">";
$line .= "<tr>";
$line .= "<th align=\"left\">";
$line .= "<a name=\"" . str_replace(" ", "_", strtolower($modcat['mc_name_vc'])) . "\"></a>";
$line .= "" . ui_language::translate($modcat['mc_name_vc']) . "";
$line .= "<a href=\"#\" class=\"zcat\" id=\"zcat_" . str_replace(" ", "_", strtolower($modcat['mc_name_vc'])) . "_a\"></a>";
$line .= "</th>";
$line .= "</tr>";
$line .= "<tr>";
$line .= "<td align=\"left\">";
$line .= "<div class=\"zcat_" . str_replace(" ", "_", strtolower($modcat['mc_name_vc'])) . "\" id=\"zcat_" . str_replace(" ", "_", strtolower($modcat['mc_name_vc'])) . "\">";
$line .= "<table class=\"zcatcontent\" align=\"left\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
$line .= "<tr>";
$line .= "<td>";
$line .= "<table align=\"left\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
$line .= "<tr>";
$icons_per_row = ctrl_options::GetSystemOption('module_icons_pr');
$num_icons = 0;
foreach ($mods as $mod) {
//$translatename = '<: '.$mod['mo_name_vc'].' :>';
//$translatename = $mod['mo_name_vc'];
$translatename = ui_language::translate($mod['mo_name_vc']);
$cleanname = str_replace(" ", "ZP(br)", $translatename);
if ($num_icons == $icons_per_row) {
$line .= "</tr><tr>";
$num_icons = 0;
}
$line .= "<td style=\"text-align:center;\" align=\"left\">";
$line .= "<a href=\"?module=" . $mod['mo_folder_vc'] . "\" title=\"<: " . $mod['mo_desc_tx'] . " :>\">";
$line .= "<img src=\"modules/" . $mod['mo_folder_vc'] . "/assets/icon.png\" border=\"0\" />";
$line .= "</a>";
$line .= "<br />";
$line .= "<a href=\"?module=" . $mod['mo_folder_vc'] . "\">" . $cleanname . "</a>";
$line .= "</td>";
$num_icons++;
}
$line .= "</tr></table></td></tr></table></div></td></tr></table><br>";
}
}
return $line;
}
}
示例3: getSentoraUpdates
public static function getSentoraUpdates()
{
$installed = ctrl_options::GetSystemOption('dbversion');
$lastest = ctrl_options::GetSystemOption('latestzpversion');
$lastest_tagged = ' (<strong>' . $lastest . '</strong>)';
if ($installed < $lastest) {
$msg = ui_language::translate('There are currently new updates for your Sentora installation, please download the latest release') . $lastest_tagged . ' from <a href="http://www.sentora.org/">http://www.sentora.org/</a>.';
} elseif ($installed == $lastest) {
$msg = 'Congratulations, You are running the most recent version of Sentora' . $lastest_tagged . '!';
} else {
$msg = 'You are running a BETA release (<strong>' . $installed . '</strong>), thank you to report what you observed.<br>' . '<b>Do not use it for production.</b>';
if ($latest >= '1.0.3') {
$msg .= '<br><br>Unless you are testing or developing we recommend you to download and use the latest stable release' . $lastest_tagged . '.';
}
}
return $msg;
}
示例4: getServices
public static function getServices()
{
global $controller;
if (file_exists(ui_tpl_assetfolderpath::Template() . 'img/modules/' . $controller->GetControllerRequest('URL', 'module') . '/assets/up.gif') && file_exists(ui_tpl_assetfolderpath::Template() . 'img/modules/' . $controller->GetControllerRequest('URL', 'module') . '/assets/down.gif')) {
$iconpath = '<img src="' . ui_tpl_assetfolderpath::Template() . 'img/modules/' . $controller->GetControllerRequest('URL', 'module') . '/assets/';
} else {
$iconpath = '<img src="modules/' . $controller->GetControllerRequest('URL', 'module') . '/assets/';
}
$line = "<h2>" . ui_language::translate("Checking status of services...") . "</h2>";
$line .= "<table>";
$status = fs_director::CheckForEmptyValue(sys_monitoring::PortStatus($PortNum));
$line .= '<tr><th>HTTP</th><td>' . module_controller::status_port(80, $iconpath) . '</td></tr>';
$line .= '<tr><th>FTP</th><td>' . module_controller::status_port(21, $iconpath) . '</td></tr>';
$line .= '<tr><th>SMTP</th><td>' . module_controller::status_port(25, $iconpath) . '</td></tr>';
$line .= '<tr><th>POP3</th><td>' . module_controller::status_port(110, $iconpath) . '</td></tr>';
$line .= '<tr><th>IMAP</th><td>' . module_controller::status_port(143, $iconpath) . '</td></tr>';
$line .= '<tr><th>MySQL</th><td>' . module_controller::status_port(3306, $iconpath) . '</td></tr>';
$line .= '<tr><th>DNS</th><td>' . module_controller::status_port(53, $iconpath) . '</td></tr>';
$line .= '</table>';
$line .= '<br><h2>' . ui_language::translate('Server Uptime') . '</h2>';
$line .= ui_language::translate('Uptime') . ": " . sys_monitoring::ServerUptime();
return $line;
}
示例5: getResult
static function getResult()
{
if (!fs_director::CheckForEmptyValue(self::$error)) {
if (self::$error == "ok") {
return ui_sysmessage::shout(ui_language::translate("Your account password been changed successfully!"), "zannounceok");
}
if (self::$error == "nomatch") {
return ui_sysmessage::shout(ui_language::translate("Sorry, your current password does not match the one on your account!"), "zannounceerror");
}
if (self::$error == "error") {
return ui_sysmessage::shout(ui_language::translate("An error occured and your MADmin account password could not be updated. Please ensure you entered all passwords correctly and try again."), "zannounceerror");
}
} else {
if (!fs_director::CheckForEmptyValue(self::$badpassword)) {
return ui_sysmessage::shout(ui_language::translate("Your password did not meet the minimun length requirements. Characters needed for password length") . ": " . ctrl_options::GetSystemOption('password_minlength'), "zannounceerror");
}
return;
}
}
示例6: CheckLogWritable
static function CheckLogWritable($filename)
{
if (is_readable($filename)) {
if (is_writable($filename)) {
$retval = "<font color=\"green\">" . ui_language::translate("(writable)") . "</font>";
} else {
$retval = "<font color=\"red\">" . ui_language::translate("(readonly)") . "</font>";
}
} else {
$retval = NULL;
}
return $retval;
}
示例7: getResult
static function getResult()
{
if (!fs_director::CheckForEmptyValue(self::$blank)) {
return ui_sysmessage::shout(ui_language::translate("You need to specify a package name to create your package."), "zannounceerror");
}
if (!fs_director::CheckForEmptyValue(self::$badname)) {
return ui_sysmessage::shout(ui_language::translate("Your package name is not valid. Please enter a valid package name."), "zannounceerror");
}
if (!fs_director::CheckForEmptyValue(self::$alreadyexists)) {
return ui_sysmessage::shout(ui_language::translate("A package with that name already appears to exsist."), "zannounceerror");
}
if (!fs_director::CheckForEmptyValue(self::$error)) {
return ui_sysmessage::shout(ui_language::translate("There was an error updating your packages"), "zannounceerror");
}
if (!fs_director::CheckForEmptyValue(self::$samepackage)) {
return ui_sysmessage::shout(ui_language::translate("You cant move clients to the same package you are deleting!"), "zannounceerror");
}
if (!fs_director::CheckForEmptyValue(self::$ok)) {
return ui_sysmessage::shout(ui_language::translate("Changes to your packages have been saved successfully!"), "zannounceok");
}
return;
}
示例8: getResult
static function getResult()
{
if (!fs_director::CheckForEmptyValue(self::$alreadyexistssame)) {
return ui_sysmessage::shout(ui_language::translate("You cannot forward a mailbox to itself!"), "zannounceerror");
}
if (!fs_director::CheckForEmptyValue(self::$alreadyexists)) {
return ui_sysmessage::shout(ui_language::translate('A mailbox, alias, forwarder or distribution list already exists with that name.'), "zannounceerror");
}
if (!fs_director::CheckForEmptyValue(self::$validemail)) {
return ui_sysmessage::shout(ui_language::translate("Your email address is not valid."), "zannounceerror");
}
if (!fs_director::CheckForEmptyValue(self::$password)) {
return ui_sysmessage::shout(ui_language::translate("Your password cannot be blank."), "zannounceerror");
}
if (!fs_director::CheckForEmptyValue(self::$noaddress)) {
return ui_sysmessage::shout(ui_language::translate("Your email address cannot be blank."), "zannounceerror");
}
if (!fs_director::CheckForEmptyValue(self::$ok)) {
return ui_sysmessage::shout(ui_language::translate("Changes to your forwarders have been saved successfully!"), "zannounceok");
} else {
return NULL;
}
return;
}
示例9: getResult
static function getResult()
{
if (!fs_director::CheckForEmptyValue(self::$error)) {
return ui_sysmessage::shout(ui_language::translate("You need to enter a question and an answer to add a FAQ item!"), "zannounceerror");
}
if (!fs_director::CheckForEmptyValue(self::$delete)) {
return ui_sysmessage::shout(ui_language::translate("FAQ item was deleted successfully!"), "zannounceok");
}
if (!fs_director::CheckForEmptyValue(self::$ok)) {
return ui_sysmessage::shout(ui_language::translate("FAQ item was added successfully!"), "zannounceok");
}
return;
}
示例10: getResult
static function getResult()
{
if (!fs_director::CheckForEmptyValue(self::$blank)) {
return ui_sysmessage::shout(ui_language::translate("You must fill out all fields!"), "zannounceerror");
}
if (!fs_director::CheckForEmptyValue(self::$emailerror)) {
return ui_sysmessage::shout(ui_language::translate("Your email address is not valid!"), "zannounceerror");
}
if (!fs_director::CheckForEmptyValue(self::$ok)) {
return ui_sysmessage::shout(ui_language::translate("Changes to your account settings have been saved successfully!"), "zannounceok");
}
return;
}
示例11: getResult
static function getResult()
{
if (!fs_director::CheckForEmptyValue(self::$notmine)) {
return ui_sysmessage::shout(ui_language::translate("Unable to get log preview, this domain does not belong to you."), "zannounceerror");
}
if (!fs_director::CheckForEmptyValue(self::$notfile)) {
return ui_sysmessage::shout(ui_language::translate("The log does not exit yet."), "zannounceerror");
}
return;
}
示例12: DisplayChart
private static function DisplayChart($name, $used, $maximum)
{
if ($maximum < 0) {
//-1 = unlimited
$res = '<img src="' . ui_tpl_assetfolderpath::Template() . 'images/unlimited.png" alt="' . ui_language::translate('Unlimited') . '"/>';
} else {
$free = max($maximum - $used, 0);
$res = '<img src="etc/lib/pChart2/zpanel/z3DPie.php?score=' . $free . '::' . $used . '&imagesize=240::190&chartsize=120::90&radius=100' . '&labels=Free: ' . $free . '::Used: ' . $used . '&legendfont=verdana&legendfontsize=8&legendsize=10::160"' . ' alt="' . ui_language::translate('Pie chart') . '"/>';
}
return '<h2>' . ui_language::translate($name) . '</h2>' . $res;
}
示例13: DefaultEmailBody
static function DefaultEmailBody()
{
$line = ui_language::translate("Hi {{fullname}},\r\rWe are pleased to inform you that your new hosting account is now active, you can now login to ZPanel using the following credentials:\r\rUsername: {{username}}\rPassword: {{password}}");
return $line;
}
示例14: GroupMoveTo
static function GroupMoveTo($uid, $gid)
{
global $zdbh;
$sql = "SELECT * FROM x_groups WHERE ug_reseller_fk=:uid AND ug_id_pk <> :gid";
//$numrows = $zdbh->query($sql);
$numrows = $zdbh->prepare($sql);
$numrows->bindParam(':uid', $uid);
$numrows->bindParam(':gid', $gid);
$numrows->execute();
if ($numrows->fetchColumn() != 0) {
$sql = $zdbh->prepare($sql);
$sql->bindParam(':uid', $uid);
$sql->bindParam(':gid', $gid);
$res = array();
$sql->execute();
while ($rowgroups = $sql->fetch()) {
array_push($res, array('groupid' => $rowgroups['ug_id_pk'], 'groupname' => ui_language::translate(runtime_xss::xssClean($rowgroups['ug_name_vc'])), 'groupdesc' => ui_language::translate(runtime_xss::xssClean($rowgroups['ug_notes_tx']))));
}
return $res;
} else {
return false;
}
}
示例15: getResult
static function getResult()
{
global $controller;
$currentuser = ctrl_users::GetUserDetail();
$urlvars = $controller->GetAllControllerRequests('URL');
if (isset($urlvars['saved'])) {
return ui_sysmessage::shout(ui_language::translate("Your theme configuration has been saved and has been updated for all clients!"), "zannounceok");
}
if (isset($urlvars['selectcss'])) {
return ui_sysmessage::shout(ui_language::translate("This theme has more than one variation, please choose a variation you'd like to use.."), "zannounceerror");
}
return false;
}