예제 #1
0
 public function get_form()
 {
     $args = "num_record:" . $this->id . "";
     if ($this->id_parent) {
         $args .= ",child_detail :\"" . addslashes(encoding_normalize::json_encode($this->nomenclature_record->record_child->get_data())) . "\"";
     } else {
         $args .= ",record_formations :\"" . addslashes(encoding_normalize::json_encode($this->nomenclature_record->record_formations->get_data())) . "\"";
     }
     $div = nomenclature_datastore::get_form();
     return $div . "<div data-dojo-type='apps/nomenclature/nomenclature_record_ui' data-dojo-props='" . $args . "'></div>";
 }
예제 #2
0
 function process($source_id, $pmb_user_id)
 {
     global $opac_biblio_name, $opac_biblio_email;
     global $biblio_name, $biblio_adr1, $biblio_adr2, $biblio_cp, $biblio_town, $biblio_state, $biblio_country, $biblio_phone, $biblio_email, $biblio_website;
     global $biblio_logo;
     $source = new bibloto_source($this, $source_id, $this->msg);
     $param = $source->config;
     $param['biblio']['name'] = $opac_biblio_name;
     $param['biblio']['adr1'] = $biblio_adr1;
     $param['biblio']['adr2'] = $biblio_adr2;
     $param['biblio']['cp'] = $biblio_cp;
     $param['biblio']['town'] = $biblio_town;
     $param['biblio']['phone'] = $biblio_phone;
     $param['biblio']['email'] = $opac_biblio_email;
     echo encoding_normalize::json_encode($param);
     return;
 }
예제 #3
0
<?php

// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: messages.inc.php,v 1.3 2015-02-19 13:56:20 vtouchard Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
require_once $class_path . "/encoding_normalize.class.php";
switch ($action) {
    case 'get_messages':
        if ($group) {
            if ($messages->table_js[$group]) {
                $array_message_retourne = array();
                foreach ($messages->table_js[$group] as $key => $value) {
                    $array_message_retourne[] = array("code" => $key, "message" => $value, "group" => $group);
                }
                print encoding_normalize::json_encode($array_message_retourne);
            } else {
                print encoding_normalize::json_encode(array());
            }
        }
        break;
}
예제 #4
0
 /**
  * Renvoie le formulaire de la vedette composée
  * 
  * @param $property onto_common_property
  * @param $restrictions onto_restriction
  * @param $datas
  * @param $instance_name
  *
  * @return string
  * @access public
  */
 public function get_form($property, $order, $instance_name)
 {
     global $dbh, $base_path, $charset, $lang;
     global $vedette_tpl;
     //TODO Retirer le style brut
     $form_html = $vedette_tpl['css'] . $vedette_tpl['form_body'];
     if (!count($this->vedette_composee->get_elements())) {
         $form_html = str_replace("!!vedette_composee_apercu!!", "", $form_html);
     } else {
         $form_html = str_replace("!!vedette_composee_apercu!!", $this->vedette_composee->get_label(), $form_html);
     }
     $form_html = str_replace("!!vedette_composee_id!!", $this->vedette_composee->get_id(), $form_html);
     $form_html = str_replace("!!vedette_composee_type!!", $property->range[0], $form_html);
     //les champs disponibles
     $available_fields_html = '';
     $available_fields_scripts = "";
     $get_vedette_element_switchcases = "";
     foreach ($this->vedette_composee->get_available_fields() as $key => $available_field) {
         $vedette_element_ui_class_name = vedette_element::search_vedette_element_ui_class_name($available_field["class_name"]);
         if ($available_field['params']) {
             $available_fields_scripts .= $vedette_element_ui_class_name::get_create_box_js($available_field['params']);
         } else {
             $available_fields_scripts .= $vedette_element_ui_class_name::get_create_box_js();
         }
         $get_vedette_element_switchcases .= str_replace("!!vedette_type!!", $available_field["class_name"], $vedette_tpl["vedette_composee_get_vedette_element_switchcase"]);
         $tmp_html = $vedette_tpl['vedette_composee_available_field'];
         $tmp_html = str_replace("!!available_field_id!!", $key, $tmp_html);
         $tmp_html = str_replace("!!available_field_type!!", $available_field["class_name"], $tmp_html);
         $tmp_html = str_replace("!!vedette_composee_available_field_label!!", get_msg_to_display($available_field['name']), $tmp_html);
         $available_fields_html .= $tmp_html;
     }
     $form_html = str_replace("!!available_fields_scripts!!", $available_fields_scripts, $form_html);
     $form_html = str_replace("!!vedette_composee_available_fields!!", $available_fields_html, $form_html);
     $form_html = str_replace("!!get_vedette_element_switchcases!!", $get_vedette_element_switchcases, $form_html);
     //les zones de subdivision
     $subdivisions_html = '';
     $tab_vedette_elements = array();
     //On parcourt les subdivisions
     foreach ($this->vedette_composee->get_subdivisions() as $key => $subdivision) {
         $tmp_html = $vedette_tpl['vedette_composee_subdivision'];
         $tab_vedette_elements[$subdivision["order"]] = array();
         if ($subdivision["min"]) {
             $tmp_html = str_replace("!!vedette_composee_subdivision_cardmin!!", $subdivision["min"], $tmp_html);
         } else {
             $tmp_html = str_replace("!!vedette_composee_subdivision_cardmin!!", "", $tmp_html);
         }
         if ($subdivision["max"]) {
             $tmp_html = str_replace("!!vedette_composee_subdivision_cardmax!!", $subdivision["max"], $tmp_html);
         } else {
             $tmp_html = str_replace("!!vedette_composee_subdivision_cardmax!!", "", $tmp_html);
         }
         $tmp_html = str_replace("!!vedette_composee_subdivision_order!!", $subdivision["order"], $tmp_html);
         $elements_html = '';
         if ($elements = $this->vedette_composee->get_at_elements_subdivision($subdivision['code'])) {
             // tableau pour la gestion de l'ordre à l'intérieur d'une subdivision
             $elements_order = array();
             // On parcourt les éléments de la subdivision
             foreach ($elements as $position => $element) {
                 $current_element_html = $vedette_tpl['vedette_composee_element'];
                 $elements_order[] = $position;
                 $tab_vedette_elements[$subdivision["order"]][$position] = $element->get_isbd();
                 $element_ui_class_name = vedette_element::search_vedette_element_ui_class_name(get_class($element));
                 if ($element->params) {
                     $current_element_html = str_replace("!!vedette_composee_element_form!!", $element_ui_class_name::get_form($element->params), $current_element_html);
                 } else {
                     $current_element_html = str_replace("!!vedette_composee_element_form!!", $element_ui_class_name::get_form(), $current_element_html);
                 }
                 $current_element_html = str_replace("!!vedette_composee_element_order!!", $position, $current_element_html);
                 $current_element_html = str_replace("!!vedette_composee_element_type!!", get_class($element), $current_element_html);
                 $current_element_html = str_replace("!!vedette_element_rawlabel!!", $element->get_isbd(), $current_element_html);
                 $field_class_name = $this->vedette_composee->get_at_available_field_class_name(get_class($element));
                 $autority_type = get_msg_to_display($field_class_name["name"]);
                 $current_element_html = str_replace("!!vedette_element_label!!", "[" . $autority_type . "] " . $element->get_isbd(), $current_element_html);
                 $current_element_html = str_replace("!!vedette_element_id!!", $element->get_id(), $current_element_html);
                 $elements_html .= $current_element_html;
             }
             $tmp_html = str_replace("!!vedette_composee_subdivision_elements!!", $elements_html, $tmp_html);
             $tmp_html = str_replace("!!elements_order!!", implode(",", $elements_order), $tmp_html);
         } else {
             $tmp_html = str_replace("!!vedette_composee_subdivision_elements!!", "", $tmp_html);
             $tmp_html = str_replace("!!elements_order!!", "", $tmp_html);
         }
         $tmp_html = str_replace("!!vedette_composee_subdivision_label!!", get_msg_to_display($subdivision['name']), $tmp_html);
         $tmp_html = str_replace("!!vedette_composee_subdivision_id!!", $subdivision['code'], $tmp_html);
         $subdivisions_html .= $tmp_html;
     }
     $form_html = str_replace("!!vedette_composee_subdivisions!!", $subdivisions_html, $form_html);
     $form_html = str_replace("!!caller!!", $instance_name, $form_html);
     $form_html = str_replace("!!vedette_composee_order!!", $order, $form_html);
     $form_html = str_replace("!!property_name!!", $property->pmb_name . "_composed", $form_html);
     $form_html = str_replace("!!tab_vedette_elements!!", encoding_normalize::json_encode($tab_vedette_elements), $form_html);
     $form_html = str_replace("!!vedette_separator!!", htmlentities($this->vedette_composee->get_separator(), ENT_QUOTES), $form_html);
     return $form_html;
 }
예제 #5
0
                    $response = array('result' => $result, 'elementId' => $docwatch_datasource->get_id(), 'response' => $response);
                    print encoding_normalize::json_encode($response);
                }
                break;
            case "get_env":
                $element = new $elem();
                print $element->get_page_env_select($pageid, $name, $var);
                break;
        }
        break;
    case "forms":
        require_once $class_path . "/docwatch/docwatch_ui.class.php";
        switch ($action) {
            case "get_form":
                switch ($form) {
                    case "docwatch_watch_form_tpl":
                        print docwatch_ui::get_watch_form();
                        break;
                    case "docwatch_category_form_tpl":
                        print docwatch_ui::get_category_form();
                        break;
                }
                break;
            case "get_datas":
                print encoding_normalize::json_encode(array("categoryForm" => docwatch_ui::get_category_form(), "watchForm" => docwatch_ui::get_watch_form()));
                break;
        }
        break;
    default:
        break;
}
예제 #6
0
            return false;
        } else {
            print encoding_normalize::json_encode(array('status' => false));
        }
        break;
    case "get_datas":
        $datas = json_decode(stripslashes($datas));
        $query = 'select grille_auth_descr_format from grilles_auth
					where grille_auth_type="' . addslashes($datas->authType) . '"
					and grille_auth_filter="' . addslashes($datas->authSign) . '"';
        $result = pmb_mysql_query($query);
        if ($result && pmb_mysql_num_rows($result)) {
            $datas = pmb_mysql_result($result, 0);
            print encoding_normalize::json_encode(array('status' => true, 'datas' => $datas));
        } else {
            print encoding_normalize::json_encode(array('status' => false));
        }
        break;
    default:
        ajax_http_send_error("404 Not Found", "Invalid command : " . $action);
        break;
}
function save_grid($auth_type, $auth_sign, $zones)
{
    global $dbh;
    $query = 'select grille_auth_type from grilles_auth
					where grille_auth_type="' . addslashes($auth_type) . '"
					and grille_auth_filter="' . addslashes($auth_sign) . '"';
    $result = pmb_mysql_query($query);
    if ($result && pmb_mysql_num_rows($result)) {
        $requete = 'update grilles_auth set
예제 #7
0
// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: ajax_main.inc.php,v 1.1 2015-07-31 16:06:57 vtouchard Exp $
require_once $class_path . '/expl.class.php';
require_once $include_path . '/connecteurs_out_common.inc.php';
switch ($sub) {
    case 'update_cb':
        if (isset($old_cb) && isset($new_cb) && (trim($old_cb) != '' && trim($new_cb) != '')) {
            switch (exemplaire::update_cb($old_cb, $new_cb)) {
                case 0:
                    //Le nouveau code est déjà utilisé dans pmb
                    print encoding_normalize::json_encode(array('status' => 0, 'message' => $msg['pointage_message_code_utilise']));
                    break;
                case 1:
                    //La mise à jour a fonctionnée
                    print encoding_normalize::json_encode(array('status' => 1, 'message' => ''));
                    break;
                case 2:
                    //Impossible d'effectuer la mise à jour
                    print encoding_normalize::json_encode(array('status' => 2, 'message' => $msg['circ_edit_cb_end_up']));
                    break;
                case 3:
                    //L'utilisateur n'a pas les droits nécessaires pour effectuer la mise à jour
                    print encoding_normalize::json_encode(array('status' => 3, 'message' => $msg[12]));
                    break;
            }
        }
        break;
}
 public function get_possible_values($num_parent)
 {
     return encoding_normalize::json_encode($this->record_child->get_possible_values($num_parent));
 }
예제 #9
0
<?php

// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: docwatch.tpl.php,v 1.22 2015-12-15 11:37:28 dgoron Exp $
if (stristr($_SERVER['REQUEST_URI'], ".tpl.php")) {
    die("no access");
}
$docwatch_tpl = "\n<script type='text/javascript' src='./javascript/ajax.js'></script>\n<script type='text/javascript'>\n\tdojo.require('dojox.layout.ContentPane');\n</script>\n<link rel='stylesheet' type='text/css' href='./javascript/dojo/dojox/grid/resources/Grid.css'>\n<link rel='stylesheet' type='text/css' href='./javascript/dojo/dojox/grid/resources/claroGrid.css'>\n\t\t\n<div data-dojo-id='availableDatasources' data-dojo-type='dojo/store/Memory' data-dojo-props='data:" . htmlentities(encoding_normalize::json_encode(docwatch_watch::get_available_datasources()), ENT_QUOTES, "utf-8") . "'>\n<div data-dojo-id='availableDatatags' data-dojo-type='dojo/store/Memory' data-dojo-props='data:" . htmlentities(encoding_normalize::json_encode(docwatch_item::get_available_datatags()), ENT_QUOTES, "utf-8") . "'>\n\n</div>\n<div data-dojo-type='dijit/layout/BorderContainer' data-dojo-props='splitter:true' style='height:800px;width:100%;'>\n\t<div data-dojo-type='apps/docwatch/WatchesUI' data-dojo-props='splitter:true,region:\"left\"' style='height:100%;width:200px;'>\n\t</div>\n\t<div data-dojo-type='dijit/layout/BorderContainer' data-dojo-props='splitter:true,region:\"center\"' style='height:100%;width:auto;'>\n\t\t<div data-dojo-type='dijit/layout/TabContainer' data-dojo-props='splitter:true,region:\"top\"' style='width:auto;height:50%'>\n\t\t\t<div data-dojo-type='apps/docwatch/ItemsListUI' title='" . $msg['dsi_docwatch_itemslistui_title'] . "'>\n\t\t\t</div>\n\t\t\t<div data-dojo-type='apps/docwatch/SourcesListUI' title='" . $msg['dsi_docwatch_sourceslistui_title'] . "'>\n\t\t\t</div>\n\t\t</div>\n\t\t<div  data-dojo-props='region:\"center\"' style='width:auto;height:50%' data-dojo-type='apps/docwatch/ItemUI'></div>\n\t\t<div  data-dojo-props='region:\"center\"' style='width:auto;display:none;height:50%;overflow:auto' data-dojo-type='apps/docwatch/SourceUI'></div>\n\t</div>\t\n</div>\n";
$docwatch_new_source_form_tpl = '
<form data-dojo-attach-point="containerNode" data-dojo-attach-event="onreset:_onReset,onsubmit:_onSubmit" ${!nameAttrSetting}>	
	<h3>' . $msg["dsi_docwatch_add_source"] . '</h3>
	<div class="form-contenu">
		<select name="selector_choice" data-dojo-type="dijit/form/Select" style="width:auto">
			<option value="0">' . $msg['dsi_'] . '</option>';
foreach (docwatch_watch::get_available_datasources() as $class => $label) {
    $docwatch_new_source_form_tpl .= '
			<option value="' . $class . '">' . $label . '</option>';
}
$docwatch_new_source_form_tpl .= '
		</select>		
	</div>
</form>';
$docwatch_watch_form_tpl = '
<div style="width: 400px; height: 500px; overflow: auto;">
<form data-dojo-attach-point="containerNode" data-dojo-attach-event="onreset:_onReset,onsubmit:_onSubmit" ${!nameAttrSetting}>	
	<div class="form-contenu">
		<input type="hidden" name="id" id="id" value=""/>
		<div class="row">
			<label>' . encoding_normalize::utf8_normalize($msg['dsi_docwatch_category_form_category_parent']) . '</label>
예제 #10
0
// +-------------------------------------------------+
// � 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: ajax_main.inc.php,v 1.1 2016-01-06 15:05:58 dgoron Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
require_once $class_path . "/encoding_normalize.class.php";
require_once $class_path . "/nomenclature/nomenclature_instrument.class.php";
switch ($sub) {
    case "instrument":
        switch ($action) {
            case "create":
                $return = nomenclature_instrument::create();
                print encoding_normalize::json_encode($return);
                break;
        }
        break;
    case "forms":
        switch ($action) {
            case "get_form":
                switch ($form) {
                    case "nomenclature_instrument_form_tpl":
                        print nomenclature_instrument::get_dialog_form();
                        break;
                }
                break;
        }
        break;
    default:
예제 #11
0
        $css = $_SESSION["css"] = $opac_default_style;
    }
}
// si paramétrage authentification particulière et pour la re-authentification ntlm
if (file_exists($base_path . '/includes/ext_auth.inc.php')) {
    require_once $base_path . '/includes/ext_auth.inc.php';
}
function array_uft8_decode($tab)
{
    foreach ($tab as $key => $val) {
        if (is_array($val)) {
            $tab[$key] = array_uft8_decode($val);
        } else {
            $tab[$key] = utf8_decode($val);
        }
    }
    return $tab;
}
//TOUT EST CHARGE, on va au plus simple...
$elems = explode("/", $_SERVER['PATH_INFO']);
require_once $class_path . "/autoloader.class.php";
$autoloader = new autoloader();
$autoloader->add_register("cms_modules", true);
if (file_exists('./temp/' . $elems[1])) {
    $content = unserialize(file_get_contents('./temp/' . $elems[1]));
    $jsonsource = new $content['classname']($content['id']);
    $jsonsource->set_datas($content['datas']);
    $jsonsource->set_nb_row($content['nb_row']);
    //   	header('Content-Type: application/json');
    print encoding_normalize::json_encode($jsonsource->store_proceed($content));
}
 public function get_form()
 {
     $data = encoding_normalize::json_encode($this->record_formations->get_data());
     $div .= "\n  \t\t<script type='text/javascript' src='./javascript/instru_drag_n_drop.js'></script>\n  \t\t<div id='nomenclature_record_formations_" . $this->record_formations->get_id() . "' data-dojo-type='apps/nomenclature/nomenclature_record_formations_ui' data-dojo-props='num_record:" . $this->record_formations->id . ",record_formations:\"" . addslashes($data) . "\"'></div>";
     return $div;
 }
예제 #13
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'));
    }
}
예제 #14
0
<?php

// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: nomenclature.inc.php,v 1.4 2015-02-10 17:45:39 arenou Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
switch ($sub) {
    case 'record_child':
        require_once $class_path . "/nomenclature/nomenclature_record_child_ui.class.php";
        $record_child = new nomenclature_record_child_ui($id);
        switch ($action) {
            case "create":
                print encoding_normalize::json_encode($record_child->create_record_child($id_parent));
                break;
            case "get_child":
                print $record_child->get_child($id_parent);
                break;
            case "get_possible_values":
                print $record_child->get_possible_values($id_parent);
                break;
        }
        break;
}