Пример #1
0
<?php

// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: req.inc.php,v 1.2 2009-06-25 16:33:22 dbellamy Exp $
if (stristr($_SERVER['REQUEST_URI'], ".inc.php")) {
    die("no access");
}
require_once $class_path . '/request.class.php';
require_once $class_path . '/requester.class.php';
require_once $include_path . '/templates/requests.tpl.php';
//Traitement des données
//TODO traitement pour conversion en UTF8
$req_datas = $_POST;
$rqt = new requester();
switch ($fname) {
    case 'buildRequest':
        $request = $rqt->buildRequest($req_type, $req_univ, $req_nb_lines, $req_datas);
        ajax_http_send_response($request);
        break;
    case 'getAttributes':
        if ($c_type != "FI") {
            $c_type = '';
        }
        $attr = $rqt->getAttributes($fct_id, $c_type);
        ajax_http_send_response($attr, "text/xml");
        break;
    default:
        break;
}
Пример #2
0
// +-------------------------------------------------+
// © 2002-2004 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: requests_selector.php,v 1.3 2012-09-06 08:00:12 ngantier Exp $
$base_path = ".";
$base_noheader = 1;
$base_nobody = 1;
$base_nocheck = 1;
require_once "includes/init.inc.php";
require_once "{$class_path}/requester.class.php";
require_once "{$class_path}/marc_table.class.php";
header("Content-Type: text/html; charset={$charset}");
$start = stripslashes($datas);
$start = str_replace("*", "%", $start);
$rqt = new requester();
switch ($completion) {
    case 'req_fiel':
        // récupération des champs accessibles à partir de l'univers défini
        if (!$req_univ) {
            die;
        }
        $t = $rqt->getFieldUnivList($req_univ);
        $array_selector = array();
        foreach ($t as $k => $v) {
            $array_selector[$k]['t'] = $v['desc_t'];
            $array_selector[$k]['f'] = $v['desc_f'];
        }
        $origine = "ARRAY";
        break;
    default: