Location: PHPKode > projects > phpBlogger > admin/registration.php
<?php
###############################
#registration.php version 1.1.#
###############################
include ('header.php');
?>
<div id="headermenu">User registration settings</div>
<?php if(isset($_POST['submit'])) {
	$signuprole = $_POST['signuprole'];
	$signupapp = $_POST['signupapp'];
	if(get_magic_quotes_gpc()) {
		$signuprole = stripslashes($signuprole);
		$signupapp = stripslashes($signupapp);
	}
	$name = array($signuprole,$signupapp);
	foreach($name as $name) {
		if(strlen($name) < 1) {
			echo "<center>Field must be at least 1 characters long: <a href=\"javascript:history.go(-1)\">Go Back</a></center>";
			die();
		}
	}
$sql = 'UPDATE abcoption SET valueopt = '.$conn->qstr($signuprole).' WHERE optionid = '.$conn->qstr("14").'';
	if($conn->Execute($sql) === false) {
		print '<br /><div id="error">error: '.$conn->ErrorMsg().'</div><br />';
	}
$sql2 = 'UPDATE abcoption SET valueopt = '.$conn->qstr($signupapp).' WHERE optionid = '.$conn->qstr("15").'';
	if($conn->Execute($sql2) === false) {
		print '<br /><div id="error">error: '.$conn->ErrorMsg().'</div><br />';
	}
$conn->Close();
	echo "<div id ='information'>&nbsp;Successfully. ";
    ?>
<a href="registration.php">Back to User registration settings</a></div>
<?php } else { ?>
<form method="post" action="registration.php">
Users Can Register<br />
<?php if($signuprole == 2) { ?>
<select style="background:#EEFFE3;" id="incc" name="signuprole">
<option value='2'>- Yes</option>
<option style="background:#ffffff;" value='2'>---- Yes</option>
<option style="background:#ffffff;" value='1'>------ No</option>
</select>
<?php } ?>
<?php if($signuprole == 1) { ?>
<select style="background:#FFF6C1;" id="incc" name="signuprole">
<option value='1'>-- No</option>
<option style="background:#ffffff;" value='2'>---- Yes</option>
<option style="background:#ffffff;" value='1'>------ No</option>
</select>
<?php } ?>
<br /><br />
Manually Approve New Members<br />
<?php if($signupapp == 1) { ?>
<select style="background:#FFF6C1;" id="incc" name="signupapp">
<option value='1'>- Manually Approve New Members On</option>
<option style="background:#ffffff;" value='1'>---- Manually Approve New Members On</option>
<option style="background:#ffffff;" value='2'>------ Manually Approve New Members Off</option>
</select>
<?php } ?>
<?php if($signupapp == 2) { ?>
<select style="background:#EEFFE3;" id="incc" name="signupapp">
<option value='2'>-- Manually Approve New Members Off</option>
<option style="background:#ffffff;" value='1'>---- Manually Approve New Members On</option>
<option style="background:#ffffff;" value='2'>------ Manually Approve New Members Off</option>
</select>
<?php 	} ?>
<br /><br />
<input type="submit" name="submit" class="topicbuton" value="Submit" /><br /><br />
</form>
<?php
$conn->Close();
}
?>
</div>
</div>
</div>
<?php include ('footer.php'); ?>
Return current item: phpBlogger