本文整理汇总了PHP中print_user_stuff函数的典型用法代码示例。如果您正苦于以下问题:PHP print_user_stuff函数的具体用法?PHP print_user_stuff怎么用?PHP print_user_stuff使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了print_user_stuff函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: while
while ($arr = @mysqli_fetch_assoc($res)) {
//=== change colors
$count2 = ++$count2 % 2;
$class = $count2 == 0 ? 'one' : 'two';
$invitor_res = sql_query('SELECT id, username, donor, class, enabled, warned, leechwarn, chatpost, pirate, king, suspended FROM users WHERE id=' . sqlesc($arr['invitedby'])) or sqlerr(__FILE__, __LINE__);
$invitor_arr = mysqli_fetch_assoc($invitor_res);
$the_flip_box = '
[ <a id="d' . $div_link_number . '_open" style="font-weight:bold;cursor:pointer;">View reason</a> ]
<div align="left" id="d' . $div_link_number . '" style="display:none">' . format_comment($arr['watched_user_reason']) . '</div>';
$HTMLOUT .= '
<tr>
<td align="center" class="' . $class . '">' . get_date($arr['watched_user'], '') . '</td>
<td align="left" class="' . $class . '">' . print_user_stuff($arr) . '</td>
<td align="left" class="' . $class . '">' . $the_flip_box . '</td>
<td align="center" class="' . $class . '">' . member_ratio($arr['uploaded'], $INSTALLER09['ratio_free'] ? '0' : $arr['downloaded']) . '</td>
<td align="center" class="' . $class . '">' . ($invitor_arr['username'] == '' ? 'open sign-ups' : print_user_stuff($invitor_arr)) . '</td>
' . ($CURUSER['class'] >= UC_STAFF ? '
<td align="center" class="' . $class . '"><input type="checkbox" name="wu[]" value="' . (int) $arr['id'] . '" /></td>' : '') . '
</tr>';
$div_link_number++;
}
$div_link_number = 1;
} else {
$HTMLOUT .= '<tr>
<td align="center" class="one"><h1>The watched members list is empty!</h1></td></tr>';
}
$HTMLOUT .= '
<tr>
<td align="center" colspan="6" class="colhead"><a class="altlink" href="javascript:SetChecked(1,\'wu[]\')"> select all</a> - <a class="altlink" href="javascript:SetChecked(0,\'wu[]\')">un-select all</a>
<input type="submit" class="button_big" value="remove selected from watched users" onmouseover="this.className=\'button_big_hover\'" onmouseout="this.className=\'button_big\'" /></td></tr></table></form>
<script type="text/javascript" src="scripts/check_selected.js"></script>';
示例2: format_comment
' . ($CURUSER['class'] >= UC_STAFF && $arr['post_history'] !== '' ? ' <a class="altlink" href="forums.php?action=view_post_history&post_id=' . $arr['post_id'] . '&forum_id=' . $arr['forum_id'] . '&topic_id=' . $arr['topic_id'] . '">read post history</a></span><br />' : '');
}
$body = $arr['bbcode'] == 'yes' ? format_comment($arr['body']) : format_comment_no_bbcode($arr['body']);
$post_id = $arr['post_id'];
$HTMLOUT .= '<tr>
<td class="forum_head_dark" colspan="3" align="left">Forum:
<a class="altlink" href="forums.php?action=view_forum&forum_id=' . $arr['forum_id'] . '" title="Link to Forum">
<span style="color: white;font-weight: bold;">' . htmlentities($arr['forum_name'], ENT_QUOTES) . '</span></a>
Topic: <a class="altlink" href="forums.php?action=view_topic&topic_id=' . $arr['topic_id'] . '" title="Link to Forum">
<span style="color: white;font-weight: bold;">' . htmlentities($arr['topic_name'], ENT_QUOTES) . '</span></a>' . $topic_status_image . '</td>
</tr>
<tr>
<td class="forum_head" align="left" width="100" valign="middle"><a name="' . $post_id . '"></a></td>
<td class="forum_head" align="left" valign="middle"> <span style="white-space:nowrap;">' . $post_icon . '
<a class="altlink" href="forums.php?action=view_topic&topic_id=' . $arr['topic_id'] . '&page=' . $page . '#' . $arr['post_id'] . '" title="Link to Post">
' . $post_title . '</a> ' . $post_status_image . ' posted on: ' . get_date($arr['added'], '') . ' [' . get_date($arr['added'], '', 0, 1) . ']</span></td>
<td class="forum_head" align="right" valign="middle"><span style="white-space:nowrap;">
<a href="forums.php?action=view_my_posts&page=' . $page . '#top"><img src="pic/forums/up.gif" alt="top" /></a>
<a href="forums.php?action=view_my_posts&page=' . $page . '#bottom"><img src="pic/forums/down.gif" alt="bottom" /></a></span></td>
</tr>
<tr>
<td class="' . $class_alt . '" align="center" width="100px" valign="top">' . avatar_stuff($user_arr) . '<br />' . print_user_stuff($user_arr) . ($user_arr['title'] == '' ? '' : '<br /><span style=" font-size: xx-small;">[' . htmlspecialchars($user_arr['title']) . ']</span>') . '<br />
<span style="font-weight: bold;">' . get_user_class_name($user_arr['class']) . '</span><br /></td>
<td class="' . $post_status . '" align="left" valign="top" colspan="2">' . $body . $edited_by . '</td>
</tr>
<tr>
<td class="' . $class_alt . '" align="right" valign="middle" colspan="3"></td>
</tr>';
}
//=== end while loop
$HTMLOUT .= $the_top_and_bottom . '</table><a name="bottom"></a><br />' . $links . '<br />';
示例3: format_comment
//==
}
$body = $arr['bbcode'] == 'yes' ? format_comment($arr['body']) : format_comment_no_bbcode($arr['body']);
$post_id = (int) $arr['post_id'];
$width = 100;
$HTMLOUT .= '<tr>
<td class="forum_head_dark" colspan="3" align="left">' . $lang['fe_forum'] . ':
<a class="altlink" href="forums.php?action=view_forum&forum_id=' . (int) $arr['forum_id'] . '" title="' . $lang['fe_link_to_forum'] . '">
<span style="color: white;font-weight: bold;">' . htmlsafechars($arr['forum_name'], ENT_QUOTES) . '</span></a>
' . $lang['fe_topic'] . ': <a class="altlink" href="forums.php?action=view_topic&topic_id=' . (int) $arr['topic_id'] . '" title="' . $lang['fe_link_to_forum'] . '">
<span style="color: white;font-weight: bold;">' . htmlsafechars($arr['topic_name'], ENT_QUOTES) . '</span></a>' . $topic_status_image . '</td>
</tr>
<tr>
<td class="forum_head" align="left" width="100" valign="middle"><a name="' . $post_id . '"></a></td>
<td class="forum_head" align="left" valign="middle"> <span style="white-space:nowrap;">' . $post_icon . '
<a class="altlink" href="forums.php?action=view_topic&topic_id=' . (int) $arr['topic_id'] . '&page=' . $page . '#' . (int) $arr['post_id'] . '" title="' . $lang['fe_link_to_post'] . '">
' . $post_title . '</a> ' . $post_status_image . ' ' . $lang['fe_posted_on'] . ': ' . get_date($arr['added'], '') . ' [' . get_date($arr['added'], '', 0, 1) . ']</span></td>
<td class="forum_head" align="right" valign="middle"><span style="white-space:nowrap;">
<a href="forums.php?action=view_my_posts&page=' . $page . '#top"><img src="pic/forums/up.gif" alt="' . $lang['fe_top'] . '" /></a>
<a href="forums.php?action=view_my_posts&page=' . $page . '#bottom"><img src="pic/forums/down.gif" alt="' . $lang['fe_bottom'] . '" /></a></span></td>
</tr>
<tr>
<td class="' . $class_alt . '" align="center" width="100px" valign="top">' . ($arr['anonymous'] == 'yes' ? '<img style="max-width:' . $width . 'px;" src="' . $INSTALLER09['pic_base_url'] . 'anonymous_1.jpg" alt="avatar" />' : avatar_stuff($user_arr)) . '<br />' . ($arr['anonymous'] == 'yes' ? '<i>' . $lang['fe_anonymous'] . '</i>' : print_user_stuff($user_arr)) . ($arr['anonymous'] == 'yes' || $user_arr['title'] == '' ? '' : '<br /><span style=" font-size: xx-small;">[' . htmlsafechars($user_arr['title']) . ']</span>') . '<br /><span style="font-weight: bold;">' . ($arr['anonymous'] == 'yes' ? '' : get_user_class_name($user_arr['class'])) . '</span><br /></td>
<td class="' . $post_status . '" align="left" valign="top" colspan="2">' . $body . $edited_by . '</td>
</tr>
<tr>
<td class="' . $class_alt . '" align="right" valign="middle" colspan="3"></td>
</tr>';
}
//=== end while loop
$HTMLOUT .= $the_top_and_bottom . '</table><a name="bottom"></a><br />' . $links . '<br />';
示例4: while
//=== ok let's show the posts...
while ($arr_unread = mysql_fetch_assoc($res_unread)) {
$res_post_read = sql_query('SELECT last_post_read FROM read_posts WHERE user_id=' . $CURUSER['id'] . ' AND topic_id=' . $arr_unread['topic_id']);
$arr_post_read = mysql_fetch_row($res_post_read);
$did_i_post_here = sql_query('SELECT user_id FROM posts WHERE user_id=' . $CURUSER['id'] . ' AND topic_id=' . $arr_unread['topic_id']);
$posted = mysql_num_rows($did_i_post_here) > 0 ? 1 : 0;
if ($arr_post_read[0] < $arr_unread['last_post'] && $posted) {
//=== change colors
$colour = ++$colour % 2;
$class = $colour == 0 ? 'one' : 'two';
$locked = $arr_unread['locked'] == 'yes';
$sticky = $arr_unread['sticky'] == 'yes';
$topic_poll = $arr_unread['poll_id'] > 0;
$first_unread_poster = sql_query('SELECT added FROM posts WHERE status = \'ok\' AND topic_id=' . $arr_unread['topic_id'] . ' ORDER BY id ASC LIMIT 1');
$first_unread_poster_arr = mysql_fetch_row($first_unread_poster);
$thread_starter = ($arr_unread['username'] !== '' ? print_user_stuff($arr_unread) : 'Lost [' . $arr_unread['id'] . ']') . '<br />' . get_date($first_unread_poster_arr[0], '');
$topicpic = $arr_unread['post_count'] < 30 ? $locked ? 'lockednew' : 'topicnew' : ($locked ? 'lockednew' : 'hot_topic_new');
$rpic = $arr_unread['num_ratings'] != 0 ? ratingpic_forums(ROUND($arr_unread['rating_sum'] / $arr_unread['num_ratings'], 1)) : '';
$sub = sql_query('SELECT user_id FROM subscriptions WHERE user_id=' . $CURUSER['id'] . ' AND topic_id=' . $arr_unread['topic_id']);
$subscriptions = mysql_num_rows($sub) > 0 ? 1 : 0;
$icon = $arr_unread['icon'] == '' ? '<img src="pic/forums/topic_normal.gif" alt="Topic" title="Topic" />' : '<img src="pic/smilies/' . htmlspecialchars($arr_unread['icon']) . '.gif" alt="' . htmlspecialchars($arr_unread['icon']) . '" title="' . htmlspecialchars($arr_unread['icon']) . '" />';
$first_post_text = tool_tip(' <img src="pic/forums/mg.gif" height="14" alt="Preview" title="Preview" />', format_comment($arr_unread['body']), 'Last Post Preview');
$topic_name = ($sticky ? '<img src="pic/forums/pinned.gif" alt="Pinned" title="Pinned" /> ' : ' ') . ($topicpoll ? '<img src="pic/forums/poll.gif" alt="Poll" title="Poll" /> ' : ' ') . '
<a class="altlink" href="?action=view_topic&topic_id=' . $arr_unread['topic_id'] . '" title="First post in thread">' . htmlentities($arr_unread['topic_name'], ENT_QUOTES) . '</a>
<a class="altlink" href="forums.php?action=view_topic&topic_id=' . $arr_unread['topic_id'] . '&page=0#' . $arr_post_read[0] . '" title="First unread post in this thread"><img src="pic/forums/last_post.gif" alt="First unread post" title="First unread post" /></a>
' . ($posted ? '<img src="pic/forums/posted.gif" alt="Posted" title="Posted" /> ' : ' ') . ($subscriptions ? '<img src="pic/forums/subscriptions.gif" alt="subscribed" title="subscribed" /> ' : ' ') . ' <img src="pic/forums/new.gif" alt="New post in topic!" title="New post in topic!" />';
//=== print here
$HTMLOUT .= '<tr>
<td class="' . $class . '" align="center"><img src="pic/forums/' . $topicpic . '.gif" alt="topic" title="topic" /></td>
<td class="' . $class . '" align="center">' . $icon . '</td>
<td align="left" valign="middle" class="' . $class . '">
示例5: print_user_stuff
<td class="colhead" align="center">' . $lang['mega_ip'] . '</td>
<td class="colhead" align="center">' . $lang['mega_last_acc'] . '</td>
<td class="colhead" align="center">' . $lang['mega_joined'] . '</td>
<td class="colhead" align="center">' . $lang['mega_ud'] . '</td>
<td class="colhead" align="center">' . $lang['mega_ratio'] . '</td>
<td class="colhead" align="center">' . $lang['mega_invited_by'] . '</td>
</tr>
<tr>
<td align="left">' . print_user_stuff($user_invited) . '</td>
<td align="center">' . htmlsafechars($user_invited['email']) . '</td>
<td align="center">' . htmlsafechars($user_invited['ip']) . '</td>
<td align="center">' . get_date($user_invited['last_access'], '') . '</td>
<td align="center">' . get_date($user_invited['added'], '') . '</td>
<td align="center"><img src="pic/up.png" alt="' . $lang['mega_up'] . '" title="' . $lang['mega_uploaded'] . '" /> <span style="color: green;">' . mksize($user_invited['uploaded']) . '</span>
' . ($INSTALLER09['ratio_free'] ? '' : '<br />
<img src="pic/dl.png" alt="' . $lang['mega_down'] . '" title="' . $lang['mega_downloaded'] . '" />
<span style="color: red;">' . mksize($user_invited['downloaded']) . '</span></td>') . '
<td align="center" class="' . $class2 . '">' . member_ratio($user_invited['uploaded'], $INSTALLER09['ratio_free'] ? '0' : $user_invited['downloaded']) . '</td>
<td align="center">' . ($user_invited['invitedby'] == 0 ? $lang['mega_open'] : print_user_stuff($user2)) . '</td>
</tr>
</table>';
}
}
$HTMLOUT .= '</td></tr></table>';
}
$HTMLOUT .= '</div></div>';
echo stdhead($lang['mega_stdhead'], true, $stdhead) . $HTMLOUT . stdfoot();
?>
示例6: htmlsafechars
if ($now_viewing !== '') {
$now_viewing = '<hr /><span style="font-size: xx-small;">now viewing:</span>' . $now_viewing;
}
if ($last_post_arr['tan'] == 'yes') {
if ($CURUSER['class'] < UC_STAFF && $last_post_arr['user_id'] != $CURUSER['id']) {
$last_post = 'Last Post by: Anonymous in ► <a class="altlink" href="' . $INSTALLER09['baseurl'] . '/forums.php?action=view_topic&topic_id=' . (int) $last_post_arr['topic_id'] . '&page=p' . (int) $last_post_arr['last_post'] . '#' . (int) $last_post_arr['last_post'] . '" title="' . htmlsafechars($last_post_arr['topic_name'], ENT_QUOTES) . '">
<span style="font-weight: bold;">' . CutName(htmlsafechars($last_post_arr['topic_name'], ENT_QUOTES), 30) . '</span></a><br />
' . get_date($last_post_arr['added'], '') . '<br />';
} else {
$last_post = 'Last Post by: Anonymous [' . print_user_stuff($last_post_arr) . '] <span style="font-size: x-small;"> [ ' . get_user_class_name($last_post_arr['class']) . ' ] </span><br />
in ► <a class="altlink" href="' . $INSTALLER09['baseurl'] . '/forums.php?action=view_topic&topic_id=' . (int) $last_post_arr['topic_id'] . '&page=p' . (int) $last_post_arr['last_post'] . '#' . (int) $last_post_arr['last_post'] . '" title="' . htmlsafechars($last_post_arr['topic_name'], ENT_QUOTES) . '">
<span style="font-weight: bold;">' . CutName(htmlsafechars($last_post_arr['topic_name'], ENT_QUOTES), 30) . '</span></a><br />
' . get_date($last_post_arr['added'], '') . '<br />';
}
} else {
$last_post = 'Last Post by: ' . print_user_stuff($last_post_arr) . ' <span style="font-size: x-small;"> [ ' . get_user_class_name($last_post_arr['class']) . ' ] </span><br />
in ► <a class="altlink" href="' . $INSTALLER09['baseurl'] . '/forums.php?action=view_topic&topic_id=' . (int) $last_post_arr['topic_id'] . '&page=p' . (int) $last_post_arr['last_post'] . '#' . (int) $last_post_arr['last_post'] . '" title="' . htmlsafechars($last_post_arr['topic_name'], ENT_QUOTES) . '">
<span style="font-weight: bold;">' . CutName(htmlsafechars($last_post_arr['topic_name'], ENT_QUOTES), 30) . '</span></a><br />
' . get_date($last_post_arr['added'], '') . '<br />';
}
} else {
$img = 'unlocked';
$now_viewing = '';
$last_post = 'N/A';
}
$HTMLOUT .= '<tr>
<td class="' . $class . '" align="center" valign="middle" width="30"><img src="' . $INSTALLER09['pic_base_url'] . 'forums/' . $img . '.gif" alt="' . $INSTALLER09['pic_base_url'] . 'forums/' . $img . '.gif" title="' . $INSTALLER09['pic_base_url'] . 'forums/' . $img . '.gif" /></td>
<td class="' . $class . '" align="left">
<a class="altlink" href="' . $INSTALLER09['baseurl'] . '/forums.php?action=view_forum&forum_id=' . (int) $forums_arr['forum_id'] . '">' . htmlsafechars($forums_arr['forum_name'], ENT_QUOTES) . '</a>
<br />' . htmlsafechars($forums_arr['forum_description'], ENT_QUOTES) . $child_boards . $now_viewing . '</td>
<td class="' . $class . '" align="center" width="80">' . number_format($forums_arr['post_count']) . ' Posts<br />' . number_format($forums_arr['topic_count']) . ' Topics</td>
示例7: while
<td width= "1%" class="colhead"> </td>
<td class="colhead">Subject </td>
<td width="35%" class="colhead">' . ($mailbox === PM_SENTBOX ? 'Sent to' : 'Sender') . '</td>
<td width="1%" class="colhead"> Date</td>
<td width="1%" class="colhead"></td>
</tr>') : '';
while ($row = mysqli_fetch_assoc($res_search)) {
//=======change colors
$count2 = ++$count2 % 2;
$class = $count2 == 0 ? 'one' : 'two';
$class2 = $count2 == 0 ? 'two' : 'one';
//=== if not searching one member...
if (!$member) {
$res_username = sql_query('SELECT id, username, warned, suspended, enabled, donor, leechwarn, chatpost, pirate, king, class FROM users WHERE id = ' . sqlesc($row[$sender_reciever]) . ' LIMIT 1') or sqlerr(__FILE__, __LINE__);
$arr_username = mysqli_fetch_assoc($res_username);
$the_username = print_user_stuff($arr_username);
}
//=== if searching all boxes...
$arr_box = $row['location'] == 1 ? 'Inbox' : ($row['location'] == -1 ? 'Sentbox' : ($row['location'] == -2 ? 'Drafts' : ''));
if ($all_boxes && $arr_box === '') {
$res_box_name = sql_query('SELECT name FROM pmboxes WHERE userid = ' . sqlesc($CURUSER['id']) . ' AND boxnumber = ' . sqlesc($row['location'])) or sqlerr(__FILE__, __LINE__);
$arr_box_name = mysqli_fetch_assoc($res_box_name);
$arr_box = htmlsafechars($arr_box_name['name']);
}
//==== highlight search terms... from Jaits search forums mod
$body = str_ireplace($keywords, '<span style="background-color:yellow;font-weight:bold;color:black;">' . $keywords . '</span>', format_comment($row['msg']));
$subject = str_ireplace($keywords, '<span style="background-color:yellow;font-weight:bold;color:black;">' . $keywords . '</span>', htmlsafechars($row['subject']));
//=== print the damn thing ... if it's as a list or as posts...
$HTMLOUT .= $as_list_post == 2 ? '
<tr>
<td class="colhead" colspan="4">message from: ' . ($row[$sender_reciever] == 0 ? 'Sys-bot' : $the_username) . '</td>
示例8: sql_query
//=== get last ten posts
$res_posts = sql_query('SELECT p.id AS post_id, p.user_id, p.added, p.body, p.icon, p.post_title, p.bbcode, p.anonymous,
u.id, u.username, u.class, u.donor, u.suspended, u.chatpost, u.leechwarn, u.pirate, u.king, u.warned, u.enabled, u.avatar, u.offensive_avatar
FROM posts AS p LEFT JOIN users AS u ON p.user_id = u.id
WHERE ' . ($CURUSER['class'] < UC_STAFF ? 'p.status = \'ok\' AND' : ($CURUSER['class'] < $min_delete_view_class ? 'p.status != \'deleted\' AND' : '')) . ' topic_id=' . sqlesc($topic_id) . ' ORDER BY p.id DESC LIMIT 0, 10');
$HTMLOUT .= '<br /><span style="text-align: center;">' . $lang['fe_last_ten_posts_in_reverse_order'] . '</span>
<table border="0" cellspacing="5" cellpadding="10" width="90%" align="center">';
//=== lets start the loop \o/
while ($arr = mysqli_fetch_assoc($res_posts)) {
//=== change colors
$colour = ++$colour % 2;
$class = $colour == 0 ? 'one' : 'two';
$class_alt = $colour == 0 ? 'two' : 'one';
$HTMLOUT .= '<tr><td class="forum_head" align="left" width="100" valign="middle">#
<span style="font-weight: bold;">' . ($arr['anonymous'] == 'yes' ? '<i>' . $lang['fe_anonymous'] . '</i>' : htmlsafechars($arr['username'])) . '</span></td>
<td class="forum_head" align="left" valign="middle"><span style="white-space:nowrap;"> ' . $lang['fe_posted_on'] . ': ' . get_date($arr['added'], '') . ' [' . get_date($arr['added'], '', 0, 1) . ']</span></td></tr>';
$width = 100;
if ($arr['anonymous'] == 'yes') {
if ($CURUSER['class'] < UC_STAFF && $arr['user_id'] != $CURUSER['id']) {
$HTMLOUT .= '<tr><td class="' . $class_alt . '" align="center" width="100" valign="top"><img style="max-width:' . $width . 'px;" src="' . $INSTALLER09['pic_base_url'] . 'anonymous_1.jpg" alt="avatar" /><br /><i>' . $lang['fe_anonymous'] . '</i></td>';
} else {
$HTMLOUT .= '<tr><td class="' . $class_alt . '" align="center" width="100" valign="top">' . avatar_stuff($arr) . '<br /><i>' . $lang['fe_anonymous'] . '</i>[' . print_user_stuff($arr) . ']</td>';
}
} else {
$HTMLOUT .= '<tr><td class="' . $class_alt . '" align="center" width="100" valign="top">' . avatar_stuff($arr) . '<br />' . print_user_stuff($arr) . '</td>';
}
$HTMLOUT .= '<td class="' . $class . '" align="left" valign="top" colspan="2">' . ($arr['bbcode'] == 'yes' ? format_comment($arr['body']) : format_comment_no_bbcode($arr['body'])) . '</td></tr>';
}
//=== end while loop
$HTMLOUT .= '</table>
</td></tr></table><br /><br />';
示例9: htmlsafechars
$extra = ($row['unread'] === 'yes' ? $spacer.'' . $lang['pm_mailbox_char1'] . '<span style="color: red;">' . $lang['pm_mailbox_unread'] . '</span>' . $lang['pm_mailbox_char2'] . '' : '').($row['urgent'] === 'yes' ? $spacer.'<span style="color: red;">' . $lang['pm_mailbox_urgent'] . '</span>' : '');
$avatar = (($CURUSER['avatars'] === 'no' || $CURUSER['show_pm_avatar'] === 'no' || $row['id'] == 0)? '' : (empty($row['avatar']) ? '
<img width="40" src="pic/default_avatar.gif" alt="no avatar" />' : (($row['offensive_avatar'] === 'yes' && $CURUSER['view_offensive_avatar'] === 'no') ?
'<img width="40" src="pic/fuzzybunny.gif" alt="fuzzy!" />' : '<img width="40" src="'.htmlsafechars($row['avatar']).'" alt="avatar" />')));
$HTMLOUT .= '
<tr>
<td class="'.$class.'" align="center">'.$read_unread.'</td>
<td class="'.$class.'" align="left"><a class="altlink" href="pm_system.php?action=view_message&id='.(int)$row['message_id'].'">'.$subject.'</a>'.$extra.'</td>
<td class="'.$class.'" align="left">'.$avatar.$who_sent_it.'</td>
<td class="'.$class.'" align="left">'.get_date($row['added'], '').'</td>
<td class="'.$class.'" align="center"><input type="checkbox" name="pm[]" value="'.(int)$row['message_id'].'" /></td>
</tr>';
*/
$subject = !empty($row['subject']) ? htmlsafechars($row['subject']) : $lang['pm_search_nosubject'];
$who_sent_it = $row['id'] == 0 ? '<span style="font-weight: bold;">' . $lang['pm_forward_system'] . '</span>' : print_user_stuff($row) . $friends;
$read_unread = $row['unread'] === 'yes' ? '<img src="pic/pn_inboxnew.gif" title="' . $lang['pm_mailbox_unreadmsg'] . '" alt="' . $lang['pm_mailbox_unread'] . '" />' : '<img src="pic/pn_inbox.gif" title="' . $lang['pm_mailbox_readmsg'] . '" alt="' . $lang['pm_mailbox_read'] . '" />';
$extra = ($row['unread'] === 'yes' ? $spacer . '' . $lang['pm_mailbox_char1'] . '<span style="color: red;">' . $lang['pm_mailbox_unread'] . '</span>' . $lang['pm_mailbox_char2'] . '' : '') . ($row['urgent'] === 'yes' ? $spacer . '<span style="color: red;">' . $lang['pm_mailbox_urgent'] . '</span>' : '');
$avatar = !$CURUSER['opt1'] & user_options::AVATARS || !$CURUSER['opt2'] & user_options_2::SHOW_PM_AVATAR || $row['id'] == 0 ? '' : (empty($row['avatar']) ? '
<img width="40" src="pic/default_avatar.gif" alt="no avatar" />' : ($row['opt1'] & user_options::OFFENSIVE_AVATAR && !$CURUSER['opt1'] & user_options::VIEW_OFFENSIVE_AVATAR ? '<img width="40" src="pic/fuzzybunny.gif" alt="fuzzy!" />' : '<img width="40" src="' . htmlsafechars($row['avatar']) . '" alt="avatar" />'));
$HTMLOUT .= '
<tr>
<td class="text-center">' . $read_unread . '</td>
<td class="text-left"><a class="altlink" href="pm_system.php?action=view_message&id=' . (int) $row['message_id'] . '">' . $subject . '</a>' . $extra . '</td>
<td class="text-left">' . $avatar . $who_sent_it . '</td>
<td class="text-left">' . get_date($row['added'], '') . '</td>
<td class="text-center"><input type="checkbox" name="pm[]" value="' . (int) $row['message_id'] . '" /></td>
</tr>';
}
}
//=== per page drop down
示例10: comment_table
function comment_table($rows)
{
$count2 = '';
global $CURUSER, $INSTALLER09;
$comment_table = '<table class="table table-hover table-bordered">
<tr>
<td class="three" align="center">';
foreach ($rows as $row) {
//=======change colors
$count2 = ++$count2 % 2;
$class = $count2 == 0 ? 'one' : 'two';
$text = format_comment($row['text']);
if ($row['editedby']) {
$res_user = sql_query('SELECT username FROM users WHERE id=' . sqlesc($row['editedby'])) or sqlerr(__FILE__, __LINE__);
$arr_user = mysqli_fetch_assoc($res_user);
$text .= '<p><font size="1" class="small">Last edited by <a href="userdetails.php?id=' . (int) $row['editedby'] . '"><b>' . htmlsafechars($arr_user['username']) . '</b></a> at ' . get_date($row['editedat'], 'DATE') . '</font></p>';
}
$top_comment_stuff = $row['comment_id'] . ' by ' . (isset($row['username']) ? print_user_stuff($row) . ($row['title'] !== '' ? ' [ ' . htmlsafechars($row['title']) . ' ] ' : ' [ ' . get_user_class_name($row['class']) . ' ] ') : ' M.I.A. ') . get_date($row['added'], '') . ($row['id'] == $CURUSER['id'] || $CURUSER['class'] >= UC_STAFF ? '
- [<a href="requests.php?action=edit_comment&id=' . (int) $row['request'] . '&comment_id=' . (int) $row['comment_id'] . '">Edit</a>]' : '') . ($CURUSER['class'] >= UC_STAFF ? '
- [<a href="requests.php?action=delete_comment&id=' . (int) $row['request'] . '&comment_id=' . (int) $row['comment_id'] . '">Delete</a>]' : '') . ($row['editedby'] && $CURUSER['class'] >= UC_STAFF ? '
- [<a href="comment.php?action=vieworiginal&cid=' . (int) $row['id'] . '">View original</a>]' : '') . '
- [<a href="report.php?type=Request_Comment&id_2=' . (int) $row['request'] . '&id=' . (int) $row['comment_id'] . '">Report</a>]';
$comment_table .= '
<table class="table table-hover table-bordered">
<tr>
<td align="left" colspan="2" class="colhead"># ' . $top_comment_stuff . '</td>
</tr>
<tr>
<td align="center" width="80" class="' . $class . '" style="padding: 0px;">' . avatar_stuff($row) . '</td>
<td class="' . $class . '">' . $text . '</td>
</tr>
</table><br />';
}
$comment_table .= '</td></tr></table>';
return $comment_table;
}
示例11: mysql_fetch_array
f.name AS forum_name, u.id, u.username, u.class, u.donor, u.suspended, u.warned, u.enabled, u.avatar, u.offensive_avatar, u.chatpost, u.leechwarn, u.pirate, u.king
FROM posts AS p LEFT JOIN topics AS t ON p.topic_id = t.id LEFT JOIN forums AS f ON t.forum_id = f.id LEFT JOIN users AS u ON p.user_id = u.id
WHERE ' . ($CURUSER['class'] < UC_STAFF ? 'p.status = \'ok\' AND t.status = \'ok\' AND' : ($CURUSER['class'] < $min_delete_view_class ? 'p.status != \'deleted\' AND t.status != \'deleted\' AND' : '')) . ' p.id = ' . $post_id);
$arr = mysql_fetch_array($res);
$res_edited = sql_query('SELECT id, username, class, donor, suspended, warned, enabled, avatar, chatpost, leechwarn, pirate, king, offensive_avatar FROM users WHERE id = ' . $arr['edited_by']);
$arr_edited = mysql_fetch_array($res_edited);
$icon = htmlspecialchars($arr['icon']);
$post_title = htmlentities($arr['post_title'], ENT_QUOTES);
$location_bar = '<h1><a class="altlink" href="forums.php">Forums</a> <img src="pic/arrow_next.gif" alt="►" title="►" />
<a class="altlink" href="forums.php?action=view_forum&forum_id=' . $forum_id . '">' . htmlentities($arr['forum_name'], ENT_QUOTES) . '</a>
<img src="pic/arrow_next.gif" alt="►" title="►" />
<a class="altlink" href="forums.php?action=view_topic&topic_id=' . $topic_id . '">' . htmlentities($arr['topic_name'], ENT_QUOTES) . '</a></h1>
<span style="text-align: center;">' . $mini_menu . '</span><br /><br />';
$HTMLOUT .= $location_bar;
$HTMLOUT .= '<h1>' . htmlspecialchars($arr['username']) . '\'s Final Edited Post. last edited by: ' . print_user_stuff($arr_edited) . '</h1>
<table border="0" cellspacing="5" cellpadding="10" width="90%">
<tr>
<td class="forum_head" align="left" width="120px" valign="middle">
<span style="white-space:nowrap;">#' . $post_id . '
<span style="font-weight: bold;">' . htmlspecialchars($arr['username']) . '</span></span>
</td>
<td class="forum_head" align="left" valign="middle">
<span style="white-space:nowrap;"> posted on: ' . get_date($arr['added'], '') . ' [' . get_date($arr['added'], '', 0, 1) . '] GMT
' . ($post_title !== '' ? ' Title: <span style="font-weight: bold;">' . $post_title . '</span>' : '') . ($icon !== '' ? ' <img src="pic/smilies/' . $icon . '.gif" alt="' . $icon . '" title="' . $icon . '"/>' : '') . '</span>
</td>
</tr>
<tr>
<td class="two" align="center" width="120px" valign="top">' . avatar_stuff($arr) . '<br />' . print_user_stuff($arr) . '</td>
<td class="one" align="left" valign="top" colspan="2">' . ($arr['bbcode'] == 'yes' ? format_comment($arr['body']) : format_comment_no_bbcode($arr['body'])) . '</td>
</tr>
</table><br /><h1>Post History</h1>[ All Post Edits by Date Desc. ]<br /><br />' . $arr['post_history'] . '<br />' . $location_bar;
示例12: sql_query
$res_box_name = sql_query('SELECT name FROM pmboxes WHERE userid = ' . sqlesc($CURUSER['id']) . ' AND boxnumber=' . sqlesc($mailbox) . ' LIMIT 1') or sqlerr(__FILE__, __LINE__);
$arr_box_name = mysqli_fetch_row($res_box_name);
if (mysqli_num_rows($res) === 0) {
stderr($lang['pm_error'], $lang['pm_mailbox_invalid']);
}
$mailbox_name = htmlsafechars($arr_box_name[0]);
$other_box_info = '<p class="text-center"><span style="color: red;">' . $lang['pm_mailbox_asterisc'] . '</span><span style="font-weight: bold;">' . $lang['pm_mailbox_note'] . '</span>
' . $lang['pm_mailbox_max'] . '<span style="font-weight: bold;">' . $maxbox . '</span>' . $lang['pm_mailbox_either'] . '
<span style="font-weight: bold;">' . $lang['pm_mailbox_inbox'] . '</span>' . $lang['pm_mailbox_or'] . '<span style="font-weight: bold;">' . $lang['pm_mailbox_sentbox'] . '</span>.</p>';
}
//=== Display the message already!
$HTMLOUT .= $h1_thingie . ($message['draft'] === 'yes' ? '<h1>' . $lang['pm_viewmsg_tdraft'] . '</h1>' : '<h1>' . $lang['pm_viewmsg_mailbox'] . '' . $mailbox_name . '</h1>') . $top_links . '
<table class="table table-bordered">
<tr>
<td class="text-center" colspan="2" class="colhead"><h1>' . $lang['pm_send_subject'] . '
<span style="font-weight: bold;">' . ($message['subject'] !== '' ? htmlsafechars($message['subject']) : $lang['pm_search_nosubject']) . '</span></h1></td>
</tr>
<tr>
<td colspan="2" class="text-left"><span style="font-weight: bold;">' . ($message['sender'] === $CURUSER['id'] ? $lang['pm_viewmsg_to'] : $lang['pm_viewmsg_from']) . ':</span>
' . ($arr_user_stuff['id'] == 0 ? $lang['pm_viewmsg_sys'] : print_user_stuff($arr_user_stuff)) . $spacer . $friends . $spacer . $spacer . '
<span style="font-weight: bold;">sent:</span> ' . get_date($message['added'], '') . $spacer . ($message['sender'] === $CURUSER['id'] && $message['unread'] == 'yes' ? '' . $lang['pm_mailbox_char1'] . '<span style="font-weight: bold;color:red;">' . $lang['pm_mailbox_unread'] . '</span>' . $lang['pm_mailbox_char2'] . '' : '') . ($message['urgent'] === 'yes' ? '<span style="font-weight: bold;color:red;">' . $lang['pm_mailbox_urgent'] . '</span>' : '') . '</td>
</tr>
<tr>
<td class="text-center" valign="top" width="0px" id="photocol">' . $avatar . '</td>
<td class="text-left text-resize">' . format_comment($message['msg']) . '</td>
</tr>
<tr>
<td class="textright" colspan="2">
<form class="form-horizontal" role="form" action="pm_system.php" method="post">
<input class="form-control" type="hidden" name="id" value="' . $pm_id . '">
<input class="form-control" type="hidden" name="action" value="move">' . get_all_boxes() . '<br>' . $the_buttons . insertJumpTo(0) . '</td></tr></table>';
示例13: sql_query
break;
}
$locked = $arr_unread['locked'] == 'yes';
$sticky = $arr_unread['sticky'] == 'yes';
$topic_poll = $arr_unread['poll_id'] > 0;
$first_unread_poster = sql_query('SELECT added FROM posts WHERE topic_id=' . sqlesc($arr_unread['topic_id']) . ' ORDER BY id ASC LIMIT 1');
$first_unread_poster_arr = mysqli_fetch_row($first_unread_poster);
//==Anonymous
if ($arr_unread['tan'] == 'yes') {
if ($CURUSER['class'] < UC_STAFF && $arr_unread['user_id'] != $CURUSER['id']) {
$thread_starter = ($arr_unread['username'] !== '' ? '<i>' . $lang['fe_anonymous'] . '</i>' : '' . $lang['fe_lost'] . ' [' . (int) $arr_unread['id'] . ']') . '<br />' . get_date($first_unread_poster_arr[0], '');
} else {
$thread_starter = ($arr_unread['username'] !== '' ? '<i>' . $lang['fe_anonymous'] . '</i> [' . print_user_stuff($arr_unread) . ']' : '' . $lang['fe_lost'] . ' [' . (int) $arr_unread['id'] . ']') . '<br />' . get_date($first_unread_poster_arr[0], '');
}
} else {
$thread_starter = ($arr_unread['username'] !== '' ? print_user_stuff($arr_unread) : '' . $lang['fe_lost'] . ' [' . (int) $arr_unread['id'] . ']') . '<br />' . get_date($first_unread_poster_arr[0], '');
}
$topicpic = $arr_unread['post_count'] < 30 ? $locked ? 'lockednew' : 'topicnew' : ($locked ? 'lockednew' : 'hot_topic_new');
$rpic = $arr_unread['num_ratings'] != 0 ? ratingpic_forums(ROUND($arr_unread['rating_sum'] / $arr_unread['num_ratings'], 1)) : '';
$did_i_post_here = sql_query('SELECT user_id FROM posts WHERE user_id=' . sqlesc($CURUSER['id']) . ' AND topic_id=' . sqlesc($arr_unread['topic_id']));
$posted = mysqli_num_rows($did_i_post_here) > 0 ? 1 : 0;
$sub = sql_query('SELECT user_id FROM subscriptions WHERE user_id=' . sqlesc($CURUSER['id']) . ' AND topic_id=' . sqlesc($arr_unread['topic_id']));
$subscriptions = mysqli_num_rows($sub) > 0 ? 1 : 0;
$icon = $arr_unread['icon'] == '' ? '<img src="' . $INSTALLER09['pic_base_url'] . 'forums/topic_normal.gif" alt="' . $lang['fe_topic'] . '" title="' . $lang['fe_topic'] . '" />' : '<img src="' . $INSTALLER09['pic_base_url'] . 'smilies/' . htmlsafechars($arr_unread['icon']) . '.gif" alt="' . $lang['fe_unread'] . '" title="' . $lang['fe_unread'] . '" />';
$first_post_text = tool_tip(' <img src="' . $INSTALLER09['pic_base_url'] . 'forums/mg.gif" height="14" alt="' . $lang['fe_preview'] . '" title="' . $lang['fe_preview'] . '" />', format_comment($arr_unread['body'], true, false, false), '' . $lang['fe_last_post'] . ' ' . $lang['fe_preview'] . '');
$topic_name = ($sticky ? '<img src="' . $INSTALLER09['pic_base_url'] . 'forums/pinned.gif" alt="' . $lang['fe_pinned'] . '" title="' . $lang['fe_pinned'] . '" /> ' : ' ') . ($topicpoll ? '<img src="' . $INSTALLER09['pic_base_url'] . 'forums/poll.gif" alt="' . $lang['fe_poll'] . '" title="' . $lang['fe_poll'] . '" /> ' : ' ') . ' <a class="altlink" href="' . $INSTALLER09['baseurl'] . '/forums.php?action=view_topic&topic_id=' . (int) $arr_unread['topic_id'] . '" title="' . $lang['fe_1st_post_in_tread'] . '">' . htmlsafechars($arr_unread['topic_name'], ENT_QUOTES) . '</a><a class="altlink" href="' . $INSTALLER09['baseurl'] . '/forums.php?action=view_topic&topic_id=' . (int) $arr_unread['topic_id'] . '&page=0#' . (int) $arr_post_read[0] . '" title="' . $lang['fe_1st_unread_post_topic'] . '"><img src="' . $INSTALLER09['pic_base_url'] . 'forums/last_post.gif" alt="' . $lang['fe_last_post'] . '" title="' . $lang['fe_last_post'] . '" /></a>' . ($posted ? '<img src="' . $INSTALLER09['pic_base_url'] . 'forums/posted.gif" alt="Posted" title="Posted" /> ' : ' ') . ($subscriptions ? '<img src="' . $INSTALLER09['pic_base_url'] . 'forums/subscriptions.gif" alt="' . $lang['fe_subscribed'] . '" title="' . $lang['fe_subscribed'] . '" /> ' : ' ') . ' <img src="' . $INSTALLER09['pic_base_url'] . 'forums/new.gif" alt="' . $lang['fe_new_post_in_topic'] . '!" title="' . $lang['fe_new_post_in_topic'] . '!" />';
//=== print here
$HTMLOUT .= '<tr>
<td class="' . $class . '" align="center"><img src="' . $INSTALLER09['pic_base_url'] . 'forums/' . $topicpic . '.gif" alt="' . $lang['fe_topic'] . '" title="' . $lang['fe_topic'] . '" /></td>
<td class="' . $class . '" align="center">' . $icon . '</td>
<td align="left" valign="middle" class="' . $class . '">
示例14: print_user_stuff
break;
case 'deleted':
$post_status_image = ' <img src="pic/forums/delete_icon.gif" alt="Deleted" title="this post is currently deleted" />';
break;
}
$last_post_username = $arr_post_stuff['username'] !== '' ? print_user_stuff($arr_post_stuff) : 'Lost [' . $arr_post_stuff['id'] . ']';
$last_post_id = $arr_post_stuff['last_post_id'];
//=== Get author / first post info
$first_post_res = sql_query('SELECT p.id AS first_post_id, p.added, p.icon, p.body,
u.id, u.username, u.class, u.donor, u.suspended, u.warned, u.enabled, u.chatpost, u.leechwarn, u.pirate, u.king
FROM posts AS p
LEFT JOIN users AS u ON p.user_id = u.id
WHERE ' . ($CURUSER['class'] < UC_STAFF ? ' p.status = \'ok\' AND' : ($CURUSER['class'] < $min_delete_view_class ? ' p.status != \'deleted\' AND' : '')) . '
topic_id=' . $topic_id . ' ORDER BY p.id ASC LIMIT 1');
$first_post_arr = mysql_fetch_assoc($first_post_res);
$thread_starter = ($first_post_arr['username'] !== '' ? print_user_stuff($first_post_arr) : 'Lost [' . $topic_arr['user_id'] . ']') . '<br />' . get_date($first_post_arr['added'], '');
$icon = $first_post_arr['icon'] == '' ? '<img src="pic/forums/topic_normal.gif" alt="Topic" title="Topic" />' : '<img src="pic/smilies/' . htmlspecialchars($first_post_arr['icon']) . '.gif" alt="' . htmlspecialchars($first_post_arr['icon']) . '" />';
$first_post_text = tool_tip(' <img src="pic/forums/mg.gif" height="14" alt="Preview" title="Preview" />', format_comment($first_post_arr['body'], 1, 0), 'First Post Preview');
//=== last post read in topic
$last_unread_post_res = sql_query('SELECT last_post_read FROM read_posts WHERE user_id=' . $CURUSER['id'] . ' AND topic_id=' . $topic_id);
$last_unread_post_arr = mysql_fetch_row($last_unread_post_res);
$last_unread_post_id = $last_unread_post_arr[0] > 0 ? $last_unread_post_arr[0] : $first_post_arr['first_post_id'];
$did_i_post_here = sql_query('SELECT user_id FROM posts WHERE user_id=' . $CURUSER['id'] . ' AND topic_id=' . $topic_id);
$posted = mysql_num_rows($did_i_post_here) > 0 ? 1 : 0;
//=== add subscribed forum image
$sub = sql_query('SELECT user_id FROM subscriptions WHERE user_id=' . $CURUSER['id'] . ' AND topic_id=' . $topic_id);
$subscriptions = mysql_num_rows($sub) > 0 ? 1 : 0;
//=== make the multi pages thing...
$total_pages = floor($posts / $perpage);
switch (true) {
case $total_pages == 0:
示例15: print_user_stuff
</tr>
<tr>
<td class="three" align="right" valign="top">
<span style="font-weight: bold;">' . $lang['vt_message'] . ':</span>
</td>
<td class="three" align="left" valign="top">
<textarea cols="30" rows="4" name="message" class="text_area_small"></textarea>
</td>
</tr>
<tr>
<td class="three" align="right" valign="top">
<span style="font-weight: bold;">' . $lang['vt_from'] . ':</span>
</td>
<td class="three" align="left" valign="top">
<input type="radio" name="pm_from" value="0" checked="checked" /> ' . $lang['vt_system'] . '
<input type="radio" name="pm_from" value="1" /> ' . print_user_stuff($CURUSER) . '
</td>
</tr>
</table>
</div>
<hr /></td>
<td class="two" align="center">
<a class="altlink" href="javascript:SetChecked(1,\'post_to_mess_with[]\')" title="' . $lang['vt_select_all_posts_and_use_the_following_options'] . '"> ' . $lang['vt_select_all'] . '</a> <br />
<a class="altlink" href="javascript:SetChecked(0,\'post_to_mess_with[]\')" title="' . $lang['vt_unselect_all_posts'] . '">' . $lang['vt_un_select_all'] . '</a><br />
<input type="submit" name="button" class="button" value="' . $lang['vt_with_selected'] . '" onmouseover="this.className=\'button_hover\'" onmouseout="this.className=\'button\'" />
</td>
</tr>
<tr>
<td class="two" align="center" width="28" valign="top">
<img src="' . $INSTALLER09['pic_base_url'] . 'forums/pinned.gif" alt="' . $lang['fe_pinned'] . '" title="' . $lang['fe_pinned'] . '" /></td>
<td class="two" align="right" valign="top">