28require_once
'../main.inc.php';
36require_once DOL_DOCUMENT_ROOT.
'/core/class/html.form.class.php';
37require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
41 $langs->setDefaultLang(
GETPOST(
'lang',
'aZ09'));
44$langs->loadLangs(array(
"main",
"other"));
46$action =
GETPOST(
'action',
'aZ09');
47$modulepart =
GETPOST(
'modulepart',
'aZ09');
49$upload_dir = $conf->admin->dir_temp.
'/import';
57if (preg_match(
'/^upload_page-by(\d+)-([a-z_]+)-(\d+)/', $file, $reg)) {
58 $modulepart = $reg[2];
60 if ($reg[1] != $user->id) {
61 accessforbidden(
'User id for file to process does not match current user id');
82$title = $langs->trans(
"UploadFile");
88llxHeader(
'', $title, $help_url,
'', 0, 0, $arrayofjs, $arrayofcss,
'',
'mod-upload page-card');
95print
"<!-- Begin Form -->\n";
96print
'<form id="uploadform" enctype="multipart/form-data" method="POST" action="'.dolBuildUrl($_SERVER[
"PHP_SELF"]).
'">';
97print
'<input type="hidden" name="token" value="'.newToken().
'">';
98print
'<input type="hidden" name="action" value="uploadfile">';
99print
'<input type="hidden" name="sendit" value="1">';
100print
'<input type="hidden" name="modulepart" id="modulepart" value="">';
101print
'<input type="hidden" name="overwritefile" value="1">';
104$(document).ready(function() {
113print
"\n<!-- End Form -->\n";
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2, $allowothertags=array())
Show picto whatever it's its name (generic function)
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.