<!DOCTYPE  html>
<html>
<?php echo $this->fetch('head.html'); ?>
<body>
	<div class="tabs-border">
		<a href="?m=sites" class="item active">校园列表</a>
		<a href="?m=sites&a=add" class="item">添加校园</a>
	</div>
	<div class="main-body">
<div class="search-form">
<form method="get" action="<?php echo $this->_var['appadmin']; ?>">
<input type="hidden" name="m" value="sites" />
名称
<input type="text" class="w150" name="keyword" value="<?php echo html($_GET['keyword']); ?>" />
<button type="submit" class="btn">搜索</button>
</form>
</div>
<table  class="tbs">
	<thead>
  <tr>
    <td width="8%" align="center">siteid</td>
    <td width="22%" align="center">名称</td>
  
 
    <td width="10%" align="center">状态</td>
    <td width="20%" align="center">操作</td>
  </tr>
	</thead>
  <?php $_from = $this->_var['data']; if (!is_array($_from) && !is_object($_from)) { $_from=array();}; $this->push_vars('', 's');if (count($_from)):
    foreach ($_from AS $this->_var['s']):
?>
  <tr>
    <td align="center"><?php echo $this->_var['s']['siteid']; ?></td>
    <td align="center"><?php echo $this->_var['s']['sitename']; ?></td>
    
 
    <td align="center"><?php if ($this->_var['s']['is_open'] == 1): ?>开启<?php else: ?>关闭<?php endif; ?></td>
    <td align="center">
			<a href="<?php echo $this->_var['appadmin']; ?>?m=sites&a=add&siteid=<?php echo $this->_var['s']['siteid']; ?>">编辑</a> 
			<a href="<?php if ($this->_var['s']['domain']): ?>http://<?php echo $this->_var['s']['domain']; ?><?php else: ?>/index.php?siteid=<?php echo $this->_var['s']['siteid']; ?><?php endif; ?>" target="_blank">查看</a>  
    
    <a href="javascript:;" class="delete" url="<?php echo $this->_var['appadmin']; ?>?m=sites&a=delete&ajax=1&siteid=<?php echo $this->_var['s']['siteid']; ?>">删除</a>
    
	<?php if ($this->_var['ssadmin']['isfounder'] || $this->_var['ssadmin']['cityid'] > 0): ?>
    <a href="<?php echo $this->_var['appadmin']; ?>?m=index&setsite=1&siteid=<?php echo $this->_var['s']['siteid']; ?>" target="header-frame">切换</a><?php endif; ?></td>
  </tr>
  <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
  
</table>
<?php echo $this->_var['pagelist']; ?>
<?php echo $this->fetch('footer.html'); ?>