reset.php 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. <style>
  2. .addborder{border:1px solid #ccc}
  3. .addheight{height:30px;border-radius:2px;}
  4. .addheight:focus{border-color: #66afe9;box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(102, 175, 233, 0.6);outline: 0 none;}
  5. .ace{position:relative;top:0px !important;left:0px !important;}
  6. label{font-weight:100 !important;}
  7. </style>
  8. <script src="/js/jquery.validate.min.js"></script>
  9. <script type="text/javascript">
  10. jQuery(document).ready(function(){
  11. jQuery("#schoolSubmit").click(function(){
  12. var grade = $(".diy_select_txt").text();
  13. var class_name = $(".diy_select_txt1").text();
  14. var _text = '';
  15. var pwd = $("#pwd").val();
  16. if(pwd.length < 6 )
  17. {
  18. layer.msg('密码不能小于6位');
  19. return false;
  20. }
  21. if(grade=='全年级' && class_name=='全班级')
  22. {
  23. _text = '全年级';
  24. }else{
  25. _text = grade+class_name;
  26. }
  27. var msg = '确定重置'+_text+'学生密码吗?';
  28. layer.msg(msg, {
  29. time: 0,
  30. btn: ['确定', '取消'],
  31. yes: function(index){
  32. layer.close(index);
  33. jQuery(this).attr("disabled", true);
  34. jQuery("#classAdd").submit();
  35. }
  36. });
  37. });
  38. });
  39. </script>
  40. <div class="main-content-inner">
  41. <ul class="clearfix main-content-inner-ul">
  42. <?php if(Yii::app()->session['coachInfo']['leader']==1){?>
  43. <li class="pull-left">
  44. <button onclick='location.href="<?php echo $this->createUrl("semester/index");?>"' class="button button_normal button_group button_arrow" data-button="red">学期管理</button>
  45. <img src="/images/line.jpg" style="height:45px;" />
  46. </li>
  47. <?php }?>
  48. <li class="pull-left">
  49. <button onclick='location.href="<?php echo $this->createUrl("teacher/index");?>"' class="button button_normal button_group button_arrow" data-button="red">教师管理</button>
  50. <img src="/images/line.jpg" style="height:45px;" />
  51. </li>
  52. <li class="pull-left">
  53. <button onclick='location.href="<?php echo $this->createUrl("classes/index");?>"' class="button button_normal button_group button_arrow " data-button="red">班级管理</button>
  54. <img src="/images/line.jpg" style="height:45px;" />
  55. </li>
  56. <li class="pull-left">
  57. <button onclick='location.href="<?php echo $this->createUrl("studentinfo/index");?>"' class="button button_normal button_group button_arrow button_active" data-button="red">学生管理</button>
  58. <img src="/images/line.jpg" style="height:45px;" />
  59. </li>
  60. <?php if(Yii::app()->session['coachInfo']['leader']==1){ ?>
  61. <li class="pull-left">
  62. <button onclick='location.href="<?php echo $this->createUrl("school/add");?>"' class="button button_normal button_group button_arrow" data-button="red">学校管理</button>
  63. <img src="/images/line.jpg" style="height:45px;" />
  64. </li>
  65. <?php } ?>
  66. <li class="pull-left">
  67. <button onclick='location.href="<?php echo $this->createUrl("classes/export");?>"' class="button button_normal button_group button_arrow " data-button="red">导出学生</button>
  68. <img src="/images/line.jpg" style="height:45px;" />
  69. </li>
  70. <!-- <li class="pull-left">
  71. <button onclick='location.href="<?php /*echo $this->createUrl("school/add");*/?>"' class="button button_normal button_group button_arrow" data-button="red">学校管理</button>
  72. <img src="/images/line.jpg" style="height:45px;" />
  73. </li> -->
  74. </ul>
  75. <div class="page-content" style="margin-top:15px;">
  76. <div class="row" style="margin:0px;">
  77. <div class="col-xs-12">
  78. <!-- PAGE CONTENT BEGINS -->
  79. <form enctype="multipart/form-data" class="form-horizontal" action="<?php echo $this->createUrl('classes/resetpwd');?>" method="post" id="classAdd">
  80. <div class="form-group">
  81. <label class="control-label col-xs-12 col-sm-3 no-padding-right">选择年级:</label>
  82. <div class="col-sm-9">
  83. <div class='diy_select' style="width: 131px">
  84. <input type='hidden' id="grade" name="grade" class='diy_select_input' value="0" />
  85. <div class='diy_select_txt' >全年级</div>
  86. <div class='diy_select_btn'></div>
  87. <ul class='diy_select_list'>
  88. <li val="0">全年级</li>
  89. <?php
  90. if(Yii::app()->params['grade_config']){
  91. foreach (Yii::app()->params['grade_config'] as $id => $val){
  92. echo ' <li val="'.$id.'">'.$val['grade_name'].'</li>';
  93. }
  94. }
  95. ?>
  96. </ul>
  97. </div>
  98. </div>
  99. </div>
  100. <div class="form-group">
  101. <label class="control-label col-xs-12 col-sm-3 no-padding-right">选择班级:</label>
  102. <div class="col-sm-9">
  103. <div class='diy_select1' style="border: 1px solid #ccc;width: 131px">
  104. <input type='hidden' id="class_id" name="class_id" class='diy_select_input1' value="0" />
  105. <div class='diy_select_txt1' >全班级</div>
  106. <div class='diy_select_btn1'></div>
  107. <ul class='diy_select_list1'>
  108. <li val="0">全班级</li>
  109. </ul>
  110. </div>
  111. </div>
  112. </div>
  113. <div class="form-group">
  114. <label class="control-label col-xs-12 col-sm-3 no-padding-right">设置密码:</label>
  115. <div class="col-xs-12 col-sm-9 mtCentent">
  116. <input type="password" name="pwd" id="pwd" class="col-xs-10 col-sm-3 addborder addheight marginLeftNo" placeholder="密码" />
  117. </div>
  118. </div>
  119. <div class="clearfix form-actions">
  120. <div class="col-md-offset-3 col-md-9">
  121. <button class="btn btn-success btn-sm" type="button" id="schoolSubmit">
  122. <i class="ace-icon fa fa-check bigger-110"></i>
  123. 重置密码
  124. </button>
  125. </div>
  126. </div>
  127. <div class="form-group">
  128. <div class="control-label col-xs-3 col-sm-3">
  129. </div>
  130. </div>
  131. </form>
  132. <!-- PAGE CONTENT ENDS -->
  133. </div>
  134. </div>
  135. </div>
  136. </div>
  137. <script src="/js/xsgl.js"></script>
  138. <script>
  139. $(function(){
  140. $(".diy_select_list").click(function(){
  141. var grade = $("#grade").val();
  142. var html = '<li val="0">全班级</li>';
  143. if(grade>0){
  144. var data={
  145. grade:grade,
  146. semester_id:"<?php echo $semester_id?>"
  147. };
  148. $.post("<?php echo Yii::app()->createUrl('classes/ajax_class')?>",data,function(flags){
  149. var m = JSON.parse(flags);
  150. if(m.status>0)
  151. {
  152. $.each(m.data,function(index,val){
  153. html+='<li val="'+val.class_id+'">'+val.class_name+'</li>'
  154. });
  155. $('.diy_select_list1').html(html);
  156. }else
  157. {
  158. $('.diy_select_list1').html(html);
  159. }
  160. });
  161. }else
  162. {
  163. $('.diy_select_list1').html(html);
  164. }
  165. });
  166. });
  167. </script>