function get_config_form() { global $charset; $result = parent::get_config_form(); //Adresse d'utilisation $result .= "\n\t\t<div class=row>\n\t\t\t<label class='etiquette'>" . $this->msg['openurl_service_endpoint'] . "</label><br />"; if ($this->id) { $result .= "<a target='_blank' href='" . $pmb_url_base . "ws/connector_out.php?source_id=" . $this->id . "'>" . $pmb_url_base . "ws/connector_out.php?source_id=" . $this->id . "</a>"; } else { $result .= $this->msg["openurl_service_endpoint_unrecorded"]; } $result .= "\n\t\t</div>\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<div class='colonne3'>\n\t\t\t\t<label for='mode'>" . $this->msg['openurl_mode'] . "</label>\n\t\t\t</div>\n\t\t\t<div class='colonne-suite'>\n\t\t\t\t<span>" . $this->msg['openurl_mode_requeteur'] . " <input type='radio' name='mode' value='requeteur' " . ($this->config["mode"] == "requeteur" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t\t\t<span>" . $this->msg['openurl_mode_byref'] . " <input type='radio' name='mode' value='byref' " . ($this->config["mode"] == "byref" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t\t</div>\n\t\t\t<div class='colonne3'>\n\t\t\t\t<label for='serialization'>" . $this->msg['openurl_serialization'] . "</label>\n\t\t\t</div>\n\t\t\t<div class='colonne-suite'>\n\t\t\t\t<span>" . $this->msg['openurl_serialization_kev'] . " <input type='radio' name='serialization' value='kev' " . ($this->config["serialization"] == "kev" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t\t\t<span>" . $this->msg['openurl_serialization_xml'] . " <input type='radio' name='serialization' value='xml' " . ($this->config["serialization"] == "xml" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t\t</div>\n\t\t</div>"; return $result; }
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 get_config_form() { global $charset, $dbh; $result = parent::get_config_form(); //Repository Name $result .= '<div class="row"><label class="etiquette" for="repo_name">' . $this->msg["repository_name"] . '</label><br />'; $result .= '<input id="repo_name" name="repo_name" type="text" value="' . htmlentities($this->repository_name, ENT_QUOTES, $charset) . '" class="saisie-80em" /></div>'; //Admin Email $result .= '<div class="row"><label class="etiquette" for="admin_email">' . $this->msg["admin_email"] . '</label><br />'; $result .= '<input id="admin_email" name="admin_email" type="text" value="' . htmlentities($this->admin_email, ENT_QUOTES, $charset) . '" class="saisie-80em" /></div>'; //repositoryIdentifier $result .= '<div class="row"><label class="etiquette" for="repositoryIdentifier">' . $this->msg["repositoryIdentifier"] . '</label><br />'; $result .= '<input id="repositoryIdentifier" name="repositoryIdentifier" type="text" value="' . htmlentities($this->repositoryIdentifier, ENT_QUOTES, $charset) . '" class="saisie-80em" /></div>'; //baseURL $disable_baseurl_fields = $this->id ? "" : "DISABLED"; $default_base_url = curPageBaseURL(); $default_base_url = substr($default_base_url, 0, strrpos($default_base_url, '/') + 1); $default_base_url .= 'ws/connector_out.php?source_id=' . $this->id; if (!$this->baseURL) { $basee = $default_base_url; } else { $basee = $this->baseURL; } $result .= '<div class="row"><label class="etiquette" for="baseURL">' . $this->msg["baseURL"] . '</label><br />'; if (!$this->id) { $result .= $this->msg['baseURL_sourceadd'] . '<br />'; } $result .= '<input ' . $disable_baseurl_fields . ' id="baseURL" name="baseURL" type="text" value="' . htmlentities($basee, ENT_QUOTES, $charset) . '" class="saisie-80em" />'; if ($this->id) { $result .= '<input ' . $disable_baseurl_fields . ' type="button" value="' . $this->msg["baseURL_default"] . '" class="bouton" onclick="document.getElementById(\'baseURL\').value=\'' . htmlentities($default_base_url, ENT_QUOTES, $charset) . '\'" />'; } $result .= '</div>'; //Included sets $included_sets = '<select MULTIPLE name="included_sets[]">'; $included_sets .= '<option value="">' . htmlentities($this->msg["set_none"], ENT_QUOTES, $charset) . '</option>'; $sets = new connector_out_sets(); foreach ($sets->sets as &$aset) { if (!in_array($aset->type, $this->allowed_set_types)) { continue; } $included_sets .= '<option ' . (in_array($aset->id, $this->included_sets) ? 'selected' : '') . ' value="' . $aset->id . '">' . htmlentities($aset->caption, ENT_QUOTES, $charset) . '</option>'; } $included_sets .= '</select>'; $result .= '<div class="row"><label class="etiquette" for="included_sets">' . $this->msg["included_sets"] . '</label><br />'; $result .= $included_sets; $result .= '</div>'; //Nombre de résultats par requete $result .= '<div class="row"><label class="etiquette" for="chunksize">' . $this->msg["chunksize"] . '</label><br />'; $result .= '<input id="chunksize" name="chunksize" type="text" value="' . htmlentities($this->chunksize, ENT_QUOTES, $charset) . '" class="saisie-40em" /></div>'; //Nombre de résultats par requete $result .= '<div class="row"><label class="etiquette">' . $this->msg["builtin_formats"] . '</label><br />'; $result .= 'Dublin Core, PMB XML Unimarc</div>'; //Formats de conversion admin/convert autorisé $admin_convert_catalog = external_services_converter_notices::get_export_possibilities(); $admin_convert_select = '<select id="allowed_admin_convert_paths" multiple name="allowed_admin_convert_paths[]">'; foreach ($admin_convert_catalog as $aconversion) { $admin_convert_select .= '<option ' . (in_array($aconversion["path"], $this->allowed_admin_convert_paths) ? 'selected' : '') . ' value="' . $aconversion["path"] . '">' . htmlentities($aconversion["caption"], ENT_QUOTES, $charset) . '</option>'; } $admin_convert_select .= '</select>'; $result .= '<div class="row"><label class="etiquette" for="allowed_admin_convert_paths">' . $this->msg["allowed_admin_convert_paths"] . '</label><br />'; $result .= $admin_convert_select; $result .= '</div>'; //feuille XSLT personnalisée $result .= "<div class='row'><label for='feuille_xslt'>" . $this->msg['feuille_xslt'] . "</label><br />"; $result .= "<input type='file' name='feuille_xslt'/>"; if ($this->config['feuille_xslt']) { $result .= "<div class='row'><br /> <i>" . htmlentities($this->config['feuille_xslt_name'], ENT_QUOTES, $charset) . "</i> <input type='checkbox' name='suppr_feuille_xslt' value='1' /> " . $this->msg['suppr_feuille_xslt'] . "</div>"; } $result .= "</div><div class='row'> </div>"; //Token life duration $result .= '<div class="row"><label class="etiquette" for="token_lifeduration">' . $this->msg["token_lifeduration"] . '</label><br />'; $result .= '<input id="token_lifeduration" name="token_lifeduration" type="text" value="' . htmlentities($this->token_lifeduration, ENT_QUOTES, $charset) . '" class="saisie-40em" /></div>'; //Allow GZIP Compression $result .= '<div class=row><input id="allow_gzip_compression" ' . ($this->allow_gzip_compression ? 'checked' : '') . ' name="allow_gzip_compression" type="checkbox" />' . '<label class="etiquette" for="allow_gzip_compression">' . $this->msg["allow_gzip_compression"] . '</label><br />'; $result .= '</div>'; //Cache complete records $result .= '<div class="row"><input onchange="document.getElementById(\'cache_complete_records_seconds\').disabled = !document.getElementById(\'cache_complete_records\').checked;" id="cache_complete_records" ' . ($this->cache_complete_records ? 'checked' : '') . ' name="cache_complete_records" type="checkbox" />' . '<label class="etiquette" for="cache_complete_records">' . $this->msg["cache_complete_records"] . '</label><br />'; $result .= '</div>'; //Record cache duration (seconds) $result .= '<blockquote><div class="row"><label class="etiquette" for="cache_complete_records_seconds">' . $this->msg["cache_complete_records_seconds"] . '</label><br />'; $result .= '<input ' . ($this->cache_complete_records ? '' : 'disabled') . ' id="cache_complete_records_seconds" name="cache_complete_records_seconds" type="text" value="' . htmlentities($this->cache_complete_records_seconds, ENT_QUOTES, $charset) . '" class="saisie-40em" /></div></blockquote><br />'; //Link Status to deletion $result .= '<div class="row"><input onchange="document.getElementById(\'linked_status_to_deletion\').disabled = !document.getElementById(\'link_status_to_deletion\').checked;" id="link_status_to_deletion" ' . ($this->link_status_to_deletion ? 'checked' : '') . ' name="link_status_to_deletion" type="checkbox" />' . '<label class="etiquette" for="link_status_to_deletion">' . $this->msg["link_status_to_deletion"] . '</label><br />'; $result .= '</div>'; //Linked Status to deletion $notice_statut_select = '<select ' . ($this->link_status_to_deletion ? '' : 'disabled') . ' id="linked_status_to_deletion" name="linked_status_to_deletion">'; $sql = "SELECT id_notice_statut, gestion_libelle FROM notice_statut"; $res = pmb_mysql_query($sql, $dbh); while ($row = pmb_mysql_fetch_assoc($res)) { $notice_statut_select .= '<option ' . ($this->linked_status_to_deletion == $row["id_notice_statut"] ? "selected" : '') . ' value="' . $row["id_notice_statut"] . '">' . htmlentities($row["gestion_libelle"], ENT_QUOTES, $charset) . '</option>'; } $notice_statut_select .= '</select>'; $result .= '<blockquote><div class="row"><label class="etiquette" for="linked_status_to_deletion">' . $this->msg["linked_status_to_deletion"] . '</label><br />'; $result .= $notice_statut_select; $result .= '</div></blockquote><br/>'; // Deletion management $result .= '<div class="row"><label class="etiquette">' . $this->msg['deletion_management'] . ' ' . $this->msg['if_none_status_to_deletion'] . '</label><br/>'; $result .= '<input type="radio" id="deletion_management_none" value="0" name="deletion_management" onChange="document.getElementById(\'deletion_management_transient_duration\').disabled = !document.getElementById(\'deletion_management_transient\').checked" ' . ($this->deletion_management == 0 ? 'checked' : '') . '/> <label class="etiquette" for="deletion_management_none">' . $this->msg['deletion_management_none'] . '</label> '; $result .= '<input type="radio" id="deletion_management_transient" value="1" name="deletion_management" onChange="document.getElementById(\'deletion_management_transient_duration\').disabled = !document.getElementById(\'deletion_management_transient\').checked" ' . ($this->deletion_management == 1 ? 'checked' : '') . '/> <label class="etiquette" for="deletion_management_transient">' . $this->msg['deletion_management_transient'] . '</label>, '; $result .= '<label class="etiquette" for="deletion_management_transient_duration">' . $this->msg['deletion_management_transient_duration'] . '</label> <input ' . ($this->deletion_management != 1 ? 'disabled' : '') . ' type="text" id="deletion_management_transient_duration" value="' . htmlentities($this->deletion_management_transient_duration, ENT_QUOTES, $charset) . '" name="deletion_management_transient_duration"/> '; $result .= '<input type="radio" id="deletion_management_persistent" value="2" name="deletion_management" onChange="document.getElementById(\'deletion_management_transient_duration\').disabled = !document.getElementById(\'deletion_management_transient\').checked" ' . ($this->deletion_management == 2 ? 'checked' : '') . '/> <label class="etiquette" for="deletion_management_persistent">' . $this->msg['deletion_management_persistent'] . '</label> '; $result .= '<div><br/>'; //Include items $result .= '<div class="row"><input id="include_items" ' . ($this->include_items ? 'checked=checked' : '') . ' name="include_items" type="checkbox" />' . '<label class="etiquette" for="include_items">' . $this->msg["include_items"] . '</label><br />'; $result .= '</div>'; //Include links global $include_path, $class_path, $msg, $form_param, $include_links; require_once $class_path . '/export_param.class.php'; $include_links = $this->include_links; $e_param = new export_param(EXP_OAI_CONTEXT); $result .= $e_param->check_default_param(); return $result; }
function get_config_form() { global $charset, $msg, $dbh; global $thesaurus_default; global $base_path; if (!$this->config['used_thesaurus']) { $this->config['used_thesaurus'] = $thesaurus_default; } if (!$this->config['base_uri']) { $this->config['base_uri'] = "/"; } if (!$this->config['tree']) { $this->config['tree'] = array(); } if (!$this->config['restricted_empr_write_permission']) { $this->config['restricted_empr_write_permission'] = array(); } if (!$this->config['restricted_user_write_permission']) { $this->config['restricted_user_write_permission'] = array(); } if (!$this->config['metasMapper_class']) { $this->config['metasMapper_class'] = ""; } if (!$this->config['upload_rep']) { global $PMBuserid; $query = "select deflt_upload_repertoire from users where userid = " . $PMBuserid; $result = pmb_mysql_query($query); if (pmb_mysql_num_rows($result)) { $this->config['upload_rep'] = pmb_mysql_result($result, 0, 0); } else { $this->config['upload_rep'] = 0; } } $result = parent::get_config_form(); //Included sets $result .= "\n\t\t\t<div class='row'>\n\t\t\t\t<label for='base_uri'>" . htmlentities($this->msg['webdav_base_uri'], ENT_QUOTES, $charset) . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t<input type='text' name='base_uri' value='" . htmlentities($this->config['base_uri'], ENT_QUOTES, $charset) . "'/>\n\t\t\t</div>\n\t\t\t<div class='row'> </div>\n\t\t\t<div class='row'>\n\t\t\t\t<label for='base_uri'>" . htmlentities($this->msg['webdav_allow_web'], ENT_QUOTES, $charset) . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t" . htmlentities($this->msg['webdav_yes'], ENT_QUOTES, $charset) . " <input type='radio' name='allow_web' value='1' " . ($this->config['allow_web'] == 1 ? "checked='checked'" : "") . "/> \n\t\t\t\t" . htmlentities($this->msg['webdav_no'], ENT_QUOTES, $charset) . " <input type='radio' name='allow_web' value='0' " . ($this->config['allow_web'] == 0 ? "checked='checked'" : "") . "/>\n\t\t\t\t\t\t</div>\n\t\t\t<div class='row'> </div>\n\t\t\t<div class='row'>\n\t\t\t\t<label for='authentication'>" . htmlentities($this->msg['webdav_authentication'], ENT_QUOTES, $charset) . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t<select name='authentication'>\n\t\t\t\t\t<option value='anonymous' " . ($this->config['authentication'] == "anonymous" ? "selected='selected'" : "") . ">" . htmlentities($this->msg['webdav_anonymous'], ENT_QUOTES, $charset) . "</option>\n\t\t\t\t\t<option value='gestion' " . ($this->config['authentication'] == "gestion" ? "selected='selected'" : "") . ">" . htmlentities($this->msg['webdav_authenticate_gest'], ENT_QUOTES, $charset) . "</option>\n\t\t\t\t\t<option value='opac' " . ($this->config['authentication'] == "opac" ? "selected='selected'" : "") . ">" . htmlentities($this->msg['webdav_authenticate_opac'], ENT_QUOTES, $charset) . "</option>\n\t\t\t\t</select>\n\t\t\t</div>\n\t\t\t<div class='row'> </div>\n\t\t\t<div class='row'>\n\t\t\t\t<label for='write_permission'>" . htmlentities($this->msg['webdav_write_permission'], ENT_QUOTES, $charset) . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t" . htmlentities($this->msg['webdav_yes'], ENT_QUOTES, $charset) . " <input type='radio' name='write_permission' value='1' " . ($this->config['write_permission'] == 1 ? "checked='checked'" : "") . "/> \n\t\t\t\t" . htmlentities($this->msg['webdav_no'], ENT_QUOTES, $charset) . " <input type='radio' name='write_permission' value='0' " . ($this->config['write_permission'] == 0 ? "checked='checked'" : "") . "/>\n\t\t\t</div>\n\t\t\t<div class='row'> </div>\n\t\t\t<div class='row'>\n\t\t\t\t<label for='restricted_write_permission'>" . htmlentities($this->msg['webdav_restricted_write_permission'], ENT_QUOTES, $charset) . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'> </div>\n\t\t\t<div class='row'>"; //groupes d'utilisateurs $result .= "\n\t\t\t\t<div class='colonne2'>\n\t\t\t\t\t<label for='restricted_write_permission'>" . htmlentities($this->msg['webdav_restricted_user_write_permission'], ENT_QUOTES, $charset) . "</label><br />"; $query = "SELECT grp_id, grp_name FROM users_groups ORDER BY grp_name "; $res = pmb_mysql_query($query); if (pmb_mysql_num_rows($res) > 0) { $result .= "\n\t\t\t\t<select id='restricted_user_write_permission' name='restricted_user_write_permission[]' multiple>"; while ($obj = pmb_mysql_fetch_object($res)) { $result .= "\n\t\t\t\t\t<option value='" . $obj->grp_id . "' " . (in_array($obj->grp_id, $this->config['restricted_user_write_permission']) ? "selected=selected" : "") . ">" . htmlentities($obj->grp_name, ENT_QUOTES, $charset) . "</option>"; } $result .= " or id_noeud in (select id_noeud from noeuds where num_parent=" . $this->categ->id . "))\n\t\t\t\t\t</select>"; } $result .= "\n\t\t\t\t</div>"; $result .= "\n\t\t\t\t<div class='colonne-suite'>\n\t\t\t\t\t<label for='restricted_write_permission'>" . htmlentities($this->msg['webdav_restricted_empr_write_permission'], ENT_QUOTES, $charset) . "</label><br />"; //catégories de lecteurs $requete = "SELECT id_categ_empr, libelle FROM empr_categ ORDER BY libelle "; $res = pmb_mysql_query($requete); if (pmb_mysql_num_rows($res) > 0) { $result .= "\n\t\t\t\t<select id='restricted_empr_write_permission' name='restricted_empr_write_permission[]' multiple>"; while ($obj = pmb_mysql_fetch_object($res)) { $result .= "\n\t\t\t\t\t<option value='" . $obj->id_categ_empr . "' " . (in_array($obj->id_categ_empr, $this->config['restricted_empr_write_permission']) ? "selected=selected" : "") . ">" . htmlentities($obj->libelle, ENT_QUOTES, $charset) . "</option>"; } $result .= "\n\t\t\t\t\t</select>"; } $result .= "\t\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class='row'> </div>\n\t\t\t<div class='row'>\n\t\t\t\t<label for='included_sets'>" . htmlentities($this->msg['webdav_restricted_sets'], ENT_QUOTES, $charset) . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t<select MULTIPLE name='included_sets[]'>"; $sets = new connector_out_sets(); foreach ($sets->sets as &$aset) { $result .= "\n\t\t\t\t\t<option " . (in_array($aset->id, $this->included_sets) ? "selected" : "") . " value='" . $aset->id . "'>" . htmlentities($aset->caption, ENT_QUOTES, $charset) . "</option>"; } $result .= "\n\t\t\t\t</select>\n\t\t\t</div>\n\t\t\t<div class='row'> </div>\n\t\t\t<div class='row'>\n\t\t\t\t<label for='used_thesaurus'>" . htmlentities($this->msg['webdav_user_thesaurus'], ENT_QUOTES, $charset) . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t<select name='used_thesaurus'>"; $liste_thesaurus = thesaurus::getThesaurusList(); foreach ($liste_thesaurus as $id_thesaurus => $libelle_thesaurus) { $result .= "\n\t\t\t\t\t<option value='" . $id_thesaurus . "' " . ($id_thesaurus == $this->config['used_thesaurus'] ? "selected='selected'" : "") . ">" . htmlentities($libelle_thesaurus, ENT_QUOTES, $charset) . "</option>"; } $result .= "\n\t\t\t\t</select>\n\t\t\t</div>\n\t\t\t<div class='row'> </div>\n\t\t\t<div class='row'>\n\t\t\t\t<label for='only_with_notices'>" . htmlentities($this->msg['webdav_only_with_notices'], ENT_QUOTES, $charset) . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t" . $this->msg['webdav_yes'] . " <input type='radio' value='1' name='only_with_notices' " . ($this->config['only_with_notices'] ? "checked='checked'" : "") . "/>\n\t\t\t\t" . $this->msg['webdav_no'] . " <input type='radio' value='0' name='only_with_notices' " . ($this->config['only_with_notices'] ? "" : "checked='checked'") . "/> \n\t\t\t</div>"; $result .= "\n\t\t\t<div class='row'> </div>\n\t\t\t<div class='row'>\n\t\t\t\t<label for='tree'>" . htmlentities($this->msg['webdav_tree'], ENT_QUOTES, $charset) . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t<select name='tree_elem' id='select_tree_elem' onchange='load_tree_elem(this.value)'>\n\t\t\t\t\t<option value='0'>" . htmlentities($this->msg['webdav_select_tree_elem'], ENT_QUOTES, $charset) . "</option>\n\t\t\t\t\t<option value='typdoc'>typdoc</option>\n\t\t\t\t\t<option value='statut'>statut</option>\n\t\t\t\t\t<option value='categorie'>categorie</option>\n\t\t\t\t\t<option value='indexint'>indexint</option>\n\t\t\t\t</select><br />\n\t\t\t\t<table id='tree'>"; foreach ($this->config['tree'] as $pos => $elem) { $result .= "\n\t\t\t\t\t<tr id='tree_elem_tr" . $pos . "'>\n\t\t\t\t\t\t<td recept='yes' recepttype='tree_elem' highlight='tree_elem_show_recept' downlight='tree_elem_hide_recept' id='tree_elem_td" . $pos . "' draggable='yes' callback_after='move_tree_elem' dragtype='tree_elem' dragicon='{$base_path}/images/icone_drag_notice.png' dragtext='" . $elem . "'>\n\t\t\t\t\t\t\t<input type='hidden' name='tree[]' value='" . $elem . "' />\n\t\t\t\t\t\t\t<img src='{$base_path}/images/sort.png' style='width:12px; vertical-align:middle'/>" . $elem . "</td>\n\t\t\t\t\t\t<td onclick='tree_elem_delete(\"tree_elem_tr" . $pos . "\");'><img src=\"{$base_path}/images/trash.png\" /></td>\n\t\t\t\t\t</tr>"; } $result .= "\n\t\t\t\t</table>\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\tvar nb_tree_elems = " . count($this->config['tree']) . ";\n\t\t\t\t\tfunction load_tree_elem(elem){\n\t\t\t\t\t\tif(elem){\n\t\t\t\t\t\t\tvar tr = document.createElement('tr');\n\t\t\t\t\t\t\tdocument.getElementById('tree').appendChild(tr);\n\t\t\t\t\t\t\ttr.setAttribute('id','tree_elem_tr'+nb_tree_elems);\n\t\t\t\t\t\t\tvar td = document.createElement('td');\t\n\t\t\t\t\t\t\ttd.setAttribute('recept','yes');\n\t\t\t\t\t\t\ttd.setAttribute('recepttype','tree_elem');\n\t\t\t\t\t\t\ttd.setAttribute('highlight','tree_elem_show_recept');\n\t\t\t\t\t\t\ttd.setAttribute('downlight','tree_elem_hide_recept');\n\t\t\t\t\t\t\ttd.setAttribute('id','tree_elem_td'+nb_tree_elems);\n\t\t\t\t\t\t\ttd.setAttribute('draggable','yes');\n\t\t\t\t\t\t\ttd.setAttribute('callback_after','move_tree_elem');\n\t\t\t\t\t\t\ttd.setAttribute('dragtype','tree_elem');\n\t\t\t\t\t\t\ttd.setAttribute('dragicon','{$base_path}/images/icone_drag_notice.png');\n\t\t\t\t\t\t\ttd.setAttribute('dragtext',elem);\n\t\t\t\t\t\t\ttd.innerHTML = '<input type=\"hidden\" name=\"tree[]\" value=\"'+elem+'\" /> <img src=\"{$base_path}/images/sort.png\" style=\"width:12px; vertical-align:middle\"/>'+elem;\n\t\t\t\t\t\t\ttr.appendChild(td);\n\t\t\t\t\t\t\tvar td = document.createElement('td');\t\n\t\t\t\t\t\t\ttd.setAttribute('onclick','tree_elem_delete(\"tree_elem_tr'+nb_tree_elems+'\")');\n\t\t\t\t\t\t\ttd.innerHTML = '<img src=\"{$base_path}/images/trash.png\" />';\n\t\t\t\t\t\t\ttr.appendChild(td);\n\t\t\t\t\t\t\tnb_tree_elems++;\n\t\t\t\t\t\t\tinit_drag();\n\t\t\t\t\t\t\tdocument.getElementById('select_tree_elem').selectedIndex=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfunction move_tree_elem(elem,evt,target){\n\t\t\t\t\t\n\t\t\t\t\t\tif(target != 'false' || target != 'null'){\n\t\t\t\t\t\t\telem = elem.parentNode;\n\t\t\t\t\t\t\ttarget = document.getElementById(target).parentNode;\n\t\t\t\t\t\t\tparent = target.parentNode;\n\t\t\t\t\t\t\tparent.insertBefore(elem,target);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfunction tree_elem_show_recept(obj){\n\t\t\t\t\t\tobj.style.background='#DDD';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfunction tree_elem_hide_recept(obj){\n\t\t\t\t\t\tobj.style.background='';\n\t\t\t\t\t} \n\t\t\t\t\t\n\t\t\t\t\tfunction tree_elem_delete(id){\n\t\t\t\t\t\tdocument.getElementById(id).parentNode.removeChild(document.getElementById(id));\n\t\t\t\t\t}\n\t\t\t\t</script>\n\t\t\t</div>\n\t\t\t<div class='row'> </div>\n\t\t\t<div class='row'>\n\t\t\t\t<label for='default_statut'>" . htmlentities($this->msg['webdav_metasMapper_class'], ENT_QUOTES, $charset) . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\t\t\n\t\t\t\t<input type='text' name='metasMapper_class' value='" . htmlentities($this->config['metasMapper_class'], ENT_QUOTES, $charset) . "'/>\n\t\t\t</div>\n\t\t\t<div class='row'> </div>\n\t\t\t<div class='row'>\n\t\t\t\t<label for='default_statut'>" . htmlentities($this->msg['webdav_default_statut'], ENT_QUOTES, $charset) . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>"; $query = "select id_notice_statut, gestion_libelle from notice_statut order by gestion_libelle"; $res = pmb_mysql_query($query); if (pmb_mysql_num_rows($res)) { $result .= "\n\t\t\t\t<select name='default_statut'>"; while ($row = pmb_mysql_fetch_object($res)) { $result .= "\n\t\t\t\t\t<option value='" . $row->id_notice_statut . "'" . ($row->id_notice_statut == $this->config['default_statut'] ? "selected='selected'" : "") . ">" . htmlentities($row->gestion_libelle, ENT_QUOTES, $charset) . "</option>"; } $result .= "\n\t\t\t\t</select>"; } $result .= "\t\t\t\t\n\t\t\t</div>\n\t\t\t<div class='row'> </div>\n\t\t\t<script src=\"./javascript/select.js\" type='text/javascript'></script>\n\t\t\t<script src=\"./javascript/upload.js\" type='text/javascript'></script>"; //Intégration de la gestion de l'interface de l'upload //statut docunum $result .= "\n\t\t\t<div class='row'>\n\t\t\t\t<label for='default_docnum_statut'>" . htmlentities($this->msg['webdav_default_docnum_statut'], ENT_QUOTES, $charset) . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>"; $query = "select id_explnum_statut, gestion_libelle from explnum_statut order by gestion_libelle"; $res = pmb_mysql_query($query); if (pmb_mysql_num_rows($res)) { $result .= "\n\t\t\t\t<select name='default_docnum_statut'>"; while ($row = pmb_mysql_fetch_object($res)) { $result .= "\n\t\t\t\t\t<option value='" . $row->id_explnum_statut . "'" . ($row->id_explnum_statut == $this->config['default_docnum_statut'] ? "selected='selected'" : "") . ">" . htmlentities($row->gestion_libelle, ENT_QUOTES, $charset) . "</option>"; } $result .= "\n\t\t\t\t</select>"; } $result .= "\n\t\t\t</div>"; global $pmb_docnum_in_database_allow, $pmb_docnum_in_directory_allow; $result .= "<div class='row'>"; if ($pmb_docnum_in_database_allow) { $result .= "<input type='radio' name='up_place' id='base' value='0' !!check_base!! /> <label for='base'>" . $msg['upload_repertoire_sql'] . "</label>"; } if ($pmb_docnum_in_directory_allow) { $result .= "<input type='radio' name='up_place' id='upload' value='1' !!check_up!! /> <label for='upload'>" . $msg['upload_repertoire_server'] . "</label>"; $req = "select repertoire_id, repertoire_nom from upload_repertoire order by repertoire_nom"; $res = pmb_mysql_query($req); if (pmb_mysql_num_rows($res)) { $result .= " \n\t\t\t\t\t\t<select name='id_rep'>"; while ($row = pmb_mysql_fetch_object($res)) { $result .= "\n\t\t\t\t\t\t\t<option value='" . $row->repertoire_id . "' " . ($row->repertoire_id == $this->config['upload_rep'] ? "selected='selected'" : "") . ">" . htmlentities($row->repertoire_nom, ENT_QUOTES, $charset) . "</option>"; } $result .= " \n\t\t\t\t\t\t</select>"; } } if ($pmb_docnum_in_directory_allow && $this->config['up_place']) { $result = str_replace('!!check_base!!', '', $result); $result = str_replace('!!check_up!!', "checked='checked'", $result); } else { if ($pmb_docnum_in_database_allow) { $result = str_replace('!!check_up!!', '', $result); $result = str_replace('!!check_base!!', "checked='checked'", $result); } } $result .= "</div>"; return $result; }
function get_config_form() { global $charset, $dbh, $pmb_url_base; $result = parent::get_config_form(); //on attributs/initialise certaines valeurs par défaut if (!$this->config['activeTabs']) { $this->config['activeTabs'] = array(); } if (!$this->config['shelf_nbResultsByPage']) { $this->config['shelf_nbResultsByPage'] = 20; } if (!$this->config['search_nbResultsByPage']) { $this->config['search_nbResultsByPage'] = 20; } if (!$this->config['bulletinsList_nbResultsByPage']) { $this->config['bulletinsList_nbResultsByPage'] = 10; } if (!$this->config['analysisList_nbResultsByPage']) { $this->config['analysisList_nbResultsByPage'] = 10; } //Adresse d'utilisation $result .= "<div class=row><label class='etiquette' for='api_exported_functions'>" . $this->msg['mobile_service_endpoint'] . "</label><br />"; if ($this->id) { $result .= "<a target='_blank' href='" . $pmb_url_base . "ws/connector_out.php?source_id=" . $this->id . "'>" . $pmb_url_base . "ws/connector_out.php?source_id=" . $this->id . "</a>"; } else { $result .= $this->msg["mobile_service_endpoint_unrecorded"]; } $result .= "</div>"; //Connecteur dédié $connecteurs = new connecteurs_out(); foreach ($connecteurs->connectors as $conn) { if ($conn->name == 'JSON-RPC') { $sources = $conn->sources; } } //on génère l'affichage du sélecteur $proxyIsInList = false; if (sizeof($sources) == 0) { $selectWS = $this->msg['mobile_admin_error_proxy']; } else { $selectWS = "<select name='proxyUrl'>"; foreach ($sources as $source) { if ($this->config['proxyUrl'] == $pmb_url_base . "ws/connector_out.php?source_id=" . $source->id) { $proxyIsInList = true; } $selectWS .= "<option value='" . $pmb_url_base . "ws/connector_out.php?source_id=" . $source->id . "'" . ($this->config['proxyUrl'] == $pmb_url_base . "ws/connector_out.php?source_id=" . $source->id ? " selected" : "") . ">" . $source->name . "</option>"; } $selectWS .= "</select>"; } //maintenant l'entrée manuelle... $writeWS = "<input type='text' id='proxyUrl' name='proxyUrl' value='" . $this->config['proxyUrl'] . "' />"; $result .= "\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='proxyUrl'>" . $this->msg['mobile_admin_proxyUrl'] . "</label><br />\n\t\t\t" . $this->msg['mobile_admin_pickWSInList_yes'] . "\n\t\t\t <input type='radio' name='pickWSInList' value='yes' " . ($proxyIsInList == true ? "checked='checked'" : "") . " onchange='switchWSMethod();'/>\n\t\t\t " . $this->msg['mobile_admin_pickWSInList_no'] . "\t\t\t\n\t\t\t <input type='radio' name='pickWSInList' value='no' " . ($proxyIsInList == true ? "" : "checked='checked'") . " onchange='switchWSMethod();' /><br /><br />\n\t\t\t<div id='selectWS'></div>\n\t\t\t"; $result .= "\n\t\t</div>\n\t\t<div class='row'> </div>"; //Onglets dispo dans l'appli $result .= "\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' >" . $this->msg['mobile_admin_tabs_title'] . "</label><br />\n\t\t\t<div class='notice-child'>\n\t\t\t<table class='quadrille'>\n\t\t\t\t<tr>\n\t\t\t\t\t<th style='text-align:right;'>" . $this->msg['mobile_admin_form_tabs_label'] . "</th>\n\t\t\t\t\t<th style='text-align:center;' >" . $this->msg['mobile_admin_form_tabs_valid'] . "</th>\n\t\t\t\t\t<th style='text-align:center;'>" . $this->msg['mobile_admin_firstTab'] . "</th>\n\t\t\t\t\t<th style='text-align:left;'>" . $this->msg['mobile_admin_form_tabs_desc'] . "</th>\n\t\t\t\t\t\n\t\t\t\t</tr>"; $i = 0; $first_onglet_check = false; foreach ($this->onglets as $onglet => $value) { $check_first_onglet = ""; if ($this->config['firstTab'] && $this->config['activeTabs'][$this->config['firstTab']]) { if ($this->config['firstTab'] === $onglet) { $check_first_onglet = " checked "; $first_onglet_check = true; } } elseif (!$first_onglet_check) { $check_first_onglet = " checked "; } $result .= "\n\t\t\t\t<tr >\n\t\t\t\t\t<td style='text-align:right;'>" . $value['label'] . "</td>\n\t\t\t\t\t<td style='text-align:center;'>\n\t\t\t\t\t\t" . $this->msg['mobile_admin_form_tabs_yes'] . " \n\t\t\t\t\t\t<input type='radio' id='tab_" . $onglet . "_ok' name='{$onglet}' value='1'" . ($this->config['activeTabs'][$onglet] == 1 ? " checked " : " ") . "onchange='checkParam(\"{$onglet}\",false);' /> \n\t\t\t\t\t\t" . $this->msg['mobile_admin_form_tabs_no'] . " \n\t\t\t\t\t\t<input type='radio' id='tab_" . $onglet . "_ko' name='{$onglet}' value='0' " . ($this->config['activeTabs'][$onglet] == 0 ? " checked " : " ") . "onchange='checkParam(\"{$onglet}\",false);' />\n\t\t\t\t\t</td>\n\t\t\t\t\t<td style='text-align:center;'>\n\t\t\t\t\t\t<input type='radio' id='firstTab_{$onglet}' name='firstTab' value='{$onglet}' " . $check_first_onglet . "/>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td style='text-align:left;'>" . $value['desc'] . "</td>\n\t\t\t\t</tr>"; $i++; } $result .= "\n\t\t\t</table>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class='row'> </div>"; //param pour l'onglet 'Accueil' $form_infoPage = "\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='firstInfoPage'>" . $this->msg['mobile_admin_firstInfoPage'] . "</label><br />"; $requete = "select id_infopage as id, title_infopage as title from infopages where valid_infopage = 1 order by title DESC"; $res = mysql_query($requete); if (mysql_num_rows($res)) { $form_infoPage .= "\n\t\t\t<select id ='firstInfoPage' name='firstInfoPage'>"; while ($infopage = mysql_fetch_object($res)) { $form_infoPage .= "\n\t\t\t\t<option value='" . $infopage->id . "'" . ($this->config["firstInfoPage"] == $infopage->id ? " selected" : "") . ">" . $infopage->title . "</option>"; } $form_infoPage .= "\n\t\t\t</select>"; } else { $form_infoPage .= $this->msg['mobile_admin_error_infopage']; } $form_infoPage .= "\n\t\t</div>\n\t\t<div class='row'> </div>\n\t\t"; $result .= gen_plus("form_infoPage", $this->msg['mobile_admin_form_infoPagesTitle'], $form_infoPage) . "<div class='row'> </div>"; //param pour l'onglet 'Etagère coup de coeur' $form_shelf .= "\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='heartShelf'>" . $this->msg['mobile_admin_heatShelf'] . "</label><br />"; $etageres = etagere::get_etagere_list(); $etagere_valid = false; $select = "\n\t\t\t<select id='heartShelf' name='heartShelf'>"; foreach ($etageres as $etagere) { if ($etagere['validite'] == 1 && $etagere['visible_accueil'] == 1) { $select .= "\n\t\t\t\t<option value='" . $etagere['idetagere'] . "'" . ($this->config['heartShelf'] == $etagere['idetagere'] ? " selected" : "") . ">" . $etagere['name'] . "</option>"; $etagere_valid = true; } } $select .= "\n\t\t\t</select>"; if ($etagere_valid == true) { $form_shelf .= $select; } else { $form_shelf .= $this->msg['mobile_admin_error_etageres']; } $form_shelf .= "\n\t\t</div>\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='shelf_nbResultsByPage'>" . $this->msg['mobile_admin_nbResultsByPage'] . "</label><br />\n\t\t\t<input type='text' id='shelf_nbResultsByPage' name='shelf_nbResultsByPage' value='" . $this->config['shelf_nbResultsByPage'] . "' />\n\t\t</div>\n\t\t<div class='row'> </div>"; $result .= gen_plus("form_shelf", $this->msg['mobile_admin_form_shelfTitle'], $form_shelf) . "<div class='row'> </div>"; //param pour l'onglet 'Recherche Simple' $form_search = "\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='search_nbResultsByPage'>" . $this->msg['mobile_admin_nbResultsByPage'] . "</label><br />\n\t\t\t<input type='text' id='search_nbResultsByPage' name='search_nbResultsByPage' value='" . $this->config['search_nbResultsByPage'] . "' />\n\t\t</div>\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='allowTypDocFilter'>" . $this->msg["mobile_admin_form_search_allowSearchByTypeDoc"] . "</label><br />\n\t\t\t" . $this->msg['mobile_admin_form_search_allowSearchByTypeDoc_yes'] . " <input type='radio' id='allowTypDocFilter_yes' name='allowTypDocFilter' value='1' " . ($this->config["allowTypDocFilter"] == 1 ? " checked " : " ") . " /> \n\t\t\t" . $this->msg['mobile_admin_form_search_allowSearchByTypeDoc_no'] . " <input type='radio' id='allowTypDocFilter_no' name='allowTypDocFilter' value='0' " . ($this->config["allowTypDocFilter"] == 0 ? " checked " : " ") . "/>\n\t\t</div>\n\t\t<div class='row'> </div>"; $result .= gen_plus("form_search", $this->msg['mobile_admin_form_searchTitle'], $form_search) . "<div class='row'> </div>"; //param pour Mon Compte $form_myAccount = "\n\t\t<div class='row'> </div>\n\t\t<div class='row'> </div>"; $result .= gen_plus("form_myAccount", $this->msg['mobile_admin_form_myAccountTitle'], $form_myAccount) . "<div class='row'> </div>"; //param pour Pret Autonome $form_selfCheck = "\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='allowCheckIn'>" . $this->msg["mobile_admin_form_selfCheck_allowCheckIn"] . "</label><br />\n\t\t\t" . $this->msg['mobile_admin_form_selfCheck_allowCheckIn_yes'] . " <input type='radio' id='allowCheckIn_yes' name='allowCheckIn' value='1' " . ($this->config["allowCheckIn"] == 1 ? " checked " : " ") . " /> \n\t\t\t" . $this->msg['mobile_admin_form_selfCheck_allowCheckIn_no'] . " <input type='radio' id='allowCheckIn_no' name='allowCheckIn' value='0' " . ($this->config["allowCheckIn"] == 0 ? " checked " : " ") . "/>\n\t\t</div>\n\t\t<div class='row'> </div>"; $result .= gen_plus("form_selfCheck", $this->msg['mobile_admin_form_selfCheckTitle'], $form_selfCheck) . "<div class='row'> </div>"; //param d'affichage général $param_gen = "\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='bulletinsList_nbResultsByPage'>" . $this->msg['mobile_admin_form_bulletinsList_nbResultsByPage'] . "</label><br />\n\t\t\t<input type='text' id='bulletinsList_nbResultsByPage' name='bulletinsList_nbResultsByPage' value='" . $this->config['bulletinsList_nbResultsByPage'] . "' />\n\t\t</div>\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='analysisList_nbResultsByPage'>" . $this->msg['mobile_admin_form_analysisList_nbResultsByPage'] . "</label><br />\n\t\t\t<input type='text' id='analysisList_nbResultsByPage' name='analysisList_nbResultsByPage' value='" . $this->config['analysisList_nbResultsByPage'] . "' />\n\t\t</div>\n\t\t<div class='row'> </div>"; $result .= gen_plus("paramGen", $this->msg['mobile_admin_form_paramsGen'], $param_gen) . "<div class='row'> </div>"; $result .= "\n\t\t<script type='text/javascript' src='javascript/tablist.js'></script>\n\t\t<script type='text/javascript'>\n\t\t\t// on génère une fonction d'initialisation\n\t\t\tfunction init(){"; foreach ($this->onglets as $onglet => $value) { $result .= "\n\t\t\t\tswitchWSMethod();\n\t\t\t\tcheckParam('{$onglet}');\n\t\t\t\texpandBase('paramGen',true);\n\t\t\t"; } $result .= "\n\t\t\t}\n\n\t\t\tonload = init;\n\n\t\t\tfunction switchWSMethod(){\n\t\t\t\tif(document.form_connectorout.pickWSInList[0].checked){\n\t\t\t\t\tvar pickWSInList = document.form_connectorout.pickWSInList[0].value\n\t\t\t\t}else{\n\t\t\t\t\tvar pickWSInList = document.form_connectorout.pickWSInList[1].value\t\n\t\t\t\t}\n\t\t\t\tif (pickWSInList == 'yes'){\n\t\t\t\t\tdocument.getElementById('selectWS').innerHTML = \"{$selectWS}\";\n\t\t\t\t}else{\n\t\t\t\t\tdocument.getElementById('selectWS').innerHTML = \"{$writeWS}\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// on s'assure que l'application dispose bien d'une première page à la soumission du formulaire...\n\t\t\tdocument.forms['form_connectorout'].onsubmit = function(){\n\t\t\t\tfor(var i=0 ; i<document.forms['form_connectorout'].firstTab.length ; i++){\n\t\t\t\t\tif(document.forms['form_connectorout'].firstTab[i].checked == true)\n\t\t\t\t\treturn true;\n\t\t\t\t}"; foreach ($this->onglets as $onglet => $value) { $result .= "\n\t\t\t\tif(document.getElementById('tab_'+'{$onglet}'+'_ok').checked == true){\n\t\t\t\t\tdocument.getElementById('firstTab_{$onglet}').checked = true;\n\t\t\t\t\treturn true;\n\t\t\t\t}"; } $result .= "\t\n\t\t\t\talert('" . $this->msg['mobile_admin_form_needOneTab'] . "');\n\t\t\t\treturn false;\t\t\t\n\t\t\t}\n\n\t\t\tfunction checkParam(onglet){\n\t\t\t\tif(document.getElementById('tab_'+onglet+'_ok').checked == true){\n\t\t\t\t\tswitchParamValue('firstTab_'+onglet,'disabled','active');\n\t\t\t\t\tif(document.getElementById('form_'+onglet+'Child').style.display == 'none')\n\t\t\t\t\t\texpandBase('form_'+onglet,true);\n\t\t\t\t\tswitchParamsValues(onglet,'active');\n\t\t\t\t}else{\n\t\t\t\t\tswitchParamValue('firstTab_'+onglet,'disabled','inactive');\n\t\t\t\t\tdocument.getElementById('firstTab_'+onglet).checked = false;\n\t\t\t\t\tif(document.getElementById('form_'+onglet+'Child').style.display == 'block')\n\t\t\t\t\t\texpandBase('form_'+onglet,true);\n\t\t\t\t\tswitchParamsValues(onglet,'inactive');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction switchParamsValues(onglet,state){\n\t\t\t\tswitch (onglet){\n\t\t\t\t\tcase 'infoPage' :\n\t\t\t\t\t\tswitchParamValue('firstInfoPage','disabled',state);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'selfCheck' :\n\t\t\t\t\t\tswitchParamValue('allowCheckIn_yes','disabled',state);\n\t\t\t\t\t\tif(document.getElementById('allowCheckIn_yes').checked ==true)\n\t\t\t\t\t\t\tswitchParamValue('allowCheckIn_yes','checked',state);\n\t\t\t\t\t\tswitchParamValue('allowCheckIn_no','disabled',state);\n\t\t\t\t\t\tif(document.getElementById('allowCheckIn_no').checked ==true)\n\t\t\t\t\t\t\tswitchParamValue('allowCheckIn_no','checked',state);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'myAccount' :\n\t\t\t\t\t\tswitchParamValue('tab_selfCheck_ok','disabled',state);\n\t\t\t\t\t\tif(state == 'inactive')\n\t\t\t\t\t\t\tswitchParamValue('tab_selfCheck_ko','checked','active');\n\t\t\t\t\t\tcheckParam('selfCheck');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'search' :\n\t\t\t\t\t\tswitchParamValue('search_nbResultsByPage','disabled',state);\n\t\t\t\t\t\tswitchParamValue('allowTypDocFilter_yes','disabled',state);\n\t\t\t\t\t\tswitchParamValue('allowTypDocFilter_no','disabled',state);\n\t\t\t\t\t\tif(document.getElementById('allowTypDocFilter_no').checked ==true)\n\t\t\t\t\t\t\tswitchParamValue('allowTypDocFilter_no','checked',state);\n\t\t\t\t\t\tif(document.getElementById('allowTypDocFilter_yes').checked ==true)\n\t\t\t\t\t\t\tswitchParamValue('allowTypDocFilter_yes','checked',state);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'shelf':\n\t\t\t\t\t\tswitchParamValue('heartShelf','disabled',state);\n\t\t\t\t\t\tswitchParamValue('shelf_nbResultsByPage','disabled',state);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\n\t\t\tfunction switchParamValue(id,param,state){\n\t\t\t\tvar newState = false;\n\t\t\t\tif(state == 'active'){\n\t\t\t\t\tswitch(param){\n\t\t\t\t\t\tcase 'disabled' :\n\t\t\t\t\t\t\tnewState = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'checked' :\n\t\t\t\t\t\t\tnewState = true;\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}else if(state == 'inactive'){\n\t\t\t\t\tswitch(param){\n\t\t\t\t\t\tcase 'disabled' :\n\t\t\t\t\t\t\tnewState = true;\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'checked' :\n\t\t\t\t\t\t\tnewState = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tdocument.getElementById(id)[param] = newState;\n\t\t\t}\n\t\t</script>"; return $result; }
function get_config_form() { global $charset, $pmb_url_base, $_tableau_databases, $_libelle_databases; $result = parent::get_config_form(); if (!$this->id) { $this->config['pmb_ws_url'] = "http://...pmb/ws/connector_out.php?source_id=1"; $this->config['style_url'] = "styles/bibloto.css"; $this->config['checkout_activate'] = 1; $this->config['auto_checkout'] = 1; $this->config['checkin_activate'] = 1; $this->config['resa_activate'] = 0; $this->config['default_action'] = 1; $this->config['default_action_end'] = 1; $this->config['rfid_activate'] = 1; $this->config['rfid_driver'] = "3m"; $this->config['rfid_activate_empr'] = 1; $this->config['rfid_activate_expl'] = 1; $this->config['rfid_serveur_url'] = "http://*****:*****@!{{biblio.name}}!\n{{biblio.adr1}}\n{{biblio.town}}\n{{biblio.phone}}\n{{biblio.email}}\n\nImprimé le \n\nEmprunteur:\n{% for empr in empr_list %}\n {{empr.name}} {{empr.fistname}}\n{% endfor %}\n{% for expl in expl_list %}\n\n{{expl.tit}} \n {{expl.cb}}\n {{expl.location}} / {{expl.section}} / {{expl.cote}}\n Prêté le {{expl.date_pret}}. ! A retourné le{{expl.date_retour}} !\n ______________________________________\n{% endfor %}\nVA @"; $this->config['msg_checkout_button'] = "Prêt"; $this->config['msg_checkout_valid_button'] = "Valider"; $this->config['msg_checkin_button'] = "Retour"; $this->config['msg_resa_button'] = "Réservations"; $this->config['msg_exit_button'] = "Déconnexion"; $this->config['msg_action_title'] = "Prêts en cours"; $this->config['msg_checkout_title'] = "Prêts effectués"; $this->config['msg_checkin_title'] = "Retours effectués"; $this->config['msg_resa_title'] = "Réservations"; $this->config['msg_dialog_place_item_checkout'] = "Poser un document pour effectuer le prêt"; $this->config['msg_dialog_place_item_checkin'] = "Poser un document pour effectuer le retour"; $this->config['msg_dialog_too_many_items'] = "Il y a trop de documents !"; $this->config['msg_dialog_item_cb_unknown'] = "Ce document est inconnu"; $this->config['msg_dialog_checkout_possible'] = "Empruntable"; $this->config['msg_dialog_checkout_ok'] = "Prêt effectué"; $this->config['msg_dialog_checkout_no'] = "Vous ne pouvez pas emprunter ce document !"; $this->config['msg_dialog_checkin_ok'] = "Retour effectué"; $this->config['msg_dialog_checkin_no_checkout'] = "Ce document n'est pas en prêt"; $this->config['msg_dialog_antivol_error'] = "La commande d'antivol n'a pas répondue. Veuiller re-déposer le document !"; $this->config['msg_printer_exit'] = "Imprimer"; $this->config['msg_dialog_exit'] = "Terminer"; $this->config['timeout_disconnect'] = "60"; } /* <div class='row'> </div> <div class='row'> <label class='etiquette'>".$this->msg['bibloto_printer_activate']."</label><br /> <span>".$this->msg['bibloto_printer_activate_yes']." <input type='radio' name='printer_activate' value='1' ".($this->config["printer_activate"] == "1" ? "checked='checked' ": "")."style='vertical-align:bottom;' /></span> <span>".$this->msg['bibloto_printer_activate_no']." <input type='radio' name='printer_activate' value='0' ".(!$this->config["printer_activate"] ? "checked='checked' ": "")."style='vertical-align:bottom;' /></span> </div> <div class='row'> </div> <div class='row'> <label class='etiquette' for='printer_name'>".$this->msg['bibloto_printer_name']."</label><br /> <input type='text' id='printer_name' name='printer_name' value='".$this->config['printer_name']."' /> </div> <div class='row'> </div> <div class='row'> <label class='etiquette' for='printer_tpl'>".$this->msg['bibloto_printer_tpl']."</label><br /> <textarea id='printer_tpl' class='saisie-80em' wrap='virtual' rows='8' cols='62' name='printer_tpl'>".$this->config['printer_tpl']."</textarea> </div> */ //Adresse d'utilisation $result .= "<div class=row><label class='etiquette' for='api_exported_functions'>" . $this->msg['bibloto_service_endpoint'] . "</label><br />"; if ($this->id) { $result .= "<a target='_blank' href='" . $pmb_url_base . "ws/connector_out.php?source_id=" . $this->id . ""; $result .= count($_tableau_databases) > 1 ? "&database=" . $_libelle_databases[array_search(LOCATION, $_tableau_databases)] : ""; $result .= "'>" . $pmb_url_base . "ws/connector_out.php?source_id=" . $this->id . ""; $result .= count($_tableau_databases) > 1 ? "&database=" . $_libelle_databases[array_search(LOCATION, $_tableau_databases)] : ""; $result .= "</a>"; } else { $result .= $this->msg["bibloto_service_endpoint_unrecorded"]; } $result .= "</div>\t\t\t\t\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='pmb_ws_url'>" . $this->msg['bibloto_pmb_ws_url'] . "</label><br />\t\t\t\n\t\t\t<input type='text' class='saisie-80em' id='pmb_ws_url' name='pmb_ws_url' value='" . $this->config['pmb_ws_url'] . "' />\t\t\n\t\t</div>\t\t\t\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='style_url'>" . $this->msg['bibloto_style_url'] . "</label><br />\t\t\t\n\t\t\t<input type='text' class='saisie-80em' id='style_url' name='style_url' value='" . $this->config['style_url'] . "' />\t\t\n\t\t</div>\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette'>" . $this->msg['bibloto_checkout_activate'] . "</label><br />\t\t\t\n\t\t\t<span>" . $this->msg['bibloto_checkout_activate_yes'] . " <input type='radio' name='checkout_activate' value='1' " . ($this->config["checkout_activate"] == "1" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t\t<span>" . $this->msg['bibloto_checkout_activate_no'] . " <input type='radio' name='checkout_activate' value='0' " . (!$this->config["checkout_activate"] ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\t\n\t\t</div>\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette'>" . $this->msg['bibloto_auto_checkout'] . "</label><br />\t\t\t\n\t\t\t<span>" . $this->msg['bibloto_auto_checkout_yes'] . " <input type='radio' name='auto_checkout' value='1' " . ($this->config["auto_checkout"] == "1" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t\t<span>" . $this->msg['bibloto_auto_checkout_no'] . " <input type='radio' name='auto_checkout' value='0' " . (!$this->config["auto_checkout"] ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\t\n\t\t</div>\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette'>" . $this->msg['bibloto_checkin_activate'] . "</label><br />\t\t\t\n\t\t\t<span>" . $this->msg['bibloto_checkin_activate_yes'] . " <input type='radio' name='checkin_activate' value='1' " . ($this->config["checkin_activate"] == "1" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t\t<span>" . $this->msg['bibloto_checkin_activate_no'] . " <input type='radio' name='checkin_activate' value='0' " . (!$this->config["checkin_activate"] ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\t\n\t\t</div>\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette'>" . $this->msg['bibloto_resa_activate'] . "</label><br />\t\t\t\n\t\t\t<span>" . $this->msg['bibloto_resa_activate_yes'] . " <input type='radio' name='resa_activate' value='1' " . ($this->config["resa_activate"] == "1" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t\t<span>" . $this->msg['bibloto_resa_activate_no'] . " <input type='radio' name='resa_activate' value='0' " . (!$this->config["resa_activate"] ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\t\n\t\t</div>\t\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette'>" . $this->msg['bibloto_default_action'] . "</label><br />\t\t\t\n\t\t\t<span>" . $this->msg['bibloto_default_action_default'] . " <input type='radio' name='default_action' value='0' " . (!$this->config["default_action"] ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t\t<span>" . $this->msg['bibloto_default_action_checkout'] . " <input type='radio' name='default_action' value='1' " . ($this->config["default_action"] == "1" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\t\n\t\t\t<span>" . $this->msg['bibloto_default_action_checkin'] . " <input type='radio' name='default_action' value='2' " . ($this->config["default_action"] == "2" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t\t<span>" . $this->msg['bibloto_default_action_resa'] . " <input type='radio' name='default_action' value='3' " . ($this->config["default_action"] == "3" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t</div>\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette'>" . $this->msg['bibloto_default_action_end'] . "</label><br />\t\t\t\n\t\t\t<span>" . $this->msg['bibloto_default_action_default'] . " <input type='radio' name='default_action_end' value='0' " . (!$this->config["default_action_end"] ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t\t<span>" . $this->msg['bibloto_default_action_end_home'] . " <input type='radio' name='default_action_end' value='1' " . ($this->config["default_action_end"] == "1" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t</div>\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette'>" . $this->msg['bibloto_sound_activate'] . "</label><br />\t\t\t\n\t\t\t<span>" . $this->msg['bibloto_sound_activate_yes'] . " <input type='radio' name='sound_activate' value='1' " . ($this->config["sound_activate"] == "1" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t\t<span>" . $this->msg['bibloto_sound_activate_no'] . " <input type='radio' name='sound_activate' value='0' " . (!$this->config["sound_activate"] ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\t\n\t\t</div>\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette'>" . $this->msg['bibloto_rfid_activate'] . "</label><br />\t\t\t\n\t\t\t<span>" . $this->msg['bibloto_rfid_activate_yes'] . " <input type='radio' name='rfid_activate' value='1' " . ($this->config["rfid_activate"] == "1" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t\t<span>" . $this->msg['bibloto_rfid_activate_no'] . " <input type='radio' name='rfid_activate' value='0' " . (!$this->config["rfid_activate"] ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\t\n\t\t</div>\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette'>" . $this->msg['bibloto_rfid_activate_empr'] . "</label><br />\t\t\t\n\t\t\t<span>" . $this->msg['bibloto_rfid_activate_empr_yes'] . " <input type='radio' name='rfid_activate_empr' value='1' " . ($this->config["rfid_activate_empr"] == "1" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t\t<span>" . $this->msg['bibloto_rfid_activate_empr_no'] . " <input type='radio' name='rfid_activate_empr' value='0' " . (!$this->config["rfid_activate_empr"] ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\t\n\t\t</div>\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette'>" . $this->msg['bibloto_rfid_activate_expl'] . "</label><br />\t\t\t\n\t\t\t<span>" . $this->msg['bibloto_rfid_activate_expl_yes'] . " <input type='radio' name='rfid_activate_expl' value='1' " . ($this->config["rfid_activate_expl"] == "1" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t\t<span>" . $this->msg['bibloto_rfid_activate_expl_no'] . " <input type='radio' name='rfid_activate_expl' value='0' " . (!$this->config["rfid_activate_expl"] ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\t\n\t\t</div>\t\t\t\t\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='rfid_driver'>" . $this->msg['bibloto_rfid_driver'] . "</label><br />\t\t\t\n\t\t\t<input type='text' id='rfid_driver' name='rfid_driver' value='" . $this->config['rfid_driver'] . "' />\t\t\n\t\t</div>\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='rfid_serveur_url '>" . $this->msg['bibloto_rfid_serveur_url'] . "</label><br />\t\t\t\n\t\t\t<input type='text' class='saisie-80em' id='rfid_serveur_url' name='rfid_serveur_url' value='" . $this->config['rfid_serveur_url'] . "' />\t\t\n\t\t</div>\t\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='rfid_library_code'>" . $this->msg['bibloto_rfid_library_code'] . "</label><br />\t\t\t\n\t\t\t<input type='text' id='rfid_library_code' name='rfid_library_code' value='" . $this->config['rfid_library_code'] . "' />\t\t\n\t\t</div>\t\t\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='rfid_security_activate'>" . $this->msg['bibloto_rfid_security_activate'] . "</label><br />\t\t\t\n\t\t\t<span>" . $this->msg['bibloto_rfid_security_activate_yes'] . " <input type='radio' name='rfid_security_activate' value='1' " . ($this->config["rfid_security_activate"] == "1" ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\n\t\t\t<span>" . $this->msg['bibloto_rfid_security_activate_no'] . " <input type='radio' name='rfid_security_activate' value='0' " . (!$this->config["rfid_security_activate"] ? "checked='checked' " : "") . "style='vertical-align:bottom;' /></span>\t\n\t\t</div>\t\t\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='rfid_afi_security_code_on'>" . $this->msg['bibloto_rfid_afi_security_code_on'] . "</label><br />\t\t\t\n\t\t\t<input type='text' id='rfid_afi_security_code_on' name='rfid_afi_security_code_on' value='" . $this->config['rfid_afi_security_code_on'] . "' />\t\t\n\t\t</div>\t\t\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='rfid_afi_security_code_off'>" . $this->msg['bibloto_rfid_afi_security_code_off'] . "</label><br />\t\t\t\n\t\t\t<input type='text' id='rfid_afi_security_code_off' name='rfid_afi_security_code_off' value='" . $this->config['rfid_afi_security_code_off'] . "' />\t\t\n\t\t</div>\t\t\t\t\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='home_tpl'>" . $this->msg['bibloto_home_tpl'] . "</label><br />\t\t\t\n\t\t\t<textarea id='home_tpl' class='saisie-80em' wrap='virtual' rows='8' cols='62' name='home_tpl'>" . $this->config['home_tpl'] . "</textarea>\n\t\t</div>\t\t\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='empr_tpl'>" . $this->msg['bibloto_empr_tpl'] . "</label><br />\t\t\t\n\t\t\t<textarea id='empr_tpl' class='saisie-80em' wrap='virtual' rows='8' cols='62' name='empr_tpl'>" . $this->config['empr_tpl'] . "</textarea>\n\t\t</div>\t\t\t\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='msg_checkout_button'>" . $this->msg['bibloto_msg_checkout_button'] . "</label><br />\t\t\t\n\t\t\t<input type='text' id='msg_checkout_button' name='msg_checkout_button' value='" . htmlentities($this->config['msg_checkout_button'], ENT_QUOTES, $charset) . "' />\t\t\n\t\t</div>\t\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='msg_checkout_valid_button'>" . $this->msg['bibloto_msg_checkout_valid_button'] . "</label><br />\t\t\t\n\t\t\t<input type='text' id='msg_checkout_valid_button' name='msg_checkout_valid_button' value='" . htmlentities($this->config['msg_checkout_valid_button'], ENT_QUOTES, $charset) . "' />\t\t\n\t\t</div>\t\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='msg_checkin_button'>" . $this->msg['bibloto_msg_checkin_button'] . "</label><br />\t\t\t\n\t\t\t<input type='text' id='msg_checkin_button' name='msg_checkin_button' value='" . htmlentities($this->config['msg_checkin_button'], ENT_QUOTES, $charset) . "' />\t\t\n\t\t</div>\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='msg_resa_button'>" . $this->msg['bibloto_msg_resa_button'] . "</label><br />\t\t\t\n\t\t\t<input type='text' id='msg_resa_button' name='msg_resa_button' value='" . htmlentities($this->config['msg_resa_button'], ENT_QUOTES, $charset) . "' />\t\t\n\t\t</div>\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='msg_exit_button'>" . $this->msg['bibloto_msg_exit_button'] . "</label><br />\t\t\t\n\t\t\t<input type='text' id='msg_exit_button' name='msg_exit_button' value='" . htmlentities($this->config['msg_exit_button'], ENT_QUOTES, $charset) . "' />\t\t\n\t\t</div>\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='msg_action_title'>" . $this->msg['bibloto_msg_action_title'] . "</label><br />\t\t\t\n\t\t\t<input type='text' class='saisie-80em' id='msg_action_title' name='msg_action_title' value='" . htmlentities($this->config['msg_action_title'], ENT_QUOTES, $charset) . "' />\t\t\n\t\t</div>\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='msg_checkout_title'>" . $this->msg['bibloto_msg_checkout_title'] . "</label><br />\t\t\t\n\t\t\t<input type='text' class='saisie-80em' id='msg_checkout_title' name='msg_checkout_title' value='" . htmlentities($this->config['msg_checkout_title'], ENT_QUOTES, $charset) . "' />\t\t\n\t\t</div>\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='msg_checkin_title'>" . $this->msg['bibloto_msg_checkin_title'] . "</label><br />\t\t\t\n\t\t\t<input type='text' class='saisie-80em' id='msg_checkin_title' name='msg_checkin_title' value='" . htmlentities($this->config['msg_checkin_title'], ENT_QUOTES, $charset) . "' />\t\t\n\t\t</div>\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='msg_resa_title'>" . $this->msg['bibloto_msg_resa_title'] . "</label><br />\t\t\t\n\t\t\t<input type='text' class='saisie-80em' id='msg_resa_title' name='msg_resa_title' value='" . htmlentities($this->config['msg_resa_title'], ENT_QUOTES, $charset) . "' />\t\t\n\t\t</div>\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='msg_dialog_place_item_checkout'>" . $this->msg['bibloto_msg_dialog_place_item_checkout'] . "</label><br />\t\t\t\n\t\t\t<input type='text' class='saisie-80em' id='msg_dialog_place_item_checkout' name='msg_dialog_place_item_checkout' value='" . htmlentities($this->config['msg_dialog_place_item_checkout'], ENT_QUOTES, $charset) . "' />\t\t\n\t\t</div>\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='msg_dialog_place_item_checkin'>" . $this->msg['bibloto_msg_dialog_place_item_checkin'] . "</label><br />\t\t\t\n\t\t\t<input type='text' class='saisie-80em' id='msg_dialog_place_item_checkin' name='msg_dialog_place_item_checkin' value='" . htmlentities($this->config['msg_dialog_place_item_checkin'], ENT_QUOTES, $charset) . "' />\t\t\n\t\t</div>\t\t\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='msg_dialog_too_many_items'>" . $this->msg['bibloto_msg_dialog_too_many_items'] . "</label><br />\t\t\t\n\t\t\t<input type='text' class='saisie-80em' id='msg_dialog_too_many_items' name='msg_dialog_too_many_items' value='" . htmlentities($this->config['msg_dialog_too_many_items'], ENT_QUOTES, $charset) . "' />\t\t\n\t\t</div>\t\t\t\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='msg_dialog_item_cb_unknown'>" . $this->msg['bibloto_msg_dialog_item_cb_unknown'] . "</label><br />\t\t\t\n\t\t\t<input type='text' class='saisie-80em' id='msg_dialog_item_cb_unknown' name='msg_dialog_item_cb_unknown' value='" . htmlentities($this->config['msg_dialog_item_cb_unknown'], ENT_QUOTES, $charset) . "' />\t\t\n\t\t</div>\t\t\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='msg_dialog_checkout_possible'>" . $this->msg['bibloto_msg_dialog_checkout_possible'] . "</label><br />\t\t\t\n\t\t\t<input type='text' class='saisie-80em' id='msg_dialog_checkout_possible' name='msg_dialog_checkout_possible' value='" . htmlentities($this->config['msg_dialog_checkout_possible'], ENT_QUOTES, $charset) . "' />\t\t\n\t\t</div>\t\t\t\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='msg_dialog_checkout_ok'>" . $this->msg['bibloto_msg_dialog_checkout_ok'] . "</label><br />\t\t\t\n\t\t\t<input type='text' class='saisie-80em' id='msg_dialog_checkout_ok' name='msg_dialog_checkout_ok' value='" . htmlentities($this->config['msg_dialog_checkout_ok'], ENT_QUOTES, $charset) . "' />\t\t\n\t\t</div>\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='msg_dialog_checkout_no'>" . $this->msg['bibloto_msg_dialog_checkout_no'] . "</label><br />\t\t\t\n\t\t\t<input type='text' class='saisie-80em' id='msg_dialog_checkout_no' name='msg_dialog_checkout_no' value='" . htmlentities($this->config['msg_dialog_checkout_no'], ENT_QUOTES, $charset) . "' />\t\t\n\t\t</div>\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='msg_dialog_checkin_ok'>" . $this->msg['bibloto_msg_dialog_checkin_ok'] . "</label><br />\t\t\t\n\t\t\t<input type='text' class='saisie-80em' id='msg_dialog_checkin_ok' name='msg_dialog_checkin_ok' value='" . htmlentities($this->config['msg_dialog_checkin_ok'], ENT_QUOTES, $charset) . "' />\t\t\n\t\t</div>\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='msg_dialog_checkin_no_checkout'>" . $this->msg['bibloto_msg_dialog_checkin_no_checkout'] . "</label><br />\t\t\t\n\t\t\t<input type='text' class='saisie-80em' id='msg_dialog_checkin_no_checkout' name='msg_dialog_checkin_no_checkout' value='" . htmlentities($this->config['msg_dialog_checkin_no_checkout'], ENT_QUOTES, $charset) . "' />\t\t\n\t\t</div>\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='msg_dialog_antivol_error'>" . $this->msg['bibloto_msg_dialog_antivol_error'] . "</label><br />\t\t\t\n\t\t\t<input type='text' class='saisie-80em' id='msg_dialog_antivol_error' name='msg_dialog_antivol_error' value='" . htmlentities($this->config['msg_dialog_antivol_error'], ENT_QUOTES, $charset) . "' />\t\t\n\t\t</div>\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='msg_dialog_exit'>" . $this->msg['bibloto_msg_dialog_exit'] . "</label><br />\t\t\t\n\t\t\t<input type='text' id='msg_dialog_exit' name='msg_dialog_exit' value='" . htmlentities($this->config['msg_dialog_exit'], ENT_QUOTES, $charset) . "' />\t\t\n\t\t</div>\t\n\t\t<div class='row'> </div>\n\t\t<div class='row'>\n\t\t\t<label class='etiquette' for='timeout_disconnect'>" . $this->msg['bibloto_timeout_disconnect'] . "</label><br />\t\t\t\n\t\t\t<input type='text' id='timeout_disconnect' name='timeout_disconnect' value='" . $this->config['timeout_disconnect'] . "' />\t\t\n\t\t</div>\n\t\t"; /* <div class='row'> </div> <div class='row'> <label class='etiquette' for='msg_printer_button'>".$this->msg['bibloto_msg_printer_button']."</label><br /> <input type='text' id='msg_printer_button' name='msg_printer_button' value='".htmlentities($this->config['msg_printer_button'],ENT_QUOTES,$charset)."' /> </div> */ return $result; }
function get_config_form() { global $charset; $result = parent::get_config_form(); $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; } } if (!isset($this->config["exported_functions"])) { $this->config["exported_functions"] = array(); } $selected_functions = array(); foreach ($this->config["exported_functions"] as $afunction) { $selected_functions[] = $afunction["group"] . "|_|" . $afunction["name"]; } //Adresse d'utilisation $result .= '<div class=row><label class="etiquette" for="api_exported_functions">' . $this->msg["apisoap_service_endpoint"] . '</label><br />'; if ($this->id) { $result .= '<a target="_blank" href="ws/connector_out.php?source_id=' . $this->id . '&wsdl">ws/connector_out.php?source_id=' . $this->id . '&wsdl</a>'; } else { $result .= $this->msg["apisoap_service_endpoint_unrecorded"]; } $result .= "</div>"; //Fonction exportées $result .= '<div class=row><label class="etiquette" for="api_exported_functions">' . $this->msg["apisoap_exported_functions"] . '</label><br />'; $api_select = '<select MULTIPLE name="api_exported_functions[]" size="20" >'; foreach ($api_functions as $agroup_name => $agroup) { $api_select .= '<optgroup label="' . htmlentities($agroup_name, ENT_QUOTES, $charset) . '">'; foreach ($agroup as $amethodname) { $davalue = $agroup_name . "|_|" . $amethodname; $api_select .= '<option ' . (in_array($davalue, $selected_functions) ? 'selected' : "") . ' value="' . htmlentities($davalue, ENT_QUOTES, $charset) . '">' . htmlentities($amethodname, ENT_QUOTES, $charset) . '</option>'; } $api_select .= '</optgroup>'; } $api_select .= '</select>'; $result .= $api_select; $result .= "</div>"; //Autentification /* $authorized_config_types = array('none', 'groups'); if (!isset($this->config["authentication_type"]) || !in_array($this->config["authentication_type"], $authorized_config_types)) $this->config["authentication_type"] = 'none'; if (!isset($this->config["authorized_groups"])) $this->config["authorized_groups"] = array(); $result .= '<div class=row><label class="etiquette" for="api_authentication">'.$this->msg["apisoap_authentication"].'</label><br />'; $onchange_js = "document.getElementById('authorized_groups').disabled = document.getElementById('api_authentication_none').checked"; $result .= '<input onchange="'.$onchange_js.'" id="api_authentication_none" name="authentication_type" type="radio" '.($this->config["authentication_type"] == 'none' ? 'checked' : '').' value="none">'.$this->msg["apisoap_authenfication_none"]."<br />"; $result .= '<input onchange="'.$onchange_js.'" id="api_authentication_groups" name="authentication_type" type="radio" '.($this->config["authentication_type"] == 'groups' ? 'checked' : '').' value="groups">'.$this->msg["apisoap_authenfication_group"]."<br>"; $es_groups = new es_esgroups; $group_list = '<select id="authorized_groups" MULTIPLE '.($this->config["authentication_type"] == 'groups' ? '' : 'disabled').' name="authorized_groups[]">'; foreach ($es_groups->groups as &$aesgroup) { $group_list .= '<option '.(in_array($aesgroup->esgroup_id, $this->config["authorized_groups"]) ? 'selected' : '').' value="'.$aesgroup->esgroup_id.'">'.htmlentities($aesgroup->esgroup_name.' ('.$aesgroup->esgroup_fullname.')', ENT_QUOTES, $charset).'</option>'; } $group_list .= '</select>'; $result .= "<blockquote>".$group_list."<blockquote>"; //$result .= '<br />';*/ return $result; }
function get_config_form() { global $charset; $result = parent::get_config_form(); $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; } } if (!isset($this->config["exported_functions"])) { $this->config["exported_functions"] = array(); } $selected_functions = array(); foreach ($this->config["exported_functions"] as $afunction) { $selected_functions[] = $afunction["group"] . "|_|" . $afunction["name"]; } //Adresse d'utilisation global $database; $result .= '<div class=row><label class="etiquette" for="api_exported_functions">' . $this->msg["apijsonrpc_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["apijsonrpc_service_endpoint_unrecorded"]; } $result .= "</div>"; //Fonction exportées $result .= '<div class=row><label class="etiquette" for="api_exported_functions">' . $this->msg["apijsonrpc_exported_functions"] . '</label><br />'; $api_select = '<select MULTIPLE name="api_exported_functions[]" size="20">'; foreach ($api_functions as $agroup_name => $agroup) { $api_select .= '<optgroup label="' . htmlentities($agroup_name, ENT_QUOTES, $charset) . '">'; foreach ($agroup as $amethodname) { $davalue = $agroup_name . "|_|" . $amethodname; $api_select .= '<option ' . (in_array($davalue, $selected_functions) ? 'selected' : "") . ' value="' . htmlentities($davalue, ENT_QUOTES, $charset) . '">' . htmlentities($amethodname, ENT_QUOTES, $charset) . '</option>'; } $api_select .= '</optgroup>'; } $api_select .= '</select>'; $result .= $api_select; $result .= "</div>"; return $result; }