Location: PHPKode > projects > phpBlogger > admin/adsense.php
<?php
##############################
# adsense.php    version 1.1.#
##############################
include ('header.php');
?>
<div id="headermenu">Google Adsense</div>
<?php
    if(isset($_POST['submit'])) {
	$adsoffon = $_POST['adsoffon'];
	$senseup = $_POST['senseup'];
	$sensedown = $_POST['sensedown'];
	if(get_magic_quotes_gpc()) {
		$adsoffon = stripslashes($adsoffon);
		$senseup = stripslashes($senseup);
		$sensedown = stripslashes($sensedown);
	}
$sql = 'UPDATE abcoption SET valueopt = '.$conn->qstr($adsoffon).' WHERE optionid = '.$conn->qstr("28").'';
	if($conn->Execute($sql) === false) {
		print '<br /><div id="error">error inserting[1]: '.$conn->ErrorMsg().'</div><br />';
	}
$sql2 = 'UPDATE abcoption SET valueopt = '.$conn->qstr($senseup).' WHERE optionid = '.$conn->qstr("29").'';
	if($conn->Execute($sql2) === false) {
		print '<br /><div id="error">error inserting[1]: '.$conn->ErrorMsg().'</div><br />';
	}
$sql3 = 'UPDATE abcoption SET valueopt = '.$conn->qstr($sensedown).' WHERE optionid = '.$conn->qstr("30").'';
	if($conn->Execute($sql3) === false) {
		print '<br /><div id="error">error inserting[1]: '.$conn->ErrorMsg().'</div><br />';
	}
	$conn->Close();
	echo "<div id ='information'>&nbsp;Successfully. ";
    ?>
<a href="adsense.php">Back to Google Adsense</a></div>
<?php } else { ?>
<form method="post" action="adsense.php">
Google Adsense Off/On<br />
<?php if($adsoffon == 1) { ?>
<select style="background:#FFF6C1;" id="incc" name="adsoffon">
<option value='1'>- Adsense Off</option>
<option style="background:#ffffff;" value='1'>---- Off</option>
<option style="background:#ffffff;" value='2'>------On</option>
</select>
<?php } ?>
<?php if($adsoffon == 2) { ?>
<select style="background:#EEFFE3;" id="incc" name="adsoffon">
<option value='2'>-- Adsense On</option>
<option style="background:#ffffff;" value='1'>---- Off</option>
<option style="background:#ffffff;" value='2'>------ On</option>
</select>
<?php } ?>
<br /><br />
Adsense after first post [728x90]<br /><textarea id="incc" name="senseup"><?php echo @$senseup; ?></textarea><br /><br />
<br /><br />
Adsense right block [200x200]<br /><textarea id="incc" name="sensedown"><?php echo @$sensedown; ?></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: phpBlogger