Location: PHPKode > projects > EZphotopress > ezphotopress-1.0.0/admin/posts/enableDisablePost.php
<h3><?=ENABLEDISABLEPOST_TITLE?></h3>
<br>
<?php
if (isset($bid) && $bid != "" && is_numeric($bid) && $bid >= 0) {
	//get user details
	$query = $db->query("select title from ".TABPREFIX."blog where id=".$bid);
	$row = $query->fetch();

	if ($enable == "off") {
		$resultC = $db->query("update ".TABPREFIX."blog set published = 0,last_modify=NOW() where id=".$bid);
		if ($resultC->sizeIDU() > 0) {
			?>				
			<p class="ok">
				<?=ENABLEDISABLEPOST_THE_ARTICLE?><?=$row['title']?><?=ENABLEDISABLEPOST_SUCCESS_UNPUBLISH?>
			</p>
			<br>
			<center>
				<a href="home.php?id=blog&action=manage&type=e" class="back"><?=ENABLEDISABLEPOST_CONTINUE?></a>
			</center>
			<?php
		} else {
			?>				
			<p class="ok">
				<?=ENABLEDISABLEPOST_THE_ARTICLE?><?=$row['title']?><?=ENABLEDISABLEPOST_ERROR_UNPUBLISH?>
			</p>
			<br>
			<center>
				<a href="home.php?id=blog&action=manage&type=e" class="back"><?=ENABLEDISABLEPOST_CONTINUE?></a>
			</center>
			<?php	
		}
	} else if ($enable == "on") {
		$resultC = $db->query("update ".TABPREFIX."blog set published = 1, last_modify=NOW() where id=".$bid);
		if ($resultC->sizeIDU() > 0) {
			?>				
			<p class="ok">
				<?=ENABLEDISABLEPOST_THE_ARTICLE?><?=$row['title']?><?=ENABLEDISABLEPOST_SUCCESS_PUBLISH?>
			</p>
			<br>
			<center>
				<a href="home.php?id=blog&action=manage&type=d" class="back"><?=ENABLEDISABLEPOST_CONTINUE?></a>
			</center>
			<?php
		} else {
			?>				
			<p class="ok">
				<?=ENABLEDISABLEPOST_THE_ARTICLE?><?=$row['title']?><?=ENABLEDISABLEPOST_ERROR_PUBLISH?>
			</p>
			<br>
			<center>
				<a href="home.php?id=blog&action=manage&type=d" class="back"><?=ENABLEDISABLEPOST_CONTINUE?></a>
			</center>
			<?php	
		}
	}	
}
?>

Return current item: EZphotopress