本文整理汇总了PHP中tform_actions::onShowNew方法的典型用法代码示例。如果您正苦于以下问题:PHP tform_actions::onShowNew方法的具体用法?PHP tform_actions::onShowNew怎么用?PHP tform_actions::onShowNew使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tform_actions
的用法示例。
在下文中一共展示了tform_actions::onShowNew方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onShowNew
function onShowNew()
{
global $app, $conf, $wb;
// Only admins can add domains, so we don't need any check
$app->tpl->setVar($wb);
parent::onShowNew();
}
示例2: onShowNew
function onShowNew()
{
global $app, $conf;
// we will check only users, not admins
if ($_SESSION["s"]["user"]["typ"] == 'user') {
if (!$app->tform->checkClientLimit('limit_web_aliasdomain', "type = 'alias'")) {
$app->error($app->tform->wordbook["limit_web_aliasdomain_txt"]);
}
if (!$app->tform->checkResellerLimit('limit_web_aliasdomain', "type = 'alias'")) {
$app->error('Reseller: ' . $app->tform->wordbook["limit_web_aliasdomain_txt"]);
}
}
parent::onShowNew();
}
示例3: onShowNew
function onShowNew()
{
global $app, $conf;
// we will check the limits only when the email address belongs to a client and not the admin
if ($_SESSION["s"]["user"]["default_group"] > 0) {
if (!$app->tform->checkClientLimit('limit_mailfilter', "")) {
$app->error($app->tform->lng("limit_mailfilter_txt"));
}
if (!$app->tform->checkResellerLimit('limit_mailfilter', "")) {
$app->error('Reseller: ' . $app->tform->lng("limit_mailfilter_txt"));
}
}
parent::onShowNew();
}
示例4: onShowNew
function onShowNew()
{
global $app, $conf;
// we will check only users, not admins
if ($_SESSION["s"]["user"]["typ"] == 'user') {
if (!$app->tform->checkClientLimit('limit_spamfilter_policy')) {
$app->error($app->tform->wordbook["limit_spamfilter_policy_txt"]);
}
if (!$app->tform->checkResellerLimit('limit_spamfilter_policy')) {
$app->error('Reseller: ' . $app->tform->wordbook["limit_spamfilter_policy_txt"]);
}
}
parent::onShowNew();
}
示例5: onShowNew
function onShowNew()
{
global $app, $conf;
// we will check only users, not admins
if ($_SESSION["s"]["user"]["typ"] == 'user') {
// Get the limits of the client
$client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
$client = $app->db->queryOneRecord("SELECT limit_client FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = {$client_group_id}");
// Check if the user may add another website.
if ($client["limit_client"] >= 0) {
$tmp = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client WHERE sys_groupid = {$client_group_id}");
if ($tmp["number"] >= $client["limit_client"]) {
$app->error($app->tform->wordbook["limit_client_txt"]);
}
}
}
parent::onShowNew();
}
示例6: onShowNew
function onShowNew()
{
global $app, $conf;
// we will check only users, not admins
if ($_SESSION["s"]["user"]["typ"] == 'user') {
if (!$app->tform->checkClientLimit('limit_web_domain', "type = 'vhost'")) {
$app->error($app->tform->wordbook["limit_web_domain_txt"]);
}
if (!$app->tform->checkResellerLimit('limit_web_domain', "type = 'vhost'")) {
$app->error('Reseller: ' . $app->tform->wordbook["limit_web_domain_txt"]);
}
// Get the limits of the client
$client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
$client = $app->db->queryOneRecord("SELECT client.default_webserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = {$client_group_id}");
$app->tpl->setVar("server_id_value", $client['default_webserver']);
}
$app->tform->formDef['tabs']['domain']['readonly'] = false;
parent::onShowNew();
}