Location: PHPKode > projects > Electronic Design Automation - Index > eda-index-1.0MLH/web/addproject.php
<?php
require("config.inc.php");
require("top.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.				#
#									#
#########################################################################

?>

<?php
if ($pw == $aepassword) {

$today=date('Y-m-d');
opendb($dbhost,$dbuser,$dbpass,$dbname);
mysql_query("INSERT INTO `$tabels[0]` (description, name, date, note) VALUES ('$pdescription', '$pname', '$today', '$pnote')");

$link = "$path". "viewsingleproject.php?pid=". mysql_insert_id();
?>

<script language=javascript>
<!--
window.location.replace('<?php echo $link; ?>');
// -->
</script>

<?php
} else {
?>

<center>
<font size="4"><?php echo "$createnew $datatype1[0]"; ?></font><br/><br/>
<font size="3"><map id="add"><form method="post" action="<?php echo $PHP_SELF; ?>">
<table width="300" border="0" cellspacing="0" cellpadding="0">
<tr><td><?php echo $password; ?>:</td></tr>
<tr><td><input type="password" size="20" value="" name="pw"/></td></tr>
<tr><td><?php echo $designer; ?>:</td></tr>
<tr><td><input type="text" size="20" value="" name="pname"/></td></tr>
<tr><td><?php echo $description; ?>:<br/></td></tr>
<tr><td><input type="text" size="40" value="" name="pdescription"/><br/></td></tr>
<tr><td><?php echo $note; ?>:<br/></td></tr>
<tr><td><textarea name="pnote" cols="40" rows="10"></textarea><br/></td></tr>
</table><br/>
<input type="submit" value="<?php echo "$add $datatype1[0]"; ?>"/>
</form></map></font>
</center>

<?php } ?>

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