<!--#
##
#	Project: PHPDISK File Storage Solution
#	This is NOT a freeware, use is subject to license terms.
#
#	Site: http://www.phpdisk.com
#
#	$Id: navigation.tpl.html 2 2011-05-27 02:59:23Z along $
#
#	Copyright (C) 2008-2011 PHPDisk Team. All Rights Reserved.
#
##
#-->
<!--#
if($action == 'index'){
#-->
<div id="container">
<h1>{$L['navigation_title']}<!--#sitemap_tag($L['navigation_title']);#--></h1>
<div>
<div class="tips_box"><img class="img_light" src="images/light.gif" align="absmiddle" /> <b>{$L['tips']}: </b>
<span class="txtgray">{$L['navigation_list_tips']}</span>
</div>
<form name="link_form" action="{#urr("admincp","item=navigation")#}" method="post">
<input type="hidden" name="action" value="{$action}" />
<input type="hidden" name="task" value="update" />
<input type="hidden" name="formhash" value="{$formhash}" />
<table align="center" width="100%" cellpadding="4" cellspacing="0" border="0" class="td_line">
<!--#
if(count($navigations)){
#-->
<tr>
	<td width="30" align="center" class="bold">{$L['show_order']}</td>
	<td class="bold">{$L['text']}</td>
	<td width="35%" class="bold">{$L['href']}</td>
	<td class="bold">{$L['target']}</td>
	<td class="bold">{$L['position']}</td>
	<td class="bold">{$L['operation']}</td>
</tr>
<!--#
	foreach($navigations as $k => $v){
#-->
<tr>
	<td>
	<input type="text" name="show_order[]" value="{$v['show_order']}" style="width:20px; text-align:center" maxlength="2" />
	<input type="hidden" name="navids[]" value="{$v['navid']}" />
	</td>
	<td><input type="text" name="nav_texts[]" value="{$v['text']}" /></td>
	<td><a href="{$v['href']}" target="_blank">{$v['href']}</a></td>
	<td>{$v['target']}</td>
	<td>{$v['position']}</td>
	<td><a href="{$v['a_modify_nav']}" id="p_{$k}"><img src="images/menu_edit.gif" align="absmiddle" border="0" /></a>
	<div id="c_{$k}" class="menu_box2 menu_common">
	<a href="{$v['a_modify_nav']}">{$L['modify']}</a>
	<a href="{$v['a_delete_nav']}" onclick="return confirm('{$L['navigation_delete_confirm']}');">{$L['delete']}</a>
	</div>
	<script type="text/javascript">on_menu('p_{$k}','c_{$k}','-x','');</script>
	</td>
</tr>
<!--#
	}
	unset($navigations);
}else{	
#-->
<tr>
	<td>{$L['navigation_not_found']}</td>
</tr>
<!--#
}
#-->
<tr>
	<td align="center" colspan="6"><input type="button" class="btn" value="{$L['add_new_navigation']}" onclick="go('{#urr("admincp","item=navigation&action=add_nav")#}');" /> <input type="submit" class="btn" value="{$L['btn_update']}" /></td>
</tr>
</table>
</form>
</div>
</div>
<!--#
}elseif($action =='add_nav' || $action =='modify_nav'){
#-->
<div id="container">
<!--#if($action =='add_nav'){#-->
<h1>{$L['add_navigation_title']}</h1>
<!--#}else{#-->
<h1>{$L['edit_navigation_title']}</h1>
<!--#}#-->
<div>
<div class="tips_box"><img class="img_light" src="images/light.gif" align="absmiddle" /> <b>{$L['tips']}: </b>
<span class="txtgray">{$L['add_navigation_tips']}</span>
</div>
<form action="{#urr("admincp","item=navigation")#}" method="post" onsubmit="return dosubmit(this);">
<input type="hidden" name="action" value="{$action}" />
<input type="hidden" name="task" value="{$action}" />
<input type="hidden" name="navid" value="{$navid}" />
<input type="hidden" name="formhash" value="{$formhash}" />
<table align="center" width="100%" cellpadding="4" cellspacing="0" border="0" class="td_line">
<tr>
	<td width="30%">{$L['nav_text']}:</td>
	<td><input type="text" name="nav_text" value="{$nav_text}" maxlength="30" /></td>
</tr>
<tr>
	<td>{$L['nav_title']}:</td>
	<td><input type="text" name="nav_title" value="{$nav_title}" maxlength="50" /></td>
</tr>
<tr>
	<td>{$L['nav_href']}:</td>
	<td><input type="text" name="nav_href" size="50" value="{$nav_href}" maxlength="80" /></td>
</tr>
<tr>
	<td>{$L['nav_target']}:</td>
	<td>
	<select name="nav_target">
		<option {#ifselected('_self',$nav_target,'str')#}>_self</option>
		<option {#ifselected('_blank',$nav_target,'str')#}>_blank</option>
		<option {#ifselected('_parent',$nav_target,'str')#}>_parent</option>
		<option {#ifselected('_top',$nav_target,'str')#}>_top</option>
	</select>
	</td>
</tr>
<tr>
	<td>{$L['nav_position']}:</td>
	<td><input type="radio" name="nav_position" value="top" id="top" {#ifchecked('top',$nav_position,'str')#} /><label for="top">{$L['position_top']}</label>&nbsp;<input type="radio" name="nav_position" value="bottom" id="bottom" {#ifchecked('bottom',$nav_position,'str')#}/><label for="bottom">{$L['position_bottom']}</label></td>
</tr>
<tr>
	<td>&nbsp;</td>
	<td><input type="submit" class="btn" value="{$L['btn_submit']}"/>&nbsp;&nbsp;<input type="button" class="btn" value="{$L['btn_back']}" onclick="javascript:history.back();" /></td>
</tr>
</table>
</form>
</div>
</div>
<script language="javascript">
function dosubmit(o){
	if(o.nav_text.value.strtrim().length <1){
		alert("{$L['nav_text_error']}");
		o.nav_text.focus();
		return false;
	}
	if(o.nav_href.value.strtrim().length <7){
		alert("{$L['nav_href_error']}");
		o.nav_href.focus();
		return false;
	}
}
</script>
<!--#
}
#-->
