mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-13 02:46:30 +00:00
Empty commit
This commit is contained in:
parent
f2d5000e81
commit
af4086f355
@ -8,7 +8,7 @@
|
|||||||
$Cache = NEW CACHE($MemcachedServers); //Load the caching class
|
$Cache = NEW CACHE($MemcachedServers); //Load the caching class
|
||||||
$Enc = NEW CRYPT; //Load the encryption class
|
$Enc = NEW CRYPT; //Load the encryption class
|
||||||
|
|
||||||
$SSL = ($_SERVER['SERVER_PORT'] === '443');
|
$SSL = $_SERVER['SERVER_PORT'] === '443';
|
||||||
|
|
||||||
if (isset($_COOKIE['session'])) {
|
if (isset($_COOKIE['session'])) {
|
||||||
$LoginCookie = $Enc->decrypt($_COOKIE['session']);
|
$LoginCookie = $Enc->decrypt($_COOKIE['session']);
|
||||||
@ -20,7 +20,7 @@
|
|||||||
die('Not logged in!');
|
die('Not logged in!');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$Enabled = $Cache->get_value('enabled_'.$UserID)) {
|
if (!$Enabled = $Cache->get_value("enabled_$UserID")) {
|
||||||
require(SERVER_ROOT.'/classes/mysql.class.php'); //Require the database wrapper
|
require(SERVER_ROOT.'/classes/mysql.class.php'); //Require the database wrapper
|
||||||
$DB = NEW DB_MYSQL; //Load the database wrapper
|
$DB = NEW DB_MYSQL; //Load the database wrapper
|
||||||
$DB->query("
|
$DB->query("
|
||||||
@ -28,7 +28,7 @@
|
|||||||
FROM users_main
|
FROM users_main
|
||||||
WHERE ID = '$UserID'");
|
WHERE ID = '$UserID'");
|
||||||
list($Enabled) = $DB->next_record();
|
list($Enabled) = $DB->next_record();
|
||||||
$Cache->cache_value('enabled_'.$UserID, $Enabled, 0);
|
$Cache->cache_value("enabled_$UserID", $Enabled, 0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
die('Not logged in!');
|
die('Not logged in!');
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
CHANGE LOG
|
CHANGE LOG
|
||||||
|
|
||||||
|
2013-11-23 by alderaan
|
||||||
|
Add a warning message when attempting to delete a personal collage
|
||||||
|
|
||||||
|
2013-11-23 by alderaan
|
||||||
|
Add collage recovery link to the Staff Toolbox
|
||||||
|
|
||||||
2013-11-09 by mcnellis
|
2013-11-09 by mcnellis
|
||||||
Set image max-width explicitly for each stylesheet.
|
Set image max-width explicitly for each stylesheet.
|
||||||
Also added new classes for news_post, blog_post, wiki_article, torrent_comments, request_comments, artist information, and more
|
Also added new classes for news_post, blog_post, wiki_article, torrent_comments, request_comments, artist information, and more
|
||||||
|
@ -6,10 +6,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$DB->query("
|
$DB->query("
|
||||||
SELECT Name, UserID
|
SELECT Name, CategoryID, UserID
|
||||||
FROM collages
|
FROM collages
|
||||||
WHERE ID = '$CollageID'");
|
WHERE ID = '$CollageID'");
|
||||||
list($Name, $UserID) = $DB->next_record();
|
list($Name, $CategoryID, $UserID) = $DB->next_record();
|
||||||
|
|
||||||
if (!check_perms('site_collages_delete') && $UserID != $LoggedUser['ID']) {
|
if (!check_perms('site_collages_delete') && $UserID != $LoggedUser['ID']) {
|
||||||
error(403);
|
error(403);
|
||||||
@ -27,6 +27,15 @@
|
|||||||
<input type="hidden" name="action" value="take_delete" />
|
<input type="hidden" name="action" value="take_delete" />
|
||||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||||
<input type="hidden" name="collageid" value="<?=$CollageID?>" />
|
<input type="hidden" name="collageid" value="<?=$CollageID?>" />
|
||||||
|
<?
|
||||||
|
if ($CategoryID == 0) {
|
||||||
|
?>
|
||||||
|
<div class="alertbar" style="margin-bottom: 1em;">
|
||||||
|
<strong>Warning: This is a personal collage. If you delete this collage, it <em>cannot</em> be recovered!</strong>
|
||||||
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
<div class="field_div">
|
<div class="field_div">
|
||||||
<strong>Reason: </strong>
|
<strong>Reason: </strong>
|
||||||
<input type="text" name="reason" size="40" />
|
<input type="text" name="reason" size="40" />
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
<input type="hidden" name="action" value="recover" />
|
<input type="hidden" name="action" value="recover" />
|
||||||
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
||||||
<div class="field_div">
|
<div class="field_div">
|
||||||
<strong>ID: </strong>
|
<strong>Collage ID: </strong>
|
||||||
<input type="text" name="collage_id" size="8" />
|
<input type="text" name="collage_id" size="8" />
|
||||||
</div>
|
</div>
|
||||||
<div class="submit_div">
|
<div class="submit_div">
|
||||||
@ -45,5 +45,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<? View::show_footer();
|
<?
|
||||||
|
View::show_footer();
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<?
|
<?
|
||||||
authorize();
|
authorize();
|
||||||
|
|
||||||
|
|
||||||
$CollageID = $_POST['collageid'];
|
$CollageID = $_POST['collageid'];
|
||||||
if (!is_number($CollageID) || !$CollageID) {
|
if (!is_number($CollageID) || !$CollageID) {
|
||||||
error(404);
|
error(404);
|
||||||
@ -34,8 +33,12 @@
|
|||||||
|
|
||||||
//Personal collages have CategoryID 0
|
//Personal collages have CategoryID 0
|
||||||
if ($CategoryID == 0) {
|
if ($CategoryID == 0) {
|
||||||
$DB->query("DELETE FROM collages WHERE ID = '$CollageID'");
|
$DB->query("
|
||||||
$DB->query("DELETE FROM collages_torrents WHERE CollageID = '$CollageID'");
|
DELETE FROM collages
|
||||||
|
WHERE ID = '$CollageID'");
|
||||||
|
$DB->query("
|
||||||
|
DELETE FROM collages_torrents
|
||||||
|
WHERE CollageID = '$CollageID'");
|
||||||
Comments::delete_page('collages', $CollageID);
|
Comments::delete_page('collages', $CollageID);
|
||||||
} else {
|
} else {
|
||||||
$DB->query("
|
$DB->query("
|
||||||
|
@ -6,15 +6,6 @@
|
|||||||
View::show_header($Title);
|
View::show_header($Title);
|
||||||
|
|
||||||
$Balance = DonationsBitcoin::get_balance() . ' BTC';
|
$Balance = DonationsBitcoin::get_balance() . ' BTC';
|
||||||
$BitcoinAddresses = DonationsBitcoin::get_received();
|
|
||||||
$Debug->log_var($BitcoinAddresses, 'Bitcoin addresses');
|
|
||||||
|
|
||||||
$UserQ = $DB->query("
|
|
||||||
SELECT i.UserID, i.BitcoinAddress
|
|
||||||
FROM users_info AS i
|
|
||||||
JOIN users_main AS m ON m.ID = i.UserID
|
|
||||||
WHERE BitcoinAddress != ''
|
|
||||||
ORDER BY m.Username ASC");
|
|
||||||
?>
|
?>
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<h2><?=$Title?></h2>
|
<h2><?=$Title?></h2>
|
||||||
@ -23,6 +14,20 @@
|
|||||||
<div class="header">
|
<div class="header">
|
||||||
<h3><?=$Balance?></h3>
|
<h3><?=$Balance?></h3>
|
||||||
</div>
|
</div>
|
||||||
|
<?
|
||||||
|
if (empty($_GET['list'])) {
|
||||||
|
?>
|
||||||
|
<a href="?action=<?=$_GET['action']?>&list=1" class="brackets">Show donor list</a>
|
||||||
|
<?
|
||||||
|
} else {
|
||||||
|
$BitcoinAddresses = DonationsBitcoin::get_received();
|
||||||
|
$DB->query("
|
||||||
|
SELECT i.UserID, i.BitcoinAddress
|
||||||
|
FROM users_info AS i
|
||||||
|
JOIN users_main AS m ON m.ID = i.UserID
|
||||||
|
WHERE BitcoinAddress != ''
|
||||||
|
ORDER BY m.Username ASC");
|
||||||
|
?>
|
||||||
<table>
|
<table>
|
||||||
<tr class="colhead">
|
<tr class="colhead">
|
||||||
<th>Username</th>
|
<th>Username</th>
|
||||||
@ -41,9 +46,11 @@
|
|||||||
<td><?=$BitcoinAddresses[$BitcoinAddress]?> BTC</td>
|
<td><?=$BitcoinAddresses[$BitcoinAddress]?> BTC</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?
|
<?
|
||||||
$DB->set_query_id($UserQ);
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
<? View::show_footer(); ?>
|
<? View::show_footer(); ?>
|
||||||
|
@ -196,6 +196,7 @@ function create_row($Title, $URL, $HasPermission = false, $Tooltip = false) {
|
|||||||
|
|
||||||
// begin Torrents category
|
// begin Torrents category
|
||||||
$ToolsHTML = "";
|
$ToolsHTML = "";
|
||||||
|
create_row("Collage recovery", "collages.php?action=recover", check_perms("site_collages_recover"));
|
||||||
create_row("\"Do Not Upload\" list", "tools.php?action=dnu", check_perms("admin_dnu"));
|
create_row("\"Do Not Upload\" list", "tools.php?action=dnu", check_perms("admin_dnu"));
|
||||||
create_row("Manage freeleech tokens", "tools.php?action=tokens", check_perms("users_mod"));
|
create_row("Manage freeleech tokens", "tools.php?action=tokens", check_perms("users_mod"));
|
||||||
create_row("Label aliases", "tools.php?action=label_aliases", check_perms("users_mod"));
|
create_row("Label aliases", "tools.php?action=label_aliases", check_perms("users_mod"));
|
||||||
|
@ -244,6 +244,7 @@
|
|||||||
DELETE FROM xbt_snatched
|
DELETE FROM xbt_snatched
|
||||||
WHERE uid = '$UserID'");
|
WHERE uid = '$UserID'");
|
||||||
$EditSummary[] = 'Snatch list cleared';
|
$EditSummary[] = 'Snatch list cleared';
|
||||||
|
$Cache->delete_value("recent_snatches_$UserID");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST['ResetDownloadList'] && check_perms('users_edit_reset_keys')) {
|
if ($_POST['ResetDownloadList'] && check_perms('users_edit_reset_keys')) {
|
||||||
|
@ -175,7 +175,9 @@ function check_paranoia_here($Setting) {
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
<div class="thin">
|
<div class="thin">
|
||||||
|
<div class="header">
|
||||||
<h2><?=Users::format_username($UserID, true, true, true, false, true)?></h2>
|
<h2><?=Users::format_username($UserID, true, true, true, false, true)?></h2>
|
||||||
|
</div>
|
||||||
<div class="linkbox">
|
<div class="linkbox">
|
||||||
<?
|
<?
|
||||||
if (!$OwnProfile) {
|
if (!$OwnProfile) {
|
||||||
|
Loading…
Reference in New Issue
Block a user