本文整理汇总了PHP中generatePageMessage函数的典型用法代码示例。如果您正苦于以下问题:PHP generatePageMessage函数的具体用法?PHP generatePageMessage怎么用?PHP generatePageMessage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了generatePageMessage函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: set_page_message
set_page_message(tr('Could not create domain alias. An unexpected error occurred.'), 'error');
return false;
}
return true;
}
/***********************************************************************************************************************
* Main
*/
require_once 'imscp-lib.php';
iMSCP_Events_Aggregator::getInstance()->dispatch(iMSCP_Events::onClientScriptStart);
check_login('user');
customerHasFeature('domain_aliases') or showBadRequestErrorPage();
$mainDmnProps = get_domain_default_props($_SESSION['user_id']);
$domainAliasesCount = get_domain_running_als_cnt($mainDmnProps['domain_id']);
if ($mainDmnProps['domain_alias_limit'] != 0 && $domainAliasesCount >= $mainDmnProps['domain_alias_limit']) {
set_page_message(tr('You have reached the maximum number of domain aliasses allowed by your subscription.'), 'warning');
redirectTo('domains_manage.php');
}
if (!empty($_POST) && addDomainAlias()) {
redirectTo('domains_manage.php');
}
$tpl = new iMSCP_pTemplate();
$tpl->define_dynamic(array('layout' => 'shared/layouts/ui.tpl', 'page' => 'client/alias_add.tpl', 'page_message' => 'layout', 'shared_mount_point_domain' => 'page'));
$tpl->assign(array('TR_PAGE_TITLE' => tr('Client / Domains / Add Domain Alias'), 'TR_DOMAIN_ALIAS' => tr('Domain alias'), 'TR_DOMAIN_ALIAS_NAME' => tr('Domain alias name'), 'TR_DOMAIN_ALIAS_NAME_TOOLTIP' => tr("You must omit 'www'. It will be added automatically."), 'TR_SHARED_MOUNT_POINT' => tr('Shared mount point'), 'TR_SHARED_MOUNT_POINT_TOOLTIP' => tr('Allows to share the mount point of another domain.'), 'TR_URL_FORWARDING' => tr('URL forwarding'), 'TR_URL_FORWARDING_TOOLTIP' => tr('Allows to forward any request made to this domain alias to a specific URL. Be aware that when this option is in use, no Web folder is created for the domain alias.'), 'TR_FORWARD_TO_URL' => tr('Forward to URL'), 'TR_YES' => tr('Yes'), 'TR_NO' => tr('No'), 'TR_HTTP' => 'http://', 'TR_HTTPS' => 'https://', 'TR_FTP' => 'ftp://', 'TR_ADD' => tr('Add'), 'TR_CANCEL' => tr('Cancel')));
generateNavigation($tpl);
generatePage($tpl);
generatePageMessage($tpl);
$tpl->parse('LAYOUT_CONTENT', 'page');
iMSCP_Events_Aggregator::getInstance()->dispatch(iMSCP_Events::onClientScriptEnd, array('templateEngine' => $tpl));
$tpl->prnt();
unsetMessages();
开发者ID:svenjantzen,项目名称:imscp,代码行数:31,代码来源:alias_add.php
示例2: generatePage
/**
* Generate page.
*
* @param $tpl TemplateEngine
* @return void
*/
function generatePage($tpl)
{
$stmt = exec_query('
SELECT
t1.*, t2.domain_name
FROM
mailman AS t1
INNER JOIN
domain AS t2 ON (t2.domain_admin_id = t1.mailman_admin_id)
WHERE
t1.mailman_admin_id = ?
ORDER BY
t1.mailman_list_name
', $_SESSION['user_id']);
$lists = $stmt->fetchAll(PDO::FETCH_UNIQUE | PDO::FETCH_ASSOC | PDO::FETCH_GROUP);
if ($stmt->rowCount()) {
foreach ($lists as $listId => $listData) {
$tpl->assign(array('LIST_URL' => "http://lists.{$listData['domain_name']}/admin/{$listData['mailman_list_name']}", 'LIST_NAME' => tohtml($listData['mailman_list_name']), 'ADMIN_EMAIL' => tohtml($listData['mailman_admin_email']), 'ADMIN_PASSWORD' => '', 'STATUS' => tohtml(translate_dmn_status($listData['mailman_status']))));
if ($listData['mailman_status'] == 'ok') {
$tpl->assign(array('EDIT_LINK' => "mailman.php?action=edit&list_id={$listId}", 'EDIT_ICON' => 'i_edit', 'TR_EDIT' => tr('Edit'), 'DELETE_LINK' => "mailman.php?action=edit&action=delete&list_id={$listId}", 'DELETE_ICON' => 'i_delete', 'TR_DELETE' => tr('Delete')));
} else {
$tpl->assign(array('EDIT_LINK' => "#", 'EDIT_ICON' => 'i_delete', 'TR_EDIT' => tr('N/A'), 'DELETE_LINK' => "#", 'DELETE_ICON' => 'i_delete', 'TR_DELETE' => tr('N/A')));
}
$tpl->parse('EMAIL_LIST', '.email_list');
}
} else {
$tpl->assign('EMAIL_LISTS', '');
set_page_message(tr('You do not have created any mailing list yet.'), 'static_info');
}
if (isset($_REQUEST['action']) && $_REQUEST['action'] === 'edit') {
$listId = clean_input($_REQUEST['list_id']);
if (isset($lists[$listId])) {
$listData = $lists[$listId];
$tpl->assign(array('LIST_DIALOG_OPEN' => 1, 'LIST_NAME' => tohtml($listData['mailman_list_name']), 'LIST_NAME_READONLY' => ' readonly="readonly"', 'ADMIN_EMAIL' => tohtml($listData['mailman_admin_email']), 'ADMIN_PASSWORD' => '', 'ADMIN_PASSWORD_CONFIRM' => '', 'LIST_ID' => tohtml($listId), 'ACTION' => 'edit'));
} else {
showBadRequestErrorPage();
}
} else {
$tpl->assign(array('LIST_DIALOG_OPEN' => isset($_REQUEST['list_name']) ? 1 : 0, 'LIST_NAME' => isset($_REQUEST['list_name']) ? tohtml($_REQUEST['list_name']) : '', 'LIST_NAME_READONLY' => '', 'ADMIN_EMAIL' => isset($_REQUEST['admin_email']) ? tohtml($_REQUEST['admin_email']) : '', 'ADMIN_PASSWORD' => '', 'ADMIN_PASSWORD_CONFIRM' => '', 'LIST_ID' => '0', 'ACTION' => 'add'));
}
generatePageMessage($tpl);
}
开发者ID:svenjantzen,项目名称:plugins,代码行数:48,代码来源:mailman.php
注:本文中的generatePageMessage函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论