
<style>
#apercu_cv{line-height:1.5em;font-size:0.9em}
#apercu_cv h1{Xtext-align:center;}
#apercu_cv hr{display:block;Xmargin:0 auto;width:100%;border:0;height:1px;background:#777;margin-bottom:15px;}

</style>
<?php

// 

	$sql = dbquery("SELECT * FROM cv_auditeurs WHERE id_cv = '".$_SESSION['user']['id_cv']."' ");

	if(dbnumrows($sql) > 0){

		$nom_cv			= dbresult($sql,0,"nom_cv");
		$permis			= dbresult($sql,0,"permis");
		$vehicule		= dbresult($sql,0,"vehicule");
		$autre_permis	= dbresult($sql,0,"autre_permis");
		$langue1		= dbresult($sql,0,"langue1");
		$langue2		= dbresult($sql,0,"langue2");
		$langue3		= dbresult($sql,0,"langue3");
		$pratique1		= dbresult($sql,0,"pratique1");
		$pratique2		= dbresult($sql,0,"pratique2");
		$pratique3		= dbresult($sql,0,"pratique3");
		$niveau1		= dbresult($sql,0,"niveau1");
		$niveau2		= dbresult($sql,0,"niveau2");
		$niveau3		= dbresult($sql,0,"niveau3");
		$sport1			= dbresult($sql,0,"sport1");
		$sport2			= dbresult($sql,0,"sport2");
		$sport3			= dbresult($sql,0,"sport3");
		$loisir1		= dbresult($sql,0,"loisir1");
		$loisir2		= dbresult($sql,0,"loisir2");
		$loisir3		= dbresult($sql,0,"loisir3");
		$autres			= dbresult($sql,0,"autres");

	}

echo'<div id="apercu_cv">

		<span style="font-size:1.5em;font-weight:bold;">CV n°'.$_SESSION['user']['id_cv'].' - '.$nom_cv.'</span><br><br>
';
// DIPLOMES
	
	$sql = dbquery("SELECT * FROM cv_diplomes WHERE id_cv = '".$_SESSION['user']['id_cv']."' ");

	if(dbnumrows($sql) > 0){

		echo '<hr><h1>Diplôme(s) : </h1>';

		for($i=0;$i<dbnumrows($sql);$i++){
				$type				= dbresult($sql,$i,'type');
				$code_diplome		= dbresult($sql,$i,'code_diplome');
				$specialite			= dbresult($sql,$i,'specialite');
				$etablissement		= dbresult($sql,$i,'etablissement');
				$intitule			= dbresult($sql,$i,'intitule');
				$lieu_delivrance	= dbresult($sql,$i,'lieu_delivrance');
				$annee_obtention	= dbresult($sql,$i,'annee_obtention');

			echo"<b>".$annee_obtention."</b><br>".$intitule."<br><br>";
		}
	}

// EXPÉRIENCES
	
	$sql = dbquery("SELECT * FROM cv_experiences WHERE id_cv = '".$_SESSION['user']['id_cv']."' ORDER BY date_debut ");

	if(dbnumrows($sql) > 0){

		echo '<hr><h1>Expérience(s) professionnelle(s): </h1>';

		for($i=0;$i<dbnumrows($sql);$i++){
			$entreprise			 = dbresult($sql,$i,'entreprise');
			$secteur			 = dbresult($sql,$i,'secteur_activite');
			$taille				 = dbresult($sql,$i,'taille_entreprise');
			$fonction			 = dbresult($sql,$i,'fonction');
			$csp				 = dbresult($sql,$i,'csp');
			$date_debut			 = dbresult($sql,$i,'date_debut');
			$date_fin			 = dbresult($sql,$i,'date_fin');
			$lieu				 = dbresult($sql,$i,'lieu');
			$descriptif			 = dbresult($sql,$i,'descriptif');

			echo"<b>De".$fonction."</b><br>".$entreprise."<br><br>";
		}
	}

// COMPETENCES
	
	$sql = dbquery("SELECT * FROM cv_competences WHERE id_cv = '".$_SESSION['user']['id_cv']."' ");

	if(dbnumrows($sql) >0){

		echo '<hr><h1>Compétence(s) : </h1>';

		for($i=0;$i<dbnumrows($sql);$i++){
			$intitule			= dbresult($sql,$i,"intitule");
			$description		= dbresult($sql,$i,"description");
			echo"<b>- ".$intitule."</b><br>".$description."<br><br>";
		}
	}
?>

</div>