123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589 |
- <style>
- /*切换选择*/
- .tab-con{
- position: relative;
- height: 30px;
- width: 200px;
- background: #F2F2F2;
- border: 1px solid #0155fe;
- border-radius: 15px;
- }
- .has-sel{
- background: #0155fe;
- color: #fff;
- width: 50%;
- height: 30px;
- border-top-left-radius: 15px;
- border-bottom-left-radius: 15px;
- text-align: center;
- line-height: 30px;
- }
- .sel-opt{
- width: 50%;
- position: relative;
- color: #0155fe;
- line-height: 30px;
- text-indent: 6px;
- cursor: pointer;
- }
- .sel-opt:after{
- content: '';
- border-left: 6px solid transparent;
- border-right: 6px solid transparent;
- border-top: 8px solid #0155fe;
- position: absolute;
- right: 12px;
- top: 12px;
- }
- // .sel-opt select{
- // width: 100%;
- // height: 30px;
- // background: #F2F2F2;
- // color: #01B677;
- // text-indent: 6px;
- // font-size: inherit;
- // border-top-right-radius: 15px;
- // border-bottom-right-radius: 15px;
- // cursor: pointer;
- // }
- // .sel-opt select option{
- // position: relative;
- // }
- .points{
- position: absolute;
- top: -2px;
- right: 0;
- width: 10px;
- height: 10px;
- background: #F01516;
- border-radius: 50%;
- }
- .sel-cons{
- border: 1px solid #0155fe;
- width: 50%;
- position: absolute;
- right: 0;
- top: 30px;
- text-indent: 10px;
- display: none;
- }
- .sc-lis2{
- line-height: 30px;
- cursor: pointer;
- }
- .sc-lis2 span{
- position: relative;
- }
- .sc-lis2 .points{
- top: 2px;
- right: -16px;
- }
- .subject-change{
- margin:8px 11px 0 0;display: block
- }
- .subject-change-no{
- margin:8px 11px 0 0;display: none
- }
- </style>
- <?php
- $sub_id = isset(Yii::app()->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 = '';
- $productType = Req::get('productType') ? Req::get('productType'):(Req::get('type') ? Req::get('type'):0);
- if($sub_id==8){
- $http = http('goods-type/coach/goods-type-school', 'GET', $this->authUsername);
- $waikanOrder = json_decode($http,true);
- }
-
- $showWK=0;
- if(isset($waikanOrder['errCode']) && $waikanOrder['errCode']=='00'){
- if(isset($waikanOrder['data']) && $waikanOrder['data']){
- $showWK=1;
- }
- }
- 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($urlType==''){
- $urlType=Req::get('type');
- }
- $countNumber=4;
- if($this->action=='selectstubyenglishreading'){
- $countNumber=6;
- }
- if(count($urlInfoArr) > $countNumber){
- $urlInfoArr = array_slice($urlInfoArr,0,$countNumber);
- }
- $urlInfoAll = implode('/',$urlInfoArr);
- }
- $subjectNameArr = array(
- 3 => '数学',
- 8 => '英语',
- 9 => '语文',
- 12 => '物理',
- 13 => '化学',
- 14 => '生物',
- 15 => '政治',
- 16 => '历史',
- 17 => '地理',
- 18 => '理综',
- 19 => '文综',
- );
- $subjectNameArr=Yii::app()->params['subjectId'];
- unset($subjectNameArr[20]);
- unset($subjectNameArr[6]);
- unset($subjectNameArr[51]);
- $_num='';
- $use_version = '';
- if(isset(Yii::app()->session['coachInfo']->use_version))
- {
- $use_version = Yii::app()->session['coachInfo']->use_version;
- }else
- {
- $use_version = Yii::app()->session['coachInfo']['use_version'];
- }
- if(!$use_version)
- {
- $use_version = 100;
- }
- $version_number = implode('',explode('.',$use_version));
- if(strlen($version_number)<7)
- {
- for($i=0;$i<7-strlen($version_number);$i++)
- {
- $_num.='0';
- }
- }
- $version_number=(int)$version_number.$_num;
- $subjectHomePage=array();
- if(Yii::app()->params['section']==0){
- $subjectHomePage[$sub_id]='export/index_duo';
- $meauArr = array(
- array(
- 'name' => '导出报告',
- 'url' => $this->createUrl("export/index_duo"),
- 'button_active' => inArray($urlInfoAll,array('export/index_duo','export/batch_duo')),
- 'is_show' => true,
- 'all_nav'=>array('export/index_duo','export/batch_duo')
- ),
- );
- // if($sub_id == 41){
- // $meauArr = array_merge($meauArr,array(
- // array(
- // 'name' => '错题本',
- // 'url' => $this->createUrl("junior/product",array('type'=>1)),
- // 'button_active' => inArray($urlInfoAll,array('junior/product/type/1','junior/product_stu/type/1')),
- // 'is_show' => true,
- // 'all_nav'=>array('junior/product','junior/product_stu')
- // ),
- // array(
- // 'name' => '个性化学习宝',
- // 'url' => $this->createUrl("junior/product",array('type'=>30)),
- // 'button_active' => inArray($urlInfoAll,array('junior/product/type/30','junior/product_stu/type/30')),
- // 'is_show' => true,
- // 'all_nav'=>array('junior/product','junior/product_stu')
- // ),
- // ));
- // }
- }elseif (Yii::app()->params['section']==3) {
- $subjectHomePage[$sub_id]='export/index_duo';
- $meauArr = array(
- array(
- 'name' => '导出报告',
- 'url' => $this->createUrl("export/index_duo"),
- 'button_active' => inArray($urlInfoAll,array('export/index_duo','export/batch_duo')),
- 'is_show' => true,
- 'all_nav'=>array('export/index_duo','export/batch_duo')
- ),
- );
- }elseif (in_array($sub_id, Yii::app()->params['mathSubjectId'])) {
- $subjectHomePage[$sub_id]='export/index';
- $meauArr = array(
- array(
- 'name' => '导出报告',
- 'url' => $this->createUrl("export/index"),
- 'button_active' => inArray($urlInfo,array('export/index','export/batch','export/statistics','export/pastacdemicrs')),
- 'is_show' => true,
- 'all_nav'=>array('export/index','export/batch','export/statistics','export/pastacdemicrs')
- ),
- array(
- 'name' => '纠错本',
- 'url' => $this->createUrl("correct/index"),
- 'button_active' => inArray($urlInfo,array('correct/index','correct/classlist','correct/stu')),
- 'is_show' => true,
- 'all_nav'=>array('correct/index','correct/classlist','correct/stu')
- ),
- // array(
- // 'name' => '个性化学习方案',
- // 'url' => $this->createUrl("print/sub_index", array('type' => 'isp')),
- // 'button_active' => inArray($urlInfoAll,array('print/sub_index/type/isp')) || (inArray($urlInfo,array('print/changeraisescheme','print/sub_index')) && $urlType == 'isp'),
- // 'is_show' => true,
- // 'all_nav'=>array('print/sub_index','print/changeraisescheme')
- // ),
- // array(
- // 'name' => '个性化学习宝',
- // 'url' => $this->createUrl("print/sub_index", array('type' => 'studytrend')),
- // 'button_active' => inArray($urlInfoAll,array('print/sub_index/type/studytrend')) || (inArray($urlInfo,array('print/changeraisescheme','print/sub_index')) && $urlType == 'studytrend'),
- // 'is_show' => true,
- // 'all_nav'=>array('print/sub_index','print/changeraisescheme')
- // ),
- // array(
- // 'name' => '阶段复习学习宝',
- // 'url' => $this->createUrl("print/student_product"),
- // 'button_active' => inArray($urlInfo,array('print/student_product','print/class_student_product')),
- // 'is_show' => true,
- // 'all_nav'=>array('print/student_product','print/class_student_product')
- // ),
- //
- // array(
- // 'name' => '二轮学习指导手册',
- // 'url' => $this->createUrl("print/review"),
- // 'button_active' => inArray($urlInfo,array('print/review','print/reviewsetting','print/selectstubymath')),
- // 'is_show' => true,
- // 'all_nav'=>array('print/review','print/reviewsetting','print/selectstubymath')
- // ),
- // array(
- // 'name' => '好题本',
- // 'url' => $this->createUrl("htb/index"),
- // 'button_active' => inArray($urlInfo,array('htb/index','htb/setting','htb/selectstu')),
- // 'is_show' => true,
- // 'all_nav'=>array('htb/index','htb/setting','htb/selectstu')
- // ),
- // array(
- // 'name' => '个性化学习宝督学反馈',
- // 'url' => $this->createUrl("supervise/list"),
- // 'button_active' => inArray($urlInfo,array('supervise/list')),
- // 'is_show' => true,
- // 'all_nav'=>array('supervise/list')
- // ),
- // array(
- // 'name' => '假期报告(知识账单)',
- // 'url' => $this->createUrl("export/holiday_index"),
- // 'button_active' => inArray($urlInfo,array('export/holiday_index','export/selectstubyholidayreport','export/holiday_teacher_index')),
- // 'is_show' => true,
- // 'all_nav'=>array('export/holiday_index','export/selectstubyholidayreport','export/holiday_teacher_index')
- // ),
- // array(
- // 'name' => '方法宝',
- // 'url' => $this->createUrl("productexam/product",array('type'=>31)),
- // 'button_active' => inArray($urlInfo,array('productexam/product','productexam/product_stu')),
- // 'is_show' => true,
- // 'all_nav'=>array('productexam/product','productexam/product_stu')
- // ),
- // array(
- // 'name' => '专题宝',
- // 'url' => $this->createUrl("special/index"),
- // 'button_active' => inArray($urlInfo,array('special/index','special/setting','special/stu')),
- // 'is_show' => true,
- // 'all_nav'=>array('special/index','special/setting','special/stu')
- // ),
- // array(
- // 'name' => '假期作业',
- // 'url' => $this->createUrl("generalproduct/index",array('productType'=>ProductDownload::PRODUCT_TYPE_HOLIDAY_HOMEWORK)),
- // 'button_active' => inArray($productType,array(ProductDownload::PRODUCT_TYPE_HOLIDAY_HOMEWORK)) && inArray($urlInfo,array('generalproduct/index','generalproduct/setting','generalproduct/stu',)),
- // 'is_show' => true,
- // 'all_nav'=>array('generalproduct/index','generalproduct/setting','generalproduct/stu',)
- // ),
- // array(
- // 'name' => '错题精练',
- // 'url' => $this->createUrl("generalproduct/index",array('productType'=>ProductDownload::PRODUCT_TYPE_WRONG_REFINE)),
- // 'button_active' => inArray($productType,array(ProductDownload::PRODUCT_TYPE_WRONG_REFINE)) && inArray($urlInfo,array('generalproduct/index','generalproduct/setting','generalproduct/stu',)),
- // 'is_show' => true,
- // 'all_nav'=>array('generalproduct/index','generalproduct/setting','generalproduct/stu',)
- // ),
- // array(
- // 'name' => 'e学慧通',
- // 'url' => $this->createUrl("product/index"),
- // 'button_active' => inArray($urlInfo,array('product/index',)),
- // 'is_show' => true,
- // 'all_nav'=>array('product/index',)
- // ),
- );
- }elseif($sub_id == 8){
- $subjectHomePage[$sub_id]='export/index_duo';
- $meauArr = array(
- array(
- 'name' => '导出报告',
- 'url' => $this->createUrl("export/index_duo"),
- 'button_active' => inArray($urlInfoAll,array('export/index_duo','export/batch_duo')),
- 'is_show' => true,
- 'all_nav'=>array('export/index_duo','export/batch_duo')
- ),
- // array(
- // 'name' => '错题本',
- // 'url' => $this->createUrl("print/sub_index",array('type'=>'third_wb')),
- // 'button_active' => inArray($urlInfoAll,array('print/sub_index/type/third_wb')) || inArray($urlInfo,array('print/changewrongtopic')) || (inArray($urlInfo,array('print/sub_index')) && $urlType == 'third_wb'),
- // 'is_show' => true,
- // 'all_nav'=>array('print/sub_index','print/changewrongtopic')
- // ),
- // array(
- // 'name' => '英语个性化学习宝',
- // 'url' => $this->createUrl("print/sub_index", array('type' => 'third_isp')),
- // 'button_active' => inArray($urlInfoAll,array('print/sub_index/type/third_isp')) || (inArray($urlInfo,array('print/sub_index')) && $urlType == 'third_isp') || inArray($urlInfo,array('print/selectstubymainly','print/changeraisescheme','print/mrv','print/mainly_revision','print/selectstubymrv','print/mrv3','print/mrvsetting','print/setting_mainly')),
- // 'is_show' => true,
- // 'all_nav'=>array('print/sub_index','print/selectstubymainly','print/changeraisescheme','print/mrv','print/mainly_revision','print/selectstubymrv','print/mrv3','print/mrvsetting','print/setting_mainly')
- // ),
- // array(
- // 'name' => '外刊宝(老版)',
- // 'url' => $this->createUrl("print/english_reading",array('cg'=>1)),
- // 'button_active' => inArray($urlInfoAll,array('print/english_reading','print/english_reading/cg/1','print/selectStuByEnglishReading/cg/1/pt/0','print/englishreadingsetting','print/englishreading3','print/englishreadingtime')),
- // 'is_show' => in_array($sub_id, array(8)) && $showWK?true:false,
- // 'all_nav'=>array('print/english_reading','print/selectstubyenglishreading','print/englishreadingsetting','print/englishreading3','print/englishreadingtime')
- // ),
- // array(
- // 'name' => '基础宝',
- // 'url' => $this->createUrl("print/english_reading",array('pt'=>1,'cg'=>2)),
- // 'button_active' => inArray($urlInfoAll,array('print/english_reading/pt/1','print/selectStuByEnglishReading/cg/2/pt/1','print/englishreadingsetting','print/englishreading3','print/englishreadingtime')),
- // 'is_show' => in_array($sub_id, array(8))?true:false,
- // 'all_nav'=>array('print/english_reading','print/selectstubyenglishreading','print/englishreadingsetting','print/englishreading3','print/englishreadingtime')
- // ),
- // array(
- // 'name' => '外刊宝',
- // 'url' => $this->createUrl("print/english_reading",array('pt'=>2,'cg'=>2)),
- // 'button_active' => inArray($urlInfoAll,array('print/english_reading/pt/2','print/selectStuByEnglishReading/cg/2/pt/2','print/englishreadingsetting','print/englishreading3','print/englishreadingtime')),
- // 'is_show' => in_array($sub_id, array(8))?true:false,
- // 'all_nav'=>array('print/english_reading','print/selectstubyenglishreading','print/englishreadingsetting','print/englishreading3','print/englishreadingtime')
- // ),
- // array(
- // 'name' => '热点宝',
- // 'url' => $this->createUrl("print/english_reading",array('pt'=>3,'cg'=>2)),
- // 'button_active' => inArray($urlInfoAll,array('print/english_reading/pt/3','print/selectStuByEnglishReading/cg/2/pt/3','print/englishreadingsetting','print/englishreading3','print/englishreadingtime')),
- // 'is_show' => in_array($sub_id, array(8))?true:false,
- // 'all_nav'=>array('print/english_reading','print/selectstubyenglishreading','print/englishreadingsetting','print/englishreading3','print/englishreadingtime')
- // ),
- // array(
- // 'name' => '词汇宝',
- // 'url' => $this->createUrl("magic/index"),
- // 'button_active' => inArray($urlInfo,array('magic/index','magic/setting','magic/stu')),
- // 'is_show' => true,
- // 'all_nav'=>array('magic/index','magic/setting','magic/stu')
- // ),
- // array(
- // 'name' => '写作宝',
- // 'url' => $this->createUrl("writing/index"),
- // 'button_active' => inArray($urlInfo,array('writing/index','writing/setting','writing/stu')),
- // 'is_show' => true,
- // 'all_nav'=>array('writing/index','writing/setting','writing/stu')
- // ),
- // array(
- // 'name' => '假期作业',
- // 'url' => $this->createUrl("generalproduct/index",array('productType'=>ProductDownload::PRODUCT_TYPE_HOLIDAY_HOMEWORK)),
- // 'button_active' => inArray($urlInfo,array('generalproduct/index','generalproduct/setting','generalproduct/stu',)),
- // 'is_show' => true,
- // 'all_nav'=>array('generalproduct/index','generalproduct/setting','generalproduct/stu',)
- // ),
- // array(
- // 'name' => 'e学慧通',
- // 'url' => $this->createUrl("product/index"),
- // 'button_active' => inArray($urlInfo,array('product/index',)),
- // 'is_show' => true,
- // 'all_nav'=>array('product/index',)
- // ),
- );
- }elseif($sub_id == 12){
- $subjectHomePage[$sub_id]='export/index_duo';
- $meauArr = array(
- array(
- 'name' => '导出报告',
- 'url' => $this->createUrl("export/index_duo"),
- 'button_active' => inArray($urlInfoAll,array('export/index_duo','export/batch_duo')) ,
- 'is_show' => true,
- 'all_nav'=>array('export/index_duo','export/batch_duo')
- ),
- // array(
- // 'name' => '错题本',
- // 'url' => $this->createUrl("print/sub_index",array('type'=>'third_wb')),
- // 'button_active' => inArray($urlInfoAll,array('print/sub_index/type/third_wb')) || inArray($urlInfo,array('print/changewrongtopic')) || (inArray($urlInfo,array('print/sub_index')) && $urlType == 'third_wb'),
- // 'is_show' => true,
- // 'all_nav'=>array('print/sub_index','print/changewrongtopic')
- // ),
- // array(
- // 'name' => '个性化学习方案',
- // 'url' => $this->createUrl("print/sub_index", array('type' => 'isp')),
- // 'button_active' => inArray($urlInfoAll,array('print/sub_index/type/isp')) || (inArray($urlInfo,array('print/changeraisescheme','print/sub_index')) && $urlType == 'isp'),
- // 'is_show' => true,
- // 'all_nav'=>array('print/sub_index','print/changeraisescheme')
- // ),
- // array(
- // 'name' => '个性化学习宝',
- // 'url' => $this->createUrl("print/sub_index", array('type' => 'studytrend')),
- // 'button_active' => inArray($urlInfoAll,array('print/sub_index/type/studytrend')) || (inArray($urlInfo,array('print/changeraisescheme','print/sub_index')) && $urlType == 'studytrend'),
- // 'is_show' => true,
- // 'all_nav'=>array('print/sub_index','print/changeraisescheme')
- // ),
- // array(
- // 'name' => '阶段复习学习宝',
- // 'url' => $this->createUrl("print/student_product"),
- // 'button_active' => inArray($urlInfo,array('print/student_product','print/class_student_product')),
- // 'is_show' => true,
- // 'all_nav'=>array('print/student_product','print/class_student_product')
- // ),
- //
- // array(
- // 'name' => '假期作业',
- // 'url' => $this->createUrl("generalproduct/index",array('productType'=>ProductDownload::PRODUCT_TYPE_HOLIDAY_HOMEWORK)),
- // 'button_active' => inArray($productType,array(ProductDownload::PRODUCT_TYPE_HOLIDAY_HOMEWORK)) && inArray($urlInfo,array('generalproduct/index','generalproduct/setting','generalproduct/stu',)),
- // 'is_show' => true,
- // 'all_nav'=>array('generalproduct/index','generalproduct/setting','generalproduct/stu',)
- // ),
- // array(
- // 'name' => '错题精练',
- // 'url' => $this->createUrl("generalproduct/index",array('productType'=>ProductDownload::PRODUCT_TYPE_WRONG_REFINE)),
- // 'button_active' => inArray($productType,array(ProductDownload::PRODUCT_TYPE_WRONG_REFINE)) && inArray($urlInfo,array('generalproduct/index','generalproduct/setting','generalproduct/stu',)),
- // 'is_show' => true,
- // 'all_nav'=>array('generalproduct/index','generalproduct/setting','generalproduct/stu',)
- // ),
- // array(
- // 'name' => 'e学慧通',
- // 'url' => $this->createUrl("product/index"),
- // 'button_active' => inArray($urlInfo,array('product/index',)),
- // 'is_show' => true,
- // 'all_nav'=>array('product/index',)
- // ),
- );
- }else{
- $subjectHomePage[$sub_id]='export/index_duo';
- if(isset($this->extendSubject[$sub_id]) && $sub_id!=21){
- $meauArr = array(
- array(
- 'name' => '导出报告',
- 'url' => $this->createUrl("export/index_duo"),
- 'button_active' => inArray($urlInfoAll,array('export/index_duo','export/batch_duo')) ,
- 'is_show' => true,
- 'all_nav'=>array('export/index_duo','export/batch_duo')
- ),
- );
- }else{
- $meauArr = array(
- array(
- 'name' => '导出报告',
- 'url' => $this->createUrl("export/index_duo"),
- 'button_active' => inArray($urlInfoAll,array('export/index_duo','export/batch_duo')) ,
- 'is_show' => true,
- 'all_nav'=>array('export/index_duo','export/batch_duo')
- ),
- // array(
- // 'name' => '错题本',
- // 'url' => $this->createUrl("print/sub_index",array('type'=>'third_wb')),
- // 'button_active' => inArray($urlInfoAll,array('print/sub_index/type/third_wb')) || inArray($urlInfo,array('print/changewrongtopic')) || (inArray($urlInfo,array('print/sub_index')) && $urlType == 'third_wb'),
- // 'is_show' => true,
- // 'all_nav'=>array('print/sub_index','print/changewrongtopic')
- // ),
- );
- }
- }
- $allNavUrl=array();
- foreach ($meauArr as $value){
- $allNavUrl=array_merge($allNavUrl,$value['all_nav']);
- }
- if(!inArray($urlInfo,$allNavUrl)){
- return $this->redirect(array($subjectHomePage[$sub_id]));
- }
- ?>
- <ul class="clearfix main-content-inner-ul">
- <?php foreach ($meauArr as $meau):?>
- <?php if(!$meau['is_show']) continue;?>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $meau['url'];?>"' class="button button_normal button_group button_arrow <?php echo $meau['button_active']?'button_active':'';?>" data-button="red"><?php echo $meau['name'];?></button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <?php endforeach;?>
- <li class="pull-right">
- <div class="tabs clearfix">
- <!-- <a href="javascript:;" class="fl --><?php //if(isset($_GET['_tab'])){if($_GET['_tab'] ==0){echo 'active';}}else{echo 'active';}?><!--" id="_third_shijuan">全学科</a>-->
- <!-- <a href="javascript:;" class="fl --><?php //if(isset($_GET['_tab'])){if($_GET['_tab'] ==1){echo 'active';}}?><!--" id="_baogao">导出报告</a>-->
- <div class="tab-con clearfix pull-right" style="margin:8px 11px 0 0">
- <div class="has-sel fl"><?php echo isset(Yii::app()->params["subjectId"][$sub_id])?Yii::app()->params["subjectId"][$sub_id]:'数学'?></div>
- <div class="sel-opt fl">
- 切换学科
- <?php if($subject){?>
- <!-- <div class="points"></div>-->
- <?php }?>
- </div>
- <div class="sel-cons" style="z-index:6;background-color: #fff;height:500px;overflow: auto">
- <?php foreach ($subjectNameArr as $_subId => $_subName):?>
- <div class="sc-lis2" val="<?php echo $_subId;?>"><span><?php echo $_subName;?><?php if($subject && isset($subject[$_subId]) && !empty($subject[$_subId])){?><!-- <div class="points"></div> --><?php }?></span></div>
- <?php endforeach;?>
- </div>
- </div>
- </div>
- </li>
- </ul>
- <script type="text/javascript">
- $(document).ready(function() {
- $(".sel-opt,.sel-cons").mouseover(function () {
- $(".sel-cons").show();
- }).mouseout(function () {
- $(".sel-cons").hide();
- });
- $(".sc-lis2").click(function () {
- var sub_id = $(this).attr('val');
- var data = {
- subjectId: sub_id
- };
- $.post("<?php echo Yii::app()->createUrl('print/setSubjectId')?>", data, function (flags) {
- if (flags) {
- // location.reload();
- if (sub_id == 3 || sub_id == 6 || sub_id == 51 ) {
- var url = "<?php echo $this->createUrl("export/index");?>";
- }else{
- var url = "<?php echo $this->createUrl("export/index_duo");?>";
- }
- location.href = url;
- } else {
- alert('网络异常');
- }
- });
- $('.has-sel').text($(this).text());
- $(".sel-cons").hide();
- });
- });
- </script>
|