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
547fdc9829
commit
35e88914c8
@ -67,17 +67,17 @@
|
||||
$BookmarkJoin = '';
|
||||
}
|
||||
|
||||
$SQL = "SELECT SQL_CALC_FOUND_ROWS
|
||||
c.ID,
|
||||
c.Name,
|
||||
$SQL = "SELECT SQL_CALC_FOUND_ROWS
|
||||
c.ID,
|
||||
c.Name,
|
||||
c.NumTorrents,
|
||||
c.TagList,
|
||||
c.CategoryID,
|
||||
c.UserID,
|
||||
um.Username
|
||||
FROM collages AS c
|
||||
um.Username
|
||||
FROM collages AS c
|
||||
$BookmarkJoin
|
||||
LEFT JOIN users_main AS um ON um.ID=c.UserID
|
||||
LEFT JOIN users_main AS um ON um.ID=c.UserID
|
||||
WHERE Deleted = '0'";
|
||||
|
||||
if ($BookmarkView) {
|
||||
@ -140,6 +140,42 @@
|
||||
<? } else { ?>
|
||||
<h2>Browse collages<?=(!empty($UserLink) ? (isset($CollageIDs) ? ' with contributions by '.$UserLink : ' started by '.$UserLink) : '')?></h2>
|
||||
<? } ?>
|
||||
<div class="linkbox">
|
||||
<? if (!$BookmarkView) {
|
||||
if (check_perms('site_collages_create')) { ?>
|
||||
<a href="collages.php?action=new">[New collage]</a>
|
||||
<? }
|
||||
if (check_perms('site_collages_personal')) {
|
||||
$DB->query("SELECT ID FROM collages WHERE UserID='$LoggedUser[ID]' AND CategoryID='0' AND Deleted='0'");
|
||||
if($DB->record_count() == 0) {
|
||||
?>
|
||||
<a href="collages.php?action=create_personal">[New <strong>personal</strong> collage]</a>
|
||||
<? } else {
|
||||
list($CollageID) = $DB->next_record();
|
||||
?>
|
||||
<a href="collages.php?id=<?=$CollageID?>">[Your personal collage]</a>
|
||||
<?
|
||||
}
|
||||
}
|
||||
if (check_perms('site_collages_recover')) { ?>
|
||||
<a href="collages.php?action=recover">[Recover collage]</a>
|
||||
<?
|
||||
}
|
||||
if (check_perms('site_collages_create') || check_perms('site_collages_personal') || check_perms('site_collages_recover')) {
|
||||
?>
|
||||
<br /><br />
|
||||
<?
|
||||
}
|
||||
?>
|
||||
<a href="collages.php?userid=<?=$LoggedUser['ID']?>">[Collages you started]</a>
|
||||
<a href="collages.php?userid=<?=$LoggedUser['ID']?>&contrib=1">[Collages you've contributed to]</a>
|
||||
<? } else { ?>
|
||||
<a href="bookmarks.php?type=torrents">[Torrents]</a>
|
||||
<a href="bookmarks.php?type=artists">[Artists]</a>
|
||||
<a href="bookmarks.php?type=collages">[Collages]</a>
|
||||
<a href="bookmarks.php?type=requests">[Requests]</a>
|
||||
<? } ?>
|
||||
</div>
|
||||
<? if (!$BookmarkView) { ?>
|
||||
<div>
|
||||
<form action="" method="get">
|
||||
@ -192,45 +228,11 @@
|
||||
<input type="submit" value="Search" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<? } // if (!$BookmarkView) ?>
|
||||
<div class="linkbox">
|
||||
<? if (!$BookmarkView) {
|
||||
if (check_perms('site_collages_create')) { ?>
|
||||
<a href="collages.php?action=new">[New collage]</a>
|
||||
<? }
|
||||
if (check_perms('site_collages_personal')) {
|
||||
$DB->query("SELECT ID FROM collages WHERE UserID='$LoggedUser[ID]' AND CategoryID='0' AND Deleted='0'");
|
||||
if($DB->record_count() == 0) {
|
||||
?>
|
||||
<a href="collages.php?action=create_personal">[New <strong>personal</strong> collage]</a>
|
||||
<? } else {
|
||||
list($CollageID) = $DB->next_record();
|
||||
?>
|
||||
<a href="collages.php?id=<?=$CollageID?>">[Your personal collage]</a>
|
||||
<?
|
||||
}
|
||||
}
|
||||
if (check_perms('site_collages_recover')) { ?>
|
||||
<a href="collages.php?action=recover">[Recover collage]</a>
|
||||
<?
|
||||
}
|
||||
if (check_perms('site_collages_create') || check_perms('site_collages_personal') || check_perms('site_collages_recover')) {
|
||||
?>
|
||||
<br /><br />
|
||||
<?
|
||||
}
|
||||
?>
|
||||
<a href="collages.php?userid=<?=$LoggedUser['ID']?>">[Collages you started]</a>
|
||||
<a href="collages.php?userid=<?=$LoggedUser['ID']?>&contrib=1">[Collages you've contributed to]</a>
|
||||
<? } else { ?>
|
||||
<a href="bookmarks.php?type=torrents">[Torrents]</a>
|
||||
<a href="bookmarks.php?type=artists">[Artists]</a>
|
||||
<a href="bookmarks.php?type=collages">[Collages]</a>
|
||||
<a href="bookmarks.php?type=requests">[Requests]</a>
|
||||
<? } ?>
|
||||
<?
|
||||
$Pages=get_pages($Page,$NumResults,COLLAGES_PER_PAGE,9);
|
||||
echo $Pages;
|
||||
@ -266,7 +268,7 @@
|
||||
$Tags[]='<a href="collages.php?action=search&tags='.$Tag.'">'.$Tag.'</a>';
|
||||
}
|
||||
$Tags = implode(', ', $Tags);
|
||||
|
||||
|
||||
//Print results
|
||||
?>
|
||||
<tr class="row<?=$Row?> <?=($BookmarkView)?'bookmark_'.$ID:''?>">
|
||||
|
@ -70,7 +70,7 @@
|
||||
?>
|
||||
<div class="thin">
|
||||
<h2><a href="forums.php">Forums</a> > <?=$Forums[$ForumID]['Name']?></h2>
|
||||
<? if($LoggedUser['Class'] >= $Forums[$ForumID]['MinClassCreate']){ ?>
|
||||
<? if(check_forumperm($ForumID, 'Write') && check_forumperm($ForumID, 'Create')){ ?>
|
||||
<div class="linkbox">
|
||||
[<a href="forums.php?action=new&forumid=<?=$ForumID?>">New Thread</a>]
|
||||
</div>
|
||||
|
@ -44,6 +44,9 @@ function get_thread_info($ThreadID, $Return = true, $SelectiveCache = false) {
|
||||
|
||||
function check_forumperm($ForumID, $Perm = 'Read') {
|
||||
global $LoggedUser, $Forums;
|
||||
if ($LoggedUser['CustomForums'][$ForumID] == 1) {
|
||||
return true;
|
||||
}
|
||||
if($Forums[$ForumID]['MinClass'.$Perm] > $LoggedUser['Class'] && (!isset($LoggedUser['CustomForums'][$ForumID]) || $LoggedUser['CustomForums'][$ForumID] == 0)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -118,6 +118,8 @@
|
||||
case 'edit_rules':
|
||||
require(SERVER_ROOT.'/sections/forums/edit_rules.php');
|
||||
break;
|
||||
case 'thread_subscribe':
|
||||
break;
|
||||
default:
|
||||
error(404);
|
||||
}
|
||||
|
@ -19,7 +19,7 @@
|
||||
}
|
||||
|
||||
|
||||
if($LoggedUser['Class'] < $Forum['MinClassCreate']) { error(403); }
|
||||
if(!check_forumperm($ForumID, 'Write') || !check_forumperm($ForumID, 'Create')) { error(403); }
|
||||
show_header('Forums > '.$Forum['Name'].' > New Topic','comments,bbcode');
|
||||
?>
|
||||
<div class="thin">
|
||||
|
@ -10,8 +10,9 @@
|
||||
error(0);
|
||||
}
|
||||
|
||||
$DB->query('SELECT MinClassRead, ID FROM forums WHERE forums.ID = (SELECT ForumID FROM forums_topics WHERE ID = '.db_string($_GET['topicid']).')');
|
||||
list($MinClassRead, $ForumID) = $DB->next_record();
|
||||
require(SERVER_ROOT.'/sections/forums/index.php');
|
||||
$DB->query('SELECT ID FROM forums WHERE forums.ID = (SELECT ForumID FROM forums_topics WHERE ID = '.db_string($_GET['topicid']).')');
|
||||
list($ForumID) = $DB->next_record();
|
||||
if(!check_forumperm($ForumID)) {
|
||||
die();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user