0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 3.149.239.70


Current Path : /var/www/html/jobs/
Upload File :
Current File : /var/www/html/jobs/getdata.php

<?php


$loc=$_POST['location'];
$stat=$_POST['status'];
$mdate=$_POST['mdate'];
$txtrem=$_POST['txtrem'];

//var_dump($mdate);
//die();

$servername = "logisys.cluster-cv9maxyrxjgg.ap-south-1.rds.amazonaws.com";
$username   = "admin";
$password  = "Logisys2104";

$conn = new  mysqli($servername,$username,$password);
if(!$conn) 
{
    die("Connection failed: " . mysqli_connect_error());
}

$db = "logisys3_comexam";

error_reporting(E_ALL);
ini_set('display_errors', 'on');


if($mdate=='')
{
    $cnd="";
}
else
{
    $cnd="and date_format(fintdate,'%d/%m/%Y')='$mdate'";
}

$query  = "SELECT * FROM {$db}.jobdet
WHERE ifnull(fdeleted,'')  <> 'T' and fpreferloc like '$loc%' and  fstatus like '$stat%' and ifnull(fremarks,'') like '%$txtrem%' $cnd
group by  fmobile
order by fintdate desc";

$result = mysqli_query($conn, $query);
$count = mysqli_num_rows($result);

$table = '
    <table style="margin-left:2px;text-align: left;width: 100%;font-size:14px;margin: auto;" align-self="middle" cellspacing="1" cellpadding="5" border="0" align="center" bgcolor="#505151">

            <thead> 
            
            <tr style = "background-color:#8acc51">

			 <th width="8%"><center>Sl. No.</center></th>
             <th ><center style="width: 100px">Name</center></th>
             <th><center>Mobile No.</center></th>
             <th><center>Email Id</center></th>
             <th width="30%"><center>Preferred Location</center></th>
             <th ><center style="width: 100px">Applied Date</center></th>
             <th width="25%"><center>Resume</center></th>
             <th width="25%"><center> Status </center></th>
             <th width="25%"><center> Remarks </center></th>
             <th width="25%"><center> Action </center></th>
			</tr>
        
            </thead>';	
$i = 0;

if($count > 0)
{
    $Statarr=array('Pending','Not Interested','1st Round','2nd Round','3rd Round','Selected','Rejected');

    while($row = mysqli_fetch_assoc($result))
    {
        $table .= "<tr bgcolor='#ffffff' >";
        $table .= "<td><center>".++$i."</center></td>";
        $table .= "<td>".$row['fname']."</td>";
        $table .= "<td>".$row['fmobile']."</td>";
        $table .= "<td>".$row['femail']."</td>";
        $table .= "<td>".$row['fpreferloc']."</td>";
        $table .= "<td>".$row['fintdate']."</td>";
        $table .= "<td><a href='resumes/".$row['frespath']."' target = 'blank'>Resume</a></td>";
        $table .= "<td><center><select id='status_{$row['fmobile']}'>";
        
        foreach($Statarr as $value)
        {
            $Selected=($row['fstatus']==$value) ? "selected" : "";
            $table .= "<option ".$Selected." value='".$value."'>".$value."</option>";    
        }

        $table .= "</select></center></td>";
        $table .= "<td><input type='text' value='".$row['fremarks']."' id='remarks_{$row['fmobile']}'></td>";
        $table .= "<td><button onclick='updatedata(".$row['fmobile'].")'>Update</button></td>";
        $table .= "</tr>";
    }
}
else
{
    $table .= "<tr bgcolor='#ffffff' >";
    $table .= "<td colspan='4'><center>No data found</center></td>";
}

// $subject = "{$row['funivname']} Statistics as on ".$row['fdate'];
echo $table;

?>