Location: PHPKode > projects > EZphotopress > ezphotopress-1.0.0/admin/projects/enableDisableProject.php
<h3><?=ENABLEDISABLEPROJECT_TITLE?></h3>
<br>
<?php
if (isset($pid) && $pid != "" && is_numeric($pid) && $pid >= 0) {
	//get user details
	$query = $db->query("select title from ".TABPREFIX."projects where id=".$pid) or die("get project info - ");
	$row = $query->fetch();

	if ($enable == "off") {
		$resultC = $db->query("update ".TABPREFIX."projects set deleted = 1,last_modify=NOW() where id=".$pid) or die("update disabled projects - ");
		if ($resultC->sizeIDU() > 0) {
			?>				
			<p class="ok">
				<?=ENABLEDISABLEPROJECT_THE_PROJECT?><?=$row['title']?><?=ENABLEDISABLEPROJECT_SUCCESS_UNPUBLISH?>
			</p>
			<br>
			<center>
				<a href="home.php?id=projects&action=manage&type=e" class="back"><?=ENABLEDISABLEPROJECT_CONTINUE?></a>
			</center>
			<?php
		} else {
			?>				
			<p class="ok">
				<?=ENABLEDISABLEPROJECT_THE_PROJECT?><?=$row['title']?><?=ENABLEDISABLEPROJECT_ERROR_UNPUBLISH?>
			</p>
			<br>
			<center>
				<a href="home.php?id=projects&action=manage&type=e" class="back"><?=ENABLEDISABLEPROJECT_CONTINUE?></a>
			</center>
			<?php	
		}
	} else if ($enable == "on") {
		$resultC = $db->query("update ".TABPREFIX."projects set deleted = 0, last_modify=NOW() where id=".$pid) or die("update enable projects - ");
		if ($resultC->sizeIDU() > 0) {
			?>				
			<p class="ok">
				<?=ENABLEDISABLEPROJECT_THE_PROJECT?><?=$row['title']?><?=ENABLEDISABLEPROJECT_SUCCESS_PUBLISH?>
			</p>
			<br>
			<center>
				<a href="home.php?id=projects&action=manage&type=d" class="back"><?=ENABLEDISABLEPROJECT_CONTINUE?></a>
			</center>
			<?php
		} else {
			?>				
			<p class="ok">
				<?=ENABLEDISABLEPROJECT_THE_PROJECT?><?=$row['title']?><?=ENABLEDISABLEPROJECT_ERROR_PUBLISH?>
			</p>
			<br>
			<center>
				<a href="home.php?id=projects&action=manage&type=d" class="back"><?=ENABLEDISABLEPROJECT_CONTINUE?></a>
			</center>
			<?php	
		}
	}	
}
?>

Return current item: EZphotopress