view_productset_navigation.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. $urlType = '';
  15. foreach ($urlInfoArr as $_url_k => $_url_v) {
  16. if ($_url_v == 'type' && isset($urlInfoArr[$_url_k + 1])) {
  17. $urlType = $urlInfoArr[$_url_k + 1];
  18. }
  19. }
  20. if(count($urlInfoArr) > 4){
  21. $urlInfoArr = array_slice($urlInfoArr,0,4);
  22. }
  23. $urlInfoAll = implode('/',$urlInfoArr);
  24. }
  25. $subjectNameArr = array(
  26. 3 => '数学',
  27. 8 => '英语',
  28. 9 => '语文',
  29. 12 => '物理',
  30. 13 => '化学',
  31. 14 => '生物',
  32. 15 => '政治',
  33. 16 => '历史',
  34. 17 => '地理',
  35. 18 => '理综',
  36. 19 => '文综',
  37. 21 => '日语',
  38. );
  39. ?>
  40. <div class="changeSubjectNav">
  41. <div class="productSettingBtn"> <a href="javascript:;">产品设置</a> </div>
  42. <div class="tabs clearfix">
  43. <div class="tab-con clearfix pull-right">
  44. <div class="has-sel fl"><?php echo isset(Yii::app()->params["subjectId"][$sub_id])?Yii::app()->params["subjectId"][$sub_id]:'数学'?></div>
  45. <div class="sel-opt fl">
  46. 切换学科
  47. </div>
  48. <div class="sel-cons" style="z-index:6;background-color: #fff;">
  49. <?php foreach ($subjectNameArr as $_subId => $_subName):?>
  50. <div class="sc-lis2" val="<?php echo $_subId;?>"><span><?php echo $_subName;?><?php if($subject && isset($subject[$_subId]) && !empty($subject[$_subId])){?><?php }?></span></div>
  51. <?php endforeach;?>
  52. </div>
  53. </div>
  54. </div>
  55. </div>