"_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(file_exists($base_path."/admin/convert/imports/".$param_path."/".$param_path.".class.php")) { require_once($base_path."/admin/convert/imports/".$param_path."/".$param_path.".class.php"); } else { require_once("imports/".$param_path."/export.inc.php"); } //En fonction du type de fichier de sortie, inclusion du script de gestion des sorties $output_instance = start_export::get_instance_from_output_type($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(file_exists($base_path."/admin/convert/imports/".$param_path."/".$param_path.".class.php")) { require_once($base_path."/admin/convert/imports/".$param_path."/".$param_path.".class.php"); } else { require_once("imports/".$param_path."/export.inc.php"); } } //Requête de sélection et de comptage des notices if (empty($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"; if (($lender != "x") || ($td != "") || ($sd != "")) { $requete.= " , exemplaires"; $requete_count.= " , exemplaires"; $requete_where.= " expl_notice=notice_id"; } if ($lender != "x") { $requete_where.= " and expl_owner=$lender"; } if ($td != "") { $l_td = implode(",", $td); $requete_where.= " and expl_typdoc in (".$l_td.")"; } if ($sd != "") { $l_sd = implode(",", $sd); $requete_where.= " and expl_statut in (".$l_sd.")"; } if ($requete_where != "") { $requete.= " where ".$requete_where; $requete_count.= " where ".$requete_where; } $requete.= " group by notice_id limit $n_current,200"; //Nombre de notices correspondantes aux critères $resultat = pmb_mysql_query($requete_count); $n_notices = pmb_mysql_result($resultat, 0, 0); if ($first!=1) { $_SESSION["param_export"]["notice_exporte"]=""; //On enregistre les variables postées dans la session export_param::init_session(); $fo = fopen("$base_path/temp/".$file_out, "w+"); //Entête if(isset($output_params['SCRIPT'])) { $class_name = str_replace('.class.php', '', $output_params['SCRIPT']); if(class_exists($class_name)) { $export_instance = new $class_name(); fwrite($fo, $export_instance->_get_header_($output_params)); } else { fwrite($fo, _get_header_($output_params)); } } else { if(is_object($output_instance)) { fwrite($fo, $output_instance->_get_header_($output_params)); } else { fwrite($fo, _get_header_($output_params)); } } fclose($fo); } if ($n_notices == 0) { error_message($msg["export_no_notice_found"], $msg["export_no_notice_for_criterias"], 1, "export.php"); exit; } //Affichage de la progression $percent = @ round(($n_current / $n_notices) * 100); if ($percent == 0) $percent = 1; echo "
".round($percent)."% |