Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
34a5ef67
Commit
34a5ef67
authored
20 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Fix: Pb register_globals=off
parent
03854994
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/comm/propal/document.php
+18
-16
18 additions, 16 deletions
htdocs/comm/propal/document.php
with
18 additions
and
16 deletions
htdocs/comm/propal/document.php
+
18
−
16
View file @
34a5ef67
<?php
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004
Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004
-2005
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
...
...
@@ -20,7 +20,7 @@
* $Source$
*/
/*
!
\file htdocs/comm/propal/document.php
/*
*
\file htdocs/comm/propal/document.php
\ingroup propale
\brief Page de gestion des documents attaches une proposition commerciale
\version $Revision$
...
...
@@ -38,6 +38,7 @@ if (!$user->rights->propale->lire)
llxHeader
();
function
do_upload
(
$upload_dir
)
{
global
$local_file
,
$error_msg
;
...
...
@@ -61,13 +62,16 @@ function do_upload ($upload_dir)
}
if
(
$id
>
0
)
if
(
$_GET
[
"id"
]
>
0
)
{
$propal
=
new
Propal
(
$db
);
if
(
$propal
->
fetch
(
$id
)
)
if
(
$propal
->
fetch
(
$_GET
[
"id"
]))
{
$upload_dir
=
PROPALE_OUTPUTDIR
.
"/"
.
$propal
->
ref
;
$upload_dir
=
$conf
->
propal
->
dir_output
.
"/"
.
$propal
->
ref
;
if
(
$error_msg
)
{
...
...
@@ -85,20 +89,18 @@ if ($id > 0)
do_upload
(
$upload_dir
);
}
/*
*
*/
print
"<table width=
\"
100%
\"
border=
\"
0
\"
cellspacing=
\"
1
\"
>
\n
"
;
print
'<table width="100%" class="noborder">'
;
print
"<tr><td><div class=
\"
titre
\"
>Documents associs la proposition : "
.
$propal
->
ref_url
.
"</div></td>"
;
print
"</tr></table>"
;
echo
'<FORM NAME
="userfile"
ACTION
="document.php?id='
.
$propal
->
id
.
'"
ENCTYPE
="multipart/form-data"
METHOD
="POST">'
;
print
'<form name
="userfile"
action
="document.php?id='
.
$propal
->
id
.
'"
enctype
="multipart/form-data"
method
="POST">'
;
print
'<input type="hidden" name="max_file_size" value="2000000">'
;
print
'<input type="file" name="userfile" size="40" maxlength="80"><br>'
;
print
'<input type="submit" value="
Upload File!
" name="sendit">'
;
print
'<input type="submit" value="'
.
$langs
->
trans
(
"Cancel"
)
.
'" name="cancelit"><
BR
>'
;
print
'</
FORM
>'
;
print
'<input type="submit" value="
'
.
$langs
->
trans
(
"Upload"
)
.
'
" name="sendit">'
;
print
'<input type="submit" value="'
.
$langs
->
trans
(
"Cancel"
)
.
'" name="cancelit"><
br
>'
;
print
'</
form><br
>'
;
clearstatcache
();
...
...
@@ -106,14 +108,14 @@ if ($id > 0)
if
(
$handle
)
{
print
'<table width="100%"
border="1" cellpadding="3" cellspacing="0
">'
;
print
'<table width="100%"
class="border
">'
;
while
((
$file
=
readdir
(
$handle
))
!==
false
)
{
if
(
!
is_dir
(
$dir
.
$file
)
&&
substr
(
$file
,
0
,
1
)
<>
'.'
&&
substr
(
$file
,
0
,
3
)
<>
'CVS'
)
{
print
'<tr><td>'
;
echo
'<a target="_blank" href="'
.
DOL_URL_ROOT
.
'/document
/propale/'
.
$propal
->
ref
.
'/'
.
$file
.
'">'
.
$file
.
'</a>'
;
echo
'<a target="_blank" href="'
.
DOL_URL_ROOT
.
'/document
.php?modulepart=propal&file='
.
urlencode
(
$propal
->
ref
.
'/'
.
$file
)
.
'">'
.
$file
.
'</a>'
;
print
"</td>
\n
"
;
print
'<td align="right">'
.
filesize
(
$upload_dir
.
"/"
.
$file
)
.
' bytes</td>'
;
...
...
@@ -126,7 +128,7 @@ if ($id > 0)
}
else
{
echo
'<a href="document.php?id='
.
$propal
->
id
.
'&action=delete&urlfile='
.
urlencode
(
$file
)
.
'">
Supprimer
</a>'
;
echo
'<a href="
'
.
DOL_URL_ROOT
.
'/comm/propal/
document.php?id='
.
$propal
->
id
.
'&action=delete&urlfile='
.
urlencode
(
$file
)
.
'">
'
.
$langs
->
trans
(
"Delete"
)
.
'
</a>'
;
}
print
"</td></tr>
\n
"
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment