<?
define(TEMPDIR,"../../");
@include(TEMPDIR."coreclass.php");
@include("coreclass.php");
$ae=new CDiscussions();
$ae->EngineInitialize();
$ae->RequestVariables();
$ae->UserVerifySession();
$ae->UserVerifyLevel(2);
@include(TEMPDIR."header.php");
?>
<div id="content">
<form method="post" action="managerdiscussion.php">
<table cellspacing="0" class="form">
<tr>
<td width="100%">
<strong><? echo $ae->textdiscussions[1] ?></strong><br />
<select name="articlediscID">
<?
$ae->DBQuery("SELECT * FROM ".$ae->table[3]." ORDER BY adate DESC, atime DESC");
while ($ae->DBGetRow())
{
$outcome2=$ae->outcome;
$articleID=$ae->access["ID"];
$articletitle=$ae->access["title"];
$ae->DBQuery("SELECT * FROM ".$ae->tablediscussions[0]." WHERE articleID='$articleID'");
$ae->DBGetRow();
$optionvalue=$ae->access["ID"];
if ($optionvalue)
{
echo '<option value="',$articleID,'"';
if ($articleID==$ae->articlediscID) echo ' selected';
echo '>',$articletitle,'</option>';
$exists=1;
}
$ae->outcome=$outcome2;
}
if (!$exists) echo '<option value="0">',$ae->textdiscussions[2],'</option>';
?>
</select>
</td>
</tr>
<tr>
<td>
<input type="hidden" name="username" value="<? echo $ae->username ?>" />
<input type="hidden" name="session" value="<? echo $ae->session ?>" />
<input type="submit" name="Submit" value="<? echo $ae->textbasic[108] ?>" class="button" />
</td>
</tr>
</table>
</form>
<br />
<form method="post" action="modify.php?command=1">
<table cellspacing="0" class="form">
<?
$i=0;
$ae->DBQuery("SELECT * FROM ".$ae->tablediscussions[0]." WHERE articleID='".$ae->articlediscID."' ORDER BY adate DESC, atime DESC");
while ($ae->DBGetRow())
{
$commentID=$ae->access["ID"];
$adate=$ae->access["adate"];
$adate=$ae->DateConversion($adate,2);
$atime=$ae->access["atime"];
$comment=$ae->access["comment"];
$name=$ae->access["name"];
$email=$ae->access["email"];
$color=fmod($i,2);
$i++;
if ($color==1) echo '<tr>'; else echo '<tr>';
echo '<td width="100%">';
echo '<input type="checkbox" name="commentID[]" value="',$commentID,'"> ';
if ($email<>"") echo '<a href="mailto:',$email,'">';
echo $name;
if ($email<>"") echo '</a>';
echo ' ',$adate,' ',$atime,':<br />';
echo (nl2br(htmlspecialchars($comment)));
echo '</td>';
echo '</tr>';
}
if ($commentID)
{
$color=fmod($i,2);
$i++;
if ($color==1) echo '<tr>'; else echo '<tr>';
echo '<td>';
echo '<input type="hidden" name="username" value="',$ae->username,'">';
echo '<input type="hidden" name="session" value="',$ae->session,'">';
echo '<input type="hidden" name="articlediscID" value="',$ae->articlediscID,'">';
echo '<input type="submit" name="Submit" value="',$ae->textbasic[110],'" class="button" />';
echo '<input type="reset" name="Reset" value="',$ae->textbasic[104],'" class="button" />';
echo '</td>';
echo '</tr>';
}
?>
</table>
</form>
</div>
<? @include(TEMPDIR.'footer.php'); ?>