Your IP : 216.73.217.98


Current Path : /home/saisons/www/
Upload File :
Current File : /home/saisons/www/offres_rss.php

<?php  

ini_set('display_errors',1);
//Create the client object



ini_set("soap.wsdl_cache_enabled", 0);
ini_set('default_socket_timeout', 15);


try {
    $client = new SoapClient ("http://rhneo.4-saisons.com/POWS_WEB/awws/Pows.awws?wsdl", array('exceptions' => 1,'trace'=>true,'cache_wsdl' => WSDL_CACHE_NONE));
	$client->__setLocation('http://rhneo.4-saisons.com/POWS_WEB/awws/Pows.awws');
	$params = array('_Service' => 'offre_emploi', '_Filtre' => '');
	$result = $client->__soapCall("WS_Referentiel", $params);
	
	
						if (is_soap_fault($result)) {
					
									$rssfeed = '<?xml version="1.0" encoding="utf-8"?>';
									$rssfeed .= '<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">';
									$rssfeed .= '<channel>';
									$rssfeed .= '<title>Offres emploi</title>';
									$rssfeed .= '<link>http://www.4-saisons.com</link>';
									$rssfeed .= '<description>RSS offres</description>';
									$rssfeed .= '<language>fr-FR</language>';
									$rssfeed .= '<item>';
									$rssfeed .= '<title>Pas d\'offres disponibles...</title>';
									$rssfeed .= '</item>';
									$rssfeed .= '</channel>';
									$rssfeed .= '</rss>';
									
									echo $rssfeed;
						
						}else{
					
											$result = str_replace("&#13;", "xsdlx", $result);
											
											
											
											$xml = simplexml_load_string($result);
											
											
											
											$xml->registerXPathNamespace('soap', 'http://schemas.xmlsoap.org/soap/envelope/');
											
											
												$rssfeed = '<?xml version="1.0" encoding="utf-8"?>';
												$rssfeed .= '<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">';
												$rssfeed .= '<channel>';
												$rssfeed .= '<title>Offres emploi</title>';
												$rssfeed .= '<link>http://www.4-saisons.com</link>';
												$rssfeed .= '<description>RSS offres</description>';
												$rssfeed .= '<language>fr-FR</language>';
											 
											
											
											foreach ($xml->xpath('//offre_emploi') as $item)
											{	
											
												$offre_emploi_cleunik = str_replace("xsdlx", "<br>",$item->offre_emploi_cleunik) ;
												$titre = mb_convert_encoding(str_replace("xsdlx", "<br>",$item->titre) , "Windows-1252", "UTF-8");
												$type_contrat = mb_convert_encoding(str_replace("xsdlx", "<br>",$item->type_contrat) , "Windows-1252", "UTF-8");
												$duree_prev = mb_convert_encoding(str_replace("xsdlx", "<br>",$item->duree_prev) , "Windows-1252", "UTF-8");
												
												$nombre = mb_convert_encoding(str_replace("xsdlx", "<br>",$item->nombre) , "Windows-1252", "UTF-8");
												$localisation = mb_convert_encoding(str_replace("xsdlx", "<br>",$item->localisation) , "Windows-1252", "UTF-8");
												$date = mb_convert_encoding(str_replace("xsdlx", "<br>",$item->date) , "Windows-1252", "UTF-8");
												$descriptif = mb_convert_encoding(str_replace("xsdlx", "<br>",$item->descriptif) , "Windows-1252", "UTF-8");
												$mission = mb_convert_encoding(str_replace("xsdlx", "<br>",$item->mission) , "Windows-1252", "UTF-8");
												$formation = mb_convert_encoding(str_replace("xsdlx", "<br>",$item->formation) , "Windows-1252", "UTF-8");
												$experience = mb_convert_encoding(str_replace("xsdlx", "<br>",$item->experience) , "Windows-1252", "UTF-8");
												$horaire_hebdo = mb_convert_encoding(str_replace("xsdlx", "<br>",$item->horaire_hebdo) , "Windows-1252", "UTF-8");
												$horaire_desc = mb_convert_encoding(str_replace("xsdlx", "<br>",$item->horaire_desc) , "Windows-1252", "UTF-8");
												$remuneration = mb_convert_encoding(str_replace("xsdlx", "<br>",$item->remuneration) , "Windows-1252", "UTF-8");
												
												//$document = $item->document;
												//$document = str_replace("&#13;", "<br>", $item->document);
												//$document = mb_convert_encoding(str_replace("xsdlx", "<br>", $item->set_document) , "Windows-1252", "UTF-8");
												
												
												
											
											
											
											
											$certifications = "";
													foreach ($item->xpath('.//habilitation') as $habilitation)
													{
														$certifications .= $habilitation.' <br> ';
													}
											 
												$certifications = mb_convert_encoding($certifications , "Windows-1252", "UTF-8");
												
												$documents = "";
													foreach ($item->xpath('.//document') as $document)
													{
														$documents .= $document.' <br> ';
													}
											 
												$documents = mb_convert_encoding($documents , "Windows-1252", "UTF-8");
												
												
												if($nombre != "" && $nombre != "0"){$bloc_nombre = "<br>- <b>NOMBRE DE POSTE(S) À POURVOIR : </b>".$nombre;}else{$bloc_nombre = "";}
												if($localisation != "" && $localisation != "0"){$bloc_localisation = "<br>- <b>LIEU : </b>".$localisation;}else{$bloc_localisation = "";}
												if($date != "" && $date != "0"){$bloc_date = "<br>- <b>DATE DE PRISE DE POSTE : </b>".$date;}else{$bloc_date = "";}
												if($descriptif != "" && $descriptif != "0"){$bloc_descriptif = "<br><br>- <b>DESCRIPTIF DU POSTE : </b><br><div class='sous_bloc_offre'>".$descriptif."</div>";}else{$bloc_descriptif = "";}
												if($mission != "" && $mission != "0"){$bloc_mission = "<br>- <b>MISSIONS : </b><br><div class='sous_bloc_offre'>".$mission."</div>";}else{$bloc_mission = "";}
												if($experience != "" && $experience != "0"){$bloc_experience = "<br><br>- <b>EXPÉRIENCE PROFESSIONNELLE : </b><br><div class='sous_bloc_offre'>".$experience."</div>";}else{$bloc_experience = "";}
												if($formation != "" && $formation != "0"){$bloc_formation = "<br>- <b>FORMATIONS : </b><br><div class='sous_bloc_offre'>".$formation."</div>";}else{$bloc_formation = "";}
												if($certifications != "" && $certifications != "0"){$bloc_certifications = "<br>- <b>CERTIFICATIONS ET HABILITATIONS : </b><br><div class='sous_bloc_offre'>".$certifications."</div>";}else{$bloc_certifications = "";}
												if($horaire_hebdo != "" && $horaire_hebdo != "0"){$bloc_horaire_hebdo = "<br><br>- <b>TEMPS DE TRAVAIL (heures par semaine) : </b>".$horaire_hebdo;}else{$bloc_horaire_hebdo = "";}
												if($horaire_desc!= "" && $horaire_desc != "0"){$bloc_horaire_desc = "<br><br>- <b>HORAIRES : </b>".$horaire_desc;}else{$bloc_horaire_desc = "";}
												if($duree_prev != "" && $duree_prev != "0"){$bloc_duree_prev = "<br><br>- <b>DURÉE DU CONTRAT : </b>".$duree_prev;}else{$bloc_duree_prev = "";}
												if($remuneration != "" && $remuneration != "0"){$bloc_remuneration = "<br>- <b>RÉMUNÉRATION : </b>".$remuneration;}else{$bloc_remuneration = "";}
												if($documents != "" && $documents != "0"){$bloc_document = "<br>- <b>DOCUMENT(S) À FOURNIR : </b><br><div class='sous_bloc_offre'>".$documents."</div>";}else{$bloc_document = "";}
												
												$description = "<a class='anchor_offre' id='".mb_convert_encoding($offre_emploi_cleunik, "Windows-1252", "UTF-8") ."'></a><div class='bloc_offre'><div class='bloc_offre_entete'>Le Groupement d'Employeurs 4 Saisons recherche pour l'un de ses adhérents un.e ".$titre."</div>".$bloc_nombre." ".$bloc_localisation." ".$bloc_date." ".$bloc_descriptif." ".$bloc_mission." ".$bloc_experience." ".$bloc_formation." ".$bloc_certifications." ".$bloc_horaire_hebdo." ".$bloc_horaire_desc." ".$bloc_duree_prev." ".$bloc_remuneration." ".$bloc_document." <br><br><a class='bt_postuler' target='_blank' href='http://rhneo.4-saisons.com/rh_cvtheque?offre_emploi_cleunik=" .mb_convert_encoding($offre_emploi_cleunik, "Windows-1252", "UTF-8") . "'>Postuler en ligne</a> <div name='".addslashes($titre)."' class='inline-share-".$offre_emploi_cleunik." inline-share' href='https://www.4-saisons.com/salaries/offres-d-emploi/#".$offre_emploi_cleunik."'><span class='share'>Partagez cette offre !</span></div></div><script type='text/javascript'>
jQuery(function($){

  $('.inline-share-".$offre_emploi_cleunik."').BEShare({
    'type': 'inline',
    'targets': ['Facebook', 'LinkedIn', 'Twitter', 'Email'],
	'altLink': true,
	'message': '".addslashes($titre)."',
	'aria-prefix': 'partager sur ',
	'via': 'GE4Saisons',
    'width': '900',
    'height': '436'
   
  });
  

});
  </script>" ;
												
												if($offre_emploi_cleunik != 9999999999 ){
													$rssfeed .= '<item>';
													$rssfeed .= '<title>' . $titre . '</title>';
													$rssfeed .= '<link>http://rhneo.4-saisons.com/rh_cvtheque?offre_emploi_cleunik=' .mb_convert_encoding($offre_emploi_cleunik, "Windows-1252", "UTF-8") . '</link>';
													$rssfeed .= '<description><![CDATA[' .$description . ']]></description>';
												   // $rssfeed .= '<pubDate>' . date("D, d M Y H:i:s O", strtotime($date)) . '</pubDate>';
													$rssfeed .= '</item>';
												}
													
											   
											}
											$rssfeed .= '</channel>';
												$rssfeed .= '</rss>';
												
												echo $rssfeed;
											}
	
	
} catch ( SoapFault $e ) { // Do NOT try and catch "Exception" here
    $rssfeed0 = '<?xml version="1.0" encoding="utf-8"?>';
    $rssfeed0 .= '<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">';
    $rssfeed0 .= '<channel>';
    $rssfeed0 .= '<title>Offres emploi</title>';
    $rssfeed0 .= '<link>http://www.4-saisons.com</link>';
    $rssfeed0 .= '<description>RSS offres</description>';
    $rssfeed0 .= '<language>fr-FR</language>';
	$rssfeed0 .= '<item>';
	$rssfeed0 .= '<title>Pas d\'offres disponibles...</title>';
	$rssfeed0 .= '</item>';
	$rssfeed0 .= '</channel>';
    $rssfeed0 .= '</rss>';
	
	echo $rssfeed0;
}




?>