<!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>
<title>系统后台</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="../../images/admin/public.css" rel="stylesheet" type="text/css" />
<link href="../../images/admin/style.css" rel="stylesheet" type="text/css" />
<script src="<?php echo $this->basedir;?>js/jquery.js" language="javascript"></script>
<script language="javascript">
$(document).ready(function() {
     $("#ta tr").mouseover(function(){
      $(this).addClass("over");
     });
     $("#ta tr").mouseout(function(){
      $(this).removeClass("over");
     });
	 $("#ta tr:even").addClass("double");
	 $('#mostrar').click(function(){$('#sh').toggle();});
	 /*全选*/
	 $("#checkall").click(function() {
	 	$("input[@name='id[]']").each(function() {
			$(this).attr("checked", $('#checkall').attr('checked'));
		});
	});
});
function checkSubmit(){
	var obj = document.form1;
	if (obj.picture.value == ''){
		alert('请选择上传文件!')
		obj.picture.focus();
		return false;
	}
	document.getElementById('btn').disabled=true;
	return true;
}
</script>
<body>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
  <tr align="center" valign="top">
    <td width="*" align="center" valign="top">
	<!-- ######### begin ######### -->
      <div class="Block">
        <div class="BlockBar">添加幻灯片公告</div>
        <table cellspacing="1" cellpadding="4" class="tab">
		<form action="<?php echo $this->installdir;?>flash/add/" method="post" enctype="multipart/form-data" name="form1" id="form1" onsubmit="return checkSubmit();">
			   <tr class="row">
				<td width="14%" class="align-right">标题：</td>
				<td>
			     <input name="title" type="text" id="title" size="30" maxlength="100" />
			     * 限100个字符				</td>
			  </tr>
			   <tr class="row">
			     <td class="align-right">图片：</td>
			     <td><input name="picture" type="file" id="picture" />
			       *</td>
	        </tr>
			   <tr class="row">
			     <td class="align-right">链接：</td>
			     <td><input name="link" type="text" id="link" size="30" /></td>
	        </tr>
			   <tr class="row">
			     <td class="align-right">状态：</td>
			     <td><input name="locked" type="radio" class="radio" value="0" checked="checked" />
		           已审核
		           <input name="locked" type="radio" class="radio" value="1" />
		           已禁用</td>
	        </tr>
			   <tr class="row">
			     <td class="align-right">&nbsp;</td>
			     <td><input type="submit" class="btn" value=" 添 加 " id="btn" />&nbsp;<input type="button" class="btn" value=" 返回上一页 " onclick="history.back()" /></td>
	        </tr>
        </form>
        </table>
		<form id="form2" name="form2" method="post" action="<?php echo $this->installdir;?>flink/post/">
        <table width="100%" border="0" cellpadding="1" cellspacing="1" class="tab">
          <tr class="sub">
            <td width="10%" class="align-center">编号</td>
            <td width="18%" class="align-center">标题</td>
            <td width="32%" class="align-center">链接</td>
            <td width="26%" class="align-center">LOGO</td>
            <td width="14%" class="align-center">管理</td>
          </tr>
		  <?php
		  foreach($this->rows as $row){?>
          <tr class="row">
            <td class="align-center"><?php echo $row['id'];?></td>
            <td class="align-center"><a href="<?php echo $this->installdir;?>flash/modify/id/<?php echo $row['id'];?>/"><?php echo $row['title'];?></a></td>
            <td class="align-center"><a href="<?php echo $row['link'];?>" target="_blank"><?php echo $row['link'];?></a></td>
            <td class="align-center"><?php if($row['picture']){?><img src="<?php echo $this->basedir.$row['picture'];?>" width="100" /><?php }?></td>
            <td class="align-center"><a href="<?php echo $this->installdir;?>flash/modify/id/<?php echo $row['id'];?>/">编辑</a> <a href="<?php echo $this->installdir;?>flash/delete/id/<?php echo $row['id'];?>/" onclick="return confirm('确认删除吗')">删除</a>&nbsp;<a href="<?php echo $this->installdir;?>flash/locked/id/<?php echo $row['id'];?>/" onclick="return confirm('确认删除吗')"><?php if($row['locked'] ==0 ){echo '<font color=red>启用中</font>';}else{echo '已禁用';};?></a></td>
          </tr>
		  <?php }?>
        </table>
        <table width="100%" border="0">
          <tr>
            <td><?php echo $this->printpage;?></td>
          </tr>
        </table></form>
      </div>
      <div id="App-Version-Prompt" style="display:none;">
        <div class="space"></div>
        <div class="Block">
          <div class="BlockBar">版本更新信息</div>
          <div class="BlockContent" id="App-Version-Prompt-Body" style="padding:20px 5px 20px 5px; text-align:center; background:#FFFFCC;">loading...</div>
        </div>
      </div>
      <!-- ########## end ########## -->
    </td>
  </tr>
</table>
<?php
echo $this->render('copyright');
?>
</body>
</html>

