- Fixed FS#2617 - Limit for APS packages missing in client limits.
1 files added
17 files modified
New file |
| | |
| | | ALTER TABLE `client` CHANGE `limit_aps` `limit_aps` INT( 11 ) NOT NULL DEFAULT '-1'; |
| | |
| | | `limit_shell_user` int(11) NOT NULL DEFAULT '0', |
| | | `ssh_chroot` varchar(255) NOT NULL DEFAULT 'no,jailkit,ssh-chroot', |
| | | `limit_webdav_user` int(11) NOT NULL DEFAULT '0', |
| | | `limit_aps` int(11) NOT NULL DEFAULT '0', |
| | | `limit_aps` int(11) NOT NULL DEFAULT '-1', |
| | | `default_dnsserver` int(11) unsigned NOT NULL DEFAULT '1', |
| | | `limit_dns_zone` int(11) NOT NULL DEFAULT '-1', |
| | | `limit_dns_slave_zone` int(11) NOT NULL DEFAULT '-1', |
| | |
| | | ), |
| | | 'value' => array(0 => ' ') |
| | | ), |
| | | 'limit_aps' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array ( 0 => array ( 'type' => 'ISINT', |
| | | 'errmsg'=> 'limit_aps_error_notint'), |
| | | ), |
| | | 'default' => '-1', |
| | | 'value' => '', |
| | | 'separator' => '', |
| | | 'width' => '10', |
| | | 'maxlength' => '10', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | ################################## |
| | | # END Datatable fields |
| | | ################################## |
| | |
| | | ), |
| | | 'value' => array(0 => ' ') |
| | | ), |
| | | 'limit_aps' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array ( 0 => array ( 'type' => 'ISINT', |
| | | 'errmsg'=> 'limit_aps_error_notint'), |
| | | ), |
| | | 'default' => '-1', |
| | | 'value' => '', |
| | | 'separator' => '', |
| | | 'width' => '10', |
| | | 'maxlength' => '10', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | ################################## |
| | | # END Datatable fields |
| | | ################################## |
| | |
| | | ), |
| | | 'value' => array(0 => ' ') |
| | | ), |
| | | 'limit_aps' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array ( 0 => array ( 'type' => 'ISINT', |
| | | 'errmsg'=> 'limit_aps_error_notint'), |
| | | ), |
| | | 'default' => '-1', |
| | | 'value' => '', |
| | | 'separator' => '', |
| | | 'width' => '10', |
| | | 'maxlength' => '10', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | ################################## |
| | | # END Datatable fields |
| | | ################################## |
| | |
| | | $wb['paypal_email_error_isemail'] = 'Bitte geben Sie eine gültige PayPal E-Mail Adresse an.'; |
| | | $wb['paypal_email_txt'] = 'PayPal E-Mail'; |
| | | $wb['err_msg_master_tpl_set'] = 'Die hier eingestellten Werte werden ignoriert, wenn als Mastervorlage nicht \'Custon\' ausgewählt ist!'; |
| | | $wb['aps_limits_txt'] = 'APS Installationsassistent Limits'; |
| | | $wb['limit_aps_txt'] = 'Max. Anzahl an APS-Instanzen'; |
| | | $wb['limit_aps_error_notint'] = 'Das APS Instanzen Limit muss eine Zahl sein.'; |
| | | ?> |
| | |
| | | $wb['cron_job_limits_txt'] = 'Cronjob Limits'; |
| | | $wb['dns_limits_txt'] = 'DNS Limits'; |
| | | $wb['virtualization_limits_txt'] = 'Virtualisierungs Limits'; |
| | | $wb['aps_limits_txt'] = 'APS Installationsassistent Limits'; |
| | | $wb['limit_aps_txt'] = 'Max. Anzahl an APS-Instanzen'; |
| | | $wb['limit_aps_error_notint'] = 'Das APS Instanzen Limit muss eine Zahl sein.'; |
| | | ?> |
| | |
| | | $wb['bank_name_txt'] = 'Bank'; |
| | | $wb['bank_account_iban_txt'] = 'IBAN'; |
| | | $wb['bank_account_swift_txt'] = 'BIC'; |
| | | $wb['aps_limits_txt'] = 'APS Installationsassistent Limits'; |
| | | $wb['limit_aps_txt'] = 'Max. Anzahl an APS-Instanzen'; |
| | | $wb['limit_aps_error_notint'] = 'Das APS Instanzen Limit muss eine Zahl sein.'; |
| | | ?> |
| | |
| | | $wb['paypal_email_error_isemail'] = 'Please enter a valid PayPal email address.'; |
| | | $wb['paypal_email_txt'] = 'PayPal Email'; |
| | | $wb['err_msg_master_tpl_set'] = 'All custom limit settings are ignored if any master template other than "custom" is selected.'; |
| | | $wb['aps_limits_txt'] = 'APS Installer Limits'; |
| | | $wb['limit_aps_txt'] = 'Max. number of APS instances'; |
| | | $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.'; |
| | | ?> |
| | |
| | | $wb["cron_job_limits_txt"] = 'Cron Job Limits'; |
| | | $wb["dns_limits_txt"] = 'DNS Limits'; |
| | | $wb["virtualization_limits_txt"] = 'Virtualization Limits'; |
| | | $wb['aps_limits_txt'] = 'APS Installer Limits'; |
| | | $wb['limit_aps_txt'] = 'Max. number of APS instances'; |
| | | $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.'; |
| | | ?> |
| | |
| | | $wb["bank_name_txt"] = 'Bank name'; |
| | | $wb["bank_account_iban_txt"] = 'IBAN'; |
| | | $wb["bank_account_swift_txt"] = 'BIC / Swift'; |
| | | $wb['aps_limits_txt'] = 'APS Installer Limits'; |
| | | $wb['limit_aps_txt'] = 'Max. number of APS instances'; |
| | | $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.'; |
| | | ?> |
| | |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="subsectiontoggle"><span></span>{tmpl_var name='aps_limits_txt'}<em></em></div> |
| | | <div style="display:none;"> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_aps">{tmpl_var name='limit_aps_txt'}</label> |
| | | <input name="limit_aps" id="limit_aps" value="{tmpl_var name='limit_aps'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="subsectiontoggle"><span></span>{tmpl_var name='aps_limits_txt'}<em></em></div> |
| | | <div style="display:none;"> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_aps">{tmpl_var name='limit_aps_txt'}</label> |
| | | <input name="limit_aps" id="limit_aps" value="{tmpl_var name='limit_aps'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="subsectiontoggle"><span></span>{tmpl_var name='aps_limits_txt'}<em></em></div> |
| | | <div style="display:none;"> |
| | | <div class="ctrlHolder"> |
| | | <label for="limit_aps">{tmpl_var name='limit_aps_txt'}</label> |
| | | <input name="limit_aps" id="limit_aps" value="{tmpl_var name='limit_aps'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" /> |
| | | </div> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | |
| | | $app->auth->check_module_permissions('sites');
|
| | |
|
| | | // Load needed classes
|
| | | $app->uses('tpl');
|
| | | $app->uses('tpl,tform');
|
| | | $app->tpl->newTemplate("form.tpl.htm");
|
| | | $app->tpl->setInclude('content_tpl', 'templates/aps_install_package.htm');
|
| | |
|
| | |
| | | $app->tpl->setVar($wb);
|
| | | $app->load_language_file('web/sites/'.$lngfile);
|
| | |
|
| | | // we will check only users, not admins
|
| | | if($_SESSION["s"]["user"]["typ"] == 'user') { |
| | | $app->tform->formDef['db_table_idx'] = 'client_id';
|
| | | $app->tform->formDef['db_table'] = 'client';
|
| | | if(!$app->tform->checkClientLimit('limit_aps')) {
|
| | | $app->error($app->lng("limit_aps_txt"));
|
| | | }
|
| | | if(!$app->tform->checkResellerLimit('limit_aps')) {
|
| | | $app->error('Reseller: '.$wb["limit_aps_txt"]);
|
| | | } |
| | | }
|
| | |
|
| | |
|
| | | $adminflag = ($_SESSION['s']['user']['typ'] == 'admin') ? true : false;
|
| | | $gui = new ApsGUIController($app);
|
| | | $pkg_id = (isset($_GET['id'])) ? $app->db->quote($_GET['id']) : '';
|
| | |
| | | $wb['installation_success_txt'] = 'Installiert'; |
| | | $wb['installation_remove_txt'] = 'Deinstallation vorgemerkt'; |
| | | $wb['packagelist_update_finished_txt'] = 'APS Paketlistenupdate beendet.'; |
| | | $wb["limit_aps_txt"] = 'Die maximale Anzahl an APS-Instanzen für Ihr Konto wurde erreicht.'; |
| | | ?> |
| | |
| | | $wb['installation_success_txt'] = 'Installed';
|
| | | $wb['installation_remove_txt'] = 'Removal planned';
|
| | | $wb['packagelist_update_finished_txt'] = 'APS Packagelist update finished.';
|
| | | $wb["limit_aps_txt"] = 'The max. number of APS instances for your account is reached.';
|
| | | ?> |
| | |
| | | } |
| | | |
| | | // APS menu |
| | | if($app->auth->get_client_limit($userid,'aps') != 0) |
| | | { |
| | | $items = array(); |
| | | |
| | | $items[] = array( 'title' => 'Available packages', |
| | |
| | | $module['nav'][] = array( 'title' => 'APS Installer', |
| | | 'open' => 1, |
| | | 'items' => $items); |
| | | |
| | | } |
| | | |
| | | // Statistics menu |
| | | $items = array(); |