content.php 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426
  1. <div class="paper teaching">
  2. <!-- 词汇集训-->
  3. <div class="part vocabulary">
  4. <div class="content">
  5. <div class="title-head">
  6. <div class="title">
  7. <div class="title-text">
  8. Expression Intensive Training(词汇集训)
  9. </div>
  10. </div>
  11. <div class="title-bottom">
  12. <!--span>人教必修一</span-->
  13. <span><?php echo $title; ?></span>
  14. </div>
  15. </div>
  16. <!-- 词汇回顾 -->
  17. <?php if($word_review && $wordReview){ ?>
  18. <div class="modular review">
  19. <div class="modular-title">
  20. <img class="modular-title-icon" src="<?php echo $server.'/images/magic_word/lable1-icon.png'; ?> " alt="">
  21. <?php echo $title_m_no[$flag_m_no]; ?>、Expression Review (词汇回顾)</div>
  22. <?php foreach($word_review as $value){
  23. if(!$value['single_word'] && !$value['phrase']) continue;
  24. ?>
  25. <div class="unit-block">
  26. <div class="unit-title">
  27. <img src="<?php echo $server.'/images/magic_word/start.png';?>" alt="" />
  28. <span><?php echo $value['name']; ?></span>
  29. </div>
  30. <div class="type-block word-block">
  31. <div class="word-type">单词:</div>
  32. <p>
  33. <?php if($value['single_word']){
  34. $_word = '';
  35. foreach($value['single_word'] as $id=>$word){
  36. $_word .= $word['content'].', ';
  37. }
  38. echo substr($_word,0,-1);
  39. }?>
  40. </p>
  41. </div>
  42. <div class="type-block word-block">
  43. <div class="word-type">短语:</div>
  44. <p>
  45. <?php if($value['phrase']){
  46. $_word = '';
  47. foreach($value['phrase'] as $id=>$word){
  48. $_word .= $word['content'].',';
  49. }
  50. echo substr($_word,0,-1);
  51. }?>
  52. </p>
  53. </div>
  54. </div>
  55. <?php }?>
  56. <div class="qr-code">
  57. <div class="qr-code-text">用APP扫码点读词汇→</div>
  58. <img src="<?php echo $h5_image;?>" alt="" />
  59. </div>
  60. </div>
  61. <?php
  62. $flag_m_no++; } ?>
  63. <!-- 词汇精讲 -->
  64. <?php if($word_phase && $wordExplain){ ?>
  65. <div class="modular explain">
  66. <div class="modular-title">
  67. <img class="modular-title-icon" src="<?php echo $server.'/images/magic_word/lable1-icon.png'; ?> " alt="">
  68. <?php echo $title_m_no[$flag_m_no]; ?>、Expression Consolidation (词汇精讲)
  69. </div>
  70. <div class="word-table">
  71. <table>
  72. <tbody>
  73. <?php
  74. $word_explain_no = 1;
  75. foreach($word_phase as $word_id=>$info){
  76. ?>
  77. <tr>
  78. <td>
  79. <div class="word-table-left">
  80. <div class="word">
  81. <i><?php echo $word_explain_no; ?></i>
  82. <span><?php echo $info['content']; ?></span><?php echo $info['phonetic_symbol']; ?>
  83. </div>
  84. <p><?php echo $info['mean']; ?></p>
  85. </div>
  86. </td>
  87. <td>
  88. <div class="word-table-right">
  89. <?php if(isset($info['derivative']['derivative']) && $info['derivative']['derivative']){ ?>
  90. <div class="from">
  91. <span class="from-lable">【派生】</span>
  92. <p class="from-txt">
  93. <?php
  94. $_content = '';
  95. foreach($info['derivative']['derivative'] as $id=>$content){
  96. $_content .= $content.';';
  97. }
  98. echo substr($_content,0,-1);
  99. ?>
  100. </p>
  101. </div>
  102. <?php }?>
  103. <?php if(isset($info['phrase']['phrase']) && $info['phrase']['phrase']){?>
  104. <div class="from">
  105. <span class="from-lable">【短语】</span>
  106. <p class="from-txt">
  107. <?php
  108. $_content = '';
  109. foreach($info['phrase']['phrase'] as $id=>$content){
  110. $_content .= $content.';';
  111. }
  112. echo substr($_content,0,-1);
  113. ?>
  114. </p>
  115. </div>
  116. <?php }?>
  117. <?php if(isset($info['assoc']) && $info['assoc']){?>
  118. <div class="from">
  119. <span class="from-lable">【趣味记忆法】</span>
  120. <p class="from-txt">
  121. <?php echo $info['assoc'];?>
  122. </p>
  123. </div>
  124. <?php }?>
  125. </div>
  126. </td>
  127. </tr>
  128. <?php $word_explain_no++; } ?>
  129. </tbody>
  130. </table>
  131. </div>
  132. <div class="qr-code">
  133. <div class="qr-code-text">用APP扫码点读词汇→</div>
  134. <img src="<?php echo $h5_image;?>" alt="" />
  135. </div>
  136. </div>
  137. <?php $flag_m_no++;}?>
  138. <!-- 精准训练 -->
  139. <?php
  140. if($translate || $wordApply || $discourse){
  141. ?>
  142. <div class="modular train">
  143. <div class="modular-title">
  144. <img class="modular-title-icon" src="<?php echo $server.'/images/magic_word/lable1-icon.png'; ?> " alt="">
  145. <?php echo $title_m_no[$flag_m_no]; ?>、Precise Application (精准训练)
  146. </div>
  147. <!-- 英汉互译 -->
  148. <?php
  149. $flag_m_no = 1;
  150. if($translates && $translate){
  151. ?>
  152. <div class="unit-block">
  153. <div class="unit-title b-title">
  154. <img src="<?php echo $server.'/images/magic_word/start.png';?>" alt="" />
  155. <span>(<?php echo $title_m_no[$flag_m_no]; ?>)
  156. <?php if($setting['practice_type'] == 1){ //共性
  157. echo $translate_type[$setting['translate_type']];
  158. }else{ //个性
  159. echo isset($translates['type']) ? $translate_type[$translates['type']] : $translate_type[1];
  160. }
  161. ?>
  162. </span>
  163. </div>
  164. <div class="type-block">
  165. <ol class="sort-list lr-list s-line clearfix">
  166. <?php
  167. $translate_type_no = 1;
  168. if($setting['practice_type'] == 1){ //共性
  169. if($setting['translate_type'] == 1){ //英汉互译
  170. if(isset($translates['phrases'])){
  171. foreach ($translates['phrases'] as $val){
  172. ?>
  173. <li><?php echo $val['mean']; ?><i><?php echo $val['content']; ?></i></li>
  174. <?php
  175. $translate_type_no++;
  176. }
  177. }
  178. if(isset($translates['single_words'])){
  179. foreach ($translates['single_words'] as $val){
  180. ?>
  181. <li><?php echo $translate_type_no < 11 ? $val['mean'] :$val['content']; ?><i><?php echo $translate_type_no < 11 ? $val['content'] : $val['mean']; ?></i></li>
  182. <?php
  183. $translate_type_no++;
  184. }
  185. }
  186. }elseif($setting['translate_type'] == 2){ //英译中
  187. if(isset($translates['phrases'])){
  188. foreach ($translates['phrases'] as $val){
  189. ?>
  190. <li><?php echo $val['content']; ?><i><?php echo $val['mean']; ?></i></li>
  191. <?php
  192. $translate_type_no++;
  193. }
  194. }
  195. if(isset($translates['single_words'])){
  196. foreach ($translates['single_words'] as $val){
  197. ?>
  198. <li><?php echo $val['content']; ?><i><?php echo $val['mean']; ?></i></li>
  199. <?php
  200. $translate_type_no++;
  201. }
  202. }
  203. }else{ //中译英
  204. if(isset($translates['phrases'])){
  205. foreach ($translates['phrases'] as $val){
  206. ?>
  207. <li><?php echo $val['mean']; ?><i><?php echo $val['content']; ?></i></li>
  208. <?php
  209. $translate_type_no++;
  210. }
  211. }
  212. if(isset($translates['single_words'])){
  213. foreach ($translates['single_words'] as $val){
  214. ?>
  215. <li><?php echo $val['mean'] ; ?><i><?php echo $val['content']; ?></i></li>
  216. <?php
  217. $translate_type_no++;
  218. }
  219. }
  220. }
  221. }else{ //个性
  222. if(isset($translates['type']) && $translates['type'] == 1){
  223. foreach ($translates['phrases'] as $val){
  224. ?>
  225. <li><?php echo $val['mean']; ?><i><?php echo $val['content']; ?></i></li>
  226. <?php
  227. $translate_type_no++;
  228. }
  229. if(isset($translates['single_words'])){
  230. foreach ($translates['single_words'] as $val){
  231. ?>
  232. <li><?php echo $translate_type_no < 11 ? $val['mean'] : $val['content']; ?><i><?php echo $translate_type_no < 11 ? $val['content'] : $val['mean']; ?></i></li>
  233. <?php
  234. $translate_type_no++;
  235. }
  236. }
  237. }elseif(isset($translates['type']) && $translates['type'] == 2){
  238. if(isset($translates['phrases'])){
  239. foreach ($translates['phrases'] as $val){
  240. ?>
  241. <li><?php echo $val['content']; ?><i><?php echo $val['mean']; ?></i></li>
  242. <?php
  243. $translate_type_no++;
  244. }
  245. }
  246. if(isset($translates['single_words'])){
  247. foreach ($translates['single_words'] as $val){
  248. ?>
  249. <li><?php echo $val['content']; ?><i><?php echo $val['mean']; ?></i></li>
  250. <?php
  251. $translate_type_no++;
  252. }
  253. }
  254. }elseif(isset($translates['type']) && $translates['type'] == 3){
  255. if(isset($translates['phrases'])){
  256. foreach ($translates['phrases'] as $val){
  257. ?>
  258. <li><?php echo $val['mean']; ?><i><?php echo $val['content']; ?></i></li>
  259. <?php
  260. $translate_type_no++;
  261. }
  262. }
  263. if(isset($translates['single_words'])){
  264. foreach ($translates['single_words'] as $val){
  265. ?>
  266. <li><?php echo $val['mean'] ; ?><i><?php echo $val['content']; ?></i></li>
  267. <?php
  268. $translate_type_no++;
  269. }
  270. }
  271. }
  272. }
  273. ?>
  274. </ol>
  275. </div>
  276. </div>
  277. <?php $flag_m_no++; } ?>
  278. <!-- 词汇运用 -->
  279. <?php if($word_apply_ids && $wordApply){
  280. #$wordSpell 单词拼写是否显示
  281. #$sentenceFill 单句语法填空是否显示
  282. # $sentenceTranslate 单句翻译是否显示
  283. if($wordSpell || $sentenceFill || $sentenceTranslate) {
  284. $topic_type = array(8=>'Word Spelling (单词拼写)',19=>'Grammar Gap in Sentence (单句语法填空)',20=>'Sentence Translation (单句翻译)');
  285. $no = 1;
  286. // print_r($word_apply_content);exit;
  287. ?>
  288. <div class="unit-block has-three">
  289. <div class="unit-title b-title">
  290. <img src="<?php echo $server.'/images/magic_word/start.png';?>" alt="" />
  291. <span>(<?php echo $title_m_no[$flag_m_no]; ?>)Word in Practice (单词运用)</span>
  292. </div>
  293. <?php foreach($word_apply_ids as $tp=>$topic_id){
  294. if(array_key_exists($tp,$topic_type)){
  295. if(!$wordSpell && $tp == 8)continue;
  296. if(!$sentenceFill && $tp == 19)continue;
  297. if(!$sentenceTranslate && $tp == 20)continue;
  298. ?>
  299. <div class="type-block">
  300. <div class="type-title">
  301. <div class="type-title-content">
  302. <img src="<?php echo $server.'/images/magic_word/Feather-bg.png';?>" alt="" />
  303. <i><?php echo $title_no[$no];?></i><?php echo isset($topic_type[$tp]) ? $topic_type[$tp] : ''; ?>
  304. </div>
  305. </div>
  306. <ol class="sort-list <?php echo $tp == 20 ? 'b-line' : ''; ?>">
  307. <?php foreach($word_apply_ids[$tp] as $topic_id){
  308. ?>
  309. <li>
  310. <?php if(isset($word_apply_content[$topic_id])){
  311. echo preg_replace("/<\/?[p|P|article][^>]*>/si","",$word_apply_content[$topic_id]['queBody']);
  312. $answer = isset($word_apply_content[$topic_id]['answer'][$topic_id]) ? preg_replace("/<\/?[p|P][^>]*>/si","",$word_apply_content[$topic_id]['answer'][$topic_id]) : '';
  313. $analysis = preg_replace("/<\/?[p|P][^>]*>/si","",$word_apply_content[$topic_id]['analysis']);
  314. echo $tp == 20 ? '<i>'.$answer.'</i>' : '<div class="ans-ana">
  315. <div class="ans">
  316. <em class="ana-lable">【答案】</em>
  317. <span>'.$answer.'</span>
  318. </div>
  319. <p class="analysis">
  320. <em class="ana-lable">【解析】</em>
  321. '.$analysis.'
  322. </p>
  323. </div>';
  324. }else{
  325. continue;
  326. } ?>
  327. </li>
  328. <?php
  329. }
  330. ?>
  331. </ol>
  332. </div>
  333. <?php }?>
  334. <?php
  335. $no++;} $flag_m_no++;
  336. }
  337. }?>
  338. <!-- 语篇训练 -->
  339. <?php if($card_topic_ids && $discourse){
  340. $topic_type = array(2=>'Choice Cloze (完形填空)', 3=>'Reading Comprehension (阅读理解)', 5=>'Sentence Cloze (七选五)', 6=>'Grammar Gap Filling (语法填空)');
  341. $no = 1;
  342. ?>
  343. <div class="unit-block has-three">
  344. <div class="unit-title b-title">
  345. <img src="<?php echo $server.'/images/magic_word/start.png';?>" alt="" />
  346. <span>(<?php echo $title_m_no[$flag_m_no]; ?>) Passage Test (语篇训练)</span>
  347. </div>
  348. <?php foreach($card_topic_ids as $tp=>$topic_id){
  349. if(array_key_exists($tp,$topic_type)){
  350. ?>
  351. <div class="type-block paragraph">
  352. <div class="type-title">
  353. <div class="type-title-content">
  354. <img src="<?php echo $server.'/images/magic_word/Feather-bg.png';?>" alt="" />
  355. <i><?php echo $title_no[$no];?></i><?php echo isset($topic_type[$tp]) ? $topic_type[$tp] : ''; ?>
  356. </div>
  357. </div>
  358. <article>
  359. <?php echo isset($card_topic_content[$card_topic_ids[$tp]]) ? preg_replace("/(?:height|width)=(\'|\").*?\"/si","",$card_topic_content[$card_topic_ids[$tp]]['queBody']) : ''; ?>
  360. </article>
  361. <?php if($tp == 3 ){ ?>
  362. <div class="option-block">
  363. <?php if(isset($card_topic_content[$card_topic_ids[$tp]])){
  364. $topic_no = 1;
  365. foreach($card_topic_content[$card_topic_ids[$tp]]['slave'] as $v){
  366. ?>
  367. <div class="question-block">
  368. <p class="question">
  369. <?php echo $topic_no.'.'.preg_replace("/<\/?[p|P][^>]*>/si","",$v['queBody']) ; ?>
  370. </p>
  371. <ul class="option-list">
  372. <?php echo preg_replace("/<\/?[p|P][^>]*>/si","",$v['options']) ; ?>
  373. </ul>
  374. </div>
  375. <?php $topic_no++;}
  376. }?>
  377. </div>
  378. <?php }elseif($tp == 2){
  379. if(isset($card_topic_content[$card_topic_ids[$tp]])){
  380. ?>
  381. <div class="option-block">
  382. <ul class="sort-list">
  383. <?php foreach($card_topic_content[$card_topic_ids[$tp]]['slave'] as $v){
  384. ?>
  385. <li>
  386. <ul class="option-list">
  387. <?php echo preg_replace("/<\/?[p|P][^>]*>/si","",$v['options']) ; ?>
  388. </ul>
  389. </li>
  390. <?php
  391. }?>
  392. </ul>
  393. </div>
  394. <?php
  395. }
  396. }?>
  397. <div class="ans-ana">
  398. <div class="ans-list">
  399. <em class="ans-lable">【答案】</em>
  400. <ul class="sort-list">
  401. <?php foreach($card_topic_content[$card_topic_ids[$tp]]['answer'] as $option_answer){ ?>
  402. <li style="font-weight: bold"><?php echo preg_replace("/<\/?[p|P][^>]*>/si","",$option_answer);?></li>
  403. <?php }?>
  404. </ul>
  405. </div>
  406. <div class="analysis">
  407. <em class="ana-lable">【解析】</em>
  408. <?php echo $card_topic_content[$card_topic_ids[$tp]]['analysis']; ?>
  409. </div>
  410. </div>
  411. </div>
  412. <?php }
  413. $no++; }?>
  414. </div>
  415. <?php
  416. } ?>
  417. </div>
  418. </div>
  419. <?php $flag_m_no++;}?>
  420. <div style="page-break-after: always;"></div>
  421. </div>
  422. </div>
  423. <div style="page-break-after: always;"></div>