function CreateMBX($uid, $MailBoxMaxSize = 0) { $cyrus = new cyrus(); if (!$cyrus->MailBoxExists($uid)) { build_progress("Check privileges...", 10); if (!checkrights($uid, $MailBoxMaxSize)) { build_progress("{error_creating_mailbox}", 110); return; } build_progress("{create_mailbox2}", 50); if (!$cyrus->CreateMailbox($uid, 1, 50)) { build_progress("{error_creating_mailbox}", 110); return; } build_progress("Building privileges", 80); $cyrus = new cyrus(); $cyrus->CreateACLS($uid); build_progress("{success}", 100); echo $cyrus->cyrus_infos . "\n"; return; } build_progress("Building privileges", 80); $cyrus = new cyrus(); $cyrus->CreateACLS($uid); build_progress("{$uid}: {mailbox_already_exists} {success}", 100); }
function fusion_console() { if (iADMIN && checkrights('ERRO') || iSUPERADMIN) { $error_logs = new \PHPFusion\ErrorLogs(); $error_logs->compressed = 1; if (!defined('no_debugger')) { ob_start(); echo openmodal('tbody', 'Error Console', array('class' => 'modal-lg modal-center zindex-boost', 'button_id' => 'turbo_debugger')); $error_logs->show_footer_logs(); echo closemodal(); add_to_footer(ob_get_contents()); ob_end_clean(); } } }
function checkrights($el, $rec = false) { $perms = show_perms($el); if (is_readable($el) && is_writeable($el)) { $color = 'green'; } else { $color = 'red'; } echo ' <tr> <td width="100%" class="row1" style="color: ' . $color . '">' . $el . '</td> <td class="row2" nowrap>' . show_perms($el) . '</td> </tr>'; if (is_dir($el) && $rec) { $dir = rcms_scandir($el); foreach ($dir as $del) { checkrights($el . '/' . $del, true); } } }
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 alcr_can_admin($user_id) { global $alcr_settings; if (checkrights("ALCR")) { return true; } else { if ($alcr_settings['calendar_admin_group'] == 0) { return true; } else { if ($alcr_settings['calendar_admin_group'] == 101 && iMEMBER) { return true; } else { if ($alcr_settings['calendar_admin_group'] == 102 && iADMIN) { return true; } else { if ($alcr_settings['calendar_admin_group'] == 103 && iSUPERADMIN) { return true; } else { $result = dbquery("SELECT user_groups FROM " . DB_USERS . " WHERE user_id='" . $user_id . "'"); if (dbrows($result)) { $data = dbarray($result); if (in_array($alcr_settings['calendar_admin_group'], explode(".", $data['user_groups']))) { return true; } } $result = dbquery("SELECT * FROM " . DB_AL_CALENDAR_ADMINS . " WHERE alcr_admin_user='******'"); if (dbrows($result)) { return true; } } } } } } return false; }
| Filename: infusions.php | Author: Nick Jones (Digitanium) | Co-Author: Christian Damsgaard Jørgensen (PMM) +--------------------------------------------------------+ | 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/admin_header.php"; include LOCALE . LOCALESET . "admin/infusions.php"; if (!checkrights("I") || !defined("iAUTH") || $_GET['aid'] != iAUTH) { redirect("../index.php"); } $inf_title = ""; $inf_description = ""; $inf_version = ""; $inf_developer = ""; $inf_email = ""; $inf_weburl = ""; $inf_folder = ""; $inf_newtable = ""; $inf_insertdbrow = ""; $inf_droptable = ""; $inf_altertable = ""; $inf_deldbrow = ""; $inf_sitelink = "";
<?php $MYSQL_DUMPER = true; if (!(require_once "../../maincore.php")) { die("<div style='font-family:Verdana;font-size:11px;text-align:center;'><strong>maincore.php not found!</strong><br /></div>"); } if (!defined("iAUTH") || !checkrights("DB") || !iSUPERADMIN) { die("No Access"); }
echo $locale['SB_enter_validation_code'] . "<br />\n<input type='text' name='captcha_code' class='textbox' style='width:100px' /><br />\n"; } 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();
switch ($data['user_level']) { case "103": $temp_user_level = $locale['ucc_110']; break; case "102": $temp_user_level = $locale['ucc_111']; break; case "101": $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") {
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]; if ($i == 1) { echo THEME_BULLET . " <a href='" . ADMIN . "index.php" . $aidlink . "' class='side'>" . $locale['ac00'] . "</a>\n"; echo "<hr class='side-hr' />\n"; } if ($page) { $admin_pages = true; echo "<form action='" . FUSION_SELF . "'>\n"; echo "<select onchange='window.location.href=this.value' style='width:100%;' class='textbox'>\n"; echo "<option value='" . FUSION_SELF . "' style='font-style:italic;' selected='selected'>" . $locale['ac0' . $i] . "</option>\n";
echo "</table></td>"; } //winner if ($tour['tour_w1'] != "0") { $uv = dbarray(dbquery("SELECT user_name FROM " . DB_USERS . " WHERE user_id='" . $tour['tour_w1'] . "'")); $winner = "<a href='" . BASEDIR . "profile.php?lookup=" . $tour['tour_w1'] . "'><strong>" . $uv['user_name'] . "</strong></a>"; } else { $winner = "TBA"; } echo "<td valign='middle'><table width='170'><tr><td class='tbl2' width='100%' height='30'>" . $winner . "</td></tr></table></td>"; echo "</tr></table><br /><br /><br />"; // 3-4 $z = $rounds + 1; $f34 = dbarray(dbquery("SELECT * FROM " . DB_T_MATCHES . " WHERE match_tour='" . $tid . "' AND match_round='" . $z . "' AND match_match='1'")); // vs if (checkrights("T") || $userdata['user_id'] == $f34['match_pl1'] || $userdata['user_id'] == $f34['match_pl2']) { $vs34 = "<a href='" . BASEDIR . "tourney.php?p=result&id=" . $f34['match_id'] . "'>" . ($f34['match_played'] == "1" ? $f34['match_score1'] . ":" . $f34['match_score2'] : "vs") . "</a>"; } else { $vs34 = $f34['match_played'] == "1" ? $f34['match_score1'] . ":" . $f34['match_score2'] : "vs"; } // pl1 if ($f34['match_pl1'] == "0") { $pl134 = "TBA"; } elseif ($f34['match_pl1'] == $bye) { $pl134 = "freeslot"; } else { $u134 = dbarray(dbquery("SELECT user_name FROM " . DB_USERS . " WHERE user_id='" . $f34['match_pl1'] . "'")); $pl134 = "<a href='" . BASEDIR . "profile.php?lookup=" . $f34['match_pl1'] . "'>" . ($f34['match_winner'] == $f34['match_pl1'] ? "<strong>" . $u134['user_name'] . "</strong>" : $u134['user_name']) . "</a>"; } // pl2 if ($f34['match_pl2'] == "0") {
$result = dbquery("SELECT s.*, u.user_id, u.user_name, u.user_status, u.user_avatar\n\t\t\t\tFROM " . DB_SUBMISSIONS . " s LEFT JOIN " . DB_USERS . " u on u.user_id=s.submit_user\n\t\t\t\tORDER BY submit_datestamp DESC LIMIT " . $_GET['s_rowstart'] . ", " . $settings['comments_per_page'] . "\n\t\t\t\t"); $global_submissions['data'] = array(); if (dbrows($result) > 0 && checkrights('SU')) { while ($_subdata = dbarray($result)) { $global_submissions['data'][] = $_subdata; } } else { $global_submissions['nodata'] = $locale['254a']; } if ($global_submissions['rows'] > $settings['comments_per_page']) { $global_submissions['submissions_nav'] = "<span class='pull-right text-smaller'>" . makepagenav($_GET['s_rowstart'], $settings['comments_per_page'], $global_submissions['rows'], 2) . "</span>\n"; } // Icon Grid if (isset($_GET['pagenum']) && isnum($_GET['pagenum'])) { $result = dbquery("SELECT * FROM " . DB_ADMIN . " WHERE admin_page='" . $_GET['pagenum'] . "' ORDER BY admin_title"); $admin_icons['rows'] = dbrows($result); $admin_icons['data'] = array(); if (dbrows($result)) { while ($_idata = dbarray($result)) { if (checkrights($_idata['admin_rights']) && $_idata['admin_link'] != "reserved") { // Current locale file have the admin title definitions paired by admin_rights. if ($_idata['admin_page'] !== 5) { $_idata['admin_title'] = isset($locale[$_idata['admin_rights']]) ? $locale[$_idata['admin_rights']] : $_idata['admin_title']; } $admin_icons['data'][] = $_idata; } } } } render_admin_dashboard(); require_once THEMES . "templates/footer.php";
$usr = new usersMenus(); if ($usr->AsMailBoxAdministrator == false) { $tpl = new Templates(); echo "alert('" . $tpl->javascript_parse_text('{ERROR_NO_PRIVS}') . "');"; die; } if (isset($_GET["popup"])) { popup(); exit; } if (isset($_GET["Status"])) { echo Status($_GET["Status"]); exit; } if (isset($_GET["checkrights"])) { checkrights(); exit; } if (isset($_GET["CreateMBX"])) { CreateMBX(); exit; } if (isset($_GET["MBXSetACL"])) { MBXSetACL(); exit; } if (isset($_GET["MBXSubscribe"])) { MBXSubscribe(); exit; } if (isset($_GET["StatusFailed"])) {
$data['download_post_time'] = showdate('shortdate', $data['download_datestamp']); $data['download_post_time2'] = $locale['global_049'] . " " . timer($data['download_datestamp']); $data['download_count'] = format_word($data['download_count'], $locale['fmt_download']); $data['download_version'] = $data['download_version'] ? $data['download_version'] : $locale['na']; $data['download_license'] = $data['download_license'] ? $data['download_license'] : $locale['na']; $data['download_os'] = $data['download_os'] ? $data['download_os'] : $locale['na']; $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"); }
$result = dbquery("DELETE FROM " . DB_COMMENTS . " WHERE comment_name='" . $data['user_id'] . "'"); $result = dbquery("DELETE FROM " . DB_MESSAGES . " WHERE message_to='" . $data['user_id'] . "' OR message_from='" . $data['user_id'] . "'"); $result = dbquery("DELETE FROM " . DB_NEWS . " WHERE news_name='" . $data['user_id'] . "'"); $result = dbquery("DELETE FROM " . DB_POLL_VOTES . " WHERE vote_user='******'user_id'] . "'"); $result = dbquery("DELETE FROM " . DB_RATINGS . " WHERE rating_user='******'user_id'] . "'"); $result = dbquery("DELETE FROM " . DB_SUSPENDS . " WHERE suspended_user='******'user_id'] . "'"); $result = dbquery("DELETE FROM " . DB_THREADS . " WHERE thread_author='" . $data['user_id'] . "'"); $result = dbquery("DELETE FROM " . DB_POSTS . " WHERE post_author='" . $data['user_id'] . "'"); $result = dbquery("DELETE FROM " . DB_THREAD_NOTIFY . " WHERE notify_user='******'user_id'] . "'"); } } if ($usr_deactivate > 10) { $new_time = $settings['cronjob_day']; } } $result = dbquery("UPDATE " . DB_SETTINGS . " SET settings_value='" . $new_time . "' WHERE settings_name='cronjob_day'"); } // Error handling if (iADMIN && checkrights("ERRO") && count($_errorHandler) > 0) { echo "<div class='admin-message'>" . str_replace("[ERROR_LOG_URL]", ADMIN . "errors.php" . $aidlink, $locale['err_101']) . "</div>\n"; } echo "</body>\n</html>\n"; $output = ob_get_contents(); if (ob_get_length() !== FALSE) { ob_end_clean(); } echo handle_output($output); if (ob_get_length() !== FALSE) { ob_end_flush(); } mysql_close($db_connect);
function render_dashboard() { global $members, $forum, $download, $news, $articles, $weblinks, $photos, $global_comments, $global_ratings, $global_submissions, $link_type, $submit_type, $comments_type, $locale, $aidlink, $settings, $infusions_count; $mobile = '12'; $tablet = '12'; $laptop = '6'; $desktop = '3'; opentable($locale['250']); echo "<!--Start Members-->\n"; echo "<div class='row'>\n"; echo "<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n"; openside(); echo "<img class='pull-left m-r-10 dashboard-icon' src='" . get_image("ac_M") . "'/>\n"; echo "<h4 class='text-right m-t-0 m-b-0'>\n" . number_format($members['registered']) . "</h4>"; echo "<span class='m-t-10 text-uppercase text-lighter text-smaller pull-right'><strong>" . $locale['251'] . "</strong></span>\n"; closeside("" . (checkrights("M") ? "<div class='text-right text-uppercase'>\n<a class='text-smaller' href='" . ADMIN . "members.php" . $aidlink . "'>" . $locale['255'] . "</a><i class='entypo right-open-mini'></i></div>\n" : '') . ""); echo "</div>\n<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n"; openside(); echo "<img class='pull-left m-r-10 dashboard-icon' src='" . get_image("ac_M") . "'/>\n"; echo "<h4 class='text-right m-t-0 m-b-0'>\n" . number_format($members['cancelled']) . "</h4>"; echo "<span class='m-t-10 text-uppercase text-lighter text-smaller pull-right'><strong>" . $locale['263'] . "</strong></span>\n"; closeside("" . (checkrights("M") ? "<div class='text-right text-uppercase'>\n<a class='text-smaller' href='" . ADMIN . "members.php" . $aidlink . "&status=5'>" . $locale['255'] . "</a> <i class='entypo right-open-mini'></i></div>\n" : '') . ""); echo "</div>\n<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n"; openside(); echo "<img class='pull-left m-r-10 dashboard-icon' src='" . get_image("ac_M") . "'/>\n"; echo "<h4 class='text-right m-t-0 m-b-0'>\n" . number_format($members['unactivated']) . "</h4>"; echo "<span class='m-t-10 text-uppercase text-lighter text-smaller pull-right'><strong>" . $locale['252'] . "</strong></span>\n"; closeside("" . (checkrights("M") ? "<div class='text-right text-uppercase'>\n<a class='text-smaller' href='" . ADMIN . "members.php" . $aidlink . "&status=2'>" . $locale['255'] . "</a> <i class='entypo right-open-mini'></i></div>\n" : '') . ""); echo "</div>\n<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n"; openside(); echo "<img class='pull-left m-r-10 dashboard-icon' src='" . get_image("ac_M") . "'/>\n"; echo "<h4 class='text-right m-t-0 m-b-0'>\n" . number_format($members['security_ban']) . "</h4>"; echo "<span class='m-t-10 text-uppercase text-lighter text-smaller pull-right'><strong>" . $locale['253'] . "</strong></span>\n"; closeside("" . (checkrights("M") ? "<div class='text-right text-uppercase'><a class='text-smaller' href='" . ADMIN . "members.php" . $aidlink . "&status=4'>" . $locale['255'] . "</a> <i class='entypo right-open-mini'></i></div>\n" : '') . ""); echo "</div>\n</div>\n"; echo "<!--End Members-->\n"; $mobile = '12'; $tablet = '12'; $laptop = '6'; $desktop = '4'; echo "<div class='row'>\n"; if (db_exists(DB_FORUMS)) { echo "<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n"; openside("", "well"); echo "<span class='text-smaller text-uppercase'><strong>" . $locale['265'] . " " . $locale['258'] . "</strong></span>\n<br/>\n"; echo "<div class='clearfix m-t-10'>\n"; echo "<img class='img-responsive pull-right dashboard-icon' src='" . get_image("ac_F") . "'/>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['265'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($forum['count']) . "</h4>\n"; echo "</div>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['256'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($forum['thread']) . "</h4>\n"; echo "</div>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['259'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($forum['post']) . "</h4>\n"; echo "</div>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['260'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . $forum['users'] . "</h4>\n"; echo "</div>\n"; echo "</div>\n"; closeside(); echo "</div>\n"; } if (db_exists(DB_DOWNLOADS)) { echo "<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n"; openside("", "well"); echo "<span class='text-smaller text-uppercase'><strong>" . $locale['268'] . " " . $locale['258'] . "</strong></span>\n<br/>\n"; echo "<div class='clearfix m-t-10'>\n"; echo "<img class='img-responsive pull-right dashboard-icon' src='" . get_image("ac_D") . "'/>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['268'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($download['download']) . "</h4>\n"; echo "</div>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['257'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($download['comment']) . "</h4>\n"; echo "</div>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['254'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($download['submit']) . "</h4>\n"; echo "</div>\n"; echo "</div>\n"; closeside(); echo "</div>\n"; } if (db_exists(DB_NEWS)) { echo "<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n"; openside("", "well"); echo "<span class='text-smaller text-uppercase'><strong>" . $locale['269'] . " " . $locale['258'] . "</strong></span>\n<br/>\n"; echo "<div class='clearfix m-t-10'>\n"; echo "<img class='img-responsive pull-right dashboard-icon' src='" . get_image("ac_N") . "'/>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['269'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($news['news']) . "</h4>\n"; echo "</div>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['257'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($news['comment']) . "</h4>\n"; echo "</div>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['254'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($news['submit']) . "</h4>\n"; echo "</div>\n"; echo "</div>\n"; closeside(); echo "</div>\n"; } if (db_exists(DB_ARTICLES)) { echo "<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n"; openside("", "well"); echo "<span class='text-smaller text-uppercase'><strong>" . $locale['270'] . " " . $locale['258'] . "</strong></span>\n<br/>\n"; echo "<div class='clearfix m-t-10'>\n"; echo "<img class='img-responsive pull-right dashboard-icon' src='" . get_image("ac_A") . "'/>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['270'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($articles['article']) . "</h4>\n"; echo "</div>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['257'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($articles['comment']) . "</h4>\n"; echo "</div>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['254'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($articles['submit']) . "</h4>\n"; echo "</div>\n"; echo "</div>\n"; closeside(); echo "</div>\n"; } if (db_exists(DB_WEBLINKS)) { echo "<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n"; openside("", "well"); echo "<span class='text-smaller text-uppercase'><strong>" . $locale['271'] . " " . $locale['258'] . "</strong></span>\n<br/>\n"; echo "<div class='clearfix m-t-10'>\n"; echo "<img class='img-responsive pull-right dashboard-icon' src='" . get_image("ac_W") . "'/>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['271'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($weblinks['weblink']) . "</h4>\n"; echo "</div>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['257'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($weblinks['comment']) . "</h4>\n"; echo "</div>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['254'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($weblinks['submit']) . "</h4>\n"; echo "</div>\n"; echo "</div>\n"; closeside(); echo "</div>"; } if (db_exists(DB_PHOTOS)) { echo "<div class='col-xs-{$mobile} col-sm-{$tablet} col-md-{$laptop} col-lg-{$desktop}'>\n"; openside("", "well"); echo "<span class='text-smaller text-uppercase'><strong>" . $locale['272'] . " " . $locale['258'] . "</strong></span>\n<br/>\n"; echo "<div class='clearfix m-t-10'>\n"; echo "<img class='img-responsive pull-right dashboard-icon' src='" . get_image("ac_PH") . "'/>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['272'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($photos['photo']) . "</h4>\n"; echo "</div>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['257'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($photos['comment']) . "</h4>\n"; echo "</div>\n"; echo "<div class='pull-left display-inline-block m-r-10'>\n"; echo "<span class='text-smaller'>" . $locale['254'] . "</span>\n<br/>\n"; echo "<h4 class='m-t-0'>" . number_format($photos['submit']) . "</h4>\n"; echo "</div>\n"; echo "</div>\n"; closeside(); echo "</div>\n"; } echo "</div>\n"; echo "<div class='row'>\n"; echo "<div class='col-xs-12 co-sm-6 col-md-6 col-lg-3'>\n"; openside("<span class='text-smaller text-uppercase'><strong>" . $locale['283'] . "</strong></span><span class='pull-right badge'>" . number_format($infusions_count) . "</span>"); if ($infusions_count > 0) { global $global_infusions; echo "<div class='comment_content'>\n"; if (!empty($global_infusions)) { foreach ($global_infusions as $inf_id => $inf_data) { echo "<span class='badge m-b-10'>" . $inf_data['inf_title'] . "</span>\n"; } } echo "</div>\n"; closeside("" . (checkrights("I") ? "<div class='text-right text-uppercase'>\n<a class='text-smaller' href='" . ADMIN . "infusions.php" . $aidlink . "'>" . $locale['285'] . "</a><i class='entypo right-open-mini'></i></div>\n" : '') . ""); } else { echo "<div class='text-center'>" . $locale['284'] . "</div>\n"; closeside(); } // comments echo "</div>\n<div class='col-xs-12 co-sm-6 col-md-6 col-lg-3'>\n"; openside("<span class='text-smaller text-uppercase'><strong>" . $locale['277'] . "</strong></span><span class='pull-right badge'>" . number_format($global_comments['rows']) . "</span>"); if (count($global_comments['data']) > 0) { foreach ($global_comments['data'] as $i => $comment_data) { echo "<!--Start Comment Item-->\n"; echo "<div data-id='{$i}' class='comment_content clearfix p-t-10 p-b-10' " . ($i > 0 ? "style='border-top:1px solid #ddd;'" : '') . " >\n"; echo "<div class='pull-left display-inline-block' style='margin-top:0px; margin-bottom:10px;'>" . display_avatar($comment_data, "25px", "", FALSE, "", "") . "</div>\n"; echo "<div id='comment_action-{$i}' class='btn-group pull-right display-none' style='position:absolute; right: 30px; margin-top:25px;'>\n\n\t\t\t\t<a class='btn btn-xs btn-default' title='" . $locale['274'] . "' href='" . ADMIN . "comments.php" . $aidlink . "&ctype=" . $comment_data['comment_type'] . "&comment_item_id=" . $comment_data['comment_item_id'] . "'><i class='entypo eye'></i></a>\n\t\t\t\t<a class='btn btn-xs btn-default' title='" . $locale['275'] . "' href='" . ADMIN . "comments.php" . $aidlink . "&action=edit&comment_id=" . $comment_data['comment_id'] . "&ctype=" . $comment_data['comment_type'] . "&comment_item_id=" . $comment_data['comment_item_id'] . "'><i class='entypo pencil'></i></a>\n\t\t\t\t<a class='btn btn-xs btn-default' title='" . $locale['276'] . "' href='" . ADMIN . "comments.php" . $aidlink . "&action=delete&comment_id=" . $comment_data['comment_id'] . "&ctype=" . $comment_data['comment_type'] . "&comment_item_id=" . $comment_data['comment_item_id'] . "'><i class='entypo trash'></i></a></div>\n"; echo "<strong>" . profile_link($comment_data['user_id'], $comment_data['user_name'], $comment_data['user_status']) . "</strong>\n"; echo "<span class='text-lighter'>" . $locale['273'] . "</span> <a href='" . sprintf($link_type[$comment_data['comment_type']], $comment_data['comment_item_id']) . "'><strong>" . $comments_type[$comment_data['comment_type']] . "</strong></a>"; echo "<br/>\n" . timer($comment_data['comment_datestamp']) . "<br/>\n"; echo "<span class='text-smaller text-lighter'>" . trimlink(parseubb($comment_data['comment_message']), 70) . "</span>\n"; echo "</div>\n"; echo "<!--End Comment Item-->\n"; } if (isset($global_comments['comments_nav'])) { echo "<div class='clearfix'>\n"; echo "<span class='pull-right text-smaller'>" . $global_comments['comments_nav'] . "</span>"; echo "</div>\n"; } } else { echo "<div class='text-center'>" . $global_comments['nodata'] . "</div>\n"; } closeside(); echo "</div>\n<div class='col-xs-12 co-sm-6 col-md-6 col-lg-3'>\n"; // Ratings openside("<span class='text-smaller text-uppercase'><strong>" . $locale['278'] . "</strong></span>"); if (count($global_ratings['data']) > 0) { foreach ($global_ratings['data'] as $i => $ratings_data) { echo "<!--Start Rating Item-->\n"; echo "<div class='comment_content clearfix p-t-10 p-b-10' " . ($i > 0 ? "style='border-top:1px solid #ddd;'" : '') . " >\n"; echo "<div class='pull-left display-inline-block' style='margin-top:0px; margin-bottom:10px;'>" . display_avatar($ratings_data, "25px", "", FALSE, "", "") . "</div>\n"; echo "<strong>" . profile_link($ratings_data['user_id'], $ratings_data['user_name'], $ratings_data['user_status']) . "</strong>\n"; echo "<span class='text-lighter'>" . $locale['273a'] . "</span>\n"; echo "<a href='" . sprintf($link_type[$ratings_data['rating_type']], $ratings_data['rating_item_id']) . "'><strong>" . $comments_type[$ratings_data['rating_type']] . "</strong></a>"; echo "<span class='text-lighter m-l-10'>" . str_repeat("<i class='fa fa-star fa-fw'></i>", $ratings_data['rating_vote']) . "</span>\n<br/>"; echo timer($ratings_data['rating_datestamp']) . "<br/>\n"; echo "</div>\n"; echo "<!--End Rating Item-->\n"; } if (isset($global_ratings['ratings_nav'])) { echo "<div class='clearfix'>\n"; echo "<span class='pull-right text-smaller'>" . $global_ratings['ratings_nav'] . "</span>"; echo "</div>\n"; } } else { echo "<div class='text-center'>" . $global_ratings['nodata'] . "</div>\n"; } closeside(); echo "</div>\n<div class='col-xs-12 co-sm-6 col-md-6 col-lg-3'>\n"; openside("<span class='text-smaller text-uppercase'><strong>" . $locale['279'] . "</strong></span><span class='pull-right badge'>" . number_format($global_submissions['rows']) . "</span>"); if (count($global_submissions['data']) > 0) { foreach ($global_submissions['data'] as $i => $submit_data) { switch ($submit_data['submit_type']) { case "n": $review_link = INFUSIONS . "news/news_admin.php" . $aidlink . "&section=submissions&submit_id=" . $submit_data['submit_id']; break; case "a": $review_link = INFUSIONS . "articles/articles_admin.php" . $aidlink . "&section=submissions&submit_id=" . $submit_data['submit_id']; break; case "p": $review_link = INFUSIONS . "gallery/gallery_admin.php" . $aidlink . "&section=submissions&submit_id=" . $submit_data['submit_id']; break; case "b": $review_link = INFUSIONS . "blog/blog_admin.php" . $aidlink . "&section=submissions&submit_id=" . $submit_data['submit_id']; break; case "d": $review_link = INFUSIONS . "downloads/downloads_admin.php" . $aidlink . "&section=submissions&submit_id=" . $submit_data['submit_id']; break; case "l": $review_link = INFUSIONS . "weblinks/weblinks_admin.php" . $aidlink . "&section=submissions&submit_id=" . $submit_data['submit_id']; break; default: // @todo: add admin class API to use infusion_db.php to register submission link $review_link = ""; } echo "<!--Start Submissions Item-->\n"; echo "<div data-id='{$i}' class='submission_content clearfix p-t-10 p-b-10' " . ($i > 0 ? "style='border-top:1px solid #ddd;'" : '') . " >\n"; echo "<div class='pull-left display-inline-block' style='margin-top:0px; margin-bottom:10px;'>" . display_avatar($submit_data, "25px", "", FALSE, "", "") . "</div>\n"; echo "<strong>" . profile_link($submit_data['user_id'], $submit_data['user_name'], $submit_data['user_status']) . "</strong>\n"; echo "<span class='text-lighter'>" . $locale['273b'] . " <strong>" . $submit_type[$submit_data['submit_type']] . "</strong></span><br/>\n"; echo timer($submit_data['submit_datestamp']) . "<br/>\n"; if (!empty($review_link)) { echo "<a class='btn btn-xs btn-default m-t-5' title='" . $locale['286'] . "' href='" . $review_link . "'>" . $locale['286'] . "</a>\n"; } echo "</div>\n"; echo "<!--End Submissions Item-->\n"; } if (isset($global_submissions['submissions_nav'])) { echo "<div class='clearfix'>\n"; echo "<span class='pull-right text-smaller'>" . $global_submissions['submissions_nav'] . "</span>"; echo "</div>\n"; } } else { echo "<div class='text-center'>" . $global_submissions['nodata'] . "</div>\n"; } closeside(); echo "</div>\n"; closetable(); add_to_jquery("\n\t\$('.comment_content').hover(function() {\n\t\$('#comment_action-'+\$(this).data('id')).removeClass('display-none');\n\t},function(){\n\t\$('#comment_action-'+\$(this).data('id')).addClass('display-none');\n\t});\n\t\$('.submission_content').hover(function() {\n\t\$('#submission_action-'+\$(this).data('id')).removeClass('display-none');\n\t},function(){\n\t\$('#submission_action-'+\$(this).data('id')).addClass('display-none');\n\t});\n\t"); }
<?php opentable($locale['alb47']); echo "<div style='float:right;min-height: 30px;'>"; if (iMEMBER && $blog_settings['allow_user_blogs'] || iADMIN && checkrights("ALB")) { $my_posts = dbcount("(alb_post_id)", DB_AL_BLOG_POSTS, "alb_post_user='******'user_id'] . "'"); echo "<a href='" . FUSION_SELF . "?p=my_posts'>" . $locale['alb3'] . " (" . $my_posts . ")</a> <a href='" . FUSION_SELF . "?p=manage_post'><img src='" . AL_BLOG_DIR . "asset/images/add.png' alt='" . $locale['alb6'] . "' title='" . $locale['alb6'] . "' width='16' /></a>"; } echo "<a href='" . FUSION_SELF . "' style='margin-left:25px;'>" . $locale['alb4'] . "</a>"; echo "<a href='" . FUSION_SELF . "?p=categories' style='margin-left:25px;'>" . $locale['alb5'] . "</a>"; echo "</div><div style='clear:both;'></div>"; closetable();
function showcomments($ctype, $cdb, $ccol, $cid, $clink) { global $settings, $locale, $userdata, $aidlink; $link = FUSION_SELF . (FUSION_QUERY ? "?" . FUSION_QUERY : ""); $link = preg_replace("^(&|\\?)c_action=(edit|delete)&comment_id=\\d*^", "", $link); $cpp = $settings['comments_per_page']; if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "delete") && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) { if (iADMIN && checkrights("C") || iMEMBER && dbcount("(comment_id)", DB_COMMENTS, "comment_id='" . $_GET['comment_id'] . "' AND comment_name='" . $userdata['user_id'] . "'")) { $result = dbquery("DELETE FROM " . DB_COMMENTS . "\r\n\t\t\t\tWHERE comment_id='" . $_GET['comment_id'] . "'" . (iADMIN ? "" : "\r\n\t\t\t\t\tAND comment_name='" . $userdata['user_id'] . "'")); } redirect($clink . ($settings['comments_sorting'] == "ASC" ? "" : "&c_start=0")); } if ($settings['comments_enabled'] == "1") { if ((iMEMBER || $settings['guestposts'] == "1") && isset($_POST['post_comment'])) { if (iMEMBER) { $comment_name = $userdata['user_id']; } elseif ($settings['guestposts'] == "1") { if (!isset($_POST['comment_name'])) { redirect($link); } $comment_name = trim(stripinput($_POST['comment_name'])); $comment_name = preg_replace("(^[+0-9\\s]*)", "", $comment_name); if (isnum($comment_name)) { $comment_name = ""; } $_CAPTCHA_IS_VALID = FALSE; include INCLUDES . "captchas/" . $settings['captcha'] . "/captcha_check.php"; if (!isset($_POST['captcha_code']) || $_CAPTCHA_IS_VALID == FALSE) { redirect($link); } } $comment_message = trim(stripinput(censorwords($_POST['comment_message']))); if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "edit") && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) { $comment_updated = FALSE; if (iADMIN && checkrights("C") || iMEMBER && dbcount("(comment_id)", DB_COMMENTS, "comment_id='" . $_GET['comment_id'] . "' AND comment_item_id='" . $cid . "'\r\n\t\t\t\t\t\tAND comment_type='" . $ctype . "' AND comment_name='" . $userdata['user_id'] . "'\r\n\t\t\t\t\t\tAND comment_hidden='0'")) { if ($comment_message) { $result = dbquery("UPDATE " . DB_COMMENTS . " SET comment_message='" . $comment_message . "'\r\n\t\t\t\t\t\t\t\t\t\t\tWHERE comment_id='" . $_GET['comment_id'] . "'" . (iADMIN ? "" : "\r\n\t\t\t\t\t\t\t\t\t\t\tAND comment_name='" . $userdata['user_id'] . "'")); $comment_updated = TRUE; } } if ($comment_updated) { if ($settings['comments_sorting'] == "ASC") { $c_operator = "<="; } else { $c_operator = ">="; } $c_count = dbcount("(comment_id)", DB_COMMENTS, "comment_id" . $c_operator . "'" . $_GET['comment_id'] . "'\r\n\t\t\t\t\t\t\t\tAND comment_item_id='" . $cid . "'\r\n\t\t\t\t\t\t\t\tAND comment_type='" . $ctype . "'"); $c_start = (ceil($c_count / $cpp) - 1) * $cpp; } redirect($clink . "&c_start=" . (isset($c_start) && isnum($c_start) ? $c_start : "")); } else { if (!dbcount("(" . $ccol . ")", $cdb, $ccol . "='" . $cid . "'")) { redirect(BASEDIR . "index.php"); } if ($comment_name && $comment_message) { require_once INCLUDES . "flood_include.php"; if (!flood_control("comment_datestamp", DB_COMMENTS, "comment_ip='" . USER_IP . "'")) { $result = dbquery("INSERT INTO " . DB_COMMENTS . " (\r\n\t\t\t\t\t\t\t\tcomment_item_id, comment_type, comment_name, comment_message, comment_datestamp,\r\n\t\t\t\t\t\t\t\tcomment_ip, comment_ip_type, comment_hidden\r\n\t\t\t\t\t\t\t) VALUES (\r\n\t\t\t\t\t\t\t\t'" . $cid . "', '" . $ctype . "', '" . $comment_name . "', '" . $comment_message . "', '" . time() . "',\r\n\t\t\t\t\t\t\t\t'" . USER_IP . "', '" . USER_IP_TYPE . "', '0'\r\n\t\t\t\t\t\t\t)"); } } if ($settings['comments_sorting'] == "ASC") { $c_count = dbcount("(comment_id)", DB_COMMENTS, "comment_item_id='" . $cid . "'\r\n\t\t\t\t\t\t\t\t\t\tAND comment_type='" . $ctype . "'"); $c_start = (ceil($c_count / $cpp) - 1) * $cpp; } else { $c_start = 0; } redirect($clink . "&c_start=" . $c_start); } } $c_arr = array("c_con" => array(), "c_info" => array("c_makepagenav" => FALSE, "admin_link" => FALSE)); $c_rows = dbcount("(comment_id)", DB_COMMENTS, "comment_item_id='" . $cid . "'\r\n\t\t\t\t\t\t\tAND comment_type='" . $ctype . "' AND comment_hidden='0'"); if (!isset($_GET['c_start']) && $c_rows > $cpp) { $_GET['c_start'] = (ceil($c_rows / $cpp) - 1) * $cpp; } if (!isset($_GET['c_start']) || !isnum($_GET['c_start'])) { $_GET['c_start'] = 0; } $result = dbquery("SELECT tcm.comment_id, tcm.comment_name, tcm.comment_message, tcm.comment_datestamp,\r\n\t\t\t\t\ttcu.user_id, tcu.user_name, tcu.user_avatar, tcu.user_status\r\n\t\t\tFROM " . DB_COMMENTS . " tcm\r\n\t\t\tLEFT JOIN " . DB_USERS . " tcu ON tcm.comment_name=tcu.user_id\r\n\t\t\tWHERE comment_item_id='" . $cid . "' AND comment_type='" . $ctype . "' AND comment_hidden='0'\r\n\t\t\tORDER BY comment_datestamp " . $settings['comments_sorting'] . " LIMIT " . $_GET['c_start'] . "," . $cpp); if (dbrows($result)) { $i = $settings['comments_sorting'] == "ASC" ? $_GET['c_start'] + 1 : $c_rows - $_GET['c_start']; if ($c_rows > $cpp) { $c_arr['c_info']['c_makepagenav'] = makepagenav($_GET['c_start'], $cpp, $c_rows, 3, $clink . "&", "c_start"); } while ($data = dbarray($result)) { $c_arr['c_con'][$i]['comment_id'] = $data['comment_id']; $c_arr['c_con'][$i]['edit_dell'] = FALSE; $c_arr['c_con'][$i]['i'] = $i; if ($data['user_name']) { $c_arr['c_con'][$i]['comment_name'] = profile_link($data['comment_name'], $data['user_name'], $data['user_status']); } else { $c_arr['c_con'][$i]['comment_name'] = $data['comment_name']; } //Add user avatar in comments new feature in v7.02.04 $c_arr['c_con'][$i]['user_avatar'] = display_avatar($data, '80px'); $c_arr['c_con'][$i]['comment_datestamp'] = $locale['global_071'] . showdate("longdate", $data['comment_datestamp']); $c_arr['c_con'][$i]['comment_message'] = "<!--comment_message-->\n" . nl2br(parseubb(parsesmileys($data['comment_message']))); if (iADMIN && checkrights("C") || iMEMBER && $data['comment_name'] == $userdata['user_id'] && isset($data['user_name'])) { $c_arr['c_con'][$i]['edit_dell'] = "<!--comment_actions-->\n"; $c_arr['c_con'][$i]['edit_dell'] .= "<a href='" . FUSION_REQUEST . "&c_action=edit&comment_id=" . $data['comment_id'] . "#edit_comment'>"; $c_arr['c_con'][$i]['edit_dell'] .= $locale['c108'] . "</a> |\n"; $c_arr['c_con'][$i]['edit_dell'] .= "<a href='" . FUSION_REQUEST . "&c_action=delete&comment_id=" . $data['comment_id'] . "' onclick=\"return confirm('" . $locale['c110'] . "');\">"; $c_arr['c_con'][$i]['edit_dell'] .= $locale['c109'] . "</a>"; } $settings['comments_sorting'] == "ASC" ? $i++ : $i--; } if (iADMIN && checkrights("C")) { $c_arr['c_info']['admin_link'] = "<!--comment_admin-->\n"; $c_arr['c_info']['admin_link'] .= "<a href='" . ADMIN . "comments.php" . $aidlink . "&ctype=" . $ctype . "&cid=" . $cid . "'>" . $locale['c106'] . "</a>"; } } // Render comments echo "<a id='comments' name='comments'></a>"; render_comments($c_arr['c_con'], $c_arr['c_info']); // Add / edit comment opentable($locale['c102']); if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "edit") && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) { $eresult = dbquery("SELECT tcm.comment_id, tcm.comment_name, tcm.comment_message, tcu.user_name\r\n\t\t\t\tFROM " . DB_COMMENTS . " tcm\r\n\t\t\t\tLEFT JOIN " . DB_USERS . " tcu ON tcm.comment_name=tcu.user_id\r\n\t\t\t\tWHERE comment_id='" . $_GET['comment_id'] . "' AND comment_item_id='" . $cid . "'\r\n\t\t\t\t\tAND comment_type='" . $ctype . "' AND comment_hidden='0'"); if (dbrows($eresult)) { $edata = dbarray($eresult); if (iADMIN && checkrights("C") || iMEMBER && $edata['comment_name'] == $userdata['user_id'] && isset($edata['user_name'])) { $clink .= "&c_action=edit&comment_id=" . $edata['comment_id']; $comment_message = $edata['comment_message']; } } else { $comment_message = ""; } } else { $comment_message = ""; } if (iMEMBER || $settings['guestposts'] == "1") { require_once INCLUDES . "bbcode_include.php"; echo "<a id='edit_comment' name='edit_comment'></a>\n"; echo openform('inputform', 'inputform', 'post', $clink); if (iGUEST) { echo "<div align='center' class='tbl'>\n" . $locale['c104'] . "<br />\n"; echo "<input type='text' name='comment_name' maxlength='30' class='textbox' style='width:360px' />\n"; echo "</div>\n"; } echo "<div class='row'>\n"; echo "<div class='col-xs-12 col-sm-12 col-md-12 col-lg-12'>\n"; echo form_textarea('', 'comment_message', 'comment_message', $comment_message, array('required' => 1)); echo display_bbcodes("360px", "comment_message"); if (iGUEST && (!isset($_CAPTCHA_HIDE_INPUT) || isset($_CAPTCHA_HIDE_INPUT) && !$_CAPTCHA_HIDE_INPUT)) { $_CAPTCHA_HIDE_INPUT = FALSE; echo "<div style='width:360px; margin:10px auto;'>"; echo $locale['global_150'] . "<br />\n"; include INCLUDES . "captchas/" . $settings['captcha'] . "/captcha_display.php"; if (!$_CAPTCHA_HIDE_INPUT) { echo "<br />\n<label for='captcha_code'>" . $locale['global_151'] . "</label>"; echo "<br />\n<input type='text' id='captcha_code' name='captcha_code' class='textbox' autocomplete='off' style='width:100px' />\n"; } echo "</div>\n"; } echo form_button($comment_message ? $locale['c103'] : $locale['c102'], 'post_comment', 'post_comment', $comment_message ? $locale['c103'] : $locale['c102'], array('class' => 'btn btn-primary m-t-10')); echo "</div>\n</div>\n"; echo closeform(); } else { echo $locale['c105'] . "\n"; } closetable(); } }
<?php /*************************************************************************** * awEventCalendar * * * * Copyright (C) 2006-2008 Artur Wiebe * * wibix@gmx.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * ***************************************************************************/ if (!defined('IN_FUSION') || !checkrights('I')) { die; } $infusion = array('title' => 'Event Calendar', 'description' => 'Event Calendar', 'version' => '0.8.1', 'developer' => 'Artur Wiebe', 'email' => '*****@*****.**', 'weburl' => 'http://wibix.de', 'requires' => 'FF'); $admin_links = array(); $admin_links[] = array('title' => $infusion['title'], 'image' => '', 'url' => 'admin.php', 'rights' => 'AWEC'); $site_links = array(); $site_links[] = array('title' => $infusion['title'], 'image' => '', 'url' => 'index.php', 'visibility' => '0'); /* TABLE STUFF */ $new_tables = array(); $alter_tables = array(); $new_rows = array(); $del_rows = array(); $new_tables['aw_ec_events'] = "(\n\tev_id int(10) unsigned NOT NULL auto_increment,\n\tuser_id smallint(5) unsigned NOT NULL default '0',\n\n\tev_title varchar(200) NOT NULL default '',\n\tev_body text NOT NULL,\n\tev_location varchar(100) NOT NULL default '',\n\nev_no_smileys tinyint(1) unsigned NOT NULL default '0',\n\n\tctime int(11) NOT NULL default '0',\n\tmtime int(11) NOT NULL default '0',\n\n\tev_start date NOT NULL default '0000-00-00',\n\tev_end date NOT NULL default '0000-00-00',\n\n\tev_start_time time default NULL,\n\tev_end_time time default NULL,\n\n\tev_repeat tinyint(1) unsigned NOT NULL default '0',\n\tev_private tinyint(1) unsigned NOT NULL default '0',\n\tev_status tinyint(1) unsigned NOT NULL default '0',\n\n\tev_allow_logins tinyint(1) NOT NULL default '0',\n\tev_max_logins smallint(5) unsigned NOT NULL default '0',\n\tev_login_access tinyint(3) unsigned NOT NULL default '101',\n\tev_login_limit tinyint(1) unsigned NOT NULL default '0',\n\tev_login_start int(10) unsigned NOT NULL default '0',\n\tev_login_end int(10) unsigned NOT NULL default '0',\n\n\tev_access tinyint(3) unsigned NOT NULL default '0',\n\n\tadmin_user_id smallint(5) unsigned NOT NULL default '1',\n\n\tPRIMARY KEY (ev_id),\n\tKEY (ev_start),\n\tKEY (ev_end)\n) TYPE=MyISAM;"; $new_tables['awec_attachments'] = "(\n\tattach_id int(10) unsigned NOT NULL auto_increment,\n\tevent_id int(10) unsigned NOT NULL default '0',\n\n\tfilename varchar(100) NOT NULL default '',\n\tcomment varchar(200) NOT NULL default '',\n\n\tPRIMARY KEY (attach_id)\n) TYPE=MyISAM;"; $new_tables['aw_ec_cats'] = "(\n\tcat_id smallint(5) unsigned NOT NULL auto_increment,\n\tcat_name varchar(100) NOT NULL default '0',\n\n\tPRIMARY KEY (cat_id)\n) TYPE=MyISAM;"; $new_tables['aw_ec_events_in_cats'] = "(\n\tcat_id smallint(5) unsigned NOT NULL default '0',\n\tevent_id int(10) unsigned NOT NULL default '0',\n\tPRIMARY KEY (cat_id, event_id)\n) TYPE=MyISAM;"; $new_tables['aw_ec_logins'] = "(\n\tev_id int(10) unsigned NOT NULL default '0',\n\tuser_id smallint(5) unsigned NOT NULL default '0',\n\tlogin_comment varchar(50) NOT NULL default '',\n\tlogin_status tinyint(1) unsigned NOT NULL default '0',\n\tlogin_timestamp int(10) unsigned NOT NULL default '0',\n\tPRIMARY KEY (ev_id, user_id)\n) TYPE=MyISAM;";
| Filename: user_trank_include.php | Version: Pimped Fusion v0.09.00 +----------------------------------------------------------------------------+ | Author: Fangree Productions, Fangree_Craig +----------------------------------------------------------------------------+ | 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("PIMPED_FUSION")) { die("Access Denied"); } if ($profile_method == "input") { if (iADMIN && checkrights("C")) { echo "<tr>\n"; echo "<td class='tbl' valign='top'>" . $locale['uf_001'] . " </td>\n"; echo "<td class='tbl'><input type='text' name='user_trank' value='" . (isset($user_data['user_trank']) ? $user_data['user_trank'] : "") . "' maxlength='75' class='textbox' style='width:295px;' /></td>\n"; echo "</tr>\n"; } else { echo ""; } } elseif ($profile_method == "display") { if ($user_data['user_trank']) { echo "<tr>\n"; echo "<td width='1%' class='tbl1' style='white-space:nowrap'>" . $locale['uf_001'] . " </td>\n"; echo "<td align='right' class='tbl1'>"; echo "" . $user_data['user_trank'] . "\n"; echo "</td>\n</tr>\n"; }
/** * 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(); }
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'] . "'"); if (dbrows($result)) {
$guests = 0; $members = array(); while ($data = dbarray($result)) { if ($data['online_user'] == "0") { $guests++; } else { array_push($members, array($data['user_id'], $data['user_name'])); } } echo THEME_BULLET . " " . $locale['global_011'] . ": " . $guests . "<br /><br />\n"; echo THEME_BULLET . " " . $locale['global_012'] . ": " . count($members) . "<br />\n"; if (count($members)) { $i = 1; while (list($key, $member) = each($members)) { echo "<a href='" . BASEDIR . "profile.php?lookup=" . $member[0] . "' class='side'>" . $member[1] . "</a>"; if ($i != count($members)) { echo ",\n"; } else { echo "<br />\n"; } $i++; } } echo "<br />\n" . THEME_BULLET . " " . $locale['global_014'] . ": " . number_format(dbcount("(user_id)", DB_USERS, "user_status<='1'")) . "<br />\n"; if (iADMIN && checkrights("M") && $settings['admin_activation'] == "1") { echo THEME_BULLET . " <a href='" . ADMIN . "members.php" . $aidlink . "&status=2' class='side'>" . $locale['global_015'] . "</a>"; echo ": " . dbcount("(user_id)", DB_USERS, "user_status='2'") . "<br />\n"; } $data = dbarray(dbquery("SELECT user_id,user_name FROM " . DB_USERS . " WHERE user_status='0' ORDER BY user_joined DESC LIMIT 0,1")); echo THEME_BULLET . " " . $locale['global_016'] . ": <a href='" . BASEDIR . "profile.php?lookup=" . $data['user_id'] . "' class='side'>" . $data['user_name'] . "</a>\n"; closeside();
function render_post_item($data) { global $forum_settings, $aidlink, $userdata, $locale; echo "\n\t\t<div id='" . $data['marker']['id'] . "' class='clearfix post_items'>\n\n\t\t<div class='forum_avatar text-center'>\n\n\t\t" . $data['user_avatar_image'] . "\n\t\t" . ($forum_settings['forum_rank_style'] == '1' ? "<div class='text-center m-t-10'>" . $data['user_rank'] . "</div>\n" : '') . "\n\t\t</div>\n\n\t\t<div class='pull-right m-l-10 col-sm-4 col-md-3 m-l-10'>\n\t\t<div class='pull-right m-l-10'>" . $data['post_checkbox'] . "</div>\n\n\t\t<div class='btn-group dropdown'>\n\n\t\t" . (isset($data['post_quote']) && !empty($data['post_quote']) ? "<a class='btn btn-default btn-xs quote-link' href='" . $data['post_quote']['link'] . "' title='" . $data['post_quote']['title'] . "'>" . $data['post_quote']['title'] . "</a>\n" : '') . "\n\t\t" . (isset($data['post_reply']) && !empty($data['post_reply']) ? "<a class='btn btn-default btn-xs reply-link' href='" . $data['post_reply']['link'] . "' title='" . $data['post_reply']['title'] . "'>" . $data['post_reply']['title'] . "</a>\n" : '') . "\n\t\t" . (isset($data['post_edit']) && !empty($data['post_edit']) ? "<a class='btn btn-default btn-xs edit-link' href='" . $data['post_edit']['link'] . "' title='" . $data['post_edit']['title'] . "'>" . $data['post_edit']['title'] . "</a>\n" : "") . "\n\t\t<a class='dropdown btn btn-xs btn-default' data-toggle='dropdown'><i class='fa fa-fw fa-ellipsis-v'></i></a>\n\n\t\t<ul class='dropdown-menu'>\n\n\t\t<!--forum_thread_user_fields_" . $data['post_id'] . "-->\n\n\t\t" . ($data['user_ip'] ? "<li class='hidden-sm hidden-md hidden-lg'><i class='fa fa-user fa-fw'></i> IP : " . $data['user_ip'] . "</li>" : "") . "\n\t\t<li class='hidden-sm hidden-md hidden-lg'><i class='fa fa-commenting-o fa-fw'></i> " . $data['user_post_count'] . "</li>\n\t\t" . ($data['user_message']['link'] !== "" ? "<li><a href='" . $data['user_message']['link'] . "' title='" . $data['user_message']['title'] . "'>" . $data['user_message']['title'] . "</a></li>\n" : "") . "\n\t\t" . ($data['user_web']['link'] !== "" ? "<li><a href='" . $data['user_web']['link'] . "' title='" . $data['user_web']['title'] . "'>" . $data['user_web']['title'] . "</a></li>\n" : "") . "\n\t\t<li><a href='" . $data['print']['link'] . "' title='" . $data['print']['title'] . "'>" . $data['print']['title'] . "</a></li>\n\n\t\t<li class='divider'></li>\n\n\t\t" . (isset($data['post_quote']) && !empty($data['post_quote']) ? "<li><a href='" . $data['post_quote']['link'] . "' title='" . $data['post_quote']['title'] . "'>" . $data['post_quote']['title'] . "</a></li>\n" : '') . "\n\t\t" . (isset($data['post_edit']) && !empty($data['post_edit']) ? "<li><a href='" . $data['post_edit']['link'] . "' title='" . $data['post_edit']['title'] . "'>" . $locale['forum_0507'] . "</a></li>\n" : '') . "\n\t\t<li class='divider'></li>\n"; if (iADMIN && checkrights("M") && $data['user_id'] != $userdata['user_id'] && $data['user_level'] < 103) { echo "<p class='text-center'><a href='" . ADMIN . "members.php" . $aidlink . "&step=edit&user_id=" . $data['user_id'] . "'>" . $locale['edit'] . "</a> · "; echo "<a href='" . ADMIN . "members.php" . $aidlink . "&user_id=" . $data['user_id'] . "&action=1'>" . $locale['ban'] . "</a> · "; echo "<a href='" . ADMIN . "members.php" . $aidlink . "&step=delete&status=0&user_id=" . $data['user_id'] . "'>" . $locale['delete'] . "</a></p>\n"; } echo "</ul>\n</div>\n"; echo "<ul class='overflow-hide hidden-xs m-t-15 text-smaller' style='border-left:1px solid #ccc; padding-left:10px;'>\n\t\t<!--forum_thread_user_fields_" . $data['post_id'] . "-->\n\n\t\t" . ($data['user_ip'] ? "<li>IP : " . $data['user_ip'] . "</li>" : "") . "\n\t\t<li>" . $data['user_post_count'] . "</li>\n\t\t</ul>\n\t\t</div>\n\t\t<div class='overflow-hide'>\n\n\t\t<!--forum_thread_user_name-->\n\n\t\t<div class='m-b-10'>\n\n\t\t<span style='height:5px; width:10px; border-radius:50%; color:#5CB85C'><i class='fa " . ($data['user_online'] ? "fa-circle" : "fa-circle-thin") . "'></i></span>\n\n\t\t<span class='text-smaller'><span class='forum_poster'>" . $data['user_profile_link'] . "</span>\n\t\t" . ($forum_settings['forum_rank_style'] == '0' ? "<span class='forum_rank'>\n" . $data['user_rank'] . "</span>\n" : '') . "\n\t\t" . $data['post_shortdate'] . " </span>\n\n\t\t</div>\n\n\t\t<!--forum_thread_prepost_" . $data['post_id'] . "-->\n\n\t\t" . ($data['post_votebox'] ? "<div class='pull-left m-r-15'>" . $data['post_votebox'] . "</div>" : '') . "\n\t\t<div class='display-block overflow-hide'>\n\n\t\t" . $data['post_message'] . "\n\t\t" . ($data['user_sig'] ? "<div class='forum_sig text-smaller'>" . $data['user_sig'] . "</div>\n" : "") . "\n\t\t" . ($data['post_attachments'] ? "<div class='forum_attachments'>" . $data['post_attachments'] . "</div>" : "") . "\n\t\t</div>\n\t\t<!--sub_forum_post_message-->\n\n\t\t<div class='text-right'>\n\n\t\t<div class='edit_reason m-b-10'>" . $data['post_edit_reason'] . "</div>\n\n\t\t</div>\n\n\t\t</div>\n\n\t\t</div>\n\n\t\t"; /* * <div class='text-right m-t-10'>\n <a class='btn btn-primary btn-xs' href='".$data['post_quote']['link']."' title='".$data['post_quote']['title']."'>".$data['post_quote']['title']."</a>\n <a class='btn btn-default btn-xs' href='".$data['post_edit']['link']."' title='".$data['post_edit']['title']."'>".$data['post_edit']['title']."</a>\n </div>\n */ }
| http://www.php-fusion.co.uk/ +--------------------------------------------------------+ | User Control Center 2.40a | Author: Sebastian Schüssler (slaughter) | Download: | http://basti2web.de +--------------------------------------------------------+ | 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") || !checkrights("I")) { die("Access Denied"); } $inf_newtable[1] = DB_UCC_SETTINGS . " (\nucc_id SMALLINT(5) UNSIGNED NOT NULL AUTO_INCREMENT,\nucc_version VARCHAR(100) NOT NULL DEFAULT '',\nucc_version_temp VARCHAR(100) NOT NULL DEFAULT '',\nucc_version_time INT(10) UNSIGNED DEFAULT '0' NOT NULL,\nucc_logins_perpage INT(5) UNSIGNED DEFAULT '0' NOT NULL,\nucc_pm_post_perpage INT(5) UNSIGNED DEFAULT '0' NOT NULL,\nucc_panel_showall INT(5) UNSIGNED DEFAULT '0' NOT NULL,\nucc_panel_d_show_auto INT(5) UNSIGNED DEFAULT '0' NOT NULL,\nucc_panel_d_show_manu INT(5) UNSIGNED DEFAULT '0' NOT NULL,\nucc_panel_c_show_auto INT(5) UNSIGNED DEFAULT '0' NOT NULL,\nucc_panel_c_show_manu INT(5) UNSIGNED DEFAULT '0' NOT NULL,\nucc_ghost INT(5) UNSIGNED DEFAULT '0' NOT NULL,\nPRIMARY KEY (ucc_id)\n) TYPE=MyISAM;"; $inf_insertdbrow[1] = DB_UCC_SETTINGS . " (ucc_version, ucc_logins_perpage, ucc_pm_post_perpage, ucc_panel_showall, ucc_panel_d_show_auto, ucc_panel_d_show_manu, ucc_panel_c_show_auto, ucc_panel_c_show_manu, ucc_ghost) VALUES ('" . $inf_version . "', '20', '20', '1', '1', '1', '1', '1', '0')"; $inf_droptable[1] = DB_UCC_SETTINGS; $inf_adminpanel[1] = array("title" => $locale['ucc_100'], "image" => "infusions.gif", "panel" => "ucc_admin.php", "rights" => "UCC"); $inf_adminpanel[2] = array("title" => "UCC - Last Logins", "image" => "infusions.gif", "panel" => "redirects/lastlogin.php", "rights" => "UCCa"); $inf_adminpanel[3] = array("title" => "UCC - Pm Counter", "image" => "infusions.gif", "panel" => "redirects/pmcount.php", "rights" => "UCCb"); $inf_adminpanel[4] = array("title" => "UCC - Post Counter", "image" => "infusions.gif", "panel" => "redirects/postcount.php", "rights" => "UCCc"); $inf_adminpanel[5] = array("title" => "UCC - Image Checker", "image" => "infusions.gif", "panel" => "redirects/imagecheck.php", "rights" => "UCCd"); $inf_adminpanel[6] = array("title" => "UCC - Attachment checker", "image" => "infusions.gif", "panel" => "redirects/a_imagecheck.php", "rights" => "UCCe"); $inf_adminpanel[7] = array("title" => "UCC - Usersearch", "image" => "infusions.gif", "panel" => "redirects/usersearch.php", "rights" => "UCCf"); $inf_adminpanel[8] = array("title" => "UCC - Delete Members", "image" => "infusions.gif", "panel" => "redirects/delete.php", "rights" => "UCCg"); $inf_adminpanel[9] = array("title" => "UCC - Unactivated User", "image" => "infusions.gif", "panel" => "redirects/unactiveusers.php", "rights" => "UCCh"); $inf_adminpanel[10] = array("title" => "UCC - Settings", "image" => "infusions.gif", "panel" => "redirects/_config_.php", "rights" => "UCCi");
/** * @param $comment_type - abbr or short ID * @param $comment_db - Current Application DB - DB_BLOG for example. * @param $comment_col - current sql primary key column - 'blog_id' for example * @param $comment_item_id - current sql primary key value '$_GET['blog_id']' for example * @param $clink - current page link 'FUSION_SELF' is ok. */ function showcomments($comment_type, $comment_db, $comment_col, $comment_item_id, $clink) { global $settings, $locale, $userdata, $aidlink; $link = FUSION_SELF . (FUSION_QUERY ? "?" . FUSION_QUERY : ""); $link = preg_replace("^(&|\\?)c_action=(edit|delete)&comment_id=\\d*^", "", $link); $_GET['comment'] = isset($_GET['comment']) && isnum($_GET['comment']) ? $_GET['comment'] : 0; $cpp = $settings['comments_per_page']; if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "delete") && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) { if (iADMIN && checkrights("C") || iMEMBER && dbcount("(comment_id)", DB_COMMENTS, "comment_id='" . $_GET['comment_id'] . "' AND comment_name='" . $userdata['user_id'] . "'")) { $result = dbquery("DELETE FROM " . DB_COMMENTS . "\n\t\t\t\tWHERE comment_id='" . $_GET['comment_id'] . "'" . (iADMIN ? "" : "\n\t\t\t\tAND comment_name='" . $userdata['user_id'] . "'")); } redirect($clink . ($settings['comments_sorting'] == "ASC" ? "" : "&c_start=0")); } if ($settings['comments_enabled'] == "1") { if ((iMEMBER || $settings['guestposts'] == "1") && isset($_POST['post_comment'])) { if (!iMEMBER && $settings['guestpost'] == 1) { if (!isset($_POST['comment_name'])) { redirect($link); } if (isnum($_POST['comment_name'])) { $_POST['comment_name'] = ''; } $_CAPTCHA_IS_VALID = FALSE; include INCLUDES . "captchas/" . $settings['captcha'] . "/captcha_check.php"; if (!isset($_POST['captcha_code']) || $_CAPTCHA_IS_VALID == FALSE) { redirect($link); } } $comment_data = array('comment_id' => isset($_GET['comment_id']) && isnum($_GET['comment_id']) ? $_GET['comment_id'] : 0, 'comment_name' => iMEMBER ? $userdata['user_id'] : form_sanitizer($_POST['comment_name'], '', 'comment_name'), 'comment_message' => form_sanitizer($_POST['comment_message'], '', 'comment_message'), 'comment_datestamp' => time(), 'comment_item_id' => $comment_item_id, 'comment_type' => $comment_type, 'comment_cat' => 0, 'comment_ip' => USER_IP, 'comment_ip_type' => USER_IP_TYPE, 'comment_hidden' => 0); if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "edit") && $comment_data['comment_id']) { $comment_updated = FALSE; if (iADMIN && checkrights("C") || iMEMBER && dbcount("(comment_id)", DB_COMMENTS, "comment_id='" . $comment_data['comment_id'] . "' \n\t\t\t\tAND comment_item_id='" . $comment_item_id . "'\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tAND comment_type='" . $comment_type . "' \n\t\t\t\tAND comment_name='" . $userdata['user_id'] . "' \n\t\t\t\tAND comment_hidden='0'")) { dbquery_insert(DB_COMMENTS, $comment_data, 'update'); if ($comment_data['comment_message']) { $result = dbquery("UPDATE " . DB_COMMENTS . " SET comment_message='" . $comment_data['comment_message'] . "'\n \t\t\t\t\t\t\t\t\t WHERE comment_id='" . $_GET['comment_id'] . "' " . (iADMIN ? "" : "AND comment_name='" . $userdata['user_id'] . "'")); if ($result) { $comment_updated = TRUE; } } } if ($comment_updated) { if ($settings['comments_sorting'] == "ASC") { $c_operator = "<="; } else { $c_operator = ">="; } $c_count = dbcount("(comment_id)", DB_COMMENTS, "comment_id" . $c_operator . "'" . $comment_data['comment_id'] . "'\n\t\t\t\t\t\t\t\tAND comment_item_id='" . $comment_item_id . "'\n\t\t\t\t\t\t\t\tAND comment_type='" . $comment_type . "'"); $c_start = (ceil($c_count / $cpp) - 1) * $cpp; } redirect($clink . "&c_start=" . (isset($c_start) && isnum($c_start) ? $c_start : "")); } else { if (!dbcount("(" . $comment_col . ")", $comment_db, $comment_col . "='" . $comment_item_id . "'")) { redirect(BASEDIR . "index.php"); } $id = 0; if ($comment_data['comment_name'] && $comment_data['comment_message']) { require_once INCLUDES . "flood_include.php"; if (!flood_control("comment_datestamp", DB_COMMENTS, "comment_ip='" . USER_IP . "'")) { dbquery_insert(DB_COMMENTS, $comment_data, 'save'); $id = dblastid(); } } if ($settings['comments_sorting'] == "ASC") { $c_count = dbcount("(comment_id)", DB_COMMENTS, "comment_item_id='" . $comment_item_id . "' AND comment_type='" . $comment_type . "'"); $c_start = (ceil($c_count / $cpp) - 1) * $cpp; } else { $c_start = 0; } //if (!$settings['site_seo']) { redirect($clink . "&c_start=" . $c_start . "#c" . $id); //} } } $c_arr = array("c_con" => array(), "c_info" => array("c_makepagenav" => FALSE, "admin_link" => FALSE)); $c_rows = dbcount("(comment_id)", DB_COMMENTS, "comment_item_id='" . $comment_item_id . "' AND comment_type='" . $comment_type . "' AND comment_hidden='0'"); if (!isset($_GET['c_start']) && $c_rows > $cpp) { $_GET['c_start'] = (ceil($c_rows / $cpp) - 1) * $cpp; } if (!isset($_GET['c_start']) || !isnum($_GET['c_start'])) { $_GET['c_start'] = 0; } $result = dbquery("SELECT tcm.comment_id, tcm.comment_name, tcm.comment_message, tcm.comment_datestamp,\n\t\t\t\t\ttcu.user_id, tcu.user_name, tcu.user_avatar, tcu.user_status\n\t\t\t\t\tFROM " . DB_COMMENTS . " tcm\n\t\t\t\t\tLEFT JOIN " . DB_USERS . " tcu ON tcm.comment_name=tcu.user_id\n\t\t\t\t\tWHERE comment_item_id='" . $comment_item_id . "' AND comment_type='" . $comment_type . "' AND comment_hidden='0'\n\t\t\t\t\tORDER BY comment_datestamp " . $settings['comments_sorting'] . " LIMIT " . $_GET['c_start'] . "," . $cpp); if (dbrows($result) > 0) { $i = $settings['comments_sorting'] == "ASC" ? $_GET['c_start'] + 1 : $c_rows - $_GET['c_start']; if ($c_rows > $cpp) { $c_arr['c_info']['c_makepagenav'] = makepagenav($_GET['c_start'], $cpp, $c_rows, 3, $clink . "&", "c_start"); } while ($data = dbarray($result)) { $c_arr['c_con'][$i]['comment_id'] = $data['comment_id']; $c_arr['c_con'][$i]['edit_dell'] = FALSE; $c_arr['c_con'][$i]['i'] = $i; if ($data['user_name']) { $c_arr['c_con'][$i]['comment_name'] = profile_link($data['comment_name'], $data['user_name'], $data['user_status'], 'strong text-dark'); } else { $c_arr['c_con'][$i]['comment_name'] = $data['comment_name']; } $c_arr['c_con'][$i]['user_avatar'] = display_avatar($data, '35px', '', true, 'img-rounded'); $c_arr['c_con'][$i]['user'] = array('user_id' => $data['user_id'], 'user_name' => $data['user_name'], 'user_avatar' => $avatar = $data['user_avatar'] !== '' && file_exists(IMAGES . 'avatars/' . $data['user_avatar']) ? IMAGES . 'avatars/' . $data['user_avatar'] : IMAGES . "avatars/noavatar50.png", 'user_status' => $data['user_status']); $c_arr['c_con'][$i]['comment_datestamp'] = showdate('shortdate', $data['comment_datestamp']); $c_arr['c_con'][$i]['comment_time'] = timer($data['comment_datestamp']); $c_arr['c_con'][$i]['comment_message'] = "<!--comment_message-->\n" . nl2br(parseubb(parsesmileys($data['comment_message']))); if (iADMIN && checkrights("C") || iMEMBER && $data['comment_name'] == $userdata['user_id'] && isset($data['user_name'])) { $edit_link = clean_request('c_action=edit&comment_id=' . $data['comment_id'], array('c_action', 'comment_id'), false) . "#edit_comment"; $delete_link = clean_request('c_action=delete&comment_id=' . $data['comment_id'], array('c_action', 'comment_id'), false); $c_arr['c_con'][$i]['edit_link'] = array('link' => $edit_link, 'name' => $locale['c108']); $c_arr['c_con'][$i]['delete_link'] = array('link' => $delete_link, 'name' => $locale['c109']); $c_arr['c_con'][$i]['edit_dell'] = "<!--comment_actions-->\n"; $c_arr['c_con'][$i]['edit_dell'] .= "<div class='btn-group'>"; $c_arr['c_con'][$i]['edit_dell'] .= "<a class='btn btn-xs btn-default' href='" . $edit_link . "'>"; $c_arr['c_con'][$i]['edit_dell'] .= $locale['c108'] . "</a>\n"; $c_arr['c_con'][$i]['edit_dell'] .= "<a class='btn btn-xs btn-default' href='" . $delete_link . "' onclick=\"return confirm('" . $locale['c110'] . "');\">"; $c_arr['c_con'][$i]['edit_dell'] .= "<i class='fa fa-trash'></i> " . $locale['c109'] . "</a>"; $c_arr['c_con'][$i]['edit_dell'] .= "</div>\n"; } $settings['comments_sorting'] == "ASC" ? $i++ : $i--; } if (iADMIN && checkrights("C")) { $c_arr['c_info']['admin_link'] = "<!--comment_admin-->\n"; $c_arr['c_info']['admin_link'] .= "<a href='" . ADMIN . "comments.php" . $aidlink . "&ctype=" . $comment_type . "&comment_item_id=" . $comment_item_id . "'>" . $locale['c106'] . "</a>"; } } opentable($locale['c102']); $comment_message = ""; if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "edit") && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) { $eresult = dbquery("SELECT tcm.comment_id, tcm.comment_name, tcm.comment_message, tcu.user_name\n\t\t\t\tFROM " . DB_COMMENTS . " tcm\n\t\t\t\tLEFT JOIN " . DB_USERS . " tcu ON tcm.comment_name=tcu.user_id\n\t\t\t\tWHERE comment_id='" . $_GET['comment_id'] . "' AND comment_item_id='" . $comment_item_id . "'\n\t\t\t\tAND comment_type='" . $comment_type . "' AND comment_hidden='0'"); if (dbrows($eresult) > 0) { $edata = dbarray($eresult); if (iADMIN && checkrights("C") || iMEMBER && $edata['comment_name'] == $userdata['user_id'] && isset($edata['user_name'])) { $clink .= "&c_action=edit&comment_id=" . $edata['comment_id']; $comment_message = $edata['comment_message']; } } else { $comment_message = ""; } } if (iMEMBER || $settings['guestposts'] == "1") { require_once INCLUDES . "bbcode_include.php"; echo "<a id='edit_comment' name='edit_comment'></a>\n"; echo openform('inputform', 'post', $clink, array('class' => 'm-b-20', 'max_tokens' => 1)); if (iGUEST) { echo form_text('comment_name', $locale['c104'], '', array('max_length' => 30)); } echo form_textarea('comment_message', '', $comment_message, array('required' => 1, 'autosize' => 1, 'form_name' => 'inputform', 'bbcode' => 1)); if (iGUEST && (!isset($_CAPTCHA_HIDE_INPUT) || isset($_CAPTCHA_HIDE_INPUT) && !$_CAPTCHA_HIDE_INPUT)) { $_CAPTCHA_HIDE_INPUT = FALSE; echo "<div style='width:360px; margin:10px auto;'>"; echo $locale['global_150'] . "<br />\n"; include INCLUDES . "captchas/" . $settings['captcha'] . "/captcha_display.php"; if (!$_CAPTCHA_HIDE_INPUT) { echo "<br />\n<label for='captcha_code'>" . $locale['global_151'] . "</label>"; echo "<br />\n<input type='text' id='captcha_code' name='captcha_code' class='textbox' autocomplete='off' style='width:100px' />\n"; } echo "</div>\n"; } echo form_button('post_comment', $comment_message ? $locale['c103'] : $locale['c102'], $comment_message ? $locale['c103'] : $locale['c102'], array('class' => 'btn-success m-t-10')); echo closeform(); } else { echo "<div class='well'>\n"; echo $locale['c105'] . "\n"; echo "</div>\n"; } closetable(); echo "<a id='comments' name='comments'></a>"; render_comments($c_arr['c_con'], $c_arr['c_info']); } }
function itemoptions($item_type, $item_id) { global $locale, $aidlink; $res = ""; if ($item_type == "N") { if (iADMIN && checkrights($item_type)) { $res .= "<!--article_news_opts--> · <a href='" . ADMIN . "news.php" . $aidlink . "&action=edit&news_id=" . $item_id . "'><img src='" . get_image("edit") . "' alt='" . $locale['global_076'] . "' title='" . $locale['global_076'] . "' style='vertical-align:middle;border:0;' /></a>\n"; } } elseif ($item_type == "A") { if (iADMIN && checkrights($item_type)) { $res .= "<!--article_admin_opts--> · <a href='" . ADMIN . "articles.php" . $aidlink . "&action=edit&article_id=" . $item_id . "'><img src='" . get_image("edit") . "' alt='" . $locale['global_076'] . "' title='" . $locale['global_076'] . "' style='vertical-align:middle;border:0;' /></a>\n"; } } return $res; }
function profile_link($user_id, $user_name, $user_status, $class = "profile-link") { global $locale, $settings; $class = $class ? " class='{$class}'" : ""; if ((in_array($user_status, array(0, 3, 7)) || checkrights("M")) && (iMEMBER || $settings['hide_userprofiles'] == "0")) { $link = "<a href='" . BASEDIR . "profile.php?lookup=" . $user_id . "'" . $class . ">" . $user_name . "</a>"; } elseif ($user_status == "5" || $user_status == "6") { $link = $locale['user_anonymous']; } else { $link = $user_name; } return $link; }
| Copyright (C) PHP-Fusion Inc | http://www.php-fusion.co.uk/ +--------------------------------------------------------+ | Filename: articles.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"; if (!checkrights("A") || !defined("iAUTH") || !isset($_GET['aid']) || $_GET['aid'] != iAUTH) { redirect("../index.php"); } require_once THEMES . "templates/admin_header_mce.php"; include LOCALE . LOCALESET . "admin/articles.php"; if ($settings['tinymce_enabled'] == 1) { echo "<script language='javascript' type='text/javascript'>advanced();</script>\n"; } else { require_once INCLUDES . "html_buttons_include.php"; } if (isset($_GET['status']) && !isset($message)) { if ($_GET['status'] == "sn") { $message = $locale['410']; } elseif ($_GET['status'] == "su") { $message = $locale['411']; } elseif ($_GET['status'] == "del") {
| Copyright (C) 2002 - 2011 Nick Jones | http://www.php-fusion.co.uk/ +--------------------------------------------------------+ | Filename: go.php | Author: Arda {SoulSmasher} +--------------------------------------------------------+ | 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"; if (!checkrights("SU") || !iADMIN) { redirect("../index.php"); } include THEME . "theme.php"; $urlprefix = ""; $url = BASEDIR . "index.php"; if (isset($_GET['id']) && isnum($_GET['id'])) { $result = dbquery("SELECT submit_criteria FROM " . DB_SUBMISSIONS . " WHERE submit_type='l' AND submit_id='" . $_GET['id'] . "'"); if (dbrows($result)) { $data = dbarray($result); $submit_criteria = unserialize($data['submit_criteria']); if (!strstr($submit_criteria['link_url'], "http://") && !strstr($submit_criteria['link_url'], "https://")) { $urlprefix = "http://"; } else { $urlprefix = ""; }