<!--#
##
#	Project: PHPDISK File Storage Solution
#	This is NOT a freeware, use is subject to license terms.
#
#	Site: http://www.phpdisk.com
#
#	$Id: folders.tpl.php 64 2016-07-30 14:01:18Z along $
#
#	Copyright (C) 2008-2016 PHPDisk Team. All Rights Reserved.
#
##
#-->
<?php !defined('IN_PHPDISK') && exit('[PHPDisk] Access Denied!'); ?>
<!--#
if($action == 'folder_modify'){
#-->
<div id="container">
<div class="box_style">
<form action="{#urr("mydisk","item=folders")#}" method="post" onsubmit="return dosubmit(this);">
<input type="hidden" name="action" value="{$action}" />
<input type="hidden" name="task" value="{$action}" />
<input type="hidden" name="folder_id" value="{$folder_id}" />
<input type="hidden" name="ref" value="{$ref}" />
<input type="hidden" name="formhash" value="{$formhash}" />
<li><?=__('parent_folder')?>:</li>
<li><select name="parent_id">
	<option value="-1" class="txtblue" {#ifselected($folder[parent_id],'-1','str')#} >根目录</option>
	{#get_folder_option(-1,$folder['parent_id'])#}
	</select>
</li>
<li><?=__('folder_name')?>:</li>
<li><input type="text" name="folder_name" value="{$folder['folder_name']}" size="30" maxlength="50" /></li>
<li><span id="e_1" class="txtred"></span></li>
<li><?=__('folder_description')?>(<?=__('optional')?>): </li>
<li><textarea name="folder_description" style="width:250px; height:80px;">{$folder['folder_description']}</textarea></li>
<li><input type="submit" class="btn_green" value="<?=__('btn_submit')?>" /></li>
</form>
</div>
</div>
<script language="javascript">
function dosubmit(o){
	if(o.folder_name.value.strtrim().length <2){
		getId('e_1').innerText = "<?=__('folder_min_length')?>";
		o.folder_name.focus();
		return false;
	}
}
</script>
<!--#
}elseif($action == 'folder_create'){
#-->
<div id="container">
<div class="box_style">
	<form action="{#urr("mydisk","item=folders")#}" method="post" onsubmit="return dosubmit(this);">
	<input type="hidden" name="action" value="{$action}" />
	<input type="hidden" name="task" value="{$action}" />
	<input type="hidden" name="ref" value="{$ref}" />
	<input type="hidden" name="formhash" value="{$formhash}" />
	<li><?=__('parent_folder')?>:</li>
	<li><select name="parent_id">
		<option value="-1" class="txtblue" >根目录</option>
		{#get_folder_option();#}
		</select>
	</li>
	<li><?=__('folder_name')?>:</li>
	<li><input type="text" name="folder_name" value="{$folder['folder_name']}" size="30" maxlength="50" /></li>
	<li><?=__('folder_description')?>(<?=__('optional')?>):</li>
	<li><textarea name="folder_description" style="width:250px; height:80px;">{$folder['description']}</textarea></li>
	<li><input type="submit" class="btn_green" value="<?=__('btn_submit')?>" /></li>
	</form>
	<script language="javascript">
	function dosubmit(o){
		if(o.folder_name.value.strtrim().length <1){
			atips("<?=__('folder_min_length')?>");
			o.folder_name.focus();
			return false;
		}
	}
	</script>
	</div>
</div>
<!--#
}elseif($action =='folder_delete'){
#-->
<div id="container">
<div class="box_style">
<form action="{#urr("mydisk","item=folders")#}" method="post">
<input type="hidden" name="action" value="{$action}" />
<input type="hidden" name="task" value="{$action}" />
<input type="hidden" name="folder_id" value="{$folder_id}" />
<input type="hidden" name="ref" value="{$ref}" />
<input type="hidden" name="formhash" value="{$formhash}" />
<div class="cfm_info">
<li><img src="images/folder.gif" border="0" align="absmiddle" />&nbsp;<span class="txtgreen">{$folder_name}</span></li>
<li><?=__('delete_folder_confirm')?></li>
<li>&nbsp;</li>
<li><input type="submit" class="btn_green" value="<?=__('btn_submit')?>" /></li>
</div>
</form>
</div>
</div>
<!--#}#-->