123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <title>外刊宝</title>
- <meta name="description" content="">
- <meta name="keywords" content="">
- <link rel="stylesheet" href="<?php echo Yii::app()->request->hostInfo;?>/css/english_reading/reset.css">
- <link rel="stylesheet" href="<?php echo Yii::app()->request->hostInfo;?>/css/english_reading/base.css">
- <link rel="stylesheet" href="<?php echo Yii::app()->request->hostInfo;?>/css/english_reading/en_reading.css">
- <style>
- /* .pdf-B5 {
- background: url(<?php // echo Yii::app()->request->hostInfo.'/images/en_reading/bg-watermark.png';?>);
- background-repeat: repeat-y;
- background-size: 100%;
- }*/
- .paper-number {
- background: url(<?php echo Yii::app()->request->hostInfo.'/images/en_reading/bg-paper-number.png';?>) no-repeat;
- background-size: 8.4mm;
- }
- .topic .topic-number .bg-wrap {
- display: inline-block;
- width: 22.2mm;
- height: 6.8mm;
- padding-left: 2.6mm;
- line-height: 5.8mm;
- background: url(<?php echo Yii::app()->request->hostInfo.'/images/en_reading/bg-topic-number.png';?>) no-repeat;
- background-size: 22.2mm 6.8mm;
- font-size:18pt;
- }
- .pdf-B5 .module-bgc {
- background: url(<?php echo Yii::app()->request->hostInfo.'/images/en_reading/gong-xing.png';?> ) no-repeat;
- background-size: 100% 100%;
- }
- </style>
- </head>
- <body>
- <!-- 内容开始 -->
- <?php
- $options_arr = array("A.","B.","C.","D.","E.","F.","G.","H.","I.","J");
- ?>
- <div class="pdf-B5">
- <div class="pdf-content">
- <?php if(isset($topic_ids) && $topic_ids):?>
- <?php $n = 0;?>
- <?php foreach($topic_ids as $topic_id):?>
- <?php
- if(isset($topic_detail) && isset($topic_detail[$topic_id]) && $topic_detail[$topic_id]){
- $v=$topic_detail[$topic_id];
- }else{
- continue;
- }
- ?>
- <section class="topic">
- <h2 class="topic-number">
- <span class="bg-wrap"><?php echo chr(65+$n);?></span>
- </h2>
- <div class="topic-msg">
- <span>主题语境:<?php echo isset($v['ztyj'])?$v['ztyj']:'';?></span>
- <span>体裁:<?php echo isset($v['tc'])?$v['tc']:'';?></span>
- <span>语篇等级:<em class="highlight-a"><?php echo isset($v['ypdj'])?$v['ypdj']:'';?></em></span>
- <span><?php echo substr($topic_id,4);?></span>
- </div>
- <div class="topic-main">
- <?php echo isset($v['title'])?$v['title']:'';?>
- </div>
- <?php if(isset($v['slave']) && $v['slave'] && !in_array($v['type_id'],$type_config['seven_selected_five'])):?>
- <?php foreach($v['slave'] as $slave_key=>$slave_value):?>
- <div class="min-topic-block">
- <div class="min-topic">
-
- <?php if(in_array($v['type_id'],array(430,41))):?>
- <div class="min-topic-block">
- <ul class="sort-list">
- <li>
- <i><?php echo ($slave_key+1);?>.</i>
- <?php if(isset($slave_value['options']) && $slave_value['options']):?>
- <ul class="option-list">
- <?php foreach($slave_value['options'] as $op_k=>$op_v):?>
- <li><?php echo $options_arr[$op_k];?><?php echo $op_v;?></li>
- <?php endforeach;?>
- </ul>
- <?php endif;?>
- </li>
- </ul>
- </div>
- <?php else:?>
- <!-- 题干 -->
- <?php if($slave_value['title']):?>
- <div class="min-topic-content"><?php echo ($slave_key+1).'.'.$slave_value['title']?></div>
- <?php else:?>
- <div class="min-topic-number"><?php echo ($slave_key+1).'.'.$slave_value['title']?></div>
- <?php endif;?>
-
- <!-- 选项 -->
- <ul class="option clearfix col-1">
- <?php if(isset($slave_value['options']) && $slave_value['options']):?>
- <?php foreach($slave_value['options'] as $op_k=>$op_v):?>
- <li><b class="option-a"><?php echo $options_arr[$op_k];?></b><?php echo $op_v;?></li>
- <?php endforeach;?>
- <?php endif;?>
- </ul>
- <?php endif;?>
- </div>
- </div>
- <?php endforeach;?>
- <?php endif;?>
-
- <div class="topic-module-answer">
- <div class="answer-wrap">
- <span class="answer-title">【答案】</span>
- <?php if(isset($v['answer']) && $v['answer']):?>
- <p class="answer-block">
- <?php if(count($v['answer'])==1){ ?>
- <?php echo implode('',$v['answer']);?>
- <?php }elseif(count($v['answer'])<15){ ?>
- <?php echo '1~'.count($v['answer']);?> <?php echo implode('',$v['answer']);?>
- <?php }elseif(count($v['answer']) == 15){ ?>
- <?php
- $all_answer = implode('',$v['answer']);
- echo '1~5';echo substr($all_answer,0,5);
- echo ' 6~10';echo substr($all_answer,5,5);
- echo ' 11~15';echo substr($all_answer,10,5);
- ?>
- <?php }else{?>
- <?php
- $all_answer = implode('',$v['answer']);
- echo '1~5';echo substr($all_answer,0,5);
- echo ' 6~10';echo substr($all_answer,5,5);
- echo ' 11~15';echo substr($all_answer,10,5);
- echo ' 15~'.count($v['answer']);echo substr($all_answer,15,5);
- ?>
- <?php } ?>
- </p>
- <?php endif;?>
- </div>
- <div class="analysis-wrap">
- <p class="analysis-title">【解析】</P>
- <div class="analysis"><?php echo isset($v['parse_content'])?$v['parse_content']:'';?></div>
- </div>
- <?php if(isset($v['chjl']) && $v['chjl']):?>
- <div class="module-bgc">
- <i>词汇积累</i>
- </div>
- <div class="question-type-mod-content">
- <div class="word-mean-item">
- <?php echo $v['chjl'];?>
- </div>
- </div>
- <?php endif;?>
- <?php if(isset($v['jzpx']) && $v['jzpx']):?>
- <div class="module-bgc">
- <i>句子剖析</i>
- </div>
- <div class="syntactic-analysis">
- <div class="syntactic-analysis-item">
- <?php echo $v['jzpx'];?>
- </div>
- </div>
- <?php endif;?>
- <?php if(isset($v['gjctz']) && $v['gjctz']):?>
- <div class="module-bgc">
- <i>关键词拓展</i>
- </div>
- <div class="syntactic-analysis">
- <div class="syntactic-analysis-item">
- <?php echo $v['gjctz'];?>
- </div>
- </div>
- <?php endif;?>
- <?php if(isset($v['cnjjx']) && $v['cnjjx']):?>
- <div class="module-bgc">
- <i>长难句解析</i>
- </div>
- <div class="syntactic-analysis">
- <div class="syntactic-analysis-item">
- <?php echo $v['cnjjx'];?>
- </div>
- </div>
- <?php endif;?>
- </div>
- </section>
-
- <?php $n++;?>
- <?php endforeach;?>
- <?php endif;?>
-
-
- </div>
-
-
- </div>
- <script>
- window.onload = function () {
- var optionUl = document.getElementsByClassName('option');
- console.log(optionUl);
- for (var i = 0; i < optionUl.length; i++) {
- arrayFunction(optionUl[i])
- }
- function arrayFunction(option) {
- for( var j = 0;j<option.children.length;j++){
- var sumWidth = 0
- sumWidth += option.children[j].offsetWidth
- }
- if (sumWidth > 111) {
- for (var k = 0; k < option.children.length; k++) {
- option.children[k].style.display = 'block'
- }
- } else {
- for (var m = 0; m < option.children.length; m++) {
- option.children[m].style.display = 'inline-block'
- option.children[m].style.float = 'left'
- if(option.children[m].offsetWidth>103){
- option.children[m].style.width = '44mm'
- }else{
- option.children[m].style.width = '30mm'
- }
- }
- }
- }
- }
- </script>
- </body>
- </html>
|