]> scripts.mit.edu Git - autoinstalls/wordpress.git/blob - wp-admin/link-add.php
Wordpress 2.0.4
[autoinstalls/wordpress.git] / wp-admin / link-add.php
1 <?php
2 require_once('admin.php');
3
4 $title = __('Add Link');
5 $this_file = 'link-manager.php';
6 $parent_file = 'link-manager.php';
7
8
9 $wpvarstoreset = array('action', 'cat_id', 'linkurl', 'name', 'image',
10                        'description', 'visible', 'target', 'category', 'link_id',
11                        'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel',
12                        'notes', 'linkcheck[]');
13 for ($i=0; $i<count($wpvarstoreset); $i += 1) {
14     $wpvar = $wpvarstoreset[$i];
15     if (!isset($$wpvar)) {
16         if (empty($_POST["$wpvar"])) {
17             if (empty($_GET["$wpvar"])) {
18                 $$wpvar = '';
19             } else {
20                 $$wpvar = $_GET["$wpvar"];
21             }
22         } else {
23             $$wpvar = $_POST["$wpvar"];
24         }
25     }
26 }
27
28 $xfn_js = true;
29 require('admin-header.php');
30 ?>
31
32 <?php if ($_GET['added']) : ?>
33 <div id="message" class="updated fade"><p><?php _e('Link added.'); ?></p></div>
34 <?php endif; ?>
35
36 <?php
37         $link = get_default_link_to_edit();
38         include('edit-link-form.php');
39 ?>
40
41 <div class="wrap">
42 <?php printf(__('<p>You can drag <a href="%s" title="Link add bookmarklet">Link This</a> to your toolbar and when you click it a window will pop up that will allow you to add whatever site you&#8217;re on to your links! Right now this only works on Mozilla or Netscape, but we&#8217;re working on it.</p>'), "javascript:void(linkmanpopup=window.open('" . get_settings('siteurl') . "/wp-admin/link-add.php?action=popup&amp;linkurl='+escape(location.href)+'&amp;name='+escape(document.title),'LinkManager','scrollbars=yes,width=750,height=550,left=15,top=15,status=yes,resizable=yes'));linkmanpopup.focus();window.focus();linkmanpopup.focus();") ?>
43 </div>
44
45 <?php
46 require('admin-footer.php');
47 ?>