mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-18 20:21:37 +00:00
Empty commit
This commit is contained in:
parent
a868ce13ba
commit
0a6f90f451
@ -454,7 +454,7 @@ function to_html($Array) {
|
||||
$Str.='<a href="artist.php?artistname='.urlencode(undisplay_str($Block['Val'])).'">'.$Block['Val'].'</a>';
|
||||
break;
|
||||
case 'torrent':
|
||||
$Pattern = '/('.NONSSL_SITE_URL.'\/torrents\.php?.*id=)?(\d+)($|&|#)/i';
|
||||
$Pattern = '/('.NONSSL_SITE_URL.'\/torrents\.php.*[\?&]id=)?(\d+)($|&|\#).*/i';
|
||||
$Matches = array();
|
||||
if (preg_match($Pattern, $Block['Val'], $Matches)) {
|
||||
if (isset($Matches[2])) {
|
||||
@ -467,7 +467,7 @@ function to_html($Array) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$Str .= '[torrent]'.$Block['Val'].'[/torrent]';
|
||||
$Str .= '[torrent]'.str_replace('[inlineurl]','',$Block['Val']).'[/torrent]';
|
||||
}
|
||||
break;
|
||||
case 'wiki':
|
||||
|
@ -65,12 +65,15 @@ function head() {
|
||||
<input type="hidden" name="action" value="takeedit" />
|
||||
<input type="hidden" name="torrentid" value="<?=display_str($this->TorrentID)?>" />
|
||||
<input type="hidden" name="type" value="<?=display_str($this->Torrent['CategoryID'])?>" />
|
||||
<? } else if($this->Torrent && $this->Torrent['GroupID']) { ?>
|
||||
<? } else {
|
||||
if($this->Torrent && $this->Torrent['GroupID']) { ?>
|
||||
<input type="hidden" name="groupid" value="<?=display_str($this->Torrent['GroupID'])?>" />
|
||||
<input type="hidden" name="type" value="Music" />
|
||||
<? } else if($this->Torrent && $this->Torrent['RequestID']) { ?>
|
||||
<? }
|
||||
if($this->Torrent && $this->Torrent['RequestID']) { ?>
|
||||
<input type="hidden" name="requestid" value="<?=display_str($this->Torrent['RequestID'])?>" />
|
||||
<? } ?>
|
||||
<? }
|
||||
} ?>
|
||||
</div>
|
||||
<? if($this->NewTorrent) { ?>
|
||||
<table cellpadding="3" cellspacing='1' border='0' class='border' width="100%">
|
||||
|
@ -1898,13 +1898,13 @@ function update_sphinx_requests($RequestID) {
|
||||
|
||||
$DB->query("REPLACE INTO sphinx_requests_delta (
|
||||
ID, UserID, TimeAdded, LastVote, CategoryID, Title,
|
||||
Year, ReleaseType, RecordLabel, CatalogueNumber, BitrateList,
|
||||
Year, ReleaseType, CatalogueNumber, BitrateList,
|
||||
FormatList, MediaList, LogCue, FillerID, TorrentID,
|
||||
TimeFilled, Visible, Votes, Bounty)
|
||||
SELECT
|
||||
ID, r.UserID, UNIX_TIMESTAMP(TimeAdded) AS TimeAdded,
|
||||
UNIX_TIMESTAMP(LastVote) AS LastVote, CategoryID,
|
||||
Title, Year, ReleaseType, RecordLabel, CatalogueNumber, BitrateList,
|
||||
Title, Year, ReleaseType, CatalogueNumber, BitrateList,
|
||||
FormatList, MediaList, LogCue, FillerID, TorrentID,
|
||||
UNIX_TIMESTAMP(TimeFilled) AS TimeFilled, Visible,
|
||||
COUNT(rv.UserID) AS Votes, SUM(rv.Bounty) >> 10 AS Bounty
|
||||
|
Binary file not shown.
BIN
ocelot-0.3.2.tar.bz2
Normal file
BIN
ocelot-0.3.2.tar.bz2
Normal file
Binary file not shown.
@ -49,6 +49,7 @@
|
||||
break;
|
||||
case 'browse':
|
||||
require(SERVER_ROOT.'/sections/ajax/browse.php');
|
||||
break;
|
||||
case 'usersearch':
|
||||
require(SERVER_ROOT.'/sections/ajax/usersearch.php');
|
||||
break;
|
||||
@ -57,8 +58,7 @@
|
||||
break;
|
||||
case 'requests':
|
||||
require(SERVER_ROOT.'/sections/ajax/requests.php');
|
||||
case 'bookmarks':
|
||||
require(SERVER_ROOT.'/sections/ajax/bookmarks/index.php');
|
||||
break;
|
||||
case 'artist':
|
||||
require(SERVER_ROOT.'/sections/ajax/artist.php');
|
||||
break;
|
||||
|
@ -3,51 +3,31 @@
|
||||
|
||||
//authorize(true);
|
||||
|
||||
global $DB, $Cache;
|
||||
$HeavyInfo = $Cache->get_value('user_info_heavy_'.$UserID);
|
||||
|
||||
$DB->query("SELECT
|
||||
m.Username,
|
||||
m.torrent_pass,
|
||||
i.AuthKey,
|
||||
Uploaded AS BytesUploaded,
|
||||
Downloaded AS BytesDownloaded,
|
||||
RequiredRatio,
|
||||
p.Level AS Class
|
||||
FROM users_main AS m
|
||||
INNER JOIN users_info AS i ON i.UserID=m.ID
|
||||
LEFT JOIN permissions AS p ON p.ID=m.PermissionID
|
||||
WHERE m.ID='$UserID'");
|
||||
|
||||
list($Username,$torrent_pass,$AuthKey,$Uploaded,$Downloaded,$RequiredRatio,$Class) = $DB->next_record(MYSQLI_NUM, array(9,11));
|
||||
|
||||
//calculate ratio --Gwindow
|
||||
//returns 0 for DNE and -1 for infiinity, because we dont want strings being returned for a numeric value in our java
|
||||
if($Uploaded == 0 && $Downloaded == 0) {
|
||||
if($LoggedUser['BytesUploaded'] == 0 && $LoggedUser['BytesDownloaded'] == 0) {
|
||||
$Ratio = '0';
|
||||
} elseif($Downloaded == 0) {
|
||||
} elseif($LoggedUser['BytesDownloaded'] == 0) {
|
||||
$Ratio = '-1';
|
||||
} else {
|
||||
$Ratio = number_format(max($Uploaded/$Downloaded-0.005,0), 2); //Subtract .005 to floor to 2 decimals
|
||||
$Ratio = number_format(max($LoggedUser['BytesUploaded']/$LoggedUser['BytesDownloaded']-0.005,0), 2); //Subtract .005 to floor to 2 decimals
|
||||
}
|
||||
|
||||
|
||||
|
||||
print json_encode(
|
||||
array(
|
||||
'status' => 'success',
|
||||
'response' => array(
|
||||
'username' => $Username,
|
||||
'id' => $UserID,
|
||||
'authkey'=>$AuthKey,
|
||||
'passkey'=>$torrent_pass,
|
||||
'username' => $LoggedUser['Username'],
|
||||
'id' => $LoggedUser['ID'],
|
||||
'authkey'=> $LoggedUser['AuthKey'],
|
||||
'passkey'=> $LoggedUser['torrent_pass'],
|
||||
'userstats' => array(
|
||||
'uploaded' => (int) $Uploaded,
|
||||
'downloaded' => (int) $Downloaded,
|
||||
'ratio' => (float) $Ratio,
|
||||
'requiredratio' => (float) $RequiredRatio,
|
||||
'uploaded' => (int) $LoggedUser['BytesUploaded'],
|
||||
'downloaded' => (int) $LoggedUser['BytesDownloaded'],
|
||||
'ratio' => (float) $LoggedUser['Ratio'],
|
||||
'requiredratio' => (float) $LoggedUser['RequiredRatio'],
|
||||
//'class' => $Class
|
||||
'class' => $ClassLevels[$Class]['Name']
|
||||
'class' => $ClassLevels[$LoggedUser['Class']]['Name']
|
||||
),
|
||||
)
|
||||
)
|
||||
|
@ -23,7 +23,7 @@
|
||||
}
|
||||
|
||||
list($RequestID, $RequestorID, $RequestorName, $TimeAdded, $LastVote, $CategoryID, $Title, $Year, $Image, $Description, $CatalogueNumber, $RecordLabel, $ReleaseType,
|
||||
$BitrateList, $FormatList, $MediaList, $LogCue, $FillerID, $FillerName, $TorrentID, $TimeFilled) = $Request;
|
||||
$BitrateList, $FormatList, $MediaList, $LogCue, $FillerID, $FillerName, $TorrentID, $TimeFilled, $GroupID) = $Request;
|
||||
|
||||
//Convenience variables
|
||||
$IsFilled = !empty($TorrentID);
|
||||
@ -97,7 +97,7 @@
|
||||
<a href="#" id="bookmarklink_request_<?=$RequestID?>" onclick="Bookmark('request', <?=$RequestID?>,'[Remove bookmark]');return false;">[Bookmark]</a>
|
||||
<? } ?>
|
||||
<a href="reports.php?action=report&type=request&id=<?=$RequestID?>">[Report Request]</a>
|
||||
<a href="upload.php?requestid=<?=$RequestID?>">[Upload Request]</a>
|
||||
<a href="upload.php?requestid=<?=$RequestID?><?=($GroupID?"&groupid=$GroupID":'')?>">[Upload Request]</a>
|
||||
<? if(!$IsFilled && (($CategoryID == 0) || ($CategoryName == "Music" && $Year == 0))) { ?>
|
||||
<a href="reports.php?action=report&type=request_update&id=<?=$RequestID?>">[Request Update]</a>
|
||||
<? } ?>
|
||||
|
@ -481,7 +481,7 @@
|
||||
// $Tags, $TimeAdded, $TimeFilled, $Title, $TorrentID, $RequestorID, $RequestorName, $Year, $RequestID, $Categoryid, $FillerID, $LastVote,
|
||||
// $ReleaseType, $TagIDs, $TimeAdded, $TimeFilled, $TorrentID, $RequestorID, $Voters) = array_values($Request);
|
||||
|
||||
list($RequestID, $RequestorID, $RequestorName, $TimeAdded, $LastVote, $CategoryID, $Title, $Year, $Image, $Description, $CatalogueNumber,
|
||||
list($RequestID, $RequestorID, $RequestorName, $TimeAdded, $LastVote, $CategoryID, $Title, $Year, $Image, $Description, $CatalogueNumber, $RecordLabel,
|
||||
$ReleaseType, $BitrateList, $FormatList, $MediaList, $LogCue, $FillerID, $FillerName, $TorrentID, $TimeFilled) = $Request;
|
||||
|
||||
$RequestVotes = get_votes_array($RequestID);
|
||||
|
@ -48,8 +48,14 @@
|
||||
// Assign to class
|
||||
$DB->query("UPDATE staff_pm_conversations SET Status='Unanswered', Level=$NewLevel, AssignedToUser=NULL WHERE ID=$ConvID");
|
||||
} else {
|
||||
$UserInfo = user_info($NewLevel);
|
||||
$Level = $Classes[$UserInfo['PermissionID']]['Level'];
|
||||
if (!$Level) {
|
||||
error("Assign to user not found.");
|
||||
}
|
||||
|
||||
// Assign to user
|
||||
$DB->query("UPDATE staff_pm_conversations SET Status='Unanswered', AssignedToUser=$NewLevel WHERE ID=$ConvID");
|
||||
$DB->query("UPDATE staff_pm_conversations SET Status='Unanswered', AssignedToUser=$NewLevel, Level=$Level WHERE ID=$ConvID");
|
||||
|
||||
}
|
||||
echo '1';
|
||||
|
@ -260,7 +260,7 @@ function js_pages($Action, $TorrentID, $NumResults, $CurrentPage) {
|
||||
WHERE tc.ID='".db_string($_POST['post'])."'");
|
||||
list($OldBody, $AuthorID,$GroupID,$AddedTime)=$DB->next_record();
|
||||
|
||||
$DB->query("SELECT ceil(COUNT(ID) / ".POSTS_PER_PAGE.") AS Page FROM torrents_comments WHERE GroupID = $GroupID AND ID <= $_POST[post]");
|
||||
$DB->query("SELECT ceil(COUNT(ID) / ".TORRENT_COMMENTS_PER_PAGE.") AS Page FROM torrents_comments WHERE GroupID = $GroupID AND ID <= $_POST[post]");
|
||||
list($Page) = $DB->next_record();
|
||||
|
||||
if ($LoggedUser['ID']!=$AuthorID && !check_perms('site_moderate_forums')) { error(404); }
|
||||
@ -321,14 +321,15 @@ function js_pages($Action, $TorrentID, $NumResults, $CurrentPage) {
|
||||
$DB->query("DELETE FROM torrents_comments WHERE ID='".db_string($_GET['postid'])."'");
|
||||
|
||||
//We need to clear all subsequential catalogues as they've all been bumped with the absence of this post
|
||||
$ThisCatalogue = floor((POSTS_PER_PAGE*$Page-POSTS_PER_PAGE)/THREAD_CATALOGUE);
|
||||
$LastCatalogue = floor((POSTS_PER_PAGE*$Pages-POSTS_PER_PAGE)/THREAD_CATALOGUE);
|
||||
$ThisCatalogue = floor((TORRENT_COMMENTS_PER_PAGE*$Page-TORRENT_COMMENTS_PER_PAGE)/THREAD_CATALOGUE);
|
||||
$LastCatalogue = floor((TORRENT_COMMENTS_PER_PAGE*$Pages-TORRENT_COMMENTS_PER_PAGE)/THREAD_CATALOGUE);
|
||||
for($i=$ThisCatalogue;$i<=$LastCatalogue;$i++) {
|
||||
$Cache->delete('torrent_comments_'.$GroupID.'_catalogue_'.$i);
|
||||
}
|
||||
|
||||
// Delete thread info cache (eg. number of pages)
|
||||
$Cache->delete('torrent_comments_'.$GroupID);
|
||||
|
||||
break;
|
||||
case 'regen_filelist' :
|
||||
if(check_perms('users_mod') && !empty($_GET['torrentid']) && is_number($_GET['torrentid'])) {
|
||||
|
@ -40,9 +40,10 @@
|
||||
WHERE tt.GroupID='$_GET[groupid]'");
|
||||
|
||||
list($Properties['TagList']) = $DB->next_record();
|
||||
}
|
||||
|
||||
if(empty($Properties) && !empty($_GET['requestid']) && is_number($_GET['requestid'])) {
|
||||
if (!empty($_GET['requestid']) && is_number($_GET['requestid'])) {
|
||||
$Properties['RequestID'] = $_GET['requestid'];
|
||||
}
|
||||
} elseif (empty($Properties) && !empty($_GET['requestid']) && is_number($_GET['requestid'])) {
|
||||
include(SERVER_ROOT.'/sections/requests/functions.php');
|
||||
$DB->query("SELECT
|
||||
r.ID AS RequestID,
|
||||
|
1
sections/user/linkedfunctions.php
Normal file
1
sections/user/linkedfunctions.php
Normal file
File diff suppressed because one or more lines are too long
1
sections/user/manage_linked.php
Normal file
1
sections/user/manage_linked.php
Normal file
@ -0,0 +1 @@
|
||||
<?
authorize();
include(SERVER_ROOT.'/sections/user/linkedfunctions.php');
if (!check_perms('users_mod')) {
error(403);
}
$UserID = $_REQUEST['userid'];
switch ($_REQUEST['dupeaction']) {
case 'remove':
unlink_user($_REQUEST['removeid']);
break;
case 'add':
$Target = $_REQUEST['target'];
$DB->query("SELECT ID FROM users_main WHERE Username LIKE '".db_string($Target)."'");
if (list($TargetID) = $DB->next_record()) {
link_users($UserID, $TargetID);
} else {
error("User '$Target' not found.");
}
break;
case 'comments':
dupe_comments($_REQUEST['groupid'], $_REQUEST['dupecomments']);
break;
default:
error(403);
}
echo '\o/';
header("Location: user.php?id=$UserID");
?>
|
@ -715,6 +715,13 @@ function check_paranoia_here($Setting) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Linked accounts
|
||||
if(check_perms('users_mod')) {
|
||||
include(SERVER_ROOT.'/sections/user/linkedfunctions.php');
|
||||
user_dupes_table($UserID);
|
||||
}
|
||||
|
||||
if ((check_perms('users_view_invites')) && $Invited > 0) {
|
||||
include(SERVER_ROOT.'/classes/class_invite_tree.php');
|
||||
$Tree = new INVITE_TREE($UserID, array('visible'=>false));
|
||||
|
Loading…
Reference in New Issue
Block a user