Location: PHPKode > projects > PhpInv > phpInv-0.8.0/admin/inc/column_delete.php

// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2 of the License, or (at your option)
// any later version.

// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
// more details.

// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the Free Software Foundation, Inc., 59 Temple
// Place - Suite 330, Boston, MA 02111-1307, USA.

// Copyright: (C) 2002/2003 Stefan Cyris 

if (isset($confirm)) {
	$result = $DB->query("DELETE FROM ".$DB->tableprefix."col WHERE colid='".str_prepare($id)."'");
	if ($result) {
		$successurl = $url."?hash=".$hash;
		print "<html><head><meta http-equiv=\"refresh\" content=\"$refresh; URL=$successurl\">";
		print "</head><body><a href=\"$successurl\">Success!</a></body></html>";
} else {
	<form method="POST" acion="column.php?action=delete">
	<table width="100%">
			Delete Column
		Really delete ?
		<input type="hidden" name="action" value="delete">
		<input type="hidden" name="id" value="<? print $id ?>">
		<input type="hidden" name="hash" value="<? print $hash ?>">
		<input type="Submit" name="confirm" value="Yes">
		<input type="Submit" name="noconfirm" value="No">


Return current item: PhpInv