本文整理汇总了PHP中catpos函数的典型用法代码示例。如果您正苦于以下问题:PHP catpos函数的具体用法?PHP catpos怎么用?PHP catpos使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了catpos函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: catpos
/**
* 内容模块函数库
*/
function catpos($cid, $symbol = ' > ', $target = '')
{
static $categorys;
if (empty($categorys)) {
$categorys = get_cache('category', 'content');
}
$pid = $categorys[$cid]['pid'];
if ($pid != 0) {
catpos($pid, $symbol, $target);
}
echo '<a href="' . $categorys[$cid]['url'] . '" ' . $target . '>' . $categorys[$cid]['name'] . '</a>';
echo $symbol;
}
示例2: defined
<?php
defined('IN_WZ') or exit('No direct script access allowed');
if (!isset($siteconfigs)) {
$siteconfigs = get_cache('siteconfigs');
}
include T("content", "head", TPLID);
?>
<div class="container Site_map"> 当前位置:<a href="<?php
echo WEBURL;
?>
">首页</a><span> > <?php
echo catpos($cid);
?>
</span></div>
<div class="bankuai_1">
<div class="container pd30">
<div class="row">
<div class="col-xs-8" style="border-right:1px solid #eee">
<h3><?php
echo $category['name'];
?>
</h3>
<?php
if (defined('IN_ADMIN') && !defined('HTML')) {
echo "<div class=\"visual_div\" pc_action=\"content\" data=\"\"><a href=\"javascript:void(0)\" class=\"visual_edit\">修改</a>";
}
if (!class_exists('content_template_parse')) {
$content_template_parse = load_class("content_template_parse", "content");
示例3: set_body_class
set_body_class("zhuangxiu");
include $this->_include('header');
?>
<!--content-->
<div class="content clearfix">
<?php
include $this->_include('sidebar');
?>
<div class="main">
<div class="tao">
<div class="bt">
<b><?php
echo isset($first_child) ? $first_child : $ccname;
?>
</b><span>您现在的位置是:<?php
echo catpos($catid, ' >> ');
?>
</span>
</div>
</div>
<div class="nr1">
<div class="tp">
<ul>
<?php
$pid = isset($pid) ? $pid : $catid;
$return = $this->_listdata("catid={$pid} page={$page} pagesize={$pagesize} order=listorder_asc,inputtime_desc");
extract($return);
$count = count($return);
if (is_array($return)) {
foreach ($return as $key => $t) {
?>
示例4: siteurl
<div class="Main2 constr fix">
<div class="m_T1nl">
<span>
<div style="float: left;">
当前位置:
</div>
<a href="<?php
echo siteurl($siteid);
?>
">首页</a>
>
<?php
echo catpos($catid);
?>
<?php
echo $title;
?>
</span>
</div>
<div class="m_Right1 FR" style="margin-left:10px">
<div class="m_Grid4">
<div class="m_T9">
<font>
示例5: defined
<?php defined('IN_PHPCMS') or exit('No permission resources.'); ?><?php include template("content","header"); ?>
<!--main-->
<div class="main">
<div class="col-left">
<div class="crumbs"><a href="<?php echo siteurl($siteid);?>">Ê×Ò³</a><span> > </span><?php echo catpos($catid);?> Áбí</div>
<?php if(defined('IN_ADMIN') && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"content\" data=\"op=content&tag_md5=5ab4b05e97fd14c3ed386604ee1a9399&action=lists&catid=%24catid&num=25&order=id+DESC&page=%24page\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">±à¼</a>";}$content_tag = pc_base::load_app_class("content_tag", "content");if (method_exists($content_tag, 'lists')) {$pagesize = 25;$page = intval($page) ? intval($page) : 1;if($page<=0){$page=1;}$offset = ($page - 1) * $pagesize;$content_total = $content_tag->count(array('catid'=>$catid,'order'=>'id DESC','limit'=>$offset.",".$pagesize,'action'=>'lists',));$pages = pages($content_total, $page, $pagesize, $urlrule);$data = $content_tag->lists(array('catid'=>$catid,'order'=>'id DESC','limit'=>$offset.",".$pagesize,'action'=>'lists',));}?>
<ul class="list lh24 f14">
<?php $n=1;if(is_array($data)) foreach($data AS $r) { ?>
<li><span class="rt"><?php echo date('Y-m-d H:i:s',$r[inputtime]);?></span>¡¤<a href="<?php echo $r['url'];?>" target="_blank"<?php echo title_style($r[style]);?>><?php echo $r['title'];?></a></li>
<?php if($n%5==0) { ?><li class="bk20 hr"></li><?php } ?>
<?php $n++;}unset($n); ?>
</ul>
<div id="pages" class="text-c"><?php echo $pages;?></div>
<?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
</div>
<div class="col-auto">
<div class="box">
<h5 class="title-2">ƵµÀ×ÜÅÅÐÐ</h5>
<?php if(defined('IN_ADMIN') && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"content\" data=\"op=content&tag_md5=0ad40a45ad075d8f47798a231e25aec2&action=hits&catid=%24catid&num=10&order=views+DESC&cache=3600\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">±à¼</a>";}$tag_cache_name = md5(implode('&',array('catid'=>$catid,'order'=>'views DESC',)).'0ad40a45ad075d8f47798a231e25aec2');if(!$data = tpl_cache($tag_cache_name,3600)){$content_tag = pc_base::load_app_class("content_tag", "content");if (method_exists($content_tag, 'hits')) {$data = $content_tag->hits(array('catid'=>$catid,'order'=>'views DESC','limit'=>'10',));}if(!empty($data)){setcache($tag_cache_name, $data, 'tpl_data');}}?>
<ul class="content digg">
<?php $n=1;if(is_array($data)) foreach($data AS $r) { ?>
<li><a href="<?php echo $r['url'];?>" target="_blank"><?php echo $r['title'];?></a></li>
<?php $n++;}unset($n); ?>
</ul>
<?php if(defined('IN_ADMIN') && !defined('HTML')) {echo '</div>';}?>
</div>
<div class="bk10"></div>
<div class="box">
<h5 class="title-2">ƵµÀ±¾ÔÂÅÅÐÐ</h5>
<?php if(defined('IN_ADMIN') && !defined('HTML')) {echo "<div class=\"admin_piao\" pc_action=\"content\" data=\"op=content&tag_md5=2caa10e576ba663010144233732308cd&action=hits&catid=%24catid&num=8&order=monthviews+DESC&cache=3600\"><a href=\"javascript:void(0)\" class=\"admin_piao_edit\">±à¼</a>";}$tag_cache_name = md5(implode('&',array('catid'=>$catid,'order'=>'monthviews DESC',)).'2caa10e576ba663010144233732308cd');if(!$data = tpl_cache($tag_cache_name,3600)){$content_tag = pc_base::load_app_class("content_tag", "content");if (method_exists($content_tag, 'hits')) {$data = $content_tag->hits(array('catid'=>$catid,'order'=>'monthviews DESC','limit'=>'8',));}if(!empty($data)){setcache($tag_cache_name, $data, 'tpl_data');}}?>
<ul class="content rank">
示例6: catpos
<link href="<?php
echo R;
?>
js/jquery-ui/jquery-ui.css" rel="stylesheet">
<script src="<?php
echo R;
?>
js/colorpicker/color.js"></script>
<section class="wrapper">
<div class="row">
<div class="col-lg-12">
<section class="panel">
<header class="panel-heading addpos"><?php
echo catpos($cid, ' > ', 'target="_blank"');
?>
</header>
<div class="panel-body" id="panel-bodys">
<form name="myform" class="form-horizontal tasi-form" action="" method="post">
<table class="table table-striped table-advance table-hover" id="contenttable">
<tbody>
<?php
if (isset($formdata['5']['title'])) {
?>
<tr>
<td>
<div class="col-sm-12 input-group" id="titlecss"><span
class="input-group-addon"><?php
echo $formdata['5']['title']['name'];
?>
示例7: function
'transitionOut': 'none',
'titlePosition': 'over',
'titleFormat': function (title, currentArray, currentIndex, currentOpts) {
return '<span id="fancybox-title-over"> ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' ' + title : '') + '</span>';
}
});
});
</script>
<link media="all" href="<?php echo CSS_PATH;?>yingtian/widget009.css" type="text/css" rel="stylesheet">
<link media="all" href="<?php echo CSS_PATH;?>yingtian/counter015.css" type="text/css" rel="stylesheet">
</head>
<section class="LayoutMiddle pagewidth">
<section class="LayoutContent">
<div itemscope="" itemtype="http://schema.org/Product" class="LayoutContentInner">
<span id="lblCategoryTrail" class="ProductDetailsCategoryTrail">
<a href="<?php echo siteurl($siteid);?>">Home</a> > <?php echo catpos($catid);?>
</span>
<div class="ProductDetailsLeft">
<div class="ProductDetailsPhotoArea">
<div class="ProductDetailsPhoto">
<!--Luara js文件-->
<script src="<?php echo JS_PATH;?>yingtian/jquery.luara.0.0.1.min.js"></script>
<link rel="stylesheet" href="<?php echo CSS_PATH;?>yingtian/luara.top.css"/>
<div class="example1">
<ul>
<?php $n=1;if(is_array($pics)) foreach($pics AS $r) { ?>
<li><img src="<?php echo $r['url'];?>" alt="<?php echo $r['alt'];?>"/></li>
<?php $n++;}unset($n); ?>
</ul>
<ol>
示例8: defined
<?php defined('IN_PHPCMS') or exit('No permission resources.'); ?><?php include template("content","header"); ?>
<div class="main">
<div class="col-left">
<div class="crumbs"><a href="<?php echo siteurl($siteid);?>">首页</a><span> > </span><?php echo catpos($catid);?> 正文</div>
<div id="Article">
<h1><?php echo $title;?><br />
<span><?php echo $inputtime;?> 来源:<?php echo $copyfrom;?> 评论:<a href="#comment_iframe" id="comment">0</a> 点击:</span><span id="hits"></span></h1>
<?php if($description) { ?><div class="summary" ><?php echo $description;?></div><?php } ?>
<div class="content">
<?php if($allow_visitor==1) { ?>
<?php echo $content;?>
<!--内容关联投票-->
<?php if($voteid) { ?><script language="javascript" src="<?php echo APP_PATH;?>index.php?m=vote&c=index&a=show&action=js&subjectid=<?php echo $voteid;?>&type=2"></script><?php } ?>
<?php } else { ?>
<CENTER><a href="<?php echo APP_PATH;?>index.php?m=content&c=readpoint&allow_visitor=<?php echo $allow_visitor;?>"><font color="red">阅读此信息需要您支付 <B><I><?php echo $readpoint;?> <?php if($paytype) { ?>元<?php } else { ?>点<?php } ?></I></B>,点击这里支付</font></a></CENTER>
<?php } ?>
</div>
<?php if($titles) { ?>
<fieldset>
<legend class="f14">本文导航</legend><ul class="list blue row-2">
<?php $n=1;if(is_array($titles)) foreach($titles AS $r) { ?>
<li><?php echo $n;?>、<a href="<?php echo $r['url'];?>"><?php echo $r['title'];?></a></li>
<?php $n++;}unset($n); ?>
</ul>
</fieldset>
<?php } ?>
<div id="pages" class="text-c"><?php echo $pages;?></div>
<p style="margin-bottom:10px">
<strong>相关热词搜索:</strong><?php $n=1;if(is_array($keywords)) foreach($keywords AS $keyword) { ?><a href="<?php echo APP_PATH;?>index.php?m=content&c=tag&catid=<?php echo $catid;?>&tag=<?php echo urlencode($keyword);?>" class="blue"><?php echo $keyword;?></a> <?php $n++;}unset($n); ?>
</p>
示例9: catpos
/**
* 当前路径
* 返回指定栏目路径层级
* @param $catid 栏目id
* @param $ext 栏目间隔符
*/
function catpos($catid = 0, $ext = ' - ')
{
$categorys = D('Category')->getAll();
$html = '';
if ($catid == 0) {
$html = '<a href="' . U('Index/index') . '">首页</a>' . $html;
return $html;
} else {
$html = $ext . '<a href="' . $categorys[$catid]['url'] . '">' . $categorys[$catid]['title'] . '</a>' . $html;
$html = catpos($categorys[$catid]['pid'], $ext) . $html;
}
return $html;
}