2
0
forked from Wavyzz/dolibarr

New: Add module FTP client

This commit is contained in:
Laurent Destailleur
2009-09-27 23:22:00 +00:00
parent 42eeed884c
commit 2b054271e2
23 changed files with 1155 additions and 48 deletions

View File

@@ -46,6 +46,7 @@ For users:
for other users than yourself. Can also purge existing sessions. for other users than yourself. Can also purge existing sessions.
- New: Add experimental point of sale module. - New: Add experimental point of sale module.
- New: Better usage when using with smartphones. - New: Better usage when using with smartphones.
- New: Add module FTP client.
- Fix: "Now" link works when date popup is not used. - Fix: "Now" link works when date popup is not used.
- Fix: Debug seriously the email notification module. - Fix: Debug seriously the email notification module.
- Fix: Error Call to a member function trans when refusing a supplier order. - Fix: Error Call to a member function trans when refusing a supplier order.

View File

@@ -21,11 +21,11 @@
*/ */
/** /**
\file htdocs/admin/external_rss.php * \file htdocs/admin/external_rss.php
\ingroup external_rss * \ingroup external_rss
\brief Page d'administration/configuration du module ExternalRss * \brief Page d'administration/configuration du module ExternalRss
\version $Id$ * \version $Id$
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php"); require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
@@ -188,10 +188,10 @@ print_fiche_titre($langs->trans("ExternalRSSSetup"), $linkback, 'setup');
print '<br>'; print '<br>';
// Formulaire ajout // Formulaire ajout
print '<form name="externalrssconfig" action="external_rss.php" method="post">'; print '<form name="externalrssconfig" action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table class="noborder" width="100%">'; print '<table class="nobordernopadding" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td colspan="2">'.$langs->trans("NewRSS").'</td>'; print '<td colspan="2">'.$langs->trans("NewRSS").'</td>';
print '<td>'.$langs->trans("Example").'</td>'; print '<td>'.$langs->trans("Example").'</td>';
@@ -205,7 +205,7 @@ print '</tr>';
<tr class="pair"> <tr class="pair">
<td>URL du RSS</td> <td>URL du RSS</td>
<td><input type="text" name="external_rss_urlrss_<?php echo ($lastexternalrss+1) ?>" value="<?php echo @constant("EXTERNAL_RSS_URLRSS_" . ($lastexternalrss+1)) ?>" size="64"></td> <td><input type="text" name="external_rss_urlrss_<?php echo ($lastexternalrss+1) ?>" value="<?php echo @constant("EXTERNAL_RSS_URLRSS_" . ($lastexternalrss+1)) ?>" size="64"></td>
<td>http://wiki.april.org/RecentChanges?format=rss<br>http://linuxfr.org/backend/news/rss20.rss<br>http://back.fr.lolix.org/jobs.rss.php3 <td>http://wiki.april.org/RecentChanges?format=rss<br>http://linuxfr.org/backend/news/rss20.rss<br>http://back.fr.lolix.org/jobs.rss.php3</td>
</tr> </tr>
<tr><td colspan="3" align="center"> <tr><td colspan="3" align="center">
<input type="submit" class="button" value="<?php echo $langs->trans("Add") ?>"> <input type="submit" class="button" value="<?php echo $langs->trans("Add") ?>">
@@ -216,13 +216,12 @@ print '</tr>';
<?php <?php
print '</table>'; print '</table>';
print '</form>'; print '</form>';
?>
<br>
<table class="noborder" width="100%"> print '<br>';
<?php
print '<table class="nobordernopadding" width="100%">';
$sql ="select rowid, file, note from ".MAIN_DB_PREFIX."boxes_def"; $sql ="select rowid, file, note from ".MAIN_DB_PREFIX."boxes_def";
$sql.=" WHERE file = 'box_external_rss.php'"; $sql.=" WHERE file = 'box_external_rss.php'";
@@ -251,7 +250,7 @@ if ($resql)
// print_r($rss->image); // print_r($rss->image);
// print_r($rss->items); // print_r($rss->items);
print "<form name=\"externalrssconfig\" action=\"external_rss.php\" method=\"post\">"; print "<form name=\"externalrssconfig\" action=\"".$_SERVER["PHP_SELF"]."\" method=\"post\">";
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print "<tr class=\"liste_titre\">"; print "<tr class=\"liste_titre\">";
@@ -315,11 +314,8 @@ else
{ {
dol_print_error($db); dol_print_error($db);
} }
?>
</table> print '</table>'."\n";
<?php
$db->close(); $db->close();

304
htdocs/admin/ftpclient.php Normal file
View File

@@ -0,0 +1,304 @@
<?php
/* Copyright (C) 2003 Eric Seigne <erics@rycks.com>
* Copyright (C) 2003,2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**
* \file htdocs/admin/ftpclient.php
* \ingroup ftp
* \brief Admin page to setup FTP client module
* \version $Id$
*/
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
$langs->load("admin");
if (!$user->admin) accessforbidden();
$def = array();
$lastftpentry=0;
// positionne la variable pour le nombre de rss externes
$sql ="select MAX(name) name from ".MAIN_DB_PREFIX."const";
$sql.=" WHERE name like 'FTP_SERVER_%'";
$result=$db->query($sql);
if ($result)
{
$obj = $db->fetch_object($result);
eregi('([0-9]+)$',$obj->name,$reg);
if ($reg[1]) $lastftpentry = $reg[1];
}
else
{
dol_print_error($db);
}
if ($_POST["action"] == 'add' || $_POST["modify"])
{
$ftp_server = "FTP_SERVER_" . $_POST["numero_entry"];
if(isset($_POST[$ftp_server]))
{
$ftp_port = "FTP_PORT_" . $_POST["numero_entry"];
$ftp_user = "FTP_USER_" . $_POST["numero_entry"];
$ftp_password = "FTP_PASSWORD_" . $_POST["numero_entry"];
$db->begin();
$result1=dolibarr_set_const($db, "FTP_PORT_" . $_POST["numero_entry"],$_POST[$ftp_port],'chaine',0,'',$conf->entity);
if ($result1) $result2=dolibarr_set_const($db, "FTP_SERVER_" . $_POST["numero_entry"],$_POST[$ftp_server],'chaine',0,'',$conf->entity);
if ($result2) $result3=dolibarr_set_const($db, "FTP_USER_" . $_POST["numero_entry"],$_POST[$ftp_user],'chaine',0,'',$conf->entity);
if ($result3) $result4=dolibarr_set_const($db, "FTP_PASSWORD_" . $_POST["numero_entry"],$_POST[$ftp_password],'chaine',0,'',$conf->entity);
if ($result1 && $result2 && $result3 && $result4)
{
$db->commit();
//$mesg='<div class="ok">'.$langs->trans("Success").'</div>';
header("Location: ".$_SERVER["PHP_SELF"]);
exit;
}
else
{
$db->rollback();
dol_print_error($db);
}
}
}
if ($_POST["delete"])
{
if(isset($_POST["numero_entry"]))
{
$db->begin();
// Supprime boite box_external_rss de definition des boites
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."boxes_def";
$sql.= " WHERE file ='box_external_rss.php' AND note like '".$_POST["numero_entry"]." %'";
$resql=$db->query($sql);
if ($resql)
{
$num = $db->num_rows($resql);
$i=0;
while ($i < $num)
{
$obj=$db->fetch_object($resql);
$sql = "DELETE FROM ".MAIN_DB_PREFIX."boxes";
$sql.= " WHERE box_id = ".$obj->rowid;
$resql=$db->query($sql);
$sql = "DELETE FROM ".MAIN_DB_PREFIX."boxes_def";
$sql.= " WHERE rowid = ".$obj->rowid;
$resql=$db->query($sql);
if (! $resql)
{
$db->rollback();
dol_print_error($db,"sql=$sql");
exit;
}
$i++;
}
$db->commit();
}
else
{
$db->rollback();
dol_print_error($db,"sql=$sql");
exit;
}
$result1=dolibarr_del_const($db,"ftp_port_" . $_POST["numero_entry"],$conf->entity);
if ($result1) $result2=dolibarr_del_const($db,"ftp_server_" . $_POST["numero_entry"],$conf->entity);
if ($result2) $result3=dolibarr_del_const($db,"ftp_user_" . $_POST["numero_entry"],$conf->entity);
if ($result3) $result4=dolibarr_del_const($db,"ftp_password_" . $_POST["numero_entry"],$conf->entity);
if ($result1 && $result2 && $result3 && $result4)
{
$db->commit();
//$mesg='<div class="ok">'.$langs->trans("Success").'</div>';
header("Location: ftpclient.php");
exit;
}
else
{
$db->rollback();
dol_print_error($db);
}
}
}
/*
* View
*/
llxHeader();
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
print_fiche_titre($langs->trans("FTPClientSetup"), $linkback, 'setup');
print '<br>';
if (! function_exists('ftp_connect'))
{
print $langs->trans("FTPFeatureNotSupportedByYourPHP");
}
else
{
// Formulaire ajout
print '<form name="ftpconfig" action="ftpclient.php" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table class="nobordernopadding" width="100%">';
print '<tr class="liste_titre">';
print '<td colspan="2">'.$langs->trans("NewFTPClient").'</td>';
print '<td>'.$langs->trans("Example").'</td>';
print '</tr>';
print '<tr class="impair">';
print '<td>'.$langs->trans("Server").'</td>';
print '<td><input type="text" name="FTP_SERVER_'.($lastftpentry+1).'" value="'.@constant("FTP_SERVER_" . ($lastftpentry+1)).'" size="64"></td>';
print '<td>localhost</td>';
print '</tr>';
print '<tr class="pair">';
print '<td width="100">'.$langs->trans("Port").'</td>';
print '<td><input type="text" name="FTP_PORT_'.($lastftpentry+1).'" value="'.@constant("FTP_PORT_" . ($lastftpentry+1)).'" size="64"></td>';
print '<td>21</td>';
print '</tr>';
print '<tr class="impair">';
print '<td>'.$langs->trans("User").'</td>';
print '<td><input type="text" name="FTP_USER_'.($lastftpentry+1).'" value="'.@constant("FTP_USER_" . ($lastftpentry+1)).'" size="24"></td>';
print '<td>myftplogin</td>';
print '</tr>';
print '<tr class="pair">';
print '<td>'.$langs->trans("Password").'</td>';
print '<td><input type="password" name="FTP_PASSWORD_'.($lastftpentry+1).'" value="'.@constant("FTP_PASSWORD_" . ($lastftpentry+1)).'" size="24"></td>';
print '<td>myftppassword</td>';
print '</tr>';
?>
<tr><td colspan="3" align="center">
<input type="submit" class="button" value="<?php echo $langs->trans("Add") ?>">
<input type="hidden" name="action" value="add">
<input type="hidden" name="numero_entry" value="<?php echo ($lastftpentry+1) ?>">
</td>
</tr>
<?php
print '</table>';
print '</form>';
?>
<br>
<table class="nobordernopadding" width="100%">
<?php
$sql ="select name, value, note from ".MAIN_DB_PREFIX."const";
$sql.=" WHERE name like 'FTP_SERVER_%'";
$sql.=" ORDER BY name";
dol_syslog("ftpclient select ftp setup sql=".$sql,LOG_DEBUG);
$resql=$db->query($sql);
if ($resql)
{
$num =$db->num_rows($resql);
$i=0;
while ($i < $num)
{
$obj = $db->fetch_object($resql);
eregi('^([0-9]+)',$obj->note,$reg);
$idrss = $reg[1];
//print "x".$idrss;
$var=true;
print "<form name=\"externalrssconfig\" action=\"".$_SERVER["PHP_SELF"]."\" method=\"post\">";
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print "<tr class=\"liste_titre\">";
print "<td colspan=\"2\">".$langs->trans("FTP")." ".($i+1)."</td>";
print "</tr>";
$var=!$var;
print "<tr ".$bc[$var].">";
print "<td>".$langs->trans("Server")."</td>";
print "<td><input type=\"text\" class=\"flat\" name=\"FTP_SERVER_" . $idrss . "\" value=\"" . @constant("FTP_SERVER_" . $idrss) . "\" size=\"64\"></td>";
print "</tr>";
$var=!$var;
print "<tr ".$bc[$var].">";
print "<td width=\"100\">".$langs->trans("Port")."</td>";
print "<td><input type=\"text\" class=\"flat\" name=\"FTP_PORT_" . $idrss . "\" value=\"" . @constant("FTP_PORT_" . $idrss) . "\" size=\"64\"></td>";
print "</tr>";
$var=!$var;
print "<tr ".$bc[$var].">";
print "<td width=\"100\">".$langs->trans("User")."</td>";
print "<td><input type=\"text\" class=\"flat\" name=\"FTP_USER_" . $idrss . "\" value=\"" . @constant("FTP_USER_" . $idrss) . "\" size=\"24\"></td>";
print "</tr>";
$var=!$var;
print "<tr ".$bc[$var].">";
print "<td width=\"100\">".$langs->trans("Password")."</td>";
print "<td><input type=\"password\" class=\"flat\" name=\"FTP_PASSWORD_" . $idrss . "\" value=\"" . @constant("FTP_PASSWORD_" . $idrss) . "\" size=\"24\"></td>";
print "</tr>";
print "<tr>";
print "<td colspan=\"2\" align=\"center\">";
print "<input type=\"submit\" class=\"button\" name=\"modify\" value=\"".$langs->trans("Modify")."\">";
print " &nbsp; ";
print "<input type=\"submit\" class=\"button\" name=\"delete\" value=\"".$langs->trans("Delete")."\">";
print "<input type=\"hidden\" name=\"numero_entry\" value=\"".$idrss."\">";
print "</td>";
print "</tr>";
print "</form>";
$i++;
}
}
else
{
dol_print_error($db);
}
print '</table>';
}
$db->close();
llxFooter('$Date$ - $Revision$');
?>

578
htdocs/ftp/index.php Normal file
View File

@@ -0,0 +1,578 @@
<?php
/* Copyright (C) 2008-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2008-2009 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**
* \file htdocs/ftp/index.php
* \ingroup ftp
* \brief Main page for FTP section area
* \version $Id$
* \author Laurent Destailleur
*/
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/html.formfile.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/files.lib.php");
require_once(DOL_DOCUMENT_ROOT."/lib/treeview.lib.php");
// Load traductions files
$langs->load("ftp");
$langs->load("companies");
$langs->load("other");
// Security check
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'ftp','');
// Load permissions
$user->getrights('ftp');
// Get parameters
$action = isset($_GET["action"])?$_GET["action"]:$_POST['action'];
$section=isset($_GET["section"])?$_GET["section"]:$_POST['section'];
if (! $section) $section='/';
$numero_ftp = isset($_GET["numero_ftp"])?$_GET["numero_ftp"]:$_POST['numero_ftp'];
if (! $numero_ftp) $numero_ftp=1;
$file=isset($_GET["file"])?$_GET["file"]:$_POST['file'];
$upload_dir = $conf->ftp->dir_temp;
$download_dir = $conf->ftp->dir_temp;
$page=$_GET["page"];
$sortorder=$_GET["sortorder"];
$sortfield=$_GET["sortfield"];
$limit = $conf->liste_limit;
$offset = $limit * $page ;
if (! $sortorder) $sortorder="ASC";
if (! $sortfield) $sortfield="label";
$s_ftp_server='FTP_SERVER_'.$numero_ftp;
$s_ftp_port='FTP_PORT_'.$numero_ftp;
$s_ftp_user='FTP_USER_'.$numero_ftp;
$s_ftp_password='FTP_PASSWORD_'.$numero_ftp;
$ftp_server=$conf->global->$s_ftp_server;
$ftp_port=$conf->global->$s_ftp_port;
$ftp_user=$conf->global->$s_ftp_user;
$ftp_password=$conf->global->$s_ftp_password;
$conn_id=0; // FTP connection ID
/*******************************************************************
* ACTIONS
*
* Put here all code to do according to value of "action" parameter
********************************************************************/
// Envoie fichier
if ( $_POST["sendit"] && ! empty($conf->global->MAIN_UPLOAD_DOC))
{
$result=$ecmdir->fetch($_REQUEST["section"]);
if (! $result > 0)
{
dol_print_error($db,$ecmdir->error);
exit;
}
$relativepath=$ecmdir->getRelativePath();
$upload_dir = $conf->ecm->dir_output.'/'.$relativepath;
if (! is_dir($upload_dir))
{
$result=create_exdir($upload_dir);
}
if (is_dir($upload_dir))
{
$result = dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'],0);
if ($result > 0)
{
//$mesg = '<div class="ok">'.$langs->trans("FileTransferComplete").'</div>';
//print_r($_FILES);
$result=$ecmdir->changeNbOfFiles('+');
}
else if ($result < 0)
{
// Echec transfert (fichier depassant la limite ?)
$langs->load("errors");
$mesg = '<div class="error">'.$langs->trans("ErrorFileNotUploaded").'</div>';
// print_r($_FILES);
}
else
{
// File infected by a virus
$langs->load("errors");
$mesg = '<div class="error">'.$langs->trans("ErrorFileIsInfectedWith",$result).'</div>';
}
}
else
{
// Echec transfert (fichier depassant la limite ?)
$langs->load("errors");
$mesg = '<div class="error">'.$langs->trans("ErrorFailToCreateDir",$upload_dir).'</div>';
}
}
// Action ajout d'un rep
if ($_POST["action"] == 'add' && $user->rights->ftp->setup)
{
$ecmdir->ref = $_POST["ref"];
$ecmdir->label = $_POST["label"];
$ecmdir->description = $_POST["desc"];
$id = $ecmdir->create($user);
if ($id > 0)
{
Header("Location: ".$_SERVER["PHP_SELF"]);
exit;
}
else
{
$mesg='<div class="error">Error '.$langs->trans($ecmdir->error).'</div>';
$_GET["action"] = "create";
}
}
// Remove file
if ($_REQUEST['action'] == 'confirm_deletefile' && $_REQUEST['confirm'] == 'yes')
{
// set up a connection or die
if (! $conn_id)
{
$newsectioniso=utf8_decode($section);
$resultarray=dol_ftp_connect($ftp_server, $ftp_port, $ftp_user, $ftp_password, $newsectioniso);
$conn_id=$resultarray['conn_id'];
$ok=$resultarray['ok'];
$mesg=$resultarray['mesg'];
}
if ($conn_id && $ok && ! $mesg)
{
// Remote file
$filename=$file;
$remotefile=$section.(eregi('[\\\/]$',$section)?'':'/').$file;
$newremotefileiso=utf8_decode($remotefile);
//print "x".$newremotefileiso;
$result=ftp_delete($conn_id, $newremotefileiso);
if ($result)
{
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved",$file).'</div>';
}
else
{
$mesg = '<div class="error">'.$langs->trans("FTPFailedToRemoveFile",$file).'</div>';
}
//ftp_close($conn_id); Close later
$action='';
}
else
{
dol_print_error('',$mesg);
}
}
// Remove directory
if ($_REQUEST['action'] == 'confirm_deletesection' && $_REQUEST['confirm'] == 'yes')
{
// set up a connection or die
if (! $conn_id)
{
$newsectioniso=utf8_decode($section);
$resultarray=dol_ftp_connect($ftp_server, $ftp_port, $ftp_user, $ftp_password, $newsectioniso);
$conn_id=$resultarray['conn_id'];
$ok=$resultarray['ok'];
$mesg=$resultarray['mesg'];
}
if ($conn_id && $ok && ! $mesg)
{
// Remote file
$filename=$file;
$remotefile=$section.(eregi('[\\\/]$',$section)?'':'/').$file;
$newremotefileiso=utf8_decode($remotefile);
$result=ftp_rmdir($conn_id, $newremotefileiso);
if ($result)
{
$mesg = '<div class="ok">'.$langs->trans("DirWasRemoved",$file).'</div>';
}
else
{
$mesg = '<div class="error">'.$langs->trans("FTPFailedToRemoveDir",$file).'</div>';
}
//ftp_close($conn_id); Close later
$action='';
}
else
{
dol_print_error('',$mesg);
}
}
// Remove directory
if ($_REQUEST['action'] == 'download')
{
// set up a connection or die
if (! $conn_id)
{
$newsectioniso=utf8_decode($section);
$resultarray=dol_ftp_connect($ftp_server, $ftp_port, $ftp_user, $ftp_password, $newsectioniso);
$conn_id=$resultarray['conn_id'];
$ok=$resultarray['ok'];
$mesg=$resultarray['mesg'];
}
if ($conn_id && $ok && ! $mesg)
{
// Local file
$localfile=tempnam($download_dir,'dol_');
// Remote file
$filename=$file;
$remotefile=$section.(eregi('[\\\/]$',$section)?'':'/').$file;
$newremotefileiso=utf8_decode($remotefile);
$result=ftp_get($conn_id,$localfile,$newremotefileiso,FTP_BINARY);
if ($result)
{
if (! empty($conf->global->MAIN_UMASK))
@chmod($localfile, octdec($conf->global->MAIN_UMASK));
// Define mime type
$type = 'application/octet-stream';
if (! empty($_GET["type"])) $type=$_GET["type"];
else $type=dol_mimetype($original_file);
// Define attachment (attachment=true to force choice popup 'open'/'save as')
$attachment = true;
if ($encoding) header('Content-Encoding: '.$encoding);
if ($type) header('Content-Type: '.$type);
if ($attachment) header('Content-Disposition: attachment; filename="'.$filename.'"');
else header('Content-Disposition: inline; filename="'.$filename.'"');
// Ajout directives pour resoudre bug IE
header('Cache-Control: Public, must-revalidate');
header('Pragma: public');
readfile($localfile);
ftp_close($conn_id);
exit;
}
else
{
$mesg='<div class="error">Failed to get file '.$remotefile.'</div>';
}
}
else
{
dol_print_error('',$mesg);
}
//ftp_close($conn_id); Close later
}
/*******************************************************************
* PAGE
*
* Put here all code to do according to value of "action" parameter
********************************************************************/
llxHeader();
$form=new Form($db);
$formfile=new FormFile($db);
$userstatic = new User($db);
//***********************
// List
//***********************
print_fiche_titre($langs->trans("FTPArea"));
print $langs->trans("FTPAreaDesc")."<br>";
print "<br>\n";
if (! function_exists('ftp_connect'))
{
print $langs->trans("FTPFeatureNotSupportedByYourPHP");
}
else
{
if (! empty($ftp_server))
{
// Confirm remove file
if ($_GET['action'] == 'delete')
{
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?section='.urlencode($_REQUEST["section"]).'&file='.urlencode($_GET["file"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile','','',1);
if ($ret == 'html') print '<br>';
}
if ($mesg) { print $mesg."<br>"; }
// Confirmation de la suppression d'une ligne categorie
if ($_GET['action'] == 'delete_section')
{
$ret=$form->form_confirm($_SERVER["PHP_SELF"].'?section='.urlencode($_REQUEST["section"]).'&file='.urlencode($_GET["file"]), $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection',$ecmdir->label), 'confirm_deletesection','','',1);
if ($ret == 'html') print '<br>';
}
print $langs->trans("Server").': <b>'.$ftp_server.'</b><br>';
print $langs->trans("Port").': <b>'.$ftp_port.'</b><br>';
print $langs->trans("User").': <b>'.$ftp_user.'</b><br>';
print $langs->trans("Directory").': <b>'.$section.'</b><br>';
print "<br>\n";
// Construit liste des repertoires
print '<table width="100%" class="nobordernopadding">'."\n";
print '<tr class="liste_titre">'."\n";
print '<td class="liste_titre" align="left">'.$langs->trans("Content").'</td>'."\n";
print '<td class="liste_titre" align="center">'.$langs->trans("Size").'</td>'."\n";
print '<td class="liste_titre" align="center">'.$langs->trans("Date").'</td>'."\n";
print '<td class="liste_titre" align="center">'.$langs->trans("Owner").'</td>'."\n";
print '<td class="liste_titre" align="center">'.$langs->trans("Group").'</td>'."\n";
print '<td class="liste_titre" align="center">'.$langs->trans("Permissions").'</td>'."\n";
print '<td class="liste_titre" align="right">';
print '<a href="'.$_SERVER["PHP_SELF"].'?action=refreshmanual'.($section?'&amp;section='.urlencode($section):'').'">'.img_picto($langs->trans("Refresh"),'refresh').'</a>&nbsp;';
print '</td>'."\n";
print '</tr>'."\n";
// set up a connection or die
if (! $conn_id)
{
$resultarray=dol_ftp_connect($ftp_server, $ftp_port, $ftp_user, $ftp_password, $section);
$conn_id=$resultarray['conn_id'];
$ok=$resultarray['ok'];
$mesg=$resultarray['mesg'];
}
if ($ok)
{
//$type = ftp_systype($conn_id);
$newsectioniso=utf8_decode($section);
$buff = ftp_rawlist($conn_id, $newsectioniso);
$contents = ftp_nlist($conn_id, $newsectioniso); // Sometimes rawlist fails but never nlist
//var_dump($contents);
//var_dump($buff);
$nboflines=sizeof($contents);
$var=true;
$rawlisthasfailed=false;
$i=0;
while ($i < $nboflines && $i < 1000)
{
$vals=split(' +',utf8_encode($buff[$i]),9);
$file=$vals[8];
if (empty($file))
{
$rawlisthasfailed=true;
$file=utf8_encode($contents[$i]);
}
if ($file == '.' || ($file == '..' && $section == '/'))
{
$i++;
continue;
}
// Is it a directory ?
$is_directory=0;
if ($file == '..') $is_directory=1;
else if (! $rawlisthasfailed)
{
if (eregi('^d',$vals[0])) $is_directory=1;
if (eregi('^l',$vals[0])) $is_link=1;
}
else
{
// Remote file
$filename=$file;
$remotefile=$section.(eregi('[\\\/]$',$section)?'':'/').$file;
$newremotefileiso=utf8_decode($remotefile);
$is_directory=ftp_isdir($conn_id, $newremotefileiso);
}
$var=!$var;
print '<tr '.$bc[$var].'>';
// Name
print '<td>';
$newsection=$section.(eregi('[\\\/]$',$section)?'':'/').$file;
$newsection=eregi_replace('[\\\/][^\\\/]+[\\\/]\.\.$','/',$newsection); // Change aaa/xxx/.. to new aaa
if ($is_directory) print '<a href="'.$_SERVER["PHP_SELF"].'?section='.urlencode($newsection).'">';
print $file;
if ($is_directory) print '</a>';
print '</td>';
// Size
print '<td align="center">';
if (! $is_directory && ! $is_link) print $vals[4];
else print '&nbsp;';
print '</td><td align="center">';
print $vals[5].' '.$vals[6].' '.$vals[7];
print '</td>';
// User
print '<td align="center">';
print $vals[2];
print '</td>';
// Group
print '<td align="center">';
print $vals[3];
print '</td>';
// Permissions
print '<td align="center">';
print $vals[0];
print '</td>';
// Action
print '<td align="right" width="64" nowrap="nowrap">';
if ($is_directory)
{
if ($file != '..') print '<a href="'.$_SERVER["PHP_SELF"].'?action=delete_section&section='.urlencode($section).'&file='.urlencode($file).'">'.img_delete().'</a>';
else print '&nbsp;';
}
else if ($is_link)
{
print '&nbsp;';
}
else
{
print '<a href="'.$_SERVER["PHP_SELF"].'?action=download&section='.urlencode($section).'&file='.urlencode($file).'">'.img_file().'</a>';
print ' &nbsp; ';
print '<a href="'.$_SERVER["PHP_SELF"].'?action=delete&section='.urlencode($section).'&file='.urlencode($file).'">'.img_delete().'</a>';
}
print '</td>';
print '</tr>'."\n";
$i++;
$nbofentries++;
}
}
print "</table>";
if (! $ok && $mesg) print $mesg;
// Actions
/*
if ($user->rights->ftp->write && ! empty($section))
{
$formfile->form_attach_new_file(DOL_URL_ROOT.'/ftp/index.php','',0,$section,1);
}
else print '&nbsp;';
*/
}
else
{
print $langs->trans("SetupOfFTPClientModuleNotComplete");
}
}
print '<br>';
// Close FTP connection
if ($conn_id) ftp_close($conn_id);
// End of page
$db->close();
llxFooter('$Date$ - $Revision$');
/**
* Enter description here...
*
* @param unknown_type $ftp_server
* @param unknown_type $ftp_port
* @param unknown_type $ftp_user
* @param unknown_type $ftp_password
* @param unknown_type $section
* @return unknown
*/
function dol_ftp_connect($ftp_server, $ftp_port, $ftp_user, $ftp_password, $section)
{
$ok=1;
$conn_id = ftp_connect($ftp_server, $ftp_port, 20);
if ($conn_id)
{
// turn on passive mode transfers
//ftp_pasv ($conn_id, true) ;
if ($ftp_user)
{
if (ftp_login($conn_id, $ftp_user, $ftp_password))
{
// Change the dir
$newsectioniso=utf8_decode($section);
ftp_chdir($conn_id, $newsectioniso);
}
else
{
$mesg=$langs->trans("FailedToConnectToFTPServerWithCredentials");
$ok=0;
}
}
}
else
{
$mesg=$langs->trans("FailedToConnectToFTPServer",$ftp_server,$ftp_port);
$ok=0;
}
$arrayresult=array('conn_id'=>$conn_id, 'ok'=>$ok, 'mesg'=>$mesg);
return $arrayresult;
}
/**
*/
function ftp_isdir($connect_id,$dir)
{
if(ftp_chdir($connect_id,$dir))
{
ftp_cdup($connect_id);
return 1;
}
else
{
return 0;
}
}
?>

43
htdocs/ftp/pre.inc.php Normal file
View File

@@ -0,0 +1,43 @@
<?php
/* Copyright (C) 2008-2009 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**
* \file htdocs/ftp/pre.inc.php
* \ingroup ftp
* \brief File to manage left menu for FTP module
* \version $Id$
*/
require ("../main.inc.php");
$user->getrights('ecm');
function llxHeader($head = '', $title='', $help_url='', $morehtml='')
{
global $conf,$langs,$user;
$langs->load("ftp");
top_menu($head, $title);
$menu = new Menu();
left_menu($menu->liste, $help_url, $morehtml);
}
?>

View File

@@ -0,0 +1,158 @@
<?php
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/** \defgroup ftp Module FTP
* \brief Module for FTP client module
* \version $Id$
*/
/**
* \file htdocs/includes/modules/modFTP.class.php
* \ingroup ftp
* \brief Description and activation file for module FTP
*/
include_once(DOL_DOCUMENT_ROOT ."/includes/modules/DolibarrModules.class.php");
/** \class modFTP
* \brief Description and activation class for module FTP
*/
class modFTP extends DolibarrModules
{
/**
* \brief Constructor. Define names, constants, directories, boxes, permissions
* \param DB Database handler
*/
function modFTP($DB)
{
$this->db = $DB;
// Id for module (must be unique).
// Use here a free id.
$this->numero = 2800;
// Family can be 'crm','financial','hr','projects','product','ecm','technic','other'
// It is used to sort modules in module setup page
$this->family = "other";
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = eregi_replace('^mod','',get_class($this));
// Module description used if translation string 'ModuleXXXDesc' not found (XXX is id value)
$this->description = "FTP Client";
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
$this->version = 'dolibarr';
// Key used in llx_const table to save module status enabled/disabled (XXX is id value)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page (0=common,1=interface,2=others,3=very specific)
$this->special = 1;
// Name of png file (without png) used for this module
$this->picto='dir';
// Data directories to create when module is enabled
$this->dirs = array("/ftp/temp");
// Config pages. Put here list of php page names stored in admmin directory used to setup module
$this->config_page_url = array('ftpclient.php');
// Dependencies
$this->depends = array(); // List of modules id that must be enabled if this module is enabled
$this->requiredby = array(); // List of modules id to disable if this one is disabled
// Constants
$this->const = array(); // List of parameters
// Boxes
$this->boxes = array(); // List of boxes
$r=0;
// Add here list of php file(s) stored in includes/boxes that contains class to show a box.
// Example:
//$this->boxes[$r][1] = "myboxa.php";
//$r++;
//$this->boxes[$r][1] = "myboxb.php";
//$r++;
// Permissions
$this->rights_class = 'ftp'; // Permission key
$this->rights = array(); // Permission array used by this module
$r++;
$this->rights[$r][0] = 2800;
$this->rights[$r][1] = 'Use FTP client in read mode';
$this->rights[$r][2] = 'r';
$this->rights[$r][3] = 1;
$this->rights[$r][4] = 'read';
$r++;
$this->rights[$r][0] = 2801;
$this->rights[$r][1] = 'Use FTP client in write mode';
$this->rights[$r][2] = 'w';
$this->rights[$r][3] = 0;
$this->rights[$r][4] = 'write';
// Menus
//------
$this->menus = array(); // List of menus to add
$r=0;
// Top menu
$this->menu[$r]=array('fk_menu'=>0,
'type'=>'top',
'titre'=>'FTP',
'mainmenu'=>'ftp',
'leftmenu'=>'0', // Use 1 if you also want to add left menu entries using this descriptor. Use 0 if left menu entries are defined in a file pre.inc.php (old school).
'url'=>'/ftp/index.php',
'langs'=>'ftp',
'position'=>100,
'perms'=>'$user->rights->ftp->read || $user->rights->ftp->write || $user->rights->ftp->setup',
'enabled'=>1,
'target'=>'',
'user'=>0);
$r++;
}
/**
* \brief Function called when module is enabled.
* The init function add previous constants, boxes and permissions into Dolibarr database.
* It also creates data directories.
*/
function init()
{
$sql = array();
return $this->_init($sql);
}
/**
* \brief Function called when module is disabled.
* Remove from database constants, boxes and permissions from Dolibarr database.
* Data directories are not deleted.
*/
function remove()
{
$sql = array();
return $this->_remove($sql);
}
}
?>

View File

@@ -248,7 +248,6 @@ SeeWikiForAllTeam=إلقاء نظرة على صفحة ويكي قائمة كام
UseACacheDelay=التخزين المؤقت للتأخير في الرد على الصادرات ثانية (0 فارغة أو لا مخبأ) UseACacheDelay=التخزين المؤقت للتأخير في الرد على الصادرات ثانية (0 فارغة أو لا مخبأ)
DisableLinkToHelpCenter=الاختباء وصلة <b>&quot;هل تحتاج إلى مساعدة أو دعم&quot;</b> على صفحة تسجيل الدخول DisableLinkToHelpCenter=الاختباء وصلة <b>&quot;هل تحتاج إلى مساعدة أو دعم&quot;</b> على صفحة تسجيل الدخول
DisableLinkToHelp=إخفاء ارتباط <b>&quot;ق ٪ أخبار يساعد&quot;</b> على القائمة اليمنى DisableLinkToHelp=إخفاء ارتباط <b>&quot;ق ٪ أخبار يساعد&quot;</b> على القائمة اليمنى
AddCRIfTooLong=ليس هناك التغليف ، وذلك إذا كان هو من صفحة وثائق لفترة طويلة جدا ، يجب عليك إضافة نفسك النقل textarea في العودة.
ModuleDisabled=نميطة المعوقين ModuleDisabled=نميطة المعوقين
ModuleDisabledSoNoEvent=نميطة المعوقين بغية خلق حالة أبدا ModuleDisabledSoNoEvent=نميطة المعوقين بغية خلق حالة أبدا
ConfirmPurge=هل أنت متأكد من ذلك لتنفيذ تطهير؟ <br> وهذا من شأنه بالتأكيد حذف جميع بيانات ملفك بأي حال من الأحوال لترميمها (صورة إدارة المحتوى في المؤسسة ، والملفات المرفقة...). ConfirmPurge=هل أنت متأكد من ذلك لتنفيذ تطهير؟ <br> وهذا من شأنه بالتأكيد حذف جميع بيانات ملفك بأي حال من الأحوال لترميمها (صورة إدارة المحتوى في المؤسسة ، والملفات المرفقة...).

View File

@@ -868,7 +868,7 @@ BarcodeDescISBN=Barcode typeidentifikationsmærker ISBN
BarcodeDescC39=Barcode af type C39 BarcodeDescC39=Barcode af type C39
BarcodeDescC128=Barcode af type C128 BarcodeDescC128=Barcode af type C128
WithdrawalsSetup=Tilbagetrækning modul opsætning WithdrawalsSetup=Tilbagetrækning modul opsætning
ExternalRSSSetup=Eksterne RSS import setup <textarea></textarea> ExternalRSSSetup=Eksterne RSS import setup
NewRSS=Ny RSS Feed NewRSS=Ny RSS Feed
MailingSetup=Emailing modul opsætning MailingSetup=Emailing modul opsætning
MailingEMailFrom=Afsender E-mail (Fra) for e-mails sendt med e-mail-modulet MailingEMailFrom=Afsender E-mail (Fra) for e-mails sendt med e-mail-modulet

View File

@@ -865,7 +865,7 @@ BarcodeDescISBN=Strichcode vom Typ ISBN
BarcodeDescC39=Strichcode vom Typ C39 BarcodeDescC39=Strichcode vom Typ C39
BarcodeDescC128=Strichcode vom Typ C128 BarcodeDescC128=Strichcode vom Typ C128
WithdrawalsSetup=Rücknahme Modul Setup WithdrawalsSetup=Rücknahme Modul Setup
ExternalRSSSetup=Externe RSS-Einfuhren Setup <textarea></textarea> ExternalRSSSetup=Externe RSS-Einfuhren Setup
NewRSS=Neuer RSS Feed NewRSS=Neuer RSS Feed
MailingSetup=EMailing Modul Setup MailingSetup=EMailing Modul Setup
MailingEMailFrom=Absender E-Mail (Aus) für E-Mails per E-Mail-Modul MailingEMailFrom=Absender E-Mail (Aus) für E-Mails per E-Mail-Modul

View File

@@ -989,7 +989,7 @@ BarcodeDescC128=Barcode of type C128
##### Prelevements ##### ##### Prelevements #####
WithdrawalsSetup=Withdrawal module setup WithdrawalsSetup=Withdrawal module setup
##### ExternalRSS ##### ##### ExternalRSS #####
ExternalRSSSetup=External RSS imports setup<textarea></textarea> ExternalRSSSetup=External RSS imports setup
NewRSS=New RSS Feed NewRSS=New RSS Feed
##### Mailing ##### ##### Mailing #####
MailingSetup=EMailing module setup MailingSetup=EMailing module setup
@@ -1105,3 +1105,5 @@ BankSetupModule=Bank module setup
FreeLegalTextOnChequeReceipts=Free text on cheque receipts FreeLegalTextOnChequeReceipts=Free text on cheque receipts
##### Multicompany ##### ##### Multicompany #####
MultiCompanySetup=Multi-company module setup MultiCompanySetup=Multi-company module setup
##### Suppliers #####
SuppliersSetup=Supplier module setup

View File

@@ -0,0 +1,12 @@
# Dolibarr language file - en_US - ftp
CHARSET=UTF-8
FTPClientSetup=FTP Client module setup
NewFTPClient=New FTP connection setup
FTPArea=FTP Area
FTPAreaDesc=This screen show you content of a FTP server view
SetupOfFTPClientModuleNotComplete=Setup of FTP client module seems to be not complete
FTPFeatureNotSupportedByYourPHP=Your PHP does not support FTP functions
FailedToConnectToFTPServer=Failed to connect to FTP server (server %s, port %s)
FailedToConnectToFTPServerWithCredentials=Failed to login to FTP server with defined login/password
FTPFailedToRemoveFile=Failed to remove file <b>%s</b>.
FTPFailedToRemoveDir=Failed to remove directory <b>%s</b> (Check permissions and that directory is empty).

View File

@@ -863,7 +863,7 @@ BarcodeDescISBN=Viivakoodi tyypin ISBN
BarcodeDescC39=Viivakoodi tyypin C39 BarcodeDescC39=Viivakoodi tyypin C39
BarcodeDescC128=Viivakoodi tyypin C128 BarcodeDescC128=Viivakoodi tyypin C128
WithdrawalsSetup=Purku-moduulin asetukset WithdrawalsSetup=Purku-moduulin asetukset
ExternalRSSSetup=Ulkopuolinen RSS tuonnin setup <textarea></textarea> ExternalRSSSetup=Ulkopuolinen RSS tuonnin setup
NewRSS=Uusi RSS Feed NewRSS=Uusi RSS Feed
MailingSetup=Sähköpostituksen moduulin asetukset MailingSetup=Sähköpostituksen moduulin asetukset
MailingEMailFrom=Sender EMail (From) sähköpostiviestit lähetetään sähköpostitse moduuli MailingEMailFrom=Sender EMail (From) sähköpostiviestit lähetetään sähköpostitse moduuli

View File

@@ -356,7 +356,7 @@ Module2400Desc = Gestion des actions (évènements et taches) et de l'agenda
Module2500Name = Gestion Electronique de Document Module2500Name = Gestion Electronique de Document
Module2500Desc = Permet de stocker et administrer une base de documents Module2500Desc = Permet de stocker et administrer une base de documents
Module2600Name = WebServices Module2600Name = WebServices
Module2600Desc = Permet les web services de serveur Dolibarr Module2600Desc = Active le serveur de Web Services de Dolibarr
Module2700Name = Gravatar Module2700Name = Gravatar
Module2700Desc = Utilise le service en ligne Gravatar (www.gravatar.com) pour affichage les photos d'utilisateurs/membres (qui se trouve avec leurs e-mails). Besoin d'un accès Internet Module2700Desc = Utilise le service en ligne Gravatar (www.gravatar.com) pour affichage les photos d'utilisateurs/membres (qui se trouve avec leurs e-mails). Besoin d'un accès Internet
Module5000Name = Multi-société Module5000Name = Multi-société
@@ -364,7 +364,7 @@ Module5000Desc = Permet de gérer plusieurs sociétés
Module10000Name = PayBox Module10000Name = PayBox
Module10000Desc = Module d'offrir en ligne une page de paiement par carte de crédit avec PayBox Module10000Desc = Module d'offrir en ligne une page de paiement par carte de crédit avec PayBox
Module13452Name = SpeedFinder Module13452Name = SpeedFinder
Module13452Desc = Moteur de recherche en AJAX pour trouver un nom à partir d'une partie d'un numéro de téléphone dans 2 secondes Module13452Desc = Moteur de recherche en AJAX pour trouver un nom à partir d'une partie d'un numéro de téléphone en 2 secondes
Module50100Name = Caisse Module50100Name = Caisse
Module50100Desc = Caisse enregistreuse Module50100Desc = Caisse enregistreuse
Permission11 = Consulter les factures Permission11 = Consulter les factures
@@ -1104,3 +1104,5 @@ BankSetupModule=Configuration du module Banque
FreeLegalTextOnChequeReceipts=Mention complémentaire sur les bordereaux de remises de chèques FreeLegalTextOnChequeReceipts=Mention complémentaire sur les bordereaux de remises de chèques
##### Multicompany ##### ##### Multicompany #####
MultiCompanySetup=Configuration du module Multi-société MultiCompanySetup=Configuration du module Multi-société
##### Suppliers #####
SuppliersSetup=Configuration du module Fournisseurs

View File

@@ -0,0 +1,12 @@
# Dolibarr language file - fr_FR - ftp
CHARSET=UTF-8
FTPClientSetup=Configuration du module FTP Client
NewFTPClient=Nouvelle connexion FTP cliente
FTPArea=Espace FTP
FTPAreaDesc=Cet écran vous présente une vue de serveur FTP
SetupOfFTPClientModuleNotComplete=La configuration du module FTP Client semble incomplète
FTPFeatureNotSupportedByYourPHP=Votre PHP ne supporte pas les fonctions FTP
FailedToConnectToFTPServer=Echec de connexion au serveur FTP (serveur: %s, port %s)
FailedToConnectToFTPServerWithCredentials=Echec de login avec le login/mot de passe FTP configuré
FTPFailedToRemoveFile=Echec suppression fichier <b>%s</b>.
FTPFailedToRemoveDir=Echec suppression répertoire <b>%s</b> (Vérifiez les permissions et que le répertoire est vide).

View File

@@ -861,7 +861,7 @@ BarcodeDescC128 =Codice a barre di tipo C128
##### Prelevements ##### ##### Prelevements #####
WithdrawalsSetup =Ritiro del modulo di impostazione WithdrawalsSetup =Ritiro del modulo di impostazione
##### ExternalRSS ##### ##### ExternalRSS #####
ExternalRSSSetup =Impostazioni importazioni esterne RSS <textarea> </textarea> ExternalRSSSetup =Impostazioni importazioni esterne RSS
NewRSS =Nuovo feed RSS NewRSS =Nuovo feed RSS
##### Mailing ##### ##### Mailing #####
MailingSetup =Impostazioni modulo E-mail MailingSetup =Impostazioni modulo E-mail

View File

@@ -884,7 +884,7 @@ BarcodeDescC128=Barcode of type C128
##### Prelevements ##### ##### Prelevements #####
WithdrawalsSetup=Withdrawal module setup WithdrawalsSetup=Withdrawal module setup
##### ExternalRSS ##### ##### ExternalRSS #####
ExternalRSSSetup=External RSS imports setup<textarea></textarea> ExternalRSSSetup=External RSS imports setup
NewRSS=New RSS Feed NewRSS=New RSS Feed
##### Mailing ##### ##### Mailing #####
MailingSetup=EMailing module setup MailingSetup=EMailing module setup

View File

@@ -860,7 +860,7 @@ BarcodeDescISBN=Barcode van het type ISBN
BarcodeDescC39=Barcode van het type C39 BarcodeDescC39=Barcode van het type C39
BarcodeDescC128=Barcode van het type C128 BarcodeDescC128=Barcode van het type C128
WithdrawalsSetup=Intrekking module setup WithdrawalsSetup=Intrekking module setup
ExternalRSSSetup=Externe RSS-invoer setup <textarea></textarea> ExternalRSSSetup=Externe RSS-invoer setup
NewRSS=Nieuwe RSS Feed NewRSS=Nieuwe RSS Feed
MailingSetup=Per e-mail module setup MailingSetup=Per e-mail module setup
MailingEMailFrom=Sender e-mail (Uit) voor e-mails verstuurd via e-mail module MailingEMailFrom=Sender e-mail (Uit) voor e-mails verstuurd via e-mail module

View File

@@ -869,7 +869,7 @@ BarcodeDescISBN=Barcode van het type ISBN
BarcodeDescC39=Barcode van het type C39 BarcodeDescC39=Barcode van het type C39
BarcodeDescC128=Barcode van het type C128 BarcodeDescC128=Barcode van het type C128
WithdrawalsSetup=Intrekking module setup WithdrawalsSetup=Intrekking module setup
ExternalRSSSetup=Externe RSS-invoer setup <textarea></textarea> ExternalRSSSetup=Externe RSS-invoer setup
NewRSS=Nieuwe RSS Feed NewRSS=Nieuwe RSS Feed
MailingSetup=Per e-mail module setup MailingSetup=Per e-mail module setup
MailingEMailFrom=Sender e-mail (Uit) voor e-mails verstuurd via e-mail module MailingEMailFrom=Sender e-mail (Uit) voor e-mails verstuurd via e-mail module

View File

@@ -869,7 +869,7 @@ BarcodeDescISBN=Kod kreskowy typu ISBN
BarcodeDescC39=Kod kreskowy typu C39 BarcodeDescC39=Kod kreskowy typu C39
BarcodeDescC128=Kod kreskowy typu C128 BarcodeDescC128=Kod kreskowy typu C128
WithdrawalsSetup=Wycofanie konfiguracji modułu WithdrawalsSetup=Wycofanie konfiguracji modułu
ExternalRSSSetup=Zewnętrzne RSS przywóz konfiguracji <textarea></textarea> ExternalRSSSetup=Zewnętrzne RSS przywóz konfiguracji
NewRSS=Nowy kanał RSS NewRSS=Nowy kanał RSS
MailingSetup=Moduł konfiguracji e-maila MailingSetup=Moduł konfiguracji e-maila
MailingEMailFrom=Nadawca wiadomości e-mail (Z) na e-maile wysyłane przez e-maila modułu MailingEMailFrom=Nadawca wiadomości e-mail (Z) na e-maile wysyłane przez e-maila modułu

View File

@@ -868,7 +868,7 @@ BarcodeDescISBN=Coduri de bare de tip ISBN
BarcodeDescC39=Coduri de bare de tip C39 BarcodeDescC39=Coduri de bare de tip C39
BarcodeDescC128=Coduri de bare de tip C128 BarcodeDescC128=Coduri de bare de tip C128
WithdrawalsSetup=Retragere de modul de configurare WithdrawalsSetup=Retragere de modul de configurare
ExternalRSSSetup=Extern RSS importurile setup <textarea></textarea> ExternalRSSSetup=Extern RSS importurile setup
NewRSS=New RSS Feed NewRSS=New RSS Feed
MailingSetup=Să trimiteţi un email la modul de instalare MailingSetup=Să trimiteţi un email la modul de instalare
MailingEMailFrom=Expeditorul e-mail (la) pentru e-mail-uri trimise prin email-uri de module MailingEMailFrom=Expeditorul e-mail (la) pentru e-mail-uri trimise prin email-uri de module

View File

@@ -867,7 +867,7 @@ BarcodeDescISBN=Штрих-код типа ISBN
BarcodeDescC39=Штрих-код типа C39 BarcodeDescC39=Штрих-код типа C39
BarcodeDescC128=Штрих-код типа C128 BarcodeDescC128=Штрих-код типа C128
WithdrawalsSetup=Снятие модуля настройки WithdrawalsSetup=Снятие модуля настройки
ExternalRSSSetup=Внешние RSS импорт установки <textarea></textarea> ExternalRSSSetup=Внешние RSS импорт установки
NewRSS=Новые RSS Feed NewRSS=Новые RSS Feed
MailingSetup=Отправка модуля настройки MailingSetup=Отправка модуля настройки
MailingEMailFrom=Отправитель EMail (С) по электронной почте было отправлено по электронной почте: модуль MailingEMailFrom=Отправитель EMail (С) по электронной почте было отправлено по электронной почте: модуль

View File

@@ -983,7 +983,7 @@ function dol_trunc($string,$size=40,$trunc='right',$stringencoding='')
function img_object($alt, $object) function img_object($alt, $object)
{ {
global $conf,$langs; global $conf,$langs;
return '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/object_'.$object.'.png" border="0" alt="'.$alt.'" title="'.$alt.'">'; return '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/object_'.$object.'.png" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'">';
} }
/** /**
@@ -998,8 +998,8 @@ function img_picto($alt, $picto, $options='', $pictoisfullpath=0)
{ {
global $conf; global $conf;
if (! eregi('(\.png|\.gif)$',$picto)) $picto.='.png'; if (! eregi('(\.png|\.gif)$',$picto)) $picto.='.png';
if ($pictoisfullpath) return '<img src="'.$picto.'" border="0" alt="'.$alt.'" title="'.$alt.'"'.($options?' '.$options:'').'>'; if ($pictoisfullpath) return '<img src="'.$picto.'" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'"'.($options?' '.$options:'').'>';
return '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/'.$picto.'" border="0" alt="'.$alt.'" title="'.$alt.'"'.($options?' '.$options:'').'>'; return '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/'.$picto.'" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'"'.($options?' '.$options:'').'>';
} }
/** /**
@@ -1014,8 +1014,8 @@ function img_picto_common($alt, $picto, $options='', $pictoisfullpath=0)
{ {
global $conf; global $conf;
if (! eregi('(\.png|\.gif)$',$picto)) $picto.='.png'; if (! eregi('(\.png|\.gif)$',$picto)) $picto.='.png';
if ($pictoisfullpath) return '<img src="'.$picto.'" border="0" alt="'.$alt.'" title="'.$alt.'"'.($options?' '.$options:'').'>'; if ($pictoisfullpath) return '<img src="'.$picto.'" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'"'.($options?' '.$options:'').'>';
return '<img src="'.DOL_URL_ROOT.'/theme/common/'.$picto.'" border="0" alt="'.$alt.'" title="'.$alt.'"'.($options?' '.$options:'').'>'; return '<img src="'.DOL_URL_ROOT.'/theme/common/'.$picto.'" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'"'.($options?' '.$options:'').'>';
} }
/** /**

View File

@@ -342,7 +342,7 @@ class Translate {
*/ */
function list_domainloaded() function list_domainloaded()
{ {
$ret=''; $ret='Loaded from '.join(',',$this->dir).': ';
foreach($this->tab_loaded as $key=>$val) foreach($this->tab_loaded as $key=>$val)
{ {
if ($ret) $ret.=','; if ($ret) $ret.=',';