function _myu_user_dropdown()
{
    global $user;
    global $language;
    $items = array();
    if ($user->uid === 0) {
        $login_link = l('<span>' . t('Login') . '</span>', '', array('attributes' => array('class' => 'login dropdown-toggle', 'data-toggle' => 'modal'), 'fragment' => 'login', 'external' => TRUE, 'html' => TRUE));
        return '<ul class="menu nav navbar-nav user"><li class="dropdown dropdown-user">' . $login_link . '</li></ul>';
    } else {
        $username = '';
        if (!empty($user->picture)) {
            $fid = $user->picture;
            $file = file_load($fid);
            $username = theme('image_style', array('path' => $file->uri, 'style_name' => '29x29', 'attributes' => array('class' => 'img-circle')));
        }
        $username .= '<span class="username username-hide-on-mobile">' . format_username($GLOBALS['user']) . '</span><i class="fa fa-angle-down"></i>';
        $username_link = l($username, 'javascript:;', array('html' => TRUE, 'language' => $language, 'external' => TRUE, 'attributes' => array('class' => 'dropdown-toggle', 'data-close-others' => 'true', 'data-hover' => 'dropdown', 'data-toggle' => 'dropdown')));
        $user_menu = menu_tree('user-menu');
        foreach ($user_menu as $menu_link) {
            if (isset($menu_link['#original_link'])) {
                $items[] = l($menu_link['#original_link']['title'], $menu_link['#original_link']['href'], array('language' => $language));
            }
        }
        $user_menu_list = theme('item_list', array('items' => $items, 'type' => 'ul', 'attributes' => array('class' => 'dropdown-menu dropdown-menu-default')));
        return '<ul class="menu nav navbar-nav user"><li class="dropdown dropdown-user">' . $username_link . $user_menu_list . '</li></ul>';
    }
}
/**
 * Format submitted by in articles
 */
function simpleclean_preprocess_node(&$vars)
{
    $node = $vars['node'];
    $vars['date'] = format_date($node->created, 'custom', 'd M Y');
    if (variable_get('node_submitted_' . $node->type, TRUE)) {
        $vars['display_submitted'] = TRUE;
        $vars['submitted'] = t('By @username on !datetime', array('@username' => strip_tags(theme('username', array('account' => $node))), '!datetime' => $vars['date']));
        $vars['user_picture'] = theme_get_setting('toggle_node_user_picture') ? theme('user_picture', array('account' => $node)) : '';
        // Add a footer for post
        $account = user_load($vars['node']->uid);
        $vars['simpleclean_postfooter'] = '';
        if (!empty($account->signature)) {
            $postfooter = "<div class='post-footer'>" . $vars['user_picture'] . "<h3>" . check_plain(format_username($account)) . "</h3>";
            $cleansignature = strip_tags($account->signature);
            $postfooter .= "<p>" . check_plain($cleansignature) . "</p>";
            $postfooter .= "</div>";
            $vars['simpleclean_postfooter'] = $postfooter;
        }
    } else {
        $vars['display_submitted'] = FALSE;
        $vars['submitted'] = '';
        $vars['user_picture'] = '';
    }
    // Remove Add new comment from teasers on frontpage
    if ($vars['is_front']) {
        unset($vars['content']['links']['comment']['#links']['comment-add']);
        unset($vars['content']['links']['comment']['#links']['comment_forbidden']);
    }
}
Beispiel #3
0
/**
 * Implement hook_preprocess_page()
 */
function adminlte_preprocess_page(&$vars, $hook)
{
    global $user;
    global $base_url;
    $vars['front_page'] = $base_url;
    $theme_path = drupal_get_path('theme', 'adminlte');
    // Fontawesome 4.5.0
    drupal_add_css('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css', array('type' => 'external', 'scope' => 'header'));
    // Ionicons 2.0.1
    drupal_add_css('https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css', array('type' => 'external', 'scope' => 'header'));
    // jQuery 2.2.3
    drupal_add_js($theme_path . '/plugins/jQuery/jQuery-2.2.3.min.js', array('type' => 'file', 'scope' => 'footer'));
    // Bootstrap 3.3.5
    drupal_add_js($theme_path . '/bootstrap/js/bootstrap.min.js', array('type' => 'file', 'scope' => 'footer'));
    // jQuery UI
    drupal_add_js('https://code.jquery.com/ui/1.11.4/jquery-ui.min.js', array('type' => 'external', 'scope' => 'footer'));
    // FastClick
    drupal_add_js($theme_path . '/plugins/fastclick/fastclick.min.js', array('type' => 'file', 'scope' => 'footer'));
    // AdminLTE App
    drupal_add_js($theme_path . '/dist/js/app.min.js', array('type' => 'file', 'scope' => 'footer'));
    // Moment
    drupal_add_js('https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.2/moment.min.js', array('type' => 'external', 'scope' => 'footer'));
    // Fullcalendar
    drupal_add_js($theme_path . '/plugins/fullcalendar/fullcalendar.min.js', array('type' => 'file', 'scope' => 'footer'));
    // Additional js for theme.
    drupal_add_js($theme_path . '/assets/js/script.js', array('type' => 'file', 'scope' => 'footer'));
    $vars['logout'] = '/user/logout';
    $vars['profile'] = 'user/' . $user->uid;
    $roles = end($user->roles);
    $vars['role'] = ucfirst($roles);
    reset($user->roles);
    // Check if user is login
    if (user_is_logged_in()) {
        $account = user_load($user->uid);
        $avatar_uri = drupal_get_path('theme', 'adminlte') . '/img/avatar.png';
        $alt = t("@user's picture", array('@user' => format_username($user)));
        // Display profile picture.
        if (!empty($account->picture)) {
            $user_picture = theme('image_style', array('style_name' => 'thumbnail', 'path' => $account->picture->uri, 'alt' => $alt, 'title' => $alt, 'attributes' => array('class' => 'img-circle')));
            $user_picture_m = theme('image_style', array('style_name' => 'thumbnail', 'path' => $account->picture->uri, 'alt' => $alt, 'title' => $alt, 'attributes' => array('class' => 'user-image')));
        } else {
            $user_picture_config = array('style_name' => 'thumbnail', 'path' => $avatar_uri, 'alt' => $alt, 'title' => $alt, 'attributes' => array('class' => 'img-circle'));
            $user_picture_m_config = array('style_name' => 'thumbnail', 'path' => $avatar_uri, 'alt' => $alt, 'title' => $alt, 'attributes' => array('class' => 'user-image'));
            $user_picture = adminlte_image_style($user_picture_config);
            $user_picture_m = adminlte_image_style($user_picture_m_config);
        }
        // Assign profile picture in variables.
        $vars['avatar'] = $user_picture;
        $vars['avatarsm'] = $user_picture_m;
        // Display history of member.
        $vars['history'] = 'Member for ' . format_interval(time() - $user->created);
        // Display username or you can change this to set the fullname of user login.
        $vars['fullname'] = $account->name;
    }
}
Beispiel #4
0
/**
 * Implements theme_preprocess_page().
 */
function townsquare_bootstrap_preprocess_page(&$vars)
{
    global $user;
    $vars['primary_local_tasks'] = menu_primary_local_tasks();
    $vars['secondary_local_tasks'] = menu_secondary_local_tasks();
    // The following menu stuff is lame
    foreach ($vars['main_menu'] as $item => $options) {
        $vars['main_menu'][$item]['html'] = TRUE;
        $vars['main_menu'][$item]['attributes']['id'] = 'menu-link-' . drupal_clean_css_identifier($options['href']);
    }
    $admin_menu = menu_tree_all_data('management');
    $children = array_pop($admin_menu);
    if ($children) {
        foreach ($children['below'] as $key => $value) {
            $children['below'][$key]['below'] = array();
        }
        $vars['admin_menu'] = menu_tree_output($children['below']);
    }
    // Add user picture if logged in
    if ($user->uid) {
        $vars['user_name'] = check_plain($user->name);
        if (!empty($user->picture)) {
            if (is_numeric($user->picture)) {
                $user->picture = file_load($user->picture);
            }
            if (!empty($user->picture->uri)) {
                $filepath = $user->picture->uri;
            }
        } elseif (variable_get('user_picture_default', '')) {
            $filepath = variable_get('user_picture_default', '');
        }
        if (isset($filepath)) {
            $alt = t("@user's picture", array('@user' => format_username($user)));
            if (module_exists('image') && file_valid_uri($filepath) && ($style = variable_get('user_picture_style', ''))) {
                $vars['user_picture'] = theme('image_style', array('style_name' => $style, 'path' => $filepath, 'alt' => $alt, 'title' => $alt));
            } else {
                $vars['user_picture'] = theme('image', array('path' => $filepath, 'alt' => $alt, 'title' => $alt));
            }
        } else {
            $vars['user_picture'] = '<i class="icon-user"></i>';
        }
    } else {
        unset($vars['secondary_menu']);
        $vars['login'] = drupal_get_form('user_login_block');
    }
    // Add Bootstrap
    $path = libraries_get_path('bootstrap');
    drupal_add_css($path . '/css/bootstrap.css');
    drupal_add_css($path . '/css/bootstrap-responsive.css');
    drupal_add_js($path . '/js/bootstrap.js');
    $path = libraries_get_path('font-awesome');
    drupal_add_css($path . '/css/font-awesome.css');
}
Beispiel #5
0
function nesi_bootstrap_menu_tree__menu_researcher_menu($variables)
{
    global $user;
    $user_data = user_load($user->uid);
    $output = '';
    $output .= '<ul id="user-menu" class="menu nav dropdown">';
    $output .= '<li>';
    $output .= '<a href="#" class="dropdown-toggle" data-toggle="dropdown" data-target="#">' . format_username($user_data) . '<span class="caret"></span></a>';
    $output .= '<ul class="dropdown-menu">' . $variables['tree'] . '</ul>';
    $output .= '</li>';
    $output .= '</ul>';
    return $output;
}
 /**
  * {@inheritDoc}
  * @see ReactComponentInterface::defaultDatas()
  */
 public function defaultDatas($route)
 {
     global $user, $pager_page_array, $pager_total;
     $pager_element = 0;
     $options = $this->getOptions();
     $node = node_load($options['nid']);
     $data_model = $this->dataModel($route);
     $datas = array('user' => $data_model['user'], 'comments' => array());
     if ($user->uid) {
         $datas['user']['uid'] = $user->uid;
         $datas['user']['name'] = format_username($user);
         $datas['user']['url'] = url('user/' . $user->uid);
     }
     if ($options['pager']) {
         $page = isset($_GET['offset']) ? round($_GET['offset'] / $options['limit']) : 0;
         $datas['pager'] = array('total' => $pager_total[$pager_element], 'current' => $pager_page_array[$pager_element] + 1, 'visiblePages' => 3, 'limit' => $options['limit']);
     }
     $datas['user']['deleteAccess'] = user_access('administer comments') && user_access('post comments');
     $datas['user']['editAccess'] = user_access('administer comments') && user_access('post comments') || comment_access('edit', $comment) && user_access('post comments');
     $datas['user']['postAccess'] = $node->comment == COMMENT_NODE_OPEN && (user_access('administer comments') || user_access('post comments'));
     $datas['user']['moderateAccess'] = user_access('administer comments') && user_access('post comments');
     $datas['user']['postWithoutApprovalAccess'] = user_access('administer comments') && user_access('post comments') || user_access('skip comment approval');
     $comments = array();
     foreach ($this->elements() as $comment) {
         $data = $data_model['comment'];
         $data['body'] = $comment->comment_body[LANGUAGE_NONE][0]['value'];
         $data['author'] = $comment->name;
         if (!empty($comment->uid)) {
             $author = user_load($comment->uid);
             if (is_object($author)) {
                 $data['author'] = format_username($author);
                 $data['authorURL'] = url('user/' . $author->uid);
             }
         }
         $data['subject'] = $comment->subject;
         $data['pid'] = $comment->pid;
         $data['body'] = $comment->comment_body[LANGUAGE_NONE][0]['value'];
         $data['id'] = $comment->cid;
         $data['new'] = $comment->new != MARK_READ ? 1 : 0;
         $data['date'] = $date = !empty($comment->date) ? $comment->date : format_date($comment->created, 'custom', 'Y-m-d H:i O');
         $data['status'] = $comment->status == COMMENT_NOT_PUBLISHED ? 0 : 1;
         $comments[$comment->cid] = $data;
     }
     $result = $this->_sortCommentsChildrens($comments);
     $datas['comments'] = $result;
     return $datas;
 }
function _bootstrap_theme_get_participants_html($participants)
{
    global $user;
    if (!empty($participants)) {
        $participants = _privatemsg_generate_user_array($participants);
    } else {
        $participants = array($user);
    }
    $output = '';
    foreach ($participants as $account) {
        if (!empty($output)) {
            $output .= ', ';
        }
        $output .= '<a href="' . url('user/' . $account->uid) . '">' . format_username($account) . '</a>';
    }
    return $output;
}
 /**
  * {@inheritdoc}
  */
 public function parse(ContextInterface $context, InlineParserContext $inline_context)
 {
     $cursor = $inline_context->getCursor();
     // The @ symbol must not have any other characters immediately prior.
     $previous_char = $cursor->peek(-1);
     if ($previous_char !== NULL && $previous_char !== ' ') {
         // peek() doesn't modify the cursor, so no need to restore state first.
         return FALSE;
     }
     // Save the cursor state in case we need to rewind and bail.
     $previous_state = $cursor->saveState();
     // Advance past the @ symbol to keep parsing simpler.
     $cursor->advance();
     // Parse the handle.
     $text = $cursor->match('/^[^\\s]+/');
     $url = '';
     $title = '';
     $type = $this->getSetting('type');
     if ($type === 'user') {
         $user = user_load_by_name($text);
         if ((!$user || !$user->uid) && is_numeric($text)) {
             $user = user_load((int) $text);
         }
         if ($user && $user->uid) {
             $url = url("user/{$user->uid}", ['absolute' => TRUE]);
             $title = t('View user profile.');
             if ($this->getSetting('format_username')) {
                 $text = format_username($user);
             }
         } else {
             $text = FALSE;
         }
     } elseif ($type === 'url' && ($url = $this->getSetting('url')) && strpos($url, '[text]') !== FALSE) {
         $url = str_replace('[text]', $text, $url);
     } else {
         $text = FALSE;
     }
     // Regex failed to match; this isn't a valid @ handle.
     if (empty($text) || empty($url)) {
         $cursor->restoreState($previous_state);
         return FALSE;
     }
     $inline_context->getInlines()->add(new Link($url, '@' . $text, $title));
     return TRUE;
 }
Beispiel #9
0
function submit_preview($subject, $abstract, $article, $section)
{
    global $allowed_html, $theme, $user;
    include "includes/story.inc";
    $output .= "<FORM ACTION=\"submit.php\" METHOD=\"post\">\n";
    $output .= "<B>" . t("Your name") . ":</B><BR>\n";
    $output .= format_username($user->userid) . "<P>";
    $output .= "<B>" . t("Subject") . ":</B><BR>\n";
    $output .= "<INPUT TYPE=\"text\" NAME=\"subject\" SIZE=\"50\" MAXLENGTH=\"60\" VALUE=\"" . check_textfield($subject) . "\"><P>\n";
    $output .= "<B>" . t("Section") . ":</B><BR>\n";
    foreach ($sections = section_get() as $value) {
        $options .= "  <OPTION VALUE=\"{$value}\"" . ($section == $value ? " SELECTED" : "") . ">{$value}</OPTION>\n";
    }
    $output .= "<SELECT NAME=\"section\">{$options}</SELECT><P>\n";
    $output .= "<B>" . t("Abstract") . ":</B><BR>\n";
    $output .= "<TEXTAREA WRAP=\"virtual\" COLS=\"50\" ROWS=\"10\" NAME=\"abstract\">" . check_textarea($abstract) . "</TEXTAREA><BR>\n";
    $output .= "<SMALL><I>" . t("Allowed HTML tags") . ": " . htmlspecialchars($allowed_html) . ".</I></SMALL><P>\n";
    $output .= "<B>" . t("Extended story") . ":</B><BR>\n";
    $output .= "<TEXTAREA WRAP=\"virtual\" COLS=\"50\" ROWS=\"15\" NAME=\"article\">" . check_textarea($article) . "</TEXTAREA><BR>\n";
    $output .= "<SMALL><I>" . t("Allowed HTML tags") . ": " . htmlspecialchars($allowed_html) . ".</I></SMALL><P>\n";
    $duplicate = db_result(db_query("SELECT COUNT(id) FROM stories WHERE subject = '" . check_input($subject) . "'"));
    if (empty($subject)) {
        $output .= "<FONT COLOR=\"red\">" . t("Warning: you did not supply a subject.") . "</FONT><P>\n";
        $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"" . t("Preview submission") . "\">\n";
    } else {
        if (empty($abstract)) {
            $output .= "<FONT COLOR=\"red\">" . t("Warning: you did not supply an abstract.") . "</FONT><P>\n";
            $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"" . t("Preview submission") . "\">\n";
        } else {
            if ($duplicate) {
                $output .= "<FONT COLOR=\"red\">" . t("Warning: there is already a story with that subject.") . "</FONT><P>\n";
                $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"" . t("Preview submission") . "\">\n";
            } else {
                $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"" . t("Preview submission") . "\">\n";
                $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"" . t("Submit submission") . "\">\n";
            }
        }
    }
    $output .= "</FORM>\n";
    $theme->header();
    $theme->story(new Story($user->userid, $subject, $abstract, $article, $section, time()), "[ " . t("reply to this story") . " ]");
    $theme->box(t("Submit a story"), $output);
    $theme->footer();
}
function _bootstrap_theme_pending_approval_reported_contents()
{
    $header = array('Contribution Data');
    $rows = array();
    foreach (bootstrap_theme_get_contributions(NODE_NOT_PUBLISHED) as $contribution) {
        $contribution = node_load($contribution->nid);
        $collection = node_load($contribution->og_group_ref[$contribution->language][0]['target_id']);
        $row = array();
        $html = '';
        $html .= '<div class="ctb-title"><a href="' . url('node/' . $collection->nid) . '">' . $collection->title . ': <a href="' . url('node/' . $contribution->nid) . '">' . $contribution->title . '</a></div>';
        $html .= '<div class="ctb-added">' . date('F d Y', $contribution->created) . ' by ' . '<a href="' . url('user/' . $contribution->uid) . '" class="ctb-author">' . format_username(user_load($contribution->uid)) . '</a>' . '</div>';
        $html .= '<div class="ctb-desc">' . $contribution->body[$contribution->language][0]['value'] . '...</div>';
        $row[] = array('data' => $html);
        $rows[] = $row;
    }
    $output = theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('class' => array('data-table-reported-contents'))));
    $output .= theme('pager');
    return $output;
}
print $attributes;
?>
>
<?php 
$account = menu_get_object('user');
$r_profile = profile2_load_by_user($account->uid);
?>
  <div class="module-wrapper module-wrapper-first">
    <h2>Account information</h2>
    <div class="module module-account">
      <div class="account-photo"><?php 
print render($user_profile['user_picture']);
?>
</div>
      <div class="account-name"><?php 
print format_username($account);
?>
</div>
      <div class="account-mail"><?php 
print $account->mail;
?>
</div>
      <div class="account-history"><?php 
print render($user_profile['summary']['member_for']);
?>
</div>
    </div>
  </div>

  <div class="module-wrapper">
    <h2>Researcher information</h2>
Beispiel #12
0
$pager = pager($perpage, $count1, 'admin.php?action=shistory&amp;');
$res = sql_query("SELECT s.id, s.userid, s.date , s.text, s.to_user, u.username, u.pirate, u.king, u.enabled, u.class, u.donor, u.warned, u.leechwarn, u.chatpost FROM shoutbox as s LEFT JOIN users as u ON s.userid=u.id ORDER BY s.date DESC " . $pager['limit'] . "") or sqlerr(__FILE__, __LINE__);
if ($count1 > $perpage) {
    $HTMLOUT .= $pager['pagertop'];
}
$HTMLOUT .= begin_main_frame();
if (mysql_num_rows($res) == 0) {
    $HTMLOUT .= "No shouts here";
} else {
    $HTMLOUT .= "<table align='center' border='0' cellspacing='0' cellpadding='2' width='100%' class='small'>\n";
    while ($arr = mysql_fetch_assoc($res)) {
        if ($arr['to_user'] != $CURUSER['id'] && $arr['to_user'] != 0 && $arr['userid'] != $CURUSER['id']) {
            continue;
        }
        if ($arr['to_user'] == $CURUSER['id'] || $arr['userid'] == $CURUSER['id'] && $arr['to_user'] != 0) {
            $private = "<img src='{$TBDEV['pic_base_url']}private-shout.png' alt='Private shout' title='Private shout!' width='16' style='padding-left:2px;padding-right:2px;' border='0' />";
        } else {
            $private = "<img src='{$TBDEV['pic_base_url']}group.png' alt='Public shout' title='Public shout!' width='16' style='padding-left:2px;padding-right:2px;' border='0' />";
        }
        $date = get_date($arr["date"], 0, 1);
        $user_stuff = $arr;
        $user_stuff['id'] = $arr['userid'];
        $HTMLOUT .= "<tr style='background-color:grey;'><td><span class='size1' style='color:white; '>[{$date}]&nbsp;[{$private}]</span>\n " . format_username($user_stuff) . "<span class='size2' style='color:white;'> " . format_comment($arr["text"]) . "\n</span></td></tr>\n";
    }
    $HTMLOUT .= "</table>";
}
if ($count1 > $perpage) {
    $HTMLOUT .= $pager['pagerbottom'];
}
$HTMLOUT .= end_main_frame();
print stdhead('Shout History') . $HTMLOUT . stdfoot();
Beispiel #13
0
        foreach ($shouts as $arr) {
            if ($arr['to_user'] != $CURUSER['id'] && $arr['to_user'] != 0 && $arr['userid'] != $CURUSER['id']) {
                continue;
            }
            $private = '';
            if ($arr['to_user'] == $CURUSER['id'] && $arr['to_user'] > 0) {
                $private = "<a href=\"javascript:private_reply('" . htmlsafechars($arr['username']) . "')\"><img src=\"{$INSTALLER09['pic_base_url']}private-shout.png\" alt=\"Private shout\" title=\"Private shout! click to reply to " . htmlsafechars($arr['username']) . "\" width=\"16\" style=\"padding-left:2px;padding-right:2px;\" border=\"0\" /></a>";
            }
            $edit = $CURUSER['class'] >= UC_STAFF || $arr['userid'] == $CURUSER['id'] && ($CURUSER['class'] >= UC_POWER_USER && $CURUSER['class'] <= UC_STAFF) ? "<a href='{$INSTALLER09['baseurl']}/shoutbox.php?edit=" . (int) $arr['id'] . "&amp;user="******"'><img src='{$INSTALLER09['pic_base_url']}button_edit2.gif' border='0' alt=\"Edit Shout\"  title=\"Edit Shout\" /></a> " : "";
            $del = $CURUSER['class'] >= UC_STAFF ? "<a href='./shoutbox.php?del=" . (int) $arr['id'] . "'><img src='{$INSTALLER09['pic_base_url']}button_delete2.gif' border='0' alt=\"Delete Single Shout\" title=\"Delete Single Shout\" /></a> " : "";
            $delall = $CURUSER['class'] == UC_MAX ? "<a href='./shoutbox.php?delall' onclick=\"confirm_delete(); return false;\"><img src='{$INSTALLER09['pic_base_url']}del.png' border='0' alt=\"Empty Shout\" title=\"Empty Shout\" /></a> " : "";
            //$delall
            $pm = $CURUSER['id'] != $arr['userid'] ? "<span class='date' style=\"color:{$dtcolor}\"><a target='_blank' href='./pm_system.php?action=send_message&amp;receiver=" . (int) $arr['userid'] . "'><img src='{$INSTALLER09['pic_base_url']}button_pm2.gif' border='0' alt=\"Pm User\" title=\"Pm User\" /></a></span>\n" : "";
            $date = get_date($arr["date"], 0, 1);
            $reply = $CURUSER['id'] != $arr['userid'] ? "<a href=\"javascript:window.top.SmileIT('[b][i]=>&nbsp;[color=#" . get_user_class_color($arr['class']) . "]" . ($arr['perms'] & bt_options::PERMS_STEALTH ? "UnKnown" : htmlsafechars($arr['username'])) . "[/color]&nbsp;-[/i][/b]','shbox','shbox_text')\"><img height='10' src='{$INSTALLER09['pic_base_url']}reply.gif' title='Reply' alt='Reply' style='border:none;' /></a>" : "";
            $user_stuff = $arr;
            $user_stuff['id'] = $arr['perms'] & bt_options::PERMS_STEALTH ? "" . ($user_stuff['id'] = $INSTALLER09['bot_id'] . "") : "" . ($user_stuff['id'] = (int) $arr['userid'] . "");
            $user_stuff['username'] = $arr['perms'] & bt_options::PERMS_STEALTH ? "" . ($user_stuff['username'] = '******' . "") : "" . ($user_stuff['username'] = htmlsafechars($arr['username']) . "");
            $HTMLOUT .= "<tr style='background-color:{$bg};'><td><span class='size1' style='color:{$fontcolor};'>[{$date}]</span>\n{$del}{$edit}{$pm}{$reply}{$private} " . format_username($user_stuff, true) . "<span class='size2' style='color:{$fontcolor};'>" . format_comment($arr["text"]) . "\n</span></td></tr>\n";
        }
        $HTMLOUT .= "</table>";
    } else {
        //== If there are no shouts
        if (empty($shouts)) {
            $HTMLOUT .= "<tr style='background-color:{$bg};'><td><span class='size1' style='color:{$fontcolor};'>No shouts here</span></td></tr>\n";
        }
        $HTMLOUT .= "</table>";
    }
}
$HTMLOUT .= "</body></html>";
echo $HTMLOUT;
Beispiel #14
0
                     $HTMLOUT .= "<p>Saved.</p>\n";
                     header("Refresh: 2; url=staffpanel.php?tool=events");
                 }
             }
         }
     }
 }
 if ($count1 > $perpage) {
     $HTMLOUT .= $pager['pagertop'];
 }
 $HTMLOUT .= "<p><strong> Events Schedular </strong> (eZERO) - <strong> <font color='red'>BETA</font> </strong> </p>\n<form action='' method='post'>\n<table width='80%' cellpadding='6'>\n<tr><th>User</th><th>Text</th><th>Start</th><th>End</th><th>Freeleech?</th><th>DUpload?</th><th>halfdownload?</th><th>Show Dates?</th><th>&nbsp;</th></tr>";
 foreach ($scheduled_events as $scheduled_event) {
     $id = (int) $scheduled_event['id'];
     $users = $scheduled_event;
     $users['id'] = (int) $scheduled_event['userid'];
     $username = format_username($users);
     $text = htmlsafechars($scheduled_event['overlayText']);
     $start = get_date((int) $scheduled_event['startTime'], 'DATE');
     $end = get_date((int) $scheduled_event['endTime'], 'DATE');
     $freeleech = (bool) (int) $scheduled_event['freeleechEnabled'];
     $doubleUpload = (bool) (int) $scheduled_event['duploadEnabled'];
     $halfdownload = (bool) (int) $scheduled_event['hdownEnabled'];
     if ($freeleech) {
         $freeleech = "<img src=\"{$INSTALLER09['pic_base_url']}on.gif\" alt=\"Freeleech Enabled\" title=\"Enabled\" />";
     } else {
         $freeleech = "<img src=\"{$INSTALLER09['pic_base_url']}off.gif\" alt=\"Freeleech Disabled\" title=\"Disabled\" />";
     }
     if ($doubleUpload) {
         $doubleUpload = "<img src=\"{$INSTALLER09['pic_base_url']}on.gif\" alt=\"Double Upload Enabled\" title=\"Enabled\" />";
     } else {
         $doubleUpload = "<img src=\"{$INSTALLER09['pic_base_url']}off.gif\" alt=\"Double Upload Disabled\" title=\"Disabled\" />";
Beispiel #15
0
		<tr class="colhead">
			<td>User</td>
			<td>IP</td>
			<td>Dupes</td>
			<td>Registered</td>
		</tr>
<?
	while(list($UserID, $IP, $Username, $PermissionID, $Enabled, $Donor, $Warned, $Joined, $Uses)=$DB->next_record()) {
	$Row = ($Row == 'b') ? 'a' : 'b';
?>
		<tr class="row<?php 
echo $Row;
?>
">
			<td><?php 
echo format_username($UserID, $Username, $Donor, $Warned, $Enabled, $PermissionID);
?>
</td>
			<td><span style="float:left;"><?php 
echo display_str($IP);
?>
</span><span style="float:right;">[<a href="userhistory.php?action=ips&amp;userid=<?php 
echo $UserID;
?>
" title="History">H</a>|<a href="user.php?action=search&amp;ip_history=on&amp;ip=<?php 
echo display_str($IP);
?>
" title="Search">S</a>]</span></td>
			<td><?php 
echo display_str($Uses);
?>
Beispiel #16
0
    if (!empty($_POST["desact"])) {
        sql_query("UPDATE users SET enabled = 'no' WHERE id IN (" . implode(", ", array_map("sqlesc", $_POST["desact"])) . ")") or sqlerr(__FILE__, __LINE__);
    }
}
$HTMLOUT .= "<div class='row'><div class='col-md-12'>";
$HTMLOUT .= "<h2>{$lang['cheaters_users']}</h2>";
$res = sql_query("SELECT COUNT(*) FROM cheaters") or sqlerr(__FILE__, __LINE__);
$row = mysqli_fetch_array($res);
$count = $row[0];
$perpage = 15;
$pager = pager($perpage, $count, "staffpanel.php?tool=cheaters&amp;action=cheaters&amp;");
$HTMLOUT .= "<form action='staffpanel.php?tool=cheaters&amp;action=cheaters' method='post'>\n<script type='text/javascript'>\n/*<![CDATA[*/\nfunction klappe(id)\n{var klappText=document.getElementById('k'+id);var klappBild=document.getElementById('pic'+id);if(klappText.style.display=='none'){klappText.style.display='block';}\nelse{klappText.style.display='none';}}\nfunction klappe_news(id)\n{var klappText=document.getElementById('k'+id);var klappBild=document.getElementById('pic'+id);if(klappText.style.display=='none'){klappText.style.display='block';klappBild.src='{$INSTALLER09['pic_base_url']}minus.gif';}\nelse{klappText.style.display='none';klappBild.src='{$INSTALLER09['pic_base_url']}plus.gif';}}\t\n</script>\n<script type='text/javascript'>\nvar checkflag = 'false';\nfunction check(field) {\nif (checkflag == 'false') {\nfor (i = 0; i < field.length; i++) {\nfield[i].checked = true;}\ncheckflag = 'true';\nreturn 'Uncheck All Disable'; }\nelse {\nfor (i = 0; i < field.length; i++) {\nfield[i].checked = false; }\ncheckflag = 'false';\nreturn 'Check All Disable'; }\n}\nfunction check2(field) {\nif (checkflag == 'false') {\nfor (i = 0; i < field.length; i++) {\nfield[i].checked = true;}\ncheckflag = 'true';\nreturn 'Uncheck All Remove'; }\nelse {\nfor (i = 0; i < field.length; i++) {\nfield[i].checked = false; }\ncheckflag = 'false';\nreturn 'Check All Remove'; }\n}\n/*]]>*/\n</script>";
if ($count > $perpage) {
    $HTMLOUT .= $pager['pagertop'];
}
$HTMLOUT .= "<table class='table table-bordered'>\n<tr>\n<td>#</td>\n<td>{$lang['cheaters_uname']}</td>\n<td>{$lang['cheaters_d']}</td>\n<td>{$lang['cheaters_r']}</td></tr>\n";
$res = sql_query("SELECT c.id as cid, c.added, c.userid, c.torrentid, c.client, c.rate, c.beforeup, c.upthis, c.timediff, c.userip, u.id, u.username, u.class, u.downloaded, u.uploaded, u.chatpost, u.leechwarn, u.warned, u.pirate, u.king, u.donor, u.enabled, t.id AS tid, t.name AS tname FROM cheaters AS c LEFT JOIN users AS u ON u.id=c.userid LEFT JOIN torrents AS t ON t.id=c.torrentid ORDER BY added DESC " . $pager['limit']) or sqlerr(__FILE__, __LINE__);
while ($arr = mysqli_fetch_assoc($res)) {
    $torrname = htmlsafechars(CutName($arr["tname"], 80));
    $users = $arr;
    $users['id'] = (int) $arr['userid'];
    $cheater = "<b><a href='{$INSTALLER09['baseurl']}/userdetails.php?id=" . (int) $arr['id'] . "'>" . format_username($users) . "</a></b>{$lang['cheaters_hbcc']}<br />\n    <b>{$lang['cheaters_torrent']} <a href='{$INSTALLER09['baseurl']}/details.php?id=" . (int) $arr['tid'] . "' title='{$torrname}'>{$torrname}</a></b>\n<br />{$lang['cheaters_upped']} <b>" . mksize((int) $arr['upthis']) . "</b><br />{$lang['cheaters_speed']} <b>" . mksize((int) $arr['rate']) . "/s</b><br />{$lang['cheaters_within']} <b>" . (int) $arr['timediff'] . " {$lang['cheaters_sec']}</b><br />{$lang['cheaters_uc']} <b>" . htmlsafechars($arr['client']) . "</b><br />{$lang['cheaters_ipa']} <b>" . htmlsafechars($arr['userip']) . "</b>";
    $HTMLOUT .= "<tr><td>" . (int) $arr['cid'] . "</td>\n    <td>" . format_username($users) . "<a href=\"javascript:klappe('a1" . (int) $arr['cid'] . "')\"> {$lang['cheaters_added']}" . get_date($arr['added'], 'DATE') . "</a>\n    <div id=\"ka1" . (int) $arr['cid'] . "\" style=\"display: none;\"><font color=\"black\">{$cheater}</font></div></td>\n    <td><input type=\"checkbox\" name=\"desact[]\" value=\"" . (int) $arr["id"] . "\"/></td>\n    <td><input type=\"checkbox\" name=\"remove[]\" value=\"" . (int) $arr["cid"] . "\"/></td></tr>";
}
$HTMLOUT .= "<tr>\n<td>\n<input type=\"button\" value=\"{$lang['cheaters_cad']}\" onclick=\"this.value=check(this.form.elements['desact[]'])\"/> <input type=\"button\" value=\"{$lang['cheaters_car']}\" onclick=\"this.value=check(this.form.elements['remove[]'])\"/> <input type=\"hidden\" name=\"nowarned\" value=\"nowarned\" /><input type=\"submit\" name=\"submit\" value=\"{$lang['cheaters_ac']}\" />\n</td>\n</tr>\n</table></form>";
if ($count > $perpage) {
    $HTMLOUT .= $pager['pagerbottom'];
}
$HTMLOUT .= "</div></div>";
echo stdhead($lang['cheaters_stdhead']) . $HTMLOUT . stdfoot();
die;
Beispiel #17
0
         $doubleUpload = "<img src=\"{$TBDEV['pic_base_url']}on.gif\" alt=\"Double Upload Enabled\" title=\"Enabled\" />";
     } else {
         $doubleUpload = "<img src=\"{$TBDEV['pic_base_url']}off.gif\" alt=\"Double Upload Disabled\" title=\"Disabled\" />";
     }
     if ($halfdownload) {
         $halfdownload = "<img src=\"{$TBDEV['pic_base_url']}on.gif\" alt=\"Halfdownload Enabled\" title=\"Enabled\" />";
     } else {
         $halfdownload = "<img src=\"{$TBDEV['pic_base_url']}off.gif\" alt=\"Halfdownload Disabled\" title=\"Disabled\" />";
     }
     $showdates = (bool) (int) $scheduled_event['displayDates'];
     if ($showdates) {
         $showdates = "<img src=\"{$TBDEV['pic_base_url']}on.gif\" alt=\"Showing of Dates Enabled\" title=\"Enabled\" />";
     } else {
         $showdates = "<img src=\"{$TBDEV['pic_base_url']}off.gif\" alt=\"Showing of Dates Disabled\" title=\"Disabled\" />";
     }
     $HTMLOUT .= "<tr><td align=\"center\">" . format_username($username) . "</td><td align=\"center\">{$text}</td><td align=\"center\">{$start}</td><td align=\"center\">{$end}</td><td align=\"center\">{$freeleech}</td><td align=\"center\">{$doubleUpload}</td><td align=\"center\">{$halfdownload}</td><td align=\"center\">{$showdates}</td><td align=\"center\"><input type=\"submit\" name=\"editEvent_{$id}\" value=\"Edit\" /> <input type=\"submit\" onclick=\"return checkAllGood('{$text}')\" name=\"removeEvent_{$id}\" value=\"Remove\" /></td></tr>";
 }
 $HTMLOUT .= "<tr><td colspan='9' align='right'><input type='submit' name='editEvent_-1' value='Add Event' /></td></tr></table>";
 foreach ($_POST as $key => $value) {
     if (gettype($pos = strpos($key, "_")) != 'boolean') {
         $id = (int) substr($key, $pos + 1);
         if (gettype(strpos($key, "editEvent_")) != 'boolean') {
             if ($id == -1) {
                 $HTMLOUT .= "<table>\r\n<tr><th align='right'>Userid</th><td><input type='text' name='userid' value='{$CURUSER["id"]}' /></td></tr>\r\n<tr><th align='right'>Text</th><td><input type='text' name='editText' /></td></tr>\r\n<tr><th align='right'>Start Time</th><td><input type='text' name='editStartTime' /></td></tr>\r\n<tr><th align='right'>End Time</th><td><input type='text' name='editEndTime' /></td></tr>\r\n<tr><th align='right'>Freeleech</th><td><input type='checkbox' name='editFreeleech' /></td></tr>\r\n<tr><th align='right'>DoubleUpload</th><td><input type='checkbox' name='editDoubleupload' /></td></tr>\r\n<tr><th align='right'>halfdownload</th><td><input type='checkbox' name='editHalfdownload' /></td></tr>\r\n<tr><th align='right'>Show Dates</th><td><input type='checkbox' name='editShowDates' /></td></tr>\r\n<tr><td colspan='2' align='center'><input type='submit' name='saveEvent_-1' value='Save Changes' /></td></tr>\r\n</table>";
             } else {
                 foreach ($scheduled_events as $scheduled_event) {
                     if ($id == $scheduled_event['id']) {
                         $text = $scheduled_event['overlayText'];
                         $start = get_date((int) $scheduled_event['startTime'], 'DATE');
                         $end = get_date((int) $scheduled_event['endTime'], 'DATE');
                         $freeleech = (bool) (int) $scheduled_event['freeleechEnabled'];
Beispiel #18
0
$dt = TIME_NOW - 180;
$keys['user_friends'] = 'user_friends_' . $id;
if (($users_friends = $mc1->get_value($keys['user_friends'])) === false) {
    $fr = sql_query("SELECT f.friendid as uid, f.userid AS userid, u.last_access, u.id, u.ip, u.avatar, u.username, u.class, u.donor, u.title, u.warned, u.enabled, u.chatpost, u.leechwarn, u.pirate, u.king, u.downloaded, u.uploaded, u.perms FROM friends AS f LEFT JOIN users as u ON f.friendid = u.id WHERE userid=" . sqlesc($id) . " ORDER BY username ASC LIMIT 100") or sqlerr(__FILE__, __LINE__);
    while ($user_friends = mysqli_fetch_assoc($fr)) {
        $users_friends[] = $user_friends;
    }
    $mc1->cache_value($keys['user_friends'], $users_friends, 0);
}
if (count($users_friends) > 0) {
    $user_friends = "<table width='100%' class='main' border='1' cellspacing='0' cellpadding='5'>\n" . "<tr><td class='colhead' width='20'>{$lang['userdetails_avatar']}</td><td class='colhead'>{$lang['userdetails_username']}" . ($CURUSER['class'] >= UC_STAFF ? $lang['userdetails_fip'] : "") . "</td><td class='colhead' align='center'>{$lang['userdetails_uploaded']}</td>" . ($INSTALLER09['ratio_free'] ? "" : "<td class='colhead' align='center'>{$lang['userdetails_downloaded']}</td>") . "<td class='colhead' align='center'>{$lang['userdetails_ratio']}</td><td class='colhead' align='center'>{$lang['userdetails_status']}</td></tr>\n";
    if ($users_friends) {
        foreach ($users_friends as $a) {
            $avatar = $user['opt1'] & user_options::AVATARS ? $a['avatar'] == '' ? '<img src="' . $INSTALLER09['pic_base_url'] . 'default_avatar.gif"  width="40" alt="default avatar" />' : '<img src="' . htmlsafechars($a['avatar']) . '" alt="avatar"  width="40" />' : '';
            $status = "<img style='vertical-align: middle;' src='{$INSTALLER09['pic_base_url']}" . ($a['last_access'] > $dt && $a['perms'] < bt_options::PERMS_STEALTH ? "online.png" : "offline.png") . "' border='0' alt='' />";
            $user_stuff = $a;
            $user_stuff['id'] = (int) $a['id'];
            $user_friends .= "<tr><td class='one' style='padding: 0px; border: none' width='40px'>" . $avatar . "</td><td class='one'>" . format_username($user_stuff) . "<br />" . ($CURUSER['class'] >= UC_STAFF ? "" . htmlsafechars($a['ip']) . "" : "") . "</td><td class='one' style='padding: 1px' align='center'>" . mksize($a['uploaded']) . "</td>" . ($INSTALLER09['ratio_free'] ? "" : "<td class='one' style='padding: 1px' align='center'>" . mksize($a['downloaded']) . "</td>") . "<td class='one' style='padding: 1px' align='center'>" . member_ratio($a['uploaded'], $INSTALLER09['ratio_free'] ? '0' : $a['downloaded']) . "</td><td class='one' style='padding: 1px' align='center'>" . $status . "</td></tr>\n";
        }
        $user_friends .= "</table>";
        $HTMLOUT .= "<tr><td class='rowhead' width='1%'>{$lang['userdetails_friends']}</td><td align='left' width='99%'><a href=\"javascript: klappe_news('a6')\"><img border=\"0\" src=\"pic/plus.png\" id=\"pica6" . (int) $a['uid'] . "\" alt=\"{$lang['userdetails_hide_show']}\" title=\"{$lang['userdetails_hide_show']}\" /></a><div id=\"ka6\" style=\"display: none;\"><br />{$user_friends}</div></td></tr>";
    } else {
        if (empty($users_friends)) {
            $HTMLOUT .= "<tr><td colspan='2'>{$lang['userdetails_no_friends']}</td></tr>";
        }
    }
}
//== thee end
//==end
// End Class
// End File
Beispiel #19
0
		</table>
	</form>
	<br />
	<div class="box pad center">
		<table style="width:400px;margin:0px auto;">
			<tr class="colhead">
				<td width="50%">Username</td>
				<td>Class</td>
			</tr>
<?php 
foreach ($Results as $Result) {
    list($UserID, $Username, $Enabled, $PermissionID, $Donor, $Warned) = $Result;
    ?>
			<tr>
				<td><?php 
    echo format_username($UserID, $Username, $Donor, $Warned, $Enabled == 2 ? false : true);
    ?>
</td>
				<td><?php 
    echo make_class_string($PermissionID);
    ?>
</td>
			</tr>
<?php 
}
?>
		</table>
	</div>
	<div class="linkbox">
	<?php 
echo $Pages;
Beispiel #20
0
	}
}
?>
		</td>
		<td class="body" valign="top">
			<div id="content<?php 
echo $PostID;
?>
">
<?php 
echo $Text->full_format($Body);
?>
<? if($EditedUserID){ ?>
				<br /><br />Last edited by
				<?php 
echo format_username($EditedUserID, $EditedUsername);
?>
 <?php 
echo time_diff($EditedTime);
?>
<? } ?>
			</div>
		</td>
	</tr>
</table>
<?	} ?>
		<div class="linkbox">
		<?php 
echo $Pages;
?>
		</div>
Beispiel #21
0
		cc.Body, 
		cc.UserID, 
		um.Username,
		cc.Time 
		FROM collages_comments AS cc
		LEFT JOIN users_main AS um ON um.ID=cc.UserID
		WHERE CollageID='$CollageID' 
		ORDER BY ID DESC LIMIT 15");
	$CommentList = $DB->to_array();	
}
foreach ($CommentList as $Comment) {
	list($CommentID, $Body, $UserID, $Username, $CommentTime) = $Comment;
?>
		<div class="box">
			<div class="head">By <?php 
echo format_username($UserID, $Username);
?>
 <?php 
echo time_diff($CommentTime);
?>
 <a href="reports.php?action=report&amp;type=collages_comment&amp;id=<?php 
echo $CommentID;
?>
">[Report Comment]</a></div>
			<div class="pad"><?php 
echo $Text->full_format($Body);
?>
</div>
		</div>
<?
}
Beispiel #22
0
function StatusBar()
{
    global $CURUSER, $TBDEV, $lang, $rep_is_on, $mc;
    if (!$CURUSER) {
        return "";
    }
    if (!$TBDEV['coins']) {
        $upped = mksize($CURUSER['uploaded']);
        $downed = mksize($CURUSER['downloaded']);
        $ratio = $CURUSER['downloaded'] > 0 ? $CURUSER['uploaded'] / $CURUSER['downloaded'] : 0;
        $ratio = number_format($ratio, 2);
        $color = get_ratio_color($ratio);
        if ($color) {
            $ratio = "<font color='{$color}'>{$ratio}</font>";
        }
    }
    $res1 = @sql_query("SELECT count(id) FROM messages WHERE receiver=" . $CURUSER["id"] . " AND unread='yes'") or sqlerr(__LINE__, __FILE__);
    $arr1 = mysql_fetch_row($res1);
    $unread = $arr1[0];
    $inbox = $unread == 1 ? "{$unread}&nbsp;{$lang['gl_msg_singular']}" : "{$unread}&nbsp;{$lang['gl_msg_plural']}";
    $res2 = @sql_query("SELECT seeder, count(*) AS pCount FROM peers WHERE userid=" . $CURUSER['id'] . " GROUP BY seeder") or sqlerr(__LINE__, __FILE__);
    $seedleech = array('yes' => '0', 'no' => '0');
    while ($row = mysql_fetch_assoc($res2)) {
        if ($row['seeder'] == 'yes') {
            $seedleech['yes'] = $row['pCount'];
        } else {
            $seedleech['no'] = $row['pCount'];
        }
    }
    /////////////// REP SYSTEM /////////////
    $member_reputation = get_reputation($CURUSER);
    ////////////// REP SYSTEM END //////////
    if ($CURUSER['class'] < UC_VIP && $TBDEV['max_slots']) {
        $ratioq = $CURUSER['downloaded'] > 0 ? $CURUSER['uploaded'] / $CURUSER['downloaded'] : 1;
        if ($ratioq < 0.95) {
            switch (true) {
                case $ratioq < 0.5:
                    $max = 2;
                    break;
                case $ratioq < 0.65:
                    $max = 3;
                    break;
                case $ratioq < 0.8:
                    $max = 5;
                    break;
                case $ratioq < 0.95:
                    $max = 10;
                    break;
                default:
                    $max = 10;
            }
        } else {
            switch ($CURUSER['class']) {
                case UC_USER:
                    $max = 20;
                    break;
                case UC_POWER_USER:
                    $max = 30;
                    break;
                default:
                    $max = 99;
            }
        }
    } else {
        $max = 999;
    }
    $usrclass = "";
    if ($CURUSER['override_class'] != 255) {
        $usrclass = "&nbsp;<b>(" . get_user_class_name($CURUSER['class']) . ")</b>&nbsp;";
    } elseif ($CURUSER['class'] >= UC_MODERATOR) {
        $usrclass = "&nbsp;<a href='{$TBDEV['baseurl']}/setclass.php'><b>(" . get_user_class_name($CURUSER['class']) . ")</b></a>&nbsp;";
    }
    $StatusBar = '';
    $StatusBar = "<tr>" . "<td colspan='2' style='padding: 2px;'>" . "<div id='statusbar'>" . "<div style='float:left;color:black;'>{$lang['gl_msg_welcome']}, \n\t\t" . format_username($CURUSER) . "&nbsp;{$usrclass} \n\t\t" . "&nbsp;{$member_reputation}" . "&nbsp;|&nbsp;Invites:&nbsp;<a href='{$TBDEV['baseurl']}/invite.php'>{$CURUSER['invites']}</a>&nbsp;|" . "\n\t\t&nbsp;Bonus:&nbsp;<a href='{$TBDEV['baseurl']}/mybonus.php'>{$CURUSER['seedbonus']}</a>&nbsp;|&nbsp;<a href='logout.php'>[{$lang['gl_logout']}]</a>";
    if (!$TBDEV['coins']) {
        $StatusBar .= "\n\t\t<br />{$lang['gl_ratio']}:{$ratio}" . "&nbsp;|&nbsp;{$lang['gl_uploaded']}:{$upped}" . "&nbsp;|&nbsp;{$lang['gl_downloaded']}:{$downed}";
    }
    if ($TBDEV['coins']) {
        $StatusBar .= "&nbsp;|&nbsp;{$lang['gl_coins']}:<a href='{$TBDEV['baseurl']}/coins.php'>{$CURUSER['coins']}</a>&nbsp;&nbsp;";
    }
    $StatusBar .= "&nbsp;|&nbsp;{$lang['gl_act_torrents']}:&nbsp;<img alt='{$lang['gl_seed_torrents']}' title='{$lang['gl_seed_torrents']}' src='{$TBDEV['pic_base_url']}up.png' />&nbsp;{$seedleech['yes']}" . "&nbsp;&nbsp;<img alt='{$lang['gl_leech_torrents']}' title='{$lang['gl_leech_torrents']}' src='{$TBDEV['pic_base_url']}dl.png' />&nbsp;" . ($TBDEV['max_slots'] ? "<a title='I have " . $max . " Download Slots'>{$seedleech['no']}/" . $max . "</a>" : $seedleech['no']) . "</div>" . "<div><p style='text-align:right;'>" . date(DATE_RFC822) . "<br />" . "<a href='./messages.php'>{$inbox}</a></p></div>" . "</div></td></tr>";
    return $StatusBar;
}
 public function entityFieldQueryAlter(SelectQueryInterface $query)
 {
     if (user_access('administer users')) {
         // In addition, if the user is administrator, we need to make sure to
         // match the anonymous user, that doesn't actually have a name in the
         // database.
         $conditions =& $query->conditions();
         foreach ($conditions as $key => $condition) {
             if ($key !== '#conjunction' && is_string($condition['field']) && $condition['field'] === 'users.name') {
                 // Remove the condition.
                 unset($conditions[$key]);
                 // Re-add the condition and a condition on uid = 0 so that we end up
                 // with a query in the form:
                 //    WHERE (name LIKE :name) OR (:anonymous_name LIKE :name AND uid = 0)
                 $or = db_or();
                 $or->condition($condition['field'], $condition['value'], $condition['operator']);
                 // Sadly, the Database layer doesn't allow us to build a condition
                 // in the form ':placeholder = :placeholder2', because the 'field'
                 // part of a condition is always escaped.
                 // As a (cheap) workaround, we separately build a condition with no
                 // field, and concatenate the field and the condition separately.
                 $value_part = db_and();
                 $value_part->condition('anonymous_name', $condition['value'], $condition['operator']);
                 $value_part->compile(Database::getConnection(), $query);
                 $or->condition(db_and()->where(str_replace('anonymous_name', ':anonymous_name', (string) $value_part), $value_part->arguments() + array(':anonymous_name' => format_username(user_load(0))))->condition('users.uid', 0));
                 $query->condition($or);
             }
         }
     }
 }
Beispiel #24
0
$count = (int) $row['c'];
if ($count > 0) {
    $pager = pager(25, $count, 'viewrequests.php?');
    $res = sql_query('select users.id as userid,users.username, users.downloaded, users.title, users.class, users.donor, users.warned, users.leechwarn, users.chatpost, users.pirate, users.king, users.enabled, users.uploaded, requests.id as requestid, requests.request, requests.added from voted_requests inner join users on voted_requests.userid = users.id inner join requests on voted_requests.requestid = requests.id WHERE voted_requests.requestid =' . $id . ' ' . $pager['limit']) or sqlerr(__FILE__, __LINE__);
    $res2 = sql_query("select request from requests where id={$id}");
    $arr2 = mysql_fetch_assoc($res2);
    $HTMLOUT .= "<h1>{$lang['view_voters']}<a class='altlink' href='viewrequests.php?id={$id}&amp;req_details'><b>" . htmlspecialchars($arr2['request']) . "</b></a></h1>";
    $HTMLOUT .= "<p>{$lang['view_vote_this']}<a class='altlink' href='viewrequests.php?id={$id}&amp;req_vote'><b>{$lang['view_req']}</b></a></p>";
    $HTMLOUT .= $pager['pagertop'];
    if (mysql_num_rows($res) == 0) {
        $HTMLOUT .= "<p align='center'><b>{$lang['view_nothing']}</b></p>\n";
    } else {
        $HTMLOUT .= "<table border='1' cellspacing='0' cellpadding='5'>\r\n<tr><td class='colhead'>{$lang['view_name']}</td><td class='colhead' align='left'>{$lang['view_upl']}</td><td class='colhead' align='left'>{$lang['view_dl']}</td>\r\n<td class='colhead' align='left'>{$lang['view_ratio']}</td></tr>\n";
        while ($arr = mysql_fetch_assoc($res)) {
            $ratio = member_ratio($arr['uploaded'], $arr['downloaded']);
            $uploaded = mksize($arr['uploaded']);
            $joindate = get_date($arr['added'], '');
            $downloaded = mksize($arr["downloaded"]);
            $enabled = $arr['enabled'] == 'no' ? '<span style="color:red;">No</span>' : '<span style="color:green;">Yes</span>';
            $arr['id'] = $arr['userid'];
            $username = format_username($arr);
            $HTMLOUT .= "<tr><td><b>{$username}</b></td>\r\n             <td align='left'>{$uploaded}</td>\r\n             <td align='left'>{$downloaded}</td>\r\n             <td align='left'>{$ratio}</td></tr>\n";
        }
        $HTMLOUT .= "</table>\n";
    }
    $HTMLOUT .= $pager['pagerbottom'];
} else {
    $HTMLOUT .= "{$lang['req_nothing']}";
}
/////////////////////// HTML OUTPUT //////////////////////////////
print stdhead('Voters') . $HTMLOUT . stdfoot();
Beispiel #25
0
/**
 * Process variables for user-picture.tpl.php.
 *
 * The $variables array contains the following arguments:
 * - $account: A user, node or comment object with 'name', 'uid' and 'picture'
 *   fields.
 *
 * @see user-picture.tpl.php
 */
function alpha_preprocess_user_picture(&$variables)
{
    $variables['user_picture'] = '';
    if (variable_get('user_pictures', 0)) {
        $account = $variables['account'];
        if (!empty($account->picture)) {
            // @TODO: Ideally this function would only be passed file objects, but
            // since there's a lot of legacy code that JOINs the {users} table to
            // {node} or {comments} and passes the results into this function if we
            // a numeric value in the picture field we'll assume it's a file id
            // and load it for them. Once we've got user_load_multiple() and
            // comment_load_multiple() functions the user module will be able to load
            // the picture files in mass during the object's load process.
            if (is_numeric($account->picture)) {
                $account->picture = file_load($account->picture);
            }
            if (!empty($account->picture->uri)) {
                $filepath = $account->picture->uri;
            }
        } elseif (variable_get('user_picture_default', '')) {
            $filepath = variable_get('user_picture_default', '');
        }
        if (isset($filepath)) {
            $alt = t("@user's picture", array('@user' => format_username($account)));
            // If the image does not have a valid Drupal scheme (for eg. HTTP),
            // don't load image styles.
            if (module_exists('image') && file_valid_uri($filepath) && ($style = variable_get('user_picture_style', ''))) {
                $variables['user_picture'] = theme('image_style', array('style_name' => $style, 'path' => $filepath, 'alt' => $alt, 'title' => $alt, 'attributes' => array('class' => array('img-circle'))));
            } else {
                $variables['user_picture'] = theme('image', array('path' => $filepath, 'alt' => $alt, 'title' => $alt, 'attributes' => array('class' => array('img-circle'))));
            }
            if (!empty($account->uid) && user_access('access user profiles')) {
                $attributes = array('attributes' => array('title' => t('View user profile.')), 'html' => TRUE);
                $variables['user_picture'] = l($variables['user_picture'], "user/{$account->uid}", $attributes);
            }
        }
    }
}
$pager = pager($perpage, $count1, 'staffpanel.php?tool=uploader_info&amp;');
//=== main query
$res = sql_query('SELECT COUNT(t.id) as how_many_torrents, t.owner, t.added, u.username, u.uploaded, u.downloaded, u.id, u.donor, u.suspended, u.class, u.warned, u.enabled, u.chatpost, u.leechwarn, u.pirate, u.king
            FROM torrents AS t LEFT JOIN users as u ON u.id = t.owner GROUP BY t.owner ORDER BY how_many_torrents DESC ' . $pager['limit']);
if ($count1 > $perpage) {
    $HTMLOUT .= $pager['pagertop'];
}
$HTMLOUT .= '<table border="0" cellspacing="0" cellpadding="5">
   <tr><td class="colhead" align="center">' . $lang['upinfo_rank'] . '</td><td class="colhead" align="center">' . $lang['upinfo_torrent'] . '</td><td class="colhead" align="left">' . $lang['upinfo_member'] . '</td><td class="colhead" align="left">' . $lang['upinfo_class'] . '</td><td class="colhead" align="left">' . $lang['upinfo_ratio'] . '</td><td class="colhead" align="left">' . $lang['upinfo_ltupload'] . '</td><td class="colhead" align="center">' . $lang['upinfo_sendpm'] . '</td></tr>';
$i = 0;
while ($arr = mysqli_fetch_assoc($res)) {
    $i++;
    //=== change colors
    $count = ++$count % 2;
    $class = $count == 0 ? 'one' : 'two';
    $ratio = member_ratio($arr['uploaded'], $INSTALLER09['ratio_free'] ? '0' : $arr['downloaded']);
    $HTMLOUT .= '<tr>
<td class="' . $class . '" align="center">' . $i . '</td>
<td class="' . $class . '" align="center">' . (int) $arr['how_many_torrents'] . '</td>
<td class="' . $class . '" align="left">' . format_username($arr) . '</td>
<td class="' . $class . '" align="left">' . get_user_class_name($arr['class']) . '</td>
<td class="' . $class . '" align="left">' . $ratio . '</td>
<td class="' . $class . '" align="left">' . get_date($arr['added'], 'DATE', 0, 1) . '</td>
<td class="' . $class . '" align="center"><a href="pm_system.php?action=send_message&amp;receiver=' . (int) $arr['id'] . '"><img src="' . $INSTALLER09['pic_base_url'] . '/button_pm.gif" alt="' . $lang['upinfo_pm'] . '" title="' . $lang['upinfo_pm'] . '" border="0" /></a></td>
</tr>';
}
$HTMLOUT .= '</table>';
if ($count1 > $perpage) {
    $HTMLOUT .= $pager['pagerbottom'];
}
echo stdhead($lang['upinfo_stdhead']) . $HTMLOUT . stdfoot();
Beispiel #27
0
	LEFT JOIN users_main AS um2 ON um2.ID=cu2.UserID
	LEFT JOIN users_info AS ui2 ON ui2.UserID=cu2.UserID
	WHERE c.ID='$ConvID'");

$A = $DB->next_record(); // A = Array
$Subject = $A['Subject'];
$Sticky = $A['Sticky'];
$UnRead = $A['UnRead'];

list($User1ID, $User1Name, $User1Class, $User1Enabled, $User1Donor, $User1Warned) = array($A['u1ID'], $A['u1Username'], $A['u1Class'], $A['u1Enabled'], $A['u1Donor'], $A['u1Warned']);
list($User2ID, $User2Name, $User2Class, $User2Enabled, $User2Donor, $User2Warned) = array($A['u2ID'], $A['u2Username'], $A['u2Class'], $A['u2Enabled'], $A['u2Donor'], $A['u2Warned']);

$Users = array();
$Users[$User1ID]['UserStr'] = format_username($User1ID, $User1Name, $User1Donor , $User1Warned, $User1Enabled == 2 ? false : true, $User1Class);
$Users[$User1ID]['Username'] = $User1Name;
$Users[$User2ID]['UserStr'] = format_username($User2ID, $User2Name, $User2Donor , $User2Warned, $User2Enabled == 2 ? false : true, $User2Class);
$Users[$User2ID]['Username'] = $User2Name;

$Users[0]['UserStr'] = 'System'; // in case it's a message from the system
$Users[0]['Username'] = '******';



if($UnRead=='1') {

	$DB->query("UPDATE pm_conversations_users SET UnRead='0' WHERE ConvID='$ConvID' AND UserID='$UserID'");
	// Clear the caches of the inbox and sentbox
	$Cache->decrement('inbox_new_'.$UserID);
}

show_header('View conversation '.$Subject, 'comments,inbox');
Beispiel #28
0
    if ($user["avatar"]) {
        $HTMLOUT .= "<tr><td colspan='2' align='center'><img src='" . htmlspecialchars($user["avatar"]) . "'></td></tr>\n";
    }
    if ($user["info"]) {
        $HTMLOUT .= "<tr valign='top'><td align='left' colspan='2' class=text bgcolor='#F4F4F0'>'" . format_comment($user["info"]) . "'</td></tr>\n";
    }
    $HTMLOUT .= "<tr><td colspan='2' align='center'><form method='get' action='{$INSTALLER09['baseurl']}/sendmessage.php'><input type='hidden' name='receiver' value='" . $user["id"] . "' /><input type='submit' value='{$lang['userdetails_sendmess']}' style='height: 23px' /></form>";
    if ($CURUSER['class'] < UC_STAFF && $user["id"] != $CURUSER["id"]) {
        $HTMLOUT .= end_main_frame();
        echo stdhead('Anonymous user') . $HTMLOUT . stdfoot();
        die;
    }
    $HTMLOUT .= "</td></tr></table><br />";
}
$enabled = $user["enabled"] == 'yes';
$HTMLOUT .= "<table class='main' border='0' cellspacing='0' cellpadding='0'>" . "<tr><td class='embedded'><h1 style='margin:0px'>" . format_username($user, true) . "</h1></td>{$country}</tr></table>\n";
if ($user["parked"] == 'yes') {
    $HTMLOUT .= "<p><b>{$lang['userdetails_parked']}</b></p>\n";
}
if (!$enabled) {
    $HTMLOUT .= "<p><b>{$lang['userdetails_disabled']}</b></p>\n";
} elseif ($CURUSER["id"] != $user["id"]) {
    $friends = $mc1->get_value('Friends_' . $id);
    if ($friends === false) {
        $r3 = sql_query("SELECT id FROM friends WHERE userid={$CURUSER['id']} AND friendid={$id}") or sqlerr(__FILE__, __LINE__);
        $friends = mysql_num_rows($r3);
        $mc1->cache_value('Friends_' . $id, $friends, $INSTALLER09['expires']['user_friends']);
    }
    $blocks = $mc1->get_value('Blocks_' . $id);
    if ($blocks === false) {
        $r4 = sql_query("SELECT id FROM blocks WHERE userid={$CURUSER['id']} AND blockid={$id}") or sqlerr(__FILE__, __LINE__);
 /**
  * This is a generic lock test.
  */
 function ipe_test_lock($url, $break)
 {
     if (!empty($this->cache->locked)) {
         if ($break != 'break') {
             $account = user_load($this->cache->locked->uid);
             $name = format_username($account);
             $lock_age = format_interval(time() - $this->cache->locked->updated);
             $message = t("This panel is being edited by user !user, and is therefore locked from editing by others. This lock is !age old.\n\nClick OK to break this lock and discard any changes made by !user.", array('!user' => $name, '!age' => $lock_age));
             $this->commands[] = array('command' => 'unlockIPE', 'message' => $message, 'break_path' => url($this->get_url($url, 'break')), 'key' => $this->clean_key);
             return TRUE;
         }
         // Break the lock.
         panels_edit_cache_break_lock($this->cache);
     }
 }
Beispiel #30
0
function insert_compose_frame($id, $newtopic = true, $quote = false, $attachment = false)
{
    global $CURUSER, $INSTALLER09, $Multi_forum;
    $htmlout = '';
    if ($newtopic) {
        $res = sql_query("SELECT name FROM forums WHERE id=" . sqlesc($id)) or sqlerr(__FILE__, __LINE__);
        $arr = mysqli_fetch_assoc($res) or die("Bad forum ID!");
        // $htmlout .="<h3>New topic in <a href='{$INSTALLER09['baseurl']}/forums.php?action=viewforum&amp;forumid=".$id."'>".htmlsafechars($arr["name"])."</a> forum</h3>";
        $htmlout .= "<!--<div class='navigation'>\n\t\t\t\t<a href='index.php'>" . $INSTALLER09["site_name"] . "</a> \n\t\t\t\t&gt;\n\t\t\t\t<a href='forums.php'>Forums</a>\n\t\t\t\t&gt;\n\t\t\t\t<a href='{$INSTALLER09['baseurl']}/forums.php?action=viewforum&amp;forumid=" . $id . "'>" . htmlsafechars($arr["name"]) . "</a>\n\t\t\t\t<br><img src='templates/1/pic/carbon/nav_bit.png' alt=''>\n\t\t\t\t<span class='active'>New Topic</span>\n\t\t\t\t</div><br />-->";
    } else {
        $res = sql_query("SELECT t.forum_id, t.topic_name, t.locked, f.min_class_read, f.name AS forum_name FROM topics AS t LEFT JOIN forums AS f ON f.id = t.forum_id WHERE t.id=" . sqlesc($id)) or sqlerr(__FILE__, __LINE__);
        $arr = mysqli_fetch_assoc($res) or die("Forum error, Topic not found.");
        $forum = htmlsafechars($arr["forum_name"]);
        $forumid = (int) $arr['forum_id'];
        if ($arr['locked'] == 'yes') {
            stderr("Sorry", "The topic is locked.");
            $htmlout .= end_table();
            $htmlout .= end_main_frame();
            echo stdhead("Compose", true, $stdhead) . $htmlout . stdfoot($stdfoot);
            exit;
        }
        if ($CURUSER["class"] < $arr["min_class_read"]) {
            $htmlout .= stdmsg("Sorry", "You are not allowed in here.");
            $htmlout .= end_table();
            $htmlout .= end_main_frame();
            echo stdhead("Compose") . $htmlout . stdfoot();
            exit;
        }
        $htmlout .= "<!--<div class='navigation'>\n\t\t\t\t<a href='index.php'>" . $INSTALLER09["site_name"] . "</a> \n\t\t\t\t&gt;\n\t\t\t\t<a href='forums.php'>Forums</a>\n\t\t\t\t&gt;\n\t\t\t\t<a href='{$INSTALLER09['baseurl']}/forums.php?action=viewforum&amp;forumid=" . $forumid . "'>{$forum}</a>\n\t\t\t\t&gt;\n\t\t\t\t<a href='{$INSTALLER09['baseurl']}/forums.php?action=viewtopic&amp;topicid=" . $id . "'>" . htmlsafechars($arr["topic_name"]) . "</a>\n\t\t\t\t<br><img src='templates/1/pic/carbon/nav_bit.png' alt=''>\n\t\t\t\t<span class='active'>Post Reply</span>\n\t\t\t\t</div><br />-->";
        // $htmlout .="<h3 align='center'>Reply to topic:<a href='{$INSTALLER09['baseurl']}/forums.php?action=viewtopic&amp;topicid=".$id."'>".htmlsafechars($arr["topic_name"])."</a></h3>";
    }
    $htmlout .= "\n    <script type='text/javascript'>\n    /*<![CDATA[*/\n    function Preview()\n    {\n    document.compose.action = './forums/preview.php'\n    document.compose.target = '_blank';\n    document.compose.submit();\n    return true;\n    }\n    /*]]>*/\n    </script>";
    //$htmlout .= begin_frame("Compose", true);
    $htmlout .= "<form method='post' name='compose' action='{$INSTALLER09['baseurl']}/forums.php' enctype='multipart/form-data'>\n\t  <input type='hidden' name='action' value='post' />\n\t  <input type='hidden' name='" . ($newtopic ? 'forumid' : 'topicid') . "' value='" . $id . "' />";
    //$htmlout .= begin_table(true);
    $htmlout .= "<table border='0' cellspacing='0' cellpadding='5' class='tborder'>\n\t<tr>\n<td class='thead' colspan='2'><strong>Compose</strong></td>\n</tr>\n\t";
    if ($newtopic) {
        $htmlout .= "<tr>\n\t\t\t<td class=row width='10%'>Subject</td>\n\t\t\t<td class=row align='left'>\n\t\t\t\t<input type='text' class='form-control col-md-12' size='100' maxlength='{$Multi_forum['configs']['maxsubjectlength']}' name='topic_name'  />\n\t\t\t</td>\n\t\t</tr>";
    }
    if ($quote) {
        $postid = (int) $_GET["postid"];
        if (!is_valid_id($postid)) {
            stderr("Error", "Invalid ID!");
            $htmlout .= end_table();
            $htmlout .= end_main_frame();
            echo stdhead("Compose", true, $stdhead) . $htmlout . stdfoot($stdfoot);
            exit;
        }
        $res = sql_query("SELECT posts.*, users.username FROM posts JOIN users ON posts.user_id = users.id WHERE posts.id =" . sqlesc($postid)) or sqlerr(__FILE__, __LINE__);
        if (mysqli_num_rows($res) == 0) {
            stderr("Error", "No post with this ID");
            $htmlout .= end_table();
            $htmlout .= end_main_frame();
            echo stdhead("Error - No post with this ID", true, $stdhead) . $htmlout . stdfoot($stdfoot);
            exit;
        }
        $arr = mysqli_fetch_assoc($res);
    }
    $htmlout .= "<tr>\n\t\t<td class=row valign='top'>Body</td>\n\t\t<td class=row>";
    $qbody = $quote ? "[quote=" . htmlsafechars($arr["username"]) . "]" . htmlsafechars($arr["body"]) . "[/quote]" : "";
    //if (function_exists('BBcode'))
    //$htmlout .= BBcode($qbody, true);
    if (function_exists('textbbcode')) {
        $htmlout .= ' 
		' . textbbcode('compose', 'body', isset($qbody) ? htmlsafechars($qbody) : '') . ' 
		';
    } else {
        $htmlout .= "<textarea name='body' style='width:99%' rows='7'>{$qbody}</textarea>";
    }
    $htmlout .= "</td></tr>";
    if ($Multi_forum['configs']['use_attachment_mod'] && $attachment) {
        $htmlout .= "<tr>\n\t\t\t\t<td colspan='2'><fieldset class='fieldset'><legend>Add Attachment</legend>\n\t\t\t\t<input type='checkbox' name='uploadattachment' value='yes' />\n\t\t\t\t<input type='file' name='file' size='60' />\n        <div class='error'>Allowed Files: rar, zip<br />Size Limit " . mksize($Multi_forum['configs']['maxfilesize']) . "</div></fieldset>\n\t\t\t\t</td>\n\t\t\t</tr>";
    }
    $htmlout .= "<tr>\n   \t  <td class=row align='center' colspan='2'>" . post_icons() . "</td>\n \t     </tr><tr class=row>\n \t\t  <td colspan='2' align='center'>\n \t     <input class='btn btn-primary dropdown-toggle' type='submit' value='Submit' /><input class='btn btn-primary dropdown-toggle' type='button' value='Preview' name='button2' onclick='return Preview();' />\n";
    if ($newtopic) {
        $htmlout .= "Anonymous Topic<input type='checkbox' name='anonymous' value='yes'/>\n";
    } else {
        $htmlout .= "Anonymous Post<input type='checkbox' name='anonymous' value='yes'/>\n";
    }
    $htmlout .= "</td></tr></form>\n";
    $htmlout .= "<tr>\n\t\t\t\t<td colspan='2' align='right' class='tfoot'>\n\t\t\t\t" . insert_quick_jump_menu() . "\n\t\t\t\t</td>\n\t\t\t</tr>";
    $htmlout .= end_table();
    $htmlout .= "<br />";
    // $htmlout .= end_frame();
    // ------ Get 10 last posts if this is a reply
    if (!$newtopic && $INSTALLER09['show_last_10']) {
        $postres = sql_query("SELECT p.id, p.added, p.body, p.anonymous, u.id AS uid, u.enabled, u.class, u.donor, u.warned, u.chatpost, u.leechwarn, u.pirate, u.king, u.username, u.avatar, u.offensive_avatar " . "FROM posts AS p " . "LEFT JOIN users AS u ON u.id = p.user_id " . "WHERE p.topic_id=" . sqlesc($id) . " " . "ORDER BY p.id DESC LIMIT 10") or sqlerr(__FILE__, __LINE__);
        if (mysqli_num_rows($postres) > 0) {
            $htmlout .= "<br />";
            $htmlout .= begin_frame("10 last posts, in reverse order");
            while ($post = mysqli_fetch_assoc($postres)) {
                //$avatar = ($CURUSER["avatars"] == "all" ? htmlsafechars($post["avatar"]) : ($CURUSER["avatars"] == "some" && $post["offavatar"] == "no" ? htmlsafechars($post["avatar"]) : ""));
                $avatar = $CURUSER["avatars"] == "yes" ? avatar_stuff($post) : "";
                if ($post['anonymous'] == 'yes') {
                    $avatar = $INSTALLER09['pic_base_url'] . $Multi_forum['configs']['forum_pics']['default_avatar'];
                } else {
                    $avatar = $CURUSER["avatars"] == "yes" ? avatar_stuff($post) : '';
                }
                if (empty($avatar)) {
                    $avatar = $INSTALLER09['pic_base_url'] . $Multi_forum['configs']['forum_pics']['default_avatar'];
                }
                $user_stuff = $post;
                $user_stuff['id'] = (int) $post['uid'];
                if ($post["anonymous"] == "yes") {
                    if ($CURUSER['class'] < UC_STAFF && $post["uid"] != $CURUSER["id"]) {
                        $htmlout .= "<p class='sub'>#" . (int) $post["id"] . " by <i>Anonymous</i> at " . get_date($post["added"], 'LONG', 1, 0) . "</p>";
                    } else {
                        $htmlout .= "<p class='sub'>#" . (int) $post["id"] . " by <i>Anonymous</i> [<b>" . format_username($user_stuff, true) . "</b>] at " . get_date($post["added"], 'LONG', 1, 0) . "</p>";
                    }
                } else {
                    $htmlout .= "<p class='sub'>#" . (int) $post["id"] . " by " . (!empty($post["username"]) ? format_username($user_stuff, true) : "unknown[" . (int) $post['uid'] . "]") . " at " . get_date($post["added"], 'LONG', 1, 0) . "</p>";
                }
                $htmlout .= begin_table(true);
                $htmlout .= "<tr>\n\t\t\t\t <td height='100' width='100' align='center' style='padding: 0px' valign='top'><img height='100' width='100' src='" . $avatar . "' alt='User avvy' /></td>\n\t\t\t\t <td class='comment' valign='top'>" . format_comment($post["body"]) . "</td>\n\t\t\t\t </tr>";
                $htmlout .= end_table();
            }
            $htmlout .= end_frame();
        }
    }
    //$htmlout .= insert_quick_jump_menu();
    return $htmlout;
}