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


PHP View::show_header方法代码示例

本文整理汇总了PHP中View::show_header方法的典型用法代码示例。如果您正苦于以下问题:PHP View::show_header方法的具体用法?PHP View::show_header怎么用?PHP View::show_header使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在View的用法示例。


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

示例1: list

list($UserID, $Time, $Snatches) = $DB->next_record();
if ($LoggedUser['ID'] != $UserID && !check_perms('torrents_delete')) {
    error(403);
}
if (isset($_SESSION['logged_user']['multi_delete']) && $_SESSION['logged_user']['multi_delete'] >= 3 && !check_perms('torrents_delete_fast')) {
    error('You have recently deleted 3 torrents. Please contact a staff member if you need to delete more.');
}
if (time_ago($Time) > 3600 * 24 * 7 && !check_perms('torrents_delete')) {
    // Should this be torrents_delete or torrents_delete_fast?
    error('You can no longer delete this torrent as it has been uploaded for over a week. If you now think there is a problem, please report the torrent instead.');
}
if ($Snatches > 4 && !check_perms('torrents_delete')) {
    // Should this be torrents_delete or torrents_delete_fast?
    error('You can no longer delete this torrent as it has been snatched by 5 or more users. If you believe there is a problem with this torrent, please report it instead.');
}
View::show_header('Delete torrent', 'reportsv2');
?>
<div class="thin">
	<div class="box box2" style="width: 600px; margin-left: auto; margin-right: auto;">
		<div class="head colhead">
			Delete torrent
		</div>
		<div class="pad">
			<form class="delete_form" name="torrent" action="torrents.php" method="post">
				<input type="hidden" name="action" value="takedelete" />
				<input type="hidden" name="auth" value="<?php 
echo $LoggedUser['AuthKey'];
?>
" />
				<input type="hidden" name="torrentid" value="<?php 
echo $TorrentID;
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:delete.php

示例2:

<?php

//Include the header
View::show_header('Uploading Rules', 'rules');
?>
<!-- Uploading Rules -->
<div class="thin">
	<div class="header">
		<h2>Uploading Rules</h2>
	</div>
<!-- Uploading Rules Index Links -->
	<br />
	<form class="search_form" name="rules" onsubmit="return false" action="">
		<input type="text" id="search_string" value="Filter (empty to reset)" />
		<span id="Index">Example: The search term <strong>FLAC</strong> returns all rules containing <strong>FLAC</strong>. The search term <strong>FLAC+trump</strong> returns all rules containing both <strong>FLAC</strong> and <strong>trump</strong>.</span>
	</form>
	<br />
	<div class="before_rules">
		<div class="box pad" style="padding: 10px 10px 10px 20px;">
			<ul>
				<li id="Introk"><a href="#Intro"><strong>Introduction</strong></a></li>
				<li id="h1k"><a href="#h1">1. <strong>Uploading Rules</strong></a>
					<ul>
						<li id="h1.1k"><a href="#h1.1">1.1. <strong>General</strong></a></li>
						<li id="h1.2k"><a href="#h1.2">1.2. <strong>Specifically Banned</strong></a></li>
						<li id="h1.3k"><a href="#h1.3">1.3. <strong>Scene Uploads</strong></a></li>
					</ul>
				</li>
				<li id="h2k"><a href="#h2">2. <strong>Music</strong></a>
					<ul>
						<li id="h2.1k"><a href="#h2.1">2.1. <strong>General</strong></a></li>
开发者ID:Atmos01,项目名称:Gazelle,代码行数:31,代码来源:upload.php

示例3: enforce_login

<?php

enforce_login();
define('ANNOUNCEMENT_FORUM_ID', 19);
View::show_header('Blog', 'bbcode');
if (check_perms('admin_manage_blog')) {
    if (!empty($_REQUEST['action'])) {
        switch ($_REQUEST['action']) {
            case 'deadthread':
                if (is_number($_GET['id'])) {
                    $DB->query("\n\t\t\t\t\t\tUPDATE blog\n\t\t\t\t\t\tSET ThreadID = NULL\n\t\t\t\t\t\tWHERE ID = " . $_GET['id']);
                    $Cache->delete_value('blog');
                    $Cache->delete_value('feed_blog');
                }
                header('Location: blog.php');
                break;
            case 'takeeditblog':
                authorize();
                if (is_number($_POST['blogid']) && is_number($_POST['thread'])) {
                    $DB->query("\n\t\t\t\t\t\tUPDATE blog\n\t\t\t\t\t\tSET\n\t\t\t\t\t\t\tTitle = '" . db_string($_POST['title']) . "',\n\t\t\t\t\t\t\tBody = '" . db_string($_POST['body']) . "',\n\t\t\t\t\t\t\tThreadID = " . $_POST['thread'] . "\n\t\t\t\t\t\tWHERE ID = '" . db_string($_POST['blogid']) . "'");
                    $Cache->delete_value('blog');
                    $Cache->delete_value('feed_blog');
                }
                header('Location: blog.php');
                break;
            case 'editblog':
                if (is_number($_GET['id'])) {
                    $BlogID = $_GET['id'];
                    $DB->query("\n\t\t\t\t\t\tSELECT Title, Body, ThreadID\n\t\t\t\t\t\tFROM blog\n\t\t\t\t\t\tWHERE ID = {$BlogID}");
                    list($Title, $Body, $ThreadID) = $DB->next_record();
                }
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:index.php

示例4: array

}
//Handle subscriptions
$UserSubscriptions = Subscriptions::get_subscriptions();
if (empty($UserSubscriptions)) {
    $UserSubscriptions = array();
}
if (in_array($ThreadID, $UserSubscriptions)) {
    $Cache->delete_value('subscriptions_user_new_' . $LoggedUser['ID']);
}
$QuoteNotificationsCount = $Cache->get_value('notify_quoted_' . $LoggedUser['ID']);
if ($QuoteNotificationsCount === false || $QuoteNotificationsCount > 0) {
    $DB->query("\n\t\tUPDATE users_notify_quoted\n\t\tSET UnRead = false\n\t\tWHERE UserID = '{$LoggedUser['ID']}'\n\t\t\tAND Page = 'forums'\n\t\t\tAND PageID = '{$ThreadID}'\n\t\t\tAND PostID >= '{$FirstPost}'\n\t\t\tAND PostID <= '{$LastPost}'");
    $Cache->delete_value('notify_quoted_' . $LoggedUser['ID']);
}
// Start printing
View::show_header($ThreadInfo['Title'] . ' &lt; ' . $Forums[$ForumID]['Name'] . ' &lt; Forums', 'comments,subscriptions,bbcode', $IsDonorForum ? 'donor' : '');
?>
<div class="thin">
	<h2>
		<a href="forums.php">Forums</a> &gt;
		<a href="forums.php?action=viewforum&amp;forumid=<?php 
echo $ThreadInfo['ForumID'];
?>
"><?php 
echo $ForumName;
?>
</a> &gt;
		<?php 
echo $ThreadTitle;
?>
	</h2>
开发者ID:mohirt,项目名称:Gazelle,代码行数:31,代码来源:thread.php

示例5:

<?php

//Include the header
View::show_header('Tagging rules');
?>
<!-- General Rules -->
<div class="thin">
	<div class="header">
		<h3 id="general">Tagging rules</h3>
	</div>
	<div class="box pad rule_summary" style="padding: 10px 10px 10px 20px;">
<?php 
Rules::display_site_tag_rules(false);
?>
	</div>
	<!-- END General Rules -->
<?php 
include 'jump.php';
?>
</div>
<?php 
View::show_footer();
开发者ID:Kufirc,项目名称:Gazelle,代码行数:22,代码来源:tag.php

示例6: error

<?php

/************************************************************************
 ************************************************************************/
if (!check_perms('admin_reports') && !check_perms('project_team') && !check_perms('site_moderate_forums')) {
    error(404);
}
// Number of reports per page
define('REPORTS_PER_PAGE', '10');
list($Page, $Limit) = Format::page_limit(REPORTS_PER_PAGE);
include SERVER_ROOT . '/sections/reports/array.php';
// Header
View::show_header('Reports', 'bbcode,reports');
if ($_GET['id'] && is_number($_GET['id'])) {
    $View = 'Single report';
    $Where = 'r.ID = ' . $_GET['id'];
} elseif (empty($_GET['view'])) {
    $View = 'New';
    $Where = "Status = 'New'";
} else {
    $View = $_GET['view'];
    switch ($_GET['view']) {
        case 'old':
            $Where = "Status = 'Resolved'";
            break;
        default:
            error(404);
            break;
    }
}
if (!check_perms('admin_reports')) {
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:reports.php

示例7: time

{
    $Tomorrow = time(0, 0, 0, date('m'), date('d') + 1, date('Y'));
    return date('d', $Tomorrow);
}
function next_hour()
{
    $Hour = time(date('H') + 1, 0, 0, date('m'), date('d'), date('Y'));
    return date('H', $Hour);
}
if ((!isset($argv[1]) || $argv[1] != SCHEDULE_KEY) && !check_perms('admin_schedule')) {
    // authorization, Fix to allow people with perms hit this page.
    error(403);
}
if (check_perms('admin_schedule')) {
    authorize();
    View::show_header();
    echo '<pre>';
}
$DB->query("\n\tSELECT NextHour, NextDay, NextBiWeekly\n\tFROM schedule");
list($Hour, $Day, $BiWeek) = $DB->next_record();
$NextHour = next_hour();
$NextDay = next_day();
$NextBiWeek = next_biweek();
$DB->query("\n\tUPDATE schedule\n\tSET\n\t\tNextHour = {$NextHour},\n\t\tNextDay = {$NextDay},\n\t\tNextBiWeekly = {$NextBiWeek}");
$NoDaily = isset($argv[2]) && $argv[2] == 'nodaily';
$sqltime = sqltime();
echo "{$sqltime}\n";
/*************************************************************************\
//--------------Run every time ------------------------------------------//

These functions are run every time the script is executed (every 15
开发者ID:bigsony,项目名称:Gazelle,代码行数:31,代码来源:index.php

示例8: authorize

    $DB->query("\n\t\tDELETE FROM users_sessions\n\t\tWHERE UserID = '{$UserID}'\n\t\t\tAND SessionID != '{$SessionID}'");
    $Cache->delete_value("users_sessions_{$UserID}");
}
if (isset($_POST['session'])) {
    authorize();
    $DB->query("\n\t\tDELETE FROM users_sessions\n\t\tWHERE UserID = '{$UserID}'\n\t\t\tAND SessionID = '" . db_string($_POST['session']) . "'");
    $Cache->delete_value("users_sessions_{$UserID}");
}
$UserSessions = $Cache->get_value('users_sessions_' . $UserID);
if (!is_array($UserSessions)) {
    $DB->query("\n\t\tSELECT\n\t\t\tSessionID,\n\t\t\tBrowser,\n\t\t\tOperatingSystem,\n\t\t\tIP,\n\t\t\tLastUpdate\n\t\tFROM users_sessions\n\t\tWHERE UserID = '{$UserID}'\n\t\tORDER BY LastUpdate DESC");
    $UserSessions = $DB->to_array('SessionID', MYSQLI_ASSOC);
    $Cache->cache_value("users_sessions_{$UserID}", $UserSessions, 0);
}
list($UserID, $Username) = array_values(Users::user_info($UserID));
View::show_header($Username . ' &gt; Sessions');
?>
<div class="thin">
<h2><?php 
echo Users::format_username($UserID, $Username);
?>
 &gt; Sessions</h2>
	<div class="box pad">
		<p>Note: Clearing cookies can result in ghost sessions which are automatically removed after 30 days.</p>
	</div>
	<div class="box pad">
		<table cellpadding="5" cellspacing="1" border="0" class="session_table border" width="100%">
			<tr class="colhead">
				<td class="nobr"><strong>IP address</strong></td>
				<td><strong>Browser</strong></td>
				<td><strong>Platform</strong></td>
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:sessions.php

示例9:

<?php

View::show_header('Registration Closed');
?>
<div style="width: 500px;">
	<strong>Sorry, the site is currently invite only.</strong>
</div>
<?php 
View::show_footer();
开发者ID:Kufirc,项目名称:Gazelle,代码行数:9,代码来源:closed.php

示例10:

<?php

View::show_header('Registration Complete');
?>
<div style="width: 500px;">
	<strong>Congratulations! Your account has been created.</strong><br />
	You can now log into your account using the <a href="login.php">login</a> page.
</div>
<?php 
View::show_footer();
开发者ID:Kufirc,项目名称:Gazelle,代码行数:10,代码来源:step2.php

示例11: count

$SphQLResult = $SphQL->query();
$NumResults = (int) $SphQLResult->get_meta('total_found');
if ($NumResults > 0) {
    $SphRequests = $SphQLResult->to_array('id');
    if ($OrderBy === 'random') {
        $NumResults = count($SphRequests);
    }
    if ($NumResults > REQUESTS_PER_PAGE) {
        if (($Page - 1) * REQUESTS_PER_PAGE > $NumResults) {
            $Page = 0;
        }
        $PageLinks = Format::get_pages($Page, $NumResults, REQUESTS_PER_PAGE);
    }
}
$CurrentURL = Format::get_url(array('order', 'sort', 'page'));
View::show_header($Title, 'requests');
?>
<div class="thin">
	<div class="header">
		<h2><?php 
echo $Title;
?>
</h2>
	</div>
	<div class="linkbox">
<?php 
if (!$BookmarkView) {
    if (check_perms('site_submit_requests')) {
        ?>
		<a href="requests.php?action=new" class="brackets">New request</a>
		<a href="requests.php?type=created" class="brackets">My requests</a>
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:requests.php

示例12: array

<?php

View::show_header('Staff PMs', 'staffpm');
// Get messages
$StaffPMs = $DB->query("\n\tSELECT\n\t\tID,\n\t\tSubject,\n\t\tUserID,\n\t\tStatus,\n\t\tLevel,\n\t\tAssignedToUser,\n\t\tDate,\n\t\tUnread\n\tFROM staff_pm_conversations\n\tWHERE UserID = " . $LoggedUser['ID'] . "\n\tORDER BY Status, Date DESC");
// Start page
?>
<div class="thin">
	<div class="header">
		<h2>Staff PMs</h2>
		<div class="linkbox">
			<a href="#" onclick="$('#compose').gtoggle();" class="brackets">Compose new</a>
		</div>
	</div>
	<br />
	<br />
	<?php 
View::parse('generic/reply/staffpm.php', array('Hidden' => true));
?>
	<div class="box pad" id="inbox">
<?php 
if (!$DB->has_results()) {
    // No messages
    ?>
		<h2>No messages</h2>
<?php 
} else {
    // Messages, draw table
    ?>
		<form class="manage_form" name="staff_messages" method="post" action="staffpm.php" id="messageform">
			<input type="hidden" name="action" value="multiresolve" />
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:user_inbox.php

示例13: display_str

<?php

View::show_header('Recover Password');
echo $Validate->GenerateJS('recoverform');
?>
<script src="<?php 
echo STATIC_SERVER;
?>
functions/validate.js" type="text/javascript"></script>
<script src="<?php 
echo STATIC_SERVER;
?>
functions/password_validate.js" type="text/javascript"></script>
<form class="auth_form" name="recovery" id="recoverform" method="post" action="" onsubmit="return formVal();">
	<input type="hidden" name="key" value="<?php 
echo display_str($_REQUEST['key']);
?>
" />
	<div style="width: 500px;">
		<span class="titletext">Reset your password - Final Step</span><br /><br />
<?php 
if (empty($Reset)) {
    if (!empty($Err)) {
        ?>
		<strong class="important_text"><?php 
        echo display_str($Err);
        ?>
</strong><br /><br />
<?php 
    }
    ?>
开发者ID:jasxonfx,项目名称:Gazelle,代码行数:31,代码来源:recover_step2.php

示例14: array

$CollagePages = array();
// Pad it out
if ($NumGroups > $CollageCovers) {
    for ($i = $NumGroups + 1; $i <= ceil($NumGroups / $CollageCovers) * $CollageCovers; $i++) {
        $Collage[] = '<li></li>';
    }
}
for ($i = 0; $i < $NumGroups / $CollageCovers; $i++) {
    $Groups = array_slice($Collage, $i * $CollageCovers, $CollageCovers);
    $CollagePage = '';
    foreach ($Groups as $Group) {
        $CollagePage .= $Group;
    }
    $CollagePages[] = $CollagePage;
}
View::show_header($Name, 'browse,collage,bbcode,voting,recommend');
?>
<div class="thin">
	<div class="header">
		<h2><?php 
echo $Name;
?>
</h2>
		<div class="linkbox">
			<a href="collages.php" class="brackets">List of collages</a>
<?php 
if (check_perms('site_collages_create')) {
    ?>
			<a href="collages.php?action=new" class="brackets">New collage</a>
<?php 
}
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:torrent_collage.php

示例15: count

<?php

$DB->query("\n\t\tSELECT\n\t\t\tsq.UserID, um.Username, count(1) AS Answered\n\t\tFROM staff_answers AS sq\n\t\t\tLEFT JOIN users_main AS um ON um.ID = sq.UserID\n\t\tGROUP BY sq.UserID\n\t\tORDER BY um.Username ASC");
$Staff = $DB->to_array();
$DB->query("\n\tSELECT COUNT(1)\n\tFROM user_questions");
list($TotalQuestions) = $DB->next_record();
View::show_header("Ask the Staff");
?>
<div class="thin">
	<div class="header">
		<h2>Staff Answers</h2>
	</div>
	<div class="linkbox">
<?php 
if (check_perms("users_mod")) {
    ?>
		<a class="brackets" href="questions.php">View questions</a>
<?php 
} else {
    ?>
		<a class="brackets" href="questions.php">Ask question</a>
<?php 
}
?>
		<a class="brackets" href="questions.php?action=popular_questions">Popular questions</a>
	</div>
<?php 
foreach ($Staff as $User) {
    ?>
		<h2>
			<a href="questions.php?action=view_answers&amp;userid=<?php 
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:answers.php


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