本文整理汇总了PHP中add_breadcrumb函数的典型用法代码示例。如果您正苦于以下问题:PHP add_breadcrumb函数的具体用法?PHP add_breadcrumb怎么用?PHP add_breadcrumb使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了add_breadcrumb函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: schedules
public function schedules()
{
$breadcrumb = array("name" => '<span class="glyphicon glyphicon-time"></span> Class Schedules', "url" => "dashboard/schedules", "status" => true);
add_breadcrumb($breadcrumb);
set_active("dschedules", true);
$this->dashboard_view();
}
示例2: __construct
public function __construct()
{
global $aidlink, $locale;
$_POST['page_id'] = isset($_POST['page_id']) && isnum($_POST['page_id']) ? $_POST['page_id'] : 0;
$_GET['status'] = isset($_GET['status']) ? $_GET['status'] : '';
$_GET['action'] = isset($_GET['action']) ? $_GET['action'] : '';
$title = '';
switch ($_GET['action']) {
case 'edit':
fusion_confirm_exit();
$this->data = self::load_customPage($_GET['cpid']);
if (empty($this->data)) {
redirect(FUSION_SELF . $aidlink);
}
opentable($locale['401']);
break;
case 'delete':
self::delete_customPage($_GET['cpid']);
break;
default:
opentable($locale['400']);
}
self::customPage_selector();
add_breadcrumb(array('link' => ADMIN . 'custom_pages.php' . $aidlink, 'title' => $locale['403']));
$this->data = self::set_customPage($this->data);
if (isset($_POST['cancel'])) {
redirect(FUSION_SELF . $aidlink);
}
}
示例3: automedia_usercp
function automedia_usercp()
{
global $header, $headerinclude, $usercpnav, $footer, $mybb, $theme, $db, $lang, $templates;
$av_checked_yes = ' checked="checked"';
$av_checked_no = '';
if (!isset($lang->av_ucp_yes)) {
$lang->load("automedia");
}
if ($mybb->input['action'] == "userautomedia") {
if ($mybb->user['automedia_use'] != 'Y') {
$av_checked_yes = '';
$av_checked_no = ' checked="checked"';
}
add_breadcrumb($lang->nav_usercp, "usercp.php");
add_breadcrumb("AutoMedia");
$ucpset = @automedia_ucp_status();
eval("\$automedia_ucp = \"" . $templates->get("automedia_usercp") . "\";");
output_page($automedia_ucp);
} elseif ($mybb->input['action'] == "do_automedia" && $mybb->request_method == "post") {
$uid = (int) $mybb->user['uid'];
$updated_record = array("automedia_use" => $db->escape_string($mybb->input['automedia']));
if ($db->update_query('users', $updated_record, "uid='" . $uid . "'")) {
redirect("usercp.php?action=userautomedia", $lang->av_ucp_submit_success);
}
} else {
return;
}
}
示例4: __construct
/**
* Sanitization Globals Vars
*/
public function __construct()
{
global $aidlink, $locale;
$this->data['panel_languages'] = LANGUAGE;
$this->data['panel_content'] = stripslashes($this->data['panel_content']);
$_GET['panel_side'] = isset($_GET['panel_side']) && in_array($_GET['panel_side'], array_flip(self::get_panel_grid())) ? $_GET['panel_side'] : 0;
$_GET['action'] = isset($_GET['action']) ? $_GET['action'] : '';
$_GET['status'] = isset($_GET['status']) ? $_GET['status'] : '';
$_GET['panel_status'] = isset($_GET['panel_status']) ? $_GET['panel_status'] : 0;
$this->panel_data = self::load_all_panels();
switch ($_GET['action']) {
case 'edit':
if (isset($_GET['panel_id'])) {
$this->data = self::load_panel($_GET['panel_id']);
$this->formaction = FUSION_SELF . $aidlink . "&section=panelform&action=edit&panel_id=" . $_GET['panel_id'];
} else {
redirect(FUSION_SELF . $aidlink);
}
break;
case 'setstatus':
self::set_panel_status();
break;
case 'delete':
self::delete_panel($_GET['panel_id']);
break;
default:
$this->formaction = FUSION_SELF . $aidlink . "&section=panelform";
}
add_breadcrumb(array('link' => FUSION_SELF . $aidlink, 'title' => $locale['600']));
self::set_paneldb();
}
示例5: build_threadlog
/**
Threadlog functionality - build!
**/
function build_threadlog($uid)
{
global $mybb, $db, $templates, $theme, $lang, $header, $headerinclude, $footer, $threadlog_list;
$threadlog = new Threadlog($db, $uid);
//Define Variables
$user = $threadlog->get_user();
$threads = $threadlog->get_threads();
//Add breadcrubs
add_breadcrumb($user['username'] . '\'s Profile', "member.php?action=profile&uid=" . $user['uid']);
add_breadcrumb($user['username'] . '\'s Threadlog', "misc.php?action=threadlog");
// set up the pager
$multipage = setup_threadlog_pages($uid, $threads, $start);
// setup thread counts
$active_count = count($threadlog->get_active());
$closed_count = count($threadlog->get_closed());
$reply_count = count($threadlog->get_need_reply());
$total_count = count($threads);
// Print out the rows!
$rowiterator = 0;
if ($total_count < 1) {
eval("\$threadlog_list .= \"" . $templates->get("rpgthreadlog_nothreads") . "\";");
}
$threads = array_slice($threads, $start, $mybb->settings['rpgsuite_threadlog_perpage']);
foreach ($threads as $thread) {
$participants = $threadlog->get_thread_participants($thread['tid']);
$notes = $threadlog->get_thread_notes($thread['tid']);
setup_threadlog_row($user, $thread, $participants, $notes, $rowiterator);
$rowiterator++;
}
eval("\$threadlog_page = \"" . $templates->get("rpgthreadlog_page") . "\";");
output_page($threadlog_page);
exit;
}
示例6: load_groupcp
function load_groupcp()
{
global $mybb, $db, $cache, $templates, $title, $header, $headerinclude, $footer, $theme, $group;
if ($mybb->settings['rpgsuite_groupmanagecp'] && $mybb->input['action'] == "managegroup") {
// Get group id
if ($mybb->input['gid'] && $mybb->usergroup['issupermod']) {
$gid = intval($mybb->input['gid']);
$groupnav = '&gid=' . $gid;
} else {
$gid = $mybb->user['displaygroup'];
$groupnav = '';
}
$cpcontent = "";
if ($mybb->settings['rpgsuite_groupranks_custom']) {
$customranklink = '<a href="modcp.php?action=managegroup§ion=customranks' . $groupnav . '">Manage Custom Ranks</a>';
} else {
$customranklink = '';
}
$usergroup = new UserGroup($mybb, $db, $cache);
if ($usergroup->initialize($gid)) {
$group = $usergroup->get_info();
if (handle_form($usergroup)) {
$url = "modcp.php?action=managegroup&gid=" . $gid;
if ($mybb->input['section']) {
$url .= "§ion=" . $mybb->input['section'];
}
redirect($url, "Your pack settings were successfully updated.");
}
if ($mybb->input['section'] == 'groupoptions') {
$title = 'Manage Options';
add_breadcrumb('Manage Options');
$cpcontent = load_groupmod_options($usergroup);
} else {
if ($mybb->input['section'] == 'groupmembers') {
$title = 'Manage Members';
add_breadcrumb('Manage Members');
$cpcontent = load_groupmod_members($usergroup);
} else {
if ($mybb->input['section'] == 'customranks' && $mybb->settings['rpgsuite_groupranks_custom']) {
$ttile = 'Manage Custom Ranks';
add_breadcrumb('Manage Custom Ranks');
$cpcontent = load_groupmod_customranks($usergroup);
} else {
$title = 'Manage Ranks';
add_breadcrumb('Manage Ranks');
$cpcontent = load_groupmod_ranks($usergroup);
}
}
}
// Add group styling
eval("\$headerinclude .= \"" . $templates->get('rpgmisc_groupstyle') . "\";");
} else {
$cpcontent = "Invalid Group";
}
eval("\$groupmanagecp = \"" . $templates->get('rpggroupmanagecp_full') . "\";");
output_page($groupmanagecp);
exit;
}
}
示例7: __construct
public function __construct()
{
global $admin_pages, $aidlink;
$this->admin_pages = $admin_pages;
$this->locale = fusion_get_locale('', LOCALE . LOCALESET . "admin/main.php");
$this->admin_sections = array(0 => $GLOBALS['locale']['ac00'], 1 => $GLOBALS['locale']['ac01'], 2 => $GLOBALS['locale']['ac02'], 3 => $GLOBALS['locale']['ac03'], 4 => $GLOBALS['locale']['ac04'], 5 => $GLOBALS['locale']['ac05']);
$this->current_page = self::_currentPage();
// Dashboard breadcrumb
add_breadcrumb(array('link' => ADMIN . 'index.php' . $aidlink . '&pagenum=0', 'title' => $GLOBALS['locale']['ac10']));
$acTab = isset($_GET['pagenum']) && isnum($_GET['pagenum']) ? $_GET['pagenum'] : $this->_isActive();
if ($acTab != 0 && $acTab <= 5) {
add_breadcrumb(array('link' => ADMIN . $aidlink . "&pagenum=" . $acTab, 'title' => $GLOBALS['locale']['ac0' . $acTab]));
}
}
示例8: __construct
public function __construct()
{
global $locale, $admin_pages, $aidlink;
@(list($title) = dbarraynum(dbquery("SELECT admin_title FROM " . DB_ADMIN . " WHERE admin_link='" . FUSION_SELF . "'")));
set_title($locale['global_123'] . $locale['global_201'] . ($title ? $title . $locale['global_200'] : ""));
$this->admin_pages = $admin_pages;
// generate core sections
$this->admin_sections = array(0 => $locale['ac00'], 1 => $locale['ac01'], 2 => $locale['ac02'], 3 => $locale['ac03'], 4 => $locale['ac04'], 5 => $locale['ac05']);
$this->current_page = self::_currentPage();
// Dashboard breadcrumb
add_breadcrumb(array('link' => ADMIN . 'index.php' . $aidlink . '&pagenum=0', 'title' => $locale['ac10']));
$activetab = isset($_GET['pagenum']) && isnum($_GET['pagenum']) ? $_GET['pagenum'] : $this->_isActive();
if ($activetab != 0 && $activetab <= 5) {
add_breadcrumb(array('link' => ADMIN . $aidlink . "&pagenum=" . $activetab, 'title' => $locale['ac0' . $activetab]));
}
}
示例9: viewranks_init
function viewranks_init()
{
global $mybb, $db, $cache, $templates, $header, $footer, $headerinclude, $title, $theme, $parser;
if ($mybb->settings['rpgsuite_groupranks'] && $mybb->input['action'] == "showranks") {
// Get group id
if ($mybb->input['gid'] != '') {
$gid = intval($mybb->input['gid']);
} else {
$gid = $mybb->user['displaygroup'];
}
$usergroup = new UserGroup($mybb, $db, $cache);
if ($usergroup->initialize($gid)) {
$group = $usergroup->get_info();
// Add Group Styling
eval("\$headerinclude .= \"" . $templates->get('rpgmisc_groupstyle') . "\";");
if ($group['hasranks']) {
$title = $group['title'] . " Ranks";
if ($group['fid']) {
add_breadcrumb($group['title'] . ' Forum', 'forumdisplay.php?fid=' . (int) $group['fid']);
}
add_breadcrumb($group['title'] . ' Ranks');
$tierlist = build_ranks($usergroup);
$unrankedlist = build_unranked($usergroup);
eval("\$rankpage = \"" . $templates->get('rpggroupview_ranks_full') . "\";");
output_page($rankpage);
} else {
$title = $group['title'] . " Members";
if ($group['fid']) {
add_breadcrumb($group['title'] . ' Forum', 'forumdisplay.php?fid=' . (int) $group['fid']);
}
add_breadcrumb($group['title'] . ' Members');
// set up the pager
$multipage = setup_viewgroup_pages($group['gid'], $usergroup->get_member_count(), $start);
$memberlist = build_members($usergroup, $start);
eval("\$memberpage = \"" . $templates->get('rpggroupview_noranks_full') . "\";");
output_page($memberpage);
}
exit;
}
}
}
示例10: viewTagsAdmin
/**
* Admin interface
*/
public function viewTagsAdmin()
{
global $aidlink;
pageAccess('F');
add_breadcrumb(array('link' => INFUSIONS . 'forum/admin/forums.php' . $aidlink . '§ion=ft', 'title' => self::$locale['forum_tag_0100']));
echo "<div class='well'>" . self::$locale['forum_tag_0101'] . "</div>\n";
$tab['title'][] = self::$locale['forum_tag_0102'];
$tab['id'][] = "tag_list";
$tab['icon'][] = "";
$tab['title'][] = isset($_GET['tag_id']) && isnum($_GET['tag_id']) ? self::$locale['forum_tag_0104'] : self::$locale['forum_tag_0103'];
$tab['id'][] = "tag_form";
$tab['icon'][] = "";
$_GET['ref'] = isset($_GET['ref']) && in_array($_GET['ref'], $tab['id']) ? $_GET['ref'] : "tag_list";
echo opentab($tab, $_GET['ref'], "rank_admin", TRUE, "m-t-10", "ref");
switch ($_GET['ref']) {
case "tag_form":
echo $this->displayTagForm();
break;
case "tag_list":
echo $this->displayTagList();
}
echo closetab();
}
示例11: viewRanksAdmin
public function viewRanksAdmin()
{
global $aidlink;
pageAccess('FR');
add_breadcrumb(array('link' => INFUSIONS . 'forum/admin/forums.php' . $aidlink . '§ion=fr', 'title' => self::$locale['404']));
$forum_settings = $this->get_forum_settings();
echo "<div class='well'>" . self::$locale['forum_rank_0100'] . "</div>\n";
if ($forum_settings['forum_ranks']) {
$tab['title'][] = self::$locale['402'];
$tab['id'][] = "rank_list";
$tab['icon'][] = "";
$tab['title'][] = isset($_GET['rank_id']) && isnum($_GET['rank_id']) ? self::$locale['401'] : self::$locale['400'];
$tab['id'][] = "rank_form";
$tab['icon'][] = "";
$_GET['ref'] = isset($_GET['ref']) && in_array($_GET['ref'], $tab['id']) ? $_GET['ref'] : "rank_list";
echo opentab($tab, $_GET['ref'], "rank_admin", TRUE, "m-t-10", "ref");
switch ($_GET['ref']) {
case "rank_form":
// @todo: improvise rank from ui
echo $this->displayRanksForm();
break;
case "rank_list":
echo $this->displayRankList();
}
echo closetab();
} else {
opentable(self::$locale['403']);
?>
<div class="well text-center">
<?php
echo sprintf(self::$locale['450'], "<a href='" . FUSION_SELF . $aidlink . "§ion=fs'>" . self::$locale['451'] . "</a>");
?>
</div>
<?php
closetable();
}
}
示例12: viewMoodAdmin
public function viewMoodAdmin()
{
global $aidlink;
pageAccess('FR');
add_breadcrumb(array('link' => INFUSIONS . 'forum/admin/forums.php' . $aidlink . '§ion=fmd', 'title' => self::$locale['forum_admin_004']));
echo "<div class='well'>" . self::$locale['forum_090'] . "</div>\n";
$tab['title'][] = self::$locale['forum_093'];
$tab['id'][] = "mood_list";
$tab['icon'][] = "";
$tab['title'][] = isset($_GET['mood_id']) && isnum($_GET['mood_id']) ? self::$locale['forum_092'] : self::$locale['forum_091'];
$tab['id'][] = "mood_form";
$tab['icon'][] = "";
$_GET['ref'] = isset($_GET['ref']) && in_array($_GET['ref'], $tab['id']) ? $_GET['ref'] : "mood_list";
echo opentab($tab, $_GET['ref'], "mood_admin", TRUE, "m-t-10", "ref");
switch ($_GET['ref']) {
case "mood_form":
$this->displayMoodForm();
break;
case "mood_list":
$this->displayMoodList();
break;
}
echo closetab();
}
示例13: set_TagInfo
/**
* Fetches all Forum Tag Table records
*
* @param bool|TRUE $setTitle
*/
public function set_TagInfo($setTitle = TRUE)
{
$locale = fusion_get_locale("", FORUM_LOCALE);
$locale += fusion_get_locale("", FORUM_TAGS_LOCALE);
if ($setTitle == TRUE) {
set_title($locale['forum_0000']);
add_to_title($locale['global_201'] . $locale['forum_tag_0100']);
add_breadcrumb(array('link' => FORUM . "index.php", 'title' => $locale['forum_0000']));
add_breadcrumb(array('link' => FORUM . "tags.php", 'title' => $locale['forum_tag_0100']));
}
$thread_result = NULL;
if (isset($_GET['tag_id']) && isnum($_GET['tag_id'])) {
$tag_query = "SELECT * FROM " . DB_FORUM_TAGS . " WHERE tag_status=1 AND tag_id='" . intval($_GET['tag_id']) . "'\n " . (multilang_table("FO") ? "AND tag_language='" . LANGUAGE . "'" : "") . "\n ";
$tag_result = dbquery($tag_query);
if (dbrows($tag_result) > 0) {
$data = dbarray($tag_result);
add_to_title($locale['global_201'] . $data['tag_title']);
add_breadcrumb(array('link' => FORUM . "tags.php?tag_id=" . $data['tag_id'], 'title' => $data['tag_title']));
if (!empty($data['tag_description'])) {
set_meta('description', $data['tag_description']);
}
$data['tag_link'] = FORUM . "tags.php?tag_id=" . $data['tag_id'];
$data['tag_active'] = isset($_GET['viewtags']) && isset($_GET['tag_id']) && $_GET['tag_id'] == $data['tag_id'] ? TRUE : FALSE;
$this->tag_info['tags'][$data['tag_id']] = $data;
$this->tag_info['tags'][0] = array('tag_id' => 0, 'tag_link' => FORUM . "tags.php", 'tag_title' => fusion_get_locale("global_700") . "…", 'tag_active' => '', 'tag_color' => '');
$this->tag_info['filter'] = $this->filter()->get_FilterInfo();
$filter_sql = $this->filter()->get_filterSQL();
// get forum threads.
$this->tag_info = array_merge_recursive($this->tag_info, self::get_tag_thread($_GET['tag_id'], array("condition" => $filter_sql['condition'], "order" => $filter_sql['order'])));
} else {
redirect(FORUM . "index.php");
}
} else {
$this->cache_tags();
}
}
示例14: viewSettingsAdmin
public function viewSettingsAdmin()
{
global $aidlink;
pageAccess('F');
$forum_settings = $this->get_forum_settings();
add_breadcrumb(array('link' => ADMIN . 'settings_forum.php' . $aidlink, 'title' => self::$locale['forum_settings']));
if (isset($_POST['recount_user_post'])) {
$result = dbquery("SELECT post_author, COUNT(post_id) as num_posts FROM " . DB_FORUM_POSTS . " GROUP BY post_author");
if (dbrows($result)) {
while ($data = dbarray($result)) {
$result2 = dbquery("UPDATE " . DB_USERS . " SET user_posts='" . $data['num_posts'] . "' WHERE user_id='" . $data['post_author'] . "'");
}
addNotice('success', self::$locale['forum_061']);
}
}
if (isset($_POST['savesettings'])) {
$numofthreads = form_sanitizer($_POST['numofthreads'], 20, 'numofthreads');
$threads_num = form_sanitizer($_POST['threads_per_page'], 20, 'threads_per_page');
$posts_num = form_sanitizer($_POST['posts_per_page'], 20, 'posts_per_page');
$forum_ips = form_sanitizer($_POST['forum_ips'], -103, 'forum_ips');
$attachmax = form_sanitizer($_POST['calc_b'], 1, 'calc_b') * form_sanitizer($_POST['calc_c'], 1000000, 'calc_c');
$attachmax_count = form_sanitizer($_POST['forum_attachmax_count'], 5, 'forum_attachmax_count');
$attachtypes = form_sanitizer($_POST['forum_attachtypes'], '.pdf,.gif,.jpg,.png,.zip,.rar,.tar,.bz2,.7z', 'forum_attachtypes');
$thread_notify = form_sanitizer($_POST['thread_notify'], '0', 'thread_notify');
$forum_ranks = form_sanitizer($_POST['forum_ranks'], '0', 'forum_ranks');
$forum_rank_style = form_sanitizer($_POST['forum_rank_style'], '0', 'forum_rank_style');
$forum_edit_lock = form_sanitizer($_POST['forum_edit_lock'], '0', 'forum_edit_lock');
$forum_edit_timelimit = form_sanitizer($_POST['forum_edit_timelimit'], '0', 'forum_edit_timelimit');
$popular_threads_timeframe = form_sanitizer($_POST['popular_threads_timeframe'], '604800', 'popular_threads_timeframe');
$forum_last_posts_reply = form_sanitizer($_POST['forum_last_posts_reply'], '0', 'forum_last_posts_reply');
$forum_last_post_avatar = form_sanitizer($_POST['forum_last_post_avatar'], '0', 'forum_last_post_avatar');
$forum_editpost_to_lastpost = form_sanitizer($_POST['forum_editpost_to_lastpost'], '0', 'forum_editpost_to_lastpost');
if (\defender::safe()) {
dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$numofthreads}' WHERE settings_name='numofthreads' AND settings_inf='forum'");
dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$threads_num}' WHERE settings_name='threads_per_page' AND settings_inf='forum'");
dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$posts_num}' WHERE settings_name='posts_per_page' AND settings_inf='forum'");
//".(isnum($_POST['forum_ips']) ? $_POST['forum_ips'] : "103")."
dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$forum_ips}' WHERE settings_name='forum_ips' AND settings_inf='forum'");
dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$attachmax}' WHERE settings_name='forum_attachmax' AND settings_inf='forum'");
dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$attachmax_count}' WHERE settings_name='forum_attachmax_count' AND settings_inf='forum'");
dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$attachtypes}' WHERE settings_name='forum_attachtypes' AND settings_inf='forum'");
dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$thread_notify}' WHERE settings_name='thread_notify' AND settings_inf='forum'");
dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$forum_ranks}' WHERE settings_name='forum_ranks' AND settings_inf='forum'");
dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$forum_rank_style}' WHERE settings_name='forum_rank_style' AND settings_inf='forum'");
dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$forum_edit_lock}' WHERE settings_name='forum_edit_lock' AND settings_inf='forum'");
dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$forum_edit_timelimit}' WHERE settings_name='forum_edit_timelimit' AND settings_inf='forum'");
dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$popular_threads_timeframe}' WHERE settings_name='popular_threads_timeframe' AND settings_inf='forum'");
dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$forum_last_posts_reply}' WHERE settings_name='forum_last_posts_reply' AND settings_inf='forum'");
dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$forum_last_post_avatar}' WHERE settings_name='forum_last_post_avatar' AND settings_inf='forum'");
dbquery("UPDATE " . DB_SETTINGS_INF . " SET settings_value='{$forum_editpost_to_lastpost}' WHERE settings_name='forum_editpost_to_lastpost' AND settings_inf='forum'");
addNotice('success', self::$locale['900']);
redirect(FUSION_SELF . $aidlink . '§ion=fs');
}
}
$yes_no_array = array('1' => self::$locale['yes'], '0' => self::$locale['no']);
echo "<div class='well'>" . self::$locale['forum_description'] . "</div>";
echo openform('forum_settings_form', 'post', FUSION_REQUEST, array('class' => 'm-t-20'));
echo "<div class='row'>\n";
echo "<div class='col-xs-12 col-sm-8'>\n";
openside('');
echo "<span class='small pull-right'>* " . self::$locale['506'] . "</span><br/>\n";
echo form_text('numofthreads', self::$locale['505'], $forum_settings['numofthreads'], array('error_text' => self::$locale['error_value'], 'inline' => 1, 'width' => '150px', 'type' => 'number'));
closeside();
openside('');
echo form_text('threads_per_page', self::$locale['forum_080'], $forum_settings['threads_per_page'], array('error_text' => self::$locale['error_value'], 'inline' => 1, 'width' => '150px', 'type' => 'number'));
echo form_text('posts_per_page', self::$locale['forum_081'], $forum_settings['posts_per_page'], array('error_text' => self::$locale['error_value'], 'inline' => 1, 'width' => '150px', 'type' => 'number'));
closeside();
openside('');
echo form_select('thread_notify', self::$locale['512'], $forum_settings['thread_notify'], array('options' => $yes_no_array, 'error_text' => self::$locale['error_value'], 'inline' => 1));
closeside();
openside('');
echo "<span class='pull-right position-absolute small' style='right:30px;'>" . self::$locale['537'] . "</span>\n";
echo form_select('forum_edit_timelimit', self::$locale['536'], $forum_settings['forum_edit_timelimit'], array('options' => array('0', '10', '30', '45', '60'), 'max_length' => 2, 'width' => '100px', 'required' => 1, 'error_text' => self::$locale['error_value'], 'inline' => 1));
echo form_select('forum_ips', self::$locale['507'], $forum_settings['forum_ips'], array('options' => $yes_no_array, 'error_text' => self::$locale['error_value'], 'inline' => 1));
echo form_select('forum_ranks', self::$locale['520'], $forum_settings['forum_ranks'], array('options' => $yes_no_array, 'error_text' => self::$locale['error_value'], 'inline' => 1));
echo form_select('forum_rank_style', self::$locale['forum_064'], $forum_settings['forum_rank_style'], array('options' => array(self::$locale['forum_063'], self::$locale['forum_062']), 'error_text' => self::$locale['error_value'], 'inline' => 1));
echo form_select('forum_last_post_avatar', self::$locale['539'], $forum_settings['forum_last_post_avatar'], array('options' => $yes_no_array, 'error_text' => self::$locale['error_value'], 'inline' => 1));
echo form_select('forum_edit_lock', self::$locale['521'], $forum_settings['forum_edit_lock'], array('options' => $yes_no_array, 'error_text' => self::$locale['error_value'], 'inline' => 1));
echo form_select('forum_editpost_to_lastpost', self::$locale['538'], $forum_settings['forum_editpost_to_lastpost'], array('options' => $yes_no_array, 'error_text' => self::$locale['error_value'], 'inline' => 1));
closeside();
echo "</div>\n";
echo "<div class='col-xs-12 col-sm-4'>\n";
openside('');
$calc_opts = array(1 => 'Bytes (bytes)', 1000 => 'KB (Kilobytes)', 1000000 => 'MB (Megabytes)');
$calc_c = self::calculate_byte($forum_settings['forum_attachmax']);
$calc_b = $forum_settings['forum_attachmax'] / $calc_c;
require_once INCLUDES . "mimetypes_include.php";
$mime = mimeTypes();
$mime_opts = array();
foreach ($mime as $m => $Mime) {
$ext = ".{$m}";
$mime_opts[$ext] = $ext;
}
sort($mime_opts);
echo "<div class='clearfix'>\n";
echo "<span class='pull-right small'>" . self::$locale['509'] . "</span>";
echo "<label for='calc_c'>" . self::$locale['508'] . "</label><br />\n";
echo form_text('calc_b', '', $calc_b, array('required' => 1, 'number' => 1, 'error_text' => self::$locale['error_rate'], 'width' => '100px', 'max_length' => '3', 'class' => 'm-r-10 pull-left'));
echo form_select('calc_c', '', $calc_c, array('options' => $calc_opts, 'placeholder' => self::$locale['choose'], 'class' => 'pull-left', 'width' => '100%'));
echo "</div>\n";
//.........这里部分代码省略.........
示例15: author
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES . "templates/header.php";
require_once THEMES . "templates/global/home.php";
require_once INCLUDES . "infusions_include.php";
include LOCALE . LOCALESET . "homepage.php";
add_to_title($locale['home']);
add_breadcrumb(array("title" => $locale['home'], "link" => BASEDIR . "home.php"));
$configs = array();
$configs[DB_NEWS] = array('select' => "SELECT\n\tns.news_id as id, ns.news_subject as title, ns.news_news as content,\n\tns.news_datestamp as datestamp, us.user_id, us.user_name,\n\tus.user_status, nc.news_cat_id as cat_id, nc.news_cat_name as cat_name,\n\tns.news_image as image,\n\tnc.news_cat_image as cat_image,\n\tcount(c1.comment_id) as comment_count,\n\tcount(r1.rating_id) as rating_count\n\tFROM " . DB_NEWS . " as ns\n\tLEFT JOIN " . DB_NEWS_CATS . " as nc ON nc.news_cat_id = ns.news_cat\n\tLEFT JOIN " . DB_COMMENTS . " as c1 on (c1.comment_item_id = ns.news_id and c1.comment_type = 'NS')\n\tLEFT JOIN " . DB_RATINGS . " as r1 on (r1.rating_item_id = ns.news_id AND r1.rating_type = 'NS')\n\tINNER JOIN " . DB_USERS . " as us ON ns.news_name = us.user_id\n\tWHERE (" . time() . " > ns.news_start OR ns.news_start = 0)\n\tAND (" . time() . " < ns.news_end OR ns.news_end = 0)\n\tAND " . groupaccess('ns.news_visibility') . " " . (multilang_table("NS") ? "AND news_language='" . LANGUAGE . "'" : "") . "\n\tgroup by ns.news_id\n\tORDER BY ns.news_datestamp DESC LIMIT 3", 'locale' => array('norecord' => $locale['home_0050'], 'blockTitle' => $locale['home_0000']), 'infSettings' => get_settings("news"), 'categoryLinkPattern' => INFUSIONS . "news/news.php?cat_id={cat_id}", 'contentLinkPattern' => INFUSIONS . "news/news.php?readmore={id}");
$configs[DB_ARTICLES] = array('select' => "SELECT\n\tar.article_id as id, ar.article_subject as title, ar.article_snippet as content,\n\tar.article_datestamp as datestamp, ac.article_cat_id as cat_id, ac.article_cat_name as cat_name,\n\tus.user_id, us.user_name, us.user_status\n\tFROM " . DB_ARTICLES . " as ar\n\tINNER JOIN " . DB_ARTICLE_CATS . " as ac ON ac.article_cat_id = ar.article_cat\n\tINNER JOIN " . DB_USERS . " as us ON us.user_id = ar.article_name\n\tWHERE " . groupaccess('ar.article_visibility') . " " . (multilang_table("AR") ? "AND ac.article_cat_language='" . LANGUAGE . "'" : "") . "\n\tORDER BY ar.article_datestamp DESC LIMIT 3", 'locale' => array('norecord' => $locale['home_0051'], 'blockTitle' => $locale['home_0001']), 'infSettings' => get_settings("article"), 'categoryLinkPattern' => INFUSIONS . "articles/articles.php?cat_id={cat_id}", 'contentLinkPattern' => INFUSIONS . "articles/articles.php?article_id={id}");
$configs[DB_BLOG] = array('select' => "SELECT\n\tbl.blog_id as id, bl.blog_subject as title, bl.blog_blog as content,\n\tbl.blog_datestamp as datestamp, us.user_id, us.user_name,\n\tus.user_status, bc.blog_cat_id as cat_id, bc.blog_cat_name as cat_name,\n\tbl.blog_image as image,\n\tbc.blog_cat_image as cat_image,\n\tcount(c1.comment_id) as comment_count,\n\tcount(r1.rating_id) as rating_count\n\tFROM " . DB_BLOG . " as bl\n\tLEFT JOIN " . DB_BLOG_CATS . " as bc ON bc.blog_cat_id = bl.blog_cat\n\tLEFT JOIN " . DB_COMMENTS . " as c1 on (c1.comment_item_id = bl.blog_id and c1.comment_type = 'BL')\n\tLEFT JOIN " . DB_RATINGS . " as r1 on (r1.rating_item_id = bl.blog_id AND r1.rating_type = 'BL')\n\tINNER JOIN " . DB_USERS . " as us ON bl.blog_name = us.user_id\n\tWHERE (" . time() . " > bl.blog_start OR bl.blog_start = 0)\n\tAND (" . time() . " < bl.blog_end OR bl.blog_end = 0)\n\tAND " . groupaccess('bl.blog_visibility') . " " . (multilang_table("BL") ? "AND blog_language='" . LANGUAGE . "'" : "") . "\n\tgroup by bl.blog_id\n\tORDER BY bl.blog_datestamp DESC LIMIT 3", 'locale' => array('norecord' => $locale['home_0052'], 'blockTitle' => $locale['home_0002']), 'infSettings' => get_settings("blog"), 'categoryLinkPattern' => INFUSIONS . "blog/blog.php?cat_id={cat_id}", 'contentLinkPattern' => INFUSIONS . "blog/blog.php?readmore={id}");
$configs[DB_DOWNLOADS] = array('select' => "SELECT\n\tdl.download_id as id, dl.download_title as title, dl.download_description_short as content,\n\tdl.download_datestamp as datestamp, dc.download_cat_id as cat_id, dc.download_cat_name as cat_name,\n\tus.user_id, us.user_name, us.user_status,\n\tdl.download_image as image,\n\tcount(c1.comment_id) as comment_count,\n\tcount(r1.rating_id) as rating_count\n\tFROM " . DB_DOWNLOADS . " dl\n\tINNER JOIN " . DB_DOWNLOAD_CATS . " dc ON dc.download_cat_id = dl.download_cat\n\tINNER JOIN " . DB_USERS . " us ON us.user_id = dl.download_user\n\tLEFT JOIN " . DB_COMMENTS . " as c1 on (c1.comment_item_id = dl.download_id and c1.comment_type = 'D')\n\tLEFT JOIN " . DB_RATINGS . " as r1 on (r1.rating_item_id = dl.download_id AND r1.rating_type = 'D')\n\tWHERE " . groupaccess('dl.download_visibility') . " " . (multilang_table("DL") ? "AND dc.download_cat_language='" . LANGUAGE . "'" : "") . "\n\tgroup by dl.download_id\n\tORDER BY dl.download_datestamp DESC LIMIT 3", 'locale' => array('norecord' => $locale['home_0053'], 'blockTitle' => $locale['home_0003']), 'infSettings' => get_settings("downloads"), 'categoryLinkPattern' => DOWNLOADS . "downloads.php?cat_id={cat_id}", 'contentLinkPattern' => DOWNLOADS . "downloads.php?cat_id={cat_id}&download_id={id}");
$contents = array();
foreach ($configs as $table => $config) {
if (!db_exists($table)) {
continue;
}
$contents[$table] = array('data' => array(), 'colwidth' => 0, 'norecord' => $config['locale']['norecord'], 'blockTitle' => $config['locale']['blockTitle'], 'infSettings' => $config['infSettings']);
$result = dbquery($config['select']);
$items_count = dbrows($result);
if (!$items_count) {
continue;