<table width="100%" border="0" cellspacing="0" cellpadding="2">
	<tr class="tahomasb">
		<td valign="top" align="left">
			<?php
			$all_commitment = array(
				"full-time" 	=> "Full Time",
				"part-time"		=> "Part Time",
				"contract"		=> "Contract",
				"temp"			=> "Temporary",
				"internship"	=> "Internship",
				"other"			=> "Other"
			);
			
			$job_categories = array();
			$queryjob_cat = "SELECT * FROM  job_cat WHERE active='yes'";
			$resultjob_cat = @mysql_query ($queryjob_cat);
			if($resultjob_cat && mysql_num_rows($resultjob_cat) > 0) {
				while ($row = mysql_fetch_assoc($resultjob_cat)) {
					$job_categories[$row['job_cat_id']] = stripslashes($row['title_en']);
				}
			}
			
			if(isset($_GET['job_jobs_id']) && intval($_GET['job_jobs_id']) > 0){
				$job_jobs_id = intval($_GET['job_jobs_id']);
				$query_job_cv = "SELECT * FROM job_jobs WHERE job_jobs_id='$job_jobs_id'";
				$result_job_cv = mysql_query ($query_job_cv) or die(mysql_error());
				if($result_job_cv && mysql_num_rows($result_job_cv)>0){
				
					$canonical_link = "http://" . $ultra_domainname . "/jobdetails/jobs_details.html?job_jobs_id=$job_jobs_id";
					
					@mysql_query ("UPDATE job_jobs SET clicks=clicks+1 WHERE job_jobs_id='$job_jobs_id';");// or die(mysql_error());
					$line_job_jobs = mysql_fetch_assoc($result_job_cv);
					for ($i = 0; $i < mysql_num_fields($result_job_cv); $i++) { 
						if(trim($line_job_jobs [mysql_field_name($result_job_cv, $i)]) == ""){
							$line_job_jobs [mysql_field_name($result_job_cv, $i)] = "N/A";
						}
					
					}
					
					foreach ($line_job_jobs as $fld=>$val) {
						$line_job_jobs[$fld] = trim(stripslashes($line_job_jobs[$fld]));
					}
					
					$webpage_title_en = stripslashes($line_job_jobs["JobTitle"]) . ' - ' . $webpage_title_en;
					
					$j_conditions = ($line_job_jobs['Conditions'] != "other") ? $all_commitment[$line_job_jobs['Conditions']] : '';
					$j_category = ($job_categories[$line_job_jobs['job_cat_id']] != "Other") ? $job_categories[$line_job_jobs['job_cat_id']] : '';
					
					if($line_job_jobs['Conditions'] != "other") {
						$job_meta_desc = $all_commitment[$line_job_jobs['Conditions']] . ' ' . $job_categories[$line_job_jobs['job_cat_id']]  . ' job in ' . str_replace(';', ', ', $line_job_jobs['Location']) . ' posted on ' . date("F d, Y", strtotime($line_job_jobs['added_on'])) . '. ' . $line_job_jobs['CompanyName'] . ' is looking for ' . $line_job_jobs['JobTitle'] ;
					}
					else {
						$job_meta_desc = $job_categories[$line_job_jobs['job_cat_id']]  . ' job in ' . str_replace(';', ', ', $line_job_jobs['Location']) . ' posted on ' . date("F d, Y", strtotime($line_job_jobs['added_on'])) . '. ' . $line_job_jobs['CompanyName'] . ' is looking for ' . $line_job_jobs['JobTitle'] ;
					}
					
					$meta['description'] = $job_meta_desc;
					?>
					<h1 class="page-header"><?php echo stripslashes(trim($line_job_jobs["JobTitle"])); ?></h1>
					<table border=0 cellspacing=0 width="98%" align="center" cellpadding="2">
						<tr>
							<td align="center">
								<?php
								if(!isset($_SESSION['user_id']) && $ultra_domainname == "www.cyprusjobs.com") {
									?>
									<div class="gads" style="text-align: center;">
										<script type="text/javascript"><!--
											google_ad_client = "ca-pub-3156050866912357";
											/* BLUE_Banner_468x60 */
											google_ad_slot = "7335816081";
											google_ad_width = 468;
											google_ad_height = 60;
										//-->
										</script>
										<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
										</script>
									</div>
									<?php
								}
								?>
								
								<table width="100%" border="0" cellpadding="0" cellspacing="0" class="FeturedAdTd">
									<tr>
										<td valign="top" align="left">
											<table border=0 width="100%" cellpadding="3" cellspacing="1">
												<tr>
													<td width="29%" bgcolor="#f3f3f3" class="darkBlueBold" align="left">ID</td>
													<td width="71%" bgcolor="#f3f3f3" align="left">
													<?php echo $line_job_jobs["job_jobs_id"];?>
													</td>
												</tr>
												<tr>
													<td align="left">Job category:</td>
													<td valign="top" align="left">
														<?php 
														echo $job_categories[$line_job_jobs['job_cat_id']];
														?>
													</td>
												</tr>
												<tr bgcolor="#f3f3f3">
													<td class="darkBlueBold" align="left">&nbsp;</td>
													<td valign="top" align="left">&nbsp;</td>
												</tr>
												<tr>
													<td class="darkBlueBold" align="left">Mailing details : </td>
													<td valign="top" align="left">&nbsp;</td>
												</tr>
												<tr bgcolor="#f3f3f3">
													<td align="left">Company name:</td>
													<td valign="top" align="left"><?php echo $line_job_jobs["CompanyName"];?></td>
												</tr>
												<tr>
													<td valign="top" align="left">Address:</td>
													<td valign="top" align="left"><?php echo $line_job_jobs["Address"];?></td>
												</tr>
												<tr bgcolor="#f3f3f3">
													<td align="left">Town:</td>
													<td valign="top" align="left">
													<?php echo $line_job_jobs["Town"];?>
													</td>
												</tr>
												<tr>
													<td align="left">Phone:</td>
													<td valign="top" align="left"><?php echo $line_job_jobs["Phone"];?></td>
												</tr>
												<tr bgcolor="#f3f3f3">
													<td align="left">Mobile:</td>
													<td valign="top" align="left"><?php echo $line_job_jobs["Mobile"];?></td>
												</tr>
												<tr>
													<td align="left">Fax:</td>
													<td valign="top" align="left"><?php echo $line_job_jobs["Fax"];?></td>
												</tr>
												<tr bgcolor="#f3f3f3">
													<td align="left">Contact person:</td>
													<td valign="top" align="left"><?php echo $line_job_jobs["ContactPerson"];?></td>
												</tr>
												<tr>
													<td align="left">E-mail address:</td>
													<td valign="top" align="left"><?php if($line_job_jobs["EmailAdd"]<>"N/A"){?>
													<a href="mailto:<?php echo $line_job_jobs["EmailAdd"];?>"><?php echo $line_job_jobs["EmailAdd"];?></a><?php }else{?><?php echo $line_job_jobs["EmailAdd"];?><?php }?>
													</td>
												</tr>
												<tr bgcolor="#f3f3f3">
													<td class="darkBlueBold" align="left">Position details:</td>
													<td valign="top" align="left">&nbsp;</td>
												</tr>
												<tr>
													<td align="left">Job title :</td>
													<td valign="top" align="left">
														<?php 
														echo stripslashes($line_job_jobs["JobTitle"]);
														?>
													</td>
												</tr>
												<tr bgcolor="#f3f3f3">
													<td valign="top" align="left">Job description:</td>
													<td valign="top" align="left">
														<?php 
														//echo nl2br(htmlentities($line_job_jobs["JobDescription"], ENT_COMPAT, 'UTF-8'));
														echo nl2br(stripslashes($line_job_jobs["JobDescription"]));
														?>
													</td>
												</tr>
												<tr>
													<td valign="top" align="left">Number of persons required: </td>
													<td valign="top" align="left"><?php echo $line_job_jobs["NumberOfPersons"];?></td>
												</tr>
												<tr bgcolor="#f3f3f3">
													<td valign="top" align="left">Qualifications required:</td>
													<td valign="top" align="left"><?php echo nl2br($line_job_jobs["Qualifications"]);?>
												</td>
												</tr>
												<tr>
													<td valign="top" align="left">Other requirements:</td>
													<td valign="top" align="left"><?php echo nl2br($line_job_jobs["Other"]);?>
												</td>
												</tr>
												<tr bgcolor="#f3f3f3">
													<td valign="top" align="left">Location(s):</td>
													<td valign="top" align="left"><?php echo ereg_replace(";",", ",$line_job_jobs["Location"]);?></td>
												</tr>
												<tr>
													<td valign="top" align="left">Employment conditions: </td>
													<td valign="top" align="left"><?php echo $all_commitment[$line_job_jobs["Conditions"]];?></td>
												</tr>
											</table>
										</td>
									</tr>
								</table>
								<table width="100%" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td bgcolor="#E6E6E6"><img src="<?php echo $path;?>images/navigation/spacer.gif" width="1" height="3" alt="css-img"/></td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
					<?php 
				}
				else {
					echo 'This Job has been removed!!';
				}
			}
			else{
				echo 'Please select a Job first!!'; 
			}
			?>
		</td>
	</tr>
</table>