Changeset 44
- Timestamp:
- 05/23/2003 08:29:51 AM (22 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/b2.css
r40 r44 13 13 display: none; 14 14 } 15 15 p { 16 line-height: 130%; 17 } 16 18 #adminmenu { 17 19 list-style: none outside; … … 66 68 } 67 69 68 .panelbody { 69 /* empty style - for you to customize it. 70 this style applies to b2's interface, the part where the sections are displayed */ 70 h2 { 71 margin: 0 5px 2px 5px; 72 padding: 3px; 73 color: #333; 74 border-bottom: 2px solid #333; 71 75 } 76 72 77 .table { 73 78 color: #000000; … … 135 140 } 136 141 form { margin: 0; padding: 0; } /* thanks #mozilla */ 142 143 td.menutop { 144 padding-top: 2px; 145 padding-bottom: 2px; 146 border-color: #999999; 147 border-top-width: 1px; 148 border-bottom-width: 1px; 149 border-left-width: 0px; 150 border-right-width: 0px; 151 border-style: dashed; 152 } 153 textarea, input, select { 154 background-color: #f0f0f0; 155 border-width: 1px; 156 border-color: #cccccc; 157 border-style: solid; 158 padding: 2px; 159 margin: 1px; 160 font-family: Georgia, "Times New Roman", Times, serif; 161 } 162 .checkbox { 163 background-color: #ffffff; 164 border-width: 0px; 165 padding: 0px; 166 margin: 0px; 167 } 168 169 label { 170 font-weight: bold; 171 } -
trunk/wp-admin/b2categories.php
r38 r44 1 1 <?php 2 $title = "Categories";2 $title = 'Categories'; 3 3 /* <Categories> */ 4 4 … … 38 38 switch($action) { 39 39 40 case "addcat":40 case 'addcat': 41 41 42 42 $standalone = 1; 43 require_once( "./b2header.php");43 require_once('b2header.php'); 44 44 45 45 if ($user_level < 3) 46 die ("Cheatin' uh ?");46 die ('Cheatin’ uh?'); 47 47 48 48 $cat_name=addslashes($HTTP_POST_VARS["cat_name"]); 49 49 50 $query ="INSERT INTO $tablecategories (cat_ID,cat_name) VALUES ('0', '$cat_name')";51 $result =mysql_query($query) or die("Couldn't add category <b>$cat_name</b>");50 $query = "INSERT INTO $tablecategories (cat_ID,cat_name) VALUES ('0', '$cat_name')"; 51 $result = mysql_query($query) or die("Couldn't add category <b>$cat_name</b>"); 52 52 53 header( "Location: b2categories.php");53 header('Location: b2categories.php'); 54 54 55 55 break; 56 56 57 case "Delete":57 case 'Delete': 58 58 59 59 $standalone = 1; 60 require_once( "./b2header.php");60 require_once('b2header.php'); 61 61 62 $cat_ID = $HTTP_POST_VARS["cat_ID"];63 $cat_name =get_catname($cat_ID);64 $cat_name =addslashes($cat_name);62 $cat_ID = intval($HTTP_POST_VARS["cat_ID"]); 63 $cat_name = get_catname($cat_ID); 64 $cat_name = addslashes($cat_name); 65 65 66 if ( $cat_ID=="1")67 die("Can't delete the < b>$cat_name</b> category: this is the default one");66 if (1 == $cat_ID) 67 die("Can't delete the <strong>$cat_name</strong> category: this is the default one"); 68 68 69 69 if ($user_level < 3) 70 die ("Cheatin' uh ?");70 die ('Cheatin’ uh?'); 71 71 72 $query ="DELETE FROM $tablecategories WHERE cat_ID=\"$cat_ID\"";73 $result =mysql_query($query) or die("Couldn't delete category <b>$cat_name</b>".mysql_error());72 $query = "DELETE FROM $tablecategories WHERE cat_ID = $cat_ID"; 73 $result = mysql_query($query) or die("Couldn't delete category <b>$cat_name</b>".mysql_error()); 74 74 75 $query ="UPDATE $tableposts SET post_category='1' WHERE post_category='$cat_ID'";76 $result =mysql_query($query) or die("Couldn't reset category on posts where category was <b>$cat_name</b>");75 $query = "UPDATE $tableposts SET post_category='1' WHERE post_category='$cat_ID'"; 76 $result = mysql_query($query) or die("Couldn't reset category on posts where category was <b>$cat_name</b>"); 77 77 78 header( "Location: b2categories.php");78 header('Location: b2categories.php'); 79 79 80 80 break; 81 81 82 case "Rename":82 case 'Rename': 83 83 84 require_once ( "./b2header.php");85 $cat_name =get_catname($HTTP_POST_VARS["cat_ID"]);86 $cat_name =addslashes($cat_name);84 require_once ('b2header.php'); 85 $cat_name = get_catname($HTTP_POST_VARS["cat_ID"]); 86 $cat_name = addslashes($cat_name); 87 87 ?> 88 <?php echo $blankline; ?> 89 < ?php echo $tabletop; ?>90 <p>< b>Old</b> name: <?php echo $cat_name ?></p>88 89 <div class="wrap"> 90 <p><strong>Old</strong> name: <?php echo $cat_name ?></p> 91 91 <p> 92 92 <form name="renamecat" action="b2categories.php" method="post"> 93 < b>New</b> name:<br />93 <strong>New</strong> name:<br /> 94 94 <input type="hidden" name="action" value="editedcat" /> 95 95 <input type="hidden" name="cat_ID" value="<?php echo $HTTP_POST_VARS["cat_ID"] ?>" /> … … 97 97 <input type="submit" name="submit" value="Edit it !" class="search" /> 98 98 </form> 99 < ?php echo $tablebottom; ?>99 </div> 100 100 101 101 <?php … … 103 103 break; 104 104 105 case "editedcat":105 case 'editedcat': 106 106 107 107 $standalone = 1; 108 require_once( "./b2header.php");108 require_once('b2header.php'); 109 109 110 110 if ($user_level < 3) 111 die ("Cheatin' uh ?");111 die ('Cheatin’ uh?'); 112 112 113 $cat_name =addslashes($HTTP_POST_VARS["cat_name"]);114 $cat_ID =addslashes($HTTP_POST_VARS["cat_ID"]);113 $cat_name = addslashes($HTTP_POST_VARS["cat_name"]); 114 $cat_ID = addslashes($HTTP_POST_VARS["cat_ID"]); 115 115 116 $query ="UPDATE $tablecategories SET cat_name='$cat_name' WHERE cat_ID=$cat_ID";117 $result =mysql_query($query) or die("Couldn't edit category <b>$cat_name</b>: ".mysql_error());116 $query = "UPDATE $tablecategories SET cat_name='$cat_name' WHERE cat_ID = $cat_ID"; 117 $result = mysql_query($query) or die("Couldn't edit category <b>$cat_name</b>: ".mysql_error()); 118 118 119 header( "Location: b2categories.php");119 header('Location: b2categories.php'); 120 120 121 121 break; … … 123 123 default: 124 124 125 $standalone =0;126 require_once ( "./b2header.php");125 $standalone = 0; 126 require_once ('b2header.php'); 127 127 if ($user_level < 3) { 128 die("You have no right to edit the categories for this blog.<br >Ask for a promotion to your <a href=\"mailto:$admin_email\">blog admin</a>:)");128 die("You have no right to edit the categories for this blog.<br />Ask for a promotion to your <a href='mailto:$admin_email'>blog admin</a>. :)"); 129 129 } 130 130 ?> 131 131 132 <?php echo $blankline ?> 133 <?php echo $tabletop ?> 134 <table width="" cellpadding="5" cellspacing="0"> 135 <form></form> 136 <tr> 137 <td> 132 <div class="wrap"> 138 133 <form name="cats" method="post"> 139 <b>Edit</b> a category:<br /> 134 <h3>Edit a category:</h3> 135 <p> 140 136 <?php 141 $query ="SELECT * FROM $tablecategories ORDER BY cat_ID";142 $result =mysql_query($query);143 echo "<select name= \"cat_ID\">\n";137 $query = "SELECT * FROM $tablecategories ORDER BY cat_ID"; 138 $result = mysql_query($query); 139 echo "<select name='cat_ID'>\n"; 144 140 while($row = mysql_fetch_object($result)) { 145 echo "\t<option value= \"".$row->cat_ID."\"";141 echo "\t<option value='$row->cat_ID'"; 146 142 if ($row->cat_ID == $cat) 147 echo " selected";143 echo ' selected="selected"'; 148 144 echo ">".$row->cat_ID.": ".$row->cat_name."</option>\n"; 149 145 } … … 154 150 </form> 155 151 </p> 156 <p> 157 < b>Add</b> a category:<br />152 153 <h3>Add a category:</h3> 158 154 <form name="addcat" action="b2categories.php" method="post"> 159 155 <input type="hidden" name="action" value="addcat" /> 160 156 <input type="text" name="cat_name" /><br /> 161 <input type="submit" name="submit" value="Add it !" class="search" /></form></td></tr></table>162 < ?php echo $tablebottom ?>157 <input type="submit" name="submit" value="Add it!" class="search" /></form> 158 </div> 163 159 164 <br />165 160 166 <?php echo $tabletop ?> 167 <b>Note:</b><br /> 168 Deleting a category does not delete posts from that category.<br />It will just set them back to the default category <b><?php echo get_catname(1) ?></b>. 169 <?php echo $tablebottom ?> 161 162 <div class="wrap"> 163 <p><strong>Note:</strong><br /> 164 Deleting a category does not delete posts from that category, it will just 165 set them back to the default category <strong><?php echo get_catname(1) ?></strong>. 166 </p> 167 </div> 170 168 171 169 <?php … … 174 172 175 173 /* </Categories> */ 176 include("b2footer.php"); ?> 174 include('b2footer.php'); 175 ?> -
trunk/wp-admin/b2edit.form.php
r38 r44 1 <div class="wrap"> 1 2 <?php 2 echo $tabletop;3 3 4 4 switch($action) { 5 case "post":6 $submitbutton_text = "Blog this !";7 $toprow_title = "New Post";8 $form_action = "post";9 $form_extra = "";5 case 'post': 6 $submitbutton_text = 'Blog this!'; 7 $toprow_title = 'New Post'; 8 $form_action = 'post'; 9 $form_extra = ''; 10 10 if ($use_pingback) { 11 $form_pingback = '<input type="checkbox" class="checkbox" name="post_pingback" value="1" checked="checked" tabindex="7" id="pingback" /> <label for="pingback">PingBack the URLs in this post</label><br />';11 $form_pingback = '<input type="checkbox" class="checkbox" name="post_pingback" value="1" checked="checked" tabindex="7" id="pingback" /> <label for="pingback">PingBack the URLs in this post</label><br />'; 12 12 } else { 13 13 $form_pingback = ''; 14 14 } 15 15 if ($use_trackback) { 16 $form_trackback = '< br /><br /><label for="trackback"><b>TrackBack</b> an URL:</label><br /><input type="text" name="trackback_url" style="width: 415px" id="trackback" />';16 $form_trackback = '<p><label for="trackback"><strong>TrackBack</strong> an <acronym title="Uniform Resource Locator">URL</acronym>:</label> (Seperate multiple URLs with commas.)<br /><input type="text" name="trackback_url" style="width: 415px" id="trackback" /></p>'; 17 17 } else { 18 18 $form_trackback = ''; … … 21 21 break; 22 22 case "edit": 23 $submitbutton_text = "Edit this !";24 $toprow_title = "Editing Post #".$postdata["ID"];25 $form_action = "editpost";26 $form_extra = " \" />\n<input type=\"hidden\" name=\"post_ID\" value=\"$post";23 $submitbutton_text = 'Edit this!'; 24 $toprow_title = 'Editing Post #' . $postdata["ID"]; 25 $form_action = 'editpost'; 26 $form_extra = "' />\n<input type='hidden' name='post_ID' value='$post"; 27 27 $colspan = 2; 28 28 $form_pingback = '<input type="hidden" name="post_pingback" value="0" />'; … … 30 30 break; 31 31 case "editcomment": 32 $submitbutton_text = "Edit this !";33 $toprow_title = "Editing Comment #".$commentdata["comment_ID"];34 $form_action = "editedcomment";35 $form_extra = " \" />\n<input type=\"hidden\" name=\"comment_ID\" value=\"$comment\" />\n<input type=\"hidden\" name=\"comment_post_ID\" value=\"".$commentdata["comment_post_ID"];32 $submitbutton_text = 'Edit this!'; 33 $toprow_title = 'Editing Comment # '.$commentdata["comment_ID"]; 34 $form_action = 'editedcomment'; 35 $form_extra = "' />\n<input type='hidden' name='comment_ID' value='$comment' />\n<input type='hidden' name='comment_post_ID' value='".$commentdata["comment_post_ID"]; 36 36 $colspan = 3; 37 37 $form_pingback = '<input type="hidden" name="post_pingback" value="0" />'; … … 44 44 <form name="post" action="b2edit.php" method="POST"> 45 45 <input type="hidden" name="user_ID" value="<?php echo $user_ID ?>" /> 46 <input type="hidden" name="action" value= "<?php echo $form_action.$form_extra ?>"/>46 <input type="hidden" name="action" value='<?php echo $form_action . $form_extra ?>' /> 47 47 48 <table cellspacing="0" cellpadding="0" border="0" width="100%">49 <tr>50 48 <?php if ($action != "editcomment") { 51 49 // this is for everything but comment editing 52 ?> <td> 53 <table height="60" align="left" cellpadding="0" cellspacing="0"> 54 <td height="60" width="190"> 55 <label for="title"><b>Title :</b></label><br /> 56 <input type="text" name="post_title" size="20" tabindex="1" style="width: 170px;" value="<?php echo $edited_post_title; ?>" id="title" /> 50 ?> 51 <table> 52 <tr> 53 <td width="210"> 54 <label for="title">Title:</label><br /> 55 <input type="text" name="post_title" size="25" tabindex="1" style="width: 190px;" value="<?php echo $edited_post_title; ?>" id="title" /> 57 56 </td> 58 57 <td> 59 <label for="category"><b>Category :</b></label><br /><?php dropdown_categories(); ?> 58 <label for="category">Category :</label> 59 <br /><?php dropdown_categories(); ?> 60 60 </td> 61 </tr> 61 62 </table> 62 63 <?php … … 65 66 66 67 // this is for comment editing 67 ?> <td colspan="2"> </td> 68 </tr> 69 70 <tr> 68 ?> 69 <table> 70 <tr> 71 71 <td> 72 <label for="name"><b>Name :</b></label><br /> 73 <input type="text" name="newcomment_author" size="20" value="<?php echo format_to_edit($commentdata["comment_author"]) ?>" tabindex="1" id="name" /></td> 72 <label for="name">Name:</label> 73 <br /> 74 <input type="text" name="newcomment_author" size="22" value="<?php echo format_to_edit($commentdata["comment_author"]) ?>" tabindex="1" id="name" /></td> 74 75 <td> 75 <label for="email"><b>E-mail :</b></label><br /> 76 <input type="text" name="newcomment_author_email" size="20" value="<?php echo format_to_edit($commentdata["comment_author_email"]) ?>" tabindex="2" id="email" /></td> 76 <label for="email">E-mail:</label> 77 <br /> 78 <input type="text" name="newcomment_author_email" size="30" value="<?php echo format_to_edit($commentdata["comment_author_email"]) ?>" tabindex="2" id="email" /></td> 77 79 <td> 78 <label for="URL"><b>URL :</b></label><br /> 79 <input type="text" name="newcomment_author_url" size="20" value="<?php echo format_to_edit($commentdata["comment_author_url"]) ?>" tabindex="3" id="URL" /> 80 <label for="URL">URL:</label> 81 <br /> 82 <input type="text" name="newcomment_author_url" size="35" value="<?php echo format_to_edit($commentdata["comment_author_url"]) ?>" tabindex="3" id="URL" /></td> 83 </tr> 84 </table> 80 85 <?php 81 86 … … 83 88 84 89 ?> 85 </td>86 </tr>87 <tr>88 <td colspan="<?php echo $colspan; ?>">89 <table cellspacing="0" cellpadding="0" border="0" width="100%">90 <td valign="bottom">91 <?php92 if ($action != 'editcomment') {93 echo '<label for="excerpt"><b>Excerpt :</b></label>';94 } else {95 echo '<br /><label for="content"><b>Comment :</b></label>';96 }97 ?>98 </td>99 <td valign="bottom" align="right"> </td>100 </table>101 102 <textarea rows="3" cols="40" style="width:100%" name="excerpt" tabindex="4" wrap="virtual" id="excerpt"><?php echo $excerpt ?></textarea><br />103 <table cellspacing="0" cellpadding="0" border="0" width="100%">104 90 105 91 <?php 106 92 if ($action != 'editcomment') { 107 echo '<label for="content"><b>Post :</b></label>'; 93 echo '<label for="excerpt">Excerpt:</label>'; 94 ?> 95 <p><textarea rows="3" cols="40" style="width:100%" name="excerpt" tabindex="4" wrap="virtual" id="excerpt"><?php echo $excerpt ?></textarea></p> 96 97 <?php 98 } // if not a comment 99 ?> 100 <table width="100%"> 101 <tr> 102 <td> 103 <?php 104 if ($action != 'editcomment') { 105 echo '<label for="content">Post:</label>'; 108 106 } else { 109 echo '<br /><label for="content"> <b>Comment :</b></label>';107 echo '<br /><label for="content">Comment:</label>'; 110 108 } 111 109 ?> 112 </td> 113 <td valign="bottom" align="right"> 114 <?php if ($use_quicktags) include('b2quicktags.php'); ?> 115 </td> 110 </td> 111 <td align="right"> 112 <?php if ($use_quicktags) { 113 include('b2quicktags.php'); 114 } 115 ?> 116 </td> 117 </tr> 116 118 </table> 117 118 119 <textarea rows="9" cols="40" style="width:100%" name="content" tabindex="4" wrap="virtual" id="content"><?php echo $content ?></textarea><br /> 119 120 120 121 <?php echo $form_pingback ?> 121 122 122 <?php if ($use_preview) { ?> 123 <input type="button" value="preview" onclick="preview(this.form);" class="search" tabindex="8" /> 124 <?php } ?> 125 126 <input type="submit" name="submit" value="<?php echo $submitbutton_text ?>" class="search" style="font-weight: bold;" tabindex="5" /> 123 <p><input type="submit" name="submit" value="<?php echo $submitbutton_text ?>" class="search" style="font-weight: bold;" tabindex="5" /></p> 127 124 128 125 … … 134 131 135 132 // if the level is 5+, allow user to edit the timestamp - not on 'new post' screen though 136 #if (($user_level > 4) && ($action != "post"))133 // if (($user_level > 4) && ($action != "post")) 137 134 if ($user_level > 4) { 138 touch_time(($action =="edit"));135 touch_time(($action == 'edit')); 139 136 } 140 137 ?> 141 <script language="JavaScript" type="text/javascript"> 142 <!-- 143 // document.blog.post_content.focus(); 144 //--> 145 </script> 146 </td> 147 </tr> 148 </table> 149 <?php echo $tablebottom ?> 138 150 139 </form> 140 </div> -
trunk/wp-admin/b2edit.php
r40 r44 41 41 42 42 $standalone = 1; 43 require_once(' ./b2header.php');43 require_once('b2header.php'); 44 44 45 45 $post_autobr = intval($HTTP_POST_VARS["post_autobr"]); … … 53 53 54 54 if ($user_level == 0) 55 die ("Cheatin' uh ?");55 die ("Cheatin' uh ?"); 56 56 57 57 if (($user_level > 4) && (!empty($HTTP_POST_VARS["edit_date"]))) { … … 68 68 $now = "$aa-$mm-$jj $hh:$mn:$ss"; 69 69 } else { 70 $now = date("Y-m-d H:i:s", (time() + ($time_difference * 3600)));71 } 72 73 $query = "INSERT INTO $tableposts (ID, post_author, post_date, post_content, post_title, post_category, post_excerpt) VALUES ('0','$user_ID','$now','$content',' ".$post_title."','".$post_category."','".$excerpt."')";70 $now = date("Y-m-d H:i:s", (time() + ($time_difference * 3600))); 71 } 72 73 $query = "INSERT INTO $tableposts (ID, post_author, post_date, post_content, post_title, post_category, post_excerpt) VALUES ('0','$user_ID','$now','$content','$post_title','$post_category','$excerpt')"; 74 74 $result = mysql_query($query) or mysql_oops($query); 75 75 … … 80 80 } 81 81 82 rss_update($blog_ID);83 82 pingWeblogs($blog_ID); 84 83 pingCafelog($cafelogID, $post_title, $post_ID); … … 118 117 break; 119 118 120 case "edit":121 122 $standalone =0;123 require_once ("./b2header.php");124 $post = $HTTP_GET_VARS[ "post"];119 case 'edit': 120 121 $standalone = 0; 122 require_once('b2header.php'); 123 $post = $HTTP_GET_VARS['post']; 125 124 if ($user_level > 0) { 126 $postdata=get_postdata($post) or die( "Oops, no post with this ID. <a href=\"b2edit.php\">Go back</a> !");125 $postdata=get_postdata($post) or die('Oops, no post with this ID. <a href="b2edit.php">Go back</a>!'); 127 126 $authordata = get_userdata($postdata["Author_ID"]); 128 127 if ($user_level < $authordata[13]) 129 die ( "You don't have the right to edit <b>".$authordata[1]."</b>'s posts.");130 131 $content = $postdata[ "Content"];128 die ('You don’t have the right to edit <strong>'.$authordata[1].'</strong>’s posts.'); 129 130 $content = $postdata['Content']; 132 131 $content = format_to_edit($content); 133 $excerpt = $postdata[ "Excerpt"];132 $excerpt = $postdata['Excerpt']; 134 133 $excerpt = format_to_edit($excerpt); 135 $edited_post_title = format_to_edit($postdata["Title"]); 136 137 echo $blankline; 138 include("b2edit.form.php"); 134 $edited_post_title = format_to_edit($postdata['Title']); 135 136 include('b2edit.form.php'); 139 137 140 138 } else { … … 191 189 } 192 190 193 rss_update($blog_ID);194 191 // pingWeblogs($blog_ID); 195 192 … … 226 223 } 227 224 228 rss_update($blog_ID);229 225 // pingWeblogs($blog_ID); 230 226 231 header ( "Location: b2edit.php");232 233 break; 234 235 case "editcomment":236 237 $standalone =0;238 require_once ( "./b2header.php");227 header ('Location: b2edit.php'); 228 229 break; 230 231 case 'editcomment': 232 233 $standalone = 0; 234 require_once ('b2header.php'); 239 235 240 236 get_currentuserinfo(); 241 237 242 238 if ($user_level == 0) { 243 die ( "Cheatin' uh ?");239 die ('Cheatin’ uh?'); 244 240 } 245 241 246 242 $comment = $HTTP_GET_VARS['comment']; 247 $commentdata = get_commentdata($comment, 1) or die("Oops, no comment with this ID. <a href=\"javascript:history.go(-1)\">Go back</a> !");248 $content = $commentdata[ "comment_content"];243 $commentdata = get_commentdata($comment, 1) or die('Oops, no comment with this ID. <a href="javascript:history.go(-1)">Go back</a>!'); 244 $content = $commentdata['comment_content']; 249 245 $content = format_to_edit($content); 250 251 echo $blankline; 252 include("b2edit.form.php"); 246 247 include('b2edit.form.php'); 253 248 254 249 break; -
trunk/wp-admin/b2edit.showposts.php
r38 r44 1 < ?php2 3 echo $tabletop; 1 <div class="wrap"> 2 <?php 3 4 4 require_once('b2config.php'); 5 5 … … 45 45 <tr> 46 46 <td colspan="2" align="center"><!-- show next/previous X posts --> 47 <form name="previousXposts" method="get" >47 <form name="previousXposts" method="get" action=""> 48 48 <?php 49 49 if ($previousXstart > 0) { … … 58 58 </td> 59 59 <td> 60 <form name="nextXposts" method="get" >60 <form name="nextXposts" method="get" action=""> 61 61 <input type="hidden" name="poststart" value="<?php echo $nextXstart; ?>" /> 62 62 <input type="hidden" name="postend" value="<?php echo $nextXend; ?>" /> … … 70 70 <tr> 71 71 <td valign="top" width="200"><!-- show X first/last posts --> 72 <form name="showXfirstlastposts" method="get" >72 <form name="showXfirstlastposts" method="get" action=""> 73 73 <input type="text" name="posts" value="<?php echo $posts ?>" style="width:40px;" /?> 74 74 <?php … … 77 77 $i = $order; 78 78 if ($i == "DESC") 79 $besp_selected = "selected ";80 ?> 81 <select name="order"> 82 <option value="DESC" "<?= $besp_selected ?>">last posts</option>79 $besp_selected = "selected='selected'"; 80 ?> 81 <select name="order"> 82 <option value="DESC" <?php echo $besp_selected ?>>last posts</option> 83 83 <?php 84 84 $besp_selected = ""; 85 85 if ($i == "ASC") 86 $besp_selected = "selected ";87 ?> 88 <option value="ASC" "<?= $besp_selected?>">first posts</option>86 $besp_selected = "selected='selected'"; 87 ?> 88 <option value="ASC" <?php echo $besp_selected?>>first posts</option> 89 89 </select> 90 90 <input type="submit" name="submitfirstlast" class="search" value="OK" /> … … 92 92 </td> 93 93 <td valign="top"><!-- show post X to post X --> 94 <form name="showXfirstlastposts" method="get" >94 <form name="showXfirstlastposts" method="get" action=""> 95 95 <input type="text" name="poststart" value="<?php echo $poststart ?>" style="width:40px;" /?> to <input type="text" name="postend" value="<?php echo $postend ?>" style="width:40px;" /?> 96 96 <select name="order"> … … 99 99 $i = $order; 100 100 if ($i == "DESC") 101 $besp_selected = "selected ";102 ?> 103 <option value="DESC" "<? =$besp_selected ?>">from the end</option>101 $besp_selected = "selected='selected'"; 102 ?> 103 <option value="DESC" "<?php echo $besp_selected ?>">from the end</option> 104 104 <?php 105 105 $besp_selected = ""; 106 106 if ($i == "ASC") 107 $besp_selected = "selected ";108 ?> <option value="ASC" "<? =$besp_selected ?>">from the start</option>107 $besp_selected = "selected='selected'"; 108 ?> <option value="ASC" "<?php echo $besp_selected ?>">from the start</option> 109 109 </select> 110 110 <input type="submit" name="submitXtoX" class="search" value="OK" /> … … 113 113 </tr> 114 114 </table> 115 <?php echo $tablebottom ?> 116 117 <br /> 118 119 <?php echo $tabletop ?> 115 </div> 116 117 <div class="wrap"> 120 118 <table width="100%"> 121 119 <td valign="top" width="33%"> 122 120 <form name="searchform" action="b2edit.php" method="get"> 123 121 <input type="hidden" name="a" value="s" /> 124 <input on Focus="this.value='';" onBlur="if (this.value=='') {this.value='search...';}" type="text" name="s" value="search..." size="7" style="width: 100px;" />122 <input onfocus="this.value='';" onblur="if (this.value=='') {this.value='search...';}" type="text" name="s" value="search..." size="7" style="width: 100px;" /> 125 123 <input type="submit" name="submit" value="search" class="search" /> 126 124 </form> … … 138 136 echo "<option value=\"".$row->cat_ID."\""; 139 137 if ($row->cat_ID == $postdata["Category"]) 140 echo " selected ";138 echo " selected='selected'"; 141 139 echo ">".$row->cat_name."</option>"; 142 140 } … … 228 226 229 227 </table> 230 <br /> 231 232 <table cellspacing="0" cellpadding="5" border="0" width="100%"> 228 233 229 <?php 234 230 // these lines are b2's "motor", do not alter nor remove them … … 238 234 $posts_per_page = 10; 239 235 start_b2(); ?> 240 <tr>241 <td>242 236 <p> 243 < b><?php the_time('Y/m/d @ H:i:s'); ?></b> [ <a href="b2edit.php?p=<?php echo $id ?>&c=1"><?php comments_number('no comment', '1 comment', "% comments") ?><?php trackback_number('', ', 1 trackback', ', % trackbacks') ?><?php pingback_number('', ', 1 pingback', ', % pingbacks') ?></a>237 <strong><?php the_time('Y/m/d @ H:i:s'); ?></strong> [ <a href="b2edit.php?p=<?php echo $id ?>&c=1"><?php comments_number('no comment', '1 comment', "% comments") ?><?php trackback_number('', ', 1 trackback', ', % trackbacks') ?><?php pingback_number('', ', 1 pingback', ', % pingbacks') ?></a> 244 238 <?php 245 239 if (($user_level > $authordata[13]) or ($user_login == $authordata[1])) { 246 echo " - <a href=\"b2edit.php?action=edit& post=".$postdata["ID"];240 echo " - <a href=\"b2edit.php?action=edit&post=".$postdata["ID"]; 247 241 if ($m) 248 242 echo "&m=$m"; 249 243 echo "\">Edit</a>"; 250 echo " - <a href=\"b2edit.php?action=delete& post=".$postdata["ID"]."\" onclick=\"return confirm('You are about to delete this post \'".$row->post_title."\'\\n \'Cancel\' to stop, \'OK\' to delete.')\">Delete</a> ";244 echo " - <a href=\"b2edit.php?action=delete&post=".$postdata["ID"]."\" onclick=\"return confirm('You are about to delete this post \'".$row->post_title."\'\\n \'Cancel\' to stop, \'OK\' to delete.')\">Delete</a> "; 251 245 } 252 246 ?> … … 281 275 ?> 282 276 283 <a name="comments"></a> 284 <p><b><font color="#ff3300">::</font> comments</b></p> 277 <h3 id="comments">comments</h3> 285 278 286 279 <?php … … 295 288 <?php comment_text() ?> 296 289 <br /> 297 <?php comment_date('Y/m/d') ?> @ <?php comment_time() ?> <br />290 <?php comment_date('Y/m/d') ?> @ <?php comment_time() ?> 298 291 <?php 299 292 if (($user_level > $authordata[13]) or ($user_login == $authordata[1])) { … … 313 306 ?> 314 307 315 < p><b><font color="#ff3300">::</font> leave a comment</b></p>308 <h3>Leave Comment</h3> 316 309 317 310 … … 325 318 <input type="text" name="url" class="textarea" value="<?php echo $user_url ?>" size="20" tabindex="3" /><br /> 326 319 <textarea cols="40" rows="4" name="comment" tabindex="4" class="textarea">comment</textarea><br /> 327 <input type="checkbox" name="comment_autobr" value="1" checked tabindex="6" class="checkbox" /> Auto-BR (line-breaks become <br> tags)<br />328 320 <input type="submit" name="submit" class="buttonarea" value="ok" tabindex="5" /> 329 321 … … 339 331 ?> 340 332 <br /> 341 </td> 342 </tr> 333 343 334 <?php 344 335 345 336 } 346 337 ?> 347 </table> 348 < ?php echo $tablebottom ?>349 <br /> 350 < ?php echo $tabletop ?>338 339 </div> 340 341 <div class="wrap"> 351 342 <table width="100%"> 352 343 <tr> 353 <td valign="top" width="200">Show posts: 344 <td valign="top" width="200">Show posts:</td> 354 345 <td> 355 346 <table cellpadding="0" cellspacing="0" border="0"> … … 410 401 </tr> 411 402 </table> 412 < ?php echo $tablebottom ?>403 </div> -
trunk/wp-admin/b2header.php
r40 r44 1 1 <?php 2 2 3 require _once("../b2config.php");3 require("../b2config.php"); 4 4 require_once($b2inc."/b2template.functions.php"); 5 5 require_once("b2verifauth.php"); … … 16 16 get_currentuserinfo(); 17 17 18 $request = " SELECT * FROM $tablesettings";18 $request = "SELECT * FROM $tablesettings"; 19 19 $result = mysql_query($request); 20 20 $querycount++; … … 24 24 $archive_mode=$row->archive_mode; 25 25 $time_difference=$row->time_difference; 26 $autobr=$row->AutoBR;27 26 $date_format=stripslashes($row->date_format); 28 27 $time_format=stripslashes($row->time_format); … … 31 30 // let's deactivate quicktags on IE Mac and Lynx, because they don't work there. 32 31 if (($is_macIE) || ($is_lynx)) 33 $use_quicktags =0;32 $use_quicktags = 0; 34 33 35 34 $b2varstoreset = array('profile','standalone','redirect','redirect_url','a','popuptitle','popupurl','text', 'trackback', 'pingback'); … … 51 50 if ($standalone == 0) { 52 51 53 ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">54 <html >52 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 53 <html xmlns="http://www.w3.org/1999/xhtml"> 55 54 <head> 56 <title>wordpress > <?php echo $title; ?></title> 57 <link rel="stylesheet" href="b2.css" type="text/css"> 58 <style type="text/css"> 59 <!-- 60 <?php 61 if (!$is_NS4) { 62 ?> 63 td.menutop { 64 padding-top: 2px; 65 padding-bottom: 2px; 66 border-color: #999999; 67 border-top-width: 1px; 68 border-bottom-width: 1px; 69 border-left-width: 0px; 70 border-right-width: 0px; 71 border-style: dashed; 72 } 73 textarea,input,select { 74 background-color: #f0f0f0; 75 border-width: 1px; 76 border-color: #cccccc; 77 border-style: solid; 78 padding: 2px; 79 margin: 1px; 80 font-family: Georgia, "Times New Roman", Times, serif; 81 } 82 .checkbox { 83 <?php 84 if ((preg_match("/MSIE/",$HTTP_USER_AGENT)) && (!preg_match("/Mac/",$HTTP_USER_AGENT))) { 85 ?> background-color: #ffffff; 86 border-width: 0px; 87 padding: 0px; 88 margin: 0px; 89 } 90 <?php 91 } 92 } 93 ?> 94 --> 95 </style> 55 <title>WordPress > <?php echo $title; ?></title> 56 <link rel="stylesheet" href="b2.css" type="text/css" /> 57 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 58 96 59 <?php 97 60 if ($redirect==1) { … … 106 69 </script> 107 70 <?php 108 } 71 } // redirect 109 72 ?> 73 110 74 <script language="javascript" type="text/javascript"> 111 75 <!-- hiding from old terrible browsers … … 113 77 function profile(userID) { 114 78 window.open ("b2profile.php?action=viewprofile&user="+userID, "Profile", "width=500, height=450, location=0, menubar=0, resizable=0, scrollbars=1, status=1, titlebar=0, toolbar=0, screenX=60, left=60, screenY=60, top=60"); 115 }116 117 function preview(form) {118 var preview_date = "<?php echo date("Y-m-d H:i:s"); ?>";119 var preview_userid = "<?php echo $user_ID ?>";120 var preview_title = form.post_title.value;121 var preview_category = form.post_category.value;122 var preview_content = form.content.value;123 var preview_autobr = form.post_autobr.value;124 preview_date = escape(preview_date);125 preview_userid = escape(preview_userid);126 preview_title = escape(preview_title);127 preview_category = escape(preview_category);128 preview_content = escape(preview_content);129 preview_autobr = escape(preview_autobr);130 window.open ("<?php echo "$siteurl/$blogfilename" ?>?preview=1&preview_date="+preview_date +"&preview_userid="+preview_userid +"&preview_title="+preview_title +"&preview_category="+preview_category +"&preview_content="+preview_content +"&preview_autobr="+preview_autobr ,"Preview", "location=0,menubar=1,resizable=1,scrollbars=yes,status=1,toolbar=0");131 79 } 132 80 … … 140 88 <body> 141 89 142 <table width="100%" cellpadding="0" cellspacing="0" align="center">143 90 <?php 144 91 if ($profile==0) { 92 include('b2menutop.php'); 93 } 145 94 ?> 146 <tr height="60"> 147 <td valign="top"> 148 <?php include('b2menutop.php') ?> 149 </td> 150 </tr><tr> 95 151 96 <?php 152 97 } 153 98 ?> 154 <td valign="top">155 <div class="panelbody">156 <?php157 158 }159 ?> -
trunk/wp-admin/b2menutop.php
r40 r44 25 25 ?> 26 26 <li><a href="<?php echo $siteurl."/".$blogfilename; ?>">View site</a></li> 27 <li ><a href="<?php echo $siteurl ?>/b2login.php?action=logout">Logout</a></li>27 <li id="last"><a href="<?php echo $siteurl ?>/b2login.php?action=logout">Logout</a></li> 28 28 </ul> 29 <br clear="all" /> 29 30 30 31 <h2><?php echo $title; ?></h2> -
trunk/wp-admin/b2team.php
r38 r44 1 1 <?php 2 $title = "Team management";2 $title = 'Team management'; 3 3 /* <Team> */ 4 4 … … 21 21 switch ($action) { 22 22 23 case "promote":23 case 'promote': 24 24 25 25 $standalone = 1; 26 require_once( "./b2header.php");26 require_once('b2header.php'); 27 27 28 28 if (empty($HTTP_GET_VARS["prom"])) { 29 header( "Location: b2team.php");29 header('Location: b2team.php'); 30 30 } 31 31 … … 33 33 $prom = $HTTP_GET_VARS["prom"]; 34 34 35 $user_data =get_userdata($id);36 $usertopromote_level =$user_data[13];35 $user_data = get_userdata($id); 36 $usertopromote_level = $user_data[13]; 37 37 38 38 if ($user_level <= $usertopromote_level) { 39 die( "Can't change the level of an user whose level is higher than yours.");40 } 41 42 if ( $prom == "up") {39 die('Can’t change the level of an user whose level is higher than yours.'); 40 } 41 42 if ('up' == $prom) { 43 43 $sql="UPDATE $tableusers SET user_level=user_level+1 WHERE ID = $id"; 44 } elseif ( $prom == "down") {44 } elseif ('down' == $prom) { 45 45 $sql="UPDATE $tableusers SET user_level=user_level-1 WHERE ID = $id"; 46 46 } 47 $result =mysql_query($sql) or die("Couldn't change $id's level.");48 49 header( "Location: b2team.php");47 $result = mysql_query($sql) or die("Couldn't change $id's level."); 48 49 header('Location: b2team.php'); 50 50 51 51 break; 52 52 53 case "delete":53 case 'delete': 54 54 55 55 $standalone = 1; 56 require_once( "./b2header.php");56 require_once('b2header.php'); 57 57 58 58 $id = $HTTP_GET_VARS["id"]; 59 59 60 60 if (!$id) { 61 header( "Location: b2team.php");62 } 63 64 $user_data =get_userdata($id);65 $usertodelete_level =$user_data[13];61 header('Location: b2team.php'); 62 } 63 64 $user_data = get_userdata($id); 65 $usertodelete_level = $user_data[13]; 66 66 67 67 if ($user_level <= $usertodelete_level) 68 die("Can't delete an user whose level is higher than yours.");68 die('Can’t delete an user whose level is higher than yours.'); 69 69 70 70 $sql="DELETE FROM $tableusers WHERE ID = $id"; 71 $result =mysql_query($sql) or die("Couldn't delete user #$id.");71 $result = mysql_query($sql) or die("Couldn’t delete user #$id."); 72 72 73 73 $sql="DELETE FROM $tableposts WHERE post_author = $id"; 74 $result =mysql_query($sql) or die("Couldn't delete user #$id's posts.");75 76 header( "Location: b2team.php");74 $result = mysql_query($sql) or die("Couldn’t delete user #$id’s posts."); 75 76 header('Location: b2team.php'); 77 77 78 78 break; … … 80 80 default: 81 81 82 $standalone =0;83 include ( "./b2header.php");82 $standalone = 0; 83 include ('b2header.php'); 84 84 ?> 85 <?php echo $blankline.$tabletop ?> 86 <table cellspacing="0" cellpadding="5" border="0" width="100%"> 87 <tr> 88 <td>Click on an user's login name to see his/her complete Profile.<br /> 89 To edit your Profile, click on your login name.</td> 90 </tr> 91 </table> 92 <?php echo $tablebottom ?> 93 <br /> 94 <?php echo $tabletop ?> 95 <p><b>Active users</b> 85 86 <div class="wrap"><p>Click on an user’s login name to see his complete profile.<br /> 87 To edit your profile, click on your login name.</p> 88 </div> 89 90 <div class="wrap"> 91 <h3>Active users</h3> 96 92 <table cellpadding="5" cellspacing="0"> 97 93 <tr> … … 107 103 </tr> 108 104 <?php 109 $request = " 105 $request = "SELECT * FROM $tableusers WHERE user_level>0 ORDER BY ID"; 110 106 $result = mysql_query($request); 111 107 while($row = mysql_fetch_object($result)) { … … 139 135 140 136 </table> 141 </p> 142 <?php echo $tablebottom ?> 137 138 </div> 139 143 140 <?php 144 141 $request = " SELECT * FROM $tableusers WHERE user_level=0 ORDER BY ID"; … … 146 143 if (mysql_num_rows($result)) { 147 144 ?> 148 <br /> 149 <?php echo $tabletop ?> 150 <p><b>Inactive users (level 0)</b> 145 <div class="wrap"> 146 <h3>Inactive users (level 0)</h3> 151 147 <table cellpadding="5" cellspacing="0"> 152 148 <tr> … … 192 188 193 189 </table> 194 </p> 195 <?php echo $tablebottom ?> 190 </div> 196 191 197 192 <?php 198 193 } 199 194 if ($user_level >= 3) { ?> 200 <br /> 201 <?php echo $tabletop ?>202 To delete an user, bring his/her level to zero, then click on the red cross.<br /> 203 <b>Warning:</b> deleting an user also deletes all posts made by this user. 204 < ?php echo $tablebottom ?>195 <div class="wrap"> 196 <p>To delete an user, bring his level to zero, then click on the red X.<br /> 197 <strong>Warning:</strong> deleting an user also deletes all posts made by this user. 198 </p> 199 </div> 205 200 <?php 206 201 } … … 210 205 211 206 /* </Team> */ 212 include("b2footer.php") ?> 207 include('b2footer.php'); 208 ?> -
trunk/wp-admin/linkcategories.php
r40 r44 102 102 $auto_toggle=get_autotoggle($cat_id); 103 103 ?> 104 <?php echo $blankline; ?> 105 <?php echo $tabletop; ?> 104 <div class="wrap"> 106 105 <p><b>Old</b> name: <?php echo $cat_name ?></p> 107 106 <p> … … 115 114 </form> 116 115 </p> 117 <?php echo $tablebottom; ?>116 </div> 118 117 <?php 119 118 break; … … 145 144 } 146 145 ?> 147 <?php echo $blankline ?> 148 <?php echo $tabletop ?> 146 <div class="wrap"> 149 147 <table width="" cellpadding="5" cellspacing="0" border="0"> 150 148 <tr><td><b>Link Categories:</b></td></tr> … … 187 185 </table> 188 186 189 <?php echo $tablebottom ?> 190 <?php echo $blankline ?> 191 192 <?php echo $tabletop ?> 187 </div> 188 189 <div class="wrap"> 193 190 <b>Note:</b><br /> 194 191 Deleting a link category does not delete links from that category.<br />It will 195 192 just set them back to the default category <b><?php echo get_linkcatname(1) ?></b>. 196 <?php echo $tablebottom ?> 197 198 <?php echo $blankline ?> 193 </div> 199 194 <?php 200 195 break; … … 204 199 </table> 205 200 206 <?php include( "b2footer.php")?>201 <?php include('b2footer.php'); ?> -
trunk/wp-admin/linkmanager.php
r38 r44 31 31 include_once("../wp-links/links.php"); 32 32 33 $title = "Manage Links";33 $title = 'Manage Links'; 34 34 35 35 function add_magic_quotes($array) { … … 70 70 $links_show_cat_id = $HTTP_COOKIE_VARS["links_show_cat_id"]; 71 71 72 // error_log("start, links_show_cat_id=$links_show_cat_id");72 // error_log("start, links_show_cat_id=$links_show_cat_id"); 73 73 74 74 switch ($action) { 75 case "Add":75 case 'Add': 76 76 { 77 77 $standalone = 1; 78 include_once( "./b2header.php");78 include_once('b2header.php'); 79 79 80 80 $link_url = $HTTP_POST_VARS["linkurl"]; … … 107 107 $sql_result = mysql_query($sql) or die("Couldn't execute query."."sql=[$sql]". mysql_error()); 108 108 109 header( "Location: linkmanager.php");109 header('Location: linkmanager.php'); 110 110 break; 111 111 } // end Add 112 112 113 case "editlink":113 case 'editlink': 114 114 { 115 115 if (isset($submit) && ($submit == "Save")) { … … 125 125 126 126 $standalone = 1; 127 include_once( "./b2header.php");127 include_once('b2header.php'); 128 128 129 129 $link_id = $HTTP_POST_VARS["link_id"]; … … 165 165 } // end Save 166 166 167 case "Delete":167 case 'Delete': 168 168 { 169 169 $standalone = 1; 170 include_once( "./b2header.php");170 include_once('b2header.php'); 171 171 172 172 $link_id = $HTTP_POST_VARS["link_id"]; … … 190 190 break; 191 191 } // end Delete 192 case "linkedit": 192 193 case 'linkedit': 193 194 { 194 195 $standalone=0; 195 include_once ( "./b2header.php");196 include_once ('b2header.php'); 196 197 if ($user_level < $minadminlevel) { 197 die("You have no right to edit the links for this blog.<br >Ask for a promotion to your <a href=\"mailto:$admin_email\">blog admin</a>:)");198 die("You have no right to edit the links for this blog.<br />Ask for a promotion to your <a href=\"mailto:$admin_email\">blog admin</a>. :)"); 198 199 } 199 200 … … 216 217 217 218 ?> 218 <?php echo $blankline ?> 219 <?php echo $tabletop ?>219 220 <div class="wrap"> 220 221 <table width="95%" cellpadding="5" cellspacing="0" border="0"> 221 222 <form name="editlink" method="post"> … … 294 295 </tr> 295 296 </table> 296 297 </div> 297 298 <?php 298 299 break; … … 345 346 if ($action != "popup") { 346 347 ?> 347 <?php echo $blankline ?> 348 <?php echo $tabletop ?>348 349 <div class="wrap"> 349 350 <form name="cats" method="post"> 350 351 <table width="50%" cellpadding="5" cellspacing="0" border="0"> … … 397 398 </form> 398 399 399 <?php echo $tablebottom ?>400 <?php echo $blankline ?> 401 <?php echo $tabletop ?>400 </div> 401 402 <div class="wrap"> 402 403 403 404 <table width="100%" cellpadding="1" cellspacing="0" border="0"> … … 481 482 } // end if !popup 482 483 ?> 483 <?php echo $tablebottom ?> 484 <?php echo $blankline ?> 485 486 <?php echo $tabletop ?> 484 </div> 485 486 <div class="wrap"> 487 487 488 488 <table width="95%" cellpadding="5" cellspacing="0" border="0"> … … 556 556 </tr> 557 557 </table> 558 558 </div> 559 560 <div class="wrap"> 561 <p>You can drag <a href="javascript:void(linkmanpopup=window.open('<?php echo $siteurl; ?>/wp-admin/linkmanager.php?action=popup&linkurl='+escape(location.href)+'&name='+escape(document.title),'Link Manager','scrollbars=yes,width=750,height=550,left=15,top=15,status=yes,resizable=yes'));linkmanpopup.focus();window.focus();linkmanpopup.focus();" 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're on to your links! Right now this only works on Mozilla or Netscape, but we're working on it.</p> 562 </div> 559 563 <?php 560 564 break; … … 563 567 ?> 564 568 565 <?php echo $tablebottom ?> 566 567 <?php include( "b2footer.php")?>569 570 571 <?php include('b2footer.php'); ?>
Note: See TracChangeset
for help on using the changeset viewer.