本文整理汇总了PHP中end_frame函数的典型用法代码示例。如果您正苦于以下问题:PHP end_frame函数的具体用法?PHP end_frame怎么用?PHP end_frame使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了end_frame函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: commenttable_new
function commenttable_new($rows)
{
global $CURUSER, $HTTP_SERVER_VARS;
begin_main_frame();
begin_frame();
$count = 0;
foreach ($rows as $row) {
$subres = mysql_query("SELECT name from torrents where id=" . unsafeChar($row["torrent"])) or sqlerr(__FILE__, __LINE__);
$subrow = mysql_fetch_array($subres);
print "<br /><a href=\"details.php?id=" . safeChar($row["torrent"]) . "\">" . safeChar($subrow["name"]) . "</a><br />\n";
print "<p class=sub>#" . $row["id"] . " by ";
if (isset($row["username"])) {
print "<a name=comm" . $row["id"] . " href=userdetails.php?id=" . safeChar($row["user"]) . "><b>" . safechar($row["username"]) . "</b></a>" . ($row["warned"] == "yes" ? "<img src=" . "pic/warned.gif alt=\"Warned\">" : "");
} else {
print "<a name=\"comm" . safeChar($row["id"]) . "\"><i>(orphaned)</i></a>\n";
}
print " at " . safeChar($row["added"]) . " GMT" . "- [<a href=comment.php?action=edit&cid={$row['id']}>Edit</a>]" . "- [<a href=deletecomment.php?id={$row['id']}>Delete</a>]</p>\n";
$avatar = $CURUSER["avatars"] == "yes" ? safechar($row["avatar"]) : "";
if (!$avatar) {
$avatar = "pic/default_avatar.gif";
}
begin_table(true);
print "<tr valign=top>\n";
print "<td align=center width=150 style='padding: 0px'><img width=150 src={$avatar}></td>\n";
print "<td class=text>" . format_comment($row["text"]) . "</td>\n";
print "</tr>\n";
end_table();
}
end_frame();
end_main_frame();
}
开发者ID:ZenoX2012,项目名称:CyBerFuN-CoDeX,代码行数:31,代码来源:torrentcomments.php
示例2: Copyright
/**
|--------------------------------------------------------------------------|
| https://github.com/Bigjoos/ |
|--------------------------------------------------------------------------|
| Licence Info: GPL |
|--------------------------------------------------------------------------|
| Copyright (C) 2010 U-232 V4 |
|--------------------------------------------------------------------------|
| A bittorrent tracker source based on TBDev.net/tbsource/bytemonsoon. |
|--------------------------------------------------------------------------|
| Project Leaders: Mindless,putyn. |
|--------------------------------------------------------------------------|
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/ \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
( U | - | 2 | 3 | 2 )-( S | o | u | r | c | e )-( C | o | d | e )
\_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
*/
function rsstfreakinfo()
{
require_once INCL_DIR . 'html_functions.php';
global $INSTALLER09;
$html = '';
$use_limit = true;
$limit = 5;
$xml = file_get_contents('http://feed.torrentfreak.com/Torrentfreak/');
$html = begin_main_frame() . begin_frame('Torrent Freak news');
$icount = 1;
$doc = new DOMDocument();
@$doc->loadXML($xml);
$items = $doc->getElementsByTagName('item');
foreach ($items as $item) {
$html .= '<h3><u>' . $item->getElementsByTagName('title')->item(0)->nodeValue . '</u></h3><font class="small">by ' . str_replace(array('<![CDATA[', ']]>'), '', $item->getElementsByTagName('creator')->item(0)->nodeValue) . ' on ' . $item->getElementsByTagName('pubDate')->item(0)->nodeValue . '</font><br />' . str_replace(array('<![CDATA[', ']]>'), '', $item->getElementsByTagName('description')->item(0)->nodeValue) . '<br /><a href="' . $item->getElementsByTagName('link')->item(0)->nodeValue . '" target="_blank"><font class="small">Read more</font></a>';
if ($use_limit && $icount == $limit) {
break;
}
$icount++;
}
$html = str_replace(array('“', '”'), '"', $html);
$html = str_replace(array("’", "‘", "‘"), "'", $html);
$html = str_replace("–", "-", $html);
$html .= end_frame() . end_main_frame();
return $html;
}
开发者ID:UniversalAdministrator,项目名称:U-232-V4,代码行数:43,代码来源:tfreak.php
示例3: bjtable
function bjtable($res, $frame_caption)
{
begin_frame($frame_caption, true);
begin_table();
?>
<tr>
<td class="colhead">Rank</td>
<td align="left" class="colhead">User</td>
<td align="right" class="colhead">Wins</td>
<td align="right" class="colhead">Losses</td>
<td align="right" class="colhead">Games</td>
<td align="right" class="colhead">Percentage</td>
<td align="right" class="colhead">Win/Loss</td>
</tr>
<?php
$num = 0;
while ($a = mysql_fetch_assoc($res)) {
++$num;
//Calculate Win %
$win_perc = number_format($a[wins] / $a[games] * 100, 1);
// Add a user's +/- statistic
$plus_minus = $a[wins] - $a[losses];
if ($plus_minus >= 0) {
$plus_minus = mksize(($a[wins] - $a[losses]) * 100 * 1024 * 1024);
} else {
$plus_minus = "-";
$plus_minus .= mksize(($a[losses] - $a[wins]) * 100 * 1024 * 1024);
}
print "<tr><td>{$num}</td><td align=left><table border=0 class=main cellspacing=0 cellpadding=0><tr><td class=embedded>" . "<b><a href=userdetails.php?id=" . $a[id] . ">" . $a[username] . "</a></b></td>" . "</tr></table></td><td align=right>" . number_format($a[wins], 0) . "</td>" . "</td><td align=right>" . number_format($a[losses], 0) . "</td>" . "</td><td align=right>" . number_format($a[games], 0) . "</td>" . "</td><td align=right>{$win_perc}</td>" . "</td><td align=right>{$plus_minus}</td>" . "</tr>\n";
}
end_table();
end_frame();
}
开发者ID:ZenoX2012,项目名称:CyBerFuN-CoDeX,代码行数:33,代码来源:bjstats.php
示例4: bjtable
function bjtable($res, $frame_caption)
{
$htmlout = '';
$htmlout .= begin_frame($frame_caption, true);
$htmlout .= begin_table();
$htmlout .= "<tr>\r\n\t<td class='colhead'>Rank</td>\r\n\t<td class='colhead' align='left'>User</td>\r\n\t<td class='colhead' align='right'>Wins</td>\r\n\t<td class='colhead' align='right'>Losses</td>\r\n\t<td class='colhead' align='right'>Games</td>\r\n\t<td class='colhead' align='right'>Percentage</td>\r\n\t<td class='colhead' align='right'>Win/Loss</td>\r\n\t</tr>";
$num = 0;
while ($a = mysqli_fetch_assoc($res)) {
++$num;
//==Calculate Win %
$win_perc = number_format($a['wins'] / $a['games'] * 100, 1);
//==Add a user's +/- statistic
$plus_minus = $a['wins'] - $a['losses'];
if ($plus_minus >= 0) {
$plus_minus = mksize(($a['wins'] - $a['losses']) * 100 * 1024 * 1024);
} else {
$plus_minus = "-";
$plus_minus .= mksize(($a['losses'] - $a['wins']) * 100 * 1024 * 1024);
}
$htmlout .= "<tr><td>{$num}</td><td align='left'>" . "<b><a href='userdetails.php?id=" . $a['id'] . "'>" . $a['username'] . "</a></b></td>" . "<td align='right'>" . number_format($a['wins'], 0) . "</td>" . "<td align='right'>" . number_format($a['losses'], 0) . "</td>" . "<td align='right'>" . number_format($a['games'], 0) . "</td>" . "<td align='right'>{$win_perc}</td>" . "<td align='right'>{$plus_minus}</td>" . "</tr>\n";
}
$htmlout .= end_table();
$htmlout .= end_frame();
return $htmlout;
}
开发者ID:CharlieHD,项目名称:U-232-V3,代码行数:25,代码来源:bjstats.php
示例5: showerror
function showerror($heading = "Error", $text, $sort = "Error")
{
stdhead("{$sort}: {$heading}");
begin_frame("<font class='error'>{$sort}: {$heading}</font>");
echo $text;
end_frame();
stdfoot();
die;
}
开发者ID:Arkhana,项目名称:TorrentTrader2.08,代码行数:9,代码来源:forums.php
示例6: insert_smilies_frame
function insert_smilies_frame()
{
global $smilies, $DEFAULTBASEURL;
begin_frame("Смайлы", true);
begin_table(false, 5);
print "<tr><td class=\"colhead\">Написание</td><td class=\"colhead\">Смайл</td></tr>\n";
while (list($code, $url) = each($smilies)) {
print "<tr><td>{$code}</td><td><img src=\"{$DEFAULTBASEURL}/pic/smilies/{$url}\"></td>\n";
}
end_table();
end_frame();
}
开发者ID:klldll,项目名称:tbdev,代码行数:12,代码来源:template.php
示例7: insert_smilies_frame
function insert_smilies_frame()
{
global $smilies, $BASEURL;
begin_frame("Smilies", true);
begin_table(false, 5);
print "<tr><td class=colhead>Type...</td><td class=colhead>To make a...</td></tr>\n";
while (list($code, $url) = each($smilies)) {
print "<tr><td>{$code}</td><td><img src={$BASEURL}/pic/smilies/{$url}></td>\n";
}
end_table();
end_frame();
}
开发者ID:ZenoX2012,项目名称:CyBerFuN-CoDeX,代码行数:12,代码来源:template.php
示例8: insert_smilies_frame
function insert_smilies_frame()
{
global $smilies, $BASEURL, $pic_base_url;
begin_frame("Smilies", true);
begin_table(false, 5);
print "<tr><td class='colhead'>Type...</td><td class='colhead'>To make a...</td></tr>\n";
while (list($code, $url) = each($smilies)) {
print "<tr><td>{$code}</td><td><img src=\"{$pic_base_url}smilies/{$url}\" alt='' /></td></tr>\n";
}
end_table();
end_frame();
}
开发者ID:CtrlSystem,项目名称:biotorrents,代码行数:12,代码来源:html_functions.php
示例9: insert_smilies_frame
function insert_smilies_frame()
{
global $smilies, $INSTALLER09;
$htmlout = '';
$htmlout .= begin_frame("Smilies", true);
$htmlout .= begin_table(false, 5);
$htmlout .= "<tr><td class='colhead'>Type...</td><td class='colhead'>To make a...</td></tr>\n";
foreach ($smilies as $code => $url) {
$htmlout .= "<tr><td>{$code}</td><td><img src=\"{$INSTALLER09['pic_base_url']}smilies/{$url}\" alt='' /></td></tr>\n";
}
$htmlout .= end_table();
$htmlout .= end_frame();
return $htmlout;
}
开发者ID:CharlieHD,项目名称:U-232-V3,代码行数:14,代码来源:html_functions.php
示例10: reqcommenttable
function reqcommenttable($rows)
{
global $CURUSER, $HTTP_SERVER_VARS;
begin_main_frame();
begin_frame();
$count = 0;
foreach ($rows as $row) {
print("<p class=sub>#" . $row["id"] . " bY: ");
if (isset($row["username"])) {
$username = $row["username"];
$ratres = mysql_query("SELECT uploaded, downloaded FROM users WHERE username='$username'");
$rat = mysql_fetch_array($ratres);
if ($rat["downloaded"] > 0) {
$ratio = $rat['uploaded'] / $rat['downloaded'];
$ratio = number_format($ratio, 3);
$color = get_ratio_color($ratio);
if ($color)
$ratio = "<font color=$color>$ratio</font>";
} else
if ($rat["uploaded"] > 0)
$ratio = "Inf.";
else
$ratio = "---";
$title = $row["title"];
if ($title == "")
$title = get_user_class_name($row["class"]);
else
$title = htmlspecialchars($title);
print("<a name=comm".$row["id"]." href=userdetails.php?id=".$row["user"]."><b>".htmlspecialchars($row["username"])."</b></a>".($row["donor"] == "yes" ? "<img src=pic/star.gif alt='Donor'>" : "").($row["warned"] == "yes" ? "<img src="."/pic/warned.gif alt=\"Warned\">" : "")." ($title) (Ratio: $ratio)\n");
} else
print("<a name=\"comm" . $row["id"] . "\"><i>(orphaned)</i></a>\n");
print(" at " . $row["added"] . " GMT" .($row["user"] == $CURUSER["id"] || get_user_class() >= UC_MODERATOR ? "- [<a href=reqcomment.php?action=edit&cid=$row[id]>Edit</a>]" : "") .(get_user_class() >= UC_MODERATOR ? "- [<a href=reqcomment.php?action=delete&cid=$row[id]>Delete</a>]" : "") . "</p>\n");$avatar = ($CURUSER["avatars"] == "yes" ? htmlspecialchars($row["avatar"]) : "");
if (!$avatar)
$avatar = "/pic/default_avatar.gif";
$text = format_comment($row["text"]);
begin_table(true);
print("<tr valign=top>\n");
print("<td align=center width=150 style='padding: 0px'><img width=150 src=$avatar></td>\n");
print("<td class=text>$text</td>\n");
print("</tr>\n");
end_table();
}
end_frame();
end_main_frame();
}
开发者ID:herrag33k,项目名称:TomTorrent,代码行数:47,代码来源:reqdetails.php
示例11: rsstfreakinfo
/**
* https://09source.kicks-ass.net:8443/svn/installer09/
* Licence Info: GPL
* Copyright (C) 2010 Installer09 v.2
* A bittorrent tracker source based on TBDev.net/tbsource/bytemonsoon.
* Project Leaders: Mindless,putyn,kidvision.
**/
function rsstfreakinfo()
{
require_once INCL_DIR . 'html_functions.php';
global $TBDEV;
$html = '';
$use_limit = true;
$limit = 5;
$xml = file_get_contents('http://feed.torrentfreak.com/Torrentfreak/');
preg_match_all('/\\<(title|pubDate|dc:creator|link|description)\\>(.+?)\\<\\/\\1\\>/i', $xml, $out, PREG_PATTERN_ORDER);
$feeds = $out[2];
$c = count($feeds);
$html = begin_main_frame() . begin_frame('Torrent Freak news');
for ($i = 5; $i < $c; $i += 5) {
$html .= '<h3><u>' . $feeds[$i] . '</u></h3><font class="small">by ' . $feeds[$i + 3] . ' on ' . $feeds[$i + 2] . '</font><br /><p>' . str_replace(array('<![CDATA[', ']]>'), '', $feeds[$i + 4]) . '</p><br /><a href="' . $feeds[$i + 1] . '" target="_blank"><font class="small">Read more</font></a>';
if ($use_limit && $i >= $limit * 5) {
break;
}
}
$html .= end_frame() . end_main_frame();
return $html;
}
开发者ID:CharlieHD,项目名称:U-232-V2,代码行数:28,代码来源:tfreak.php
示例12: usercommenttable
function usercommenttable($rows)
{
$htmlout = '';
global $CURUSER, $INSTALLER09, $userid, $lang;
$htmlout .= "<table class='main' width='750' border='0' cellspacing='0' cellpadding='0'>" . "<tr><td class='embedded'>";
$htmlout .= begin_frame();
$count = 0;
foreach ($rows as $row) {
$htmlout .= "<p class='sub'>#" . (int) $row["id"] . " by ";
if (isset($row["username"])) {
$title = $row["title"];
if ($title == "") {
$title = get_user_class_name($row["class"]);
} else {
$title = htmlsafechars($title);
}
$htmlout .= "<a name='comm" . (int) $row['id'] . "' href='userdetails.php?id=" . (int) $row['user'] . "'><b>" . htmlsafechars($row['username']) . "</b></a>" . ($row["donor"] == "yes" ? "<img src=\"{$INSTALLER09['pic_base_url']}star.gif\" alt='{$lang['userdetails_donor']}' />" : "") . ($row["warned"] >= "1" ? "<img src=" . "\"{$INSTALLER09['pic_base_url']}warned.gif\" alt=\"{$lang['userdetails_warned']}\" />" : "") . " ({$title})\n";
} else {
$htmlout .= "<a name=\"comm" . (int) $row["id"] . "\"><i>{$lang['userdetails_orphaned']}</i></a>\n";
}
$htmlout .= " " . get_date($row["added"], 'DATE', 0, 1) . "" . ($userid == $CURUSER["id"] || $row["user"] == $CURUSER["id"] || $CURUSER['class'] >= UC_STAFF ? " - [<a href='usercomment.php?action=edit&cid=" . (int) $row['id'] . "'>{$lang['userdetails_comm_edit']}</a>]" : "") . ($userid == $CURUSER["id"] || $CURUSER['class'] >= UC_STAFF ? " - [<a href='usercomment.php?action=delete&cid=" . (int) $row['id'] . "'>{$lang['userdetails_comm_delete']}</a>]" : "") . ($row["editedby"] && $CURUSER['class'] >= UC_STAFF ? " - [<a href='usercomment.php?action=vieworiginal&cid=" . (int) $row['id'] . "'>{$lang['userdetails_comm_voriginal']}</a>]" : "") . "</p>\n";
$avatar = $CURUSER["avatars"] == "yes" ? htmlsafechars($row["avatar"]) : "";
if (!$avatar) {
$avatar = "{$INSTALLER09['pic_base_url']}default_avatar.gif";
}
$text = format_comment($row["text"]);
if ($row["editedby"]) {
$text .= "<font size='1' class='small'><br /><br />{$lang['userdetails_comm_ledited']}<a href='userdetails.php?id=" . (int) $row['editedby'] . "'><b>" . htmlsafechars($row['username']) . "</b></a> " . get_date($row['editedat'], 'DATE', 0, 1) . "</font>\n";
}
$htmlout .= "<table width='100%' border='1' cellspacing='0' cellpadding='5'>";
$htmlout .= "<tr valign='top'>\n";
$htmlout .= "<td align='center' width='150' style='padding:0px'><img width='150' src=\"{$avatar}\" alt=\"Avatar\" /></td>\n";
$htmlout .= "<td class='text'>{$text}</td>\n";
$htmlout .= "</tr>\n";
$htmlout .= "</table>";
}
$htmlout .= end_frame();
$htmlout .= "</td></tr></table>";
return $htmlout;
}
开发者ID:UniversalAdministrator,项目名称:U-232-V4,代码行数:40,代码来源:usercomments.php
示例13: usercommenttable
function usercommenttable($rows)
{
global $CURUSER, $pic_base_url, $userid;
begin_main_frame();
begin_frame();
$count = 0;
foreach ($rows as $row) {
print "<p class=sub>#" . $row["id"] . " by ";
if (isset($row["username"])) {
$title = $row["title"];
if ($title == "") {
$title = get_user_class_name($row["class"]);
} else {
$title = htmlspecialchars($title);
}
print "<a name=comm" . $row["id"] . " href=userdetails.php?id=" . $row["user"] . "><b>" . htmlspecialchars($row["username"]) . "</b></a>" . ($row["donor"] == "yes" ? "<img src=\"{$pic_base_url}star.gif\" alt='Donor'>" : "") . ($row["warned"] == "yes" ? "<img src=" . "\"{$pic_base_url}warned.gif\" alt=\"Warned\">" : "") . " ({$title})\n";
} else {
print "<a name=\"comm" . $row["id"] . "\"><i>(orphaned)</i></a>\n";
}
print " at " . $row["added"] . " GMT" . ($userid == $CURUSER["id"] || $row["user"] == $CURUSER["id"] || get_user_class() >= UC_MODERATOR ? "- [<a href=usercomment.php?action=edit&cid={$row['id']}>Edit</a>]" : "") . ($userid == $CURUSER["id"] || get_user_class() >= UC_MODERATOR ? "- [<a href=usercomment.php?action=delete&cid={$row['id']}>Delete</a>]" : "") . ($row["editedby"] && get_user_class() >= UC_MODERATOR ? "- [<a href=usercomment.php?action=vieworiginal&cid={$row['id']}>View original</a>]" : "") . "</p>\n";
$avatar = $CURUSER["avatars"] == "yes" ? htmlspecialchars($row["avatar"]) : "";
// if (!$avatar)
// $avatar = "{$pic_base_url}default_avatar.gif";
$text = format_comment($row["text"]);
if ($row["editedby"]) {
$text .= "<p><font size=1 class=small>Last edited by <a href=userdetails.php?id={$row['editedby']}><b>{$row['username']}</b></a> at {$row['editedat']} GMT</font></p>\n";
}
begin_table(true);
print "<tr valign=top>\n";
print "<td align=center width=150 style='padding: 0px'><img width=150 src=\"{$avatar}\"></td>\n";
print "<td class=text>{$text}</td>\n";
print "</tr>\n";
end_table();
}
end_frame();
end_main_frame();
}
开发者ID:ZenoX2012,项目名称:CyBerFuN-CoDeX,代码行数:37,代码来源:userfriends.php
示例14: class_check
}
require_once INCL_DIR . 'user_functions.php';
require_once INCL_DIR . 'html_functions.php';
require_once CLASS_DIR . 'class_check.php';
class_check(UC_ADMINISTRATOR);
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$limits = isset($_POST['limit']) && is_array($_POST['limit']) ? $_POST['limit'] : 0;
foreach ($limits as $class => $limit) {
if ($limit == 0) {
unset($limits[$class]);
}
}
if (file_put_contents($INSTALLER09['flood_file'], serialize($limits))) {
header('Refresh: 2; url=/staffpanel.php?tool=floodlimit');
stderr('Success', 'Limits saved! returning to main page');
} else {
stderr('Err', 'Something went wrong make sure ' . $_file . ' exists and it is chmoded 0777');
}
} else {
if (!file_exists($INSTALLER09['flood_file']) || !is_array($limit = unserialize(file_get_contents($INSTALLER09['flood_file'])))) {
$limit = array();
}
$out = begin_main_frame() . begin_frame('Edit flood limit');
$out .= '<form method=\'post\' action=\'\' ><table width=\'60%\' align=\'center\'><tr><td class=\'colhead\'>User class</td><td class=\'colhead\'>Limit</td></tr>';
for ($i = UC_MIN; $i <= UC_MAX; $i++) {
$out .= '<tr><td align=\'left\'>' . get_user_class_name($i) . '</td><td><input name=\'limit[' . $i . ']\' type=\'text\' size=\'10\' value=\'' . (isset($limit[$i]) ? $limit[$i] : 0) . '\'/></td></tr>';
}
$out .= '<tr><td colspan=\'2\'>Note if you want no limit for the user class set the limit to 0</td></tr><tr><td colspan=\'2\' class=\'colhead\'><input type=\'submit\' value=\'Save\' /></td></tr>';
$out .= '</table></form>' . end_frame() . end_main_frame();
echo stdhead('Flood limit') . $out . stdfoot();
}
开发者ID:CharlieHD,项目名称:U-232-V3,代码行数:31,代码来源:floodlimit.php
示例15: commenttable
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"] . " <font color=\"gray\">" . $lang_functions['text_by'] . "</font>";
print get_username($row["user"], false, true, true, false, false, true);
print " <font color=\"gray\">" . $lang_functions['text_at'] . "</font>" . gettime($row["added"]) . ($row["editedby"] && get_user_class() >= $commanage_class ? " - [<a href=\"comment.php?action=vieworiginal&cid=" . $row[id] . "&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> </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&sub=quote&cid=" . $row[id] . "&pid=" . $parent_id . "&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&pid=" . $parent_id . "&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&cid=" . $row[id] . "&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&cid=" . $row[id] . "&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();
}
开发者ID:skygunner,项目名称:ekucms,代码行数:49,代码来源:functions.php
示例16: insert_compose_frame
//.........这里部分代码省略.........
$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>\n\t\t\t\t<a href='forums.php'>Forums</a>\n\t\t\t\t>\n\t\t\t\t<a href='{$INSTALLER09['baseurl']}/forums.php?action=viewforum&forumid=" . $forumid . "'>{$forum}</a>\n\t\t\t\t>\n\t\t\t\t<a href='{$INSTALLER09['baseurl']}/forums.php?action=viewtopic&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&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;
}
开发者ID:Bigjoos,项目名称:U-232-V5,代码行数:101,代码来源:post_functions.php
示例17: switch
exit;
}
switch ($do) {
case "disabled":
$query = "SELECT id,username, class, downloaded, uploaded, IF(downloaded>0, round((uploaded/downloaded),2), '---') as ratio, disable_reason, added, last_access FROM users WHERE enabled='no' ORDER BY last_access DESC ";
$title = "Disable
|
请发表评论