2011-03-28 14:21:28 +00:00
|
|
|
<?
|
2013-04-20 08:01:01 +00:00
|
|
|
if (!isset($_GET['id']) || !is_number($_GET['id'])) {
|
|
|
|
error(404);
|
|
|
|
}
|
2011-03-28 14:21:28 +00:00
|
|
|
$ArticleID = $_GET['id'];
|
|
|
|
|
|
|
|
$Latest = $Alias->article($ArticleID);
|
|
|
|
list($Revision, $Title, $Body, $Read, $Edit, $Date, $AuthorID, $AuthorName) = array_shift($Latest);
|
2013-04-20 08:01:01 +00:00
|
|
|
if ($Edit > $LoggedUser['EffectiveClass']) {
|
|
|
|
error(404);
|
|
|
|
}
|
2011-03-28 14:21:28 +00:00
|
|
|
|
2012-10-11 08:00:15 +00:00
|
|
|
View::show_header($Title." Aliases");
|
2011-03-28 14:21:28 +00:00
|
|
|
?>
|
|
|
|
<div class="thin">
|
2012-08-19 08:00:19 +00:00
|
|
|
<div class="header">
|
2012-09-09 08:00:26 +00:00
|
|
|
<h2><a href="wiki.php?action=article&id=<?=$ArticleID?>"><?=$Title?></a> Aliases</h2>
|
2012-08-19 08:00:19 +00:00
|
|
|
<div class="linkbox">
|
|
|
|
Aliases are exact search strings or names that can be used to link to an article. [[Alias]]
|
|
|
|
</div>
|
|
|
|
</div>
|
2012-09-15 08:00:25 +00:00
|
|
|
<form class="add_form" name="aliases" action="wiki.php" method="get">
|
2011-03-28 14:21:28 +00:00
|
|
|
<input type="hidden" name="action" id="action" value="compare" />
|
|
|
|
<input type="hidden" name="id" id="id" value="<?=$ArticleID?>" />
|
2012-09-01 08:00:24 +00:00
|
|
|
<table class="layout">
|
2011-03-28 14:21:28 +00:00
|
|
|
<tr class="colhead">
|
|
|
|
<td>Add an alias to this article</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<input type="hidden" name="action" value="link" />
|
|
|
|
<input type="text" name="alias" size="20" />
|
|
|
|
<input type="submit" value="Submit" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<br />
|
|
|
|
<table>
|
|
|
|
<tr class="colhead">
|
|
|
|
<td>Alias</td>
|
|
|
|
<td>Remove</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td><?=$Revision?></td>
|
|
|
|
<td><?=$Title?></td>
|
|
|
|
|
|
|
|
</tr>
|
2013-02-22 08:00:24 +00:00
|
|
|
<?
|
2011-03-28 14:21:28 +00:00
|
|
|
$DB->query("SELECT Alias FROM wiki_aliases WHERE ArticleID='$ArticleID'");
|
2013-04-20 08:01:01 +00:00
|
|
|
while (list($Revision, $Title, $AuthorID, $AuthorName, $Date) = $DB->next_record()) { ?>
|
2011-03-28 14:21:28 +00:00
|
|
|
<tr>
|
|
|
|
<td><?=$Revision?></td>
|
|
|
|
<td><?=$Title?></td>
|
|
|
|
</tr>
|
|
|
|
<? } ?>
|
|
|
|
<tr>
|
|
|
|
<td class="center" colspan="6">
|
|
|
|
<input type="submit" value="Compare" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</form>
|
|
|
|
</div>
|
2013-04-20 08:01:01 +00:00
|
|
|
<? View::show_footer(); ?>
|