示例#1
0
文件: delete.php 项目: Kufirc/Gazelle
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;
示例#2
0
<?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>
示例#3
0
文件: index.php 项目: Kufirc/Gazelle
<?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();
                }
示例#4
0
文件: thread.php 项目: mohirt/Gazelle
}
//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>
示例#5
0
文件: tag.php 项目: Kufirc/Gazelle
<?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();
示例#6
0
<?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')) {
示例#7
0
文件: index.php 项目: bigsony/Gazelle
{
    $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
示例#8
0
    $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>
示例#9
0
文件: closed.php 项目: Kufirc/Gazelle
<?php

View::show_header('Registration Closed');
?>
<div style="width: 500px;">
	<strong>Sorry, the site is currently invite only.</strong>
</div>
<?php 
View::show_footer();
示例#10
0
文件: step2.php 项目: Kufirc/Gazelle
<?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();
示例#11
0
$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>
示例#12
0
<?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" />
示例#13
0
<?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 
    }
    ?>
示例#14
0
$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 
}
示例#15
0
<?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 
示例#16
0
文件: delete.php 项目: Kufirc/Gazelle
<?php

$CollageID = $_GET['collageid'];
if (!is_number($CollageID) || !$CollageID) {
    error(404);
}
$DB->query("\n\tSELECT Name, CategoryID, UserID\n\tFROM collages\n\tWHERE ID = '{$CollageID}'");
list($Name, $CategoryID, $UserID) = $DB->next_record();
if (!check_perms('site_collages_delete') && $UserID != $LoggedUser['ID']) {
    error(403);
}
View::show_header('Delete collage');
?>
<div class="thin center">
	<div class="box" style="width: 600px; margin: 0px auto;">
		<div class="head colhead">
			Delete collage
		</div>
		<div class="pad">
			<form class="delete_form" name="collage" action="collages.php" method="post">
				<input type="hidden" name="action" value="take_delete" />
				<input type="hidden" name="auth" value="<?php 
echo $LoggedUser['AuthKey'];
?>
" />
				<input type="hidden" name="collageid" value="<?php 
echo $CollageID;
?>
" />
<?php 
if ($CategoryID == 0) {
示例#17
0
<?php

if (!check_perms('admin_login_watch')) {
    error(403);
}
if (isset($_POST['submit']) && isset($_POST['id']) && $_POST['submit'] == 'Unban' && is_number($_POST['id'])) {
    authorize();
    $DB->query('
		DELETE FROM login_attempts
		WHERE ID = ' . $_POST['id']);
}
View::show_header('Login Watch');
$DB->query('
	SELECT
		ID,
		IP,
		UserID,
		LastAttempt,
		Attempts,
		BannedUntil,
		Bans
	FROM login_attempts
	WHERE BannedUntil > "' . sqltime() . '"
	ORDER BY BannedUntil ASC');
?>
<div class="thin">
	<div class="header">
		<h2>Login Watch Management</h2>
	</div>
	<table width="100%">
		<tr class="colhead">
示例#18
0
<?php

if (!isset($_GET['groupid']) || !is_number($_GET['groupid'])) {
    error(0);
}
$GroupID = (int) $_GET['groupid'];
$DB->query("\n\tSELECT Name\n\tFROM torrents_group\n\tWHERE ID = {$GroupID}");
if (!$DB->has_results()) {
    error(404);
}
list($Name) = $DB->next_record();
View::show_header("Revision history for {$Name}");
?>
<div class="thin">
	<div class="header">
		<h2>Revision history for <a href="torrents.php?id=<?php 
echo $GroupID;
?>
"><?php 
echo $Name;
?>
</a></h2>
	</div>
<?php 
RevisionHistoryView::render_revision_history(RevisionHistory::get_revision_history('torrents', $GroupID), "torrents.php?id={$GroupID}");
?>
</div>
<?php 
View::show_footer();
示例#19
0
<?php

if (!isset($_GET['id']) || !is_number($_GET['id'])) {
    error(404);
}
$ArticleID = (int) $_GET['id'];
$Latest = Wiki::get_article($ArticleID);
list($Revision, $Title, $Body, $Read, $Edit, $Date, $AuthorID, $AuthorName) = array_shift($Latest);
if ($Read > $LoggedUser['EffectiveClass']) {
    error(404);
}
if ($Edit > $LoggedUser['EffectiveClass']) {
    error(403);
}
View::show_header("Revisions of " . $Title);
?>
<div class="thin">
	<div class="header">
		<h2>Revision history for <a href="wiki.php?action=article&amp;id=<?php 
echo $ArticleID;
?>
"><?php 
echo $Title;
?>
</a></h2>
	</div>
	<form action="wiki.php" method="get">
		<input type="hidden" name="action" id="action" value="compare" />
		<input type="hidden" name="id" id="id" value="<?php 
echo $ArticleID;
?>
示例#20
0
$DB->query("\n\tSELECT um.ID, Username\n\tFROM pm_messages AS pm\n\t\tJOIN users_main AS um ON um.ID = pm.SenderID\n\tWHERE pm.ConvID = '{$ConvID}'");
$ConverstionParticipants = $DB->to_array();
foreach ($ConverstionParticipants as $Participant) {
    $PMUserID = (int) $Participant['ID'];
    $Users[$PMUserID]['UserStr'] = Users::format_username($PMUserID, true, true, true, true);
    $Users[$PMUserID]['Username'] = $Participant['Username'];
}
$Users[0]['UserStr'] = 'System';
// in case it's a message from the system
$Users[0]['Username'] = '******';
if ($UnRead == '1') {
    $DB->query("\n\t\tUPDATE pm_conversations_users\n\t\tSET UnRead = '0'\n\t\tWHERE ConvID = '{$ConvID}'\n\t\t\tAND UserID = '{$UserID}'");
    // Clear the caches of the inbox and sentbox
    $Cache->decrement("inbox_new_{$UserID}");
}
View::show_header("View conversation {$Subject}", 'comments,inbox,bbcode,jquery.validate,form_validate');
// Get messages
$DB->query("\n\tSELECT SentDate, SenderID, Body, ID\n\tFROM pm_messages\n\tWHERE ConvID = '{$ConvID}'\n\tORDER BY ID");
?>
<div class="thin">
	<h2><?php 
echo $Subject . ($ForwardedID > 0 ? " (Forwarded to {$ForwardedName})" : '');
?>
</h2>
	<div class="linkbox">
		<a href="<?php 
echo Inbox::get_inbox_link();
?>
" class="brackets">Back to inbox</a>
	</div>
<?php 
示例#21
0
<?php

function display_perm($Key, $Title)
{
    global $Values;
    $Perm = "<input type=\"checkbox\" name=\"perm_{$Key}\" id=\"{$Key}\" value=\"1\"";
    if (!empty($Values[$Key])) {
        $Perm .= ' checked="checked"';
    }
    $Perm .= " /> <label for=\"{$Key}\">{$Title}</label><br />";
    echo "{$Perm}\n";
}
View::show_header('Manage Permissions', 'validate');
echo $Val->GenerateJS('permissionsform');
?>
<form class="manage_form" name="permissions" id="permissionsform" method="post" action="" onsubmit="return formVal();">
	<input type="hidden" name="action" value="permissions" />
	<input type="hidden" name="auth" value="<?php 
echo $LoggedUser['AuthKey'];
?>
" />
	<input type="hidden" name="id" value="<?php 
echo display_str($_REQUEST['id']);
?>
" />
	<div class="linkbox">
		<a href="tools.php?action=permissions" class="brackets">Back to permission list</a>
		<a href="tools.php" class="brackets">Back to tools</a>
	</div>
	<table class="permission_head layout">
		<tr>
示例#22
0
<?php

if (!check_perms('users_mod')) {
    error(404);
}
View::show_header("Tests");
?>
<div class="header">
	<h2>Tests</h2>
	<?php 
TestingView::render_linkbox("classes");
?>
</div>

<div class="thin">
	<?php 
TestingView::render_classes(Testing::get_classes());
?>
</div>

<?php 
View::show_footer();
示例#23
0
<?php

View::show_header('Disabled');
if (empty($_POST['submit']) || empty($_POST['username'])) {
    ?>
<p class="warning">
Your account has been disabled.<br />
This is either due to inactivity or rule violation(s).<br />
To discuss this with staff, come to our IRC network at: <?php 
    echo BOT_SERVER;
    ?>
<br />
And join <?php 
    echo BOT_DISABLED_CHAN;
    ?>
<br /><br />
<strong>Be honest.</strong> At this point, lying will get you nowhere.<br /><br /><br />
</p>

<strong>Before joining the disabled channel, please read our <br /> <span style="color: gold;">Golden Rules</span> which can be found <a style="color: #1464F4;" href="#" onclick="toggle_visibility('golden_rules')">here</a>.</strong> <br /><br />

<script type="text/javascript">
function toggle_visibility(id) {
	var e = document.getElementById(id);
	if (e.style.display == 'block') {
		e.style.display = 'none';
	} else {
		e.style.display = 'block';
	}
}
</script>
示例#24
0
<?php

//Include the header
View::show_header('Request Rules');
?>
<div class="thin">
	<div class="header">
		<h2 class="center">Requests</h2>
	</div>
	<div class="box pad rule_summary" style="padding: 10px 10px 10px 20px;">
		<ul>
			<li>
				<strong>Do not make requests for torrents that break the rules.</strong> It is your responsibility that the request follows the rules. Your request will be deleted, and you will not get your bounty back. Requests cannot be more specific than the upload (and trumping) rules. For example, requesting an MP3 torrent with a log when the rules prohibit replacing an MP3 torrent without a log. Such a request asks for a duplicate to be uploaded. Exceptions: Requests made before the November 2008 rule change are not subject to deletion. However, you are advised to edit such older requests to comply with the rules.
			</li>
			<li>
				<strong>Only one title (application, album, etc.) per request.</strong> No requests for multiple albums (e.g. discographies) or vague requirements. You may ask for multiple formats, but you cannot specify all of them. For example, you may ask for either a FLAC or V0 but not both formats. You may also make a list of albums by one artist that satisfies your request, but the request can be filled with only one album. Application requests can consist of only one application, but may span a range of different versions. However, such requests can be filled with only one version of that title.
			</li>
			<li>
				<strong>Do not unfill requests for trivial reasons.</strong> If you did not specify in your request what you wanted (such as bitrates or a particular edition), do not unfill and later change the description. Do not unfill requests if you are unsure of what you are doing (e.g. the filled torrent may be a transcode, but you don't know how to tell). Ask for help from <a href="/staff.php">first-line support or staff</a> in that case. You may unfill the request if the torrent does not fit your specifications stated clearly in the request.
			</li>
			<li>
				<strong>All users must have an equal chance to fill a request.</strong> Trading upload credit is not allowed. Abusing the request system to exchange favors for other users is not tolerated. That includes making specific requests for certain users (whether explicitly named or not). Making requests for releases, and then unfilling so that one particular user can fill the request is not allowed. If reported, both the requester and user filling the request will receive a warning and lose the request bounty.
			</li>
			<li>
				<strong>No manipulation of the requester for bounty.</strong> The bounty is a reward for helping other users&#8202;&mdash;&#8202;it should not be a ransom. Any user who refuses to fill a request unless the bounty is increased will face harsh punishment.
			</li>
		</ul>
	</div>
<?php 
include 'jump.php';
?>
示例#25
0
文件: forum.php 项目: Kufirc/Gazelle
}
if (!isset($Forums[$ForumID])) {
    error(404);
}
// Make sure they're allowed to look at the page
if (!check_perms('site_moderate_forums')) {
    if (isset($LoggedUser['CustomForums'][$ForumID]) && $LoggedUser['CustomForums'][$ForumID] === 0) {
        error(403);
    }
}
$ForumName = display_str($Forums[$ForumID]['Name']);
if (!Forums::check_forumperm($ForumID)) {
    error(403);
}
// Start printing
View::show_header('Forums &gt; ' . $Forums[$ForumID]['Name'], '', $IsDonorForum ? 'donor' : '');
?>
<div class="thin">
	<h2><a href="forums.php">Forums</a> &gt; <?php 
echo $ForumName;
?>
</h2>
	<div class="linkbox">
<?php 
if (Forums::check_forumperm($ForumID, 'Write') && Forums::check_forumperm($ForumID, 'Create')) {
    ?>
		<a href="forums.php?action=new&amp;forumid=<?php 
    echo $ForumID;
    ?>
" class="brackets">New thread</a>
<?php 
示例#26
0
<?php

View::show_header('Staff Inbox');
$View = display_str($_GET['view']);
$UserLevel = $LoggedUser['EffectiveClass'];
// Setup for current view mode
$SortStr = 'IF(AssignedToUser = '******'ID'] . ', 0, 1) ASC, ';
switch ($View) {
    case 'unanswered':
        $ViewString = 'Unanswered';
        $WhereCondition = "\n\t\t\tWHERE (Level <= {$UserLevel} OR AssignedToUser = '******'ID'] . "')\n\t\t\t\tAND Status = 'Unanswered'";
        break;
    case 'open':
        $ViewString = 'Unresolved';
        $WhereCondition = "\n\t\t\tWHERE (Level <= {$UserLevel} OR AssignedToUser = '******'ID'] . "')\n\t\t\t\tAND Status IN ('Open', 'Unanswered')";
        $SortStr = '';
        break;
    case 'resolved':
        $ViewString = 'Resolved';
        $WhereCondition = "\n\t\t\tWHERE (Level <= {$UserLevel} OR AssignedToUser = '******'ID'] . "')\n\t\t\t\tAND Status = 'Resolved'";
        $SortStr = '';
        break;
    case 'my':
        $ViewString = 'Your Unanswered';
        $WhereCondition = "\n\t\t\tWHERE (Level = {$UserLevel} OR AssignedToUser = '******'ID'] . "')\n\t\t\t\tAND Status = 'Unanswered'";
        break;
    default:
        if ($UserLevel >= 700) {
            $ViewString = 'Your Unanswered';
            $WhereCondition = "\n\t\t\t\tWHERE (\n\t\t\t\t\t\t(Level >= " . max($Classes[MOD]['Level'], 700) . " AND Level <= {$UserLevel})\n\t\t\t\t\t\tOR AssignedToUser = '******'ID'] . "'\n\t\t\t\t\t)\n\t\t\t\t\tAND Status = 'Unanswered'";
        } elseif ($UserLevel == 650) {
示例#27
0
文件: masspm.php 项目: Kufirc/Gazelle
<?php

if (!isset($_GET['id']) || !is_number($_GET['id']) || !isset($_GET['torrentid']) || !is_number($_GET['torrentid'])) {
    error(0);
}
$GroupID = $_GET['id'];
$TorrentID = $_GET['torrentid'];
$DB->query("\n\tSELECT\n\t\tt.Media,\n\t\tt.Format,\n\t\tt.Encoding AS Bitrate,\n\t\tt.RemasterYear,\n\t\tt.Remastered,\n\t\tt.RemasterTitle,\n\t\tt.Scene,\n\t\tt.FreeTorrent,\n\t\tt.Description AS TorrentDescription,\n\t\ttg.CategoryID,\n\t\ttg.Name AS Title,\n\t\ttg.Year,\n\t\ttg.ArtistID,\n\t\tag.Name AS ArtistName,\n\t\tt.GroupID,\n\t\tt.UserID,\n\t\tt.FreeTorrent\n\tFROM torrents AS t\n\t\tJOIN torrents_group AS tg ON tg.ID=t.GroupID\n\t\tLEFT JOIN artists_group AS ag ON ag.ArtistID=tg.ArtistID\n\tWHERE t.ID='{$TorrentID}'");
list($Properties) = $DB->to_array(false, MYSQLI_BOTH);
if (!$Properties) {
    error(404);
}
View::show_header('Edit torrent', 'upload');
if (!check_perms('site_moderate_requests')) {
    error(403);
}
?>
<div class="thin">
	<div class="header">
		<h2>Send PM To All Snatchers Of "<?php 
echo $Properties['ArtistName'];
?>
 - <?php 
echo $Properties['Title'];
?>
"</h2>
	</div>
	<form class="send_form" name="mass_message" action="torrents.php" method="post">
		<input type="hidden" name="action" value="takemasspm" />
		<input type="hidden" name="auth" value="<?php 
echo $LoggedUser['AuthKey'];
示例#28
0
文件: user.php 项目: Kufirc/Gazelle
    if (strpos($P, '+') !== false) {
        $ParanoiaLevel++;
    }
}
$JoinedDate = time_diff($JoinDate);
$LastAccess = time_diff($LastAccess);
function check_paranoia_here($Setting)
{
    global $Paranoia, $Class, $UserID, $Preview;
    if ($Preview == 1) {
        return check_paranoia($Setting, $Paranoia, $Class);
    } else {
        return check_paranoia($Setting, $Paranoia, $Class, $UserID);
    }
}
View::show_header($Username, "jquery.imagesloaded,jquery.wookmark,user,bbcode,requests,lastfm,comments,info_paster", "tiles");
?>
<div class="thin">
	<div class="header">
		<h2><?php 
echo Users::format_username($UserID, true, true, true, false, true);
?>
</h2>
	</div>
	<div class="linkbox">
<?php 
if (!$OwnProfile) {
    ?>
		<a href="inbox.php?action=compose&amp;to=<?php 
    echo $UserID;
    ?>
示例#29
0
$NewsCount = 5;
if (!($News = $Cache->get_value('news'))) {
    $DB->query("\n\t\tSELECT\n\t\t\tID,\n\t\t\tTitle,\n\t\t\tBody,\n\t\t\tTime\n\t\tFROM news\n\t\tORDER BY Time DESC\n\t\tLIMIT {$NewsCount}");
    $News = $DB->to_array(false, MYSQLI_NUM, false);
    $Cache->cache_value('news', $News, 3600 * 24 * 30);
    $Cache->cache_value('news_latest_id', $News[0][0], 0);
    $Cache->cache_value('news_latest_title', $News[0][1], 0);
}
if ($LoggedUser['LastReadNews'] != $News[0][0]) {
    $Cache->begin_transaction("user_info_heavy_{$UserID}");
    $Cache->update_row(false, array('LastReadNews' => $News[0][0]));
    $Cache->commit_transaction(0);
    $DB->query("\n\t\tUPDATE users_info\n\t\tSET LastReadNews = '" . $News[0][0] . "'\n\t\tWHERE UserID = {$UserID}");
    $LoggedUser['LastReadNews'] = $News[0][0];
}
View::show_header('News', 'bbcode,news_ajax');
?>
<div class="thin">
	<div class="sidebar">
<?php 
include 'feat_merch.php';
include 'feat_album.php';
if (check_perms('users_mod')) {
    ?>
		<div class="box">
			<div class="head colhead_dark">
				<strong><a href="staffblog.php">Latest staff blog posts</a></strong>
			</div>
<?php 
    if (($Blog = $Cache->get_value('staff_blog')) === false) {
        $DB->query("\n\t\tSELECT\n\t\t\tb.ID,\n\t\t\tum.Username,\n\t\t\tb.Title,\n\t\t\tb.Body,\n\t\t\tb.Time\n\t\tFROM staff_blog AS b\n\t\t\tLEFT JOIN users_main AS um ON b.UserID = um.ID\n\t\tORDER BY Time DESC");
示例#30
0
<?php

// ugly UserID code that should be turned into a function . . .
if (!empty($_GET['userid'])) {
    if (!check_perms('users_override_paranoia')) {
        error(403);
    }
    $UserID = $_GET['userid'];
    if (!is_number($UserID)) {
        error(404);
    }
    $DB->query("\n\t\tSELECT Username\n\t\tFROM users_main\n\t\tWHERE ID = '{$UserID}'");
    list($Username) = $DB->next_record();
} else {
    $UserID = $LoggedUser['ID'];
}
// Finally we start
// Require the table class
// require_once SERVER_ROOT . '/classes/mass_user_torrents_table_view.class.php';
View::show_header('Organize Bookmarks', 'browse,jquery-ui,jquery.tablesorter,sort');
$EditType = isset($_GET['type']) ? $_GET['type'] : 'torrents';
list(, $CollageDataList, $TorrentList) = Users::get_bookmarks($UserID);
// TODO: $TorrentList might not have the correct order, use the $GroupIDs instead
$TT = new MASS_USER_TORRENTS_TABLE_VIEW($TorrentList, $CollageDataList, $EditType, 'Organize Torrent Bookmarks');
$TT->render_all();
View::show_footer();