0byt3m1n1
Path:
C:
/
wamp64
/
www
/
cpms_new
/
USER
/
[
Home
]
File: create_project.php
<?php $MAIN_HEADING = "Add Project Details"; $SUB_HEADING =""; require_once "createproject_ctrl.php"; include("include/first_userheader.php"); require_once"../lib/config.php"; ?> <p><span class="msgText"> <?php if (isset($message)) echo $message;?> </span> <form action="createproject_ctrl.php" method="post" enctype="multipart/form-data" name="form1" id="form1"> </p> <p align="center" class="projectboldtxt style2"> </p> <div align="center"></div> <table width="486" align="center"> <tr> <th width="145" height="25" scope="row"><div align="left" class="projectboldtxt">Project Code</div></th> <td width="218"><label> <input class="form-control col-md-7 col-xs-12" class="form-control col-md-7 col-xs-12" type="text" name="txtprojectcode" id="txtprojectcode" value="<?php if (isset($projectcode) && $projectcode!="") { echo $projectcode; } ?>" /> </label></td> <td width="107"><span class="valText"> <?php if(isset($error['code_null'])) { echo $error['code_null']; } if(isset($error['project_exist'])) { echo $error['project_exist']; } ?> </span></td> </tr> <tr> <th class="projectboldtxt" scope="row"><div align="left" class="">Project Title</div></th> <td><label> <input class="form-control col-md-7 col-xs-12" type="text" name="txtprojecttitle" id="txtprojecttitle" value="<?php if (isset($projecttitle) && $projecttitle!="") { echo $projecttitle; } ?>" /> </label></td> <td class="valText"><?php if(isset($error['projecttitle'])) { echo $error['projecttitle']; }?></td> </tr> <tr> <th class="projectboldtxt" scope="row"><div align="left" class="">Principle Investigator</div></th> <td><label> <select class="form-control" name="cmbpi" id="cmbpi"> <?php for($j=1;$j<=$pi_loop_var;$j++) { ?> <option value="<?php echo $j; ?>"><?php echo $acc_name_array[$j]; ?></option> <?php } ?> </select> </label></td> <td class="valText"><?php if(isset($error['pinvestigator'])) { echo $error['pinvestigator']; }?></td> </tr> <tr> <th class="projectboldtxt" scope="row"><div align="left" class="">Investigators</div></th> <td><label> <textarea class="form-control" name="txtinvestigator" id="txtinvestigator" cols="22" rows="3"><?php if(isset($investigators) && $investigators!="")echo $investigators;?></textarea></label></td> <td class="valText"><?php if(isset($error['investigators'])) { echo $error['investigators']; } ?> </td> </tr> <tr> //<th class="projectboldtxt" scope="row"><div align="left" class="">Fund Type</div></th> <th class="projectboldtxt" scope="row"><div align="left" class="">Fund Type</div></th> <td><select class="form-control" name="cmbfundtype" id="cmbfundtype"> <?php foreach ($fund_array as $j => $fund_value) {?> <option value="<?php echo $j; ?>"<?php if(@$fund_type==$j) { echo "selected='selected'"; } ?> ><?php echo $fund_array[$j]; ?></option><?php } ?> </select></td> <td class="valText"> </td> </tr> <tr><td><br/></td></tr> <tr> <th class="projectboldtxt" scope="row"><div align="left" class="">Fund Agency</div></th> <td><label> <input class="form-control col-md-7 col-xs-12" type="text" name="txtfund" id="txtfund" value="<?php if (isset($fund) && $fund!="") { echo $fund; } ?>" /> </label></td> <td class="valText"><?php if(isset($error['fundagency'])) { echo $error['fundagency']; }?></td> </tr> <tr> <th class="projectboldtxt" scope="row"><div align="left" class="">Duration</div></th> <td><label> <input class="form-control col-md-7 col-xs-12" type="text" name="txtduration" id="txtduration" value="<?php if (isset($duration) && $duration!="") { echo $duration; } ?>"/> </label></td> <td class="valText"><?php if(isset($error['duration'])) { echo $error['duration']; }?></td> </tr> <tr> <th class="projectboldtxt" scope="row"><div align="left" class="">Start Date</div></th> <td><label></label> <label></label> <table width="200" border="0"> <tr> <td><select class="form-control" name="cmbStartdd" id="cmbStartdd"> <?php for ($i=1; $i<=31; $i++) { ?> <option value="<?php echo $i; ?>"<?php if(@$start_dd==$i) { echo "selected='selected'"; } ?> ><?php echo $i ?></option> <?php } ?> </select></td> <td><select class="form-control" name="cmbStartmm" id="cmbStartmm"> <?php for($i=1; $i<=12; $i++) { ?> <option value="<?php echo $i; ?>"<?php if(@$start_mm==$i) { echo "selected='selected'"; } ?> ><?php echo $month[$i]; ?></option> <?php } ?> </select></td> <td><input class="form-control col-md-7 col-xs-12" name="txtStartyy" type="text" id="txtStartyy" value="<?php if (isset($start_yy) && $start_yy!="") { echo $start_yy; } ?>" size="5" maxlength="4" /></td> </tr> </table></td> <td class="valText"><?php if(isset($error['startd_null'])) { echo $error['startd_null']; } else if(isset($error['sd_numeric'])) { echo $error['sd_numeric']; } ?> </td> </tr> <tr><td><br/></td></tr> <tr> <th class="projectboldtxt" scope="row"><div align="left">Date of Completion</div></th> <td><table width="200" border="0"> <tr> <td><select class="form-control" name="cmbEnddd" id="cmbEnddd"> <?php for ($i=1; $i<=31; $i++) { ?> <option value="<?php echo $i; ?>"<?php if(@$end_dd==$i) { echo "selected='selected'"; } ?> ><?php echo $i ?></option> <?php } ?> </select></td> <td><select class="form-control" name="cmbEndmm" id="cmbEndmm"> <?php for($i=1; $i<=12; $i++) { ?> <option value="<?php echo $i; ?>"<?php if(@$end_mm==$i) { echo "selected='selected'"; } ?> ><?php echo $month[$i]; ?></option> <?php } ?> </select></td> <td><input class="form-control col-md-7 col-xs-12" name="txtEndyy" type="text" id="txtEndyy" value="<?php if (isset($end_yy) && $end_yy!="") { echo $end_yy; } ?>" size="5" maxlength="4" /></td> </tr> </table></td> <td class="valText"><?php if(isset($error['end_year_null'])) { echo $error['end_year_null']; } else if(isset($error['ed_numeric'])) { echo $error['ed_numeric']; } ?></td> </tr> <tr><td><br/></td></tr> <tr> <th class="projectboldtxt" scope="row"><div align="left" class="">Abstract</div></th> <td><label><textarea class="form-control" name="txtabstract" id="txtabstract" cols="30" rows="3"><?php if (isset($abstract) && $abstract!="") { echo $abstract; } ?></textarea></label></td> <td class="valText"><?php // // if(isset($error['abstract'])) // { // echo $error['abstract']; // }?></td> </tr> <tr> <th class="projectboldtxt" scope="row"><div align="left" class="">Objective</div></th> <td><label><textarea class="form-control" name="txtobjective" id="txtobjective" cols="30" rows="3"><?php if (isset($objective) && $objective!="") { echo $objective; } ?></textarea></label></td> <td class="valText"><?php // if(isset($error['objective'])) // { // echo $error['objective']; // }?></td> </tr> <tr> <th class="projectboldtxt" scope="row"><div align="left">Project Outlay</div></th> <td><label> <input class="form-control col-md-7 col-xs-12" type="text" name="txtproject_overlay" id="txtproject_overlay" value="<?php if (isset($project_overlay) && $project_overlay!="") { echo $project_overlay; } ?>" /> </label></td> <td class="valText"><?php if(isset($error['project_overlay_null'])) { echo $error['project_overlay_null']; }?></td> </tr> <tr> <th class="projectboldtxt" scope="row"><div align="left" class="">Project Proposel</div></th> <td><label> <input class="form-control col-md-7 col-xs-12" type="file" name="projectfilefield" id="projectfilefield" /> </label> <label></label></td> <td class="valText"><?php // if(isset($error['fileformat'])) // { // echo $error['fileformat']; // } // ?> </td> </tr> </table> <div class="ln_solid"></div> <div id="main-budget"> <div class="total_outlay_div"> <table class="table" id="total_outlay_table" > </table> </div> </div> <div class="form-group"> <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-4"> <button class="btn btn-success" type="submit" name="save" id="save" value="SAVE">Submit</button> <a href="search_project.php" class="btn btn-danger "> EDIT or Delete </a> <a href="Register.php" class="projectboldtxt btn btn-info">Back</a></td> </div> </div> </form> <?php include "include/footer.php"; ?> <script type="text/javascript"> var $fund_type = $("select#cmbfundtype"); var $main_budget_div = $("div#main-budget"); var $txtDuration = $("input#txtduration"); var $totalOutLayDiv = $("table#total_outlay_div"); var $totalOutLayTable = $("table#total_outlay_table"); var totalOutLayTableRow = "" // ------------------------------------------------------------------------------------------- // on change fund type START $("body").on("change", "select#cmbfundtype" ,function () { var val = $(this).val(); if(val==2){ $main_budget_div.hide(); }else{ $main_budget_div.show(); } }); // on change fund type END // ------------------------------------------------------------------------------------------- // on change duration START // ------------------------------------------------------------------------------------------- $("body").on("keydown", "input#txtduration" ,function () { var val = $(this).val(); if(isNAN(val) || val<=0){ $(this).val(""); return; } for (var i=0 = ; i < val.length ; i++) { }; }); </script>