Exemple #1
0
$pagenext = $page + 1;
if (!$user->rights->place->read) {
    accessforbidden();
}
/***************************************************
 * VIEW
*
* Put here all code to build page
****************************************************/
$pagetitle = $langs->trans('BuildingList');
llxHeader('', $pagetitle, '');
$form = new Form($db);
$object = new Building($db);
if ($id > 0) {
    $object->fk_place = $id;
    if ($object->fetch_place() > 0) {
        $head = placePrepareHead($object->place);
        dol_fiche_head($head, 'buildings', $langs->trans("PlaceSingular"), 0, 'place@place');
        $ret = $object->place->printInfoTable();
        print '</div>';
        $filter = array('t.fk_place' => $id);
    }
    $param .= '&amp;id=' . $id;
}
// Load object list
$ret = $object->fetch_all($sortorder, $sortfield, $limit, $offset);
if ($ret == -1) {
    dol_print_error($db, $object->error);
    exit;
}
print_fiche_titre($pagetitle, '', 'building_32.png@place');