<!--#
##
#	Project: PHPDISK File Storage Solution
#	This is NOT a freeware, use is subject to license terms.
#
#	Site: http://www.phpdisk.com
#
#	$Id: settings.tpl.html 34 2011-03-22 08:05:31Z along $
#
#	Copyright (C) 2008-2011 PHPDisk Team. All Rights Reserved.
#
##
#-->
<!--#
if($action =='base'){
#-->
<div id="container">
<h1>{$L['base_setting']}<!--#sitemap_tag($L['base_setting']);#--></h1>
<div>
<div class="tips_box"><img class="img_light" src="images/light.gif" align="absmiddle" /> <b>{$L['tips']}: </b>
<span class="txtgray">{$L['setting_tips']}</span><br />
<span class="txtred">{$file_path_tips}</span>
</div>
<form action="{#urr("admincp","item=settings")#}" method="post" onsubmit="return chksettings();">
<input type="hidden" name="action" value="{$action}"/>
<input type="hidden" name="task" value="{$action}"/>
<input type="hidden" name="formhash" value="{$formhash}" />
<table align="center" width="100%" cellpadding="4" cellspacing="0" border="0" class="td_line">
<tr>
	<td width="50%"><span class="bold">{$L['site_title']}</span>: <br /><span class="txtgray">{$L['site_title_tips']}</span></td>
	<td><input type="text" id="site_title" name="setting[site_title]" value="{$setting['site_title']}" size="40" maxlength="50"/></td>
</tr>
<tr>
	<td><span class="bold">{$L['site_stat']}</span>: <br /><span class="txtgray">{$L['site_stat_tips']}</span></td>
	<td><textarea id="site_stat" name="setting[site_stat]" style="width:300px;height:30px">{$setting['site_stat']}</textarea><br />
	<a href="javascript:void(0);" onclick="resize_textarea('site_stat','plus');">[+]</a> <a href="javascript:void(0);" onclick="resize_textarea('site_stat','sub');">[-]</a>
	</td>
</tr>
<tr>
	<td><span class="bold">{$L['miibeian']}</span>: <br /><span class="txtgray">{$L['miibeian_tips']}</span></td>
	<td><input type="text" id="miibeian" name="setting[miibeian]" value="{$setting['miibeian']}" size="40" maxlength="50"/></td>
</tr>
<tr>
	<td><span class="bold">{$L['contact_us']}</span>: <br /><span class="txtgray">{$L['contact_us_tips']}</span></td>
	<td><input type="text" id="contact_us" name="setting[contact_us]" value="{$setting['contact_us']}" size="40" maxlength="50"/></td>
</tr>
<tr>
	<td><span class="bold">{$L['phpdisk_url']}</span>: <br /><span class="txtgray">{$L['phpdisk_url_tips']}</span></td>
	<td><input type="text" id="phpdisk_url" name="setting[phpdisk_url]" value="{$setting['phpdisk_url']}" size="40" maxlength="150"/></td>
</tr>
<tr>
	<td><span class="bold">{$L['encrypt_key']}</span>: <br /><span class="txtgray">{$L['encrypt_key_tips']}</span></td>
	<td><input type="text" id="encrypt_key" name="setting[encrypt_key]" value="{$setting['encrypt_key']}" maxlength="16"/>&nbsp;<input type="button" value="{$L['make_random']}" class="btn" onclick="make_code();" /></td>
</tr>
<tr>
	<td><span class="bold">{$L['allow_access']}</span>: <br /><span class="txtgray">{$L['allow_access_tips']}</span></td>
	<td><input type="radio" name="setting[allow_access]" value="1" {#ifchecked(1,$setting['allow_access'])#} /> {$L['yes']}&nbsp;&nbsp;<input type="radio" name="setting[allow_access]" value="0" {#ifchecked(0,$setting['allow_access'])#}/> {$L['no']}<br />
	<textarea name="setting[close_access_reason]" id="close_access_reason" style="width:300px; height:30px">{$settings['close_access_reason']}</textarea><br />
	<a href="javascript:void(0);" onclick="resize_textarea('close_access_reason','plus');">[+]</a> <a href="javascript:void(0);" onclick="resize_textarea('close_access_reason','sub');">[-]</a>
	</td>
</tr>
<tr>
	<td><span class="bold">{$L['allow_register']}</span>: <br /><span class="txtgray">{$L['allow_register_tips']}</span></td>
	<td><input type="radio" name="setting[allow_register]" value="1" {#ifchecked(1,$setting['allow_register'])#} /> {$L['yes']}&nbsp;&nbsp;<input type="radio" name="setting[allow_register]" value="0" {#ifchecked(0,$setting['allow_register'])#}/> {$L['no']}<br />
	<textarea name="setting[close_register_reason]" id="close_register_reason" style="width:300px; height:30px">{$settings['close_register_reason']}</textarea><br />
	<a href="javascript:void(0);" onclick="resize_textarea('close_register_reason','plus');">[+]</a> <a href="javascript:void(0);" onclick="resize_textarea('close_register_reason','sub');">[-]</a>
	</td>
</tr>
<tr>
	<td>&nbsp;</td>
	<td><input type="submit" class="btn" value="{$L['btn_update']}"/></td>
</tr>
</table>
</form>
<script language="javascript">
function chksettings(){
	if(getId('site_title').value.strtrim().length <1){
		alert("{$L['js_site_title']}");
		getId('site_title').focus();
		return false;
	}
	if(getId('phpdisk_url').value.strtrim().length <1){
		alert("{$L['js_phpdisk_url']}");
		getId('phpdisk_url').focus();
		return false;
	}
	if(getId('encrypt_key').value.strtrim().length <8){
		alert("{$L['js_encrypt_key']}");
		getId('encrypt_key').focus();
		return false;
	}
}
function make_code(){
   var chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
   var tmp = "";
   var code = "";
   for(var i=0;i<12;i++){
	   code += chars.charAt(Math.ceil(Math.random()*100000000)%chars.length);
   }
   getId('encrypt_key').value = code;
}
</script>
</div>
</div>
<!--#}elseif($action =='advanced'){#-->
<div id="container">
<h1>{$L['advanced_setting']}<!--#sitemap_tag($L['advanced_setting']);#--></h1>
<div>
<div class="tips_box"><img class="img_light" src="images/light.gif" align="absmiddle" /> <b>{$L['tips']}: </b>
<span class="txtgray">{$L['setting_tips']}</span><br />
<span class="txtred">{$file_path_tips}</span>
</div>
<form action="{#urr("admincp","item=settings")#}" method="post" onsubmit="return chksettings();">
<input type="hidden" name="action" value="{$action}"/>
<input type="hidden" name="task" value="{$action}"/>
<input type="hidden" name="formhash" value="{$formhash}" />
<table align="center" width="100%" cellpadding="4" cellspacing="0" border="0" class="td_line">
<tr>
	<td width="50%"><span class="bold">{$L['max_file_size']}</span>: <br /><span class="txtgray">{$L['max_file_size_tips']}</span></td>
	<td><input type="text" id="max_file_size" name="setting[max_file_size]" value="{$setting['max_file_size']}" maxlength="10"/> {$L['current_file_size']}: <b>{$max_user_file_size}</b></td>
</tr>
<tr>
	<td><span class="bold">{$L['file_path']}</span>: <br /><span class="txtgray">{$L['file_path_tips']}</span></td>
	<td><input type="text" id="file_path" name="setting[file_path]" value="{$setting['file_path']}" maxlength="30"/></td>
</tr>
<tr>
	<td><span class="bold">{$L['login_down_file']}</span>: <br /><span class="txtgray">{$L['login_down_file_tips']}</span></td>
	<td><input type="radio" name="setting[login_down_file]" value="1" {#ifchecked(1,$setting['login_down_file'])#} /> {$L['yes']}&nbsp;&nbsp;<input type="radio" name="setting[login_down_file]" value="0" {#ifchecked(0,$setting['login_down_file'])#}/> {$L['no']}</td>
</tr>
<tr>
	<td><span class="bold">{$L['open_demo_login']}</span>: <br /><span class="txtgray">{$L['open_demo_login_tips']}</span></td>
	<td><input type="radio" name="setting[open_demo_login]" value="1" {#ifchecked(1,$setting['open_demo_login'])#} /> {$L['yes']}&nbsp;&nbsp;<input type="radio" name="setting[open_demo_login]" value="0" {#ifchecked(0,$setting['open_demo_login'])#}/> {$L['no']}</td>
</tr>
<tr>
	<td><span class="bold">{$L['secs_for_user']}</span>: <br /><span class="txtgray">{$L['secs_for_user_tips']}</span></td>
	<td><input type="radio" name="setting[secs_for_user]" value="1" {#ifchecked(1,$setting['secs_for_user'])#} /> {$L['yes']}&nbsp;&nbsp;<input type="radio" name="setting[secs_for_user]" value="0" {#ifchecked(0,$setting['secs_for_user'])#}/> {$L['no']}</td>
</tr>
<tr>
	<td><span class="bold">{$L['secs_loading']}</span>: <br /><span class="txtgray">{$L['secs_loading_tips']}</span></td>
	<td><input type="text" name="setting[secs_loading]" value="{$setting['secs_loading']}" maxlength="5"/> </td>
</tr>
<tr>
	<td><span class="bold">{$L['true_link']}</span>: <br /><span class="txtgray">{$L['true_link_tips']}</span></td>
	<td><input type="radio" name="setting[true_link]" value="1" {#ifchecked(1,$setting['true_link'])#} /> {$L['yes']}&nbsp;&nbsp;<input type="radio" name="setting[true_link]" value="0" {#ifchecked(0,$setting['true_link'])#}/> {$L['no']}</td>
</tr>
<tr>
	<td><span class="bold">{$L['true_link_extension']}</span>: <br /><span class="txtgray">{$L['true_link_extension_tips']}</span></td>
	<td>
	<textarea name="setting[true_link_extension]" id="true_link_extension" style="width:300px; height:30px">{$settings['true_link_extension']}</textarea><br />
	<a href="javascript:void(0);" onclick="resize_textarea('true_link_extension','plus');">[+]</a> <a href="javascript:void(0);" onclick="resize_textarea('true_link_extension','sub');">[-]</a>
	</td>
</tr>
<tr>
	<td><span class="bold">{$L['gzipcompress']}</span>: <br /><span class="txtgray">{$L['gzipcompress_tips']}</span></td>
	<td><input type="radio" name="setting[gzipcompress]" value="1" {#ifchecked(1,$setting['gzipcompress'])#} /> {$L['yes']}&nbsp;&nbsp;<input type="radio" name="setting[gzipcompress]" value="0" {#ifchecked(0,$setting['gzipcompress'])#}/> {$L['no']}</td>
</tr>
<tr>
	<td><span class="bold">{$L['perpage']}</span>: <br /><span class="txtgray">{$L['perpage_tips']}</span></td>
	<td><input type="text" id="perpage" name="setting[perpage]" value="{$setting['perpage']}" maxlength="3"/></td>
</tr>
<tr>
	<td><span class="bold">{$L['open_file_preview']}</span>: <br /><span class="txtgray">{$L['open_file_preview_tips']}</span></td>
	<td><input type="radio" name="setting[open_file_preview]" value="1" {#ifchecked(1,$settings['open_file_preview'])#} /> {$L['yes']}&nbsp;&nbsp;<input type="radio" name="setting[open_file_preview]" value="0" {#ifchecked(0,$settings['open_file_preview'])#}/> {$L['no']}</td>
</tr>
<tr>
	<td><span class="bold">{$L['open_autoupdate']}</span>: <br /><span class="txtgray">{$L['open_autoupdate_tips']}</span></td>
	<td><input type="radio" name="setting[open_autoupdate]" value="1" {#ifchecked(1,$settings['open_autoupdate'])#} /> {$L['yes']}&nbsp;&nbsp;<input type="radio" name="setting[open_autoupdate]" value="0" {#ifchecked(0,$settings['open_autoupdate'])#}/> {$L['no']}</td>
</tr>
<tr>
	<td><span class="bold">{$L['open_file_extract_code']}</span>: <br /><span class="txtgray">{$L['open_file_extract_code_tips']}</span></td>
	<td><input type="radio" name="setting[open_file_extract_code]" value="1" {#ifchecked(1,$settings['open_file_extract_code'])#} /> {$L['yes']}&nbsp;&nbsp;<input type="radio" name="setting[open_file_extract_code]" value="0" {#ifchecked(0,$settings['open_file_extract_code'])#}/> {$L['no']}</td>
</tr>
<tr>
	<td><span class="bold">{$L['open_file_outlink']}</span>: <br /><span class="txtgray">{$L['open_file_outlink_tips']}</span></td>
	<td><input type="radio" name="setting[open_file_outlink]" value="1" {#ifchecked(1,$settings['open_file_outlink'])#} /> {$L['yes']}&nbsp;&nbsp;<input type="radio" name="setting[open_file_outlink]" value="0" {#ifchecked(0,$settings['open_file_outlink'])#}/> {$L['no']}</td>
</tr>
<tr>
	<td><span class="bold">{$L['open_file_shorturl']}</span>: <br /><span class="txtgray">{$L['open_file_shorturl_tips']}</span></td>
	<td><input type="radio" name="setting[open_file_shorturl]" value="1" {#ifchecked(1,$settings['open_file_shorturl'])#} /> {$L['yes']}&nbsp;&nbsp;<input type="radio" name="setting[open_file_shorturl]" value="0" {#ifchecked(0,$settings['open_file_shorturl'])#}/> {$L['no']}</td>
</tr>
<tr>
	<td><span class="bold">{$L['downfile_directly']}</span>: <br /><span class="txtgray">{$L['downfile_directly_tips']}</span></td>
	<td><input type="radio" name="setting[downfile_directly]" value="1" {#ifchecked(1,$settings['downfile_directly'])#} /> {$L['yes']}&nbsp;&nbsp;<input type="radio" name="setting[downfile_directly]" value="0" {#ifchecked(0,$settings['downfile_directly'])#}/> {$L['no']}</td>
</tr>
<tr>
	<td><span class="bold">{$L['show_relative_file']}</span>: <br /><span class="txtgray">{$L['show_relative_file_tips']}</span></td>
	<td><input type="radio" name="setting[show_relative_file]" value="1" {#ifchecked(1,$settings['show_relative_file'])#} /> {$L['yes']}&nbsp;&nbsp;<input type="radio" name="setting[show_relative_file]" value="0" {#ifchecked(0,$settings['show_relative_file'])#}/> {$L['no']}</td>
</tr>
<tr>
	<td><span class="bold">{$L['show_stat_index']}</span>: <br /><span class="txtgray">{$L['show_stat_index_tips']}</span></td>
	<td><input type="radio" name="setting[show_stat_index]" value="1" {#ifchecked(1,$settings['show_stat_index'])#} /> {$L['yes']}&nbsp;&nbsp;<input type="radio" name="setting[show_stat_index]" value="0" {#ifchecked(0,$settings['show_stat_index'])#}/> {$L['no']}</td>
</tr>
<tr>
	<td><span class="bold">{$L['invite_register_encode']}</span>: <br /><span class="txtgray">{$L['invite_register_encode_tips']}</span></td>
	<td><input type="radio" name="setting[invite_register_encode]" value="1" {#ifchecked(1,$settings['invite_register_encode'])#} /> {$L['yes']}&nbsp;&nbsp;<input type="radio" name="setting[invite_register_encode]" value="0" {#ifchecked(0,$settings['invite_register_encode'])#}/> {$L['no']}</td>
</tr>
<tr>
	<td><span class="bold">{$L['downfile_stat_time']}</span>: <br /><span class="txtgray">{$L['downfile_stat_time_tips']}</span></td>
	<td><input type="text" id="dst" name="setting[downfile_stat_time]" value="{$settings['downfile_stat_time']}" size="10" maxlength="10" /></td>
</tr>
<tr>
	<td><span class="bold">{$L['create_default_folder']}</span>: <br /><span class="txtgray">{$L['create_default_folder_tips']}</span></td>
	<td><input type="text" name="setting[create_default_folder]" value="{$settings['create_default_folder']}" maxlength="30" /></td>
</tr>
<tr>
	<td><span class="bold">{$L['all_file_share']}</span>: <br /><span class="txtgray">{$L['all_file_share_tips']}</span></td>
	<td><input type="radio" name="setting[all_file_share]" value="1" {#ifchecked(1,$settings['all_file_share'])#} /> {$L['yes']}&nbsp;&nbsp;<input type="radio" name="setting[all_file_share]" value="0" {#ifchecked(0,$settings['all_file_share'])#}/> {$L['no']}&nbsp;&nbsp;<a href="{#urr("admincp","item=settings&action=share")#}" onclick="return confirm('{$L['confirm_all_share']}');">{$L['set_all_file_share']}</a></td>
</tr>
<tr>
	<td><span class="bold">{$L['share_tool']}</span>: <br /><span class="txtgray">{$L['share_tool_tips']}</span></td>
	<td>
	<textarea name="setting[share_tool]" id="share_tool" style="width:300px; height:30px">{$settings['share_tool']}</textarea><br />
	<a href="javascript:void(0);" onclick="resize_textarea('share_tool','plus');">[+]</a> <a href="javascript:void(0);" onclick="resize_textarea('share_tool','sub');">[-]</a>
	</td>
</tr>
<tr>
	<td>&nbsp;</td>
	<td><input type="submit" class="btn" value="{$L['btn_update']}"/></td>
</tr>
</table>
</form>
<script language="javascript">
function chksettings(){
	if(getId('max_file_size').value.strtrim().length <1){
		alert("{$L['js_max_file_size']}");
		getId('max_file_size').focus();
		return false;
	}
	if(getId('dst').value.strtrim() == ''){
		alert("{$L['downfile_stat_time_error']}");
		getId('dst').focus();
		return false;
	}
	if(getId('perpage').value.strtrim().length <1){
		alert("{$L['js_perpage']}");
		getId('perpage').focus();
		return false;
	}
}
</script>
</div>
</div>
<!--#}#-->
