<?
@include("coreclass.php");
$ae=new CArticles();
$ae->EngineInitialize();
$ae->RequestVariables();
$ae->UserVerifySession();
@include("header.php");
?>
<div id="content">
<table cellspacing="0" class="form">
<tr>
<td>
<form method="post" action="managerrelated.php">
<p>
<strong><? echo $ae->textbasic[44] ?></strong>
</p>
<p>
<strong><? echo $ae->textbasic[40] ?></strong>
<select name="articleID">
<option value="0"<? if (!$ae->articleID) echo " selected"; ?>><? echo $ae->textbasic[39]; ?></option>
<?
if ($ae->currentuserposition>2)
{
$ae->DBQuery("SELECT * FROM ".$ae->table[3]." WHERE authorID='".$ae->currentuserID."' ORDER BY title");
}
else
{
$ae->DBQuery("SELECT * FROM ".$ae->table[3]." ORDER BY title");
}
while ($ae->DBGetRow())
{
$outcome2=$ae->outcome;
$optionvalue=$ae->access["ID"];
$optiontext=$ae->access["title"];
$ae->GetRelatedArchive($optionvalue);
if ($ae->DBGetRow())
{
echo '<option value="',$optionvalue,'"';
if ($optionvalue==$articleID) echo " selected";
echo '>',$optiontext,'</option>';
}
$ae->outcome=$outcome2;
}
?>
</select>
</p>
<p>
<input type="hidden" name="username" value="<? echo $ae->username ?>" />
<input type="hidden" name="session" value="<? echo $ae->session ?>" />
<input type="submit" value="<? echo $ae->textbasic[116] ?>" class="button" />
</p>
</form>
<form method="post" action="modify.php?command=14">
<p>
<strong><? echo $ae->textbasic[41] ?></strong><br />
<select name="relatedID[]" size="10" multiple>
<?
if ($ae->articleID)
{
$ae->GetRelatedArchive($ae->articleID);
while ($ae->DBGetRow())
{
$ae->GetRelatedArticle();
$optionvalue=$ae->relatedID;
$optiontext=$ae->title;
echo '<option value="',$optionvalue,'">',$optiontext,'</option>';
}
}
?>
</select>
</p>
<p>
<input type="hidden" name="username" value="<? echo $ae->username ?>" />
<input type="hidden" name="session" value="<? echo $ae->session ?>" />
<input type="hidden" name="articleID" value="<? echo $ae->articleID ?>">
<input type="submit" value="<? echo $ae->textbasic[110] ?>" class="button" />
</p>
</form>
</td>
<td>
<form method="post" action="modify.php?command=15">
<p>
<strong><? echo $ae->textbasic[43] ?></strong>
</p>
<p>
<strong><? echo $ae->textbasic[40] ?></strong>
<select name="articleID">
<option value="0"<? if (!$ae->articleID) echo " selected"; ?>><? echo $ae->textbasic[39]; ?>
<?
if ($ae->currentuserposition>2)
{
$ae->DBQuery("SELECT * FROM ".$ae->table[3]." WHERE authorID='".$ae->currentuserID."' ORDER BY title");
}
else
{
$ae->DBQuery("SELECT * FROM ".$ae->table[3]." ORDER BY title");
}
while ($ae->DBGetRow())
{
$optionvalue=$ae->access["ID"];
$optiontext=$ae->access["title"];
echo '<option value="',$optionvalue,'">',$optiontext,'</option>';
}
?>
</select>
</p>
<p>
<strong><? echo $ae->textbasic[42] ?></strong><br />
<select name="relatedID[]" size="10" multiple>
<?
$ae->DBQuery("SELECT * FROM ".$ae->table[3]." ORDER BY title");
while ($ae->DBGetRow())
{
$optionvalue=$ae->access["ID"];
$optiontext=$ae->access["title"];
echo '<option value="',$optionvalue,'">',$optiontext,'</option>';
}
?>
</select>
</p>
<p>
<input type="hidden" name="username" value="<? echo $ae->username ?>" />
<input type="hidden" name="session" value="<? echo $ae->session ?>" />
<input type="submit" value="<? echo $ae->textbasic[103] ?>" class="button" />
</p>
</form>
</td>
</tr>
</table>
</div>
<? @include("footer.php"); ?>