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