本文整理汇总了PHP中_parser_函数的典型用法代码示例。如果您正苦于以下问题:PHP _parser_函数的具体用法?PHP _parser_怎么用?PHP _parser_使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_parser_函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: aff_choix_quoi_export
function aff_choix_quoi_export($action = "", $action_cancel = "", $titre_form = "", $bouton_valider = "")
{
global $cart_choix_quoi_exporter;
global $catalog;
global $base_path;
$cart_choix_quoi_exporter = str_replace('!!action!!', $action, $cart_choix_quoi_exporter);
$cart_choix_quoi_exporter = str_replace('!!action_cancel!!', $action_cancel, $cart_choix_quoi_exporter);
$cart_choix_quoi_exporter = str_replace('!!titre_form!!', $titre_form, $cart_choix_quoi_exporter);
$cart_choix_quoi_exporter = str_replace('!!bouton_valider!!', $bouton_valider, $cart_choix_quoi_exporter);
//Lecture des différents exports possibles
$catalog = array();
$n_typ_total = 0;
if (file_exists("{$base_path}/admin/convert/imports/catalog_subst.xml")) {
$fic_catal = "{$base_path}/admin/convert/imports/catalog_subst.xml";
} else {
$fic_catal = "{$base_path}/admin/convert/imports/catalog.xml";
}
_parser_($fic_catal, array("ITEM" => "_item_"), "CATALOG");
//Création de la liste des types d'import
$export_type = "<select name=\"export_type\" id=\"export_type\">\n";
for ($i = 0; $i < count($catalog); $i++) {
$export_type .= "<option value=\"" . $catalog[$i][INDEX] . "\">" . $catalog[$i][NAME] . "</option>\n";
}
$export_type .= "</select>";
$cart_choix_quoi_exporter = str_replace("!!export_type!!", $export_type, $cart_choix_quoi_exporter);
$param = new export_param(EXP_DEFAULT_GESTION);
$cart_choix_quoi_exporter = str_replace("!!form_param!!", $param->check_default_param(), $cart_choix_quoi_exporter);
return $cart_choix_quoi_exporter;
}
示例2: fetch_data
function fetch_data()
{
global $dbh, $lang, $include_path;
if (file_exists($include_path . "/section_param/{$lang}.xml")) {
_parser_($include_path . "/section_param/{$lang}.xml", array("SECTION" => "_section_"), "PMBSECTIONS");
$this->allow_section = 1;
}
$this->subst_param = array();
$myQuery = mysql_query("SELECT * FROM param_subst where subst_type_param= '" . $this->type . "' and subst_module_param= '" . $this->module . "' and subst_module_num= '" . $this->module_num . "' ", $dbh);
if (mysql_num_rows($myQuery)) {
while ($r = mysql_fetch_assoc($myQuery)) {
$this->subst_param[] = $r;
}
}
$this->no_subst_param = array();
$myQuery = mysql_query("SELECT * FROM parametres where type_param= '" . $this->type . "' and gestion=0 order by section_param,sstype_param", $dbh);
while ($r = mysql_fetch_assoc($myQuery)) {
$found = 0;
foreach ($this->subst_param as $key => $subst_param) {
if ($subst_param['subst_sstype_param'] == $r['sstype_param']) {
$this->subst_param[$key]['valeur_param_origine'] = $r['valeur_param'];
$this->subst_param[$key]['section_param'] = $r['section_param'];
$found = 1;
break;
}
}
if (!$found) {
$this->no_subst_param[] = $r;
}
}
}
示例3: show_form
function show_form()
{
global $import_sug_form, $dbh, $charset, $msg;
global $catalog;
global $catalog_import;
global $explnumdoc_id;
if ($explnumdoc_id) {
$req = "select SUBSTRING(explnum_doc_data,1,250) as data, sugg_source, origine, type_origine from explnum_doc\n\t\t\tjoin explnum_doc_sugg on num_explnum_doc=id_explnum_doc\n\t\t\tleft join suggestions on num_suggestion=id_suggestion\n\t\t\tleft join suggestions_origine so on so.num_suggestion=id_suggestion\n\t\t\twhere id_explnum_doc='" . $explnumdoc_id . "'";
$res = mysql_query($req, $dbh);
$expl = mysql_fetch_object($res);
$import_file = htmlentities($expl->data, ENT_QUOTES, $charset);
$import_sug_form = str_replace('!!explnum_id!!', $explnumdoc_id, $import_sug_form);
$source = $expl->sugg_source;
$origine = $expl->origine;
$type_origine = $expl->type_origine;
$import_sug_form = str_replace('!!origine_id!!', $origine, $import_sug_form);
$import_sug_form = str_replace('!!type_origine!!', $type_origine, $import_sug_form);
} else {
$import_sug_form = str_replace('!!explnum_id!!', "", $import_sug_form);
$import_file = "<input class='saisie-80em' size='65' type='file' name='import_file' id='import_file' />\t";
$source = 0;
$import_sug_form = str_replace('!!origine_id!!', "", $import_sug_form);
$import_sug_form = str_replace('!!type_origine!!', "", $import_sug_form);
}
$import_sug_form = str_replace('!!import_file!!', $import_file, $import_sug_form);
$req = "select * from suggestions_source order by libelle_source";
$res = mysql_query($req, $dbh);
$option = "<option value='0'>" . htmlentities($msg['acquisition_sugg_no_src'], ENT_QUOTES, $charset) . "</option>";
while ($src = mysql_fetch_object($res)) {
if ($src->id_source == $source) {
$selected = "selected";
}
$option .= "<option value='" . $src->id_source . "' {$selected}>" . htmlentities($src->libelle_source, ENT_QUOTES, $charset) . "</option>";
$selected = "";
}
$selecteur = "<select id='src_liste' name='src_liste'>" . $option . "</select>";
$import_sug_form = str_replace('!!liste_source!!', $selecteur, $import_sug_form);
//Lecture des différents imports possibles
if (file_exists("./admin/convert/imports/catalog_subst.xml")) {
$fic_catal = "./admin/convert/imports/catalog_subst.xml";
} else {
$fic_catal = "./admin/convert/imports/catalog.xml";
}
$catalog = array();
_parser_($fic_catal, array("ITEM" => "_item_"), "CATALOG");
//Création de la liste des types d'import
$select_import = "<select name=\"import_type\">\n";
for ($i = 0; $i < count($catalog); $i++) {
if ($catalog_import[$i] == "yes" && $catalog[$i]) {
$select_import .= "<option value=\"{$i}\">" . $catalog[$i] . "</option>\n";
}
}
$select_import .= "<option value='uni'>" . $msg[acquisition_import_sugg_uni] . "</option>";
$select_import .= "</select>";
$import_sug_form = str_replace('!!liste_import!!', $select_import, $import_sug_form);
print $import_sug_form;
}
示例4: show_param
function show_param($dbh)
{
global $msg;
global $begin_result_liste;
global $form_type_param, $form_sstype_param;
// si modif , ces valeurs sont connues, on va faire une ancre avec
global $lang;
global $include_path;
global $section_table;
$allow_section = 0;
if (file_exists($include_path . "/section_param/{$lang}.xml")) {
_parser_($include_path . "/section_param/{$lang}.xml", array("SECTION" => "_section_"), "PMBSECTIONS");
$allow_section = 1;
}
//print $begin_result_liste ;
$requete = "select * from parametres where gestion=0 order by type_param, section_param, sstype_param ";
$res = mysql_query($requete, $dbh);
$i = 0;
while ($param = mysql_fetch_object($res)) {
if (!$type_param) {
$type_param = $param->type_param;
$creer = 1;
$fincreer = 0;
$odd_even = 0;
} elseif ($type_param != $param->type_param) {
$type_param = $param->type_param;
$creer = 1;
$fincreer = 1;
$odd_even = 0;
} else {
$creer = 0;
$fincreer = 0;
}
if ($section_param != $param->section_param && $allow_section) {
$section_param = $param->section_param;
$creer_section = 1;
} else {
$creer_section = 0;
}
if ($fincreer) {
print "</tbody></tgroup></table></sect2>\n";
}
if ($creer) {
$lab_param = $msg["param_" . $type_param];
if ($lab_param == "") {
$lab_param = $type_param;
}
print "<sect2 id=\"admin_outils_parametres_z3950\"><title lang=\"fr\">" . $lab_param . "</title>\n" . "<table><title lang=\"fr\">" . $msg['admin_param_detail'] . "</title>\n" . $desc["description_" . $type_param] . "<tgroup cols=\"3\"><colspec colname='c1'/><colspec colname='c2'/><colspec colname='c3'/><thead><row>\n" . "<entry lang=\"fr\">sous-type</entry>\n" . "<entry lang=\"fr\">valeur par défaut</entry>\n" . "<entry lang=\"fr\">commentaire</entry>\n" . "</row></thead>\n" . "<tbody>";
}
if ($creer_section) {
print "\n<row><entry lang=\"fr\" namest=\"c1\" nameend=\"c3\" align=\"center\"><emphasis role=\"bold\">" . "<![CDATA[" . $section_table[$section_param]["LIB"] . "]]></emphasis></entry></row>";
}
print "\n<row>\n" . "<entry lang=\"fr\"><![CDATA[" . $param->sstype_param . "]]></entry>\n" . "<entry lang=\"fr\"><![CDATA[" . $param->valeur_param . "]]></entry>\n" . "<entry lang=\"fr\"><![CDATA[" . $param->comment_param . "]]></entry>\n" . "</row>\n";
}
// fin while
print "</tbody></tgroup></table></sect2>\n";
}
示例5: getFormats
function getFormats()
{
global $charset;
global $base_path;
//l'entete du xml
$this->xml = "<?xml version='1.0' encoding='{$charset}'?>\n\t<formats " . ($this->id ? "id='" . $this->id . "'" : "") . ">";
if (file_exists("{$base_path}/admin/convert/imports/zotero_subst.xml")) {
$fic_zotero = "{$base_path}/admin/convert/imports/zotero_subst.xml";
} else {
$fic_zotero = "{$base_path}/admin/convert/imports/zotero.xml";
}
_parser_($fic_zotero, array("FORMAT" => array('obj' => $this, 'method' => "getFormatInfo")), "FORMATS");
$this->xml .= "\n\t</formats>";
}
示例6: create_tableau_mimetype
function create_tableau_mimetype()
{
global $lang;
global $include_path;
global $_mimetypes_bymimetype_, $_mimetypes_byext_;
if (sizeof($_mimetypes_bymimetype_)) {
return;
}
$_mimetypes_bymimetype_ = array();
$_mimetypes_byext_ = array();
require_once "{$include_path}/parser.inc.php";
if (file_exists($include_path . "/mime_types/" . $lang . "_subst.xml")) {
$fic_mime_types = $include_path . "/mime_types/" . $lang . "_subst.xml";
} else {
$fic_mime_types = $include_path . "/mime_types/" . $lang . ".xml";
}
$fonction = array("MIMETYPE" => "__mimetype__");
_parser_($fic_mime_types, $fonction, "MIMETYPELIST");
}
示例7: unserialize
function unserialize($str)
{
global $include_path;
global $openurl_map;
global $url_ctx_val, $url_ctx_ref;
$openurl_map = array();
//on va avoir besoin du mapping...
require_once "{$include_path}/parser.inc.php";
_parser_($include_path . "/openurl/openurl_mapping.xml", array("ITEM" => "_getMapItem_"), "MAP");
$ctx = new openurl_context_object_kev_mtx_ctx();
if ($url_ctx_val != "") {
//Transport By-Value
$ctx->unserialize($url_ctx_val);
} else {
if ($url_ctx_ref != "") {
//Transport By-Reference
$content = openurl_transport_http::get($url_ctx_ref);
$ctx->unserialize($content);
} else {
//Transport Inline
$ctx->unserialize($str);
}
}
}
示例8: _parser_
$output = $param['IMPORTABLE'];
$output_type = $param['TYPE'];
$output_params = $param;
}
//Lecture des paramètres d'import
//Récupération du répertoire
$i = 0;
$param_path = "";
if (file_exists("imports/catalog_subst.xml")) {
$fic_catal = "imports/catalog_subst.xml";
} else {
$fic_catal = "imports/catalog.xml";
}
_parser_($fic_catal, array("ITEM" => "_item_"), "CATALOG");
//Lecture des paramètres
_parser_("imports/" . $param_path . "/params.xml", array("IMPORTNAME" => "_import_name_", "NPERPASS" => "_n_per_pass_", "INPUT" => "_input_", "STEP" => "_step_", "OUTPUT" => "_output_"), "PARAMS");
//Inclusion des librairies éventuelles
for ($i = 0; $i < count($step); $i++) {
if ($step[$i]['TYPE'] == "custom") {
//echo "imports/".$param_path."/".$step[$i][SCRIPT][0][value];
require_once "imports/" . $param_path . "/" . $step[$i]['SCRIPT'][0]['value'];
}
}
require_once "xmltransform.php";
//En fonction du type de fichier d'entrée, inclusion du script de gestion des entrées
switch ($input_type) {
case "xml":
require_once "imports/input_xml.inc.php";
break;
case "iso_2709":
require_once "imports/input_iso_2709.inc.php";
示例9: source_get_property_form
function source_get_property_form($source_id)
{
global $charset, $basepath;
$params = $this->get_source_params($source_id);
if ($params["PARAMETERS"]) {
//Affichage du formulaire avec $params["PARAMETERS"]
$vars = unserialize($params["PARAMETERS"]);
foreach ($vars as $key => $val) {
global ${$key};
${$key} = $val;
}
}
if (!isset($convert_type)) {
$convert_type = "";
}
//Lecture des différents imports possibles
if (file_exists($basepath . "admin/convert/imports/catalog_subst.xml")) {
$fic_catal = $basepath . "admin/convert/imports/catalog_subst.xml";
} else {
$fic_catal = $basepath . "admin/convert/imports/catalog.xml";
}
global $catalogs;
$catalogs = array();
_parser_($fic_catal, array("ITEM" => "cfile_file_item_"), "CATALOG");
$convert_select = '<select name="convert_type">';
$selected = $convert_type == 'none_unimarc' ? "selected" : "";
$convert_select .= '<option ' . $selected . ' value="none_unimarc">' . $this->msg["cfile_noconversion_unimarc"] . '</option>';
$selected = $convert_type == 'none_xml' ? "selected" : "";
$convert_select .= '<option ' . $selected . ' value="none_xml">' . $this->msg["cfile_noconversion_pmbxml"] . '</option>';
foreach ($catalogs as $catalog) {
$selected = $convert_type == $catalog["path"] ? "selected" : "";
$convert_select .= '<option ' . $selected . ' value="' . $catalog["path"] . '">' . htmlentities($catalog["name"], ENT_QUOTES, $charset) . '</option>';
}
$convert_select .= '</select>';
$form = "";
$form .= "<div class='row'>\n\t\t\t<div class='colonne3'>\n\t\t\t\t<label for='url'>" . $this->msg["cfile_conversion"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='colonne_suite'>\n\t\t\t\t" . $convert_select . "\n\t\t\t</div>\n\t\t</div>\n\t\t<div class='row'>\n\t\t";
$xsl_exemplaire_input = "";
if (isset($xslt_exemplaire)) {
$xsl_exemplaire_input .= '<select name="action_xsl_expl"><option value="keep">' . sprintf($this->msg["cfile_keep_xsl_exemplaire"], $xslt_exemplaire["name"]) . '</option><option value="delete">' . $this->msg["cfile_delete_xsl_exemplaire"] . '</option></select>';
}
$xsl_exemplaire_input .= ' <input onchange="document.source_form.action_xsl_expl.selectedIndex=1" type="file" name="xsl_exemplaire">';
$form .= "\n\t\t<div class='row'>\n\t\t\t<div class='colonne3'>\n\t\t\t\t<label for='z3950_profils'>" . $this->msg["cfile_xsl_exemplaire"] . "</label>\n\t\t\t</div>\n\t\t\t<div class='colonne_suite'>\n\t\t\t\t" . $xsl_exemplaire_input . "\n\t\t\t</div>\n\t\t</div>\n\t\t<div class='row'>\n\t\t";
return $form;
}
示例10: get_exports
function get_exports()
{
global $export_list;
global $i, $iall;
global $base_path;
$i = 0;
$iall = 0;
_parser_("{$base_path}/admin/convert/imports/catalog.xml", array("ITEM" => "_item_export_list_"), "CATALOG");
return $export_list;
}
示例11: parse_convert_catalog
function parse_convert_catalog()
{
global $catalog, $base_path;
//Liste des transformations possibles avant import
$catalog = array();
$n_typ_total = 0;
if (file_exists("{$base_path}/admin/convert/imports/catalog_subst.xml")) {
$fic_catal = "{$base_path}/admin/convert/imports/catalog_subst.xml";
} else {
$fic_catal = "{$base_path}/admin/convert/imports/catalog.xml";
}
_parser_($fic_catal, array("ITEM" => "_item_z3950_"), "CATALOG");
$this->convert_path_order = $catalog;
}
示例12: die
break;
case "txt":
require_once "imports/output_txt.inc.php";
break;
default:
die($msg["export_cant_find_output_type"]);
}
//Création du fichier de sortie
$file_out = "export" . $origine . "." . $output_params['SUFFIX'] . "~";
} else {
//Récupération du répertoire
$i = 0;
$param_path == "";
_parser_($fic_catal, array("ITEM" => "_item_"), "CATALOG");
//Lecture des paramètres
_parser_("imports/" . $param_path . "/params.xml", array("OUTPUT" => "_output_", "INPUT" => "_input_"), "PARAMS");
//Si l'export est spécial, on charge la fonction d'export
if ($specialexport) {
require_once "imports/" . $param_path . "/export.inc.php";
}
}
//Requête de sélection et de comptage des notices
if ($n_current == "") {
$n_current = 0;
}
$typdoc = "typdoc{$lender}";
$td = ${$typdoc};
$statutdoc = "statut{$lender}";
$sd = ${$statutdoc};
$requete = "select notice_id from notices";
$requete_count = "select count(distinct notice_id) from notices";
示例13: show_param
function show_param($dbh)
{
global $msg;
global $begin_result_liste;
global $form_type_param, $form_sstype_param;
// si modif , ces valeurs sont connues, on va faire une ancre avec
global $lang;
global $include_path;
global $section_table;
$allow_section = 0;
if (file_exists($include_path . "/section_param/{$lang}.xml")) {
_parser_($include_path . "/section_param/{$lang}.xml", array("SECTION" => "_section_"), "PMBSECTIONS");
$allow_section = 1;
}
print $begin_result_liste;
$requete = "select * from parametres where gestion=0 order by type_param, section_param, sstype_param ";
$res = pmb_mysql_query($requete, $dbh);
$i = 0;
while ($param = pmb_mysql_fetch_object($res)) {
if (!$type_param) {
$type_param = $param->type_param;
$creer = 1;
$fincreer = 0;
$odd_even = 0;
} elseif ($type_param != $param->type_param) {
$type_param = $param->type_param;
$creer = 1;
$fincreer = 1;
$odd_even = 0;
} else {
$creer = 0;
$fincreer = 0;
}
if ($section_param != $param->section_param && $allow_section) {
$section_param = $param->section_param;
$creer_section = 1;
} else {
$creer_section = 0;
}
if ($fincreer) {
print "\n</table></div>";
}
if ($creer) {
$lab_param = $msg["param_" . $type_param];
if ($lab_param == "") {
$lab_param = $type_param;
}
print "\n<div id=\"el" . $type_param . "Parent\" class='parent' width=\"100%\">\n\t\t\t\t\t<img src=\"./images/plus.gif\" class=\"img_plus\" name=\"imEx\" id=\"el" . $type_param . "Img\" title=\"" . $msg['admin_param_detail'] . "\" border=\"0\" onClick=\"expandBase('el" . $type_param . "', true); return false;\" hspace=\"3\">\n\t\t\t\t\t<span class='heada'>" . $lab_param . "</span>\n\t\t\t\t\t<br />\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div id=\"el" . $type_param . "Child\" class=\"child\" style=\"margin-bottom:6px;display:none;\"";
if ($form_type_param == $type_param) {
print " startOpen='Yes' ";
}
print ">";
print "\n<table><tr>";
print "\n\t\t\t\t<th>" . $msg[1603] . "</th>\n\t\t\t\t<th>" . $msg[1604] . "</th>\n\t\t\t\t<th>" . $msg['param_explication'] . "</th></tr>";
}
if ($odd_even == 0) {
$class_liste = "odd";
$odd_even = 1;
} else {
if ($odd_even == 1) {
$class_liste = "even";
$odd_even = 0;
}
}
$surbrillance = "surbrillance";
if ($param->type_param == $form_type_param && $param->sstype_param == $form_sstype_param) {
$class_liste .= " justmodified";
$surbrillance .= " justmodified";
}
$tr_javascript = " onmouseover=\"this.className='{$surbrillance}'\" onmouseout=\"this.className='{$class_liste}'\" onmousedown=\"document.location='./admin.php?categ=param&action=modif&id_param=" . $param->id_param . "';\" ";
if ($creer_section) {
print "\n<tr><th colspan='3'><b>" . $section_table[$section_param]["LIB"] . "</b></th></tr>";
}
if ($param->type_param == $form_type_param && $param->sstype_param == $form_sstype_param) {
print "\n<tr class='{$class_liste}' {$tr_javascript} style='cursor: pointer;'>\n\t\t\t\t<td valign='top'><a name='justmodified'></a>{$param->sstype_param}</td>";
} else {
print "\n<tr class='{$class_liste}' {$tr_javascript} style='cursor: pointer'>\n\t\t\t\t\t<td valign='top'>{$param->sstype_param}</td>";
}
print "<td class='ligne_data'>{$param->valeur_param}</td><td valign='top'>{$param->comment_param}</td>\n</tr>";
}
// fin while
print "</table></div>";
}
示例14: from_sutrs
function from_sutrs($ss, $campo)
{
$base_path = "../..";
global $class_path;
global $lang;
global $include_path;
global $charset;
global $campi, $sep;
global $fun;
$campi = array();
// strip \r\n and spaces
$pattern = "/\r/";
$ss = preg_replace($pattern, "", $ss);
$pattern = "/\n /";
$ss = preg_replace($pattern, " ", $ss);
$pattern = "/\n/";
$ss = preg_replace($pattern, " ", $ss);
$pattern = "/\\s+/";
$ss = preg_replace($pattern, " ", $ss);
// put tag sutrs in sutrs record
foreach ($campo as $dummykey => $v) {
$dato[$v] = "";
$ss = preg_replace("/{$v}:/", "|{$v}::", $ss);
}
// explode fields sutrs in $dato (array)
$aX = preg_split("/\\|/", $ss);
foreach ($aX as $dummykey => $vv) {
$v = preg_split("/::/", $vv);
if ($dato[$v[0]] == '') {
$sep = '';
} else {
$sep = '|';
}
$dato[$v[0]] .= $sep . $v[1];
}
// copy $dato values to associative array $campi which keys are standard and in english
reset($campo);
while (list($k, $v) = each($campo)) {
$campi[$k] = $dato[$v];
}
//* DEBUG
// $fp = fopen ("../../temp/raw".rand().".unimarc","wb");
// fwrite ($fp,$lista[3]);
// fclose ($fp);
// text record construction in $notice
$sep = '|';
$notice = "";
//isbn
$notice .= sut_numbers();
// col. 1
$notice .= del_more_garbage(sut_authors());
// col. 2..28 (1 author = 3 col)
$notice .= del_more_garbage(sut_title());
// col.29..32
$notice .= sut_edition();
// col.33
$notice .= del_more_garbage(sut_editor());
// col.34..36
$notice .= del_more_garbage(sut_collection());
// col.37..40
// serie
$notice .= sut_dummy(2);
// col.41..42
$notice .= sut_decimalindex();
// col.43
$notice .= sut_freeindex();
// col.44
$notice .= sut_lang();
// col.45
// orig.lang
$notice .= sut_dummy(1);
// col.46
$notice .= sut_collation();
// col.47..50
$notice .= sut_notes();
// col.51..53
//DEBUG: in z_progression_main expand size frame3 to 50%
//print "<hr /><br />";
//printr($campo,'','CAMPO');
//printr($campi,'','CAMPI');
//print "$ss<br /><hr />$notice";
//Lecture des paramètres d'import
$param_path = "sutrs2unimarciso";
//Lecture des paramètres
_parser_("{$base_path}/admin/convert/imports/" . $param_path . "/params.xml", array("IMPORTNAME" => "_import_name_", "NPERPASS" => "_n_per_pass_", "INPUT" => "_input_", "STEP" => "_step_", "OUTPUT" => "_output_"), "PARAMS");
require_once "{$base_path}/admin/convert/xmltransform.php";
//En fonction du type de fichier d'entrée, inclusion du script de gestion des entrées
require_once "{$base_path}/admin/convert/imports/input_text.inc.php";
//En fonction du type de fichier de sortie, inclusion du script de gestion des sorties
require_once "{$base_path}/admin/convert/imports/output_iso_2709.inc.php";
$n_current = 0;
$n_errors = 0;
$n_per_pass = 1;
$notice_ = convert_notice($notice);
return $notice_;
}
示例15: getByRefContent
function getByRefContent($source_id, $notice_id, $uri, $entity)
{
global $include_path;
global $openurl_map;
$openurl_map = array();
$params = $this->get_source_params($source_id);
if ($params["PARAMETERS"]) {
//Affichage du formulaire avec $params["PARAMETERS"]
$vars = unserialize($params["PARAMETERS"]);
foreach ($vars as $key => $val) {
global ${$key};
${$key} = $val;
}
}
require_once $include_path . "/parser.inc.php";
_parser_($include_path . "/openurl/openurl_mapping.xml", array("ITEM" => "_getMapItem_"), "MAP");
if ($entity) {
//récupère les param d'exports
$export_param = new export_param();
$param = $export_param->get_parametres($export_param->context);
//petit nettoyage pour un bon fonctionnement...
foreach ($param as $key => $value) {
$param["exp_" . $key] = $param[$key];
}
//maintenant que c'est en ordre, on peut y aller!
$export = new export(array($notice_id), array(), array());
$export->get_next_notice("", array(), array(), false, $param);
$elem = new $openurl_map[$uri]['class']($export->xml_array, true);
$elem->setEntityType($entity);
print $elem->serialize();
} else {
//si on demande pas une entité, c'est un contextObject
$openurl_param = new openurl_parameters();
$openurl_param->setParameters($vars);
$openurl_instance = new openurl_instance($notice_id, 0, $openurl_param->getParameters(), $source_id);
$openurl_instance->generateContextObject();
print $openurl_instance->contextObject->serialize();
}
}