<?php
/* * ************************************
* PHP Enter is licensed under the
* GNU General Public License version 2
* ************************************* */
include ('header.php');
?>
<div id="vforms">
<div id="cconfig">Custom Header</div>
<?php
if(isset($_POST['submit'])) {
 $custom = $_POST['custom'];
 if(get_magic_quotes_gpc()) {
  $custom = stripslashes($custom);
 }
 if(strlen($custom) < 1) {
  echo "Field must be at least 1 characters long: <a href='javascript:history.go(-1)'>Go Back</a>";
  die();
 }
 $custom = htmlspecialchars($custom);
 $custom = $conn->addq($custom);
 $sql = $conn->Prepare('UPDATE abcoption SET valueopt = '.$conn->qstr($custom).' WHERE optionid = '.$conn->qstr("13").'');
 if($conn->Execute($sql) === false) {
  print '<div class="error">'.$conn->ErrorMsg().'</div>';
 }
 echo "<div class ='info'>Changes Saved Successfully</div>";
?>
<script>
window.location.replace("cheader.php");
</script>
<?php } else { ?>
<form method="post" action="cheader.php">
Code [0 for Disabled]:<br /><textarea name="custom"><?php echo stripslashes($customheader); ?></textarea><br /><br />
<input type="Submit" class="topicbuton" name="submit" value=" Submit" />
</form>
<?php } ?>
</div>
<?php
include ('footer.php');
$conn->Close();
/**************************************
* Revision: v.beta
***************************************/
?>