PK

ADDRLIN : /home/questend/public_html/domains/rwa40.com/admin/news-events/
FLL :
Current File : /home/questend/public_html/domains/rwa40.com/admin/news-events/show.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']) && !empty($_SESSION['admin_role_id'])) {
     if($_SESSION['admin_role_id']==1){
      //header("Location: index.php");
    }elseif($_SESSION['admin_role_id']==2){
      header("Location: ../dashboard/index.php");
    }
   }else{
    header("Location: ../index.php");
    exit();
   }
   
   if(!empty($_GET['id'])){
        $id = $_GET['id'];
    }else{ ?>
        <script type="text/javascript">location.replace("index.php");</script>
    <?php }
    
   $member_id = $_GET['id'];
   $vehicles = $function->getVehicleDetails($member_id,1);
   /*for($i=0;$i<count($members);$i++){
    	echo $members[$i]['name']; 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 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>Add Family Member Form</h2>
                  <ol class="breadcrumb">
                     <li>
                        <a href="index.html">Home</a>
                     </li>
                     <li>
                        <a>Forms</a>
                     </li>
                     <li class="active">
                        <strong>Add Family Member Form</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 class="ibox-tools">
                           <a class="collapse-link">
                           <i class="fa fa-chevron-up"></i>
                           </a>
                           <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                           <i class="fa fa-wrench"></i>
                           </a>
                           <ul class="dropdown-menu dropdown-user">
                              <li><a href="#">Config option 1</a>
                              </li>
                           </ul>
                           <a class="close-link">
                           <i class="fa fa-times"></i>
                           </a>
                        </div>
                     </div>
                     <div class="wrapper wrapper-content animated fadeInRight">
                      <div class="row">
                          <div class="col-lg-12">                           
                              <div class="ibox float-e-margins">
                                  <div class="ibox-title">                  
                                  </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>Owner's Name</th>
                                              <th>Mobile</th>
                                              <th>Vehicle Type</th>
                                              <th>Vehicle Number</th>
                                              <th>Member Id</th>
                                              <th>Action</th>
                                            </tr>
                                          </thead>
                                          <tbody>
                                          	<?php for($i=0;$i<count($vehicles);$i++){ ?>
                                            <tr>
                                                <td><?=$i+1;?></td>
                                                <td><?=$vehicles[$i]['plot_owner_name'];?></td>
                                                <td><?=$vehicles[$i]['plot_owner_mobile'];?></td>
                                                <td><?=$vehicles[$i]['vehicle_type'];?></td>
                                                <td><?=$vehicles[$i]['vehicle_no'];?></td>
                                                <td><?=$vehicles[$i]['member_id'];?></td>
                                                <td>
                                                   <a class="btn btn-primary btn-xs" href="vehicle-details.php?id=<?=$vehicles[$i]['vehicle_id'];?>"><i class="fa fa-eye"></i> View </a> 
                                                   <a class="btn btn-danger btn-xs" href="show-vehicle.php?fmid=<?=$vehicles[$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>
                      </div>
                    </div>
                  </div>
               </div>
            </div>
         </div>         
      </div>
      <!-- add modal -->
      <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">
                        <form method="POST" class="form-horizontal" action="">
                          <div class="form-group">
                            <label class="col-sm-2 control-label">Vehicle Number</label>
                            <div class="col-sm-4"><input type="text" name="vehicle_no" id="vehicle_no" class="form-control"></div>
                            <label class="col-sm-2 control-label">Vehicle type</label>
                            <div class="col-sm-4"><input type="text" name="vehicle_type" id="vehicle_type" class="form-control"></div>
                          </div>
                          <div class="form-group">
                            <label class="col-sm-2 control-label">Vehicle Company</label>
                            <div class="col-sm-4"><input type="text" name="vehicle_company" id="vehicle_company" class="form-control"></div>
                            <label class="col-sm-2 control-label">Vehicle Model Name</label>
                            <div class="col-sm-4"><input type="text" name="vehicle_modelname" id="vehicle_modelname" class="form-control"></div>
                          </div>
                          <div class="form-group">
                            <label class="col-sm-2 control-label">Vehicle Colour</label>
                            <div class="col-sm-4"><input type="text" name="vehicle_color" id="vehicle_color" class="form-control"></div>
                            <label class="col-sm-2 control-label">House Number</label>
                            <div class="col-sm-4"><input type="text" name="house_no" id="house_no" class="form-control" value="<?=!empty($user_details[0]['house_no'])?$user_details[0]['house_no']:'';?>" class="form-control"></div>
                          </div>
                          <div class="form-group">
                            <label class="col-sm-2 control-label">Plot Owner name</label>
                            <div class="col-sm-4"><input type="text" name="plot_owner_name" id="plot_owner_name" class="form-control" value="<?=!empty($user[0]['owner_name'])?$user[0]['owner_name']:'';?>"></div>
                            <label class="col-sm-2 control-label">Plot Owner's Mobile</label>
                            <div class="col-sm-4"><input type="text" name="plot_owner_mobile" id="plot_owner_mobile" class="form-control" value="<?=!empty($user[0]['mobile'])?$user[0]['mobile']:'';?>"></div>
                          </div>                           
                          <div class="hr-line-dashed"></div>
                          <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-2">
                              <input type="hidden" name="member_id" value="<?=$_GET['id']?>">
                              <button class="btn btn-white" type="submit">Cancel</button>
                              <button class="btn btn-primary" name="btnAddvehicle" id="btnAddvehicle" type="submit">Submit</button>
                            </div>
                          </div>
                        </form>
                     </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 -->
      <?php include_once '../layout/script.php'; ?>
      <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>
         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); exit;
      $fmid=$_GET['fmid'];
      $id=$_GET['id']; 
      //print_r($id); exit;      
      $pdodb = PDODB::getInstance();
      echo $sql = "UPDATE vehicles SET isactive=0 WHERE vehicle_id = '".$fmid."'";        
      $result = $pdodb->query($sql);
      
      PDODB::closeInstance();
      if(!empty($result)){
         header("Location: show-vehicle.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: list-family.php?id=$member_id");
         //echo '<script type="text/javascript">location.href("member-details.php?id=$id");</script>';
      }
   }
?>


PK 99
E-SHOP || DASHBOARD
404

Page Not Found

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

← Back to Home