
<h3>Jobs Posted</h3>
<div style="padding:10px;">
    <div style="width:20px; height:20px; background-color:#ffe8c7; float:left; border:#a6a6a6 1px solid;"></div>&nbsp;&nbsp;&nbsp;<div style="float:left;padding: 3px"><strong>UnScheduled</strong></div> 
    <div style="width:20px; height:20px; background-color:#dff3e6; float:left; border:#a6a6a6 1px solid;"></div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<div style="float:left;padding: 3px "> <strong>Scheduled</strong></div>  
</div>
<!--<div style="float:left"><a href="index.php?route=HRModule/job_criteria_master&modid=<?php echo $_REQUEST['modid'] ?>&frmid=<?php echo $_REQUEST['frmid'] ?>"><button type="button" >Add New</button></a></div>-->
<table width="100%" cellpadding="3" cellspacing="0" border="1" style="border:#808080 1px solid; border-collapse:collapse;">
<tr>
  <th width="4%"><strong>S. No.</strong></th>
	<th><strong>Branch</strong></th>
  <th width="14%"><strong>Designation</strong></th>
  <th width="14%"><strong>Department</strong></th>
  <th width="8%"><strong>Job Type</strong></th>
  <th width="10%"><strong>Vacancy Code</strong></th>
  <th width="10%"><strong>Job Post Code</strong></th>
  <th width="8%"><strong>Job Posted Date</strong></th>
  <th width="6%" style="text-align:center;"><strong>Action</strong></th>
  <!--<th class="tabledata"><strong>Print</strong></th>-->       
</tr>

<?php $i=0; $SQL=DB_query("SELECT a.vacancy_code,a.branch,a.job_type,b.* FROM hr_job_created a, hr_job_created_details b where b.posting_status='y' and a.id=b.parentid ",$db);
if(DB_num_rows($SQL)>0){
while($GetRec=DB_fetch_array($SQL)) {?>
<?php if($GetRec['schedule_status']=='1') $p="#edf9f1"; else $p="#fff5e7";?>
<tr style="background-color: <?php echo $p; ?>">
	<td><?php echo $i+1; ?></td>
	<td><?php echo $sitename=$s->GetFieldValue('locations',"loccode='".$GetRec['branch']."'",'locationname'); ?></td>
  <td><?php $desig= DB_fetch_assoc(DB_query("select * from desigmaster where id='".$GetRec['designation']."' ",$db)); echo $desig['designame'];?></td>
  <td><?php $dept= DB_fetch_assoc(DB_query("select * from deptmaster where id='".$desig['mst_departmentid']."' ",$db)); echo $dept['deptname']; ?></td>
  <td><?php if($GetRec['job_type']=="p"){ echo "Permanent"; } else if($GetRec['job_type']=="c"){ echo "Contract" ;} ?></td>
  <td><?php echo $GetRec['vacancy_code']; ?></td>
  <td><?php echo $GetRec['job_number']; ?></td>
  <td><?php echo ConvertSQLDate($GetRec['posting_date']); ?></td>
  <td style="text-align:center;"><a href="print_job_posting.php?post_vac=<?php echo $GetRec['id'] ?>" target="_blank" title="Vacancy Profile"><img src="images/icon_print.jpg" width="18" height="18" title="Print Document" /></a></td>
       <!--<td width="35%"><a href="print_job_posting.php?post_vac=<?php echo $GetRec['id'] ?>" target="_blank" title="Vacancy Profile"><img src="images/icon_print.jpg" width="22" height="22"></a></td>-->
        <!--<td width="35%"><table border="1" width="100%">
    <?php // $detsql=DB_query("select * from hr_job_created_details where parentid='".$GetRec['id']."' ",$db);  
    //  while($detres=DB_fetch_assoc($detsql)){?>
                <tr><td><?php $desig= DB_fetch_assoc(DB_query("select * from desigmaster where id='".$detres['designation']."' ",$db)); echo $desig['designame'];?></td>
                    <td><?php $dept= DB_fetch_assoc(DB_query("select * from deptmaster where id='".$desig['mst_departmentid']."' ",$db)); echo $dept['deptname']; ?></td>
                    <td><?php echo $detres['required']; ?></td>
                    <td><input type="button" value="Job Post"></td>
                </tr> 
      <?php // } ?>
            </table></td>-->
</tr>
<?php $i++;} }else{?>
<tr>
    <td colspan="9">No Result Found.</td>
</tr>
<?php } ?>
</table>