0byt3m1n1
Path:
C:
/
wamp64
/
www
/
cpms_new
/
USER
/
[
Home
]
File: Edit_project.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Edit project |online project financial management system for CWRDM</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="../style.css" rel="stylesheet" type="text/css" /> <link rel="icon" href="../images/icon.ico" /> <style type="text/css"> <!-- #apDiv1 { position:absolute; width:61px; height:35px; z-index:1; left: 758px; top: 436px; } .style3 {color: #660000} --> </style> </head> <body> <p> <!--<div id="headerbg"> <div id="headerblank">--> <?php include("include/first_userheader.php"); require_once "Edit_project_ctrl.php"; ?> </p><form action="Edit_project.php" method="post" enctype="multipart/form-data" name="form1" id="form1"> <p> </p> <p class="style3"><strong>Edit project details here</strong></p> <table width="506" align="center"> <tr> <th width="184" scope="row"><div align="left" class="projectboldtxt">Project id</div></th> <td width="207"><label> <input type="text" name="txtproject_id" id="txtproject_id" value="<?php echo $projectdb_id; if (isset($_POST['Update'])) { echo $project_id_restore; }?>" readonly="readonly"/> </label></td> <td width="99"><?php $p_id=@$_SESSION['project_id'];?></td> </tr> <tr> <th class="projectboldtxt" scope="row"><div align="left" class="projectboldtxt">Project Code</div></th> <td><label> <input type="text" name="txtprojectcod" id="txtprojectcod" value="<?php if (isset($_POST['Update'])) { echo $projectcode_restore; } else { echo $projects_code; }?>" /> </label></td> <td><span class="valText"> <?php if(isset($error['code_null'])) { echo $error['code_null']; } if(isset($error['code'])) { echo $error['code']; } ?> </span></td> </tr> <tr> <th class="projectboldtxt" scope="row"><div align="left" class="projectboldtxt">Project Title</div></th> <td><label> <input type="text" name="txtprojcttitle" id="txtprojcttitle" value="<?php if (isset($_POST['Update'])) { echo $projecttitle_restore; } else { echo $project_title; } ?>"/> </label></td> <td><span class="valText"> <?php if(isset($error['projecttitle'])) { echo $error['projecttitle']; } ?> </span></td> </tr> <tr> <th class="projectboldtxt" scope="row"><div align="left" class="projectboldtxt">Principle Investigator</div></th> <td><select name="cmbpi" id="cmbpi"> <?php for($j=1;$j<=$for_var_i;$j++) {?> <option value="<?php echo $j; ?>"<?php if(isset($_POST['Update'])) { if(@$pinvestigator_restore==$$pi_name_array[$j]) { echo "selected='selected'"; } } else { if(@$pi_name==$pi_name_array[$j]) { echo "selected='selected'"; } } ?> ><?php echo $pi_name_array[$j]; ?></option><?php }?> </select></td> <td><span class="valText"> <?php if(isset($error['pinvestigator'])) { echo $error['pinvestigator']; } ?> </span></td> </tr> <tr> <th class="projectboldtxt" scope="row"><div align="left" class="projectboldtxt">Investigators</div></th> <td><label><textarea name="txtinvestgators" id="txtinvestgators" cols="25" rows="5"><?php if (isset($_POST['Update'])) { echo $investigators_restore; } else { echo $investigators; } ?></textarea></label></td> <td><span class="valText"> <?php if(isset($error['investigators'])) { echo $error['investigators']; } ?> </span></td> </tr> <tr> <th class="projectboldtxt" scope="row"><div align="left" class="projectboldtxt">Fund Agency</div></th> <td><label> <input type="text" name="txtfund" id="txtfund" value="<?php if (isset($_POST['Update'])) { echo $fund_restore; } else { echo $fundagency; } ?>"/> </label></td> <td><span class="valText"> <?php if(isset($error['fundagency'])) { echo $error['fundagency']; } ?> </span></td> </tr> <tr> <th class="projectboldtxt" scope="row"><div align="left" class="">Fund Type</div></th> <td><select name="cmbfundtype" id="cmbfundtype"> <?php for($j=0;$j<=$fund_array_count;$j++) {?> <option value="<?php echo $j; ?>"<?php if(@$fund_type==$j) { echo "selected='selected'"; } ?> ><?php echo $fund_array[$j]; ?></option> <?php } ?> </select></td> <td> </td> </tr> <tr> <th class="projectboldtxt" scope="row"><div align="left" class="projectboldtxt">Duration</div></th> <td><label> <input type="text" name="txtduration" id="txtduration" value="<?php if (isset($_POST['Update'])) { echo $duration_restore; } else { echo $duration; } ?>"/> <span class="valText"></label></td> <td><?php if(isset($error['duration'])) { echo $error['duration']; } ?></td> </tr> <tr> <th class="projectboldtxt" scope="row"><div align="left">Project Outlay</div></th> <td><label> <input type="text" name="txtproject_outlay" id="txtproject_outlay" value="<?php if (isset($_POST['Update'])) { echo $project_outlay_restore; } else { echo $project_outlay; } ?>"/> </label></td> <td><?php if(isset($error['duration'])) { echo $error['duration']; } ?></td> </tr> <tr> <th class="projectboldtxt" scope="row"><div align="left" class="projectboldtxt">Start Date</div></th> <td><label><select name="cmbstartdd" id="cmbstartdd"><?php for ($i=1; $i<=31; $i++) { ?><option value="<?php echo $i; ?>"<?php if(isset($_POST['Update'])) { if(@$sd_restore==$i) { echo "selected='selected'"; } } else { if(@$start_dd==$i) { echo "selected='selected'"; } } ?> ><?php echo $i ?></option> <?php } ?></select></label><label> <select name="cmbstartmm" id="cmbstartmm"><?php for($i=1; $i<=12; $i++) { ?><option value="<?php echo $i; ?>"<?php if(isset($_POST['Update'])) { if(@$start_yy_restore==$i) { echo "selected='selected'"; } } else { if(@$start_mm==$i) { echo "selected='selected'"; } } ?> ><?php echo $month[$i]; ?></option> <?php } ?></select><input name="txtstartyy" type="text" id="txtstartyy" value="<?php if (isset($_POST['Update'])) { echo $start_yy_restore; } else { echo $start_yy; } ?>"size="5" maxlength="4" /><span class="valText"></label></td> <td><?php if(isset($error['startdate_null'])) { echo $error['startdate_null']; } else if(isset($error['sd_numeric'])) { echo $error['sd_numeric']; } ?></td> </tr> <tr> <th class="projectboldtxt" scope="row"><div align="left">Date of completion</div></th> <td><select name="cmbenddd" id="cmbenddd"> <?php for ($i=1; $i<=31; $i++) { ?> <option value="<?php echo $i; ?>"<?php if(isset($_POST['Update'])) { if(@$end_dd_restore==$i) { echo "selected='selected'"; } } else { if(@$end_dd==$i) { echo "selected='selected'"; } } ?> ><?php echo $i ?></option> <?php } ?> </select> <select name="cmbendmm" id="cmbendmm"> <?php for($i=1; $i<=12; $i++) { ?> <option value="<?php echo $i; ?>"<?php if(isset($_POST['Update'])) { if(@$end_mm_restore==$i) { echo "selected='selected'"; } } else { if(@$end_mm==$i) { echo "selected='selected'"; } } ?> ><?php echo $month[$i]; ?></option> <?php } ?> </select> <input name="txtendyy" type="text" id="txtendyy" value="<?php if (isset($_POST['Update'])) { echo $end_yy_restore; } else { echo $end_yy; } ?>"size="5" maxlength="4" /></td> <td><?php if(isset($error['enddate_null'])) { echo $error['enddate_null']; } else if(isset($error['end_numeric'])) { echo $error['end_numeric']; } ?></td> </tr> <tr> <th class="projectboldtxt" scope="row"><div align="left" class="projectboldtxt">Abstract</div></th> <td><label><textarea name="txtabstract" id="txtabstract" cols="25" rows="5"><?php if (isset($_POST['Update'])) { echo $abstract_restore; } else { echo $abstract; } ?></textarea></label></td> <td><span class="valText"> <?php //if(isset($error['abstract'])) // { // echo $error['abstract']; // } ?> </span></td> </tr> <tr> <th class="projectboldtxt" scope="row"><div align="left" class="projectboldtxt">Objective</div></th> <td><label><textarea name="txtobjective" id="txtobjective" cols="25" rows="5"><?php if (isset($_POST['Update'])) { echo $objective_restore; } else { echo $objective; } ?></textarea></label></td> <td><span class="valText"> <?php // if(isset($error['objective'])) // { // echo $error['objective']; // } ?> </span></td> </tr> <tr> <th class="projectboldtxt" scope="row"><div align="left" class="projectboldtxt">Project Proposel</div></th> <td><label> <input type="file" name="ffprojectprop" id="ffprojectprop" /> </label> </td> <td><span class="valText"> <?php if(isset($error['file_exist'])) { echo $error['file_exist']; } if(isset($error['fileformat'])) { echo $error['fileformat']; } ?> </span></td> </tr> <tr> <th scope="row"><div align="left"></div></th> <td><label> <input type="submit" name="Update" id="Update" value="Update" /> </label> <label><a href="search_project.php" class="projectboldtxt style2">Back</a></label></td> <td> </td> </tr> </table> </form> <p> </div> <?php include "include/footer.php"; ?> </p> </body> </html>