view_production_navigation.php 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589
  1. <style>
  2. /*切换选择*/
  3. .tab-con{
  4. position: relative;
  5. height: 30px;
  6. width: 200px;
  7. background: #F2F2F2;
  8. border: 1px solid #0155fe;
  9. border-radius: 15px;
  10. }
  11. .has-sel{
  12. background: #0155fe;
  13. color: #fff;
  14. width: 50%;
  15. height: 30px;
  16. border-top-left-radius: 15px;
  17. border-bottom-left-radius: 15px;
  18. text-align: center;
  19. line-height: 30px;
  20. }
  21. .sel-opt{
  22. width: 50%;
  23. position: relative;
  24. color: #0155fe;
  25. line-height: 30px;
  26. text-indent: 6px;
  27. cursor: pointer;
  28. }
  29. .sel-opt:after{
  30. content: '';
  31. border-left: 6px solid transparent;
  32. border-right: 6px solid transparent;
  33. border-top: 8px solid #0155fe;
  34. position: absolute;
  35. right: 12px;
  36. top: 12px;
  37. }
  38. // .sel-opt select{
  39. // width: 100%;
  40. // height: 30px;
  41. // background: #F2F2F2;
  42. // color: #01B677;
  43. // text-indent: 6px;
  44. // font-size: inherit;
  45. // border-top-right-radius: 15px;
  46. // border-bottom-right-radius: 15px;
  47. // cursor: pointer;
  48. // }
  49. // .sel-opt select option{
  50. // position: relative;
  51. // }
  52. .points{
  53. position: absolute;
  54. top: -2px;
  55. right: 0;
  56. width: 10px;
  57. height: 10px;
  58. background: #F01516;
  59. border-radius: 50%;
  60. }
  61. .sel-cons{
  62. border: 1px solid #0155fe;
  63. width: 50%;
  64. position: absolute;
  65. right: 0;
  66. top: 30px;
  67. text-indent: 10px;
  68. display: none;
  69. }
  70. .sc-lis2{
  71. line-height: 30px;
  72. cursor: pointer;
  73. }
  74. .sc-lis2 span{
  75. position: relative;
  76. }
  77. .sc-lis2 .points{
  78. top: 2px;
  79. right: -16px;
  80. }
  81. .subject-change{
  82. margin:8px 11px 0 0;display: block
  83. }
  84. .subject-change-no{
  85. margin:8px 11px 0 0;display: none
  86. }
  87. </style>
  88. <?php
  89. $sub_id = isset(Yii::app()->session['session_subject_id']) ? Yii::app()->session['session_subject_id']:0;
  90. $duo_sub_id = isset(Yii::app()->session['session_duoxueke_subject_id']) ? Yii::app()->session['session_duoxueke_subject_id']:0;
  91. $testFlag = isset(Yii::app()->session['testFlag'])?Yii::app()->session['testFlag']:0;
  92. $printType = isset($printType)?$printType:'';
  93. $subject = isset($subject)?$subject:array();
  94. $urlInfoAll = Yii::app()->request->getPathInfo();
  95. $urlInfo = '';
  96. $productType = Req::get('productType') ? Req::get('productType'):(Req::get('type') ? Req::get('type'):0);
  97. if($sub_id==8){
  98. $http = http('goods-type/coach/goods-type-school', 'GET', $this->authUsername);
  99. $waikanOrder = json_decode($http,true);
  100. }
  101. $showWK=0;
  102. if(isset($waikanOrder['errCode']) && $waikanOrder['errCode']=='00'){
  103. if(isset($waikanOrder['data']) && $waikanOrder['data']){
  104. $showWK=1;
  105. }
  106. }
  107. if($urlInfoAll){
  108. $urlInfoArr = explode('/',$urlInfoAll);
  109. if(isset($urlInfoArr[0]) && isset($urlInfoArr[1])){
  110. $urlInfo = strtolower($urlInfoArr[0]).'/'.strtolower($urlInfoArr[1]);
  111. }
  112. $urlType = '';
  113. foreach ($urlInfoArr as $_url_k => $_url_v) {
  114. if ($_url_v == 'type' && isset($urlInfoArr[$_url_k + 1])) {
  115. $urlType = $urlInfoArr[$_url_k + 1];
  116. }
  117. }
  118. if($urlType==''){
  119. $urlType=Req::get('type');
  120. }
  121. $countNumber=4;
  122. if($this->action=='selectstubyenglishreading'){
  123. $countNumber=6;
  124. }
  125. if(count($urlInfoArr) > $countNumber){
  126. $urlInfoArr = array_slice($urlInfoArr,0,$countNumber);
  127. }
  128. $urlInfoAll = implode('/',$urlInfoArr);
  129. }
  130. $subjectNameArr = array(
  131. 3 => '数学',
  132. 8 => '英语',
  133. 9 => '语文',
  134. 12 => '物理',
  135. 13 => '化学',
  136. 14 => '生物',
  137. 15 => '政治',
  138. 16 => '历史',
  139. 17 => '地理',
  140. 18 => '理综',
  141. 19 => '文综',
  142. );
  143. $subjectNameArr=Yii::app()->params['subjectId'];
  144. unset($subjectNameArr[20]);
  145. unset($subjectNameArr[6]);
  146. unset($subjectNameArr[51]);
  147. $_num='';
  148. $use_version = '';
  149. if(isset(Yii::app()->session['coachInfo']->use_version))
  150. {
  151. $use_version = Yii::app()->session['coachInfo']->use_version;
  152. }else
  153. {
  154. $use_version = Yii::app()->session['coachInfo']['use_version'];
  155. }
  156. if(!$use_version)
  157. {
  158. $use_version = 100;
  159. }
  160. $version_number = implode('',explode('.',$use_version));
  161. if(strlen($version_number)<7)
  162. {
  163. for($i=0;$i<7-strlen($version_number);$i++)
  164. {
  165. $_num.='0';
  166. }
  167. }
  168. $version_number=(int)$version_number.$_num;
  169. $subjectHomePage=array();
  170. if(Yii::app()->params['section']==0){
  171. $subjectHomePage[$sub_id]='export/index_duo';
  172. $meauArr = array(
  173. array(
  174. 'name' => '导出报告',
  175. 'url' => $this->createUrl("export/index_duo"),
  176. 'button_active' => inArray($urlInfoAll,array('export/index_duo','export/batch_duo')),
  177. 'is_show' => true,
  178. 'all_nav'=>array('export/index_duo','export/batch_duo')
  179. ),
  180. );
  181. // if($sub_id == 41){
  182. // $meauArr = array_merge($meauArr,array(
  183. // array(
  184. // 'name' => '错题本',
  185. // 'url' => $this->createUrl("junior/product",array('type'=>1)),
  186. // 'button_active' => inArray($urlInfoAll,array('junior/product/type/1','junior/product_stu/type/1')),
  187. // 'is_show' => true,
  188. // 'all_nav'=>array('junior/product','junior/product_stu')
  189. // ),
  190. // array(
  191. // 'name' => '个性化学习宝',
  192. // 'url' => $this->createUrl("junior/product",array('type'=>30)),
  193. // 'button_active' => inArray($urlInfoAll,array('junior/product/type/30','junior/product_stu/type/30')),
  194. // 'is_show' => true,
  195. // 'all_nav'=>array('junior/product','junior/product_stu')
  196. // ),
  197. // ));
  198. // }
  199. }elseif (Yii::app()->params['section']==3) {
  200. $subjectHomePage[$sub_id]='export/index_duo';
  201. $meauArr = array(
  202. array(
  203. 'name' => '导出报告',
  204. 'url' => $this->createUrl("export/index_duo"),
  205. 'button_active' => inArray($urlInfoAll,array('export/index_duo','export/batch_duo')),
  206. 'is_show' => true,
  207. 'all_nav'=>array('export/index_duo','export/batch_duo')
  208. ),
  209. );
  210. }elseif (in_array($sub_id, Yii::app()->params['mathSubjectId'])) {
  211. $subjectHomePage[$sub_id]='export/index';
  212. $meauArr = array(
  213. array(
  214. 'name' => '导出报告',
  215. 'url' => $this->createUrl("export/index"),
  216. 'button_active' => inArray($urlInfo,array('export/index','export/batch','export/statistics','export/pastacdemicrs')),
  217. 'is_show' => true,
  218. 'all_nav'=>array('export/index','export/batch','export/statistics','export/pastacdemicrs')
  219. ),
  220. array(
  221. 'name' => '纠错本',
  222. 'url' => $this->createUrl("correct/index"),
  223. 'button_active' => inArray($urlInfo,array('correct/index','correct/classlist','correct/stu')),
  224. 'is_show' => true,
  225. 'all_nav'=>array('correct/index','correct/classlist','correct/stu')
  226. ),
  227. // array(
  228. // 'name' => '个性化学习方案',
  229. // 'url' => $this->createUrl("print/sub_index", array('type' => 'isp')),
  230. // 'button_active' => inArray($urlInfoAll,array('print/sub_index/type/isp')) || (inArray($urlInfo,array('print/changeraisescheme','print/sub_index')) && $urlType == 'isp'),
  231. // 'is_show' => true,
  232. // 'all_nav'=>array('print/sub_index','print/changeraisescheme')
  233. // ),
  234. // array(
  235. // 'name' => '个性化学习宝',
  236. // 'url' => $this->createUrl("print/sub_index", array('type' => 'studytrend')),
  237. // 'button_active' => inArray($urlInfoAll,array('print/sub_index/type/studytrend')) || (inArray($urlInfo,array('print/changeraisescheme','print/sub_index')) && $urlType == 'studytrend'),
  238. // 'is_show' => true,
  239. // 'all_nav'=>array('print/sub_index','print/changeraisescheme')
  240. // ),
  241. // array(
  242. // 'name' => '阶段复习学习宝',
  243. // 'url' => $this->createUrl("print/student_product"),
  244. // 'button_active' => inArray($urlInfo,array('print/student_product','print/class_student_product')),
  245. // 'is_show' => true,
  246. // 'all_nav'=>array('print/student_product','print/class_student_product')
  247. // ),
  248. //
  249. // array(
  250. // 'name' => '二轮学习指导手册',
  251. // 'url' => $this->createUrl("print/review"),
  252. // 'button_active' => inArray($urlInfo,array('print/review','print/reviewsetting','print/selectstubymath')),
  253. // 'is_show' => true,
  254. // 'all_nav'=>array('print/review','print/reviewsetting','print/selectstubymath')
  255. // ),
  256. // array(
  257. // 'name' => '好题本',
  258. // 'url' => $this->createUrl("htb/index"),
  259. // 'button_active' => inArray($urlInfo,array('htb/index','htb/setting','htb/selectstu')),
  260. // 'is_show' => true,
  261. // 'all_nav'=>array('htb/index','htb/setting','htb/selectstu')
  262. // ),
  263. // array(
  264. // 'name' => '个性化学习宝督学反馈',
  265. // 'url' => $this->createUrl("supervise/list"),
  266. // 'button_active' => inArray($urlInfo,array('supervise/list')),
  267. // 'is_show' => true,
  268. // 'all_nav'=>array('supervise/list')
  269. // ),
  270. // array(
  271. // 'name' => '假期报告(知识账单)',
  272. // 'url' => $this->createUrl("export/holiday_index"),
  273. // 'button_active' => inArray($urlInfo,array('export/holiday_index','export/selectstubyholidayreport','export/holiday_teacher_index')),
  274. // 'is_show' => true,
  275. // 'all_nav'=>array('export/holiday_index','export/selectstubyholidayreport','export/holiday_teacher_index')
  276. // ),
  277. // array(
  278. // 'name' => '方法宝',
  279. // 'url' => $this->createUrl("productexam/product",array('type'=>31)),
  280. // 'button_active' => inArray($urlInfo,array('productexam/product','productexam/product_stu')),
  281. // 'is_show' => true,
  282. // 'all_nav'=>array('productexam/product','productexam/product_stu')
  283. // ),
  284. // array(
  285. // 'name' => '专题宝',
  286. // 'url' => $this->createUrl("special/index"),
  287. // 'button_active' => inArray($urlInfo,array('special/index','special/setting','special/stu')),
  288. // 'is_show' => true,
  289. // 'all_nav'=>array('special/index','special/setting','special/stu')
  290. // ),
  291. // array(
  292. // 'name' => '假期作业',
  293. // 'url' => $this->createUrl("generalproduct/index",array('productType'=>ProductDownload::PRODUCT_TYPE_HOLIDAY_HOMEWORK)),
  294. // 'button_active' => inArray($productType,array(ProductDownload::PRODUCT_TYPE_HOLIDAY_HOMEWORK)) && inArray($urlInfo,array('generalproduct/index','generalproduct/setting','generalproduct/stu',)),
  295. // 'is_show' => true,
  296. // 'all_nav'=>array('generalproduct/index','generalproduct/setting','generalproduct/stu',)
  297. // ),
  298. // array(
  299. // 'name' => '错题精练',
  300. // 'url' => $this->createUrl("generalproduct/index",array('productType'=>ProductDownload::PRODUCT_TYPE_WRONG_REFINE)),
  301. // 'button_active' => inArray($productType,array(ProductDownload::PRODUCT_TYPE_WRONG_REFINE)) && inArray($urlInfo,array('generalproduct/index','generalproduct/setting','generalproduct/stu',)),
  302. // 'is_show' => true,
  303. // 'all_nav'=>array('generalproduct/index','generalproduct/setting','generalproduct/stu',)
  304. // ),
  305. // array(
  306. // 'name' => 'e学慧通',
  307. // 'url' => $this->createUrl("product/index"),
  308. // 'button_active' => inArray($urlInfo,array('product/index',)),
  309. // 'is_show' => true,
  310. // 'all_nav'=>array('product/index',)
  311. // ),
  312. );
  313. }elseif($sub_id == 8){
  314. $subjectHomePage[$sub_id]='export/index_duo';
  315. $meauArr = array(
  316. array(
  317. 'name' => '导出报告',
  318. 'url' => $this->createUrl("export/index_duo"),
  319. 'button_active' => inArray($urlInfoAll,array('export/index_duo','export/batch_duo')),
  320. 'is_show' => true,
  321. 'all_nav'=>array('export/index_duo','export/batch_duo')
  322. ),
  323. // array(
  324. // 'name' => '错题本',
  325. // 'url' => $this->createUrl("print/sub_index",array('type'=>'third_wb')),
  326. // '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'),
  327. // 'is_show' => true,
  328. // 'all_nav'=>array('print/sub_index','print/changewrongtopic')
  329. // ),
  330. // array(
  331. // 'name' => '英语个性化学习宝',
  332. // 'url' => $this->createUrl("print/sub_index", array('type' => 'third_isp')),
  333. // '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')),
  334. // 'is_show' => true,
  335. // 'all_nav'=>array('print/sub_index','print/selectstubymainly','print/changeraisescheme','print/mrv','print/mainly_revision','print/selectstubymrv','print/mrv3','print/mrvsetting','print/setting_mainly')
  336. // ),
  337. // array(
  338. // 'name' => '外刊宝(老版)',
  339. // 'url' => $this->createUrl("print/english_reading",array('cg'=>1)),
  340. // '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')),
  341. // 'is_show' => in_array($sub_id, array(8)) && $showWK?true:false,
  342. // 'all_nav'=>array('print/english_reading','print/selectstubyenglishreading','print/englishreadingsetting','print/englishreading3','print/englishreadingtime')
  343. // ),
  344. // array(
  345. // 'name' => '基础宝',
  346. // 'url' => $this->createUrl("print/english_reading",array('pt'=>1,'cg'=>2)),
  347. // 'button_active' => inArray($urlInfoAll,array('print/english_reading/pt/1','print/selectStuByEnglishReading/cg/2/pt/1','print/englishreadingsetting','print/englishreading3','print/englishreadingtime')),
  348. // 'is_show' => in_array($sub_id, array(8))?true:false,
  349. // 'all_nav'=>array('print/english_reading','print/selectstubyenglishreading','print/englishreadingsetting','print/englishreading3','print/englishreadingtime')
  350. // ),
  351. // array(
  352. // 'name' => '外刊宝',
  353. // 'url' => $this->createUrl("print/english_reading",array('pt'=>2,'cg'=>2)),
  354. // 'button_active' => inArray($urlInfoAll,array('print/english_reading/pt/2','print/selectStuByEnglishReading/cg/2/pt/2','print/englishreadingsetting','print/englishreading3','print/englishreadingtime')),
  355. // 'is_show' => in_array($sub_id, array(8))?true:false,
  356. // 'all_nav'=>array('print/english_reading','print/selectstubyenglishreading','print/englishreadingsetting','print/englishreading3','print/englishreadingtime')
  357. // ),
  358. // array(
  359. // 'name' => '热点宝',
  360. // 'url' => $this->createUrl("print/english_reading",array('pt'=>3,'cg'=>2)),
  361. // 'button_active' => inArray($urlInfoAll,array('print/english_reading/pt/3','print/selectStuByEnglishReading/cg/2/pt/3','print/englishreadingsetting','print/englishreading3','print/englishreadingtime')),
  362. // 'is_show' => in_array($sub_id, array(8))?true:false,
  363. // 'all_nav'=>array('print/english_reading','print/selectstubyenglishreading','print/englishreadingsetting','print/englishreading3','print/englishreadingtime')
  364. // ),
  365. // array(
  366. // 'name' => '词汇宝',
  367. // 'url' => $this->createUrl("magic/index"),
  368. // 'button_active' => inArray($urlInfo,array('magic/index','magic/setting','magic/stu')),
  369. // 'is_show' => true,
  370. // 'all_nav'=>array('magic/index','magic/setting','magic/stu')
  371. // ),
  372. // array(
  373. // 'name' => '写作宝',
  374. // 'url' => $this->createUrl("writing/index"),
  375. // 'button_active' => inArray($urlInfo,array('writing/index','writing/setting','writing/stu')),
  376. // 'is_show' => true,
  377. // 'all_nav'=>array('writing/index','writing/setting','writing/stu')
  378. // ),
  379. // array(
  380. // 'name' => '假期作业',
  381. // 'url' => $this->createUrl("generalproduct/index",array('productType'=>ProductDownload::PRODUCT_TYPE_HOLIDAY_HOMEWORK)),
  382. // 'button_active' => inArray($urlInfo,array('generalproduct/index','generalproduct/setting','generalproduct/stu',)),
  383. // 'is_show' => true,
  384. // 'all_nav'=>array('generalproduct/index','generalproduct/setting','generalproduct/stu',)
  385. // ),
  386. // array(
  387. // 'name' => 'e学慧通',
  388. // 'url' => $this->createUrl("product/index"),
  389. // 'button_active' => inArray($urlInfo,array('product/index',)),
  390. // 'is_show' => true,
  391. // 'all_nav'=>array('product/index',)
  392. // ),
  393. );
  394. }elseif($sub_id == 12){
  395. $subjectHomePage[$sub_id]='export/index_duo';
  396. $meauArr = array(
  397. array(
  398. 'name' => '导出报告',
  399. 'url' => $this->createUrl("export/index_duo"),
  400. 'button_active' => inArray($urlInfoAll,array('export/index_duo','export/batch_duo')) ,
  401. 'is_show' => true,
  402. 'all_nav'=>array('export/index_duo','export/batch_duo')
  403. ),
  404. // array(
  405. // 'name' => '错题本',
  406. // 'url' => $this->createUrl("print/sub_index",array('type'=>'third_wb')),
  407. // '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'),
  408. // 'is_show' => true,
  409. // 'all_nav'=>array('print/sub_index','print/changewrongtopic')
  410. // ),
  411. // array(
  412. // 'name' => '个性化学习方案',
  413. // 'url' => $this->createUrl("print/sub_index", array('type' => 'isp')),
  414. // 'button_active' => inArray($urlInfoAll,array('print/sub_index/type/isp')) || (inArray($urlInfo,array('print/changeraisescheme','print/sub_index')) && $urlType == 'isp'),
  415. // 'is_show' => true,
  416. // 'all_nav'=>array('print/sub_index','print/changeraisescheme')
  417. // ),
  418. // array(
  419. // 'name' => '个性化学习宝',
  420. // 'url' => $this->createUrl("print/sub_index", array('type' => 'studytrend')),
  421. // 'button_active' => inArray($urlInfoAll,array('print/sub_index/type/studytrend')) || (inArray($urlInfo,array('print/changeraisescheme','print/sub_index')) && $urlType == 'studytrend'),
  422. // 'is_show' => true,
  423. // 'all_nav'=>array('print/sub_index','print/changeraisescheme')
  424. // ),
  425. // array(
  426. // 'name' => '阶段复习学习宝',
  427. // 'url' => $this->createUrl("print/student_product"),
  428. // 'button_active' => inArray($urlInfo,array('print/student_product','print/class_student_product')),
  429. // 'is_show' => true,
  430. // 'all_nav'=>array('print/student_product','print/class_student_product')
  431. // ),
  432. //
  433. // array(
  434. // 'name' => '假期作业',
  435. // 'url' => $this->createUrl("generalproduct/index",array('productType'=>ProductDownload::PRODUCT_TYPE_HOLIDAY_HOMEWORK)),
  436. // 'button_active' => inArray($productType,array(ProductDownload::PRODUCT_TYPE_HOLIDAY_HOMEWORK)) && inArray($urlInfo,array('generalproduct/index','generalproduct/setting','generalproduct/stu',)),
  437. // 'is_show' => true,
  438. // 'all_nav'=>array('generalproduct/index','generalproduct/setting','generalproduct/stu',)
  439. // ),
  440. // array(
  441. // 'name' => '错题精练',
  442. // 'url' => $this->createUrl("generalproduct/index",array('productType'=>ProductDownload::PRODUCT_TYPE_WRONG_REFINE)),
  443. // 'button_active' => inArray($productType,array(ProductDownload::PRODUCT_TYPE_WRONG_REFINE)) && inArray($urlInfo,array('generalproduct/index','generalproduct/setting','generalproduct/stu',)),
  444. // 'is_show' => true,
  445. // 'all_nav'=>array('generalproduct/index','generalproduct/setting','generalproduct/stu',)
  446. // ),
  447. // array(
  448. // 'name' => 'e学慧通',
  449. // 'url' => $this->createUrl("product/index"),
  450. // 'button_active' => inArray($urlInfo,array('product/index',)),
  451. // 'is_show' => true,
  452. // 'all_nav'=>array('product/index',)
  453. // ),
  454. );
  455. }else{
  456. $subjectHomePage[$sub_id]='export/index_duo';
  457. if(isset($this->extendSubject[$sub_id]) && $sub_id!=21){
  458. $meauArr = array(
  459. array(
  460. 'name' => '导出报告',
  461. 'url' => $this->createUrl("export/index_duo"),
  462. 'button_active' => inArray($urlInfoAll,array('export/index_duo','export/batch_duo')) ,
  463. 'is_show' => true,
  464. 'all_nav'=>array('export/index_duo','export/batch_duo')
  465. ),
  466. );
  467. }else{
  468. $meauArr = array(
  469. array(
  470. 'name' => '导出报告',
  471. 'url' => $this->createUrl("export/index_duo"),
  472. 'button_active' => inArray($urlInfoAll,array('export/index_duo','export/batch_duo')) ,
  473. 'is_show' => true,
  474. 'all_nav'=>array('export/index_duo','export/batch_duo')
  475. ),
  476. // array(
  477. // 'name' => '错题本',
  478. // 'url' => $this->createUrl("print/sub_index",array('type'=>'third_wb')),
  479. // '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'),
  480. // 'is_show' => true,
  481. // 'all_nav'=>array('print/sub_index','print/changewrongtopic')
  482. // ),
  483. );
  484. }
  485. }
  486. $allNavUrl=array();
  487. foreach ($meauArr as $value){
  488. $allNavUrl=array_merge($allNavUrl,$value['all_nav']);
  489. }
  490. if(!inArray($urlInfo,$allNavUrl)){
  491. return $this->redirect(array($subjectHomePage[$sub_id]));
  492. }
  493. ?>
  494. <ul class="clearfix main-content-inner-ul">
  495. <?php foreach ($meauArr as $meau):?>
  496. <?php if(!$meau['is_show']) continue;?>
  497. <li class="pull-left">
  498. <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>
  499. <img src="/images/line.jpg" style="height:45px;" />
  500. </li>
  501. <?php endforeach;?>
  502. <li class="pull-right">
  503. <div class="tabs clearfix">
  504. <!-- <a href="javascript:;" class="fl --><?php //if(isset($_GET['_tab'])){if($_GET['_tab'] ==0){echo 'active';}}else{echo 'active';}?><!--" id="_third_shijuan">全学科</a>-->
  505. <!-- <a href="javascript:;" class="fl --><?php //if(isset($_GET['_tab'])){if($_GET['_tab'] ==1){echo 'active';}}?><!--" id="_baogao">导出报告</a>-->
  506. <div class="tab-con clearfix pull-right" style="margin:8px 11px 0 0">
  507. <div class="has-sel fl"><?php echo isset(Yii::app()->params["subjectId"][$sub_id])?Yii::app()->params["subjectId"][$sub_id]:'数学'?></div>
  508. <div class="sel-opt fl">
  509. 切换学科
  510. <?php if($subject){?>
  511. <!-- <div class="points"></div>-->
  512. <?php }?>
  513. </div>
  514. <div class="sel-cons" style="z-index:6;background-color: #fff;height:500px;overflow: auto">
  515. <?php foreach ($subjectNameArr as $_subId => $_subName):?>
  516. <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>
  517. <?php endforeach;?>
  518. </div>
  519. </div>
  520. </div>
  521. </li>
  522. </ul>
  523. <script type="text/javascript">
  524. $(document).ready(function() {
  525. $(".sel-opt,.sel-cons").mouseover(function () {
  526. $(".sel-cons").show();
  527. }).mouseout(function () {
  528. $(".sel-cons").hide();
  529. });
  530. $(".sc-lis2").click(function () {
  531. var sub_id = $(this).attr('val');
  532. var data = {
  533. subjectId: sub_id
  534. };
  535. $.post("<?php echo Yii::app()->createUrl('print/setSubjectId')?>", data, function (flags) {
  536. if (flags) {
  537. // location.reload();
  538. if (sub_id == 3 || sub_id == 6 || sub_id == 51 ) {
  539. var url = "<?php echo $this->createUrl("export/index");?>";
  540. }else{
  541. var url = "<?php echo $this->createUrl("export/index_duo");?>";
  542. }
  543. location.href = url;
  544. } else {
  545. alert('网络异常');
  546. }
  547. });
  548. $('.has-sel').text($(this).text());
  549. $(".sel-cons").hide();
  550. });
  551. });
  552. </script>