2011-03-28 14:21:28 +00:00
|
|
|
<?
|
|
|
|
if(!is_number($_GET['id']) || $_GET['id'] == ''){ error(404); }
|
|
|
|
$ArticleID=$_GET['id'];
|
|
|
|
|
|
|
|
$Article = $Alias->article($ArticleID);
|
|
|
|
list($Revision, $Title, $Body, $Read, $Edit, $Date, $Author) = array_shift($Article);
|
2013-02-22 08:00:24 +00:00
|
|
|
if($Edit > $LoggedUser['EffectiveClass']){
|
2011-03-28 14:21:28 +00:00
|
|
|
error('You do not have access to edit this article.');
|
|
|
|
}
|
|
|
|
|
2013-02-09 08:01:01 +00:00
|
|
|
View::show_header('Edit '.$Title, 'jquery');
|
2011-03-28 14:21:28 +00:00
|
|
|
?>
|
|
|
|
<div class="thin">
|
|
|
|
<div class="box pad">
|
2012-09-15 08:00:25 +00:00
|
|
|
<form class="edit_form" name="wiki_article" action="wiki.php" method="post">
|
2011-03-28 14:21:28 +00:00
|
|
|
<input type="hidden" name="action" value="edit" />
|
|
|
|
<input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
|
|
|
|
<input type="hidden" name="id" value="<?=$ArticleID?>" />
|
|
|
|
<input type="hidden" name="revision" value="<?=$Revision?>" />
|
|
|
|
<div>
|
|
|
|
<h3>Title</h3>
|
|
|
|
<input type="text" name="title" size="92" maxlength="100" value="<?=$Title?>" />
|
|
|
|
<h3>Body </h3>
|
2013-02-09 08:01:01 +00:00
|
|
|
<?
|
|
|
|
$ReplyText = new TEXTAREA_PREVIEW('body', 'body', $Body, 91, 22, true, false);
|
|
|
|
?>
|
2011-03-28 14:21:28 +00:00
|
|
|
<? if(check_perms('admin_manage_wiki')){ ?>
|
|
|
|
<h3>Access</h3>
|
|
|
|
<p>There are some situations in which the viewing or editing of an article should be restricted to a certain class.</p>
|
|
|
|
<strong>Restrict Read:</strong> <select name="minclassread"><?=class_list($Read)?></select>
|
|
|
|
<strong>Restrict Edit:</strong> <select name="minclassedit"><?=class_list($Edit)?></select>
|
|
|
|
<? } ?>
|
|
|
|
<div style="text-align: center;">
|
2013-02-09 08:01:01 +00:00
|
|
|
<input type="button" value="Preview" class="hidden button_preview_<?=$ReplyText->getID()?>" title="Preview text" tabindex="1" />
|
2011-03-28 14:21:28 +00:00
|
|
|
<input type="submit" value="Submit" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
2012-10-11 08:00:15 +00:00
|
|
|
<? View::show_footer(); ?>
|