Added mail module permissions.
| | |
| | | if($this->id > 0) { |
| | | |
| | | // checking permissions |
| | | if($app->tform->formDef['auth'] == 'yes') { |
| | | if($app->tform->formDef['auth'] == 'yes' && $_SESSION["s"]["user"]["typ"] != 'admin') { |
| | | if($app->tform->checkPerm($this->id,'d') == false) $app->error($app->lng('error_no_delete_permission')); |
| | | } |
| | | |
| | |
| | | ################################## |
| | | # Begin Datatable fields |
| | | ################################## |
| | | 'default_mailserver' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'SELECT', |
| | | 'default' => '1', |
| | | 'datasource' => array ( 'type' => 'SQL', |
| | | 'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} ORDER BY server_name', |
| | | 'keyfield'=> 'server_id', |
| | | 'valuefield'=> 'server_name' |
| | | ), |
| | | 'value' => '' |
| | | ), |
| | | 'limit_maildomain' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'TEXT', |
| | |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | 'limit_mailforward' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array ( 0 => array ( 'type' => 'ISINT', |
| | | 'errmsg'=> 'limit_mailforward_error_notint'), |
| | | ), |
| | | 'default' => '-1', |
| | | 'value' => '', |
| | | 'separator' => '', |
| | | 'width' => '10', |
| | | 'maxlength' => '10', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | 'limit_mailcatchall' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'TEXT', |
| | |
| | | 'validators' => array ( 0 => array ( 'type' => 'ISINT', |
| | | 'errmsg'=> 'limit_mailrouting_error_notint'), |
| | | ), |
| | | 'default' => '-1', |
| | | 'default' => '0', |
| | | 'value' => '', |
| | | 'separator' => '', |
| | | 'width' => '10', |
| | |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | 'limit_spamfilter_wblist' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array ( 0 => array ( 'type' => 'ISINT', |
| | | 'errmsg'=> 'limit_spamfilter_wblist_error_notint'), |
| | | ), |
| | | 'default' => '-1', |
| | | 'value' => '', |
| | | 'separator' => '', |
| | | 'width' => '10', |
| | | 'maxlength' => '10', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | 'limit_spamfilter_user' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array ( 0 => array ( 'type' => 'ISINT', |
| | | 'errmsg'=> 'limit_spamfilter_user_error_notint'), |
| | | ), |
| | | 'default' => '-1', |
| | | 'value' => '', |
| | | 'separator' => '', |
| | | 'width' => '10', |
| | | 'maxlength' => '10', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | 'limit_spamfilter_policy' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array ( 0 => array ( 'type' => 'ISINT', |
| | | 'errmsg'=> 'limit_spamfilter_policy_error_notint'), |
| | | ), |
| | | 'default' => '-1', |
| | | 'value' => '', |
| | | 'separator' => '', |
| | | 'width' => '10', |
| | | 'maxlength' => '10', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | ################################## |
| | | # END Datatable fields |
| | | ################################## |
| | |
| | | <?php
|
| | | $wb["limit_maildomain_txt"] = 'Max. number of email domains';
|
| | | $wb["limit_mailbox_txt"] = 'Max. number of mailboxes';
|
| | | $wb["limit_mailalias_txt"] = 'Max. number of email aliases and redirects';
|
| | | $wb["limit_mailcatchall_txt"] = 'Max. number of email catchall accounts';
|
| | | $wb["limit_mailrouting_txt"] = 'Max. number of email routes';
|
| | | $wb["limit_mailfilter_txt"] = 'Max. number of email filters';
|
| | | $wb["limit_fetchmail_txt"] = 'Max. number of fetchmail accounts';
|
| | | $wb["limit_mailquota_txt"] = 'Mailbox quota';
|
| | | $wb["btn_save_txt"] = 'Save';
|
| | | $wb["btn_cancel_txt"] = 'Cancel';
|
| | | $wb["company_name_txt"] = 'Company name';
|
| | | $wb["contact_name_txt"] = 'Contact name';
|
| | | $wb["username_txt"] = 'Username';
|
| | | $wb["password_txt"] = 'Password';
|
| | | $wb["language_txt"] = 'Language';
|
| | | $wb["usertheme_txt"] = 'Theme';
|
| | | $wb["street_txt"] = 'Street';
|
| | | $wb["zip_txt"] = 'ZIP';
|
| | | $wb["city_txt"] = 'City';
|
| | | $wb["state_txt"] = 'State';
|
| | | $wb["country_txt"] = 'Country';
|
| | | $wb["telephone_txt"] = 'Telephone';
|
| | | $wb["mobile_txt"] = 'Mobile';
|
| | | $wb["fax_txt"] = 'Fax';
|
| | | $wb["email_txt"] = 'Email';
|
| | | $wb["internet_txt"] = 'Internet';
|
| | | $wb["icq_txt"] = 'ICQ';
|
| | | $wb["notes_txt"] = 'Notes';
|
| | | $wb["company_txt"] = 'Company';
|
| | | $wb["title_txt"] = 'Title';
|
| | | $wb["firstname_txt"] = 'Firstname';
|
| | | $wb["surname_txt"] = 'Surname';
|
| | | $wb["limit_client_txt"] = 'limit_client';
|
| | | $wb["limit_domain_txt"] = 'limit_domain';
|
| | | $wb["limit_subdomain_txt"] = 'limit_subdomain';
|
| | | $wb["limit_webquota_txt"] = 'limit_webquota';
|
| | | $wb["limit_database_txt"] = 'limit_database';
|
| | | $wb["ip_address_txt"] = 'ip_address';
|
| | | $wb["limit_client_error_notint"] = 'Client Limit is not a number.';
|
| | | $wb["firstname_error_empty"] = 'Firstname is empty.';
|
| | | $wb["contact_error_empty"] = 'Contact name is empty.';
|
| | | <?php |
| | | $wb["limit_maildomain_txt"] = 'Max. number of email domains'; |
| | | $wb["limit_mailbox_txt"] = 'Max. number of mailboxes'; |
| | | $wb["limit_mailalias_txt"] = 'Max. number of email aliases'; |
| | | $wb["limit_mailforward_txt"] = 'Max. number of email forwarders'; |
| | | $wb["limit_mailcatchall_txt"] = 'Max. number of email catchall accounts'; |
| | | $wb["limit_mailrouting_txt"] = 'Max. number of email routes'; |
| | | $wb["limit_mailfilter_txt"] = 'Max. number of email filters'; |
| | | $wb["limit_fetchmail_txt"] = 'Max. number of fetchmail accounts'; |
| | | $wb["limit_mailquota_txt"] = 'Mailbox quota'; |
| | | $wb["limit_spamfilter_wblist_txt"] = 'Max. number of spamfilter white / blacklist filters'; |
| | | $wb["limit_spamfilter_user_txt"] = 'Max. number of spamfilter users'; |
| | | $wb["limit_spamfilter_policy_txt"] = 'Max. number of spamfilter policys'; |
| | | $wb["default_mailserver_txt"] = 'Default Mailserver'; |
| | | $wb["btn_save_txt"] = 'Save'; |
| | | $wb["btn_cancel_txt"] = 'Cancel'; |
| | | $wb["company_name_txt"] = 'Company name'; |
| | | $wb["contact_name_txt"] = 'Contact name'; |
| | | $wb["username_txt"] = 'Username'; |
| | | $wb["password_txt"] = 'Password'; |
| | | $wb["language_txt"] = 'Language'; |
| | | $wb["usertheme_txt"] = 'Theme'; |
| | | $wb["street_txt"] = 'Street'; |
| | | $wb["zip_txt"] = 'ZIP'; |
| | | $wb["city_txt"] = 'City'; |
| | | $wb["state_txt"] = 'State'; |
| | | $wb["country_txt"] = 'Country'; |
| | | $wb["telephone_txt"] = 'Telephone'; |
| | | $wb["mobile_txt"] = 'Mobile'; |
| | | $wb["fax_txt"] = 'Fax'; |
| | | $wb["email_txt"] = 'Email'; |
| | | $wb["internet_txt"] = 'Internet'; |
| | | $wb["icq_txt"] = 'ICQ'; |
| | | $wb["notes_txt"] = 'Notes'; |
| | | $wb["company_txt"] = 'Company'; |
| | | $wb["title_txt"] = 'Title'; |
| | | $wb["firstname_txt"] = 'Firstname'; |
| | | $wb["surname_txt"] = 'Surname'; |
| | | $wb["limit_client_txt"] = 'limit_client'; |
| | | $wb["limit_domain_txt"] = 'limit_domain'; |
| | | $wb["limit_subdomain_txt"] = 'limit_subdomain'; |
| | | $wb["limit_webquota_txt"] = 'limit_webquota'; |
| | | $wb["limit_database_txt"] = 'limit_database'; |
| | | $wb["ip_address_txt"] = 'ip_address'; |
| | | $wb["limit_client_error_notint"] = 'Client Limit is not a number.'; |
| | | $wb["firstname_error_empty"] = 'Firstname is empty.'; |
| | | $wb["contact_error_empty"] = 'Contact name is empty.'; |
| | | ?> |
| | |
| | | <table width="500" border="0" cellspacing="0" cellpadding="2"> |
| | | <tr> |
| | | <td><h2>Email</h2></td> |
| | | </tr> |
| | | <tr> |
| | | <td class="frmText11">{tmpl_var name='default_mailserver_txt'}:</td> |
| | | <td class="frmText11"> |
| | | <select name="default_mailserver" class="text"> |
| | | {tmpl_var name='default_mailserver'} |
| | | </select> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="frmText11" width="280">{tmpl_var name='limit_maildomain_txt'}:</td> |
| | | <td class="frmText11" width="220"><input name="limit_maildomain" type="text" class="text" value="{tmpl_var name='limit_maildomain'}" size="10" maxlength="10"></td> |
| | | </tr> |
| | |
| | | <tr> |
| | | <td class="frmText11">{tmpl_var name='limit_mailalias_txt'}:</td> |
| | | <td class="frmText11"><input name="limit_mailalias" type="text" class="text" value="{tmpl_var name='limit_mailalias'}" size="10" maxlength="10"></td> |
| | | </tr> |
| | | <tr> |
| | | <td class="frmText11">{tmpl_var name='limit_mailforward_txt'}:</td> |
| | | <td class="frmText11"><input name="limit_mailforward" type="text" class="text" value="{tmpl_var name='limit_mailforward'}" size="10" maxlength="10"></td> |
| | | </tr> |
| | | <tr> |
| | | <td class="frmText11">{tmpl_var name='limit_mailcatchall_txt'}:</td> |
| | |
| | | <tr> |
| | | <td class="frmText11">{tmpl_var name='limit_mailquota_txt'}:</td> |
| | | <td class="frmText11"><input name="limit_mailquota" type="text" class="text" value="{tmpl_var name='limit_mailquota'}" size="10" maxlength="10"> MB</td> |
| | | </tr> <tr> |
| | | </tr> |
| | | <tr> |
| | | <td><h2>Spamfilter</h2></td> |
| | | </tr> |
| | | <tr> |
| | | <td class="frmText11">{tmpl_var name='limit_spamfilter_wblist_txt'}:</td> |
| | | <td class="frmText11"><input name="limit_spamfilter_wblist" type="text" class="text" value="{tmpl_var name='limit_spamfilter_wblist'}" size="10" maxlength="10"></td> |
| | | </tr> |
| | | <tr> |
| | | <td class="frmText11">{tmpl_var name='limit_spamfilter_user_txt'}:</td> |
| | | <td class="frmText11"><input name="limit_spamfilter_user" type="text" class="text" value="{tmpl_var name='limit_spamfilter_user'}" size="10" maxlength="10"></td> |
| | | </tr> |
| | | <tr> |
| | | <td class="frmText11">{tmpl_var name='limit_spamfilter_policy_txt'}:</td> |
| | | <td class="frmText11"><input name="limit_spamfilter_policy" type="text" class="text" value="{tmpl_var name='limit_spamfilter_policy'}" size="10" maxlength="10"></td> |
| | | </tr> |
| | | <tr> |
| | | <td class="frmText11"> </td> |
| | | <td class="frmText11"> </td> |
| | | </tr> |
| | |
| | | $wb["email_error_unique"] = 'Duplicate Emailaddress.'; |
| | | $wb["no_domain_perm"] = "You have no permission for this domain."; |
| | | $wb["destination_error_isemail"] = 'Destination Emailaddress is invalid.'; |
| | | $wb["limit_mailalias_txt"] = 'The max. number of email aliases for your account is reached.'; |
| | | ?> |
| | |
| | | $wb["btn_cancel_txt"] = 'Cancel'; |
| | | $wb["source_error_notempty"] = 'Address is empty.'; |
| | | $wb["type_txt"] = 'Type'; |
| | | $wb["limit_mailfilter_txt"] = 'The max. number of email filters for your account is reached.'; |
| | | ?> |
| | |
| | | $wb["domain_error_unique"] = 'Duplicate Domain.'; |
| | | $wb["domain_error_regex"] = 'Invalid domain name.'; |
| | | $wb["client_txt"] = 'Client'; |
| | | $wb["limit_maildomain_txt"] = 'The max. number of email domains for your account is reached.'; |
| | | |
| | | ?> |
| | |
| | | $wb["domain_error_unique"] = "There is already a Catchall record for this domain."; |
| | | $wb["no_domain_perm"] = "You have no permission for this domain."; |
| | | $wb["domain_error_regex"] = 'Invalid domain name od domain contains invalid characters.'; |
| | | $wb["limit_mailcatchall_txt"] = 'The max. number of email catchall accounts for your account is reached.'; |
| | | ?> |
| | |
| | | <?php
|
| | | $wb["email_txt"] = 'Email';
|
| | | $wb["destination_txt"] = 'Destination Email';
|
| | | $wb["active_txt"] = 'Active';
|
| | | $wb["btn_save_txt"] = 'Save';
|
| | | $wb["btn_cancel_txt"] = 'Cancel';
|
| | | <?php |
| | | $wb["email_txt"] = 'Email'; |
| | | $wb["destination_txt"] = 'Destination Email'; |
| | | $wb["active_txt"] = 'Active'; |
| | | $wb["btn_save_txt"] = 'Save'; |
| | | $wb["btn_cancel_txt"] = 'Cancel'; |
| | | $wb["limit_mailforward_txt"] = 'The max. number of email forwarders for your account is reached.'; |
| | | ?> |
| | |
| | | $wb["active_txt"] = 'Active'; |
| | | $wb["btn_save_txt"] = 'Save'; |
| | | $wb["btn_cancel_txt"] = 'Cancel'; |
| | | $wb["limit_mailrouting_txt"] = 'The max. number of routes for your account is reached.'; |
| | | ?> |
| | |
| | | $wb["btn_cancel_txt"] = 'Cancel'; |
| | | $wb["source_error_notempty"] = 'Address is empty.'; |
| | | $wb["type_txt"] = 'Type'; |
| | | $wb["limit_mailfilter_txt"] = 'The max. number of email filters for your account is reached.'; |
| | | ?> |
| | |
| | | |
| | | class page_action extends tform_actions { |
| | | |
| | | 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 = $_SESSION["s"]["user"]["default_group"]; |
| | | $client = $app->db->queryOneRecord("SELECT limit_mailalias 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 mailbox. |
| | | if($client["limit_mailalias"] >= 0) { |
| | | $tmp = $app->db->queryOneRecord("SELECT count(forwarding_id) as number FROM mail_forwarding WHERE sys_groupid = $client_group_id and type = 'alias'"); |
| | | if($tmp["number"] >= $client["limit_mailalias"]) { |
| | | $app->error($app->tform->wordbook["limit_mailalias_txt"]); |
| | | } |
| | | } |
| | | } |
| | | |
| | | parent::onShowNew(); |
| | | } |
| | | |
| | | function onShowEnd() { |
| | | global $app, $conf; |
| | | |
| | |
| | | // Check if Domain belongs to user |
| | | $domain = $app->db->queryOneRecord("SELECT server_id, domain FROM mail_domain WHERE domain = '".$app->db->quote($_POST["email_domain"])."' AND ".$app->tform->getAuthSQL('r')); |
| | | if($domain["domain"] != $_POST["email_domain"]) $app->tform->errorMessage .= $app->tform->wordbook["no_domain_perm"]; |
| | | |
| | | // Check the client limits, if user is not the admin |
| | | if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin |
| | | // Get the limits of the client |
| | | $client_group_id = $_SESSION["s"]["user"]["default_group"]; |
| | | $client = $app->db->queryOneRecord("SELECT limit_mailalias 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 mailbox. |
| | | if($this->id == 0 && $client["limit_mailalias"] >= 0) { |
| | | $tmp = $app->db->queryOneRecord("SELECT count(forwarding_id) as number FROM mail_forwarding WHERE sys_groupid = $client_group_id AND type = 'alias'"); |
| | | if($tmp["number"] >= $client["limit_mailalias"]) { |
| | | $app->tform->errorMessage .= $app->tform->wordbook["limit_mailalias_txt"]."<br>"; |
| | | } |
| | | unset($tmp); |
| | | } |
| | | } // end if user is not admin |
| | | |
| | | |
| | | // compose the email field |
| | | $this->dataRecord["source"] = $_POST["email_local_part"]."@".$_POST["email_domain"]; |
| | |
| | | |
| | | class page_action extends tform_actions { |
| | | |
| | | 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 = $_SESSION["s"]["user"]["default_group"]; |
| | | $client = $app->db->queryOneRecord("SELECT limit_mailfilter 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 mailbox. |
| | | if($client["limit_mailfilter"] >= 0) { |
| | | $tmp = $app->db->queryOneRecord("SELECT count(access_id) as number FROM mail_access WHERE sys_groupid = $client_group_id"); |
| | | if($tmp["number"] >= $client["limit_mailfilter"]) { |
| | | $app->error($app->tform->wordbook["limit_mailfilter_txt"]); |
| | | } |
| | | } |
| | | } |
| | | |
| | | parent::onShowNew(); |
| | | } |
| | | |
| | | function onSubmit() { |
| | | global $app, $conf; |
| | | |
| | | // Check the client limits, if user is not the admin |
| | | if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin |
| | | // Get the limits of the client |
| | | $client_group_id = $_SESSION["s"]["user"]["default_group"]; |
| | | $client = $app->db->queryOneRecord("SELECT limit_mailfilter 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 mailbox. |
| | | if($this->id == 0 && $client["limit_mailfilter"] >= 0) { |
| | | $tmp = $app->db->queryOneRecord("SELECT count(access_id) as number FROM mail_access WHERE sys_groupid = $client_group_id"); |
| | | if($tmp["number"] >= $client["limit_mailfilter"]) { |
| | | $app->tform->errorMessage .= $app->tform->wordbook["limit_mailfilter_txt"]."<br>"; |
| | | } |
| | | unset($tmp); |
| | | } |
| | | } // end if user is not admin |
| | | |
| | | parent::onSubmit(); |
| | | } |
| | | |
| | | } |
| | | |
| | | $app->tform_actions = new page_action; |
| | |
| | | |
| | | class page_action extends tform_actions { |
| | | |
| | | 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 = $_SESSION["s"]["user"]["default_group"]; |
| | | $client = $app->db->queryOneRecord("SELECT limit_mailcatchall 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 mailbox. |
| | | if($client["limit_mailforward"] >= 0) { |
| | | $tmp = $app->db->queryOneRecord("SELECT count(forwarding_id) as number FROM mail_forwarding WHERE sys_groupid = $client_group_id and type = 'catchall'"); |
| | | if($tmp["number"] >= $client["limit_mailcatchall"]) { |
| | | $app->error($app->tform->wordbook["limit_mailcatchall_txt"]); |
| | | } |
| | | } |
| | | } |
| | | |
| | | parent::onShowNew(); |
| | | } |
| | | |
| | | function onShowEnd() { |
| | | global $app, $conf; |
| | | |
| | |
| | | // Check if Domain belongs to user |
| | | $domain = $app->db->queryOneRecord("SELECT server_id, domain FROM mail_domain WHERE domain = '".$app->db->quote($_POST["email_domain"])."' AND ".$app->tform->getAuthSQL('r')); |
| | | if($domain["domain"] != $_POST["email_domain"]) $app->tform->errorMessage .= $app->tform->wordbook["no_domain_perm"]; |
| | | |
| | | // Check the client limits, if user is not the admin |
| | | if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin |
| | | // Get the limits of the client |
| | | $client_group_id = $_SESSION["s"]["user"]["default_group"]; |
| | | $client = $app->db->queryOneRecord("SELECT limit_mailcatchall 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 mailbox. |
| | | if($this->id == 0 && $client["limit_mailcatchall"] >= 0) { |
| | | $tmp = $app->db->queryOneRecord("SELECT count(forwarding_id) as number FROM mail_forwarding WHERE sys_groupid = $client_group_id AND type = 'catchall'"); |
| | | if($tmp["number"] >= $client["limit_mailcatchall"]) { |
| | | $app->tform->errorMessage .= $app->tform->wordbook["limit_mailcatchall_txt"]."<br>"; |
| | | } |
| | | unset($tmp); |
| | | } |
| | | } // end if user is not admin |
| | | |
| | | // compose the email field |
| | | $this->dataRecord["source"] = "@".$_POST["email_domain"]; |
| | |
| | | $app->load('tform_actions'); |
| | | |
| | | class page_action extends tform_actions { |
| | | |
| | | |
| | | 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 = $_SESSION["s"]["user"]["default_group"]; |
| | | $client = $app->db->queryOneRecord("SELECT limit_maildomain 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 maildomain. |
| | | if($client["limit_maildomain"] >= 0) { |
| | | $tmp = $app->db->queryOneRecord("SELECT count(domain_id) as number FROM mail_domain WHERE sys_groupid = $client_group_id"); |
| | | if($tmp["number"] >= $client["limit_maildomain"]) { |
| | | $app->error($app->tform->wordbook["limit_maildomain_txt"]); |
| | | } |
| | | } |
| | | } |
| | | |
| | | parent::onShowNew(); |
| | | } |
| | | |
| | | function onShowEnd() { |
| | | global $app, $conf; |
| | | |
| | |
| | | } |
| | | |
| | | function onSubmit() { |
| | | if($_SESSION["s"]["user"]["typ"] != 'admin') unset($this->dataRecord["client_group_id"]); |
| | | global $app, $conf; |
| | | if($_SESSION["s"]["user"]["typ"] != 'admin') { |
| | | |
| | | // Get the limits of the client |
| | | $client_group_id = $_SESSION["s"]["user"]["default_group"]; |
| | | $client = $app->db->queryOneRecord("SELECT limit_maildomain, default_mailserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id"); |
| | | |
| | | // When the record is updated |
| | | if($this->id > 0) { |
| | | // restore the server ID if the user is not admin and record is edited |
| | | $tmp = $app->db->queryOneRecord("SELECT server_id FROM mail_domain WHERE domain_id = ".intval($this->id)); |
| | | $this->dataRecord["server_id"] = $tmp["server_id"]; |
| | | unset($tmp); |
| | | // When the record is inserted |
| | | } else { |
| | | // set the server ID to the default mailserver of the client |
| | | $this->dataRecord["server_id"] = $client["default_mailserver"]; |
| | | |
| | | // Check if the user may add another mail_domain |
| | | if($client["limit_maildomain"] >= 0) { |
| | | $tmp = $app->db->queryOneRecord("SELECT count(domain_id) as number FROM mail_domain WHERE sys_groupid = $client_group_id"); |
| | | if($tmp["number"] >= $client["limit_maildomain"]) { |
| | | $app->error($app->tform->wordbook["limit_maildomain_txt"]); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // Clients may not set the client_group_id, so we unset them if user is not a admin |
| | | unset($this->dataRecord["client_group_id"]); |
| | | } |
| | | parent::onSubmit(); |
| | | } |
| | | |
| | | function onAfterInsert() { |
| | | global $app, $conf; |
| | | |
| | | // make sure that the record belongs to the clinet group and not the admin group when a dmin inserts it |
| | | if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($this->dataRecord["client_group_id"])) { |
| | | $client_group_id = intval($this->dataRecord["client_group_id"]); |
| | | $app->db->query("UPDATE mail_domain SET sys_groupid = $client_group_id WHERE domain_id = ".$this->id); |
| | |
| | | |
| | | class page_action extends tform_actions { |
| | | |
| | | 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 = $_SESSION["s"]["user"]["default_group"]; |
| | | $client = $app->db->queryOneRecord("SELECT limit_mailforward 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 mailbox. |
| | | if($client["limit_mailforward"] >= 0) { |
| | | $tmp = $app->db->queryOneRecord("SELECT count(forwarding_id) as number FROM mail_forwarding WHERE sys_groupid = $client_group_id and type = 'forward'"); |
| | | if($tmp["number"] >= $client["limit_mailforward"]) { |
| | | $app->error($app->tform->wordbook["limit_mailforward_txt"]); |
| | | } |
| | | } |
| | | } |
| | | |
| | | parent::onShowNew(); |
| | | } |
| | | |
| | | function onShowEnd() { |
| | | global $app, $conf; |
| | | |
| | |
| | | // Check if Domain belongs to user |
| | | $domain = $app->db->queryOneRecord("SELECT server_id, domain FROM mail_domain WHERE domain = '".$app->db->quote($_POST["email_domain"])."' AND ".$app->tform->getAuthSQL('r')); |
| | | if($domain["domain"] != $_POST["email_domain"]) $app->tform->errorMessage .= $app->tform->wordbook["no_domain_perm"]; |
| | | |
| | | // Check the client limits, if user is not the admin |
| | | if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin |
| | | // Get the limits of the client |
| | | $client_group_id = $_SESSION["s"]["user"]["default_group"]; |
| | | $client = $app->db->queryOneRecord("SELECT limit_mailforward 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 mailbox. |
| | | if($this->id == 0 && $client["limit_mailforward"] >= 0) { |
| | | $tmp = $app->db->queryOneRecord("SELECT count(forwarding_id) as number FROM mail_forwarding WHERE sys_groupid = $client_group_id AND type = 'forward'"); |
| | | if($tmp["number"] >= $client["limit_mailforward"]) { |
| | | $app->tform->errorMessage .= $app->tform->wordbook["limit_mailforward_txt"]."<br>"; |
| | | } |
| | | unset($tmp); |
| | | } |
| | | } // end if user is not admin |
| | | |
| | | // compose the email field |
| | | $this->dataRecord["source"] = $_POST["email_local_part"]."@".$_POST["email_domain"]; |
| | |
| | | exit; |
| | | } |
| | | |
| | | |
| | | // Loading classes |
| | | $app->uses('tpl,tform,tform_actions'); |
| | | $app->load('tform_actions'); |
| | | |
| | | // let tform_actions handle the page |
| | | $app->tform_actions->onLoad(); |
| | | class page_action extends tform_actions { |
| | | |
| | | 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 = $_SESSION["s"]["user"]["default_group"]; |
| | | $client = $app->db->queryOneRecord("SELECT limit_mailrouting 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 mailbox. |
| | | if($client["limit_mailrouting"] >= 0) { |
| | | $tmp = $app->db->queryOneRecord("SELECT count(transport_id) as number FROM mail_transport WHERE sys_groupid = $client_group_id"); |
| | | if($tmp["number"] >= $client["limit_mailrouting"]) { |
| | | $app->error($app->tform->wordbook["limit_mailrouting_txt"]); |
| | | } |
| | | } |
| | | } |
| | | |
| | | parent::onShowNew(); |
| | | } |
| | | |
| | | function onSubmit() { |
| | | global $app, $conf; |
| | | |
| | | // Check the client limits, if user is not the admin |
| | | if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin |
| | | // Get the limits of the client |
| | | $client_group_id = $_SESSION["s"]["user"]["default_group"]; |
| | | $client = $app->db->queryOneRecord("SELECT limit_mailrouting 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 mailbox. |
| | | if($this->id == 0 && $client["limit_mailrouting"] >= 0) { |
| | | $tmp = $app->db->queryOneRecord("SELECT count(transport_id) as number FROM mail_transport WHERE sys_groupid = $client_group_id"); |
| | | if($tmp["number"] >= $client["limit_mailrouting"]) { |
| | | $app->tform->errorMessage .= $app->tform->wordbook["limit_mailrouting_txt"]."<br>"; |
| | | } |
| | | unset($tmp); |
| | | } |
| | | } // end if user is not admin |
| | | |
| | | parent::onSubmit(); |
| | | } |
| | | |
| | | } |
| | | |
| | | $page = new page_action; |
| | | $page->onLoad(); |
| | | |
| | | ?> |
| | |
| | | function onSubmit() { |
| | | global $app, $conf; |
| | | |
| | | // Get the limits of the client |
| | | $client_group_id = $_SESSION["s"]["user"]["default_group"]; |
| | | $client = $app->db->queryOneRecord("SELECT limit_mailbox, limit_mailquota FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id"); |
| | | |
| | | // Check if Domain belongs to user |
| | | $domain = $app->db->queryOneRecord("SELECT server_id, domain FROM mail_domain WHERE domain = '".$app->db->quote($_POST["email_domain"])."' AND ".$app->tform->getAuthSQL('r')); |
| | | if($domain["domain"] != $_POST["email_domain"]) $app->tform->errorMessage .= $app->tform->wordbook["no_domain_perm"]; |
| | | |
| | | // if its an insert |
| | | if($this->id == 0) { |
| | | |
| | | // if its an insert, check that the password is not empty |
| | | if($this->id == 0 && $_POST["password"] == '') { |
| | | $app->tform->errorMessage .= $app->tform->wordbook["error_no_pwd"]."<br>"; |
| | | } |
| | | |
| | | // Ccheck the client limits, if user is not the admin |
| | | if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin |
| | | // Get the limits of the client |
| | | $client_group_id = $_SESSION["s"]["user"]["default_group"]; |
| | | $client = $app->db->queryOneRecord("SELECT limit_mailbox, limit_mailquota FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id"); |
| | | |
| | | // check for password |
| | | if($_POST["password"] == '') { |
| | | $app->tform->errorMessage .= $app->tform->wordbook["error_no_pwd"]."<br>"; |
| | | } |
| | | |
| | | |
| | | // Check if the user may add another mailbox. |
| | | if($client["limit_mailbox"] >= 0) { |
| | | if($this->id == 0 && $client["limit_mailbox"] >= 0) { |
| | | $tmp = $app->db->queryOneRecord("SELECT count(mailuser_id) as number FROM mail_user WHERE sys_groupid = $client_group_id"); |
| | | if($tmp["number"] >= $client["limit_mailbox"]) { |
| | | $app->tform->errorMessage .= $app->tform->wordbook["limit_mailbox_txt"]."<br>"; |
| | | } |
| | | unset($tmp); |
| | | } |
| | | } // end if insert |
| | | |
| | | // Check the quota and adjust |
| | | if($client["limit_mailquota"] >= 0) { |
| | | $tmp = $app->db->queryOneRecord("SELECT sum(quota) as mailquota FROM mail_user WHERE mailuser_id != ".intval($this->id)." AND sys_groupid = $client_group_id"); |
| | | $mailquota = $tmp["mailquota"] / 1024; |
| | | $new_mailbox_quota = intval($this->dataRecord["quota"]); |
| | | if($mailquota + $new_mailbox_quota > $client["limit_mailquota"]) { |
| | | $max_free_quota = $client["limit_mailquota"] - $mailquota; |
| | | $app->tform->errorMessage .= $app->tform->wordbook["limit_mailquota_txt"].": ".$max_free_quota."<br>"; |
| | | // Set the quota field to the max free space |
| | | $this->dataRecord["quota"] = $max_free_quota; |
| | | |
| | | // Check the quota and adjust |
| | | if($client["limit_mailquota"] >= 0) { |
| | | $tmp = $app->db->queryOneRecord("SELECT sum(quota) as mailquota FROM mail_user WHERE mailuser_id != ".intval($this->id)." AND sys_groupid = $client_group_id"); |
| | | $mailquota = $tmp["mailquota"] / 1024; |
| | | $new_mailbox_quota = intval($this->dataRecord["quota"]); |
| | | if($mailquota + $new_mailbox_quota > $client["limit_mailquota"]) { |
| | | $max_free_quota = $client["limit_mailquota"] - $mailquota; |
| | | $app->tform->errorMessage .= $app->tform->wordbook["limit_mailquota_txt"].": ".$max_free_quota."<br>"; |
| | | // Set the quota field to the max free space |
| | | $this->dataRecord["quota"] = $max_free_quota; |
| | | } |
| | | unset($tmp); |
| | | unset($tmp_quota); |
| | | } |
| | | unset($tmp); |
| | | unset($tmp_quota); |
| | | } |
| | | } // end if user is not admin |
| | | |
| | | |
| | | // compose the email field |
| | |
| | | $app->load('tform_actions'); |
| | | |
| | | class page_action extends tform_actions { |
| | | |
| | | 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 = $_SESSION["s"]["user"]["default_group"]; |
| | | $client = $app->db->queryOneRecord("SELECT limit_mailfilter 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 mailbox. |
| | | if($client["limit_mailfilter"] >= 0) { |
| | | $tmp = $app->db->queryOneRecord("SELECT count(access_id) as number FROM mail_access WHERE sys_groupid = $client_group_id"); |
| | | if($tmp["number"] >= $client["limit_mailfilter"]) { |
| | | $app->error($app->tform->wordbook["limit_mailfilter_txt"]); |
| | | } |
| | | } |
| | | } |
| | | |
| | | parent::onShowNew(); |
| | | } |
| | | |
| | | function onSubmit() { |
| | | global $app, $conf; |
| | | |
| | | // Check the client limits, if user is not the admin |
| | | if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin |
| | | // Get the limits of the client |
| | | $client_group_id = $_SESSION["s"]["user"]["default_group"]; |
| | | $client = $app->db->queryOneRecord("SELECT limit_mailfilter 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 mailbox. |
| | | if($this->id == 0 && $client["limit_mailfilter"] >= 0) { |
| | | $tmp = $app->db->queryOneRecord("SELECT count(access_id) as number FROM mail_access WHERE sys_groupid = $client_group_id"); |
| | | if($tmp["number"] >= $client["limit_mailfilter"]) { |
| | | $app->tform->errorMessage .= $app->tform->wordbook["limit_mailfilter_txt"]."<br>"; |
| | | } |
| | | unset($tmp); |
| | | } |
| | | } // end if user is not admin |
| | | |
| | | parent::onSubmit(); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | $app->load('tform_actions'); |
| | | |
| | | class page_action extends tform_actions { |
| | | 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 = $_SESSION["s"]["user"]["default_group"]; |
| | | $client = $app->db->queryOneRecord("SELECT limit_spamfilter_wblist 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 mailbox. |
| | | if($client["limit_limit_spamfilter_wblist"] >= 0) { |
| | | $tmp = $app->db->queryOneRecord("SELECT count(wblist_id) as number FROM spamfilter_wblist WHERE sys_groupid = $client_group_id"); |
| | | if($tmp["number"] >= $client["limit_spamfilter_wblist"]) { |
| | | $app->error($app->tform->wordbook["limit_spamfilter_wblist_txt"]); |
| | | } |
| | | } |
| | | } |
| | | |
| | | parent::onShowNew(); |
| | | } |
| | | |
| | | function onSubmit() { |
| | | global $app, $conf; |
| | | |
| | | // Check the client limits, if user is not the admin |
| | | if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin |
| | | // Get the limits of the client |
| | | $client_group_id = $_SESSION["s"]["user"]["default_group"]; |
| | | $client = $app->db->queryOneRecord("SELECT limit_spamfilter_wblist 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 mailbox. |
| | | if($this->id == 0 && $client["limit_spamfilter_wblist"] >= 0) { |
| | | $tmp = $app->db->queryOneRecord("SELECT count(wblist_id) as number FROM spamfilter_wblist WHERE sys_groupid = $client_group_id"); |
| | | if($tmp["number"] >= $client["limit_spamfilter_wblist"]) { |
| | | $app->tform->errorMessage .= $app->tform->wordbook["limit_spamfilter_wblist_txt"]."<br>"; |
| | | } |
| | | unset($tmp); |
| | | } |
| | | } // end if user is not admin |
| | | |
| | | parent::onSubmit(); |
| | | } |
| | | } |
| | | |
| | | $app->tform_actions = new page_action; |
| | |
| | | $app->load('tform_actions'); |
| | | |
| | | class page_action extends tform_actions { |
| | | 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 = $_SESSION["s"]["user"]["default_group"]; |
| | | $client = $app->db->queryOneRecord("SELECT limit_spamfilter_policy 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 mailbox. |
| | | if($client["limit_limit_spamfilter_policy"] >= 0) { |
| | | $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM spamfilter_policy WHERE sys_groupid = $client_group_id"); |
| | | if($tmp["number"] >= $client["limit_spamfilter_policy"]) { |
| | | $app->error($app->tform->wordbook["limit_spamfilter_policy_txt"]); |
| | | } |
| | | } |
| | | } |
| | | |
| | | parent::onShowNew(); |
| | | } |
| | | |
| | | function onSubmit() { |
| | | global $app, $conf; |
| | | |
| | | // Check the client limits, if user is not the admin |
| | | if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin |
| | | // Get the limits of the client |
| | | $client_group_id = $_SESSION["s"]["user"]["default_group"]; |
| | | $client = $app->db->queryOneRecord("SELECT limit_spamfilter_policy 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 mailbox. |
| | | if($this->id == 0 && $client["limit_spamfilter_policy"] >= 0) { |
| | | $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM spamfilter_policy WHERE sys_groupid = $client_group_id"); |
| | | if($tmp["number"] >= $client["limit_spamfilter_policy"]) { |
| | | $app->tform->errorMessage .= $app->tform->wordbook["limit_spamfilter_policy_txt"]."<br>"; |
| | | } |
| | | unset($tmp); |
| | | } |
| | | } // end if user is not admin |
| | | |
| | | parent::onSubmit(); |
| | | } |
| | | } |
| | | |
| | | $app->tform_actions = new page_action; |
| | |
| | | $app->load('tform_actions'); |
| | | |
| | | class page_action extends tform_actions { |
| | | 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 = $_SESSION["s"]["user"]["default_group"]; |
| | | $client = $app->db->queryOneRecord("SELECT limit_spamfilter_user 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 mailbox. |
| | | if($client["limit_limit_spamfilter_user"] >= 0) { |
| | | $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM spamfilter_users WHERE sys_groupid = $client_group_id"); |
| | | if($tmp["number"] >= $client["limit_spamfilter_user"]) { |
| | | $app->error($app->tform->wordbook["limit_spamfilter_user_txt"]); |
| | | } |
| | | } |
| | | } |
| | | |
| | | parent::onShowNew(); |
| | | } |
| | | |
| | | function onSubmit() { |
| | | global $app, $conf; |
| | | |
| | | // Check the client limits, if user is not the admin |
| | | if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin |
| | | // Get the limits of the client |
| | | $client_group_id = $_SESSION["s"]["user"]["default_group"]; |
| | | $client = $app->db->queryOneRecord("SELECT limit_spamfilter_user 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 mailbox. |
| | | if($this->id == 0 && $client["limit_spamfilter_user"] >= 0) { |
| | | $tmp = $app->db->queryOneRecord("SELECT count(id) as number FROM spamfilter_users WHERE sys_groupid = $client_group_id"); |
| | | if($tmp["number"] >= $client["limit_spamfilter_user"]) { |
| | | $app->tform->errorMessage .= $app->tform->wordbook["limit_spamfilter_user_txt"]."<br>"; |
| | | } |
| | | unset($tmp); |
| | | } |
| | | } // end if user is not admin |
| | | |
| | | parent::onSubmit(); |
| | | } |
| | | } |
| | | |
| | | $app->tform_actions = new page_action; |
| | |
| | | $app->load('tform_actions'); |
| | | |
| | | class page_action extends tform_actions { |
| | | 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 = $_SESSION["s"]["user"]["default_group"]; |
| | | $client = $app->db->queryOneRecord("SELECT limit_spamfilter_wblist 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 mailbox. |
| | | if($client["limit_limit_spamfilter_wblist"] >= 0) { |
| | | $tmp = $app->db->queryOneRecord("SELECT count(wblist_id) as number FROM spamfilter_wblist WHERE sys_groupid = $client_group_id"); |
| | | if($tmp["number"] >= $client["limit_spamfilter_wblist"]) { |
| | | $app->error($app->tform->wordbook["limit_spamfilter_wblist_txt"]); |
| | | } |
| | | } |
| | | } |
| | | |
| | | parent::onShowNew(); |
| | | } |
| | | |
| | | function onSubmit() { |
| | | global $app, $conf; |
| | | |
| | | // Check the client limits, if user is not the admin |
| | | if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin |
| | | // Get the limits of the client |
| | | $client_group_id = $_SESSION["s"]["user"]["default_group"]; |
| | | $client = $app->db->queryOneRecord("SELECT limit_spamfilter_wblist 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 mailbox. |
| | | if($this->id == 0 && $client["limit_spamfilter_wblist"] >= 0) { |
| | | $tmp = $app->db->queryOneRecord("SELECT count(wblist_id) as number FROM spamfilter_wblist WHERE sys_groupid = $client_group_id"); |
| | | if($tmp["number"] >= $client["limit_spamfilter_wblist"]) { |
| | | $app->tform->errorMessage .= $app->tform->wordbook["limit_spamfilter_wblist_txt"]."<br>"; |
| | | } |
| | | unset($tmp); |
| | | } |
| | | } // end if user is not admin |
| | | |
| | | parent::onSubmit(); |
| | | } |
| | | } |
| | | |
| | | $app->tform_actions = new page_action; |
| | |
| | | <td class="frmText11"><a href="#" onClick="loadContent('mail/mail_domain_edit.php?id={tmpl_var name='id'}');" class="frmText11">{tmpl_var name="active"}</a></td> |
| | | <td class="frmText11"><a href="#" onClick="loadContent('mail/mail_domain_edit.php?id={tmpl_var name='id'}');" class="frmText11">{tmpl_var name="server_id"}</a></td> |
| | | <td class="frmText11"><a href="#" onClick="loadContent('mail/mail_domain_edit.php?id={tmpl_var name='id'}');" class="frmText11">{tmpl_var name="domain"}</a></td> |
| | | <td class="frmText11" align="right">[<a href="javascript: del_record('mail_domain_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}');" class="frmText11">{tmpl_var name='delete_txt'}</a>]</td> |
| | | <td class="frmText11" align="right">[<a href="javascript: del_record('mail/mail_domain_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}');" class="frmText11">{tmpl_var name='delete_txt'}</a>]</td> |
| | | </tr> |
| | | </tmpl_loop> |
| | | <tr> |