Gazelle/sections/collages/index.php

109 lines
2.5 KiB
PHP
Raw Normal View History

2011-03-28 14:21:28 +00:00
<?
2013-05-25 08:01:03 +00:00
define('ARTIST_COLLAGE', 'Artists');
2011-03-28 14:21:28 +00:00
enforce_login();
2013-04-19 08:00:55 +00:00
if (empty($_REQUEST['action'])) {
$_REQUEST['action'] = '';
}
2011-03-28 14:21:28 +00:00
2013-04-19 08:00:55 +00:00
switch ($_REQUEST['action']) {
2011-03-28 14:21:28 +00:00
case 'new':
2013-04-19 08:00:55 +00:00
if (!check_perms('site_collages_create')) {
error(403);
}
2011-03-28 14:21:28 +00:00
require(SERVER_ROOT.'/sections/collages/new.php');
break;
case 'new_handle':
2013-04-19 08:00:55 +00:00
if (!check_perms('site_collages_create')) {
error(403);
}
2011-03-28 14:21:28 +00:00
require(SERVER_ROOT.'/sections/collages/new_handle.php');
break;
case 'add_torrent':
2012-02-07 08:00:20 +00:00
case 'add_torrent_batch':
2013-04-19 08:00:55 +00:00
if (!check_perms('site_collages_manage')) {
error(403);
}
2011-03-28 14:21:28 +00:00
require(SERVER_ROOT.'/sections/collages/add_torrent.php');
break;
2013-05-25 08:01:03 +00:00
case 'add_artist':
case 'add_artist_batch':
if (!check_perms('site_collages_manage')) {
error(403);
}
require(SERVER_ROOT.'/sections/collages/add_artist.php');
break;
2011-03-28 14:21:28 +00:00
case 'manage':
2013-04-19 08:00:55 +00:00
if (!check_perms('site_collages_manage')) {
error(403);
}
2011-03-28 14:21:28 +00:00
require(SERVER_ROOT.'/sections/collages/manage.php');
break;
case 'manage_handle':
2013-04-19 08:00:55 +00:00
if (!check_perms('site_collages_manage')) {
error(403);
}
2011-03-28 14:21:28 +00:00
require(SERVER_ROOT.'/sections/collages/manage_handle.php');
break;
2013-05-25 08:01:03 +00:00
case 'manage_artists':
if (!check_perms('site_collages_manage')) {
error(403);
}
require(SERVER_ROOT.'/sections/collages/manage_artists.php');
break;
case 'manage_artists_handle':
if (!check_perms('site_collages_manage')) {
error(403);
}
require(SERVER_ROOT.'/sections/collages/manage_artists_handle.php');
break;
2011-03-28 14:21:28 +00:00
case 'edit':
2013-04-19 08:00:55 +00:00
if (!check_perms('site_edit_wiki')) {
error(403);
}
2011-03-28 14:21:28 +00:00
require(SERVER_ROOT.'/sections/collages/edit.php');
break;
case 'edit_handle':
2013-04-19 08:00:55 +00:00
if (!check_perms('site_edit_wiki')) {
error(403);
}
2011-03-28 14:21:28 +00:00
require(SERVER_ROOT.'/sections/collages/edit_handle.php');
break;
case 'delete':
authorize();
require(SERVER_ROOT.'/sections/collages/delete.php');
break;
case 'take_delete':
require(SERVER_ROOT.'/sections/collages/take_delete.php');
break;
case 'comments':
require(SERVER_ROOT.'/sections/collages/all_comments.php');
break;
case 'download':
require(SERVER_ROOT.'/sections/collages/download.php');
break;
case 'recover':
2013-04-19 08:00:55 +00:00
//if (!check_perms('')) {
// error(403);
//}
2011-03-28 14:21:28 +00:00
require(SERVER_ROOT.'/sections/collages/recover.php');
break;
case 'create_personal':
2013-04-19 08:00:55 +00:00
if (!check_perms('site_collages_personal')) {
2011-03-28 14:21:28 +00:00
error(403);
2013-06-18 08:00:48 +00:00
} else {
Collages::create_personal_collage();
2011-03-28 14:21:28 +00:00
}
2013-06-18 08:00:48 +00:00
break;
2011-03-28 14:21:28 +00:00
default:
2013-04-19 08:00:55 +00:00
if (!empty($_GET['id'])) {
2011-03-28 14:21:28 +00:00
require(SERVER_ROOT.'/sections/collages/collage.php');
} else {
require(SERVER_ROOT.'/sections/collages/browse.php');
}
break;
}
?>