- Added Proxy Directives field for nginx if you select redirect type "proxy".
- Added PayPal email address field to client and reseller form.
- Added missing bank details fields to reseller form.
3 files added
31 files modified
New file |
| | |
| | | ALTER TABLE `client` ADD `paypal_email` VARCHAR( 255 ) NULL DEFAULT NULL AFTER `bank_account_swift` ; |
| | | ALTER TABLE `web_domain` ADD `proxy_directives` MEDIUMTEXT NULL DEFAULT NULL ; |
| | | |
| | | |
| | |
| | | `bank_name` varchar(255) DEFAULT NULL, |
| | | `bank_account_iban` varchar(255) DEFAULT NULL, |
| | | `bank_account_swift` varchar(255) DEFAULT NULL, |
| | | `paypal_email` varchar(255) DEFAULT NULL, |
| | | `default_mailserver` int(11) unsigned NOT NULL DEFAULT '1', |
| | | `limit_maildomain` int(11) NOT NULL DEFAULT '-1', |
| | | `limit_mailbox` int(11) NOT NULL DEFAULT '-1', |
| | |
| | | `active` enum('n','y') NOT NULL default 'y', |
| | | `traffic_quota_lock` enum('n','y') NOT NULL default 'n', |
| | | `fastcgi_php_version` varchar(255) DEFAULT NULL, |
| | | `proxy_directives` mediumtext, |
| | | PRIMARY KEY (`domain_id`) |
| | | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; |
| | | |
| | |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'SELECT', |
| | | 'default' => '', |
| | | 'value' => array('apache' => 'Apache','nginx' => 'nginx','php' => 'PHP'), |
| | | 'value' => array('apache' => 'Apache','nginx' => 'nginx','php' => 'PHP','proxy' => 'Proxy'), |
| | | 'searchable' => 2 |
| | | ), |
| | | 'snippet' => array ( |
| | |
| | | 'prefix' => "", |
| | | 'suffix' => "", |
| | | 'width' => "", |
| | | 'value' => array('apache' => 'Apache', 'nginx' => 'nginx', 'php' => 'PHP')); |
| | | 'value' => array('apache' => 'Apache', 'nginx' => 'nginx', 'php' => 'PHP', 'proxy' => 'Proxy')); |
| | | |
| | | ?> |
| | |
| | | 'rows' => '10', |
| | | 'cols' => '30' |
| | | ), |
| | | 'paypal_email' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'filters' => array( 0 => array( 'event' => 'SAVE', |
| | | 'type' => 'IDNTOASCII'), |
| | | 1 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8'), |
| | | 2 => array( 'event' => 'SAVE', |
| | | 'type' => 'TOLOWER') |
| | | ), |
| | | 'validators' => array ( 0 => array ( 'type' => 'REGEX', |
| | | 'regex' => '/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\.[a-z\-]{2,10}){0,1}$/i', |
| | | 'errmsg'=> 'paypal_email_error_isemail'), |
| | | ), |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'separator' => '', |
| | | 'width' => '30', |
| | | 'maxlength' => '255', |
| | | 'rows' => '', |
| | | 'cols' => '', |
| | | 'searchable' => 2 |
| | | ), |
| | | ################################## |
| | | # END Datatable fields |
| | | ################################## |
| | |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | 'company_id' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'separator' => '', |
| | | 'width' => '30', |
| | | 'maxlength' => '20', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | 'bank_account_owner' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'separator' => '', |
| | | 'width' => '30', |
| | | 'maxlength' => '255', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | 'bank_account_number' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'separator' => '', |
| | | 'width' => '30', |
| | | 'maxlength' => '255', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | 'bank_code' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'separator' => '', |
| | | 'width' => '30', |
| | | 'maxlength' => '255', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | 'bank_name' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'separator' => '', |
| | | 'width' => '30', |
| | | 'maxlength' => '255', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | 'bank_account_iban' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'separator' => '', |
| | | 'width' => '30', |
| | | 'maxlength' => '255', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | 'bank_account_swift' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'separator' => '', |
| | | 'width' => '30', |
| | | 'maxlength' => '255', |
| | | 'rows' => '', |
| | | 'cols' => '' |
| | | ), |
| | | 'notes' => array ( |
| | | 'datatype' => 'TEXT', |
| | | 'formtype' => 'TEXTAREA', |
| | |
| | | 'rows' => '10', |
| | | 'cols' => '30' |
| | | ), |
| | | 'paypal_email' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'TEXT', |
| | | 'filters' => array( 0 => array( 'event' => 'SAVE', |
| | | 'type' => 'IDNTOASCII'), |
| | | 1 => array( 'event' => 'SHOW', |
| | | 'type' => 'IDNTOUTF8'), |
| | | 2 => array( 'event' => 'SAVE', |
| | | 'type' => 'TOLOWER') |
| | | ), |
| | | 'validators' => array ( 0 => array ( 'type' => 'REGEX', |
| | | 'regex' => '/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\.[a-z\-]{2,10}){0,1}$/i', |
| | | 'errmsg'=> 'paypal_email_error_isemail'), |
| | | ), |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'separator' => '', |
| | | 'width' => '30', |
| | | 'maxlength' => '255', |
| | | 'rows' => '', |
| | | 'cols' => '', |
| | | 'searchable' => 2 |
| | | ), |
| | | ################################## |
| | | # END Datatable fields |
| | | ################################## |
| | |
| | | $wb['password_mismatch_txt'] = 'Die Passwörter stimmen nicht überein.'; |
| | | $wb['password_match_txt'] = 'Die Passwörter stimmen überein.'; |
| | | $wb['customer_no_error_unique'] = 'Die Kundennummer muß einzigartig sein (oder leer).'; |
| | | $wb['email_error_isemail'] = 'Please enter a valid email address.'; |
| | | $wb['email_error_isemail'] = 'Bitte geben Sie eine gültige Email-Adresse an.'; |
| | | $wb['paypal_email_error_isemail'] = 'Bitte geben Sie eine gültige PayPal-E-Mail-Adresse an.'; |
| | | $wb['paypal_email_txt'] = 'PayPal-E-Mail'; |
| | | ?> |
| | |
| | | $wb['password_match_txt'] = 'Die Passwörter stimmen überein.'; |
| | | $wb['customer_no_error_unique'] = 'Die Kundennummer muß einzigartig sein (oder leer).'; |
| | | $wb['email_error_isemail'] = 'Please enter a valid email address.'; |
| | | $wb['paypal_email_error_isemail'] = 'Bitte geben Sie eine gültige PayPal-E-Mail-Adresse an.'; |
| | | $wb['paypal_email_txt'] = 'PayPal-E-Mail'; |
| | | $wb['company_id_txt'] = 'Firmen/Entrepreneur ID'; |
| | | $wb['bank_account_number_txt'] = 'Kontonummer'; |
| | | $wb['bank_account_owner_txt'] = 'Kontoinhaber'; |
| | | $wb['bank_code_txt'] = 'BLZ'; |
| | | $wb['bank_name_txt'] = 'Bank'; |
| | | $wb['bank_account_iban_txt'] = 'IBAN'; |
| | | $wb['bank_account_swift_txt'] = 'BIC'; |
| | | ?> |
| | |
| | | $wb['password_match_txt'] = 'The passwords do match.'; |
| | | $wb['email_error_isemail'] = 'Please enter a valid email address.'; |
| | | $wb["customer_no_error_unique"] = 'The customer no. must be unique (or empty).'; |
| | | $wb['paypal_email_error_isemail'] = 'Please enter a valid PayPal email address.'; |
| | | $wb['paypal_email_txt'] = 'PayPal Email'; |
| | | ?> |
| | |
| | | $wb['password_match_txt'] = 'The passwords do match.'; |
| | | $wb['email_error_isemail'] = 'Please enter a valid email address.'; |
| | | $wb["customer_no_error_unique"] = 'The customer no. must be unique (or empty).'; |
| | | $wb['paypal_email_error_isemail'] = 'Please enter a valid PayPal email address.'; |
| | | $wb['paypal_email_txt'] = 'PayPal Email'; |
| | | $wb['company_id_txt'] = 'Company/Entrepreneur ID'; |
| | | $wb["bank_account_number_txt"] = 'Bank account no.'; |
| | | $wb["bank_account_owner_txt"] = 'Bank account owner'; |
| | | $wb["bank_code_txt"] = 'Bank code'; |
| | | $wb["bank_name_txt"] = 'Bank name'; |
| | | $wb["bank_account_iban_txt"] = 'IBAN'; |
| | | $wb["bank_account_swift_txt"] = 'BIC / Swift'; |
| | | ?> |
| | |
| | | <label for="bank_account_swift">{tmpl_var name='bank_account_swift_txt'}</label> |
| | | <input name="bank_account_swift" id="bank_account_swift" value="{tmpl_var name='bank_account_swift'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="paypal_email">{tmpl_var name='paypal_email_txt'}</label> |
| | | <input name="paypal_email" id="paypal_email" value="{tmpl_var name='paypal_email'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="notes">{tmpl_var name='notes_txt'}</label> |
| | | <textarea name="notes" id="notes" rows='10' cols='30'>{tmpl_var name='notes'}</textarea> |
| | |
| | | <label for="vat_id">{tmpl_var name='vat_id_txt'}</label> |
| | | <input name="vat_id" id="vat_id" value="{tmpl_var name='vat_id'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="company_id">{tmpl_var name='company_id_txt'}</label> |
| | | <input name="company_id" id="company_id" value="{tmpl_var name='company_id'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="bank_account_owner">{tmpl_var name='bank_account_owner_txt'}</label> |
| | | <input name="bank_account_owner" id="bank_account_owner" value="{tmpl_var name='bank_account_owner'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="bank_account_number">{tmpl_var name='bank_account_number_txt'}</label> |
| | | <input name="bank_account_number" id="bank_account_number" value="{tmpl_var name='bank_account_number'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="bank_code">{tmpl_var name='bank_code_txt'}</label> |
| | | <input name="bank_code" id="bank_code" value="{tmpl_var name='bank_code'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="bank_name">{tmpl_var name='bank_name_txt'}</label> |
| | | <input name="bank_name" id="bank_name" value="{tmpl_var name='bank_name'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="bank_account_iban">{tmpl_var name='bank_account_iban_txt'}</label> |
| | | <input name="bank_account_iban" id="bank_account_iban" value="{tmpl_var name='bank_account_iban'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="bank_account_swift">{tmpl_var name='bank_account_swift_txt'}</label> |
| | | <input name="bank_account_swift" id="bank_account_swift" value="{tmpl_var name='bank_account_swift'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="paypal_email">{tmpl_var name='paypal_email_txt'}</label> |
| | | <input name="paypal_email" id="paypal_email" value="{tmpl_var name='paypal_email'}" size="30" maxlength="255" type="text" class="textInput" /> |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="notes">{tmpl_var name='notes_txt'}</label> |
| | | <textarea name="notes" id="notes" rows='10' cols='30'>{tmpl_var name='notes'}</textarea> |
| | |
| | | $json .= '"}'; |
| | | } |
| | | |
| | | if($type == 'getredirecttype'){ |
| | | $json = '{"redirecttype":"'; |
| | | $sql = "SELECT redirect_type FROM web_domain WHERE domain_id = $web_id"; |
| | | $redirect = $app->db->queryOneRecord($sql); |
| | | $json .= $redirect['redirect_type']; |
| | | unset($redirect); |
| | | $json .= '"}'; |
| | | } |
| | | |
| | | if($type == 'get_ipv4'){ |
| | | $result = array(); |
| | | |
| | |
| | | ) |
| | | ); |
| | | |
| | | if($_SESSION["s"]["user"]["typ"] == 'admin') { |
| | | |
| | | $form["tabs"]['advanced'] = array ( |
| | | 'title' => "Options", |
| | | 'width' => 100, |
| | | 'template' => "templates/web_aliasdomain_advanced.htm", |
| | | 'readonly' => false, |
| | | 'fields' => array ( |
| | | ################################## |
| | | # Begin Datatable fields |
| | | ################################## |
| | | 'proxy_directives' => array ( |
| | | 'datatype' => 'TEXT', |
| | | 'formtype' => 'TEXT', |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'width' => '30', |
| | | 'maxlength' => '255' |
| | | ), |
| | | ################################## |
| | | # ENDE Datatable fields |
| | | ################################## |
| | | ) |
| | | ); |
| | | |
| | | } |
| | | |
| | | |
| | | ?> |
| | |
| | | 'value' => '', |
| | | 'width' => '30', |
| | | 'maxlength' => '255' |
| | | ) |
| | | ), |
| | | 'proxy_directives' => array ( |
| | | 'datatype' => 'TEXT', |
| | | 'formtype' => 'TEXT', |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'width' => '30', |
| | | 'maxlength' => '255' |
| | | ), |
| | | ################################## |
| | | # ENDE Datatable fields |
| | | ################################## |
| | |
| | | ) |
| | | ); |
| | | |
| | | if($_SESSION["s"]["user"]["typ"] == 'admin') { |
| | | |
| | | $form["tabs"]['advanced'] = array ( |
| | | 'title' => "Options", |
| | | 'width' => 100, |
| | | 'template' => "templates/web_subdomain_advanced.htm", |
| | | 'readonly' => false, |
| | | 'fields' => array ( |
| | | ################################## |
| | | # Begin Datatable fields |
| | | ################################## |
| | | 'proxy_directives' => array ( |
| | | 'datatype' => 'TEXT', |
| | | 'formtype' => 'TEXT', |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'width' => '30', |
| | | 'maxlength' => '255' |
| | | ), |
| | | ################################## |
| | | # ENDE Datatable fields |
| | | ################################## |
| | | ) |
| | | ); |
| | | |
| | | } |
| | | |
| | | |
| | | ?> |
| | |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'SELECT', |
| | | 'default' => '', |
| | | 'value' => array('' => 'no_redirect_txt', 'no' => 'no_flag_txt', 'R' => 'R', 'L' => 'L', 'R,L' => 'R,L', 'R=301,L' => 'R=301,L', 'last' => 'last', 'break' => 'break', 'redirect' => 'redirect', 'permanent' => 'permanent') |
| | | 'value' => array('' => 'no_redirect_txt', 'no' => 'no_flag_txt', 'R' => 'R', 'L' => 'L', 'R,L' => 'R,L', 'R=301,L' => 'R=301,L', 'last' => 'last', 'break' => 'break', 'redirect' => 'redirect', 'permanent' => 'permanent', 'proxy' => 'proxy') |
| | | ), |
| | | 'redirect_path' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | |
| | | 'value' => '', |
| | | 'width' => '30', |
| | | 'maxlength' => '255' |
| | | ) |
| | | ), |
| | | 'proxy_directives' => array ( |
| | | 'datatype' => 'TEXT', |
| | | 'formtype' => 'TEXT', |
| | | 'default' => '', |
| | | 'value' => '', |
| | | 'width' => '30', |
| | | 'maxlength' => '255' |
| | | ), |
| | | ################################## |
| | | # ENDE Datatable fields |
| | | ################################## |
| | |
| | | $wb['available_php_directive_snippets_txt'] = 'Verfügbare PHP Direktiven Schnipsel:'; |
| | | $wb['available_apache_directive_snippets_txt'] = 'Verfügbare Apache Direktiven Schnipsel:'; |
| | | $wb['available_nginx_directive_snippets_txt'] = 'Verfügbare nginx Direktiven Schnipsel:'; |
| | | $wb['proxy_directives_txt'] = 'Proxy Direktiven'; |
| | | $wb['available_proxy_directive_snippets_txt'] = 'Verfügbare Proxy Direktiven Schnipsel:'; |
| | | ?> |
| | |
| | | $wb['redirect_error_regex'] = 'Ungültiger redirect Pfad. Gültige Pfade sind beispielsweise: /test/ oder http://www.domain.tld/test/'; |
| | | $wb['no_redirect_txt'] = 'Kein Redirect'; |
| | | $wb['no_flag_txt'] = 'Kein Flag'; |
| | | $wb['proxy_directives_txt'] = 'Proxy Direktiven'; |
| | | $wb['available_proxy_directive_snippets_txt'] = 'Verfügbare Proxy Direktiven Schnipsel:'; |
| | | ?> |
| | |
| | | $wb['repeat_password_txt'] = 'Passwort wiederholen'; |
| | | $wb['password_mismatch_txt'] = 'Die Passwörter stimmen nicht überein.'; |
| | | $wb['password_match_txt'] = 'Die Passwörter stimmen überein.'; |
| | | $wb['available_php_directive_snippets_txt'] = 'Verfügbare PHP Direktiven Schnipsel:'; |
| | | $wb['available_apache_directive_snippets_txt'] = 'Verfügbare Apache Direktiven Schnipsel:'; |
| | | $wb['available_nginx_directive_snippets_txt'] = 'Verfügbare nginx Direktiven Schnipsel:'; |
| | | $wb['proxy_directives_txt'] = 'Proxy Direktiven'; |
| | | $wb['available_proxy_directive_snippets_txt'] = 'Verfügbare Proxy Direktiven Schnipsel:'; |
| | | ?> |
| | |
| | | $wb['available_php_directive_snippets_txt'] = 'Available PHP Directive Snippets:'; |
| | | $wb['available_apache_directive_snippets_txt'] = 'Available Apache Directive Snippets:'; |
| | | $wb['available_nginx_directive_snippets_txt'] = 'Available nginx Directive Snippets:'; |
| | | $wb['proxy_directives_txt'] = 'Proxy Directives'; |
| | | $wb['available_proxy_directive_snippets_txt'] = 'Available Proxy Directive Snippets:'; |
| | | ?> |
| | |
| | | $wb["redirect_error_regex"] = 'Invalid redirect path. Valid redirects are for example: /test/ or http://www.domain.tld/test/'; |
| | | $wb['no_redirect_txt'] = 'No redirect'; |
| | | $wb['no_flag_txt'] = 'No flag'; |
| | | $wb['proxy_directives_txt'] = 'Proxy Directives'; |
| | | $wb['available_proxy_directive_snippets_txt'] = 'Available Proxy Directive Snippets:'; |
| | | ?> |
| | |
| | | $wb['repeat_password_txt'] = 'Repeat Password'; |
| | | $wb['password_mismatch_txt'] = 'The passwords do not match.'; |
| | | $wb['password_match_txt'] = 'The passwords do match.'; |
| | | $wb['available_php_directive_snippets_txt'] = 'Available PHP Directive Snippets:'; |
| | | $wb['available_apache_directive_snippets_txt'] = 'Available Apache Directive Snippets:'; |
| | | $wb['available_nginx_directive_snippets_txt'] = 'Available nginx Directive Snippets:'; |
| | | $wb['proxy_directives_txt'] = 'Proxy Directives'; |
| | | $wb['available_proxy_directive_snippets_txt'] = 'Available Proxy Directive Snippets:'; |
| | | ?> |
New file |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2>
|
| | | <p><tmpl_var name="list_desc_txt"></p>
|
| | |
|
| | | <div class="panel panel_web_domain">
|
| | |
|
| | | <div class="pnl_formsarea">
|
| | | <fieldset class="inlineLabels"><legend>Options</legend>
|
| | | <div class="ctrlHolder proxy">
|
| | | <label for="proxy_directives">{tmpl_var name='proxy_directives_txt'}</label>
|
| | | <textarea name="proxy_directives" id="proxy_directives" rows='10' cols='50' style="width:400px;">{tmpl_var name='proxy_directives'}</textarea> <b>{tmpl_var name="available_proxy_directive_snippets_txt"}</b><br><br> {tmpl_var name="proxy_directive_snippets_txt"}
|
| | | </div>
|
| | | </fieldset>
|
| | |
|
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}">
|
| | |
|
| | | <div class="buttonHolder buttons">
|
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','sites/web_aliasdomain_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button>
|
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('sites/web_aliasdomain_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
|
| | | </div>
|
| | | </div>
|
| | | |
| | | </div>
|
| | | <script language="JavaScript" type="text/javascript">
|
| | | var webId = jQuery('input[name="id"]').val();
|
| | | adjustForm();
|
| | | |
| | | function adjustForm(){
|
| | | jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {web_id : webId, type : "getredirecttype"}, function(data) {
|
| | | if(data.redirecttype == "proxy"){
|
| | | jQuery('.proxy').show();
|
| | | } else {
|
| | | jQuery('.proxy').hide();
|
| | | }
|
| | | });
|
| | | }
|
| | | |
| | | </script> |
| | |
| | | <label for="nginx_directives">{tmpl_var name='nginx_directives_txt'}</label> |
| | | <textarea name="nginx_directives" id="nginx_directives" rows='10' cols='50' style="width:400px;">{tmpl_var name='nginx_directives'}</textarea> <b>{tmpl_var name="available_nginx_directive_snippets_txt"}</b><br><br> {tmpl_var name="nginx_directive_snippets_txt"} |
| | | </div> |
| | | <div class="ctrlHolder proxy"> |
| | | <label for="proxy_directives">{tmpl_var name='proxy_directives_txt'}</label> |
| | | <textarea name="proxy_directives" id="proxy_directives" rows='10' cols='50' style="width:400px;">{tmpl_var name='proxy_directives'}</textarea> <b>{tmpl_var name="available_proxy_directive_snippets_txt"}</b><br><br> {tmpl_var name="proxy_directive_snippets_txt"} |
| | | </div> |
| | | </fieldset> |
| | | |
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}"> |
| | |
| | | jQuery('.phpfpm').hide(); |
| | | } |
| | | }); |
| | | jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {web_id : webId, type : "getredirecttype"}, function(data) { |
| | | if(data.redirecttype == "proxy"){ |
| | | jQuery('.proxy').show(); |
| | | } else { |
| | | jQuery('.proxy').hide(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | </script> |
New file |
| | |
| | | <h2><tmpl_var name="list_head_txt"></h2>
|
| | | <p><tmpl_var name="list_desc_txt"></p>
|
| | |
|
| | | <div class="panel panel_web_subdomain">
|
| | |
|
| | | <div class="pnl_formsarea">
|
| | | <fieldset class="inlineLabels"><legend>Options</legend>
|
| | | <div class="ctrlHolder proxy">
|
| | | <label for="proxy_directives">{tmpl_var name='proxy_directives_txt'}</label>
|
| | | <textarea name="proxy_directives" id="proxy_directives" rows='10' cols='50' style="width:400px;">{tmpl_var name='proxy_directives'}</textarea> <b>{tmpl_var name="available_proxy_directive_snippets_txt"}</b><br><br> {tmpl_var name="proxy_directive_snippets_txt"}
|
| | | </div>
|
| | | </fieldset>
|
| | |
|
| | | <input type="hidden" name="id" value="{tmpl_var name='id'}">
|
| | |
|
| | | <div class="buttonHolder buttons">
|
| | | <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','sites/web_subdomain_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button>
|
| | | <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('sites/web_subdomain_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
|
| | | </div>
|
| | | </div>
|
| | | |
| | | </div>
|
| | | <script language="JavaScript" type="text/javascript">
|
| | | var webId = jQuery('input[name="id"]').val();
|
| | | adjustForm();
|
| | | |
| | | function adjustForm(){
|
| | | jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {web_id : webId, type : "getredirecttype"}, function(data) {
|
| | | if(data.redirecttype == "proxy"){
|
| | | jQuery('.proxy').show();
|
| | | } else {
|
| | | jQuery('.proxy').hide();
|
| | | }
|
| | | });
|
| | | }
|
| | | |
| | | </script>
|
| | |
| | | </div> |
| | | <div class="ctrlHolder"> |
| | | <label for="custom_php_ini">{tmpl_var name='custom_php_ini_txt'}</label> |
| | | <textarea name="custom_php_ini" id="custom_php_ini" rows='10' cols='50' style="width:400px;">{tmpl_var name='custom_php_ini'}</textarea> |
| | | <textarea name="custom_php_ini" id="custom_php_ini" rows='10' cols='50' style="width:400px;">{tmpl_var name='custom_php_ini'}</textarea> <b>{tmpl_var name="available_php_directive_snippets_txt"}</b><br><br> {tmpl_var name="php_directive_snippets_txt"} |
| | | </div> |
| | | <div class="ctrlHolder apache"> |
| | | <label for="apache_directives">{tmpl_var name='apache_directives_txt'}</label> |
| | | <textarea name="apache_directives" id="apache_directives" rows='10' cols='50' style="width:400px;">{tmpl_var name='apache_directives'}</textarea> |
| | | <textarea name="apache_directives" id="apache_directives" rows='10' cols='50' style="width:400px;">{tmpl_var name='apache_directives'}</textarea> <b>{tmpl_var name="available_apache_directive_snippets_txt"}</b><br><br> {tmpl_var name="apache_directive_snippets_txt"} |
| | | </div> |
| | | <div class="ctrlHolder nginx"> |
| | | <label for="nginx_directives">{tmpl_var name='nginx_directives_txt'}</label> |
| | | <textarea name="nginx_directives" id="nginx_directives" rows='10' cols='50' style="width:400px;">{tmpl_var name='nginx_directives'}</textarea> |
| | | <textarea name="nginx_directives" id="nginx_directives" rows='10' cols='50' style="width:400px;">{tmpl_var name='nginx_directives'}</textarea> <b>{tmpl_var name="available_nginx_directive_snippets_txt"}</b><br><br> {tmpl_var name="nginx_directive_snippets_txt"} |
| | | </div> |
| | | <div class="ctrlHolder proxy"> |
| | | <label for="proxy_directives">{tmpl_var name='proxy_directives_txt'}</label> |
| | | <textarea name="proxy_directives" id="proxy_directives" rows='10' cols='50' style="width:400px;">{tmpl_var name='proxy_directives'}</textarea> <b>{tmpl_var name="available_proxy_directive_snippets_txt"}</b><br><br> {tmpl_var name="proxy_directive_snippets_txt"} |
| | | </div> |
| | | </fieldset> |
| | | |
| | |
| | | jQuery('.phpfpm').hide(); |
| | | } |
| | | }); |
| | | jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {web_id : webId, type : "getredirecttype"}, function(data) { |
| | | if(data.redirecttype == "proxy"){ |
| | | jQuery('.proxy').show(); |
| | | } else { |
| | | jQuery('.proxy').hide(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | </script> |
| | |
| | | jQuery('#redirect_type option[value="L"]').hide(); |
| | | jQuery('#redirect_type option[value="R,L"]').hide(); |
| | | jQuery('#redirect_type option[value="R=301,L"]').hide(); |
| | | if(selected != "no" && selected != "" && selected != "last" && selected != "break" && selected != "redirect" && selected != "permanent") jQuery('#redirect_type option[value="no"]').attr('selected', 'selected'); |
| | | if(selected != "no" && selected != "" && selected != "last" && selected != "break" && selected != "redirect" && selected != "permanent" && selected != "proxy") jQuery('#redirect_type option[value="no"]').attr('selected', 'selected'); |
| | | } else { |
| | | jQuery('#redirect_type option[value="last"]').attr('disabled','disabled'); |
| | | jQuery('#redirect_type option[value="break"]').attr('disabled','disabled'); |
| | | jQuery('#redirect_type option[value="redirect"]').attr('disabled','disabled'); |
| | | jQuery('#redirect_type option[value="permanent"]').attr('disabled','disabled'); |
| | | jQuery('#redirect_type option[value="proxy"]').attr('disabled','disabled'); |
| | | |
| | | jQuery('#redirect_type option[value="last"]').hide(); |
| | | jQuery('#redirect_type option[value="break"]').hide(); |
| | | jQuery('#redirect_type option[value="redirect"]').hide(); |
| | | jQuery('#redirect_type option[value="permanent"]').hide(); |
| | | jQuery('#redirect_type option[value="proxy"]').hide(); |
| | | if(selected != "no" && selected != "" && selected != "R" && selected != "L" && selected != "R,L" && selected != "R=301,L") jQuery('#redirect_type option[value="no"]').attr('selected', 'selected'); |
| | | } |
| | | }); |
| | |
| | | $app->tpl->setVar("domain_option",$domain_select); |
| | | } |
| | | |
| | | if($_SESSION["s"]["user"]["typ"] == 'admin') { |
| | | // Directive Snippets |
| | | $proxy_directive_snippets = $app->db->queryAllRecords("SELECT * FROM directive_snippets WHERE type = 'proxy' AND active = 'y'"); |
| | | $proxy_directive_snippets_txt = ''; |
| | | if(is_array($proxy_directive_snippets) && !empty($proxy_directive_snippets)){ |
| | | foreach($proxy_directive_snippets as $proxy_directive_snippet){ |
| | | $proxy_directive_snippets_txt .= '<a href="javascript:void(0);" class="addPlaceholderContent">['.$proxy_directive_snippet['name'].']<pre class="addPlaceholderContent" style="display:none;">'.$proxy_directive_snippet['snippet'].'</pre></a> '; |
| | | } |
| | | } |
| | | if($proxy_directive_snippets_txt == '') $proxy_directive_snippets_txt = '------'; |
| | | $app->tpl->setVar("proxy_directive_snippets_txt",$proxy_directive_snippets_txt); |
| | | } |
| | | |
| | | parent::onShowEnd(); |
| | | |
| | | } |
| | |
| | | if($nginx_directive_snippets_txt == '') $nginx_directive_snippets_txt = '------'; |
| | | $app->tpl->setVar("nginx_directive_snippets_txt",$nginx_directive_snippets_txt); |
| | | } |
| | | |
| | | $proxy_directive_snippets = $app->db->queryAllRecords("SELECT * FROM directive_snippets WHERE type = 'proxy' AND active = 'y'"); |
| | | $proxy_directive_snippets_txt = ''; |
| | | if(is_array($proxy_directive_snippets) && !empty($proxy_directive_snippets)){ |
| | | foreach($proxy_directive_snippets as $proxy_directive_snippet){ |
| | | $proxy_directive_snippets_txt .= '<a href="javascript:void(0);" class="addPlaceholderContent">['.$proxy_directive_snippet['name'].']<pre class="addPlaceholderContent" style="display:none;">'.$proxy_directive_snippet['snippet'].'</pre></a> '; |
| | | } |
| | | } |
| | | if($proxy_directive_snippets_txt == '') $proxy_directive_snippets_txt = '------'; |
| | | $app->tpl->setVar("proxy_directive_snippets_txt",$proxy_directive_snippets_txt); |
| | | } |
| | | |
| | | $ssl_domain_select = ''; |
| | |
| | | } |
| | | $app->tpl->setVar("domain",$this->dataRecord["domain"]); |
| | | |
| | | if($_SESSION["s"]["user"]["typ"] == 'admin') { |
| | | // Directive Snippets |
| | | $proxy_directive_snippets = $app->db->queryAllRecords("SELECT * FROM directive_snippets WHERE type = 'proxy' AND active = 'y'"); |
| | | $proxy_directive_snippets_txt = ''; |
| | | if(is_array($proxy_directive_snippets) && !empty($proxy_directive_snippets)){ |
| | | foreach($proxy_directive_snippets as $proxy_directive_snippet){ |
| | | $proxy_directive_snippets_txt .= '<a href="javascript:void(0);" class="addPlaceholderContent">['.$proxy_directive_snippet['name'].']<pre class="addPlaceholderContent" style="display:none;">'.$proxy_directive_snippet['snippet'].'</pre></a> '; |
| | | } |
| | | } |
| | | if($proxy_directive_snippets_txt == '') $proxy_directive_snippets_txt = '------'; |
| | | $app->tpl->setVar("proxy_directive_snippets_txt",$proxy_directive_snippets_txt); |
| | | } |
| | | |
| | | parent::onShowEnd(); |
| | | |
| | | } |
| | |
| | | unset($php_records); |
| | | |
| | | foreach($read_limits as $limit) $app->tpl->setVar($limit, ($limit == 'force_suexec' ? 'n' : 'y')); |
| | | |
| | | // Directive Snippets |
| | | $php_directive_snippets = $app->db->queryAllRecords("SELECT * FROM directive_snippets WHERE type = 'php' AND active = 'y'"); |
| | | $php_directive_snippets_txt = ''; |
| | | if(is_array($php_directive_snippets) && !empty($php_directive_snippets)){ |
| | | foreach($php_directive_snippets as $php_directive_snippet){ |
| | | $php_directive_snippets_txt .= '<a href="javascript:void(0);" class="addPlaceholderContent">['.$php_directive_snippet['name'].']<pre class="addPlaceholderContent" style="display:none;">'.$php_directive_snippet['snippet'].'</pre></a> '; |
| | | } |
| | | } |
| | | if($php_directive_snippets_txt == '') $php_directive_snippets_txt = '------'; |
| | | $app->tpl->setVar("php_directive_snippets_txt",$php_directive_snippets_txt); |
| | | |
| | | if($server_type == 'apache'){ |
| | | $apache_directive_snippets = $app->db->queryAllRecords("SELECT * FROM directive_snippets WHERE type = 'apache' AND active = 'y'"); |
| | | $apache_directive_snippets_txt = ''; |
| | | if(is_array($apache_directive_snippets) && !empty($apache_directive_snippets)){ |
| | | foreach($apache_directive_snippets as $apache_directive_snippet){ |
| | | $apache_directive_snippets_txt .= '<a href="javascript:void(0);" class="addPlaceholderContent">['.$apache_directive_snippet['name'].']<pre class="addPlaceholderContent" style="display:none;">'.$apache_directive_snippet['snippet'].'</pre></a> '; |
| | | } |
| | | } |
| | | if($apache_directive_snippets_txt == '') $apache_directive_snippets_txt = '------'; |
| | | $app->tpl->setVar("apache_directive_snippets_txt",$apache_directive_snippets_txt); |
| | | } |
| | | |
| | | if($server_type == 'nginx'){ |
| | | $nginx_directive_snippets = $app->db->queryAllRecords("SELECT * FROM directive_snippets WHERE type = 'nginx' AND active = 'y'"); |
| | | $nginx_directive_snippets_txt = ''; |
| | | if(is_array($nginx_directive_snippets) && !empty($nginx_directive_snippets)){ |
| | | foreach($nginx_directive_snippets as $nginx_directive_snippet){ |
| | | $nginx_directive_snippets_txt .= '<a href="javascript:void(0);" class="addPlaceholderContent">['.$nginx_directive_snippet['name'].']<pre class="addPlaceholderContent" style="display:none;">'.$nginx_directive_snippet['snippet'].'</pre></a> '; |
| | | } |
| | | } |
| | | if($nginx_directive_snippets_txt == '') $nginx_directive_snippets_txt = '------'; |
| | | $app->tpl->setVar("nginx_directive_snippets_txt",$nginx_directive_snippets_txt); |
| | | } |
| | | |
| | | $proxy_directive_snippets = $app->db->queryAllRecords("SELECT * FROM directive_snippets WHERE type = 'proxy' AND active = 'y'"); |
| | | $proxy_directive_snippets_txt = ''; |
| | | if(is_array($proxy_directive_snippets) && !empty($proxy_directive_snippets)){ |
| | | foreach($proxy_directive_snippets as $proxy_directive_snippet){ |
| | | $proxy_directive_snippets_txt .= '<a href="javascript:void(0);" class="addPlaceholderContent">['.$proxy_directive_snippet['name'].']<pre class="addPlaceholderContent" style="display:none;">'.$proxy_directive_snippet['snippet'].'</pre></a> '; |
| | | } |
| | | } |
| | | if($proxy_directive_snippets_txt == '') $proxy_directive_snippets_txt = '------'; |
| | | $app->tpl->setVar("proxy_directive_snippets_txt",$proxy_directive_snippets_txt); |
| | | } |
| | | |
| | | $ssl_domain_select = ''; |
| | |
| | | <tmpl_if name='use_proxy'> |
| | | location / { |
| | | proxy_pass <tmpl_var name='rewrite_target'>; |
| | | rewrite ^/\b<tmpl_var name='rewrite_subdir'>\b(.*) $1; |
| | | rewrite ^/<tmpl_var name='rewrite_subdir'>/(.*) /$1; |
| | | <tmpl_loop name="proxy_directives"> |
| | | <tmpl_var name='proxy_directive'> |
| | | </tmpl_loop> |
| | | } |
| | | </tmpl_if> |
| | | </tmpl_loop> |
| | |
| | | <tmpl_if name='use_proxy'> |
| | | location / { |
| | | proxy_pass <tmpl_var name='rewrite_target'>; |
| | | rewrite ^/\b<tmpl_var name='rewrite_subdir'>\b(.*) $1; |
| | | rewrite ^/<tmpl_var name='rewrite_subdir'>/(.*) /$1; |
| | | <tmpl_loop name="proxy_directives"> |
| | | <tmpl_var name='proxy_directive'> |
| | | </tmpl_loop> |
| | | } |
| | | </tmpl_if> |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | // Custom proxy directives |
| | | if($data['new']['redirect_type'] == 'proxy' && trim($data['new']['proxy_directives'] != '')){ |
| | | $final_proxy_directives = array(); |
| | | $proxy_directives = $data['new']['proxy_directives']; |
| | | // Make sure we only have Unix linebreaks |
| | | $proxy_directives = str_replace("\r\n", "\n", $proxy_directives); |
| | | $proxy_directives = str_replace("\r", "\n", $proxy_directives); |
| | | $proxy_directive_lines = explode("\n", $proxy_directives); |
| | | if(is_array($proxy_directive_lines) && !empty($proxy_directive_lines)){ |
| | | foreach($proxy_directive_lines as $proxy_directive_line){ |
| | | $final_proxy_directives[] = array('proxy_directive' => $proxy_directive_line); |
| | | } |
| | | } |
| | | } else { |
| | | $final_proxy_directives = false; |
| | | } |
| | | |
| | | switch($data['new']['subdomain']) { |
| | | case 'www': |
| | | if(substr($data['new']['redirect_path'],0,1) == '/'){ // relative path |
| | |
| | | 'rewrite_target' => $data['new']['redirect_path'], |
| | | 'rewrite_exclude' => $rewrite_exclude, |
| | | 'rewrite_subdir' => $rewrite_subdir, |
| | | 'proxy_directives' => $final_proxy_directives, |
| | | 'use_rewrite' => ($data['new']['redirect_type'] == 'proxy' ? false:true), |
| | | 'use_proxy' => ($data['new']['redirect_type'] == 'proxy' ? true:false)); |
| | | break; |
| | |
| | | 'rewrite_target' => $data['new']['redirect_path'], |
| | | 'rewrite_exclude' => $rewrite_exclude, |
| | | 'rewrite_subdir' => $rewrite_subdir, |
| | | 'proxy_directives' => $final_proxy_directives, |
| | | 'use_rewrite' => ($data['new']['redirect_type'] == 'proxy' ? false:true), |
| | | 'use_proxy' => ($data['new']['redirect_type'] == 'proxy' ? true:false)); |
| | | break; |
| | |
| | | 'rewrite_target' => $data['new']['redirect_path'], |
| | | 'rewrite_exclude' => $rewrite_exclude, |
| | | 'rewrite_subdir' => $rewrite_subdir, |
| | | 'proxy_directives' => $final_proxy_directives, |
| | | 'use_rewrite' => ($data['new']['redirect_type'] == 'proxy' ? false:true), |
| | | 'use_proxy' => ($data['new']['redirect_type'] == 'proxy' ? true:false)); |
| | | } |
| | |
| | | $aliases = $app->db->queryAllRecords('SELECT * FROM web_domain WHERE parent_domain_id = '.$data['new']['domain_id']." AND active = 'y' AND type != 'vhostsubdomain'"); |
| | | if(is_array($aliases)) { |
| | | foreach($aliases as $alias) { |
| | | |
| | | // Custom proxy directives |
| | | if($alias['redirect_type'] == 'proxy' && trim($alias['proxy_directives'] != '')){ |
| | | $final_proxy_directives = array(); |
| | | $proxy_directives = $alias['proxy_directives']; |
| | | // Make sure we only have Unix linebreaks |
| | | $proxy_directives = str_replace("\r\n", "\n", $proxy_directives); |
| | | $proxy_directives = str_replace("\r", "\n", $proxy_directives); |
| | | $proxy_directive_lines = explode("\n", $proxy_directives); |
| | | if(is_array($proxy_directive_lines) && !empty($proxy_directive_lines)){ |
| | | foreach($proxy_directive_lines as $proxy_directive_line){ |
| | | $final_proxy_directives[] = array('proxy_directive' => $proxy_directive_line); |
| | | } |
| | | } |
| | | } else { |
| | | $final_proxy_directives = false; |
| | | } |
| | | |
| | | if($alias['redirect_type'] == '' || $alias['redirect_path'] == '') { |
| | | switch($alias['subdomain']) { |
| | | case 'www': |
| | |
| | | 'rewrite_type' => ($alias['redirect_type'] == 'no')?'':$alias['redirect_type'], |
| | | 'rewrite_target' => $alias['redirect_path'], |
| | | 'rewrite_subdir' => $rewrite_subdir, |
| | | 'proxy_directives' => $final_proxy_directives, |
| | | 'use_rewrite' => ($alias['redirect_type'] == 'proxy' ? false:true), |
| | | 'use_proxy' => ($alias['redirect_type'] == 'proxy' ? true:false)); |
| | | |
| | |
| | | 'rewrite_type' => ($alias['redirect_type'] == 'no')?'':$alias['redirect_type'], |
| | | 'rewrite_target' => $alias['redirect_path'], |
| | | 'rewrite_subdir' => $rewrite_subdir, |
| | | 'proxy_directives' => $final_proxy_directives, |
| | | 'use_rewrite' => ($alias['redirect_type'] == 'proxy' ? false:true), |
| | | 'use_proxy' => ($alias['redirect_type'] == 'proxy' ? true:false)); |
| | | break; |
| | |
| | | 'rewrite_type' => ($alias['redirect_type'] == 'no')?'':$alias['redirect_type'], |
| | | 'rewrite_target' => $alias['redirect_path'], |
| | | 'rewrite_subdir' => $rewrite_subdir, |
| | | 'proxy_directives' => $final_proxy_directives, |
| | | 'use_rewrite' => ($alias['redirect_type'] == 'proxy' ? false:true), |
| | | 'use_proxy' => ($alias['redirect_type'] == 'proxy' ? true:false)); |
| | | break; |
| | |
| | | 'rewrite_type' => ($alias['redirect_type'] == 'no')?'':$alias['redirect_type'], |
| | | 'rewrite_target' => $alias['redirect_path'], |
| | | 'rewrite_subdir' => $rewrite_subdir, |
| | | 'proxy_directives' => $final_proxy_directives, |
| | | 'use_rewrite' => ($alias['redirect_type'] == 'proxy' ? false:true), |
| | | 'use_proxy' => ($alias['redirect_type'] == 'proxy' ? true:false)); |
| | | } |