<?php if (!defined('THINK_PATH')) exit();?><!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>已加入项目管理</title>
<link href="__PUBLIC__/Admin/css/style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__PUBLIC__/Admin/js/jquery.js"></script>
<script type="text/javascript" src="__PUBLIC__/Admin/js/jquery.validate.js"></script>
<script type="text/javascript" src="__PUBLIC__/Admin/js/jquery.metadata.js"></script>
</head>
<body>
<script language="JavaScript">
function myrefresh(){
window.location.reload();
}
setTimeout('myrefresh()',50000); //指定50秒刷新一次
</script>
 <div class="page_tilte">
        &nbsp;&nbsp;已加入项目管理
    </div>
    <br />
   <form id="form1" name="form1" method='post' action='' style='margin: 0px'>
  <tr bgcolor="white" style="height: 38px;"> 
        <td id="searchTD" style="text-align: center" colspan="7">
        <select name="type" id="type">
          <option value="1">账号</option>
        </select>&nbsp;&nbsp;<input type="text" name="keyword">
        <input type="submit" value="立即查询" /> 
            </td>
  </tr>
  </form>
    <table id="DataListing" cellspacing="1" cellpadding="0" width="100%" align="Center" border="0" style="font-size: 12px" bgcolor="#C1DAD7"> 
  <form id="form1" name="form1" method='get' action='' style='margin: 0px'>
  <tr class="repeaterHead" height="32px" style="text-align: center">
    <td>编号</td>
    <td>会员账号</td>
    <td>项目名称</td>
    <td>投资金额</td>
    <td>加入时间</td>
    <td>下一次返款时间</td>
    <td>已经领取次数</td>
    <td>可领取次数</td>
    <td>返款金额</td>
    <td>操作</td>
    <td>系统时间</td>
  </tr>

  <?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><tr class="repeaterTd0" style="text-align:center;">
    <td><?php echo ($vo["id"]); ?></td>
     <?php  $uid = idToUser($vo['username']); ?>
    <td><a href='<?php echo U('Member/edit',array('id'=>$uid));?>'><?php echo ($vo["username"]); ?></a></td>
    <td><?php echo ($vo["title"]); ?></td>
    <td><?php echo ($vo["amount"]); ?></td>
    <td><?php echo ($vo["useritem_time"]); ?></td>
    <td><?php echo ($vo["useritem_time2"]); ?></td>
    <td><?php echo ($vo["useritem_count"]); ?></td>
    <td><?php echo ($vo["sendDay_count"]); ?></td>
    <td><?php  
            if($vo['hkfs'] == 0){
                $moneyCount = $vo['jyrsy'] * $vo['amount']/100;echo round($moneyCount,2);
            }else{
               $moneyCount = $vo['jyrsy'] * $vo['amount']/100*$vo['shijian'];
               echo round($moneyCount,2);
            }
    ?></td>
    <td><a href='<?php echo U('Project/buydelete',array('id'=>$vo['id']));?>' onclick='return cons()'>删除</a></td>
    <td>
      <?php  
          if($vo['useritem_count'] >= $vo['sendDay_count']){
            echo "已经结束";  
          }else{ 
      ?>
      <?php  if($vo['useritem_time2'] < date('Y-m-d H:i:s',time()) and $vo['useritem_count']< $vo['sendDay_count']){ 
          $str = "id2=".$vo['id']."&zhouqi=".$vo['shijian']."&money=".$moneyCount."&user=".$vo['username']."&id=".$vo['projectId']."&qxdw=".$vo['qxdw'];
      ?>
	  

      <a id="fayong" href='<?php echo U('Project/getDo');?>?<?php echo $str; ?>'><font color="#FF0000"><strong>发佣</strong></font></a> 
	  
	  <script>
    document.getElementById("fayong").click();
</script>
	  
      <?php  }else{ ?>当前时间
      <?php
echo date('Y-m-d H:i:s',time());
	  } ?>
      <?php } ?>
    </td>
  </tr><?php endforeach; endif; else: echo "" ;endif; ?>

  <tr  class="repeaterTd0" style="text-align:center;">
    <td class="PagerClass" colspan="13"><?php echo ($page); ?></td>
  </tr>
</table>
 </form>
 <p>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bordercolor="#ffffff" class="tableBorder" style="border-collapse: collapse">
  <tbody><tr bgcolor="#0EBDF6">
    <td colspan="8" height="25" align="center"><b><a href="<?php echo U('Project/getDo2');?>"><font color="#FF0000"><strong>一键全部分红</strong></font></a></b></td>
  </tr>
</tbody></table>
<br>
<br>
</p>
<script type="text/javascript">
  function cons(){
      var msg=confirm("确认操作？");
      if(msg!="0")
      {
          return true;
      }
      else
      {
          return false;
      }
  }
</script>
</body>
</html>