PK

ADDRLIN : /home/questend/public_html/domains/rwa40.com/admin/member/
FLL :
Current File : /home/questend/public_html/domains/rwa40.com/admin/member/member-details_16072021.php

<?php
   ob_start();
   //error_reporting(E_ALL ^ E_NOTICE);
   @session_start();
   ini_set('allow_url_include',1);    
   date_default_timezone_set("Asia/Kolkata");
   set_time_limit(600);
   ini_set('max_execution_time',600);
   include '../includes/settings/constant.php';
   //include '../includes/settings/db.php';
   require_once '../includes/settings/PDODB.php';
   include '../includes/modules/functions.php';

   $function = new FUNCTIONS();

   if(empty($_SESSION['adminId'])){
    header("Location: ../index.php");
    exit();
   }

   if(!empty($_GET['id'])){
        $id = $_GET['id'];
    }else{ ?>
        <script type="text/javascript">location.replace("index.php");</script>
    <?php }

   //start member details   $id=$_GET['id'],NULL,NULL,1
   $user = $function->getUsers($_GET['id'],NULL,NULL,1);
   $user_details = $function->getUserDetails($_GET['id'],1);
   //print_r($_POST);
   if(isset($_POST['btnAddMember'])){
      //print_r($user[0]['id']); //exit; 
      $insert_id = $user[0]['id'];  
      echo "<script>window.location.href='edit-member-details.php?id=$insert_id';</script>";
    }
   //End member details
   //start Family-member details
   $member_id = $_GET['id'];
   $members = $function->getMemberDetails($member_id,1);
   //End Family-member details
   $servantdata = $function->getServant($id=NULL,$member_id=$member_id,$isactive=1);
   $driverdata = $function->getDriverDetails($id=NULL,$member_id=$member_id,$isactive=1);
   $vehicledata = $function->getVehicleDetails($member_id,1,NULL);

   //print_r($vehicledata); //exit;
   
?>
<!DOCTYPE html>
<html>
   <head>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>INSPINIA | Basic Form</title>
      <?php include_once '../layout/style.php'; ?>
   </head>
   <body>
      <div id="wrapper">
         <?php $currentPage = 'member-index'; include_once '../layout/side-bar.php'; ?>
         <div id="page-wrapper" class="gray-bg">
            <?php include_once '../layout/header.php'; ?>
            <div class="row wrapper border-bottom white-bg page-heading">
               <div class="col-lg-10">
                  <h2>Member Details</h2>
                  <ol class="breadcrumb">
                     <li>
                        <a href="index.html">Home</a>
                     </li>
                     <li>
                        <a href="index.php">Member</a>
                     </li>
                     <li class="active">
                        <strong>Member Details</strong>
                     </li>
                  </ol>
               </div>
               <div class="col-lg-2">
               </div>
            </div>           
            <div class="row">
               <div class="col-lg-12">
                  <div class="ibox float-e-margins">
                     <div class="ibox-title">
                        <h5>All form elements</h5>                        
                     </div>
                     <div class="ibox-content">
                        <form method="POST" class="form-horizontal" action="">
                           <div class="form-group">
                              <label class="col-sm-2 control-label">Owner’s Name</label>
                              <div class="col-sm-4"><input disabled value="<?=!empty($user[0]['owner_name'])?$user[0]['owner_name']:'';?>" class="form-control"></div> 
                              <label class="col-sm-2 control-label">Owner’s Age</label>
                              <div class="input-group col-sm-4"><input disabled value="<?=!empty($user[0]['owner_age'])?$user[0]['owner_age']:'';?>" type="text" class="form-control"><span class="input-group-addon">Yrs.</span></div>
                           </div>
                           <div class="hr-line-dashed"></div>
                           <div class="form-group">
                              <label class="col-sm-2 control-label">Mobile</label>
                              <div class="col-sm-4"><input disabled value="<?=!empty($user[0]['mobile'])?$user[0]['mobile']:'';?>" class="form-control"></div>
                              <label class="col-sm-2 control-label">Email ID</label>
                              <div class="col-sm-4"><input type="text" disabled value="<?=!empty($user[0]['email'])?$user[0]['email']:'';?>" class="form-control"></div>
                           </div>
                           <div class="form-group">                              
                              <label class="col-sm-2 control-label">Telphone No.</label>
                              <div class="col-sm-4"><input type="text" disabled value="<?=!empty($user[0]['tel_no'])?$user[0]['tel_no']:'';?>" class="form-control"></div>
                           </div> 
                           <div class="hr-line-dashed"></div>
                           <div class="form-group">
                              <label class="col-sm-2 control-label">Name of Person to represent in RWA</label>
                              <div class="col-sm-3"><input type="text" disabled value="<?=!empty($user_details[0]['represent_name'])?$user_details[0]['represent_name']:'';?>" class="form-control">
                              <span class="help-block m-b-none">(Shall remain Alternate Member till revoked)</span></div>
                              <label class="col-sm-1 control-label">Relation</label>
                              <div class="col-sm-3"><input type="text" disabled value="<?=!empty($user_details[0]['represent_relation'])?$user_details[0]['represent_relation']:'';?>" class="form-control">
                              <span class="help-block m-b-none">(Owner’s...)</span></div>

                              <label class="col-sm-1 control-label">Age</label>
                              <div class="input-group col-sm-2"><input disabled value="<?=!empty($user_details[0]['represent_relation'])?$user_details[0]['represent_relation']:'';?>"  type="text" class="form-control"> <span class="input-group-addon">Yrs.</span></div>
                           </div>
                           <div class="hr-line-dashed"></div>
                           <div class="form-group">
                              <label class="col-sm-2 control-label">Mobile</label>
                              <div class="col-sm-4"><input disabled value="<?=!empty($user_details[0]['represent_mobile'])?$user_details[0]['represent_mobile']:'';?>" type="text" class="form-control"></div>
                              <label class="col-sm-2 control-label">Email ID</label>
                              <div class="col-sm-4"><input type="text" disabled value="<?=!empty($user_details[0]['represent_email'])?$user_details[0]['represent_email']:'';?>" class="form-control"></div>
                           </div>
                           <div class="hr-line-dashed"></div>
                           <div class="form-group">
                              <label class="col-sm-2 control-label">Started Construction form</label>
                              <div class="col-sm-4"><input disabled value="<?=!empty($user_details[0]['started_construction'])?$user_details[0]['started_construction']:'';?>" type="date" class="form-control"></div>
                              <label class="col-sm-2 control-label">Date of Completion Certificate</label>
                              <div class="col-sm-4"><input disabled value="<?=!empty($user_details[0]['date_completion_certificate'])?$user_details[0]['date_completion_certificate']:'';?>" type="date" class="form-control"><span class="help-block m-b-none">(From Noida Authority)</span></div>
                           </div>
                           <div class="hr-line-dashed"></div>
                           <div class="form-group">
                              <label class="col-sm-2 control-label">Purchased On</label>
                              <div class="col-sm-4"><input type="date" disabled value="<?=!empty($user_details[0]['purchased_on'])?$user_details[0]['purchased_on']:'';?>" class="form-control"></div>
                              <label class="col-sm-2 control-label">Date of Deed Registation</label>
                              <div class="col-sm-4"><input type="date" disabled value="<?=!empty($user_details[0]['date_deed_registation'])?$user_details[0]['date_deed_registation']:'';?>" class="form-control"></div>
                           </div> 
                           <div class="hr-line-dashed"></div>
                           <div class="form-group">
                              <label class="col-sm-2 control-label">Qualification (Self)</label>
                              <div class="col-sm-4"><input type="text" disabled value="<?=!empty($user_details[0]['qualification_self'])?$user_details[0]['qualification_self']:'';?>" class="form-control"></div>
                              <label class="col-sm-2 control-label">Occupation (Self)</label>
                              <div class="col-sm-4"><input type="text" disabled value="<?=!empty($user_details[0]['occupation_self'])?$user_details[0]['occupation_self']:'';?>" class="form-control"></div>
                           </div>
                           <div class="form-group">
                              <label class="col-sm-2 control-label">Name of Organisation</label>
                              <div class="col-sm-4"><input type="text" disabled value="<?=!empty($user_details[0]['name_organisation'])?$user_details[0]['name_organisation']:'';?>" class="form-control"></div>
                              <label class="col-sm-2 control-label">Address of Organisation</label>
                              <div class="col-sm-4"><input type="text" disabled value="<?=!empty($user_details[0]['add_organisation'])?$user_details[0]['add_organisation']:'';?>" class="form-control"></div>
                           </div>
                           <div class="form-group">
                              <label class="col-sm-2 control-label">Designation (Self)</label>
                              <div class="col-sm-4"><input type="text" disabled value="<?=!empty($user_details[0]['designation_self'])?$user_details[0]['designation_self']:'';?>" class="form-control"></div>
                           </div>                 
                           <div class="hr-line-dashed"></div>
                           <div class="form-group">
                              <label class="col-sm-2 control-label">Qualification (Spouse)</label>
                              <div class="col-sm-4"><input type="text" disabled value="<?=!empty($user_details[0]['qualification_spouse'])?$user_details[0]['qualification_spouse']:'';?>" class="form-control"></div>
                              <label class="col-sm-2 control-label">Occupation (Spouse)</label>
                              <div class="col-sm-4"><input type="text" disabled value="<?=!empty($user_details[0]['occupation_spouse'])?$user_details[0]['occupation_spouse']:'';?>" class="form-control"></div>
                           </div>
                           <div class="form-group">
                              <label class="col-sm-2 control-label">Name of Organisation</label>
                              <div class="col-sm-4"><input type="text" disabled value="<?=!empty($user_details[0]['name_organisation_spouse'])?$user_details[0]['name_organisation_spouse']:'';?>" class="form-control"></div>
                              <label class="col-sm-2 control-label">Address of Organisation</label>
                              <div class="col-sm-4"><input type="text" disabled value="<?=!empty($user_details[0]['add_organisation_spouse'])?$user_details[0]['add_organisation_spouse']:'';?>" class="form-control"></div>
                           </div>
                           <div class="form-group">
                              <label class="col-sm-2 control-label">Designation (Spouse)</label>
                              <div class="col-sm-4"><input type="text" disabled value="<?=!empty($user_details[0]['designation_spouse'])?$user_details[0]['designation_spouse']:'';?>" class="form-control"></div>
                           </div>                 
                           <div class="hr-line-dashed"></div>
                           <div class="form-group">
                              <label class="col-sm-2 control-label">House Number</label>
                              <div class="col-sm-4"><input type="text" disabled value="<?=!empty($user_details[0]['house_no'])?$user_details[0]['house_no']:'';?>" class="form-control"></div>
                              <label class="col-sm-2 control-label">Amount</label>
                              <div class="col-sm-4"><input type="text" disabled value="<?=!empty($user_details[0]['amount'])?$user_details[0]['amount']:'';?>" class="form-control"></div>
                           </div>                 
                           <div class="hr-line-dashed"></div>                           
                           <div class="form-group">
                              <div class="col-sm-4 col-sm-offset-2">                                 
                                 <button class="btn btn-primary" name="btnAddMember" id="btnAddMember" type="submit">Edit Member Details</button>
                              </div>
                           </div>
                        </form>
                     </div>
                  </div>
               </div>
            </div>
            <div class="row">
               <!-- family member -->
              <div class="col-lg-12">
                  <div class="ibox float-e-margins">
                      <div class="ibox-title"><h5>Family Member List </h5>                 
                      </div>
                      <div class="ibox-content">
                        <div class="table-responsive">
                          <form method="POST" action="">
                            <table class="table table-striped table-bordered table-hover dataTables-example" id="myTable">
                              <thead>
                                <tr>
                                  <th>S.no</th>
                                  <th>Name</th>
                                  <th>Age</th>
                                  <th>Relation</th>
                                  <th>Blood Group</th>
                                  <td>Action</td>
                                </tr>
                              </thead>
                              <tbody>
                                 <?php
                                      for($i=0;$i<count($members);$i++){
                                    ?>
                                <tr>
                                    <td><?=$i+1;?></td>
                                    <td><?=$members[$i]['name'];?></td>
                                    <td><?=$members[$i]['age'];?></td>
                                    <td><?=$members[$i]['relation'];?></td>
                                    <td><?=$members[$i]['blood_gp'];?></td>
                                    <td>
                                       <a class="btn btn-warning btn-xs fmemberedit" 
                                           data-id="<?=$members[$i]['id'];?>"
                                           data-member_id="<?=$members[$i]['member_id'];?>"
                                           data-name="<?=$members[$i]['name'];?>"
                                           data-age="<?=$members[$i]['age'];?>"
                                           data-relation="<?=$members[$i]['relation'];?>"
                                           data-blood_gp="<?=$members[$i]['blood_gp'];?>"
                                           data-toggle="modal" data-target="#fmemberedit">
                                           <i class="fa fa-pencil"></i> Edit</a>                                       
                                       <a class="btn btn-danger btn-xs" href="member-details.php?fmid=<?=$members[$i]['id'];?>&id=<?=$_GET['id'];?>&action=Del" onclick=" return confirm('Do you really want to delete!')"><i class="fa fa-trash"></i> Delete</a>
                                    </td>
                                </tr>
                                <?php } ?>
                              </tbody>
                            </table>
                          </form>
                        </div>
                      </div>
                  </div>
              </div>
              <!-- end family member -->
              <!-- Driver  -->
              <div class="col-lg-12">
                  <div class="ibox float-e-margins">
                      <div class="ibox-title"><h5>Driver List</h5>                  
                      </div>
                      <div class="ibox-content">
                        <div class="table-responsive">
                          <form method="POST" action="">
                            <table class="table table-striped table-bordered table-hover dataTables-example" id="myTable">
                              <thead>
                                <tr>
                                    <th>S.no</th>
                                    <th>Name</th>
                                    <th>Father's name</th>
                                    <th>Phone No.</th>
                                    <th>Address</th>
                                    <th>Aadhar No</th>
                                    <th>Voter ID No</th>
                                    <th>Join On</th>
                                    <th>Left On</th>
                                    <th>Comment</th>
                                    <th>Action</th>
                                </tr>
                              </thead>
                              <tbody>
                                 <?php
                                      for($i=0;$i<count($driverdata);$i++){
                                    ?>
                                <tr>
                                    <td><?=$i+1;?></td>
                                    <td><?=$driverdata[$i]['name'];?></td>
                                    <td><?=$driverdata[$i]['father_name'];?></td>
                                    <td><?=$driverdata[$i]['phone_no'];?></td>
                                    <td><?=$driverdata[$i]['address'];?></td>
                                    <td><?=$driverdata[$i]['aadharcard'];?></td>
                                    <td><?=$driverdata[$i]['voterid'];?></td>
                                    <td><?=$driverdata[$i]['join_on'];?></td>
                                    <td><?=$driverdata[$i]['left_on'];?></td>
                                    <td><?=$driverdata[$i]['comment'];?></td>                                                
                                    <td>
                                       <a class="btn btn-warning btn-xs drivereditmodel" 
                                           data-id="<?=$driverdata[$i]['id'];?>"
                                           data-member_id="<?=$driverdata[$i]['member_id'];?>"
                                           data-name="<?=$driverdata[$i]['name'];?>"
                                           data-father_name="<?=$driverdata[$i]['father_name'];?>"
                                           data-phone_no="<?=$driverdata[$i]['phone_no'];?>"
                                           data-address="<?=$driverdata[$i]['address'];?>"
                                           data-aadharcard="<?=$driverdata[$i]['aadharcard'];?>"
                                           data-voterid="<?=$driverdata[$i]['voterid'];?>"
                                           data-join_on="<?=$driverdata[$i]['join_on'];?>"
                                           data-left_on="<?=$driverdata[$i]['left_on'];?>"
                                           data-comment="<?=$driverdata[$i]['comment'];?>"
                                           data-toggle="modal" data-target="#drivereditmodel">
                                           <i class="fa fa-pencil"></i> Edit</a> 
                                       <a class="btn btn-danger btn-xs" href="member-details.php?drid=<?=$driverdata[$i]['id'];?>&id=<?=$_GET['id'];?>&action=Del" onclick=" return confirm('Do you really want to delete!')"><i class="fa fa-trash"></i> Delete
                                       </a>
                                    </td>
                                </tr>
                                <?php } ?>
                              </tbody>
                            </table>
                          </form>
                        </div>
                      </div>
                  </div>
              </div>
              <!-- end Driver  -->
              <!-- servant  -->
              <div class="col-lg-12">
                  <div class="ibox float-e-margins">
                      <div class="ibox-title"><h5>Servant List</h5>                  
                      </div>
                      <div class="ibox-content">
                        <div class="table-responsive">
                          <form method="POST" action="">
                            <table class="table table-striped table-bordered table-hover dataTables-example" id="myTable">
                              <thead>
                                <tr>
                                    <th>S.no</th>
                                    <th>Name</th>
                                    <th>Father's name</th>
                                    <th>Phone No.</th>
                                    <th>Address</th>
                                    <th>Aadhar No</th>
                                    <th>Voter ID No</th>
                                    <th>Join On</th>
                                    <th>Left On</th>
                                    <th>Comment</th>
                                    <th>Action</th>
                                </tr>
                              </thead>
                              <tbody>
                                 <?php
                                      for($i=0;$i<count($servantdata);$i++){
                                    ?>
                                <tr>
                                    <td><?=$i+1;?></td>
                                    <td><?=$servantdata[$i]['name'];?></td>
                                    <td><?=$servantdata[$i]['father_name'];?></td>
                                    <td><?=$servantdata[$i]['phone_no'];?></td>
                                    <td><?=$servantdata[$i]['address'];?></td>
                                    <td><?=$servantdata[$i]['aadharcard'];?></td>
                                    <td><?=$servantdata[$i]['voterid'];?></td>
                                    <td><?=$servantdata[$i]['join_on'];?></td>
                                    <td><?=$servantdata[$i]['left_on'];?></td>
                                    <td><?=$servantdata[$i]['comment'];?></td>                                                
                                    <td>
                                       <a class="btn btn-warning btn-xs sevanteditmodel" 
                                           data-id="<?=$servantdata[$i]['id'];?>"
                                           data-member_id="<?=$servantdata[$i]['member_id'];?>"
                                           data-name="<?=$servantdata[$i]['name'];?>"
                                           data-father_name="<?=$servantdata[$i]['father_name'];?>"
                                           data-phone_no="<?=$servantdata[$i]['phone_no'];?>"
                                           data-address="<?=$servantdata[$i]['address'];?>"
                                           data-aadharcard="<?=$servantdata[$i]['aadharcard'];?>"
                                           data-voterid="<?=$servantdata[$i]['voterid'];?>"
                                           data-join_on="<?=$servantdata[$i]['join_on'];?>"
                                           data-left_on="<?=$servantdata[$i]['left_on'];?>"
                                           data-comment="<?=$servantdata[$i]['comment'];?>"
                                           data-toggle="modal" data-target="#sevanteditmodel">
                                           <i class="fa fa-pencil"></i> Edit</a> 
                                       <a class="btn btn-danger btn-xs" href="member-details.php?srvntid=<?=$servantdata[$i]['id'];?>&id=<?=$_GET['id'];?>&action=Del" onclick=" return confirm('Do you really want to delete!')"><i class="fa fa-trash"></i> Delete
                                       </a>
                                    </td>
                                </tr>
                                <?php } ?>
                              </tbody>
                            </table>
                          </form>
                        </div>
                      </div>
                  </div>
              </div>
              <!-- end servant -->
              <!-- vehicle -->
              <div class="col-lg-12">
                  <div class="ibox float-e-margins">
                      <div class="ibox-title"><h5>Vehicles List</h5>                  
                      </div>
                      <div class="ibox-content">
                        <div class="table-responsive">
                          <form method="POST" action="">
                            <table class="table table-striped table-bordered table-hover dataTables-example" id="myTable">
                              <thead>
                                <tr>
                                    <th>S.no</th>
                                    <th>Vehicle ID</th>
                                    <th>Vehicle number</th>
                                    <th>Vehicle Type</th>
                                    <th>Vehicle Company</th>
                                    <th>Vehicle Model name</th>
                                    <th>Vehicle colour</th>
                                    <th>Action</th>
                                </tr>
                              </thead>
                              <tbody>
                                 <?php
                                      for($i=0;$i<count($vehicledata);$i++){
                                    ?>
                                <tr>
                                    <td><?=$i+1;?></td>
                                    <td><?="RWAVCL-".$vehicledata[$i]['vehicle_id'];?></td>
                                    <td><?=$vehicledata[$i]['vehicle_no'];?></td>
                                    <td><?=$vehicledata[$i]['vehicle_type'];?></td>
                                    <td><?=$vehicledata[$i]['vehicle_company'];?></td>
                                    <td><?=$vehicledata[$i]['vehicle_modelname'];?></td>
                                    <td><?=$vehicledata[$i]['vehicle_color'];?></td>
                                    <td>
                                       <a class="btn btn-warning btn-xs vcleeditmodel" 
                                           data-member_id="<?=$vehicledata[$i]['member_id'];?>"
                                           data-vehicle_id="<?=$vehicledata[$i]['vehicle_id'];?>"
                                           data-vehicle_no="<?=$vehicledata[$i]['vehicle_no'];?>"
                                           data-vehicle_type="<?=$vehicledata[$i]['vehicle_type'];?>"
                                           data-vehicle_company="<?=$vehicledata[$i]['vehicle_company'];?>"
                                           data-vehicle_modelname="<?=$vehicledata[$i]['vehicle_modelname'];?>"
                                           data-vehicle_color="<?=$vehicledata[$i]['vehicle_color'];?>"                                           
                                           data-toggle="modal" data-target="#vcleeditmodel">
                                           <i class="fa fa-pencil"></i> Edit
                                       </a> 
                                       <a class="btn btn-danger btn-xs" href="member-details.php?vcleid=<?=$vehicledata[$i]['vehicle_id'];?>&id=<?=$_GET['id'];?>&action=Del" onclick=" return confirm('Do you really want to delete!')"><i class="fa fa-trash"></i> Delete
                                       </a>
                                    </td>
                                </tr>
                                <?php } ?>
                              </tbody>
                            </table>
                          </form>
                        </div>
                      </div>
                  </div>
              </div>
              <!-- end vehicle -->
          </div>
         </div>         
      </div>
      <!-- add modal for family member -->
      <div class="modal inmodal fade" id="fmemberedit" tabindex="-1" role="dialog"  aria-hidden="true">
       <div class="modal-dialog modal-lg">
           <div class="modal-content">
               <div class="modal-header">
                   <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                   <h4 class="modal-title">Family Member Edit Form</h4>                                       
               </div>
               <form action="" enctype="multipart/form-data" method="post">
               <div class="modal-body">                  
                   <div class="ibox-content">
                     <div class="table-responsive">                      
                         <table class="table table-striped table-bordered table-hover dataTables-example" id="myTable">
                           <thead>
                             <tr>
                               <th>Name</th>
                               <th>Age</th>
                               <th>Relation</th>
                               <th>Blood </th>
                             </tr>
                           </thead>
                           <tbody>
                             <tr>
                                 <input type="hidden" value="<?=$member_id;?>"  name="member_id" id="emember_id">
                                 <input type="hidden" value="<?=$id;?>"  name="id" id="eid">
                                 <td><input type="text" value="" id="ename" name="name"></td>
                                 <td><input type="text" value="" id="eage" name="age"></td>
                                 <td><input value="" type="text" id="erelation" name="relation"></td>
                                 <td><input value="" type="text" id="eblood_gp" name="blood_gp"></td>                                                                  
                             </tr>
                           </tbody>
                         </table>     
                     </div>
                   </div>
               </div>
               <div class="modal-footer">
                   <button type="button" class="btn btn-white" data-dismiss="modal">Close</button>
                   <button type="submit" name="update" value="EDIT" class="btn btn-primary">Save changes</button>
               </div>
               </form>
           </div>
       </div>
      </div>
      <!-- End modal for family member -->

      <!-- add modal for driver -->
      <div class="modal inmodal fade" id="drivereditmodel" tabindex="-1" role="dialog"  aria-hidden="true">
       <div class="modal-dialog modal-lg">
           <div class="modal-content">
               <div class="modal-header">
                   <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                   <h4 class="modal-title">Driver Edit Form</h4>                                       
               </div>
               <form action="" enctype="multipart/form-data" method="post">
               <div class="modal-body">                  
                   <div class="ibox-content">
                     <div class="table-responsive">                      
                         <table class="table table-striped table-bordered table-hover dataTables-example" id="myTable">
                           <thead>
                             <tr>
                                <th>Name</th>
                                <th>Father's name</th>
                                <th>Phone No.</th>
                                <th>Address</th>
                                <th>Aadhar No</th>
                                <th>Voter ID No</th>
                                <th>Join On</th>
                                <th>Left On</th>
                                <th>Comment</th>
                             </tr>
                           </thead>
                           <tbody>
                             <tr>
                                 <input type="hidden" value="<?=$member_id;?>"  name="member_id" id="emember_id">
                                 <input type="hidden" value="<?=$id;?>"  name="id" id="e_id">
                                 <td><input type="text" value="" id="e_name" name="name"></td>
                                 <td><input type="text" value="" id="efather_name" name="father_name"></td>
                                 <td><input value="" type="text" id="ephone_no" name="phone_no"></td>
                                 <td><textarea name="address" id="eaddress"></textarea></td>  
                                 <td><input value="" type="text" id="eaadharcard" name="aadharcard"></td>
                                 <td><input value="" type="text" id="evoterid" name="voterid"></td>
                                 <td><input value="" type="date" id="ejoin_on" name="join_on"></td>
                                 <td><input value="" type="date" id="eleft_on" name="left_on"></td>
                                 <td><input value="" type="text" id="ecomment" name="comment"></td>                                 
                             </tr>
                           </tbody>
                         </table>     
                     </div>
                   </div>
               </div>
               <div class="modal-footer">
                   <button type="button" class="btn btn-white" data-dismiss="modal">Close</button>
                   <button type="submit" name="updateDriver" value="DriverEDIT" class="btn btn-primary">Save changes</button>
               </div>
               </form>
           </div>
       </div>
      </div>
      <!-- End modal for driver -->

      <!-- add modal for Servant -->
      <div class="modal inmodal fade" id="sevanteditmodel" tabindex="-1" role="dialog"  aria-hidden="true">
       <div class="modal-dialog modal-lg">
           <div class="modal-content">
               <div class="modal-header">
                   <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                   <h4 class="modal-title">Servant Edit Form</h4>                                       
               </div>
               <form action="" enctype="multipart/form-data" method="post">
               <div class="modal-body">                  
                   <div class="ibox-content">
                     <div class="table-responsive">                      
                         <table class="table table-striped table-bordered table-hover dataTables-example" id="myTable">
                           <thead>
                             <tr>
                                <th>Name</th>
                                <th>Father's name</th>
                                <th>Phone No.</th>
                                <th>Address</th>
                                <th>Aadhar No</th>
                                <th>Voter ID No</th>
                                <th>Join On</th>
                                <th>Left On</th>
                                <th>Comment</th>
                             </tr>
                           </thead>
                           <tbody>
                             <tr>
                                 <input type="hidden" value="<?=$member_id;?>"  name="member_id" id="smember_id">
                                 <input type="hidden" value="<?=$id;?>"  name="id" id="s_id">
                                 <td><input type="text" value="" id="s_name" name="name"></td>
                                 <td><input type="text" value="" id="sfather_name" name="father_name"></td>
                                 <td><input value="" type="text" id="sphone_no" name="phone_no"></td>
                                 <td><textarea name="address" id="saddress"></textarea></td>  
                                 <td><input value="" type="text" id="saadharcard" name="aadharcard"></td>
                                 <td><input value="" type="text" id="svoterid" name="voterid"></td>
                                 <td><input value="" type="date" id="sjoin_on" name="join_on"></td>
                                 <td><input value="" type="date" id="sleft_on" name="left_on"></td>
                                 <td><input value="" type="text" id="scomment" name="comment"></td>                                 
                             </tr>
                           </tbody>
                         </table>     
                     </div>
                   </div>
               </div>
               <div class="modal-footer">
                   <button type="button" class="btn btn-white" data-dismiss="modal">Close</button>
                   <button type="submit" name="updateServent" value="ServentEDIT" class="btn btn-primary">Save changes</button>
               </div>
               </form>
           </div>
       </div>
      </div>
      <!-- End modal for Servant -->

      <!-- add modal for Vehicle -->
      <div class="modal inmodal fade" id="vcleeditmodel" tabindex="-1" role="dialog"  aria-hidden="true">
       <div class="modal-dialog modal-lg">
           <div class="modal-content">
               <div class="modal-header">
                   <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                   <h4 class="modal-title">Vehicle Edit Form</h4>                                       
               </div>
               <form action="" enctype="multipart/form-data" method="post">
               <div class="modal-body">                  
                   <div class="ibox-content">
                     <div class="table-responsive">                      
                         <table class="table table-striped table-bordered table-hover dataTables-example" id="myTable">
                           <thead>
                             <tr>                                
                                <th>Vehicle Number</th>
                                <th>Vehicle type</th>
                                <th>Vehicle Company</th>
                                <th>Vehicle Model Name</th>
                                <th>Vehicle Colour</th>                                
                             </tr>
                           </thead>
                           <tbody>
                             <tr>                                 
                                 <input type="hidden" value="<?=$member_id;?>"  name="member_id" id="vmember_id">
                                 <input type="hidden" value="<?=$vehicle_id;?>"  name="vehicle_id" id="evehicle_id">
                                 <td><input type="text" value="" id="evehicle_no" name="vehicle_no"></td>
                                 <td><input type="text" value="" id="evehicle_type" name="vehicle_type"></td>
                                 <td><input value="" type="text" id="evehicle_company" name="vehicle_company"></td>                                 
                                 <td><input value="" type="text" id="evehicle_modelname" name="vehicle_modelname"></td>
                                 <td><input value="" type="text" id="evehicle_color" name="vehicle_color"></td>
                             </tr>
                           </tbody>
                         </table>     
                     </div>
                   </div>
               </div>
               <div class="modal-footer">
                   <button type="button" class="btn btn-white" data-dismiss="modal">Close</button>
                   <button type="submit" name="updateVehicle" value="VehicleEDIT" class="btn btn-primary">Save changes</button>
               </div>
               </form>
           </div>
       </div>
      </div>
      <!-- End modal for Vehicle -->

      <?php include_once '../layout/script.php'; ?>
      <script>
         $(document).ready(function () {
             $('.i-checks').iCheck({
                 checkboxClass: 'icheckbox_square-green',
                 radioClass: 'iradio_square-green',
             });
         });
      </script>
      <script>
         $(document).on("click", ".fmemberedit", function () {
             $("#eid").val($(this).data('id'));
             $("#ename").val($(this).data('name'));
             $("#eage").val($(this).data('age'));             
             $("#erelation").val($(this).data('relation'));
             $("#emember_id").val($(this).data('member_id'));
             $('#eblood_gp').val($(this).data('blood_gp'));
         });
      </script>
      <script>
         $(document).on("click", ".drivereditmodel", function () {
             $("#e_id").val($(this).data('id'));
             $("#e_name").val($(this).data('name'));
             $("#efather_name").val($(this).data('father_name'));             
             $("#ephone_no").val($(this).data('phone_no'));
             $('#eaddress').val($(this).data('address'));
             $("#emember_id").val($(this).data('member_id'));             
             $('#eaadharcard').val($(this).data('aadharcard'));
             $('#evoterid').val($(this).data('voterid'));
             $('#ejoin_on').val($(this).data('join_on'));             
             $('#eleft_on').val($(this).data('left_on'));
             $('#ecomment').val($(this).data('comment'));
         });
      </script>
      <script>
         $(document).on("click", ".sevanteditmodel", function () {
             $("#smember_id").val($(this).data('member_id'));
             $("#s_id").val($(this).data('id'));
             $("#s_name").val($(this).data('name'));
             $("#sfather_name").val($(this).data('father_name'));             
             $("#sphone_no").val($(this).data('phone_no'));
             $('#saddress').val($(this).data('address'));             
             $('#saadharcard').val($(this).data('aadharcard'));
             $('#svoterid').val($(this).data('voterid'));
             $('#sjoin_on').val($(this).data('join_on'));             
             $('#sleft_on').val($(this).data('left_on'));
             $('#scomment').val($(this).data('comment'));
         });
      </script>
      <script>
         $(document).on("click", ".vcleeditmodel", function () {
            $("#vmember_id").val($(this).data('member_id'));
             $("#evehicle_id").val($(this).data('vehicle_id'));
             $("#evehicle_no").val($(this).data('vehicle_no'));
             $("#evehicle_type").val($(this).data('vehicle_type'));             
             $("#evehicle_company").val($(this).data('vehicle_company'));
             $('#evehicle_modelname').val($(this).data('vehicle_modelname'));             
             $('#evehicle_color').val($(this).data('vehicle_color'));             
         });
      </script>
      <script>
         function tossterMsgAlert(msg='Welcome',title='') {
             toastr.options = {
                 closeButton: true,
                 //debug: false,
                 newestOnTop: false,
                 //progressBar: false,
                 positionClass: 'toast-top-center',
                 preventDuplicates: true,
                 //onclick: null,
                 //showDuration: 300,
                 //hideDuration: 1000,
                 timeOut: 2000,
                 //extendedTimeOut: 1000,
                 //showEasing: 'swing',
                 //hideEasing: 'linear',
                 //showMethod: 'fadeIn',
                 hideMethod: 'fadeOut'
             };
             toastr.warning(title,msg);
         }
      </script>
   </body>
</html>
<?php
   //start Delete Family-member
   if(!empty($_GET['fmid']) && ($_GET['action']=='Del')) {
      //print_r($_GET['id']); exit;
      $fmid=$_GET['fmid'];
      $id=$_GET['id']; 
      //print_r($id); exit;
      
      $pdodb = PDODB::getInstance();
      $sql = "UPDATE family_member SET isactive=0 WHERE id = '".$fmid."'";        
      $result = $pdodb->query($sql);
      
      PDODB::closeInstance();
      if(!empty($result)){
         header("Location: member-details.php?id=$id");
         //echo '<script type="text/javascript">location.href("member-details.php?id=$id");</script>';
      }
   }
   //End Delete Family-member

   //Start edit family-member
   if (!empty($_POST["update"]) && $_POST["update"]=='EDIT')
   {
      //print_r($_POST['id']); exit;
      $fmid =$_POST['id'];
      //print_r($fmid); exit;
      $ipaddress = $function->getRealIpAddr();
      $member_id = !empty($_POST['member_id'])?trim($_POST['member_id']):"";
      $name = !empty($_POST['name'])?trim($_POST['name']):"";
      $age = !empty($_POST['age'])?trim($_POST['age']):"";
      $relation = !empty($_POST['relation'])?trim($_POST['relation']):"";
      $blood_gp = !empty($_POST['blood_gp'])?trim($_POST['blood_gp']):"";

      $pdodb = PDODB::getInstance();
      echo $sql = "UPDATE family_member  SET name='$name',age='$age',relation='$relation',blood_gp='$blood_gp',ipaddress='$ipaddress' WHERE id = '$fmid'";
      //exit;
      $result = $pdodb->query($sql);
      PDODB::closeInstance();
      if(!empty($result)){
         header("Location: member-details.php?id=$member_id");
         //echo '<script type="text/javascript">location.href("member-details.php?id=$id");</script>';
      }
   }

   //start Delete Driver
   if(!empty($_GET['drid']) && ($_GET['action']=='Del')) {
      //print_r($_GET['id']); exit;
      $drid=$_GET['drid'];
      $id=$_GET['id']; 
      //print_r($id); exit;
      
      $pdodb = PDODB::getInstance();
      $sql = "UPDATE `tb_driver` SET isactive=0 WHERE id = '".$drid."'";        
      $result = $pdodb->query($sql);
      
      PDODB::closeInstance();
      if(!empty($result)){
         header("Location: member-details.php?id=$id");
         //echo '<script type="text/javascript">location.href("member-details.php?id=$id");</script>';
      }
   }
   //End Delete Driver

   //Start edit Driver
   if (!empty($_POST["updateDriver"]) && $_POST["updateDriver"]=='DriverEDIT')
   {
      //print_r($_POST); exit;
      $drid =$_POST['id'];
      //print_r($fmid); exit;
      $ipaddress = $function->getRealIpAddr();
      $member_id = !empty($_POST['member_id'])?trim($_POST['member_id']):"";
      $name = !empty($_POST['name'])?trim($_POST['name']):"";
      $father_name = !empty($_POST['father_name'])?trim($_POST['father_name']):"";
      $phone_no = !empty($_POST['phone_no'])?trim($_POST['phone_no']):"";      
      $address = !empty($_POST['address'])?trim($_POST['address']):"";
      $aadharcard = !empty($_POST['aadharcard'])?trim($_POST['aadharcard']):"";
      $voterid = !empty($_POST['voterid'])?trim($_POST['voterid']):"";
      $join_on = !empty($_POST['join_on'])?trim($_POST['join_on']):"";
      $left_on = !empty($_POST['left_on'])?trim($_POST['left_on']):"";
      $comment = !empty($_POST['comment'])?trim($_POST['comment']):"";

      $pdodb = PDODB::getInstance();
      $sql = "UPDATE `tb_driver` SET 
                name='$name',
                father_name='$father_name',
                phone_no='$phone_no',                
                address='$address',
                aadharcard='$aadharcard',
                voterid='$voterid',
                join_on='$join_on',
                left_on='$left_on',
                comment='$comment',
                ipaddress='$ipaddress' WHERE id = '$drid'";
      //exit;
      $result = $pdodb->query($sql);
      PDODB::closeInstance();
      if(!empty($result)){
         header("Location: member-details.php?id=$member_id");
         //echo '<script type="text/javascript">location.href("member-details.php?id=$id");</script>';
      }
   }


   //start Delete Servant
   if(!empty($_GET['srvntid']) && ($_GET['action']=='Del')) {
      //print_r($_GET['id']); exit;
      $srvntid=$_GET['srvntid'];
      $id=$_GET['id']; 
      //print_r($id); exit;
      
      $pdodb = PDODB::getInstance();
      $sql = "UPDATE `tb_servant` SET isactive=0 WHERE id = '".$srvntid."'";        
      $result = $pdodb->query($sql);
      
      PDODB::closeInstance();
      if(!empty($result)){
         header("Location: member-details.php?id=$id");
         //echo '<script type="text/javascript">location.href("member-details.php?id=$id");</script>';
      }
   }
   //End Delete Servant

   //Start edit Servant
   if (!empty($_POST["updateServent"]) && $_POST["updateServent"]=='ServentEDIT')
   {
      //print_r($_POST); exit;
      $drid =$_POST['id'];
      //print_r($fmid); exit;
      $ipaddress = $function->getRealIpAddr();
      $member_id = !empty($_POST['member_id'])?trim($_POST['member_id']):"";
      $name = !empty($_POST['name'])?trim($_POST['name']):"";
      $father_name = !empty($_POST['father_name'])?trim($_POST['father_name']):"";
      $phone_no = !empty($_POST['phone_no'])?trim($_POST['phone_no']):"";      
      $address = !empty($_POST['address'])?trim($_POST['address']):"";
      $aadharcard = !empty($_POST['aadharcard'])?trim($_POST['aadharcard']):"";
      $voterid = !empty($_POST['voterid'])?trim($_POST['voterid']):"";
      $join_on = !empty($_POST['join_on'])?trim($_POST['join_on']):"";
      $left_on = !empty($_POST['left_on'])?trim($_POST['left_on']):"";
      $comment = !empty($_POST['comment'])?trim($_POST['comment']):"";

      $pdodb = PDODB::getInstance();
      $sql = "UPDATE `tb_servant` SET 
                name='$name',
                father_name='$father_name',
                phone_no='$phone_no',                
                address='$address',
                aadharcard='$aadharcard',
                voterid='$voterid',
                join_on='$join_on',
                left_on='$left_on',
                comment='$comment',
                ipaddress='$ipaddress' WHERE id = '$drid'";
      //exit;
      $result = $pdodb->query($sql);
      PDODB::closeInstance();
      if(!empty($result)){
         header("Location: member-details.php?id=$member_id");
         //echo '<script type="text/javascript">location.href("member-details.php?id=$id");</script>';
      }
   }
   //End edit Servant

   //start Delete Vehicle
   if(!empty($_GET['vcleid']) && ($_GET['action']=='Del')) {
      //print_r($_GET['id']); exit;
      $vcleid=$_GET['vcleid'];
      $id=$_GET['id']; 
      //print_r($id); exit;
      
      $pdodb = PDODB::getInstance();
      $sql = "UPDATE `vehicles` SET isactive=0 WHERE vehicle_id = '".$vcleid."'";        
      $result = $pdodb->query($sql);
      
      PDODB::closeInstance();
      if(!empty($result)){
         header("Location: member-details.php?id=$id");
         //echo '<script type="text/javascript">location.href("member-details.php?id=$id");</script>';
      }
   }
   //End Delete Vehicle

   //Start edit Vehicle
   if (!empty($_POST["updateVehicle"]) && $_POST["updateVehicle"]=='VehicleEDIT')
   {
      //print_r($_POST); exit;
      $vehicle_id =$_POST['vehicle_id'];
      //print_r($fmid); exit;
      $ipaddress = $function->getRealIpAddr();
      $member_id = !empty($_POST['member_id'])?trim($_POST['member_id']):"";
      $vehicle_no = !empty($_POST['vehicle_no'])?trim($_POST['vehicle_no']):"";
      $vehicle_type = !empty($_POST['vehicle_type'])?trim($_POST['vehicle_type']):"";
      $vehicle_company = !empty($_POST['vehicle_company'])?trim($_POST['vehicle_company']):"";      
      $vehicle_modelname = !empty($_POST['vehicle_modelname'])?trim($_POST['vehicle_modelname']):"";
      $vehicle_color = !empty($_POST['vehicle_color'])?trim($_POST['vehicle_color']):"";      

      $pdodb = PDODB::getInstance();
      $sql = "UPDATE `vehicles` SET 
                vehicle_no='$vehicle_no',
                vehicle_type='$vehicle_type',
                vehicle_company='$vehicle_company',                
                vehicle_modelname='$vehicle_modelname',
                vehicle_color='$vehicle_color',                
                ipaddress='$ipaddress' WHERE vehicle_id = '$vehicle_id'";
      //exit;
      $result = $pdodb->query($sql);
      PDODB::closeInstance();
      if(!empty($result)){
         header("Location: member-details.php?id=$member_id");
         //echo '<script type="text/javascript">location.href("member-details.php?id=$id");</script>';
      }
   }
   //End edit Vehicle
?>


PK 99
E-SHOP || DASHBOARD
404

Page Not Found

It looks like you found a glitch in the matrix...

← Back to Home