$langs->load("other"); $mesg = '<div class="error">' . $langs->trans('ErrorCantReadFile', $file) . '</div>'; dol_syslog('Failed to read file: ' . $file); } } else { $langs->load("other"); $mesg = '<div class="error">' . $langs->trans('ErrorFailedToReadEntity', $langs->trans("Order")) . '</div>'; dol_syslog($langs->trans('ErrorFailedToReadEntity', $langs->trans("Order"))); } } /* * View */ llxHeader('', $langs->trans('Order'), 'EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes'); $html = new Form($db); $formfile = new FormFile($db); $formorder = new FormOrder($db); /********************************************************************* * * Mode creation * *********************************************************************/ if ($action == 'create' && $user->rights->commande->creer) { print_fiche_titre($langs->trans('CreateOrder')); dol_htmloutput_mesg($mesg, $mesgs, 'error'); $soc = new Societe($db); if ($socid) { $res = $soc->fetch($socid); } if (GETPOST('origin') && GETPOST('originid')) { // Parse element/subelement (ex: project_task)
if ($action != 'ajout_photo' && ($user->rights->produit->creer || $user->rights->service->creer)) { 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>";
if ($result <= 0) { dol_print_error($db,$result); exit; } } /* * View */ llxHeader('',$langs->trans('Delivery'),'Livraison'); $html = new Form($db); $formfile = new FormFile($db); /********************************************************************* * * Mode creation * *********************************************************************/ if ($_GET["action"] == 'create') { print_fiche_titre($langs->trans("CreateADeliveryOrder")); if ($mesg) { print $mesg.'<br>'; }
*/ if ($action == 'delete') { $file = $conf->admin->dir_output . '/' . GETPOST('urlfile'); $ret = dol_delete_file($file, 1); if ($ret) { setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile'))); } else { setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors'); } $action = ''; } /* * View */ $form = new Form($db); $formfile = new FormFile($db); $label = getStaticMember($db, 'label'); $help_url = 'EN:Backups|FR:Sauvegardes|ES:Copias_de_seguridad'; llxHeader('', '', $help_url); ?> <script type="text/javascript"> jQuery(document).ready(function() { function hideoptions () { jQuery("#mysql_options").hide(); jQuery("#mysql_nobin_options").hide(); jQuery("#postgresql_options").hide(); } hideoptions(); jQuery("#radio_dump_mysql").click(function() {
require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php'; // Security check $orderid = GETPOST('orderid'); if ($user->societe_id) { $socid = $user->societe_id; } $result = restrictedArea($user, 'fournisseur', $orderid, '', 'commande'); $langs->load("suppliers"); $langs->load("orders"); /* * View */ llxHeader('', $langs->trans("SuppliersOrdersArea")); $commandestatic = new CommandeFournisseur($db); $userstatic = new User($db); $formfile = new FormFile($db); print load_fiche_titre($langs->trans("SuppliersOrdersArea")); print '<table class="notopnoleftnoright" width="100%">'; print '<tr valign="top"><td class="notopnoleft" width="30%">'; /* * Search form */ $var = false; print '<form method="post" action="list.php">'; print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; print '<table class="noborder nohover" width="100%">'; print '<tr class="liste_titre"><td colspan="3">' . $langs->trans("Search") . '</td></tr>'; print '<tr ' . $bc[$var] . '><td>'; print $langs->trans("SupplierOrder") . ':</td><td><input type="text" class="flat" name="search_all" size="18"></td><td><input type="submit" value="' . $langs->trans("Search") . '" class="button"></td></tr>'; print "</table></form><br>\n"; /*
$mesg = '<div class="error">' . $langs->trans('NoPDFAvailableForChecked') . '</div>'; } } else { $mesg = '<div class="error">' . $langs->trans('InvoiceNotChecked') . '</div>'; } } /* * View */ $title = $langs->trans("BillsCustomersUnpaid"); if ($option == 'late') { $title = $langs->trans("BillsCustomersUnpaid"); } llxHeader('', $title); $form = new Form($db); $formfile = new FormFile($db); ?> <script type="text/javascript"> $(document).ready(function() { $("#checkall").click(function() { $(".checkformerge").attr('checked', true); }); $("#checknone").click(function() { $(".checkformerge").attr('checked', false); }); }); </script> <?php /*************************************************************************** * * * Mode Liste *
if (!empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } $result = don_create($db, $object->id, '', $object->modelpdf, $outputlangs); if ($result <= 0) { dol_print_error($db, $result); exit; } } /* * View */ llxHeader('', $langs->trans("Donations"), 'EN:Module_Donations|FR:Module_Dons|ES:Módulo_Donaciones'); $form = new Form($db); $formfile = new FormFile($db); $formcompany = new FormCompany($db); /* ************************************************************************** */ /* */ /* Creation */ /* */ /* ************************************************************************** */ if ($action == 'create') { print_fiche_titre($langs->trans("AddDonation")); dol_htmloutput_errors($mesg, $mesgs); print '<form name="add" action="fiche.php" method="post">'; print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; print '<table class="border" width="100%">'; print '<input type="hidden" name="action" value="add">'; $nbrows = 11; if (!empty($conf->projet->enabled)) {
// Securite acces client $socid = GETPOST('socid', 'int'); if (isset($user->societe_id) && $user->societe_id > 0) { $action = ''; $socid = $user->societe_id; } $max = 5; $now = dol_now(); /* * Actions */ /* * View */ $form = new Form($db); $formfile = new FormFile($db); $companystatic = new Societe($db); if (!empty($conf->propal->enabled)) { $propalstatic = new Propal($db); } llxHeader(); print_fiche_titre($langs->trans("CustomerArea")); print '<div class="fichecenter"><div class="fichethirdleft">'; // Search proposal if (!empty($conf->propal->enabled) && $user->rights->propal->lire) { $var = false; print '<form method="post" action="' . DOL_URL_ROOT . '/comm/propal/list.php">'; print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; print '<table class="noborder nohover" width="100%">'; print '<tr class="liste_titre"><td colspan="3">' . $langs->trans("SearchAProposal") . '</td></tr>'; print '<tr ' . $bc[$var] . '>';
</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->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'; }
if ($result >= 0) { header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id); exit; } else { dol_print_error($db); } } } } } } /* * View */ $form = new Form($db); $formfile = new FormFile($db); $bankaccountstatic = new Account($db); llxHeader('', '', ''); // Mode creation if ($action == 'create') { $facturestatic = new FactureFournisseur($db); $extralabels = $extrafields->fetch_name_optionals_label($facturestatic->table_element); print load_fiche_titre($langs->trans('NewBill')); dol_htmloutput_events(); $societe = ''; if (GETPOST('socid') > 0) { $societe = new Societe($db); $societe->fetch(GETPOST('socid', 'int')); } if (GETPOST('origin') && GETPOST('originid')) { // Parse element/subelement (ex: project_task)
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();
$type = 'directory'; // This test if file exists should be useless. We keep it to find bug more easily if (!dol_is_dir($upload_dir)) { // dol_mkdir($upload_dir); /* $langs->load("install"); dol_print_error(0,$langs->trans("ErrorDirDoesNotExists",$upload_dir)); exit;*/ } print '<!-- TYPE=' . $type . ' -->' . "\n"; print '<!-- Page called with mode=' . $mode . ' url=' . $_SERVER["PHP_SELF"] . '?' . $_SERVER["QUERY_STRING"] . ' -->' . "\n"; $param = ''; $param .= ($sortfield ? '&sortfield=' . $sortfield : '') . ($sortorder ? '&sortorder=' . $sortorder : ''); $url = DOL_URL_ROOT . '/ecm/index.php'; // Dir scan if ($type == 'directory') { $formfile = new FormFile($db); $maxlengthname = 40; // Right area. If module is defined, we are in automatic ecm. if ($module == 'company') { $upload_dir = $conf->societe->dir_output; // TODO change for multicompany sharing $filearray = dol_dir_list($upload_dir, "files", 1, '', array('^SPECIMEN\\.pdf$', '^\\.', '\\.meta$', '^temp$', '^payments$', '^CVS$', '^thumbs$'), $sortfield, strtolower($sortorder) == 'desc' ? SORT_DESC : SORT_ASC, 1); $param .= '&module=' . $module; $textifempty = $section ? $langs->trans("NoFileFound") : ($showonrightsize == 'featurenotyetavailable' ? $langs->trans("FeatureNotYetAvailable") : $langs->trans("NoFileFound")); $formfile->list_of_autoecmfiles($upload_dir, $filearray, $module, $param, 1, '', $user->rights->ecm->upload, 1, $textifempty, $maxlengthname, $url); } else { if ($module == 'invoice') { $upload_dir = $conf->facture->dir_output; $filearray = dol_dir_list($upload_dir, "files", 1, '', array('^SPECIMEN\\.pdf$', '^\\.', '\\.meta$', '^temp$', '^payments$', '^CVS$', '^thumbs$'), $sortfield, strtolower($sortorder) == 'desc' ? SORT_DESC : SORT_ASC, 1); $param .= '&module=' . $module; $textifempty = $section ? $langs->trans("NoFileFound") : ($showonrightsize == 'featurenotyetavailable' ? $langs->trans("FeatureNotYetAvailable") : $langs->trans("NoFileFound"));
$array_selected = isset($_SESSION["export_selected_fields"]) ? $_SESSION["export_selected_fields"] : array(); $array_filtervalue = isset($_SESSION["export_filtered_fields"]) ? $_SESSION["export_filtered_fields"] : array(); $datatoexport = GETPOST("datatoexport"); $action = GETPOST('action', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); $step = GETPOST("step") ? GETPOST("step") : 1; $export_name = GETPOST("export_name"); $hexa = GETPOST("hexa"); $exportmodelid = GETPOST("exportmodelid"); $field = GETPOST("field"); $objexport = new Export($db); $objexport->load_arrays($user, $datatoexport); $objmodelexport = new ModeleExports($db); $form = new Form($db); $htmlother = new FormOther($db); $formfile = new FormFile($db); $sqlusedforexport = ''; $upload_dir = $conf->export->dir_temp . '/' . $user->id; //$usefilters=($conf->global->MAIN_FEATURES_LEVEL > 1); $usefilters = 1; /* * Actions */ if ($action == 'selectfield') { $fieldsarray = $objexport->array_export_fields[0]; $fieldsentitiesarray = $objexport->array_export_entities[0]; $fieldsdependenciesarray = $objexport->array_export_dependencies[0]; if ($field == 'all') { foreach ($fieldsarray as $key => $val) { if (!empty($array_selected[$key])) { continue;
$ret = dol_delete_file($file, 0, 0, 0, $object); if ($ret) { setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs'); } else { setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors'); } $action = ''; } } } /* * View */ llxHeader('', $langs->trans("ExpenseReport")); $form = new Form($db); $formfile = new FormFile($db); $formproject = new FormProjets($db); $projecttmp = new Project($db); if (!empty($conf->global->DEPLACEMENT_TO_CLEAN)) { if (!empty($_GET['mesg'])) { $text_mesg = explode(",", $_GET['mesg']); foreach ($text_mesg as $text) { $mesg .= "- " . $langs->trans($text) . "<br />"; } print "<div class=\"error\" style=\"font-size:15px;background-color:#FFB3B3;\">"; print $langs->trans("LINE_NOT_ADDED") . "<br />"; print $mesg; print "</div>"; } else { if ($mesg) { print "<div class=\"error\" style=\"font-size:16px;background-color:red;\">" . $mesg . "</div>";
if (isset($_GET["action"]) && $_GET["action"] == 'del_bookmark') { $sql = "DELETE FROM ".MAIN_DB_PREFIX."bookmark WHERE rowid=".$_GET["bid"]; $result = $db->query($sql); } /* * View */ $now=dol_now(); $html = new Form($db); $formfile = new FormFile($db); $companystatic=new Societe($db); if ($conf->propal->enabled) $propalstatic=new Propal($db); llxHeader(); print_fiche_titre($langs->trans("CustomerArea")); print '<table border="0" width="100%" class="notopnoleftnoright">'; print '<tr>'; if (($conf->propal->enabled && $user->rights->propale->lire) || ($conf->contrat->enabled && $user->rights->contrat->lire) || ($conf->commande->enabled && $user->rights->commande->lire)) { print '<td valign="top" width="30%" class="notopnoleft">';
// print '<td> </td><td> </td></tr>'; print '<tr '. $bc[false].'><td colspan="4" align="center"><input type="submit" class="button" value="'.$langs->trans("Search").'"></td></tr>'; print "</table></form>"; //print $langs->trans("ECMSectionAutoDesc"); print '</td><td valign="top">'; // Right area $relativepath=$ecmdir->getRelativePath(); $upload_dir = $conf->ecm->dir_output.'/'.$relativepath; $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); $formfile=new FormFile($db); $param='&section='.$section; $textifempty=($section?$langs->trans("NoFileFound"):$langs->trans("ECMSelectASection")); $formfile->list_of_documents($filearray,'','ecm',$param,1,$relativepath,$user->rights->ecm->upload,1,$textifempty); // print '<table width="100%" class="border">'; // print '<tr><td> </td></tr></table>'; print '</td></tr>'; print '</table>';
} else { setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('file')), 'errors'); } } } } /* * View */ if (GETPOST('removefilter')) { $filterdate = ''; $filteraccountid = 0; } llxHeader(); $form = new Form($db); $formfile = new FormFile($db); if ($action == 'new') { $h = 0; $head[$h][0] = $_SERVER["PHP_SELF"] . '?action=new'; $head[$h][1] = $langs->trans("MenuChequeDeposits"); $hselected = $h; $h++; print_fiche_titre($langs->trans("Cheques")); } else { $result = $object->fetch($id, $ref); if ($result < 0) { dol_print_error($db, $object->error); exit; } $h = 0; $head[$h][0] = $_SERVER["PHP_SELF"] . '?id=' . $object->id;
if ($result >= 0) { header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id); exit; } else { setEventMessage($object->error, 'errors'); } } } } } /* * View */ llxHeader('', $langs->trans("ContractCard"), "Contrat"); $form = new Form($db); $formfile = new FormFile($db); $objectlignestatic = new ContratLigne($db); // Load object modContract $module = !empty($conf->global->CONTRACT_ADDON) ? $conf->global->CONTRACT_ADDON : 'mod_contract_serpis'; if (substr($module, 0, 13) == 'mod_contract_' && substr($module, -3) == 'php') { $module = substr($module, 0, dol_strlen($module) - 4); } $result = dol_include_once('/core/modules/contract/' . $module . '.php'); if ($result > 0) { $modCodeContract = new $module(); } /********************************************************************* * * Mode creation * *********************************************************************/
$result = $object->createFromClone($object->id, $clone_contacts, $clone_tasks, $clone_project_files, $clone_task_files, $clone_notes, $move_date); if ($result <= 0) { setEventMessages($object->error, $object->errors, 'errors'); } else { $object->fetch($result); // Load new object $action = 'edit'; $comefromclone = true; } } } /* * View */ $form = new Form($db); $formfile = new FormFile($db); $formproject = new FormProjets($db); $userstatic = new User($db); $title = $langs->trans("Project") . ' - ' . $object->ref . ' ' . $object->name; if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { $title = $object->ref . ' ' . $object->name; } $help_url = "EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos"; llxHeader("", $title, $help_url); if ($action == 'create' && $user->rights->projet->creer) { /* * Create */ $thirdparty = new Societe($db); if ($socid > 0) { $thirdparty->fetch($socid);
// Actions to send emails if (empty($id)) { $id = $facid; } $actiontypecode = 'AC_SHIP'; $trigger_name = 'SHIPPING_SENTBYMAIL'; $paramname = 'id'; $mode = 'emailfromshipment'; include DOL_DOCUMENT_ROOT . '/core/actions_sendmails.inc.php'; } /* * View */ llxHeader('', $langs->trans('Shipment'), 'Expedition'); $form = new Form($db); $formfile = new FormFile($db); $formproduct = new FormProduct($db); $product_static = new Product($db); if ($action == 'create2') { print load_fiche_titre($langs->trans("CreateASending")) . '<br>'; print $langs->trans("ShipmentCreationIsDoneFromOrder"); $action = ''; $id = ''; $ref = ''; } // Mode creation. if ($action == 'create') { $expe = new Expedition($db); print load_fiche_titre($langs->trans("CreateASending")); if (!$origin) { setEventMessages($langs->trans("ErrorBadParameters"), null, 'errors');
exit; } else { dol_print_error($db); } } if ($error) { $action = 'edit_extras'; } } } /* * View */ $form = new Form($db); $formother = new FormOther($db); $formfile = new FormFile($db); $formmargin = new FormMargin($db); $bankaccountstatic = new Account($db); if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } $now = dol_now(); llxHeader('', $langs->trans('Bill'), 'EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes'); /** * ******************************************************************* * * Mode creation * * ******************************************************************** */ if ($action == 'create') {
exit; } else { Header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $remisecheque->id . (empty($conf->global->MAIN_JUMP_TAG) ? '' : '#builddoc')); exit; } } /* * View */ if (GETPOST('removefilter')) { $filterdate = ''; $filteraccountid = 0; } llxHeader(); $html = new Form($db); $formfile = new FormFile($db); if ($action == 'new') { $h = 0; $head[$h][0] = $_SERVER["PHP_SELF"] . '?action=new'; $head[$h][1] = $langs->trans("MenuChequeDeposits"); $hselected = $h; $h++; print_fiche_titre($langs->trans("Cheques")); } else { $remisecheque = new RemiseCheque($db); $result = $remisecheque->fetch($_REQUEST["id"], $_REQUEST["ref"]); if ($result < 0) { dol_print_error($db, $remisecheque->error); exit; } $h = 0;
} /* * View */ // fetch optionals attributes and labels $extralabels=$extrafields->fetch_name_optionals_label('company'); $help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; llxHeader('',$langs->trans("ThirdParty"),$help_url); $form = new Form($db); $formfile = new FormFile($db); $formadmin = new FormAdmin($db); $formcompany = new FormCompany($db); $countrynotdefined=$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')'; if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // ----------------------------------------- // When used with CANVAS // ----------------------------------------- if (empty($object->error) && $socid) { $object = new Societe($db); $object->load($socid);
*/ 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();
/* * Actions */ $parameters = array('socid' => $socid); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); } /* * View */ llxHeader('', $langs->trans('Proposal'), 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos'); $form = new Form($db); $formother = new FormOther($db); $formfile = new FormFile($db); $formpropal = new FormPropal($db); $companystatic = new Societe($db); $now = dol_now(); $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); $page = GETPOST("page", 'int'); if ($page == -1) { $page = 0; } $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; if (!$sortfield) { $sortfield = 'p.datep'; }
} /* * View */ $now=dol_now(); $facturestatic=new Facture($db); $facturesupplierstatic=new FactureFournisseur($db); $html = new Form($db); $formfile = new FormFile($db); $thirdpartystatic = new Societe($db); llxHeader("",$langs->trans("AccountancyTreasuryArea")); print_fiche_titre($langs->trans("AccountancyTreasuryArea")); print '<table border="0" width="100%" class="notopnoleftnoright">'; print '<tr>'; print '<td valign="top" width="30%" class="notopnoleft">'; $max=3; /*
$langs->load("companies"); // Security check $socid = GETPOST('socid', 'int'); if (isset($user->societe_id) && $user->societe_id > 0) { $action = ''; $socid = $user->societe_id; } $result = restrictedArea($user, 'supplier_proposal'); /* * View */ $now = dol_now(); $supplier_proposalstatic = new SupplierProposal($db); $companystatic = new Societe($db); $form = new Form($db); $formfile = new FormFile($db); $help_url = "EN:Module_Ask_Price_Supplier|FR:Module_Demande_de_prix_fournisseur"; llxHeader("", $langs->trans("SupplierProposalArea"), $help_url); print load_fiche_titre($langs->trans("SupplierProposalArea")); print '<div class="fichecenter"><div class="fichethirdleft">'; /* * Search form */ $var = false; print '<form method="post" action="' . DOL_URL_ROOT . '/supplier_proposal/list.php">'; print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; print '<table class="noborder nohover" width="100%">'; print '<tr class="liste_titre"><td colspan="3">' . $langs->trans("SearchRequest") . '</td></tr>'; print '<tr ' . $bc[$var] . '><td>'; print $langs->trans("Ref") . ':</td><td><input type="text" class="flat" name="sref" size=18></td><td rowspan="2"><input type="submit" value="' . $langs->trans("Search") . '" class="button"></td></tr>'; print '<tr ' . $bc[$var] . '><td class="nowrap">' . $langs->trans("Other") . ':</td><td><input type="text" class="flat" name="sall" size="18"></td>';
$object->setProject($_POST['projectid']); } /* * View */ $now=gmmktime(); llxHeader(); $html = new Form($db); $htmlother = new FormOther($db); $formfile = new FormFile($db); $societestatic=new Societe($db); $propalstatic=new Propal($db); $now=gmmktime(); $id = $_GET["id"]; $ref= $_GET["ref"]; if ($id > 0 || ! empty($ref)) { if ($mesg) print "$mesg<br>"; $product_static=new Product($db); $object->fetch($_GET["id"],$_GET["ref"]);
// 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();
/* * Actions */ $parameters = array('socid' => $socid); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hook if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); } /* * View */ $now = dol_now(); $form = new Form($db); $formother = new FormOther($db); $formfile = new FormFile($db); $companystatic = new Societe($db); $help_url = "EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_Pedidos_de_clientes"; llxHeader('', $langs->trans("Orders"), $help_url); $sql = 'SELECT'; if ($sall || $search_product_category > 0) { $sql = 'SELECT DISTINCT'; } $sql .= ' s.nom as name, s.rowid as socid, s.client, s.code_client, c.rowid, c.ref, c.total_ht, c.tva as total_tva, c.total_ttc, c.ref_client,'; $sql .= ' c.date_valid, c.date_commande, c.note_private, c.date_livraison as date_delivery, c.fk_statut, c.facture as billed'; $sql .= ' FROM ' . MAIN_DB_PREFIX . 'societe as s'; $sql .= ', ' . MAIN_DB_PREFIX . 'commande as c'; if ($sall || $search_product_category > 0) { $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'commandedet as pd ON c.rowid=pd.fk_commande'; } if ($search_product_category > 0) {