home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Freeware / Programare / groupoffice-com-2.01 / modules / bookmarks / index.php < prev   
PHP Script  |  2004-03-08  |  2KB  |  55 lines

  1. <?php
  2. /*
  3. Copyright Intermesh 2003
  4. Author: Merijn Schering <mschering@intermesh.nl>
  5. Version: 1.0 Release date: 08 July 2003
  6.  
  7. This program is free software; you can redistribute it and/or modify it
  8. under the terms of the GNU General Public License as published by the
  9. Free Software Foundation; either version 2 of the License, or (at your
  10. option) any later version.
  11. */
  12.  
  13. require("../../Group-Office.php");
  14. $GO_SECURITY->authenticate();
  15. require($GO_LANGUAGE->get_language_file('bookmarks'));
  16.  
  17. $GO_MODULES->authenticate('bookmarks');
  18.  
  19. require($GO_CONFIG->class_path."bookmarks.class.inc");
  20. $bookmarks = new bookmarks();
  21. if (isset($_REQUEST['delete_bookmark']))
  22. {
  23.     $bookmarks->delete_bookmark($GO_SECURITY->user_id, $_REQUEST['delete_bookmark']);
  24. }
  25. require($GO_THEME->theme_path."header.inc");
  26.  
  27. $tabtable = new tabtable('bookmarks_tab', $lang_modules['bookmarks'], '600', '400', '120', '', true);
  28. $tabtable->print_head();
  29. ?>
  30. <br />
  31. <a href="bookmark.php" class="normal"><?php echo $cmdAdd; ?></a>
  32. <br /><br />
  33. <table border="0">
  34. <?php
  35. $count = $bookmarks->get_bookmarks($GO_SECURITY->user_id);
  36. if ($count > 0)
  37. {
  38.     while($bookmarks->next_record())
  39.     {
  40.         $target = $bookmarks->f('new_window') == '1' ? '_blank' : '_self';
  41.         echo '<tr><td><a target="'.$target.'" class="normal" href="'.$bookmarks->f("URL").'">'.$bookmarks->f("name").'</a></td>';
  42.         echo '<td><a class="normal" href="bookmark.php?bookmark_id='.$bookmarks->f("id").'"><img src="'.$GO_THEME->images['edit'].'" border="0"></a></td>';
  43.         echo "<td><a href='javascript:confirm_action(\"".$_SERVER['PHP_SELF']."?delete_bookmark=".$bookmarks->f("id")."\",\"".rawurlencode($strDeletePrefix."'".$bookmarks->f("name")."'".$strDeleteSuffix)."\")' title=\"".$strDeleteItem." '".$bookmarks->f("name")."'\"><img src=\"".$GO_THEME->images['delete']."\" border=\"0\"></a></td></tr>";
  44.     }
  45. }else
  46. {
  47.     echo '<tr><td colspan="2">'.$bm_no_bookmarks.'</td></tr>';
  48. }
  49. ?>
  50. </table>
  51. <?php
  52. $tabtable->print_foot();
  53. require($GO_THEME->theme_path."footer.inc");
  54. ?>
  55.