本文整理汇总了PHP中tform_actions::onShowEnd方法的典型用法代码示例。如果您正苦于以下问题:PHP tform_actions::onShowEnd方法的具体用法?PHP tform_actions::onShowEnd怎么用?PHP tform_actions::onShowEnd使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tform_actions
的用法示例。
在下文中一共展示了tform_actions::onShowEnd方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onShowEnd
function onShowEnd()
{
global $app, $conf, $wb;
if ($_SESSION["s"]["user"]["typ"] == 'admin') {
// Getting Clients of the user
$sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0 ORDER BY name";
$clients = $app->db->queryAllRecords($sql);
$client_select = '';
if ($_SESSION["s"]["user"]["typ"] == 'admin') {
$client_select .= "<option value='0'></option>";
}
$tmp_data_record = $app->tform->getDataRecord($this->id);
if (is_array($clients)) {
foreach ($clients as $client) {
$selected = $client["groupid"] == $tmp_data_record["sys_groupid"] ? 'SELECTED' : '';
$client_select .= "<option value='{$client['groupid']}' {$selected}>{$client['name']}</option>\r\n";
}
}
$app->tpl->setVar("client_group_id", $client_select);
}
if ($this->id > 0) {
//* we are editing a existing record
$app->tpl->setVar("edit_disabled", 1);
} else {
$app->tpl->setVar("edit_disabled", 0);
}
$app->tpl->setVar($wb);
parent::onShowEnd();
}
示例2: onShowEnd
function onShowEnd()
{
global $app, $conf;
$rec = $app->tform->getDataRecord($_SESSION['s']['user']['mailuser_id']);
$app->tpl->setVar("email", $rec['email']);
parent::onShowEnd();
}
示例3: onShowEnd
function onShowEnd()
{
global $app, $conf;
$rec = $app->tform->getDataRecord($this->id);
$app->tpl->setVar("email", $rec['email']);
parent::onShowEnd();
}
示例4: onShowEnd
function onShowEnd()
{
global $app, $conf;
// Getting email from data record
$email = $this->dataRecord["email"];
$email_parts = explode("@", $email);
$app->tpl->setVar("email_local_part", $email_parts[0]);
// Getting Domains of the user
$sql = "SELECT domain FROM mail_domain WHERE type = 'local' AND " . $app->tform->getAuthSQL('r');
$domains = $app->db->queryAllRecords($sql);
$domain_select = '';
foreach ($domains as $domain) {
$selected = $domain["domain"] == $email_parts[1] ? 'SELECTED' : '';
$domain_select .= "<option value='{$domain['domain']}' {$selected}>{$domain['domain']}</option>\r\n";
}
$app->tpl->setVar("email_domain", $domain_select);
// calculate scores
if (count($this->dataRecord) > 0) {
$app->tpl->setVar("spam_rewrite_score_int", number_format($this->dataRecord["spam_rewrite_score_int"] / 100, 2, '.', ''));
$app->tpl->setVar("spam_redirect_score_int", number_format($this->dataRecord["spam_redirect_score_int"] / 100, 2, '.', ''));
$app->tpl->setVar("spam_delete_score_int", number_format($this->dataRecord["spam_delete_score_int"] / 100, 2, '.', ''));
}
// Changing maildir to mailbox_id
$sql = "SELECT mailbox_id FROM mail_box WHERE maildir = '" . $this->dataRecord["spam_redirect_maildir"] . "' AND " . $app->tform->getAuthSQL('r');
$mailbox = $app->db->queryOneRecord($sql);
$this->dataRecord["spam_redirect_maildir"] = $mailbox["mailbox_id"];
parent::onShowEnd();
}
示例5: onShowEnd
function onShowEnd()
{
global $app, $conf;
// Get the record of the parent domain
$parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = " . intval(@$this->dataRecord["parent_domain_id"]));
// remove the parent domain part of the domain name before we show it in the text field.
$this->dataRecord["domain"] = str_replace('.' . $parent_domain["domain"], '', $this->dataRecord["domain"]);
$app->tpl->setVar("domain", $this->dataRecord["domain"]);
parent::onShowEnd();
}
示例6: onShowEnd
function onShowEnd()
{
global $app, $conf;
// Split the 3 parts of the SRV Record apart
$split = explode(' ', $this->dataRecord['data']);
$app->tpl->setVar('weight', $split[0]);
$app->tpl->setVar('port', $split[1]);
$app->tpl->setVar('target', $split[2]);
parent::onShowEnd();
}
示例7: onShowEnd
function onShowEnd()
{
global $app;
// Is autoresponder set?
if ($this->dataRecord['autoresponder'] == 'y') {
$app->tpl->setVar("ar_active", 'checked="checked"');
} else {
$app->tpl->setVar("ar_active", '');
}
parent::onShowEnd();
}
示例8: onShowEnd
function onShowEnd()
{
global $app, $conf;
if ($this->id > 0) {
//* we are editing a existing record
$app->tpl->setVar("edit_disabled", 1);
$app->tpl->setVar("parent_domain_id_value", $this->dataRecord["parent_domain_id"]);
} else {
$app->tpl->setVar("edit_disabled", 0);
}
parent::onShowEnd();
}
示例9: onShowEnd
function onShowEnd()
{
global $app, $conf;
// Split the 3 parts of the SRV Record apart
$split = explode(' ', $this->dataRecord['data']);
// Weight
$this->dataRecord['weight'] = $split[0];
// Port
$this->dataRecord['port'] = $split[1];
// Target
$this->dataRecord['target'] = $split[2];
// Bind the new datarecord to the template
$app->tpl->setVar($this->dataRecord);
parent::onShowEnd();
}
示例10: onShowEnd
function onShowEnd()
{
global $app, $conf;
// Getting Servers
$sql = "SELECT server_id,server_name FROM server WHERE server_id != " . $app->functions->intval($this->id) . " ORDER BY server_name";
$mirror_servers = $app->db->queryAllRecords($sql);
$mirror_server_select = '<option value="0">' . $app->tform->lng('- None -') . '</option>';
if (is_array($mirror_servers)) {
foreach ($mirror_servers as $mirror_server) {
$selected = $mirror_server["server_id"] == $this->dataRecord['mirror_server_id'] ? 'SELECTED' : '';
$mirror_server_select .= "<option value='{$mirror_server['server_id']}' {$selected}>{$mirror_server['server_name']}</option>\r\n";
}
}
$app->tpl->setVar("mirror_server_id", $mirror_server_select);
parent::onShowEnd();
}
示例11: onShowEnd
function onShowEnd()
{
global $app, $conf, $interfaceConf;
/*
* If the names are restricted -> remove the restriction, so that the
* data can be edited
*/
$app->uses('getconf,tools_sites');
$global_config = $app->getconf->get_global_config('sites');
$ftpuser_prefix = $app->tools_sites->replacePrefix($global_config['ftpuser_prefix'], $this->dataRecord);
if ($this->dataRecord['username'] != "") {
/* REMOVE the restriction */
$app->tpl->setVar("username", $app->tools_sites->removePrefix($this->dataRecord['username'], $this->dataRecord['username_prefix'], $ftpuser_prefix));
}
$app->tpl->setVar("username_prefix", $app->tools_sites->getPrefix($this->dataRecord['username_prefix'], $ftpuser_prefix, $global_config['ftpuser_prefix']));
parent::onShowEnd();
}
示例12: onShowEnd
function onShowEnd()
{
global $app, $conf;
// available dashlets
$available_dashlets_txt = '';
$handle = @opendir(ISPC_WEB_PATH . '/dashboard/dashlets');
while ($file = @readdir($handle)) {
if ($file != '.' && $file != '..' && !is_dir($file)) {
$available_dashlets_txt .= '<a href="javascript:void(0);" class="addPlaceholderContent">[' . substr($file, 0, -4) . ']<pre class="addPlaceholderContent" style="display:none;">[' . substr($file, 0, -4) . '],</pre></a> ';
}
}
if ($available_dashlets_txt == '') {
$available_dashlets_txt = '------';
}
$app->tpl->setVar("available_dashlets_txt", $available_dashlets_txt);
parent::onShowEnd();
}
示例13: onShowEnd
function onShowEnd()
{
global $app, $conf;
$email = $this->dataRecord["source"];
$email_parts = explode("@", $email);
$app->tpl->setVar("email_local_part", $email_parts[0]);
// Getting Domains of the user
$sql = "SELECT domain FROM mail_domain WHERE " . $app->tform->getAuthSQL('r') . ' ORDER BY domain';
$domains = $app->db->queryAllRecords($sql);
$domain_select = '';
foreach ($domains as $domain) {
$selected = isset($email_parts[1]) && $domain["domain"] == $email_parts[1] ? 'SELECTED' : '';
$domain_select .= "<option value='{$domain['domain']}' {$selected}>{$domain['domain']}</option>\r\n";
}
$app->tpl->setVar("email_domain", $domain_select);
parent::onShowEnd();
}
示例14: onShowEnd
function onShowEnd()
{
global $app, $conf;
//message variables
$message_variables = '';
$sql = "SHOW COLUMNS FROM client WHERE Field NOT IN ('client_id', 'sys_userid', 'sys_groupid', 'sys_perm_user', 'sys_perm_group', 'sys_perm_other', 'parent_client_id', 'id_rsa', 'ssh_rsa', 'created_at', 'default_mailserver', 'default_webserver', 'web_php_options', 'ssh_chroot', 'default_dnsserver', 'default_dbserver', 'template_master', 'template_additional', 'force_suexec', 'default_slave_dnsserver', 'usertheme', 'locked', 'canceled', 'can_use_api', 'tmp_data', 'customer_no_template', 'customer_no_start', 'customer_no_counter', 'added_date', 'added_by') AND Field NOT LIKE 'limit_%'";
$field_names = $app->db->queryAllRecords($sql);
if (!empty($field_names) && is_array($field_names)) {
foreach ($field_names as $field_name) {
if ($field_name['Field'] != '') {
if ($field_name['Field'] == 'gender') {
$message_variables .= '<a href="javascript:void(0);" class="addPlaceholder">{salutation}</a> ';
} else {
$message_variables .= '<a href="javascript:void(0);" class="addPlaceholder">{' . $field_name['Field'] . '}</a> ';
}
}
}
}
$app->tpl->setVar('message_variables', trim($message_variables));
parent::onShowEnd();
}
示例15: onShowEnd
function onShowEnd()
{
global $app, $conf, $interfaceConf;
/*
* If the names are restricted -> remove the restriction, so that the
* data can be edited
*/
$app->uses('getconf');
$global_config = $app->getconf->get_global_config('sites');
// $ftpuser_prefix = ($global_config['ftpuser_prefix'] == '')?'':str_replace('[CLIENTNAME]', $this->getClientName(), $global_config['ftpuser_prefix']);
$ftpuser_prefix = replacePrefix($global_config['ftpuser_prefix'], $this->dataRecord);
if ($this->dataRecord['username'] != "") {
/* REMOVE the restriction */
$app->tpl->setVar("username", preg_replace('/' . $ftpuser_prefix . '/', '', $this->dataRecord['username'], 1));
}
if ($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) {
$app->tpl->setVar("username_prefix", $global_config['ftpuser_prefix']);
} else {
$app->tpl->setVar("username_prefix", $ftpuser_prefix);
}
parent::onShowEnd();
}