<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr class="tahomasb">
<td valign="top" align="left">
	<?php 
	if(isset($_GET['job_cv_id']) && intval($_GET['job_cv_id']) > 0){
		$job_cv_id = intval($_GET['job_cv_id']);
		$query_job_cv = "SELECT * FROM job_cvs WHERE job_cv_id='$job_cv_id'";
		$result_job_cv = mysql_query ($query_job_cv) or die(mysql_error());
		if(mysql_num_rows($result_job_cv)>0) {
		mysql_query ("UPDATE job_cvs SET clicks=clicks+1 WHERE job_cv_id='$job_cv_id';") or die(mysql_error());
		$line_job_cvs = mysql_fetch_assoc($result_job_cv);
		for ($i = 0; $i < mysql_num_fields($result_job_cv); $i++) { 
			if($line_job_cvs[mysql_field_name($result_job_cv, $i)]==""){
				$line_job_cvs[mysql_field_name($result_job_cv, $i)]="N/A";
			}
		} 
		
		$canonical_link = 'http://' . $ultra_domainname . "/cvdetails/jobs_cv_details.html?job_cv_id=$job_cv_id";
		
?> 
			<table border="0" cellspacing="0" width="98%" align="center" cellpadding="2">
				<tr>
					<td align="left">
						<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_cvs["job_cv_id"];?></td>
										</tr>
										<tr>
											<td align="left">Job category: </td>
											<td valign="top" align="left">
												<?php 
												$queryjob_cat = "SELECT * FROM  job_cat WHERE job_cat_id='{$line_job_cvs['job_cat_id']}'";
												$resultjob_cat = mysql_query ($queryjob_cat);
												$linejob_cat = mysql_fetch_assoc($resultjob_cat);
												echo stripslashes($linejob_cat["title_en"]);
												?>
											</td>
										</tr>
										<tr bgcolor="#f3f3f3" align="left">
											<td align="left">Job location(s):</td>
											<td valign="top" align="left"><?php echo str_replace(";",", ",$line_job_cvs["JobLocation"]);?></td>
										</tr>
										<tr>
											<td align="left">&nbsp;</td>
											<td valign="top" align="left">&nbsp;</td>
										</tr>
										<tr bgcolor="#f3f3f3" align="left">
											<td class="darkBlueBold" align="left">Personal Details:</td>
											<td align="left">&nbsp;</td>
										</tr>
										<tr>
											<td align="left">First name: </td>
											<td valign="top" align="left"><?php echo $line_job_cvs["FirstName"];?></td>
										</tr>
										<tr bgcolor="#f3f3f3" align="left">
											<td align="left">Surname:</td>
											<td valign="top" align="left"><?php echo $line_job_cvs["LastName"];?></td>
										</tr>
										<tr>
											<td align="left">Gender:</td>
											<td valign="top" align="left">
												<?php 
												if($line_job_cvs["Genre"]=="m")echo "Male";
												if($line_job_cvs["Genre"]=="f")echo "Female";
												?>
											</td>
										</tr>
										<tr bgcolor="#f3f3f3" align="left">
											<td align="left">Age:</td>
											<td valign="top" align="left"><?php echo $line_job_cvs["Age"];?></td>
										</tr>
										<tr>
											<td align="left">Country of origin: </td>
											<td valign="top" align="left">
												<?php echo $line_job_cvs["CountryOfOrigin"];?>
											</td>
										</tr>
										<tr bgcolor="#f3f3f3" align="left">
											<td align="left">Marital status:</td>
											<td valign="top" align="left"><?php echo $line_job_cvs["MaritalStatus"];?></td>
										</tr>
										<tr>
											<td align="left">Children:</td>
											<td valign="top" align="left">
												<?php echo $line_job_cvs["Children"];?>
											</td>
										</tr>
										<tr bgcolor="#f3f3f3" align="left">
											<td class="darkBlueBold" align="left">Residence:</td>
											<td valign="top" align="left">&nbsp;</td>
										</tr>
										<tr>
											<td align="left">Country:</td>
											<td valign="top" align="left"><?php echo $line_job_cvs["ResCountry"];?></td>
										</tr>
										<tr bgcolor="#f3f3f3" align="left">
											<td align="left">Town:</td>
											<td valign="top" align="left"><?php echo $line_job_cvs["ResTown"];?></td>
										</tr>
										<tr>
											<td valign="top" align="left">Address:</td>
											<td valign="top" align="left"><?php echo $line_job_cvs["ResAddress"];?></td>
										</tr>
										<tr bgcolor="#f3f3f3" align="left">
											<td align="left">Phone:</td>
											<td valign="top" align="left"><?php echo $line_job_cvs["ResPhone"];?></td>
										</tr>
										<tr>
											<td align="left">Mobile:</td>
											<td valign="top" align="left"><?php echo $line_job_cvs["Mobile"];?></td>
										</tr>
										<tr bgcolor="#f3f3f3" align="left">
											<td align="left">E-mail:</td>
											<td valign="top" align="left">
												<?php 
												if($line_job_cvs["Email"]<>"N/A"){
													?>
													<a href="mailto:<?php echo $line_job_cvs["Email"];?>">
														<?php echo $line_job_cvs["Email"];?>
													</a>
													<?php 
												}
												else{
													echo $line_job_jobs["EmailAdd"];
												}
												?>
											</td>
										</tr>
										<tr>
											<td align="left">&nbsp;</td>
											<td valign="top" align="left">&nbsp;</td>
										</tr>
										<tr bgcolor="#f3f3f3" align="left">
											<td valign="top" align="left">Qualifications:</td>
											<td valign="top" align="left"><?php echo nl2br($line_job_cvs["Qualifications"]);?>                   </td>
										</tr>
										<tr>
											<td valign="top" align="left">Professional experience:</td>
											<td valign="top" align="left"><?php echo nl2br($line_job_cvs["ProfessionalExperience"]);?>                    </td>
										</tr>
										<tr bgcolor="#f3f3f3" align="left">
											<td valign="top" align="left">Education:</td>
											<td valign="top" align="left"><?php echo nl2br($line_job_cvs["Education"]);?>                    </td>
										</tr>
										<tr>
											<td valign="top" align="left">Interests:</td>
											<td valign="top" align="left"><?php echo nl2br($line_job_cvs["Interests"]);?>                    </td>
										</tr>
										<tr bgcolor="#f3f3f3" align="left">
											<td valign="top" align="left">Special skills:</td>
											<td valign="top" align="left"><?php echo nl2br($line_job_cvs["SpecialSkills"]);?>                   </td>
										</tr>
										<tr>
											<td valign="top" align="left">Languages:</td>
											<td valign="top" align="left"><?php echo nl2br($line_job_cvs["Languages"]);?>                    </td>
										</tr>
										<tr bgcolor="#f3f3f3" align="left">
											<td valign="top" align="left">Training:</td>
											<td valign="top" align="left"><?php echo nl2br($line_job_cvs["Training"]);?>                   </td>
										</tr>
										<tr>
											<td valign="top" align="left">Affiliations:</td>
											<td valign="top" align="left"><?php echo nl2br($line_job_cvs["Affiliations"]);?>                  </td>
										</tr>
											<tr bgcolor="#f3f3f3" align="left">
											<td valign="top" align="left">References:</td>
											<td valign="top" align="left"><?php echo nl2br($line_job_cvs["ReferencesOther"]);?>                    </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{
	    	?>
			This CV has been removed!!
			<?php 
		    }
	}
	else {
		?>
		Please select a CV first!!
		<?php 
	}
	?>
</td>
</tr>
</table>
