コード例 #1
0
<?php

// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: titres_uniformes.tpl.php,v 1.42 2015-12-31 10:39:18 ngantier Exp $
if (stristr($_SERVER['REQUEST_URI'], ".tpl.php")) {
    die("no access");
}
$selector_prop = "toolbar=no, dependent=yes,resizable=yes, scrollbars=yes";
$mapping_dojo_inclusion_tu = '';
if (form_mapper::isMapped('tu')) {
    $mapping_dojo_inclusion_tu .= '
	     	var formMapper = new FormMapper("tu");
	     	window["formMapperCallback"] = lang.hitch(formMapper, formMapper.expressionFromCallback);';
}
$titre_uniforme_form = jscript_unload_question() . "\n<script type='text/javascript'>\n\nfunction test_form(form) {\n\tif(form.name.value.length == 0)\t{\n\t\talert(\"{$msg['213']}\");\n\t\treturn false;\n\t}\n\tunload_off();\t\n\treturn true;\n}\n\nfunction confirm_delete() {\n    result = confirm(\"{$msg[confirm_suppr]}\");\n    if(result) {\n        unload_off();\n        document.location='./autorites.php?categ=titres_uniformes&sub=delete&id=!!id!!&user_input=!!user_input_url!!&page=!!page!!&nbr_lignes=!!nbr_lignes!!';\n\t} else\n        document.forms['saisie_titre_uniforme'].elements['form_nom'].focus();\n}\nfunction check_link(id) {\n\tw=window.open(document.getElementById(id).value);\n\tw.focus();\n}\n</script>\n\n<script src='javascript/ajax.js'></script>\n<script type='text/javascript'>\n\trequire(['dojo/ready', 'apps/pmb/gridform/FormEdit','dojo/dom-attr','dojo/dom','apps/form_mapper/FormMapper', 'dojo/_base/lang'], function(ready, FormEdit, domAttr, dom, FormMapper, lang){\n\t     ready(function(){\n\t     \tdomAttr.set(dom.byId('oeuvre_type'),'backbone','yes');\n\t     \tdomAttr.set(dom.byId('oeuvre_nature'),'backbone','yes');\n\t     \tnew FormEdit();\n\t     \t" . $mapping_dojo_inclusion_tu . "\n\t     });\n\t});\n</script>\n<form class='form-{$current_module}' id='saisie_titre_uniforme' name='saisie_titre_uniforme' method='post' action='!!action!!' onSubmit=\"return false\" >\n<div class='left'><h3>!!libelle!!</h3></div>\n<div class='right'>";
$titre_uniforme_form .= '
<!-- Selecteur de statut -->
    <label class="etiquette" for="authority_statut">' . $msg['authorities_statut_label'] . '</label>
     !!auth_statut_selector!!
';
if ($PMBuserid == 1 && $pmb_form_authorities_editables == 1) {
    $titre_uniforme_form .= "<input type='button' class='bouton_small' value='" . $msg["authorities_edit_format"] . "' id=\"bt_inedit\"/>";
}
if ($pmb_form_authorities_editables == 1) {
    $titre_uniforme_form .= "<input type='button' class='bouton_small' value=\"" . $msg["authorities_origin_format"] . "\" id=\"bt_origin_format\"/>";
}
$titre_uniforme_form .= "\n</div>\n<div class='form-contenu'>\n\t<div id='zone-container'>\n\t\t<div id='el0Child_0' class='row' movable='yes' title=\"" . htmlentities($msg["aut_oeuvre_form_oeuvre_type"], ENT_QUOTES, $charset) . "\">\n\t\t\t<div class='row'>\n\t\t\t\t<label class='etiquette' for='oeuvre_type'>" . $msg["aut_oeuvre_form_oeuvre_type"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t!!oeuvre_type!!\n\t\t\t</div>\n\t\t</div>\n\t\t<div id='el0Child_1' class='row' movable='yes' title=\"" . htmlentities($msg["aut_oeuvre_form_oeuvre_nature"], ENT_QUOTES, $charset) . "\">\t\t\t\n\t\t\t<div class='row'>\n\t\t\t\t<label class='etiquette' for='oeuvre_nature'>" . $msg["aut_oeuvre_form_oeuvre_nature"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t!!oeuvre_nature!!\n\t\t\t</div>\n\t\t</div>\n\t\t<!--\tnom\t-->\n\t\t<div id='el0Child_2' class='row' movable='yes' title=\"" . htmlentities($msg["aut_titre_uniforme_form_nom"], ENT_QUOTES, $charset) . "\">\n\t\t\t<div class='row'>\n\t\t\t\t<label class='etiquette' for='form_nom'>" . $msg["aut_titre_uniforme_form_nom"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t<input type='text' class='saisie-80em' id='form_nom' name='name' value=\"!!nom!!\" data-form-name='name'/>\n\t\t\t</div>\n\t\t</div>\n\t\t<div id='el0Child_3' class='row' movable='yes' title=\"" . htmlentities($msg["aut_oeuvre_form_oeuvre_expression"], ENT_QUOTES, $charset) . "\">\t\t\t\t\n\t\t\t<div class='row'>\n\t\t\t\t<label class='etiquette' >" . $msg["aut_oeuvre_form_oeuvre_expression"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t!!oeuvre_expression!!\n\t\t\t</div>\t\n\t\t</div>\n\t\t<div id='el0Child_4' class='row' movable='yes' title=\"" . htmlentities($msg["aut_oeuvre_form_other_link"], ENT_QUOTES, $charset) . "\">\t\t\t\t\n\t\t\t<div class='row'>\n\t\t\t\t<label class='etiquette' >" . $msg["aut_oeuvre_form_other_link"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t!!other_link!!\n\t\t\t</div>\n\t\t</div>\n\t\t<div id='el0Child_5' class='row' movable='yes' title=\"" . htmlentities($msg["aut_oeuvre_form_oeuvre_event"], ENT_QUOTES, $charset) . "\">\t\t\t\t\n\t\t\t<div class='row'>\n\t\t\t\t<label class='etiquette' >" . $msg["aut_oeuvre_form_oeuvre_event"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\t\t\t\n\t\t\t\t!!oeuvre_event!!\n\t\t\t</div>\n\t\t</div>\n\t\t!!authors!!\n\t\t\n\t\t<!--\tForme de l'oeuvre\t-->\n\t\t<div id='el0Child_6' class='row' movable='yes' title=\"" . htmlentities($msg["aut_oeuvre_form_forme"], ENT_QUOTES, $charset) . "\">\n\t\t\t<div class='row'>\n\t\t\t\t<label class='etiquette' for='form_form'>" . $msg["aut_oeuvre_form_forme"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t<input type='text' class='saisie-30em' id='form_form' name='form' data-form-name='form' value='!!form!!'>\n\t\t\t</div>\t\n\t\t</div>\n\t\t\n\t\t<!--\tForme de l'oeuvre liste controlée -->\n\t\t<div id='el0Child_7' class='row' movable='yes' title=\"" . htmlentities($msg["aut_oeuvre_form_forme_list"], ENT_QUOTES, $charset) . "\">\n\t\t\t<div class='row'>\n\t\t\t\t<label class='etiquette' for='form_form'>" . $msg["aut_oeuvre_form_forme_list"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t<input type='text' completion='music_form' autfield='form_form_selector' id='music_form' class='saisie-30emr' name='music_form' data-form-name='music_form' value=\"!!music_form!!\" />\n\t            <input type='button' class='bouton' value='{$msg['parcourir']}' onclick=\"openPopUp('./select.php?what=music_form&caller=saisie_titre_uniforme&p1=form_form_selector&p2=music_form&deb_rech='+" . pmb_escape() . "(this.form.music_form.value), 'select_tonalite', 500, 400, -2, -2, '{$select1_prop}')\" />\n\t            <input type='hidden' name='form_form_selector' data-form-name='form_form_selector' id='form_form_selector' value=\"!!music_form_id!!\" />  \n\t\t\t</div>\n\t\t</div>\n\t\t\n\t\t<!--\tDate de l'oeuvre\t-->\n\t\t<div id='el0Child_8' class='row' movable='yes' title=\"" . htmlentities($msg["aut_oeuvre_form_date"], ENT_QUOTES, $charset) . "\">\n\t\t\t<div class='row'>\n\t\t\t\t<label class='etiquette' for='form_dates'>" . $msg["aut_oeuvre_form_date"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t<input type='text' class='saisie-30em' id='form_dates' name='date' data-form-name='date' value='!!date!!'>\n\t\t\t</div>\n\t\t</div>\n\t\t\n\t\t<!--\tLieu d'origine de l'oeuvre\t-->\n\t\t<div id='el0Child_9' class='row' movable='yes' title=\"" . htmlentities($msg["aut_oeuvre_form_lieu"], ENT_QUOTES, $charset) . "\">\n\t\t\t<div class='row'>\n\t\t\t\t<label class='etiquette' for='form_place'>" . $msg["aut_oeuvre_form_lieu"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t<input type='text' class='saisie-30em' id='form_place' name='place' data-form-name='place' value='!!place!!'>\n\t\t\t</div>\n\t\t</div>\n\t\t\n\t\t<!--\tSujet de l'oeuvre\t-->\n\t\t<div id='el0Child_10' class='row' movable='yes' title=\"" . htmlentities($msg["aut_oeuvre_form_sujet"], ENT_QUOTES, $charset) . "\">\n\t\t\t<div class='row'>\n\t\t\t\t<label class='etiquette' for='form_subject'>" . $msg["aut_oeuvre_form_sujet"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t<textarea class='saisie-80em' id='form_subject' name='subject' data-form-name='subject' cols='62' rows='4' wrap='virtual'>!!subject!!</textarea>\n\t\t\t</div>\n\t\t</div>\n\t\t\n\t\t<!--\tComplétude visée de l'oeuvre\t-->\n\t\t<div id='el0Child_11' class='row' movable='yes' title=\"" . htmlentities($msg["aut_oeuvre_form_completude"], ENT_QUOTES, $charset) . "\">\n\t\t\t<div class='row'>\n\t\t\t\t<label class='etiquette' for='form_completude'>" . $msg["aut_oeuvre_form_completude"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t<select id='form_intended_termination' name='intended_termination' data-form-name='intended_termination' class='saisie-20em'>\n\t\t\t\t\t<option value='0' !!intended_termination_0!!>--</option>\n\n\t\t\t\t\t<option value='1' !!intended_termination_1!!>" . $msg['aut_oeuvre_form_completude_finished'] . "</option>\n\n\t\t\t\t\t<option value='2' !!intended_termination_2!!>" . $msg['aut_oeuvre_form_completude_infinite'] . "</option>\n\n\t\t\t\t</select>\t\n\t\t\t</div>\n\t\t</div>\n\t\t\n\t\t<!--\tPublic visé de l'oeuvre\t-->\n\t\t<div id='el0Child_12' class='row' movable='yes' title=\"" . htmlentities($msg["aut_oeuvre_form_public"], ENT_QUOTES, $charset) . "\">\t\t\n\t\t\t<div class='colonne_suite'>\n\t\t\t\t<label class='etiquette' for='form_intended_audience'>" . $msg["aut_oeuvre_form_public"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t<input type='text' class='saisie-30em' id='form_intended_audience' name='intended_audience' data-form-name='intended_audience' value='!!intended_audience!!'>\n\t\t\t</div>\n\t\t</div>\n\t\t\n\t\t<!--\tHistoire de l'oeuvre\t-->\n\t\t<div id='el0Child_13' class='row' movable='yes' title=\"" . htmlentities($msg["aut_oeuvre_form_histoire"], ENT_QUOTES, $charset) . "\">\n\t\t\t<div class='row'>\n\t\t\t\t<label class='etiquette' for='form_history'>" . $msg["aut_oeuvre_form_histoire"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t<textarea class='saisie-80em' id='form_history' name='history'  data-form-name='history' cols='62' rows='4' wrap='virtual'>!!history!!</textarea>\n\t\t\t</div>\n\t\t</div>\n\t\t\n\t\t<!--\tContexte de l'oeuvre\t-->\n\t\t<div id='el0Child_14' class='row' movable='yes' title=\"" . htmlentities($msg["aut_oeuvre_form_contexte"], ENT_QUOTES, $charset) . "\">\n\t\t\t<div class='row'>\n\t\t\t\t<label class='etiquette' for='form_context'>" . $msg["aut_oeuvre_form_contexte"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t<textarea class='saisie-80em' id='form_context' name='context' data-form-name='context' cols='62' rows='4' wrap='virtual'>!!context!!</textarea>\n\t\t\t</div>\n\t\t</div>\n\t\t\t\t\t\t\n\t\t<div id='el0Child_15' class='row' movable='yes' title=\"" . htmlentities($msg["aut_titre_uniforme_form_distribution"], ENT_QUOTES, $charset) . "\">\t\t\t\t\t\n\t\t\t<!--\tDistribution instrumentale et vocale (pour la musique)\t-->\n\t\t</div>\n\t\t\t\t\n\t\t<div id='el0Child_16' class='row' movable='yes' title=\"" . htmlentities($msg["aut_titre_uniforme_form_ref_numerique"], ENT_QUOTES, $charset) . "\">\n\t\t\t<!--\tRéférence numérique (pour la musique)\t-->\n\t\t</div>\n\t\t\t\t\n\t\t<!--\tTonalité (Saisie Libre)\t-->\n\t\t<div id='el0Child_17' class='row' movable='yes' title=\"" . htmlentities($msg["aut_titre_uniforme_form_tonalite"], ENT_QUOTES, $charset) . "\">\n\t\t\t<div class='row'>\n\t\t\t\t<label class='etiquette' for='form_tonalite'>" . $msg["aut_titre_uniforme_form_tonalite"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t<input type='text' class='saisie-80em' id='form_tonalite' name='tonalite' value='!!tonalite!!'>\n\t\t\t</div>\n\t\t</div>\n\t\t\n\t\t<!--\tTonalité (Liste controlée)\t-->\n\t\t<div id='el0Child_18' class='row' movable='yes' title=\"" . htmlentities($msg["aut_titre_uniforme_form_tonalite_list"], ENT_QUOTES, $charset) . "\">\n\t\t\t<div class='row'>\n\t\t\t\t<label class='etiquette' for='form_tonalite'>" . $msg["aut_titre_uniforme_form_tonalite_list"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t<input type='text' completion='music_key' autfield='form_tonalite_selector' id='music_key' class='saisie-30emr' name='music_key' data-form-name='music_key' value=\"!!music_key!!\" />\n\t            <input type='button' class='bouton' value='{$msg['parcourir']}' onclick=\"openPopUp('./select.php?what=music_key&caller=saisie_titre_uniforme&p1=form_tonalite_selector&p2=music_key&deb_rech='+" . pmb_escape() . "(this.form.music_key.value), 'select_tonalite', 500, 400, -2, -2, '{$select1_prop}')\" />\n\t            <input type='hidden' name='form_tonalite_selector' data-form-name='form_tonalite_selector' id='form_tonalite_selector' value=\"!!music_key_id!!\" />  \n\t\t\t</div>\n\t\t</div>\n\t\t\n\t\t<!--\tCoordonnées (oeuvre cartographique)\t-->\n\t\t<div id='el0Child_19' class='row' movable='yes' title=\"" . htmlentities($msg["aut_oeuvre_form_coordonnees"], ENT_QUOTES, $charset) . "\">\n\t\t\t<div class='row'>\n\t\t\t\t<label class='etiquette' for='form_coordinates'>" . $msg["aut_oeuvre_form_coordonnees"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t<input type='text' class='saisie-80em' id='form_coordinates' name='coordinates' data-form-name='coordinates' value='!!coordinates!!'>\n\t\t\t</div>\n\t\t</div>\n\t\t\t\t\n\t\t<!--\tEquinoxe (oeuvre cartographique)\t-->\n\t\t<div id='el0Child_20' class='row' movable='yes' title=\"" . htmlentities($msg["aut_oeuvre_form_equinoxe"], ENT_QUOTES, $charset) . "\">\n\t\t\t<div class='row'>\n\t\t\t\t<label class='etiquette' for='form_equinox'>" . $msg["aut_oeuvre_form_equinoxe"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t<input type='text' class='saisie-80em' id='form_equinox' name='equinox' data-form-name='equinox' value='!!equinox!!'>\n\t\t\t</div>\n\t\t</div>\n\t\n\t\t<div id='el0Child_21' class='row' movable='yes' title=\"" . htmlentities($msg["aut_titre_uniforme_form_subdivision_forme"], ENT_QUOTES, $charset) . "\">\n\t\t\t<!-- Subdivision de forme -->\n\t\t</div>\n\t\t\t\t\n\t\t<!--\tAutres caractéristiques distinctives de l'oeuvre\t-->\n\t\t<div id='el0Child_22' class='row' movable='yes' title=\"" . htmlentities($msg["aut_oeuvre_form_caracteristique"], ENT_QUOTES, $charset) . "\">\n\t\t\t<div class='row'>\n\t\t\t\t<label class='etiquette' for='form_carac'>" . $msg["aut_oeuvre_form_caracteristique"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t<textarea class='saisie-80em' id='form_carac' name='characteristic' cols='62' rows='4' wrap='virtual'>!!characteristic!!</textarea>\n\t\t\t</div>\n\t\t</div>\n\t\t\t\t\n\t\t<!-- \tCommentaire -->\n\t\t<div id='el0Child_23' class='row' movable='yes' title=\"" . htmlentities($msg["aut_titre_uniforme_commentaire"], ENT_QUOTES, $charset) . "\">\n\t\t\t<div class='row'>\n\t\t\t\t<label class='etiquette' for='comment'>" . $msg["aut_titre_uniforme_commentaire"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='row'>\n\t\t\t\t<textarea class='saisie-80em' id='comment' name='comment' data-form-name='comment' cols='62' rows='4' wrap='virtual'>!!comment!!</textarea>\n\t\t\t</div>\n\t\t</div>\n\t\t\t\t\t\t\n\t\t!!concept_form!!\n\t\t!!aut_pperso!!\n\t\t\t\t\t\t\n\t\t<div id='el0Child_24' class='row' movable='yes' title=\"" . htmlentities($msg["authority_import_denied"], ENT_QUOTES, $charset) . "\">\t\n\t\t\t<div class='row'>\n\t\t\t\t<label class='etiquette' for='tu_import_denied'>" . $msg['authority_import_denied'] . "</label> &nbsp;\n\t\t\t\t<input type='checkbox' id='tu_import_denied' name='tu_import_denied' value='1' data-form-name='tu_import_denied' !!tu_import_denied!!/>\n\t\t\t</div>\n\t\t</div>\n\t\t\n\t\t<!-- aut_link -->\n\t</div>\n</div>\n<!--\tboutons\t-->\n<div class='row'>\n\t<div class='left'>\n\t\t<input type='button' class='bouton' value='{$msg['76']}' onClick=\"unload_off();document.location='./autorites.php?categ=titres_uniformes&sub=reach&user_input=!!user_input_url!!&page=!!page!!&nbr_lignes=!!nbr_lignes!!';\" />\n\t\t<input type='button' value='{$msg['77']}' class='bouton' id='btsubmit' onClick=\"if (test_form(this.form)) this.form.submit();\" />\n\t\t!!remplace!!\n\t\t!!voir_notices!!\n\t\t!!audit_bt!!\n\t\t<input type='hidden' name='page' value='!!page!!' />\n\t\t<input type='hidden' name='nbr_lignes' value='!!nbr_lignes!!' />\n\t\t<input type='hidden' name='user_input' value=\"!!user_input!!\" />\n\t</div>\n\t<div class='right'>\n\t\t!!delete!!\n\t</div>\n</div>\n<div class='row'></div>\n</form>\n<script type='text/javascript'>\n\tajax_parse_dom();\n\tdocument.forms['saisie_titre_uniforme'].elements['name'].focus();\n</script>\n";
$oeuvre_expression_tpl = "\n<script type='text/javascript'>\n\nfunction fonction_selecteur_oeuvre_expression() {\n\tname=this.getAttribute('id').substring(4);\n\tname_id = name.substr(0,19)+'_code'+name.substr(19);\n\topenPopUp('./select.php?what=titre_uniforme&caller=saisie_titre_uniforme&param1='+name_id+'&param2='+name, 'select_titre_uniforme', 500, 400, -2, -2, '{$select2_prop}');\n}\nfunction fonction_raz_oeuvre_expression() {\n\tname=this.getAttribute('id').substring(4);\n\tname_id = name.substr(0,19)+'_code'+name.substr(19);\n\tdocument.getElementById(name_id).value=0;\n\tdocument.getElementById(name).value='';\n}\nfunction add_oeuvre_expression() {\n\ttemplate = document.getElementById('addoeuvre_expression');\n\toeuvre_expression=document.createElement('div');\n\toeuvre_expression.className='row';\n\tsuffixe = eval('document.saisie_titre_uniforme.max_oeuvre_expression.value')\n\t\n    var new_sel_oeuvre_expression_type = document.createElement('select');\n    new_sel_oeuvre_expression_type = document.getElementById('f_oeuvre_expression_type0').cloneNode(true);\t\n    new_sel_oeuvre_expression_type.setAttribute('name', 'f_oeuvre_expression_type' + suffixe);\n    new_sel_oeuvre_expression_type.setAttribute('id', 'f_oeuvre_expression_type' + suffixe);\n\n\tnom_id = 'f_oeuvre_expression'+suffixe\n\tf_oeuvre_expression = document.createElement('input');\n\tf_oeuvre_expression.setAttribute('name',nom_id);\n\tf_oeuvre_expression.setAttribute('id',nom_id);\n\tf_oeuvre_expression.setAttribute('type','text');\n\tf_oeuvre_expression.className='saisie-30emr';\n\tf_oeuvre_expression.setAttribute('value','');\n\tf_oeuvre_expression.setAttribute('completion','titre_uniforme');\n\tf_oeuvre_expression.setAttribute('autfield','f_oeuvre_expression_code'+suffixe);\n\n\tdel_f_oeuvre_expression = document.createElement('input');\n\tdel_f_oeuvre_expression.setAttribute('id','del_f_oeuvre_expression'+suffixe);\n\tdel_f_oeuvre_expression.onclick=fonction_raz_oeuvre_expression;\n\tdel_f_oeuvre_expression.setAttribute('type','button');\n\tdel_f_oeuvre_expression.className='bouton';\n\tdel_f_oeuvre_expression.setAttribute('readonly','');\n\tdel_f_oeuvre_expression.setAttribute('value','{$msg['raz']}');\n\n\tf_oeuvre_expression_input = document.createElement('input');\n\tf_oeuvre_expression_input.name='f_oeuvre_expression_code'+suffixe;\n\tf_oeuvre_expression_input.setAttribute('type','hidden');\n\tf_oeuvre_expression_input.setAttribute('id','f_oeuvre_expression_code'+suffixe);\n\tf_oeuvre_expression_input.setAttribute('value','');\n\n\toeuvre_expression.appendChild(new_sel_oeuvre_expression_type);\n\tspace=document.createTextNode(' ');\n\toeuvre_expression.appendChild(space);\n\toeuvre_expression.appendChild(space.cloneNode(false));\n\toeuvre_expression.appendChild(f_oeuvre_expression);\n\toeuvre_expression.appendChild(space.cloneNode(false));\n\toeuvre_expression.appendChild(space.cloneNode(false));\n\toeuvre_expression.appendChild(del_f_oeuvre_expression);\n\toeuvre_expression.appendChild(f_oeuvre_expression_input);\n\n\ttemplate.appendChild(oeuvre_expression);\n\n\tdocument.saisie_titre_uniforme.max_oeuvre_expression.value=suffixe*1+1*1 ;\n\tajax_pack_element(f_oeuvre_expression);\n}\n\n</script>";
$oeuvre_expression_tpl_first = "\n<input type='button' class='bouton' value='{$msg['parcourir']}' \n\tonclick=\"openPopUp('./select.php?what=titre_uniforme&caller=saisie_titre_uniforme&field_id=f_oeuvre_expression_code&field_name_id=f_oeuvre_expression&dyn=3&max_field=max_oeuvre_expression&add_field=add_oeuvre_expression&callback=formMapperCallback', 'select_titre_uniforme', 500, 400, -2, -2, '{$select2_prop}')\" />\n<input type='button' class='bouton' value='+' onClick=\"add_oeuvre_expression();\"/>\t\n<div class='row'>\n\t!!expression_type!!\n\t<input type='text' class='saisie-30emr' callback='formMapperCallback' id='f_oeuvre_expression!!ioeuvre_expression!!' name='f_oeuvre_expression!!ioeuvre_expression!!' data-form-name='f_oeuvre_expression' value=\"!!oeuvre_expression!!\" completion=\"titre_uniforme\" autfield=\"f_oeuvre_expression_code!!ioeuvre_expression!!\" />\n\t<input type='button' class='bouton' value='{$msg['raz']}' onclick=\"this.form.f_oeuvre_expression!!ioeuvre_expression!!.value=''; this.form.f_oeuvre_expression_code!!ioeuvre_expression!!.value=''; \" />\n\t<input type='hidden' name='f_oeuvre_expression_code!!ioeuvre_expression!!'  data-form-name='f_oeuvre_expression_code'  id='f_oeuvre_expression_code!!ioeuvre_expression!!' value='!!oeuvre_expression_code!!' />\n</div>\n";
コード例 #2
0
<?php

// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: ajax_main.inc.php,v 1.2 2015-12-24 13:36:11 vtouchard Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
require_once $class_path . '/encoding_normalize.class.php';
require_once $class_path . '/form_mapper/form_mapper.class.php';
if ($quoi && $id && $sub) {
    $mapper = form_mapper::getMapper($quoi, $id);
    if ($mapper) {
        $mapper->setId($id);
        $mapping = $mapper->getMapping($sub);
        print encoding_normalize::json_encode($mapping);
    } else {
        print encoding_normalize::json_encode(array('mapping' => 'false'));
    }
}
コード例 #3
0
$ptab[10] = "\n<script>\nfunction chklnk_f_thumbnail_url(element){\n\tif(element.value != ''){\n\t\tvar url=element.value;\n\t\tvar thisRegex = new RegExp('^[a-zA-Z0-9_]+\\.php','g');\n\t\tvar flagPhp=false;\n\t\tif(thisRegex.test(url)){\n\t\t\turl = '" . $pmb_url_base . "/'+url;\n\t\t\tflagPhp=true;\n\t\t}\n\t\tvar wait = document.createElement('img');\n\t\twait.setAttribute('src','images/patience.gif');\n\t\twait.setAttribute('align','top');\n\t\twhile(document.getElementById('f_thumbnail_check').firstChild){\n\t\t\tdocument.getElementById('f_thumbnail_check').removeChild(document.getElementById('f_thumbnail_check').firstChild);\n\t\t}\n\t\tdocument.getElementById('f_thumbnail_check').appendChild(wait);\n\t\tvar testlink = encodeURIComponent(url);\n\t\tvar req = new XMLHttpRequest();\n\t\treq.open('GET', './ajax.php?module=ajax&categ=chklnk&timeout=!!pmb_curl_timeout!!&link='+testlink, true);\n\t\treq.onreadystatechange = function (aEvt) {\n\t\t  if (req.readyState == 4) {\n\t\t  \tif(req.status == 200){\n\t\t\t\tvar img = document.createElement('img');\n\t\t\t    var src='';\n\t\t\t    if(req.responseText == '200'){\n\t\t\t\t\tif(!flagPhp){\n\t\t\t    \t\tif((element.value.substr(0,7) != 'http://') && (element.value.substr(0,8) != 'https://')) element.value = 'http://'+element.value;\n\t\t\t\t\t}\n\t\t\t\t\t//impec, on print un petit message de confirmation\n\t\t\t\t\tsrc = 'images/tick.gif';\n\t\t\t\t}else{\n\t\t\t      //problème...\n\t\t\t\t\tsrc = 'images/error.png';\n\t\t\t\t\timg.setAttribute('style','height:1.5em;');\n\t\t\t    }\n\t\t\t    img.setAttribute('src',src);\n\t\t\t\timg.setAttribute('align','top');\n\t\t\t\twhile(document.getElementById('f_thumbnail_check').firstChild){\n\t\t\t\t\tdocument.getElementById('f_thumbnail_check').removeChild(document.getElementById('f_thumbnail_check').firstChild);\n\t\t\t\t}\n\t\t\t\tdocument.getElementById('f_thumbnail_check').appendChild(img);\n\t\t\t}\n\t\t  }\n\t\t};\n\t\treq.send(null);\n\t}\n}\n</script>\n<!-- onglet 10 -->\n<div id='el10Parent' class='parent'>\n<h3>\n    <img src='./images/plus.gif' class='img_plus' name='imEx' id='el10Img' onClick=\"expandBase('el10', true); return false;\" title='" . $msg["notice_champs_gestion"] . "' border='0' /> " . $msg["notice_champs_gestion"] . "\n</h3>\n</div>\n\n<div id='el10Child' class='child' etirable='yes' title='" . htmlentities($msg[notice_champs_gestion], ENT_QUOTES, $charset) . "'>\n\t<div id='el10Child_0' title='" . htmlentities($msg[notice_statut_gestion], ENT_QUOTES, $charset) . "' movable='yes'>\n\t\t<div id='el10Child_0a' class='row'>\n\t\t    <label for='f_notice_statut' class='etiquette'>{$msg['notice_statut_gestion']}</label>\n\t\t</div>\n\t\t<div id='el10Child_0b' class='row'>\n\t\t\t!!notice_statut!!\n\t    </div>\n\t</div>\n\t<div id='el10Child_7' title='" . htmlentities($msg["notice_is_new_gestion"], ENT_QUOTES, $charset) . "' movable='yes'>\n\t\t<!--    Nouveauté    -->\n\t\t<div id='el10Child_7a' class='row'>\n\t\t    <label for='f_new_gestion' class='etiquette'>" . $msg["notice_is_new_gestion"] . "</label>\n\t\t</div>\n\t\t<div id='el10Child_7b' class='row'>\n\t\t    <input type='radio' name='f_notice_is_new' !!checked_no!! value='0'>" . $msg["notice_is_new_gestion_no"] . "<br>\n\t\t    <input type='radio' name='f_notice_is_new' !!checked_yes!! value='1'>" . $msg["notice_is_new_gestion_yes"] . "<br>\n\t\t</div>\n\t</div>\n\t<div id='el10Child_1' title='" . htmlentities($msg[notice_commentaire_gestion], ENT_QUOTES, $charset) . "' movable='yes'>\n\t\t<!--    commentaire de gestion    -->\n\t\t<div id='el10Child_1a' class='row'>\n\t\t    <label for='f_commentaire_gestion' class='etiquette'>{$msg['notice_commentaire_gestion']}</label>\n\t\t</div>\n\t\t<div id='el10Child_1b' class='row'>\n\t\t    <textarea class='saisie-80em' id='f_commentaire_gestion' name='f_commentaire_gestion' rows='1' wrap='virtual'>!!commentaire_gestion!!</textarea>\n\t\t</div>\n\t</div>\n\n\t<div id='el10Child_2' title='" . htmlentities($msg[notice_thumbnail_url], ENT_QUOTES, $charset) . "' movable='yes'>\n\t\t<!--    URL vignette speciale    -->\n\t\t<div id='el10Child_2a' class='row'>\n\t\t    <label for='f_thumbnail_url' class='etiquette'>{$msg['notice_thumbnail_url']}</label>\n\t\t</div>\n\t\t<div id='el10Child_2b' class='row'>\n\t\t\t<div id='f_thumbnail_check' style='display:inline'></div>\n\t\t    <input type='text' class='saisie-80em' id='f_thumbnail_url' name='f_thumbnail_url' rows='1' wrap='virtual' value=\"!!thumbnail_url!!\" onchange='chklnk_f_thumbnail_url(this);' />\n\t\t</div>\n\t</div>";
global $pmb_notice_img_folder_id;
if ($pmb_notice_img_folder_id) {
    $ptab[10] .= "\n\t\t<div id='el10Child_6' title='" . htmlentities($msg[notice_img_load], ENT_QUOTES, $charset) . "' movable='yes'>\n\t\t\t<!--    Vignette upload    -->\n\t\t\t<div id='el10Child_6a' class='row'>\n\t\t\t    <label for='f_img_load' class='etiquette'>{$msg['notice_img_load']}</label>!!message_folder!!\n\t\t\t</div>\n\t\t\t<div id='el10Child_6b' class='row'>\n\t\t\t    <input type='file' class='saisie-80em' id='f_img_load' name='f_img_load' rows='1' wrap='virtual' value='' />\n\t\t\t</div>\n\t\t</div>";
}
$ptab[10] .= "\n\t<div id='el10Child_3' title='" . htmlentities($msg['admin_menu_acces'], ENT_QUOTES, $charset) . "' movable='yes'>\n\t\t<!-- Droits d'acces -->\n\t\t<!-- rights_form -->\n\t</div>\n\t<div id='el10Child_4' title='" . htmlentities($msg[indexation_lang_select], ENT_QUOTES, $charset) . "' movable='yes'>\n\t\t<div id='el10Child_4a' class='row'>\n\t\t    <label for='f_notice_lang' class='etiquette'>" . $msg["indexation_lang_select"] . "</label>\n\t\t</div>\n\t\t<div id='el10Child_4b' class='row'>\n\t\t   !!indexation_lang!!\n\t\t</div>\n\t</div>\n";
global $pmb_notices_show_dates;
if ($pmb_notices_show_dates) {
    $ptab[10] .= "\n\t\t<div id='el10Child_9' title='" . htmlentities($msg[noti_crea_date], ENT_QUOTES, $charset) . "' movable='yes'>\n\t\t\t<div id='el10Child_9a' class='row'>\n\t\t\t\t!!dates_notice!!\n\t\t\t</div>\n\t\t</div>";
}
$ptab[10] .= "\n</div>\n";
// $form_notice : formulaire de notice
global $pmb_catalog_verif_js;
$form_notice = jscript_unload_question();
if ($pmb_use_uniform_title) {
    if (form_mapper::isMapped('notice')) {
        $form_notice .= "\n\t\t\t<!-- dojo manif from expression -->\n\t\t\t<script type='text/javascript'>\n\t\t\t\trequire(['dojo/ready', 'apps/form_mapper/FormMapper', 'dojo/_base/lang'], function(ready, FormMapper, lang){\n\t\t\t\t     ready(function(){\n\t\t\t\t     \tvar formMapper = new FormMapper('notice');\n\t\t\t\t     \twindow['formMapperCallback'] = lang.hitch(formMapper, formMapper.manifFromCallback);\n\t\t\t\t     });\n\t\t\t\t});\n\t\t\t</script>";
    }
}
$form_notice .= "\n<!-- script de gestion des onglets -->\n<script type='text/javascript' src='./javascript/tabform.js'></script>\n" . ($pmb_catalog_verif_js != "" ? "<script type='text/javascript' src='{$base_path}/javascript/{$pmb_catalog_verif_js}'></script>" : "") . "\n<script type='text/javascript'>\n<!--\n    function test_notice(form)\n    {\n    ";
if ($pmb_catalog_verif_js != "") {
    $form_notice .= "\n\t\tvar check = check_perso_form()\n\t\tif(check == false) return false;";
}
if ($pmb_nomenclature_activate) {
    $form_notice .= "\n\t\t\tif(!dijit.byId('nomenclature_record_ui_0').check_validate())\n\t\t\t\treturn false;\n\t\t\t";
}
$form_notice .= "\n\t\ttitre1 = form.f_tit1.value;\n\t\ttitre1 = titre1.replace(/^\\s+|\\s+\$/g, ''); //trim la valeur\n        if(titre1.length == 0) {\n           alert(\"{$msg['277']}\");\n           return false;\n\t\t}\n\t\treturn check_form();\n    }\n-->\n</script>\n<script src='javascript/ajax.js'></script>\n<script src='javascript/move.js'></script>\n<script type='text/javascript'>\n\tvar msg_move_to_absolute_pos='" . addslashes($msg['move_to_absolute_pos']) . "';\n\tvar msg_move_to_relative_pos='" . addslashes($msg['move_to_relative_pos']) . "';\n\tvar msg_move_saved_ok='" . addslashes($msg['move_saved_ok']) . "';\n\tvar msg_move_saved_error='" . addslashes($msg['move_saved_error']) . "';\n\tvar msg_move_up_tab='" . addslashes($msg['move_up_tab']) . "';\n\tvar msg_move_down_tab='" . addslashes($msg['move_down_tab']) . "';\n\tvar msg_move_position_tab='" . addslashes($msg['move_position_tab']) . "';\n\tvar msg_move_position_absolute_tab='" . addslashes($msg['move_position_absolute_tab']) . "';\n\tvar msg_move_position_relative_tab='" . addslashes($msg['move_position_relative_tab']) . "';\n\tvar msg_move_invisible_tab='" . addslashes($msg['move_invisible_tab']) . "';\n\tvar msg_move_visible_tab='" . addslashes($msg['move_visible_tab']) . "';\n\tvar msg_move_inside_tab='" . addslashes($msg['move_inside_tab']) . "';\n\tvar msg_move_save='" . addslashes($msg['move_save']) . "';\n\tvar msg_move_first_plan='" . addslashes($msg['move_first_plan']) . "';\n\tvar msg_move_last_plan='" . addslashes($msg['move_last_plan']) . "';\n\tvar msg_move_first='" . addslashes($msg['move_first']) . "';\n\tvar msg_move_last='" . addslashes($msg['move_last']) . "';\n\tvar msg_move_infront='" . addslashes($msg['move_infront']) . "';\n\tvar msg_move_behind='" . addslashes($msg['move_behind']) . "';\n\tvar msg_move_up='" . addslashes($msg['move_up']) . "';\n\tvar msg_move_down='" . addslashes($msg['move_down']) . "';\n\tvar msg_move_invisible='" . addslashes($msg['move_invisible']) . "';\n\tvar msg_move_visible='" . addslashes($msg['move_visible']) . "';\n\tvar msg_move_saved_onglet_state='" . addslashes($msg['move_saved_onglet_state']) . "';\n\tvar msg_move_open_tab='" . addslashes($msg['move_open_tab']) . "';\n\tvar msg_move_close_tab='" . addslashes($msg['move_close_tab']) . "';\n</script>\n<script type='text/javascript'>\n\tfunction focus_tit1(){\n\t\tvar f_tit1 = document.getElementById('f_tit1');\n\t\tif (f_tit1) {\n\t\t\tf_tit1.focus();\n\t\t}\n\t}\n</script>\n<form class='form-{$current_module}' id='notice' name='notice' method='post' action='!!action!!' enctype='multipart/form-data' >\n<h3><div class='left'>!!libelle_form!!</div><div class='right'>";
if ($PMBuserid == 1 && $pmb_form_editables == 1) {
    $form_notice .= "<input type='button' class='bouton_small' value='" . $msg["catal_edit_format"] . "' onClick=\"expandAll(); move_parse_dom(relative)\" id=\"bt_inedit\"/><input type='button' class='bouton_small' value='Relatif' onClick=\"expandAll(); move_parse_dom((!relative))\" style=\"display:none\" id=\"bt_swap_relative\"/>";
}
if ($pmb_form_editables == 1) {
コード例 #4
0
 public function get_map_profiles()
 {
     $returnedDatas = array();
     switch ($this->type_object) {
         case AUT_TABLE_AUTHORS:
             break;
         case AUT_TABLE_CATEG:
             break;
         case AUT_TABLE_PUBLISHERS:
             break;
         case AUT_TABLE_COLLECTIONS:
             break;
         case AUT_TABLE_SUB_COLLECTIONS:
             break;
         case AUT_TABLE_SERIES:
             break;
         case AUT_TABLE_TITRES_UNIFORMES:
             $mapper = form_mapper::getMapper('tu');
             break;
         case AUT_TABLE_INDEXINT:
             break;
         case AUT_TABLE_CONCEPT:
             break;
         case AUT_TABLE_AUTHPERSO:
             break;
     }
     if ($mapper) {
         $mapper->setId($this->num_object);
         $destinations = $mapper->getDestinations();
         foreach ($destinations as $dest) {
             $returnedDatas[] = $mapper->getProfiles($dest);
         }
     }
     return $returnedDatas;
 }