Location: PHPKode > projects > php Blogger > admin/announ.php
<?php
##############################
# announ.php     version 1.1.#
##############################
include ('header.php');
?>
<div id="headermenu">Announcements</div>
<?php
    if(isset($_POST['submit'])) {
	$newson = $_POST['newson'];
	$newstext = $_POST['newstext'];
	if(get_magic_quotes_gpc()) {
		$newstext = stripslashes($newstext);
	}
	$arecordSet = &$conn->Execute("UPDATE abcoption SET valueopt = '$newson' WHERE optionid = 16");
	$brecordSet = &$conn->Execute("UPDATE abcoption SET valueopt = '$newstext' WHERE optionid = 17");
	$conn->Close();
	echo "<div id ='information'>&nbsp;Successfully. ";
    ?>
<a href="announ.php">Back to Announcements</a></div>
<?php } else { ?>
<form method="post" action="announ.php">
Announcement Off/On<br />
<?php if($newson == 1) { ?>
<select style="background:#FFF6C1;" id="incc" name="newson">
<option value='1'>- Announcements Off</option>
<option style="background:#ffffff;" value='1'>---- Announcements Off</option>
<option style="background:#ffffff;" value='2'>------Announcements On</option>
</select>
<?php } ?>
<?php if($newson == 2) { ?>
<select style="background:#EEFFE3;" id="incc" name="newson">
<option value='2'>-- Announcements On</option>
<option style="background:#ffffff;" value='1'>---- Announcements Off</option>
<option style="background:#ffffff;" value='2'>------ Announcements On</option>
</select>
<?php } ?>
<br /><br />Announcement<br />
<textarea id="incc" name="newstext"><?php echo $newstext; ?></textarea><br /><br />
<br /><br />
<input type="submit" class="topicbuton" name="submit" value="Submit" /><br /><br />
</form>
<?php
$conn->Close();
}
?>
</div></div></div>
<?php include ('footer.php'); ?>
Return current item: php Blogger