function render_article($subject, $article, $info) { global $locale; $category = "<a href='" . INFUSIONS . "articles/articles.php?cat_id=" . $info['cat_id'] . "'>" . $info['cat_name'] . "</a>\n"; $comment = "<a href='" . INFUSIONS . "articles/articles.php?article_id=" . $info['article_id'] . "#comments'> " . format_word($info['article_comments'], $locale['fmt_comment']) . " </a>\n"; echo render_breadcrumbs(); echo "<!--pre_article-->"; echo "<article>\n"; echo "<div class='news-action text-right'>"; echo "<a title='" . $locale['global_075'] . "' href='" . BASEDIR . "print.php?type=A&item_id=" . $info['article_id'] . "'><i class='entypo print'></i></a>"; echo !empty($info['edit_link']) ? "<a href='" . $info['edit_link'] . "' title='" . $locale['global_076'] . "' /><i class='entypo pencil'></i></a>\n" : ''; echo "</div>\n"; echo "<div class='news-info'>" . ucfirst($locale['posted']) . " <span class='news-date'>" . showdate("%d %b %Y", $info['article_date']) . "</span> " . $locale['in'] . " {$category} " . $locale['and'] . " {$comment}</div>\n"; echo "<h2 class='news-title'>{$subject}</h2>"; echo "<div class='article'>\n"; echo ($info['article_breaks'] == "y" ? nl2br($article) : $article) . "<br />\n"; echo "</div>\n"; echo "<hr />\n"; echo "<div class='news-user-info clearfix m-b-10'>\n"; echo "<h4>" . $locale['about'] . " <a href='" . BASEDIR . "profile.php?lookup=" . $info['user_id'] . "'>" . $info['user_name'] . "</a>\n</h4>"; echo "<div class='pull-left m-r-10'>" . display_avatar($info, '80px') . "</div>\n"; echo "<strong>" . getuserlevel($info['user_level']) . "</strong><br/>\n"; echo "<strong>" . $locale['joined'] . showdate('newsdate', $info['user_joined']) . "</strong><br/>\n"; echo "</div>\n"; echo "</article>"; echo "<!--sub_article-->"; echo $info['page_nav']; echo "<hr />\n"; if ($info['article_allow_comments']) { showcomments("A", DB_ARTICLES, "article_id", $_GET['article_id'], INFUSIONS . "articles/articles.php?article_id=" . $_GET['article_id']); } if ($info['article_allow_ratings']) { showratings("A", $_GET['article_id'], INFUSIONS . "articles/articles.php?article_id=" . $_GET['article_id']); } }
function rss_icon($feed_name, $feed_updfrq, $feed_icon = "", $language = "all", $exists = false) { if ($exists) { $rows = true; } else { $result = dbquery("SELECT feed_name FROM " . DB_SS_FEEDS . " WHERE feed_name='" . $feed_name . "'"); $rows = dbrows($result); } if (IF_MULTI_LANGUAGE && $language) { $language = $language; } else { $language = false; } $feed_language = $language ? "_" . strtolower($language) : ""; if ($rows != 0) { if (!file_exists(INFUSIONS . "ss_feeds_panel/rss/" . $feed_name . "" . $feed_language . ".rss") or file_exists(INFUSIONS . "ss_feeds_panel/rss/" . $feed_name . "" . $feed_language . ".rss") && time() - filemtime(INFUSIONS . "ss_feeds_panel/rss/" . $feed_name . "" . $feed_language . ".rss") > round($feed_updfrq) * (60 * 60)) { make_rss($feed_name, $feed_updfrq, $language, true); } if (file_exists(INFUSIONS . "ss_feeds_panel/locale/" . LOCALESET . "feeds/" . $feed_name . ".php")) { include INFUSIONS . "ss_feeds_panel/locale/" . LOCALESET . "feeds/" . $feed_name . ".php"; } else { include INFUSIONS . "ss_feeds_panel/locale/English/feeds/" . $feed_name . ".php"; } $rssfiledate = showdate("longdate", filemtime(INFUSIONS . "ss_feeds_panel/rss/" . $feed_name . "" . $feed_language . ".rss")); if ($feed_icon != "") { $icon_feed = INFUSIONS . "ss_feeds_panel/images/icon/" . $feed_icon; } else { $icon_feed = INFUSIONS . "ss_feeds_panel/images/icon/feed_icon01.png"; } $icon_size = @getimagesize($icon_feed); echo "<a href='" . INFUSIONS . "ss_feeds_panel/rss/" . $feed_name . "" . $feed_language . ".rss' target='_blank'>\n"; echo "\t<img src='" . $icon_feed . "' title='" . $locale['feeds_title'] . " - " . $rssfiledate . "' alt='" . $locale['feeds_title'] . " - " . $rssfiledate . "' style='vertical-align: top; width:" . $icon_size[0] . "px; height:" . $icon_size[1] . "px; border: 0pt none;' />\n"; echo "</a>\n"; } }
function showratings($rating_type, $rating_item_id, $rating_link) { global $locale, $userdata; $settings = \fusion_get_settings(); if ($settings['ratings_enabled'] == "1") { if (iMEMBER) { $d_rating = dbarray(dbquery("SELECT rating_vote,rating_datestamp FROM " . DB_RATINGS . " WHERE rating_item_id='" . $rating_item_id . "' AND rating_type='" . $rating_type . "' AND rating_user='******'user_id'] . "'")); if (isset($_POST['post_rating'])) { // Rate if (isnum($_POST['rating']) && $_POST['rating'] > 0 && $_POST['rating'] < 6 && !isset($d_rating['rating_vote'])) { $result = dbquery("INSERT INTO " . DB_RATINGS . " (rating_item_id, rating_type, rating_user, rating_vote, rating_datestamp, rating_ip, rating_ip_type) VALUES ('{$rating_item_id}', '{$rating_type}', '" . $userdata['user_id'] . "', '" . $_POST['rating'] . "', '" . time() . "', '" . USER_IP . "', '" . USER_IP_TYPE . "')"); if ($result) { defender::unset_field_session(); } } redirect($rating_link); } elseif (isset($_POST['remove_rating'])) { // Unrate $result = dbquery("DELETE FROM " . DB_RATINGS . " WHERE rating_item_id='{$rating_item_id}' AND rating_type='{$rating_type}' AND rating_user='******'user_id'] . "'"); if ($result) { defender::unset_field_session(); } redirect($rating_link); } } $ratings = array(5 => $locale['r120'], 4 => $locale['r121'], 3 => $locale['r122'], 2 => $locale['r123'], 1 => $locale['r124']); if (!iMEMBER) { $message = str_replace("[RATING_ACTION]", "<a href='" . BASEDIR . "login.php'>" . $locale['login'] . "</a>", $locale['r104']); if (fusion_get_settings("enable_registration") == TRUE) { $message = str_replace("[RATING_ACTION]", "<a href='" . BASEDIR . "login.php'>" . $locale['login'] . "</a> " . $locale['or'] . " <a href='" . BASEDIR . "register.php'>" . $locale['register'] . "</a>", $locale['r104']); } echo "<div class='text-center'>" . $message . "</div>\n"; } elseif (isset($d_rating['rating_vote'])) { echo "<div class='display-block'>\n"; echo openform('removerating', 'post', $rating_link, array('class' => 'display-block text-center')); echo sprintf($locale['r105'], $ratings[$d_rating['rating_vote']], showdate("longdate", $d_rating['rating_datestamp'])) . "<br /><br />\n"; echo form_button('remove_rating', $locale['r102'], $locale['r102'], array('class' => 'btn-default', 'icon' => 'fa fa-times m-r-10')); echo closeform(); echo "</div>\n"; } else { echo "<div class='display-block'>\n"; echo openform('postrating', 'post', $rating_link, array('max_tokens' => 1, 'notice' => 0, 'class' => 'm-b-20 text-center')); echo form_select('rating', $locale['r106'], '', array('options' => $ratings, 'class' => 'display-block text-center')); echo form_button('post_rating', $locale['r103'], $locale['r103'], array('class' => 'btn-primary btn-sm', 'icon' => 'fa fa-thumbs-up m-r-10')); echo closeform(); echo "</div>\n"; } $rating_votes = dbarray(dbquery("\n\t\tSELECT\n\t\tSUM(IF(rating_vote='5', 1, 0)) as r120,\n\t\tSUM(IF(rating_vote='4', 1, 0)) as r121,\n\t\tSUM(IF(rating_vote='3', 1, 0)) as r122,\n\t\tSUM(IF(rating_vote='2', 1, 0)) as r123,\n\t\tSUM(IF(rating_vote='1', 1, 0)) as r124\n\t\tFROM " . DB_RATINGS . " WHERE rating_type='" . $rating_type . "' and rating_item_id='" . intval($rating_item_id) . "'\n\t\t")); if (!empty($rating_votes)) { echo "<div id='ratings' class='rating_container'>\n"; foreach ($rating_votes as $key => $num) { echo progress_bar($num, $locale[$key], FALSE, '10px', TRUE, FALSE); } echo "</div>\n"; } else { echo "<div class='text-center'>" . $locale['r101'] . "</div>\n"; } } }
function render_post($post) { global $locale, $settings; opentable($post['alb_post_title']); echo "<div class='post-item'>"; echo "<div class='post-body'>" . $post['alb_post_text'] . "</div>"; echo "<div class='post-footer'>"; echo "<img src='" . AL_BLOG_DIR . "asset/images/user.png' class='icon' /><a href='" . BASEDIR . "profile.php?lookup=" . $post['alb_post_user'] . "'>" . $post['user_name'] . "</a>"; echo "<img src='" . AL_BLOG_DIR . "asset/images/category.png' class='icon' />" . ($post['alb_cat_title'] != '' ? "<a href='" . FUSION_SELF . "?p=view_category&id=" . $post['alb_post_cat'] . "'>" . $post['alb_cat_title'] . "</a>" : $locale['alb21']); echo "<img src='" . AL_BLOG_DIR . "asset/images/calendar.png' class='icon' />" . showdate("forumdate", $post['alb_post_datestamp']); echo "<img src='" . AL_BLOG_DIR . "asset/images/comments.png' class='icon' />" . $post['comments']; //echo " <a href='".FUSION_SELF."?p=view_post&id=".$post['alb_post_id']."'>".$locale['alb22']."</a>"; echo "</div>"; echo "</div>"; closetable(); require_once INCLUDES . "comments_include.php"; showcomments("BL", DB_AL_BLOG_POSTS, "alb_post_id", $_GET['id'], FUSION_SELF . "?p=view_post&id=" . $_GET['id']); require_once INCLUDES . "ratings_include.php"; showratings("B", $_GET['id'], FUSION_SELF . "?p=view_post&id=" . $_GET['id']); }
function render_article($subject, $article, $info) { global $locale, $settings, $aidlink; $category = "<a href='" . BASEDIR . "articles.php?cat_id=" . $info['cat_id'] . "'>" . $info['cat_name'] . "</a>\n"; $comment = "<a href='" . BASEDIR . "articles.php?article_id=" . $info['article_id'] . "#comments'>" . $info['article_comments'] . " comment</a>\n"; echo "<article>\n"; echo "<div class='news-action text-right'>"; echo "<a title='" . $locale['global_075'] . "' href='" . BASEDIR . "print.php?type=A&item_id=" . $info['article_id'] . "'><i class='entypo print'></i></a>"; echo iADMIN && checkrights("A") ? "<a href='" . ADMIN . "articles.php" . $aidlink . "&action=edit&article_id=" . $info['article_id'] . "' title='" . $locale['global_076'] . "' /><i class='entypo pencil'></i></a>\n" : ''; echo "</div>\n"; echo "<div class='news-info'>Posted <span class='news-date'>" . showdate("%d %b %Y", $info['article_date']) . "</span> in {$category} and {$comment}</div>\n"; echo "<h2 class='news-title'>{$subject}</h2>"; echo "<div class='article'>\n"; echo ($info['article_breaks'] == "y" ? nl2br($article) : $article) . "<br />\n"; echo "</div>\n"; echo "<div class='news-user-info'>\n"; echo "<h4>About <a href='" . BASEDIR . "profile.php?lookup=" . $info['user_id'] . "'>" . $info['user_name'] . "</a>\n</h4>"; echo "<div class='pull-left m-r-10'>" . display_avatar($info, '80px') . "</div>\n"; echo "<strong>" . getuserlevel($info['user_level']) . "</strong><br/>\n"; echo "<strong>Joined since: " . showdate('newsdate', $info['user_joined']) . "</strong><br/>\n"; echo "</div>\n"; echo "</article>"; }
function render_weblinks_item($info) { global $locale; echo render_breadcrumbs(); opentable($locale['400'] . ": " . $info['weblink_cat_name']); echo $info['page_nav'] ? "<<div class='text-right'>" . $info['page_nav'] . "</div>" : ''; if ($info['weblink_rows']) { foreach ($info['item'] as $weblink_id => $data) { $new = $data['new'] == 1 ? "<span class='label label-success m-r-10' style='padding:3px 10px;'>" . $locale['410'] . "</span>" : ''; echo "<aside class='display-inline-block m-t-20' style='width:100%;'>\n"; echo "<span class='weblink_title strong'><a href='" . $data['weblink']['link'] . "' target='_blank'><strong>" . $data['weblink']['name'] . "</strong></a></span>\n"; echo $new; if ($data['weblink_description'] != "") { echo "<div class='weblink_text'>" . nl2br(parse_textarea($data['weblink_description'])) . "</div>\n"; } echo "<span class='display-inline m-r-20'><strong>" . $locale['411'] . "</strong> " . showdate("shortdate", $data['weblink_datestamp']) . "</span>\n"; echo "<span class='display-inline'><strong>" . $locale['412'] . "</strong> " . $data['weblink_count'] . "</span>\n"; echo "</aside>\n"; } } else { echo "<div class='well text-center'>" . $locale['431'] . "</div>\n"; } closetable(); }
} else { $poll = ""; $i = 0; $num_opts = count($poll_option); $poll_votes = dbcount("(vote_opt)", DB_POLL_VOTES, "poll_id='" . $data['poll_id'] . "'"); while ($i < $num_opts) { $num_votes = dbcount("(vote_opt)", DB_POLL_VOTES, "vote_opt='{$i}' AND poll_id='" . $data['poll_id'] . "'"); $opt_votes = $poll_votes ? number_format(100 / $poll_votes * $num_votes) : 0; $poll .= progress_bar($opt_votes, $poll_option[$i]); $poll .= "<div>" . $opt_votes . "% [" . (empty($num_votes) ? 0 : $num_votes) . ($num_votes == 1 ? $locale['global_133'] : $locale['global_134']) . "]</div><br />\n"; $i++; } echo "<strong>" . $poll_title . "</strong><br /><br />\n" . $poll; echo "<div style='text-align:center'>" . $locale['global_135'] . $poll_votes . "<br />\n"; if (!iMEMBER) { echo $locale['global_132'] . "<br />"; } echo $locale['global_136'] . showdate("shortdate", $data['poll_started']); if ($data['poll_ended'] > 0) { echo "<br />\n" . $locale['global_137'] . showdate("shortdate", $data['poll_ended']) . "\n"; } $result = dbcount("(poll_id)", DB_POLLS); if ($result > 1) { echo "<br /><br /><a href='" . INFUSIONS . "member_poll_panel/polls_archive.php' class='side'>" . $locale['global_138'] . "</a>\n"; } echo "</div>\n"; } } else { echo "<div style='text-align:center'>" . $locale['global_142'] . "</div>\n"; } closeside();
$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 ($i % 2 == 0) { $row_color = "tbl1"; } else { $row_color = "tbl2"; } echo "<tr>\n"; echo "<td width='1%' class='" . $row_color . "' style='white-space:nowrap'>" . trimlink($data['forum_name'], 30) . "</td>\n"; echo "<td width='100%' class='" . $row_color . "'><a href='" . FORUM . "viewthread.php?thread_id=" . $data['thread_id'] . "&pid=" . $data['post_id'] . "#post_" . $data['post_id'] . "' title='" . $data['thread_subject'] . "'>" . trimlink($data['thread_subject'], 40) . "</a></td>\n"; echo "<td align='center' width='1%' class='" . $row_color . "' style='white-space:nowrap'>" . showdate("forumdate", $data['post_datestamp']) . "</td>\n"; echo "</tr>\n"; $i++; } echo "</table>\n"; closetable(); if ($rows > 20) { echo "<div align='center' style='margin-top:5px;'>\n" . makepagenav($_GET['rowstart'], 20, $rows, 3) . "\n</div>\n"; } } else { opentable($locale['global_042']); echo "<div style='text-align:center'><br />\n" . $locale['global_054'] . "<br /><br />\n</div>\n"; closetable(); } require_once THEMES . "templates/footer.php";
echo "<table cellpadding='0' cellspacing='0' width='280' class='center'>\n<tr>\n"; echo "<td width='80' class='tbl'>" . $locale['431'] . "</td>\n"; echo "<td class='tbl'><input type='text' name='poll_title' value='" . $poll_title . "' class='textbox' style='width:200px' /></td>\n"; echo "</tr>\n"; while ($i != $opt_count) { $poll_opt = isset($poll_option[$i]) ? $poll_option[$i] : ""; echo "<tr>\n<td width='80' class='tbl'>" . $locale['432'] . "{$opt}</td>\n"; echo "<td class='tbl'><input type='text' name='poll_option[" . $i . "]' value='" . $poll_opt . "' class='textbox' style='width:200px' /></td>\n</tr>\n"; $i++; $opt++; } echo "</table>\n"; echo "<table cellpadding='0' cellspacing='0' width='280' class='center'>\n<tr>\n"; echo "<td align='center' class='tbl'><br />\n"; if (isset($_GET['poll_id']) && !$_GET['poll_ended']) { echo "<input type='checkbox' name='close' value='yes' />" . $locale['433'] . "<br /><br />\n"; } if (!isset($_GET['poll_id']) || isset($_GET['poll_id']) && !$_GET['poll_ended']) { echo "<input type='hidden' name='opt_count' value='" . $opt_count . "' />\n"; echo "<input type='submit' name='addoption' value='" . $locale['436'] . "' class='button' />\n"; echo "<input type='submit' name='preview' value='" . $locale['437'] . "' class='button' />\n"; echo "<input type='submit' name='save' value='" . $locale['438'] . "' class='button' />\n"; } else { echo $locale['434'] . showdate("shortdate", $poll_started) . "<br />\n"; echo $locale['435'] . showdate("shortdate", $_GET['poll_ended']) . "<br />\n"; } echo "</td>\n</tr>\n</table>\n</form>\n"; closetable(); } } require_once THEMES . "templates/footer.php";
$items_count = dbrows($result); if (!$items_count) { continue; } $contents[$table]['colwidth'] = floor(12 / $items_count); $data = array(); $count = 1; while ($row = dbarray($result)) { $keys = array_keys($row); foreach ($keys as $i => $key) { $keys[$i] = '{' . $key . '}'; } $row['content'] = str_replace("../../images", IMAGES, $row['content']); $pairs = array_combine($keys, array_values($row)); $cat = $row['cat_id'] ? "<a href='" . strtr($config['categoryLinkPattern'], $pairs) . "'>" . $row['cat_name'] . "</a>" : $locale['home_0102']; $data[$count] = array('cat' => $cat, 'url' => strtr($config['contentLinkPattern'], $pairs), 'title' => $row['title'], 'meta' => $locale['home_0105'] . profile_link($row['user_id'], $row['user_name'], $row['user_status']) . " " . showdate('newsdate', $row['datestamp']) . $locale['home_0106'] . $cat, 'content' => parse_textarea($row['content']), 'datestamp' => $row['datestamp'], 'cat_name' => $row['cat_name']); /* Infusion Settings Readings */ switch ($table) { case DB_NEWS: if ($config['infSettings']['news_image_frontpage']) { // if it's 0 use uploaded photo, 1 always use category image // go for cat image always if ($row['cat_image']) { $data[$count]['image'] = INFUSIONS . "news/news_cats/" . $row['cat_image']; } } else { // go for image if available if ($row['image'] || $row['cat_image']) { if ($row['cat_image']) { $data[$count]['image'] = INFUSIONS . "news/news_cats/" . $row['cat_image']; }
} if ($fieldsvar) { $result = dbquery("SELECT tp.forum_id, tp.thread_id, tp.post_id, tp.post_message, tt.thread_subject,\r\n\t\t\ttf.forum_access FROM " . DB_POSTS . " tp\r\n\t\t\tLEFT JOIN " . DB_FORUMS . " tf ON tf.forum_id = tp.forum_id\r\n\t\t\tLEFT JOIN " . DB_THREADS . " tt ON tt.thread_id = tp.thread_id\t\t\t\r\n\t\t\tWHERE " . groupaccess('forum_access') . ($_GET['forum_id'] != 0 ? " AND tf.forum_id=" . $_GET['forum_id'] : "") . "\r\n\t\t\tAND " . $fieldsvar . ($_GET['datelimit'] != 0 ? " AND post_datestamp>=" . (time() - $_GET['datelimit']) : "")); $rows = dbrows($result); } else { $rows = 0; } if ($rows) { $items_count .= THEME_BULLET . " <a href='" . FUSION_SELF . "?stype=forums&stext=" . $_GET['stext'] . "&" . $composevars . "'>" . $rows . " " . ($rows == 1 ? $locale['f402'] : $locale['f403']) . " " . $locale['522'] . "</a><br />\n"; $result = dbquery("SELECT tp.forum_id, tp.thread_id, tp.post_id, tp.post_message, tp.post_datestamp, tt.thread_subject,\r\n\t\t\ttt.thread_sticky, tf.forum_access, tu.user_id, tu.user_name, tu.user_status FROM " . DB_POSTS . " tp\r\n\t\t\tLEFT JOIN " . DB_THREADS . " tt ON tp.thread_id = tt.thread_id\r\n\t\t\tLEFT JOIN " . DB_FORUMS . " tf ON tp.forum_id = tf.forum_id\r\n\t\t\tLEFT JOIN " . DB_USERS . " tu ON tp.post_author=tu.user_id\r\n\t\t\tWHERE " . groupaccess('forum_access') . ($_GET['forum_id'] != 0 ? " AND tf.forum_id=" . $_GET['forum_id'] : "") . "\r\n\t\t\tAND " . $fieldsvar . ($_GET['datelimit'] != 0 ? " AND post_datestamp>=" . (time() - $_GET['datelimit']) : "") . "\r\n\t\t\tORDER BY " . $sortby . " " . ($_GET['order'] == 1 ? "ASC" : "DESC") . ($_GET['stype'] != "all" ? " LIMIT " . $_GET['rowstart'] . ",10" : "")); while ($data = dbarray($result)) { $search_result = ""; $text_all = search_striphtmlbbcodes(iADMIN ? $data['post_message'] : preg_replace("#\\[hide\\](.*)\\[/hide\\]#si", "", $data['post_message'])); $text_frag = search_textfrag($text_all); $subj_c = search_stringscount($data['thread_subject']); $text_c = search_stringscount($data['post_message']); // $text_frag = highlight_words($swords, $text_frag); $search_result .= ($data['thread_sticky'] == 1 ? "<strong>" . $locale['f404'] . "</strong> " : "") . "<a href='" . FORUM . "viewthread.php?thread_id=" . $data['thread_id'] . "&highlight=" . urlencode($_GET['stext']) . "&pid=" . $data['post_id'] . "#post_" . $data['post_id'] . "'>" . $data['thread_subject'] . "</a>" . "<br /><br />\n"; // $search_result .= ($data['thread_sticky'] == 1 ? "<strong>".$locale['f404']."</strong> " : "")."<a href='".FORUM."viewthread.php?thread_id=".$data['thread_id']."&highlight=".urlencode($_GET['stext'])."&pid=".$data['post_id']."#post_".$data['post_id']."'>".highlight_words($swords, $data['thread_subject'])."</a>"."<br /><br />\n"; $search_result .= "<div class='quote' style='width:auto;height:auto;overflow:auto'>" . $text_frag . "</div><br />"; $search_result .= "<span class='small2'>" . $locale['global_070'] . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "\n"; $search_result .= $locale['global_071'] . showdate("longdate", $data['post_datestamp']) . "</span><br />\n"; $search_result .= "<span class='small'>" . $subj_c . " " . ($subj_c == 1 ? $locale['520'] : $locale['521']) . " " . $locale['f406'] . " " . $locale['f407'] . ", "; $search_result .= $text_c . " " . ($text_c == 1 ? $locale['520'] : $locale['521']) . " " . $locale['f406'] . " " . $locale['f408'] . "</span><br /><br />\n"; search_globalarray($search_result); } } else { $items_count .= THEME_BULLET . " 0 " . $locale['f403'] . " " . $locale['522'] . "<br />\n"; } $navigation_result = search_navigation($rows); }
function countdown($time) { $updated = stripinput($time); $second = 1; $minute = $second * 60; $hour = $minute * 60; // microseconds $day = 24 * $hour; $month = days_current_month() * $day; $year = date("L", $updated) > 0 ? 366 * $day : 365 * $day; $timer = array($year => "year", $month => "month", $day => "day", $hour => "hour", $minute => "minute", $second => "second"); foreach ($timer as $arr => $unit) { $calc = $updated / $arr; // balance timestamp if ($calc >= 1) { $answer = round($calc); $s = $answer > 1 ? "s" : ""; return "<abbr class='atooltip' data-toggle='tooltip' data-placement='top' title='~" . showdate('newsdate', $updated + time()) . "'>{$answer} " . $unit . $s . "</abbr>"; } } if (!isset($answer)) { return "<abbr class='atooltip' data-toggle='tooltip' data-placement='top' title='" . showdate('newsdate', time()) . "'>now</abbr>"; } }
echo "<div class='forum_attachments_content'>" . $print_files . "</div>"; echo "</fieldset>\n"; } if ($print_images != '') { if ($print_files != '') { echo "<br />"; } echo "\n<fieldset class='forum_attachments'>"; echo "<legend class='forum_attachments_legend'>" . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . ($count_images > 1 ? $locale['506b'] : $locale['506']) . "</legend>"; echo "<div class='forum_attachments_content'>" . $print_images . "</div>"; echo "</fieldset>\n"; } } } if ($data['post_edittime'] != "0") { echo "\n<fieldset class='forum_edit'>\n" . $locale['508'] . profile_link($data['post_edituser'], $data['edit_name'], $data['edit_status']) . $locale['509'] . showdate("forumdate", $data['post_edittime']) . "</fieldset>"; // Pimped: added profile_link() } if ($data['post_showsig'] && isset($data['user_sig']) && $data['user_sig']) { echo "\n<fieldset class='forum_signatur'>\r\n\t\t\t<legend class='forum_signatur_legend'>" . $locale['507d'] . "</legend>" . nl2br(parseubb(parsesmileys($data['user_sig']), "b|i|u||center|small|url|mail|img|color")) . "\r\n\t\t\t</fieldset>"; } echo "<!--sub_forum_post--></td>\n</tr>\n"; // Pimped: Post Ratings -> if ($settings['forum_post_ratings']) { $show = post_ratings_show($data['post_id']); $do = ''; if (iMEMBER && $userdata['user_id'] !== $data['user_id']) { $do .= "<span id='rb_" . $data['post_id'] . "'>"; $do .= post_ratings_do($data['post_id'], $userdata['user_id'], $data['post_author'], false); $do .= "</span> "; }
} $result = dbquery("SELECT tp.forum_id, tp.thread_id, tp.post_id, tp.post_author, IF(tp.post_datestamp>tp.post_edittime, tp.post_datestamp, tp.post_edittime) AS post_timestamp,\r\n\t\ttf.forum_name, tf.forum_access, tt.thread_subject, tu.user_id, tu.user_name, tu.user_status\r\n\t\tFROM " . DB_FORUM_POSTS . " tp\r\n\t\tLEFT JOIN " . DB_FORUMS . " tf ON tp.forum_id = tf.forum_id\r\n\t\tLEFT JOIN " . DB_FORUM_THREADS . " tt ON tp.thread_id = tt.thread_id\r\n\t\tLEFT JOIN " . DB_USERS . " tu ON tp.post_author = tu.user_id\r\n\t\t" . (multilang_table("FO") ? "WHERE tf.forum_language='" . LANGUAGE . "' AND" : "WHERE") . " " . groupaccess('tf.forum_access') . " AND tp.post_hidden='0' AND tt.thread_hidden='0' AND (tp.post_datestamp > '" . $lastvisited . "' OR tp.post_edittime > '" . $lastvisited . "')\r\n\t\tGROUP BY tp.thread_id\r\n\t\tORDER BY post_timestamp DESC LIMIT " . $_GET['rowstart'] . ",20"); $i = 0; echo "<table cellpadding='0' cellspacing='1' 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 class='tbl2'><strong>" . $locale['global_044'] . "</strong></td>\n"; echo "<td width='1%' class='tbl2' style='text-align:center;white-space:nowrap'><strong>" . $locale['global_050'] . "</strong></td>\n"; echo "</tr>\n"; $threads = dbrows($result); while ($data = dbarray($result)) { if ($i % 2 == 0) { $row_color = "tbl1"; } else { $row_color = "tbl2"; } echo "<tr>\n"; echo "<td width='1%' class='" . $row_color . "' style='white-space:nowrap'>" . $data['forum_name'] . "</td>\n"; echo "<td class='" . $row_color . "'><a href='" . INFUSIONS . "forum/viewthread.php?thread_id=" . $data['thread_id'] . "&pid=" . $data['post_id'] . "#post_" . $data['post_id'] . "'>" . $data['thread_subject'] . "</a></td>\n"; echo "<td width='1%' class='" . $row_color . "' style='text-align:center;white-space:nowrap'>" . profile_link($data['post_author'], $data['user_name'], $data['user_status']) . "<br />\n" . showdate("forumdate", $data['post_timestamp']) . "</td>\n"; echo "</tr>\n"; $i++; } echo "<tr>\n<td align='center' colspan='4' class='tbl1'>" . sprintf($locale['global_055'], $rows, $threads) . "</td>\n</tr>\n</table>\n"; } else { echo "<div style='text-align:center'><br />" . sprintf($locale['global_055'], 0, 0) . "<br /><br /></div>\n"; } closetable(); if ($threads > 20) { echo "<div align='center' style='margin-top:5px;'>\n" . makepagenav($_GET['rowstart'], 20, $threads, 3) . "\n</div>\n"; } require_once THEMES . "templates/footer.php";
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'); } }
} echo "</div>\n"; echo "<br />\n"; $i++; } } } if (!$res) { redirect($settings['opening_page']); } } break; case "T": if ($settings['enable_terms'] == 1) { echo "<strong>" . $settings['sitename'] . " " . $locale['600'] . "</strong><br />\n"; echo "<small>" . $locale['601'] . " " . ucfirst(showdate("longdate", $settings['license_lastupdate'])) . "<small>\n"; echo "<hr />" . parse_textarea($settings['license_agreement']) . "\n"; } else { redirect($settings['opening_page']); } break; case "P": echo "<strong>" . $settings['sitename'] . " " . $locale['700'] . "</strong><br />\n"; echo "<hr />" . parse_textarea($settings['privacy_policy']) . "\n"; break; } } else { redirect($settings['opening_page']); } echo "</body>\n</html>\n"; if (ob_get_length() !== FALSE) {
echo "<br /><input type='submit' name='post_archive_shout' value='" . $locale['SB_shout'] . "' class='button' />\n"; echo "</div>\n</form>\n<br />\n"; } else { echo "<div style='text-align:center'>" . $locale['SB_login_req'] . "</div>\n"; } $rows = dbcount("(shout_id)", DB_SHOUTBOX, "shout_hidden='0'"); if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; } if ($rows != 0) { $result = dbquery("SELECT s.shout_id, s.shout_name, s.shout_message, s.shout_datestamp, u.user_id, u.user_name, u.user_status\r\n\t\tFROM " . DB_SHOUTBOX . " s\r\n\t\tLEFT JOIN " . DB_USERS . " u ON s.shout_name=u.user_id\r\n\t\t" . (multilang_table("SB") ? "WHERE shout_language='" . LANGUAGE . "' AND" : "WHERE") . " s.shout_hidden='0'\r\n\t\tORDER BY s.shout_datestamp DESC LIMIT " . $_GET['rowstart'] . ",20"); while ($data = dbarray($result)) { echo "<div class='tbl2'>\n"; if (iADMIN && checkrights("S") || iMEMBER && $data['shout_name'] == $userdata['user_id'] && isset($data['user_name'])) { echo "<div style='float:right'>\n<a href='" . FUSION_SELF . "?action=edit&shout_id=" . $data['shout_id'] . "'>" . $locale['SB_edit'] . "</a> |\n"; echo "<a href='" . FUSION_SELF . "?action=delete&shout_id=" . $data['shout_id'] . "'>" . $locale['SB_delete'] . "</a>\n</div>\n"; } if ($data['user_name']) { echo "<span class='comment-name'><span class='slink'>" . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "</span>\n</span>\n"; } else { echo "<span class='comment-name'>" . $data['shout_name'] . "</span>\n"; } echo "<span class='small'>" . showdate("longdate", $data['shout_datestamp']) . "</span>"; echo "</div>\n<div class='tbl1'>\n" . sbawrap(parseubb(parsesmileys($data['shout_message']), "b|i|u|url|color")) . "</div>\n"; } } else { echo "<div style='text-align:center'><br />\n" . $locale['SB_no_msgs'] . "<br /><br />\n</div>\n"; } closetable(); echo "<div align='center' style='margin-top:5px;'>\n" . makepagenav($_GET['rowstart'], 20, $rows, 3, FUSION_SELF . "?") . "\n</div>\n"; require_once THEMES . "templates/footer.php";
require_once "../maincore.php"; require_once THEMES . "templates/header.php"; if (!iMEMBER) { redirect('/index.php'); } $list = isset($_GET['bp_id']) && isnum($_GET['bp_id']) ? $_GET['bp_id'] : 0; opentable('Blog'); echo '<a href="/blog/liste.php">Mine blogindlæg</a> :: <a href="/blog/liste.php?list=newest">Nyeste blogindlæg</a> :: <a href="/blog/liste.php?list=blogs">Brugere med blogindlæg</a> :: <a href="/blog/skriv.php">Skriv nyt blogindlæg</a><br />'; if (isnum($list)) { $bloglist = dbquery('SELECT bp.*, u.user_avatar, u.user_id, u.user_name, u.user_blog, u.user_status FROM ' . DB_PREFIX . 'blogposts AS bp INNER JOIN ' . DB_PREFIX . 'users AS u ON u.user_id = bp.bp_author WHERE bp.bp_id = ' . $list); } echo '<table style="width: 100%;" class="tbl-border forum_thread_table">'; if ($blogarr = dbarray($bloglist)) { echo ' <tr> <td style="width: 25%;" class="tbl2 forum-caption">' . showdate('forumdate', $blogarr['bp_timestamp']) . '</td> <td style="width: 75%;" class="tbl2 forum-caption">' . $blogarr['bp_title'] . '</td> </tr> <tr> <td style="width: 25%;" class="tbl2 forum-caption"> ' . profile_link($blogarr['bp_author'], $blogarr['user_name'], $blogarr['user_status']) . '<br />'; if ($blogarr['user_avatar'] && file_exists(IMAGES . "avatars/" . $blogarr['user_avatar']) && $blogarr['user_status'] != 6 && $blogarr['user_status'] != 5) { echo "<img src='" . IMAGES . "avatars/" . $blogarr['user_avatar'] . "' alt='Avatar' /><br /><br />\n"; } echo 'Antal blogindlæg: ' . $blogarr['user_blog'] . '<br /> <a href="/blog/liste.php?list=' . $blogarr['user_id'] . '">Se blog</a> ' . (iADMIN || $blogarr['user_id'] == $userdata['user_id'] ? '<br /><a href="/blog/slet.php?id=' . $blogarr['bp_id'] . '" onclick="return confirm(\'Er du sikker på, du vil slette dette indlæg?\')">Slet indlæg</a>' : '') . ' <br /><a href="/report.php?action=new&bp_id=' . $blogarr['bp_id'] . '">Anmeld</a> </td> <td style="width: 75%;" class="tbl1">' . nl2br(parseubb(phpentities($blogarr['bp_content']))) . '</td> </tr>
echo "<span class='small'><strong>" . $locale['504'] . "</strong> " . showdate("%d.%m.%y", $data['user_joined']) . "</span><br />\n"; echo "<br /></td>\n<td valign='top' class='tbl1'>\n"; if (iMOD) { echo "<div style='float:right'><input type='checkbox' name='delete_post[]' value='" . $data['post_id'] . "' /></div>\n"; } echo nl2br(parseubb($message)); echo "<!--sub_forum_post_message-->"; if ($data['attach_id']) { if (in_array($data['attach_ext'], $imagetypes) && @getimagesize(FORUM . "attachments/" . $data['attach_name'])) { echo "\n<hr />\n" . $data['user_name'] . $locale['506'] . "<br /><br />\n" . display_image($data['attach_name']) . "<br />[" . parsebytesize(filesize(FORUM . "attachments/" . $data['attach_name'])) . "]\n"; } else { echo "\n<hr />\n" . $data['user_name'] . $locale['507'] . "<br />\n<a href='" . FUSION_SELF . "?thread_id=" . $_GET['thread_id'] . "&getfile=" . $data['post_id'] . "'>" . $data['attach_name'] . "</a>"; } } if ($data['post_edittime'] != "0") { echo "\n<hr />\n" . $locale['508'] . "<a href='../profile.php?lookup=" . $data['post_edituser'] . "'>" . $data['edit_name'] . "</a>" . $locale['509'] . showdate("forumdate", $data['post_edittime']); } if ($data['post_showsig'] && array_key_exists("user_sig", $data) && $data['user_sig']) { echo "\n<hr />" . nl2br(parseubb(parsesmileys($data['user_sig']), "b|i|u||center|small|url|mail|img|color")); } echo "<!--sub_forum_post--></td>\n</tr>\n"; echo "<tr>\n<td class='tbl2' style='width:140px;white-space:nowrap'>"; if ($settings['forum_ips'] && iMEMBER || iMOD) { echo "<strong>" . $locale['571'] . "</strong>: " . $data['post_ip']; } else { echo " "; } echo "</td>\n<td class='tbl2 forum_thread_userbar'>\n<div style='float:left;white-space:nowrap' class='small'><!--forum_thread_userbar-->\n"; if (array_key_exists("user_web", $data) && $data['user_web']) { if (!strstr($data['user_web'], "http://")) { $urlprefix = "http://";
} $cdata = dbarray(dbquery("SELECT * FROM " . $db_prefix . "kroax_kategori WHERE cid='" . $data['kroax_cat'] . "'")); echo '<table width="85%" border="0" align="center"><tr><td align="center">'; echo '<table align="center" width="90%" cellpadding="0" cellspacing="1" class="tbl-border" style="margin: 0 auto;">'; echo '<tr>'; if (!isset($p)) { echo ' <td class="tbl2"><span class="small"><B>' . $locale['KROAX210'] . ' </B><a href="' . INFUSIONS . 'the_kroax/kroax.php?category=' . $cdata['cid'] . '">' . $cdata['title'] . '</a></span></td>'; } else { echo '<td class="tbl2"><span class="small"><B>' . $locale['KROAX210'] . ' </B>' . $cdata['title'] . '</span></td>'; } if (!isset($p)) { echo '<td class="tbl2"><span class="small"><B>' . $locale['KROAX114'] . ' </B><a href="' . BASEDIR . 'profile.php?lookup=' . $udata['user_id'] . '">' . $data['kroax_uploader'] . '</a></span></td>'; } else { echo '<td class="tbl2"><span class="small"><B>' . $locale['KROAX114'] . ' </B>' . $data['kroax_uploader'] . '</span></td>'; } echo ' <td class="tbl2"><span class="small"><B>' . $locale['KROAX317'] . ' </B> ' . showdate('forumdate', $data['kroax_date']) . '</span></td>'; if ($kroaxsettings['kroax_set_allowdownloads'] == '1') { echo '<td class="tbl2"><span class="small"><B>' . $locale['MKROAX103'] . ' </B> ' . $data['kroax_downloads'] . '</span></td>'; } echo '<td class="tbl2"><span class="small"><B>' . $locale['KROAX318'] . ' </B> ' . $data['kroax_hits'] . '</span></td></tr>'; echo '</table>'; // WG - mod to select a suitable embedded player // include the file containing the arrays of accepted file extensions include INFUSIONS . "the_kroax/embeddedextensions.php"; // create a regex to get the file extension // file extension is allowed to contain 2 to 5 charachers // both upper and lower case and any digit $pattern = "/\\.[a-zA-Z-0-9]{2,5}\$/"; preg_match($pattern, $url, $match); // test the file extension against the allowed arrays // and add code for the appropriate media
} else { if (isset($_POST['delete']) && (isset($_GET['submit_id']) && isnum($_GET['submit_id']))) { opentable($locale['432']); $result = dbquery("DELETE FROM " . DB_SUBMISSIONS . " WHERE submit_id='" . $_GET['submit_id'] . "'"); echo "<br /><div style='text-align:center'>" . $locale['433'] . "<br /><br />\n"; echo "<a href='" . FUSION_SELF . $aidlink . "'>" . $locale['402'] . "</a><br /><br />\n"; echo "<a href='index.php" . $aidlink . "'>" . $locale['403'] . "</a></div><br />\n"; closetable(); } else { $result = dbquery("SELECT ts.submit_criteria, ts.submit_datestamp, tu.user_id, tu.user_name, tu.user_status\r\n\t\t\tFROM " . DB_SUBMISSIONS . " ts\r\n\t\t\tLEFT JOIN " . DB_USERS . " tu ON ts.submit_user=tu.user_id\r\n\t\t\tWHERE submit_id='" . $_GET['submit_id'] . "'"); if (dbrows($result)) { $data = dbarray($result); $opts = ""; $sel = ""; $submit_criteria = unserialize($data['submit_criteria']); $posted = showdate("longdate", $data['submit_datestamp']); $result2 = dbquery("SELECT weblink_cat_id, weblink_cat_name FROM " . DB_WEBLINK_CATS . " ORDER BY weblink_cat_name"); if (dbrows($result2) != 0) { while ($data2 = dbarray($result2)) { if (isset($submit_criteria['link_category'])) { $sel = $submit_criteria['link_category'] == $data2['weblink_cat_id'] ? " selected='selected'" : ""; } $opts .= "<option value='" . $data2['weblink_cat_id'] . "'{$sel}>" . $data2['weblink_cat_name'] . "</option>\n"; } } else { $opts .= "<option value='0'>" . $locale['434'] . "</option>\n"; } add_to_title($locale['global_200'] . $locale['448'] . $locale['global_201'] . $submit_criteria['link_name'] . "?"); opentable($locale['440']); echo "<form name='publish' method='post' action='" . FUSION_SELF . $aidlink . "&action=2&t=l&submit_id=" . $_GET['submit_id'] . "'>\n"; echo "<table cellpadding='0' cellspacing='0' class='center'>\n<tr>\n";
} echo "<tr>\n"; echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'>{$fim}</td>\n"; echo "<td class='tbl1 forum_name'><!--forum_name--><a href='viewforum.php?forum_id=" . $data['forum_id'] . "'>" . $data['forum_name'] . "</a><br />\n"; if ($data['forum_description'] || $moderators) { echo "<span class='small'>" . nl2br(parseubb($data['forum_description'])) . ($data['forum_description'] && $moderators ? "<br />\n" : ""); echo ($moderators ? "<strong>" . $locale['411'] . "</strong>" . $moderators . "</span>\n" : "</span>\n") . "\n"; } echo "</td>\n"; echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'>" . $data['forum_threadcount'] . "</td>\n"; echo "<td align='center' width='1%' class='tbl1' style='white-space:nowrap'>" . $data['forum_postcount'] . "</td>\n"; echo "<td width='1%' class='tbl2' style='white-space:nowrap'>"; if ($data['forum_lastpost'] == 0) { echo $locale['405'] . "</td>\n</tr>\n"; } else { echo showdate("forumdate", $data['forum_lastpost']) . "<br />\n"; echo "<span class='small'>" . $locale['406'] . profile_link($data['forum_lastuser'], $data['user_name'], $data['user_status']) . "</span></td>\n"; echo "</tr>\n"; } } } else { echo "<tr>\n<td colspan='5' class='tbl1'>" . $locale['407'] . "</td>\n</tr>\n"; } echo "</table><!--sub_forum_idx_table-->\n<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n"; echo "<td class='forum'><br />\n"; echo "<img src='" . get_image("foldernew") . "' alt='" . $locale['560'] . "' style='vertical-align:middle;' /> - " . $locale['409'] . "<br />\n"; echo "<img src='" . get_image("folder") . "' alt='" . $locale['561'] . "' style='vertical-align:middle;' /> - " . $locale['410'] . "\n"; echo "</td><td align='right' valign='bottom' class='forum'>\n"; echo "<form name='searchform' method='get' action='" . BASEDIR . "search.php?stype=forums'>\n"; echo "<input type='hidden' name='stype' value='forums' />\n"; echo "<input type='text' name='stext' class='textbox' style='width:150px' />\n";
function display_suspend_log($user_id, $type = "all", $rowstart = 0, $limit = 0) { global $locale; $db_type = $type != "all" && isnum($type) ? " AND suspend_type='{$type}'" : ""; $rows = dbcount("(suspend_id)", DB_SUSPENDS, "suspended_user='******'{$db_type}"); $result = dbquery("SELECT sp.suspend_id, sp.suspend_ip, sp.suspend_ip_type, sp.suspend_date, sp.suspend_reason,\n\t\tsp.suspend_type, sp.reinstate_date, sp.reinstate_reason, sp.reinstate_ip, sp.reinstate_ip_type,\n\t\ta.user_name AS admin_name, b.user_name AS admin_name_b \n\t\tFROM " . DB_SUSPENDS . " sp \n\t\tLEFT JOIN " . DB_USERS . " a ON sp.suspending_admin=a.user_id \n\t\tLEFT JOIN " . DB_USERS . " b ON sp.reinstating_admin=b.user_id \n\t\tWHERE suspended_user='******'{$db_type}\n\t\tORDER BY suspend_date DESC" . ($limit > 0 ? " LIMIT {$limit}" : "")); $rows = dbrows($result); $udata = dbarray(dbquery("SELECT user_name FROM " . DB_USERS . " WHERE user_id='{$user_id}' LIMIT 1")); if ($type == "all") { opentable(sprintf($locale['susp100'], $udata['user_name'])); member_nav(member_url("view", $user_id) . "|" . $udata['user_name'], member_url("log", $user_id) . "|" . $locale['susp114']); } else { opentable(sprintf($locale['susp100b'], getsuspension($type, true), $udata['user_name'])); } if ($rows) { echo "<table width='80%' cellpadding='1' cellspacing='0' class='tbl-border center'>\n<tr>\n"; if ($type == "all") { $description = sprintf($locale['susp101'], $udata['user_name']); } else { $description = sprintf($locale['susp102'], getsuspension($type), $udata['user_name']); } echo "<td class='tbl2' width='30'>" . $locale['susp103'] . "</td>\n"; echo "<td class='tbl2' width='120'>" . $locale['susp104'] . "</td>\n"; echo "<td class='tbl2' width='250'>" . $locale['susp105'] . "</td>\n"; echo "<td class='tbl2' width='150'>" . $locale['susp106'] . "</td>\n"; echo "</tr>\n"; $i = 1; while ($data = dbarray($result)) { $class = "tbl{$i}"; $suspension = $data['suspend_type'] != 2 ? getsuspension($data['suspend_type']) : $locale['susp111']; $reason = $data['suspend_reason'] ? ": " . $data['suspend_reason'] : ""; $admin = $data['admin_name'] ? $data['admin_name'] . " (" . $locale['susp108'] . ": " . $data['suspend_ip'] . ")" : $locale['susp109']; echo "<tr><td class='{$class}' valign='top'>#" . $data['suspend_id'] . "</td>\n"; echo "<td class='{$class}' valign='top'>" . showdate('forumdate', $data['suspend_date']) . "</td>\n"; echo "<td class='{$class}' valign='top'><strong>{$suspension}</strong>{$reason}</td>\n"; echo "<td class='{$class}' valign='top'>{$admin}</td>\n"; echo "</tr>\n<tr>\n"; if ($data['reinstate_date']) { $r_reason = $data['reinstate_reason'] ? ": " . $data['reinstate_reason'] : ""; $admin = $data['admin_name_b'] ? $data['admin_name_b'] . " (" . $locale['susp112'] . $data['reinstate_ip'] . ")" : $locale['susp109']; echo "<td class='{$class}' valign='top' align='right'> </td>\n"; echo "<td class='{$class}' valign='top'>" . showdate('forumdate', $data['reinstate_date']) . "</td>\n"; echo "<td class='{$class}' valign='top'>" . $locale['susp113'] . $r_reason . "</td>\n"; echo "<td class='{$class}' valign='top'>{$admin}</td>\n"; echo "</tr>\n<tr>\n"; } elseif ($data['suspend_type'] != 2) { echo "<td class='{$class}' valign='top' align='right'> </td>\n"; echo "<td class='{$class}' valign='top'> </td>\n"; echo "<td class='{$class}' valign='top'> </td>\n"; echo "<td class='{$class}' valign='top'> </td>\n"; echo "</tr>\n<tr>\n"; } echo "<td class='tbl1' colspan='4'><hr /></td>\n"; echo "</tr>\n"; if ($i == 2 ? $i = 1 : $i++) { } } echo "</table>\n"; } else { echo "<div id='close-message'><div class='admin-message'>" . $locale['susp110'] . "</div></div>\n"; } closetable(); }
if ($counter != 0 && $counter % $settings['thumbs_per_row'] == 0) { echo "</tr>\n<tr>\n"; } echo "<td align='center' valign='top' class='tbl'>\n"; echo "<strong>" . $data['album_title'] . "</strong><br /><br />\n<a href='" . make_url(BASEDIR . FUSION_SELF . "?album_id=" . $data['album_id'], BASEDIR . "photogallery-album-" . $data['album_id'] . "-", $data['album_title'], ".html") . "'>"; if ($data['album_thumb'] && file_exists(PHOTOS . $data['album_thumb'])) { echo "<img src='" . PHOTOS . $data['album_thumb'] . "' alt='" . $data['album_thumb'] . "' title='" . $locale['401'] . "' style='border:0px' />"; } elseif (file_exists(PHOTOS . "nophoto.jpg")) { echo "<img src='" . PHOTOS . "nophoto.jpg' alt='" . $locale['402'] . "' title='" . $locale['402'] . "' style='border:0px' />"; } else { echo $locale['402']; } $sub_articles = dbcount("(album_id)", DB_PHOTO_ALBUMS, groupaccess('album_access') . " AND album_parent='" . $data['album_id'] . "'"); echo "</a><br /><br />\n<span class='small'>\n"; echo $locale['407'] . ": " . $sub_articles . "<br />"; echo $locale['403'] . showdate("shortdate", $data['album_datestamp']) . "<br />\n"; echo $locale['404'] . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "<br />\n"; echo $locale['405'] . dbcount("(photo_id)", DB_PHOTOS, "album_id='" . $data['album_id'] . "'") . "</span><br />\n"; echo "</td>\n"; $counter++; $k++; } echo "</tr>\n</table>\n"; closetable(); if ($rows > $settings['thumbs_per_page']) { echo "<div align='center' style='margin-top:5px;'>\n" . pagination(true, $_GET['rowstart'], $settings['thumbs_per_page'], $rows, 3, "", "photogallery", "", "", "-", "", "") . "\n</div>\n"; } } else { echo "<div style='text-align:center'><br />" . $locale['406'] . "<br /><br /></div>\n"; closetable(); }
opentable($locale['global_056']); $result = dbquery("SELECT tn.thread_id FROM " . DB_THREAD_NOTIFY . " tn\n\tINNER JOIN " . DB_THREADS . " tt ON tn.thread_id = tt.thread_id\n\tINNER JOIN " . DB_FORUMS . " tf ON tt.forum_id = tf.forum_id\n\tWHERE tn.notify_user="******" AND " . groupaccess('forum_access') . " AND tt.thread_hidden='0'"); $rows = dbrows($result); if ($rows) { $result = dbquery("\n\t\tSELECT tf.forum_access, tn.thread_id, tn.notify_datestamp, tn.notify_user,\n\t\ttt.thread_subject, tt.forum_id, tt.thread_lastpost, tt.thread_lastuser, tt.thread_postcount,\n\t\ttu.user_id AS user_id1, tu.user_name AS user_name1, tu.user_status AS user_status1, \n\t\ttu2.user_id AS user_id2, tu2.user_name AS user_name2, tu2.user_status AS user_status2\n\t\tFROM " . DB_THREAD_NOTIFY . " tn\n\t\tINNER JOIN " . DB_THREADS . " tt ON tn.thread_id = tt.thread_id\n\t\tINNER JOIN " . DB_FORUMS . " tf ON tt.forum_id = tf.forum_id\n\t\tLEFT JOIN " . DB_USERS . " tu ON tt.thread_author = tu.user_id\n\t\tLEFT JOIN " . DB_USERS . " tu2 ON tt.thread_lastuser = tu2.user_id\n\t\tINNER JOIN " . DB_POSTS . " tp ON tt.thread_id = tp.thread_id\n\t\tWHERE tn.notify_user="******" AND " . groupaccess('forum_access') . " AND tt.thread_hidden='0'\n\t\tGROUP BY tn.thread_id\n\t\tORDER BY tn.notify_datestamp DESC\n\t\tLIMIT " . $_GET['rowstart'] . ",10\n\t"); echo "<table class='tbl-border' cellpadding='0' cellspacing='1' width='100%'>\n<tr>\n"; echo "<td class='tbl2'><strong>" . $locale['global_044'] . "</strong></td>\n"; echo "<td class='tbl2' style='text-align:center;white-space:nowrap'><strong>" . $locale['global_050'] . "</strong></td>\n"; echo "<td class='tbl2' style='text-align:center;white-space:nowrap'><strong>" . $locale['global_047'] . "</strong></td>\n"; echo "<td class='tbl2' style='text-align:center;white-space:nowrap'><strong>" . $locale['global_046'] . "</strong></td>\n"; echo "<td class='tbl2' style='text-align:center;white-space:nowrap'><strong>" . $locale['global_057'] . "</strong></td>\n"; echo "</tr>\n"; $i = 0; while ($data = dbarray($result)) { $row_color = $i % 2 == 0 ? "tbl1" : "tbl2"; echo "<tr>\n<td class='" . $row_color . "'><a href='" . FORUM . "viewthread.php?thread_id=" . $data['thread_id'] . "'>" . $data['thread_subject'] . "</a></td>\n"; echo "<td class='" . $row_color . "' style='text-align:center;white-space:nowrap'>" . profile_link($data['user_id1'], $data['user_name1'], $data['user_status1']) . "</td>\n"; echo "<td class='" . $row_color . "' style='text-align:center;white-space:nowrap'>" . profile_link($data['user_id2'], $data['user_name2'], $data['user_status2']) . "<br />\n\t\t" . showdate("forumdate", $data['thread_lastpost']) . "</td>\n"; echo "<td class='" . $row_color . "' style='text-align:center;white-space:nowrap'>" . ($data['thread_postcount'] - 1) . "</td>\n"; echo "<td class='" . $row_color . "' style='text-align:center;white-space:nowrap'><a href='" . FUSION_SELF . "?delete=" . $data['thread_id'] . "' onclick=\"return confirm('" . $locale['global_060'] . "');\">" . $locale['global_058'] . "</a></td>\n"; echo "</tr>\n"; $i++; } echo "</table>\n"; closetable(); echo "<div align='center' style='margin-top:5px;'>" . makePageNav($_GET['rowstart'], 10, $rows, 3, FUSION_SELF . "?") . "</div>\n"; } else { echo "<div style='text-align:center;'>" . $locale['global_059'] . "</div>\n"; closetable(); } require_once THEMES . "templates/footer.php";
/** * News Item Page Template * @param $info */ function render_news_item($info) { global $aidlink; $locale = fusion_get_locale(); $news_settings = get_settings('news'); $data = $info['news_item']; add_to_head("<link rel='stylesheet' href='" . INFUSIONS . "news/templates/css/news.css' type='text/css'>"); add_to_head("<link rel='stylesheet' href='" . INCLUDES . "jquery/colorbox/colorbox.css' type='text/css' media='screen' />"); add_to_head("<script type='text/javascript' src='" . INCLUDES . "jquery/colorbox/jquery.colorbox.js'></script>"); add_to_footer('<script type="text/javascript"> $(document).ready(function() { $(".news-image-overlay").colorbox({ transition: "elasic", height:"100%", width:"100%", maxWidth:"98%", maxHeight:"98%", scrolling:false, overlayClose:true, close:false, photo:true, onComplete: function(result) { $("#colorbox").live("click", function(){ $(this).unbind("click"); $.fn.colorbox.close(); }); }, onLoad: function () { } }); }); </script>'); opentable($locale['news_0004']); echo render_breadcrumbs(); echo "<!--news_pre_readmore-->"; echo "<article class='news-item' style='display:block; width:100%; overflow:hidden;'>\n"; echo "<h2 class='text-center'>" . $data['news_subject'] . "</h2>\n"; echo "<div class='news_news text-dark m-t-20 m-b-20'>\n"; if ($data['news_image_src']) { echo "<a class='" . $data['news_ialign'] . " news-image-overlay' href='" . $data['news_image_src'] . "'>\n <img class='img-responsive' src='" . $data['news_image_src'] . "' alt='" . $data['news_subject'] . "' style='padding:5px; max-height:" . $news_settings['news_photo_h'] . "px; overflow:hidden;' /></a>"; } elseif (!empty($data['news_image']) && !empty($data['news_cat_image_src'])) { echo "<a class='" . $data['news_ialign'] . "' href='" . INFUSIONS . "news/news.php?cat_id=" . $data['news_cat_id'] . "'>\n <img class='img-responsive' src='" . IMAGES_NC . $data['news_cat_image_src'] . "' style='padding:5px; max-height:" . $news_settings['news_photo_h'] . "px; alt='" . $data['news_cat_name'] . "' />\n </a>"; } echo $data['news_news']; echo "</div>\n"; echo "<div class='news_extended text-dark m-t-20 m-b-20'>" . $data['news_extended'] . "</div>\n"; echo "<div style='clear:both;'></div>\n"; echo "<div class='well m-t-5 text-center'>\n"; echo "<span class='news-action m-r-10'><i class='fa fa-user'></i>" . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "</span>\n"; echo "<span class='news-action m-r-10'><i class='fa fa-calendar'></i>" . showdate("newsdate", $data['news_datestamp']) . "</span>\n"; echo "<span class='news-action'><i class='fa fa-eye'></i><span class='text-dark m-r-10'>" . number_format($data['news_reads']) . "</span>\n</span>"; echo $data['news_allow_comments'] ? display_comments($data['news_comments'], INFUSIONS . "news/news.php?readmore=" . $data['news_id'] . "#comments") : ''; echo $data['news_allow_ratings'] ? "<span class='m-r-10'>" . display_ratings($data['news_sum_rating'], $data['news_count_votes'], INFUSIONS . "news/news.php?readmore=" . $data['news_id'] . "#ratings") . " </span>" : ''; echo "<a class='m-r-10' title='" . $locale['news_0002'] . "' href='" . BASEDIR . "print.php?type=N&item_id=" . $data['news_id'] . "'><i class='fa fa-print'></i></a>"; echo iADMIN && checkrights("N") ? "<a title='" . $locale['news_0003'] . "' href='" . INFUSIONS . "news/news_admin.php" . $aidlink . "&action=edit&section=news_form&news_id=" . $data['news_id'] . "' title='" . $locale['news_0003'] . "' />" . $locale['news_0003'] . "</a>\n" : ""; echo "</div>"; echo "<!--news_sub_readmore-->"; echo !isset($_GET['readmore']) && $data['news_ext'] == "y" ? "<div class='m-t-20'>\n<a href='" . INFUSIONS . "news/news.php?readmore=" . $data['news_id'] . "' class='button'>" . $locale['news_0001'] . "</a>\n</div>\n" : ""; if ($data['page_count'] > 0) { echo "<div class='text-center m-t-10'>\n" . makepagenav($_GET['rowstart'], 1, $data['page_count'], 3, INFUSIONS . "news/news.php?readmore=" . $_GET['readmore'] . "&") . "\n</div>\n"; } if ($data['news_allow_comments']) { echo "<hr />" . showcomments("N", DB_NEWS, "news_id", $_GET['readmore'], INFUSIONS . "news/news.php?readmore=" . $_GET['readmore']) . "\n"; } if ($data['news_allow_ratings']) { echo "<hr />" . showratings("N", $_GET['readmore'], INFUSIONS . "news/news.php?readmore=" . $_GET['readmore']) . "\n"; } echo "</article>\n"; closetable(); }
$pnum = "<a href='viewthread.php?thread_id=" . $tdata['thread_id'] . "&rowstart={$ctr}'>{$ctr2}</a> "; $pages = $pages . $pnum; $ctr = $ctr + $threads_per_page; $ctr2++; } $threadsubject .= "<br />(" . $locale['455'] . trim($pages) . ")"; } echo "<td width='100%' class='tbl1'>"; if (iMOD) { echo "<input type='checkbox' name='check_mark[]' value='" . $tdata['thread_id'] . "' />\n"; } echo $threadsubject . "</td>\n"; echo "<td width='1%' class='tbl2' style='white-space:nowrap'><a href='../profile.php?lookup=" . $tdata['thread_author'] . "'>" . $tdata['user_author'] . "</a></td>\n"; echo "<td align='center' width='1%' class='tbl1' style='white-space:nowrap'>" . $tdata['thread_views'] . "</td>\n"; echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'>" . ($tdata['thread_postcount'] - 1) . "</td>\n"; echo "<td width='1%' class='tbl1' style='white-space:nowrap'>" . showdate("forumdate", $tdata['thread_lastpost']) . "<br />\n"; echo "<span class='small'>" . $locale['406'] . "<a href='../profile.php?lookup=" . $tdata['thread_lastuser'] . "'>" . $tdata['user_lastuser'] . "</a></span></td>\n"; echo "</tr>\n"; } echo "</table><!--sub_forum_table-->\n"; } else { if (!$threadcount) { echo "<tr>\n<td colspan='6' class='tbl1' style='text-align:center'>" . $locale['456'] . "</td>\n</tr>\n</table><!--sub_forum_table-->\n"; } else { echo "</table><!--sub_forum_table-->\n"; } } if (iMOD) { if ($threadcount || $rows) { echo "<table cellspacing='0' cellpadding='0' width='100%'>\n<tr>\n<td style='padding-top:5px'>"; echo "<a href='#' onclick=\"javascript:setChecked('mod_form','check_mark[]',1);return false;\">" . $locale['460'] . "</a> ::\n";
$temp_user_level = $locale['ucc_112']; break; default: $temp_user_level = $locale['ucc_150']; } echo "<tr>\n\t\t<td class='" . $cls . "' align='left'>" . $data['user_id'] . "</td>\n\t\t<td class='" . $cls . "' align='left'><a href='" . BASEDIR . "profile.php?lookup=" . $data['user_id'] . "' class='side'>" . $data['user_name'] . "</a></td>\n\t\t<td class='" . $cls . "' align='center'>" . $temp_user_level . "</td>\n\t\t<td class='" . $cls . "' align='center'><a href='mailto:" . $data['user_email'] . "'>" . $data['user_email'] . "</a></td>\n\t\t<td class='" . $cls . "' align='center'><a href='http://www.geoiptool.com/en/?IP=" . $data['user_ip'] . "' target='_blank'>" . $data['user_ip'] . "</a></td>"; if (checkrights("M")) { if (iUSER > $data['user_level'] and $data['user_id'] != 1 and checkrights("M")) { echo "<td class='" . $cls . "' align='center'><a href='" . FUSION_SELF . $aidlink . "&section=lastlogin&action=delete&user_id=" . $data['user_id'] . "&rowstart={$rowstart}' onClick='return DeleteMember();'>" . $locale['409'] . "</a></td>"; } else { echo "<td class='" . $cls . "' align='center'> </td>"; } } echo "<td class='" . $cls . "' align='left'>"; if ($data['user_lastvisit'] != 0) { echo showdate("shortdate", $data['user_lastvisit']); } get_lavi($data['user_lastvisit'], $locale); echo "</td>\n </tr>"; } echo "</table>"; echo "<br>" . $locale['ucc_414'] . " "; if ($sortby != "lastvisit") { echo "<a href='" . FUSION_SELF . $aidlink . "&section=lastlogin&sortby=lastvisit&rowstart=" . $rowstart . "'>" . $locale['ucc_406'] . "</a>, "; } else { echo "<i>" . $locale['ucc_406'] . "</i>, "; } if ($sortby != "id") { echo "<a href='" . FUSION_SELF . $aidlink . "&section=lastlogin&sortby=id&rowstart=" . $rowstart . "'>" . $locale['ucc_113'] . "</a>, "; } else { echo "<i>" . $locale['ucc_113'] . "</i>, ";
if ($fb4['user_titles_posts'] && $fb4['user_titles']) { $titleLookup = dbquery("select * from " . $db_prefix . "fb_titles where title_id='" . $data['user_title'] . "' and (" . useraccess("title_access") . ")"); if (dbrows($titleLookup)) { $titleData = dbarray($titleLookup); $title .= "<b>" . stripslash($titleData['title_title']) . "</b>"; } else { $title .= "<b>" . stripslash($data['user_title']) . "</b>"; } if ($settings['forum_ranks'] || $fb4['show_ulevel']) { $title .= " :: "; } } echo "</span><br /><br />\n"; renderAwards($data['user_id'], "", "<br /><br />"); echo "<!--forum_thread_user_info--><span class='small'><strong>" . $locale['502'] . "</strong> " . $data['user_posts'] . "</span><br />\n"; echo "<span class='small'><strong>" . $locale['504'] . "</strong> " . showdate("%d.%m.%y", $data['user_joined']) . "</span>\n"; if ($data['user_location']) { echo "<br /><span class='small'><strong>" . $locale['fb500'] . ":</strong> " . stripslash($data['user_location']) . "</span>\n"; } if ($data['user_birthdate'] !== "0000-00-00") { $birthday = explode("-", $data['user_birthdate']); $age = strftime("%Y") - $birthday[0]; if (strftime("%m") < $birthday[1]) { $age--; } elseif (strftime("%m") == $birthday[1]) { if (strftime("%d") < $birthday[2]) { $age--; } } echo "<br /><span class='small'><strong>" . $locale['fb512'] . "</strong> {$age}</span>\n"; }
</table> <fieldset> <legend>' . $locale['pdp_dir_files'] . ':</legend> ' . $pdp->settings['upload_file'] . ' <select name="dir_files">' . $sel_dir_files . ' </select> <input type="submit" class="button" name="set_dir_files" value="' . $locale['PDP453'] . '" /> </fieldset> </form> <hr />'; $query_id = dbquery("SELECT log_timestamp, log_type, user_name, log.user_id,\n\tlog_errno\n\tFROM " . DB_PDP_LOG . " AS log\n\tLEFT JOIN " . DB_USERS . " AS fu USING(user_id)\n\tWHERE download_id='" . $download->id . "'\n\tORDER BY log_timestamp DESC"); if (!dbrows($query_id)) { echo '<p>' . $locale['PDP451'] . '</p>'; } else { echo ' <ul>'; } while ($data = dbarray($query_id)) { echo ' <li>' . showdate('shortdate', $data['log_timestamp']) . ' <a href="profile.php?id=' . $data['user_id'] . '">' . $data['user_name'] . '</a>' . ' - <strong>' . $locale['PDP903'][$data['log_type']] . '</strong> - ' . $locale['PDP900'][$data['log_errno']] . '</li>'; } if (dbrows($query_id)) { echo ' </ul>'; } closetable(); require_once 'include/die.php';