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