$row['section_libelle'], ]; } $tmp_sections[$row['idsection']]['locations'][] = $row['num_location']; } } $section_selector = ""; $tpl = str_replace('!!section!!', $section_selector, $tpl); $tpl = str_replace('!!statut!!', do_selector('docs_statut', 'statut_selector', $pmb_pnb_statut_id), $tpl); $tpl = str_replace('!!codestat!!', do_selector('docs_codestat', 'codestat_selector', $pmb_pnb_codestat_id), $tpl); $tpl = str_replace('!!owner!!', do_selector('lenders', 'owner_selector', $pmb_pnb_owner_id), $tpl); return $tpl; } private static function save() { global $dilicom_url, $login, $password, $ftp_login, $ftp_password, $ftp_server, $webservice_url, $user_name, $user_password, $alert_end_offers, $alert_staturation_offers, $alert_threshold_tokens, $doctype_selector, $location_selector, $section_selector, $statut_selector, $codestat_selector, $owner_selector; global $pmb_pnb_param_dilicom_url, $pmb_pnb_param_login, $pmb_pnb_param_password, $pmb_pnb_param_ftp_login, $pmb_pnb_param_ftp_password, $pmb_pnb_param_ftp_server, $opac_pnb_param_webservice_url, $pmb_pnb_param_ws_user_name, $pmb_pnb_param_ws_user_password, $pmb_pnb_alert_end_offers, $pmb_pnb_alert_staturation_offers, $pmb_pnb_alert_threshold_tokens, $pmb_pnb_typedoc_id, $pmb_pnb_location_id, $pmb_pnb_section_id, $pmb_pnb_statut_id, $pmb_pnb_codestat_id, $pmb_pnb_owner_id; $pmb_pnb_param_dilicom_url = $dilicom_url; $pmb_pnb_param_login = $login; $pmb_pnb_param_password = $password; $pmb_pnb_param_ftp_login = $ftp_login; $pmb_pnb_param_ftp_password = $ftp_password; $pmb_pnb_param_ftp_server = $ftp_server; $opac_pnb_param_webservice_url = $webservice_url; $pmb_pnb_param_ws_user_name = $user_name; $pmb_pnb_param_ws_user_password = $user_password; $pmb_pnb_alert_end_offers = intval($alert_end_offers); $pmb_pnb_alert_staturation_offers = intval($alert_staturation_offers); $pmb_pnb_alert_threshold_tokens = intval($alert_threshold_tokens); $pmb_pnb_typedoc_id = intval($doctype_selector); $pmb_pnb_location_id = intval($location_selector); $pmb_pnb_section_id = intval($section_selector); $pmb_pnb_statut_id = intval($statut_selector); $pmb_pnb_codestat_id = intval($codestat_selector); $pmb_pnb_owner_id = intval($owner_selector); $query = "UPDATE parametres set valeur_param = '".addslashes($pmb_pnb_param_login)."' WHERE type_param='pmb' and sstype_param='pnb_param_login'"; pmb_mysql_query($query); $query = "UPDATE parametres set valeur_param = '".addslashes($pmb_pnb_param_password)."' WHERE type_param='pmb' and sstype_param='pnb_param_password'"; pmb_mysql_query($query); $query = "UPDATE parametres set valeur_param = '".addslashes($pmb_pnb_param_ftp_login)."' WHERE type_param='pmb' and sstype_param='pnb_param_ftp_login'"; pmb_mysql_query($query); $query = "UPDATE parametres set valeur_param = '".addslashes($pmb_pnb_param_ftp_password)."' WHERE type_param='pmb' and sstype_param='pnb_param_ftp_password'"; pmb_mysql_query($query); $query = "UPDATE parametres set valeur_param = '".addslashes($pmb_pnb_param_ftp_server)."' WHERE type_param='pmb' and sstype_param='pnb_param_ftp_server'"; pmb_mysql_query($query); $query = "UPDATE parametres set valeur_param = '".addslashes($pmb_pnb_param_ws_user_name)."' WHERE type_param='pmb' and sstype_param='pnb_param_ws_user_name'"; pmb_mysql_query($query); $query = "UPDATE parametres set valeur_param = '".addslashes($pmb_pnb_param_ws_user_password)."' WHERE type_param='pmb' and sstype_param='pnb_param_ws_user_password'"; pmb_mysql_query($query); $query = "UPDATE parametres set valeur_param = '".addslashes($pmb_pnb_param_dilicom_url)."' WHERE type_param='pmb' and sstype_param='pnb_param_dilicom_url'"; pmb_mysql_query($query); $query = "UPDATE parametres set valeur_param = '".addslashes($opac_pnb_param_webservice_url)."' WHERE type_param='opac' and sstype_param='pnb_param_webservice_url'"; pmb_mysql_query($query); $query = "UPDATE parametres set valeur_param = '".$pmb_pnb_alert_end_offers."' WHERE type_param='pmb' and sstype_param='pnb_alert_end_offers'"; pmb_mysql_query($query); $query = "UPDATE parametres set valeur_param = '".$pmb_pnb_alert_staturation_offers."' WHERE type_param='pmb' and sstype_param='pnb_alert_staturation_offers'"; pmb_mysql_query($query); $query = "UPDATE parametres set valeur_param = '".$pmb_pnb_codestat_id."' WHERE type_param='pmb' and sstype_param='pnb_codestat_id'"; pmb_mysql_query($query); $query = "UPDATE parametres set valeur_param = '".$pmb_pnb_statut_id."' WHERE type_param='pmb' and sstype_param='pnb_statut_id'"; pmb_mysql_query($query); $query = "UPDATE parametres set valeur_param = '".$pmb_pnb_typedoc_id."' WHERE type_param='pmb' and sstype_param='pnb_typedoc_id'"; pmb_mysql_query($query); $query = "UPDATE parametres set valeur_param = '".$pmb_pnb_alert_threshold_tokens."' WHERE type_param='pmb' and sstype_param='pnb_alert_threshold_tokens'"; pmb_mysql_query($query); $query = "UPDATE parametres set valeur_param = '".$pmb_pnb_location_id."' WHERE type_param='pmb' and sstype_param='pnb_location_id'"; pmb_mysql_query($query); $query = "UPDATE parametres set valeur_param = '".$pmb_pnb_section_id."' WHERE type_param='pmb' and sstype_param='pnb_section_id'"; pmb_mysql_query($query); $query = "UPDATE parametres set valeur_param = '".$pmb_pnb_owner_id."' WHERE type_param='pmb' and sstype_param='pnb_owner_id'"; pmb_mysql_query($query); return true; } }