<h2><tmpl_var name="list_head_txt"></h2>
<p><tmpl_var name="list_desc_txt"></p>

<div class="panel panel_server_config">
  
    <div class="pnl_formsarea">
        <fieldset class="inlineLabels">
            <div class="ctrlHolder">
                <p class="label">{tmpl_var name='server_type_txt'}</p>
                <div class="multiField">
                    <select name="server_type" id="server_type" class="selectInput">
                        {tmpl_var name='server_type'}
                    </select>
                </div>
            </div>
            <div class="ctrlHolder">
                <label for="website_basedir">{tmpl_var name='website_basedir_txt'}</label>
                <input name="website_basedir" id="website_basedir" value="{tmpl_var name='website_basedir'}" size="40" maxlength="255" type="text" class="textInput" />
            </div>
            <div class="ctrlHolder">
                <label for="website_path">{tmpl_var name='website_path_txt'}</label>
                <input name="website_path" id="website_path" value="{tmpl_var name='website_path'}" size="40" maxlength="255" type="text" class="textInput" />
            </div>
            <div class="ctrlHolder">
                <label for="website_symlinks">{tmpl_var name='website_symlinks_txt'}</label>
                <input name="website_symlinks" id="website_symlinks" value="{tmpl_var name='website_symlinks'}" size="40" maxlength="255" type="text" class="textInput" />
            </div>
            <div class="ctrlHolder">
                <label for="website_symlinks_rel">{tmpl_var name='website_symlinks_rel_txt'}</label>
                <div class="multiField">
                    {tmpl_var name='website_symlinks_rel'}
                </div>
            </div>
            <div class="ctrlHolder">
                <label for="website_autoalias">{tmpl_var name='website_autoalias_txt'}</label>
                <input name="website_autoalias" id="website_autoalias" value="{tmpl_var name='website_autoalias'}" size="40" maxlength="255" type="text" class="textInput" />&nbsp;{tmpl_var name='website_autoalias_note_txt'} <a href="javascript:void(0);" class="addPlaceholder">[client_id]</a>, <a href="javascript:void(0);" class="addPlaceholder">[client_username]</a>, <a href="javascript:void(0);" class="addPlaceholder">[website_id]</a>, <a href="javascript:void(0);" class="addPlaceholder">[website_domain]</a>
            </div>
		<div class="ctrlHolder apache">
			<label for="vhost_rewrite_v6">{tmpl_var name='vhost_rewrite_v6_txt'}</label>
			<div class="multiField">
				{tmpl_var name='vhost_rewrite_v6'}
			</div>
		</div>
            <div class="ctrlHolder apache">
                <label for="vhost_conf_dir">{tmpl_var name='vhost_conf_dir_txt'}</label>
                <input name="vhost_conf_dir" id="vhost_conf_dir" value="{tmpl_var name='vhost_conf_dir'}" size="40" maxlength="255" type="text" class="textInput" />
            </div>
            <div class="ctrlHolder apache">
                <label for="vhost_conf_enabled_dir">{tmpl_var name='vhost_conf_enabled_dir_txt'}</label>
                <input name="vhost_conf_enabled_dir" id="vhost_conf_enabled_dir" value="{tmpl_var name='vhost_conf_enabled_dir'}" size="40" maxlength="255" type="text" class="textInput" />
            </div>
            <div class="ctrlHolder nginx">
                <label for="nginx_vhost_conf_dir">{tmpl_var name='nginx_vhost_conf_dir_txt'}</label>
                <input name="nginx_vhost_conf_dir" id="nginx_vhost_conf_dir" value="{tmpl_var name='nginx_vhost_conf_dir'}" size="40" maxlength="255" type="text" class="textInput" />
            </div>
            <div class="ctrlHolder nginx">
                <label for="nginx_vhost_conf_enabled_dir">{tmpl_var name='nginx_vhost_conf_enabled_dir_txt'}</label>
                <input name="nginx_vhost_conf_enabled_dir" id="nginx_vhost_conf_enabled_dir" value="{tmpl_var name='nginx_vhost_conf_enabled_dir'}" size="40" maxlength="255" type="text" class="textInput" />
            </div>
            <div class="ctrlHolder">
                <p class="label">{tmpl_var name='security_level_txt'}</p>
                <div class="multiField">
                    <select name="security_level" id="security_level" class="selectInput">
                        {tmpl_var name='security_level'}
                    </select>
                </div>
            </div>
            <div class="ctrlHolder apache">
                <p class="label">{tmpl_var name='check_apache_config_txt'}</p>
                <div class="multiField">
                    {tmpl_var name='check_apache_config'}
                </div>
            </div>
            <div class="ctrlHolder apache">
                <label for="user">{tmpl_var name='web_user_txt'}</label>
                <input name="user" id="user" value="{tmpl_var name='user'}" size="40" maxlength="255" type="text" class="textInput" />
            </div>
            <div class="ctrlHolder apache">
                <label for="group">{tmpl_var name='web_group_txt'}</label>
                <input name="group" id="group" value="{tmpl_var name='group'}" size="40" maxlength="255" type="text" class="textInput" />
            </div>
            <div class="ctrlHolder nginx">
                <label for="nginx_user">{tmpl_var name='nginx_user_txt'}</label>
                <input name="nginx_user" id="nginx_user" value="{tmpl_var name='nginx_user'}" size="40" maxlength="255" type="text" class="textInput" />
            </div>
            <div class="ctrlHolder nginx">
                <label for="nginx_group">{tmpl_var name='nginx_group_txt'}</label>
                <input name="nginx_group" id="nginx_group" value="{tmpl_var name='nginx_group'}" size="40" maxlength="255" type="text" class="textInput" />
            </div>
            <div class="ctrlHolder nginx">
                <label for="nginx_cgi_socket">{tmpl_var name='nginx_cgi_socket_txt'}</label>
                <input name="nginx_cgi_socket" id="nginx_cgi_socket" value="{tmpl_var name='nginx_cgi_socket'}" size="40" maxlength="255" type="text" class="textInput" />
            </div>
            <div class="ctrlHolder apache">
                <label for="htaccess_allow_override">{tmpl_var name='htaccess_allow_override_txt'}</label>
                <input name="htaccess_allow_override" id="htaccess_allow_override" value="{tmpl_var name='htaccess_allow_override'}" size="40" maxlength="255" type="text" class="textInput" />
            </div>
            <div class="ctrlHolder">
                <p class="label">{tmpl_var name='enable_ip_wildcard_txt'}</p>
                <div class="multiField">
                    {tmpl_var name='enable_ip_wildcard'}
                </div>
            </div>
            <div class="ctrlHolder">
                <p class="label">{tmpl_var name='overtraffic_notify_admin_txt'}</p>
                <div class="multiField">
                    {tmpl_var name='overtraffic_notify_admin'}
                </div>
            </div>
            <div class="ctrlHolder">
                <p class="label">{tmpl_var name='overtraffic_notify_client_txt'}</p>
                <div class="multiField">
                    {tmpl_var name='overtraffic_notify_client'}
                </div>
            </div>
            <div class="subsectiontoggle"><span></span>{tmpl_var name='ssl_settings_txt'}<em></em></div>
            <div style="display:none;">
                <div class="ctrlHolder">
                    <p class="label">{tmpl_var name='enable_sni_txt'}</p>
                    <div class="multiField">
                        {tmpl_var name='enable_sni'}
                    </div>
                </div>
                <div class="ctrlHolder">
                    <label for="CA_path">{tmpl_var name='CA_path_txt'}</label>
                    <input name="CA_path" id="CA_path" value="{tmpl_var name='CA_path'}" size="40" maxlength="255" type="text" class="textInput" />
                </div>
                <div class="ctrlHolder">
                    <label for="CA_pass">{tmpl_var name='CA_pass_txt'}</label>
                    <input name="CA_pass" id="CA_pass" value="{tmpl_var name='CA_pass'}" size="40" maxlength="255" type="password" class="textInput" />
                </div>
            </div>
            <div class="subsectiontoggle"><span></span>{tmpl_var name='permissions_txt'}<em></em></div>
            <div style="display:none;">
                <div class="ctrlHolder">
                    <p class="label">{tmpl_var name='set_folder_permissions_on_update_txt'}</p>
                    <div class="multiField">
                        {tmpl_var name='set_folder_permissions_on_update'}
                    </div>
                </div>
                <div class="ctrlHolder">
                    <p class="label">{tmpl_var name='web_folder_protection_txt'}</p>
                    <div class="multiField">
                        {tmpl_var name='web_folder_protection'}
                    </div>
                </div>
                <div class="ctrlHolder">
                    <p class="label">{tmpl_var name='add_web_users_to_sshusers_group_txt'}</p>
                    <div class="multiField">
                        {tmpl_var name='add_web_users_to_sshusers_group'}
                    </div>
                </div>
                <div class="ctrlHolder">
                    <p class="label">{tmpl_var name='connect_userid_to_webid_txt'}</p>
                    <div class="multiField">
                        {tmpl_var name='connect_userid_to_webid'}
                    </div>
                </div>
                <div class="ctrlHolder">
                    <label for="connect_userid_to_webid_start">{tmpl_var name='connect_userid_to_webid_start_txt'}</label>
                    <input name="connect_userid_to_webid_start" id="connect_userid_to_webid_start" value="{tmpl_var name='connect_userid_to_webid_start'}" size="40" maxlength="255" type="text" class="textInput" />
                </div>
            </div>
            <div class="subsectiontoggle"><span></span>{tmpl_var name='php_settings_txt'}<em></em></div>
            <div style="display:none;">
                <div class="ctrlHolder apache">
                    <label for="php_ini_path_apache">{tmpl_var name='php_ini_path_apache_txt'}</label>
                    <input name="php_ini_path_apache" id="php_ini_path_apache" value="{tmpl_var name='php_ini_path_apache'}" size="40" maxlength="255" type="text" class="textInput" />
                </div>
                <div class="ctrlHolder apache">
                    <label for="php_ini_path_cgi">{tmpl_var name='php_ini_path_cgi_txt'}</label>
                    <input name="php_ini_path_cgi" id="php_ini_path_cgi" value="{tmpl_var name='php_ini_path_cgi'}" size="40" maxlength="255" type="text" class="textInput" />
                </div>
                <div class="ctrlHolder">
                    <label for="php_fpm_init_script">{tmpl_var name='php_fpm_init_script_txt'}</label>
                    <input name="php_fpm_init_script" id="php_fpm_init_script" value="{tmpl_var name='php_fpm_init_script'}" size="40" maxlength="255" type="text" class="textInput" />
                </div>
                <div class="ctrlHolder">
                    <label for="php_fpm_ini_path">{tmpl_var name='php_fpm_ini_path_txt'}</label>
                    <input name="php_fpm_ini_path" id="php_fpm_ini_path" value="{tmpl_var name='php_fpm_ini_path'}" size="40" maxlength="255" type="text" class="textInput" />
                </div>
                <div class="ctrlHolder">
                    <label for="php_fpm_pool_dir">{tmpl_var name='php_fpm_pool_dir_txt'}</label>
                    <input name="php_fpm_pool_dir" id="php_fpm_pool_dir" value="{tmpl_var name='php_fpm_pool_dir'}" size="40" maxlength="255" type="text" class="textInput" />
                </div>
                <div class="ctrlHolder">
                    <label for="php_fpm_start_port">{tmpl_var name='php_fpm_start_port_txt'}</label>
                    <input name="php_fpm_start_port" id="php_fpm_start_port" value="{tmpl_var name='php_fpm_start_port'}" size="40" maxlength="255" type="text" class="textInput" />
                </div>
                <div class="ctrlHolder">
                    <label for="php_fpm_socket_dir">{tmpl_var name='php_fpm_socket_dir_txt'}</label>
                    <input name="php_fpm_socket_dir" id="php_fpm_socket_dir" value="{tmpl_var name='php_fpm_socket_dir'}" size="40" maxlength="255" type="text" class="textInput" />
                </div>
                <div class="ctrlHolder">
                    <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="40" type="text" class="textInput" />
                </div>
                <div class="ctrlHolder">
                    <label for="php_ini_check_minutes">{tmpl_var name='php_ini_check_minutes_txt'}</label>
                    <input name="php_ini_check_minutes" id="php_ini_check_minutes" value="{tmpl_var name='php_ini_check_minutes'}" size="40" type="text" class="textInput" /> {tmpl_var name='php_ini_check_minutes_info_txt'}
                </div>
            </div>
            <div class="subsectiontoggle"><span></span>{tmpl_var name='apps_vhost_settings_txt'}<em></em></div>
            <div style="display:none;">
                <div class="ctrlHolder">
                    <label for="apps_vhost_port">{tmpl_var name='apps_vhost_port_txt'}</label>
                    <input name="apps_vhost_port" id="apps_vhost_port" value="{tmpl_var name='apps_vhost_port'}" size="40" maxlength="255" type="text" class="textInput" />
                </div>
                <div class="ctrlHolder">
                    <label for="apps_vhost_ip">{tmpl_var name='apps_vhost_ip_txt'}</label>
                    <input name="apps_vhost_ip" id="apps_vhost_ip" value="{tmpl_var name='apps_vhost_ip'}" size="40" maxlength="255" type="text" class="textInput" />
                </div>
                <div class="ctrlHolder">
                    <label for="apps_vhost_servername">{tmpl_var name='apps_vhost_servername_txt'}</label>
                    <input name="apps_vhost_servername" id="apps_vhost_servername" value="{tmpl_var name='apps_vhost_servername'}" size="40" maxlength="255" type="text" class="textInput" />
                </div>
            </div>
            <div class="subsectiontoggle"><span></span>{tmpl_var name='awstats_settings_txt'}<em></em></div>
            <div style="display:none;">
                <div class="ctrlHolder">
                    <label for="awstats_conf_dir">{tmpl_var name='awstats_conf_dir_txt'}</label>
                    <input name="awstats_conf_dir" id="awstats_conf_dir" value="{tmpl_var name='awstats_conf_dir'}" size="40" maxlength="255" type="text" class="textInput" />
                </div>
                <div class="ctrlHolder">
                    <label for="awstats_data_dir">{tmpl_var name='awstats_data_dir_txt'}</label>
                    <input name="awstats_data_dir" id="awstats_data_dir" value="{tmpl_var name='awstats_data_dir'}" size="40" maxlength="255" type="text" class="textInput" />
                </div>
                <div class="ctrlHolder">
                    <label for="awstats_pl">{tmpl_var name='awstats_pl_txt'}</label>
                    <input name="awstats_pl" id="awstats_pl" value="{tmpl_var name='awstats_pl'}" size="40" maxlength="255" type="text" class="textInput" />
                </div>
                <div class="ctrlHolder">
                    <label for="awstats_buildstaticpages_pl">{tmpl_var name='awstats_buildstaticpages_pl_txt'}</label>
                    <input name="awstats_buildstaticpages_pl" id="awstats_buildstaticpages_pl" value="{tmpl_var name='awstats_buildstaticpages_pl'}" size="40" maxlength="255" type="text" class="textInput" />
                </div>
            </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','admin/server_config_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('admin/server_config_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
        </div>
    </div>
  
</div>
<script language="JavaScript" type="text/javascript">
    var serverType = jQuery('#server_type').val();
    jQuery('#server_type').replaceWith('<label for="server_Type">'+serverType+'</label><input type="hidden" name="server_type" value="'+serverType+'">');
    adjustForm();
    jQuery('#server_type').change(function(){
        serverType = $(this).val();
        adjustForm();
    });
    
    function adjustForm(){
        if(serverType == "nginx"){
            jQuery('.nginx').show();
            jQuery('.apache').hide();
        } else {
            jQuery('.nginx').hide();
            jQuery('.apache').show();
        }
    }
</script>
