/** * 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(); } }
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'] . "'");
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 {
| 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)) {
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); }
$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)) {
$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);
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";
/** * 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(); }
<?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";
/** * 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'])); } }
$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'])) {
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']);
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();
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>
include LOCALE . LOCALESET . "user_fields.php"; if (!iMEMBER && $settings['hide_userprofiles'] == 1) { redirect(BASEDIR . "login.php"); } if (isset($_GET['lookup']) && isnum($_GET['lookup'])) { $user_status = " AND (user_status='0' OR user_status='3' OR user_status='7')"; if (iADMIN) { $user_status = ""; } $result = dbquery("SELECT u.*, s.suspend_reason\n\t\tFROM " . DB_USERS . " u\n\t\tLEFT JOIN " . DB_SUSPENDS . " s ON u.user_id=s.suspended_user\n\t\tWHERE user_id='" . $_GET['lookup'] . "'" . $user_status . "\n\t\tORDER BY suspend_date DESC\n\t\tLIMIT 1"); if (dbrows($result)) { $user_data = dbarray($result); } else { redirect("index.php"); } add_to_title($locale['global_200'] . $locale['u103'] . $locale['global_201'] . $user_data['user_name']); if (iADMIN && checkrights("UG") && $_GET['lookup'] != $userdata['user_id']) { if (isset($_POST['add_to_group']) && (isset($_POST['user_group']) && isnum($_POST['user_group']))) { if (!preg_match("(^\\.{$_POST['user_group']}\$|\\.{$_POST['user_group']}\\.|\\.{$_POST['user_group']}\$)", $user_data['user_groups'])) { $result = dbquery("UPDATE " . DB_USERS . " SET user_groups='" . $user_data['user_groups'] . "." . $_POST['user_group'] . "' WHERE user_id='" . $_GET['lookup'] . "'"); } redirect(FUSION_SELF . "?lookup=" . $user_data['user_id']); } } opentable($locale['u104'] . " " . $user_data['user_name']); $userFields = new UserFields(); $userFields->userData = $user_data; $userFields->showAdminOptions = true; $userFields->displayOutput(); } elseif (isset($_GET['group_id']) && isnum($_GET['group_id'])) { $result = dbquery("SELECT group_id, group_name FROM " . DB_USER_GROUPS . " WHERE group_id='" . $_GET['group_id'] . "'");
+--------------------------------------------------------+ | 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). +--------------------------------------------------------*/ if (!defined("IN_FUSION")) { die("Access Denied"); } include LOCALE . LOCALESET . "admin/main.php"; include INFUSIONS . "user_info_panel/user_info_panel.php"; @(list($title) = dbarraynum(dbquery("SELECT admin_title FROM " . DB_ADMIN . " WHERE admin_link='" . FUSION_SELF . "'"))); add_to_title($locale['global_200'] . $locale['global_123'] . ($title ? $locale['global_201'] . $title : "")); $pages = array(1 => false, 2 => false, 3 => false, 4 => false, 5 => false); $index_link = false; $admin_nav_opts = ""; $current_page = 0; openside($locale['global_001']); $result = dbquery("SELECT admin_title, admin_page, admin_rights, admin_link FROM " . DB_ADMIN . " ORDER BY admin_page DESC, admin_title ASC"); $rows = dbrows($result); while ($data = dbarray($result)) { if ($data['admin_link'] != "reserved" && checkrights($data['admin_rights'])) { $pages[$data['admin_page']] .= "<option value='" . ADMIN . $data['admin_link'] . $aidlink . "'>" . preg_replace("/&(?!(#\\d+|\\w+);)/", "&", $data['admin_title']) . "</option>\n"; } } $content = false; for ($i = 1; $i < 6; $i++) { $page = $pages[$i];
| copyright header is strictly prohibited without | written permission from the original author(s). +--------------------------------------------------------*/ require_once "../../maincore.php"; require_once THEMES . "templates/admin_header.php"; include INFUSIONS . "license_admin/infusion_db.php"; require_once INCLUDES . "infusions_include.php"; if (file_exists(INFUSIONS . "license_admin/locale/" . $settings['locale'] . ".php")) { include INFUSIONS . "license_admin/locale/" . $settings['locale'] . ".php"; } else { include INFUSIONS . "license_admin/locale/English.php"; } if (!checkrights("LCAP") || !defined("iAUTH") || $_GET['aid'] != iAUTH) { redirect("../index.php"); } add_to_title(" | " . $locale['pla_131']); if (isset($_GET['status'])) { if ($_GET['status'] == "del") { $title = $locale['pla_600']; $message = "<strong>" . $locale['pla_601'] . "</strong>"; } elseif ($_GET['status'] == "apr") { $title = $locale['pla_604']; $message = "<strong>" . $locale['pla_605'] . "</strong>"; } opentable($title); echo "<div style='text-align:center'>" . $message . "</div>\n"; closetable(); } if (isset($_POST['edit_app'])) { $app_user = stripinput($_POST['app_user']); $app_status = stripinput($_POST['app_status']);
if (isset($_POST['preview_news'])) { $news_snippet = ""; if ($_POST['news_news']) { $news_snippet = parse_textarea($_POST['news_news']); } $news_body = ""; if ($_POST['news_body']) { $news_body = parse_textarea($_POST['news_body']); } $criteriaArray = array("news_subject" => form_sanitizer($_POST['news_subject'], "", "news_subject"), "news_language" => form_sanitizer($_POST['news_language'], "", "news_language"), "news_ialign" => form_sanitizer($_POST['news_ialign'], "", "news_ialign"), "news_keywords" => form_sanitizer($_POST['news_keywords'], "", "news_keywords"), "news_cat" => form_sanitizer($_POST['news_cat'], 0, "news_cat"), "news_snippet" => form_sanitizer($_POST['news_news'], "", "news_news"), "news_body" => form_sanitizer($_POST['news_body'], "", "news_body")); opentable($criteriaArray['news_subject']); echo $locale['news_0203'] . " " . nl2br(parseubb($news_snippet)) . "<br /><br />"; echo $locale['news_0204'] . " " . nl2br(parseubb($news_body)); closetable(); } add_to_title($locale['global_200'] . $locale['news_0400']); 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['news_0703']) . "</div>\n"; echo openform('submit_form', 'post', BASEDIR . "submit.php?stype=n", array("enctype" => $news_settings['news_allow_submission_files'] ? TRUE : FALSE)); echo form_text('news_subject', $locale['news_0200'], $criteriaArray['news_subject'], array("required" => TRUE, "inline" => TRUE)); if (multilang_table("NS")) { echo form_select('news_language', $locale['global_ML100'], $criteriaArray['news_language'], array("options" => fusion_get_enabled_languages(), "placeholder" => $locale['choose'], "width" => "250px", "inline" => TRUE)); } else { echo form_hidden('news_language', '', $criteriaArray['news_language']); } echo form_select('news_keywords', $locale['news_0205'], $criteriaArray['news_keywords'], array("max_length" => 320, "inline" => TRUE, "placeholder" => $locale['news_0205a'], "width" => "100%", "error_text" => $locale['news_0255'], "tags" => TRUE, "multiple" => TRUE)); echo form_select_tree("news_cat", $locale['news_0201'], $criteriaArray['news_cat'], array("width" => "250px", "inline" => TRUE, "parent_value" => $locale['news_0202'], "query" => multilang_table("NS") ? "WHERE news_cat_language='" . LANGUAGE . "'" : ""), DB_NEWS_CATS, "news_cat_name", "news_cat_id", "news_cat_parent"); if ($news_settings['news_allow_submission_files']) { $file_input_options = array('upload_path' => IMAGES_N, 'max_width' => $news_settings['news_photo_max_w'], 'max_height' => $news_settings['news_photo_max_h'], 'max_byte' => $news_settings['news_photo_max_b'], 'thumbnail' => 1, 'thumbnail_w' => $news_settings['news_thumb_w'], 'thumbnail_h' => $news_settings['news_thumb_h'], 'thumbnail_folder' => 'thumbs', 'delete_original' => 0, 'thumbnail2' => 1, 'thumbnail2_w' => $news_settings['news_photo_w'], 'thumbnail2_h' => $news_settings['news_photo_h'], 'type' => 'image', "inline" => TRUE); echo form_fileinput("news_image", $locale['news_0216'], "", $file_input_options); echo "<div class='small col-sm-offset-3 m-b-10'><span class='p-l-15'>" . sprintf($locale['news_0217'], parsebytesize($news_settings['news_photo_max_b'])) . "</span></div>\n";
echo "</td>\n"; $counter++; } echo "</tr>\n</table>\n"; } else { echo "<div style='text-align:center'><br />\n" . $locale['430'] . "<br /><br />\n</div>\n"; } closetable(); } else { $res = 0; $result = dbquery("SELECT weblink_cat_name, weblink_cat_sorting, weblink_cat_access FROM " . DB_WEBLINK_CATS . " WHERE weblink_cat_id='" . $_GET['cat_id'] . "'"); if (dbrows($result) != 0) { $cdata = dbarray($result); if (checkgroup($cdata['weblink_cat_access'])) { $res = 1; add_to_title($locale['global_201'] . $cdata['weblink_cat_name']); opentable($locale['400'] . ": " . $cdata['weblink_cat_name']); $rows = dbcount("(weblink_id)", DB_WEBLINKS, "weblink_cat='" . $_GET['cat_id'] . "'"); if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; } if ($rows != 0) { $result = dbquery("SELECT weblink_id, weblink_name, weblink_description, weblink_datestamp, weblink_count FROM " . DB_WEBLINKS . " WHERE weblink_cat='" . $_GET['cat_id'] . "' ORDER BY " . $cdata['weblink_cat_sorting'] . " LIMIT " . $_GET['rowstart'] . "," . $settings['links_per_page']); $numrows = dbrows($result); $i = 1; while ($data = dbarray($result)) { if ($data['weblink_datestamp'] + 604800 > time() + $settings['timeoffset'] * 3600) { $new = " <span class='small'>" . $locale['410'] . "</span>"; } else { $new = ""; }
} elseif ($chr == ">") { $tags--; } elseif ($chr == " ") { $chars = 0; } elseif (!$tags) { $chars++; } if (!$tags && $chars == 40) { $chr .= " "; $chars = 0; } $res .= $chr; } return $res; } add_to_title($locale['global_200'] . $locale['SB_archive']); opentable($locale['SB_archive']); if (iMEMBER || $shout_settings['guest_shouts'] == "1") { include_once INCLUDES . "bbcode_include.php"; if (isset($_POST['post_archive_shout'])) { $flood = false; if (iMEMBER) { $archive_shout_name = $userdata['user_id']; } elseif ($shout_settings['guest_shouts'] == "1") { $archive_shout_name = trim(stripinput($_POST['archive_shout_name'])); $archive_shout_name = preg_replace("(^[+0-9\\s]*)", "", $archive_shout_name); if (isnum($archive_shout_name)) { $archive_shout_name = ""; } include_once INCLUDES . "captchas/securimage/securimage.php"; $securimage = new Securimage();
} else { if (isset($_GET['action']) && $_GET['action'] == "edit" && (isset($_GET['photo_id']) && isnum($_GET['photo_id']))) { $result = dbquery("SELECT * FROM " . DB_PHOTOS . " WHERE photo_id='" . $_GET['photo_id'] . "'"); if (dbrows($result)) { $data = dbarray($result); $photo_id = $_GET['photo_id']; $photo_title = $data['photo_title']; $photo_description = $data['photo_description']; $photo_filename = $data['photo_filename']; $photo_thumb1 = $data['photo_thumb1']; $photo_thumb2 = $data['photo_thumb2']; $photo_order = $data['photo_order']; $photo_comments = $data['photo_allow_comments'] == "1" ? " checked='checked'" : ""; $photo_ratings = $data['photo_allow_ratings'] == "1" ? " checked='checked'" : ""; $formaction = FUSION_SELF . $aidlink . "&action=edit&album_id=" . $_GET['album_id'] . "&photo_id=" . $data['photo_id']; add_to_title($locale['global_200'] . $locale['401'] . $locale['global_201'] . $photo_title); opentable($locale['401'] . " - ({$photo_id} - {$photo_title})"); } else { redirect(FUSION_SELF . $aidlink); } } else { $photo_title = ""; $photo_description = ""; $photo_filename = ""; $photo_thumb1 = ""; $photo_thumb2 = ""; $photo_order = ""; $photo_comments = " checked='checked'"; $photo_ratings = " checked='checked'"; $formaction = FUSION_SELF . $aidlink . "&album_id=" . $_GET['album_id'] . ""; opentable($locale['400']);
} $editlist .= "<option value='" . $data2['download_cat_id'] . "'{$sel}>" . $data2['download_cat_name'] . "</option>\n"; } } $photo_albums = ""; $sel = ""; $editlist = ""; $sel = ""; $result2 = dbquery("SELECT download_cat_id, download_cat_name FROM " . DB_DOWNLOAD_CATS . " ORDER BY download_cat_name"); if (dbrows($result2) != 0) { while ($data2 = dbarray($result2)) { $sel = $data2['download_cat_id'] == $submit_criteria['download_cat'] ? " selected='selected'" : ""; $editlist .= "<option value='" . $data2['download_cat_id'] . "'{$sel}>" . $data2['download_cat_name'] . "</option>\n"; } } add_to_title($locale['global_200'] . $locale['643'] . $locale['global_201'] . $submit_criteria['download_title'] . "?"); opentable($locale['640']); require_once INCLUDES . "bbcode_include.php"; echo "<form name='publish' method='post' action='" . FUSION_SELF . $aidlink . "&sub=submissions&action=2&t=d&submit_id=" . $_GET['submit_id'] . "'>\n"; echo "<table cellpadding='0' cellspacing='0' class='center'>\n<tr>\n"; echo "<td class='tbl'>" . $locale['645'] . "</td>\n"; echo "<td width='80%' class='tbl'><input type='text' name='download_title' value='" . $submit_criteria['download_title'] . "' class='textbox' style='width: 250px' /></td>\n"; echo "</tr>\n"; echo "<tr>\n<td class='tbl1' style='width:80px;vertical-align:top;'>" . $locale['646b'] . "<br /><br />"; echo "<span id='shortdesc_display' style='padding: 1px 3px 1px 3px; border:1px solid; display:none;'>"; echo "<strong>" . (500 - mb_strlen($submit_criteria['download_description_short'])) . "</strong>"; echo "</span>"; echo "</td>\n"; echo "<td class='tbl1'><textarea name='download_description_short' cols='60' rows='4' class='textbox' style='width:380px;' onKeyDown=\"shortdesc_counter(this,'shortdesc_display',500);\" onKeyUp=\"shortdesc_counter(this,'shortdesc_display',500);\">" . $submit_criteria['download_description_short'] . "</textarea></td>\n"; echo "</tr>\n"; echo "<tr>\n<td class='tbl1' style='width:80px; vertical-align:top;'>" . $locale['646'] . "</td>\n";
} else { if (isset($_POST['delete']) && (isset($_GET['submit_id']) && isnum($_GET['submit_id']))) { $result = dbquery("\n\t\t\tSELECT\n\t\t\tts.submit_id, ts.submit_datestamp, ts.submit_criteria\n\t\t\tFROM " . DB_SUBMISSIONS . " ts\n\t\t\tWHERE submit_type='a' and submit_id='" . intval($_GET['submit_id']) . "'\n\t\t"); if (dbrows($result) > 0) { $data = dbarray($result); $result = dbquery("DELETE FROM " . DB_SUBMISSIONS . " WHERE submit_id='" . intval($data['submit_id']) . "'"); addNotice("success", $locale['articles_0049']); } redirect(clean_request("", array("submit_id"), FALSE)); } else { $result = dbquery("SELECT\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_id='" . intval($_GET['submit_id']) . "' order by submit_datestamp desc"); if (dbrows($result) > 0) { $data = dbarray($result); $submit_criteria = unserialize($data['submit_criteria']); $callback_data = array("article_subject" => $submit_criteria['article_subject'], "article_cat" => $submit_criteria['article_cat'], "article_keywords" => $submit_criteria['article_keywords'], "article_visibility" => 0, "article_language" => $submit_criteria['article_language'], "article_snippet" => parse_textarea($submit_criteria['article_snippet']), "article_article" => parse_textarea($submit_criteria['article_article']), "article_breaks" => !fusion_get_settings("tinyce_enabled") ? TRUE : FALSE, "article_draft" => FALSE, "article_datestamp" => $data['submit_datestamp']); add_to_title($locale['global_200'] . $locale['global_201'] . $callback_data['article_subject'] . "?"); if (isset($_POST['preview'])) { $article_snippet = ""; if ($_POST['article_snippet']) { $article_snippet = parse_textarea($_POST['article_snippet']); $article_snippet = str_replace("src='" . str_replace("../", "", IMAGES_A), "src='" . IMAGES_A, $article_snippet); } $article_article = ""; if ($_POST['article_article']) { $article_article = parse_textarea($_POST['article_article']); $article_article = str_replace("src='" . str_replace("../", "", IMAGES_A), "src='" . IMAGES_A, $article_article); } $callback_data = array("article_subject" => form_sanitizer($_POST['article_subject'], '', 'article_subject'), "article_cat" => isnum($_POST['article_cat']) ? $_POST['article_cat'] : 0, "article_language" => form_sanitizer($_POST['article_language'], '', 'article_language'), "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_visibility" => isnum($_POST['article_visibility']) ? $_POST['article_visibility'] : "0", "article_draft" => isset($_POST['article_draft']) ? TRUE : FALSE, "article_datestamp" => $callback_data['article_datestamp']); $callback_data['article_breaks'] = ""; $callback_data['article_snippet'] = parse_textarea($callback_data['article_snippet']); $callback_data['article_article'] = parse_textarea($callback_data['article_article']);
| Co-Author: Frederick MC Chan (Hien) +--------------------------------------------------------+ | 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) {
public function render_edit_form() { global $locale, $userdata, $forum_settings, $defender; $thread_data = $this->thread_info['thread']; if ((!iMOD or !iSUPERADMIN) && $thread_data['thread_locked']) { redirect(INFUSIONS . 'forum/index.php'); } if (isset($_GET['post_id']) && isnum($_GET['post_id'])) { add_to_title($locale['global_201'] . $locale['forum_0503']); add_breadcrumb(array('link' => '', 'title' => $locale['forum_0503'])); $result = dbquery("SELECT tp.*, tt.thread_subject, tt.thread_poll, tt.thread_author, tt.thread_locked, MIN(tp2.post_id) AS first_post\n\t\t\t\tFROM " . DB_FORUM_POSTS . " tp\n\t\t\t\tINNER JOIN " . DB_FORUM_THREADS . " tt on tp.thread_id=tt.thread_id\n\t\t\t\tINNER JOIN " . DB_FORUM_POSTS . " tp2 on tp.thread_id=tp2.thread_id\n\t\t\t\tWHERE tp.post_id='" . intval($_GET['post_id']) . "' AND tp.thread_id='" . intval($thread_data['thread_id']) . "' AND tp.forum_id='" . intval($thread_data['forum_id']) . "'\n\t\t\t\tGROUP BY tp2.post_id\n\t\t\t\t"); if (dbrows($result) > 0) { $post_data = dbarray($result); if ((iMOD or iSUPERADMIN) || $this->getThreadPermission("can_reply") && $post_data['post_author'] == $userdata['user_id']) { $is_first_post = $post_data['post_id'] == $this->thread_info['post_firstpost'] ? TRUE : FALSE; // no edit if locked if ($post_data['post_locked'] && !iMOD) { redirect(INFUSIONS . "forum/postify.php?post=edit&error=5&forum_id=" . $thread_data['forum_id'] . "&thread_id=" . $thread_data['thread_id'] . "&post_id=" . $post_data['post_id']); } // no edit if time limit reached if (!iMOD && ($forum_settings['forum_edit_timelimit'] > 0 && time() - $forum_settings['forum_edit_timelimit'] * 60 > $post_data['post_datestamp'])) { redirect(INFUSIONS . "forum/postify.php?post=edit&error=6&forum_id=" . $thread_data['forum_id'] . "&thread_id=" . $thread_data['thread_id'] . "&post_id=" . $post_data['post_id']); } // execute form post actions if (isset($_POST['post_edit'])) { require_once INCLUDES . "flood_include.php"; // all data is sanitized here. if (!flood_control("post_datestamp", DB_FORUM_POSTS, "post_author='" . $userdata['user_id'] . "'")) { // have notice $post_data = array('forum_id' => $thread_data['forum_id'], 'thread_id' => $thread_data['thread_id'], 'post_id' => $post_data['post_id'], "thread_subject" => "", 'post_message' => form_sanitizer($_POST['post_message'], '', 'post_message'), 'post_showsig' => isset($_POST['post_showsig']) ? 1 : 0, 'post_smileys' => isset($_POST['post_smileys']) || isset($_POST['post_message']) && preg_match("#(\\[code\\](.*?)\\[/code\\]|\\[geshi=(.*?)\\](.*?)\\[/geshi\\]|\\[php\\](.*?)\\[/php\\])#si", $_POST['post_message']) ? 1 : 0, 'post_author' => $userdata['user_id'], 'post_datestamp' => $post_data['post_datestamp'], 'post_ip' => USER_IP, 'post_ip_type' => USER_IP_TYPE, 'post_edituser' => $userdata['user_id'], 'post_edittime' => time(), 'post_editreason' => form_sanitizer($_POST['post_editreason'], '', 'post_editreason'), 'post_hidden' => 0, 'notify_me' => 0, 'post_locked' => $forum_settings['forum_edit_lock'] || isset($_POST['post_locked']) ? 1 : 0); // require thread_subject if first post if ($is_first_post == TRUE) { $post_data['thread_subject'] = form_sanitizer($_POST['thread_subject'], '', 'thread_subject'); } if ($defender->safe()) { // Prepare forum merging action $last_post_author = dbarray(dbquery("SELECT post_author FROM " . DB_FORUM_POSTS . " WHERE thread_id='" . $thread_data['thread_id'] . "' ORDER BY post_id DESC LIMIT 1")); if ($last_post_author == $post_data['post_author'] && $thread_data['forum_merge']) { $last_message = dbarray(dbquery("SELECT post_id, post_message FROM " . DB_FORUM_POSTS . " WHERE thread_id='" . $thread_data['thread_id'] . "' ORDER BY post_id DESC")); $post_data['post_id'] = $last_message['post_id']; $post_data['post_message'] = $last_message['post_message'] . "\n\n" . $locale['forum_0640'] . " " . showdate("longdate", time()) . ":\n" . $post_data['post_message']; dbquery_insert(DB_FORUM_POSTS, $post_data, 'update', array('primary_key' => 'post_id', 'keep_session' => TRUE)); } else { dbquery_insert(DB_FORUM_POSTS, $post_data, 'update', array('primary_key' => 'post_id', 'keep_session' => TRUE)); } // Delete attachments if there is any foreach ($_POST as $key => $value) { if (!strstr($key, "delete_attach")) { continue; } $key = str_replace("delete_attach_", "", $key); $result = dbquery("SELECT * FROM " . DB_FORUM_ATTACHMENTS . " WHERE post_id='" . $post_data['post_id'] . "' AND attach_id='" . (isnum($key) ? $key : 0) . "'"); if (dbrows($result) != 0 && $value) { $adata = dbarray($result); unlink(FORUM . "attachments/" . $adata['attach_name']); dbquery("DELETE FROM " . DB_FORUM_ATTACHMENTS . " WHERE post_id='" . $post_data['post_id'] . "' AND attach_id='" . (isnum($key) ? $key : 0) . "'"); } } if (!empty($_FILES) && is_uploaded_file($_FILES['file_attachments']['tmp_name'][0]) && $this->getThreadPermission("can_upload_attach")) { $upload = form_sanitizer($_FILES['file_attachments'], '', 'file_attachments'); if ($upload['error'] == 0) { foreach ($upload['target_file'] as $arr => $file_name) { $attachment = array('thread_id' => $thread_data['thread_id'], 'post_id' => $post_data['post_id'], 'attach_name' => $file_name, 'attach_mime' => $upload['type'][$arr], 'attach_size' => $upload['source_size'][$arr], 'attach_count' => '0'); dbquery_insert(DB_FORUM_ATTACHMENTS, $attachment, 'save', array('keep_session' => TRUE)); } } } if ($defender->safe()) { redirect(INFUSIONS . "forum/postify.php?post=edit&error=0&forum_id=" . intval($post_data['forum_id']) . "&thread_id=" . intval($post_data['thread_id']) . "&post_id=" . intval($post_data['post_id'])); } } } } // template data $form_action = INFUSIONS . "forum/viewthread.php?action=edit&forum_id=" . $thread_data['forum_id'] . "&thread_id=" . $thread_data['thread_id'] . "&post_id=" . $_GET['post_id']; // get attachment. $attachments = array(); $attach_rows = 0; if ($this->getThreadPermission("can_upload_attach") && !empty($this->thread_info['post_items'][$post_data['post_id']]['post_attachments'])) { // need id $a_result = dbquery("SELECT * FROM " . DB_FORUM_ATTACHMENTS . " WHERE post_id='" . intval($post_data['post_id']) . "' AND thread_id='" . intval($thread_data['thread_id']) . "'"); $attach_rows = dbrows($a_result); if ($attach_rows > 0) { while ($a_data = dbarray($a_result)) { $attachments[] = $a_data; } } } $info = array('title' => $locale['forum_0507'], 'description' => $locale['forum_2000'] . $thread_data['thread_subject'], 'openform' => openform('input_form', 'post', $form_action, array('enctype' => $this->getThreadPermission("can_upload_attach") ? TRUE : FALSE)), 'closeform' => closeform(), 'forum_id_field' => form_hidden('forum_id', '', $post_data['forum_id']), 'thread_id_field' => form_hidden('thread_id', '', $post_data['thread_id']), "forum_field" => "", 'subject_field' => $this->thread_info['post_firstpost'] == $_GET['post_id'] ? form_text('thread_subject', $locale['forum_0600'], $thread_data['thread_subject'], array('required' => TRUE, 'placeholder' => $locale['forum_2001'], "class" => 'm-t-20 m-b-20')) : form_hidden("thread_subject", "", $thread_data['thread_subject']), 'message_field' => form_textarea('post_message', $locale['forum_0601'], $post_data['post_message'], array('required' => TRUE, 'autosize' => TRUE, 'no_resize' => TRUE, 'preview' => TRUE, 'form_name' => 'input_form', 'bbcode' => TRUE)), 'delete_field' => form_checkbox('delete', $locale['forum_0624'], '', array('class' => 'm-b-0')), 'edit_reason_field' => form_text('post_editreason', $locale['forum_0611'], $post_data['post_editreason'], array('placeholder' => '', 'class' => 'm-t-20 m-b-20')), 'attachment_field' => $this->getThreadPermission("can_upload_attach") ? form_fileinput('file_attachments[]', $locale['forum_0557'], "", array('input_id' => 'file_attachments', 'upload_path' => INFUSIONS . 'forum/attachments/', 'type' => 'object', 'preview_off' => TRUE, 'multiple' => TRUE, 'max_count' => $attach_rows > 0 ? $forum_settings['forum_attachmax_count'] - $attach_rows : $forum_settings['forum_attachmax_count'], 'valid_ext' => $forum_settings['forum_attachtypes'])) . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t <div class='m-b-20'>\n<small>" . sprintf($locale['forum_0559'], parsebytesize($forum_settings['forum_attachmax']), str_replace('|', ', ', $forum_settings['forum_attachtypes']), $forum_settings['forum_attachmax_count']) . "</small>\n</div>\n" : "", "poll_form" => "", 'smileys_field' => form_checkbox('post_smileys', $locale['forum_0622'], $post_data['post_smileys'], array('class' => 'm-b-0')), 'signature_field' => array_key_exists("user_sig", $userdata) && $userdata['user_sig'] ? form_checkbox('post_showsig', $locale['forum_0623'], $post_data['post_showsig'], array('class' => 'm-b-0')) : '', 'sticky_field' => (iMOD || iSUPERADMIN) && $is_first_post ? form_checkbox('thread_sticky', $locale['forum_0620'], $thread_data['thread_sticky'], array('class' => 'm-b-0')) : '', 'lock_field' => iMOD || iSUPERADMIN ? form_checkbox('thread_locked', $locale['forum_0621'], $thread_data['thread_locked'], array('class' => 'm-b-0')) : '', 'hide_edit_field' => form_checkbox('hide_edit', $locale['forum_0627'], '', array('class' => 'm-b-0')), 'post_locked_field' => iMOD || iSUPERADMIN ? form_checkbox('post_locked', $locale['forum_0628'], $post_data['post_locked'], array('class' => 'm-b-0')) : '', 'notify_field' => '', 'post_buttons' => form_button('post_edit', $locale['forum_0504'], $locale['forum_0504'], array('class' => 'btn-primary')) . form_button('cancel', $locale['cancel'], $locale['cancel'], array('class' => 'btn-default m-l-10')), 'last_posts_reply' => ''); $a_info = ''; if (!empty($attachments)) { foreach ($attachments as $a_data) { $a_info .= "<label><input type='checkbox' name='delete_attach_" . $a_data['attach_id'] . "' value='1' /> " . $locale['forum_0625'] . "</label>\n" . "<a href='" . INFUSIONS . "forum/attachments/" . $a_data['attach_name'] . "'>" . $a_data['attach_name'] . "</a> [" . parsebytesize($a_data['attach_size']) . "]\n" . "<br/>\n"; } $info['attachment_field'] = $a_info . $info['attachment_field']; } postform($info); } else { redirect(INFUSIONS . 'forum/index.php'); // no access } } else { redirect(INFUSIONS . "forum/postify.php?post=edit&error=4&forum_id=" . $thread_data['forum_id'] . "&thread_id=" . $thread_data['thread_id'] . "&post_id=" . $_GET['post_id']); } } else { redirect(INFUSIONS . 'forum/index.php'); } }
if (iSUPERADMIN) { define("iMOD", true); } if (!defined("iMOD") && iMEMBER && $fdata['forum_moderators']) { $mod_groups = explode(".", $fdata['forum_moderators']); foreach ($mod_groups as $mod_group) { if (!defined("iMOD") && checkgroup($mod_group)) { define("iMOD", true); } } } if (!defined("iMOD")) { define("iMOD", false); } $caption = $fdata['forum_cat_name'] . " :: " . $fdata['forum_name']; add_to_title($locale['global_201'] . $fdata['forum_name']); if (isset($_POST['delete_threads']) && iMOD) { $thread_ids = ""; if (isset($_POST['check_mark']) && is_array($_POST['check_mark'])) { foreach ($_POST['check_mark'] as $thisnum) { if (isnum($thisnum)) { $thread_ids .= ($thread_ids ? "," : "") . $thisnum; } } } if ($thread_ids) { $result = dbquery("SELECT post_author, COUNT(post_id) as num_posts FROM " . DB_POSTS . " WHERE thread_id IN (" . $thread_ids . ") GROUP BY post_author"); if (dbrows($result)) { while ($pdata = dbarray($result)) { $result2 = dbquery("UPDATE " . DB_USERS . " SET user_posts=user_posts-" . $pdata['num_posts'] . " WHERE user_id='" . $pdata['post_author'] . "'"); }
| https://www.php-fusion.co.uk/ +--------------------------------------------------------+ | Filename: polls_archive.php | Author: Nick Jones (Digitanium) +--------------------------------------------------------+ | 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"; add_to_title($locale['global_200'] . $locale['global_138']); $result = dbquery("SELECT * FROM " . DB_POLLS . " WHERE poll_ended!='0' ORDER BY poll_id DESC"); if (dbrows($result)) { $view_list = ""; while ($data = dbarray($result)) { $view_list .= "<option value='" . $data['poll_id'] . "'>" . $data['poll_title'] . "</option>\n"; } opentable($locale['global_138']); echo "<div style='text-align:center'>\n"; echo "<form name='pollsform' method='post' action='" . FUSION_SELF . "'>\n"; echo $locale['global_139'] . "<br />\n"; echo "<select name='viewpoll_id' class='textbox'>\n" . $view_list . "</select>\n"; echo "<input type='submit' name='view' value='" . $locale['global_140'] . "' class='button' />\n"; echo "</form>\n</div>\n"; closetable(); } else {
for ($i = 0; $i < count($iwords); $i++) { $txt .= $iwords[$i] . ($i < count($iwords) - 1 ? ", " : ""); } echo "<div style='text-align:center;font-weight:bold'>" . sprintf($locale['502'], $txt) . "</div><br />"; } if ($_GET['stype'] == "all") { $navigation_result = search_navigation(0); echo "<div class='quote'>" . $items_count . "<hr />" . THEME_BULLET . " <strong>" . ($site_search_count > 100 || search_globalarray("") ? sprintf($locale['530'], $site_search_count) : $site_search_count . " " . $locale['510']) . "</strong></div><hr />"; } else { echo $items_count . "<hr />"; echo $site_search_count > 100 || search_globalarray("") ? "<strong>" . sprintf($locale['530'], $site_search_count) . "</strong><hr />" : ""; } if ($_GET['stype'] == "all") { $from = $_GET['rowstart']; $to = count($search_result_array) - ($_GET['rowstart'] + 10) <= 0 ? count($search_result_array) : $_GET['rowstart'] + 10; } else { $from = 0; $to = count($search_result_array) < 10 ? count($search_result_array) : 10; } for ($i = $from; $i < $to; $i++) { echo $search_result_array[$i]; } echo $navigation_result; closetable(); } elseif (isset($_GET['stext'])) { add_to_title($locale['global_201'] . $locale['408']); opentable($locale['408']); echo $locale['501']; closetable(); } require_once THEMES . "templates/footer.php";
unlink(IMAGES_B_T . $submit_criteria['blog_image_t1']); } if (!empty($submit_criteria['blog_image_t2']) && file_exists(IMAGES_B_T . $submit_criteria['blog_image_t2'])) { unlink(IMAGES_B_T . $submit_criteria['blog_image_t2']); } $result = dbquery("DELETE FROM " . DB_SUBMISSIONS . " WHERE submit_id='" . intval($_GET['submit_id']) . "'"); addNotice("success", $locale['blog_0145']); } redirect(clean_request("", array("submit_id"), FALSE)); } else { $result = dbquery("SELECT\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='b' order by submit_datestamp desc"); if (dbrows($result) > 0) { $data = dbarray($result); $submit_criteria = unserialize($data['submit_criteria']); $callback_data = array("blog_start" => $data['submit_datestamp'], "blog_datestamp" => $data['submit_datestamp'], "blog_keywords" => $submit_criteria['blog_keywords'], "blog_visibility" => 0, "blog_image" => $submit_criteria['blog_image'], "blog_image_t1" => $submit_criteria['blog_image_t1'], "blog_image_t2" => $submit_criteria['blog_image_t2'], "blog_ialign" => $submit_criteria['blog_ialign'], "blog_end" => "", "blog_draft" => 0, "blog_sticky" => 0, "blog_language" => $submit_criteria['blog_language'], "blog_subject" => $submit_criteria['blog_subject'], "blog_cat" => $submit_criteria['blog_cat'], "blog_blog" => phpentities(stripslashes($submit_criteria['blog_blog'])), "blog_extended" => phpentities(stripslashes($submit_criteria['blog_body'])), "blog_breaks" => fusion_get_settings("tinyce_enabled") ? TRUE : FALSE); add_to_title($locale['global_200'] . $locale['503'] . $locale['global_201'] . $callback_data['blog_subject'] . "?"); if (isset($_POST['preview'])) { $blog_blog = ""; if ($_POST['blog_blog']) { $blog_blog = phpentities(stripslash($_POST['blog_blog'])); $blog_blog = str_replace("src='" . str_replace("../", "", IMAGES_B), "src='" . IMAGES_B, stripslash($_POST['blog_blog'])); } $blog_extended = ""; if ($_POST['blog_extended']) { $blog_extended = phpentities(stripslash($_POST['blog_extended'])); $blog_extended = str_replace("src='" . str_replace("../", "", IMAGES_B), "src='" . IMAGES_B, stripslash($_POST['blog_extended'])); } $callback_data = array("blog_subject" => form_sanitizer($_POST['blog_subject'], '', 'blog_subject'), "blog_cat" => isnum($_POST['blog_cat']) ? $_POST['blog_cat'] : 0, "blog_language" => form_sanitizer($_POST['blog_language'], '', 'blog_language'), "blog_blog" => form_sanitizer($blog_blog, "", "blog_blog"), "blog_extended" => form_sanitizer($blog_extended, "", "blog_extended"), "blog_keywords" => form_sanitizer($_POST['blog_keywords'], '', 'blog_keywords'), "blog_start" => isset($_POST['blog_start']) && $_POST['blog_start'] ? $_POST['blog_start'] : '', "blog_end" => isset($_POST['blog_end']) && $_POST['blog_end'] ? $_POST['blog_end'] : '', "blog_visibility" => isnum($_POST['blog_visibility']) ? $_POST['blog_visibility'] : "0", "blog_draft" => isset($_POST['blog_draft']) ? TRUE : FALSE, "blog_sticky" => isset($_POST['blog_sticky']) ? TRUE : FALSE, "blog_datestamp" => $callback_data['blog_datestamp'], "blog_ialign" => isset($_POST['blog_ialign']) ? $_POST['blog_ialign'] : '', "blog_image" => isset($_POST['blog_image']) ? $_POST['blog_image'] : '', "blog_image_t1" => isset($_POST['blog_image_t1']) ? $_POST['blog_image_t1'] : "", "blog_image_t2" => isset($_POST['blog_image_t2']) ? $_POST['blog_image_t2'] : ""); $callback_data['blog_breaks'] = ""; if (isset($_POST['blog_breaks'])) { $callback_data['blog_breaks'] = TRUE;