Make WordPress Core


Ignore:
Timestamp:
02/27/2006 04:57:30 AM (18 years ago)
Author:
ryan
Message:

Bookmark/link rework. #2499

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/link-manager.php

    r3517 r3570  
    11<?php
     2
     3
    24// Links
    35// Copyright (C) 2002, 2003 Mike Little -- mike@zed1.com
    46
    5 require_once('admin.php');
    6 
    7 $title = __('Manage Links');
     7require_once ('admin.php');
     8
     9$title = __('Manage Bookmarks');
    810$this_file = $parent_file = 'link-manager.php';
    911$list_js = true;
    1012
    11 $wpvarstoreset = array('action','cat_id', 'linkurl', 'name', 'image',
    12                        'description', 'visible', 'target', 'category', 'link_id',
    13                        'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel',
    14                        'notes', 'linkcheck[]');
    15 
    16 for ($i=0; $i<count($wpvarstoreset); $i += 1) {
    17     $wpvar = $wpvarstoreset[$i];
    18     if (!isset($$wpvar)) {
    19         if (empty($_POST["$wpvar"])) {
    20             if (empty($_GET["$wpvar"])) {
    21                 $$wpvar = '';
    22             } else {
    23                 $$wpvar = $_GET["$wpvar"];
    24             }
    25         } else {
    26             $$wpvar = $_POST["$wpvar"];
    27         }
    28     }
    29 }
    30 
    31 $links_show_cat_id = $_COOKIE['links_show_cat_id_' . COOKIEHASH];
    32 $links_show_order = $_COOKIE['links_show_order_' . COOKIEHASH];
    33 
    34 if ('' != $_POST['assign']) $action = 'assign';
    35 if ('' != $_POST['visibility']) $action = 'visibility';
    36 if ('' != $_POST['move']) $action = 'move';
    37 if ('' != $_POST['linkcheck']) $linkcheck = $_POST[linkcheck];
    38 
    39 switch ($action) {
    40   case 'assign':
    41   {
    42     check_admin_referer();
    43 
    44     // check the current user's level first.
    45     if ( !current_user_can('manage_links') )
    46       die (__("Cheatin' uh ?"));
    47 
    48     //for each link id (in $linkcheck[]): if the current user level >= the
    49     //userlevel of the owner of the link then we can proceed.
    50 
    51     if (count($linkcheck) == 0) {
    52         header('Location: ' . $this_file);
    53         exit;
    54     }
    55     $all_links = join(',', $linkcheck);
    56     $results = $wpdb->get_results("SELECT link_id, link_owner FROM $wpdb->links LEFT JOIN $wpdb->users ON link_owner = ID WHERE link_id in ($all_links)");
    57     foreach ($results as $row) {
    58        $ids_to_change[] = $row->link_id;
    59     }
    60 
    61     // should now have an array of links we can change
    62     $all_links = join(',', $ids_to_change);
    63     $q = $wpdb->query("update $wpdb->links SET link_owner='$newowner' WHERE link_id IN ($all_links)");
    64 
    65     header('Location: ' . $this_file);
    66     break;
    67   }
    68   case 'visibility':
    69   {
    70     check_admin_referer();
    71 
    72     // check the current user's level first.
    73     if ( !current_user_can('manage_links') )
    74       die (__("Cheatin' uh ?"));
    75 
    76     //for each link id (in $linkcheck[]): toggle the visibility
    77     if (count($linkcheck) == 0) {
    78         header('Location: ' . $this_file);
    79         exit;
    80     }
    81     $all_links = join(',', $linkcheck);
    82     $results = $wpdb->get_results("SELECT link_id, link_visible FROM $wpdb->links WHERE link_id in ($all_links)");
    83     foreach ($results as $row) {
    84         if ($row->link_visible == 'Y') { // ok to proceed
    85             $ids_to_turnoff[] = $row->link_id;
    86         } else {
    87             $ids_to_turnon[] = $row->link_id;
    88         }
    89     }
    90 
    91     // should now have two arrays of links to change
    92     if (count($ids_to_turnoff)) {
    93         $all_linksoff = join(',', $ids_to_turnoff);
    94         $q = $wpdb->query("update $wpdb->links SET link_visible='N' WHERE link_id IN ($all_linksoff)");
    95     }
    96 
    97     if (count($ids_to_turnon)) {
    98         $all_linkson = join(',', $ids_to_turnon);
    99         $q = $wpdb->query("update $wpdb->links SET link_visible='Y' WHERE link_id IN ($all_linkson)");
    100     }
    101 
    102     header('Location: ' . $this_file);
    103     break;
    104   }
    105   case 'move':
    106   {
    107     check_admin_referer();
    108 
    109     // check the current user's level first.
    110     if ( !current_user_can('manage_links') )
    111       die (__("Cheatin' uh ?"));
    112 
    113     //for each link id (in $linkcheck[]) change category to selected value
    114     if (count($linkcheck) == 0) {
    115         header('Location: ' . $this_file);
    116         exit;
    117     }
    118     $all_links = join(',', $linkcheck);
    119     // should now have an array of links we can change
    120     $q = $wpdb->query("update $wpdb->links SET link_category='$category' WHERE link_id IN ($all_links)");
    121 
    122     header('Location: ' . $this_file);
    123     break;
    124   }
    125 
    126   case 'Add':
    127   {
    128     check_admin_referer();
    129 
    130     add_link();
    131 
    132     header('Location: ' . $_SERVER['HTTP_REFERER'] . '?added=true');
    133     break;
    134   } // end Add
    135 
    136   case 'editlink':
    137   {
    138  
    139     check_admin_referer();
    140  
    141     if (isset($links_show_cat_id) && ($links_show_cat_id != ''))
    142         $cat_id = $links_show_cat_id;
    143 
    144     if (!isset($cat_id) || ($cat_id == '')) {
    145         if (!isset($links_show_cat_id) || ($links_show_cat_id == ''))
    146             $cat_id = 'All';
     13$wpvarstoreset = array ('action', 'cat_id', 'linkurl', 'name', 'image', 'description', 'visible', 'target', 'category', 'link_id', 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 'notes', 'linkcheck[]');
     14
     15for ($i = 0; $i < count($wpvarstoreset); $i += 1) {
     16    $wpvar = $wpvarstoreset[$i];
     17    if (!isset ($$wpvar)) {
     18        if (empty ($_POST["$wpvar"])) {
     19            if (empty ($_GET["$wpvar"])) {
     20                $$wpvar = '';
     21            } else {
     22                $$wpvar = $_GET["$wpvar"];
     23            }
     24        } else {
     25            $$wpvar = $_POST["$wpvar"];
     26        }
    14727    }
    148     $links_show_cat_id = $cat_id;
    149 
    150     $link_id = (int) $_POST['link_id'];
    151     edit_link($link_id);
    152 
    153     setcookie('links_show_cat_id_' . COOKIEHASH, $links_show_cat_id, time()+600);
    154     wp_redirect($this_file);
    155     break;
    156   } // end Save
    157 
    158   case 'Delete':
    159   {
    160     check_admin_referer();
    161 
    162     if ( !current_user_can('manage_links') )
    163       die (__("Cheatin' uh ?"));
    164 
    165     $link_id = (int) $_GET['link_id'];
    166 
    167     wp_delete_link($link_id);
    168 
    169     if (isset($links_show_cat_id) && ($links_show_cat_id != ''))
    170         $cat_id = $links_show_cat_id;
    171 
    172     if (!isset($cat_id) || ($cat_id == '')) {
    173         if (!isset($links_show_cat_id) || ($links_show_cat_id == ''))
    174         $cat_id = 'All';
    175     }
    176     $links_show_cat_id = $cat_id;
    177     setcookie('links_show_cat_id_' . COOKIEHASH, $links_show_cat_id, time()+600);
    178     wp_redirect($this_file);
    179     break;
    180   } // end Delete
    181 
    182   case 'linkedit': {
    183     $xfn_js = true;
    184     include_once ('admin-header.php');
    185     if ( !current_user_can('manage_links') )
    186         die(__('You do not have sufficient permissions to edit the links for this blog.'));
    187 
    188     $link_id = (int) $_GET['link_id'];
    189 
    190     if ( !$link = get_link_to_edit($link_id) )
    191         die( __('Link not found.') );
    192 
    193     include('edit-link-form.php');
    194     break;
    195   } // end linkedit
    196   case __("Show"):
    197   {
    198     if (!isset($cat_id) || ($cat_id == '')) {
    199         if (!isset($links_show_cat_id) || ($links_show_cat_id == ''))
    200         $cat_id = 'All';
    201     }
    202     $links_show_cat_id = $cat_id;
    203     if (!isset($order_by) || ($order_by == '')) {
    204         if (!isset($links_show_order) || ($links_show_order == ''))
    205         $order_by = 'order_name';
    206     }
    207     $links_show_order = $order_by;
    208     //break; fall through
    209   } // end Show
    210   case "popup":
    211   {
    212     $link_url = stripslashes($_GET["linkurl"]);
    213     $link_name = stripslashes($_GET["name"]);
    214     //break; fall through
    215   }
    216   default:
    217   {
    218     if (isset($links_show_cat_id) && ($links_show_cat_id != ''))
    219         $cat_id = $links_show_cat_id;
    220 
    221     if (!isset($cat_id) || ($cat_id == '')) {
    222         if (!isset($links_show_cat_id) || ($links_show_cat_id == ''))
    223         $cat_id = 'All';
    224     }
    225     $links_show_cat_id = $cat_id;
    226     if (isset($links_show_order) && ($links_show_order != ''))
    227         $order_by = $links_show_order;
    228 
    229     if (!isset($order_by) || ($order_by == ''))
    230         $order_by = 'order_name';
    231     $links_show_order = $order_by;
    232 
    233     setcookie('links_show_cat_id_' . COOKIEHASH, $links_show_cat_id, time()+600);
    234     setcookie('links_show_order_' . COOKIEHASH, $links_show_order, time()+600);
    235     include_once ("./admin-header.php");
    236     if ( !current_user_can('manage_links') )
    237       die(__("You do not have sufficient permissions to edit the links for this blog."));
    238 
    239     switch ($order_by)
    240     {
    241         case 'order_id':     $sqlorderby = 'id';          break;
    242         case 'order_url':    $sqlorderby = 'url';         break;
    243         case 'order_desc':   $sqlorderby = 'description'; break;
    244         case 'order_owner':  $sqlorderby = 'owner';       break;
    245         case 'order_rating': $sqlorderby = 'rating';      break;
    246         case 'order_name':
    247         default:             $sqlorderby = 'name';        break;
    248     }
    249 
    250   if ($action != "popup") {
     28}
     29
     30if (empty ($cat_id))
     31    $cat_id = 'all';
     32
     33if (empty ($order_by))
     34    $order_by = 'order_name';
     35
     36$title = __('Manage Bookmarks');
     37include_once ("./admin-header.php");
     38
     39if (!current_user_can('manage_links'))
     40    die(__("You do not have sufficient permissions to edit the bookmarks for this blog."));
     41
     42switch ($order_by) {
     43    case 'order_id' :
     44        $sqlorderby = 'id';
     45        break;
     46    case 'order_url' :
     47        $sqlorderby = 'url';
     48        break;
     49    case 'order_desc' :
     50        $sqlorderby = 'description';
     51        break;
     52    case 'order_owner' :
     53        $sqlorderby = 'owner';
     54        break;
     55    case 'order_rating' :
     56        $sqlorderby = 'rating';
     57        break;
     58    case 'order_name' :
     59    default :
     60        $sqlorderby = 'name';
     61        break;
     62}
    25163?>
    25264<script type="text/javascript">
     
    26678</script>
    26779
     80<?php
     81if ( isset($_GET['deleted']) ) {
     82    echo '<div style="background-color: rgb(207, 235, 247);" id="message" class="updated fade"><p>';
     83    $deleted = (int) $_GET['deleted'];
     84    printf(__('%s bookmarks deleted.'), $deleted);
     85    echo '</p></div>';
     86}
     87?>
     88
    26889<div class="wrap">
    269     <form name="cats" method="post" action="">
    270     <table width="75%" cellpadding="3" cellspacing="3">
    271       <tr>
    272         <td>
    273         <?php _e('<strong>Show</strong> links in category:'); ?><br />
    274         </td>
    275         <td>
    276           <?php _e('<strong>Order</strong> by:');?>
    277         </td>
     90<h2><?php _e('Bookmark Management'); ?></h2>
     91<form name="cats" method="post" action="">
     92<table width="75%" cellpadding="3" cellspacing="3">
     93    <tr>
     94        <td>
     95            <?php _e('<strong>Show</strong> bookmarks in category:'); ?><br />
     96        </td>
     97        <td>
     98            <?php _e('<strong>Order</strong> by:');?>
     99        </td>
    278100        <td>&nbsp;</td>
    279101      </tr>
    280102      <tr>
    281103        <td>
    282 <?php
    283     $results = $wpdb->get_results("SELECT cat_id, cat_name, auto_toggle FROM $wpdb->linkcategories ORDER BY cat_id");
    284     echo "        <select name=\"cat_id\">\n";
    285     echo "          <option value=\"All\"";
    286     if ($cat_id == 'All')
    287       echo " selected='selected'";
    288     echo "> " . __('All') . "</option>\n";
    289     foreach ($results as $row) {
    290       echo "          <option value=\"".$row->cat_id."\"";
    291       if ($row->cat_id == $cat_id)
    292         echo " selected='selected'";
    293         echo ">".$row->cat_id.": ".wp_specialchars($row->cat_name);
    294         if ($row->auto_toggle == 'Y')
    295             echo ' '.__('(auto toggle)');
    296         echo "</option>\n";
    297     }
    298     echo "        </select>\n";
    299 ?>
    300         </td>
     104        <?php $categories = get_categories("hide_empty=1&type=link"); ?>
     105        <select name="cat_id">
     106            <option value="all" <?php echo ($cat_id == 'all') ? " selected='selected'" : ''; ?>><?php _e('All') ?></option>
     107            <?php foreach ($categories as $cat): ?>
     108            <option value="<?php echo $cat->cat_ID; ?>"<?php echo ($cat->cat_ID == $cat_id) ? " selected='selected'" : ''; ?>><?php echo wp_specialchars($cat->cat_name); ?>
     109            </option>
     110            <?php endforeach; ?>
     111            </select>
     112        </td>
     113        <td>
     114            <select name="order_by">
     115                <option value="order_id"     <?php if ($order_by == 'order_id')     echo " selected='selected'";?>><?php _e('Bookmark ID') ?></option>
     116                <option value="order_name"   <?php if ($order_by == 'order_name')   echo " selected='selected'";?>><?php _e('Name') ?></option>
     117                <option value="order_url"    <?php if ($order_by == 'order_url')    echo " selected='selected'";?>><?php _e('URI') ?></option>
     118                <option value="order_desc"   <?php if ($order_by == 'order_desc')   echo " selected='selected'";?>><?php _e('Description') ?></option>
     119            </select>
     120        </td>
     121        <td>
     122            <input type="submit" name="action" value="<?php _e('Show') ?>" />
     123        </td>
     124    </tr>
     125</table>
     126</form>
     127
     128<form name="links" id="links" method="post" action="link.php">
     129<input type="hidden" name="link_id" value="" />
     130<input type="hidden" name="action" value="" />
     131<input type="hidden" name="order_by" value="<?php echo wp_specialchars($order_by, 1); ?>" />
     132<input type="hidden" name="cat_id" value="<?php echo (int) $cat_id ?>" />
     133<table id="the-list-x" width="100%" cellpadding="3" cellspacing="3">
     134    <tr>
     135        <th width="15%"><?php _e('Name') ?></th>
     136        <th><?php _e('URI') ?></th>
     137        <th><?php _e('Categories') ?></th>
     138        <th><?php _e('rel') ?></th>
     139        <th><?php _e('Visible') ?></th>
     140        <th colspan="2"><?php _e('Action') ?></th>
     141        <th>&nbsp;</th>
     142    </tr>
     143<?php
     144if ( 'all' == $cat_id )
     145    $cat_id = '';
     146$links = get_linkz("category=$cat_id&hide_invisible=0&orderby=$sqlorderby&hide_empty=0");
     147if ($links)
     148    foreach ($links as $link) {
     149        $link->link_name = wp_specialchars($link->link_name);
     150        $link->link_description = wp_specialchars($link->link_description);
     151        $link->link_url = wp_specialchars($link->link_url);
     152        $link->link_category = wp_get_link_cats($link->link_id);
     153        $short_url = str_replace('http://', '', $link->link_url);
     154        $short_url = str_replace('www.', '', $short_url);
     155        if ('/' == substr($short_url, -1))
     156            $short_url = substr($short_url, 0, -1);
     157        if (strlen($short_url) > 35)
     158            $short_url = substr($short_url, 0, 32).'...';
     159
     160        $visible = ($link->link_visible == 'Y') ? __('Yes') : __('No');
     161        ++ $i;
     162        $style = ($i % 2) ? '' : ' class="alternate"';
     163?>
     164    <tr id="link-<?php echo $link->link_id; ?>" valign="middle" <?php echo $style; ?>>
     165        <td><strong><?php echo $link->link_name; ?></strong><br />
     166        <?php
     167
     168
     169        echo $link->link_description . "</td>";
     170        echo "<td><a href=\"$link->link_url\" title=\"".sprintf(__('Visit %s'), $link->link_name)."\">$short_url</a></td>";
     171        ?>
    301172        <td>
    302           <select name="order_by">
    303             <option value="order_id"     <?php if ($order_by == 'order_id')     echo " selected='selected'";?>><?php _e('Link ID') ?></option>
    304             <option value="order_name"   <?php if ($order_by == 'order_name')   echo " selected='selected'";?>><?php _e('Name') ?></option>
    305             <option value="order_url"    <?php if ($order_by == 'order_url')    echo " selected='selected'";?>><?php _e('URI') ?></option>
    306             <option value="order_desc"   <?php if ($order_by == 'order_desc')   echo " selected='selected'";?>><?php _e('Description') ?></option>
    307             <option value="order_owner"  <?php if ($order_by == 'order_owner')  echo " selected='selected'";?>><?php _e('Owner') ?></option>
    308             <option value="order_rating" <?php if ($order_by == 'order_rating') echo " selected='selected'";?>><?php _e('Rating') ?></option>
    309           </select>
    310         </td>
    311         <td>
    312           <input type="submit" name="action" value="<?php _e('Show') ?>" />
    313         </td>
    314       </tr>
    315     </table>
    316     </form>
    317 
    318 </div>
    319 
    320 <form name="links" id="links" method="post" action="">
    321 <div class="wrap">
    322 
    323     <input type="hidden" name="link_id" value="" />
    324     <input type="hidden" name="action" value="" />
    325     <input type="hidden" name="order_by" value="<?php echo wp_specialchars($order_by, 1); ?>" />
    326     <input type="hidden" name="cat_id" value="<?php echo (int) $cat_id ?>" />
    327   <table id="the-list-x" width="100%" cellpadding="3" cellspacing="3">
    328     <tr>
    329       <th width="15%"><?php _e('Name') ?></th>
    330       <th><?php _e('URI') ?></th>
    331       <th><?php _e('Category') ?></th>
    332       <th><?php _e('rel') ?></th>
    333       <th><?php _e('Image') ?></th>
    334       <th><?php _e('Visible') ?></th>
    335       <th colspan="2"><?php _e('Action') ?></th>
    336       <th>&nbsp;</th>
    337   </tr>
    338 <?php
    339     $sql = "SELECT link_url, link_name, link_image, link_description, link_visible,
    340             link_category AS cat_id, cat_name AS category, $wpdb->users.user_login, link_id,
    341             link_rating, link_rel
    342             FROM $wpdb->links
    343             LEFT JOIN $wpdb->linkcategories ON $wpdb->links.link_category = $wpdb->linkcategories.cat_id
    344             LEFT JOIN $wpdb->users ON $wpdb->users.ID = $wpdb->links.link_owner ";
    345 
    346     if (isset($cat_id) && ($cat_id != 'All')) {
    347       $sql .= " WHERE link_category = $cat_id ";
    348     }
    349     $sql .= ' ORDER BY link_' . $sqlorderby;
    350 
    351     // echo "$sql";
    352     $links = $wpdb->get_results($sql);
    353     if ($links) {
    354         foreach ($links as $link) {
    355             $link->link_name = wp_specialchars($link->link_name);
    356             $link->link_category = wp_specialchars($link->link_category);
    357             $link->link_description = wp_specialchars($link->link_description);
    358             $link->link_url = wp_specialchars($link->link_url);
    359             $short_url = str_replace('http://', '', $link->link_url);
    360             $short_url = str_replace('www.', '', $short_url);
    361             if ('/' == substr($short_url, -1))
    362                 $short_url = substr($short_url, 0, -1);
    363             if (strlen($short_url) > 35)
    364                 $short_url =  substr($short_url, 0, 32).'...';
    365 
    366             $image = ($link->link_image != null) ? __('Yes') : __('No');
    367             $visible = ($link->link_visible == 'Y') ? __('Yes') : __('No');
    368             ++$i;
    369             $style = ($i % 2) ? '' : ' class="alternate"';
    370 ?>
    371     <tr id="link-<?php echo $link->link_id; ?>" valign="middle" <?php echo $style; ?>>
    372         <td><strong><?php echo $link->link_name; ?></strong><br />
    373 <?php
    374         echo sprintf(__('Description: %s'), $link->link_description) . "</td>";
    375         echo "<td><a href=\"$link->link_url\" title=\"" . sprintf(__('Visit %s'), $link->link_name) . "\">$short_url</a></td>";
    376         echo <<<LINKS
    377         <td>$link->category</td>
    378         <td>$link->link_rel</td>
    379         <td align='center'>$image</td>
    380         <td align='center'>$visible</td>
    381 LINKS;
    382             $show_buttons = 1; // default
    383 
    384             if ($show_buttons) {
    385         echo '<td><a href="link-manager.php?link_id=' . $link->link_id . '&amp;action=linkedit" class="edit">' . __('Edit') . '</a></td>';
    386         echo '<td><a href="link-manager.php?link_id=' . $link->link_id . '&amp;action=Delete"' .  " onclick=\"return deleteSomething( 'link', $link->link_id , '" . sprintf(__("You are about to delete the &quot;%s&quot; link to %s.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to delete."), wp_specialchars($link->link_name,1), wp_specialchars($link->link_url)) . '\' );" class="delete">' . __('Delete') . '</a></td>';
    387         echo '<td><input type="checkbox" name="linkcheck[]" value="' . $link->link_id . '" /></td>';
    388             } else {
    389               echo "<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>\n";
    390             }
     173        <?php
     174
     175        $cat_names = array();
     176        foreach ($link->link_category as $category) {
     177            $cat_name = get_the_category_by_ID($category);
     178            $cat_names[] = wp_specialchars($cat_name);
     179        }
     180        echo implode(', ', $cat_names);
     181        ?>
     182        </td>
     183        <td><?php echo $link->link_rel; ?></td>
     184        <td align='center'><?php echo $visible; ?></td>
     185<?php
     186
     187        echo '<td><a href="link.php?link_id='.$link->link_id.'&amp;action=edit" class="edit">'.__('Edit').'</a></td>';
     188        echo '<td><a href="link.php?link_id='.$link->link_id.'&amp;action=delete"'." class='delete' onclick=\"return deleteSomething( 'link', $link->link_id , '".sprintf(__("You are about to delete the &quot;%s&quot; bookmark to %s.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to delete."), wp_specialchars($link->link_name, 1), wp_specialchars($link->link_url)).'\' );" class="delete">'.__('Delete').'</a></td>';
     189        echo '<td><input type="checkbox" name="linkcheck[]" value="'.$link->link_id.'" /></td>';
    391190        echo "\n    </tr>\n";
    392         }
    393     }
     191    }
    394192?>
    395193</table>
     
    397195<div id="ajax-response"></div>
    398196
    399 </div>
    400 
    401 <div class="wrap">
    402   <table width="100%" cellpadding="3" cellspacing="3">
    403     <tr><th colspan="4"><?php _e('Manage Multiple Links:') ?></th></tr>
    404     <tr><td colspan="4"><?php _e('Use the checkboxes on the right to select multiple links and choose an action below:') ?></td></tr>
    405     <tr>
    406         <td>
    407           <?php _e('Assign ownership to:'); ?>
    408 <?php
    409     $results = $wpdb->get_results("SELECT ID, user_login FROM $wpdb->users ORDER BY ID");
    410     echo "          <select name=\"newowner\" size=\"1\">\n";
    411     foreach ($results as $row) {
    412       echo "            <option value=\"".$row->ID."\"";
    413       echo ">".$row->user_login;
    414       echo "</option>\n";
    415     }
    416     echo "          </select>\n";
    417 ?>
    418         <input name="assign" type="submit" id="assign" value="<?php _e('Go') ?>" />
    419         </td>
    420         <td>
    421           <input name="visibility" type="submit" id="visibility" value="<?php _e('Toggle Visibility') ?>" />
    422         </td>
    423         <td>
    424           <?php _e('Move to category:'); link_category_dropdown('category'); ?> <input name="move" type="submit" id="move" value="<?php _e('Go') ?>" />
    425         </td>
    426         <td align="right">
    427           <a href="#" onclick="checkAll(document.getElementById('links')); return false; "><?php _e('Toggle Checkboxes') ?></a>
    428         </td>
    429     </tr>
     197<table width="100%" cellpadding="3" cellspacing="3">
     198    <tr>
     199        <td>
     200            <p class="submit"><input type="submit" class="button" name="deletebookmarks" id="deletebookmarks" value="<?php _e('Delete Checked Bookmarks') ?>" onclick="return confirm('<?php _e("You are about to delete these bookmarks permanently \\n  \'Cancel\' to stop, \'OK\' to delete.") ?>')" /></p>
     201        </td>
     202        <td align="right">
     203            <a href="#" onclick="checkAll(document.getElementById('links')); return false; "><?php _e('Toggle Checkboxes') ?></a>
     204        </td>
     205    </tr>
    430206</table>
    431 
    432 <?php
    433   } // end if !popup
    434 ?>
    435207</div>
    436208</form>
    437209
    438 
    439 <?php
    440     break;
    441   } // end default
    442 } // end case
    443 ?>
    444 
    445210<?php include('admin-footer.php'); ?>
Note: See TracChangeset for help on using the changeset viewer.