<!sql connect localhost www DataBase>
<!sql database ece_4512_ppd>

<!sql if $mode2 == "Edit">
<!sql if $mode == "Delete">

<html>
<head>
<title>ECE 4512: Project Proposal Database</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<style type="text/css">
<!--
a {  text-decoration: underline}
table {  background-color: #FFFFFF}
a:active {  text-decoration: none}
a:hover {  text-decoration: none}
a:visited {  #6699CC}
td {  font-size: 12pt; font-family: Verdana, Arial, Helvetica, sans-serif}
h3 {  font-size: 14pt; font-weight: bold; color: #336699}
h4 {  font-size: 12pt; color: #6699CC}
input { background-color: #FFFFFF}
-->
</style>
</head>

<body link=#336699 alink=#6699CC vlink=#6699CC bgcolor="#336699" text="black" background="./images/bg.jpg">
<center>
<form action="./input.sql" method="post">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td valign="top"><img src="./images/top_left.gif" width="12" height="12" align="left" vspace="0" hspace="0"></td>
    <td valign="middle"> 
<img src="./images/line_1000.gif" width="630" height="1" border=0><br>
      <div align="right">
<img src="images/ece.jpg" width="190" height="30" align="right">
      </div>
	  <div align="left">
<img src="images/title.jpg" width="350" height="55" align="absmiddle">
	 </div>
    </td>
    <td valign="top"><img src="./images/top_right.gif" width="12" height="12" align="right" vspace="0" hspace="0"></td>
  </tr>
<tr>
<td rowspan="3">&nbsp;</td>
<td rowspan="3"><div align="center">
<br><h3>Delete Proposal <!sql print ?viewnum></h3>
</div>
Please enter the number of the proposal you<br>
wish to delete, followed by your password.<br>
<table border=0>
<tr><td>Proposal #:</td><td><input type="text" length="4" name="viewnum" size=10 value="<!sql print @viewnum>"></td></tr>
<tr><td>Password:</td><td><input type="password" name="password" size=10></td></tr>
</table>
</div>
</td>
<td rowspan="3">&nbsp;</td>
</tr>
  <tr> </tr>
  <tr> </tr>

<tr>
<td valign="bottom"><img src="./images/bot_left.gif" width="12" height="12" align="left" vspace="0" hspace="0"></td>
<td>
<div align="center">
<input type="hidden" name="mode" value="Delete">
	<input type="submit" name="mode2" value="Submit">
</form>
</div>
<center>
          <a href="./add.sql?mode=Add&mode2=Edit&viewnum=<!sql print #viewnum>"><img src="./images/add_proposal.jpg" alt="Add A Proposal" border=0></a>
<a href="./update.sql?mode=Update&mode2=Edit&viewnum=<!sql print #viewnum>"><img src="./images/update_proposal.jpg" alt="Update Proposal" border=0></a>
<a href="./input.sql?mode=Delete&mode2=Edit&viewnum=<!sql print #viewnum>"><img src="./images/delete_proposal.jpg" alt="Delete Proposal" border=0></a>
<a href="./display.sql?mode=View&viewnum=ALL"><img src="./images/view_all.jpg" alt="View All Proposals" border=0></a>
<a href="./index.html"><img src="./images/home.jpg" alt="Return Home" border=0></a>
</center>
</td>
    <td valign="bottom"><img src="./images/bot_right.gif" width="11" height="12" align="right" vspace="0" hspace="0"></td>
  </tr>
</table>
</center>
</body>
</html>
<!sql endif>
<!sql endif>

<!-- NEXT EDIT MODE -->

<!sql if $mode2 == "Submit">
<!sql if $mode == "Delete">

<!sql query "select pWord from Projects where pNum = ?viewnum" q5>
<!sql query "select password('?password') as password" q4>
<!sql if @q4.password == @q5.pWord>

<!sql query "update Projects set Semester = null, Title = null, Keywords = null, Descr = null, pWord = null, Advisor = null, AdvEmail = null, Leader = null, LeadEmail = null, Member1 = null, Email1 = null, Member2 = null, Email2 = null, Member3 = null, Email3 = null, Member4 = null, Email4 = null where pNum = ?viewnum">

<!-- BEGIN HTML -->

<html>
<head>
<title>ECE 4512: Project Proposal Database</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
a {  text-decoration: underline}
table {  background-color: #FFFFFF}
a:active {  text-decoration: none}
a:hover {  text-decoration: none}
a:visited {  #6699CC}
td {  font-size: 12pt; font-family: Verdana, Arial, Helvetica, sans-serif}
h3 {  font-size: 14pt; font-weight: bold; color: #336699}
h4 {  font-size: 12pt; color: #6699CC}
input { background-color: #FFFFFF}
-->
</style>
</head>

<body link=#336699 alink=#6699CC vlink=#6699CC bgcolor="#336699" text="black" background="./images/bg.jpg">
<center>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td valign="top"><img src="./images/top_left.gif" width="12" height="12" align="left" vspace="0" hspace="0"></td>
    <td valign="middle"> 
<img src="./images/line_1000.gif" width="630" height="1" border=0><br>
      <div align="right">
<img src="images/ece.jpg" width="190" height="30" align="right">
      </div>
	  <div align="left">
<img src="images/title.jpg" width="350" height="55" align="absmiddle">
	 </div>
    </td>
    <td valign="top"><img src="./images/top_right.gif" width="12" height="12" align="right" vspace="0" hspace="0"></td>
  </tr>
<tr>
<td rowspan="3">&nbsp;</td>
<td rowspan="3"><div align="center">
<br><h3>Proposal # <!sql print $viewnum> Deleted.</h3>
Return to the proposal list or add a new proposal from through the buttons
below.<br>

</div>
</td>
<td rowspan="3">&nbsp;</td>
</tr>
  <tr> </tr>
  <tr> </tr>

<tr>
   <td valign="bottom"><img src="./images/bot_left.gif" width="14" height="14" align="left" vspace="0" hspace="0"></td>
    <td>
<center>
          <a href="./add.sql?mode=Add&mode2=Edit&viewnum=<!sql print #viewnum>"><img src="./images/add_proposal.jpg" alt="Add A Proposal" border=0></a>
<a href="./input.sql?mode=Delete&mode2=Edit&viewnum=<!sql print #viewnum>"><img src="./images/delete_proposal.jpg" alt="Delete Proposal" border=0></a>
<a href="./display.sql?mode=View&viewnum=ALL"><img src="./images/view_all.jpg" alt="View All Proposals" border=0></a>
<a href="./index.html"><img src="./images/home.jpg" alt="Return Home" border=0></a>
</div>
</td>

    <td valign="bottom"><img src="./images/bot_right.gif" width="14" height="14" align="right" vspace="0" hspace="0"></td>
  </tr>
</table>
</center>

</body>
</html>

<!sql else>

<html>
<head>
<title>ECE 4512: Project Proposal Database</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
a {  text-decoration: underline}
table {  background-color: #FFFFFF}
a:active {  text-decoration: none}
a:hover {  text-decoration: none}
a:visited {  #6699CC}
td {  font-size: 12pt; font-family: Verdana, Arial, Helvetica, sans-serif}
h3 {  font-size: 14pt; font-weight: bold; color: #336699}
h4 {  font-size: 12pt; color: #6699CC}
input { background-color: #FFFFFF}
-->
</style>
</head>

<body link=#336699 alink=#6699CC vlink=#6699CC bgcolor="#336699" text="black" background="./images/bg.jpg">
<center>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td valign="top"><img src="./images/top_left.gif" width="12" height="12" align="left" vspace="0" hspace="0"></td>
    <td valign="middle"> 
<img src="./images/line_1000.gif" width="630" height="1" border=0><br>
      <div align="right">
<img src="images/ece.jpg" width="190" height="30" align="right">
      </div>
	  <div align="left">
<img src="images/title.jpg" width="350" height="55" align="absmiddle">
	 </div>
    </td>
    <td valign="top"><img src="./images/top_right.gif" width="12" height="12" align="right" vspace="0" hspace="0"></td>
  </tr>
<tr>
<td rowspan="3">&nbsp;</td>
<td rowspan="3"><div align="center">
<br><h3>Proposal# <!sql print $viewnum> Not Deleted</h3>
You entered an incorrect password <br>or the proposal you are trying to delete does not exist. <br> Click "Delete proposal" below to try again.<br><br>

</div>
</td>
<td rowspan="3">&nbsp;</td>
</tr>
  <tr> </tr>
  <tr> </tr>

<tr>
   <td valign="bottom"><img src="./images/bot_left.gif" width="14" height="14" align="left" vspace="0" hspace="0"></td>
    <td>
<center>
          <a href="./add.sql?mode=Add&mode2=Edit&viewnum=<!sql print #viewnum>"><img src="./images/add_proposal.jpg" alt="Add A Proposal" border=0></a>
<a href="./update.sql?mode=Update&mode2=Edit&viewnum=<!sql print #viewnum>"><img src="./images/update_proposal.jpg" alt="Update Proposal" border=0></a>
<a href="./input.sql?mode=Delete&mode2=Edit&viewnum=<!sql print #viewnum>"><img src="./images/delete_proposal.jpg" alt="Delete Proposal" border=0></a>
<a href="./display.sql?mode=View&viewnum=ALL"><img src="./images/view_all.jpg" alt="View All Proposals" border=0></a>
<a href="./index.html"><img src="./images/home.jpg" alt="Return Home" border=0></a>
</center>
</td>
    <td valign="bottom"><img src="./images/bot_right.gif" width="14" height="14" align="right" vspace="0" hspace="0"></td>
  </tr>
</table>
</form>
</center>
</body>
</html>

<!sql endif>
<!sql endif>
<!sql endif>

<!sql free q0>
<!sql free q1>
<!sql free q2>
<!sql free q3>
<!sql free q4>
<!sql free q5>
<!sql free m1>
<!sql free m2>
<!sql free m3>
<!sql free m4>
<!sql free d1>
<!sql free viewnum>
<!sql close>


