本文整理汇总了PHP中get_maincat函数的典型用法代码示例。如果您正苦于以下问题:PHP get_maincat函数的具体用法?PHP get_maincat怎么用?PHP get_maincat使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_maincat函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: defined
<?php
defined('IN_DESTOON') or exit('Access Denied');
if (!$MOD['list_html'] || !$catid) {
return false;
}
$CAT or $CAT = get_cat($catid);
if (!$CAT) {
return false;
}
unset($CAT['moduleid']);
extract($CAT);
$maincat = get_maincat($child ? $catid : $parentid, $moduleid);
$condition = "groupid>5 and catids like '%," . $catid . ",%'";
if ($page == 1) {
$items = $db->count($table, $condition);
if ($items != $CAT['item']) {
$CAT['item'] = $items;
$db->query("UPDATE {$DT_PRE}category SET item={$items} WHERE catid={$catid}");
}
} else {
$items = $CAT['item'];
}
$pagesize = $MOD['pagesize'];
$showpage = 1;
$template = $CAT['template'] ? $CAT['template'] : 'list';
$total = max(ceil($items / $MOD['pagesize']), 1);
if (isset($fid) && isset($num)) {
$page = $fid;
$topage = $fid + $num - 1;
$total = $topage < $total ? $topage : $total;
开发者ID:hcd2008,项目名称:destoon,代码行数:31,代码来源:list.htm.php
示例2: defined
<?php
defined('IN_DESTOON') or exit('Access Denied');
require DT_ROOT . '/module/' . $module . '/common.inc.php';
if (!check_group($_groupid, $MOD['group_index'])) {
include load('403.inc');
}
$typeid = isset($typeid) ? intval($typeid) : 99;
isset($TYPE[$typeid]) or $typeid = 99;
$dtype = $typeid != 99 ? " AND typeid={$typeid}" : '';
$maincat = get_maincat($catid ? $CAT['parentid'] : 0, $moduleid);
$seo_file = 'index';
include DT_ROOT . '/include/seo.inc.php';
if ($catid) {
$seo_title = $seo_catname . $seo_title;
}
if ($typeid != 99) {
$seo_title = $TYPE[$typeid] . $seo_delimiter . $seo_title;
}
if ($page == 1) {
$head_canonical = $MOD['linkurl'];
}
$destoon_task = "moduleid={$moduleid}&html=index";
if ($EXT['mobile_enable']) {
$head_mobile = $EXT['mobile_url'] . mobileurl($moduleid, 0, 0, $page);
}
include template($MOD['template_index'] ? $MOD['template_index'] : 'index', $module);
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:27,代码来源:index.inc.php
示例3: Copyright
<?php
/*
[Destoon B2B System] Copyright (c) 2008-2015 www.destoon.com
This is NOT a freeware, use is subject to license.txt
*/
require 'common.inc.php';
if ($moduleid < 4) {
$moduleid = 4;
}
$pid = isset($pid) ? intval($pid) : 0;
if ($pid) {
$P = get_cat($pid);
$back_link = 'category.php?moduleid=' . $moduleid . '&pid=' . $P['parentid'];
} else {
$back_link = mobileurl($moduleid);
}
$lists = get_maincat($pid, $moduleid);
$head_title = $MOD['name'] . $DT['seo_delimiter'] . $head_title;
include template('category', 'mobile');
if (DT_CHARSET != 'UTF-8') {
toutf8();
}
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:23,代码来源:category.php
示例4: defined
<?php
defined('IN_DESTOON') or exit('Access Denied');
$fileroot = DT_ROOT . '/' . $MOD['moduledir'] . '/';
$filename = $fileroot . $DT['index'] . '.' . $DT['file_ext'];
if (!$MOD['index_html']) {
if (is_file($filename)) {
unlink($filename);
}
return false;
}
$maincat = $childcat = get_maincat(0, $moduleid, 1);
$seo_file = 'index';
include DT_ROOT . '/include/seo.inc.php';
$destoon_task = "moduleid={$moduleid}&html=index";
if ($EXT['mobile_enable']) {
$head_mobile = $EXT['mobile_url'] . mobileurl($moduleid, 0, 0, $page);
}
ob_start();
include template('index', $module);
$data = ob_get_contents();
ob_clean();
file_put($filename, $data);
return true;
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:24,代码来源:index.htm.php
示例5: rewrite
<div class="icatalog_head"><div><span class="f_r c_p" onclick="Go('<?php
echo DT_PATH;
?>
sitemap/<?php
echo rewrite('index.php?mid=5');
?>
');">展开全部</span><strong>行业分类</strong></div></div>
<div class="icatalog_body">
<div class="icatalog">
<?php
$mid = 5;
$child = get_maincat(0, $mid, 1);
if (is_array($child)) {
foreach ($child as $i => $c) {
if ($i < 12 && $c['child']) {
$sub = get_maincat($c['catid'], $mid, 1);
?>
<ul>
<li><a href="<?php
echo $MODULE[$mid]['linkurl'];
echo $c['linkurl'];
?>
" target="_blank"><strong><?php
echo set_style($c['catname'], $c['style']);
?>
</strong></a></li>
<?php
if (is_array($sub)) {
foreach ($sub as $j => $s) {
if ($j < 4) {
?>
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:31,代码来源:index.php
注:本文中的get_maincat函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论