Location: PHPKode > projects > Electronic Design Automation - Index > eda-index-1.0MLH/web/delete.php
<?php
require("config.inc.php");

#########################################################################
# Electronic Design Automation - Index (EDA - Index)			#
#########################################################################
#									#
# Copyright (c) 2003 by Bruno Thomsen (hide@address.com)	#
# My Homepage: http://www.spacecave.dk/					#
# Project Homepage: http://eda-index.sourceforge.net/			#
# Project @ SourceForge.net: http://sourceforge.net/projects/eda-index/	#
# Project @ Freshmeat.net: http://freshmeat.net/projects/eda-index/	#
# Project Demo: http://eda-index.sourceforge.net/demo/			#
#									#
# 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.				#
#									#
#########################################################################

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15"/>
<meta name="Author" content="Baxeno"/>
<meta name="Description" content="Electronic Design Automation - Index is a system that can be used in the electronic world to keep track of your: Schematic, PCB, Front Plate, and Programmable Logic numbers."/>
<meta name="Keywords" content="eda-index, Electronic Design Automation - Index, SourceForge.net, GPL, PHP, MySQL, EDA Index"/>
<title><?php echo "$title, v. $version"; ?></title>
<link rel="icon" href="<?php echo $path; ?>images/favicon.ico" type="image/ico"/>
<link rel="shortcut icon" href="<?php echo $path; ?>images/favicon.ico"/>
<link rel="stylesheet" type="text/css" href="<?php echo $path; ?>css/<?php echo $css; ?>.css"/>
</head>
<body>

<center><font size="3"><br/><?php echo "$delete $datatype1[$type]"; ?><br/><br/>

<?php if ($type == 0) { ?>

<map id="prjdel"><form method="post" action="<?php echo $PHP_SELF; ?>?type=<?php echo $type; ?>&amp;pid=<?php echo $pid; ?>">
<?php if ($pw == "$aepassword"){ ?>
<input type="button" value="<?php echo "$delete $datatype1[$type] (pid=$pid)"; ?>" onclick="<?php opendb($dbhost,$dbuser,$dbpass,$dbname); $sql = "DELETE FROM `$tabels[$type]` WHERE pid='$pid' LIMIT 1"; getdata($sql); closedb(); ?> javascript:window.close()"/>
<?php } else {
echo $password; ?><br/>
<input type="password" size="20" name="pw"/><br/>
<input type="submit" value="<?php echo $delete; ?>"/><br/>
<?php } ?>
</form></map>

<?php } elseif ($type > 0) { ?>

<map id="itemdel"><form method="post" action="<?php echo $PHP_SELF; ?>?type=<?php echo $type; ?>&amp;id=<?php echo $id; ?>">
<?php if ($pw == "$aepassword"){ ?>
<input type="button" value="<?php echo "$delete $datatype1[$type] (id=$id)"; ?>" onclick="<?php opendb($dbhost,$dbuser,$dbpass,$dbname); $sql = "DELETE FROM `$tabels[$type]` WHERE id='$id' LIMIT 1"; getdata($sql); closedb(); ?> javascript:window.close()"/>
<?php } else {
echo $password; ?><br/>
<input type="password" size="20" name="pw"/><br/>
<input type="submit" value="<?php echo $delete; ?>"/><br/>
<?php } ?>
</form></map>

<?php } ?>

<br/><a href="javascript:window.close()" class="menu"><?php echo $closewindow; ?></a></font>
</center>

<?php
require("bottom.inc.php");
?>
Return current item: Electronic Design Automation - Index