OverLord Shell

Path : G:/PleskVhosts/jaincensus.com/macciaweb.ultraliant.com/businessforum/
File Upload :
Current File : G:/PleskVhosts/jaincensus.com/macciaweb.ultraliant.com/businessforum/candidatejob.php

<?php session_start();
include("db/conn.php");
include_once("headerdash.inc.php");
//include_once("banner.inc.php");
include("sidebar.php");
$pagename=substr(basename($_SERVER['PHP_SELF']),0,-4);
$webpagetitle="Job Details";

if(!isset($_SESSION['company_id']) || !isset($_SESSION['company_name'])){session_destroy();header("location:login.php");}
$_SESSION['company_id'] = (empty($_SESSION['company_id'])) ? base64_decode($_GET['id']) : $_SESSION['company_id']; 

?>
 <!--BEGIN CONTENT-->
          <div class="page-content">
                
                    <div class="row ">
                     				<div class="  col-md-8">
                                     <div class="panel"><h3 style="color: #eb2c33; padding-bottom: 3%;"><?php
						   echo $webpagetitle ?></h3>
                      <div class="panel-body" style="margin-right: -12%;margin-left: -2%;">
                        <fieldset>          
                            <?php if(!empty($_GET['msg']) && strpos($_GET['msg'],'success')!=FALSE){?>
                            <div class="note note-success note-dismissable" id="msg">
                                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                                <?php if($_GET['msg']=='add_success'){?> added Successfully!!!<?php }?>
                                <?php if($_GET['msg']=='update_success'){?> updated Successfully!!!<?php }?>
                                <?php if($_GET['msg']=='delete_success'){?> deleted Successfully!!!<?php }?>
                            </div>
                            <?php }?>
                             <div class="table-responsive">
                                <table class="table table-hover" id="dataTables-listing">
                                    <thead>
                                       
                                        <tr style="width: 93px;">
                                            <th>Job Title</th>
                                            <th>Company Name</th>
                                            <th>Job Location</th>
                                            <th>No of positions</th>
                                            <th class="text-center">Details</th>
                                            <th class="text-center">Apply</th>
                                          
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php
									 $listq="SELECT  b.company_name,a.* FROM busdir_mst_companyjob a INNER JOIN busdir_mst_all_company b ON a.my_company_id = b.my_company_id INNER JOIN busdir_mst_jobprofile c ON c.jobcategory=a.jobcategory where  b.active='y' and deleted='n'  and c.company_id='".$_SESSION['company_id']."'";
										 
									        // $listq="SELECT  b.company_name,a.* FROM busdir_mst_companyjob a INNER JOIN busdir_mst_all_company b ON a.my_company_id = b.my_company_id INNER JOIN busdir_mst_jobprofile c ON c.higher_edu=a.education where  b.active='y' and deleted='n' and a.workexp>= c.wkexp and c.company_id='".$_SESSION['company_id']."'";
									   $listr=$connection->query($listq);
                                        while($listrow=$listr->fetch_assoc()){
											
											if($listrow==''){
                                        ?>  
                                    
                                        <input type="hidden" id="job_id" name="job_id" value="<?php echo $listrow['job_id'];?>" >
                                 
                                        
                                        <tr> <td colspan=8></td> </tr>  <?php }else {?> 
                                         <tr>
                                  
                                            <td><?php echo $listrow['job_title']?></td>
                                            <td><?php  echo $listrow['company_name']; ?></td>
                                            <td><?php echo $listrow['job_location']?></td>
                                            <td><?php echo $listrow['no_of_position']?></td>
                                               <td class=""><a href="compdetails.php?id=<?php echo $listrow['job_id'];?>" class="btn btn-warning btn-sm fancyboxajax">View<i class="fa fa-eye mlm"></i></a></td>
                                         
                                             <?php 
											    $listj="Select * from busdir_mst_jobapply where jobprofile_id='".$_SESSION['company_id']."' and compnayjob_id='".$listrow['job_id']."' ";
											 $listjr=$connection->query($listj);
                                             $listapp=$listjr->fetch_assoc();
										
											if($listapp['by']=='1' && $listapp['shortlist']!='c'){ ?>
                                              <td class="text-center"><button type="button" class="btn btn-info btn-sm" value="<?php echo $listrow['job_id']?>" disabled >Applied</button></td>
                                         
                                           <?php }else if($listapp['shortlist']=='c'){?>
                                            <td class=""><a href="locationdetailsc.php?id=<?php echo $_SESSION['company_id']."~".$_GET['id']."~c";?>" class="btn btn-default btn-sm fancyboxajax">Shortlisted<i class="fa fa-eye mlm"></i></a></td>
											   <?php /*?> <td class="text-center"><button type="button" class="btn btn-info btn-sm"" value="<?php echo $listrow['job_id']?>" disabled>Shortlisted</button></td><?php */?>
											   
										<?php    }else{ ?>
                                        
                                          <td class="text-center"><button type="button" class="btn btn-info btn-sm" value="<?php echo $listrow['job_id']?>">Apply</button></td>
                                          
                                            <?php
											$listjr->free(); }?>
                                           
                                            
                                        </tr>
                                          <?php }?>
                                        <?php }$listr->free()?>
                                    </tbody>
                                </table>
                            </div></fieldset>
                        </div>
                    </div>
                </div>
				
               
            </div>
        </div>
        <!--END CONTENT-->
<link type="text/css" rel="stylesheet" href="css/dataTables/dataTables.bootstrap.min.css">
<script src="js/dataTables/jquery.dataTables.min.js"></script>
<script src="js/dataTables/dataTables.bootstrap.min.js"></script>
<link href="css/jquery.fancybox.css" rel="stylesheet">
<script src="js/jquery.fancybox.pack.js"></script> 
<script src="js/validate.js"></script>
<script>
$("button").click(function(e) {
	if (confirm("Are you sure, do you want to Apply?")) {
   var val = $(this).val();
    e.preventDefault();
    $.ajax({
			type: 'POST',
			url: "jobapply.php",
			
        data: {     id: val
        },
        success: function(result) {
			        alert(result);

			location.reload();
			
        },
        error: function(result) {
			       alert(result);

            alert('error');
			
			
        }
    });
	  } else return false;
});


$('#dataTables-listing').dataTable( {
    "bSort": false
  } );
$('.fancyboxajax').fancybox({
	type:'ajax',
    afterClose: function () { 
                parent.location.reload(true);
            }
});
	
if($('#msg').html()!==''){
	setTimeout(function(){$('#msg').hide();},5000);
	if(location.search.substring(1).length){if(history!==undefined && history.pushState!==undefined){history.pushState({}, document.title, location.pathname+'<?php if(isset($_GET['id']))echo "?id=".$_GET['id']?>');}}
}


</script>
<?php $connection->close();include("footer.inc.php")?>

xRyukZ - Copyright 2k19