Gestion de la désactivation de l'upload de document
This commit is contained in:
parent
8157372d57
commit
ad583fd56a
@ -1,5 +1,5 @@
|
|||||||
<?PHP
|
<?PHP
|
||||||
/* Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -35,15 +35,13 @@ if (! is_dir($upload_dir))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $sendit )
|
if ( $sendit && defined('MAIN_UPLOAD_DOC') && MAIN_UPLOAD_DOC == 1)
|
||||||
{
|
{
|
||||||
if (is_dir($upload_dir))
|
if (is_dir($upload_dir))
|
||||||
{
|
{
|
||||||
|
|
||||||
if (doliMoveFileUpload($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name']))
|
if (doliMoveFileUpload($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name']))
|
||||||
{
|
{
|
||||||
$mesg = "Le fichier est valide, et a été téléchargé
|
$mesg = "Le fichier est valide, et a été téléchargé avec succès.\n";
|
||||||
avec succès.\n";
|
|
||||||
//print_r($_FILES);
|
//print_r($_FILES);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -123,28 +121,29 @@ if ($socid > 0)
|
|||||||
$head[$h][1] = 'Notifications';
|
$head[$h][1] = 'Notifications';
|
||||||
|
|
||||||
dolibarr_fiche_head($head, $a);
|
dolibarr_fiche_head($head, $a);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
print "<table width=\"100%\" border=\"0\" cellspacing=\"1\">\n";
|
print_titre("Documents associés à l'entreprise : $societe->nom");
|
||||||
|
|
||||||
print "<tr><td><div class=\"titre\">Documents associés à l'entreprise : $societe->nom</div></td>";
|
|
||||||
print "<td align=\"center\"><a href=\"fiche.php?socid=$societe->id\">Commercial</a></td>";
|
|
||||||
print "<td align=\"center\"><a href=\"../compta/fiche.php?socid=$societe->id\">Compta</a></td>";
|
|
||||||
print "</tr></table>";
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
if (defined('MAIN_UPLOAD_DOC') && MAIN_UPLOAD_DOC == 1)
|
||||||
echo '<FORM NAME="userfile" ACTION="docsoc.php?socid='.$socid.'" ENCTYPE="multipart/form-data" METHOD="POST">';
|
{
|
||||||
print '<input type="hidden" name="max_file_size" value="2000000">';
|
echo '<FORM NAME="userfile" ACTION="docsoc.php?socid='.$socid.'" ENCTYPE="multipart/form-data" METHOD="POST">';
|
||||||
print '<input type="file" name="userfile" size="40" maxlength="80">';
|
print '<input type="hidden" name="max_file_size" value="2000000">';
|
||||||
print '<BR>';
|
print '<input type="file" name="userfile" size="40" maxlength="80">';
|
||||||
print '<input type="submit" value="Upload File!" name="sendit">';
|
print '<BR>';
|
||||||
print '<input type="submit" value="Cancel" name="cancelit"><BR>';
|
print '<input type="submit" value="Upload File!" name="sendit">';
|
||||||
print '</FORM></div>';
|
print '<input type="submit" value="Cancel" name="cancelit"><BR>';
|
||||||
|
print '</FORM>';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print "La gestion des fichiers associés est désactivé sur ce serveur";
|
||||||
|
}
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
print $mesg;
|
print $mesg;
|
||||||
|
|
||||||
@ -154,9 +153,7 @@ if ($socid > 0)
|
|||||||
|
|
||||||
if ($handle)
|
if ($handle)
|
||||||
{
|
{
|
||||||
|
|
||||||
print '<table width="100%" border="1" cellpadding="3" cellspacing="0">';
|
print '<table width="100%" border="1" cellpadding="3" cellspacing="0">';
|
||||||
|
|
||||||
while (($file = readdir($handle))!==false)
|
while (($file = readdir($handle))!==false)
|
||||||
{
|
{
|
||||||
if (!is_dir($dir.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS')
|
if (!is_dir($dir.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user