Gazelle/sections/wiki/index.php

75 lines
1.4 KiB
PHP
Raw Permalink Normal View History

2011-03-28 14:21:28 +00:00
<?
enforce_login();
define('INDEX_ARTICLE', '1');
2013-04-20 08:01:01 +00:00
function class_list($Selected = 0) {
2011-03-28 14:21:28 +00:00
global $Classes, $LoggedUser;
$Return = '';
foreach ($Classes as $ID => $Class) {
2013-04-20 08:01:01 +00:00
if ($Class['Level'] <= $LoggedUser['EffectiveClass']) {
2011-03-28 14:21:28 +00:00
$Return.='<option value="'.$Class['Level'].'"';
2013-04-20 08:01:01 +00:00
if ($Selected == $Class['Level']) {
2011-03-28 14:21:28 +00:00
$Return.=' selected="selected"';
}
2012-10-11 08:00:15 +00:00
$Return.='>'.Format::cut_string($Class['Name'], 20, 1).'</option>'."\n";
2011-03-28 14:21:28 +00:00
}
}
reset($Classes);
return $Return;
}
2013-04-20 08:01:01 +00:00
if (!empty($_REQUEST['action'])) {
switch ($_REQUEST['action']) {
2011-03-28 14:21:28 +00:00
case 'create':
2013-04-20 08:01:01 +00:00
if ($_POST['action']) {
2011-03-28 14:21:28 +00:00
include('takecreate.php');
} else {
include('create.php');
}
break;
case 'edit':
2013-04-20 08:01:01 +00:00
if ($_POST['action']) {
2011-03-28 14:21:28 +00:00
include('takeedit.php');
} else {
include('edit.php');
}
break;
case 'delete':
2013-04-20 08:01:01 +00:00
if ($_POST['action']) {
2011-03-28 14:21:28 +00:00
include('takedelete.php');
} else {
include('delete.php');
}
break;
case 'revisions':
include('revisions.php');
break;
case 'compare':
include('compare.php');
break;
case 'add_alias':
include('add_alias.php');
break;
case 'delete_alias':
include('delete_alias.php');
break;
case 'browse':
include('wiki_browse.php');
break;
case 'article':
include('article.php');
break;
case 'search':
include('search.php');
break;
}
} else {
$_GET['id'] = INDEX_ARTICLE;
include('article.php');
//include('splash.php');
}
?>