]> scripts.mit.edu Git - autoinstalls/wordpress.git/blob - wp-admin/sidebar.php
Wordpress 2.6.2-scripts
[autoinstalls/wordpress.git] / wp-admin / sidebar.php
1 <?php
2 $mode = 'sidebar';
3
4 require_once('admin.php');
5
6 if ( ! current_user_can('edit_posts') )
7         wp_die(__('Cheatin&#8217; uh?'));
8
9 if ('b' == $_GET['a']) {
10
11 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
12 <html xmlns="http://www.w3.org/1999/xhtml">
13 <head>
14 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=UTF-8" />
15 <title><?php _e('WordPress &#8250; Posted'); ?></title>
16 <?php
17 wp_admin_css( 'global', true );
18 wp_admin_css( 'wp-admin', true );
19 wp_admin_css( 'colors', true );
20 ?>
21 </head>
22 <body>
23         <p><?php _e('Posted !'); ?></p>
24         <p><?php printf(__('<a href="%s">Click here</a> to post again.'), 'sidebar.php'); ?></p>
25 </body>
26 </html><?php
27
28 } else {
29
30 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
31 <html xmlns="http://www.w3.org/1999/xhtml">
32 <head>
33 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('blog_charset'); ?>" />
34 <title><?php _e('WordPress &#8250; Sidebar'); ?></title>
35 <?php
36 wp_admin_css( 'global', true );
37 wp_admin_css( 'wp-admin', true );
38 wp_admin_css( 'colors', true );
39 ?>
40 <style type="text/css" media="screen">
41 form {
42         padding: 3px;
43 }
44 .sidebar-categories {
45         display: block;
46         height: 6.6em;
47         overflow: auto;
48         background-color: #f4f4f4;
49 }
50 .sidebar-categories label {
51         font-size: 10px;
52         display: block;
53         width: 90%;
54 }
55 </style>
56 </head>
57 <body id="sidebar">
58 <h1 id="wphead"><a href="http://wordpress.org/" rel="external">WordPress</a></h1>
59 <form name="post" action="post.php" method="post">
60 <div>
61 <input type="hidden" name="action" value="post" />
62 <input type="hidden" name="user_ID" value="<?php echo $user_ID ?>" />
63 <input type="hidden" name="mode" value="sidebar" />
64 <?php wp_nonce_field('add-post'); ?>
65 <p><label for="post_title"><?php _e('Title:'); ?></label>
66 <input type="text" name="post_title" id="post_title" size="20" tabindex="1" style="width: 100%;" />
67 </p>
68 <p><?php _e('Categories:'); ?>
69 <span class="sidebar-categories">
70 <?php dropdown_categories(); ?>
71 </span>
72 </p>
73 <p>
74 <label for="content">Post:</label>
75 <textarea rows="8" cols="12" style="width: 100%" name="content" id="content" tabindex="2"></textarea>
76 </p>
77 <p>
78         <input name="saveasdraft" type="submit" id="saveasdraft" tabindex="9" value="<?php _e('Save as Draft'); ?>" />
79 <?php if ( current_user_can('publish_posts') ) : ?>
80         <input name="publish" type="submit" id="publish" tabindex="6" value="<?php _e('Publish') ?>" class="button button-highlighted" />
81 <?php endif; ?>
82 </p>
83 </div>
84 </form>
85
86 </body>
87 </html>
88 <?php
89 }
90 ?>