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

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

<!sql query "select Semester, Title, Keywords from Projects where pNum = ?viewnum" q3>

<!sql query "select Descr from Projects where pNum = ?viewnum" d1>

<!sql query "select Leader, LeadEmail from Projects where pNum = ?viewnum" q0>

<!sql query "select Advisor, AdvEmail from Projects where pNum = ?viewnum" q1>

<!sql query "select Member1, Email1 from Projects where pNum = ?viewnum" m1>
<!sql query "select Member2, Email2 from Projects where pNum = ?viewnum" m2>
<!sql query "select Member3, Email3 from Projects where pNum = ?viewnum" m3>
<!sql query "select Member4, Email4 from Projects where pNum = ?viewnum" m4>

<!sql set Member1 @m1.Member1>
<!sql set Member2 @m2.Member2>
<!sql set Member3 @m3.Member3>
<!sql set Member4 @m4.Member4>

<!sql set Email1 @m1.Email1>
<!sql set Email2 @m2.Email2>
<!sql set Email3 @m3.Email3>
<!sql set Email4 @m4.Email4>

<!sql if $Member1 == "">
<!sql if $Member2 != "">
<!sql set Member1 $Member2>
<!sql set Email1 $Email2>
<!sql set Member2 "">
<!sql set Email2 "">
<!sql elsif $Member2 == "" && $Member3 != "">
<!sql set Member1 $Member3>
<!sql set Email1 $Email3>
<!sql set Member3 "">
<!sql set Email3 "">
<!sql elsif $Member3 == "" && $Member4 != "">
<!sql set Member1 $Member4>
<!sql set Email1 $Email4>
<!sql set Member4 "">
<!sql set Email4 "">
<!sql endif>
<!sql endif>

<!sql if $Member2 == "">
<!sql if $Member3 != "">
<!sql set Member2 $Member3>
<!sql set Email2 $Email3>
<!sql set Member3 "">
<!sql set Email3 "">
<!sql elsif $Member3 == "" && $Member4 != "">
<!sql set Member2 $Member4>
<!sql set Email2 $Email4>
<!sql set Member4 "">
<!sql set Email4 "">
<!sql endif>
<!sql endif>

<!sql if $Member3 == "">
<!sql if $Member4 != "">
<!sql set Member3 $Member4>
<!sql set Email3 $Email4>
<!sql set Member4 "">
<!sql set Email4 "">
<!sql endif>
<!sql endif>

<!-- 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: 10pt; 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="./update.sql" method="post">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td valign="top"><img src="./images/top_left.gif" width="14" height="14" 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="14" height="14" align="right" vspace="0" hspace="0"></td>
  </tr>
  <tr> 
    <td rowspan="3">&nbsp;</td>
    <td valign="top" align="left" rowspan="3"> 
 <p><font size=+1 color="#630000"> *</font> Indicates a required field.</p>
        <p><b><font face="Verdana, Arial, Helvetica, sans-serif">Enter a Project 
          Title:</font></b> <font face="Verdana, Arial, Helvetica, sans-serif">
          <input type="text" name="title" size="30" value="<!sql print @q3.Title>">
          </font></p>
        <p><font face="Verdana, Arial, Helvetica, sans-serif"><b>Project Number:</b> 
          <!sql print $viewnum></font></p>

<!sql set Semester @q3.Semester>

        <p> <font face="Verdana, Arial, Helvetica, sans-serif"><b>Semester:</b>  <select name="semester">

<!sql if $Semester == "Fall 2001">
	  <option selected>Fall 2001
<!sql else>
	  <option>Fall 2001
<!sql endif>

<!sql if $Semester == "Spring 2001">
	  <option selected>Spring 2001
<!sql else>
	  <option>Spring 2001
<!sql endif>

<!sql if $Semester == "Fall 2002">
	  <option selected>Fall 2002
<!sql else>
	  <option>Fall 2002
<!sql endif>

<!sql if $Semester == "Spring 2002">
	  <option selected>Spring 2002
<!sql else>
	  <option>Spring 2002
<!sql endif>

<!sql if $Semester == "Fall 2003">
	  <option selected>Fall 2003
<!sql else>
	  <option>Fall 2003
<!sql endif>

<!sql if $Semester == "Spring 2003">
	  <option selected>Spring 2003
<!sql else>
	  <option>Spring 2003
<!sql endif>

<!sql if $Semester == "Fall 2004">
	  <option selected>Fall 2004
<!sql else>
	  <option>Fall 2004
<!sql endif>

<!sql if $Semester == "Spring 2004">
	  <option selected>Spring 2004
<!sql else>
	  <option>Spring 2004
<!sql endif>

<!sql if $Semester == "Fall 2005">
	  <option selected>Fall 2005
<!sql else>
	  <option>Fall 2005
<!sql endif>

<!sql if $Semester == "Spring 2005">
	  <option selected>Spring 2005
<!sql else>
	  <option>Spring 2005
<!sql endif>

<!sql if $Semester == "Fall 2006">
	  <option selected>Fall 2006
<!sql else>
	  <option>Fall 2006
<!sql endif>

<!sql if $Semester == "Spring 2006">
	  <option selected>Spring 2006
<!sql else>
	  <option>Spring 2006
<!sql endif>

<!sql if $Semester == "Fall 2007">
	  <option selected>Fall 2007
<!sql else>
	  <option>Fall 2007
<!sql endif>

<!sql if $Semester == "Spring 2007">
	  <option selected>Spring 2007
<!sql else>
	  <option>Spring 2007
<!sql endif>

<!sql if $Semester == "Fall 2008">
	  <option selected>Fall 2008
<!sql else>
	  <option>Fall 2008
<!sql endif>

<!sql if $Semester == "Spring 2009">
	  <option selected>Spring 2009
<!sql else>
	  <option>Spring 2009
<!sql endif>

<!sql if $Semester == "Fall 2010">
	  <option selected>Fall 2010
<!sql else>
	  <option>Fall 2010
<!sql endif>

<!sql if $Semester == "Spring 2010">
	  <option selected>Spring 2010
<!sql else>
	  <option>Spring 2010
<!sql endif>
	  </select>
          <br>

	<p> <font face="Verdana, Arial, Helvetica, sans-serif"><b>Password:
	</b> <input type="password" name="password" size="20">
	</p>

        <p><font face="Verdana, Arial, Helvetica, sans-serif"><b>Advisor: 
          </b><br>
          Name 
          <input type="text" name="advname" size="30" value="<!sql print @q1.Advisor>">
          E-mail 
          <input type="text" name="advmail" size="20" value="<!sql print @q1.AdvEmail>">
          </font></p>
        <p><font face="Verdana, Arial, Helvetica, sans-serif"><b>Team Leader: 
          </b><br>
          Name 
          <input type="text" name="leadname" size="30" value="<!sql print @q0.Leader>">
          E-mail 
          <input type="text" name="leadmail" size="20" value="<!sql print @q0.LeadEmail>">
          </font></p>
        <p><font face="Verdana, Arial, Helvetica, sans-serif"><b>Team Members:</b> 
         <br>
          Name 
          <input type="text" name="memname" size="30" value="<!sql print $Member1>">
          E-mail 
          <input type="text" name="memmail" size="20" value="<!sql print $Email1>">
          <br>
          Name 
          <input type="text" name="memname2" size="30" value="<!sql print $Member2>">
E-mail 
          <input type="text" name="memmail2" size="20" value="<!sql print $Email2>">
          <br>
          Name 
          <input type="text" name="memname3" size="30" value="<!sql print $Member3>">
          E-mail 
          <input type="text" name="memmail3" size="20" value="<!sql print $Email3>">
          <br>
          Name 
          <input type="text" name="memname4" size="30" value="<!sql print $Member4>">
          E-mail 
          <input type="text" name="memmail4" size="20" value="<!sql print $Email4>">
          </font></p>

        <p><font face="Verdana, Arial, Helvetica, sans-serif"><b>Enter your 
<a href="http://www.isip.msstate.edu/projects/speech/databases/dictionaries/keywords.html" target="_new">IEEE Keywords</a>:
</b></font></p>
        <p> <font face="Verdana, Arial, Helvetica, sans-serif"> 
          <input type="text" name="keywords" length="80" value="<!sql print @q3.Keywords>">
          </font></p>

        <p><font face="Verdana, Arial, Helvetica, sans-serif"><b>Enter the Project Description:</b></font></p>
        <p> <font face="Verdana, Arial, Helvetica, sans-serif"> 
          <textarea name="description" rows="5" wrap="PHYSICAL" cols="80">
<!sql print @d1.Descr>
</textarea>
          </font></p><br>
      </td>
    <td rowspan="3">&nbsp;</td>
  </tr>
  <tr> </tr>
  <tr> </tr>

<tr>
<td>&nbsp;</td>
<td>
<div align="center">
<input type="hidden" name="viewnum" value="<!sql print #viewnum>">
<input type="hidden" name="mode" value="Update">
<input type="submit" name="mode2" value="Submit"> </div>
<br>
<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>

</form>

</td>
<td>&nbsp;</td>
</tr>

  <tr> 
    <td valign="bottom"><img src="./images/bot_left.gif" width="14" height="14" align="left" vspace="0" hspace="0"></td>
    <td>&nbsp;
    </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>

<!-- NEXT EDIT MODE -->

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

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

<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>Update Proposal <!sql print $viewnum></h3>
<h4>Proposal# <!sql print $viewnum> Not Updated</h4>
You entered an incorrect password <br>or the proposal you are trying to edit does not exist. <br> Click "Update 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 else>

<!sql set titl 0>
<!sql set pc 0>
<!sql set an 0>
<!sql set aem 0>
<!sql set ln 0>
<!sql set lem 0>
<!sql set mn1 0>
<!sql set e1 0>
<!sql set mn2 0>
<!sql set e2 0>
<!sql set mn3 0>
<!sql set e3 0>
<!sql set mn4 0>
<!sql set e4 0>
<!sql set dsp 0>

<!sql if $memname == "" && $memmail == "">
<!sql if $memname2 != "" || $memmail2 != "">
<!sql set memname $memname2>
<!sql set memmail $memmail2>
<!sql set memname2 "">
<!sql set memmail2 "">
<!sql elsif $memname2 == "" && $memname3 != "" || $memmail3 != "">
<!sql set memname $memname3>
<!sql set memmail1 $memmail3>
<!sql set memname3 "">
<!sql set memmail3 "">
<!sql elsif $memname3 == "" && $memname4 != "" || $memmail4 != "">
<!sql set memname $memname4>
<!sql set memmail $memmail4>
<!sql set memname4 "">
<!sql set memmail4 "">
<!sql endif>
<!sql endif>

<!sql if $memname2 == "" && $memmail2 == "">
<!sql if $memname3 != "" || $memmail3 != "">
<!sql set memname2 $memname3>
<!sql set memmail2 $memmail3>
<!sql set memname3 "">
<!sql set memmail3 "">
<!sql elsif $memname3 == "" && $memname4 != "" || $memmail4 != "">
<!sql set memname2 $memname4>
<!sql set memmail2 $memmail4>
<!sql set memname4 "">
<!sql set memmail4 "">
<!sql endif>
<!sql endif>

<!sql if $memname3 == "" && $memmail3 == "">
<!sql if $memname4 != "" || $memmail4 != "">
<!sql set memname3 $memname4>
<!sql set memmail3 $memmail4>
<!sql set memname4 "">
<!sql set memmail4 "">
<!sql endif>
<!sql endif>

<!sql set required 0>

<!sql if $title == "">
<!sql set titl 1>
<!sql set required 1>
<!sql endif>

<!sql if $password == "">
<!sql set pc 1>
<!sql set required 1>
<!sql endif>

<!sql if $advname == "">
<!sql set an 1>
<!sql set required 1>
<!sql endif>

<!sql if $advmail == "">
<!sql set aem 1>
<!sql set required 1>
<!sql endif>

<!sql if $leadname == "">
<!sql set ln 1>
<!sql set required 1>
<!sql endif>

<!sql if $leadmail == "">
<!sql set lem 1>
<!sql set required 1>
<!sql endif>

<!sql if $memname != "" && $memmail == "">
<!sql set e1 1>
<!sql set required 1>
<!sql endif>

<!sql if $memname2 != "" && $memmail2 == "">
<!sql set e2 1>
<!sql set required 1>
<!sql endif>

<!sql if $memname3 != "" && $memmail3 == "">
<!sql set e3 1>
<!sql set required 1>
<!sql endif>

<!sql if $memname4 != "" && $memmail4 == "">
<!sql set e4 1>
<!sql set required 1>
<!sql endif>

<!sql if $memname == "" && $memmail != "">
<!sql set mn1 1>
<!sql set required 1>
<!sql endif>

<!sql if $memname2 == "" && $memmail2 != "">
<!sql set mn2 1>
<!sql set required 1>
<!sql endif>

<!sql if $memname3 == "" && $memmail3 != "">
<!sql set mn3 1>
<!sql set required 1>
<!sql endif>

<!sql if $memname4 == "" && $memmail4 != "">
<!sql set mn4 1>
<!sql set required 1>
<!sql endif>

<!sql if $memname == "" && $memname2 == "" && $memname3 == "" && $memname4 == "">
<!sql set required 1>
<!sql endif>

<!sql if $description == "">
<!sql set desc 1>
<!sql set required 1>
<!sql endif>

<!sql if $required == 1>

<!-- 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: 10pt; font-family: Verdana, Arial, Helvetica, sans-serif}
h3 {  font-size: 14pt; font-weight: bold; color: #336699}
h4 {  font-size: 12pt; color: #6699CC}
-->
</style>
</head>

<body link=#336699 alink=#6699CC vlink=#6699CC bgcolor="#336699" text="black" background="./images/bg.jpg">
<center>
<form action="./update.sql" method="post">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td valign="top"><img src="./images/top_left.gif" width="14" height="14" align="left" vspace="0" hspace="0"></td>
    <td valign="middle"> 
<img src="./images/line_1000.gif" width="600" 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 valign="top" align="left" rowspan="3"> 
<h3>One of the Required Fields was not filled in. <br>  Please review your 
proposal and fill in all required fields before submitting again.</h3>
<h4>Items in <font color="blue">blue</font> are required fields</h4>	
        <p><b><font face="Verdana, Arial, Helvetica, sans-serif">

<!sql if $titl == 1>
<font color="blue">
Enter a Project Title:
</font>
<!sql else>
Enter a Project Title:
<!sql endif>

</font></b> <font face="Verdana, Arial, Helvetica, sans-serif">
          <input type="text" name="title" size="30" value="<!sql print $title>">
<font size=+1 color="#630000">*</font>
          </font></p>
        <p><font face="Verdana, Arial, Helvetica, sans-serif"><b>Project Number:</b> 
          will be assigned</font></p>
        <p> <font face="Verdana, Arial, Helvetica, sans-serif"><b>Semester:</b>
	 <select name="semester">
<!sql if $semester == "Fall 2001">
	  <option selected>Fall 2001
<!sql else>
	  <option>Fall 2001
<!sql endif>

<!sql if $semester == "Spring 2001">
	  <option selected>Spring 2001
<!sql else>
	  <option>Spring 2001
<!sql endif>

<!sql if $semester == "Fall 2002">
	  <option selected>Fall 2002
<!sql else>
	  <option>Fall 2002
<!sql endif>

<!sql if $semester == "Spring 2002">
	  <option selected>Spring 2002
<!sql else>
	  <option>Spring 2002
<!sql endif>

<!sql if $semester == "Fall 2003">
	  <option selected>Fall 2003
<!sql else>
	  <option>Fall 2003
<!sql endif>

<!sql if $semester == "Spring 2003">
	  <option selected>Spring 2003
<!sql else>
	  <option>Spring 2003
<!sql endif>

<!sql if $semester == "Fall 2004">
	  <option selected>Fall 2004
<!sql else>
	  <option>Fall 2004
<!sql endif>

<!sql if $semester == "Spring 2004">
	  <option selected>Spring 2004
<!sql else>
	  <option>Spring 2004
<!sql endif>

<!sql if $semester == "Fall 2005">
	  <option selected>Fall 2005
<!sql else>
	  <option>Fall 2005
<!sql endif>

<!sql if $semester == "Spring 2005">
	  <option selected>Spring 2005
<!sql else>
	  <option>Spring 2005
<!sql endif>

<!sql if $semester == "Fall 2006">
	  <option selected>Fall 2006
<!sql else>
	  <option>Fall 2006
<!sql endif>

<!sql if $semester == "Spring 2006">
	  <option selected>Spring 2006
<!sql else>
	  <option>Spring 2006
<!sql endif>

<!sql if $semester == "Fall 2007">
	  <option selected>Fall 2007
<!sql else>
	  <option>Fall 2007
<!sql endif>

<!sql if $semester == "Spring 2007">
	  <option selected>Spring 2007
<!sql else>
	  <option>Spring 2007
<!sql endif>

<!sql if $semester == "Fall 2008">
	  <option selected>Fall 2008
<!sql else>
	  <option>Fall 2008
<!sql endif>

<!sql if $semester == "Spring 2009">
	  <option selected>Spring 2009
<!sql else>
	  <option>Spring 2009
<!sql endif>

<!sql if $semester == "Fall 2010">
	  <option selected>Fall 2010
<!sql else>
	  <option>Fall 2010
<!sql endif>

<!sql if $semester == "Spring 2010">
	  <option selected>Spring 2010
<!sql else>
	  <option>Spring 2010
<!sql endif>
	  </select>
          <br>
</p>
	<p> <font face="Verdana, Arial, Helvetica, sans-serif"><b>

<!sql if $pc == 1>
<font color="blue">
Password:
</font>
<!sql else>
Password:
<!sql endif>

	</b> <input type="password" name="password" size="20" value="<!sql print $password>">
<font size=+1 color="#630000">* </font>
	</p>
	
        <p><font face="Verdana, Arial, Helvetica, sans-serif"><b>Advisor: 
          </b><br>

<!sql if $an == 1>
<font color="blue">
Name
</font>
<!sql else>
Name
<!sql endif>

          <input type="text" name="advname" size="30" value="<!sql print $advname>">
<font size=+1 color="#630000">* </font>

<!sql if $aem == 1>
<font color="blue">
E-Mail
</font>
<!sql else>
E-Mail
<!sql endif>

          <input type="text" name="advmail" size="20" value="<!sql print $advmail>">
<font size=+1 color="#630000">* </font>
          </font></p>
        <p><font face="Verdana, Arial, Helvetica, sans-serif"><b>Team Leader: 
          </b><br>

<!sql if $ln == 1>
<font color="blue">
Name
</font>
<!sql else>
Name
<!sql endif>

          <input type="text" name="leadname" size="30" value="<!sql print $leadname>">
<font size=+1 color="#630000">* </font>

<!sql if $lem == 1>
<font color="blue">
E-Mail
</font>
<!sql else>
E-Mail
<!sql endif>

          <input type="text" name="leadmail" size="20" value="<!sql print $leadmail>">
<font size=+1 color="#630000">* </font>
          </font></p>
        <p><font face="Verdana, Arial, Helvetica, sans-serif"><b>Team Members:</b> 

         <br>

<!sql if $mn1 == 1>
<font color="blue">
Name
</font>
<!sql else>
Name
<!sql endif>

          <input type="text" name="memname" size="30" value="<!sql print $memname>">
<font size=+1 color="#630000">*</font>

<!sql if $e1 == 1>
<font color="blue">
E-Mail
</font>
<!sql else>
E-Mail
<!sql endif>

          <input type="text" name="memmail" size="20" value="<!sql print $memmail>">
<font size=+1 color="#630000">*</font>
          <br>

<!sql if $mn2 == 1>
<font color="blue">
Name
</font>
<!sql else>
Name
<!sql endif>

          <input type="text" name="memname2" size="30" value="<!sql print $memname2>">&nbsp;&nbsp;&nbsp;

<!sql if $e2 == 1>
<font color="blue">
E-Mail
</font>
<!sql else>
E-Mail
<!sql endif>

          <input type="text" name="memmail2" size="20" value="<!sql print $memmail2>">
          <br>

<!sql if $mn3 == 1>
<font color="blue">
Name
</font>
<!sql else>
Name
<!sql endif>

          <input type="text" name="memname3" size="30" value="<!sql print $memname3>">&nbsp;&nbsp;&nbsp;

<!sql if $e3 == 1>
<font color="blue">
E-Mail
</font>
<!sql else>
E-Mail
<!sql endif>

          <input type="text" name="memmail3" size="20" value="<!sql print $memmail3>">
          <br>

<!sql if $mn4 == 1>
<font color="blue">
Name
</font>
<!sql else>
Name
<!sql endif>

          <input type="text" name="memname4" size="30" value="<!sql print $memname4>">&nbsp;&nbsp;&nbsp;

<!sql if $e4 == 1>
<font color="blue">
E-Mail
</font>
<!sql else>
E-Mail
<!sql endif>

          <input type="text" name="memmail4" size="20" value="<!sql print $memmail4>">
          </font></p>
        <p><font face="Verdana, Arial, Helvetica, sans-serif"><b>Enter your
<a href="http://www.isip.msstate.edu/projects/speech/databases/dictionaries/keywords.html" target="_new">IEEE Keywords</a>:
</b></font></p>
        <p> <font face="Verdana, Arial, Helvetica, sans-serif"> 
          <input type="text" name="keywords" length="80" value="<!sql print $keywords>">
          </font></p>
        <p><font face="Verdana, Arial, Helvetica, sans-serif"><b>

<!sql if $desc == 1>
<font color="blue">
Enter the Project Description:
</font>
<!sql else>
Enter the Project Description:
<!sql endif>

</b></font></p>
        <p> <font face="Verdana, Arial, Helvetica, sans-serif"> 
          <textarea name="description" rows="8" wrap="PHYSICAL" cols="80">
<!sql print $description>
</textarea>
          </font></p>
<div align="center"><font size=+1 color="#630000"> * </font>
Indicates a required field</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>
<div align="center">
<input type="hidden" name="viewnum" value="<!sql print #viewnum>">
<input type="hidden" name="mode" value="Update">

	<input type="submit" name="mode2" value="Submit">
</div>
</form>
<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>

</table>
</form>
</center>
</body>
</html>

<!sql endif>

<!sql if $required == 0>

<!sql query "update Projects set Keywords = '?keywords', Title = '?title', Descr = '?description', Semester = '?semester', Advisor = '?advname', AdvEmail = '?advmail', Leader = '?leadname', LeadEmail = '?leadmail', Member1 = '?memname', Email1 = '?memmail', Member2 = '?memname2', Email2 = '?memmail2', Member3 = '?memname3', Email3 = '?memmail3', Member4 = '?memname4', Email4 = '?memmail4' where pNum = ?viewnum">

<!sql query "select Semester, Title, Keywords from Projects where pNum = ?viewnum" q3>

<!sql query "select Descr from Projects where pNum = ?viewnum" d1>

<!sql query "select Leader, LeadEmail from Projects where pNum = ?viewnum" q0>

<!sql query "select Advisor, AdvEmail from Projects where pNum = ?viewnum" q1>

<!sql query "select Member1, Email1 from Projects where pNum = ?viewnum" m1>
<!sql query "select Member2, Email2 from Projects where pNum = ?viewnum" m2>
<!sql query "select Member3, Email3 from Projects where pNum = ?viewnum" m3>
<!sql query "select Member4, Email4 from Projects where pNum = ?viewnum" m4>

<!-- 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="14" height="14" 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 valign="top" align="left" rowspan="3">
<h4><!sql print @q3.Title></h4>

 
      <p><b>Project Number:</b> <!sql print $viewnum><br>
 
        <b>Semester:</b> <!sql print @q3.Semester></p>
      <ul>
	<li><b>Advisor:</b> <!sql print @q1.Advisor> - <a href="mailto:<!sql print @q1.AdvEmail>"><!sql print @q1.AdvEmail></a>
	</li>
	 
        <li><b>Team Leader:</b> <!sql print @q0.Leader> - <a href="mailto:<!sql print @q0.LeadEmail>"><!sql print @q0.LeadEmail></a> 
        </li>
        <li> <b>Team Members:</b> 
          <ul>

<!sql set memc @m1.Member1>
<!sql if $memc != "">
	    <li><!sql print @m1.Member1> - <a href="mailto:<!sql print @m1.Email1>"><!sql print @m1.Email1></a></li> 
<!sql endif>

<!sql set memc @m2.Member2>
<!sql if $memc != "">
	    <li><!sql print @m2.Member2> - <a href="mailto:<!sql print @m2.Email2>"><!sql print @m2.Email2></a></li> 
<!sql endif>

<!sql set memc @m3.Member3>
<!sql if $memc != "">
	    <li><!sql print @m3.Member3> - <a href="mailto:<!sql print @m3.Email3>"><!sql print @m3.Email3></a></li> 
<!sql endif>

<!sql set memc @m4.Member4>
<!sql if $memc != "">
	    <li><!sql print @m4.Member4> - <a href="mailto:<!sql print @m4.Email4>"><!sql print @m4.Email4></a></li> 
<!sql endif>
          </ul>
        </li>
      </ul>
      <p><b>Project Keywords:</b></p>
      <blockquote><div align="justify"> 
        <p><!sql print @q3.Keywords>
     </p></blockquote>
      <p><b>Project Description:</b></p>
      <blockquote><div align="justify"> 
        <p><!sql print @d1.Descr>
     </p>
</div>
      </blockquote>
<br>
    </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="12" height="12" 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 close>


