mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-02-21 20:59:02 +00:00
Empty commit
This commit is contained in:
parent
5083111449
commit
b4191a958c
@ -45,6 +45,9 @@ function check_paranoia($Property, $Paranoia, $UserClass, $UserID = false) {
|
|||||||
if(check_perms('users_override_paranoia', $UserClass)) {
|
if(check_perms('users_override_paranoia', $UserClass)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if ($Property == false) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if(!is_array($Paranoia)) {
|
if(!is_array($Paranoia)) {
|
||||||
$Paranoia = unserialize($Paranoia);
|
$Paranoia = unserialize($Paranoia);
|
||||||
}
|
}
|
||||||
|
@ -1268,7 +1268,8 @@ CREATE TABLE `users_sessions` (
|
|||||||
PRIMARY KEY (`UserID`,`SessionID`),
|
PRIMARY KEY (`UserID`,`SessionID`),
|
||||||
KEY `UserID` (`UserID`),
|
KEY `UserID` (`UserID`),
|
||||||
KEY `LastUpdate` (`LastUpdate`),
|
KEY `LastUpdate` (`LastUpdate`),
|
||||||
KEY `Active` (`Active`)
|
KEY `Active` (`Active`),
|
||||||
|
KEY `ActiveAgeKeep` (`Active`,`LastUpdate`,`KeepLogged`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
CREATE TABLE `users_subscriptions` (
|
CREATE TABLE `users_subscriptions` (
|
||||||
|
@ -263,7 +263,7 @@ function next_hour() {
|
|||||||
sleep(3);
|
sleep(3);
|
||||||
|
|
||||||
$AgoDays = time_minus(3600*24*30);
|
$AgoDays = time_minus(3600*24*30);
|
||||||
$DB->query("SELECT UserID, SessionID FROM users_sessions WHERE LastUpdate<'$AgoDays' AND KeepLogged='1'");
|
$DB->query("SELECT UserID, SessionID FROM users_sessions WHERE Active = 1 AND LastUpdate<'$AgoDays' AND KeepLogged='1'");
|
||||||
while(list($UserID,$SessionID) = $DB->next_record()) {
|
while(list($UserID,$SessionID) = $DB->next_record()) {
|
||||||
$Cache->begin_transaction('users_sessions_'.$UserID);
|
$Cache->begin_transaction('users_sessions_'.$UserID);
|
||||||
$Cache->delete_row($SessionID);
|
$Cache->delete_row($SessionID);
|
||||||
@ -275,7 +275,7 @@ function next_hour() {
|
|||||||
|
|
||||||
|
|
||||||
$AgoMins = time_minus(60*30);
|
$AgoMins = time_minus(60*30);
|
||||||
$DB->query("SELECT UserID, SessionID FROM users_sessions WHERE LastUpdate<'$AgoMins' AND KeepLogged='0'");
|
$DB->query("SELECT UserID, SessionID FROM users_sessions WHERE Active = 1 AND LastUpdate<'$AgoMins' AND KeepLogged='0'");
|
||||||
while(list($UserID,$SessionID) = $DB->next_record()) {
|
while(list($UserID,$SessionID) = $DB->next_record()) {
|
||||||
$Cache->begin_transaction('users_sessions_'.$UserID);
|
$Cache->begin_transaction('users_sessions_'.$UserID);
|
||||||
$Cache->delete_row($SessionID);
|
$Cache->delete_row($SessionID);
|
||||||
|
@ -120,7 +120,7 @@
|
|||||||
$Data['PersonalFL'] = 1;
|
$Data['PersonalFL'] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$DisplayName.= "<a href='torrents.php?id=$GroupID&torrentid=$TorrentID#torrentID$TorrentID' title='View Torrent'>".$GroupName."</a>";
|
$DisplayName.= "<a href='torrents.php?id=$GroupID&torrentid=$TorrentID#torrent$TorrentID' title='View Torrent'>".$GroupName."</a>";
|
||||||
|
|
||||||
if($GroupCategoryID==1 && $GroupYear>0) {
|
if($GroupCategoryID==1 && $GroupYear>0) {
|
||||||
$DisplayName.= " [$GroupYear]";
|
$DisplayName.= " [$GroupYear]";
|
||||||
|
@ -221,7 +221,7 @@ function check_paranoia_here($Setting) {
|
|||||||
<? if (check_paranoia_here('requiredratio') && isset($RequiredRatio)) { ?>
|
<? if (check_paranoia_here('requiredratio') && isset($RequiredRatio)) { ?>
|
||||||
<li>Required ratio: <?=number_format((double)$RequiredRatio, 2)?></li>
|
<li>Required ratio: <?=number_format((double)$RequiredRatio, 2)?></li>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
<? if ($OwnProfile || check_perms('users_mod')) { ?>
|
<? if ($OwnProfile || check_paranoia_here(false)) { //if ($OwnProfile || check_perms('users_mod')) { ?>
|
||||||
<li><a href="userhistory.php?action=token_history&userid=<?=$UserID?>">Tokens</a>: <?=number_format($FLTokens)?></li>
|
<li><a href="userhistory.php?action=token_history&userid=<?=$UserID?>">Tokens</a>: <?=number_format($FLTokens)?></li>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -9,18 +9,19 @@
|
|||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
if (isset($_GET['userid'])) {
|
if (isset($_GET['userid'])) {
|
||||||
if (($_GET['userid'] == $LoggedUser['ID']) || check_perms('users_mod')) {
|
$UserID = $_GET['userid'];
|
||||||
$UserID = $_GET['userid'];
|
|
||||||
} else {
|
|
||||||
error(403);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$UserID = $LoggedUser['ID'];
|
$UserID = $LoggedUser['ID'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_number($UserID)) { error(404); }
|
if (!is_number($UserID)) { error(404); }
|
||||||
|
|
||||||
$UserInfo = user_info($UserID);
|
$UserInfo = user_info($UserID);
|
||||||
|
$Perms = get_permissions($UserInfo['PermissionID']);
|
||||||
|
$UserClass = $Perms['Class'];
|
||||||
|
|
||||||
|
if($LoggedUser['ID'] != $UserID && !check_paranoia(false, $User['Paranoia'], $UserClass, $UserID)) {
|
||||||
|
error(403);
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($_GET['expire'])) {
|
if (isset($_GET['expire'])) {
|
||||||
if (!check_perms('users_mod')) { error(403); }
|
if (!check_perms('users_mod')) { error(403); }
|
||||||
|
Loading…
Reference in New Issue
Block a user