网站首页
phpapp在模板调用分类栏目思路
发布时间:2015-03-30 10:14:50编辑:admin阅读()
-
<?php
include(SYS.'/data/cache/config/apps.php');
include(SYS.'/data/cache/config/route_category.php');
$categorysarr=$this->GetMysqlArray('*'," ".$this->GetTable('category')."
WHERE upid=0 AND type='49' ORDER BY displayorder ASC ");
//print_r($categorysarr);exit;
?>
<?php foreach($categorysarr as $category):?>
<div style="width:100%;height:50px;">
<img src="image/logo3.jpg" style="float:left;padding-left:20px;padding-top:5px;padding-right:5px"/>
<div class="font_style" ><a href="
index.php?app=10&action={$category['catid']}&type=49"><?=$category['name']?></div>
<?php
$categoryssubarr=$this->GetMysqlArray('*'," ".$this->GetTable('category')."
WHERE upid='$category[catid]' ORDER BY displayorder ASC ");
//print_r($categorysarr);exit;
if($categoryssubarr){
foreach($categoryssubarr as $value):
?>
<div style="padding-top:5px;margin-left:15px;color:#fff"><a href="
index.php?app=10&action={$category['catid']}&type=49"><?=$category['name']?></div>
<?php endforeach?>
</div>
<?php endforeach?>
栏目调用源码在:E:\xampplite\htdocs\weike\phpapp\apps\core\class\category_class_phpapp.php
function UpdateWebsiteCategoryCache(){*****}