student.php 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <script src="/js/xsgl.js"></script>
  2. <div class="main-content-inner">
  3. <ul class="clearfix main-content-inner-ul">
  4. <?php if(Yii::app()->session['coachInfo']['leader']==1){?>
  5. <li class="pull-left">
  6. <button onclick='location.href="<?php echo $this->createUrl("order/index");?>?type=ordinary"' class="button button_normal button_group button_arrow" data-button="red">普通订单</button>
  7. <img src="/images/line.jpg" style="height:45px;" />
  8. </li>
  9. <li class="pull-left">
  10. <button onclick='location.href="<?php echo $this->createUrl("order/index");?>?type=test"' class="button button_normal button_group button_arrow" data-button="red">试用订单</button>
  11. <img src="/images/line.jpg" style="height:45px;" />
  12. </li>
  13. <li class="pull-left">
  14. <button onclick='location.href="<?php echo $this->createUrl("order/index");?>?type=all"' class="button button_normal button_group button_arrow" data-button="red">统订订单</button>
  15. <img src="/images/line.jpg" style="height:45px;" />
  16. </li>
  17. <li class="pull-left">
  18. <button onclick='location.href="<?php echo $this->createUrl("order/student");?>"' class="button button_normal button_group button_arrow button_active" data-button="red">使用学生名单</button>
  19. <img src="/images/line.jpg" style="height:45px;" />
  20. </li>
  21. <?php }?>
  22. </ul>
  23. <div class="page-content">
  24. <form method="post" action="<?php echo $this->createUrl("order/student");?>">
  25. <div class="col-xs-9">
  26. <div class="dataTables_length margin-zy">
  27. <input type="text" class="form-control input-sm" placeholder="请输入学生姓名" name="realname" value="<?php echo $realname ?>" style="width:105px;display: inline-block;">
  28. <button class="label-primary-s bth-s" id="search" style="padding:4px 12px;">搜索</button>
  29. </div>
  30. </div>
  31. </form>
  32. <div class="row" style="margin:0px;">
  33. <div class="col-xs-12">
  34. <table id="dynamic-table" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable">
  35. <thead>
  36. <tr>
  37. <!--<th>ID</th>-->
  38. <th style="width: 130px;">姓名</th>
  39. <th style="width: 130px;">准考证号</th>
  40. <?php
  41. $typeid=array();
  42. foreach($goodtype as $v){
  43. $typeid[]=$v->id;
  44. ?>
  45. <th style="width: 130px;"><?php echo $v->goods_type_name ?></th>
  46. <th style="width: 130px;">起止时间</th>
  47. <?php } ?>
  48. </tr>
  49. </thead>
  50. <tbody>
  51. <?php foreach($stu_order as $v){
  52. $goods_type_info=array();
  53. $type_id= explode(",",$v['type_id']);
  54. $trial_begin_time= explode(",",$v['trial_begin_time']);
  55. $trial_end_time= explode(",",$v['trial_end_time']);
  56. $semcode= explode(",",$v['code']);
  57. foreach($type_id as $k=>$tv){
  58. if(isset($trial_end_time[$k])&&!empty($trial_end_time[$k])){
  59. $begintime= explode (" ", $trial_begin_time[$k]);
  60. $endtime= explode (" ", $trial_end_time[$k]);
  61. $goods_type_info[$tv]=$begintime[0]."至".$endtime[0];
  62. }else {
  63. if(isset($semtime[$semcode[$k]])){
  64. $begintime= explode (" ", $semtime[$semcode[$k]]['start_time']);
  65. $endtime= explode (" ", $semtime[$semcode[$k]]['end_time']);
  66. $goods_type_info[$tv]=$begintime[0]."至".$endtime[0];
  67. }
  68. }
  69. }
  70. ?>
  71. <tr>
  72. <td><?php echo $v['student_name']?></td>
  73. <td><?php echo isset($v['student_card'])?$v['student_card']:"";?></td>
  74. <?php foreach($typeid as $tv){
  75. if(isset($goods_type_info[$tv])){
  76. echo '<td><span class="label label-sm label-success">已开通</span></td>';
  77. echo '<td>'.$goods_type_info[$tv].'</td>';
  78. }else{
  79. echo '<td><span class="label label-sm label-warning">未开通</span></td>';
  80. echo '<td>-</td>';
  81. }
  82. } ?>
  83. </tr>
  84. <?php } ?>
  85. </tbody>
  86. </table>
  87. <div class="col-xs-5" style="width: 90%">
  88. <div class="dataTables_paginate paging_simple_numbers">
  89. <ul id="yw0" class="yiiPager">
  90. <li class="previous <?php if($page==1||$totalpage==0){ echo "hidden";} ?>"><a href="<?php echo $this->createUrl("order/student",array("page"=>$page-1,"realname"=>$realname));?>">上一页</a></li>
  91. <?php
  92. $i=1;
  93. if($page>=5){
  94. $i=$page-4;
  95. }
  96. $end=$totalpage;
  97. if($totalpage-$page>=5){
  98. $end=$page+5;
  99. }
  100. for($i;$i<=$end;$i++){ ?>
  101. <li class="page <?php if($page==$i){ echo "selected";} ?>"><a href="<?php echo $this->createUrl("order/student",array("page"=>$i,"realname"=>$realname));?>"><?php echo $i ?></a></li>
  102. <?php } ?>
  103. <li class="next <?php if($page==$totalpage||$totalpage==0){ echo "hidden";} ?>"><a href="<?php echo $this->createUrl("order/student",array("page"=>$page+1,"realname"=>$realname));?>">下一页</a></li>
  104. </ul>共:<?php echo $count ?>条
  105. </div>
  106. </div>
  107. </div>
  108. <!-- PAGE CONTENT ENDS -->
  109. </div>
  110. </div>
  111. </div>