/home/mip/www/img/credit/datatables/jobs.php.tar
home/mip/public_html_/old-website/jobs.php000064400000010726151520617310014615 0ustar00<? require_once("func_proc.php");
do_header("Job Openings");
do_menu();
if($jname) $sql_jname = "and positions.name like '$jname%'";

if($npage) {
	if($sortby) {
		if($sortby=='position')	$orderby = 'positions.name '.$sort.'';  
		if($sortby=='country')	$orderby = 'country.name '.$sort.'';  
		if($sortby=='date')	$orderby = 'web_jobs.posting_date '.$sort.'';  
	} else {
		$sort = 'desc';
		$orderby = 'web_jobs.posting_date '.$sort.'';
	}	
} else {
	if($sortby) {
		if($sort) {
			if($sort=='desc') $sort1 = 'asc';
			if($sort=='asc') $sort1 = 'desc';			
		} else {
			$sort ='asc';
		}
		if($sortby=='position')	$orderby = 'positions.name '.$sort1.'';  
		if($sortby=='country')	$orderby = 'country.name '.$sort1.'';  
		if($sortby=='date')	$orderby = 'web_jobs.posting_date '.$sort1.'';  
		$sort = $sort1;
	} else {
		$sort = 'desc';
		$orderby = 'web_jobs.posting_date '.$sort.'';
	}
}
// nextback
$sites = getdata("select count(*) from web_jobs,positions,country where 1 and positions.position_id = web_jobs.position_id and web_jobs.country_id = country.country_id $sql_jname and ('$sqltoday' >=  web_jobs.posting_date AND '$sqltoday' < web_jobs.expiry_date) and web_jobs.status = 'Open'");
$total=$sites[1][0];
$range=15;
$next_back=next_back($total,$range,$page,"$PHP_SELF?jname=$jname&sortby=$sortby&sort=$sort&npage=true");
$start=$next_back[0];
// nextback

$jobs = getdata("select web_jobs.*,positions.name,country.name as cname from web_jobs,positions,country where 1 and positions.position_id = web_jobs.position_id and web_jobs.country_id = country.country_id $sql_jname  and ('$sqltoday' >=  web_jobs.posting_date AND '$sqltoday' < web_jobs.expiry_date) and web_jobs.status = 'Open' order by $orderby limit $start,$range");
$num_jobs = count($jobs);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <th align="left" scope="col" style="padding:20px;"><img src="images/openings.gif" width="167" height="27" /></th>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td width="585" height="170" align="right" valign="top">
	<table width="100%" height="159" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr><td width="585" height="170" valign="top" style="padding-left:25px; padding-right:20px; padding-top:0px">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
		<tr><td>
			<table border="0" cellpadding="3" cellspacing="0" width="100%">				
			<form action="<?=$PHP_SELF?>#search" method="post">
			<tr>
			<td style="padding-top:0px; padding-bottom:7px; padding-right:10px;" align="right" colspan="2">
			<div style="padding-top:0px; padding-bottom:3px; color:#FFFFFF"><b>Search:</b>&nbsp;<input type="text" name="jname" value="<?=$jname?>" />&nbsp;<input type="submit" name="search" value="Search" /></div>
			</td>
			</tr>
			</form>
			</table>
			<table width=100% border="0" cellpadding="0" cellspacing="0">
			<tr><td valign="top">
				<table width=100% border="0" cellpadding="0" cellspacing="0">
				<tr>
				<td align="left" style="padding-top:5px; padding-bottom:5px;" class="style3" bgcolor="#ca8c02">&nbsp;<b><a href="<?=$PHP_SELF?>?sortby=position&sort=<?=$sort?>&jname=<?=$jname?>">Position</a></b></td>
				<td align="left" style="padding-top:5px; padding-bottom:5px;" class="style3" bgcolor="#ca8c02">&nbsp;<b><a href="<?=$PHP_SELF?>?sortby=country&sort=<?=$sort?>&jname=<?=$jname?>">Country</a></b></td>
				<td align="left" style="padding-top:5px; padding-bottom:5px;" class="style3" bgcolor="#ca8c02">&nbsp;<b><a href="<?=$PHP_SELF?>?sortby=date&sort=<?=$sort?>&jname=<?=$jname?>">Date Open</a></b></td>
				</tr>
				<?
				if($num_jobs) {
				for($i=1;$i<=$num_jobs;$i++){?>
					<tr>
					<td height="23" align="left" class="style3">&nbsp;<a href="page_job.php?webjob_id=<?=$jobs[$i][webjob_id]?>"><?=$jobs[$i]["name"]?></a></td>
					<td height="23" align="left" class="style3">&nbsp;<?=$jobs[$i]['cname']?></td>
					<td height="23" align="left" class="style3">&nbsp;<?=dateformat($jobs[$i]['posting_date'])?></td>
					</tr>
				<? } } else { ?>
				<tr><td bgcolor="#f1f1f1" colspan="3" align="center" style="color:#FF0000; padding:10px;"><b>No Record Found</b></td>
				<? } ?>
				</table>
			</td></tr>
			<? if($num_jobs) { ?>
			<tr><td align="left" style="padding-top:10px; padding-bottom:5px;" class="style3"><?=$next_back[1]?></td>
			</tr>
			<? } ?>
			</table>				
		</td></tr>
		</table>
	</td></tr>      
    </table>
</td></tr>
</table>
<?php do_footer() ?>
<? if($msg) echo "<script>alert('$msg')</script>"; ?>home/mip/public_html_/old_mip/jobs.php000064400000002123151520617620014016 0ustar00<? require_once( "func-all.php"); 
do_header(); 
$sqltoday = date('Y-m-d');
$jobs = getdata("select web_jobs.*,positions.name,country.name as cname from web_jobs,positions,country where 1 and positions.position_id = web_jobs.position_id and web_jobs.country_id = country.country_id $sql_jname  and ('$sqltoday' >=  web_jobs.posting_date AND '$sqltoday' < web_jobs.expiry_date) and web_jobs.status = 'Open' order by order_id");
?>

<div class="inner-header">
    
<img src="images/img-inner-header-apply.jpg" class="img-responsive"/>

</div>
<div class="container">
<div class="row">

<div class="col-sm-12">
<h3>Job Openings</h3>
<table class="table table-hover table-striped">
	<thead>
		<th>#</th>
		<th>Position</th>
		<th>Country</th>
		<th>Date Open</th>
	</thead>
	<tbody>
		<?php foreach ($jobs as $key => $job) { ?>
		<tr>
			<td><?php echo $key; ?></td>
			<td><?php echo $job['name']; ?></td>
			<td><?php echo $job['cname']; ?></td>
			<td><?php echo dateformat($job['posting_date']); ?></td>
		</tr>
		<?php } ?>
	</tbody>
</table>
</div>
</div>
</div>
<?php
do_employerlogin();
do_footer(); 
?>