preview.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <title>好题本</title>
  8. <meta name="description" content="">
  9. <meta name="keywords" content="">
  10. <link rel="stylesheet" href="<?php echo Yii::app()->request->hostInfo.'/css/math_htb/reset.css';?>">
  11. <link rel="stylesheet" href="<?php echo Yii::app()->request->hostInfo.'/css/math_htb/base_new.css';?>">
  12. <link href="<?php echo Yii::app()->request->hostInfo.'/css/math_htb/math_good_topic.css';?>" rel="stylesheet">
  13. <style>
  14. /* 背景图片-水印 -开始 */
  15. .pdf-b5 {
  16. background: url(<?php echo Yii::app()->request->hostInfo.'/images/math_htb/watermark.png';?>);
  17. background-repeat: repeat-y;
  18. background-size: 100%;
  19. }
  20. /* 背景图片-水印 -结束 */
  21. .edition-title{
  22. background: url(<?php echo Yii::app()->request->hostInfo.'/images/math_htb/bg-edition.png';?> ) no-repeat;
  23. }
  24. .edition-title-two{
  25. background: url(<?php echo Yii::app()->request->hostInfo.'/images/math_htb/bg-edition-two.png';?> ) no-repeat;
  26. }
  27. .edition-title .text{
  28. background: url(<?php echo Yii::app()->request->hostInfo.'/images/math_htb/bg-edition-text-one.png';?> ) repeat-x;
  29. }
  30. .edition-title-two .text{
  31. background: url(<?php echo Yii::app()->request->hostInfo.'/images/math_htb/bg-edition-text-two-c.png';?> ) repeat-x;
  32. }
  33. .edition-title-three{
  34. background: url(<?php echo Yii::app()->request->hostInfo.'/images/math_htb/bg-edition-three.png';?> ) no-repeat;
  35. }
  36. </style>
  37. </head>
  38. <body>
  39. <!--好题本主要内容-->
  40. <?php
  41. $_node_id_arr = $node_id_arr;
  42. if (!function_exists('getHtmlContent')) {
  43. function getHtmlContent($_node_id_arr,&$_htb_text_arr,&$topic_info_arr,&$topic_method_use,&$method_video){
  44. foreach ($_node_id_arr as $node_arr) {
  45. include('level.php');
  46. if (isset($node_arr['children']) && is_array($node_arr['children']) && $node_arr['children']) {
  47. getHtmlContent($node_arr['children'],$_htb_text_arr,$topic_info_arr,$topic_method_use,$method_video);
  48. }
  49. }
  50. }
  51. }
  52. if (!function_exists('getHtmlAnswer')) {
  53. function getHtmlAnswer($_node_id_arr,&$_htb_text_arr,&$topic_info_arr){
  54. foreach ($_node_id_arr as $node_arr) {
  55. include('htb_anwser.php');
  56. if (isset($node_arr['children']) && is_array($node_arr['children']) && $node_arr['children']) {
  57. getHtmlAnswer($node_arr['children'],$_htb_text_arr,$topic_info_arr);
  58. }
  59. }
  60. }
  61. }
  62. ?>
  63. <div class="pdf-b5">
  64. <div class="pdf-content">
  65. <p class="paper-title"><?php echo $htb_set_name;?></p>
  66. <!-- 版本 -->
  67. <?php getHtmlContent($node_id_arr,$htb_text_arr,$topic_info_arr,$topic_method_use,$method_video);?>
  68. <div style="page-break-after: always;"></div>
  69. <!--好题本答案解析-->
  70. <div class="standard-answer">
  71. <div class="standard-answer-title">
  72. <img src="<?php echo Yii::app()->request->hostInfo.'/images/math_htb/img-standard-answer-title.png';?>" alt="答案解析">
  73. </div>
  74. <?php getHtmlAnswer($node_id_arr,$htb_text_arr,$topic_info_arr);?>
  75. </div>
  76. </div>
  77. </div>
  78. </body>
  79. </html>