function update_config_from_form() { parent::update_config_from_form(); global $serialization; global $mode; $this->config = array(); $this->config["serialization"] = $serialization; $this->config["mode"] = $mode; return; }
function get_config_form() { global $charset; $result = parent::get_config_form(); //Adresse d'utilisation global $database; $result .= '<div class=row><label class="etiquette" for="api_exported_functions">' . $this->msg["rdf_service_endpoint"] . '</label><br />'; if ($this->id) { $result .= '<a target="_blank" href="ws/connector_out.php?source_id=' . $this->id . '">ws/connector_out.php?source_id=' . $this->id . '</a>'; } else { $result .= $this->msg["rdf_service_endpoint_unrecorded"]; } $result .= "</div>"; return $result; }
function update_config_from_form() { global $dbh; parent::update_config_from_form(); global $repo_name, $admin_email, $included_sets, $repositoryIdentifier, $chunksize, $token_lifeduration, $cache_complete_records, $cache_complete_records_seconds, $link_status_to_deletion, $linked_status_to_deletion, $allow_gzip_compression, $baseURL, $include_items, $suppr_feuille_xslt; global $deletion_management, $deletion_management_transient_duration; //les trucs faciles $this->config["repo_name"] = stripslashes($repo_name); $this->config["admin_email"] = stripslashes($admin_email); $this->config["repositoryIdentifier"] = stripslashes($repositoryIdentifier); $this->config["chunksize"] = $chunksize + 0; $this->config["token_lifeduration"] = $token_lifeduration + 0; $this->config["cache_complete_records"] = isset($cache_complete_records); $this->config["cache_complete_records_seconds"] = $cache_complete_records_seconds + 0; $this->config["link_status_to_deletion"] = isset($link_status_to_deletion); $this->config["linked_status_to_deletion"] = $linked_status_to_deletion + 0; $this->config["allow_gzip_compression"] = isset($allow_gzip_compression); $this->config["baseURL"] = stripslashes($baseURL); $this->config["include_items"] = isset($include_items); $this->config["deletion_management"] = $deletion_management; $this->config["deletion_management_transient_duration"] = $deletion_management_transient_duration * 1; if (!$_FILES['feuille_xslt']['error']) { $this->config['feuille_xslt'] = file_get_contents($_FILES['feuille_xslt']['tmp_name']); $this->config['feuille_xslt_name'] = $_FILES['feuille_xslt']['name']; } if ($suppr_feuille_xslt) { $this->config['feuille_xslt'] = ""; $this->config['feuille_xslt_name'] = ""; } $this->config['include_links'] = array(); $this->config['include_links']['genere_lien'] = 0; global $include_path, $class_path; require_once $class_path . '/export_param.class.php'; $e_param = new export_param(EXP_GLOBAL_CONTEXT); $this->config['include_links'] = $e_param->get_parametres(EXP_OAI_CONTEXT); //Vérifions que le statut proposé existe bien $sql = "SELECT COUNT(1) > 0 FROM notice_statut WHERE id_notice_statut = " . ($linked_status_to_deletion + 0); $status_exists = pmb_mysql_result(pmb_mysql_query($sql, $dbh), 0, 0); if (!$status_exists) { $this->config["linked_status_to_deletion"] = 0; } if (!$this->config["cache_complete_records_seconds"]) { $this->config["cache_complete_records_seconds"] = 86400; } if ($this->config["deletion_management"] == 1 && !$this->config["deletion_management_transient_duration"]) { $this->config["deletion_management"] = 0; } //et maintenant les sets if (!is_array($included_sets)) { $included_sets = array($included_sets); } array_walk($included_sets, create_function('&$a', '$a+=0;')); //Virons ce qui n'est pas entier //Virons ce qui n'est pas un index de set de notice $sql = "SELECT connector_out_set_id FROM connectors_out_sets WHERE connector_out_set_type IN (" . implode(",", $this->allowed_set_types) . ") AND connector_out_set_id IN (" . implode(",", $included_sets) . ')'; $res = pmb_mysql_query($sql, $dbh); $this->config["included_sets"] = array(); while ($row = pmb_mysql_fetch_assoc($res)) { $this->config["included_sets"][] = $row["connector_out_set_id"]; } //Vérifions que les formats autorisés proposés existent bien $allowed_paths = array(); $admin_convert_catalog = external_services_converter_notices::get_export_possibilities(); foreach ($admin_convert_catalog as $aconvert) { $allowed_paths[] = $aconvert["path"]; } global $allowed_admin_convert_paths; if (!is_array($allowed_admin_convert_paths)) { $allowed_admin_convert_paths = array($allowed_admin_convert_paths); } $this->config["allowed_admin_convert_paths"] = array(); foreach ($allowed_admin_convert_paths as $apath) { if (!in_array($apath, $allowed_paths)) { continue; } $this->config["allowed_admin_convert_paths"][] = $apath; } return; }
function update_config_from_form() { global $dbh; global $included_sets; global $used_thesaurus; global $only_with_notices; global $tree; global $authentication; global $write_permission; global $restricted_empr_write_permission, $restricted_user_write_permission; global $default_statut; global $base_uri; global $id_rep; global $up_place; global $allow_web; global $default_docnum_statut; global $metasMapper_class; parent::update_config_from_form(); $this->config['included_sets'] = $included_sets; $this->config['used_thesaurus'] = $used_thesaurus; $this->config['only_with_notices'] = $only_with_notices; $this->config['tree'] = $tree; $this->config['authentication'] = $authentication; $this->config['write_permission'] = $write_permission; $this->config['restricted_empr_write_permission'] = $restricted_empr_write_permission; $this->config['restricted_user_write_permission'] = $restricted_user_write_permission; $this->config['default_statut'] = $default_statut; $this->config['base_uri'] = $base_uri; $this->config['upload_rep'] = $id_rep; $this->config['up_place'] = $up_place; $this->config['allow_web'] = $allow_web; $this->config['default_docnum_statut'] = $default_docnum_statut; $this->config['metasMapper_class'] = $metasMapper_class; return; }
function update_config_from_form() { global $dbh; global $proxyUrl, $appTitle, $firstTab, $firstInfoPage, $heartShelf, $search_nbResultsByPage, $shelf_nbResultsByPage; global $allowTypDocFilter, $allowCheckIn; global $bulletinsList_nbResultsByPage, $analysisList_nbResultsByPage; global $onglets; parent::update_config_from_form(); //les trucs faciles $this->config['proxyUrl'] = $proxyUrl; $this->config['firstInfoPage'] = isset($firstInfoPage) ? $firstInfoPage : ''; $this->config['heartShelf'] = isset($heartShelf) ? $heartShelf : ''; $this->config['search_nbResultsByPage'] = $search_nbResultsByPage; $this->config['shelf_nbResultsByPage'] = $shelf_nbResultsByPage; if ($allowTypDocFilter == 1) { $this->config['allowTypDocFilter'] = true; } else { $this->config['allowTypDocFilter'] = false; } if ($allowCheckIn == 1) { $this->config['allowCheckIn'] = true; } else { $this->config['allowCheckIn'] = false; } //le tableau des onglets activés ou non $this->config['activeTabs'] = array(); foreach ($this->onglets as $ongletName => $value) { global ${$ongletName}; if (isset(${$ongletName})) { $this->config['activeTabs'][$ongletName] = ${$ongletName}; } else { $this->config['activeTabs'][$ongletName] = 0; } } if (isset($firstTab) && $this->config['activeTabs'][$firstTab]) { $this->config['firstTab'] = $firstTab; } else { foreach ($this->onglets as $ongletName => $value) { if ($this->config['activeTabs'][$ongletName] == 1) { $this->config['firstTab'] = $ongletName; } break; } } $this->config['bulletinsList_nbResultsByPage'] = $bulletinsList_nbResultsByPage; $this->config['analysisList_nbResultsByPage'] = $analysisList_nbResultsByPage; return; }
function update_config_from_form() { global $dbh; global $pmb_ws_url; global $style_url; global $checkout_activate; global $auto_checkout; global $checkin_activate; global $resa_activate; global $printer_activate; global $printer_name; global $printer_tpl; global $sound_activate; global $rfid_activate; global $rfid_driver; global $rfid_activate_empr; global $rfid_activate_expl; global $rfid_serveur_url; global $rfid_library_code; global $rfid_security_activate; global $rfid_afi_security_code_on; global $rfid_afi_security_code_off; global $msg_checkout_button; global $msg_checkout_valid_button; global $msg_checkin_button; global $msg_resa_button; global $msg_exit_button; global $msg_action_title; global $msg_checkout_title; global $msg_checkin_title; global $msg_resa_title; global $msg_dialog_place_item_checkout; global $msg_dialog_place_item_checkin; global $msg_dialog_too_many_items; global $msg_dialog_item_cb_unknown; global $msg_dialog_checkout_possible; global $msg_dialog_checkout_no; global $msg_dialog_checkout_ok; global $msg_dialog_checkin_ok; global $msg_dialog_checkin_no_checkout; global $msg_dialog_antivol_error; global $msg_printer_button; global $msg_dialog_exit; global $timeout_disconnect; global $home_tpl; global $empr_tpl; global $default_action; global $default_action_end; parent::update_config_from_form(); $this->config['pmb_ws_url'] = $pmb_ws_url; $this->config['style_url'] = $style_url; $this->config['checkout_activate'] = $checkout_activate; $this->config['auto_checkout'] = $auto_checkout; $this->config['checkin_activate'] = $checkin_activate; $this->config['resa_activate'] = $resa_activate; $this->config['printer_activate'] = $printer_activate; $this->config['printer_name'] = stripslashes($printer_name); $this->config['printer_tpl'] = stripslashes($printer_tpl); $this->config['default_action'] = $default_action; $this->config['default_action_end'] = $default_action_end; $this->config['sound_activate'] = $sound_activate; $this->config['rfid_activate'] = $rfid_activate; $this->config['rfid_driver'] = $rfid_driver; $this->config['rfid_activate_empr'] = $rfid_activate_empr; $this->config['rfid_activate_expl'] = $rfid_activate_expl; $this->config['rfid_serveur_url'] = $rfid_serveur_url; $this->config['rfid_library_code'] = $rfid_library_code; $this->config['rfid_afi_security_code_on'] = $rfid_afi_security_code_on; $this->config['rfid_afi_security_code_off'] = $rfid_afi_security_code_off; $this->config['rfid_security_activate'] = $rfid_security_activate; $this->config['home_tpl'] = stripslashes($home_tpl); $this->config['empr_tpl'] = stripslashes($empr_tpl); $this->config['msg_checkout_button'] = stripslashes($msg_checkout_button); $this->config['msg_checkout_valid_button'] = stripslashes($msg_checkout_valid_button); $this->config['msg_checkin_button'] = stripslashes($msg_checkin_button); $this->config['msg_resa_button'] = stripslashes($msg_resa_button); $this->config['msg_printer_button'] = stripslashes($msg_printer_button); $this->config['msg_exit_button'] = stripslashes($msg_exit_button); $this->config['msg_action_title'] = stripslashes($msg_action_title); $this->config['msg_checkout_title'] = stripslashes($msg_checkout_title); $this->config['msg_checkin_title'] = stripslashes($msg_checkin_title); $this->config['msg_resa_title'] = stripslashes($msg_resa_title); $this->config['msg_dialog_place_item_checkout'] = stripslashes($msg_dialog_place_item_checkout); $this->config['msg_dialog_place_item_checkin'] = stripslashes($msg_dialog_place_item_checkin); $this->config['msg_dialog_too_many_items'] = stripslashes($msg_dialog_too_many_items); $this->config['msg_dialog_item_cb_unknown'] = stripslashes($msg_dialog_item_cb_unknown); $this->config['msg_dialog_checkout_possible'] = stripslashes($msg_dialog_checkout_possible); $this->config['msg_dialog_checkout_ok'] = stripslashes($msg_dialog_checkout_ok); $this->config['msg_dialog_checkout_no'] = stripslashes($msg_dialog_checkout_no); $this->config['msg_dialog_checkin_ok'] = stripslashes($msg_dialog_checkin_ok); $this->config['msg_dialog_checkin_no_checkout'] = stripslashes($msg_dialog_checkin_no_checkout); $this->config['msg_dialog_antivol_error'] = stripslashes($msg_dialog_antivol_error); $this->config['msg_dialog_exit'] = stripslashes($msg_dialog_exit); $this->config['timeout_disconnect'] = $timeout_disconnect; return; }
function update_config_from_form() { parent::update_config_from_form(); global $api_exported_functions, $authentication_type, $authorized_groups; if (!$api_exported_functions) { $api_exported_functions = array(); } if (!isset($authentication_type) || !$authentication_type) { $authentication_type = 'none'; } if (!isset($authorized_groups) || !$authorized_groups) { $authorized_groups = array(); } //Récupérons la liste des fonctions pour virer de l'entrée les noms de fonctions qui n'existent pas $api_catalog = new es_catalog(); $api_functions = array(); foreach ($api_catalog->groups as $agroup) { foreach ($agroup->methods as $amethod) { $api_functions[] = $agroup->name . "|_|" . $amethod->name; } } $api_exported_functions = array_intersect($api_exported_functions, $api_functions); //Enregistrons $config_exported = array(); foreach ($api_exported_functions as $afunction) { $dafunction = explode("|_|", $afunction); $config_exported[] = array("group" => $dafunction[0], "name" => $dafunction[1]); } $this->config["exported_functions"] = $config_exported; /* //Autentification $authorized_config_types = array('none', 'groups'); if (!in_array($authentication_type, $authorized_config_types)) $authentication_type = 'none'; $this->config["authentication_type"] = $authentication_type; $base_autorized_group_ids = array(); $es_groups = new es_esgroups; foreach ($es_groups->groups as $aesgroup) $base_autorized_group_ids[] = $aesgroup->esgroup_id; $authorized_groups = array_intersect($base_autorized_group_ids, $authorized_groups); $this->config["authorized_groups"] = $authorized_groups;*/ return; }
if (!$daconn) { list_connectors_out(); break; } $source_object = $daconn->instantiate_source_class($source_id); show_sourceout_form($source_object->id, $connector_id, $source_object->name, $source_object->comment, array($source_object, 'get_config_form')); break; case "source_update": if (!$connector_id) { list_connectors_out(); break; } if (!$id) { //Création d'une nouvelle source //Récupération d'un nouvel id d'une nouvelle source générique vide $new_source = connecteur_out_source::add_new($connector_id); $new_source_id = $new_source->id; //Instantiation de cette nouvelle source en tant que source du connecteur $daconn = instantiate_connecteur_out($connector_id); if (!$daconn) { list_connectors_out(); break; } $source_object = $daconn->instantiate_source_class($new_source_id); //Mise à jour $source_object->update_config_from_form(); $source_object->commit_to_db(); } else { //Modification d'une existante if (!$connector_id || !$id) { list_connectors_out();