<!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 type="text/css" rel="stylesheet" href="<?php echo $this->basedir;?>images/admin/public.css" />
<link type="text/css" rel="stylesheet" href="<?php echo $this->basedir;?>images/admin/style.css" />
<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");
});
</script>
<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr align="center" valign="top">
    <td width="*" align="center" valign="top"><!-- ######### begin ######### -->
      <div class="Block">
        <div class="BlockBar">添加用户组</div>
        
        <table width="100%" align="center" cellpadding="4" cellspacing="1" class="tab">
          <form id="form1" name="form1" method="post" action="<?php echo $this->installdir;?>group/add/">
            <tr class="row">
              <td width="17%" class="align-right"><strong>用户组名称：</strong></td>
              <td width="83%"><input name="title" type="text" id="title" value="" />
                *</td>
            </tr>
            <tr class="row">
              <td class="align-right"><strong>组描述：</strong></td>
              <td><textarea name="description" cols="40" rows="3" id="description"></textarea>              </td>
            </tr>
            <tr class="row">
              <td class="align-right"><strong>权限等级：</strong><br /></td>
              <td><input name="flag" type="text" id="flag" value="" size="0" />
                *数字高的用户组可以看数字低的用户组影片。</td>
            </tr>
            <tr class="row">
              <td class="align-right"><strong>点播上限：</strong></td>
              <td><input name="maxlook" type="text" id="maxlook" value="" />
                * 24小时内包月用户最多观看的节目数 </td>
            </tr>
            <tr class="row">
              <td class="align-right"><strong>下载上限：</strong></td>
              <td><input name="maxdown" type="text" id="maxdown" value="0" />
                *24小时内包月用户最多下载的节目数</td>
            </tr>
            <tr class="row">
              <td class="align-right"><strong>重复扣点：</strong></td>
              <td><input name="repeat" type="text" id="repeat" value="" />
                *24小时内重复观看一部影片多少次不扣积分</td>
            </tr>
            <tr class="row">
              <td class="align-right"><strong>限制速度：</strong></td>
              <td><input name="limitspeed" type="radio" class="radio" value="1" id="radio" />
                  <label for="radio">限制</label>
                  <input name="limitspeed" type="radio" class="radio" id="radio1" value="0" checked="checked" />
                  <label for="radio1">不限制</label></td>
            </tr>
            <tr class="row">
              <td class="align-right"><strong>下载速度：</strong></td>
              <td><input name="downspeed" type="text" id="maxspeed" value="0" />
                单位:Kbs</td>
            </tr>
            <tr class="row">
              <td class="align-right"><strong>下载线程：</strong></td>
              <td><input name="maxip" type="text" id="maxip" value="0" />
                单位:Kbs</td>
            </tr>
            <tr class="row">
              <td class="align-right"><strong>绑定 I P：</strong></td>
              <td><input name="lockip" type="radio" class="radio" id="radio2" value="1" checked="checked"/>
                  <label for="radio2">绑定</label>
                  <input name="lockip" type="radio" class="radio" value="0" id="radio3" />
                  <label for="radio3">不绑定</label></td>
            </tr>
            <tr class="row">
              <td class="align-right"><strong>限制流量：</strong></td>
              <td><input name="limitdata" type="radio" class="radio" value="1" id="radio4"/>
                  <label for="radio4">限制</label>
                  <input name="limitdata" type="radio" class="radio" id="radio5" value="0" checked="checked"/>
                  <label for="radio5">不限制</label></td>
            </tr>
            <tr class="row">
              <td class="align-right"><strong>最大流量：</strong></td>
              <td><input name="maxdata" type="text" id="maxdata" value="" />
                单位:M</td>
            </tr>
            <tr class="row">
              <td class="align-right">&nbsp;</td>
              <td><input name="" type="submit" class="btn" value=" 确认添加  " />
                  <input name="button" type="button" class="btn" onclick="javascript:history.back();" value=" 返回列表 " /></td>
            </tr>
          </form>
        </table>
      </div>
      <br />
      <div class="BlockBar">用户组列表</div>
	  <table width="100%" border="0" align="center" cellpadding="4" cellspacing="1" class="tab">
	  <tr class="sub">
		<td width="7%" class="align-center">编号</td>
		<td width="19%" class="align-center">用户组名</td>
		<td width="10%" class="align-center">优先权</td>
		<td width="13%" class="align-center">点播限制</td>
		<td width="11%" class="align-center">下载限制</td>
		<td width="11%" class="align-center">重复扣点</td>
		<td width="8%" class="align-center">速度</td>
		<td width="9%" class="align-center">流量</td>
		<td width="12%" class="align-center">管理</td>
	  </tr>
	  <?php
	  if (count($this->grouplist)>0){
          	foreach ($this->grouplist as $row){?>
	  <tr class="row">
		<td class="align-center"><?php echo $row['id'];?></td>
		<td class="align-center"><?php echo $row['title'];?></td>
		<td class="align-center"><?php echo $row['flag'];?></td>
		<td class="align-center"><?php echo $row['maxlook'] ? $row['maxlook'] : '不限';?></td>
		<td class="align-center"><?php echo $row['maxdown'] ? $row['maxdown'] : '不限';?></td>
		<td class="align-center"><?php echo $row['repeat'] ? $row['repeat'].'集' : '不限';?></td>
		<td class="align-center"><?php echo $row['downspeed'] ? $row['downspeed'].'Kbs' : '不限';?></td>
		<td class="align-center"><?php echo $row['maxdata'] ? $row['maxdata'].'Mbs' : '不限';;?></td>
		<td class="align-center"><a href="<?php echo $this->installdir;?>group/modify/id/<?php echo $row['id'];?>/">编辑</a> <a href="<?php echo $this->installdir;?>group/delete/id/<?php echo $row['id'];?>/">删除</a></td>
	  </tr>
        <?php
          	}
          }else{
          	echo '<tr class="row align-center"><td colspan="9">没有找到任何记录!</td></tr>';
          }?>
	</table>
      <?php echo $this->printpage;?>
      </div>    </td>
  </tr>
</table>
<?php
echo $this->render('copyright');
?>
</body>
</html>
