web_domain_advanced.htm 10.5 KB
Newer Older
1
2
3
<h2><tmpl_var name="list_head_txt"></h2>
<p><tmpl_var name="list_desc_txt"></p>

4
5
6
7
8
9
10
11
12
<tmpl_if name="config_error_msg">
<div style="background: #ffdfdf; border: 1px solid #df7d7d; border-width: 1px 0; margin: 1.5em 0 1.5em 0; padding: 7px;">
                <p style="font-face:bold">{tmpl_var name='configuration_error_txt'}</p>
				<div>
				<div style="float:left;width:150px;">{tmpl_var name='config_error_tstamp'} :&nbsp;</div><div style="padding-left:150px;">{tmpl_var name='config_error_msg'}</div>
				</div>
</div>
</tmpl_if>

13
14
<div class="panel panel_web_domain">

15
16
17
18
    <div class="pnl_formsarea">
        <fieldset class="inlineLabels">
            <input name="document_root" id="document_root" value="{tmpl_var name='document_root'}" size="30" maxlength="255" type="hidden" class="textInput" />
            <div class="ctrlHolder">
19
20
21
22
23
24
25
26
                <label for="added_date">{tmpl_var name='added_date_txt'}</label>
                <input name="added_date" id="added_date" value="{tmpl_var name='added_date'}" size="10" maxlength="255" type="text" class="textInput" />
            </div>
			<div class="ctrlHolder">
                <label for="added_by">{tmpl_var name='added_by_txt'}</label>
                <input name="added_by" id="added_by" value="{tmpl_var name='added_by'}" size="10" maxlength="255" type="text" class="textInput" />
            </div>
			<div class="ctrlHolder">
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
                <label for="system_user">{tmpl_var name='system_user_txt'}</label>
                <label for="system_user">{tmpl_var name='system_user'}</label>
                <input name="system_user" id="system_user" value="{tmpl_var name='system_user'}" type="hidden" />
            </div>
            <div class="ctrlHolder">
                <label for="system_group">{tmpl_var name='system_group_txt'}</label>
                <label for="system_group">{tmpl_var name='system_group'}</label>
                <input name="system_group" id="system_group" value="{tmpl_var name='system_group'}" type="hidden" />
            </div>
            <div class="ctrlHolder apache">
                <label for="allow_override">{tmpl_var name='allow_override_txt'}</label>
                <input name="allow_override" id="allow_override" value="{tmpl_var name='allow_override'}" size="30" maxlength="255" type="text" class="textInput" />
            </div>
            <div class="phpfpm">
                <div class="ctrlHolder">
                    <p class="label">{tmpl_var name='php_fpm_use_socket_txt'}</p>
                    <div class="multiField">
                        {tmpl_var name='php_fpm_use_socket'}
                    </div>
                </div>
                <div class="ctrlHolder">
                    <label for="pm">{tmpl_var name='pm_txt'}</label>
                    <select name="pm" id="pm" class="selectInput">
                        {tmpl_var name='pm'}
                    </select>
                </div>
                <div class="ctrlHolder pm_ondemand" style="background: #ffdfdf; border: 1px solid #df7d7d; border-width: 1px 0; margin: 1.5em 0 1.5em 0; padding: 7px;">
                    {tmpl_var name='pm_ondemand_hint_txt'}
                </div>
                <div class="ctrlHolder">
                    <label for="pm_max_children">{tmpl_var name='pm_max_children_txt'}</label>
58
                    <input name="pm_max_children" id="pm_max_children" value="{tmpl_var name='pm_max_children'}" size="6" maxlength="6" type="text" class="textInput formLengthLimit" />
59
60
61
                </div>
                <div class="ctrlHolder pm_dynamic">
                    <label for="pm_start_servers">{tmpl_var name='pm_start_servers_txt'}</label>
62
                    <input name="pm_start_servers" id="pm_start_servers" value="{tmpl_var name='pm_start_servers'}" size="6" maxlength="6" type="text" class="textInput formLengthLimit" />
63
64
65
                </div>
                <div class="ctrlHolder pm_dynamic">
                    <label for="pm_min_spare_servers">{tmpl_var name='pm_min_spare_servers_txt'}</label>
66
                    <input name="pm_min_spare_servers" id="pm_min_spare_servers" value="{tmpl_var name='pm_min_spare_servers'}" size="6" maxlength="6" type="text" class="textInput formLengthLimit" />
67
68
69
                </div>
                <div class="ctrlHolder pm_dynamic">
                    <label for="pm_max_spare_servers">{tmpl_var name='pm_max_spare_servers_txt'}</label>
70
                    <input name="pm_max_spare_servers" id="pm_max_spare_servers" value="{tmpl_var name='pm_max_spare_servers'}" size="6" maxlength="6" type="text" class="textInput formLengthLimit" />
71
72
73
                </div>
                <div class="ctrlHolder pm_ondemand">
                    <label for="pm_process_idle_timeout">{tmpl_var name='pm_process_idle_timeout_txt'}</label>
74
                    <input name="pm_process_idle_timeout" id="pm_process_idle_timeout" value="{tmpl_var name='pm_process_idle_timeout'}" size="6" maxlength="6" type="text" class="textInput formLengthLimit" />&nbsp;s
75
76
77
                </div>
                <div class="ctrlHolder">
                    <label for="pm_max_requests">{tmpl_var name='pm_max_requests_txt'}</label>
78
                    <input name="pm_max_requests" id="pm_max_requests" value="{tmpl_var name='pm_max_requests'}" size="6" maxlength="6" type="text" class="textInput formLengthLimit" />
79
80
                </div>
            </div>
81
            <div class="ctrlHolder php">
82
83
84
                <label for="php_open_basedir">{tmpl_var name='php_open_basedir_txt'}</label>
                <input name="php_open_basedir" id="php_open_basedir" value="{tmpl_var name='php_open_basedir'}" size="30" type="text" class="textInput"  style="width:400px;" />
            </div>
85
            <div class="ctrlHolder php">
86
                <label for="custom_php_ini">{tmpl_var name='custom_php_ini_txt'}</label>
87
                <textarea name="custom_php_ini" id="custom_php_ini" rows='10' cols='50' style="width:400px;">{tmpl_var name='custom_php_ini'}</textarea>&nbsp;<b>{tmpl_var name="available_php_directive_snippets_txt"}</b><br><br>&nbsp;{tmpl_var name="php_directive_snippets_txt"}
88
89
90
            </div>
            <div class="ctrlHolder apache">
                <label for="apache_directives">{tmpl_var name='apache_directives_txt'}</label>
91
                <textarea name="apache_directives" id="apache_directives" rows='10' cols='50' style="width:400px;">{tmpl_var name='apache_directives'}</textarea>&nbsp;<b>{tmpl_var name="available_apache_directive_snippets_txt"}</b><br><br>&nbsp;{tmpl_var name="apache_directive_snippets_txt"}<br>----<br><b>&nbsp;{tmpl_var name='variables_txt'}:</b> <a href="javascript:void(0);" class="addPlaceholder">{DOCROOT}</a>
92
93
94
            </div>
            <div class="ctrlHolder nginx">
                <label for="nginx_directives">{tmpl_var name='nginx_directives_txt'}</label>
95
                <textarea name="nginx_directives" id="nginx_directives" rows='10' cols='50' style="width:400px;">{tmpl_var name='nginx_directives'}</textarea>&nbsp;<b>{tmpl_var name="available_nginx_directive_snippets_txt"}</b><br><br>&nbsp;{tmpl_var name="nginx_directive_snippets_txt"}<br>----<br><b>&nbsp;{tmpl_var name='variables_txt'}:</b> <a href="javascript:void(0);" class="addPlaceholder">{DOCROOT}</a>, <a href="javascript:void(0);" class="addPlaceholder">{FASTCGIPASS}</a>
96
97
98
99
            </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>&nbsp;<b>{tmpl_var name="available_proxy_directive_snippets_txt"}</b><br><br>&nbsp;{tmpl_var name="proxy_directive_snippets_txt"}
100
101
            </div>
        </fieldset>
102

103
        <input type="hidden" name="id" value="{tmpl_var name='id'}">
104

105
        <div class="buttonHolder buttons">
106
107
            <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','sites/web_domain_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_domain_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
108
        </div>
109
    </div>
110

111
</div>
Falko Timme's avatar
Falko Timme committed
112
<script language="JavaScript" type="text/javascript">
113
114
115
116
    var webId = jQuery('input[name="id"]').val();
    var serverId;
    getServerId();
    adjustForm();
Falko Timme's avatar
Falko Timme committed
117
		
118
119
120
121
122
123
    var pm = jQuery('#pm').val();
    pmMode(pm);
    jQuery('#pm').change(function(){
        pm = jQuery(this).val();
        pmMode(pm);
    });
124
		
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
    function pmMode(pm){
        switch(pm){
            case "static":
                jQuery('.pm_dynamic').add('.pm_ondemand').hide();
                jQuery('.pm_static').show();
                break;
            case "dynamic":
                jQuery('.pm_static').add('.pm_ondemand').hide();
                jQuery('.pm_dynamic').show();
                break;
            case "ondemand":
                jQuery('.pm_static').add('.pm_dynamic').hide();
                jQuery('.pm_ondemand').show();
                break;
        }
    }
141
		
142
143
144
145
146
    function getServerId(){
        jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {web_id : webId, type : "getserverid"}, function(data) {
            serverId = data.serverid;
        });
    }
Falko Timme's avatar
Falko Timme committed
147
		
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
    function adjustForm(){
        jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {server_id : serverId, type : "getservertype"}, function(data) {
            if(data.servertype == "nginx"){
                jQuery('.nginx').show();
                jQuery('.apache').hide();
            } else {
                jQuery('.nginx').hide();
                jQuery('.apache').show();
            }
        });
        jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {web_id : webId, type : "getphptype"}, function(data) {
            if(data.phptype == "php-fpm"){
                jQuery('.phpfpm').show();
            } else {
                jQuery('.phpfpm').hide();
163
164
165
166
167
            }
			if(data.phptype == "no"){
                jQuery('.php').hide();
            } else {
                jQuery('.php').show();
168
            }
169
170
171
172
173
174
175
        });
		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();
            }
176
177
        });
    }
Falko Timme's avatar
Falko Timme committed
178
179
			
</script>