本文整理汇总了PHP中gcms::breadcrumb方法的典型用法代码示例。如果您正苦于以下问题:PHP gcms::breadcrumb方法的具体用法?PHP gcms::breadcrumb怎么用?PHP gcms::breadcrumb使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gcms
的用法示例。
在下文中一共展示了gcms::breadcrumb方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
// breadcrumbs
$breadcrumb = gcms::loadtemplate($index['module'], '', 'breadcrumb');
$breadcrumbs = array();
// หน้าหลัก
$breadcrumbs['HOME'] = gcms::breadcrumb('icon-home', $canonical, $install_modules[$module_list[0]]['menu_tooltip'], $install_modules[$module_list[0]]['menu_text'], $breadcrumb);
// โมดูล
if ($index['module'] != $module_list[0]) {
if (isset($install_modules[$index['module']]['menu_text'])) {
$m = $install_modules[$index['module']]['menu_text'];
$t = $install_modules[$index['module']]['menu_tooltip'];
} else {
$m = ucwords($index['module']);
$t = $m;
}
$canonical = gcms::getURL($index['module']);
$breadcrumbs['MODULE'] = gcms::breadcrumb('', $canonical, $t, $m, $breadcrumb);
}
// อัปเดทการเปิดดู
if (!isset($_REQUEST['visited'])) {
$index['visited']++;
$db->edit(DB_INDEX, $index['id'], array('visited' => $index['visited']));
}
$cache->save($sql, $index);
// แทนที่ลงใน template ของโมดูล
$patt = array('/{BREADCRUMS}/', '/{TOPIC}/', '/{DETAIL}/', '/{MODULE}/');
$replace = array();
$replace[] = implode("\n", $breadcrumbs);
$replace[] = $index['topic'];
$replace[] = gcms::showDetail($index['detail'], true, false);
$replace[] = $module;
$content = preg_replace($patt, $replace, gcms::loadtemplate($index['module'], '', 'main'));
示例2: array
<?php
// modules/member/register.php
if (defined('MAIN_INIT')) {
// title
$title = $lng['LNG_REGISTER_TITLE'];
// breadcrumbs
$breadcrumb = gcms::loadtemplate('', '', 'breadcrumb');
$breadcrumbs = array();
// หน้าหลัก
$breadcrumbs['HOME'] = gcms::breadcrumb('icon-home', WEB_URL . '/index.php', $install_modules[$module_list[0]]['menu_tooltip'], $install_modules[$module_list[0]]['menu_text'], $breadcrumb);
// url ของหน้านี้
$breadcrumbs['MODULE'] = gcms::breadcrumb('', gcms::getURL('register'), $lng['LNG_REGISTER_TITLE'], $lng['LNG_REGISTER_TITLE'], $breadcrumb);
if (isset($config['custom_register']) && is_file(ROOT_PATH . $config['custom_register'])) {
// custom register form
include ROOT_PATH . $config['custom_register'];
} else {
// antispam
$register_antispamchar = gcms::rndname(32);
$_SESSION[$register_antispamchar] = gcms::rndname(4);
// แสดงฟอร์ม registerfrm.html
$patt = array('/{BREADCRUMS}/', '/<PHONE>(.*)<\\/PHONE>/isu', '/<IDCARD>(.*)<\\/IDCARD>/isu', '/<INVITE>(.*)<\\/INVITE>/isu', '/{(LNG_[A-Z0-9_]+)}/e', '/{ANTISPAM}/', '/{WEBURL}/', '/{MODAL}/', '/{INVITE}/');
$replace = array();
$replace[] = implode("\n", $breadcrumbs);
$replace[] = empty($config['member_phone']) ? '' : '\\1';
$replace[] = empty($config['member_idcard']) ? '' : '\\1';
$replace[] = empty($config['member_invitation']) ? '' : '\\1';
$replace[] = OLD_PHP ? '$lng[\'$1\']' : 'gcms::getLng';
$replace[] = $register_antispamchar;
$replace[] = WEB_URL;
$replace[] = gcms::getVars($_POST, 'action', '') != 'modal' ? 'false' : 'true';
示例3: ucwords
$breadcrumbs['HOME'] = gcms::breadcrumb('icon-home', $canonical, $install_modules[$module_list[0]]['menu_tooltip'], $install_modules[$module_list[0]]['menu_text'], $breadcrumb);
// url ของหน้านี้
$canonical = gcms::getURL($index['module']);
// โมดูล
if ($index['module'] != $module_list[0]) {
if (isset($install_modules[$index['module']]['menu_text'])) {
$m = $install_modules[$index['module']]['menu_text'];
$t = $install_modules[$index['module']]['menu_tooltip'];
} else {
$m = ucwords($index['module']);
$t = $m;
}
$breadcrumbs['MODULE'] = gcms::breadcrumb('', $canonical, $t, $m, $breadcrumb);
}
// แก้ไข
$breadcrumbs['EDIT'] = gcms::breadcrumb('', WEB_URL . "/index.php?module={$index['module']}-write&id={$index['id']}", "{$index['topic']}.{$index['ext']}", "{$index['topic']}.{$index['ext']}", $breadcrumb);
// default query
$where = " WHERE D.`module_id`='{$index['module_id']}' AND D.`document_id`='{$index['id']}'";
// จำนวนทั้งหมด
$sql = "SELECT COUNT(*) AS `count` FROM `" . DB_EDOCUMENT_DOWNLOAD . "` AS D {$where}";
$count = $cache->get($sql);
if (!$count) {
$count = $db->customQuery($sql);
$count = $count[0];
$cache->save($sql, $count);
}
// หน้าที่เรียก
$page = gcms::getVars($_REQUEST, 'page', 0);
$totalpage = round($count['count'] / $config['edocument_listperpage']);
$totalpage += $totalpage * $config['edocument_listperpage'] < $count['count'] ? 1 : 0;
$page = $page > $totalpage ? $totalpage : $page;
示例4: array
$title = $lng['LNG_DATA_NOT_FOUND'];
$content = '<div class=error>' . $title . '</div>';
} else {
$index = $index[0];
// config
gcms::r2config($index['config'], $index);
// login
$login = gcms::getVars($_SESSION, 'login', array('id' => 0, 'status' => -1, 'email' => '', 'password' => ''));
// breadcrumbs
$breadcrumb = gcms::loadtemplate($index['module'], '', 'breadcrumb');
$breadcrumbs = array();
// หน้าหลัก
$breadcrumbs['HOME'] = gcms::breadcrumb('icon-home', WEB_URL . '/index.php', $install_modules[$module_list[0]]['menu_tooltip'], $install_modules[$module_list[0]]['menu_text'], $breadcrumb);
// breadcrumb ของ โมดูล
$m = $install_modules[$index['module']]['menu_text'];
$breadcrumbs['MODULE'] = gcms::breadcrumb('', gcms::getURL($index['module']), $install_modules[$index['module']]['menu_tooltip'], $m == '' ? $index['module'] : $m, $breadcrumb);
// หมวด
$categories = array();
$categories[0] = '<option value=0>{LNG_NO_CATEGORY}</option>';
$sql = "SELECT `category_id`,`topic` FROM `" . DB_CATEGORY . "` WHERE `module_id`='{$index['module_id']}' ORDER BY `category_id`";
$list = $cache->get($sql);
if (!$list) {
$list = $db->customQuery($sql);
$cache->save($sql, $list);
}
foreach ($list as $item) {
if ($isAdmin || $cat == $item['category_id']) {
$sel = $cat == $item['category_id'] ? ' selected' : '';
$categories[$item['category_id']] = "<option value={$item['category_id']}{$sel}>" . gcms::ser2Str($item, 'topic') . "</option>";
}
}
示例5: array
<?php
// modules/member/dologin.php
if (defined('MAIN_INIT')) {
// title
$title = $lng['LNG_LOGIN'];
// breadcrumbs
$breadcrumb = gcms::loadtemplate('member', '', 'breadcrumb');
$breadcrumbs = array();
// หน้าหลัก
$breadcrumbs['HOME'] = gcms::breadcrumb('icon-home', WEB_URL . '/index.php', $install_modules[$module_list[0]]['menu_tooltip'], $install_modules[$module_list[0]]['menu_text'], $breadcrumb);
// url ของหน้านี้
$breadcrumbs['MODULE'] = gcms::breadcrumb('', gcms::getURL('dologin'), strip_tags($lng['LNG_LOGIN_TITLE']), $lng['LNG_LOGIN'], $breadcrumb);
if (!gcms::isMember()) {
// อ่านข้อมูลจาก cookie
$login_email = empty($_COOKIE[PREFIX . '_login_email']) ? '' : gcms::decode($_COOKIE[PREFIX . '_login_email']);
$login_password = empty($_COOKIE[PREFIX . '_login_password']) ? '' : gcms::decode($_COOKIE[PREFIX . '_login_password']);
$login_remember = empty($_COOKIE[PREFIX . '_login_remember']) ? 0 : (int) $_COOKIE[PREFIX . '_login_remember'];
if (!empty($config['custom_login']) && is_file(ROOT_PATH . $config['custom_login'])) {
// custom login form
include_once ROOT_PATH . $config['custom_login'];
} else {
// ฟอร์ม login
$patt = array('/{BREADCRUMS}/', '/{(LNG_[A-Z0-9_]+)}/e', '/{WEBTITLE}/', '/{SUBTITLE}/', '/{EMAIL}/', '/{PASSWORD}/', '/{REMEMBER}/', '/{WEBURL}/', '/{FACEBOOK}/', '/{NEXT}/');
$replace = array();
$replace[] = implode("\n", $breadcrumbs);
$replace[] = OLD_PHP ? '$lng[\'$1\']' : 'gcms::getLng';
$replace[] = $config['web_title'];
$replace[] = empty($error) ? $config['web_description'] : '<span class=error>' . $error . '</span>';
$replace[] = $login_email;
$replace[] = $login_password;
示例6: array
<?php
// modules/member/forgot.php
if (defined('MAIN_INIT')) {
// title
$title = $lng['LNG_FORGOT_TITLE'];
// breadcrumbs
$breadcrumb = gcms::loadtemplate('', '', 'breadcrumb');
$breadcrumbs = array();
// หน้าหลัก
$breadcrumbs['HOME'] = gcms::breadcrumb('icon-home', WEB_URL . '/index.php', $install_modules[$module_list[0]]['menu_tooltip'], $install_modules[$module_list[0]]['menu_text'], $breadcrumb);
// url ของหน้านี้
$breadcrumbs['MODULE'] = gcms::breadcrumb('', gcms::getURL('forgot'), $lng['LNG_FORGOT_TITLE'], $lng['LNG_FORGOT_TITLE'], $breadcrumb);
if (isset($config['custom_forgot']) && is_file(ROOT_PATH . $config['custom_forgot'])) {
// custom register form
include ROOT_PATH . $config['custom_forgot'];
} else {
// แสดงฟอร์ม member/forgotfrm.html
$patt = array('/{BREADCRUMS}/', '/{(LNG_[A-Z0-9_]+)}/e', '/{WEBURL}/', '/{MODAL}/');
$replace = array();
$replace[] = implode("\n", $breadcrumbs);
$replace[] = OLD_PHP ? '$lng[\'$1\']' : 'gcms::getLng';
$replace[] = WEB_URL;
$replace[] = gcms::getVars($_POST, 'action', '') == 'modal' ? 'true' : 'false';
$content = gcms::pregReplace($patt, $replace, gcms::loadtemplate('member', 'member', 'forgotfrm'));
}
// เลือกเมนู
$menu = 'forgot';
}
示例7: str_replace
}
$splitpage .= $i < $totalpage ? str_replace('%1', $totalpage, $url) : '';
}
}
// stop timer
$mtime = microtime();
$mtime = explode(' ', $mtime);
$time_end = $mtime[1] + $mtime[0];
// breadcrumbs
$breadcrumb = gcms::loadtemplate('', '', 'breadcrumb');
$breadcrumbs = array();
// หน้าหลัก
$breadcrumbs['HOME'] = gcms::breadcrumb('icon-home', WEB_URL . '/index.php', $install_modules[$module_list[0]]['menu_tooltip'], $install_modules[$module_list[0]]['menu_text'], $breadcrumb);
// หน้าค้นหา
$canonical = WEB_URL . '/index.php?module=search&q=' . urlencode($search);
$breadcrumbs['MODULE'] = gcms::breadcrumb('', $canonical, '{LNG_SEARCH}', '{LNG_SEARCH}', $breadcrumb);
// แสดงผล
$patt = array('/{BREADCRUMS}/', '/{(LNG_[A-Z0-9_]+)}/e', '/{WEBURL}/', '/{MODULE}/', '/{SEARCH}/', '/{RESULT}/', '/{LIST}/', '/{SPLITPAGE}/');
$replace = array();
$replace[] = implode("\n", $breadcrumbs);
$replace[] = OLD_PHP ? '$lng[\'$1\']' : 'gcms::getLng';
$replace[] = WEB_URL;
$replace[] = $module;
$replace[] = $search;
$replace[] = sizeof($list) == 0 ? '' : sprintf($lng['ALL_SEARCH'], $start + 1, $end, $rows, $search, number_format($time_end - $time_start, 4));
if ($search == '') {
$replace[] = $lng['LNG_SEARCH_TIP'];
} elseif (sizeof($list) == 0) {
$replace[] = sprintf($lng['LNG_SEARCH_NOT_FOUND'], $search) . $lng['LNG_SEARCH_TIP'];
} else {
$replace[] = gcms::HighlightSearch(implode("\n", $list), $search);
示例8: array
// อ่าน config
gcms::r2config($index['config'], $index);
}
}
if (!$index) {
$title = $lng['LNG_DOCUMENT_NOT_FOUND'];
$content = '<div class=error>' . $title . '</div>';
} else {
if ($cat_count == 1) {
$index['topic'] = gcms::ser2Str($index, 'topic');
$index['description'] = gcms::ser2Str($index, 'description');
$index['icon'] = gcms::ser2Str($index, 'icon');
}
// category
if ($cat_count == 1 && $index['topic'] != '') {
$breadcrumbs['CATEGORY'] = gcms::breadcrumb('', gcms::getURL($index['module'], '', (int) $index['category_id']), $index['description'], $index['topic'], $breadcrumb);
}
$splitpage = '';
$list = array();
if ($cat_count > 0 || $index['categories'] == 0 || $index['category_display'] == 0) {
// เลือกหมวดมา หรือไม่มีหมวด หรือปิดการแสดงผลหมวดหมู่ แสดงรายการเรื่อง
include ROOT_PATH . 'modules/document/stories.php';
$template = 'list';
} else {
// ลิสต์รายชื่อหมวด
include ROOT_PATH . 'modules/document/categories.php';
$template = 'category';
}
// แสดงผลหน้าเว็บ
$patt = array('/{BREADCRUMS}/', '/{LIST}/', '/{NEWTOPIC}/', '/{CATEGORY}/', '/{TOPIC}/', '/{DETAIL}/', '/{SPLITPAGE}/', '/{LANGUAGE}/', '/{MODULE}/');
$replace = array();
示例9: array
$categories = array();
if ($index && $canEdit) {
// breadcrumbs
$breadcrumb = gcms::loadtemplate($index['module'], '', 'breadcrumb');
$breadcrumbs = array();
// หน้าหลัก
$breadcrumbs['HOME'] = gcms::breadcrumb('icon-home', $canonical, $install_modules[$module_list[0]]['menu_tooltip'], $install_modules[$module_list[0]]['menu_text'], $breadcrumb);
// โมดูล
if (isset($install_modules[$index['module']]['menu_text'])) {
$m = $install_modules[$index['module']]['menu_text'];
$t = $install_modules[$index['module']]['menu_tooltip'];
} else {
$m = ucwords($index['module']);
$t = $m;
}
$breadcrumbs['MODULE'] = gcms::breadcrumb('', gcms::getURL($index['module']), $t, $m, $breadcrumb);
if ($rid == 0) {
$categories[0] = '<option value=0>{LNG_NO_CATEGORY}</option>';
$sql = "SELECT `category_id`,`topic` FROM `" . DB_CATEGORY . "` WHERE `module_id`='{$index['module_id']}' ORDER BY `category_id`";
foreach ($db->customQuery($sql) as $item) {
if ($moderator || $index['category_id'] == $item['category_id']) {
$sel = $index['category_id'] == $item['category_id'] ? ' selected' : '';
$categories[$item['category_id']] = "<option value={$item['category_id']}{$sel}>" . gcms::ser2Str($item, 'topic') . "</option>";
}
}
if (sizeof($categories) > 1) {
unset($categories[0]);
}
}
// antispam
$register_antispamchar = gcms::rndname(32);
示例10: IN
$sql .= " WHERE I.`module_id`={$index['module_id']} AND I.`language` IN ('" . LANGUAGE . "','') LIMIT 1";
$mo = $cache->get($sql);
if (!$mo) {
$mo = $db->customQuery($sql);
$cache->save($sql, $mo);
}
$m = $mo[0]['topic'];
$t = $mo[0]['topic'];
}
$canonical = gcms::getURL($index['module']);
$breadcrumbs['MODULE'] = gcms::breadcrumb('', $canonical, $t, $m, $breadcrumb);
}
// category
$category = gcms::ser2Str($index, 'category');
if (!empty($category)) {
$breadcrumbs['CATEGORY'] = gcms::breadcrumb('', gcms::getURL($index['module'], '', $index['category_id']), gcms::ser2Str($index, 'cat_tooltip'), $category, $breadcrumb);
}
// ความคิดเห็น
$comments = array();
if ($canReply) {
$patt = array('/(edit-{QID}-{RID}-{NO}-{MODULE})/', '/(delete-{QID}-{RID}-{NO}-{MODULE})/', '/{DETAIL}/', '/{UID}/', '/{DISPLAYNAME}/', '/{STATUS}/', '/{DATE}/', '/{DATEISO}/', '/{IP}/', '/{NO}/', '/{RID}/');
$skin = gcms::loadtemplate($index['module'], 'document', 'commentitem');
// query
$sql = "SELECT C.*,U.`status`";
$sql .= ",(CASE WHEN ISNULL(U.`id`) THEN C.`email` WHEN U.`displayname`='' THEN U.`email` ELSE U.`displayname` END) AS `displayname`";
$sql .= " FROM `" . DB_COMMENT . "` AS C";
$sql .= " LEFT JOIN `" . DB_USER . "` AS U ON U.`id`=C.`member_id`";
$sql .= " WHERE C.`index_id`='{$index['id']}' AND C.`module_id`='{$index['module_id']}'";
$sql .= " ORDER BY C.`id` ASC";
if (isset($_REQUEST['visited'])) {
$datas = $db->customQuery($sql);
示例11: ucwords
// โมดูล
if ($index['module'] != $module_list[0]) {
if (isset($install_modules[$index['module']]['menu_text'])) {
$m = $install_modules[$index['module']]['menu_text'];
$t = $install_modules[$index['module']]['menu_tooltip'];
} else {
$m = ucwords($index['module']);
$t = $m;
}
$canonical = gcms::getURL($index['module']);
$breadcrumbs['MODULE'] = gcms::breadcrumb('', $canonical, $t, $m, $breadcrumb);
}
$canonical = gcms::getURL($index['module'], '', 0, 0, "id={$id}");
if (!empty($index['category'])) {
// อัลบัม
$breadcrumbs['CATEGORY'] = gcms::breadcrumb('', $canonical, $index['category'], $index['category'], $breadcrumb);
}
// ทั้งหมด
$sql = "SELECT COUNT(*) AS `count` FROM `" . DB_GALLERY . "`";
$sql .= " WHERE `module_id`='{$index['module_id']}' AND `album_id`='{$id}'";
$count = $cache->get($sql);
if (!$count) {
$count = $db->customQuery($sql);
$cache->save($sql, $count);
}
if ($count[0]['count'] == 0) {
$content = '<div class=error>' . $lng['LNG_LIST_EMPTY'] . '</div>';
} else {
// จำนวนที่ต้องการ
$list_per_page = $config['gallery_rows'] * $config['gallery_cols'];
// หน้าที่เรียก
示例12: array
// modules/member/editprofile.php
if (defined('MAIN_INIT') && $isMember) {
// ข้อมูล user ที่ login
$user = $db->getRec(DB_USER, $_SESSION['login']['id']);
if (!$user) {
$title = $lng['LNG_MEMBER_NOT_FOUND'];
$content = '<div class=error>' . $title . '</div>';
} else {
// breadcrumbs
$breadcrumb = gcms::loadtemplate('', '', 'breadcrumb');
$breadcrumbs = array();
// หน้าหลัก
$breadcrumbs['HOME'] = gcms::breadcrumb('icon-home', WEB_URL . '/index.php', $install_modules[$module_list[0]]['menu_tooltip'], $install_modules[$module_list[0]]['menu_text'], $breadcrumb);
// url ของหน้านี้
$breadcrumbs['MODULE'] = gcms::breadcrumb('', gcms::getURL('forgot'), $lng['LNG_MEMBER_EDIT_TITLE'], $lng['LNG_MEMBER_EDIT_TITLE'], $breadcrumb);
if ($user['fb'] == 1) {
unset($member_tabs['password']);
}
// ตรวจสอบ tab ที่เลือก
$title = '';
$tab = gcms::getVars($_REQUEST, 'tab', '');
$file = isset($member_tabs[$tab][1]) ? $member_tabs[$tab][1] : '';
if ($file == '' || !is_file(ROOT_PATH . "{$file}.php")) {
// เรียก tab แรก ถ้าไม่มีการระบุ tab มา
reset($member_tabs);
$tab = key($member_tabs);
$file = $member_tabs[$tab][1];
}
if ($file != 'modules/member/editprofile') {
include ROOT_PATH . "{$file}.php";
示例13: ucwords
$m = ucwords($index['module']);
$t = $m;
}
$canonical = gcms::getURL($index['module']);
$breadcrumbs['MODULE'] = gcms::breadcrumb('', $canonical, $t, $m, $breadcrumb);
}
// default query
$q = array();
$q[] = "`module_id`='{$index['module_id']}'";
// หมวด
$cat = gcms::getVars($_REQUEST, 'cat', 0);
if ($cat > 0) {
$q[] = "`category_id`='{$cat}'";
if (!empty($categories[$cat])) {
// category
$breadcrumbs['CATEGORY'] = gcms::breadcrumb('', gcms::getURL($index['module']) . '?cat=' . $cat, $categories[$cat], $categories[$cat], $breadcrumb);
}
}
// ข้อความค้นหา
$search = $db->sql_trim_str($_REQUEST, 'q');
if ($search != '') {
$q[] = "(`name` LIKE '%{$search}%' OR `ext` LIKE '%{$search}%' OR `detail` LIKE '%{$search}%')";
}
$where = ' WHERE ' . implode(' AND ', $q);
// จำนวนดาวน์โหลดทั้งหมด
$sql = "SELECT COUNT(*) AS `count` FROM `" . DB_DOWNLOAD . "` {$where}";
$count = $cache->get($sql);
if (!$count) {
$count = $db->customQuery($sql);
$count = $count[0];
$cache->save($sql, $count);