示例#1
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;
}
        //==
    }
    $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&amp;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>&nbsp;&nbsp;&nbsp;&nbsp;
		' . $lang['fe_topic'] . ': <a class="altlink" href="forums.php?action=view_topic&amp;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&amp;topic_id=' . (int) $arr['topic_id'] . '&amp;page=' . $page . '#' . (int) $arr['post_id'] . '" title="' . $lang['fe_link_to_post'] . '">
		' . $post_title . '</a>&nbsp;&nbsp;' . $post_status_image . ' &nbsp;&nbsp; ' . $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&amp;page=' . $page . '#top"><img src="pic/forums/up.gif" alt="' . $lang['fe_top'] . '" /></a> 
		<a href="forums.php?action=view_my_posts&amp;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 />';
示例#3
0
   </tr>';
$i = 1;
if (mysqli_num_rows($res) == 0) {
    $HTMLOUT .= '
   <tr>
      <td class="one" align="center" valign="top" colspan="4">
      <img src="pic/smilies/shit.gif" alt="*" /> Your shit list is empty. <img src="pic/smilies/shit.gif" alt="*" /></td>
   </tr>';
} else {
    while ($shit_list = mysqli_fetch_array($res)) {
        $shit = '';
        for ($poop = 1; $poop <= $shit_list['shittyness']; $poop++) {
            $shit .= ' <img src="pic/smilies/shit.gif" title="' . (int) $shit_list['shittyness'] . ' out of 10 on the sittyness scale" alt="*" />';
        }
        $HTMLOUT .= ($i % 2 == 1 ? '<tr>' : '') . '
      <td class="' . ($i % 2 == 0 ? 'one' : 'two') . '" align="center" valign="top" width="80">' . avatar_stuff($shit_list) . '

      ' . print_user_stuff($shit_list) . '

      <b> [ ' . get_user_class_name($shit_list['class']) . ' ]</b>

      <a class="altlink" href="staffpanel.php?tool=shit_list&amp;action=shit_list&amp;action2=delete&amp;shit_list_id=' . (int) $shit_list['suspect_id'] . '" title="remove this toad from your shit list">Remove</a>


      <a class="altlink" href="sendmessage.php?receiver=' . (int) $shit_list['suspect_id'] . '" title="send a PM to this evil toad">Send PM</a></td>
      <td class="' . ($i % 2 == 0 ? 'one' : 'two') . '" align="left" valign="top">' . $shit . '

      <b>joined:</b> ' . get_date($shit_list['added'], '') . '
 
      [ ' . get_date($shit_list['added'], '', 0, 1) . ' ]
//=== 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 />';
$topic_id = isset($_GET['topic_id']) ? intval($_GET['topic_id']) : (isset($_POST['topic_id']) ? intval($_POST['topic_id']) : 0);
if (!is_valid_id($post_id) || !is_valid_id($forum_id) || !is_valid_id($topic_id)) {
    stderr($lang['gl_error'], $lang['gl_bad_id']);
}
$res = sql_query('SELECT p.added, p.body, p.edited_by, p.user_id AS poster_id, p.edit_date, p.post_title, p.icon, p.post_history, p.bbcode, p.anonymous, t.topic_name AS topic_name, 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 = ' . sqlesc($post_id));
$arr = mysqli_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 = mysqli_fetch_array($res_edited);
$icon = htmlsafechars($arr['icon']);
$post_title = htmlsafechars($arr['post_title'], ENT_QUOTES);
$location_bar = '<h1><a class="altlink" href="' . $INSTALLER09['baseurl'] . '/forums.php">' . $lang['fe_forums'] . '</a> <img src="' . $INSTALLER09['pic_base_url'] . 'arrow_next.gif" alt="&#9658;" title="&#9658;" /> 
        <a class="altlink" href="' . $INSTALLER09['baseurl'] . '/forums.php?action=view_forum&amp;forum_id=' . $forum_id . '">' . htmlsafechars($arr['forum_name'], ENT_QUOTES) . '</a>
        <img src="' . $INSTALLER09['pic_base_url'] . 'arrow_next.gif" alt="&#9658;" title="&#9658;" /> 
        <a class="altlink" href="' . $INSTALLER09['baseurl'] . '/forums.php?action=view_topic&amp;topic_id=' . $topic_id . '">' . htmlsafechars($arr['topic_name'], ENT_QUOTES) . '</a></h1>
        <span style="text-align: center;">' . $mini_menu . '</span><br /><br />';
$width = 100;
$HTMLOUT .= $location_bar;
$HTMLOUT .= '<h1>' . ($arr['anonymous'] == 'yes' ? '<i>' . $lang['fe_anonymous'] . '</>' : htmlsafechars($arr['username'])) . '\'s ' . $lang['vph_final_edit_post'] . '. ' . $lang['vph_last_edit_by'] . ': ' . ($arr['anonymous'] == 'yes' ? '<i>' . $lang['fe_anonymous'] . '</i>' : 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;">' . ($arr['anonymous'] == 'yes' ? '<i>' . $lang['fe_anonymous'] . '</i>' : htmlsafechars($arr['username'])) . '</span></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) . '] GMT ' . ($post_title !== '' ? '&nbsp;&nbsp;&nbsp;&nbsp; ' . $lang['fe_title'] . ': <span style="font-weight: bold;">' . $post_title . '</span>' : '') . ($icon !== '' ? ' <img src="' . $INSTALLER09['pic_base_url'] . 'smilies/' . $icon . '.gif" alt="' . $icon . '" title="' . $icon . '"/>' : '') . '</span>
    </td></tr>
    <tr>
    <td class="two" align="center" width="120px" valign="top">' . ($arr['anonymous'] == 'yes' ? '<img style="max-width:' . $width . 'px;" src="' . $INSTALLER09['pic_base_url'] . 'anonymous_1.jpg" alt="avatar" />' : avatar_stuff($arr)) . '<br />' . ($arr['anonymous'] == 'yes' ? '<i>' . $lang['fe_anonymous'] . '</i>' : 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>' . $lang['fe_post_history'] . '</h1>[ ' . $lang['vph_all_post_edits_date'] . '. ]<br /><br />' . htmlspecialchars_decode($arr['post_history']) . '<br />' . $location_bar;
				 ' . ($CURUSER['class'] >= UC_STAFF && $arr['post_history'] !== '' ? ' <a class="altlink" href="forums.php?action=view_post_history&amp;post_id=' . $arr['post_id'] . '&amp;forum_id=' . $arr['forum_id'] . '&amp;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&amp;forum_id=' . $arr['forum_id'] . '" title="Link to Forum">
				<span style="color: white;font-weight: bold;">' . htmlentities($arr['forum_name'], ENT_QUOTES) . '</span></a>&nbsp;&nbsp;&nbsp;&nbsp;
				Topic: <a class="altlink" href="forums.php?action=view_topic&amp;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&amp;topic_id=' . $arr['topic_id'] . '&amp;page=' . $page . '#' . $arr['post_id'] . '" title="Link to Post">
				' . $post_title . '</a>&nbsp;&nbsp;' . $post_status_image . ' &nbsp;&nbsp; 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&amp;page=' . $page . '#top"><img src="pic/forums/up.gif" alt="top" /></a> 
				<a href="forums.php?action=view_my_posts&amp;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 />';
示例#7
0
				 ' . ($CURUSER['class'] >= UC_STAFF && $arr['post_history'] !== '' ? ' <a class="altlink" href="forums.php?action=view_post_history&amp;post_id=' . $arr['post_id'] . '&amp;forum_id=' . $arr['forum_id'] . '&amp;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&amp;forum_id=' . $arr['forum_id'] . '" title="Link to Forum">
			<span style="color: white;font-weight: bold;">' . htmlentities($arr['forum_name'], ENT_QUOTES) . '</span></a>&nbsp;&nbsp;&nbsp;&nbsp;
			Topic: <a class="altlink" href="forums.php?action=view_topic&amp;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&amp;topic_id=' . $arr['topic_id'] . '&amp;page=' . $page . '#' . $arr['post_id'] . '" title="Link to Post">
			' . $post_title . '</a>&nbsp;&nbsp;' . $post_status_image . '
			&nbsp;&nbsp; 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&amp;page=' . $page . '#top"><img src="pic/forums/up.gif" alt="top" /></a> 
			 <a href="forums.php?action=view_my_posts&amp;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($CURUSER) . '<br />
			' . print_user_stuff($CURUSER) . ($CURUSER['title'] == '' ? '' : '<br /><span style=" font-size: xx-small;">[' . htmlspecialchars($CURUSER['title']) . ']</span>') . '<br />
			<span style="font-weight: bold;">' . get_user_class_name($CURUSER['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 />';
示例#8
0
 $res_leechers = sql_query('SELECT COUNT(id)  FROM peers WHERE torrent = ' . $hit_and_run_arr['torrentid'] . ' AND seeder = \'no\' AND to_go > 0 AND userid <> ' . $hit_and_run_arr['userid']) or sqlerr(__FILE__, __LINE__);
 $arr_leechers = mysql_fetch_row($res_leechers);
 $res_seeders = sql_query('SELECT COUNT(id)  FROM peers WHERE torrent = ' . $hit_and_run_arr['torrentid'] . ' AND seeder = \'yes\' AND userid != ' . $hit_and_run_arr['userid']) or sqlerr(__FILE__, __LINE__);
 $arr_seeders = mysql_fetch_row($res_seeders);
 //=== get snatched info
 $snatched_rez = sql_query('SELECT *, snatched.start_date  AS st FROM snatched WHERE torrentid=' . $hit_and_run_arr['torrentid'] . ' AND userid=' . $hit_and_run_arr['userid']) or sqlerr(__FILE__, __LINE__);
 $snatched_arr = mysql_fetch_assoc($snatched_rez);
 //=== get user info
 $user_rez = sql_query('SELECT id, avatar, username, uploaded, downloaded, class, hit_and_run_total, donor, warned, enabled, chatpost, leechwarn, pirate, king FROM users WHERE id = ' . $hit_and_run_arr['userid']) or sqlerr(__FILE__, __LINE__);
 $user_arr = mysql_fetch_assoc($user_rez);
 //=== get count of hit and runs by member
 $num_hit_and_runs = sql_query('SELECT COUNT(id) FROM snatched WHERE mark_of_cain = \'yes\' AND userid =' . $hit_and_run_arr['userid']) or sqlerr(__FILE__, __LINE__);
 $arr_hit_and_runs = mysql_fetch_row($num_hit_and_runs);
 $ratio_site = member_ratio($user_arr['uploaded'], $user_arr['downloaded']);
 $ratio_torrent = member_ratio($snatched_arr['uploaded'], $snatched_arr['downloaded']);
 $avatar = avatar_stuff($user_arr);
 //=== get times per class
 $torrent_needed_seed_time = $snatched_arr['st'] - $arr_check_owner['torrent_added'];
 switch ($user_arr['class']) {
     case UC_USER:
         $days_3 = 3 * 86400;
         //== 3 days
         $days_14 = 2 * 86400;
         //== 2 days
         $days_over_14 = 86400;
         //== 1 day
         break;
     case UC_POWER_USER:
         $days_3 = 2 * 86400;
         //== 2 days
         $days_14 = 129600;
示例#9
0
	<td align="left" class="two">' . BBcode($body) . $more_options . '
	</td></tr>
	<tr><td align="center" colspan="2" class="two">
	<input type="submit" name="button" class="button" value="Preview" onmouseover="this.className=\'button_hover\'" onmouseout="this.className=\'button\'" />
	<input type="submit" name="button" class="button_tiny" value="Edit" onmouseover="this.className=\'button_tiny_hover\'" onmouseout="this.className=\'button_tiny\'" />
	</td></tr>
	</table></form>';
//=== 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,
				u.id, u.username, u.class, u.donor, u.suspended, u.warned, u.enabled, u.avatar, u.chatpost, u.leechwarn, u.pirate, u.king, 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=' . $topic_id . ' ORDER BY p.id DESC LIMIT 1, 10');
$HTMLOUT .= '<br /><span style="text-align: center;">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 = mysql_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"><a name="' . $arr['post_id'] . '"></a>
			<span style="white-space:nowrap;">#' . $arr['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) . ']</span></td></tr>
			<tr><td class="' . $class_alt . '" align="center" width="100" valign="top">' . avatar_stuff($arr) . '<br />
			' . print_user_stuff($arr) . '</td>
			<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><br />
			</td></tr></table><br />';
			</td>
			<td class="forum_head" align="left" valign="middle"><span style="white-space:nowrap;">' . $post_icon . $post_title . '&nbsp;&nbsp;&nbsp;&nbsp; ' . $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 class="altlink" href="' . $INSTALLER09['baseurl'] . '/forums.php?action=post_reply&amp;topic_id=' . $topic_id . '&amp;quote_post=' . $post_id . '&amp;key=' . $arr['added'] . '"><img src="' . $INSTALLER09['pic_base_url'] . 'forums/quote.gif" alt="' . $lang['fe_quote'] . '" title="' . $lang['fe_quote'] . '" /> ' . $lang['fe_quote'] . '</a>
			' . ($CURUSER['class'] >= UC_STAFF || $CURUSER['id'] == $arr['id'] ? ' <a class="altlink" href="' . $INSTALLER09['baseurl'] . '/forums.php?action=edit_post&amp;post_id=' . $post_id . '&amp;topic_id=' . $topic_id . '&amp;page=' . $page . '"><img src="' . $INSTALLER09['pic_base_url'] . 'forums/modify.gif" alt="' . $lang['fe_modify'] . '" title="' . $lang['fe_modify'] . '" /> ' . $lang['fe_modify'] . '</a> 
			 <a class="altlink" href="' . $INSTALLER09['baseurl'] . '/forums.php?action=delete_post&amp;post_id=' . $post_id . '&amp;topic_id=' . $topic_id . '"><img src="' . $INSTALLER09['pic_base_url'] . 'forums/delete.gif" alt="' . $lang['fe_delete'] . '" title="' . $lang['fe_delete'] . '" /> ' . $lang['fe_remove'] . '</a>' : '') . '
			 <!--<a class="altlink" href="' . $INSTALLER09['baseurl'] . '/forums.php?action=report_post&amp;topic_id=' . $topic_id . '&amp;post_id=' . $post_id . '"><img src="' . $INSTALLER09['pic_base_url'] . 'forums/report.gif" alt="' . $lang['fe_report'] . '" title="' . $lang['fe_report'] . '" width="22" /> ' . $lang['fe_report'] . '</a>-->
			 <a href="' . $INSTALLER09['baseurl'] . '/report.php?type=Post&amp;id=' . $post_id . '&amp;id_2=' . $topic_id . '"><img src="' . $INSTALLER09['pic_base_url'] . 'forums/report.gif" alt="' . $lang['fe_report'] . '" title="' . $lang['fe_report'] . '" width="22" /> ' . $lang['fe_report'] . '</a>
	     ' . ($CURUSER['class'] == UC_MAX && $arr['staff_lock'] == 1 ? '<a href="' . $INSTALLER09['baseurl'] . '/forums.php?action=staff_lock&amp;mode=unlock&amp;post_id=' . $post_id . '&amp;topic_id=' . $topic_id . '"><img src="' . $INSTALLER09['pic_base_url'] . 'key.gif" alt="' . $lang['fe_un_lock'] . '" title="' . $lang['fe_un_lock'] . '" /> ' . $lang['fe_unlock_post'] . '</a>&nbsp;' : '') . '
			 ' . ($CURUSER['class'] == UC_MAX && $arr['staff_lock'] == 0 ? '<a href="' . $INSTALLER09['baseurl'] . '/forums.php?action=staff_lock&amp;mode=lock&amp;post_id=' . $post_id . '&amp;topic_id=' . $topic_id . '"><img src="' . $INSTALLER09['pic_base_url'] . 'key.gif" alt="' . $lang['fe_lock'] . '" title="' . $lang['fe_lock'] . '" /> ' . $lang['fe_lock_post'] . '</a>' : '') . $stafflocked . '
			<a href="' . $INSTALLER09['baseurl'] . '/forums.php?action=view_topic&amp;topic_id=' . $topic_id . '&amp;page=' . $page . '#top"><img src="' . $INSTALLER09['pic_base_url'] . 'forums/up.gif" alt="' . $lang['fe_top'] . '" title="' . $lang['fe_top'] . '" /></a> 
		  <a href="' . $INSTALLER09['baseurl'] . '/forums.php?action=view_topic&amp;topic_id=' . $topic_id . '&amp;page=' . $page . '#bottom"><img src="' . $INSTALLER09['pic_base_url'] . 'forums/down.gif" alt="' . $lang['fe_bottom'] . '" title="' . $lang['fe_bottom'] . '" /></a> 
			</span></td>
			</tr>	
			<tr>
         <td class="' . $class_alt . '" align="center" valign="top">' . ($arr['anonymous'] == 'yes' ? '<img style="max-width:' . $width . 'px;" src="' . $INSTALLER09['pic_base_url'] . 'anonymous_1.jpg" alt="avatar" />' : avatar_stuff($arr)) . '<br />
			' . ($arr['anonymous'] == 'yes' ? '<i>' . $lang['fe_anonymous'] . '</i>' : print_user_stuff($arr)) . ($arr['anonymous'] == 'yes' || $arr['title'] == '' ? '' : '<br /><span style=" font-size: xx-small;">[' . htmlsafechars($arr['title']) . ']</span>') . '<br />
			<span style="font-weight: bold;">' . ($arr['anonymous'] == 'yes' ? '' : get_user_class_name($arr['class'])) . '</span><br />
			' . ($arr['last_access'] > TIME_NOW - 300 && $arr['perms'] < bt_options::PERMS_STEALTH ? ' <img src="' . $INSTALLER09['pic_base_url'] . 'online.gif" alt="Online" title="Online" border="0" /> Online' : ' <img src="' . $INSTALLER09['pic_base_url'] . 'offline.gif" border="0" alt="' . $lang['fe_offline'] . '" title="' . $lang['fe_offline'] . '" /> ' . $lang['fe_offline'] . '') . '<br />
			' . $lang['fe_karma'] . ': ' . number_format($arr['seedbonus']) . '<br /><br />' . $member_reputation . '<br />' . ($arr['google_talk'] !== '' ? ' <a href="http://talkgadget.google.com/talkgadget/popout?member=' . htmlsafechars($arr['google_talk']) . '" title="' . $lang['fe_click_for_google_talk_gadget'] . '"  target="_blank"><img src="' . $INSTALLER09['pic_base_url'] . 'forums/google_talk.gif" alt="' . $lang['fe_google_talk'] . '" /></a> ' : '') . ($arr['icq'] !== '' ? ' <a href="http://people.icq.com/people/&amp;uin=' . htmlsafechars($arr['icq']) . '" title="' . $lang['fe_click_to_open_icq_page'] . '" target="_blank"><img src="' . $INSTALLER09['pic_base_url'] . 'forums/icq.gif" alt="icq" /></a> ' : '') . ($arr['msn'] !== '' ? ' <a href="http://members.msn.com/' . htmlsafechars($arr['msn']) . '" target="_blank" title="' . $lang['fe_click_to_see_msn_details'] . '"><img src="' . $INSTALLER09['pic_base_url'] . 'forums/msn.gif" alt="msn" /></a> ' : '') . ($arr['aim'] !== '' ? ' <a href="http://aim.search.aol.com/aol/search?s_it=searchbox.webhome&amp;q=' . htmlsafechars($arr['aim']) . '" target="_blank" title="' . $lang['fe_click_to_search_on_aim'] . '"><img src="' . $INSTALLER09['pic_base_url'] . 'forums/aim.gif" alt="AIM" /></a> ' : '') . ($arr['yahoo'] !== '' ? ' <a href="http://webmessenger.yahoo.com/?im=' . htmlsafechars($arr['yahoo']) . '" target="_blank" title="' . $lang['fe_click_to_open_yahoo'] . '"><img src="' . $INSTALLER09['pic_base_url'] . 'forums/yahoo.gif" alt="yahoo" /></a> ' : '') . '<br /><br />' . ($arr['website'] !== '' ? ' <a href="' . htmlsafechars($arr['website']) . '" target="_blank" title="' . $lang['fe_click_to_go_to_website'] . '"><img src="' . $INSTALLER09['pic_base_url'] . 'forums/website.gif" alt="website" /></a> ' : '') . ($arr['show_email'] == 'yes' ? ' <a href="mailto:' . htmlsafechars($arr['email']) . '"  title="' . $lang['fe_click_to_email'] . '" target="_blank"><img src="' . $INSTALLER09['pic_base_url'] . 'email.gif" alt="email" width="25" /> </a>' : '') . '<br /><br />
			' . ($CURUSER['class'] >= UC_STAFF ? '   
			<ul class="makeMenu">
				<li>' . htmlsafechars($arr['ip']) . '
					<ul>
					<li><a href="https://ws.arin.net/?queryinput=' . htmlsafechars($arr['ip']) . '" title="' . $lang['vt_whois_to_find_isp_info'] . '" target="_blank">' . $lang['vt_ip_whois'] . '</a></li>
					<li><a href="http://www.infosniper.net/index.php?ip_address=' . htmlsafechars($arr['ip']) . '" title="' . $lang['vt_ip_to_map_using_infosniper'] . '!" target="_blank">' . $lang['vt_ip_to_map'] . '</a></li>
				</ul>
				</li>
			</ul>' : '') . '
			</td>
			<td class="' . $post_status . '" align="left" valign="top" colspan="2">' . $body . $edited_by . '</td></tr>
示例#11
0
 $uploaded = mksize($arr['uploaded']);
 $downloaded = mksize($arr['downloaded']);
 $member_reputation = $arr['uusername'] != '' ? get_reputation($arr, 'posts', TRUE, $postid) : '';
 $last_access = get_date($arr['last_access'], 'DATE', 1, 0);
 $Ratio = member_ratio($arr['uploaded'], $INSTALLER09['ratio_free'] ? '0' : $arr['downloaded']);
 if ($postid > $lpr && $postadd > TIME_NOW - $INSTALLER09['readpost_expiry']) {
     $newp = "&nbsp;&nbsp;<span class='badge btn btn-danger disabled' style='color:#fff'><b></b>NEW</b></span>";
 }
 $moodname = isset($mood['name'][$arr['mood']]) ? htmlsafechars($mood['name'][$arr['mood']]) : 'is feeling neutral';
 $moodpic = isset($mood['image'][$arr['mood']]) ? htmlsafechars($mood['image'][$arr['mood']]) : 'noexpression.gif';
 $signature = $CURUSER['signatures'] == 'yes' ? format_comment($arr['signature']) : '';
 $user_stuff = $arr;
 $user_stuff['id'] = (int) $arr['uid'];
 $postername = format_username($user_stuff, true);
 $width = '75';
 $avatar = $CURUSER["avatars"] == "yes" ? $arr['p_anon'] == 'yes' && $CURUSER['class'] < UC_STAFF ? '<img style="max-width:' . $width . 'px;" src="' . $INSTALLER09['pic_base_url'] . 'anonymous_1.jpg" alt="avatar" />' : avatar_stuff($arr) : "";
 $title2 = !empty($postername) ? empty($arr['title']) ? "(" . get_user_class_name($arr['class']) . ")" : "(" . htmlsafechars($arr['title']) . ")" : '';
 $title = $arr['p_anon'] == 'yes' ? '<i>' . "Anonymous" . '</i>' : htmlsafechars($title2);
 $class_name = $arr['p_anon'] == 'yes' && $CURUSER['class'] < UC_STAFF ? "Anonymous" : get_user_class_name($arr["class"]);
 $forumposts = !empty($postername) ? $arr['posts_count'] != 0 ? (int) $arr['posts_count'] : 'N/A' : 'N/A';
 if ($arr["p_anon"] == "yes") {
     if ($CURUSER['class'] < UC_STAFF) {
         $by = "<i>Anonymous</i>";
     } else {
         $by = "<i>Anonymous</i> [<a href='{$INSTALLER09['baseurl']}/userdetails.php?id={$posterid}'> " . $postername . "</a>]" . ($arr['enabled'] == 'no' ? "<img src='" . $INSTALLER09['pic_base_url'] . "disabled.gif' alt='This account is disabled' style='margin-left: 2px' />" : '') . "{$title}";
     }
 } else {
     $by = (!empty($postername) ? "<a href='{$INSTALLER09['baseurl']}/userdetails.php?id={$posterid}'>" . $postername . "</a>" . ($arr['enabled'] == 'no' ? "<img src='" . $INSTALLER09['pic_base_url'] . "disabled.gif' alt='This account is disabled' style='margin-left: 2px' />" : '') : "unknown[" . $posterid . "]") . "";
 }
 if (empty($avatar)) {
     $avatar = "<img src='" . $INSTALLER09['pic_base_url'] . $Multi_forum['configs']['forum_pics']['default_avatar'] . "' alt='Avatar' title='Avatar' />";
示例#12
0
    }
    header('Location: /pm_system.php?action=view_mailbox&box=-2&new_draft=1');
    die;
}
//=== end save draft
//=== Code for preview Retros code
if (isset($_POST['buttonval']) && $_POST['buttonval'] == 'preview') {
    $subject = htmlsafechars(trim($_POST['subject']));
    $draft = trim($_POST['body']);
    $preview = '
    <table border="0" cellspacing="0" cellpadding="5" align="center" style="max-width:800px">
    <tr>
        <td align="left" colspan="2" class="colhead"><span style="font-weight: bold;">subject: </span>' . htmlsafechars($subject) . '</td>
    </tr>
    <tr>
        <td align="center" valign="top" class="one" width="80px" id="photocol">' . avatar_stuff($CURUSER) . '</td>
        <td class="two" style="min-width:400px;padding:10px;vertical-align: top;text-align: left;">' . format_comment($draft) . '</td>
    </tr>
    </table><br />';
} else {
    //=== Get the info
    $res = sql_query('SELECT * FROM messages WHERE id=' . sqlesc($pm_id)) or sqlerr(__FILE__, __LINE__);
    $message = mysqli_fetch_assoc($res);
    $subject = htmlsafechars($message['subject']);
    $draft = $message['msg'];
}
//=== print out the page
//echo stdhead('Use Draft');
$HTMLOUT .= '<h1>Use Draft: ' . $subject . '</h1>' . $top_links . $preview . '
        <form name="compose" action="pm_system.php" method="post">
        <input type="hidden" name="id" value="' . $pm_id . '" />
示例#13
0
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&amp;id=' . (int) $row['request'] . '&amp;comment_id=' . (int) $row['comment_id'] . '">Edit</a>]' : '') . ($CURUSER['class'] >= UC_STAFF ? '
     - [<a href="requests.php?action=delete_comment&amp;id=' . (int) $row['request'] . '&amp;comment_id=' . (int) $row['comment_id'] . '">Delete</a>]' : '') . ($row['editedby'] && $CURUSER['class'] >= UC_STAFF ? '
     - [<a href="comment.php?action=vieworiginal&amp;cid=' . (int) $row['id'] . '">View original</a>]' : '') . ' 
    - [<a href="report.php?type=Request_Comment&amp;id_2=' . (int) $row['request'] . '&amp;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;
}
示例#14
0
    }
    header('Location: forums.php?action=view_topic&topic_id=' . $topic_id . ($extension_error !== 0 ? '&ee=' . $extension_error : '') . ($size_error !== 0 ? '&se=' . $size_error : ''));
    die;
}
$res = sql_query('SELECT name FROM forums WHERE id=' . $forum_id);
$arr = mysql_fetch_assoc($res);
$section_name = htmlentities($arr['name'], ENT_QUOTES);
$HTMLOUT .= '<table align="center" class="main" width="750px" border="0" cellspacing="0" cellpadding="0">
    	<tr><td class="embedded" align="center">
    	<h1 style="text-align: center;">New topic in "<a class="altlink" href="forums.php?action=view_forum&amp;forum_id=' . $forum_id . '">' . $section_name . '</a>"</h1>
	<form method="post" action="forums.php?action=new_topic&amp;forum_id=' . $forum_id . '" enctype="multipart/form-data">
	
	' . (isset($_POST['button']) && $_POST['button'] == 'Preview' ? '<br />
	<table align="center" width="80%" border="0" cellspacing="5" cellpadding="5">
	<tr><td class="forum_head" colspan="2"><span style="color: black; font-weight: bold;">Preview</span></td></tr>
	<tr><td width="80" valign="top" class="one">' . avatar_stuff($CURUSER) . '</td>
	<td valign="top" align="left" class="two">' . ($bb_code === 'yes' ? format_comment($body) : format_comment_no_bbcode($body)) . '</td>
	</tr></table><br />' : '') . '
	<table align="center" width="80%" border="0" cellspacing="0" cellpadding="5">
	<tr><td align="left" class="forum_head_dark" colspan="2">Compose</td></tr>
	<tr><td align="right" class="two"><span style="white-space:nowrap; font-weight: bold;">Icon</span></td>
	<td align="left" class="two">
	<table>
	<tr>
	<td class="two" align="center" valign="middle"><img src="pic/smilies/smile1.gif" alt="Smile" title="Smile" /></td>
	<td class="two" align="center" valign="middle"><img src="pic/smilies/grin.gif" alt="Grin" title="Grin" /></td>
	<td class="two" align="center" valign="middle"><img src="pic/smilies/tongue.gif" alt="Tongue" title="Tongue" /></td>
	<td class="two" align="center" valign="middle"><img src="pic/smilies/cry.gif" alt="Cry" title="Cry" /></td>
	<td class="two" align="center" valign="middle"><img src="pic/smilies/wink.gif" alt="Wink" title="Wink" /></td>
	<td class="two" align="center" valign="middle"><img src="pic/smilies/rolleyes.gif" alt="Roll eyes" title="Roll eyes" /></td>
	<td class="two" align="center" valign="middle"><img src="pic/smilies/blink.gif" alt="Blink" title="Blink" /></td>
示例#15
0
      				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="&#9658;" title="&#9658;" /> 
			<a class="altlink" href="forums.php?action=view_forum&amp;forum_id=' . $forum_id . '">' . htmlentities($arr['forum_name'], ENT_QUOTES) . '</a>
			<img src="pic/arrow_next.gif" alt="&#9658;" title="&#9658;" /> 
			<a class="altlink" href="forums.php?action=view_topic&amp;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 !== '' ? '&nbsp;&nbsp;&nbsp;&nbsp; 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;
示例#16
0
    }
    header('Location: pm_system.php?action=view_message&new_draft=1&id=' . $new_draft_id);
    die;
}
//=== end save draft
//=== Code for preview Retros code
if (isset($_POST['buttonval']) && $_POST['buttonval'] == 'preview') {
    $subject = htmlsafechars(trim($_POST['subject']));
    $draft = htmlsafechars(trim($_POST['body']));
    $preview = '
    <table class="table table-striped">
    <tr>
        <td colspan="2" class="text-left"><span style="font-weight: bold;">subject: </span>' . htmlsafechars($subject) . '</td>
    </tr>
    <tr>
        <td valign="top" class="text-center" width="80px" id="photocol">' . avatar_stuff($CURUSER) . '</td>
        <td class="text-left" style="min-width:400px;padding:10px;vertical-align: top;">' . format_comment($draft) . '</td>
    </tr>
    </table><br>';
}
//=== print out the page
$HTMLOUT .= '
<h1>' . $lang['pm_draft_new'] . '</h1>' . $top_links . $preview . '
        <form name="compose" action="pm_system.php" method="post">
        <input type="hidden" name="id" value="' . $pm_id . '" />
        <input type="hidden" name="action" value="new_draft" />
    <table class="table table-striped">
    <tr>
        <td class="text-left" colspan="2">' . $lang['pm_draft_add'] . '</td>
    </tr>
    <tr>