コード例 #1
0
ファイル: forums.php プロジェクト: CptTZ/NexusPHP-1
     if ($highlight) {
         $body = highlight($highlight, $body);
     }
     if (is_valid_id($arr['editedby'])) {
         $lastedittime = gettime($arr['editdate'], true, false);
         $body .= "<br /><p><font class=\"small\">" . $lang_forums['text_last_edited_by'] . get_username($arr['editedby']) . $lang_forums['text_last_edit_at'] . $lastedittime . "</font></p>\n";
     }
     $body .= "</div>";
 } else {
     $body = "<div id=\"pid" . $postid . "body\">" . format_comment($lang_forums['text_cannot_view']) . "</div>";
 }
 if ($signature) {
     $body .= "<p style='vertical-align:bottom'><br />____________________<br />" . format_comment($signature, false, false, false, true, 500, true, true, 1, 200) . "</p>";
 }
 $stats = "<br />" . "&nbsp;&nbsp;" . $lang_forums['text_posts'] . "{$forumposts}<br />" . "&nbsp;&nbsp;" . $lang_forums['text_ul'] . "{$uploaded} <br />" . "&nbsp;&nbsp;" . $lang_forums['text_dl'] . "{$downloaded}<br />" . "&nbsp;&nbsp;" . $lang_forums['text_ratio'] . "{$ratio}";
 print "<tr><td class=\"rowfollow\" width=\"150\" valign=\"top\" align=\"left\" style='padding: 0px'>" . return_avatar_image($avatar) . "<br /><br /><br />&nbsp;&nbsp;<img alt=\"" . get_user_class_name($arr2["class"], false, false, true) . "\" title=\"" . get_user_class_name($arr2["class"], false, false, true) . "\" src=\"" . $uclass . "\" />" . $stats . "</td><td class=\"rowfollow\" valign=\"top\"><br />" . $body . "</td></tr>\n";
 $secs = 900;
 $dt = sqlesc(date("Y-m-d H:i:s", TIMENOW - $secs));
 // calculate date.
 print "<tr><td class=\"rowfollow\" align=\"center\" valign=\"middle\">" . ("'" . $arr2['last_access'] . "'" > $dt && $arr2['showonline'] == "yes" ? "<img class=\"f_online\" src=\"pic/trans.gif\" alt=\"Online\" title=\"" . $lang_forums['title_online'] . "\" />" : "<img class=\"f_offline\" src=\"pic/trans.gif\" alt=\"Offline\" title=\"" . $lang_forums['title_offline'] . "\" />") . "<a href=\"sendmessage.php?receiver=" . htmlspecialchars(trim($arr2["id"])) . "\"><img class=\"f_pm\" src=\"pic/trans.gif\" alt=\"PM\" title=\"" . $lang_forums['title_send_message_to'] . htmlspecialchars($arr2["username"]) . "\" /></a><a href=\"report.php?forumpost={$postid}\"><img class=\"f_report\" src=\"pic/trans.gif\" alt=\"Report\" title=\"" . $lang_forums['title_report_this_post'] . "\" /></a></td>";
 print "<td class=\"toolbox\" align=\"right\">";
 if ($maypost) {
     //print("<a id=\"sendbonus\" href=\"".htmlspecialchars("javascript: sendbonus(".$postid.");")."\">送米</a>");
     //print("<div style=\"display:inline-block;vertical-align:top;margin-top:2px;\">");
     //print("<select name=\"bonus\">");
     //print("<option value=500>500</option>");
     //print("<option value=1000 selected=\"selected\">1000</option>");
     //print("<option value=2000 >2000</option>");
     //print("</select>");
     //print("<button id=\"btnbonus\" onclick=\"javascript: sendbonus(this, $posterid);\">赠送魔力值</button>");
     //print("</div>");
コード例 #2
0
ファイル: functions.php プロジェクト: skygunner/ekucms
function commenttable($rows, $type, $parent_id, $review = false)
{
    global $lang_functions;
    global $CURUSER, $commanage_class;
    global $Advertisement;
    begin_main_frame();
    begin_frame();
    $count = 0;
    if ($Advertisement->enable_ad()) {
        $commentad = $Advertisement->get_ad('comment');
    }
    foreach ($rows as $row) {
        $userRow = get_user_row($row['user']);
        if ($count >= 1) {
            if ($Advertisement->enable_ad()) {
                if ($commentad[$count - 1]) {
                    echo "<div align=\"center\" style=\"margin-top: 10px\" id=\"ad_comment_" . $count . "\">" . $commentad[$count - 1] . "</div>";
                }
            }
        }
        print "<div style=\"margin-top: 8pt; margin-bottom: 8pt;\"><table id=\"cid" . $row["id"] . "\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr><td class=\"embedded\" width=\"99%\">#" . $row["id"] . "&nbsp;&nbsp;<font color=\"gray\">" . $lang_functions['text_by'] . "</font>";
        print get_username($row["user"], false, true, true, false, false, true);
        print "&nbsp;&nbsp;<font color=\"gray\">" . $lang_functions['text_at'] . "</font>" . gettime($row["added"]) . ($row["editedby"] && get_user_class() >= $commanage_class ? " - [<a href=\"comment.php?action=vieworiginal&amp;cid=" . $row[id] . "&amp;type=" . $type . "\">" . $lang_functions['text_view_original'] . "</a>]" : "") . "</td><td class=\"embedded nowrap\" width=\"1%\"><a href=\"#top\"><img class=\"top\" src=\"pic/trans.gif\" alt=\"Top\" title=\"Top\" /></a>&nbsp;&nbsp;</td></tr></table></div>";
        $avatar = $CURUSER["avatars"] == "yes" ? htmlspecialchars(trim($userRow["avatar"])) : "";
        if (!$avatar) {
            $avatar = "pic/default_avatar.png";
        }
        $text = format_comment($row["text"]);
        $text_editby = "";
        if ($row["editedby"]) {
            $lastedittime = gettime($row['editdate'], true, false);
            $text_editby = "<br /><p><font class=\"small\">" . $lang_functions['text_last_edited_by'] . get_username($row['editedby']) . $lang_functions['text_edited_at'] . $lastedittime . "</font></p>\n";
        }
        print "<table class=\"main\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"5\">\n";
        $secs = 900;
        $dt = sqlesc(date("Y-m-d H:i:s", TIMENOW - $secs));
        // calculate date.
        print "<tr>\n";
        print "<td class=\"rowfollow\" width=\"150\" valign=\"top\" style=\"padding: 0px;\">" . return_avatar_image($avatar) . "</td>\n";
        print "<td class=\"rowfollow\" valign=\"top\"><br />" . $text . $text_editby . "</td>\n";
        print "</tr>\n";
        $actionbar = "<a href=\"comment.php?action=add&amp;sub=quote&amp;cid=" . $row[id] . "&amp;pid=" . $parent_id . "&amp;type=" . $type . "\"><img class=\"f_quote\" src=\"pic/trans.gif\" alt=\"Quote\" title=\"" . $lang_functions['title_reply_with_quote'] . "\" /></a>" . "<a href=\"comment.php?action=add&amp;pid=" . $parent_id . "&amp;type=" . $type . "\"><img class=\"f_reply\" src=\"pic/trans.gif\" alt=\"Add Reply\" title=\"" . $lang_functions['title_add_reply'] . "\" /></a>" . (get_user_class() >= $commanage_class ? "<a href=\"comment.php?action=delete&amp;cid=" . $row[id] . "&amp;type=" . $type . "\"><img class=\"f_delete\" src=\"pic/trans.gif\" alt=\"Delete\" title=\"" . $lang_functions['title_delete'] . "\" /></a>" : "") . ($row["user"] == $CURUSER["id"] || get_user_class() >= $commanage_class ? "<a href=\"comment.php?action=edit&amp;cid=" . $row[id] . "&amp;type=" . $type . "\"><img class=\"f_edit\" src=\"pic/trans.gif\" alt=\"Edit\" title=\"" . $lang_functions['title_edit'] . "\" />" . "</a>" : "");
        print "<tr><td class=\"toolbox\"> " . ("'" . $userRow['last_access'] . "'" > $dt ? "<img class=\"f_online\" src=\"pic/trans.gif\" alt=\"Online\" title=\"" . $lang_functions['title_online'] . "\" />" : "<img class=\"f_offline\" src=\"pic/trans.gif\" alt=\"Offline\" title=\"" . $lang_functions['title_offline'] . "\" />") . "<a href=\"sendmessage.php?receiver=" . htmlspecialchars(trim($row["user"])) . "\"><img class=\"f_pm\" src=\"pic/trans.gif\" alt=\"PM\" title=\"" . $lang_functions['title_send_message_to'] . htmlspecialchars($userRow["username"]) . "\" /></a><a href=\"report.php?commentid=" . htmlspecialchars(trim($row["id"])) . "\"><img class=\"f_report\" src=\"pic/trans.gif\" alt=\"Report\" title=\"" . $lang_functions['title_report_this_comment'] . "\" /></a></td><td class=\"toolbox\" align=\"right\">" . $actionbar . "</td>";
        print "</tr></table>\n";
        $count++;
    }
    end_frame();
    end_main_frame();
}
コード例 #3
0
ファイル: userdetails.php プロジェクト: CptTZ/NexusPHP
 tr_small($lang_userdetails['row_transfer'], "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">" . $sr . $xfer . "</table>", 1);
 if ($user["leechtime"] > 0) {
     $slr = floor($user["seedtime"] / $user["leechtime"] * 1000) / 1000;
     $slr = "<tr><td class=\"embedded\"><strong>" . $lang_userdetails['text_seeding_leeching_time_ratio'] . "</strong>:  <font color=\"" . get_ratio_color($slr) . "\">" . number_format($slr, 3) . "</font></td><td class=\"embedded\">&nbsp;&nbsp;" . get_ratio_img($slr) . "</td></tr>";
 }
 $slt = "<tr><td class=\"embedded\"><strong>" . $lang_userdetails['text_seeding_time'] . "</strong>:  " . mkprettytime($user["seedtime"]) . "</td><td class=\"embedded\">&nbsp;&nbsp;<strong>" . $lang_userdetails['text_leeching_time'] . "</strong>:  " . mkprettytime($user["leechtime"]) . "</td></tr>";
 tr_small($lang_userdetails['row_sltime'], "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">" . $slr . $slt . "</table>", 1);
 if ($user["download"] && $user["upload"]) {
     tr_small($lang_userdetails['row_internet_speed'], $download . "&nbsp;&nbsp;&nbsp;&nbsp;" . $upload . "&nbsp;&nbsp;&nbsp;&nbsp;" . $isp, 1);
 }
 tr_small($lang_userdetails['row_gender'], $gender, 1);
 if (($user['donated'] > 0 || $user['donated_cny'] > 0) && (get_user_class() >= $userprofile_class || $CURUSER["id"] == $user["id"])) {
     tr_small($lang_userdetails['row_donated'], "\$" . htmlspecialchars($user[donated]) . "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" . htmlspecialchars($user[donated_cny]), 1);
 }
 if ($user["avatar"]) {
     tr_small($lang_userdetails['row_avatar'], return_avatar_image(htmlspecialchars(trim($user["avatar"]))), 1);
 }
 $uclass = get_user_class_image($user["class"]);
 tr_small($lang_userdetails['row_class'], "<img alt=\"" . get_user_class_name($user["class"], false, false, true) . "\" title=\"" . get_user_class_name($user["class"], false, false, true) . "\" src=\"" . $uclass . "\" /> " . ($user[title] !== "" ? "&nbsp;" . htmlspecialchars(trim($user["title"])) . "" : ""), 1);
 tr_small($lang_userdetails['row_torrent_comment'], $torrentcomments && ($user["id"] == $CURUSER["id"] || get_user_class() >= $viewhistory_class) ? "<a href=\"userhistory.php?action=viewcomments&amp;id=" . $id . "\" title=\"" . $lang_userdetails['link_view_comments'] . "\">" . $torrentcomments . "</a>" : $torrentcomments, 1);
 tr_small($lang_userdetails['row_forum_posts'], $forumposts && ($user["id"] == $CURUSER["id"] || get_user_class() >= $viewhistory_class) ? "<a href=\"userhistory.php?action=viewposts&amp;id=" . $id . "\" title=\"" . $lang_userdetails['link_view_posts'] . "\">" . $forumposts . "</a>" : $forumposts, 1);
 if ($user["id"] == $CURUSER["id"] || get_user_class() >= $viewhistory_class) {
     tr_small($lang_userdetails['row_karma_points'], htmlspecialchars($user[seedbonus]), 1);
 }
 if ($user["ip"] && (get_user_class() >= $torrenthistory_class || $user["id"] == $CURUSER["id"])) {
     tr_small($lang_userdetails['row_uploaded_torrents'], "<a href=\"javascript: getusertorrentlistajax('" . $user['id'] . "', 'uploaded', 'ka'); klappe_news('a')\"><img class=\"plus\" src=\"pic/trans.gif\" id=\"pica\" alt=\"Show/Hide\" title=\"" . $lang_userdetails['title_show_or_hide'] . "\" />   <u>" . $lang_userdetails['text_show_or_hide'] . "</u></a><div id=\"ka\" style=\"display: none;\"></div>", 1);
     tr_small($lang_userdetails['row_current_seeding'], "<a href=\"javascript: getusertorrentlistajax('" . $user['id'] . "', 'seeding', 'ka1'); klappe_news('a1')\"><img class=\"plus\" src=\"pic/trans.gif\" id=\"pica1\" alt=\"Show/Hide\" title=\"" . $lang_userdetails['title_show_or_hide'] . "\" />   <u>" . $lang_userdetails['text_show_or_hide'] . "</u></a><div id=\"ka1\" style=\"display: none;\"></div>", 1);
     tr_small($lang_userdetails['row_current_leeching'], "<a href=\"javascript: getusertorrentlistajax('" . $user['id'] . "', 'leeching', 'ka2'); klappe_news('a2')\"><img class=\"plus\" src=\"pic/trans.gif\" id=\"pica2\" alt=\"Show/Hide\" title=\"" . $lang_userdetails['title_show_or_hide'] . "\" />   <u>" . $lang_userdetails['text_show_or_hide'] . "</u></a><div id=\"ka2\" style=\"display: none;\"></div>", 1);
     tr_small($lang_userdetails['row_completed_torrents'], "<a href=\"javascript: getusertorrentlistajax('" . $user['id'] . "', 'completed', 'ka3'); klappe_news('a3')\"><img class=\"plus\" src=\"pic/trans.gif\" id=\"pica3\" alt=\"Show/Hide\" title=\"" . $lang_userdetails['title_show_or_hide'] . "\" />   <u>" . $lang_userdetails['text_show_or_hide'] . "</u></a><div id=\"ka3\" style=\"display: none;\"></div>", 1);
     tr_small($lang_userdetails['row_incomplete_torrents'], "<a href=\"javascript: getusertorrentlistajax('" . $user['id'] . "', 'incomplete', 'ka4'); klappe_news('a4')\"><img class=\"plus\" src=\"pic/trans.gif\" id=\"pica4\" alt=\"Show/Hide\" title=\"" . $lang_userdetails['title_show_or_hide'] . "\" />   <u>" . $lang_userdetails['text_show_or_hide'] . "</u></a><div id=\"ka4\" style=\"display: none;\"></div>", 1);
 }
コード例 #4
0
ファイル: forums.php プロジェクト: NullYing/mtpt
		if ($highlight){
			$body = highlight($highlight,$body);
		}

		if (is_valid_id($arr['editedby']))
		{
			$lastedittime = gettime($arr['editdate'],true,false);
			$body .= "<br /><p><font class=\"small\">".$lang_forums['text_last_edited_by'].get_username($arr['editedby']).$lang_forums['text_last_edit_at'].$lastedittime."</font></p>\n";
		}
		$body .= "</div>";
		if ($signature)
		$body .= "<p style='vertical-align:bottom'><br />____________________<br />" . format_comment($signature,false,false,false,true,500,true,false, 1,200) . "</p>";

		$stats = "<br />"."&nbsp;&nbsp;".$lang_forums['text_posts']."$forumposts<br />"."&nbsp;&nbsp;".$lang_forums['text_magic'].$magic."<br />"."&nbsp;&nbsp;".$lang_forums['text_ul']."$uploaded <br />"."&nbsp;&nbsp;".$lang_forums['text_dl']."$downloaded<br />"."&nbsp;&nbsp;".$lang_forums['text_ratio']."$ratio";
		print("<tr><td class=\"rowfollow\" width=\"150\" valign=\"top\" align=\"left\" style='padding: 0px'>" .
		return_avatar_image($avatar). "<br /><br /><br />&nbsp;&nbsp;<img alt=\"".get_user_class_name($arr2["class"],false,false,true)."\" title=\"".get_user_class_name($arr2["class"],false,false,true)."\" src=\"".$uclass."\" />".$stats."</td><td class=\"rowfollow\" valign=\"top\"><br />".$body."</td></tr>\n");
		$secs = 900;
		$dt = sqlesc(date("Y-m-d H:i:s",(TIMENOW - $secs))); // calculate date.

	
		print("<tr><td class=\"rowfollow\" align=\"center\" valign=\"top\">".("'".$arr2['last_access']."'">$dt?"<img class=\"f_online\" src=\"pic/trans.gif\" alt=\"Online\" title=\"".$lang_forums['title_online']."\" />":"<img class=\"f_offline\" src=\"pic/trans.gif\" alt=\"Offline\" title=\"".$lang_forums['title_offline']."\" />" )."<a href=\"sendmessage.php?receiver=".htmlspecialchars(trim($arr2["id"]))."\"><img class=\"f_pm\" src=\"pic/trans.gif\" alt=\"PM\" title=\"".$lang_forums['title_send_message_to'].htmlspecialchars($arr2["username"])."\" /></a><a href=\"report.php?forumpost=$postid\"><img class=\"f_report\" src=\"pic/trans.gif\" alt=\"Report\" title=\"".$lang_forums['title_report_this_post']."\" /></a></td>");
		print("<td class=\"toolbox\" align=\"right\">");
$thisusername = get_username($posterid,false,true,true,false,false,true,"",false,true);
if($thisusername != $CURUSER['username']){
?>
<span >
<form id="giftform" action="mybonus.php?action=exchange" method="post" >
<b style="float:left"></b>
<input type="hidden" id="option" name="option" value="7" />
<input type="hidden" name="bonusgift" id="bonusgift" style="width: 80px" value="30"/>
<input type="hidden" id="where" name="where" value="[b]论坛[/b]->[b]<?php echo $forumname?>[/b]版块->[url=<?php echo htmlspecialchars("forums.php?action=viewtopic&topicid=".$topicid."&page=p".$postid."#pid".$postid)."]".$subject."[/url]帖子";?> "/>