本文整理汇总了PHP中cot_breadcrumbs函数的典型用法代码示例。如果您正苦于以下问题:PHP cot_breadcrumbs函数的具体用法?PHP cot_breadcrumbs怎么用?PHP cot_breadcrumbs使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了cot_breadcrumbs函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: cot_generate_sbrtags
function cot_generate_sbrtags($item_data, $tag_prefix = '', $admin_rights = null, $pagepath_home = false)
{
global $db, $cot_extrafields, $cfg, $L, $Ls, $R, $db_sbr, $db_sbr_stages, $sys;
static $extp_first = null, $extp_main = null;
if (is_null($extp_first)) {
$extp_first = cot_getextplugins('sbrtags.first');
$extp_main = cot_getextplugins('sbrtags.main');
}
/* === Hook === */
foreach ($extp_first as $pl) {
include $pl;
}
/* ===== */
if (!is_array($item_data)) {
$sql = $db->query("SELECT * FROM {$db_sbr} WHERE sbr_id = '" . (int) $item_data . "' LIMIT 1");
$item_data = $sql->fetch();
}
if ($item_data['sbr_id'] > 0 && !empty($item_data['sbr_title'])) {
if (is_null($admin_rights)) {
$admin_rights = cot_auth('plug', 'sbr', 'A');
}
$patharray[] = array(cot_url('sbr'), $L['sbr']);
$patharray[] = array(cot_url('sbr', 'id=' . $item_data['sbr_id']), $item_data['sbr_title']);
$itempath = cot_breadcrumbs($patharray, $pagepath_home, true);
$temp_array = array('ID' => $item_data['sbr_id'], 'STATUS' => $item_data['sbr_status'], 'LOCALSTATUS' => $L['sbr_status_' . $item_data['sbr_status']], 'LABELSTATUS' => $R['sbr_labels'][$item_data['sbr_status']], 'URL' => cot_url('sbr', 'id=' . $item_data['sbr_id']), 'TITLE' => $itempath, 'SHORTTITLE' => $item_data['sbr_title'], 'CREATEDATE' => date('d.m.Y H:i', $item_data['sbr_create']), 'CREATEDATE_STAMP' => $item_data['sbr_create'], 'BEGINDATE' => date('d.m.Y H:i', $item_data['sbr_begin']), 'BEGINDATE_STAMP' => $item_data['sbr_begin'], 'DONEDATE' => date('d.m.Y H:i', $item_data['sbr_done']), 'DONEDATE_STAMP' => $item_data['sbr_done'], 'COST' => $item_data['sbr_cost'], 'TAX' => $item_data['sbr_tax'], 'TOTAL' => $item_data['sbr_cost'] + $item_data['sbr_tax'], 'USER_IS_ADMIN' => $admin_rights || $usr['id'] == $item_data['item_userid']);
if ($admin_rights || $usr['id'] == $item_data['sbr_employer']) {
$temp_array['ADMIN_EDIT'] = cot_rc_link(cot_url('sbr', 'm=edit&id=' . $item_data['sbr_id']), $L['Edit']);
$temp_array['ADMIN_EDIT_URL'] = cot_url('sbr', 'm=edit&id=' . $item_data['sbr_id']);
}
// Extrafields
if (isset($cot_extrafields[$db_sbr])) {
foreach ($cot_extrafields[$db_sbr] as $exfld) {
$tag = mb_strtoupper($exfld['field_name']);
$temp_array[$tag . '_TITLE'] = isset($L['sbr_' . $exfld['field_name'] . '_title']) ? $L['sbr_' . $exfld['field_name'] . '_title'] : $exfld['field_description'];
$temp_array[$tag] = cot_build_extrafields_data('sbr', $exfld, $item_data['item_' . $exfld['field_name']]);
}
}
/* === Hook === */
foreach ($extp_main as $pl) {
include $pl;
}
/* ===== */
} else {
$temp_array = array('TITLE' => !empty($emptytitle) ? $emptytitle : $L['Deleted'], 'SHORTTITLE' => !empty($emptytitle) ? $emptytitle : $L['Deleted']);
}
$return_array = array();
foreach ($temp_array as $key => $val) {
$return_array[$tag_prefix . $key] = $val;
}
return $return_array;
}
示例2: reset
// ========== Allowed =========
reset($cot_extensions);
sort($cot_extensions);
foreach ($cot_extensions as $k => $line) {
$t->assign(array('ALLOWED_ROW_ICON' => $icon[$line[0]], 'ALLOWED_ROW_EXT' => $line[0], 'ALLOWED_ROW_DESC' => $filedesc[$line[0]]));
$t->parse('MAIN.ALLOWED_ROW');
}
// ========== Create a new folder =========
if ($usr['auth_write']) {
$t->assign(array('NEWFOLDER_FORM_ACTION' => cot_url('pfs', 'a=newfolder&' . $more)));
$t->parse('MAIN.PFS_NEWFOLDER_FORM');
}
// ========== Putting all together =========
$out['subtitle'] = $L['Mypfs'];
/* ============= */
$t->assign('PFS_TITLE', cot_breadcrumbs($title, $cfg['homebreadcrumb']));
if ($standalone) {
if ($c1 == 'pageform' && $c2 == 'rpageurl') {
$addthumb = $thumbs_dir_user . "' + gfile + '";
$addpix = "' + gfile + '";
$addfile = $pfs_dir_user . "' + gfile + '";
$pfs_code_addfile = $addfile;
$pfs_code_addthumb = $addthumb;
$pfs_code_addpix = $addpix;
} else {
$addthumb = $R['pfs_code_addthumb'];
$addpix = $R['pfs_code_addpix'];
$addfile = $R['pfs_code_addfile'];
$pfs_code_addfile = cot_rc('pfs_code_addfile');
$pfs_code_addthumb = cot_rc('pfs_code_addthumb');
$pfs_code_addpix = cot_rc('pfs_code_addpix');
示例3: defined
<?php
/* ====================
[BEGIN_COT_EXT]
Hooks=tags.search.pages.loop
[END_COT_EXT]
==================== */
/**
* Tag search for i18n pages
*
* @package I18n
* @copyright (c) Cotonti Team
* @license https://github.com/Cotonti/Cotonti/blob/master/License.txt
*/
defined('COT_CODE') or die('Wrong URL');
if (!empty($row['ipage_title'])) {
$tags = cot_tag_list($row['page_id'], 'pages', array('tag_locale' => $row['ipage_locale']));
$tag_list = '';
$tag_i = 0;
foreach ($tags as $tag) {
$tag_t = $cfg['plugin']['tags']['title'] ? cot_tag_title($tag) : $tag;
$tag_u = $cfg['plugin']['tags']['translit'] ? cot_translit_encode($tag) : $tag;
$tl = $lang != 'en' && $tag_u != $tag ? 1 : null;
if ($tag_i > 0) {
$tag_list .= ', ';
}
$tag_list .= cot_rc_link(cot_url('plug', array('e' => 'tags', 'a' => 'pages', 't' => str_replace(' ', '-', $tag_u), 'tl' => $tl)), htmlspecialchars($tag_t), 'rel="nofollow"');
$tag_i++;
}
$t->assign(array('TAGS_RESULT_ROW_URL' => empty($row['page_alias']) ? cot_url('page', 'c=' . $row['page_cat'] . '&id=' . $row['page_id'] . '&l=' . $row['ipage_locale']) : cot_url('page', 'c=' . $row['page_cat'] . '&al=' . $row['page_alias'] . '&l=' . $row['ipage_locale']), 'TAGS_RESULT_ROW_TITLE' => htmlspecialchars($row['ipage_title']), 'TAGS_RESULT_ROW_PATH' => cot_breadcrumbs(cot_i18n_build_catpath('page', $row['page_cat'], $row['ipage_locale']), false), 'TAGS_RESULT_ROW_TAGS' => $tag_list));
}
示例4: foreach
/* === Hook === */
foreach (cot_getextplugins('market.list.query') as $pl) {
include $pl;
}
/* ===== */
$t = new XTemplate($mskin);
$where = $where ? 'WHERE ' . implode(' AND ', $where) : '';
$order = $order ? 'ORDER BY ' . implode(', ', $order) : '';
$totalitems = $db->query("SELECT COUNT(*) FROM {$db_market} AS m {$join_condition} \n\tLEFT JOIN {$db_users} AS u ON u.user_id=m.item_userid\n\t" . $where . "")->fetchColumn();
$sqllist = $db->query("SELECT m.*, u.* {$join_columns} \n\tFROM {$db_market} AS m {$join_condition}\n\tLEFT JOIN {$db_users} AS u ON u.user_id=m.item_userid \n\t" . $where . "\n\t" . $order . "\n\tLIMIT {$d}, " . $maxrowsperpage);
$pagenav = cot_pagenav('market', $list_url_path, $d, $totalitems, $maxrowsperpage);
$catpatharray[] = array(cot_url('market'), $L['market']);
if (!empty($c)) {
$catpatharray = array_merge($catpatharray, cot_structure_buildpath('market', $c));
}
$catpath = cot_breadcrumbs($catpatharray, $cfg['homebreadcrumb'], true);
$t->assign(array("SEARCH_ACTION_URL" => cot_url('market', '', '', true), "SEARCH_SQ" => cot_inputbox('text', 'sq', htmlspecialchars($sq), 'class="schstring"'), "SEARCH_CAT" => cot_market_selectcat($c, 'c'), "SEARCH_SORTER" => cot_selectbox($sort, "sort", array('', 'costasc', 'costdesc'), array($L['market_mostrelevant'], $L['market_costasc'], $L['market_costdesc']), false), "PAGENAV_PAGES" => $pagenav['main'], "PAGENAV_PREV" => $pagenav['prev'], "PAGENAV_NEXT" => $pagenav['next'], "PAGENAV_COUNT" => $totalitems, "CATALOG" => cot_build_structure_market_tree('', array($c), 0), "BREADCRUMBS" => $catpath, "CATTITLE" => !empty($c) ? $structure['market'][$c]['title'] : '', "CATDESC" => !empty($c) ? $structure['market'][$c]['desc'] : ''));
foreach ($cot_extrafields[$db_market] as $exfld) {
$uname = strtoupper($exfld['field_name']);
$exfld_val = cot_build_extrafields($exfld['field_name'], $exfld, $shfld[$exfld['field_name']]);
$exfld_title = isset($L['projects_' . $exfld['field_name'] . '_title']) ? $L['projects_' . $exfld['field_name'] . '_title'] : $exfld['field_description'];
$t->assign(array('SEARCH_' . $uname => $exfld_val, 'SEARCH_' . $uname . '_TITLE' => $exfld_title));
}
/* === Hook === */
foreach (cot_getextplugins('market.list.search.tags') as $pl) {
include $pl;
}
/* ===== */
$sqllist_rowset = $sqllist->fetchAll();
$sqllist_idset = array();
foreach ($sqllist_rowset as $item) {
示例5: cot_rc
$t->assign(array('PM_ROW_ID' => $row['pm_id'], 'PM_ROW_STATE' => $row['pm_tostate'], 'PM_ROW_STAR' => cot_rc($star_class ? 'pm_icon_unstar' : 'pm_icon_star', array('link' => cot_url('pm', 'f=' . $f . '&filter=' . $filter . '&a=star&id=' . $row['pm_id'] . '&d=' . $durl))), 'PM_ROW_STAR_URL' => cot_url('pm', 'f=' . $f . '&filter=' . $filter . '&a=star&id=' . $row['pm_id'] . '&d=' . $durl), 'PM_ROW_DATE' => cot_date('datetime_medium', $row['pm_date']), 'PM_ROW_DATE_STAMP' => $row['pm_date'], 'PM_ROW_TITLE' => cot_rc_link(cot_url('pm', 'm=message&id=' . $row['pm_id']), htmlspecialchars($row['pm_title']), array('class' => $cfg['pm']['turnajax'] ? 'ajax' : '')), 'PM_ROW_URL' => cot_url('pm', 'm=message&id=' . $row['pm_id']), 'PM_ROW_TEXT' => $pm_data, 'PM_ROW_ICON_STATUS' => $row['pm_icon_readstatus'], 'PM_ROW_ICON_STARRED' => $row['pm_icon_starred'], 'PM_ROW_ICON_DELETE' => cot_rc_link($url_delete, $R['pm_icon_trashcan'], array('title' => $L['Delete'], 'class' => $cfg['pm']['turnajax'] ? 'ajax' : '')), 'PM_ROW_ICON_DELETE_CONFIRM' => cot_rc_link(cot_confirm_url($url_delete), $R['pm_icon_trashcan'], array('title' => $L['Delete'], 'class' => $cfg['pm']['turnajax'] ? 'ajax' : '')), 'PM_ROW_DELETE_URL' => $url_delete, 'PM_ROW_DELETE_CONFIRM_URL' => cot_confirm_url($url_delete), 'PM_ROW_ICON_EDIT' => $row['pm_tostate'] == 0 ? cot_rc_link($url_edit, $R['pm_icon_edit'], array('title' => $L['Edit'], 'class' => $cfg['pm']['turnajax'] ? 'ajax' : '')) : '', 'PM_ROW_EDIT_URL' => $row['pm_tostate'] == 0 ? $url_edit : '', 'PM_ROW_DESC' => $pm_desc, 'PM_ROW_ODDEVEN' => cot_build_oddeven($jj), 'PM_ROW_NUM' => $jj));
$t->assign(cot_generate_usertags($row, 'PM_ROW_USER_'));
/* === Hook - Part2 : Include === */
foreach ($extp as $pl) {
include $pl;
}
/* ===== */
$t->parse('MAIN.PM_ROW');
}
if ($jj == 0) {
$t->parse('MAIN.PM_ROW_EMPTY');
}
if (!COT_AJAX) {
$t->parse('MAIN.BEFORE_AJAX');
$t->parse('MAIN.AFTER_AJAX');
}
$url_newpm = cot_url('pm', 'm=send');
$url_inbox = cot_url('pm');
$url_sentbox = cot_url('pm', 'f=sentbox');
$url_all = cot_url('pm', 'f=' . $f);
$url_unread = cot_url('pm', 'f=' . $f . '&filter=unread');
$url_starred = cot_url('pm', 'f=' . $f . '&filter=starred');
$t->assign(array('PM_PAGETITLE' => cot_breadcrumbs($title, $cfg['homebreadcrumb']), 'PM_SUBTITLE' => $subtitle, 'PM_FORM_UPDATE' => cot_url('pm', cot_xg() . '&f=' . $f . '&filter=' . $filter . '&d=' . $durl), 'PM_SENDNEWPM' => $usr['auth_write'] ? cot_rc_link($url_newpm, $L['pm_sendnew'], $cfg['pm']['turnajax'] ? array('class' => 'ajax') : '') : '', 'PM_SENDNEWPM_URL' => $usr['auth_write'] ? $url_newpm : '', 'PM_INBOX' => cot_rc_link($url_inbox, $L['pm_inbox'], $cfg['pm']['turnajax'] ? array('class' => 'ajax') : ''), 'PM_INBOX_URL' => $url_inbox, 'PM_INBOX_COUNT' => $totalinbox, 'PM_SENTBOX' => cot_rc_link($url_sentbox, $L['pm_sentbox'], $cfg['pm']['turnajax'] ? array('class' => 'ajax') : ''), 'PM_SENTBOX_URL' => $url_sentbox, 'PM_SENTBOX_COUNT' => $totalsentbox, 'PM_FILTER_ALL' => cot_rc_link($url_all, $L['pm_all'], $cfg['pm']['turnajax'] ? array('class' => 'ajax') : ''), 'PM_FILTER_ALL_URL' => $url_all, 'PM_FILTER_UNREAD' => cot_rc_link($url_unread, $L['pm_unread'], $cfg['pm']['turnajax'] ? array('class' => 'ajax') : ''), 'PM_FILTER_UNREAD_URL' => $url_unread, 'PM_FILTER_STARRED' => cot_rc_link($url_starred, $L['pm_starred'], $cfg['pm']['turnajax'] ? array('class' => 'ajax') : ''), 'PM_FILTER_STARRED_URL' => $url_starred, 'PM_PAGEPREV' => $pagenav['prev'], 'PM_PAGENEXT' => $pagenav['next'], 'PM_PAGES' => $pagenav['main'], 'PM_CURRENTPAGE' => $pagenav['current'], 'PM_TOTALPAGES' => $pagenav['total'], 'PM_SENT_TYPE' => $f == 'sentbox' ? $L['Recipient'] : $L['Sender']));
/* === Hook === */
foreach (cot_getextplugins('pm.list.tags') as $pl) {
include $pl;
}
/* ===== */
$t->parse('MAIN');
$t->out('MAIN');
require_once $cfg['system_dir'] . '/footer.php';
示例6: foreach
foreach (cot_getextplugins('forums.editpost.update.done') as $pl) {
include $pl;
}
/* ===== */
cot_forums_sectionsetlast($rowpost['fp_cat']);
if ($cache) {
$cfg['cache_forums'] && $cache->page->clear('forums');
$cfg['cache_index'] && $cache->page->clear('index');
}
cot_redirect(cot_url('forums', "m=posts&q=" . $q . '&d=' . $durl, '#' . $p, true));
}
require_once cot_incfile('forms');
$crumbs = cot_forums_buildpath($s);
$crumbs[] = array(cot_url('forums', "m=posts&p=" . $p, "#" . $p), ($rowt['ft_mode'] == 1 ? '# ' : '') . htmlspecialchars($rowt['ft_title']));
$crumbs[] = array(cot_url('forums', "m=editpost&s={$s}&q=" . $q . "&p=" . $p . "&" . cot_xg()), $L['Edit']);
$toptitle = cot_breadcrumbs($crumbs, $cfg['homebreadcrumb']);
$toptitle .= $usr['isadmin'] ? $R['forums_code_admin_mark'] : '';
$sys['sublocation'] = $structure['forums'][$s]['title'];
$title_params = array('FORUM' => $L['Forums'], 'SECTION' => $structure['forums'][$s]['title'], 'TOPIC' => $rowt['ft_title'], 'EDIT' => $L['Edit']);
$out['subtitle'] = cot_title('{EDIT} - {TOPIC}', $title_params);
$out['head'] .= $R['code_noindex'];
/* === Hook === */
foreach (cot_getextplugins('forums.editpost.main') as $pl) {
include $pl;
}
/* ===== */
require_once $cfg['system_dir'] . '/header.php';
$mskin = cot_tplfile(array('forums', 'editpost', $structure['forums'][$s]['tpl']));
$t = new XTemplate($mskin);
cot_display_messages($t);
if ($db->query("SELECT fp_id FROM {$db_forum_posts} WHERE fp_topicid = {$q} ORDER BY fp_id ASC LIMIT 1")->fetchColumn() == $p) {
示例7: cot_generate_pagetags
/**
* Returns all page tags for coTemplate
*
* @param mixed $page_data Page Info Array or ID
* @param string $tag_prefix Prefix for tags
* @param int $textlength Text truncate
* @param bool $admin_rights Page Admin Rights
* @param bool $pagepath_home Add home link for page path
* @param string $emptytitle Page title text if page does not exist
* @return array
* @global CotDB $db
*/
function cot_generate_pagetags($page_data, $tag_prefix = '', $textlength = 0, $admin_rights = null, $pagepath_home = false, $emptytitle = '')
{
global $db, $cot_extrafields, $cfg, $L, $Ls, $R, $db_pages, $usr, $sys, $cot_yesno, $structure, $db_structure;
static $extp_first = null, $extp_main = null;
static $pag_auth = array();
if (is_null($extp_first)) {
$extp_first = cot_getextplugins('pagetags.first');
$extp_main = cot_getextplugins('pagetags.main');
}
/* === Hook === */
foreach ($extp_first as $pl) {
include $pl;
}
/* ===== */
if (!is_array($page_data)) {
$sql = $db->query("SELECT * FROM {$db_pages} WHERE page_id = '" . (int) $page_data . "' LIMIT 1");
$page_data = $sql->fetch();
}
if ($page_data['page_id'] > 0 && !empty($page_data['page_title'])) {
if (is_null($admin_rights)) {
if (!isset($pag_auth[$page_data['page_cat']])) {
$pag_auth[$page_data['page_cat']] = cot_auth('page', $page_data['page_cat'], 'RWA1');
}
$admin_rights = (bool) $pag_auth[$page_data['page_cat']][2];
}
$pagepath = cot_structure_buildpath('page', $page_data['page_cat']);
$catpath = cot_breadcrumbs($pagepath, $pagepath_home);
$page_data['page_pageurl'] = empty($page_data['page_alias']) ? cot_url('page', 'c=' . $page_data['page_cat'] . '&id=' . $page_data['page_id']) : cot_url('page', 'c=' . $page_data['page_cat'] . '&al=' . $page_data['page_alias']);
$page_link[] = array($page_data['page_pageurl'], $page_data['page_title']);
$page_data['page_fulltitle'] = cot_breadcrumbs(array_merge($pagepath, $page_link), $pagepath_home);
if (!empty($page_data['page_url']) && $page_data['page_file']) {
$dotpos = mb_strrpos($page_data['page_url'], ".") + 1;
$type = mb_strtolower(mb_substr($page_data['page_url'], $dotpos, 5));
$page_data['page_fileicon'] = cot_rc('page_icon_file_path', array('type' => $type));
if (!file_exists($page_data['page_fileicon'])) {
$page_data['page_fileicon'] = cot_rc('page_icon_file_default');
}
$page_data['page_fileicon'] = cot_rc('page_icon_file', array('icon' => $page_data['page_fileicon']));
} else {
$page_data['page_fileicon'] = '';
}
$date_format = 'datetime_medium';
$text = cot_parse($page_data['page_text'], $cfg['page']['markup'], $page_data['page_parser']);
$text_cut = cot_cut_more($text);
if ($textlength > 0 && mb_strlen($text_cut) > $textlength) {
$text_cut = cot_string_truncate($text_cut, $textlength);
}
$cutted = mb_strlen($text) > mb_strlen($text_cut) ? true : false;
$cat_url = cot_url('page', 'c=' . $page_data['page_cat']);
$validate_url = cot_url('admin', "m=page&a=validate&id={$page_data['page_id']}&x={$sys['xk']}");
$unvalidate_url = cot_url('admin', "m=page&a=unvalidate&id={$page_data['page_id']}&x={$sys['xk']}");
$edit_url = cot_url('page', "m=edit&id={$page_data['page_id']}");
$delete_url = cot_url('page', "m=edit&a=update&delete=1&id={$page_data['page_id']}&x={$sys['xk']}");
$page_data['page_status'] = cot_page_status($page_data['page_state'], $page_data['page_begin'], $page_data['page_expire']);
$temp_array = array('URL' => $page_data['page_pageurl'], 'ID' => $page_data['page_id'], 'TITLE' => $page_data['page_fulltitle'], 'ALIAS' => $page_data['page_alias'], 'STATE' => $page_data['page_state'], 'STATUS' => $page_data['page_status'], 'LOCALSTATUS' => $L['page_status_' . $page_data['page_status']], 'SHORTTITLE' => htmlspecialchars($page_data['page_title'], ENT_COMPAT, 'UTF-8', false), 'CAT' => $page_data['page_cat'], 'CATURL' => $cat_url, 'CATTITLE' => htmlspecialchars($structure['page'][$page_data['page_cat']]['title']), 'CATPATH' => $catpath, 'CATPATH_SHORT' => cot_rc_link($cat_url, htmlspecialchars($structure['page'][$page_data['page_cat']]['title'])), 'CATDESC' => htmlspecialchars($structure['page'][$page_data['page_cat']]['desc']), 'CATICON' => $structure['page'][$page_data['page_cat']]['icon'], 'KEYWORDS' => htmlspecialchars($page_data['page_keywords']), 'DESC' => htmlspecialchars($page_data['page_desc']), 'TEXT' => $text, 'TEXT_CUT' => $text_cut, 'TEXT_IS_CUT' => $cutted, 'DESC_OR_TEXT' => !empty($page_data['page_desc']) ? htmlspecialchars($page_data['page_desc']) : $text, 'MORE' => $cutted ? cot_rc('list_more', array('page_url' => $page_data['page_pageurl'])) : '', 'AUTHOR' => htmlspecialchars($page_data['page_author']), 'OWNERID' => $page_data['page_ownerid'], 'OWNERNAME' => htmlspecialchars($page_data['user_name']), 'DATE' => cot_date($date_format, $page_data['page_date']), 'BEGIN' => cot_date($date_format, $page_data['page_begin']), 'EXPIRE' => cot_date($date_format, $page_data['page_expire']), 'UPDATED' => cot_date($date_format, $page_data['page_updated']), 'DATE_STAMP' => $page_data['page_date'], 'BEGIN_STAMP' => $page_data['page_begin'], 'EXPIRE_STAMP' => $page_data['page_expire'], 'UPDATED_STAMP' => $page_data['page_updated'], 'FILE' => $cot_yesno[$page_data['page_file']], 'FILE_URL' => empty($page_data['page_url']) ? '' : cot_url('page', 'c=' . $page_data['page_cat'] . '&id=' . $page_data['page_id'] . '&a=dl'), 'FILE_SIZE' => $page_data['page_size'] / 1024, 'FILE_SIZE_BYTES' => $page_data['page_size'], 'FILE_SIZE_READABLE' => cot_build_filesize($page_data['page_size'], 1), 'FILE_ICON' => $page_data['page_fileicon'], 'FILE_COUNT' => $page_data['page_filecount'], 'FILE_COUNTTIMES' => cot_declension($page_data['page_filecount'], $Ls['Times']), 'FILE_NAME' => basename($page_data['page_url']), 'COUNT' => $page_data['page_count'], 'ADMIN' => $admin_rights ? cot_rc('list_row_admin', array('unvalidate_url' => $unvalidate_url, 'edit_url' => $edit_url)) : '', 'NOTAVAILABLE' => $page_data['page_begin'] > $sys['now'] ? $L['page_notavailable'] . cot_build_timegap($sys['now'], $pag['page_begin']) : '');
// Admin tags
if ($admin_rights) {
$validate_confirm_url = cot_confirm_url($validate_url, 'page', 'page_confirm_validate');
$unvalidate_confirm_url = cot_confirm_url($unvalidate_url, 'page', 'page_confirm_unvalidate');
$delete_confirm_url = cot_confirm_url($delete_url, 'page', 'page_confirm_delete');
$temp_array['ADMIN_EDIT'] = cot_rc_link($edit_url, $L['Edit']);
$temp_array['ADMIN_EDIT_URL'] = $edit_url;
$temp_array['ADMIN_UNVALIDATE'] = $page_data['page_state'] == 1 ? cot_rc_link($validate_confirm_url, $L['Validate'], 'class="confirmLink"') : cot_rc_link($unvalidate_confirm_url, $L['Putinvalidationqueue'], 'class="confirmLink"');
$temp_array['ADMIN_UNVALIDATE_URL'] = $page_data['page_state'] == 1 ? $validate_confirm_url : $unvalidate_confirm_url;
$temp_array['ADMIN_DELETE'] = cot_rc_link($delete_confirm_url, $L['Delete'], 'class="confirmLink"');
$temp_array['ADMIN_DELETE_URL'] = $delete_confirm_url;
} else {
if ($usr['id'] == $page_data['page_ownerid']) {
$temp_array['ADMIN_EDIT'] = cot_rc_link($edit_url, $L['Edit']);
$temp_array['ADMIN_EDIT_URL'] = $edit_url;
}
}
if (cot_auth('page', 'any', 'W')) {
$clone_url = cot_url('page', "m=add&c={$page_data['page_cat']}&clone={$page_data['page_id']}");
$temp_array['ADMIN_CLONE'] = cot_rc_link($clone_url, $L['page_clone']);
$temp_array['ADMIN_CLONE_URL'] = $clone_url;
}
// Extrafields
if (isset($cot_extrafields[$db_pages])) {
foreach ($cot_extrafields[$db_pages] as $exfld) {
$tag = mb_strtoupper($exfld['field_name']);
$temp_array[$tag . '_TITLE'] = isset($L['page_' . $exfld['field_name'] . '_title']) ? $L['page_' . $exfld['field_name'] . '_title'] : $exfld['field_description'];
$temp_array[$tag] = cot_build_extrafields_data('page', $exfld, $page_data['page_' . $exfld['field_name']], $page_data['page_parser']);
$temp_array[$tag . '_VALUE'] = $page_data['page_' . $exfld['field_name']];
}
}
// Extra fields for structure
if (isset($cot_extrafields[$db_structure])) {
//.........这里部分代码省略.........
示例8: cot_url
$title[] = !$id ? $L['pmsend_title'] : $L['Edit'] . ' #' . $id;
$url_newpm = cot_url('pm', 'm=send');
$url_inbox = cot_url('pm');
$url_sentbox = cot_url('pm', 'f=sentbox');
if (COT_AJAX) {
// Attach rich text editors to AJAX loaded page
$rc_tmp = $out['footer_rc'];
$out['footer_rc'] = '';
if (is_array($cot_plugins['editor'])) {
foreach ($cot_plugins['editor'] as $k) {
if ($k['pl_code'] == $editor && cot_auth('plug', $k['pl_code'], 'R')) {
include $cfg['plugins_dir'] . '/' . $k['pl_file'];
break;
}
}
}
$text_editor_code = $out['footer_rc'];
$out['footer_rc'] = $rc_tmp;
}
$t->assign(array('PMSEND_TITLE' => cot_breadcrumbs($title, $cfg['homebreadcrumb']), 'PMSEND_SENDNEWPM' => $usr['auth_write'] ? cot_rc_link($url_newpm, $L['pm_sendnew'], array('class' => $cfg['pm']['turnajax'] ? 'ajax' : '')) : '', 'PMSEND_SENDNEWPM_URL' => $usr['auth_write'] ? $url_newpm : '', 'PMSEND_INBOX' => cot_rc_link($url_inbox, $L['pm_inbox'], array('class' => $cfg['pm']['turnajax'] ? 'ajax' : '')), 'PMSEND_INBOX_URL' => $url_inbox, 'PMSEND_INBOX_COUNT' => $totalinbox, 'PMSEND_SENTBOX' => cot_rc_link($url_sentbox, $L['pm_sentbox'], array('class' => $cfg['pm']['turnajax'] ? 'ajax' : '')), 'PMSEND_SENTBOX_URL' => $url_sentbox, 'PMSEND_SENTBOX_COUNT' => $totalsentbox, 'PMSEND_FORM_SEND' => cot_url('pm', 'm=send&a=send' . $idurl), 'PMSEND_FORM_TITLE' => cot_inputbox('text', 'newpmtitle', htmlspecialchars($newpmtitle), 'size="56" maxlength="255"'), 'PMSEND_FORM_TEXT' => cot_textarea('newpmtext', $newpmtext, 8, 56, '', 'input_textarea_editor') . $text_editor_code, 'PMSEND_FORM_TOUSER' => cot_textarea('newpmrecipient', $touser, 3, 56, 'class="userinput"'), 'PMSEND_FORM_NOT_TO_SENTBOX' => cot_checkbox(false, 'fromstate', cot::$L['pm_notmovetosentbox'], '', '3')));
/* === Hook === */
foreach (cot_getextplugins('pm.send.tags') as $pl) {
include $pl;
}
/* ===== */
if (!$id) {
$t->parse('MAIN.PMSEND_USERLIST');
}
$t->parse('MAIN');
$t->out('MAIN');
require_once $cfg['system_dir'] . '/footer.php';
示例9: defined
<?php
/* ====================
[BEGIN_COT_EXT]
Hooks=search.page.loop
[END_COT_EXT]
==================== */
/**
* Displays translated pages in search results
*
* @package I18n
* @copyright (c) Cotonti Team
* @license https://github.com/Cotonti/Cotonti/blob/master/License.txt
*/
defined('COT_CODE') or die('Wrong URL');
if (!empty($row['ipage_title'])) {
$page_url = empty($row['page_alias']) ? cot_url('page', 'c=' . $row['page_cat'] . '&id=' . $row['page_id'] . '&l=' . $row['ipage_locale'] . '&highlight=' . $hl) : cot_url('page', 'c=' . $row['page_cat'] . '&al=' . $row['page_alias'] . '&l=' . $row['ipage_locale'] . '&highlight=' . $hl);
$t->assign(array('PLUGIN_PR_CATEGORY' => cot_breadcrumbs(cot_i18n_build_catpath('page', $row['page_cat'], $row['ipage_locale']), false), 'PLUGIN_PR_TITLE' => cot_rc_link($page_url, htmlspecialchars($row['ipage_title'])), 'PLUGIN_PR_TEXT' => cot_clear_mark($row['ipage_text'], $words), 'PLUGIN_PR_TIME' => cot_date('datetime_medium', $row['ipage_date']), 'PLUGIN_PR_TIMESTAMP' => $row['ipage_date']));
}
示例10: foreach
$jj = 0;
foreach ($sql_rowset as $pag) {
$jj++;
$url = cot_url('index', 'c=' . $pag['page_cat']);
$news->assign(cot_generate_pagetags($pag, 'PAGE_ROW_', $v[2]));
$news->assign(array('PAGE_ROW_NEWSPATH' => cot_rc_link($url, htmlspecialchars($structure['page'][$row['page_cat']]['title'])), 'PAGE_ROW_NEWSPATH_URL' => $url, 'PAGE_ROW_CATDESC' => htmlspecialchars($structure['page'][$pag['page_cat']]['desc']), 'PAGE_ROW_OWNER' => cot_build_user($pag['page_ownerid'], htmlspecialchars($pag['user_name'])), 'PAGE_ROW_ODDEVEN' => cot_build_oddeven($jj), 'PAGE_ROW_NUM' => $jj));
$news->assign(cot_generate_usertags($pag, 'PAGE_ROW_OWNER_'));
/* === Hook - Part2 : Include === LOOP === */
foreach ($news_extp as $pl) {
include $pl;
}
/* ===== */
$news->parse('NEWS.PAGE_ROW');
}
$url_newpage = cot_url('page', 'm=add&c=' . $cat);
$news->assign(array('PAGE_PAGENAV' => $pagenav['main'], 'PAGE_PAGEPREV' => $pagenav['prev'], 'PAGE_PAGENEXT' => $pagenav['next'], 'PAGE_PAGELAST' => $pagenav['last'], 'PAGE_PAGENUM' => $pagenav['current'], 'PAGE_PAGECOUNT' => $pagenav['total'], 'PAGE_ENTRIES_ONPAGE' => $pagenav['onpage'], 'PAGE_ENTRIES_TOTAL' => $pagenav['entries'], 'PAGE_SUBMITNEWPOST' => cot_auth('page', $cat, 'W') ? cot_rc_link($url_newpage, $L['Submitnew']) : '', 'PAGE_SUBMITNEWPOST_URL' => cot_auth('page', $cat, 'W') ? $url_newpage : '', 'PAGE_CATTITLE' => $structure['page'][$cat]['title'], 'PAGE_CATPATH' => cot_breadcrumbs(cot_structure_buildpath('page', $cat), false), 'PAGE_CAT' => $cat));
/* === Hook - Part2 : Include === TAGS === */
foreach ($news_tags_extp as $pl) {
include $pl;
}
/* ===== */
$news->parse('NEWS');
$news_html = $news->text('NEWS');
// Cache for guests
if ($usr['id'] == 0 && $cache && (int) $cfg['plugin']['news']['cache_ttl'] > 0) {
$cache->disk->store($news_cache_id, $news_html, 'news');
}
$t->assign($catn == 0 ? 'INDEX_NEWS' : 'INDEX_NEWS_' . $tagname, $news_html);
$catn++;
}
}
示例11: indexAction
public function indexAction()
{
Resources::linkFileFooter(cot::$cfg['modules_dir'] . '/advboard/js/advboard.compare.js');
$sort = cot_import('s', 'G', 'ALP');
// order field name
$way = cot_import('w', 'G', 'ALP', 4);
// order way (asc, desc)
//$maxrowsperpage = cot::$cfg['advboard']['cat___default']['maxrowsperpage'];
$maxrowsperpage = 0;
/* === Hook === */
foreach (cot_getextplugins('advboard.compare.first') as $pl) {
include $pl;
}
/* ===== */
$sort = empty($sort) ? cot::$cfg['advboard']['cat___default']['order'] : $sort;
$way = empty($way) || !in_array($way, array('asc', 'desc')) ? cot::$cfg['advboard']['cat___default']['way'] : $way;
$canonicalUrlParams = array('m' => 'compare');
$where = array();
if (!empty($_SESSION['advboard_compare']) && !empty($_SESSION['advboard_compare'][cot::$sys['site_id']])) {
$where['id'] = array('id', array_keys($_SESSION['advboard_compare'][cot::$sys['site_id']]));
$where['state'] = array('state', advboard_model_Advert::PUBLISHED);
$where['begin'] = array('begin', cot::$sys['now'], '<=');
$where['expire'] = array('SQL', "expire = 0 OR expire > " . cot::$sys['now']);
}
$template = array('advboard', 'compare');
cot::$out['subtitle'] = cot::$L['advboard_compare'];
// Building the canonical URL
cot::$out['canonical_uri'] = cot_url('advboard', $canonicalUrlParams);
$condition = array();
foreach ($where as $key => $val) {
$condition[] = $val;
}
$order = array(array('sticky', 'desc'), array($sort, $way));
/* === Hook === */
foreach (cot_getextplugins('advboard.compare.query') as $pl) {
include $pl;
}
/* ===== */
$advertisement = null;
$totallines = 0;
if (!empty($condition)) {
$totallines = advboard_model_Advert::count($condition);
if ($totallines > 0) {
$advertisement = advboard_model_Advert::find($condition, $maxrowsperpage, 0, $order);
}
}
/* === Hook === */
foreach (cot_getextplugins('advboard.compare.main') as $pl) {
include $pl;
}
/* ===== */
$crumbs = array();
if (cot::$cfg['advboard']['firstCrumb']) {
$crumbs[] = array(cot_url('advboard'), cot::$L['advboard_ads']);
}
$crumbs[] = array(cot_url('advboard', array('m' => 'compare')), cot::$L['advboard_compare']);
$breadcrumbs = '';
if (!empty($crumbs)) {
$breadcrumbs = cot_breadcrumbs($crumbs, cot::$cfg['homebreadcrumb'], true);
}
// $pageUrlParams = $urlParams;
// if($durl > 1) $pageUrlParams['d'] = $durl;
$view = new View();
$view->breadcrumbs = $breadcrumbs;
$view->page_title = htmlspecialchars(cot::$L['advboard_compare']);
$view->advertisement = $advertisement;
$view->totalitems = $totallines;
// $view->urlParams = $urlParams;
// $view->pageUrlParams = $pageUrlParams;
/* === Hook === */
foreach (cot_getextplugins('advboard.compare.view') as $pl) {
include $pl;
}
/* ===== */
return $view->render($template);
}
示例12: count
}
$cot_act[$parents[0]] += $cot_sections_act[$i];
}
}
$secact_max = count($cot_act) > 0 ? max($cot_act) : 0;
$out['subtitle'] = $L['Forums'];
/* === Hook === */
foreach (cot_getextplugins('forums.sections.main') as $pl) {
include $pl;
}
/* ===== */
require_once $cfg['system_dir'] . '/header.php';
$t = new XTemplate(cot_tplfile('forums.sections'));
$url_markall = cot_url('forums', "n=markall");
$title[] = array(cot_url('forums'), $L['Forums']);
$t->assign(array('FORUMS_RSS' => cot_url('rss', 'm=forums'), 'FORUMS_SECTIONS_PAGETITLE' => cot_breadcrumbs($title, $cfg['homebreadcrumb']), 'FORUMS_SECTIONS_MARKALL' => $usr['id'] > 0 ? cot_rc_link($url_markall, $L['forums_markallasread']) : '', 'FORUMS_SECTIONS_MARKALL_URL' => $usr['id'] > 0 ? $url_markall : ''));
$xx = 0;
/* === Hook - Part1 : Set === */
$extp = cot_getextplugins('forums.sections.loop');
/* ===== */
/* === Hook - Part1 : Set === */
$extps = cot_getextplugins('forums.sections.loop.sections');
/* ===== */
/* === Hook - Part1 : Set === */
$extpss = cot_getextplugins('forums.sections.loop.subsections');
/* ===== */
foreach ($fstlvl as $x) {
if (is_array($nxtlvl[$x])) {
$yy = 0;
foreach ($nxtlvl[$x] as $y) {
if (is_array($nxtlvl[$y]) && $cfg['forums']['cat_' . $y]['defstate']) {
示例13: editAction
//.........这里部分代码省略.........
// email
if (!$user['user_hideemail']) {
$placeHolder_Email = $user['user_email'];
}
// город
if (!empty($user['user_city_name'])) {
$placeHolder_City = $user['user_city_name'];
}
}
// 'input_textarea_editor', 'input_textarea_medieditor', 'input_textarea_minieditor', ''
$editor = 'input_textarea_editor';
/* === Hook === */
foreach (cot_getextplugins('advboard.edit.main') as $pl) {
include $pl;
}
/* ===== */
$minYear = date('Y');
$maxYear = $minYear + 30;
$price = $advert->rawValue('price');
if ($price <= 0) {
$price = '';
}
$formElements = array('hidden' => array('element' => cot_inputbox('hidden', 'act', 'save')), 'category' => array('element' => cot_selectbox_structure('advboard', $advert->category, 'category'), 'label' => advboard_model_Advert::fieldLabel('category')), 'price' => array('element' => cot_inputbox('text', 'price', $price), 'label' => advboard_model_Advert::fieldLabel('price'), 'hint' => cot::$L['advboard_price_hint']), 'title' => array('element' => cot_inputbox('text', 'title', $advert->rawValue('title')), 'required' => true, 'label' => advboard_model_Advert::fieldLabel('title')), 'description' => array('element' => cot_inputbox('text', 'description', $advert->rawValue('description')), 'label' => advboard_model_Advert::fieldLabel('description')), 'text' => array('element' => cot_textarea('text', $advert->rawValue('text'), 5, 120, '', $editor), 'label' => advboard_model_Advert::fieldLabel('text')), 'person' => array('element' => cot_inputbox('text', 'person', $advert->rawValue('person'), array('class' => 'form-control', 'placeholder' => $placeHolder_Person)), 'label' => advboard_model_Advert::fieldLabel('person'), 'required' => cot::$usr['id'] == 0), 'email' => array('element' => cot_inputbox('text', 'email', $advert->rawValue('email'), array('class' => 'form-control', 'placeholder' => $placeHolder_Email)), 'label' => advboard_model_Advert::fieldLabel('email')), 'city' => array('element' => cot_inputbox('text', 'city_name', $advert->rawValue('city_name'), array('class' => 'form-control', 'placeholder' => $placeHolder_City)), 'label' => advboard_model_Advert::fieldLabel('city_name'), 'required' => $category['config']['city_require']), 'phone' => array('element' => cot_inputbox('text', 'phone', $advert->rawValue('phone'), array('class' => 'form-control', 'placeholder' => $placeHolder_Phone)), 'label' => advboard_model_Advert::fieldLabel('phone'), 'required' => $category['config']['phone_require']), 'sticky' => array('element' => cot_checkbox($advert->sticky, 'sticky', advboard_model_Advert::fieldLabel('sticky')), 'label' => advboard_model_Advert::fieldLabel('sticky')), 'published' => array('element' => cot_checkbox($published, 'published', cot::$L['advboard_published'] . '?'), 'label' => cot::$L['advboard_published'] . '?'), 'begin' => array('element' => cot_selectbox_date($advert->begin, 'long', 'begin', $maxYear, $minYear), 'label' => advboard_model_Advert::fieldLabel('begin')), 'expire' => array('element' => cot_selectbox_date($advert->expire, 'long', 'expire', $maxYear, $minYear), 'label' => advboard_model_Advert::fieldLabel('expire')), 'sort' => array('element' => cot_selectbox_date($advert->sort, 'long', 'sort', $maxYear, $minYear), 'label' => advboard_model_Advert::fieldLabel('sort')), 'period' => array('element' => cot_selectbox('', 'period', $periodItems, array(), false), 'label' => cot::$L['advboard_period']));
if (!empty($cot_extrafields[cot::$db->advboard])) {
// Extra fields for ads
foreach ($cot_extrafields[cot::$db->advboard] as $exfld) {
$fName = $exfld['field_name'];
$formElements[$fName] = array('element' => cot_build_extrafields($fName, $exfld, $advert->rawValue($fName)));
if ($exfld['field_type'] !== 'checkbox') {
$formElements[$fName]['label'] = isset(cot::$L['advboard_' . $exfld['field_name'] . '_title']) ? cot::$L['advboard_' . $exfld['field_name'] . '_title'] : advboard_model_Advert::fieldLabel($fName);
}
}
}
if (cot_plugin_active('regioncity')) {
$formElements['city']['element'] = rec_select2_city('city', $advert->rawValue('city'), true, array('class' => 'form-control', 'placeholder' => $placeHolder_City));
}
if ($category['config']['city_require']) {
$formElements['city']['required'] = true;
}
if ($category['config']['phone_require']) {
$formElements['phone']['required'] = true;
}
// Hints
if (!empty($user)) {
// Контакное лицо
$formElements['person']['hint'] = cot::$L['advboard_leave_empty_to_use'] . ": " . cot_user_full_name($user);
// Телефон
if (!empty($user['user_phone'])) {
$formElements['phone']['hint'] = cot::$L['advboard_leave_empty_to_use'] . ": " . $user['user_phone'];
}
// email
if (!$user['user_hideemail']) {
$formElements['email']['hint'] = cot::$L['advboard_leave_empty_to_use'] . ": " . $user['user_email'];
}
// город
if (!empty($user['user_city_name'])) {
$formElements['city']['hint'] = cot::$L['advboard_leave_empty_to_use'] . ": " . $user['user_city_name'];
}
}
if (!cot::$usr['isadmin']) {
unset($formElements['begin']);
unset($formElements['expire']);
unset($formElements['sort']);
if (cot::$usr['id'] == 0) {
if (cot::$cfg['advboard']['guestEmailRequire']) {
$formElements['email']['required'] = true;
}
// Гости не дают срочных объявлений
unset($formElements['sticky']);
// Капча
if (cot::$cfg['advboard']['guestUseCaptcha']) {
$formElements['verify'] = array('element' => cot_inputbox('text', 'verify'), 'img' => cot_captcha_generate(), 'label' => cot::$L['advboard_captcha'], 'required' => true);
}
}
if (!cot::$cfg['advboard']['cat_' . $c]['allowSticky'] && isset($formElements['sticky'])) {
unset($formElements['sticky']);
}
} else {
// Администратор напрямую указывает дату окончания публикации
unset($formElements['period']);
}
$actionParams = array('a' => 'edit', 'c' => $advert->category);
if ($advert->id > 0) {
$actionParams['id'] = $advert->id;
}
$view = new View();
$view->breadcrumbs = cot_breadcrumbs($crumbs, cot::$cfg['homebreadcrumb'], true);
$view->page_title = $title;
$view->category = $category;
$view->advert = $advert;
$view->user = $user;
$view->formElements = $formElements;
$view->formAction = cot_url('advboard', $actionParams);
/* === Hook === */
foreach (cot_getextplugins('advboard.edit.view') as $pl) {
include $pl;
}
/* ===== */
return $view->render(array('advboard', 'edit', $structure['advboard'][$c]['tpl']));
}
示例14: cot_die_message
if ($empty) {
cot_die_message(907, TRUE);
}
if (empty($out['subtitle'])) {
if (empty($L['plu_title'])) {
$L['plu_title'] = $L[$extname . '_title'];
}
$out['subtitle'] = empty($L['plu_title']) ? $out['plu_title'] : $L['plu_title'];
}
$sys['sublocation'] = $out['subtitle'];
if ($ext_display_header) {
$t_plug = $t;
require_once $cfg['system_dir'] . '/header.php';
$t = $t_plug;
}
if ($autoassigntags) {
array_unshift($pltitle, array(cot_url('plug', "e={$e}"), $out['subtitle']));
if (empty($o)) {
$t->assign(array('PLUGIN_TITLE' => cot_breadcrumbs($pltitle, $cfg['homebreadcrumb']), 'PLUGIN_SUBTITLE' => $plugin_subtitle, 'PLUGIN_BODY' => $plugin_body));
} else {
cot_sendheaders();
$t->assign(array('POPUP_C1' => $c1, 'POPUP_C2' => $c2, 'POPUP_BODY' => $popup_body));
}
}
if (is_object($t)) {
$t->parse('MAIN');
$t->out('MAIN');
}
if ($ext_display_header) {
require_once $cfg['system_dir'] . '/footer.php';
}
示例15: foreach
/* === Hook === */
foreach (cot_getextplugins('sbr.list.first') as $pl) {
include $pl;
}
/* ===== */
$out['subtitle'] = $L['sbr_mydeals'];
$out['head'] .= $R['code_noindex'];
$mskin = cot_tplfile(array('sbr', 'list', $status), 'plug');
/* === Hook === */
foreach (cot_getextplugins('sbr.list.main') as $pl) {
include $pl;
}
/* ===== */
$t = new XTemplate($mskin);
$patharray[] = array(cot_url('sbr'), $L['sbr']);
$t->assign(array('SBR_TITLE' => cot_breadcrumbs($patharray, $cfg['homebreadcrumb'], true), 'SBR_COUNTERS' => cot_sbr_counters()));
$where = array();
$order = array();
if (!empty($status)) {
$where['status'] = "sbr_status='" . $db->prep($status) . "'";
}
$where['userid'] = "(sbr_employer=" . $usr['id'] . " OR sbr_performer=" . $usr['id'] . ")";
$order['date'] = "sbr_create DESC";
/* === Hook === */
foreach (cot_getextplugins('sbr.list.query') as $pl) {
include $pl;
}
/* ===== */
$where = $where ? 'WHERE ' . implode(' AND ', $where) : '';
$order = $order ? 'ORDER BY ' . implode(', ', $order) : '';
$totalitems = $db->query("SELECT COUNT(*) FROM {$db_sbr} \n\t" . $where . "")->fetchColumn();