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


PHP end_main_frame函数代码示例

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


在下文中一共展示了end_main_frame函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: reqmenu

 function reqmenu($selected = "viewrequest")
 {
     global $title;
     stdhead($title);
     begin_main_frame();
     end_main_frame();
 }
开发者ID:NullYing,项目名称:mtpt,代码行数:7,代码来源:viewrequest.php

示例2: 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

示例3: 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

示例4: newerr

function newerr($heading = '', $text = '', $die = true, $foot = true, $div = 'error', $htmlstrip = false)
{
    newmsg($heading, $text, $div, $htmlstrip);
    if ($foot) {
        end_main_frame();
    }
    stdfoot();
    if ($die) {
        die;
    }
}
开发者ID:ZenoX2012,项目名称:CyBerFuN-CoDeX,代码行数:11,代码来源:wiki.php

示例5: logmenu

function logmenu($selected = "candidate")
{
    global $lang_log;
    global $showfunbox_main;
    begin_main_frame();
    print "<div id=\"lognav\"><ul id=\"logmenu\" class=\"menu\">";
    print "<li" . ($selected == "recycle" ? " class=selected" : "") . "><a href=\"?status=recycle\">回收站</a></li>";
    print "<li" . ($selected == "candidate" ? " class=selected" : "") . "><a href=\"?status=candidate\">候选区</a></li>";
    print "</ul></div>";
    end_main_frame();
}
开发者ID:NullYing,项目名称:mtpt,代码行数:11,代码来源:recycle.php

示例6: usercpmenu

function usercpmenu($selected = "home")
{
    global $lang_usercp;
    begin_main_frame();
    print "<div id=\"usercpnav\"><ul id=\"usercpmenu\" class=\"menu\">";
    print "<li" . ($selected == "home" ? " class=selected" : "") . "><a href=\"usercp.php\">" . $lang_usercp['text_user_cp_home'] . "</a></li>";
    print "<li" . ($selected == "personal" ? " class=selected" : "") . "><a href=\"?action=personal\">" . $lang_usercp['text_personal_settings'] . "</a></li>";
    print "<li" . ($selected == "tracker" ? " class=selected" : "") . "><a href=\"?action=tracker\">" . $lang_usercp['text_tracker_settings'] . "</a></li>";
    print "<li" . ($selected == "forum" ? " class=selected" : "") . "><a href=\"?action=forum\">" . $lang_usercp['text_forum_settings'] . "</a></li>";
    print "<li" . ($selected == "security" ? " class=selected" : "") . "><a href=\"?action=security\">" . $lang_usercp['text_security_settings'] . "</a></li>";
    print "</ul></div>";
    end_main_frame();
}
开发者ID:CptTZ,项目名称:NexusPHP-1,代码行数:13,代码来源:usercp.php

示例7: logmenu

function logmenu($selected = "dailylog")
{
    global $lang_log;
    global $showfunbox_main;
    begin_main_frame();
    print "<div id=\"lognav\"><ul id=\"logmenu\" class=\"menu\">";
    print "<li" . ($selected == "dailylog" ? " class=selected" : "") . "><a href=\"?action=dailylog\">" . $lang_log['text_daily_log'] . "</a></li>";
    print "<li" . ($selected == "chronicle" ? " class=selected" : "") . "><a href=\"?action=chronicle\">" . $lang_log['text_chronicle'] . "</a></li>";
    if ($showfunbox_main == 'yes') {
        print "<li" . ($selected == "funbox" ? " class=selected" : "") . "><a href=\"?action=funbox\">" . $lang_log['text_funbox'] . "</a></li>";
    }
    print "<li" . ($selected == "news" ? " class=selected" : "") . "><a href=\"?action=news\">" . $lang_log['text_news'] . "</a></li>";
    print "<li" . ($selected == "poll" ? " class=selected" : "") . "><a href=\"?action=poll\">" . $lang_log['text_poll'] . "</a></li>";
    print "</ul></div>";
    end_main_frame();
}
开发者ID:CptTZ,项目名称:NexusPHP,代码行数:16,代码来源:log.php

示例8: 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

示例9: 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

示例10: usercommenttable

function usercommenttable($rows)
{
    $htmlout = '';
    global $CURUSER, $INSTALLER09, $userid;
    $htmlout .= begin_main_frame();
    $htmlout .= begin_frame();
    $count = 0;
    foreach ($rows as $row) {
        $htmlout .= "<p class='sub'>#{$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='Donor' />" : "") . ($row["warned"] >= 1 ? "<img src=" . "\"{$INSTALLER09['pic_base_url']}warned.gif\" alt=\"Warned\" />" : "") . " ({$title})\n";
        } else {
            $htmlout .= "<a name=\"comm" . (int) $row["id"] . "\"><i>(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={$row['id']}'>Edit</a>]" : "") . ($userid == $CURUSER["id"] || $CURUSER['class'] >= UC_STAFF ? " - [<a href='usercomment.php?action=delete&amp;cid=" . (int) $row['id'] . "'>Delete</a>]" : "") . ($row["editedby"] && $CURUSER['class'] >= UC_STAFF ? " - [<a href='usercomment.php?action=vieworiginal&amp;cid=" . (int) $row['id'] . "'>View original</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 />Last edited by <a href='userdetails.php?id=" . (int) $row['editedby'] . "'><b>" . htmlsafechars($row['username']) . "</b></a> " . get_date($row['editedat'], 'DATE', 0, 1) . "</font>\n";
        }
        $htmlout .= begin_table(true);
        $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 .= end_table();
    }
    $htmlout .= end_frame();
    $htmlout .= end_main_frame();
    return $htmlout;
}
开发者ID:CharlieHD,项目名称:U-232-V3,代码行数:40,代码来源:usercomment.php

示例11: 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

示例12: 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

示例13: round

    $lottery['total_pot'] = $lottery_config['ticket_amount'] * $lottery['total_tickets'];
}
//how much the winner gets
$lottery['per_user'] = round($lottery['total_pot'] / $lottery_config['total_winners'], 2);
//how many tickets could the user buy
$lottery['current_user']['could_buy'] = $lottery['current_user']['can_buy'] = $lottery_config['user_tickets'] - $lottery['current_user']['total_tickets'];
//if he has less bonus points calculate how many tickets can he buy with what he has
if ($CURUSER['seedbonus'] < $lottery['current_user']['could_buy'] * $lottery_config['ticket_amount']) {
    for ($lottery['current_user']['can_buy']; $CURUSER['seedbonus'] < $lottery_config['ticket_amount'] * $lottery['current_user']['can_buy']; --$lottery['current_user']['can_buy']) {
    }
}
//check if the lottery ended if the lottery ended don't allow the user to buy more tickets or if he has already bought the max tickets
if (time() > $lottery_config['end_date'] || $lottery_config['user_tickets'] <= $lottery['current_user']['total_tickets']) {
    $lottery['current_user']['can_buy'] = 0;
}
//print('<pre>'.print_r($lottery,1));
$html = begin_main_frame() . begin_frame('Lottery', true);
$html .= "<ul style='text-align:left;'>\r\n    <li>Tickets are non-refundable</li>\r\n    <li>Each ticket costs <b>" . $lottery_config['ticket_amount'] . "</b> which is taken from your seedbonus amount</li>\r\n    <li>Purchaseable shows how many tickets you can afford</li>\r\n    <li>You can only buy up to your purchaseable amount.</li>\r\n    <li>The competiton will end: <b>" . get_date($lottery_config['end_date'], 'LONG') . "</b></li>\r\n    <li>There will be <b>" . $lottery_config['total_winners'] . "</b> winners who will be picked at random</li>\r\n    <li>Winner(s) will get <b>" . $lottery['per_user'] . "</b> added to their seedbonus amount</li>\r\n    <li>The Winners will be announced once the lottery has closed and posted on the home page.</li>";
if (!$lottery_config['use_prize_fund']) {
    $html .= "<li>The more tickets that are sold the bigger the pot will be !</li>";
}
if (count($lottery['current_user']['tickets'])) {
    $html .= "<li>You own ticket numbers : <b>" . join('</b>, <b>', $lottery['current_user']['tickets']) . "</b></li>";
}
$html .= "</ul><hr/>\r\n   <table width='400' class='main' align='center' border='1' cellspacing='0' cellpadding='5'>\r\n    <tr>\r\n      <td class='table'>Total Pot</td>\r\n      <td class='table' align='right'>" . $lottery['total_pot'] . "</td>\r\n    </tr>\r\n    <tr>\r\n      <td class='table'>Total Tickets Purchased</td>\r\n      <td class='table' align='right'>" . $lottery['total_tickets'] . " Tickets</td>\r\n    </tr>\r\n    <tr>\r\n      <td class='table'>Tickets Purchased by You</td>\r\n      <td class='table' align='right'>" . $lottery['current_user']['total_tickets'] . " Tickets</td>\r\n    </tr>\r\n    <tr>\r\n      <td class='table'>Purchaseable</td>\r\n      <td class='table' align='right'>" . ($lottery['current_user']['could_buy'] > $lottery['current_user']['can_buy'] ? 'you have points for <b>' . $lottery['current_user']['can_buy'] . '</b> ticket(s) but you can buy another <b>' . ($lottery['current_user']['could_buy'] - $lottery['current_user']['can_buy']) . '</b> ticket(s) if you get more bonus points' : $lottery['current_user']['can_buy']) . "</td>\r\n    </tr>";
if ($lottery['current_user']['can_buy'] > 0) {
    $html .= "\r\n      <tr>\r\n        <td class='table' colspan='2' align='center'> \r\n          <form action='lottery.php?do=tickets' method='post'>\r\n              <input type='text' size='5' name='tickets' /><input type='submit' value='Buy tickets' />\r\n          </form>\r\n        </td>\r\n      </tr>";
}
$html .= "</table>";
$html .= end_frame() . end_main_frame();
echo stdhead('Buy tickets for lottery') . $html . stdfoot();
开发者ID:CharlieHD,项目名称:U-232-V3,代码行数:31,代码来源:tickets.php

示例14: insert_compose_frame

function insert_compose_frame($id, $newtopic = true, $quote = false, $attachment = false)
{
    global $maxsubjectlength, $CURUSER, $max_torrent_size, $maxfilesize, $pic_base_url, $use_attachment_mod, $forum_pics, $DEFAULTBASEURL;
    if ($newtopic) {
        $res = sql_query("SELECT name FROM forums WHERE id = " . sqlesc($id)) or sqlerr(__FILE__, __LINE__);
        $arr = mysql_fetch_assoc($res) or die("Bad forum ID!");
        ?>
<h3>New topic in <a href='<?php 
        echo $_SERVER['PHP_SELF'];
        ?>
?action=viewforum&amp;forumid=<?php 
        echo $id;
        ?>
'><?php 
        echo safeChar($arr["name"]);
        ?>
</a> forum</h3><?php 
    } else {
        $res = sql_query("SELECT subject, locked FROM topics WHERE id = " . sqlesc($id)) or sqlerr(__FILE__, __LINE__);
        $arr = mysql_fetch_assoc($res) or die("Forum error, Topic not found.");
        if ($arr['locked'] == 'yes') {
            stdmsg("Sorry", "The topic is locked.");
            end_table();
            end_main_frame();
            stdfoot();
            exit;
        }
        ?>
<h3 align="center"><?php 
        echo $language['replyto'];
        ?>
<a href='<?php 
        echo $_SERVER['PHP_SELF'];
        ?>
action=viewtopic&amp;topicid=<?php 
        echo $id;
        ?>
'><?php 
        echo safeChar($arr["subject"]);
        ?>
</a></h3><?php 
    }
    begin_frame("Compose", true);
    ?>
<form method='post' name='compose' action='<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
' enctype='multipart/form-data'>
	<input type="hidden" name="action" value="post" />
	<input type='hidden' name='<?php 
    echo $newtopic ? 'forumid' : 'topicid';
    ?>
' value='<?php 
    echo $id;
    ?>
' /><?php 
    begin_table(true);
    if ($newtopic) {
        ?>
		<tr>
			<td class='rowhead' width="10%">Subject</td>
			<td align='left'>
				<input type='text' size='100' maxlength='<?php 
        echo $maxsubjectlength;
        ?>
' name='subject' style='height: 19px' />
			</td>
		</tr><?php 
    }
    if ($quote) {
        $postid = (int) $_GET["postid"];
        if (!is_valid_id($postid)) {
            stdmsg("Error", "Invalid ID!");
            end_table();
            end_main_frame();
            stdfoot();
            exit;
        }
        $res = sql_query("SELECT posts.*, users.username FROM posts JOIN users ON posts.userid = users.id WHERE posts.id = {$postid}") or sqlerr(__FILE__, __LINE__);
        if (mysql_num_rows($res) == 0) {
            stdmsg("Error", "No post with this ID");
            end_table();
            end_main_frame();
            stdfoot();
            exit;
        }
        $arr = mysql_fetch_assoc($res);
    }
    ?>
<tr>
		<td class='rowhead' width="10%">Body</td>
		<td><?php 
    $qbody = $quote ? "[quote=" . safeChar($arr["username"]) . "]" . safeChar(unesc($arr["body"])) . "[/quote]" : '';
    if (function_exists('textbbcode')) {
        textbbcode("compose", "body", $qbody);
    } else {
        ?>
<textarea name="body" style="width:99%" rows="7"><?php 
        echo $qbody;
        ?>
//.........这里部分代码省略.........
开发者ID:ZenoX2012,项目名称:CyBerFuN-CoDeX,代码行数:101,代码来源:forums.php

示例15: offcommenttable

function offcommenttable($rows)
{
    global $CURUSER, $HTTP_SERVER_VARS;
    begin_main_frame();
    begin_frame();
    $count = 0;
    $count2 = '';
    $id = '';
    foreach ($rows as $row) {
        // =======change colors
        if ($count2 == 0) {
            $count2 = $count2 + 1;
            $class = "clearalt6";
        } else {
            $count2 = 0;
            $class = "clearalt7";
        }
        print "<br>";
        begin_table(true);
        print "<tr><td class=colhead colspan=2><p class=sub><a name=comment_" . $row["id"] . ">#" . $row["id"] . "</a> by: ";
        if (isset($row["username"])) {
            $username = $row["username"];
            $ratres = sql_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 = safechar($title);
            }
            print "<a name=comm" . $row["id"] . " href=userdetails.php?id=" . $row["user"] . "><b>" . safechar($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&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" . ($row["user"] == $CURUSER["id"] || get_user_class() >= UC_MODERATOR ? "[ <a href=offcomment.php?action=edit&amp;cid={$row['id']}>Edit</a> ] " : "") . (get_user_class() >= UC_MODERATOR ? "[ <a href=offcomment.php?action=delete&amp;cid={$row['id']}>Delete</a> ]" : "") . ($row["editedby"] && get_user_class() >= UC_MODERATOR ? "" : "") . " [ <a href=userdetails.php?id=" . $row["user"] . ">Profile</a> ] [ <a href=sendmessage.php?receiver=" . $row["user"] . ">PM</a> ] [ <a href=report.php?type=Offer_Comment&id={$row['id']}>Report</a> ]</p>\n";
        $avatar = $CURUSER["avatars"] == "yes" ? safechar($row["avatar"]) : "";
        if (!$avatar) {
            $avatar = "pic/default_avatar.gif";
        }
        $text = format_comment($row["text"]);
        if ($row["editedby"]) {
            $text .= "<p><font size=1 class=small>Edited by <a href=userdetails.php?id={$row['editedby']}><b>{$row['username']}</b></a>  {$row['editedat']} GMT</font></p>\n";
        }
        print "</td></tr><tr valign=top><td align=center width=150 class={$class}><img width=150 src={$avatar}></td><td class={$class}>{$text}</td></tr>\n";
        end_table();
    }
    end_frame();
    end_main_frame();
    // stdfoot();
}
开发者ID:ZenoX2012,项目名称:CyBerFuN-CoDeX,代码行数:64,代码来源:viewoffers.php


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