Beispiel #1
0
		/*
		 * Confirmation suppression fichier
		 */
		if ($action == 'delete')
		{
			$ret=$html->form_confirm($_SERVER["PHP_SELF"].'?socid='.$socid.'&urlfile='.urldecode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1);
			if ($ret == 'html') print '<br>';
		}

		$formfile=new FormFile($db);

        // Show upload form
		if ($conf->global->MAIN_USE_JQUERY_FILEUPLOAD)
		{
			$formfile->form_ajaxfileupload($object);
		}
		else
		{
			$formfile->form_attach_new_file($_SERVER["PHP_SELF"].'?socid='.$socid,'',0,0,$user->rights->societe->creer);
        }

		// List of document
		$param='&socid='.$object->id;
		$formfile->list_of_documents($filearray,$object,'societe',$param);

		print "<br><br>";
	}
	else
	{
		dol_print_error($db);