index.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <div class="main-content-inner">
  2. <div class="breadcrumbs" id="breadcrumbs">
  3. <ul class="breadcrumb">
  4. <li>
  5. <i class="ace-icon fa fa-home home-icon"></i>
  6. <a>首页</a>
  7. </li>
  8. </ul>
  9. </div>
  10. <div class="page-content">
  11. <div class="row">
  12. <div class="col-xs-12">
  13. <!-- PAGE CONTENT BEGINS -->
  14. <div class="row">
  15. <!-- 左边菜单 -->
  16. <div class="col-sm-8">
  17. <div class="widget-box">
  18. <div class="widget-header">
  19. <h4 class="smaller">
  20. 班级
  21. </h4>
  22. </div>
  23. <div class="widget-body">
  24. <div class="widget-main">
  25. <?php if(!empty($classList)):foreach($classList as $cc):?>
  26. <a class="btn btn-default btn-app radius-4" style="width:120px;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;" title="点击查看班级学生" href="<?php echo $this->createUrl('classes/view',array('cid'=>$cc->class_id));?>">
  27. <i class="ace-icon fa fa-book bigger-230"></i>
  28. <?php echo $cc->class_name;?>
  29. </a>
  30. <?php endforeach;else:?>
  31. 暂无管理班级
  32. <?php endif;?>
  33. </div>
  34. </div>
  35. </div>
  36. <hr>
  37. <div class="widget-box">
  38. <div class="widget-header">
  39. <h4 class="smaller">
  40. 打印任务
  41. </h4>
  42. </div>
  43. <div class="widget-body">
  44. <div class="widget-main" id="printTast">
  45. <?php if(!empty($printList)):foreach($printList as $kk=>$el):?>
  46. <p>
  47. <?php
  48. $kk++;
  49. echo '<p>'.$kk.':'.$el['class_name'].'提交了"'.$el['print_name'].'"</p>';
  50. ?>
  51. </p>
  52. <?php endforeach;else:?>
  53. 暂无打印任务
  54. <?php endif;?>
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. <!-- 右边菜单 -->
  60. <div class="col-sm-4">
  61. <div class="widget-box">
  62. <div class="widget-header">
  63. <h4 class="smaller">消息动态</h4>
  64. </div>
  65. <div class="widget-body">
  66. <div class="widget-main" id="printNotify">
  67. <?php if(!empty($notifyList)):foreach($notifyList as $kk=>$el):?>
  68. <p>
  69. <?php
  70. $kk++;
  71. echo '<p>'.$kk.':'.$el['content'].'。</p>';
  72. ?>
  73. </p>
  74. </a>
  75. <?php endforeach;else:?>
  76. 暂无消息动态
  77. <?php endif;?>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. </div>
  83. <!-- PAGE CONTENT ENDS -->
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. <script type="text/javascript">
  89. //$(document).ready(function () {
  90. //setInterval("getPrint()", 60000);
  91. //setInterval("printNotify()", 60000);
  92. // });
  93. function getPrint() {
  94. $.post("<?php echo $this->createUrl('index/gettask');?>",function(data){
  95. var p = eval("("+data+")");
  96. var obj = $("#printTast");
  97. obj.empty();
  98. if(p.length > 0) {
  99. var html="";
  100. $.each(p,function(i,n){
  101. i++;
  102. html += "<p>"+i+":"+n.teacher_name+"提交了'"+n.class_name+"'《"+n.name+"》打印任务。</p>";
  103. });
  104. obj.append(html);
  105. } else {
  106. obj.append('暂无数据');
  107. }
  108. });
  109. }
  110. function printNotify() {
  111. $.post("<?php echo $this->createUrl('index/getnotify');?>",function(data){
  112. var p = eval("("+data+")");
  113. var obj = $("#printNotify");
  114. obj.empty();
  115. if(p.length > 0) {
  116. var html="";
  117. $.each(p,function(i,n){
  118. i++;
  119. html += "<p>"+i+":"+n.content+"</p>";
  120. });
  121. obj.append(html);
  122. } else {
  123. obj.append('暂无数据');
  124. }
  125. });
  126. }
  127. //layer.tips('点击可切换学期', '#change_sm', {tips:3});
  128. </script>