session['session_subject_id']) ? Yii::app()->session['session_subject_id']:0; $duo_sub_id = isset(Yii::app()->session['session_duoxueke_subject_id']) ? Yii::app()->session['session_duoxueke_subject_id']:0; $testFlag = isset(Yii::app()->session['testFlag'])?Yii::app()->session['testFlag']:0; $printType = isset($printType)?$printType:''; $subject = isset($subject)?$subject:array(); $urlInfoAll = Yii::app()->request->getPathInfo(); $urlInfo = ''; if($urlInfoAll){ $urlInfoArr = explode('/',$urlInfoAll); if(isset($urlInfoArr[0]) && isset($urlInfoArr[1])){ $urlInfo = strtolower($urlInfoArr[0]).'/'.strtolower($urlInfoArr[1]); } $urlType = ''; foreach ($urlInfoArr as $_url_k => $_url_v) { if ($_url_v == 'type' && isset($urlInfoArr[$_url_k + 1])) { $urlType = $urlInfoArr[$_url_k + 1]; } } if(count($urlInfoArr) > 4){ $urlInfoArr = array_slice($urlInfoArr,0,4); } $urlInfoAll = implode('/',$urlInfoArr); } $subjectNameArr = array( 3 => '数学', 8 => '英语', 9 => '语文', 12 => '物理', 13 => '化学', 14 => '生物', 15 => '政治', 16 => '历史', 17 => '地理', 18 => '理综', 19 => '文综', ); if (in_array($sub_id, Yii::app()->params['mathSubjectId'])) { $meauArr = array( array( 'name' => '打印试卷', 'url' => $this->createUrl("print/index"), 'button_active' => inArray($urlInfo,array('print/index','print/class_exam','print/change','print/changescan')), 'is_show' => true, ), array( 'name' => '第三方试卷', 'url' => $this->createUrl("third/index"), 'button_active' => inArray($urlInfo,array('third/index','third/assist','third/exam_list','third/change','third/thirdview','third/import')), 'is_show' => true, ), array( 'name' => '上传试卷', 'url' => $this->createUrl("upload/index"), 'button_active' => inArray($urlInfo,array('upload/index')), 'is_show' => true, ), array( 'name' => '导入成绩', 'url' => $this->createUrl("record/importscore"), 'button_active' => inArray($urlInfo,array('record/importscore','record/check','record/handle','record/handle_card','record/handle_existent')), 'is_show' => true, ), array( 'name' => '全学科统考', 'url' => $this->createUrl("cylet/index"), 'button_active' => inArray($urlInfo,array('cylet/index','cylet/edit')), 'is_show' => true, ), array( 'name' => '联评考试', 'url' => $this->createUrl("print/united"), 'button_active' => inArray($urlInfo,array('print/united','print/class_exam_united','print/unitedtask')), 'is_show' => in_array($sub_id, Yii::app()->params['mathSubjectId'])?true:false, ), array( 'name' => '用户成绩推送设置', 'url' => $this->createUrl("zhiliao/index"), 'button_active' => inArray($urlInfo,array('zhiliao/index','zhiliao/exam_list','zhiliao/edit','zhiliao/upload','zhiliao/change','zhiliao/blacklist')), 'is_show' => true, ), array( 'name' => '还原考试', 'url' => $this->createUrl("print/restore"), 'button_active' => inArray($urlInfo,array('print/restore')), 'is_show' => $testFlag == 1 && !inArray($urlInfo,array('print/change','print/sub_index','export/index','upload/index')), ), ); }elseif($sub_id == 8){ $meauArr = array( array( 'name' => '打印试卷', 'url' => $this->createUrl("print/index"), 'button_active' => inArray($urlInfo,array('print/index','print/class_exam','print/change','print/changescan')), 'is_show' => true, ), array( 'name' => '第三方试卷', 'url' => $this->createUrl("third/index"), 'button_active' => inArray($urlInfo,array('third/index','third/exam_list','third/change','third/assist','third/thirdview_under_line','third/editthirdunderLine','third/thirdview_duo')), 'is_show' => true, ), array( 'name' => '导入成绩', 'url' => $this->createUrl("record/importscore"), 'button_active' => inArray($urlInfo,array('record/importscore','record/check','record/handle','record/handle_card','record/handle_existent')), 'is_show' => true, ), array( 'name' => '全学科统考', 'url' => $this->createUrl("cylet/index"), 'button_active' => inArray($urlInfo,array('cylet/index','cylet/edit')), 'is_show' => true, ), array( 'name' => '用户成绩推送设置', 'url' => $this->createUrl("zhiliao/index"), 'button_active' => inArray($urlInfo,array('zhiliao/index','zhiliao/exam_list','zhiliao/edit','zhiliao/upload','zhiliao/change','zhiliao/blacklist')), 'is_show' => true, ), array( 'name' => '还原考试', 'url' => $this->createUrl("print/restore"), 'button_active' => inArray($urlInfo,array('print/restore')), 'is_show' => $testFlag == 1 && !inArray($urlInfo,array('print/change','print/sub_index','export/index','upload/index')), ), ); }else{ $meauArr = array( array( 'name' => '打印试卷', 'url' => $this->createUrl("print/index"), 'button_active' => inArray($urlInfo,array('print/index','print/class_exam','print/change','print/changescan')), 'is_show' => true, ), array( 'name' => '第三方试卷', 'url' => $this->createUrl("third/index"), 'button_active' => inArray($urlInfo,array('third/index','third/exam_list','third/change','third/assist','third/thirdview_under_line','third/editThirdUnderLine','third/thirdview_duo')), 'is_show' => true, ), array( 'name' => '导入成绩', 'url' => $this->createUrl("record/importscore"), 'button_active' => inArray($urlInfo,array('record/importscore','record/check','record/handle','record/handle_card','record/handle_existent')), 'is_show' => true, ), array( 'name' => '全学科统考', 'url' => $this->createUrl("cylet/index"), 'button_active' => inArray($urlInfo,array('cylet/index','cylet/edit')), 'is_show' => true, ), array( 'name' => '用户成绩推送设置', 'url' => $this->createUrl("zhiliao/index"), 'button_active' => inArray($urlInfo,array('zhiliao/index','zhiliao/exam_list','zhiliao/edit','zhiliao/upload','zhiliao/change','zhiliao/blacklist')), 'is_show' => true, ), array( 'name' => '还原考试', 'url' => $this->createUrl("print/restore"), 'button_active' => inArray($urlInfo,array('print/restore')), 'is_show' => $testFlag == 1 && !inArray($urlInfo,array('print/change','print/sub_index','export/index','upload/index')), ), ); } ?>