* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ * $Source$ * */ /** \file htdocs/comm/bookmark.php \brief Page affichage des bookmarks \version $Revision$ */ require("./pre.inc.php"); llxHeader(); $page=$_GET["page"]; $sortorder=$_GET["sortorder"]; $sortfield=$_GET["sortfield"]; if (! $sortorder) $sortorder="DESC"; if (! $sortfield) $sortfield="bid"; if ($page == -1) { $page = 0 ; } $limit = 26; $offset = $limit * $page ; $pageprev = $page - 1; $pagenext = $page + 1; /* * Actions */ if ($_GET["action"] == 'add') { $bookmark=new Bookmark($db); $bookmark->fk_user=$user->id; $bookmark->url=$user->id; $bookmark->target=$user->id; $bookmark->title='xxx'; $bookmark->favicon='xxx'; $res=$bookmark->create(); if ($res > 0) { header("Location: ".$_SERVER["PHP_SELF"]); } else { $mesg='
| "; print_liste_field_titre($langs->trans("Id"),$_SERVER["PHP_SELF"],"bid","","",'align="center"',$sortfield); print_liste_field_titre($langs->trans("Author"),$_SERVER["PHP_SELF"],"u.name","","","",$sortfield); print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"b.dateb","","",'align="center"',$sortfield); print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","","",$sortfield); print_liste_field_titre($langs->trans("Url"),$_SERVER["PHP_SELF"],"b.url","","",'',$sortfield); print " | ".$langs->trans("Target")." | "; print ""; print " | |||||
| " . ($i + 1 + ($limit * $page)) . " | "; print "".$obj->bid." | "; print "".img_object($langs->trans("ShowUser"),"user").' '.$obj->name." ".$obj->firstname." | \n"; print ''.dolibarr_print_date($obj->dateb) ." | "; print "idp\">".img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom." | \n"; print ''.$obj->url." | "; print ''.$obj->target." | "; print "bid\">".img_delete()." | \n"; print "