| | |
| | | ALTER TABLE `server` ADD COLUMN `xmpp_server` tinyint(1) NOT NULL default '0' AFTER `firewall_server`; |
| | | |
| | | ALTER TABLE `client` |
| | | ADD COLUMN `default_xmppserver` int(11) unsigned NOT NULL DEFAULT '1', |
| | | ADD COLUMN `xmpp_servers` blob, |
| | | ADD COLUMN `limit_xmpp_domain` int(11) NOT NULL DEFAULT '-1', |
| | | ADD COLUMN `limit_xmpp_user` int(11) NOT NULL DEFAULT '-1', |
| | | ADD COLUMN `limit_xmpp_muc` ENUM( 'n', 'y' ) NOT NULL default 'n', |
| | |
| | | `limit_spamfilter_wblist` int(11) NOT NULL DEFAULT '0', |
| | | `limit_spamfilter_user` int(11) NOT NULL DEFAULT '0', |
| | | `limit_spamfilter_policy` int(11) NOT NULL DEFAULT '0', |
| | | `default_xmppserver` int(11) unsigned NOT NULL DEFAULT '1', |
| | | `xmpp_servers` blob, |
| | | `limit_xmpp_domain` int(11) NOT NULL DEFAULT '-1', |
| | | `limit_xmpp_user` int(11) NOT NULL DEFAULT '-1', |
| | | `limit_xmpp_muc` ENUM( 'n', 'y' ) NOT NULL default 'n', |
| | |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | 'default_xmppserver' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'SELECT', |
| | | 'default' => '1', |
| | | 'datasource' => array ( 'type' => 'CUSTOM', |
| | | 'class'=> 'custom_datasource', |
| | | 'function'=> 'client_servers' |
| | | ), |
| | | 'value' => '', |
| | | 'name' => 'default_xmppserver' |
| | | ), |
| | | 'xmpp_servers' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'MULTIPLE', |
| | |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | 'default_xmppserver' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'SELECT', |
| | | 'default' => '1', |
| | | 'datasource' => array ( 'type' => 'CUSTOM', |
| | | 'class'=> 'custom_datasource', |
| | | 'function'=> 'client_servers' |
| | | ), |
| | | 'value' => '', |
| | | 'name' => 'default_xmppserver' |
| | | ), |
| | | 'xmpp_servers' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'MULTIPLE', |
| | | 'separator' => ',', |
| | | 'default' => '1', |
| | | 'datasource' => array ( 'type' => 'CUSTOM', |
| | | 'class'=> 'custom_datasource', |
| | | 'function'=> 'client_servers' |
| | | ), |
| | | 'validators' => array ( |
| | | 0 => array ( 'type' => 'CUSTOM', |
| | | 'class' => 'validate_client', |
| | | 'function' => 'check_used_servers', |
| | | 'errmsg'=> 'xmpp_servers_used'), |
| | | ), |
| | | 'value' => '', |
| | | 'name' => 'xmpp_servers' |
| | | ), |
| | | 'limit_xmpp_domain' => array( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array ( 0 => array ( 'type' => 'ISINT', |
| | | 'errmsg'=> 'limit_xmpp_domain_error_notint'), |
| | | ), |
| | | 'default' => '-1', |
| | | 'value' => '', |
| | | 'separator' => '', |
| | | 'width' => '10', |
| | | 'maxlength' => '10', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | 'limit_xmpp_user' => array( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array ( 0 => array ( 'type' => 'ISINT', |
| | | 'errmsg'=> 'limit_xmpp_user_error_notint'), |
| | | ), |
| | | 'default' => '-1', |
| | | 'value' => '', |
| | | 'separator' => '', |
| | | 'width' => '10', |
| | | 'maxlength' => '10', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | 'limit_xmpp_muc' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'limit_xmpp_anon' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'limit_xmpp_vjud' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'limit_xmpp_proxy' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'limit_xmpp_status' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'limit_xmpp_pastebin' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'limit_xmpp_httparchive' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'default_webserver' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'SELECT', |
| | |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | 'default_xmppserver' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'SELECT', |
| | | 'default' => '1', |
| | | 'datasource' => array ( 'type' => 'CUSTOM', |
| | | 'class'=> 'custom_datasource', |
| | | 'function'=> 'client_servers' |
| | | ), |
| | | 'value' => '', |
| | | 'name' => 'default_xmppserver' |
| | | ), |
| | | 'xmpp_servers' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'MULTIPLE', |
| | | 'separator' => ',', |
| | | 'default' => '1', |
| | | 'datasource' => array ( 'type' => 'CUSTOM', |
| | | 'class'=> 'custom_datasource', |
| | | 'function'=> 'client_servers' |
| | | ), |
| | | 'validators' => array ( |
| | | 0 => array ( 'type' => 'CUSTOM', |
| | | 'class' => 'validate_client', |
| | | 'function' => 'check_used_servers', |
| | | 'errmsg'=> 'xmpp_servers_used'), |
| | | ), |
| | | 'value' => '', |
| | | 'name' => 'xmpp_servers' |
| | | ), |
| | | 'limit_xmpp_domain' => array( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array ( 0 => array ( 'type' => 'ISINT', |
| | | 'errmsg'=> 'limit_xmpp_domain_error_notint'), |
| | | ), |
| | | 'default' => '-1', |
| | | 'value' => '', |
| | | 'separator' => '', |
| | | 'width' => '10', |
| | | 'maxlength' => '10', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | 'limit_xmpp_user' => array( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'TEXT', |
| | | 'validators' => array ( 0 => array ( 'type' => 'ISINT', |
| | | 'errmsg'=> 'limit_xmpp_user_error_notint'), |
| | | ), |
| | | 'default' => '-1', |
| | | 'value' => '', |
| | | 'separator' => '', |
| | | 'width' => '10', |
| | | 'maxlength' => '10', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | 'limit_xmpp_muc' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'limit_xmpp_anon' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'limit_xmpp_vjud' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'limit_xmpp_proxy' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'limit_xmpp_status' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'limit_xmpp_pastebin' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'limit_xmpp_httparchive' => array( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'default_webserver' => array ( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'SELECT', |
| | |
| | | $wb['client_limits_txt'] = 'Client Limits'; |
| | | $wb['limit_database_quota_txt'] = 'Database quota'; |
| | | $wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.'; |
| | | |
| | | $wb["xmpp_limits_txt"] = 'XMPP Limits'; |
| | | $wb["xmpp_servers_txt"] = 'XMPP Servers'; |
| | | $wb["xmpp_servers_placeholder"] = 'Select XMPP Servers'; |
| | | $wb['no_xmpp_server_error'] = 'At least one XMPP Server must be selected.'; |
| | | $wb['xmpp_servers_used'] = 'The server you are trying to remove from this client is used as a XMPP Server. Be sure that this server is not used by this client before you remove it.'; |
| | | $wb['limit_xmpp_domain_error_notint'] = 'The XMPP domain limit must be a number.'; |
| | | $wb['limit_xmpp_user_error_notint'] = 'The XMPP user limit must be a number.'; |
| | | $wb['limit_xmpp_domain_txt'] = 'Max. number of XMPP domains'; |
| | | $wb['limit_xmpp_user_txt'] = 'Max. number of XMPP accounts'; |
| | | $wb['limit_xmpp_muc_txt'] = 'Multiuser chat available'; |
| | | $wb['limit_xmpp_pastebin_txt'] = 'Pastebin for MUC available'; |
| | | $wb['limit_xmpp_httparchive_txt'] = 'HTTP archive for MUC available'; |
| | | $wb['limit_xmpp_anon_txt'] = 'Anonymous host available'; |
| | | $wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available'; |
| | | $wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available'; |
| | | $wb['limit_xmpp_status_txt'] = 'Status host available'; |
| | | ?> |
| | |
| | | $wb['customer_no_template_error_regex_txt'] = 'The customer No. template contains invalid characters'; |
| | | $wb['customer_no_start_txt'] = 'Customer No. start value'; |
| | | $wb['customer_no_counter_txt'] = 'Customer No. counter'; |
| | | |
| | | $wb["xmpp_limits_txt"] = 'XMPP Limits'; |
| | | $wb["xmpp_servers_txt"] = 'XMPP Servers'; |
| | | $wb["xmpp_servers_placeholder"] = 'Select XMPP Servers'; |
| | | $wb['no_xmpp_server_error'] = 'At least one XMPP Server must be selected.'; |
| | | $wb['xmpp_servers_used'] = 'The server you are trying to remove from this client is used as a XMPP Server. Be sure that this server is not used by this client before you remove it.'; |
| | | $wb['limit_xmpp_domain_error_notint'] = 'The XMPP domain limit must be a number.'; |
| | | $wb['limit_xmpp_user_error_notint'] = 'The XMPP user limit must be a number.'; |
| | | $wb['limit_xmpp_domain_txt'] = 'Max. number of XMPP domains'; |
| | | $wb['limit_xmpp_user_txt'] = 'Max. number of XMPP accounts'; |
| | | $wb['limit_xmpp_muc_txt'] = 'Multiuser chat available'; |
| | | $wb['limit_xmpp_pastebin_txt'] = 'Pastebin for MUC available'; |
| | | $wb['limit_xmpp_httparchive_txt'] = 'HTTP archive for MUC available'; |
| | | $wb['limit_xmpp_anon_txt'] = 'Anonymous host available'; |
| | | $wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available'; |
| | | $wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available'; |
| | | $wb['limit_xmpp_status_txt'] = 'Status host available'; |
| | | |
| | | $wb['added_by_txt'] = 'Added by'; |
| | | $wb['added_date_txt'] = 'Added date'; |
| | | $wb['limit_domainmodule_error_notint'] = 'Domainmodule limit must be a number.'; |
| | |
| | | </div> |
| | | <div class="form-group"> |
| | | <label for="limit_xmpp_domain" class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_domain_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_web_domain" id="limit_xmpp_domain" value="{tmpl_var name='limit_xmpp_domain'}" class="form-control" /></div></div> |
| | | <div class="col-sm-9"><input type="text" name="limit_xmpp_domain" id="limit_xmpp_domain" value="{tmpl_var name='limit_xmpp_domain'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="limit_xmpp_user" class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_user_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_web_domain" id="limit_xmpp_user" value="{tmpl_var name='limit_xmpp_user'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <div class="col-sm-9"><input type="text" name="limit_xmpp_user" id="limit_xmpp_user" value="{tmpl_var name='limit_xmpp_user'}" class="form-control" /></div></div> |
| | | <!--<div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='xmpp_auth_options_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='xmpp_auth_options'} |
| | | </div> |
| | | </div> |
| | | </div>--> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_muc_txt'}</label> |
| | | <div class="col-sm-9"> |
| | |
| | | <label for="limit_spamfilter_policy" class="col-sm-3 control-label">{tmpl_var name='limit_spamfilter_policy_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_spamfilter_policy" id="limit_spamfilter_policy" value="{tmpl_var name='limit_spamfilter_policy'}" class="form-control" /></div></div> |
| | | </div> |
| | | |
| | | <div class="col-sm-3"></div><div class="col-sm-9"><button class="btn btn-default formbutton-default" type="button" data-toggle="collapse" data-target="#toggle-xmpp_limits" aria-expanded="false" aria-controls="toggle-xmpp_limits">{tmpl_var name='xmpp_limits_txt'}</button></div> |
| | | <div id="toggle-xmpp_limits" class="collapse"> |
| | | <div class="form-group"> |
| | | <label for="xmpp_servers" class="col-sm-3 control-label">{tmpl_var name='xmpp_servers_txt'}</label> |
| | | <div class="col-sm-9"><select data-placeholder="{tmpl_var name='xmpp_servers_placeholder'}" multiple name="xmpp_servers[]" id="xmpp_servers" class="form-control"> |
| | | {tmpl_var name='xmpp_servers'} |
| | | </select></div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label for="limit_xmpp_domain" class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_domain_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_xmpp_domain" id="limit_xmpp_domain" value="{tmpl_var name='limit_xmpp_domain'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="limit_xmpp_user" class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_user_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_xmpp_user" id="limit_xmpp_user" value="{tmpl_var name='limit_xmpp_user'}" class="form-control" /></div></div> |
| | | <!--<div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='xmpp_auth_options_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='xmpp_auth_options'} |
| | | </div> |
| | | </div>--> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_muc_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='limit_xmpp_muc'} |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_pastebin_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='limit_xmpp_pastebin'} |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_httparchive_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='limit_xmpp_httparchive'} |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_anon_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='limit_xmpp_anon'} |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_vjud_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='limit_xmpp_vjud'} |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_proxy_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='limit_xmpp_proxy'} |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_status_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='limit_xmpp_status'} |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="col-sm-3"></div><div class="col-sm-9"><button class="btn btn-default formbutton-default" type="button" data-toggle="collapse" data-target="#toggle-database_limits" aria-expanded="false" aria-controls="toggle-database_limits">{tmpl_var name='database_limits_txt'}</button></div> |
| | | <div id="toggle-database_limits" class="collapse"> |
| | | <div class="form-group"> |
| | |
| | | <label for="limit_spamfilter_policy" class="col-sm-3 control-label">{tmpl_var name='limit_spamfilter_policy_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_spamfilter_policy" id="limit_spamfilter_policy" value="{tmpl_var name='limit_spamfilter_policy'}" class="form-control" /></div></div> |
| | | </div> |
| | | <div class="col-sm-3"></div><div class="col-sm-9"><button class="btn btn-default formbutton-default" type="button" data-toggle="collapse" data-target="#toggle-xmpp_limits" aria-expanded="false" aria-controls="toggle-xmpp_limits">{tmpl_var name='xmpp_limits_txt'}</button></div> |
| | | <div id="toggle-xmpp_limits" class="collapse"> |
| | | <div class="form-group"> |
| | | <label for="xmpp_servers" class="col-sm-3 control-label">{tmpl_var name='xmpp_servers_txt'}</label> |
| | | <div class="col-sm-9"><select data-placeholder="{tmpl_var name='xmpp_servers_placeholder'}" multiple name="xmpp_servers[]" id="xmpp_servers" class="form-control"> |
| | | {tmpl_var name='xmpp_servers'} |
| | | </select></div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label for="limit_xmpp_domain" class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_domain_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_xmpp_domain" id="limit_xmpp_domain" value="{tmpl_var name='limit_xmpp_domain'}" class="form-control" /></div></div> |
| | | <div class="form-group"> |
| | | <label for="limit_xmpp_user" class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_user_txt'}</label> |
| | | <div class="col-sm-9"><input type="text" name="limit_xmpp_user" id="limit_xmpp_user" value="{tmpl_var name='limit_xmpp_user'}" class="form-control" /></div></div> |
| | | <!--<div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='xmpp_auth_options_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='xmpp_auth_options'} |
| | | </div> |
| | | </div>--> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_muc_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='limit_xmpp_muc'} |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_pastebin_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='limit_xmpp_pastebin'} |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_httparchive_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='limit_xmpp_httparchive'} |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_anon_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='limit_xmpp_anon'} |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_vjud_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='limit_xmpp_vjud'} |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_proxy_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='limit_xmpp_proxy'} |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='limit_xmpp_status_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='limit_xmpp_status'} |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="col-sm-3"></div><div class="col-sm-9"><button class="btn btn-default formbutton-default" type="button" data-toggle="collapse" data-target="#toggle-database_limits" aria-expanded="false" aria-controls="toggle-database_limits">{tmpl_var name='database_limits_txt'}</button></div> |
| | | <div id="toggle-database_limits" class="collapse"> |
| | | <div class="form-group"> |
| | |
| | | class page_action extends tform_actions { |
| | | |
| | | function onBeforeDelete() { |
| | | global $app; $conf; |
| | | global $app, $conf; |
| | | |
| | | $domain = $this->dataRecord['domain']; |
| | | |
| | | // Before we delete the email domain, |
| | | // we will delete all depending records. |
| | | // TODO: Delete xmpp accounts in filesystem |
| | | // TODO: Delete xmpp accounts in isp |
| | | // TODO: Delete DNS Records |
| | | /* |
| | | // Delete all forwardings where the source or destination belongs to this domain |
| | | $records = $app->db->queryAllRecords("SELECT forwarding_id as id FROM mail_forwarding WHERE source like '%@".$app->db->quote($domain)."' OR (destination like '%@".$app->db->quote($domain)."' AND type != 'forward')"); |
| | | foreach($records as $rec) { |
| | | $app->db->datalogDelete('mail_forwarding', 'forwarding_id', $rec['id']); |
| | | } |
| | | |
| | | // Delete all fetchmail accounts where destination belongs to this domain |
| | | $records = $app->db->queryAllRecords("SELECT mailget_id as id FROM mail_get WHERE destination like '%@".$app->db->quote($domain)."'"); |
| | | foreach($records as $rec) { |
| | | $app->db->datalogDelete('mail_get', 'mailget_id', $rec['id']); |
| | | } |
| | | |
| | | // Delete all mailboxes where destination belongs to this domain |
| | | $records = $app->db->queryAllRecords("SELECT mailuser_id as id FROM mail_user WHERE email like '%@".$app->db->quote($domain)."'"); |
| | | foreach($records as $rec) { |
| | | $app->db->datalogDelete('mail_user', 'mailuser_id', $rec['id']); |
| | | } |
| | | |
| | | // Delete all spamfilters that belong to this domain |
| | | $records = $app->db->queryAllRecords("SELECT id FROM spamfilter_users WHERE email = '%@".$app->db->quote($domain)."'"); |
| | | foreach($records as $rec) { |
| | | $app->db->datalogDelete('spamfilter_users', 'id', $rec['id']); |
| | | } |
| | | |
| | | // Delete all mailinglists that belong to this domain |
| | | $records = $app->db->queryAllRecords("SELECT mailinglist_id FROM mail_mailinglist WHERE domain = '".$app->db->quote($domain)."'"); |
| | | foreach($records as $rec) { |
| | | $app->db->datalogDelete('mail_mailinglist', 'mailinglist_id', $rec['id']); |
| | | } |
| | | */ |
| | | $this->delete_accounts($domain); |
| | | // and DNS entries |
| | | $soa = $app->db->queryOneRecord("SELECT id AS zone, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other, server_id, ttl, serial FROM dns_soa WHERE active = 'Y' AND origin = ?", $domain.'.'); |
| | | if ( isset($soa) && !empty($soa) ) $this->remove_dns($soa); |
| | | } |
| | | |
| | | private function delete_accounts($domain){ |
| | | global $app; |
| | | // get all accounts |
| | | $sql = "SELECT * FROM xmpp_user WHERE jid LIKE ? AND ?"; |
| | | $users = $app->db->queryAllRecords($sql, '%@'.$domain, $app->tform->getAuthSQL('d')); |
| | | foreach($users AS $u) |
| | | $app->db->datalogDelete('xmpp_user', 'xmppuser_id', $u['xmppuser_id']); |
| | | } |
| | | |
| | | private function remove_dns($new_rr) { |
| | | global $app; |
| | | |
| | | // purge all xmpp related rr-record |
| | | $sql = "SELECT * FROM dns_rr WHERE zone = ? AND (name IN ? AND type = 'CNAME' OR name LIKE ? AND type = 'SRV') AND ? ORDER BY serial DESC"; |
| | | $rec = $app->db->queryAllRecords($sql, $new_rr['zone'], array('xmpp', 'pubsub', 'proxy', 'anon', 'vjud', 'muc'), '_xmpp-%', $app->tform->getAuthSQL('r')); |
| | | if (is_array($rec[1])) { |
| | | for ($i=0; $i < count($rec); ++$i) |
| | | $app->db->datalogDelete('dns_rr', 'id', $rec[$i]['id']); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | $page = new page_action; |
| | |
| | | if(isset($this->dataRecord["domain"])) $this->dataRecord["domain"] = strtolower($this->dataRecord["domain"]); |
| | | |
| | | // create new accounts from mail domain |
| | | if($this->dataRecord['management_method']=='maildomain') |
| | | $this->syncMailusers($this->dataRecord['domain']); |
| | | //if($this->dataRecord['management_method']=='maildomain') |
| | | // $this->syncMailusers($this->dataRecord['domain']); |
| | | |
| | | // Insert DNS Records |
| | | $soa = $app->db->queryOneRecord("SELECT id AS zone, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other, server_id, ttl, serial FROM dns_soa WHERE active = 'Y' AND origin = ?", $this->dataRecord['domain'].'.'); |
| | |
| | | global $app, $conf; |
| | | |
| | | // create new accounts from mail domain |
| | | if($this->oldDataRecord['management_method'] != 'maildomain' && $this->dataRecord['management_method']=='maildomain') |
| | | $this->syncMailusers($this->dataRecord['domain']); |
| | | //if($this->oldDataRecord['management_method'] != 'maildomain' && $this->dataRecord['management_method']=='maildomain') |
| | | // $this->syncMailusers($this->dataRecord['domain']); |
| | | // or reset to normal permissions |
| | | elseif($this->oldDataRecord['management_method'] == 'maildomain' && $this->dataRecord['management_method']!='maildomain') |
| | | $this->desyncMailusers($this->dataRecord['domain']); |
| | | //elseif($this->oldDataRecord['management_method'] == 'maildomain' && $this->dataRecord['management_method']!='maildomain') |
| | | // $this->desyncMailusers($this->dataRecord['domain']); |
| | | // Update DNS Records |
| | | // TODO: Update gets only triggered from main form. WHY? |
| | | // TODO: if(in_array($this->_xmpp_type, array('muc', 'modules'))){ |
| | | $soa = $app->db->queryOneRecord("SELECT id AS zone, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other FROM dns_soa WHERE active = 'Y' AND = ?", $this->dataRecord['domain'].'.'); |
| | | if ( isset($soa) && !empty($soa) ) $this->update_dns($this->dataRecord, $soa); |
| | | //} |
| | | $soa = $app->db->queryOneRecord("SELECT id AS zone, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other FROM dns_soa WHERE active = 'Y' AND = ?", $this->dataRecord['domain'].'.'); |
| | | if ( isset($soa) && !empty($soa) ) $this->update_dns($this->dataRecord, $soa); |
| | | } |
| | | |
| | | |
| | |
| | | $app->db->datalogUpdate('dns_soa', "serial = '".$new_serial."'", 'id', $zone['id']); |
| | | } |
| | | |
| | | /* |
| | | * NOT YET FINISHED |
| | | |
| | | private function syncMailusers($domain){ |
| | | global $app, $conf; |
| | |
| | | $app->db->datalogUpdate('xmpp_user', $u, 'xmppuser_id', $u['xmppuser_id']); |
| | | } |
| | | } |
| | | */ |
| | | |
| | | } |
| | | |
| | |
| | | $domain = $jid_parts[1]; |
| | | |
| | | // check if domain is managed through mail domain |
| | | $app->error('blubb'); |
| | | // if yes, manual deletion is not allowed |
| | | //$app->error('blubb'); |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | // load the server configuration options |
| | | $app->uses('getconf,system'); |
| | | $xmpp_config = $app->getconf->get_server_config($conf['server_id'], 'xmpp'); |
| | | |
| | | $daemon = 'metronome'; |
| | | |
| | |
| | | <?php |
| | | |
| | | |
| | | // TODO Plugin bei Installation symlinken in plugins-enabled! |
| | | /* |
| | | Copyright (c) 2007, Till Brehm, projektfarm Gmbh |
| | | Copyright (c) 2015 Michael Fürmann, Spicy Web (spicyweb.de) |
| | | All rights reserved. |
| | | |
| | | Redistribution and use in source and binary forms, with or without modification, |
| | |
| | | |
| | | var $plugin_name = 'xmpp_server_plugin'; |
| | | var $class_name = 'xmpp_server_plugin'; |
| | | |
| | | |
| | | var $xmpp_config_dir = '/etc/metronome'; |
| | | |
| | |
| | | $old_ini_data = $app->ini_parser->parse_ini_string($data['old']['config']); |
| | | $xmpp_config = $app->getconf->get_server_config($conf['server_id'], 'xmpp'); |
| | | |
| | | // Global server config |
| | | $tpl = new tpl(); |
| | | $tpl->newTemplate('metronome_conf_global.master'); |
| | | |
| | | $tpl->setVar('ipv6', $xmpp_config['xmpp_use_ipv6']=='y'?'true':'false'); |
| | | $tpl->setVar('bosh_timeout', intval($xmpp_config['xmpp_bosh_max_inactivity'])); |
| | | $tpl->setVar('port_http', intval($xmpp_config['xmpp_port_http'])); |
| | | $tpl->setVar('port_https', intval($xmpp_config['xmpp_port_https'])); |
| | | $tpl->setVar('port_pastebin', intval($xmpp_config['xmpp_port_pastebin'])); |
| | | $tpl->setVar('port_bosh', intval($xmpp_config['xmpp_port_bosh'])); |
| | | // Global server admins (for all hosted domains) |
| | | $admins = ''; |
| | | foreach(explode(',', $xmpp_config['xmpp_server_admins']) AS $a) |
| | | $admins.= "\t\"".trim($a)."\",\n"; |
| | | $tpl->setVar('server_admins', $admins); |
| | | unset($admins); |
| | | // enabled modules, so own modules or simmilar prosody-modules can easily be added |
| | | $modules = ''; |
| | | foreach(explode(',', $xmpp_config['xmpp_modules_enabled']) AS $m) |
| | | $modules.= "\t\"".trim($m)."\",\n"; |
| | |
| | | $tpl->setVar('domain', $data['new']['domain']); |
| | | $tpl->setVar('active', $data['new']['active'] == 'y' ? 'true' : 'false'); |
| | | $tpl->setVar('public_registration', $data['new']['public_registration'] == 'y' ? 'true' : 'false'); |
| | | |
| | | // Domain admins |
| | | $admins = array(); |
| | | foreach(explode(',',$data['new']['domain_admins']) AS $adm){ |
| | | $admins[] = trim($adm); |
| | | } |
| | | $tpl->setVar('domain_admins', "\t\t\"".implode("\",\n\t\t\"",$admins)."\"\n"); |
| | | |
| | | // Enable / Disable features |
| | | if($data['new']['use_pubsub']=='y'){ |
| | | $tpl->setVar('use_pubsub', 'true'); |
| | | $status_comps[] = 'pubsub.'.$data['new']['domain']; |
| | |
| | | $status_comps[] = 'muc.'.$data['new']['domain']; |
| | | $tpl->setVar('muc_restrict_room_creation', $data['new']['muc_restrict_room_creation']); |
| | | $tpl->setVar('muc_name', strlen($data['new']['muc_name']) ? $data['new']['muc_name'] : $data['new']['domain'].' Chatrooms'); |
| | | // Admins for MUC channels |
| | | $admins = array(); |
| | | foreach(explode(',',$data['new']['muc_admins']) AS $adm){ |
| | | $admins[] = trim($adm); |
| | |
| | | exec('rm -rf /var/lib/metronome/'.$folder); |
| | | exec('rm -rf /var/lib/metronome/*%2e'.$folder); |
| | | |
| | | $app->services->restartServiceDelayed('metronome', 'restart'); |
| | | $app->services->restartServiceDelayed('metronome', 'reload'); |
| | | } |
| | | |
| | | function userInsert($event_name, $data){ |