Location: PHPKode > projects > phpBlogger > admin/profile.php
<?php
###############################
# protect.php     version 1.1.#
###############################
include ('header.php');
?>
<div id="headermenu">Profile Page</div>
<?php if(isset($_POST['submit'])) {
	$public = $_POST['public'];
	if(get_magic_quotes_gpc()) {
		$public = stripslashes($public);
	}
$sql = 'UPDATE abcoption SET valueopt = '.$conn->qstr($public).' WHERE optionid = '.$conn->qstr("32").'';
	if($conn->Execute($sql) === false) {
		print '<br /><div id="error">error: '.$conn->ErrorMsg().'</div><br />';
	}
$conn->Close();
	echo "<div id ='information'>&nbsp;Successfully. ";
    ?>
<a href="profile.php">Back to Profile Page</a></div>
<?php } else { ?>
Profile page visible to...<br />
<form method="post" action="profile.php">
<?php if($aconfig == 1) { ?>
<select style="background:#EEFFE3;" id="incc" name="public">
<option value='1'>-- Everyone</option>
<option style="background:#ffffff;" value='1'>---- Everyone</option>
<option style="background:#ffffff;" value='2'>------ Registered users</option>
</select>
<?php } ?>
<?php if($aconfig == 2) { ?>
<select style="background:#FFF6C1;" id="incc" name="public">
<option value='2'>-- Registered users</option>
<option style="background:#ffffff;" value='1'>---- Everyone</option>
<option style="background:#ffffff;" value='2'>------ Registered users</option>
</select>
<?php } ?>
<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: phpBlogger