//get the language file require $GO_LANGUAGE->get_language_file('bookmarks'); //where did we come from? $return_to = $GO_MODULES->url; //define task $task = isset($_REQUEST['task']) ? $_REQUEST['task'] : ''; $catagory_id = isset($_REQUEST['catagory_id']) ? $_REQUEST['catagory_id'] : 0; //create a tab window $tabtable = new tabtable('catagories_tab', $strProperties, '600', '400', '120', '', true); //save catagory switch ($task) { case 'copy_read_permissions': if ($catagory = $bookmarks->get_catagory($catagory_id)) { $bookmarks->get_user_bookmarks($GO_SECURITY->user_id, $catagory_id); while ($bookmarks->next_record()) { $GO_SECURITY->copy_acl($catagory['acl_read'], $bookmarks->f('acl_read')); } } break; case 'copy_write_permissions': if ($catagory = $bookmarks->get_catagory($catagory_id)) { $bookmarks->get_user_bookmarks($GO_SECURITY->user_id, $catagory_id); while ($bookmarks->next_record()) { $GO_SECURITY->copy_acl($catagory['acl_write'], $bookmarks->f('acl_write')); } } break; case 'save': $name = smart_addslashes(trim($_POST['name'])); if ($name == '') { $feedback = '<p class="Error">' . $error_missing_field . '</p>';
echo '<br />'; echo '<br /> '; $button = new button($cmdClose, "javascript:document.location='" . $GO_MODULES->url . "';"); break; default: if (isset($feedback)) { echo $feedback; } ?> <table border="0" cellpadding="0" cellspacing="3"> <?php if ($bookmarks->get_catagories($GO_SECURITY->user_id, true)) { $dropbox = new dropbox(); $dropbox->add_value('0', $bm_catagory_other); while ($bookmarks->next_record()) { $dropbox->add_value($bookmarks->f('id'), $bookmarks->f('name')); } echo '<tr><td>' . $bm_catagory . ':</td><td>'; $dropbox->print_dropbox('catagory_id', $catagory_id); echo '</td></tr>'; } else { echo '<input type="hidden" name="catagory_id" value="' . $catagory_id . '" />'; } ?> <tr> <td><?php echo $strName; ?> :</td> <td><input type="text" class="textbox" size="50" name="name" maxlength="50" value="<?php
<table border="0" cellpadding="1" cellspacing="1" width="100%"> <tr> <td colspan="99" class="TableHead"><?php echo $menu_bookmarks; ?> </td> </tr> <tr> <td class="TableInside" height="300" valign="top"> <br /> <table border="0"> <?php $count = $bookmarks->get_bookmarks($GO_SECURITY->user_id); if ($count > 0) { while ($bookmarks->next_record()) { 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>"; echo "<td><a href='javascript:div_confirm_action(\"" . $_SERVER['PHP_SELF'] . "?delete_bookmark=" . $bookmarks->f("id") . "\",\"" . div_confirm_id($strDeletePrefix . "'" . $bookmarks->f("name") . "'" . $strDeleteSuffix) . "\")' title=\"" . $strDeleteItem . " '" . $bookmarks->f("name") . "'\"><img src=\"" . $GO_THEME->images['delete'] . "\" border=\"0\"></a></td></tr>"; } } else { echo "<tr><td colspan=\"2\">" . $bm_no_bookmarks . "</td></tr>"; } ?> </table> </td> </tr> </table> </tr> </table> </td> </tr> </table>
$title .= '<td width="16"><a href="bookmark.php?catagory_id=' . $bookmarks->f('id') . '"><img src="' . $GO_THEME->images['bm_add_bookmark'] . '" border="0"></a></td>'; } $title .= '<td width="16"><a class="normal" href="catagory.php?catagory_id=' . $bookmarks->f("id") . '"><img src="' . $GO_THEME->images['edit'] . '" border="0"></a></td>'; if ($catagory_write) { if ($GO_SECURITY->user_id == $bookmarks->f('user_id')) { $title .= "<td width=\"16\"><a href='javascript:div_confirm_action(\"" . $_SERVER['PHP_SELF'] . "?delete_catagory=" . $bookmarks->f('id') . "\",\"" . div_confirm_id($strDeletePrefix . "'" . $bookmarks->f('name') . "' " . $bm_and_all_contents . " " . $strDeleteSuffix) . "\")' title=\"" . $strDeleteItem . " '" . htmlspecialchars($bookmarks->f('name')) . "'\"><img src=\"" . $GO_THEME->images['delete'] . "\" border=\"0\"></a></td>"; } } $title .= '</tr></table>'; $tabtable = new tabtable('tab_' . $bookmarks->f('id'), $title, '100%', '0', '120', ''); $tabtable->html_title = true; $tabtable->print_head(); if ($bookmark_count = $bookmarks2->get_bookmarks($GO_SECURITY->user_id, $bookmarks->f('id'))) { echo '<table border="0" width="100%">'; while ($bookmarks2->next_record()) { $bookmark_write = $GO_SECURITY->has_permission($GO_SECURITY->user_id, $bookmarks2->f('acl_write')); $target = $bookmarks2->f('new_window') == '1' ? '_blank' : '_self'; echo '<tr>'; if ($bookmark_write) { echo '<td><input type="checkbox" name="bookmarks[]" value="' . $bookmarks2->f('id') . '" id="' . div_confirm_id($bookmarks2->f('name')) . '" /></td>'; } else { echo '<td> </td>'; } echo '<td width="100%"><a target="' . $target . '" class="normal" href="' . htmlspecialchars($bookmarks2->f("URL")) . '">' . htmlspecialchars($bookmarks2->f("name")) . '</a></td>'; if ($bookmark_write) { echo '<td width="16"><a class="normal" href="bookmark.php?bookmark_id=' . $bookmarks2->f("id") . '"><img src="' . $GO_THEME->images['edit'] . '" border="0"></a></td>'; } else { echo '<td> </td>'; } echo '</tr>'; }