Gazelle/sections/wiki/aliases.php

60 lines
1.6 KiB
PHP
Raw Normal View History

2011-03-28 14:21:28 +00:00
<?
if(!isset($_GET['id']) || !is_number($_GET['id'])) { error(404); }
$ArticleID = $_GET['id'];
$Latest = $Alias->article($ArticleID);
list($Revision, $Title, $Body, $Read, $Edit, $Date, $AuthorID, $AuthorName) = array_shift($Latest);
2012-03-28 08:00:20 +00:00
if($Edit > $LoggedUser['EffectiveClass']){ error(404); }
2011-03-28 14:21:28 +00:00
show_header($Title." Aliases");
?>
<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&amp;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>
<?
$DB->query("SELECT Alias FROM wiki_aliases WHERE ArticleID='$ArticleID'");
while(list($Revision, $Title, $AuthorID, $AuthorName, $Date) = $DB->next_record()) { ?>
<tr>
<td><?=$Revision?></td>
<td><?=$Title?></td>
</tr>
<? } ?>
<tr>
<td class="center" colspan="6">
<input type="submit" value="Compare" />
</td>
</tr>
</table>
</form>
</div>
2012-09-15 08:00:25 +00:00
<? show_footer(); ?>