import.php 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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 msg = '只支持全班批量导入,请看<span style="color: red">红色字</span>注意事项?';
  13. var msg = '确定导入学生吗?格式是否正确?';
  14. layer.msg(msg, {
  15. time: 0,
  16. btn: ['确定', '取消'],
  17. yes: function(index){
  18. layer.close(index);
  19. jQuery(this).attr("disabled", true);
  20. jQuery("#classAdd").submit();
  21. }
  22. });
  23. });
  24. jQuery(".rest").click(function(){
  25. jQuery("input[name=exname]").val('');
  26. });
  27. });
  28. </script>
  29. <div class="main-content-inner">
  30. <ul class="clearfix main-content-inner-ul">
  31. <?php if(Yii::app()->session['coachInfo']['leader']==1){?>
  32. <li class="pull-left">
  33. <button onclick='location.href="<?php echo $this->createUrl("semester/index");?>"' class="button button_normal button_group button_arrow" data-button="red">学期管理</button>
  34. <img src="/images/line.jpg" style="height:45px;" />
  35. </li>
  36. <?php }?>
  37. <li class="pull-left">
  38. <button onclick='location.href="<?php echo $this->createUrl("teacher/index");?>"' class="button button_normal button_group button_arrow" data-button="red">教师管理</button>
  39. <img src="/images/line.jpg" style="height:45px;" />
  40. </li>
  41. <li class="pull-left">
  42. <button onclick='location.href="<?php echo $this->createUrl("classes/index");?>"' class="button button_normal button_group button_arrow button_active" data-button="red">班级管理</button>
  43. <img src="/images/line.jpg" style="height:45px;" />
  44. </li>
  45. <li class="pull-left">
  46. <button onclick='location.href="<?php echo $this->createUrl("studentinfo/index");?>"' class="button button_normal button_group button_arrow" data-button="red">学生管理</button>
  47. <img src="/images/line.jpg" style="height:45px;" />
  48. </li>
  49. <?php if(Yii::app()->session['coachInfo']['leader']==1){ ?>
  50. <li class="pull-left">
  51. <button onclick='location.href="<?php echo $this->createUrl("school/add");?>"' class="button button_normal button_group button_arrow" data-button="red">学校管理</button>
  52. <img src="/images/line.jpg" style="height:45px;" />
  53. </li>
  54. <?php } ?>
  55. <li class="pull-left">
  56. <button onclick='location.href="<?php echo $this->createUrl("classes/export");?>"' class="button button_normal button_group button_arrow " data-button="red">导出学生</button>
  57. <img src="/images/line.jpg" style="height:45px;" />
  58. </li>
  59. </ul>
  60. <div class="page-content" style="margin-top:15px;">
  61. <div class="row" style="margin:0px;">
  62. <div class="col-xs-12">
  63. <!-- PAGE CONTENT BEGINS -->
  64. <form enctype="multipart/form-data" class="form-horizontal" action="<?php echo $this->createUrl('classes/import',array('cid'=>$cid));?>" method="post" id="classAdd">
  65. <div class="form-group">
  66. <label class="control-label col-xs-12 col-sm-3 no-padding-right">上传Excel<span class="errorMessage">*</span>:</label>
  67. <div class="col-sm-9">
  68. <input type="file" id="exname" name="exname" class="col-xs-10 col-sm-3" />
  69. </div>
  70. </div>
  71. <div class="form-group">
  72. <label class="control-label col-xs-12 col-sm-3 no-padding-right">&nbsp;</label>
  73. <div class="col-sm-9">
  74. <div style="margin-top:8px" class="col-sm-9"><a href="/assets/data/导入学生示例.xls">下载Excel表格示例</a></div>
  75. <!--<div style="margin-top:8px" class="col-sm-9"><a href="<?php echo $this->createUrl('print/downstudentexcel');?>" target="_blank">下载Excel表格示例</a></div>-->
  76. </div>
  77. </div>
  78. <div class="clearfix form-actions">
  79. <div class="col-md-offset-3 col-md-9">
  80. <button class="btn btn-success btn-sm" type="button" id="schoolSubmit">
  81. <i class="ace-icon fa fa-check bigger-110"></i>
  82. 提交
  83. </button>
  84. &nbsp; &nbsp; &nbsp;
  85. <button class="btn btn-success btn-sm rest" type="button">
  86. <i class="ace-icon fa fa-undo bigger-110"></i>
  87. 重填
  88. </button>
  89. </div>
  90. </div>
  91. <div class="form-group">
  92. <div class="control-label col-xs-3 col-sm-3">
  93. </div>
  94. <!--<div class="control-label col-xs-9 col-sm-9 mt15" style="text-align: left;color: red">
  95. 1、只支持全班批量导入,导入之后会覆盖之前的学生信息<br>
  96. 2、单个或几个新加学生不要使用批量导入功能,请单个添加
  97. </div>-->
  98. </div>
  99. </form>
  100. <!-- PAGE CONTENT ENDS -->
  101. </div>
  102. </div>
  103. </div>
  104. </div>