mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-14 11:26:26 +00:00
Empty commit
This commit is contained in:
parent
eb6d64c3a9
commit
1908c8fae2
@ -24,23 +24,22 @@ function make_tree(){
|
|||||||
?>
|
?>
|
||||||
<div class="invitetree pad">
|
<div class="invitetree pad">
|
||||||
<?
|
<?
|
||||||
$DB->query("SELECT
|
$DB->query("SELECT TreePosition, TreeID, TreeLevel FROM invite_tree WHERE UserID=$UserID");
|
||||||
t1.TreePosition,
|
list($TreePosition, $TreeID, $TreeLevel) = $DB->next_record(MYSQLI_NUM, false);
|
||||||
t1.TreeID,
|
|
||||||
t1.TreeLevel,
|
|
||||||
(SELECT
|
|
||||||
t2.TreePosition FROM invite_tree AS t2
|
|
||||||
WHERE TreeID=t1.TreeID AND TreeLevel=t1.TreeLevel AND t2.TreePosition>t1.TreePosition
|
|
||||||
ORDER BY TreePosition LIMIT 1
|
|
||||||
) AS MaxPosition
|
|
||||||
FROM invite_tree AS t1
|
|
||||||
WHERE t1.UserID=$UserID");
|
|
||||||
|
|
||||||
list($TreePosition, $TreeID, $TreeLevel, $MaxPosition) = $DB->next_record();
|
if (!$TreeID) {
|
||||||
if(!$MaxPosition){ $MaxPosition = 1000000; } // $MaxPermission is null if the user is the last one in that tree on that level
|
return;
|
||||||
if(!$TreeID){ return; }
|
}
|
||||||
$TreeQuery = $DB->query("
|
$DB->query("SELECT
|
||||||
SELECT
|
TreePosition FROM invite_tree
|
||||||
|
WHERE TreeID=$TreeID AND TreeLevel=$TreeLevel AND TreePosition>$TreePosition
|
||||||
|
ORDER BY TreePosition ASC LIMIT 1");
|
||||||
|
if ($DB->record_count()) {
|
||||||
|
list($MaxPosition) = $DB->next_record(MYSQLI_NUM, false);
|
||||||
|
} else {
|
||||||
|
$MaxPosition = false;
|
||||||
|
}
|
||||||
|
$TreeQuery = $DB->query("SELECT
|
||||||
it.UserID,
|
it.UserID,
|
||||||
Enabled,
|
Enabled,
|
||||||
PermissionID,
|
PermissionID,
|
||||||
@ -54,8 +53,8 @@ function make_tree(){
|
|||||||
JOIN users_main AS um ON um.ID=it.UserID
|
JOIN users_main AS um ON um.ID=it.UserID
|
||||||
JOIN users_info AS ui ON ui.UserID=it.UserID
|
JOIN users_info AS ui ON ui.UserID=it.UserID
|
||||||
WHERE TreeID=$TreeID
|
WHERE TreeID=$TreeID
|
||||||
AND TreePosition>$TreePosition
|
AND TreePosition>$TreePosition".
|
||||||
AND TreePosition<$MaxPosition
|
($MaxPosition ? " AND TreePosition<$MaxPosition" : "")."
|
||||||
AND TreeLevel>$TreeLevel
|
AND TreeLevel>$TreeLevel
|
||||||
ORDER BY TreePosition");
|
ORDER BY TreePosition");
|
||||||
|
|
||||||
|
@ -144,6 +144,7 @@ public static function user_heavy_info($UserID) {
|
|||||||
i.DisablePM,
|
i.DisablePM,
|
||||||
i.DisableRequests,
|
i.DisableRequests,
|
||||||
i.DisableForums,
|
i.DisableForums,
|
||||||
|
i.DisableTagging,
|
||||||
i.SiteOptions,
|
i.SiteOptions,
|
||||||
i.DownloadAlt,
|
i.DownloadAlt,
|
||||||
i.LastReadNews,
|
i.LastReadNews,
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
<?
|
<?
|
||||||
authorize();
|
authorize();
|
||||||
|
if (!empty($LoggedUser['DisableTagging'])) {
|
||||||
|
error(403);
|
||||||
|
}
|
||||||
|
|
||||||
$UserID = $LoggedUser['ID'];
|
$UserID = $LoggedUser['ID'];
|
||||||
$GroupID = db_string($_POST['groupid']);
|
$GroupID = $_POST['groupid'];
|
||||||
|
|
||||||
if (!is_number($GroupID) || !$GroupID) {
|
if (!is_number($GroupID) || !$GroupID) {
|
||||||
error(0);
|
error(0);
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
<?
|
<?
|
||||||
$TagID = db_string($_GET['tagid']);
|
if (!empty($LoggedUser['DisableTagging']) || !check_perms('site_delete_tag')) {
|
||||||
$GroupID = db_string($_GET['groupid']);
|
error(403);
|
||||||
|
}
|
||||||
|
|
||||||
|
$TagID = $_GET['tagid'];
|
||||||
|
$GroupID = $_GET['groupid'];
|
||||||
|
|
||||||
if (!is_number($TagID) || !is_number($GroupID)) {
|
if (!is_number($TagID) || !is_number($GroupID)) {
|
||||||
error(404);
|
error(404);
|
||||||
}
|
}
|
||||||
if(!check_perms('site_delete_tag')) {
|
|
||||||
error(403);
|
|
||||||
}
|
|
||||||
|
|
||||||
$DB->query("SELECT Name FROM tags WHERE ID='$TagID'");
|
$DB->query("SELECT Name FROM tags WHERE ID='$TagID'");
|
||||||
if (list($TagName) = $DB->next_record()) {
|
if (list($TagName) = $DB->next_record()) {
|
||||||
|
@ -328,7 +328,7 @@ function compare($X, $Y){
|
|||||||
<? if(check_perms('users_warn')){ ?>
|
<? if(check_perms('users_warn')){ ?>
|
||||||
<a href="user.php?id=<?=$Tag['userid']?>" title="View the profile of the user that added this tag" class="view_tag_user">[U]</a>
|
<a href="user.php?id=<?=$Tag['userid']?>" title="View the profile of the user that added this tag" class="view_tag_user">[U]</a>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
<? if(check_perms('site_delete_tag')){ ?>
|
<? if(empty($LoggedUser['DisableTagging']) && check_perms('site_delete_tag')){ ?>
|
||||||
<span class="remove remove_tag"><a href="torrents.php?action=delete_tag&groupid=<?=$GroupID?>&tagid=<?=$Tag['id']?>&auth=<?=$LoggedUser['AuthKey']?>" title="Remove tag">[X]</a></span>
|
<span class="remove remove_tag"><a href="torrents.php?action=delete_tag&groupid=<?=$GroupID?>&tagid=<?=$Tag['id']?>&auth=<?=$LoggedUser['AuthKey']?>" title="Remove tag">[X]</a></span>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
</div>
|
</div>
|
||||||
@ -346,6 +346,9 @@ function compare($X, $Y){
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
<?
|
||||||
|
if (empty($LoggedUser['DisableTagging'])) {
|
||||||
|
?>
|
||||||
<div class="box box_addtag">
|
<div class="box box_addtag">
|
||||||
<div class="head"><strong>Add tag</strong></div>
|
<div class="head"><strong>Add tag</strong></div>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
@ -360,7 +363,9 @@ function compare($X, $Y){
|
|||||||
<strong><a href="rules.php?p=tag">Tagging rules</a></strong>
|
<strong><a href="rules.php?p=tag">Tagging rules</a></strong>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<?
|
||||||
|
}
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
<div class="main_column">
|
<div class="main_column">
|
||||||
<table class="torrent_table details" id="torrent_details">
|
<table class="torrent_table details" id="torrent_details">
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
define('USERS_PER_PAGE', 30);
|
define('USERS_PER_PAGE', 30);
|
||||||
|
|
||||||
if(isset($_GET['username'])){
|
if(isset($_GET['username'])){
|
||||||
|
|
||||||
$_GET['username'] = trim($_GET['username']);
|
$_GET['username'] = trim($_GET['username']);
|
||||||
// form submitted
|
// form submitted
|
||||||
$Val->SetFields('username','1','username','Please enter a username.');
|
$Val->SetFields('username','1','username','Please enter a username.');
|
||||||
|
Loading…
Reference in New Issue
Block a user