本文整理匯總了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();
}