mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
New: For admin users, show the SQL request in export build.
This commit is contained in:
parent
d0d9e8252f
commit
32faa96ab6
|
|
@ -37,6 +37,7 @@ For users:
|
|||
- New: Changements to support the external BitTorrent module.
|
||||
- New: Can filter on social contribution type in list.
|
||||
- New: Upload of joined files need create/modify permissions to work.
|
||||
- New: For admin users, show the SQL request in export build.
|
||||
- Fix: Partial payment on social contributions not shown on main page.
|
||||
- Fix: Handle correctly the comment in status changing of supplier orders.
|
||||
- Fix: Author, title and topic are correctly encoded in PDF.
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
class Export
|
||||
{
|
||||
var $db;
|
||||
|
||||
|
||||
var $array_export_code=array(); // Tableau de "idmodule_numlot"
|
||||
var $array_export_module=array(); // Tableau de "nom de modules"
|
||||
var $array_export_label=array(); // Tableau de "libelle de lots"
|
||||
|
|
@ -41,13 +41,15 @@ class Export
|
|||
var $array_export_fields=array(); // Tableau des listes de champ+libell<6C> <20> exporter
|
||||
var $array_export_alias=array(); // Tableau des listes de champ+alias <20> exporter
|
||||
var $array_export_special=array(); // Tableau des operations speciales sur champ
|
||||
|
||||
|
||||
// To store export modules
|
||||
var $hexa;
|
||||
var $datatoexport;
|
||||
var $model_name;
|
||||
|
||||
|
||||
|
||||
var $sqlusedforexport;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Constructeur de la classe
|
||||
* \param DB Handler acces base de donnees
|
||||
|
|
@ -56,8 +58,8 @@ class Export
|
|||
{
|
||||
$this->db=$DB;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Load an exportable dataset
|
||||
* \param user Object user making export
|
||||
|
|
@ -66,7 +68,7 @@ class Export
|
|||
function load_arrays($user,$filter='')
|
||||
{
|
||||
global $langs,$conf;
|
||||
|
||||
|
||||
dol_syslog("Export::load_arrays user=".$user->id." filter=".$filter);
|
||||
|
||||
$dir=DOL_DOCUMENT_ROOT."/includes/modules";
|
||||
|
|
@ -80,12 +82,12 @@ class Export
|
|||
if (eregi("^(mod.*)\.class\.php",$file,$reg))
|
||||
{
|
||||
$modulename=$reg[1];
|
||||
|
||||
|
||||
// Defined if module is enabled
|
||||
$enabled=true;
|
||||
$part=strtolower(eregi_replace('^mod','',$modulename));
|
||||
if (empty($conf->$part->enabled)) $enabled=false;
|
||||
|
||||
if (empty($conf->$part->enabled)) $enabled=false;
|
||||
|
||||
if ($enabled)
|
||||
{
|
||||
// Chargement de la classe
|
||||
|
|
@ -99,7 +101,7 @@ class Export
|
|||
foreach($module->export_code as $r => $value)
|
||||
{
|
||||
if ($filter && ($filter != $module->export_code[$r])) continue;
|
||||
|
||||
|
||||
// Test si permissions ok \todo tester sur toutes permissions
|
||||
$perm=$module->export_permission[$r][0];
|
||||
//print_r("$perm[0]-$perm[1]-$perm[2]<br>");
|
||||
|
|
@ -113,7 +115,7 @@ class Export
|
|||
}
|
||||
if ($perm[0]=='user' && $user->admin) $bool=true;
|
||||
//print $bool." $perm[0]"."<br>";
|
||||
|
||||
|
||||
// Permissions ok
|
||||
// if ($bool)
|
||||
// {
|
||||
|
|
@ -121,12 +123,12 @@ class Export
|
|||
$langtoload=$module->getLangFilesArray();
|
||||
if (is_array($langtoload))
|
||||
{
|
||||
foreach($langtoload as $key)
|
||||
foreach($langtoload as $key)
|
||||
{
|
||||
$langs->load($key);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Module
|
||||
$this->array_export_module[$i]=$module;
|
||||
// Permission
|
||||
|
|
@ -145,16 +147,16 @@ class Export
|
|||
$this->array_export_alias[$i]=$module->export_alias_array[$r];
|
||||
// Tableau des operations speciales sur champ
|
||||
$this->array_export_special[$i]=$module->export_special_array[$r];
|
||||
|
||||
|
||||
// Requete sql du dataset
|
||||
$this->array_export_sql_start[$i]=$module->export_sql_start[$r];
|
||||
$this->array_export_sql_end[$i]=$module->export_sql_end[$r];
|
||||
//$this->array_export_sql[$i]=$module->export_sql[$r];
|
||||
|
||||
|
||||
dol_syslog("Export loaded for module ".$modulename." with index ".$i.", dataset=".$module->export_code[$r].", nb of fields=".sizeof($module->export_fields_code[$r]));
|
||||
$i++;
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -170,23 +172,23 @@ class Export
|
|||
* \param array_selected Tableau des champs <EFBFBD> exporter
|
||||
* \remarks Les tableaux array_export_xxx sont d<EFBFBD>j<EFBFBD> charg<EFBFBD>es pour le bon datatoexport
|
||||
* aussi le parametre datatoexport est inutilis<EFBFBD>
|
||||
*/
|
||||
*/
|
||||
function build_file($user, $model, $datatoexport, $array_selected)
|
||||
{
|
||||
global $conf,$langs;
|
||||
|
||||
|
||||
$indice=0;
|
||||
asort($array_selected);
|
||||
|
||||
|
||||
dol_syslog("Export::build_file $model, $datatoexport, $array_selected");
|
||||
|
||||
|
||||
// Creation de la classe d'export du model ExportXXX
|
||||
$dir = DOL_DOCUMENT_ROOT . "/includes/modules/export/";
|
||||
$file = "export_".$model.".modules.php";
|
||||
$classname = "Export".$model;
|
||||
require_once($dir.$file);
|
||||
$objmodel = new $classname($db);
|
||||
|
||||
|
||||
// Build the sql request
|
||||
$sql=$this->array_export_sql_start[$indice];
|
||||
$i=0;
|
||||
|
|
@ -202,8 +204,9 @@ class Export
|
|||
$sql.=$newfield;
|
||||
}
|
||||
$sql.=$this->array_export_sql_end[$indice];
|
||||
|
||||
|
||||
// Run the sql
|
||||
$this->sqlusedforexport=$sql;
|
||||
dol_syslog("Export::build_file sql=".$sql);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
|
|
@ -214,7 +217,7 @@ class Export
|
|||
$dirname=$conf->export->dir_temp.'/'.$user->id;
|
||||
|
||||
$outputlangs=$langs; // Lang for output
|
||||
|
||||
|
||||
// Open file
|
||||
create_exdir($dirname);
|
||||
$result=$objmodel->open_file($dirname."/".$filename, $outputlangs);
|
||||
|
|
@ -230,7 +233,7 @@ class Export
|
|||
while ($objp = $this->db->fetch_object($resql))
|
||||
{
|
||||
$var=!$var;
|
||||
|
||||
|
||||
// Process special operations
|
||||
if (! empty($this->array_export_special[$indice]))
|
||||
{
|
||||
|
|
@ -252,13 +255,13 @@ class Export
|
|||
}
|
||||
}
|
||||
// end of special operation processing
|
||||
|
||||
|
||||
$objmodel->write_record($this->array_export_alias[$indice],$array_selected,$objp,$outputlangs);
|
||||
}
|
||||
|
||||
|
||||
// Genere en-tete
|
||||
$objmodel->write_footer($outputlangs);
|
||||
|
||||
|
||||
// Close file
|
||||
$objmodel->close_file();
|
||||
}
|
||||
|
|
@ -276,7 +279,7 @@ class Export
|
|||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Create an export model in database
|
||||
* \param user Objet utilisateur qui cree
|
||||
|
|
@ -284,15 +287,15 @@ class Export
|
|||
function create($user)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
|
||||
dol_syslog("Export.class.php::create");
|
||||
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
|
||||
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'export_model (';
|
||||
$sql.= 'label, type, field)';
|
||||
$sql.= " VALUES ('".$this->model_name."', '".$this->datatoexport."', '".$this->hexa."')";
|
||||
|
||||
|
||||
dol_syslog("Export::create sql=".$sql, LOG_DEBUG);
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
|
|
@ -319,7 +322,7 @@ class Export
|
|||
$sql = 'SELECT em.rowid, em.field, em.label, em.type';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'export_model as em';
|
||||
$sql.= ' WHERE em.rowid = '.$id;
|
||||
|
||||
|
||||
dol_syslog("Export::fetch sql=".$sql, LOG_DEBUG);
|
||||
$result = $this->db->query($sql) ;
|
||||
if ($result)
|
||||
|
|
@ -331,13 +334,13 @@ class Export
|
|||
$this->hexa = $obj->field;
|
||||
$this->model_name = $obj->label;
|
||||
$this->datatoexport = $obj->type;
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error="Model not found";
|
||||
return -2;
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -346,8 +349,8 @@ class Export
|
|||
return -3;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief Delete object in database
|
||||
* \param user User that delete
|
||||
|
|
@ -358,32 +361,32 @@ class Export
|
|||
{
|
||||
global $conf, $langs;
|
||||
$error=0;
|
||||
|
||||
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."export_model";
|
||||
$sql.= " WHERE rowid=".$this->id;
|
||||
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
|
||||
dol_syslog(get_class($this)."::delete sql=".$sql);
|
||||
$resql = $this->db->query($sql);
|
||||
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
|
||||
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
if (! $notrigger)
|
||||
{
|
||||
// Uncomment this and change MYOBJECT to your own tag if you
|
||||
// want this action call a trigger.
|
||||
|
||||
|
||||
//// Call triggers
|
||||
//include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
|
||||
//$interface=new Interfaces($this->db);
|
||||
//$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf);
|
||||
//if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||
//// End call triggers
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Commit or rollback
|
||||
if ($error)
|
||||
{
|
||||
|
|
@ -391,7 +394,7 @@ class Export
|
|||
{
|
||||
dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR);
|
||||
$this->error.=($this->error?', '.$errmsg:$errmsg);
|
||||
}
|
||||
}
|
||||
$this->db->rollback();
|
||||
return -1*$error;
|
||||
}
|
||||
|
|
@ -401,7 +404,7 @@ class Export
|
|||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
/* Copyright (C) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
\brief Page d'edition d'un export
|
||||
\version $Id$
|
||||
*/
|
||||
|
||||
|
||||
require_once("./pre.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/html.formother.class.php");
|
||||
|
|
@ -78,14 +78,15 @@ $objmodelexport=new ModeleExports();
|
|||
$html = new Form($db);
|
||||
$htmlother = new FormOther($db);
|
||||
$formfile = new FormFile($db);
|
||||
$sqlusedforexport='';
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
|
||||
if ($action=='selectfield')
|
||||
{
|
||||
{
|
||||
if ($_GET["field"]=='all')
|
||||
{
|
||||
$fieldsarray=$objexport->array_export_alias[0];
|
||||
|
|
@ -103,17 +104,17 @@ if ($action=='selectfield')
|
|||
//print_r($array_selected);
|
||||
$_SESSION["export_selected_fields"]=$array_selected;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if ($action=='unselectfield')
|
||||
{
|
||||
{
|
||||
if ($_GET["field"]=='all')
|
||||
{
|
||||
$array_selected=array();
|
||||
$_SESSION["export_selected_fields"]=$array_selected;
|
||||
$_SESSION["export_selected_fields"]=$array_selected;
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
unset($array_selected[$_GET["field"]]);
|
||||
// Renumber fields of array_selected (from 1 to nb_elements)
|
||||
asort($array_selected);
|
||||
|
|
@ -129,7 +130,7 @@ if ($action=='unselectfield')
|
|||
}
|
||||
}
|
||||
if ($action=='downfield' || $action=='upfield')
|
||||
{
|
||||
{
|
||||
$pos=$array_selected[$_GET["field"]];
|
||||
if ($action=='downfield') $newpos=$pos+1;
|
||||
if ($action=='upfield') $newpos=$pos-1;
|
||||
|
|
@ -169,6 +170,7 @@ if ($action == 'builddoc')
|
|||
else
|
||||
{
|
||||
$mesg='<div class="ok">'.$langs->trans("FileSuccessfullyBuilt").'</div>';
|
||||
$sqlusedforexport=$objexport->sqlusedforexport;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -198,7 +200,7 @@ if ($action == 'add_export_model')
|
|||
$objexport->model_name = $export_name;
|
||||
$objexport->datatoexport = $datatoexport;
|
||||
$objexport->hexa = $hexa;
|
||||
|
||||
|
||||
$result = $objexport->create($user);
|
||||
if ($result >= 0)
|
||||
{
|
||||
|
|
@ -209,7 +211,7 @@ if ($action == 'add_export_model')
|
|||
$langs->load("errors");
|
||||
if ($objexport->errno == 'DB_ERROR_RECORD_ALREADY_EXISTS')
|
||||
{
|
||||
$mesg='<div class="error">'.$langs->trans("ErrorExportDuplicateProfil").'</div>';
|
||||
$mesg='<div class="error">'.$langs->trans("ErrorExportDuplicateProfil").'</div>';
|
||||
}
|
||||
else $mesg='<div class="error">'.$objexport->error.'</div>';
|
||||
}
|
||||
|
|
@ -221,7 +223,7 @@ if ($action == 'add_export_model')
|
|||
}
|
||||
|
||||
if ($step == 2 && $action == 'select_model')
|
||||
{
|
||||
{
|
||||
$_SESSION["export_selected_fields"]=array();
|
||||
$array_selected=array();
|
||||
$result = $objexport->fetch($exportmodelid);
|
||||
|
|
@ -243,7 +245,7 @@ if ($step == 2 && $action == 'select_model')
|
|||
* Affichage Pages des Etapes
|
||||
*/
|
||||
|
||||
|
||||
|
||||
if ($step == 1 || ! $datatoexport)
|
||||
{
|
||||
llxHeader('',$langs->trans("NewExport"));
|
||||
|
|
@ -263,14 +265,14 @@ if ($step == 1 || ! $datatoexport)
|
|||
$head[$h][1] = $langs->trans("Step")." 2";
|
||||
$h++;
|
||||
*/
|
||||
|
||||
|
||||
dol_fiche_head($head, $hselected, $langs->trans("NewExport"));
|
||||
|
||||
|
||||
print '<table class="notopnoleftnoright" width="100%">';
|
||||
|
||||
print $langs->trans("SelectExportDataSet").'<br>';
|
||||
|
||||
|
||||
// Affiche les modules d'exports
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
|
|
@ -307,10 +309,10 @@ if ($step == 1 || ! $datatoexport)
|
|||
{
|
||||
print '<tr><td '.$bc[false].' colspan="2">'.$langs->trans("NoExportableData").'</td></tr>';
|
||||
}
|
||||
print '</table>';
|
||||
print '</table>';
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
print '</div>';
|
||||
|
||||
if ($mesg) print $mesg;
|
||||
|
|
@ -335,7 +337,7 @@ if ($step == 2 && $datatoexport)
|
|||
$head[$h][1] = $langs->trans("Step")." 2";
|
||||
$hselected=$h;
|
||||
$h++;
|
||||
|
||||
|
||||
dol_fiche_head($head, $hselected, $langs->trans("NewExport"));
|
||||
|
||||
print '<table width="100%" class="border">';
|
||||
|
|
@ -353,10 +355,10 @@ if ($step == 2 && $datatoexport)
|
|||
print img_object($objexport->array_export_module[0]->getName(),$objexport->array_export_icon[0]).' ';
|
||||
print $objexport->array_export_label[0];
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
|
||||
// Liste deroulante des modeles d'export
|
||||
print '<form action="export.php" method="post">';
|
||||
print '<input type="hidden" name="action" value="select_model">';
|
||||
|
|
@ -369,7 +371,7 @@ if ($step == 2 && $datatoexport)
|
|||
print '<input type="submit" class="button" value="'.$langs->trans("Select").'">';
|
||||
print '</td></tr></table>';
|
||||
print '</form>';
|
||||
|
||||
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
|
|
@ -393,10 +395,10 @@ if ($step == 2 && $datatoexport)
|
|||
# $this->array_export_fields[0]=$module->export_fields_array[$r];
|
||||
# $this->array_export_entities[0]=$module->export_fields_entities[$r];
|
||||
# $this->array_export_alias[0]=$module->export_fields_alias[$r];
|
||||
|
||||
|
||||
$var=true;
|
||||
$i = 0;
|
||||
|
||||
|
||||
foreach($fieldsarray as $code=>$label)
|
||||
{
|
||||
$var=!$var;
|
||||
|
|
@ -450,7 +452,7 @@ if ($step == 2 && $datatoexport)
|
|||
{
|
||||
print '<a class="butActionRefused" href="#">'.$langs->trans("NextStep").'</a>';
|
||||
}
|
||||
|
||||
|
||||
print '</div>';
|
||||
|
||||
}
|
||||
|
|
@ -460,7 +462,7 @@ if ($step == 3 && $datatoexport)
|
|||
asort($array_selected);
|
||||
|
||||
llxHeader('',$langs->trans("NewExport"));
|
||||
|
||||
|
||||
/*
|
||||
* Affichage onglets
|
||||
*/
|
||||
|
|
@ -478,7 +480,7 @@ if ($step == 3 && $datatoexport)
|
|||
$head[$h][1] = $langs->trans("Step")." 3";
|
||||
$hselected=$h;
|
||||
$h++;
|
||||
|
||||
|
||||
dol_fiche_head($head, $hselected, $langs->trans("NewExport"));
|
||||
|
||||
print '<table width="100%" class="border">';
|
||||
|
|
@ -509,9 +511,9 @@ if ($step == 3 && $datatoexport)
|
|||
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
|
||||
print $langs->trans("ChooseFieldsOrdersAndTitle").'<br>';
|
||||
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Entities").'</td>';
|
||||
|
|
@ -532,7 +534,7 @@ if ($step == 3 && $datatoexport)
|
|||
$entitylang=$entitytolang[$entity]?$entitytolang[$entity]:$entity;
|
||||
|
||||
print '<td>'.img_object('',$entityicon).' '.$langs->trans($entitylang).'</td>';
|
||||
|
||||
|
||||
print '<td>'.$langs->trans($objexport->array_export_fields[0][$code]).' ('.$code.')</td>';
|
||||
|
||||
print '<td align="right" width="100">';
|
||||
|
|
@ -550,12 +552,12 @@ if ($step == 3 && $datatoexport)
|
|||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
|
||||
|
||||
print '</div>';
|
||||
|
||||
if ($mesg) print $mesg;
|
||||
|
||||
|
||||
/*
|
||||
* Barre d'action
|
||||
*
|
||||
|
|
@ -569,13 +571,13 @@ if ($step == 3 && $datatoexport)
|
|||
|
||||
print '</div>';
|
||||
|
||||
|
||||
|
||||
// Area for profils export
|
||||
if (sizeof($array_selected))
|
||||
{
|
||||
print '<br>';
|
||||
print $langs->trans("SaveExportModel");
|
||||
|
||||
|
||||
print '<form class="nocellnopadd" action="export.php" method="post">';
|
||||
print '<input type="hidden" name="action" value="add_export_model">';
|
||||
print '<input type="hidden" name="step" value="'.$step.'">';
|
||||
|
|
@ -621,11 +623,11 @@ if ($step == 3 && $datatoexport)
|
|||
else {
|
||||
dol_print_error($this->db);
|
||||
}
|
||||
|
||||
|
||||
print '</table>';
|
||||
print '</form>';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if ($step == 4 && $datatoexport)
|
||||
|
|
@ -633,7 +635,7 @@ if ($step == 4 && $datatoexport)
|
|||
asort($array_selected);
|
||||
|
||||
llxHeader('',$langs->trans("NewExport"));
|
||||
|
||||
|
||||
/*
|
||||
* Affichage onglets
|
||||
*/
|
||||
|
|
@ -655,7 +657,7 @@ if ($step == 4 && $datatoexport)
|
|||
$head[$h][1] = $langs->trans("Step")." 4";
|
||||
$hselected=$h;
|
||||
$h++;
|
||||
|
||||
|
||||
dol_fiche_head($head, $hselected, $langs->trans("NewExport"));
|
||||
|
||||
print '<table width="100%" class="border">';
|
||||
|
|
@ -686,9 +688,9 @@ if ($step == 4 && $datatoexport)
|
|||
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
|
||||
print $langs->trans("NowClickToGenerateToBuildExportFile").'<br>';
|
||||
|
||||
|
||||
// Liste des formats d'exports disponibles
|
||||
$var=true;
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
|
@ -704,11 +706,24 @@ if ($step == 4 && $datatoexport)
|
|||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$objmodelexport->getDriverLabel($key).'</td><td>'.$objmodelexport->getLibLabel($key).'</td><td>'.$objmodelexport->getLibVersion($key).'</td></tr>';
|
||||
}
|
||||
print '</table>';
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
if ($mesg) print $mesg;
|
||||
print '<table width="100%">';
|
||||
if ($mesg)
|
||||
{
|
||||
print '<tr><td colspan="2">';
|
||||
print $mesg;
|
||||
print '</td></tr>';
|
||||
}
|
||||
if ($sqlusedforexport && $user->admin)
|
||||
{
|
||||
print '<tr><td>';
|
||||
print info_admin($langs->trans("SQLUsedForExport").':<br> '.$sqlusedforexport);
|
||||
print '</td></tr>';
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
print '<table width="100%"><tr><td width="50%">';
|
||||
|
||||
|
|
@ -717,10 +732,10 @@ if ($step == 4 && $datatoexport)
|
|||
// Affiche liste des documents
|
||||
// NB: La fonction show_documents rescanne les modules qd genallowed=1
|
||||
$formfile->show_documents('export','',$conf->export->dir_temp.'/'.$user->id,$_SERVER["PHP_SELF"].'?step=4&datatoexport='.$datatoexport,$liste,1,(! empty($_POST['model'])?$_POST['model']:'csv'),'',1);
|
||||
|
||||
|
||||
print '</td><td width="50%"> </td></tr>';
|
||||
print '</table>';
|
||||
|
||||
|
||||
// If external library PHPEXCELREADER is available
|
||||
// and defined by PHPEXCELREADER constant.
|
||||
if (file_exists(PHPEXCELREADER.'excelreader.php'))
|
||||
|
|
@ -731,10 +746,10 @@ if ($step == 4 && $datatoexport)
|
|||
//viewExcelFileContent($conf->export->dir_temp.'/1/export_member_1.xls',5,3);
|
||||
//viewCsvFileContent($conf->export->dir_temp.'/1/export_member_1.csv',5);
|
||||
//print '</td></tr></table>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
print '<br>';
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -33,4 +33,5 @@ FormatedExportDesc2=First step is to choose a predefined dataset, then to choose
|
|||
FormatedExportDesc3=When data to export are selected, you can define output file format you want to export your data to.
|
||||
Sheet=Sheet
|
||||
NoImportableData=No importable data (no module with definitions to allow data imports)
|
||||
FileSuccessfullyBuilt=Export file generated
|
||||
FileSuccessfullyBuilt=Export file generated
|
||||
SQLUsedForExport=SQL Request used to build export file
|
||||
|
|
|
|||
|
|
@ -33,4 +33,5 @@ FormatedExportDesc2=La première étape est de choisir un des lots de données p
|
|||
FormatedExportDesc3=Une fois les données sélectionnées, il est possible de choisir le format du fichier export généré.
|
||||
Sheet=Feuille
|
||||
NoImportableData=Pas de type de données importable (aucun module contenant des définitions de données importable n'est actif)
|
||||
FileSuccessfullyBuilt=Fichier export généré
|
||||
FileSuccessfullyBuilt=Fichier export généré
|
||||
SQLUsedForExport=Requête SQL utilisée pour construire le fichier export
|
||||
|
|
@ -1291,9 +1291,9 @@ function img_mime($file,$alt='')
|
|||
|
||||
|
||||
/**
|
||||
* \brief Affiche info admin
|
||||
* \brief Show information for admin users
|
||||
* \param text Text info
|
||||
* \param infoonimgalt Info is shown on alt of star picto
|
||||
* \param infoonimgalt Info is shown on alt of star picto, otherwise it is show on output
|
||||
* \return string String with info text
|
||||
*/
|
||||
function info_admin($texte,$infoonimgalt=0)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user