当前位置 : 主页 > 编程语言 > java >

6.0 首页增加题库栏目

来源:互联网 收集:自由互联 发布时间:2022-07-20
1、修改index.php和product.php 两个代码都一样子 ?php # MetInfo Enterprise Content Management System # Copyright (C) MetInfo Co.,Ltd (http://www.metinfo.cn). All rights reserved. define('M_NAME', 'product'); define('M_MODULE', 'we


6.0 首页增加题库栏目_php

6.0 首页增加题库栏目_php_02

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

<?php
# MetInfo Enterprise Content Management System
# Copyright (C) MetInfo Co.,Ltd (http://www.metinfo.cn). All rights reserved.

define('M_NAME', 'product');
define('M_MODULE', 'web');
define('M_CLASS', 'product');
define('M_ACTION', 'doproduct_examination');
require_once '../app/system/entrance.php';

# This program is an open source system, commercial use, please consciously to purchase commercial license.
# Copyright (C) MetInfo Co., Ltd. (http://www.metinfo.cn). All rights reserved.
?>

define('M_ACTION', 'doproduct_examination');

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

6.0 首页增加题库栏目_二级_03


//新增 题库试卷列表网页
public function doproduct_examination(){
global $_M;

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

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

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


6.0 首页增加题库栏目_二级_04

路径:\templates\metv6    head_examination.php

6.0 首页增加题库栏目_二级_05


6.0 首页增加题库栏目_二级_06

subcolumn_nav_examination.php

<?php
$class11=$_M[form][c1];
$class12=$_M[form][c2];
$class13=$_M[form][c3];
$title1=$_M[form][title1];
$title2=$_M[form][title2];
$title3=$_M[form][title3];
if($title1){
$title1=$title1;
}else{
$title1="一级";
}
if($title2){
$title2=$title2;
}else{
$title2="二级";
}
if($title3){
$title3=$title3;
}else{
$title3="三级";
}
?>
<section class="met-column-nav" m-id="subcolumn_nav" m-type="nocontent">
<div class="container">
<div class="row">
<ul class="clearfix met-column-nav-ul">
<li>
<a href="{$m.url}" title="{$lang.sub_all}">{$lang.sub_all}</a>
</li>

<li class="dropdown">
<a href="{$m.url}" title="{$title1}" class="dropdown-toggle " data-toggle="dropdown">{$title1}</a>
<div class="dropdown-menu animate">
<?php

$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");
foreach($column_rs as $key => $valc1){
if($class11==$valc1['id']){
$active1="active";
}else{
$active1="";
}

?>
<a href="/examination/index.php?c1={$valc1['id']}&title1={$valc1['name']}" title="全部" class="dropdown-item {$active1}">{$valc1['name']}</a>
<?php } ?>
</div>
</li>
<?php
if($class11){
$column_rs2=DB::get_all("SELECT id,name FROM ".$_M['table']['column']." WHERE bigclass='$class11' ORDER BY no_order desc");
?>
<li class="dropdown">
<a href="{$m.url}" title="{$title2}" class="dropdown-toggle " data-toggle="dropdown">{$title2}</a>
<div class="dropdown-menu animate">
<?php

foreach($column_rs2 as $key => $valc2){
if($class12==$valc2['id']){
$active2="active";
}else{
$active2="";
}

?>
<a href="/examination/index.php?c1={$class11}&title1={$title1}&c2={$valc2['id']}&title2={$valc2['name']}" title="全部" class="dropdown-item {$active2}">{$valc2['name']}</a>
<?php } ?>
</div>
</li>
<?php } ?>
<?php
if($class12){
$column_rs3=DB::get_all("SELECT id,name FROM ".$_M['table']['column']." WHERE bigclass='$class12' ORDER BY no_order desc");
?>
<li class="dropdown">
<a href="{$m.url}" title="{$title3}" class="dropdown-toggle " data-toggle="dropdown">{$title3}</a>
<div class="dropdown-menu animate">
<?php

foreach($column_rs3 as $key => $valc3){
if($class13==$valc3['id']){
$active3="active";
}else{
$active3="";
}

?>
<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>
<?php } ?>
</div>
</li>
<?php } ?>
</ul>
</div>
</div>
</section>
</if>
</tag>
</if>


上一篇:#yyds干货盘点# leetcode算法题:插入区间
下一篇:没有了
网友评论