// For "custom" directory require_once DOL_DOCUMENT_ROOT . "/core/lib/functions2.lib.php"; dol_include_once('/pos/class/place.class.php'); dol_include_once('/pos/backend/lib/place.lib.php'); if (!$user->rights->pos->backend) { accessforbidden(); } $langs->load("pos@pos"); // Security check $socid = 0; $id = GETPOST('id'); if ($user->societe_id) { $socid = $user->societe_id; } //$result=restrictedArea($user,'pos',$id,''); /* * View */ $helpurl = 'EN:Module_DoliPos|FR:Module_DoliPos_FR|ES:Módulo_DoliPos'; llxHeader('', '', $helpurl); $place = new place($db); $place->fetch($id); $place->info($id); $head = place_prepare_head($place); dol_fiche_head($head, 'info', $langs->trans("place"), 0, 'placedesk'); print '<table width="100%"><tr><td>'; dol_print_object_info($place); print '</td></tr></table>'; print '</div>'; llxFooter(); $db->close();
print '<input class="flat" type="text" name="search_name" value="' . $search_name . '">'; print '</td>'; print '<td></td>'; print '<td></td>'; print '<td></td>'; print '<td colspan="2" class="liste_titre" align="right">'; print '<input type="image" class="liste_titre" name="button_search" src="' . DOL_URL_ROOT . '/theme/' . $conf->theme . '/img/search.png" value="' . dol_escape_htmltag($langs->trans("Search")) . '" title="' . dol_escape_htmltag($langs->trans("Search")) . '">'; print ' '; print '<input type="image" class="liste_titre" name="button_removefilter" src="' . DOL_URL_ROOT . '/theme/' . $conf->theme . '/img/searchclear.png" value="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '" title="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '">'; print '</td>'; print "</tr>\n"; $var = True; while ($i < min($num, $conf->liste_limit)) { $obj = $db->fetch_object($resql); $placewil = new place($db); $placewil->fetch($obj->rowid); $var = !$var; print "<tr {$bc[$var]}>"; print '<td width="30%">' . $placewil->getNomUrl(1) . '</td>'; //print "<td>".$obj->fk_device."</td>\n"; print '<td align="left">' . $placewil->getLibStatut(4) . '</td>'; $url = 'place.php?id=' . $obj->rowid; if (!$placewil->is_inUse()) { if ($placewil->is_notInUse()) { if ($user->rights->pos->backend) { print "<td></td>\n"; print '<td align="left">'; print '<form action="' . $url . '" name="free" method="POST">'; print '<input type="hidden" name="id" value="' . $placewil->id . '">'; print '<input type="hidden" name="action" value="closeplace">'; print '<input class="button" type="submit" value="' . $langs->trans("CloseIt") . '">';
} $canbedeleted = $place->can_be_deleted(); // Renvoi vrai si compte sans mouvements if ($user->rights->pos->backend && $canbedeleted) { print '<a class="butActionDelete" href="' . $_SERVER["PHP_SELF"] . '?action=delete&id=' . $place->id . '">' . $langs->trans("Delete") . '</a>'; } print '</div>'; } /* ************************************************************************** */ /* */ /* Edition */ /* */ /* ************************************************************************** */ if (GETPOST("id") && $action == 'edit' && $user->rights->pos->backend) { $place = new place($db); $place->fetch(GETPOST('id', 'int')); print_fiche_titre($langs->trans("EditPlace")); print "<br>"; print '<form action="' . $_SERVER["PHP_SELF"] . '?id=' . $place->id . '" method="post" name="formsoc">'; print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; print '<input type="hidden" name="action" value="update">'; print '<input type="hidden" name="id" value="' . GETPOST('id', 'int') . '">' . "\n\n"; print '<table class="border" width="100%">'; // Name print '<tr><td valign="top" class="fieldrequired">' . $langs->trans("Name") . '</td>'; print '<td colspan="3"><input size="30" type="text" class="flat" name="name" value="' . $place->name . '"></td></tr>'; // Description print '<tr><td valign="top" class="fieldrequired">' . $langs->trans("Description") . '</td>'; print '<td colspan="3"><input size="30" type="text" class="flat" name="description" value="' . $place->description . '"></td></tr>'; print '<tr><td align="center" colspan="4"><input value="' . $langs->trans("Modify") . '" type="submit" class="button">'; print ' <input name="cancel" value="' . $langs->trans("Cancel") . '" type="submit" class="button">';
if (!empty($_GET["lib"])) { $conf->global->MAIN_GRAPH_LIBRARY = GETPOST('lib'); } $datetime = time(); $year = dol_print_date($datetime, "%Y"); $month = dol_print_date($datetime, "%m"); $day = dol_print_date($datetime, "%d"); if (!empty($_GET["year"])) { $year = sprintf("%04d", GETPOST('year')); } if (!empty($_GET["month"])) { $month = sprintf("%02d", GETPOST('month')); } $place = new place($db); if ($id && !preg_match('/,/', $_id)) { $result = $place->fetch($id); } elseif ($ref) { $result = $place->fetch($id, $ref); $id = $place->id; } $result = dol_mkdir($conf->pos->dir_temp); if ($result < 0) { $langs->load("errors"); $error++; $mesg = '<div class="error">' . $langs->trans("ErrorFailedToCreateDir") . '</div>'; } else { // Definition de $width et $height $width = 768; $height = 200; // Calcul de $min et $max $sql = "SELECT MIN(date_creation) as min, MAX(date_creation) as max";