Location: PHPKode > projects > Absolut Engine > absolut-engine-33870/admin/editarticle.php
<?
@include("coreclass.php");
$ae=new CEngine();
$ae->EngineInitialize();
$ae->RequestVariables();
$ae->UserVerifySession();
$ae->DBQuery("SELECT * FROM ".$ae->table[3]." WHERE ID='".$ae->articleID."'");
$ae->DBGetRow();
$articleID=$ae->access["ID"];
$title=stripslashes($ae->access["title"]);
$beginning=stripslashes($ae->access["beginning"]);
$text=$ae->RTESafe(stripslashes($ae->access["text"]));
$authorID=$ae->access["authorID"];
$sectionID=$ae->access["sectionID"];
$imagesetID=$ae->access["imagesetID"];
$filesetID=$ae->access["filesetID"];
$priority=$ae->access["priority"];
$status=$ae->access["status"];
$adate=$ae->access["adate"];
$adate=$ae->DateConversion($adate,2);
$atime=$ae->access["atime"];
$filename=$ae->access["filename"];
@include("header.php");
?>
<script type="text/javascript"><? @include('richtext.js'); ?></script>
<div id="content">
<form method="post" action="modify.php?command=3" name="fid">
<table cellspacing="0" class="form">
<tr>
<td width="20%"><strong><? echo $ae->textbasic[117] ?></strong></td>
<td>
<input type="text" name="title" value="<? echo $title ?>" size="78" maxlength="255">
</td>
</tr>
<tr>
<td><strong><? echo $ae->textbasic[118] ?></strong></td>
<td>
<textarea cols="78" rows="3" name="beginning"><? echo $beginning ?></textarea>
</td>
</tr>
<tr>
<td><strong><? echo $ae->textbasic[119] ?></strong></td>
<td>
<script language="JavaScript" type="text/javascript">
initRTE("images/wysiwyg/","","");
writeRichText('text','<? echo $text; ?>',520,200,true,false);
function submitForm() {
	//make sure hidden and iframe values are in sync before submitting form
	//to sync only 1 rte, use updateRTE(rte)
	//to sync all rtes, use updateRTEs
	//updateRTE('rte1');
	updateRTE('text');
   //alert(document.fid.text.value);

	//change the following line to true to submit form
	return true;
}
</script>
</td>
</tr>
<? if ($ae->cleanurls): ?>
<tr>
<td><strong><? echo $ae->textbasic[54] ?></strong></td>
<td>
<input type="text" name="filename" size="60" maxlength="255" value="<? echo $filename; ?>">
</td>
</tr>
<? endif; ?>
<tr>
<td><strong><? echo $ae->textbasic[120]; ?></strong></td>
<td>
<?
@$ae->DBQuery("SELECT fullname FROM ".$ae->table[5]." WHERE ID='$authorID'");
$ae->DBGetRow();
$author=$ae->access["fullname"];
echo $author;
?>
</td>
</tr>
<tr>
<td><strong><? echo $ae->textbasic[121] ?></strong></td>
<td>
<input type="text" name="adate" value="<? echo $adate; ?>" size="10" maxlength="10">
</td>
</tr>
<tr>
<td><strong><? echo $ae->textbasic[126] ?></strong></td>
<td>
<input type="text" name="atime" value="<? echo $atime; ?>" size="8" maxlength="8">
</td>
</tr>
<tr>
<td><strong><? echo $ae->textbasic[122] ?></strong></td>
<td>
<select name="sectionID">
<?
@$ae->DBQuery("SELECT * FROM ".$ae->table[0]." ORDER BY section");
while ($ae->DBGetRow())
{
$optionvalue=$ae->access["ID"];
$optiontext=$ae->access["section"];
echo '<option value="',$optionvalue,'"';
if ($sectionID==$optionvalue) echo ' selected';
echo '>',$optiontext,'</option>';
}
?>
</select>
</td>
</tr>
<tr>
<td><strong><? echo $ae->textbasic[123] ?></strong></td>
<td>
<select name="imagesetID">
<option value="0"><? echo $ae->textbasic[125] ?></option>
<?
@$ae->DBQuery("SELECT * FROM ".$ae->table[1]." ORDER BY description");
while ($ae->DBGetRow())
{
$optionvalue=$ae->access["ID"];
$optiontext=$ae->access["description"];
echo '<option value="',$optionvalue,'"';
if ($imagesetID==$optionvalue) echo ' selected';
echo '>',$optiontext,'</option>';
}
?>
</select>
</td>
</tr>
<tr>
<td><strong><? echo $ae->textbasic[124] ?></strong></td>
<td>
<select name="filesetID">
<option value="0"><? echo $ae->textbasic[127] ?></option>
<?
@$ae->DBQuery("SELECT * FROM ".$ae->table[2]." ORDER BY description");
while ($ae->DBGetRow())
{
$optionvalue=$ae->access["ID"];
$optiontext=$ae->access["description"];
echo '<option value="',$optionvalue,'"';
if ($filesetID==$optionvalue) echo ' selected';
echo '>',$optiontext,'</option>';
}
?>
</select>
</td>
</tr>
<tr>
<td><strong><? echo $ae->textbasic[128] ?></strong></td>
<td>
<select name="priority">
<option value="0"<? if (!$priority) echo ' selected'; ?>><? echo $ae->textbasic[130] ?></option>
<option value="1"<? if ($priority) echo ' selected'; ?>><? echo $ae->textbasic[131] ?></option>
</select>
</td>
</tr>
<tr>
<td><strong><? echo $ae->textbasic[129] ?></strong></td>
<td>
<?
if ($ae->currentuserposition>2)
{
if (!$status) echo $ae->textbasic[132];
else echo $ae->textbasic[132];
}
else
{
echo '<select name="status">';
echo '<option value="0"';
if (!$status) echo ' selected';
echo '>',$ae->textbasic[132],'</option>';
echo '<option value="1"';
if ($status) echo ' selected';
echo '>',$ae->textbasic[133],'</option>';
echo '</select>';
}
?>
</td>
</tr>
<tr>
<td colspan="2">
<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="hidden" name="authorID" value="<? echo $authorID ?>">
<input type="submit" name="submit" value="<? echo $ae->textbasic[103] ?>" onClick="submitForm();" class="button" />
<input type="reset" name="Reset" value="<? echo $ae->textbasic[105] ?>" class="button" />
</td>
</tr>
</table>
</form>
</div>
</body>
</html>
<? @include("footer.php") ?>
Return current item: Absolut Engine