 <!-- Small modal -->
 <div class="modal" id="pjUpdate_<?php echo $projid;?>" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
      <div class="modal-dialog modal-xl" style="margin-top: 10%;">
         <div class="modal-content">

          <div class="modal-header header">
            <h5 class="modal-title" id="exampleModalLabel"><b>Update Project.</b></h5>
            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
              <span aria-hidden="true">&times;</span>
            </button>
          </div>
          
        <div class="modal-body">

        <form id="" action="" method="POST" enctype="multipart/form-data" autocomplete="off">
        <br>
        <div class="row">
          <div class="col-md-1"></div>
           <div class="col-md-10" style="background-image: url(../img/placeholders/inner-texture-bg.png); border-radius: 8px;">
            <div style='border-radius: 8px;border: 2px solid #7E9350;width:100%;margin-top:1%;margin-bottom:1%;'>
               <br/>
                  <div class="form-group row">
                    <input type="hidden" name="projid" value="<?php echo $projid;?>" required style="width: 90%;">

                    <label class="col-form-label col-2 col-lg-2 form-label text-lg-right">Project Name<span class="required" style="color:red">*</span></label>
                    <div class="col-3 col-lg-3">
                    <textarea type="text" name="prjname" rows="2" class="form-control" placeholder="Project..." required><?php echo $projname;?></textarea>
                  </div>

                      <label class="col-form-label col-2 col-lg-2 form-label text-lg-right">Client<span class="required" style="color:red">*</span></label>
                      <div class="col-3 col-lg-3">
                        <select class="form-control w-100" name="clnt" id="clnt" data-placeholder="-select client-" required>
                          <option></option>
                              <?php
                                  $sth = $db->query('SELECT * FROM tbl_clients WHERE stsclnt=1 AND ct_pvg=1 ORDER BY ct_id DESC');
                                  try
                                  {
                                      while ($rr2 = $sth->fetch(PDO::FETCH_ASSOC)){
                                      if($rr['clnt']==$rr2['ct_id']){
                                      ?>
                                        <option value="<?php echo $rr2['ct_id']; ?>" selected><?php echo $rr2['ct_names']; ?></option>
                                      <?php
                                      }else{                                     
                                  ?>
                                  <option value="<?php echo $rr2['ct_id']; ?>"><?php echo $rr2['ct_names']; ?></option>
                                  <?php
                                   }
                                      
                                      }
                                     
                                     } catch (PDOException $ex) {
                                      //Something went wrong rollback!
                                      echo $ex->getMessage();
                                  }
                              ?>	
                        </select>
                      </div>
                  </div>
                  
                  <div class="form-group row">
                      <label class="col-form-label col-2 col-lg-2 form-label text-lg-right">Agreement/work Order N<sup>o</sup></label>
                      <div class="col-3 col-lg-3">
                          <input type="text" class="form-control" name="agreeno" id="agreeno" value="<?php echo $rr['aggreno'];?>" placeholder="eg: RMF/...">
                      </div>

                      <label class="col-form-label col-2 col-lg-2 form-label text-lg-right">Project Amount<span class="required" style="color:red">*</span></label>
                      <div class="col-3 col-lg-3">
                      <input type="text" name="agree_mont" id="agree_mont" class="form-control" value="<?php echo $agreeMont;?>" required placeholder="0.0" 
                      oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');">                  
                      </div>
                  </div>

                  <div class="form-group row">              
                  <label class="col-form-label col-2 col-lg-2 form-label text-lg-right">Signed Date<span class="required" style="color:red">*</span></label>
                      <div class="col-3 col-lg-3">                  
                          <input type="date" class="form-control" name="signdate" placeholder="Signed date" value="<?php echo $rr['signdate'];?>" required>
                      </div>

                      <label class="col-form-label col-2 col-lg-2 form-label text-lg-right">Starting Date<span class="required" style="color:red">*</span></label>
                      <div class="col-3 col-lg-3">                  
                          <input type="date" class="form-control" name="start_date" placeholder="Starting date" value="<?php echo $rr['startDue'];?>"  required>
                      </div>
                  </div>

                  <div class="form-group row">                      
                  <label class="col-form-label col-2 col-lg-2 form-label text-lg-right">WithHolding Tax<span class="required" style="color:red">*</span></label>
                      <div class="col-3 col-lg-3">
                        <select class="form-control w-100" name="withtax" id="withtax" data-placeholder="-select wt-" required>
                            <option></option>
                            <?php 
                             if($rr['wt']==1){
                            ?>
                            <option value="1" selected>Applicable</option>
                            <option value="0">Not applicable</option>
                            <?php }else{?>
                            <option value="1">Applicable</option>
                            <option value="0" selected>Not applicable</option>
                            <?php }?>
                        </select>
                      </div>

                      <label class="col-form-label col-2 col-lg-2 form-label text-lg-right">Duration/Month<span class="required" style="color:red">*</span></label>
                      <div class="col-3 col-lg-3">
                        <input type="text" name="durat" id="durat" class="form-control" required value="<?php echo $rr['durat'];?>"
                        oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');">   
                      </div>
                  </div>
              <hr>

              <center>
                  <button type="reset" class="btn btn-default btn-sm" style="border-radius: 4px;">Reset</button>
                  <button class="btn btn-primary btn-sm" name="updProj" style="border-radius: 4px;" type="submit" id="">Save Changes</button>
              </center>
              <br>
          </div> <!--border -->
          </div>
        </div>
      </form>

      </div>
    </div>
  </div>
</div>