view.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <?php
  2. $use_version = '';
  3. if(isset(Yii::app()->session['coachInfo']->use_version))
  4. {
  5. $use_version = Yii::app()->session['coachInfo']->use_version;
  6. }else
  7. {
  8. $use_version = Yii::app()->session['coachInfo']['use_version'];
  9. }
  10. if(!$use_version)
  11. {
  12. $use_version = 100;
  13. }
  14. $version_number = implode('',explode('.',$use_version));
  15. $_num = '';
  16. if(strlen($version_number)<7)
  17. {
  18. for($i=0;$i<7-strlen($version_number);$i++)
  19. {
  20. $_num.='0';
  21. }
  22. }
  23. $version_number=(int)$version_number.$_num;
  24. ?>
  25. <!DOCTYPE html>
  26. <html lang="en">
  27. <head>
  28. <meta charset="UTF-8">
  29. <title>试题编辑</title>
  30. <link rel="stylesheet" type="text/css" href="/css/base.css">
  31. <script type="text/javascript" src="/js/jquery.min.js"></script>
  32. <script src="/js/layer/layer.js"></script>
  33. <style type="text/css">
  34. <?php if($version_number<2250000):?>
  35. /*.main-content-inner{*/
  36. /*display: block;*/
  37. /*width: 1000px;*/
  38. /*height: 520px;*/
  39. /*}*/
  40. /*.footer{*/
  41. /*margin-top:-20px;*/
  42. /*width: auto;*/
  43. /*text-align: center;*/
  44. /*}*/
  45. <?php else:?>
  46. /*.main-content-inner{*/
  47. /*display: block;*/
  48. /*width: 780px;*/
  49. /*height: 500px;*/
  50. /*}*/
  51. /*.footer{*/
  52. /*margin-top:-10px;*/
  53. /*width: auto;*/
  54. /*text-align: center;*/
  55. /*}*/
  56. <?php endif;?>
  57. .title{
  58. font-weight: bold;
  59. font-size: 16px;
  60. padding:0 0 0 15px;
  61. line-height: 30px;
  62. height: 30px;
  63. /*color:#fff;*/
  64. /*background-color: #0e8e54;*/
  65. }
  66. .content{
  67. padding:10px 15px;
  68. height:80%;
  69. overflow: auto;
  70. word-wrap:break-word;
  71. }
  72. .button{
  73. width:100px;
  74. height:35px;
  75. border:1px solid #2977ff;
  76. background:#2977ff;
  77. color:#fff;
  78. font-size:14px;
  79. cursor:pointer;
  80. line-height: 35px;
  81. display: inline-block;
  82. }
  83. .close-tips{
  84. padding-right: 20px;
  85. cursor: pointer;
  86. }
  87. .atta{display: inline-block;margin-left:20px;cursor: pointer}
  88. .red-tips{
  89. color: red;
  90. }
  91. </style>
  92. </head>
  93. <body>
  94. <div class="main-content-inner">
  95. <div class="title"><?php echo $title?></div>
  96. <div class="content">
  97. <?php echo $content?>
  98. <?php echo $files?>
  99. </div>
  100. <!--
  101. <div class="footer">
  102. <span class="button closeWindow">我知道了</span>
  103. </div>
  104. -->
  105. </div>
  106. </body>
  107. </html>
  108. <script>
  109. $(function(){
  110. $('.closeWindow').click(function(){
  111. evaluationClient.CallLocalFunc("close_window","")
  112. });
  113. $('.content').on('click','.atta',function(){
  114. url=$(this).attr('href');
  115. title=$(this).attr('title');
  116. window.location.href='<?php echo $this->createUrl('notification/download')?>?url='+url+'&title='+title;
  117. })
  118. })
  119. </script>