6.0 首页增加题库栏目

2018-06-22 22:58:47 admin 6

响应式网站定制响应式网站定制

1、修改 index.php和product.php 两个代码都一样子

[html] view plain copy
  1. <?php  

  2. # MetInfo Enterprise Content Management System  

  3. # Copyright (C) MetInfo Co.,Ltd (http://www.metinfo.cn). All rights reserved.  

  4.   

  5. define('M_NAME', 'product');  

  6. define('M_MODULE', 'web');  

  7. define('M_CLASS', 'product');  

  8. define('M_ACTION', 'doproduct_examination');  

  9. require_once '../app/system/entrance.php';  

  10.   

  11. # This program is an open source system, commercial use, please consciously to purchase commercial license.  

  12. # Copyright (C) MetInfo Co., Ltd. (http://www.metinfo.cn). All rights reserved.  

  13. ?>  

define('M_ACTION', 'doproduct_examination');

路径:\app\system\product\web     product.class.php

响应式网站定制


[html] view plain copy
  1. //新增 题库试卷列表网页  

  2. public function doproduct_examination(){  

  3.     global $_M;  

  4.   

  5.     require_once $this->template('tem/product_examination');  

  6. }  

require_once $this->template('tem/product_examination');

模板路径:\templates\metv6   product_examination.php


响应式网站定制

路径:\templates\metv6    head_examination.php

响应式网站定制


响应式网站定制

subcolumn_nav_examination.php

[html] view plain copy
  1. <?php   

  2. $class11=$_M[form][c1];  

  3. $class12=$_M[form][c2];   

  4. $class13=$_M[form][c3];   

  5. $title1=$_M[form][title1];    

  6. $title2=$_M[form][title2];    

  7. $title3=$_M[form][title3];  

  8. if($title1){  

  9.     $title1=$title1;  

  10. }else{  

  11.     $title1="一级";     

  12. }  

  13. if($title2){  

  14.     $title2=$title2;  

  15. }else{  

  16.     $title2="二级";     

  17. }  

  18. if($title3){  

  19.     $title3=$title3;  

  20. }else{  

  21.     $title3="三级";     

  22. }  

  23. ?>  

  24. <section class="met-column-nav" m-id="subcolumn_nav" m-type="nocontent">  

  25.     <div class="container">  

  26. <div class="row">  

  27.             <ul class="clearfix met-column-nav-ul">  

  28.                      <li>  

  29.                        <a href="{$m.url}"  title="{$lang.sub_all}">{$lang.sub_all}</a>  

  30.                     </li>  

  31.   

  32.                         <li class="dropdown">  

  33.                             <a href="{$m.url}" title="{$title1}" class="dropdown-toggle     " data-toggle="dropdown">{$title1}</a>  

  34.                             <div class="dropdown-menu animate">  

  35. <?php   

  36.               

  37. $column_rs=DB::get_all("SELECT id,name FROM ".$_M['table']['column']." WHERE foldername in('product','live') and nav=1 ORDER BY no_order desc");  

  38. foreach($column_rs as $key => $valc1){  

  39.     if($class11==$valc1['id']){  

  40.         $active1="active";  

  41.     }else{  

  42.         $active1="";  

  43.     }  

  44.       

  45. ?>  

  46.                                       <a href="/examination/index.php?c1={$valc1['id']}&title1={$valc1['name']}" title="全部" class="dropdown-item {$active1}">{$valc1['name']}</a>  

  47. <?php } ?>  

  48.                              </div>  

  49.                         </li>  

  50. <?php   

  51. if($class11){  

  52. $column_rs2=DB::get_all("SELECT id,name FROM ".$_M['table']['column']." WHERE bigclass='$class11' ORDER BY no_order desc");  

  53. ?>  

  54.                         <li class="dropdown">  

  55.                             <a href="{$m.url}" title="{$title2}" class="dropdown-toggle     " data-toggle="dropdown">{$title2}</a>  

  56.                             <div class="dropdown-menu animate">  

  57. <?php   

  58.   

  59. foreach($column_rs2 as $key => $valc2){  

  60.     if($class12==$valc2['id']){  

  61.         $active2="active";  

  62.     }else{  

  63.         $active2="";  

  64.     }  

  65.       

  66. ?>  

  67.                                       <a href="/examination/index.php?c1={$class11}&title1={$title1}&c2={$valc2['id']}&title2={$valc2['name']}" title="全部" class="dropdown-item {$active2}">{$valc2['name']}</a>  

  68. <?php } ?>  

  69.                              </div>  

  70.                         </li>  

  71. <?php } ?>  

  72. <?php   

  73. if($class12){  

  74. $column_rs3=DB::get_all("SELECT id,name FROM ".$_M['table']['column']." WHERE bigclass='$class12' ORDER BY no_order desc");  

  75. ?>  

  76.                         <li class="dropdown">  

  77.                             <a href="{$m.url}" title="{$title3}" class="dropdown-toggle     " data-toggle="dropdown">{$title3}</a>  

  78.                             <div class="dropdown-menu animate">  

  79. <?php   

  80.   

  81. foreach($column_rs3 as $key => $valc3){  

  82.     if($class13==$valc3['id']){  

  83.         $active3="active";  

  84.     }else{  

  85.         $active3="";  

  86.     }  

  87.       

  88. ?>  

  89.                                       <a href="/examination/index.php?c1={$class11}&title1={$title1}&c2={$class12}&title2={$title2}&c3={$valc3['id']}&title3={$valc3['name']}" title="全部" class="dropdown-item {$active3}">{$valc3['name']}</a>  

  90. <?php } ?>  

  91.                              </div>  

  92.                         </li>  

  93. <?php } ?>  

  94.               </ul>  

  95.         </div>  

  96.     </div>  

  97. </section>  

  98. </if>  

  99. </tag>  

  100. </if>