PK

ADDRLIN : /home/questend/public_html/domains/rwa40.com/admin/member/
FLL :
Current File : /home/questend/public_html/domains/rwa40.com/admin/member/edit-member-details_17072021.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 }
   
   $user = $function->getUsers($_GET['id']);
   $user_details = $function->getUserDetails($_GET['id']);
   //print_r($_POST);

   if(isset($_POST['btnEditMember'])){
        //print_r($_POST); //exit;        
        $owner_name = !empty($_POST['owner_name'])?trim($_POST['owner_name']):"";
        $owner_age = !empty($_POST['owner_age'])?trim($_POST['owner_age']):"";
        $mobile = !empty($_POST['mobile'])?trim($_POST['mobile']):"";
        $tel_no = !empty($_POST['tel_no'])?trim($_POST['tel_no']):"";
        $email = !empty($_POST['email'])?trim($_POST['email']):"";
        $represent_name = !empty($_POST['represent_name'])?trim($_POST['represent_name']):"";
        $represent_relation = !empty($_POST['represent_relation'])?trim($_POST['represent_relation']):"";
        $represent_age = !empty($_POST['represent_age'])?trim($_POST['represent_age']):"";
        $represent_mobile = !empty($_POST['represent_mobile'])?trim($_POST['represent_mobile']):"";
        $represent_email = !empty($_POST['represent_email'])?trim($_POST['represent_email']):"";
        $started_construction = !empty($_POST['started_construction'])?trim($_POST['started_construction']):"";
        $date_completion_certificate = !empty($_POST['date_completion_certificate'])?trim($_POST['date_completion_certificate']):"";
        $purchased_on = !empty($_POST['purchased_on'])?trim($_POST['purchased_on']):"";
        $date_deed_registation = !empty($_POST['date_deed_registation'])?trim($_POST['date_deed_registation']):"";
        $qualification_self = !empty($_POST['qualification_self'])?trim($_POST['qualification_self']):"";
        $occupation_self = !empty($_POST['occupation_self'])?trim($_POST['occupation_self']):"";
        $name_organisation = !empty($_POST['name_organisation'])?trim($_POST['name_organisation']):"";
        $add_organisation = !empty($_POST['add_organisation'])?trim($_POST['add_organisation']):"";
        $designation_self = !empty($_POST['designation_self'])?trim($_POST['designation_self']):"";
        $qualification_spouse = !empty($_POST['qualification_spouse'])?trim($_POST['qualification_spouse']):"";
        $occupation_spouse = !empty($_POST['occupation_spouse'])?trim($_POST['occupation_spouse']):"";
        $name_organisation_spouse = !empty($_POST['name_organisation_spouse'])?trim($_POST['name_organisation_spouse']):"";
        $add_organisation_spouse = !empty($_POST['add_organisation_spouse'])?trim($_POST['add_organisation_spouse']):"";
        $designation_spouse = !empty($_POST['designation_spouse'])?trim($_POST['designation_spouse']):"";
        $house_no = !empty($_POST['house_no'])?trim($_POST['house_no']):"";
        $amount = !empty($_POST['amount'])?trim($_POST['amount']):"";
        //$share_phone_no = !empty($_POST['share_phone_no'])?trim($_POST['share_phone_no']):"";

        $ipaddress = $function->getRealIpAddr();
        $error_msg = "";

        $pdodb = PDODB::getInstance();
        $sql = "UPDATE users  SET owner_name='".$owner_name."',owner_age='".$owner_age."',mobile='".$mobile."',tel_no='".$tel_no."',email='".$email."',password= md5('".$mobile."'),ipaddress='".$ipaddress."' WHERE id='$id'";
        //print_r($sql); exit;
        //echo "mdscmsdmc"; exit;
        $result = $pdodb->query($sql);
        //echo $result; exit;
        
         //echo $result; exit;
        echo $sql2 = "UPDATE user_details SET house_no='".$house_no."',represent_name='".$represent_name."',represent_relation='".$represent_relation."',represent_age='".$represent_age."',represent_mobile='".$represent_mobile."',represent_email='".$represent_email."',started_construction='".$started_construction."',date_completion_certificate='".$date_completion_certificate."',purchased_on='".$purchased_on."',date_deed_registation='".$date_deed_registation."',qualification_self='".$qualification_self."',occupation_self='".$occupation_self."',name_organisation='".$name_organisation."',add_organisation='".$add_organisation."',designation_self='".$designation_self."',qualification_spouse='".$qualification_spouse."',occupation_spouse='".$occupation_spouse."',name_organisation_spouse='".$name_organisation_spouse."',add_organisation_spouse='".$add_organisation_spouse."',designation_spouse='".$designation_spouse."',amount='".$amount."' WHERE id='$id'";
         
        //exit;
        $result2 = $pdodb->query($sql2);
        
        PDODB::closeInstance();
        header("Location: edit-member-details.php?id=$id");
        
       
        if (!empty($result) && !empty($result2)) {
          $error_msg = "Successfully Update.";
          echo "<script>window.location.href='edit-member-details.php?id=$id';</script>";
        }
    }
?>
<!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>Edit Member Form</h2>                  
               </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>
                        <p style="color:red; text-align: center;"><?=(!empty($error_msg))?$error_msg:'';?>
                     </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 name="owner_name" id="owner_name" value="<?=!empty($user[0]['owner_name'])?$user[0]['owner_name']:'';?>" type="text" class="form-control"></div>
                              <label class="col-sm-2 control-label">Owner’s Age</label>
                              <div class="input-group col-sm-4"><input name="owner_age" id="owner_age" 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 type="text" name="mobile" id="mobile" 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" name="email" id="email" 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" name="tel_no" id="tel_no" 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" name="represent_name" id="represent_name" 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" name="represent_relation" id="represent_relation" 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 name="represent_age" id="represent_age" value="<?=!empty($user_details[0]['represent_age'])?$user_details[0]['represent_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 name="represent_mobile" id="represent_mobile" 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" name="represent_email" id="represent_email" 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 name="started_construction" id="started_construction" 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 name="date_completion_certificate" id="date_completion_certificate" 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" name="purchased_on" id="purchased_on" 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" name="date_deed_registation" id="date_deed_registation" 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" name="qualification_self" id="qualification_self" 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" name="occupation_self" id="occupation_self" 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" name="name_organisation" id="name_organisation" 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" name="add_organisation" id="add_organisation" 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" name="designation_self" id="designation_self" 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" name="qualification_spouse" id="qualification_spouse" 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" name="occupation_spouse" id="occupation_spouse" 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" name="name_organisation_spouse" id="name_organisation_spouse" 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" name="add_organisation_spouse" id="add_organisation_spouse" 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" name="designation_spouse" id="designation_spouse" 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" name="house_no" id="house_no" 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" name="amount" id="amount" value="<?=!empty($user_details[0]['amount'])?$user_details[0]['amount']:'';?>" class="form-control"></div>
                           </div>                 
                           <!-- 
                           <div class="form-group">
                              <div class="col-sm-12">
                                 <label>Sharing of phone no.  ( Please Tick )</label>
                                 <div class="i-checks"><label><input name="share_phone_no" id="share_phone_no" type="checkbox" value=""><i></i> Yes, I am willing to share my no. with fellow members through Membership Register / Directory </label></div>
                              </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-white" type="submit">Cancel</button>
                                 <button class="btn btn-primary" name="btnEditMember" id="btnEditMember" type="submit">Update</button>
                              </div>
                           </div>
                        </form>
                     </div>
                  </div>
               </div>
            </div>
         </div>         
      </div>
      <?php include_once '../layout/script.php'; ?>
      <script>
         $(document).ready(function () {
             $('.i-checks').iCheck({
                 checkboxClass: 'icheckbox_square-green',
                 radioClass: 'iradio_square-green',
             });
         });
      </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>


PK 99
E-SHOP || DASHBOARD
404

Page Not Found

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

← Back to Home