本文整理汇总了PHP中get_breadcrumbs函数的典型用法代码示例。如果您正苦于以下问题:PHP get_breadcrumbs函数的具体用法?PHP get_breadcrumbs怎么用?PHP get_breadcrumbs使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_breadcrumbs函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sitemap_area
function sitemap_area($post, $title = '')
{
$map = get_page_by_title('Site Map');
?>
<tr>
<td valign="top">
<div class="header">
<?php
if ($title) {
echo $title;
} else {
the_title();
}
?>
</div>
<div class="nav">
<a href="<?php
echo get_permalink($map->ID);
?>
" class="navigation">sitemap</a>
<?php
echo get_breadcrumbs($post);
?>
</div>
<?php
}
示例2: detail
/**
* 查询指定标签的详细信息
* @param $info detail 查询的 id 或者slug
*/
public function detail($info)
{
$TagsLogic = new TagsLogic();
$PostsLogic = new PostsLogic();
$tag = $TagsLogic->detail($info);
$this->if404($tag, "非常抱歉,没有这个标签,可能它已经躲起来了");
$posts_id = $TagsLogic->getPostsId($tag['tag_id']);
$count = sizeof($posts_id);
$count == 0 ? $res404 = 0 : ($res404 = 1);
if (!empty($posts_id)) {
$Page = new GreenPage($count, get_opinion('PAGER'));
$pager_bar = $Page->show();
$limit = $Page->firstRow . ',' . $Page->listRows;
$posts_list = $PostsLogic->getList($limit, 'single', 'post_id desc', true, array(), $posts_id);
}
$this->assign('title', $tag['tag_name']);
// 赋值数据集
$this->assign('res404', $res404);
$this->assign('postslist', $posts_list);
// 赋值数据集
$this->assign('pager', $pager_bar);
// 赋值分页输出
$this->assign('breadcrumbs', get_breadcrumbs('tags', $tag['tag_id']));
$this->display('Archive/single-list');
}
示例3: myAccount
public function myAccount()
{
if (isset($this->session->userdata["user_id"])) {
$data = array();
$model = new Common_model();
$user_id = $this->session->userdata["user_id"];
$username = $this->session->userdata["user_username"];
if ($this->input->post()) {
$arr = $this->input->post();
// prd($arr);
if (isset($arr["btn_submit"])) {
$user_dob = NULL;
if (!empty($arr['dob_dd']) && !empty($arr['dob_mm']) && !empty($arr['dob_yy'])) {
$user_dob = $arr['dob_yy'] . '-' . $arr['dob_mm'] . '-' . $arr['dob_dd'];
}
$location_details = get_location_details_from_google(trim($arr['user_location']));
$location_lat_long = getLatLonByAddress(trim($arr['user_location']));
$data_array = array('user_fullname' => addslashes($arr['user_fullname']), 'user_gender' => addslashes($arr['user_gender']), 'user_location' => addslashes($arr['user_location']), 'user_city' => $location_details['city'], 'user_state' => $location_details['state'], 'user_country' => $location_details['country'], 'user_location' => trim($arr['user_location']), 'user_latitude' => $location_lat_long['latitude'], 'user_longitude' => $location_lat_long['longitude'], 'user_tagline' => addslashes($arr['user_tagline']), 'user_about' => addslashes($arr['user_about']), 'user_relationship_status' => addslashes($arr['user_relationship_status']), 'user_dob' => $user_dob);
if (isset($arr['user_username'])) {
$username = trim($arr['user_username']);
$checkUsername = $model->is_exists("user_id", TABLE_USERS, array("username" => $username, "user_id !=" => $user_id));
if (!empty($checkUsername)) {
$this->session->set_flashdata("error", "That username is already taken. Please choose another.");
} else {
$data_array['user_username'] = $username;
$data_array['user_changed_username'] = '1';
}
}
$this->session->set_flashdata("success", "Personal details updated successfully");
$model->updateData(TABLE_USERS, $data_array, array("user_id" => $user_id));
// updating redis keys now
$this->redis_functions->set_user_profile_data($username);
@$this->session->set_userdata("user_fullname", trim($arr["user_fullname"]));
@$this->session->set_userdata("user_username", $username);
}
redirect(base_url('my-account'));
} else {
$record = $this->redis_functions->get_user_profile_data($username);
$page_title = $record["user_fullname"];
$input_arr = array(base_url() => 'Home', '#' => $page_title);
$breadcrumbs = get_breadcrumbs($input_arr);
$data["record"] = $record;
$data["breadcrumbs"] = $breadcrumbs;
$data["page_title"] = $page_title;
$data['meta_title'] = $data["page_title"] . ' - ' . $this->redis_functions->get_site_setting('SITE_NAME');
$this->template->write_view("content", "pages/user/my-account", $data);
$this->template->render();
}
} else {
require_once APPPATH . 'controllers/index.php';
$index_controller = new Index();
$index_controller->login();
}
}
示例4: preview
public function preview($info = -1)
{
$Posts = new PostsLogic();
if ($_SESSION[get_opinion('USER_AUTH_KEY')]) {
$post_detail = $Posts->preview($info, true);
}
$this->if404($post_detail, "非常抱歉,你需要的文章暂时不存在,可能它已经躲起来了。.");
$this->assign('breadcrumbs', get_breadcrumbs('post', $post_detail));
$this->assign('post', $post_detail);
// 赋值数据集
if (File::file_exists(T('Home@Post/' . $post_detail['post_template']))) {
$this->display($post_detail['post_template']);
} else {
$this->display('single');
}
}
示例5: single
/**
* 文章单页显示 支持年月日限定
* @param $info 指定单页的信息
*/
public function single($info = -1)
{
$where['post_date'] = array('like', I('get.year', '%') . '-' . I('get.month', '%') . '-' . I('get.day', '%') . '%');
$where['post_type'] = 'single';
$Posts = new PostsLogic();
$post_detail = $Posts->detail($info, true, $where, true);
$Posts->viewInc($post_detail['post_id']);
//浏览计数
$this->if404($post_detail, "非常抱歉,你需要的文章暂时不存在,可能它已经躲起来了。.");
$this->assign('breadcrumbs', get_breadcrumbs('post', $post_detail));
$this->assign('post', $post_detail);
// 赋值数据集
if (File::file_exists(T('Home@Post/' . $post_detail['post_template']))) {
$this->display($post_detail['post_template']);
} else {
$this->display('single');
}
}
示例6: thread
public function thread($username)
{
if ($username) {
if ($username != $this->session->userdata["user_username"]) {
$custom_model = new Custom_model();
$redis_functions = new Redisfunctions();
$data = array();
$user_id = $this->session->userdata["user_id"];
$user_to_records = $redis_functions->get_user_profile_data($username);
$records = $custom_model->get_chat_history($user_id, $user_to_records['user_id']);
$chat_list_records = $custom_model->get_inbox_list($user_id);
// Setting and getting unread chats username to redis
$redis_functions->set_unread_chats_username($this->session->userdata["user_username"]);
$unread_chats_username = $redis_functions->get_unread_chats_username($this->session->userdata["user_username"]);
// Marking previous messages as read
if (!empty($records)) {
$latest_message_id = $records[count($records) - 1]['message_id'];
$this->mark_previous_messages_as_read($latest_message_id, $user_id, $user_to_records['user_id']);
}
$to_user_fullname = stripslashes($user_to_records['user_fullname']);
$to_user_username = stripslashes($user_to_records['user_username']);
$page_title = $to_user_fullname;
$input_arr = array(base_url() => 'Home', base_url('my-chats') => 'My Chats', '#' => $page_title);
$breadcrumbs = get_breadcrumbs($input_arr);
$data["breadcrumbs"] = $breadcrumbs;
$data["chat_list_records"] = $chat_list_records;
$data["unread_chats_username"] = $unread_chats_username;
$data["records"] = $records;
$data["page_title"] = $page_title;
$data["to_user_fullname"] = $to_user_fullname;
$data["to_user_username"] = $to_user_username;
$data['meta_title'] = $page_title . ' | ' . $this->redis_functions->get_site_setting('SITE_NAME');
$data['display_thread'] = TRUE;
$this->template->write_view("content", "pages/messages/list", $data);
$this->template->render();
} else {
$this->session->set_flashdata('error', 'You should socialize more and not just chat with yourself');
redirect(base_url('my-chats'));
}
} else {
redirect(base_url('my-chats'));
}
}
示例7: contact
public function contact()
{
if ($this->input->post()) {
$arr = $this->input->post();
// prd($arr);
if (isset($arr["btn_submit"])) {
$data = array();
$model = new Common_model();
$request_id = getUniqueContactRequestID();
$data_array = array('wc_request_id' => $request_id, 'wc_fullname' => addslashes($arr['full_name']), 'wc_email' => addslashes($arr['user_email']), 'wc_message' => addslashes($arr['message']), 'wc_ipaddress' => USER_IP, 'wc_useragent' => USER_AGENT, 'wc_created_on' => date('Y-m-d H:i:s'));
$model->insertData(TABLE_WEBSITE_CONTACT, $data_array);
if (USER_IP != '127.0.0.1') {
$email_model = new Email_model();
// message to us
$message = '
<strong>Full Name: </strong>' . ucwords($arr["full_name"]) . '<br/>
<strong>Email: </strong>' . $arr["user_email"] . '<br/>
<strong>Contact: </strong>' . $arr["user_contact"] . '<br/>
<strong>Location: </strong>' . $arr["user_location"] . '<br/><br/>
<strong>Request ID: </strong>' . $request_id . '<br/><br/>
<strong>Message: </strong>' . $arr["user_message"] . '<br/>
';
$email_model->sendMail($this->redis_functions->get_site_setting('SITE_EMAIL'), "New message via " . $this->redis_functions->get_site_setting('SITE_NAME'), $message);
}
$this->session->set_flashdata('success', 'Your message has been delivered successfully');
redirect(base_url('static/contact-us'));
}
} else {
$data = array();
$page_title = "Contact us";
$input_arr = array(base_url() => 'Home', '#' => $page_title);
$breadcrumbs = get_breadcrumbs($input_arr);
$data["meta_title"] = $page_title . ' - ' . $this->redis_functions->get_site_setting('SITE_NAME');
$data["meta_description"] = 'Get in touch with us if you have any queries or feedback for us. We would love to hear from you.';
$data["breadcrumbs"] = $breadcrumbs;
$this->template->write_view("content", "pages/staticpage/contact-us", $data);
$this->template->render();
}
}
示例8: get_breadcrumbs
<?php
$breadcrumbs = get_breadcrumbs();
if ($breadcrumbs && is_array($breadcrumbs) && count($breadcrumbs) > 0) {
echo '<ol class=" breadcrumb">';
for ($bc = count($breadcrumbs) - 1; $bc >= 0; $bc--) {
$is_active = isset($breadcrumbs[$bc]["name"]) && is_active($breadcrumbs[$bc]["name"]) ? true : false;
if ($is_active) {
echo '<li class="active">';
echo isset($breadcrumbs[$bc]["text"]) ? $breadcrumbs[$bc]["text"] : "";
echo '</li>';
} else {
echo '<li class="">';
echo '<a class="" href="' . (isset($breadcrumbs[$bc]["uri"]) ? site_url($breadcrumbs[$bc]["uri"]) : "") . '">';
echo isset($breadcrumbs[$bc]["text"]) ? $breadcrumbs[$bc]["text"] : "";
echo '</a>';
echo '</li>';
}
}
echo '</ol>';
}
?>
示例9: forgotPassword
public function forgotPassword()
{
if (!isset($this->session->userdata['user_id'])) {
$data = array();
$model = new Common_model();
if ($this->input->post()) {
$arr = $this->input->post();
$user_email = trim(strtolower($arr['user_email']));
$is_valid_email = $model->is_exists('user_id, user_status, user_fullname, user_username', TABLE_USERS, array('user_email' => $user_email));
if (!empty($is_valid_email)) {
// valid
$user_status = $is_valid_email[0]['user_status'];
if ($user_status == '1') {
// active user
$full_name = ucwords($is_valid_email[0]['user_fullname']);
$new_password = substr(getEncryptedString($user_email . "-" . $user_status . time()), 0, 6);
$model->updateData(TABLE_USERS, array('user_password' => md5($new_password)), array('user_email' => $user_email));
// updating redis keys now
$this->redis_functions->set_user_profile_data($is_valid_email[0]['user_username']);
if ($_SERVER['REMOTE_ADDR'] != '127.0.0.1') {
$this->load->library('EmailTemplates');
$emailTemplate = new EmailTemplates();
$messageContent = $emailTemplate->forgot - password($full_name, $new_password);
$email_model = new Email_model();
$email_model->sendMail($user_email, 'Forgot Password - ' . $this->redis_functions->get_site_setting('SITE_NAME'), $messageContent);
}
$this->session->set_flashdata('error', '<strong>Success!</strong> We have sent you a new password on your email. Please check');
redirect(base_url('login'));
} else {
// account not active
$this->session->set_flashdata('error', '<strong>Sorry!</strong> Your account is not active');
redirect(base_url('forgot-password'));
}
} else {
// invalid
$this->session->set_flashdata('error', 'No such record found.');
redirect(base_url('forgot-password'));
}
} else {
$page_title = 'Forgot Password';
$input_arr = array(base_url() => 'Home', '#' => $page_title);
$breadcrumbs = get_breadcrumbs($input_arr);
$data["breadcrumbs"] = $breadcrumbs;
$data["page_title"] = $page_title;
$data['meta_title'] = $data["page_title"] . ' - ' . $this->redis_functions->get_site_setting('SITE_NAME');
$this->template->write_view("content", "pages/index/forgot-password", $data);
$this->template->render();
}
} else {
redirect(base_url('change-password'));
}
}
示例10: include_breadcrumbs
function include_breadcrumbs($params = array())
{
echo get_breadcrumbs($params);
}
示例11: channel
/**
* 兼容旧式CMS深目录结构的二级cat结构
* @param $info
*/
public function channel($info)
{
//TODO 兼容旧式CMS深目录结构的二级cat结构
$CatsLogic = new CatsLogic();
$cat = $CatsLogic->detail($info);
$children = $CatsLogic->getChildren($cat['cat_id']);
if (empty($children['cat_children'])) {
$children = $CatsLogic->getChildren($children['cat_father']);
}
$CatsLogic = new CatsLogic();
$Posts = new PostsLogic();
$cat = $CatsLogic->detail($info);
$this->if404($cat, "非常抱歉,没有这个分类,可能它已经躲起来了");
//优雅的404
$posts_id = $CatsLogic->getPostsIdWithChildren($cat['cat_id']);
$count = sizeof($posts_id);
$count == 0 ? $res404 = 0 : ($res404 = 1);
if (!empty($posts_id)) {
$Page = new GreenPage($count, get_opinion('PAGER'));
$pager_bar = $Page->show();
$limit = $Page->firstRow . ',' . $Page->listRows;
$posts_list = $Posts->getList($limit, 'single', 'post_date desc', true, array(), $posts_id);
}
$this->assign('children', $children);
$this->assign('title', $cat['cat_name']);
// 赋值数据集
$this->assign('res404', $res404);
$this->assign('postslist', $posts_list);
// 赋值数据集
$this->assign('pager', $pager_bar);
// 赋值分页输出
$this->assign('breadcrumbs', get_breadcrumbs('cats', $cat['cat_id']));
if (File::file_exists(T('Home@Archive/channel-list'))) {
$this->display('Archive/channel-list');
} else {
//TODO 这里怎么处理却决于你自己了。
// $this->error404('缺少对应的模版而不能显示');
$this->display('Archive/single-list');
}
}
示例12: get_header
<?php
get_header();
?>
<section class="body gs960">
<?php
get_sidebar();
?>
<div class="main">
<?php
if ($breadcrumbs = get_breadcrumbs()) {
?>
<ul class="breadcrumb"><?php
echo $breadcrumbs;
?>
</ul>
<?php
}
?>
<?php
if (have_posts()) {
?>
<?php
while (have_posts()) {
the_post();
?>
<article class="mod section entry">
示例13: xpress_render
function xpress_render($contents)
{
global $xoops_config;
global $xoopsUser, $xoopsTpl, $xpress_config, $xoopsModule, $xoopsLogger, $xoopsConfig;
//for XOOPS
require_once ABSPATH . '/include/xpress_breadcrumbs.php';
$xoops_breadcrumbs = get_breadcrumbs();
xpress_remake_global_for_permlink();
$mydirname = basename(dirname(dirname(__FILE__)));
include $xoops_config->xoops_root_path . "/header.php";
$xoopsTpl->assign('xoops_breadcrumbs', $xoops_breadcrumbs);
$xoopsTpl->assign('xoops_module_header', get_xpress_module_header($contents));
$page_title = $GLOBALS["xoopsModule"]->getVar("name") . ' »' . get_xpress_title($contents);
$xoopsTpl->assign('xoops_pagetitle', $page_title);
$xoops_keywords = $xoopsTpl->get_template_vars('xoops_meta_keywords');
$wp_keyword = get_xpress_meta_name('keywords', $contents);
switch ($xpress_config->meta_keyword_type) {
case 'xoops':
break;
case 'wordpress':
if (!empty($wp_keyword)) {
$xoopsTpl->assign('xoops_meta_keywords', $wp_keyword);
}
break;
case 'wordpress_xoops':
if (!empty($wp_keyword)) {
if (!empty($xoops_keywords)) {
$keywords = $wp_keyword . ', ' . $xoops_keywords;
} else {
$keywords = $wp_keyword;
}
$xoopsTpl->assign('xoops_meta_keywords', $keywords);
}
break;
default:
}
$xoops_description = $xoopsTpl->get_template_vars('xoops_meta_description');
$wp_description = get_xpress_meta_name('description', $contents);
switch ($xpress_config->meta_description_type) {
case 'xoops':
break;
case 'wordpress':
if (!empty($wp_description)) {
$xoopsTpl->assign('xoops_meta_description', $wp_description);
}
break;
case 'wordpress_xoops':
if (!empty($wp_description)) {
if (!empty($xoops_description)) {
$description = $wp_description . ' ' . $xoops_description;
} else {
$description = $wp_description;
}
$xoopsTpl->assign('xoops_meta_description', $description);
}
break;
default:
}
$wp_robots = get_xpress_meta_name('robots', $contents);
switch ($xpress_config->meta_robot_type) {
case 'xoops':
break;
case 'wordpress':
if (!empty($wp_robots)) {
$xoopsTpl->assign('xoops_meta_robots', $wp_robots);
}
break;
default:
}
if (empty($contents)) {
$template_name = get_option('template');
$xpress_data['body_contents'] = "<p>Themes \"{$template_name}\" is broken or doesn't exist. </p><p>Please choose the right theme from the admin page of wordpress.</p>";
} else {
$xpress_data['body_contents'] = get_body($contents);
}
// used $GLOBALS. becose xpress_left_arrow_post_link() and xpress_right_arrow_post_link() is other loop in this position
$xpress_data['left_post_link'] = @$GLOBALS['left_arrow_post_link'];
$xpress_data['right_post_link'] = @$GLOBALS['right_arrow_post_link'];
$xpress_data['left_posts_link'] = str_replace('«', '', xpress_left_arrow_posts_link('echo=0'));
$xpress_data['right_posts_link'] = str_replace('»', '', xpress_right_arrow_posts_link('echo=0'));
$xpress_data['now_user_level'] = xpress_now_user_level('echo=0');
//If notification_select.php is not executed in CMS other than XCL, the selector of in-line is not displayed.
if (is_object($xoopsModule) && $xoopsModule->getVar('hasnotification') == 1 && is_object($xoopsUser)) {
require_once $xoops_config->xoops_root_path . '/include/notification_select.php';
}
$xoopsTpl->assign('xpress', $xpress_data);
$templates_file = 'db:' . $mydirname . '_index.html';
echo $xoopsTpl->fetch($templates_file);
include $xoops_config->xoops_root_path . '/footer.php';
}
示例14: channel
/**
* 兼容旧式CMS深目录结构的二级cat结构
* @param $info
*/
public function channel($info)
{
//TODO 兼容旧式CMS深目录结构的二级cat结构
$Cat = new CatsLogic();
$cat = $Cat->detail($info);
$children = $Cat->getChildren($cat['cat_id']);
$Cat = new CatsLogic();
$Posts = new PostsLogic();
$cat = $Cat->detail($info);
$this->if404($cat, "非常抱歉,没有这个分类,可能它已经躲起来了");
//优雅的404
$posts_id = $Cat->getPostsId($cat['cat_id']);
$count = sizeof($posts_id);
$count == 0 ? $res404 = 0 : ($res404 = 1);
if (!empty($posts_id)) {
$Page = new GreenPage($count, get_opinion('PAGER'));
$pager_bar = $Page->show();
$limit = $Page->firstRow . ',' . $Page->listRows;
$posts_list = $Posts->getList($limit, 'single', 'post_id desc', true, array(), $posts_id);
}
$this->assign('children', $children);
$this->assign('title', $cat['cat_name']);
// 赋值数据集
$this->assign('res404', $res404);
$this->assign('postslist', $posts_list);
// 赋值数据集
$this->assign('pager', $pager_bar);
// 赋值分页输出
$this->assign('breadcrumbs', get_breadcrumbs('cats', $cat['cat_id']));
$this->display('Archive/channel-list');
}
示例15: get_page_list
" />
</td>
<td>
<select name="limit" onChange="this.form.submit()">
<?php
get_page_list($limit);
?>
</select>
</td>
<td>
<input type="submit" name="action" value="search" /> <a href="/">clear</a>
</td>
</tr>
</table>
<span id="breadcrumbs"><?php
get_breadcrumbs($db, $query_array);
?>
</span>
</form>
</div>
<div id="results">
<?php
// search results
$rows = commands($db, 'command_html', $limit, $offset, $user, $dev, $begin, $end);
if ($rows == 0) {
print '<strong>No Results</strong>';
}
?>
</div>
<div id="footer">
<?php