本文整理汇总了PHP中add_to_title函数的典型用法代码示例。如果您正苦于以下问题:PHP add_to_title函数的具体用法?PHP add_to_title怎么用?PHP add_to_title使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了add_to_title函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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();
}
}
示例2: redirect
if (!defined("USER_CP")) {
require_once "../../maincore.php";
require_once THEMES . "templates/header.php";
include LOCALE . LOCALESET . "forum/main.php";
include INFUSIONS . "fusionboard4/includes/func.php";
if (file_exists(INFUSIONS . "fusionboard4/locale/" . $settings['locale'] . ".php")) {
include INFUSIONS . "fusionboard4/locale/" . $settings['locale'] . ".php";
} else {
include INFUSIONS . "fusionboard4/locale/English.php";
}
if (!$fb4['group_enable']) {
redirect(FORUM . "index.php");
}
opentable($locale['uc250']);
renderNav(false, false, array(INFUSIONS . "fusionboard4/groups.php", $locale['uc250']));
add_to_title(" :: " . $locale['uc250']);
echo "<table width='100%' cellspacing='1' cellpadding='0' border='0' class='tbl-border'>\n";
}
echo "<style type='text/css'>\n.grouptext { font-size:14px;font-family:Tahoma;width:300px;margin-top:3px;margin-left:7px; }\n</style>\n";
if (isset($_GET['action']) && $_GET['action'] == "create" && checkgroup($fb4['group_create'])) {
if (isset($_POST['addGroup'])) {
$group_name = isset($_POST['group_name']) ? addslash(stripinput($_POST['group_name'])) : "";
$group_desc = isset($_POST['group_desc']) ? addslash(stripinput($_POST['group_desc'])) : "";
$group_type = isset($_POST['group_type']) && isNum($_POST['group_type']) ? $_POST['group_type'] : 1;
$group_wall = isset($_POST['group_wall']) && isNum($_POST['group_wall']) ? $_POST['group_wall'] : 0;
$group_visibility = isset($_POST['group_visibility']) && isNum($_POST['group_visibility']) ? $_POST['group_visibility'] : 0;
$group_moderate = isset($_POST['group_moderate']) && isNum($_POST['group_moderate']) ? $_POST['group_moderate'] : 0;
$result = dbquery("insert into " . DB_USER_GROUPS . " (group_name, group_description) VALUES('{$group_name}', '{$group_desc}')");
$group_id = mysql_insert_id();
$result = dbquery("insert into " . DB_PREFIX . "fb_groups (group_id, group_leader, group_officers, group_access, group_visibility, group_wall, group_description, group_recentnews, group_created, group_image, group_moderate) VALUES('{$group_id}', '" . $userdata['user_id'] . "', '', '{$group_type}', '{$group_visibility}', '{$group_wall}', '{$group_desc}', '', '" . time() . "', '', '{$group_moderate}')");
$result = dbquery("update " . DB_USERS . " set user_groups='" . ($userdata['user_groups'] == "" ? $group_id : $userdata['user_groups'] . ".{$group_id}") . "' where user_id='" . $userdata['user_id'] . "'");
示例3: renderMods
echo "</span>";
echo $title;
renderMods(false, true);
echo "</span>";
echo "</td></tr><tr><td class='tbl1' colspan='2' valign='top' style='padding:8px;'>\n";
if (iMOD) {
echo "<div style='float:right'><input type='checkbox' name='delete_post[]' value='" . $data['post_id'] . "' /></div>\n";
}
if (isset($_GET['highlight'])) {
$words = explode(" ", urldecode($_GET['highlight']));
$message = parseubb(highlight_words($words, $message));
} else {
$message = parseubb($message);
}
if ($current_row == 1) {
add_to_title($locale['global_201'] . $fdata['thread_subject']);
$post_res = dbquery("select * from " . DB_PREFIX . "fb_posts where post_id='" . $data['post_id'] . "'");
if (dbrows($post_res)) {
$post_data = dbarray($post_res);
if ($post_data['post_icon']) {
$ficon = "<img src='" . INFUSIONS . "fusionboard4/images/post_icons/" . $post_data['post_icon'] . "' alt='' style='vertical-align:middle;'> ";
} else {
$ficon = "<img src='" . INFUSIONS . "fusionboard4/images/post_icons/page_white.png' alt='' style='vertical-align:middle;'> ";
}
} else {
$ficon = "<img src='" . INFUSIONS . "fusionboard4/images/post_icons/page_white.png' alt='' style='vertical-align:middle;'> ";
}
if (!$fb4['post_icons']) {
$ficon = "";
}
} else {
示例4: author
| 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";
if (file_exists(INFUSIONS . "fusionboard4/locale/" . $settings['locale'] . ".php")) {
include INFUSIONS . "fusionboard4/locale/" . $settings['locale'] . ".php";
} else {
include INFUSIONS . "fusionboard4/locale/English.php";
}
if (!iMEMBER) {
redirect("../../index.php");
}
add_to_title($locale['global_200'] . $locale['global_042']);
$result = dbquery("SELECT COUNT(post_id) FROM " . DB_POSTS . " tp\n\tINNER JOIN " . DB_FORUMS . " tf ON tp.forum_id=tf.forum_id\n\tWHERE " . groupaccess('tf.forum_access') . " AND post_author='" . $userdata['user_id'] . "'\n\tORDER BY tp.post_datestamp DESC LIMIT 100");
$rows = dbrows($result);
if ($rows) {
if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) {
$_GET['rowstart'] = 0;
}
$result = dbquery("SELECT tp.forum_id, tp.thread_id, tp.post_id, tp.post_author, tp.post_datestamp,\n\t\ttf.forum_name, tf.forum_access, tt.thread_subject\n\t\tFROM " . DB_POSTS . " tp\n\t\tINNER JOIN " . DB_FORUMS . " tf ON tp.forum_id=tf.forum_id\n\t\tINNER JOIN " . DB_THREADS . " tt ON tp.thread_id=tt.thread_id\n\t\tWHERE " . groupaccess('tf.forum_access') . " AND tp.post_author='" . $userdata['user_id'] . "'\n\t\tORDER BY tp.post_datestamp DESC LIMIT " . $_GET['rowstart'] . ",20");
$i = 0;
opentable($locale['global_042']);
echo "<table cellpadding='0' cellspacing='0' width='100%' class='tbl-border'>\n<tr>\n";
echo "<td width='1%' class='tbl2' style='white-space:nowrap'><strong>" . $locale['global_048'] . "</strong></td>\n";
echo "<td width='100%' class='tbl2'><strong>" . $locale['global_044'] . "</strong></td>\n";
echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><strong>" . $locale['global_049'] . "</strong></td>\n";
echo "</tr>\n";
while ($data = dbarray($result)) {
示例5: dbquery
if (!isset($_POST['post_comment']) && !isset($_POST['post_rating'])) {
$result2 = dbquery("UPDATE " . DB_NEWS . " SET news_reads=news_reads+1 WHERE news_id='" . $_GET['readmore'] . "'");
$data['news_reads']++;
}
$news_cat_image = "";
$news_subject = $data['news_subject'];
if ($data['news_image_t1'] && $settings['news_image_readmore'] == "0") {
$img_size = @getimagesize(IMAGES_N . $data['news_image']);
$news_cat_image = "<a href=\"javascript:;\" onclick=\"window.open('" . IMAGES_N . $data['news_image'] . "','','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=" . ($img_size[0] + 20) . ",height=" . ($img_size[1] + 20) . "')\"><img src='" . IMAGES_N_T . $data['news_image_t1'] . "' alt='" . $data['news_subject'] . "' class='news-category' /></a>";
} elseif ($data['news_cat_image']) {
$news_cat_image = "<a href='news_cats.php?cat_id=" . $data['news_cat'] . "'><img src='" . get_image("nc_" . $data['news_cat_name']) . "' alt='" . $data['news_cat_name'] . "' class='news-category' /></a>";
}
$news_news = preg_split("/<!?--\\s*pagebreak\\s*-->/i", $data['news_breaks'] == "y" ? nl2br(stripslashes($data['news_extended'] ? $data['news_extended'] : $data['news_news'])) : stripslashes($data['news_extended'] ? $data['news_extended'] : $data['news_news']));
$pagecount = count($news_news);
$news_info = array("news_id" => $data['news_id'], "user_id" => $data['user_id'], "user_name" => $data['user_name'], "user_status" => $data['user_status'], "news_date" => $data['news_datestamp'], "cat_id" => $data['news_cat'], "cat_name" => $data['news_cat_name'], "cat_image" => $news_cat_image, "news_subject" => $data['news_subject'], "news_ext" => "n", "news_reads" => $data['news_reads'], "news_comments" => dbcount("(comment_id)", DB_COMMENTS, "comment_type='N' AND comment_item_id='" . $data['news_id'] . "' AND comment_hidden='0'"), "news_allow_comments" => $data['news_allow_comments'], "news_sticky" => $data['news_sticky']);
add_to_title($locale['global_201'] . $news_subject);
echo "<!--news_pre_readmore-->";
render_news($news_subject, $news_news[$_GET['rowstart']], $news_info);
echo "<!--news_sub_readmore-->";
if ($pagecount > 1) {
echo "<div align='center' style='margin-top:5px;'>\n" . makepagenav($_GET['rowstart'], 1, $pagecount, 3, FUSION_SELF . "?readmore=" . $_GET['readmore'] . "&") . "\n</div>\n";
}
if ($data['news_allow_comments']) {
showcomments("N", DB_NEWS, "news_id", $_GET['readmore'], FUSION_SELF . "?readmore=" . $_GET['readmore']);
}
if ($data['news_allow_ratings']) {
showratings("N", $_GET['readmore'], FUSION_SELF . "?readmore=" . $_GET['readmore']);
}
} else {
redirect(FUSION_SELF);
}
示例6: dbcount
$num = dbcount("(faq_id)", DB_FAQS, "faq_cat_id='" . $data['faq_cat_id'] . "'");
echo "<td valign='top'><a href='" . FUSION_SELF . "?cat_id=" . $data['faq_cat_id'] . "'>" . $data['faq_cat_name'] . "</a> <span class='small2'>({$num})</span>\n";
if ($data['faq_cat_description']) {
echo "<br />\n<span class='small'>" . $data['faq_cat_description'] . "</span>";
}
echo "</td>\n";
$i++;
}
echo "</tr>\n</table>\n";
} else {
echo "<div style='text-align:center'><br />\n" . $locale['410'] . "<br /><br />\n</div>\n";
}
closetable();
} else {
if ($data = dbarray(dbquery("SELECT faq_cat_name,faq_cat_language FROM " . DB_FAQ_CATS . " " . (multilang_table("FQ") ? "WHERE faq_cat_language='" . LANGUAGE . "' AND" : "WHERE") . " faq_cat_id='" . $_GET['cat_id'] . "'"))) {
add_to_title($locale['global_201'] . $data['faq_cat_name']);
opentable($locale['401'] . ": " . $data['faq_cat_name']);
echo "<table cellpadding='0' cellspacing='1' width='100%'>\n<tr>\n";
echo "<td class='tbl2'>\n<a href='" . FUSION_SELF . "'>" . $locale['400'] . "</a> >";
echo "<a href='" . FUSION_SELF . "?cat_id=" . $_GET['cat_id'] . "'>" . $data['faq_cat_name'] . "</a></td>\n";
echo "</tr>\n</table>\n";
$rows = dbcount("(faq_id)", DB_FAQS, "faq_cat_id='" . $_GET['cat_id'] . "'");
if ($rows) {
$i = 0;
$ii = 1;
$columns = 4;
$faq_content = "";
echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
$result = dbquery("SELECT faq_id, faq_question, faq_answer from " . DB_FAQS . " WHERE faq_cat_id='" . $_GET['cat_id'] . "' ORDER BY faq_question");
$numrows = dbrows($result);
while ($data = dbarray($result)) {
示例7: parse_textarea
$article_snippet = parse_textarea($article_snippet);
}
$article_article = "";
if ($_POST['article_article']) {
$article_article = str_replace("src='" . str_replace("../", "", IMAGES_A), "src='" . IMAGES_A, parseubb(stripslashes($_POST['article_article'])));
$article_article = parse_textarea($article_article);
}
$criteriaArray = array("article_subject" => form_sanitizer($_POST['article_subject'], "", "article_subject"), "article_cat" => form_sanitizer($_POST['article_cat'], 0, "article_cat"), "article_snippet" => form_sanitizer($article_snippet, "", "article_snippet"), "article_article" => form_sanitizer($article_article, "", "article_article"), "article_keywords" => form_sanitizer($_POST['article_keywords'], "", "article_keywords"), "article_language" => form_sanitizer($_POST['article_language'], "", "article_language"));
$criteriaArray['article_snippet'] = parse_textarea($article_snippet);
$criteriaArray['article_article'] = parse_textarea($article_article);
opentable($criteriaArray['article_subject']);
echo "<p class='text-bigger'>" . $criteriaArray['article_snippet'] . "</p>";
echo $criteriaArray['article_article'];
closetable();
}
add_to_title($locale['global_200'] . $locale['articles_0060']);
echo "<div class='panel panel-default tbl-border'>\n<div class='panel-body'>\n";
echo "<div class='alert alert-info m-b-20 submission-guidelines'>" . str_replace("[SITENAME]", fusion_get_settings("sitename"), $locale['articles_0063']) . "</div>\n";
echo openform('submit_form', 'post', BASEDIR . "submit.php?stype=a");
echo form_text('article_subject', $locale['articles_0304'], $criteriaArray['article_subject'], array("required" => TRUE, "inline" => TRUE));
if (multilang_table("AR")) {
echo form_select('article_language', $locale['global_ML100'], $criteriaArray['article_language'], array("options" => fusion_get_enabled_languages(), "placeholder" => $locale['choose'], "width" => "250px", "inline" => TRUE));
} else {
echo form_hidden('article_language', '', $criteriaArray['article_language']);
}
echo form_select('article_keywords', $locale['articles_0204'], $criteriaArray['article_keywords'], array("max_length" => 320, "inline" => TRUE, "placeholder" => $locale['articles_0204a'], "width" => "100%", "error_text" => $locale['articles_0204a'], "tags" => TRUE, "multiple" => TRUE));
echo form_select_tree("article_cat", $locale['articles_0201'], $criteriaArray['article_cat'], array("width" => "250px", "inline" => TRUE, "no_root" => TRUE, "query" => multilang_table("AR") ? "WHERE article_cat_language='" . LANGUAGE . "'" : ""), DB_ARTICLE_CATS, "article_cat_name", "article_cat_id", "article_cat_parent");
$textArea_opts = array("required" => TRUE, "type" => fusion_get_settings("tinymce_enabled") ? "tinymce" : "html", "tinymce" => fusion_get_settings("tinymce_enabled") && iADMIN ? "advanced" : "simple", "autosize" => TRUE, "form_name" => "submit_form");
echo form_textarea('article_snippet', $locale['articles_0202'], $criteriaArray['article_snippet'], $textArea_opts);
$textArea_opts['required'] = $article_settings['article_extended_required'] ? TRUE : FALSE;
echo form_textarea('article_article', $locale['articles_0203'], $criteriaArray['article_article'], $textArea_opts);
示例8: showratings
require INCLUDES . "ratings_include.php";
showratings("P", $_GET['photo_id'], FUSION_SELF . "?photo_id=" . $_GET['photo_id']);
}
}
} elseif (isset($_GET['album_id']) && isnum($_GET['album_id'])) {
define("PHOTODIR", PHOTOS . (!SAFEMODE ? "album_" . $_GET['album_id'] . "/" : ""));
$result = dbquery("SELECT album_title, album_description, album_thumb, album_access\r\n\tFROM " . DB_PHOTO_ALBUMS . " WHERE album_id='" . (int) $_GET['album_id'] . "'");
if (!dbrows($result)) {
redirect(make_url(BASEDIR . FUSION_SELF, BASEDIR . "photogallery", "", ".html"));
} else {
$data = dbarray($result);
if (!checkgroup($data['album_access'])) {
redirect(make_url(BASEDIR . FUSION_SELF, BASEDIR . "photogallery", "", ".html"));
} else {
$rows = dbcount("(photo_id)", DB_PHOTOS, "album_id='" . (int) $_GET['album_id'] . "'");
add_to_title($locale['global_201'] . $data['album_title']);
opentable($locale['420']);
echo "<!--pre_album_info-->";
echo "<table cellpadding='0' cellspacing='0' width='80%' class='center'>\n<tr>\n";
echo "<td rowspan='2' align='center' class='tbl1 photogallery_album_thumb'><!--photogallery_album_thumb-->";
if ($data['album_thumb'] && file_exists(PHOTOS . $data['album_thumb'])) {
echo "<img src='" . PHOTOS . $data['album_thumb'] . "' alt='" . $data['album_thumb'] . "' />";
} elseif (file_exists(PHOTOS . "nophoto.jpg")) {
echo "<img src='" . PHOTOS . "nophoto.jpg' alt='" . $locale['432'] . "' title='" . $locale['432'] . "' style='border:0px' />";
} else {
echo $locale['432'];
}
echo "</td>\n";
echo "<td valign='top' width='100%'><div class='tbl2' style='font-weight:bold;vertical-align:top'>" . $locale['421'] . $data['album_title'] . "</div>\n";
echo "<div class='tbl1 photogallery_album_desc' style='vertical-align:middle'><!--photogallery_album_desc-->" . nl2br(parseubb($data['album_description'])) . "</div>\n</td>\n</tr>\n";
echo "<tr>\n<td valign='bottom' width='100%'>\n<div class='tbl2' style='vertical-align:bottom'>\n";
示例9: display_forum_list
/**
* Forum Listing
*/
private function display_forum_list()
{
global $aidlink;
$title = !empty($this->level['title']) ? sprintf(self::$locale['forum_000b'], $this->level['title'][0]) : self::$locale['forum_000c'];
add_to_title(" " . $title);
$forum_settings = $this->get_forum_settings();
$threads_per_page = $forum_settings['threads_per_page'];
$max_rows = dbcount("('forum_id')", DB_FORUMS, (multilang_table("FO") ? "forum_language='" . LANGUAGE . "' AND" : '') . " forum_cat='" . $_GET['parent_id'] . "'");
// need max rows
$_GET['rowstart'] = isset($_GET['rowstart']) && isnum($_GET['rowstart']) && $_GET['rowstart'] <= $max_rows ? intval($_GET['rowstart']) : 0;
opentable($title);
$result = dbquery("SELECT forum_id, forum_cat, forum_branch, forum_name, forum_description, forum_image, forum_alias, forum_type, forum_threadcount, forum_postcount, forum_order FROM\n\t\t\t" . DB_FORUMS . " " . (multilang_table("FO") ? "WHERE forum_language='" . LANGUAGE . "' AND" : "WHERE") . " forum_cat='" . intval($_GET['parent_id']) . "'\n\t\t\t ORDER BY forum_order ASC LIMIT " . $_GET['rowstart'] . ", {$threads_per_page}\n\t\t\t ");
$rows = dbrows($result);
if ($rows > 0) {
// To support entypo and font-awesome icon switching
$has_entypo = fusion_get_settings("entypo") ? TRUE : FALSE;
$has_fa = fusion_get_settings("fontawesome") ? TRUE : FALSE;
$type_icon = array('1' => $has_entypo ? 'entypo folder' : $has_fa ? 'fa fa-folder fa-fw fa-2x' : "", '2' => $has_entypo ? 'entypo icomment' : $has_fa ? 'fa fa-comment-o fa-fw fa-2x' : "", '3' => $has_entypo ? 'entypo link' : $has_fa ? 'fa fa-external-link fa-fw fa-2x' : "", '4' => $has_entypo ? 'entypo info-circled' : $has_fa ? 'fa fa-lightbulb-o fa-fw fa-2x' : "");
$ui_label = array("move_up" => $has_entypo ? "<i class='entypo up-bold m-r-10'></i>" : $has_fa ? "<i class='fa fa-arrow-up fa-lg m-r-10'></i>" : self::$locale['forum_046'], "move_down" => $has_entypo ? "<i class='entypo down-bold m-r-10'></i>" : $has_fa ? "<i class='fa fa-arrow-down fa-lg m-r-10'></i>" : self::$locale['forum_045'], "edit_permission" => $has_entypo ? "<i class='entypo key m-r-10'></i>" : $has_fa ? "<i class='fa fa-eye fa-lg m-r-10'></i>" : self::$locale['forum_047'], "edit" => $has_entypo ? "<i class='entypo cog m-r-10'></i>" : $has_fa ? "<i class='fa fa-cog fa-lg m-r-10'></i>" : self::$locale['forum_048'], "delete" => $has_entypo ? "<i class='entypo icancel m-r-10'></i>" : $has_fa ? "<i class='fa fa-trash-o fa-lg m-r-10'></i>" : self::$locale['forum_049']);
$i = 1;
while ($data = dbarray($result)) {
$up = $data['forum_order'] - 1;
$down = $data['forum_order'] + 1;
$subforums = get_child($this->forum_index, $data['forum_id']);
$subforums = !empty($subforums) ? count($subforums) : 0;
echo "<div class='panel panel-default'>\n";
echo "<div class='panel-body'>\n";
echo "<div class='pull-left m-r-10'>\n";
echo "<i class='display-inline-block text-lighter " . $type_icon[$data['forum_type']] . "'></i>\n";
echo "</div>\n";
echo "<div class='overflow-hide'>\n";
echo "<div class='row'>\n";
echo "<div class='col-xs-6 col-sm-6 col-md-6 col-lg-6'>\n";
$html2 = '';
if ($data['forum_image'] && file_exists(INFUSIONS . "forum/images/" . $data['forum_image'])) {
echo "<div class='pull-left m-r-10'>\n" . thumbnail(INFUSIONS . "forum/images/" . $data['forum_image'], '50px') . "</div>\n";
echo "<div class='overflow-hide'>\n";
$html2 = "</div>\n";
}
echo "<span class='strong text-bigger'><a href='" . FUSION_SELF . $aidlink . "&parent_id=" . $data['forum_id'] . "&branch=" . $data['forum_branch'] . "'>" . $data['forum_name'] . "</a></span><br/>" . nl2br(parseubb($data['forum_description'])) . $html2;
echo "</div>\n<div class='col-xs-6 col-sm-6 col-md-6 col-lg-6'>\n";
echo "<div class='pull-right'>\n";
$upLink = FUSION_SELF . $aidlink . $this->ext . "&action=mu&order={$up}&forum_id=" . $data['forum_id'];
$downLink = FUSION_SELF . $aidlink . $this->ext . "&action=md&order={$down}&forum_id=" . $data['forum_id'];
echo $i == 1 ? '' : "<a title='" . self::$locale['forum_046'] . "' href='" . $upLink . "'>" . $ui_label['move_up'] . "</a>";
echo $i == $rows ? '' : "<a title='" . self::$locale['forum_045'] . "' href='" . $downLink . "'>" . $ui_label['move_down'] . "</a>";
echo "<a title='" . self::$locale['forum_047'] . "' href='" . FUSION_SELF . $aidlink . "&action=p_edit&forum_id=" . $data['forum_id'] . "&parent_id=" . $_GET['parent_id'] . "'>" . $ui_label['edit_permission'] . "</a>";
// edit
echo "<a title='" . self::$locale['forum_048'] . "' href='" . FUSION_SELF . $aidlink . "&action=edit&forum_id=" . $data['forum_id'] . "&parent_id=" . $_GET['parent_id'] . "'>" . $ui_label['edit'] . "</a>";
// edit
echo "<a title='" . self::$locale['forum_049'] . "' href='" . FUSION_SELF . $aidlink . "&action=delete&forum_id=" . $data['forum_id'] . "&forum_cat=" . $data['forum_cat'] . "&forum_branch=" . $data['forum_branch'] . $this->ext . "' onclick=\"return confirm('" . self::$locale['delete_notice'] . "');\">" . $ui_label['delete'] . "</a>";
// delete
echo "</div>\n";
echo "<span class='text-dark text-smaller strong'>" . self::$locale['forum_057'] . " " . number_format($data['forum_threadcount']) . " / " . self::$locale['forum_059'] . " " . number_format($data['forum_postcount']) . " </span>\n<br/>";
echo "<span class='text-dark text-smaller strong'>" . self::$locale['forum_058'] . " " . number_format($subforums) . "</span>\n<br/>";
echo "<span class='text-smaller text-dark strong'>" . self::$locale['forum_051'] . " </span> <span class='text-smaller'>" . $data['forum_alias'] . " </span>\n";
echo "</div></div>\n";
// end row
echo "</div>\n";
echo "</div>\n</div>\n";
$i++;
}
if ($max_rows > $threads_per_page) {
$ext = isset($_GET['parent_id']) ? "&parent_id=" . $_GET['parent_id'] . "&" : '';
echo makepagenav($_GET['rowstart'], $threads_per_page, $max_rows, 3, FUSION_SELF . $aidlink . $ext);
}
} else {
echo "<div class='well text-center'>" . self::$locale['560'] . "</div>\n";
}
closetable();
}
示例10: add_to_head
<?php
require_once "maincore.php";
require_once THEMES . "templates/header.php";
require_once INFUSIONS . "al_catalog/infusion_db.php";
if (file_exists(AL_CATALOG_DIR . "locale/" . $settings['locale'] . ".php")) {
include AL_CATALOG_DIR . "locale/" . $settings['locale'] . ".php";
} else {
include AL_CATALOG_DIR . "locale/Russian.php";
}
require_once AL_CATALOG_DIR . "functions.php";
add_to_head("<link rel='stylesheet' href='" . AL_CATALOG_DIR . "asset/catalog-styles.css' />");
add_to_title($locale['ctg42']);
if (isset($_GET['action'])) {
if (in_array($_GET['action'], array("category", "item")) && file_exists(AL_CATALOG_DIR . "pages/" . $_GET['action'] . ".php")) {
if (in_array($_GET['action'], array("category", "item")) && (!isset($_GET['cat_id']) || !isnum($_GET['cat_id']))) {
redirect(FUSION_SELF);
}
if ($_GET['action'] == "item" && (!isset($_GET['item_id']) || !isnum($_GET['item_id']))) {
redirect(FUSION_SELF);
}
require_once AL_CATALOG_DIR . "pages/" . $_GET['action'] . ".php";
} else {
redirect(FUSION_SELF);
}
} else {
require_once AL_CATALOG_DIR . "pages/index.php";
}
require_once THEMES . "templates/footer.php";
示例11: weblink_cat_breadcrumbs
/**
* Weblinks Category Breadcrumbs Generator
* @param $forum_index
*/
function weblink_cat_breadcrumbs($weblink_cat_index)
{
global $locale;
/* Make an infinity traverse */
function breadcrumb_arrays($index, $id)
{
$crumb =& $crumb;
if (isset($index[get_parent($index, $id)])) {
$_name = dbarray(dbquery("SELECT weblink_cat_id, weblink_cat_name, weblink_cat_parent FROM " . DB_WEBLINK_CATS . " WHERE weblink_cat_id='" . $id . "'"));
$crumb = array('link' => INFUSIONS . "weblinks/weblinks.php?cat_id=" . $_name['weblink_cat_id'], 'title' => $_name['weblink_cat_name']);
if (isset($index[get_parent($index, $id)])) {
if (get_parent($index, $id) == 0) {
return $crumb;
}
$crumb_1 = breadcrumb_arrays($index, get_parent($index, $id));
$crumb = array_merge_recursive($crumb, $crumb_1);
// convert so can comply to Fusion Tab API.
}
}
return $crumb;
}
// then we make a infinity recursive function to loop/break it out.
$crumb = breadcrumb_arrays($weblink_cat_index, $_GET['cat_id']);
// then we sort in reverse.
if (count($crumb['title']) > 1) {
krsort($crumb['title']);
krsort($crumb['link']);
}
if (count($crumb['title']) > 1) {
foreach ($crumb['title'] as $i => $value) {
add_breadcrumb(array('link' => $crumb['link'][$i], 'title' => $value));
if ($i == count($crumb['title']) - 1) {
add_to_title($locale['global_201'] . $value);
}
}
} elseif (isset($crumb['title'])) {
add_to_title($locale['global_201'] . $crumb['title']);
add_breadcrumb(array('link' => $crumb['link'], 'title' => $crumb['title']));
}
}
示例12: array
$data['download_copyright'] = $data['download_copyright'] ? $data['download_copyright'] : $locale['na'];
if ($data['download_homepage']) {
$urlprefix = !strstr($data['download_homepage'], "http://") && !strstr($data['download_homepage'], "https://") ? 'http://' : '';
$data['download_homepage'] = "<a href='" . $urlprefix . $data['download_homepage'] . "' title='" . $urlprefix . $data['download_homepage'] . "' target='_blank'>" . $locale['download_1018'] . "</a>\n";
} else {
$data['download_homepage'] = $locale['na'];
}
/* Admin link */
$data['admin_link'] = '';
if (iADMIN && checkrights('D')) {
$data['admin_link'] = array('edit' => INFUSIONS . "downloads/downloads_admin.php" . $aidlink . "&action=edit&section=nform&download_id=" . $data['download_id'], 'delete' => INFUSIONS . "downloads/downloads_admin.php" . $aidlink . "&action=delete&section=nform&download_id=" . $data['download_id']);
}
$info['download_title'] = $data['download_title'];
$info['download_updated'] = $locale['global_049'] . " " . timer($data['download_datestamp']);
add_breadcrumb(array('link' => INFUSIONS . "downloads/downloads.php?download_id=" . $_GET['download_id'], 'title' => $data['download_title']));
add_to_title($data['download_title']);
add_to_meta($data['download_title'] . ($data['download_keywords'] ? "," . $data['download_keywords'] : ''));
if ($data['download_keywords'] !== "") {
set_meta("keywords", $data['download_keywords']);
}
$data['download_title'] = "<a class='text-dark' href='" . INFUSIONS . "downloads/downloads.php?readmore=" . $data['download_id'] . "'>" . $data['download_title'] . "</a>";
$info['download_item'] = $data;
} else {
redirect(INFUSIONS . "downloads/downloads.php");
}
} else {
redirect(INFUSIONS . "downloads/downloads.php");
}
} else {
$condition = '';
if (isset($_GET['author']) && isnum($_GET['author'])) {
示例13: unlink
unlink(INFUSIONS . "downloads/submisisons/images/" . $delCriteria['download_image_thumb']);
}
if (!empty($delCriteria['download_file']) && file_exists(INFUSIONS . "downloads/submisisons/images/" . $delCriteria['download_file'])) {
unlink(INFUSIONS . "downloads/submisisons/" . $delCriteria['download_file']);
}
$result = dbquery("DELETE FROM " . DB_SUBMISSIONS . " WHERE submit_id='" . intval($callback_data['submit_id']) . "'");
addNotice("success", $locale['download_0062']);
}
redirect(clean_request("", array("submit_id"), FALSE));
} else {
$result = dbquery("SELECT ts.submit_id,\n\t\t\tts.submit_datestamp, ts.submit_criteria, tu.user_id, tu.user_name, tu.user_avatar, tu.user_status\n\t\t\tFROM " . DB_SUBMISSIONS . " ts\n\t\t\tLEFT JOIN " . DB_USERS . " tu ON ts.submit_user=tu.user_id\n\t\t\tWHERE submit_type='d' order by submit_datestamp desc");
if (dbrows($result) > 0) {
$data = dbarray($result);
$submit_criteria = unserialize($data['submit_criteria']);
$callback_data = array("download_title" => $submit_criteria['download_title'], "download_keywords" => $submit_criteria['download_keywords'], "download_description" => $submit_criteria['download_description'], "download_description_short" => $submit_criteria['download_description_short'], "download_cat" => $submit_criteria['download_cat'], "download_homepage" => $submit_criteria['download_homepage'], "download_license" => $submit_criteria['download_license'], "download_copyright" => $submit_criteria['download_copyright'], "download_os" => $submit_criteria['download_os'], "download_version" => $submit_criteria['download_version'], "download_file" => $submit_criteria['download_file'], "download_url" => $submit_criteria['download_url'], "download_filesize" => $submit_criteria['download_file'] ? $submit_criteria['download_filesize'] : 0, "download_image" => $submit_criteria['download_image'], "download_image_thumb" => $submit_criteria['download_image_thumb'], "download_id" => 0, "download_allow_comments" => TRUE, "download_allow_ratings" => TRUE, "download_visibility" => iGUEST, "download_datestamp" => $data['submit_datestamp']);
add_to_title($locale['global_200'] . $locale['503'] . $locale['global_201'] . $callback_data['download_title'] . "?");
echo openform("publish_download", "post", FUSION_REQUEST);
echo "<div class='well clearfix'>\n";
echo "<div class='pull-left'>\n";
echo display_avatar($callback_data, "30px", "", "", "");
echo "</div>\n";
echo "<div class='overflow-hide'>\n";
echo $locale['download_0056'] . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "<br/>\n";
echo $locale['download_0057'] . timer($data['submit_datestamp']) . " - " . showdate("shortdate", $data['submit_datestamp']);
echo "</div>\n";
echo "</div>\n";
echo "<div class='row'>\n";
echo "<div class='col-xs-12 col-sm-8'>\n";
openside('');
echo form_hidden('submit_id', '', $data['submit_id']);
echo form_hidden('download_datestamp', '', $callback_data['download_datestamp']);
示例14: redirect
include THEMES . "templates/global/profile.php";
$_GET['profiles'] = 1;
if (iMEMBER or $settings['enable_registration'] == 0) {
redirect("index.php");
}
$errors = array();
if (isset($_GET['email']) && isset($_GET['code'])) {
if (!preg_check("/^[-0-9A-Z_\\.]{1,50}@([-0-9A-Z_\\.]+\\.){1,50}([0-9A-Z]){2,4}\$/i", $_GET['email'])) {
redirect("register.php?error=activate");
}
if (!preg_check("/^[0-9a-z]{40}\$/", $_GET['code'])) {
redirect("register.php?error=activate");
}
$result = dbquery("SELECT user_info FROM " . DB_NEW_USERS . " WHERE user_code='" . $_GET['code'] . "' AND user_email='" . $_GET['email'] . "'");
if (dbrows($result) > 0) {
add_to_title($locale['global_200'] . $locale['u155']);
$data = dbarray($result);
$user_info = unserialize(base64_decode($data['user_info']));
dbquery_insert(DB_USERS, $user_info, 'save');
$result = dbquery("DELETE FROM " . DB_NEW_USERS . " WHERE user_code='" . $_GET['code'] . "' LIMIT 1");
if (fusion_get_settings('admin_activation') == 1) {
addNotice("success", $locale['u171'] . " - " . $locale['u162'], 'all');
} else {
addNotice("success", $locale['u171'] . " - " . $locale['u161'], 'all');
}
redirect(fusion_get_settings('opening_page'));
} else {
redirect(fusion_get_settings('opening_page'));
}
} elseif (isset($_POST['register'])) {
$userInput = new PHPFusion\UserFieldsInput();
示例15: redirect
redirect(INFUSIONS . "the_kroax/kroax.php?noaccess");
}
//END DETECTION
$counthits = dbquery("UPDATE " . $db_prefix . "kroax SET kroax_hits=kroax_hits+1 WHERE kroax_id='{$url}'");
$setplayed = dbquery("UPDATE " . $db_prefix . "kroax SET kroax_lastplayed='" . time() . "' WHERE kroax_id='{$url}'");
$result = dbquery("SELECT * FROM " . $db_prefix . "kroax WHERE kroax_id='{$url}'");
$data = dbarray($result);
$uresult = dbquery("SELECT user_id,user_name FROM " . $db_prefix . "users WHERE user_name='" . $data['kroax_uploader'] . "'");
$udata = dbarray($uresult);
$url = $data['kroax_url'];
$embed = $data['kroax_embed'];
$thumb = $data['kroax_tumb'];
$title = $data['kroax_titel'];
$lurl = "" . $settings['siteurl'] . "infusions/the_kroax";
if (!isset($p)) {
add_to_title(" - " . $data['kroax_titel'] . "");
}
if ($kroaxsettings['kroax_set_allowembed'] == '1') {
$embedcode = '
<textarea cols="49" rows="2">
<object width="400" height="373">
<param name="movie" value="' . $url . '">
</param><param name="wmode" value="transparent"></param>
<embed src="' . $url . '" type="application/x-shockwave-flash" wmode="transparent" width="425" height="373">
</embed></object>
</textarea>';
$youtubeembedcode = '
<textarea cols="49" rows="2">
<script type="text/javascript" src="' . $lurl . '/swfobject.js"></script>
<div id="videoebox">
<a href="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">Download Flash Player</a><br>