class_navigation.php 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. $sub_id = isset(Yii::app()->session['session_subject_id']) ? Yii::app()->session['session_subject_id']:0;
  3. $duo_sub_id = isset(Yii::app()->session['session_duoxueke_subject_id']) ? Yii::app()->session['session_duoxueke_subject_id']:0;
  4. $testFlag = isset(Yii::app()->session['testFlag'])?Yii::app()->session['testFlag']:0;
  5. $printType = isset($printType)?$printType:'';
  6. $subject = isset($subject)?$subject:array();
  7. $urlInfoAll = Yii::app()->request->getPathInfo();
  8. $urlInfo = '';
  9. if($urlInfoAll){
  10. $urlInfoArr = explode('/',$urlInfoAll);
  11. if(isset($urlInfoArr[0]) && isset($urlInfoArr[1])){
  12. $urlInfo = $urlInfoArr[0].'/'.$urlInfoArr[1];
  13. }
  14. if(count($urlInfoArr) > 4){
  15. $urlInfoArr = array_slice($urlInfoArr,0,4);
  16. }
  17. $urlInfoAll = implode('/',$urlInfoArr);
  18. }
  19. ?>
  20. <ul class="clearfix main-content-inner-ul">
  21. <?php if(Yii::app()->session['coachInfo']['leader']==1){?>
  22. <li class="pull-left">
  23. <button onclick='location.href="<?php echo $this->createUrl("semester/index");?>"' class="button button_normal button_group button_arrow <?php echo (inArray($urlInfo,array('semester/index','semester/add','semester/change','semester/edit')))?'button_active':''?> " data-button="red">学期管理</button>
  24. <img src="/images/line.jpg" style="height:45px;" />
  25. </li>
  26. <?php }?>
  27. <li class="pull-left">
  28. <button onclick='location.href="<?php echo $this->createUrl("teacher/index");?>"' class="button button_normal button_group button_arrow <?php echo (inArray($urlInfo,array('teacher/index','teacher/add','teacher/edit')))?'button_active':''?>" data-button="red">教师管理</button>
  29. <img src="/images/line.jpg" style="height:45px;" />
  30. </li>
  31. <li class="pull-left">
  32. <button onclick='location.href="<?php echo $this->createUrl("classes/index");?>"' class="button button_normal button_group button_arrow <?php echo (inArray($urlInfo,array('classes/index','classes/add','classes/edit','classes/view','classes/copy')))?'button_active':''?>" data-button="red">班级管理</button>
  33. <img src="/images/line.jpg" style="height:45px;" />
  34. </li>
  35. <li class="pull-left">
  36. <button onclick='location.href="<?php echo $this->createUrl("studentinfo/index");?>"' class="button button_normal button_group button_arrow <?php echo (inArray($urlInfo,array('studentinfo/index','studentinfo/add','studentinfo/edit','classes/view','classes/copy')))?'button_active':''?>" data-button="red">学生管理</button>
  37. <img src="/images/line.jpg" style="height:45px;" />
  38. </li>
  39. <?php if(Yii::app()->session['coachInfo']['leader']==1){ ?>
  40. <li class="pull-left">
  41. <button onclick='location.href="<?php echo $this->createUrl("school/add");?>"' class="button button_normal button_group button_arrow <?php echo ($urlInfoAll == 'school/add')?'button_active':''?>" data-button="red">学校管理</button>
  42. <img src="/images/line.jpg" style="height:45px;" />
  43. </li>
  44. <?php } ?>
  45. <li class="pull-left">
  46. <button onclick='location.href="<?php echo $this->createUrl("classes/export");?>"' class="button button_normal button_group button_arrow <?php echo ($urlInfoAll == 'classes/export')?'button_active':''?>" data-button="red">导出学生</button>
  47. <img src="/images/line.jpg" style="height:45px;" />
  48. </li>
  49. <?php if(Yii::app()->params['section']==1){?>
  50. <li class="pull-left">
  51. <button onclick='location.href="<?php echo $this->createUrl("textbook/index");?>"' class="button button_normal button_group button_arrow <?php echo ($urlInfoAll == 'textbook/index')?'button_active':''?>" data-button="red">教材管理</button>
  52. <img src="/images/line.jpg" style="height:45px;" />
  53. </li>
  54. <?php } ?>
  55. </ul>