<?php
/**
 * 拒绝直接访问模板
 */ 
if(ZIBANMA_SYS_LINK != 'zibanma_com'){
	die('access deny');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>main</title>
<link href="/template/admin/style/style.css" rel="stylesheet" type="text/css" />
<link href="/library/editor/themes/default/default.css" rel="stylesheet" />
<script src="/library/jquery/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="/library/editor/kindeditor-min.js" type="text/javascript"></script>
<script src="/library/editor/lang/zh_CN.js" type="text/javascript"></script>
<script src="/library/js/zibanma.admin.js" type="text/javascript"></script>
<style type="text/css">
td { background-color:#006699; text-indent:5px; height:28px;}
</style>
<script type="text/javascript">zibanma.adminLoadSingleUpload();</script>
</head>
<body id="main">
	<div class="body">
		<div class="title"><?php echo $menu_name;?></div>
		<div class="content">
			<table style="width:800px;">
				<tr>
					<td>焦点名称</td>
					<td width="40%">跳转地址</td>
					<td width="10%">打开方式</td>
					<td width="10%">排序</td>
					<td width="10%">删除</td>
				</tr>
				<?php 
				if(count($focus_list)):
					foreach ($focus_list as $v):
				?>
				<tr>
					<td><?php echo $v->title;?></td>
					<td><?php echo $v->url;?></td>
					<td><?php echo substr($v->target, 1, strlen($v->target));?></td>
					<td><input type="text" value="<?php echo $v->sort;?>" style="width:45px; text-align:center;" onblur="zibanma.adminListSort({'id':<?php echo $v->id;?>,'value':this.value}, '<?php echo $common->get_rewriter_url('admin-focus_sort');?>')" /></td>
					<td><a href="javascript:zibanma.adminDeleteIterm('<?php echo $common->get_rewriter_url_arr(array('admin','focus_delete',$v->id));?>');">删除</a></td>
				</tr>
				<?php 
					endforeach;
				endif;
				?>
			</table>
		</div>
		
		<div class="content" style=" margin-top:10px;">
			<form action="<?php echo $addurl;?>" method="post">
			<table style="width:800px;">
				<tr>
					<td colspan="6" style="text-indent:10px;">添加焦点图</td>
				</tr>
				<tr>
					<td style="text-align:right;">焦点图名称：</td>
					<td><input type="text" name="title" class="input" /></td>
				</tr>
				<tr>
					<td style="text-align:right;">上传图片：</td>
					<td>
					<input type="button" id="zibanma_select_image" class="button" value="选择图片" />
					<span id="image_view"></span>
					<input type="hidden" id="image" name="image" />
					</td>
				</tr>
				<tr>
					<td style="text-align:right;">打开方式：</td>
					<td>
						<select name="target" class="select">
							<option value="1">_self :本窗口</option>
							<option value="2">_blank :新窗口</option>
						</select>
					</td>
				</tr>
				<tr>
					<td style="text-align:right;">跳转地址：</td>
					<td><input type="text" name="url" class="input" value="<?php echo $http_host;?>" /> 可使用绝对路径，如&nbsp;&nbsp;<font style="font-weight:bold;">/news-category-5/</font></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><input type="submit" class="button" value="确认提交" /></td>
				</tr>
			</table>
			</form>
		</div>
	</div>
</body>
</html>