home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Freeware / Programare / groupoffice-com-2.01 / bookmarks / index.php next >
PHP Script  |  2004-03-08  |  2KB  |  68 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. $page_title=$menu_bookmarks;
  18. require($GO_CONFIG->class_path."bookmarks.class.inc");
  19. $bookmarks = new bookmarks();
  20. if (isset($_REQUEST['delete_bookmark']))
  21. {
  22.     $bookmarks->delete_bookmark($GO_SECURITY->user_id, $_REQUEST['delete_bookmark']);
  23. }
  24. require($GO_THEME->theme_path."header.inc");
  25.  
  26. ?>
  27. <table border="0" cellpadding="10" cellspacing="0">
  28. <tr>
  29.     <td>
  30.     <table border="0" cellpadding="0" cellspacing="0" class="TableBorder" width="600">
  31.     <tr>
  32.         <td valign="top">
  33.         <table border="0" cellpadding="1" cellspacing="1" width="100%">
  34.         <tr>
  35.             <td colspan="99" class="TableHead"><?php echo $menu_bookmarks; ?></td>
  36.         </tr>
  37.         <tr>
  38.             <td class="TableInside" height="300" valign="top">
  39.             <br />
  40.             <table border="0">
  41.             <?php
  42.             $count = $bookmarks->get_bookmarks($GO_SECURITY->user_id);
  43.             if ($count > 0)
  44.             {
  45.                 while($bookmarks->next_record())
  46.                 {
  47.                     echo "<tr><td><a class=\"normal\" href=\"javascript:popup('".$GO_CONFIG->host."bookmarks/save_bookmark.php?bookmark_id=".$bookmarks->f("id")."&bname=".urlencode($bookmarks->f("name"))."&bURL=".$bookmarks->f("URL")."&new_window=".$bookmarks->f("new_window")."','500','160')\">".$bookmarks->f("name")."</a></td>";
  48.                     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>";
  49.                 }
  50.             }else
  51.             {
  52.                     echo "<tr><td colspan=\"2\">".$bm_no_bookmarks."</td></tr>";
  53.             }
  54.             ?>
  55.             </table>
  56.             </td>
  57.         </tr>
  58.         </table>
  59.     </tr>
  60.     </table>
  61.     </td>
  62. </tr>
  63. </table>
  64.  
  65. <?php
  66. require($GO_THEME->theme_path."footer.inc");
  67. ?>
  68.