Gazelle/sections/wiki/index.php

89 lines
1.6 KiB
PHP
Raw Normal View History

2011-03-28 14:21:28 +00:00
<?
enforce_login();
include(SERVER_ROOT.'/classes/class_alias.php');
$Alias = new ALIAS;
define('INDEX_ARTICLE', '1');
function class_list($Selected=0){
global $Classes, $LoggedUser;
$Return = '';
foreach ($Classes as $ID => $Class) {
2012-03-28 08:00:20 +00:00
if($Class['Level'] <= $LoggedUser['EffectiveClass']){
2011-03-28 14:21:28 +00:00
$Return.='<option value="'.$Class['Level'].'"';
if($Selected == $Class['Level']){
$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;
}
if(!empty($_REQUEST['action'])) {
switch($_REQUEST['action']) {
case 'create':
if($_POST['action']){
include('takecreate.php');
} else {
include('create.php');
}
break;
case 'edit':
if($_POST['action']){
include('takeedit.php');
} else {
include('edit.php');
}
break;
case 'link':
if($_POST['action']){
include('takelink.php');
} else {
include('link.php');
}
break;
case 'delete':
if($_POST['action']){
include('takedelete.php');
} else {
include('delete.php');
}
break;
case 'revisions':
include('revisions.php');
break;
case 'compare':
include('compare.php');
break;
case 'revert':
include('revert.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');
}
?>