"CDD" => "CDD",
"CDI" => "CDI",
"Stage" => "Stage",
"Affectation Temporaire" => "Contrat de professionnalisation",
"Contrat d'alternance (pro, apprentissage)" => "Contrat de professionnalisation",
"Contrat d’apprentissage (alternance)" => "Contrat d’apprentissage",
"Contrat de professionnalisation" => "Contrat de professionnalisation"
];
return isset($list[$contrat]) ? $list[$contrat] : $contrat;
}
/**
* Fonction qui map les regions
*/
function mapRegion($region) {
$list = [
"Centre-Val de Loire" => "Centre Val de Loire",
"Île-de-France" => "Île de France",
];
return isset($list[$region]) ? $list[$region] : $contrat;
}
// CREATE OFFER FUNCTION
// *********************************************
// *********************************************
// *********************************************
function createOfferDR($dataOffer){
// DATAS REQUIRED TO LINK OFFER TO REGIONS AND ADRESSES
// $formattedAddr = $dataOffer->address->formatted;
$formattedRegion = mapRegion($dataOffer->address->parts->state);
$contractType = mapContrat($dataOffer->contract_type);
$serviceOffer = mapMetier($dataOffer->service);
// GET REGION TERM
$termRegion = get_term_by( 'slug', $formattedRegion, 'offer-region');
// dump($termRegion);
// GET REGION TERM
"Undefined variable $contrat"
"CDD" => "CDD",
"CDI" => "CDI",
"Stage" => "Stage",
"Affectation Temporaire" => "Contrat de professionnalisation",
"Contrat d'alternance (pro, apprentissage)" => "Contrat de professionnalisation",
"Contrat d’apprentissage (alternance)" => "Contrat d’apprentissage",
"Contrat de professionnalisation" => "Contrat de professionnalisation"
];
return isset($list[$contrat]) ? $list[$contrat] : $contrat;
}
/**
* Fonction qui map les regions
*/
function mapRegion($region) {
$list = [
"Centre-Val de Loire" => "Centre Val de Loire",
"Île-de-France" => "Île de France",
];
return isset($list[$region]) ? $list[$region] : $contrat;
}
// CREATE OFFER FUNCTION
// *********************************************
// *********************************************
// *********************************************
function createOfferDR($dataOffer){
// DATAS REQUIRED TO LINK OFFER TO REGIONS AND ADRESSES
// $formattedAddr = $dataOffer->address->formatted;
$formattedRegion = mapRegion($dataOffer->address->parts->state);
$contractType = mapContrat($dataOffer->contract_type);
$serviceOffer = mapMetier($dataOffer->service);
// GET REGION TERM
$termRegion = get_term_by( 'slug', $formattedRegion, 'offer-region');
// dump($termRegion);
// GET REGION TERM
);
if($createService){
update_term_meta( $createService["term_id"], 'hash_du_service', $offer->service_hash_id);
update_term_meta( $createService["term_id"], 'reference_interne', $offer->service_internal_ref);
}
}else{
update_term_meta( $getTermByName->term_id, 'hash_du_service', $offer->service_hash_id);
update_term_meta( $getTermByName->term_id, 'reference_interne', $offer->service_internal_ref);
}
array_push($arrServices, $offer->service_hash_id);
// LOOP FOR ADRESSES
// $addrOffer = $offer->address;
// $arrAddresses[$addrOffer->formatted] = $addrOffer;
// LOOP FOR REGIONS
$regionOffer = mapRegion($offer->address->parts->state);
$arrRegions[] = $regionOffer;
$arrTypeContract[] = mapContrat($offer->contract_type);
// array_merge($arrAddresses, array($addrOffer->formatted => $addrOffer));
}
}
// CLEAN SERVICES ARRAY FROM OFFERS
array_unique($arrServices);
// CLEAN REGIONS ARRAY FROM OFFERS
array_unique($arrRegions);
// CLEAN REGIONS ARRAY FROM OFFERS
array_unique($arrTypeContract);
// GET ALL EXISTING CONTRACT TYPES
// $termsContractTypes = get_terms( array(
}
break;
}
}
if ( ! $template ) {
$template = get_index_template();
}
/**
* Filters the path of the current template before including it.
*
* @since 3.0.0
*
* @param string $template The path of the template to include.
*/
$template = apply_filters( 'template_include', $template );
if ( $template ) {
include $template;
} elseif ( current_user_can( 'switch_themes' ) ) {
$theme = wp_get_theme();
if ( $theme->errors() ) {
wp_die( $theme->errors() );
}
}
return;
}
"/home/cnav-rh-prod/cnav-rh-prod/web/current/web/wp-content/themes/ac-wp-theme/template-import-offres.php"
<?php
/**
* Loads the WordPress environment and template.
*
* @package WordPress
*/
if ( ! isset( $wp_did_header ) ) {
$wp_did_header = true;
// Load the WordPress library.
require_once __DIR__ . '/wp-load.php';
// Set up the WordPress query.
wp();
// Load the theme template.
require_once ABSPATH . WPINC . '/template-loader.php';
}
"/home/cnav-rh-prod/cnav-rh-prod/web/current/web/wp-includes/template-loader.php"
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define( 'WP_USE_THEMES', true );
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
"/home/cnav-rh-prod/cnav-rh-prod/web/current/web/wp-blog-header.php"
Key | Value |
query_vars | array:2 [ "page" => "" "pagename" => "test-imports" ] |
query_string | "pagename=test-imports"
|
request | "test-imports"
|
matched_rule | "(.?.+?)(?:/([0-9]+))?/?$"
|
matched_query | "pagename=test-imports&page="
|
did_permalink | true
|
Key | Value |
query | array:2 [ "page" => "" "pagename" => "test-imports" ] |
query_vars | array:9 [ "pagename" => "test-imports" "name" => "test-imports" "cache_results" => true "update_post_term_cache" => true "lazy_load_term_meta" => true "update_post_meta_cache" => true "posts_per_page" => 10 "comments_per_page" => "50" "order" => "DESC" ] |
meta_query | WP_Meta_Query {#12427} |
queried_object | WP_Post {#12424} |
queried_object_id | 2244
|
request | """ SELECT wp_posts.*\n \t\t\t\t\t FROM wp_posts \n \t\t\t\t\t WHERE 1=1 AND (wp_posts.ID = '2244') AND wp_posts.post_type = 'page'\n \t\t\t\t\t \n \t\t\t\t\t ORDER BY wp_posts.post_date DESC\n \t\t\t\t\t """ |
post_count | 1
|
current_post | -1
|
before_loop | true
|
current_comment | -1
|
found_posts | 1
|
is_page | true
|
is_singular | true
|
Key | Value |
ID | 2244
|
post_author | "1"
|
post_date | "2023-09-07 11:47:22"
|
post_date_gmt | "2023-09-07 09:47:22"
|
post_content | "" |
post_title | "TEST IMPORTS"
|
post_excerpt | "" |
post_status | "publish"
|
comment_status | "closed"
|
ping_status | "closed"
|
post_password | "" |
post_name | "test-imports"
|
to_ping | "" |
pinged | "" |
post_modified | "2024-06-14 10:13:26"
|
post_modified_gmt | "2024-06-14 08:13:26"
|
post_content_filtered | "" |
post_parent | 0
|
guid | "https://rejoindre.lassuranceretraite.fr/?page_id=2244"
|
menu_order | 0
|
post_type | "page"
|
post_mime_type | "" |
comment_count | "0"
|
filter | "raw"
|
Key | Value |
ac_flash | [] |
Key | Value |
SERVER_SOFTWARE | "Apache"
|
REQUEST_URI | "/test-imports/"
|
USER | "www-data"
|
HOME | "/var/www"
|
SCRIPT_NAME | "/index.php"
|
QUERY_STRING | "" |
REQUEST_METHOD | "GET"
|
SERVER_PROTOCOL | "HTTP/1.1"
|
GATEWAY_INTERFACE | "CGI/1.1"
|
REDIRECT_URL | "/test-imports/"
|
REMOTE_PORT | "50448"
|
SCRIPT_FILENAME | "/var/www/cnav-rh-prod/cnav-rh-prod/web/current/web/index.php"
|
SERVER_ADMIN | "noc@synalabs.com"
|
CONTEXT_DOCUMENT_ROOT | "/var/www/cnav-rh-prod/cnav-rh-prod/web/current/web"
|
CONTEXT_PREFIX | "" |
REQUEST_SCHEME | "https"
|
DOCUMENT_ROOT | "/var/www/cnav-rh-prod/cnav-rh-prod/web/current/web"
|
REMOTE_ADDR | "18.97.14.81"
|
SERVER_PORT | "443"
|
SERVER_ADDR | "51.255.119.83"
|
SERVER_NAME | "rejoindre.lassuranceretraite.fr"
|
SERVER_SIGNATURE | "" |
PATH | "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
HTTP_CONNECTION | "Keep-Alive"
|
HTTP_HOST | "rejoindre.lassuranceretraite.fr"
|
HTTP_ACCEPT_ENCODING | "br,gzip"
|
HTTP_ACCEPT_LANGUAGE | "en-US,en;q=0.5"
|
HTTP_ACCEPT | "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
|
HTTP_USER_AGENT | "CCBot/2.0 (https://commoncrawl.org/faq/)"
|
proxy-nokeepalive | "1"
|
SSL_SESSION_RESUMED | "Resumed"
|
SSL_SESSION_ID | "0d70f44824818d17a1239ee59d691d045fc66f507226b56791567a5c935598d5"
|
SSL_SERVER_A_SIG | "sha256WithRSAEncryption"
|
SSL_SERVER_A_KEY | "rsaEncryption"
|
SSL_SERVER_I_DN | "CN=Certigna Services CA,organizationIdentifier=NTRFR-48146308100036,OU=0002 48146308100036,O=DHIMYOTIS,C=FR"
|
SSL_SERVER_S_DN | "serialNumber=S313850898,CN=www.rejoindre.lassuranceretraite.fr,O=CNAVTS,L=PARIS,C=FR"
|
SSL_SERVER_V_END | "Jul 9 21:59:59 2025 GMT"
|
SSL_SERVER_V_START | "Jun 27 22:00:00 2024 GMT"
|
SSL_SERVER_M_SERIAL | "D29DAFF81555126F25419F6CB7ADB1E2"
|
SSL_SERVER_M_VERSION | "3"
|
SSL_CLIENT_VERIFY | "NONE"
|
SSL_CIPHER_ALGKEYSIZE | "256"
|
SSL_CIPHER_USEKEYSIZE | "256"
|
SSL_CIPHER_EXPORT | "false"
|
SSL_CIPHER | "TLS_AES_256_GCM_SHA384"
|
SSL_COMPRESS_METHOD | "NULL"
|
SSL_SECURE_RENEG | "false"
|
SSL_PROTOCOL | "TLSv1.3"
|
SSL_VERSION_LIBRARY | "OpenSSL/1.1.1"
|
SSL_VERSION_INTERFACE | "mod_ssl/2.4.57"
|
SSL_SERVER_SAN_DNS_1 | "rejoindre.lassuranceretraite.fr"
|
SSL_SERVER_SAN_DNS_0 | "www.rejoindre.lassuranceretraite.fr"
|
SSL_SERVER_I_DN_CN | "Certigna Services CA"
|
SSL_SERVER_I_DN_OU | "0002 48146308100036"
|
SSL_SERVER_I_DN_O | "DHIMYOTIS"
|
SSL_SERVER_I_DN_C | "FR"
|
SSL_SERVER_S_DN_CN | "www.rejoindre.lassuranceretraite.fr"
|
SSL_SERVER_S_DN_O | "CNAVTS"
|
SSL_SERVER_S_DN_L | "PARIS"
|
SSL_SERVER_S_DN_C | "FR"
|
SSL_TLS_SNI | "rejoindre.lassuranceretraite.fr"
|
HTTPS | "on"
|
HTTP_AUTHORIZATION | "" |
REDIRECT_STATUS | "200"
|
REDIRECT_SSL_TLS_SNI | "rejoindre.lassuranceretraite.fr"
|
REDIRECT_HTTPS | "on"
|
REDIRECT_HTTP_AUTHORIZATION | "" |
FCGI_ROLE | "RESPONDER"
|
PHP_SELF | "/index.php"
|
REQUEST_TIME_FLOAT | 1743129561.5149
|
REQUEST_TIME | 1743129561
|