<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:57:"F:\www\EduWork/./application/admin\view\index\campus.html";i:1476682985;}*/ ?>
<!DOCTYPE html>
<html>
  <head>
    <title>School.html</title>
	
    <meta name="keywords" content="keyword1,keyword2,keyword3">
    <meta name="description" content="this is my page">
    <meta name="content-type" content="text/html; charset=UTF-8">

    <link rel="stylesheet" type="text/css" href="static/css/School.css">
	<meta charset="utf-8">

  </head>
  
  <body>
    <div class="wholeDiv">
    	<div class="topTitle">
    		<div class="outDiv">
    		<div class="schoolImg"><img src="static/img/images/logo.png"/></div><div class="schTxt">校区选择</div>
				<button type="button"  onclick="logout();" style="width:46px;height:46px;margin-left:600px;"></i>Exit</button>
    		</div>
    	</div>
    	<div class="container">
    		<div class="schoolArea">
				<?php if(is_array($campus) || $campus instanceof \think\Collection): $i = 0; $__LIST__ = $campus;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$campu): $mod = ($i % 2 );++$i;?>
					<div class="school">
						<a href="javascript:doPost('','<?php echo $campu['id']; ?>');" title="<?php echo $campu['campus_name']; ?>"  ><div class="schImg"><img src="static/img/images/school.png"/></div></a>
						<a href="javascript:doPost('','<?php echo $campu['id']; ?>');" title="<?php echo $campu['campus_name']; ?>"><div class="sclName"><?php echo $campu['campus_name']; ?></div></a>
						<div class="infoContainer">
							<div class="address txt">地址 : <?php echo $campu['campus_address']; ?></div>
							<div class="openTime txt">创办时间 : <?php echo $campu['campus_createtime']; ?></div>
							<div class="msg txt">留言 : <?php echo $campu['campus_remark']; ?></div>
							<div class="mail txt">昨日收入 : <?php echo $campu['income']; ?> 元</div>
						</div>
						<a href="javascript:doPost('','<?php echo $campu['id']; ?>');" title="<?php echo $campu['campus_name']; ?>"  ><div class="managerBtn">管理校区</div></a>
					</div>
				<?php endforeach; endif; else: echo "" ;endif; ?>
    		</div>
    	</div>
    	<div class="bottomInfo">
    		<div class="bottomOut">
    			<div class="botTxt" style="border-left:0;">关于我们</div>
    			<div class="botTxt">新闻中心</div>
    			<div class="botTxt">资质荣誉</div>
    			<div class="botTxt">网站地图</div>
    			<div class="botTxt">友情链接</div>
    			<div class="botTxt">联系我们</div>
    		</div>
    		<div class="banquan">Copyright©1993-2014 北京新网数码信息技术有限公司 版权所有</div>
    	</div>
    </div>
	<script src="static/plugins/jquery/jquery.min.js"></script>

	<script src="static/js/TeachDialog.js"></script>
	<script>
		function logout() {

						$.ajax({
							url: "admin/Admin/authLogout",
							type: 'post',
							async: false,
							success: function (r) {
								if (r == "1") {
									var ref = "";

									if (window.location.href.indexOf('ref=') != -1) {
										ref = window.location.href.replace(/(.*?)ref=\//, '');
									} else if (window.location.href.indexOf('?campusId=') != -1) {
										ref = window.location.href.substring(0, window.location.href.indexOf('?campusId='));
									}
									window.location.href = ref;
								}

							}

						});
					}

	</script>
	<script>
		function doPost(to, p) {  // to:提交动作（action）,p:参数
			var myForm = document.createElement("form");
			myForm.method = "post";
			myForm.action = to;

			var myInput = document.createElement("input");
			myInput.setAttribute("name", "campusId");  // 为input对象设置name
			myInput.setAttribute("value", p);  // 为input对象设置value
			myInput.setAttribute("type", "hidden");
			myForm.appendChild(myInput);

			document.body.appendChild(myForm);
			myForm.submit();
			document.body.removeChild(myForm);  // 提交后移除创建的form
		}
	</script>
  </body>
</html>
