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); } } else {
<div class="pane-in ecm-in-layout-south layout-padding valignmiddle"> <?php // Start Add new file area // To attach new file if (!empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS) || !empty($section)) { if (empty($section) || $section == -1) { ?> <script type="text/javascript"> jQuery(document).ready(function() { jQuery('#formuserfile').hide(); }); </script> <?php } $formfile = new FormFile($db); $formfile->form_attach_new_file($_SERVER["PHP_SELF"], 'none', 0, $section ? $section : -1, $user->rights->ecm->upload, 48, null, '', 0, '', 0, 'formuserfile'); } else { print ' '; } // End Add new file area ?> </div> </div> </div> <!-- end div id="containerlayout" --> <?php // End of page //dol_fiche_end(); if (!empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS)) { include DOL_DOCUMENT_ROOT . '/ecm/tpl/enablefiletreeajax.tpl.php'; } llxFooter();
if (!empty($conf->global->MAIN_UPLOAD_DOC)) { print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=ajout_photo&id=' . $object->id . '">'; print $langs->trans("AddPhoto") . '</a>'; } else { print '<a class="butActionRefused" href="#">e'; print $langs->trans("AddPhoto") . '</a>'; } } print "\n</div>\n"; /* * Add a photo */ if ($action == 'ajout_photo' && ($user->rights->produit->creer || $user->rights->service->creer) && !empty($conf->global->MAIN_UPLOAD_DOC)) { // Affiche formulaire upload $formfile = new FormFile($db); $formfile->form_attach_new_file($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans("AddPhoto"), 1, 0, $user->rights->produit->creer || $user->rights->service->creer, 50, $object, '', false, '', 0); // ajax=false for the moment. true may not work. } // Affiche photos if ($action != 'ajout_photo') { $nbphoto = 0; $nbbyrow = 5; $maxWidth = 160; $maxHeight = 120; print $object->show_photos($dir, 1, 1000, $nbbyrow, 1, 1); if ($object->nbphoto < 1) { print '<br>'; print '<table width="100%" valign="top" align="center" border="0" cellpadding="2" cellspacing="2">'; print '<tr align=center valign=middle border=1><td class="photo">'; print "<br>" . $langs->trans("NoPhotoYet") . "<br><br>"; print '</td></tr>';
// Status (to buy) print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')</td><td>'; print $object->getLibStatut(2,1); print '</td></tr>'; print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>'; print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>'; print '</table>'; print '</div>'; // Affiche formulaire upload $formfile=new FormFile($db); $formfile->form_attach_new_file(DOL_URL_ROOT.'/product/document.php?id='.$object->id,'',0,0,($user->rights->produit->creer||$user->rights->service->creer),50,$object); // List of document $param='&id='.$object->id; $formfile->list_of_documents($filearray,$object,'produit',$param); } else { print $langs->trans("UnkownError"); } llxFooter(); $db->close();
if (!empty($conf->global->MAIN_UPLOAD_DOC)) { print '<a class="butAction hideonsmartphone" href="' . $_SERVER['PHP_SELF'] . '?action=ajout_photo&id=' . $object->id . '&type=' . $type . '">'; print $langs->trans("AddPhoto") . '</a>'; } else { print '<a class="butActionRefused hideonsmartphone" href="#">'; print $langs->trans("AddPhoto") . '</a>'; } } print '</div>' . "\n"; /* * Ajouter une photo */ if ($action == 'ajout_photo' && $user->rights->categorie->creer && !empty($conf->global->MAIN_UPLOAD_DOC)) { // Affiche formulaire upload $formfile = new FormFile($db); $formfile->form_attach_new_file($_SERVER['PHP_SELF'] . '?id=' . $object->id . '&type=' . $type, $langs->trans("AddPhoto"), 1, '', $user->rights->categorie->creer, 50, $object, '', false, '', 0); } // Affiche photos if ($action != 'ajout_photo') { $nbphoto = 0; $nbbyrow = 5; $maxWidth = 160; $maxHeight = 120; $pdir = get_exdir($object->id, 2) . $object->id . "/photos/"; $dir = $upload_dir . '/' . $pdir; print '<br>'; print '<table width="100%" valign="top" align="center" border="0" cellpadding="2" cellspacing="2">'; foreach ($object->liste_photos($dir) as $key => $obj) { $nbphoto++; if ($nbbyrow && $nbphoto % $nbbyrow == 1) { print '<tr align=center valign=middle border=1>';
print '<td align="right">'; print '<input type="submit" class="button" name="button" value="' . $langs->trans("Modify") . '">'; print '</td>'; print '</tr>'; print '</form>'; // Use anti virus $var = !$var; print '<form action="' . $_SERVER["PHP_SELF"] . '?action=MAIN_ANTIVIRUS_PARAM" method="POST">'; print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; print "<tr " . $bc[$var] . ">"; print '<td colspan="2">' . $langs->trans("AntiVirusParam") . '<br>'; print $langs->trans("AntiVirusParamExample"); print '</td>'; print '<td>'; print '<input type="text" name="MAIN_ANTIVIRUS_PARAM" size="72" value="' . htmlentities($conf->global->MAIN_ANTIVIRUS_PARAM) . '">'; print "</td>"; print '<td align="right">'; print '<input type="submit" class="button" name="button" value="' . $langs->trans("Modify") . '">'; print '</td>'; print '</tr>'; print '</form>'; print '</table>'; print '</div>'; // Form to test upload dol_htmloutput_mesg($mesg); // Affiche formulaire upload print '<br>'; $formfile = new FormFile($db); $formfile->form_attach_new_file(DOL_URL_ROOT . '/admin/security_other.php', $langs->trans("FormToTestFileUploadForm"), 0, 0, 1); llxFooter(); $db->close();
print '<tr><td>'.$langs->trans("AuthorRequest").'</td>'; print '<td colspan="2">'.$author->getNomUrl(1).'</td>'; print '</tr>'; print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.sizeof($filearray).'</td></tr>'; print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>'; print "</table>\n"; print "</div>\n"; if ($mesg) { print $mesg."<br>"; } // Affiche formulaire upload $formfile=new FormFile($db); $formfile->form_attach_new_file(DOL_URL_ROOT.'/fourn/commande/document.php?id='.$commande->id,'',0,0,$user->rights->fournisseur->commande->creer); // List of document $param='&id='.$commande->id; $formfile->list_of_documents($filearray,$commande,'commande_fournisseur',$param); } else { Header('Location: index.php'); } $db->close(); llxFooter('$Date: 2011/07/31 23:57:02 $ - $Revision: 1.24 $'); ?>
print '<tr><td width="30%">'.$langs->trans('Ref').'</td><td colspan="3">'.$contrat->ref.'</td></tr>'; // Societe print '<tr><td>'.$langs->trans("Customer").'</td>'; print '<td colspan="3">'.$soc->getNomUrl(1).'</td></tr>'; print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.sizeof($filearray).'</td></tr>'; print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>'; print '</table>'; print '</div>'; // Affiche formulaire upload $formfile=new FormFile($db); $formfile->form_attach_new_file(DOL_URL_ROOT.'/contrat/document.php?id='.$contrat->id,'',0,0,$user->rights->contrat->creer); // List of document $param='&id='.$contrat->id; $formfile->list_of_documents($filearray,$contrat,'contract',$param); } else { print $langs->trans("UnkownError"); } $db->close(); llxFooter('$Date: 2011/07/31 23:46:55 $ - $Revision: 1.25 $');
dol_htmloutput_mesg($mesg,$mesgs); /* * Confirmation suppression fichier */ if ($action == 'delete') { $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?facid='.$id.'&urlfile='.urldecode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1); if ($ret == 'html') print '<br>'; } // Affiche formulaire upload $formfile=new FormFile($db); $formfile->form_attach_new_file(DOL_URL_ROOT.'/compta/facture/document.php?facid='.$object->id,'',0,0,$user->rights->facture->creer); // List of document $param='&facid='.$object->id; $formfile->list_of_documents($filearray,$object,'facture',$param); } else { dol_print_error($db); } } else { print $langs->trans("UnkownError");
// Statut print '<tr><td>'.$langs->trans("Status").'</td><td>'.$object->getLibStatut(4).'</td></tr>'; // Files infos print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.count($filearray).'</td></tr>'; print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>'; print "</table>\n"; print "</div>\n"; dol_htmloutput_mesg($mesg); // Affiche formulaire upload $formfile=new FormFile($db); $formfile->form_attach_new_file(DOL_URL_ROOT.'/projet/document.php?id='.$object->id,'',0,0,($userWrite>0),50,$object); // List of document $param='&id='.$object->id; $formfile->list_of_documents($filearray,$object,'projet',$param,0,'',($userWrite>0)); } else { dol_print_error('','NoRecordFound'); } llxFooter(); $db->close();
print $form->showrefnav($object, 'ref', '', 1, 'ref', 'ref'); print '</td></tr>'; print '<tr><td>' . $langs->trans('Company') . '</td><td colspan="3">' . $object->thirdparty->getNomUrl(1) . '</td></tr>'; print '<tr><td>' . $langs->trans("NbOfAttachedFiles") . '</td><td colspan="3">' . count($filearray) . '</td></tr>'; print '<tr><td>' . $langs->trans("TotalSizeOfAttachedFiles") . '</td><td colspan="3">' . $totalsize . ' ' . $langs->trans("bytes") . '</td></tr>'; print "</table>\n"; print "</div>\n"; dol_htmloutput_mesg($mesg, $mesgs); /* * Confirmation suppression fichier */ if ($action == 'delete') { $ret = $form->form_confirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1); if ($ret == 'html') { print '<br>'; } } // Affiche formulaire upload $formfile = new FormFile($db); $formfile->form_attach_new_file(DOL_URL_ROOT . '/commande/document.php?id=' . $object->id, '', 0, 0, $user->rights->commande->creer, 50, $object); // List of document $param = '&id=' . $object->id; $formfile->list_of_documents($filearray, $object, 'commande', $param); } else { dol_print_error($db); } } else { Header('Location: index.php'); } llxFooter(); $db->close();
print dol_print_date($object->periode, "day"); } print "</td>"; print "</tr>"; // Due date if ($action == 'edit') { print '<tr><td>' . $langs->trans("DateDue") . "</td><td>"; print $form->select_date($object->date_ech, 'ech', 0, 0, 0, 'charge', 1); print "</td></tr>"; } else { print "<tr><td>" . $langs->trans("DateDue") . "</td><td>" . dol_print_date($object->date_ech, 'day') . "</td></tr>"; } // Amount print '<tr><td>' . $langs->trans("AmountTTC") . '</td><td>' . price($object->amount) . '</td></tr>'; // Status print '<tr><td>' . $langs->trans("Status") . '</td><td>' . $object->getLibStatut(4) . '</td></tr>'; print '<tr><td>' . $langs->trans("NbOfAttachedFiles") . '</td><td colspan="3">' . count($filearray) . '</td></tr>'; print '<tr><td>' . $langs->trans("TotalSizeOfAttachedFiles") . '</td><td colspan="3">' . $totalsize . ' ' . $langs->trans("bytes") . '</td></tr>'; print '</table>'; print '</div>'; // Affiche formulaire upload $formfile = new FormFile($db); $formfile->form_attach_new_file(DOL_URL_ROOT . '/compta/sociales/document.php?id=' . $object->id, '', 0, 0, $user->rights->tax->charges->creer); // List of document //$param='&id='.$object->id; $formfile->list_of_documents($filearray, $object, 'tax', $param); } else { print $langs->trans("UnkownError"); } llxFooter(); $db->close();
?> "> <div class="pane-in ecm-in-layout-center"> <div id="ecmfileview" class="ecmfileview"> <?php // Start right panel $mode = 'noajax'; include_once DOL_DOCUMENT_ROOT . '/core/ajax/ajaxdirpreview.php'; // End right panel ?> </div> </div> <div class="pane-in ecm-in-layout-south layout-padding valignmiddle"> <?php // Start Add new file area // To attach new file if (empty($conf->global->MAIN_ECM_DISABLE_JS) || !empty($section)) { $formfile = new FormFile($db); $formfile->form_attach_new_file(DOL_URL_ROOT . '/ecm/index.php', 'none', 0, $section ? $section : -1, $user->rights->ecm->upload, 48); } else { print ' '; } // End Add new file area ?> </div> </div> </div> <!-- end div id="containerlayout" --> <?php // End of page llxFooter(); $db->close();
dol_htmloutput_mesg($mesg,$mesgs); /* * Confirmation suppression fichier */ if ($_GET['action'] == 'delete') { $ret=$html->form_confirm($_SERVER["PHP_SELF"].'?id='.$_GET["id"].'&urlfile='.urldecode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1); if ($ret == 'html') print '<br>'; } // Affiche formulaire upload $formfile=new FormFile($db); $formfile->form_attach_new_file(DOL_URL_ROOT.'/adherents/document.php?id='.$id,'',0,0,$user->rights->adherent->creer); // List of document $param='&socid='.$societe->id; $formfile->list_of_documents($filearray,$member,'member',$param, 0, get_exdir($id,2,0,1).'/'.$id.'/'); print "<br><br>"; } else { dol_print_error($db); } } else {
* Confirm form to delete */ if ($action == 'delete') { $langs->load("companies"); // Need for string DeleteFile+ConfirmDeleteFiles $ret = $form->form_confirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode(GETPOST("urlfile")) . '&linkid=' . GETPOST('linkid', 'int') . (empty($param) ? '' : $param), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1); if ($ret == 'html') { print '<br>'; } } $formfile = new FormFile($db); // We define var to enable the feature to add prefix of uploaded files $savingdocmask = ''; if (empty($conf->global->MAIN_DISABLE_SUGGEST_REF_AS_PREFIX)) { //var_dump($modulepart); if (in_array($modulepart, array('facture_fournisseur', 'commande_fournisseur', 'facture', 'commande', 'propal', 'ficheinter', 'contract', 'project', 'project_task'))) { $savingdocmask = $object->ref . '___file__'; } /*if (in_array($modulepart,array('member'))) { $savingdocmask=$object->login.'___file__'; }*/ } // Show upload form (document and links) $formfile->form_attach_new_file($_SERVER["PHP_SELF"] . '?id=' . $object->id . (empty($withproject) ? '' : '&withproject=1'), '', 0, 0, $permission, 50, $object, '', 1, $savingdocmask); // List of document $formfile->list_of_documents($filearray, $object, $modulepart, $param, 0, $relativepathwithnofile, $permission); print "<br>"; //List of links $formfile->listOfLinks($object, $permission, $action, GETPOST('linkid', 'int'), $param); print "<br>";
else print ' '; print '</td></tr>'; // Files infos print '<tr><td>'.$langs->trans("NbOfAttachedFiles").'</td><td colspan="3">'.sizeof($filearray).'</td></tr>'; print '<tr><td>'.$langs->trans("TotalSizeOfAttachedFiles").'</td><td colspan="3">'.$totalsize.' '.$langs->trans("bytes").'</td></tr>'; print "</table>\n"; print "</div>\n"; if ($mesg) { print $mesg."<br>"; } // Affiche formulaire upload $formfile=new FormFile($db); $formfile->form_attach_new_file(DOL_URL_ROOT.'/projet/tasks/document.php?id='.$task->id,'',0,0,$user->rights->projet->creer); // List of document $param='&id='.$task->id; $formfile->list_of_documents($filearray,$task,'projet',$param,0,dol_sanitizeFileName($project->ref).'/'.dol_sanitizeFileName($task->ref).'/'); } else { Header('Location: index.php'); } $db->close(); llxFooter('$Date: 2011/07/31 23:23:36 $ - $Revision: 1.16 $');
{ print '<a class="butActionRefused" href="#">e'; print $langs->trans("AddPhoto").'</a>'; } } print "\n</div>\n"; /* * Add a photo */ if ($_GET["action"] == 'ajout_photo' && ($user->rights->produit->creer || $user->rights->service->creer) && ! empty($conf->global->MAIN_UPLOAD_DOC)) { // Affiche formulaire upload $formfile=new FormFile($db); $formfile->form_attach_new_file(DOL_URL_ROOT.'/product/photos.php?id='.$product->id,$langs->trans("AddPhoto"),1); } // Affiche photos if ($_GET["action"] != 'ajout_photo') { $nbphoto=0; $nbbyrow=5; $maxWidth = 160; $maxHeight = 120; print $product->show_photos($dir,1,1000,$nbbyrow,1,1); if ($product->nbphoto < 1) {
print '<tr><td nowrap>' . $langs->trans("Priority") . '</td><td colspan="3">'; print $act->priority ? $act->priority : ''; print '</td></tr>'; print '</table><br><br><table class="border" width="100%">'; // Construit liste des fichiers $filearray = dol_dir_list($upload_dir, "files", 0, '', '\\.meta$', $sortfield, strtolower($sortorder) == 'desc' ? SORT_DESC : SORT_ASC, 1); $totalsize = 0; foreach ($filearray as $key => $file) { $totalsize += $file['size']; } print '<tr><td width="30%" nowrap>' . $langs->trans("NbOfAttachedFiles") . '</td><td colspan="3">' . count($filearray) . '</td></tr>'; print '<tr><td>' . $langs->trans("TotalSizeOfAttachedFiles") . '</td><td colspan="3">' . $totalsize . ' ' . $langs->trans("bytes") . '</td></tr>'; print '</table>'; print '</div>'; if ($mesg) { print $mesg . "<br>"; } // Affiche formulaire upload $formfile = new FormFile($db); $formfile->form_attach_new_file(DOL_URL_ROOT . '/comm/action/document.php?id=' . $act->id, '', 0, 0, $user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create); // List of document $param = '&id=' . $act->id; $formfile->list_of_documents($filearray, $act, 'actions', $param, 0, '', $user->rights->agenda->myactions->create); } else { dol_print_error($db); } } else { print $langs->trans("UnkownError"); } $db->close(); llxFooter();
// FIXME $facidnext is not defined /* if ($facidnext > 0) { $facthatreplace=new FactureFournisseur($db); $facthatreplace->fetch($facidnext); print ' ('.$langs->transnoentities("ReplacedByInvoice",$facthatreplace->getNomUrl(1)).')'; } */ print '</td></tr>'; // Label print '<tr><td>' . $form->editfieldkey("Label", 'label', $object->label, $object, 0) . '</td><td colspan="3">'; print $form->editfieldval("Label", 'label', $object->label, $object, 0); print '</td>'; // Nb of files print '<tr><td>' . $langs->trans('NbOfAttachedFiles') . '</td><td colspan="3">' . count($filearray) . '</td></tr>'; print '<tr><td>' . $langs->trans('TotalSizeOfAttachedFiles') . '</td><td colspan="3">' . $totalsize . ' ' . $langs->trans('bytes') . '</td></tr>'; print '</table>'; print '</div>'; // Affiche formulaire upload $formfile = new FormFile($db); $formfile->form_attach_new_file($_SERVER['PHP_SELF'] . '?facid=' . $object->id, '', 0, 0, $user->rights->fournisseur->facture->creer, 50, $object); // List of document $param = '&facid=' . $object->id; $ref = dol_sanitizeFileName($object->ref); $formfile->list_of_documents($filearray, $object, 'facture_fournisseur', $param, 0, get_exdir($object->id, 2, 0) . $ref . '/'); } else { print $langs->trans('UnkownError'); } llxFooter(); $db->close();
{ print '<a class="butActionRefused" href="#">'; print $langs->trans("AddPhoto").'</a>'; } } print "\n</div>\n"; /* * Ajouter une photo */ if ($action == 'ajout_photo' && $user->rights->categorie->creer && ! empty($conf->global->MAIN_UPLOAD_DOC)) { // Affiche formulaire upload $formfile=new FormFile($db); $formfile->form_attach_new_file(DOL_URL_ROOT.'/categories/photos.php?id='.$object->id.'&type='.$type,$langs->trans("AddPhoto"),1); } // Affiche photos if ($action != 'ajout_photo') { $nbphoto=0; $nbbyrow=5; $maxWidth = 160; $maxHeight = 120; $pdir = get_exdir($object->id,2) . $object->id ."/photos/"; $dir = $conf->categorie->dir_output.'/'.$pdir; print '<br>';
print '<td width="30%">' . $langs->trans("Ref") . '</td><td colspan="3">'; print $form->showrefnav($object, 'ref', '', 1, 'ref'); print '</td>'; print '</tr>'; // Label print '<tr><td>' . $langs->trans("Label") . '</td><td colspan="3">' . $object->adresse . '</td></tr>'; /* // Status (to sell) print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Sell").')</td><td>'; print $object->getLibStatut(2,0); print '</td></tr>'; // Status (to buy) print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')</td><td>'; print $object->getLibStatut(2,1); print '</td></tr>'; */ print '<tr><td>' . $langs->trans("NbOfAttachedFiles") . '</td><td colspan="3">' . count($filearray) . '</td></tr>'; print '<tr><td>' . $langs->trans("TotalSizeOfAttachedFiles") . '</td><td colspan="3">' . $totalsize . ' ' . $langs->trans("bytes") . '</td></tr>'; print '</table>'; print '</div>'; // Affiche formulaire upload $formfile = new FormFile($db); $formfile->form_attach_new_file(DOL_URL_ROOT . '/gestimmo/biens/document.php?id=' . $object->id, '', 0, 0, $user->rights->produit->creer || $user->rights->service->creer, 50, $object); // List of document $formfile->list_of_documents($filearray, $object, 'gestimmo'); } else { print $langs->trans("UnkownError"); } llxFooter(); $db->close();
dol_htmloutput_mesg($mesg,$mesgs); /* * Confirmation suppression fichier */ if ($action == 'delete') { $ret=$form->form_confirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode(GETPOST("urlfile")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1); if ($ret == 'html') print '<br>'; } $formfile=new FormFile($db); // Show upload form $formfile->form_attach_new_file($_SERVER["PHP_SELF"].'?id='.$object->id,'',0,0,$user->rights->societe->creer,50,$object); // List of document $param='&socid='.$object->id; $formfile->list_of_documents($filearray,$object,'societe',$param); print "<br><br>"; } else { accessforbidden('',0,0); } llxFooter(); $db->close();
*/ llxheader('', $langs->trans("adddocument"), ''); $form = new Form($db); if ($object->id) { $local = new Local($db, GETPOST('id')); $head = local_prepare_head($local); dol_fiche_head($head, 'document', $langs->trans("ImoDocument"), 0, 'propertie'); // Construit liste des fichiers $filearray = dol_dir_list($upload_dir, "files", 0, '', '\\.meta$', $sortfield, strtolower($sortorder) == 'desc' ? SORT_DESC : SORT_ASC, 1); $totalsize = 0; foreach ($filearray as $key => $file) { $totalsize += $file['size']; } print '<table class="border" width="100%">'; print '<tr><td width="20%">' . $langs->trans("nomlocal") . '</td>'; print '<td><input name="nom" size="40" value="' . $local->nom . '"</td></tr>'; print '<tr><td>' . $langs->trans("NbOfAttachedFiles") . '</td><td colspan="3">' . count($filearray) . '</td></tr>'; print '<tr><td>' . $langs->trans("TotalSizeOfAttachedFiles") . '</td><td colspan="3">' . $totalsize . ' ' . $langs->trans("bytes") . '</td></tr>'; print '</table>'; print '</div>'; // Affiche formulaire upload $formfile = new FormFile($db); $formfile->form_attach_new_file(DOL_URL_ROOT . '/custom/immobilier/local/document.php?id=' . $object->id, '', 0, 0); // List of document // $param='&id='.$object->id; $formfile->list_of_documents($filearray, $object, 'immobilier', $param); } else { print $langs->trans("UnkownError"); } llxFooter(); $db->close();
// Ref print '<tr><td width="30%">' . $langs->trans("Ref") . '</td><td>'; print $form->showrefnav($object, 'ref', '', 1, 'ref', 'ref'); print '</td></tr>'; // Societe print "<tr><td>" . $langs->trans("Company") . "</td><td>" . $object->client->getNomUrl(1) . "</td></tr>"; print '<tr><td>' . $langs->trans("NbOfAttachedFiles") . '</td><td colspan="3">' . count($filearray) . '</td></tr>'; print '<tr><td>' . $langs->trans("TotalSizeOfAttachedFiles") . '</td><td colspan="3">' . $totalsize . ' ' . $langs->trans("bytes") . '</td></tr>'; print '</table>'; print '</div>'; dol_htmloutput_mesg($mesg, $mesgs); /* * Confirmation suppression fichier */ if ($action == 'delete') { $ret = $form->form_confirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1); if ($ret == 'html') { print '<br>'; } } // Affiche formulaire upload $formfile = new FormFile($db); $formfile->form_attach_new_file(DOL_URL_ROOT . '/fichinter/document.php?id=' . $object->id, '', 0, 0, $user->rights->ficheinter->creer, 50, $object); // List of document $param = '&id=' . $object->id; $formfile->list_of_documents($filearray, $object, 'ficheinter', $param); } else { print $langs->trans("UnkownError"); } llxFooter(); $db->close();
if (!in_array($basedir, $listdir)) { print img_warning($langs->trans('WarningSafeModeOnCheckExecDir')); dol_syslog("safe_mode is on, basedir is " . $basedir . ", safe_mode_exec_dir is " . ini_get('safe_mode_exec_dir'), LOG_WARNING); } } print '<input type="text" name="MAIN_ANTIVIRUS_COMMAND" size="72" value="' . (!empty($conf->global->MAIN_ANTIVIRUS_COMMAND) ? dol_htmlentities($conf->global->MAIN_ANTIVIRUS_COMMAND) : '') . '">'; print "</td>"; print '</tr>'; // Use anti virus $var = !$var; print "<tr " . $bc[$var] . ">"; print '<td colspan="2">' . $langs->trans("AntiVirusParam") . '<br>'; print $langs->trans("AntiVirusParamExample"); print '</td>'; print '<td>'; print '<input type="text" name="MAIN_ANTIVIRUS_PARAM" size="72" value="' . (!empty($conf->global->MAIN_ANTIVIRUS_PARAM) ? dol_htmlentities($conf->global->MAIN_ANTIVIRUS_PARAM) : '') . '">'; print "</td>"; print '</tr>'; print '</table>'; dol_fiche_end(); print '<div class="center"><input type="submit" class="button" name="button" value="' . $langs->trans("Modify") . '"></div>'; print '</form>'; // Form to test upload print '<br>'; $formfile = new FormFile($db); $formfile->form_attach_new_file($_SERVER['PHP_SELF'], $langs->trans("FormToTestFileUploadForm"), 0, 0, 1, 50, '', '', 1, '', 0); // List of document $filearray = dol_dir_list($upload_dir, "files", 0, '', '', 'name', SORT_ASC, 1); $formfile->list_of_documents($filearray, '', 'admin_temp', ''); llxFooter(); $db->close();
if ($facidnext > 0) { $facthatreplace = new FactureFournisseur($db); $facthatreplace->fetch($facidnext); print ' (' . $langs->transnoentities("ReplacedByInvoice", $facthatreplace->getNomUrl(1)) . ')'; } print '</td></tr>'; // Label print '<tr><td>' . $form->editfieldkey("Label", 'label', $object->label, $object, 0) . '</td><td colspan="3">'; print $form->editfieldval("Label", 'label', $object->label, $object, 0); print '</td>'; // Nb of files print '<tr><td>' . $langs->trans('NbOfAttachedFiles') . '</td><td colspan="3">' . count($filearray) . '</td></tr>'; print '<tr><td>' . $langs->trans('TotalSizeOfAttachedFiles') . '</td><td colspan="3">' . $totalsize . ' ' . $langs->trans('bytes') . '</td></tr>'; print '</table>'; print '</div>'; dol_htmloutput_mesg($mesg); // Affiche formulaire upload $formfile = new FormFile($db); $formfile->form_attach_new_file(DOL_URL_ROOT . '/fourn/facture/document.php?facid=' . $object->id, '', 0, 0, $user->rights->fournisseur->facture->creer, 50, $object); // List of document $param = '&facid=' . $object->id; $formfile->list_of_documents($filearray, $object, 'facture_fournisseur', $param, 0, get_exdir($object->id, 2, 0) . $object->id . '/'); } else { print 'facid=' . $facid . '<br>'; dol_print_error($db); } } else { print $langs->trans('UnkownError'); } $db->close(); llxFooter();
*/ llxheader('', $langs->trans("adddocument"), ''); $form = new Form($db); if ($object->id) { $locataire = new Locataire($db, GETPOST('id')); $head = locataire_prepare_head($locataire); dol_fiche_head($head, 'document', $langs->trans("ImoDocument"), 0, 'renter'); // Construit liste des fichiers $filearray = dol_dir_list($upload_dir, "files", 0, '', '\\.meta$', $sortfield, strtolower($sortorder) == 'desc' ? SORT_DESC : SORT_ASC, 1); $totalsize = 0; foreach ($filearray as $key => $file) { $totalsize += $file['size']; } print '<table class="border" width="100%">'; print '<tr><td width="20%">' . $langs->trans("nomlocataire") . '</td>'; print '<td><input name="nom" size="40" value="' . $locataire->nom . '"</td></tr>'; print '<tr><td>' . $langs->trans("NbOfAttachedFiles") . '</td><td colspan="3">' . count($filearray) . '</td></tr>'; print '<tr><td>' . $langs->trans("TotalSizeOfAttachedFiles") . '</td><td colspan="3">' . $totalsize . ' ' . $langs->trans("bytes") . '</td></tr>'; print '</table>'; print '</div>'; // Affiche formulaire upload $formfile = new FormFile($db); $formfile->form_attach_new_file($_SERVER["PHP_SELF"] . '?id=' . $object->id, '', 0, 0, 1, 50, $locataire); // List of document // $param='&id='.$object->id; $formfile->list_of_documents($filearray, $object, 'immobilier/locataire', $param); } else { print $langs->trans("UnkownError"); } llxFooter(); $db->close();
if (!empty($conf->global->MAIN_UPLOAD_DOC)) { print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?action=ajout_photo&id=' . $object->id . '">'; print $langs->trans("AddPhoto") . '</a>'; } else { print '<a class="butActionRefused" href="#">e'; print $langs->trans("AddPhoto") . '</a>'; } } print "\n</div>\n"; /* * Add a photo */ if ($action == 'ajout_photo' && ($user->rights->produit->creer || $user->rights->service->creer) && !empty($conf->global->MAIN_UPLOAD_DOC)) { // Affiche formulaire upload $formfile = new FormFile($db); $formfile->form_attach_new_file($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans("AddPhoto"), 1, 0, 1, 50, $object, '', false); // FIXME Regis: disabled for the moment } // Affiche photos if ($action != 'ajout_photo') { $nbphoto = 0; $nbbyrow = 5; $maxWidth = 160; $maxHeight = 120; print $object->show_photos($dir, 1, 1000, $nbbyrow, 1, 1); if ($object->nbphoto < 1) { print '<br>'; print '<table width="100%" valign="top" align="center" border="0" cellpadding="2" cellspacing="2">'; print '<tr align=center valign=middle border=1><td class="photo">'; print "<br>" . $langs->trans("NoPhotoYet") . "<br><br>"; print '</td></tr>';
// Status print '<tr><td valign="top">' . $langs->trans("Status") . '</td>'; print '<td colspan="3">' . $object->getLibStatut(4) . '</td></tr>'; print '<tr><td>' . $langs->trans("NbOfAttachedFiles") . '</td><td colspan="3">' . count($filearray) . '</td></tr>'; print '<tr><td>' . $langs->trans("TotalSizeOfAttachedFiles") . '</td><td colspan="3">' . $totalsize . ' ' . $langs->trans("bytes") . '</td></tr>'; print "</table>\n"; print "</div>\n"; dol_htmloutput_mesg($mesg, $mesgs); /* * Confirmation suppression fichier */ if ($action == 'delete') { $ret = $form->form_confirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode($_GET["urlfile"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1); if ($ret == 'html') { print '<br>'; } } // Affiche formulaire upload $formfile = new FormFile($db); $formfile->form_attach_new_file(DOL_URL_ROOT . '/compta/bank/document.php?id=' . $object->id, '', 0, 0, $user->rights->banque, 50, $object); // List of document $param = '&id=' . $object->id; $formfile->list_of_documents($filearray, $object, 'bank', $param); } else { dol_print_error($db); } } else { Header('Location: index.php'); } llxFooter(); $db->close();
if (!empty($conf->global->MAIN_UPLOAD_DOC)) { print '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?action=ajout_photo&id=' . $object->id . '&type=' . $type . '">'; print $langs->trans("AddPhoto") . '</a>'; } else { print '<a class="butActionRefused" href="#">'; print $langs->trans("AddPhoto") . '</a>'; } } print "\n</div>\n"; /* * Ajouter une photo */ if ($action == 'ajout_photo' && $user->rights->categorie->creer && !empty($conf->global->MAIN_UPLOAD_DOC)) { // Affiche formulaire upload $formfile = new FormFile($db); $formfile->form_attach_new_file($_SERVER['PHP_SELF'] . '?id=' . $object->id . '&type=' . $type, $langs->trans("AddPhoto"), 1); } // Affiche photos if ($action != 'ajout_photo') { $nbphoto = 0; $nbbyrow = 5; $maxWidth = 160; $maxHeight = 120; $pdir = get_exdir($object->id, 2) . $object->id . "/photos/"; $dir = $upload_dir . '/' . $pdir; print '<br>'; print '<table width="100%" valign="top" align="center" border="0" cellpadding="2" cellspacing="2">'; foreach ($object->liste_photos($dir) as $key => $obj) { $nbphoto++; if ($nbbyrow && $nbphoto % $nbbyrow == 1) { print '<tr align=center valign=middle border=1>';