<?php
ob_start();
session_name('CAKEPHP'); session_start();
error_reporting(FALSE);

$PageSecurity = 3;
include ('includes/session.inc');
include ('includes/function_lib.php');
include('includes/fun-php.php');
include('includes/fun-HRClass.php');

$data=DB_fetch_assoc(DB_query("select a.*,b.* from hr_job_created a,hr_job_created_details b WHERE a.id=b.parentid  and b.id='".$_REQUEST['post_vac']."' ",$db));
?>

<div style="width:100%; height:auto;">
    <table width="100%" boder="1" cellpadding="0" cellspacing="0">
        <tr  valign="top">
            <td colspan="3" style="font-size:12px; font-family:Arial; line-height:18px; text-align:justify;"><strong> Company Profile: &nbsp;</strong><span>ERP provides an integrated real-time view of core business processes, using common databases maintained by a database management system. ERP systems track business resources—cash, raw materials, production capacity—and the status of business commitments: orders, purchase orders, and payroll. The applications that make up the system share data across the various departments (manufacturing, purchasing, sales, accounting, etc.) that entered the data. ERP facilitates information flow between all business functions, and manages connections to outside stakeholders.[1]
Enterprise system software is a multi-billion dollar industry that produces components that support a variety of business functions. IT investments have become the largest category of capital expenditure in United States-based businesses over the past decade. Though early ERP systems focused on large enterprises, smaller enterprises increasingly use ERP systems.[2]
Organizations consider the ERP system a vital organizational tool because it integrates varied organizational systems and facilitates error-free transactions and production. However, ERP system development is different from traditional systems development.[3] ERP systems run on a variety of computer hardware and network configurations, typically using a database as an information repository.[4] </span></td>
        </tr>
        <tr height="10"><td colspan="3">&nbsp;</td></tr>
        <tr>
            <td width="9%" height="25" align="left" style="font-size:13px; font-family:Arial;"><strong>Role/Designation</strong></td>
			<td width="1%" style="font-size:13px; font-family:Arial;"><strong>:</strong></td>
			<td align="left" style="font-size:12px; font-family:Arial;"><?php echo $s->getField('desigmaster','id',$data['designation'],'designame'); ?>--<?php echo $s->getField('deptmaster','id',$s->getField('desigmaster','id',$data['designation'],'mst_departmentid'),'deptname'); ?></td>
        </tr>
            <tr>
            <td height="25" align="left" style="font-size:13px; font-family:Arial;"><strong>Vacancy/Job Type</strong></td>
			<td style="font-size:13px; font-family:Arial;"><strong>:</strong></td>
			<td align="left" style="font-size:12px; font-family:Arial;"><?php echo $data['required'] ?>/<?php if($data['job_type']=='p') echo "Permanent"; else if($data['job_type']=='c') echo "contract"; ?></td>
        </tr>
        <tr>
            <td height="25" align="left" style="font-size:13px; font-family:Arial;"><strong>Job Description</strong></td>
			<td style="font-size:13px; font-family:Arial;"><strong>:</strong></td>
			<td align="left" style="font-size:12px; font-family:Arial;"><?php echo $data['job_desc'] ?></td>
        </tr>
        <tr>
            <td height="25" align="left" style="font-size:13px; font-family:Arial;"><strong><u>Job Criteria:</u></strong></td>
			<td align="left">&nbsp;</td>
			<td align="left">&nbsp;</td>
        </tr>
		 <?php $para_sql=DB_query("SELECT b.value,c.label_value,c.parameter_id,d.parameter FROM hr_profile_master a, hr_profile_master_details b , hr_criteria_form_table c,hr_job_criteria_details d WHERE a.id=b.masterid AND c.id=b.criteria_form_id AND c.parameter_id=d.id AND a.id='".$data['profile']."'",$db) ; 
                    while($para_res=DB_fetch_assoc($para_sql)){ $label='';$label_value='';?>
		<tr>
            <td height="25" align="left" style="font-size:13px; font-family:Arial;"><strong><?php echo $para_res['parameter'] ?></strong></td>
			<td style="font-size:13px; font-family:Arial;"><strong>:</strong></td>
			<td align="left" style="font-size:12px; font-family:Arial;"><?php 
                                $label[$para_res['parameter_id']]=explode(",",$para_res['label_value']); 
                            $label_value[$para_res['parameter_id']]=explode(",",$para_res['value']);
                        
                            foreach($label_value as $key=>$val){
                             foreach($val as $k=>$v){ ?><span><?php echo '&nbsp&nbsp&nbsp'.$label[$key][$k].'=>&nbsp;&nbsp'.$v.'&nbsp&nbsp&nbsp';  ?></span><?php } } ?></td>
                             
        </tr>
		<?php } ?> 
  </table>
</div>
<span style="color: #00CC33"></span>
<?php 
/*
echo "<pre>";
                            print_r($label);
                            print_r($label_value);
                            //echo count($label_value[$para_res['parameter_id']]);
                            for($i=0;$i<count($label_value[$para_res['parameter_id']]);$i++){
                                echo $para_res['parameter_id'];
                            echo  $label[$para_res['parameter_id']][0];
                            echo $label_value[$para_res['parameter_id']][$i]
*/ ?>