当前位置: 首页>>代码示例>>PHP>>正文


PHP end_frame函数代码示例

本文整理汇总了PHP中end_frame函数的典型用法代码示例。如果您正苦于以下问题:PHP end_frame函数的具体用法?PHP end_frame怎么用?PHP end_frame使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了end_frame函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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&amp;cid=$row[id]>Edit</a>]" : "") .(get_user_class() >= UC_MODERATOR ? "- [<a href=reqcomment.php?action=delete&amp;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&amp;cid=" . (int) $row['id'] . "'>{$lang['userdetails_comm_edit']}</a>]" : "") . ($userid == $CURUSER["id"] || $CURUSER['class'] >= UC_STAFF ? " - [<a href='usercomment.php?action=delete&amp;cid=" . (int) $row['id'] . "'>{$lang['userdetails_comm_delete']}</a>]" : "") . ($row["editedby"] && $CURUSER['class'] >= UC_STAFF ? " - [<a href='usercomment.php?action=vieworiginal&amp;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&amp;cid={$row['id']}>Edit</a>]" : "") . ($userid == $CURUSER["id"] || get_user_class() >= UC_MODERATOR ? "- [<a href=usercomment.php?action=delete&amp;cid={$row['id']}>Delete</a>]" : "") . ($row["editedby"] && get_user_class() >= UC_MODERATOR ? "- [<a href=usercomment.php?action=vieworiginal&amp;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"] . "&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();
}
开发者ID:skygunner,项目名称:ekucms,代码行数:49,代码来源:functions.php


注:本文中的end_frame函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。