Beispiel #1
0
 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&amp;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']);
     }
 }
Beispiel #2
0
function render_admin_login()
{
    global $locale, $aidlink, $userdata;
    echo "<div class='block'>\n";
    echo "<div class='block-content clearfix' style='font-size:13px;'>\n";
    echo "<h6><strong>" . $locale['280'] . "</strong></h6>\n";
    echo "<img src='" . IMAGES . "php-fusion-icon.png' class='pf-logo position-absolute' alt='PHP-Fusion'/>";
    echo "<p class='fusion-version text-right mid-opacity text-smaller'>" . $locale['version'] . fusion_get_settings('version') . "</p>";
    echo "<div class='row m-0'>\n<div class='col-xs-12 col-sm-12 col-md-12 col-lg-12'>";
    $form_action = FUSION_SELF . $aidlink == ADMIN . "index.php" . $aidlink ? FUSION_SELF . $aidlink . "&amp;pagenum=0" : FUSION_SELF . "?" . FUSION_QUERY;
    // Get all notices
    $notices = getNotices();
    echo renderNotices($notices);
    echo openform('admin-login-form', 'post', $form_action);
    openside('');
    echo "<div class='m-t-10 clearfix row'>\n";
    echo "<div class='col-xs-3 col-sm-3 col-md-3 col-lg-3'>\n";
    echo "<div class='pull-right'>\n";
    echo display_avatar($userdata, '90px');
    echo "</div>\n";
    echo "</div>\n<div class='col-xs-9 col-sm-9 col-md-8 col-lg-7'>\n";
    echo "<div class='clearfix'>\n";
    add_to_head('<style>#admin_password-field .required {display:none}</style>');
    echo "<h5><strong>" . $locale['welcome'] . ", " . $userdata['user_name'] . "</strong><br/>" . getuserlevel($userdata['user_level']) . "</h5>";
    echo form_text('admin_password', "", "", array('callback_check' => 'check_admin_pass', 'placeholder' => $locale['281'], 'error_text' => $locale['global_182'], 'autocomplete_off' => TRUE, 'type' => 'password', 'required' => TRUE));
    echo "</div>\n";
    echo "</div>\n";
    echo "</div>\n";
    closeside();
    echo form_button('admin_login', $locale['login'], $locale['login'], array('class' => 'btn-primary btn-block'));
    echo closeform();
    echo "</div>\n</div>\n";
    // .col-*, .row
    echo "</div>\n";
    // .block-content
    echo "</div>\n";
    // .block
    echo "<div class='copyright-note clearfix m-t-10'>" . showcopyright() . "</div>\n";
    echo "</aside>\n";
}
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&amp;item_id=" . $info['article_id'] . "'><i class='entypo print'></i></a>";
    echo iADMIN && checkrights("A") ? "<a href='" . ADMIN . "articles.php" . $aidlink . "&amp;action=edit&amp;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>";
}
Beispiel #4
0
     opensidex($locale['UM096'] . $userdata['user_name'], "off");
 } else {
     openside($locale['UM096'] . $userdata['user_name']);
 }
 $messages_count = dbquery("SELECT\n\tSUM(message_folder=0) AS inbox_count,\n\tSUM(message_folder=1) AS outbox_count,\n\tSUM(message_folder=2) AS archive_count,\n\tSUM(message_read=0 AND message_folder=0) AS unread_count\n\tFROM " . DB_MESSAGES . " \n\tWHERE message_to='" . $userdata['user_id'] . "'\n\t");
 $messages_count = dbarray($messages_count);
 $inbox_count = (int) $messages_count['inbox_count'];
 $outbox_count = (int) $messages_count['outbox_count'];
 $archive_count = (int) $messages_count['archive_count'];
 $msg_count = (int) $messages_count['unread_count'];
 echo "<div class='clearfix'>\n";
 echo "<div class='avatar-row text-center'>\n";
 echo "<div class='pull-left m-r-10'>\n" . display_avatar($userdata, '90px') . "</div>\n";
 echo "</div>\n";
 echo "<h4 class='m-t-10 m-b-0'><strong>" . $userdata['user_name'] . "</strong></h4>\n";
 echo "<small>" . getuserlevel($userdata['user_level']) . "</small>\n<br/>";
 echo "</div>\n";
 echo "<ul class='user-info-bar'>\n";
 echo $msg_count ? "<li><a href='" . BASEDIR . "messages.php?folder=inbox' title='" . sprintf($locale['UM085'], $msg_count) . ($msg_count == 1 ? $locale['UM086'] : $locale['UM087']) . "' ><i class='entypo icomment'></i><label style='position:absolute; margin-left:-20px;' class='pointer label label-danger'>{$msg_count}</label></a>\n</li>\n" : "";
 echo "</ul>\n";
 $inbox_cfg = user_pm_settings($userdata['user_id'], "user_inbox");
 $inbox_percent = $inbox_cfg > 1 ? number_format($inbox_count / $inbox_cfg * 99, 0) : number_format(0 * 99, 0);
 echo progress_bar($inbox_percent, $locale['UM098']);
 $outbox_cfg = user_pm_settings($userdata['user_id'], "user_outbox");
 $outbox_percent = $outbox_cfg > 1 ? number_format($outbox_count / $outbox_cfg * 99, 0) : number_format(0 * 99, 0);
 echo progress_bar($outbox_percent, $locale['UM099']);
 $archive_cfg = user_pm_settings($userdata['user_id'], "user_archive");
 $archive_percent = $archive_cfg > 1 ? number_format($archive_count / $archive_cfg * 99, 0) : number_format(0 * 99, 0);
 echo progress_bar($archive_percent, $locale['UM100']);
 echo "<div id='navigation-user'>\n";
 echo "<h5><strong>" . $locale['UM097'] . "</strong></h5>\n";
Beispiel #5
0
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) {
    die("Access Denied");
}
if (!defined("iAUTH") || !isset($_GET['aid']) || $_GET['aid'] != iAUTH) {
    redirect("../index.php");
}
if (iADMIN && !$userdata['user_admin_password']) {
    echo "<div class='alert alert-danger text-center'>" . $locale['global_199'] . "</div>\n";
}
$form_action = FUSION_SELF . $aidlink == ADMIN . "index.php" . $aidlink ? FUSION_SELF . $aidlink . "&amp;pagenum=0" : FUSION_SELF . "?" . FUSION_QUERY;
// we can now MVC this.
echo openform('adminloginform', 'post', $form_action, array('max_tokens' => 2));
openside('');
echo "<div class='m-t-10 clearfix row'>\n";
echo "<div class='col-xs-3 col-sm-3 col-md-3 col-lg-3'>\n";
echo "<div class='pull-right'>\n";
echo display_avatar($userdata, '90px');
echo "</div>\n";
echo "</div>\n<div class='col-xs-9 col-sm-9 col-md-8 col-lg-7'>\n";
echo "<h5><strong>" . $locale['welcome'] . ", " . $userdata['user_name'] . "</strong><br/>" . getuserlevel($userdata['user_level']) . "</h5>";
echo "<div class='clearfix'>\n";
echo form_text('admin_password', '', '', array('placeholder' => $locale['281'], 'autocomplete_off' => 1, 'type' => 'password', 'required' => 1));
echo "</div>\n";
echo "</div>\n";
echo "</div>\n";
closeside();
echo form_button('admin_login', $locale['login'], 'Sign in', array('class' => 'btn-primary btn-block'));
echo closeform();
Beispiel #6
0
         echo "<span class='small' title=\"header=[" . $data['user_name'] . "] body=[" . rawurlencode("<center>{$avatar}</center></span><hr />\n<span class='small'><b><font color='#0066cc'>" . $locale['global_101'] . ":</font> <font color='#ff6600'>" . $data['user_name'] . "</font></b><br /><br />\n<b><font color='#0066cc'>" . $locale['424'] . "</font> <font color='#ff6600'>" . getuserlevel($data['user_level']) . "</font></b><br /><br />\n<b><font color='#0066cc'>" . $locale['u040'] . "</font> <font color='#ff6600'>" . showdate("shortdate", $data['user_joined']) . "</font></b><br /><br />\n<b><font color='#0066cc'>" . $locale['u041'] . "</font> <font color='#ff6600'>" . showdate("shortdate", $data['user_lastvisit']) . "</font></b> <br /><br />\n<b><font color='#0066cc'>" . $locale['uf_shouts-stat'] . "</font> <font color='#ff6600'>{$shoutcount}</font></b> ") . "] delay=[0] fade=[off]\">\n\n\t\t\t<a href='" . BASEDIR . "profile.php?lookup=" . $data['shout_name'] . "' class='shoutboxname'><b>" . $data['user_name'] . "</b></a></span> <img src='" . INFUSIONS . "shoutbox_panel/images/online.png' title=\"header=[" . $data['user_name'] . "] body=[" . rawurlencode("" . $data['user_name'] . " " . $locale['dsp001'] . "") . "] delay=[0] fade=[off]\" alt='' />\n";
         if (iMEMBER) {
             echo " <a href='" . BASEDIR . "messages.php?msg_send=" . $data['user_id'] . "'> <img src='" . INFUSIONS . "shoutbox_panel/images/pm.gif' title=\"header=[" . $data['user_name'] . "] body=[" . rawurlencode("" . $locale['dsp003'] . " " . $data['user_name'] . "") . "] delay=[0] fade=[off]\" alt='' border='0' /></a></span>\n";
         }
     } else {
         echo $data['shout_name'] . "\n";
     }
 }
 if ($lseen > 60) {
     if ($data['user_name']) {
         if ($data['user_avatar'] != "") {
             $avatar = "<img src='" . IMAGES . "avatars/" . $data['user_avatar'] . "' border='0' alt='' />";
         } else {
             $avatar = "<img src='" . INFUSIONS . "shoutbox_panel/images/noav.gif' border='0' alt='' />";
         }
         echo "<span class='small' title=\"header=[" . $data['user_name'] . "] body=[" . rawurlencode("<center>{$avatar}</center></span><hr />\n<span class='small'><b><font color='#0066cc'>" . $locale['global_101'] . ":</font> <font color='#ff6600'>" . $data['user_name'] . "</font></b><br /><br />\n<b><font color='#0066cc'>" . $locale['424'] . "</font> <font color='#ff6600'>" . getuserlevel($data['user_level']) . "</font></b><br /><br />\n<b><font color='#0066cc'>" . $locale['u040'] . "</font> <font color='#ff6600'>" . showdate("shortdate", $data['user_joined']) . "</font></b><br /><br />\n<b><font color='#0066cc'>" . $locale['u041'] . "</font> <font color='#ff6600'>" . showdate("shortdate", $data['user_lastvisit']) . "</font></b> <br /><br />\n<b><font color='#0066cc'>" . $locale['uf_shouts-stat'] . "</font> <font color='#ff6600'>{$shoutcount}</font></b> ") . "] delay=[0] fade=[off]\">\n\n\t\t\t<a href='" . BASEDIR . "profile.php?lookup=" . $data['shout_name'] . "' class='shoutboxname'><b>" . $data['user_name'] . "</b></a></span> <img src='" . INFUSIONS . "shoutbox_panel/images/offline.png' title=\"header=[" . $data['user_name'] . "] body=[" . rawurlencode("" . $data['user_name'] . " " . $locale['dsp002'] . "") . "] delay=[0] fade=[off]\" alt='' />\n";
         if (iMEMBER) {
             echo " <a href='" . BASEDIR . "messages.php?msg_send=" . $data['user_id'] . "'> <img src='" . INFUSIONS . "shoutbox_panel/images/pm.gif' title=\"header=[" . $data['user_name'] . "] body=[" . rawurlencode("" . $locale['dsp003'] . " " . $data['user_name'] . "") . "] delay=[0] fade=[off]\" alt='' border='0' /></a></span>\n";
         }
     } else {
         echo $data['shout_name'] . "\n";
     }
 }
 echo "</div>\n";
 echo "<div class='shoutboxdate'>" . showdate("shortdate", $data['shout_datestamp']) . "</div>";
 echo "<div class='shoutbox'>" . sbwrap(parseubb(parsesmileys($data['shout_message']), "b|i|u|url|color")) . "</div>\n";
 if (iADMIN && checkrights("S") || iMEMBER && $data['shout_name'] == $userdata['user_id'] && isset($data['user_name'])) {
     echo "[<a href='" . $link . $sep . "s_action=edit&amp;shout_id=" . $data['shout_id'] . "#edit_shout" . "' class='shoutboxedit' title=\"header=[" . $locale['global_076'] . "] body=[" . rawurlencode("" . $locale['dsp005'] . "") . "] delay=[0] fade=[off]\">" . $locale['global_076'] . "</a>]\n";
     echo "[<a href='" . $link . $sep . "s_action=delete&amp;shout_id=" . $data['shout_id'] . "' class='shoutboxdel' title=\"header=[" . $locale['global_157'] . "] body=[" . rawurlencode("" . $locale['dsp006'] . "") . "] delay=[0] fade=[off]\">" . $locale['global_157'] . "</a>]<br /><br />\n";
 }
 $i++;
Beispiel #7
0
     echo "<img src='" . IMAGES . "avatars/" . $data['user_avatar'] . "' alt='" . $locale['567'] . "' /><br /><br />\n";
 }
 echo "<span class='small'>";
 if ($data['user_level'] >= 102) {
     echo $settings['forum_ranks'] ? show_forum_rank($data['user_posts'], $data['user_level']) : getuserlevel($data['user_level']);
 } else {
     $is_mod = false;
     foreach ($mod_groups as $mod_group) {
         if (!$is_mod && preg_match("(^\\.{$mod_group}\$|\\.{$mod_group}\\.|\\.{$mod_group}\$)", $data['user_groups'])) {
             $is_mod = true;
         }
     }
     if ($settings['forum_ranks']) {
         echo $is_mod ? show_forum_rank($data['user_posts'], 104) : show_forum_rank($data['user_posts'], $data['user_level']);
     } else {
         echo $is_mod ? $locale['user1'] : getuserlevel($data['user_level']);
     }
 }
 echo "</span><br /><br />\n";
 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><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 {
Beispiel #8
0
 /**
  * Get thread posts info
  */
 private function get_thread_post()
 {
     global $forum_settings, $locale, $userdata;
     $user_sig_module = \PHPFusion\UserFields::check_user_field('user_sig');
     $user_web_module = \PHPFusion\UserFields::check_user_field('user_web');
     $userid = isset($userdata['user_id']) ? (int) $userdata['user_id'] : 0;
     switch ($this->thread_info['section']) {
         case 'oldest':
             $sortCol = 'post_datestamp ASC';
             break;
         case 'latest':
             $sortCol = 'post_datestamp DESC';
             break;
         case 'high':
             $sortCol = 'vote_points DESC';
             break;
         default:
             $sortCol = 'post_datestamp ASC';
     }
     // @todo: where to calculate has voted without doing it in while loop?
     require_once INCLUDES . "mimetypes_include.php";
     $result = dbquery("\n\t\t\t\t\tSELECT p.*,\n\t\t\t\t\tt.thread_id,\n\t\t\t\t\tu.user_id, u.user_name, u.user_status, u.user_avatar, u.user_level, u.user_posts, u.user_groups, u.user_joined, u.user_lastvisit, u.user_ip,\n\t\t\t\t\t" . ($user_sig_module ? " u.user_sig," : "") . ($user_web_module ? " u.user_web," : "") . "\n\t\t\t\t\tu2.user_name AS edit_name, u2.user_status AS edit_status,\n\t\t\t\t\tcount(a1.attach_id) 'attach_image_count',\n\t\t\t\t\tcount(a2.attach_id) 'attach_files_count',\n\t\t\t\t\tSUM(v.vote_points) as vote_points, count(v2.thread_id) as has_voted\n\t\t\t\t\tFROM " . DB_FORUM_POSTS . " p\n\t\t\t\t\tINNER JOIN " . DB_FORUM_THREADS . " t ON t.thread_id = p.thread_id\n\t\t\t\t\tLEFT JOIN " . DB_FORUM_VOTES . " v ON v.post_id = p.post_id\n\t\t\t\t\tLEFT JOIN " . DB_FORUM_VOTES . " v2 on v2.thread_id = p.thread_id AND v2.vote_user = '******'\n\t\t\t\t\tLEFT JOIN " . DB_USERS . " u ON p.post_author = u.user_id\n\t\t\t\t\tLEFT JOIN " . DB_USERS . " u2 ON p.post_edituser = u2.user_id AND post_edituser > '0'\n\t\t\t\t\tLEFT JOIN " . DB_FORUM_ATTACHMENTS . " a1 on a1.post_id = p.post_id AND a1.attach_mime IN ('" . implode(",", img_mimeTypes()) . "')\n\t\t\t\t\tLEFT JOIN " . DB_FORUM_ATTACHMENTS . " a2 on a2.post_id = p.post_id AND a2.attach_mime NOT IN ('" . implode(",", img_mimeTypes()) . "')\n\t\t\t\t\tWHERE p.thread_id='" . intval($_GET['thread_id']) . "' AND post_hidden='0'\n\t\t\t\t\t" . ($this->thread_info['thread']['forum_type'] == '4' ? "OR p.post_id='" . intval($this->thread_info['post_firstpost']) . "'" : '') . "\n\t\t\t\t\tGROUP by p.post_id\n\t\t\t\t\tORDER BY {$sortCol} LIMIT " . intval($_GET['rowstart']) . ", " . intval($forum_settings['posts_per_page']));
     $this->thread_info['post_rows'] = dbrows($result);
     if ($this->thread_info['post_rows'] > 0) {
         /* Set Threads Navigation */
         $this->thread_info['thread_posts'] = format_word($this->thread_info['post_rows'], $locale['fmt_post']);
         $this->thread_info['page_nav'] = '';
         if ($this->thread_info['max_post_items'] > $this->thread_info['posts_per_page']) {
             $this->thread_info['page_nav'] = "<div class='pull-right'>" . makepagenav($_GET['rowstart'], $this->thread_info['posts_per_page'], $this->thread_info['max_post_items'], 3, INFUSIONS . "forum/viewthread.php?thread_id=" . $this->thread_info['thread']['thread_id'] . (isset($_GET['highlight']) ? "&amp;highlight=" . urlencode($_GET['highlight']) : '') . "&amp;") . "</div>";
         }
         $i = 1;
         while ($pdata = dbarray($result)) {
             // Format Post Message
             $post_message = $pdata['post_smileys'] ? parsesmileys($pdata['post_message']) : $pdata['post_message'];
             $post_message = nl2br(parseubb($post_message));
             if (isset($_GET['highlight'])) {
                 $post_message = "<div class='search_result'>" . $post_message . "</div>\n";
             }
             // Marker
             $marker = array('link' => "#post_" . $pdata['post_id'], "title" => "#" . ($i + $_GET['rowstart']), 'id' => "post_" . $pdata['post_id']);
             $post_marker = "<a class='marker' href='" . $marker['link'] . "' id='" . $marker['id'] . "'>" . $marker['title'] . "</a>";
             $post_marker .= "<a title='" . $locale['forum_0241'] . "' href='#top'><i class='entypo up-open'></i></a>\n";
             // Post Attachments
             $post_attachments = "";
             if ($pdata['attach_files_count'] || $pdata['attach_image_count']) {
                 if ($this->getThreadPermission("can_download_attach")) {
                     $attachResult = dbquery("SELECT * FROM " . DB_FORUM_ATTACHMENTS . " WHERE post_id='" . intval($pdata['post_id']) . "'");
                     if (dbrows($attachResult) > 0) {
                         $aImage = "";
                         $aFiles = "";
                         while ($attachData = dbarray($attachResult)) {
                             if (in_array($attachData['attach_mime'], img_mimeTypes())) {
                                 $aImage .= display_image_attach($attachData['attach_name'], "50", "50", $pdata['post_id']) . "\n";
                             } else {
                                 $aFiles .= "<div class='display-inline-block'><i class='entypo attach'></i><a href='" . FUSION_SELF . "?thread_id=" . $pdata['thread_id'] . "&amp;getfile=" . $attachData['attach_id'] . "'>" . $attachData['attach_name'] . "</a>&nbsp;";
                                 $aFiles .= "[<span class='small'>" . parsebytesize(filesize(INFUSIONS . "forum/attachments/" . $attachData['attach_name'])) . " / " . $attachData['attach_count'] . $locale['forum_0162'] . "</span>]</div>\n";
                             }
                         }
                         if (!empty($aFiles)) {
                             $post_attachments .= "<div class='emulated-fieldset'>\n";
                             $post_attachments .= "<span class='emulated-legend'>" . profile_link($pdata['user_id'], $pdata['user_name'], $pdata['user_status']) . $locale['forum_0154'] . ($pdata['attach_files_count'] > 1 ? $locale['forum_0158'] : $locale['forum_0157']) . "</span>\n";
                             $post_attachments .= "<div class='attachments-list m-t-10'>" . $aFiles . "</div>\n";
                             $post_attachments .= "</div>\n";
                         }
                         if (!empty($aImage)) {
                             $post_attachments .= "<div class='emulated-fieldset'>\n";
                             $post_attachments .= "<span class='emulated-legend'>" . profile_link($pdata['user_id'], $pdata['user_name'], $pdata['user_status']) . $locale['forum_0154'] . ($pdata['attach_image_count'] > 1 ? $locale['forum_0156'] : $locale['forum_0155']) . "</span>\n";
                             $post_attachments .= "<div class='attachments-list'>" . $aImage . "</div>\n";
                             $post_attachments .= "</div>\n";
                             if (!defined('COLORBOX')) {
                                 define('COLORBOX', TRUE);
                                 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_jquery("\$('a[rel^=\"attach\"]').colorbox({ current: '" . $locale['forum_0159'] . " {current} " . $locale['forum_0160'] . " {total}',width:'80%',height:'80%'});");
                             }
                         }
                     } else {
                         $post_attachments = "Failed to fetch the attachment";
                     }
                 } else {
                     $post_attachments = "<small><i class='fa fa-clipboard'></i> " . $locale['forum_0184'] . "</small>\n";
                 }
             }
             $pdata += array("user_online" => $pdata['user_lastvisit'] >= time() - 3600 ? TRUE : FALSE, "is_first_post" => $pdata['post_id'] == $this->thread_info['post_firstpost'] ? TRUE : FALSE, "is_last_post" => $pdata['post_id'] == $this->thread_info['post_lastpost'] ? TRUE : FALSE, "user_profile_link" => profile_link($pdata['user_id'], $pdata['user_name'], $pdata['user_status']), "user_avatar_image" => display_avatar($pdata, '40px', FALSE, FALSE, 'img-rounded'), "user_ip" => $forum_settings['forum_ips'] && iMOD ? $locale['forum_0268'] . ' ' . $pdata['post_ip'] : '', "user_post_count" => format_word($pdata['user_posts'], $locale['fmt_post']), "print" => array('link' => BASEDIR . "print.php?type=F&amp;item_id=" . $_GET['thread_id'] . "&amp;post=" . $pdata['post_id'] . "&amp;nr=" . ($i + $_GET['rowstart']), 'title' => $locale['forum_0179']), "post_marker" => $post_marker, "marker" => $marker, "post_attachments" => $post_attachments);
             $pdata['post_message'] = $post_message;
             /**
              * User Stuffs, Sig, User Message, Web
              */
             // Quote & Edit Link
             if ($this->getThreadPermission("can_reply")) {
                 if (!$this->thread_info['thread']['thread_locked']) {
                     $pdata['post_quote'] = array('link' => INFUSIONS . "forum/viewthread.php?action=reply&amp;forum_id=" . $pdata['forum_id'] . "&amp;thread_id=" . $pdata['thread_id'] . "&amp;post_id=" . $pdata['post_id'] . "&amp;quote=" . $pdata['post_id'], 'title' => $locale['forum_0266']);
                     if (iMOD || ($forum_settings['forum_edit_lock'] == TRUE && $pdata['is_last_post'] || $forum_settings['forum_edit_lock'] == FALSE) && $userdata['user_id'] == $pdata['post_author'] && ($forum_settings['forum_edit_timelimit'] <= 0 || time() - $forum_settings['forum_edit_timelimit'] * 60 < $pdata['post_datestamp'])) {
                         $pdata['post_edit'] = array('link' => INFUSIONS . "forum/viewthread.php?action=edit&amp;forum_id=" . $pdata['forum_id'] . "&amp;thread_id=" . $pdata['thread_id'] . "&amp;post_id=" . $pdata['post_id'], 'title' => $locale['forum_0265']);
                     }
                     $pdata['post_reply'] = array('link' => INFUSIONS . "forum/viewthread.php?action=reply&amp;forum_id=" . $pdata['forum_id'] . "&amp;thread_id=" . $pdata['thread_id'] . "&amp;post_id=" . $pdata['post_id'], 'title' => $locale['forum_0509']);
                 } elseif (iMOD) {
                     $pdata['post_edit'] = array('link' => INFUSIONS . "forum/viewthread.php?action=edit&amp;forum_id=" . $pdata['forum_id'] . "&amp;thread_id=" . $pdata['thread_id'] . "&amp;post_id=" . $pdata['post_id'], 'title' => $locale['forum_0265']);
                 }
             }
             // rank img
             if ($pdata['user_level'] <= USER_LEVEL_ADMIN) {
                 if ($forum_settings['forum_ranks']) {
                     $pdata['user_rank'] = show_forum_rank($pdata['user_posts'], $pdata['user_level'], $pdata['user_groups']);
                     // in fact now is get forum rank
                 } else {
                     $pdata['user_rank'] = getuserlevel($pdata['user_level']);
                 }
             } else {
                 if ($forum_settings['forum_ranks']) {
                     $pdata['user_rank'] = iMOD ? show_forum_rank($pdata['user_posts'], 104, $pdata['user_groups']) : show_forum_rank($pdata['user_posts'], $pdata['user_level'], $pdata['user_groups']);
                 } else {
                     $pdata['user_rank'] = iMOD ? $locale['userf1'] : getuserlevel($pdata['user_level']);
                 }
             }
             // Website
             if ($pdata['user_web'] && (iADMIN || $pdata['user_status'] != 6 && $pdata['user_status'] != 5)) {
                 $user_web_url_prefix = !preg_match("@^http(s)?\\:\\/\\/@i", $pdata['user_web']) ? "http://" . $pdata['user_web'] : $pdata['user_web'];
                 $pdata['user_web'] = array('link' => $user_web_url_prefix . $pdata['user_web'], 'title' => $locale['forum_0364']);
             } else {
                 $pdata['user_web'] = array('link' => '', 'title' => '');
             }
             // PM link
             $pdata['user_message'] = array('link' => '', 'title' => '');
             if (iMEMBER && $pdata['user_id'] != $userdata['user_id'] && (iADMIN || $pdata['user_status'] != 6 && $pdata['user_status'] != 5)) {
                 $pdata['user_message'] = array('link' => BASEDIR . 'messages.php?msg_send=' . $pdata['user_id'], "title" => $locale['send_message']);
             }
             // User Sig
             if ($pdata['user_sig'] && isset($pdata['post_showsig']) && $pdata['user_status'] != 6 && $pdata['user_status'] != 5) {
                 $pdata['user_sig'] = nl2br(parseubb(parsesmileys(stripslashes($pdata['user_sig'])), "b|i|u||center|small|url|mail|img|color"));
             } else {
                 $pdata['user_sig'] = "";
             }
             // Voting - need up or down link - accessible to author also the vote
             // answered and on going questions.
             // Answer rating
             $pdata['vote_message'] = '';
             //echo $data['forum_type'] == 4 ? "<br/>\n".(number_format($data['thread_postcount']-1)).$locale['forum_0365']."" : ''; // answers
             // form components
             $pdata['post_checkbox'] = iMOD ? "<input type='checkbox' name='delete_post[]' value='" . $pdata['post_id'] . "'/>" : '';
             $pdata['post_votebox'] = '';
             if ($this->thread_info['thread']['forum_type'] == 4) {
                 if ($this->getThreadPermission("can_rate")) {
                     // can vote.
                     $pdata['vote_up'] = array('link' => INFUSIONS . "forum/postify.php?post=voteup&amp;forum_id=" . $pdata['forum_id'] . "&amp;thread_id=" . $pdata['thread_id'] . "&amp;post_id=" . $pdata['post_id'], "title" => $locale['forum_0265']);
                     $pdata['vote_down'] = array('link' => INFUSIONS . "forum/postify.php?post=votedown&amp;forum_id=" . $pdata['forum_id'] . "&amp;thread_id=" . $pdata['thread_id'] . "&amp;post_id=" . $pdata['post_id'], "title" => $locale['forum_0265']);
                     $pdata['post_votebox'] = "<div class='text-center'>\n";
                     $pdata['post_votebox'] .= "<a href='" . $pdata['vote_up']['link'] . "' class='btn btn-default btn-xs m-b-5 p-5' title='" . $locale['forum_0265'] . "'>\n<i class='entypo up-dir icon-xs'></i></a>";
                     $pdata['post_votebox'] .= "<h3 class='m-0'>" . (!empty($pdata['vote_points']) ? $pdata['vote_points'] : 0) . "</h3>\n";
                     $pdata['post_votebox'] .= "<a href='" . $pdata['vote_down']['link'] . "' class='btn btn-default btn-xs m-t-5 p-5' title='" . $locale['forum_0265'] . "'>\n<i class='entypo down-dir icon-xs'></i></a>";
                     $pdata['post_votebox'] .= "</div>\n";
                 } else {
                     $pdata['post_votebox'] = "<div class='text-center'>\n";
                     $pdata['post_votebox'] .= "<h3 class='m-0'>" . (!empty($pdata['vote_points']) ? $pdata['vote_points'] : 0) . "</h3>\n";
                     $pdata['post_votebox'] .= "</div>\n";
                 }
             }
             // Edit Reason - NOT WORKING?
             $pdata['post_edit_reason'] = '';
             if ($pdata['post_edittime']) {
                 $edit_reason = "<div class='edit_reason m-t-10'><small>" . $locale['forum_0164'] . profile_link($pdata['post_edituser'], $pdata['edit_name'], $pdata['edit_status']) . $locale['forum_0167'] . showdate("forumdate", $pdata['post_edittime']) . "</small>\n";
                 if ($pdata['post_editreason'] && iMEMBER) {
                     $edit_reason .= "<br /><a id='reason_pid_" . $pdata['post_id'] . "' rel='" . $pdata['post_id'] . "' class='reason_button small' data-target='reason_div_pid_" . $pdata['post_id'] . "'>";
                     $edit_reason .= "<strong>" . $locale['forum_0165'] . "</strong>";
                     $edit_reason .= "</a>\n";
                     $edit_reason .= "<div id='reason_div_pid_" . $pdata['post_id'] . "' class='reason_div small'>" . $pdata['post_editreason'] . "</div>\n";
                 }
                 $edit_reason .= "</div>\n";
                 $pdata['post_edit_reason'] = $edit_reason;
                 $this->edit_reason = TRUE;
             }
             // Custom Post Message Link/Buttons
             $pdata['post_links'] = '';
             $pdata['post_links'] .= !empty($pdata['post_quote']) ? "<a class='btn btn-xs btn-default' title='" . $pdata['post_quote']["title"] . "' href='" . $pdata['post_quote']['link'] . "'>" . $pdata['post_quote']['title'] . "</a>\n" : '';
             $pdata['post_links'] .= !empty($pdata['post_edit']) ? "<a class='btn btn-xs btn-default' title='" . $pdata['post_edit']["title"] . "' href='" . $pdata['post_edit']['link'] . "'>" . $pdata['post_edit']['title'] . "</a>\n" : '';
             $pdata['post_links'] .= !empty($pdata['print']) ? "<a class='btn btn-xs btn-default' title='" . $pdata['print']["title"] . "' href='" . $pdata['print']['link'] . "'>" . $pdata['print']['title'] . "</a>\n" : '';
             $pdata['post_links'] .= !empty($pdata['user_web']) ? "<a class='btn btn-xs btn-default' class='forum_user_actions' href='" . $pdata['user_web']['link'] . "' target='_blank'>" . $pdata['user_web']['title'] . "</a>\n" : '';
             $pdata['post_links'] .= !empty($pdata['user_message']) ? "<a class='btn btn-xs btn-default' href='" . $pdata['user_message']['link'] . "' target='_blank'>" . $pdata['user_message']['title'] . "</a>\n" : '';
             // Post Date
             $pdata['post_date'] = $locale['forum_0524'] . " " . timer($pdata['post_datestamp']) . " - " . showdate('forumdate', $pdata['post_datestamp']);
             $pdata['post_shortdate'] = $locale['forum_0524'] . " " . timer($pdata['post_datestamp']);
             $pdata['post_longdate'] = $locale['forum_0524'] . " " . showdate('forumdate', $pdata['post_datestamp']);
             $this->thread_info['post_items'][$pdata['post_id']] = $pdata;
             $i++;
         }
     }
 }
function showcomments_avatar($ctype, $cdb, $ccol, $cid, $clink, $seo_root_link = "", $a = "-", $seo_catid = "", $b = "-page-", $rowstart = "", $c = "-", $seo_subject = "")
{
    // Pimped
    global $settings, $locale, $userdata, $aidlink;
    if (URL_REWRITE && $seo_root_link != "") {
        $seo_link = $seo_root_link . $a . $seo_catid . $c . clean_subject_urlrewrite($seo_subject) . ".html";
    }
    // Pimped
    $link = FUSION_SELF . (FUSION_QUERY ? "?" . FUSION_QUERY : "");
    $link = preg_replace("^(&amp;|\\?)c_action=(edit|delete)&amp;comment_id=\\d*^", "", $link);
    if (iMEMBER && (isset($_GET['c_action']) && $_GET['c_action'] == "delete") && (isset($_GET['comment_id']) && isnum($_GET['comment_id']))) {
        if ((iMODERATOR || iADMIN) && checkrights("C") || iMEMBER && dbcount("(comment_id)", DB_COMMENTS, "comment_id='" . (int) $_GET['comment_id'] . "' AND comment_name='" . (int) $userdata['user_id'] . "'")) {
            $result = dbquery("DELETE FROM " . DB_COMMENTS . " WHERE comment_id='" . (int) $_GET['comment_id'] . "'" . (iMODERATOR || iADMIN ? "" : " AND comment_name='" . (int) $userdata['user_id'] . "'"));
        }
        redirect($clink);
    }
    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") {
                $comment_name = trim(stripinput($_POST['comment_name']));
                $comment_name = preg_replace("(^[0-9]*)", "", $comment_name);
                if (isnum($comment_name)) {
                    $comment_name = "";
                }
                include_once INCLUDES . "securimage/securimage.php";
                $securimage = new Securimage();
                if (!isset($_POST['com_captcha_code']) || $securimage->check($_POST['com_captcha_code']) == 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 ((iMODERATOR || iADMIN) && checkrights("C") || iMEMBER && dbcount("(comment_id)", DB_COMMENTS, "comment_id='" . (int) $_GET['comment_id'] . "' AND comment_item_id='" . $cid . "' AND comment_type='" . $ctype . "' AND comment_name='" . (int) $userdata['user_id'] . "' AND comment_hidden='0'")) {
                    if ($comment_message) {
                        $result = dbquery("UPDATE " . DB_COMMENTS . " SET comment_message=" . _db($comment_message) . " WHERE comment_id='" . (int) $_GET['comment_id'] . "'" . (iMODERATOR || iADMIN ? "" : " AND comment_name='" . (int) $userdata['user_id'] . "'"));
                        $comment_updated = true;
                    }
                }
                if ($comment_updated) {
                    $c_start = (ceil(dbcount("(comment_id)", DB_COMMENTS, "comment_id<='" . (int) $_GET['comment_id'] . "' AND comment_item_id=" . _db($cid) . " AND comment_type=" . _db($ctype) . "") / 10) - 1) * 10;
                }
                redirect($clink . "&amp;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 . " (comment_item_id, comment_type, comment_name, comment_message, comment_datestamp, comment_ip, comment_hidden) VALUES (" . _db($cid) . ", " . _db($ctype) . ", " . _db($comment_name) . ", " . _db($comment_message) . ", '" . time() . "', '" . USER_IP . "', '0')");
                    }
                }
                $c_start = (ceil(dbcount("(comment_id)", DB_COMMENTS, "comment_item_id='" . (int) $cid . "' AND comment_type=" . _db($ctype) . "") / 10) - 1) * 10;
                redirect($clink . "&amp;c_start=" . $c_start);
            }
        }
        opentable($locale['c100']);
        echo "<a id='comments' name='comments'></a>";
        $c_rows = dbcount("(comment_id)", DB_COMMENTS, "comment_item_id=" . _db($cid) . " AND comment_type=" . _db($ctype) . " AND comment_hidden='0'");
        if (!isset($_GET['c_start']) && $c_rows > 10) {
            $_GET['c_start'] = (ceil($c_rows / 10) - 1) * 10;
        }
        if (!isset($_GET['c_start']) || !isnum($_GET['c_start'])) {
            $_GET['c_start'] = 0;
        }
        $result = dbquery("SELECT tcm.comment_id, tcm.comment_name, tcm.comment_datestamp, tcm.comment_message,\r\n\t\t\ttcu.user_name, tcu.user_avatar, tcu.user_id, tcu.user_level, 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=" . _db($cid) . " AND comment_type=" . _db($ctype) . " AND comment_hidden='0'\r\n\t\t\tORDER BY comment_datestamp ASC LIMIT " . (int) $_GET['c_start'] . ",10");
        if (dbrows($result)) {
            $i = $_GET['c_start'] + 1;
            if ($c_rows > 10) {
                echo "<div style='text-align:center;margin-bottom:5px;'>" . makecommentnav($_GET['c_start'], 10, $c_rows, 3, $clink . "&amp;", $seo_root_link, $a, $seo_catid, $b, $rowstart, "-cstart-", $c, $seo_subject) . "</div>\n";
            }
            echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n";
            while ($data = dbarray($result)) {
                echo "<tr><td class='tbl2' width='10%' align='center'>\n";
                if ($data['user_name']) {
                    echo "<span class='comment-name'>" . profile_link($data['comment_name'], $data['user_name'], $data['user_status']) . "</span>\n";
                } else {
                    echo "<span class='comment-name'>" . $data['comment_name'] . "</span>\n";
                }
                echo "</td>\n";
                echo "<td class='tbl2'>\n<span class='small'>" . $locale['global_071'] . showdate("longdate", $data['comment_datestamp']) . "</span>\n";
                echo "<div style='float:right' class='comment_actions'>";
                if ((iMODERATOR || iADMIN) && checkrights("C") || iMEMBER && $data['comment_name'] == $userdata['user_id'] && isset($data['user_name'])) {
                    echo "<!--comment_actions-->\n<a href='" . FUSION_SELF . "?" . FUSION_QUERY . "&amp;c_action=edit&amp;comment_id=" . $data['comment_id'] . "#edit_comment'>" . $locale['c108'] . "</a> |\n";
                    echo "<a href='" . FUSION_SELF . "?" . FUSION_QUERY . "&amp;c_action=delete&amp;comment_id=" . $data['comment_id'] . "'>" . $locale['c109'] . "</a> |\n";
                }
                echo "<a href='" . FUSION_REQUEST . "#c" . $data['comment_id'] . "' id='c" . $data['comment_id'] . "' name='c" . $data['comment_id'] . "'>#" . $i . "</a></div>\n";
                echo "</td>\n";
                echo "</tr>\n<tr>\n";
                $avatar = $data['user_avatar'] != "" && file_exists(IMAGES_AVA . $data['user_avatar']) ? IMAGES_AVA . $data['user_avatar'] : IMAGES_AVA . "noavatar.jpg";
                echo "<td class='tbl1' width='15%'>\n";
                echo "<div style='text-align:center;'><img src='" . $avatar . "' width='50' height='50' alt='' /></div><br />\n";
                if ($settings['warning_system_comments'] && $data['user_name']) {
                    $points = show_warning_points($data['user_id']);
                    echo "<div class='commentswarnings'>";
                    echo "<span class='small'><a style='cursor:help;' onclick=\"warning_info();\">" . $locale['WARN200'] . "</a></span> ";
                    echo warning_profile_link("1", $data['user_id'], $points);
                    echo "</div>";
                }
                echo "<span class='small2'>" . $locale['c110'] . number_format(dbcount("(comment_id)", DB_COMMENTS, "comment_name='" . (int) $data['user_id'] . "'")) . "<br />";
                echo $locale['c111'] . getuserlevel($data['user_level']) . "</span><br />";
                echo "</td>\n";
                echo "<td class='tbl2' valign='top'>\n" . nl2br(parseubb(parsesmileys($data['comment_message']))) . "</td>\n</tr>";
                $i++;
            }
            echo "\n</table>\n";
            if ((iMODERATOR || iADMIN) && checkrights("C")) {
                echo "<div align='right' class='tbl2'><a href='" . ADMIN . "comments.php" . $aidlink . "&amp;ctype={$ctype}&amp;cid={$cid}'>" . $locale['c106'] . "</a></div>\n";
            }
            if ($c_rows > 10) {
                echo "<br /><div style='text-align:center;margin-top:5px;'>" . makecommentnav($_GET['c_start'], 10, $c_rows, 3, $clink . "&amp;", $seo_root_link, $a, $seo_catid, $b, $rowstart, "-cstart-", $c, $seo_subject) . "</div>\n";
            }
        } else {
            echo $locale['c101'] . "\n";
        }
        closetable();
        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 FROM " . 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='" . (int) $_GET['comment_id'] . "' AND comment_item_id=" . _db($cid) . " AND comment_type=" . _db($ctype) . " AND comment_hidden='0'");
            if (dbrows($eresult)) {
                $edata = dbarray($eresult);
                if ((iMODERATOR || iADMIN) && checkrights("C") || iMEMBER && $edata['comment_name'] == $userdata['user_id'] && isset($edata['user_name'])) {
                    $clink .= "&amp;c_action=edit&amp;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 "<form name='inputform' method='post' action='" . (URL_REWRITE && $seo_root_link != "" ? $seo_link : $clink) . "'>\n";
            // Pimped
            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 align='center' class='tbl'>\n";
            echo "<textarea name='comment_message' cols='70' rows='6' class='textbox' style='width:360px'>" . $comment_message . "</textarea><br />\n";
            echo display_bbcodes("360px", "comment_message");
            if (iGUEST) {
                echo $locale['global_158'] . "<br />\n";
                echo "<img id='com_captcha' src='" . INCLUDES . "securimage/securimage_show.php' alt='' /><br />\n";
                echo "<a href='" . INCLUDES . "securimage/securimage_play.php'><img src='" . INCLUDES . "securimage/images/audio_icon.gif' alt='' class='tbl-border' style='margin-bottom:1px' /></a>\n";
                echo "<a href='#' onclick=\"document.getElementById('com_captcha').src = '" . INCLUDES . "securimage/securimage_show.php?sid=' + Math.random(); return false\"><img src='" . INCLUDES . "securimage/images/refresh.gif' alt='' class='tbl-border' /></a><br />\n";
                echo $locale['global_159'] . "<br />\n<input type='text' name='com_captcha_code' class='textbox' style='width:100px' />\n";
            }
            echo "<br />\n<input type='submit' name='post_comment' value='" . ($comment_message ? $locale['c103'] : $locale['c102']) . "' class='button' />\n";
            echo "</div>\n</form>\n";
        } else {
            echo $locale['c105'] . "\n";
        }
        closetable();
    }
}
        // Pimped
        if (dbrows($result)) {
            $data = dbarray($result);
            $result = dbquery("SELECT user_id, user_name, user_level, user_status FROM " . DB_USERS . " WHERE user_groups REGEXP('^\\\\.{$_GET['group_id']}\$|\\\\.{$_GET['group_id']}\\\\.|\\\\.{$_GET['group_id']}\$') ORDER BY user_level DESC, user_name");
            opentable($locale['420']);
            echo "<table cellpadding='0' cellspacing='0' width='100%'>\n<tr>\n";
            echo "<td align='center' colspan='2' class='tbl1'><strong>" . $data['group_name'] . "</strong> (" . sprintf(dbrows($result) == 1 ? $locale['421'] : $locale['422'], dbrows($result)) . ")</td>\n";
            echo "</tr>\n<tr>\n";
            echo "<td class='tbl2'><strong>" . $locale['423'] . "</strong></td>\n";
            echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'><strong>" . $locale['424'] . "</strong></td>\n";
            echo "</tr>\n";
            while ($data = dbarray($result)) {
                $cell_color = $i % 2 == 0 ? "tbl1" : "tbl2";
                $i++;
                echo "<tr>\n<td class='" . $cell_color . "'>\n" . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "</td>\n";
                echo "<td align='center' width='1%' class='" . $cell_color . "' style='white-space:nowrap'>" . getuserlevel($data['user_level']) . "</td>\n</tr>";
            }
            echo "</table>\n";
            closetable();
        } else {
            redirect("index.php");
        }
    } else {
        opentable($locale['420']);
        echo "<div style='text-align:center;'><br />" . $locale['430a'] . "<br /><br /></div>";
        closetable();
    }
} else {
    redirect("index.php");
}
require_once TEMPLATES . "footer.php";
 /**
  * The callback function for parseUser()
  * @global array $locale
  * @param string $m The message
  * @return string
  */
 function render_user_tags($m)
 {
     $locale = fusion_get_locale();
     add_to_jquery("\$('[data-toggle=\"user-tooltip\"]').popover();");
     $user = str_replace('@', '', $m[0]);
     $result = dbquery("SELECT user_id, user_name, user_level, user_status, user_avatar FROM " . DB_USERS . " WHERE user_name='" . $user . "' or user_name='" . ucwords($user) . "' or user_name='" . strtolower($user) . "' AND user_status='0' LIMIT 1");
     if (dbrows($result) > 0) {
         $data = dbarray($result);
         $src = $data['user_avatar'] && file_exists(IMAGES . "avatars/" . $data['user_avatar']) ? $src = IMAGES . "avatars/" . $data['user_avatar'] : IMAGES . "avatars/no-avatar.jpg";
         $title = '<div class="user-tooltip"><div class="pull-left m-r-10"><img class="img-responsive" style="max-height:40px; max-width:40px;" src="' . $src . '"></div><div class="clearfix"><a title="' . sprintf($locale['go_profile'], $data['user_name']) . '" class="strong profile-link m-b-5" href="' . BASEDIR . 'profile.php?lookup=' . $data['user_id'] . '">' . $data['user_name'] . '</a><br/><small>' . getuserlevel($data['user_level']) . '</small></div>';
         $content = '<a class="btn btn-sm btn-block btn-default strong" href="' . BASEDIR . 'messages.php?msg_send=' . $data['user_id'] . '"><i class="fa fa-envelope fa-fw"></i> ' . $locale['send_message'] . '</a>';
         $html = "<a class='strong pointer' tabindex='0' role='button' data-html='true' data-trigger='focus' data-placement='top' data-toggle='user-tooltip' title='" . $title . "' data-content='" . $content . "'>";
         $html .= "<span class='user-label'>" . $m[0] . "</span>";
         $html .= "</a>";
         return $html;
     }
     return $m[0];
 }
Beispiel #12
0
| Filename: users.json.php
| Author : Frederick MC Chan (Hien)
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once dirname(__FILE__) . '../../../maincore.php';
if (!defined("IN_FUSION")) {
    die("Access Denied");
}
$q = $_GET['q'];
// since search is on user_name.
$result = dbquery("SELECT user_id, user_name, user_avatar, user_level FROM " . DB_USERS . " WHERE " . (blacklist('user_id') ? blacklist('user_id') . ' AND' : '') . " user_status='0' AND\n    user_name LIKE '{$q}%' AND user_id !='" . $userdata['user_id'] . "'\n    ORDER BY user_level DESC, user_name ASC");
if (dbrows($result) > 0) {
    while ($udata = dbarray($result)) {
        $user_id = $udata['user_id'];
        $user_text = $udata['user_name'];
        $user_avatar = $udata['user_avatar'] && file_exists(IMAGES . "avatars/" . $udata['user_avatar']) ? $udata['user_avatar'] : "noavatar50.png";
        $user_name = $udata['user_name'];
        $user_level = getuserlevel($udata['user_level']);
        $user_opts[] = array('id' => "{$user_id}", 'text' => "{$user_name}", 'avatar' => "{$user_avatar}", "level" => "{$user_level}");
    }
} else {
    $user_opts[] = array('id' => '', 'text' => "No Results Found..", 'avatar' => '', 'level' => '');
}
echo json_encode($user_opts);
Beispiel #13
0
function user_search($user_id)
{
    $encoded = json_encode(array());
    $user_id = stripinput($user_id);
    $result = dbquery("SELECT user_id, user_name, user_avatar, user_level FROM " . DB_USERS . " WHERE user_status='0' AND user_id='{$user_id}'");
    if (dbrows($result) > 0) {
        while ($udata = dbarray($result)) {
            $user_id = $udata['user_id'];
            $user_avatar = $udata['user_avatar'] ? $udata['user_avatar'] : "noavatar50.png";
            $user_name = $udata['user_name'];
            $user_level = getuserlevel($udata['user_level']);
            $user_opts[] = array('id' => "{$user_id}", 'text' => "{$user_name}", 'avatar' => "{$user_avatar}", "level" => "{$user_level}");
        }
        if (!isset($user_opts)) {
            $user_opts = array();
        }
        $encoded = json_encode($user_opts);
    }
    return $encoded;
}
            } elseif ($lastseen < 360) {
                $lastseen = "" . $locale['LSUP_002'] . "";
            } elseif ($iW > 0) {
                if ($iW == 1) {
                    $Text = $locale['LSUP_003'];
                } else {
                    $Text = $locale['LSUP_004'];
                }
                $lastseen = "" . $iW . " " . $Text . "";
            } elseif ($iD > 0) {
                if ($iD == 1) {
                    $Text = $locale['LSUP_005'];
                } else {
                    $Text = $locale['LSUP_006'];
                }
                $lastseen = "" . $iD . " " . $Text . "";
            } else {
                $lastseen = $iH . ":" . $iM . ":" . $iS;
            }
        } else {
            $lastseen = $locale['LSUP_007'];
        }
        echo "<tr>\n<td class='small' align='left'>\n<a href='" . BASEDIR . "" . url("u", $data['user_id'], $data['user_name']) . "'><font color='" . $colors[$data['user_level']] . "' title='" . $data['user_name'] . " | " . getuserlevel($data['user_level'] ? $data['user_level'] : $locale['LSUP_008'], 20) . "'>" . trimlink($data['user_name'], 12) . "</font></a>\n</td>\n<td class='small2' align='right'>" . $lastseen . "</td>\n</tr>";
        $user_count++;
    }
}
echo "</table>";
if ($user_count > $min) {
    echo "</div>\n";
}
closesidex();
        /**
         * The callback function for parseUser()
         * @global array $locale
         * @param string $m The message
         * @return string
         */
        function replace_user($m)
        {
            global $locale;
            add_to_jquery("\$('[data-toggle=\"user-tooltip\"]').popover();");
            $user = str_replace('@', '', $m[0]);
            $result = dbquery("SELECT user_id, user_name, user_level, user_status, user_avatar FROM " . DB_USERS . " WHERE user_name='" . $user . "' or user_name='" . ucwords($user) . "' or user_name='" . strtolower($user) . "' AND user_status='0' LIMIT 1");
            if (dbrows($result) > 0) {
                $data = dbarray($result);
                $src = $data['user_avatar'] && file_exists(IMAGES . "avatars/" . $data['user_avatar']) ? $src = IMAGES . "avatars/" . $data['user_avatar'] : IMAGES . "avatars/noavatar50.png";
                $title = '<div class="user-tooltip">
				<div class="pull-left m-r-10"><img class="img-responsive" style="max-height:40px; max-width:40px;" src="' . $src . '"></div>
				<div class="overflow-hide">
				<a title="' . sprintf($locale['go_profile'], $data['user_name']) . '" " class="strong text-bigger" href="' . BASEDIR . 'profile.php?lookup=' . $data['user_id'] . '">' . $data['user_name'] . '</a><br/>
				<span class="text-smaller">' . getuserlevel($data['user_level']) . '</span>
				</div>';
                $content = '<a class="btn btn-sm btn-block btn-primary" href="' . BASEDIR . 'messages.php?msg_send=' . $data['user_id'] . '">' . $locale['send_message'] . '</a>';
                $html = "<a class='strong pointer' tabindex='0' role='user-profile' data-html='true' data-placement='top' data-toggle='user-tooltip' data-trigger='focus' title='" . $title . "' data-content='" . $content . "'>";
                $html .= $m[0];
                $html .= "</a>\n";
                return $html;
            }
            return $m[0];
        }
Beispiel #16
0
function render_admin_panel()
{
    global $locale, $userdata, $defender, $pages, $aidlink, $admin;
    $languages = fusion_get_enabled_languages();
    // Admin panel page
    echo "<div id='admin-panel' class='clearfix in'>\n";
    // Top header section
    echo "<section id='acp-header' class='pull-left affix clearfix' data-offset-top='0' data-offset-bottom='0'>\n";
    // Top left logo
    echo "<div class='brand'>\n";
    echo "<div class='pull-right'>\n";
    echo "</div>\n</div>\n";
    // Top navigation
    echo "<nav>\n";
    // Top side panel toggler
    echo "<ul class='venus-toggler'>\n";
    echo "<li><a id='toggle-canvas' class='pointer' style='border-left:none;'><i class='fa fa-bars fa-lg'></i></a></li>\n";
    echo "</ul>\n";
    echo $admin->horiziontal_admin_nav(true);
    // Top right menu links
    echo "<ul class='top-right-menu pull-right m-r-15'>\n";
    echo "<li class='dropdown'>\n";
    echo "<a class='dropdown-toggle pointer' data-toggle='dropdown'>" . display_avatar($userdata, '25px', '', '', '') . " " . $locale['logged'] . "<strong>" . $userdata['user_name'] . "</strong> <span class='caret'></span>\n</a>\n";
    echo "<ul class='dropdown-menu' role='menu'>\n";
    echo "<li><a class='display-block' href='" . BASEDIR . "edit_profile.php'>" . $locale['edit'] . " " . $locale['profile'] . "</a></li>\n";
    echo "<li><a class='display-block' href='" . BASEDIR . "profile.php?lookup=" . $userdata['user_id'] . "'>" . $locale['view'] . " " . $locale['profile'] . "</a></li>\n";
    echo "<li class='divider'> </li>\n";
    echo "<li><a class='display-block' href='" . FUSION_REQUEST . "&amp;logout'>" . $locale['admin-logout'] . "</a></li>\n";
    echo "<li><a class='display-block' href='" . BASEDIR . "index.php?logout=yes'>" . $locale['logout'] . "</a></li>\n";
    echo "</ul>\n";
    echo "</li>\n";
    echo "<li><a title='" . $locale['settings'] . "' href='" . ADMIN . "settings_main.php" . $aidlink . "'><i class='fa fa-cog fa-lg'></i></a></li>\n";
    echo "<li><a title='" . fusion_get_settings('sitename') . "' href='" . BASEDIR . "index.php'><i class='fa fa-home fa-lg'></i></a>\n</li>\n";
    echo "<li><a title='" . $locale['message'] . "' href='" . BASEDIR . "messages.php'><i class='fa fa-envelope-o fa-lg'></i></a>\n</li>\n";
    if (count($languages) > 1) {
        echo "<li class='dropdown'><a class='dropdown-toggle pointer' data-toggle='dropdown' title='" . $locale['282'] . "'><i class='fa fa-globe fa-lg fa-fw'></i> " . translate_lang_names(LANGUAGE) . "<span class='caret'></span></a>\n";
        echo "<ul class='dropdown-menu'>\n";
        foreach ($languages as $language_folder => $language_name) {
            echo "<li><a class='display-block' href='" . clean_request("lang=" . $language_folder, array("lang"), FALSE) . "'><img class='m-r-5' src='" . BASEDIR . "locale/{$language_folder}/{$language_folder}-s.png'> {$language_name}</a></li>\n";
        }
        echo "</ul>\n";
        echo "</li>\n";
    }
    echo "</ul>\n";
    // .top-right-menu
    echo "</nav>\n";
    echo "</section>\n";
    // Content section
    echo "<div class='content-wrapper display-table pull-left'>\n";
    // Left side panel
    echo "<div id='acp-left' class='pull-left affix' data-offset-top='0' data-offset-bottom='0'>\n";
    // collapse to top menu on sm and xs
    echo "<div class='panel panel-default admin'><div class='panel-body clearfix'>\n";
    echo "<div class='pull-left m-r-10'>\n" . display_avatar($userdata, '50px', '', '', '') . "</div>\n";
    echo "<span class='overflow-hide m-t-10'><h4 class='m-b-0 text-stronger'>\n" . $userdata['user_name'] . "</h4>\n" . getuserlevel($userdata['user_level']) . "</span></div>\n";
    echo "</div>\n";
    echo $admin->vertical_admin_nav();
    echo "</div>\n";
    // #acp-left
    // Control panel content wrapper
    echo "<div id='acp-main' class='clearfix' style='vertical-align:top;'>\n";
    // Main content wrapper
    echo "<div id='acp-content' class='m-t-20 col-xs-12 col-sm-12 col-md-12 col-lg-12'>\n";
    // Render breadcrumbs
    echo render_breadcrumbs();
    // Get and render notices
    $notices = getNotices();
    echo renderNotices($notices);
    // Render the content
    echo CONTENT;
    echo "</div>\n";
    // #acp-content
    // Footer section
    echo "<footer class='m-l-20 display-inline-block m-t-20 m-b-20'>\n";
    // Copyright
    echo "Venus Admin &copy; " . date("Y") . " created by <a href='https://www.php-fusion.co.uk'><strong>PHP-Fusion Inc.</strong></a>\n";
    echo showcopyright();
    // Render time
    if (fusion_get_settings('rendertime_enabled')) {
        echo "<br /><br />";
        // Make showing of queries and memory usage separate settings
        echo showrendertime();
        echo showMemoryUsage();
    }
    echo "</footer>\n";
    echo "</div>\n";
    // .acp-main
    echo "</div>\n";
    // .content-wrapper
    echo "</div>\n";
    // #admin-panel
    add_to_footer("<script src='" . THEMES . "admin_themes/Venus/includes/jquery.slimscroll.min.js'></script>");
    if (!isset($_COOKIE['acp_sidemenu'])) {
        setcookie("acp_sidemenu", 1, 64800);
    }
    add_to_jquery("\n\t// Initialize slimscroll\n\t\$('#adl').slimScroll({\n\t\theight: null\n\t});\n\n\t// Function to toggle side menu\n\tfunction toggleSideMenu(state) {\n\t\tvar panel_state = null;\n\t\tif (state == 'show') {\n\t\t\t\$('#admin-panel').addClass('in');\n\t\t\tvar panel_state = 1;\n\t\t} else if (state == 'hide') {\n\t\t\t\$('#admin-panel').removeClass('in');\n\t\t\tvar panel_state = 0;\n\t\t} else {\n\t\t\t\$('#admin-panel').toggleClass('in');\n\t\t\tvar panel_state = \$('#admin-panel').hasClass('in');\n\t\t}\n\t\tif (panel_state) {\n\t\t\t\$.cookie('" . COOKIE_PREFIX . "acp_sidemenu', '1', {expires: 164800});\n\t\t} else {\n\t\t\t\$.cookie('" . COOKIE_PREFIX . "acp_sidemenu', '0', {expires: 164800});\n\t\t}\n\t}\n\n\t// Adjust side menu height on page load, resize or orientation change\n\t\$(window).on('load resize orientationchange', function(event) {\n\t\tvar init_hgt = \$(window).height();\n\t\tvar small = \$('.brand-text').is(':visible');\n\t\tvar panel_height = (small ? init_hgt-125 : init_hgt-80);\n\t\tvar hgt = \$(this).height();\n\t\t\$('#acp-left').css('height', hgt);\n\t\t\$('.admin-vertical-link').css('height', panel_height);\n\t\t// Hide side menu on orientation change\n\t\t//if (event.type === 'orientationchange') {\n\t\t//\ttoggleSideMenu('show');\n\t\t//}\n\t});\n\t// Side menu toggler\n\t\$('#toggle-canvas').on('click', toggleSideMenu);\n\t");
}
Beispiel #17
0
                foreach ($poll_opts as $poll_option) {
                    echo "<tr>\n<td class='tbl1'><input type='radio' name='poll_option' value='{$i}' style='vertical-align:middle;' /> " . $poll_option . "</td>\n</tr>\n";
                    $i++;
                }
                echo "</table>\n</td>\n</tr>\n</table>\n";
            }
        }
        echo "<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>\n<tr>\n";
        echo "<td colspan='2' class='tbl2'><strong>" . $subject . "</strong></td>\n</tr>\n";
        echo "<tr>\n<td class='tbl2' style='width:140px;'><a href='../profile.php?lookup=" . $userdata['user_id'] . "'>" . $userdata['user_name'] . "</a></td>\n";
        echo "<td class='tbl2'>" . $locale['426'] . showdate("forumdate", time()) . "</td>\n";
        echo "</tr>\n<tr>\n<td valign='top' width='140' class='tbl2'>\n";
        if ($userdata['user_avatar'] && file_exists(IMAGES . "avatars/" . $userdata['user_avatar'])) {
            echo "<img src='" . IMAGES . "avatars/" . $userdata['user_avatar'] . "' alt='' /><br /><br />\n";
        }
        echo "<span class='small'>" . getuserlevel($userdata['user_level']) . "</span><br /><br />\n";
        echo "<span class='small'><strong>" . $locale['423'] . "</strong> " . $userdata['user_posts'] . "</span><br />\n";
        echo "<span class='small'><strong>" . $locale['425'] . "</strong> " . showdate("%d.%m.%y", $userdata['user_joined']) . "</span><br />\n";
        echo "<br /></td>\n<td valign='top' class='tbl1'>" . $previewmessage . "</td>\n";
        echo "</tr>\n</table>\n";
        closetable();
    }
}
if (isset($_POST['postnewthread'])) {
    $subject = trim(stripinput(censorwords($_POST['subject'])));
    $message = trim(stripinput(censorwords($_POST['message'])));
    $flood = false;
    $error = 0;
    $sticky_thread = isset($_POST['sticky_thread']) && (iMOD || iSUPERADMIN) ? 1 : 0;
    $lock_thread = isset($_POST['lock_thread']) && (iMOD || iSUPERADMIN) ? 1 : 0;
    $sig = isset($_POST['show_sig']) ? 1 : 0;
Beispiel #18
0
 private function renderBasicOutputFields()
 {
     global $locale, $userdata, $aidlink;
     $rowspan = 4;
     $html = "<table cellpadding='0' cellspacing='1' class='table table-responsive profile tbl-border center'>\n";
     $html .= "<tr><td colspan='3' class='tbl2'><strong>Basic Information</strong></td></tr>";
     $returnFields = $this->basicOutputField($locale['u063'], getuserlevel($this->userData['user_level']), "profile_user_level");
     if (iADMIN || $this->userData['user_hide_email'] == 0) {
         $rowspan = $rowspan + 1;
         $returnFields .= $this->basicOutputField($locale['u064'], hide_email($this->userData['user_email']), "profile_user_email");
     }
     $lastVisit = $this->userData['user_lastvisit'] ? showdate("longdate", $this->userData['user_lastvisit']) : $locale['u042'];
     $returnFields .= $this->basicOutputField($locale['u066'], showdate("longdate", $this->userData['user_joined']), "profile_user_joined");
     $returnFields .= $this->basicOutputField($locale['u067'], $lastVisit, "profile_user_visit");
     if ($this->userData['user_avatar'] == "" || !file_exists(IMAGES . "avatars/" . $this->userData['user_avatar'])) {
         $this->userData['user_avatar'] = "noavatar100.png";
     }
     $html .= $this->basicOutputField($locale['u068'], $this->userData['user_name'], "profile_user_name", $rowspan);
     $html .= $returnFields;
     if (iMEMBER && $userdata['user_id'] != $this->userData['user_id']) {
         $html .= "<tr><td colspan='3' class='user_profile_opts center tbl2'>";
         $html .= "<a href='" . BASEDIR . "messages.php?msg_send=" . $this->userData['user_id'] . "' title='" . $locale['u043'] . "'>" . $locale['u043'] . "</a>\n";
         if (iADMIN && checkrights("M") && $this->userData['user_level'] != "103" && $this->userData['user_id'] != "1") {
             $html .= " - <a href='" . ADMIN . "members.php" . $aidlink . "&amp;step=log&amp;user_id=" . $this->userData['user_id'] . "'>" . $locale['u054'] . "</a>";
         }
         $html .= "<!--user_profile_opts-->";
         $html .= "</td>\n</tr>\n";
     }
     $html .= "</table>\n";
     if (iADMIN && $this->userData['user_status'] > 0) {
         $html .= "<div style='margin:5px'></div>\n";
         $html .= "<table cellpadding='0' cellspacing='1' class='table table-responsive profile tbl-border center'>\n<tr>\n";
         $html .= "<td colspan='2' class='tbl2'><strong>" . $locale['u055'] . "</strong> " . getuserstatus($this->userData['user_status']) . "</td>\n";
         $html .= "</tr>\n";
         $html .= $this->basicOutputField($locale['u056'], $this->userData['suspend_reason'], "profile_user_reason");
         $html .= "</table>\n";
     }
     return $html;
 }
Beispiel #19
0
 opentable($locale['460']);
 echo "<form name='rem_users_form' method='post' action='" . FUSION_SELF . $aidlink . "&amp;group_id=" . $_GET['group_id'] . "'>\n";
 echo "<table cellpadding='0' cellspacing='1' class='table table-responsive tbl-border center'>\n";
 $rows = dbcount("(user_id)", DB_USERS, "user_groups REGEXP('^\\\\.{$_GET['group_id']}\$|\\\\.{$_GET['group_id']}\\\\.|\\\\.{$_GET['group_id']}\$')");
 if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) {
     $_GET['rowstart'] = 0;
 }
 if ($rows) {
     $i = 0;
     $result = dbquery("SELECT user_id,user_name,user_level FROM " . DB_USERS . " WHERE user_groups REGEXP('^\\\\.{$_GET['group_id']}\$|\\\\.{$_GET['group_id']}\\\\.|\\\\.{$_GET['group_id']}\$') ORDER BY user_level DESC, user_name LIMIT {$_GET['rowstart']},20");
     echo "<tr>\n<td class='tbl2'><strong>" . $locale['446'] . "</strong></td>\n";
     echo "<td align='right' width='1%' class='tbl2' style='white-space:nowrap'><strong>" . $locale['447'] . "</strong></td>\n</tr>\n";
     while ($data = dbarray($result)) {
         $row_color = $i % 2 == 0 ? "tbl1" : "tbl2";
         $i++;
         echo "<tr>\n<td class='{$row_color}'><label><input type='checkbox' name='rem_check_mark[]' value='" . $data['user_id'] . "' /> " . $data['user_name'] . "</td>\n<td align='right' width='1%' class='{$row_color}' style='white-space:nowrap'>" . getuserlevel($data['user_level']) . "</label></td>\n</tr>";
     }
     echo "<tr>\n<td colspan='2' class='tbl1'>\n";
     echo "<div class='btn-group'>\n";
     echo "<a class='btn btn-primary' href='#' onclick=\"javascript:setChecked('rem_users_form','rem_check_mark[]',1);return false;\">" . $locale['448'] . "</a>\n";
     echo "<a class='btn btn-primary' href='#' onclick=\"javascript:setChecked('rem_users_form','rem_check_mark[]',0);return false;\">" . $locale['449'] . "</a>\n";
     echo "</div>\n";
     echo "</td>\n</tr>\n<tr>\n<td align='center' colspan='3' class='tbl'>\n";
     echo form_button($locale['461'], 'remove_sel', 'remove_sel', $locale['461'], array('class' => 'btn-primary m-r-10'));
     echo form_button($locale['462'], 'remove_all', 'remove_all', $locale['462'], array('class' => 'btn-primary'));
     echo "</td>\n</tr>\n";
 } else {
     echo "<tr>\n<td align='center' colspan='2' class='tbl1'>" . $locale['463'] . "</td>\n</tr>\n";
 }
 echo "</table>\n</form>\n";
 if ($rows > 20) {
Beispiel #20
0
 function renderMods($image = 1, $text = 1)
 {
     global $data, $mod_groups, $settings;
     if ($data['user_level'] >= 102) {
         echo $settings['forum_ranks'] ? show_forum_rank($data['user_posts'], $data['user_level'], $image, $text) : getuserlevel($data['user_level']);
     } else {
         foreach ($mod_groups as $mod_group) {
             $is_mod = false;
             if (!$is_mod && preg_match("(^\\.{$mod_group}\$|\\.{$mod_group}\\.|\\.{$mod_group}\$)", $data['user_groups'])) {
                 $is_mod = true;
             }
         }
         if ($settings['forum_ranks']) {
             echo $is_mod ? show_forum_rank($data['user_posts'], 104, $image, $text) : show_forum_rank($data['user_posts'], $data['user_level'], $image, $text);
         } else {
             echo $is_mod ? $locale['user1'] : getuserlevel($data['user_level']);
         }
     }
 }
Beispiel #21
0
         echo "<a href='" . FUSION_SELF . $aidlink . "'>" . $locale['419'] . "</a>\n</td>\n</tr>\n</table>\n";
     }
 }
 closetable();
 opentable($locale['420']);
 $i = 0;
 $result = dbquery("SELECT user_id, user_name, user_rights, user_level FROM " . DB_USERS . " WHERE user_level>='102' ORDER BY user_level DESC, user_name");
 echo "<table cellpadding='0' cellspacing='1' width='450' class='tbl-border center'>\n<tr>\n";
 echo "<td class='tbl2'>" . $locale['421'] . "</td>\n";
 echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'>" . $locale['422'] . "</td>\n";
 echo "<td align='center' width='1%' class='tbl2' style='white-space:nowrap'>" . $locale['423'] . "</td>\n";
 echo "</tr>\n";
 while ($data = dbarray($result)) {
     $row_color = $i % 2 == 0 ? "tbl1" : "tbl2";
     echo "<tr>\n<td class='{$row_color}'><span title='" . ($data['user_rights'] ? str_replace(".", " ", $data['user_rights']) : "" . $locale['425'] . "") . "' style='cursor:hand;'>" . $data['user_name'] . "</span></td>\n";
     echo "<td align='center' width='1%' class='{$row_color}' style='white-space:nowrap'>" . getuserlevel($data['user_level']) . "</td>\n";
     echo "<td align='center' width='1%' class='{$row_color}' style='white-space:nowrap'>\n";
     if ($data['user_level'] == "103" && $userdata['user_id'] == "1") {
         $can_edit = true;
     } elseif ($data['user_level'] != "103") {
         $can_edit = true;
     } else {
         $can_edit = false;
     }
     if ($can_edit == true && $data['user_id'] != "1") {
         echo "<a href='" . FUSION_SELF . $aidlink . "&amp;edit=" . $data['user_id'] . "'>" . $locale['426'] . "</a> |\n";
         echo "<a href='" . FUSION_SELF . $aidlink . "&amp;remove=" . $data['user_id'] . "' onclick=\"return confirm('" . $locale['460'] . "');\">" . $locale['427'] . "</a>\n";
     }
     echo "</td>\n</tr>\n";
     $i++;
 }
Beispiel #22
0
             echo "<a class='btn button btn-sm btn-default dropdown-toggle' data-toggle='dropdown'>\n<span class='caret'></span><span class='sr-only'>Toggle Dropdown</span></a>\n";
             echo "<ul class='dropdown-menu text-left' role='action-menu'>\n";
             echo "<li><a href='{$ban_link}'>" . getsuspension(1, TRUE) . "</a></li>\n";
             echo "<li><a href='{$suspend_link}'>" . getsuspension(3, TRUE) . "</a></li>\n";
             echo "<li><a href='{$cancel_link}'>" . getsuspension(5, TRUE) . "</a></li>\n";
             echo "<li><a href='{$anon_link}'>" . getsuspension(6, TRUE) . "</a></li>\n";
             echo "<li><a href='{$deac_link}'>" . getsuspension(7, TRUE) . "</a></li>\n";
             echo "<li><a href='{$inac_link}'>" . getsuspension(8, TRUE) . "</a></li>\n";
             echo "</ul>\n";
             echo "</div>\n";
         }
         echo "</div>\n";
         echo "</div>\n";
         echo "<div class='overflow-hide'>\n";
         echo "<a class='strong display-inline-block' href='" . FUSION_SELF . $aidlink . "&amp;step=view&amp;user_id=" . $data['user_id'] . "'>" . $data['user_name'] . "</a>\n";
         echo "<br/><span class='text-smaller'>" . getuserlevel($data['user_level']) . "</span>\n";
         echo "</div>\n";
         echo "</div>\n";
         $i++;
     }
     echo "</div>\n";
 } else {
     if (isset($_GET['search_text']) && preg_check("/^[-0-9A-Z_@\\s]+\$/i", $_GET['search_text'])) {
         echo "<div class='well' style='text-align:center'><br />" . sprintf($locale['411'], $status == 0 ? "" : getsuspension($status)) . $locale['413'] . "'" . stripinput($_GET['search_text']) . "'<br /><br />\n</div>\n";
     } else {
         echo "<div class='well' style='text-align:center'><br />" . sprintf($locale['411'], $status == 0 ? "" : getsuspension($status)) . ($_GET['sortby'] == "all" ? "" : $locale['412'] . $_GET['sortby']) . ".<br /><br />\n</div>\n";
     }
 }
 echo "<hr/>\n";
 $alphanum = array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9");
 echo "<table class='table table-responsive table-striped center'>\n<tr>\n";