mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-13 19:06:27 +00:00
Empty commit
This commit is contained in:
parent
eb6d64c3a9
commit
1908c8fae2
@ -18,29 +18,28 @@ function INVITE_TREE($UserID, $Options = array()){
|
||||
}
|
||||
}
|
||||
|
||||
function make_tree(){
|
||||
function make_tree() {
|
||||
$UserID = $this->UserID;
|
||||
global $DB;
|
||||
?>
|
||||
<div class="invitetree pad">
|
||||
<?
|
||||
$DB->query("SELECT
|
||||
t1.TreePosition,
|
||||
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(!$MaxPosition){ $MaxPosition = 1000000; } // $MaxPermission is null if the user is the last one in that tree on that level
|
||||
if(!$TreeID){ return; }
|
||||
$TreeQuery = $DB->query("
|
||||
SELECT
|
||||
$DB->query("SELECT TreePosition, TreeID, TreeLevel FROM invite_tree WHERE UserID=$UserID");
|
||||
list($TreePosition, $TreeID, $TreeLevel) = $DB->next_record(MYSQLI_NUM, false);
|
||||
|
||||
if (!$TreeID) {
|
||||
return;
|
||||
}
|
||||
$DB->query("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,
|
||||
Enabled,
|
||||
PermissionID,
|
||||
@ -54,8 +53,8 @@ function make_tree(){
|
||||
JOIN users_main AS um ON um.ID=it.UserID
|
||||
JOIN users_info AS ui ON ui.UserID=it.UserID
|
||||
WHERE TreeID=$TreeID
|
||||
AND TreePosition>$TreePosition
|
||||
AND TreePosition<$MaxPosition
|
||||
AND TreePosition>$TreePosition".
|
||||
($MaxPosition ? " AND TreePosition<$MaxPosition" : "")."
|
||||
AND TreeLevel>$TreeLevel
|
||||
ORDER BY TreePosition");
|
||||
|
||||
|
@ -144,6 +144,7 @@ public static function user_heavy_info($UserID) {
|
||||
i.DisablePM,
|
||||
i.DisableRequests,
|
||||
i.DisableForums,
|
||||
i.DisableTagging,
|
||||
i.SiteOptions,
|
||||
i.DownloadAlt,
|
||||
i.LastReadNews,
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
if(isset($_GET['username'])){
|
||||
$_GET['username'] = trim($_GET['username']);
|
||||
|
||||
|
||||
list($Page,$Limit) = Format::page_limit(USERS_PER_PAGE);
|
||||
$DB->query("SELECT SQL_CALC_FOUND_ROWS
|
||||
ID,
|
||||
|
@ -1,10 +1,13 @@
|
||||
<?
|
||||
authorize();
|
||||
if (!empty($LoggedUser['DisableTagging'])) {
|
||||
error(403);
|
||||
}
|
||||
|
||||
$UserID = $LoggedUser['ID'];
|
||||
$GroupID = db_string($_POST['groupid']);
|
||||
$GroupID = $_POST['groupid'];
|
||||
|
||||
if(!is_number($GroupID) || !$GroupID) {
|
||||
if (!is_number($GroupID) || !$GroupID) {
|
||||
error(0);
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,15 @@
|
||||
<?
|
||||
$TagID = db_string($_GET['tagid']);
|
||||
$GroupID = db_string($_GET['groupid']);
|
||||
|
||||
if(!is_number($TagID) || !is_number($GroupID)) {
|
||||
error(404);
|
||||
}
|
||||
if(!check_perms('site_delete_tag')) {
|
||||
if (!empty($LoggedUser['DisableTagging']) || !check_perms('site_delete_tag')) {
|
||||
error(403);
|
||||
}
|
||||
|
||||
$TagID = $_GET['tagid'];
|
||||
$GroupID = $_GET['groupid'];
|
||||
|
||||
if (!is_number($TagID) || !is_number($GroupID)) {
|
||||
error(404);
|
||||
}
|
||||
|
||||
$DB->query("SELECT Name FROM tags WHERE ID='$TagID'");
|
||||
if (list($TagName) = $DB->next_record()) {
|
||||
$DB->query("INSERT INTO group_log (GroupID, UserID, Time, Info)
|
||||
|
@ -328,7 +328,7 @@ function compare($X, $Y){
|
||||
<? 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>
|
||||
<? } ?>
|
||||
<? 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>
|
||||
<? } ?>
|
||||
</div>
|
||||
@ -346,6 +346,9 @@ function compare($X, $Y){
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?
|
||||
if (empty($LoggedUser['DisableTagging'])) {
|
||||
?>
|
||||
<div class="box box_addtag">
|
||||
<div class="head"><strong>Add tag</strong></div>
|
||||
<div class="body">
|
||||
@ -360,7 +363,9 @@ function compare($X, $Y){
|
||||
<strong><a href="rules.php?p=tag">Tagging rules</a></strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="main_column">
|
||||
<table class="torrent_table details" id="torrent_details">
|
||||
|
@ -11,6 +11,7 @@
|
||||
define('USERS_PER_PAGE', 30);
|
||||
|
||||
if(isset($_GET['username'])){
|
||||
|
||||
$_GET['username'] = trim($_GET['username']);
|
||||
// form submitted
|
||||
$Val->SetFields('username','1','username','Please enter a username.');
|
||||
|
Loading…
Reference in New Issue
Block a user