More changes for new admin path. Removed relocated files.
Moved some more files from b2-include to wp-admin. git-svn-id: http://svn.automattic.com/wordpress/trunk@40 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -1,136 +0,0 @@
|
||||
#wphead {
|
||||
margin: 5px;
|
||||
background-image: url(http://wordpress.org/images/wp-small.png);
|
||||
background-repeat: no-repeat;
|
||||
height: 42px;
|
||||
border-bottom: 4px solid #333;
|
||||
}
|
||||
#wphead a {
|
||||
display: block;
|
||||
height: 30px;
|
||||
}
|
||||
#wphead a span {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#adminmenu {
|
||||
list-style: none outside;
|
||||
padding: 0;
|
||||
margin: 5px 0 0 0;
|
||||
margin-left: 40px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#adminmenu li {
|
||||
text-align: center;
|
||||
display: block;
|
||||
float: left;
|
||||
padding: 4px;
|
||||
border-right: 1px solid #ccc;
|
||||
}
|
||||
#adminmenu #last {
|
||||
border-right: none;
|
||||
}
|
||||
#adminmenu a {
|
||||
padding: 3px 8px 3px 7px;
|
||||
color: #333;
|
||||
text-decoration: none;
|
||||
border: 1px solid white;
|
||||
}
|
||||
#adminmenu a:hover {
|
||||
background-color: #e9e9e9;
|
||||
color: #333;
|
||||
border: 1px solid gray;
|
||||
}
|
||||
|
||||
body {
|
||||
margin-top: 0px;
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
margin-bottom: 0px;
|
||||
background-color: #FFFFFF}
|
||||
body, td {
|
||||
color: #000000;
|
||||
font-family: Georgia, "Times New Roman", Times, serif;
|
||||
font-size: 10pt;
|
||||
}
|
||||
a {
|
||||
color: #00019b;
|
||||
font-weight: bold;
|
||||
}
|
||||
a:visited {
|
||||
color: #006;
|
||||
}
|
||||
a:hover {
|
||||
color: #069;
|
||||
}
|
||||
|
||||
.panelbody {
|
||||
/* empty style - for you to customize it.
|
||||
this style applies to b2's interface, the part where the sections are displayed */
|
||||
}
|
||||
.table {
|
||||
color: #000000;
|
||||
font-size: 10pt;
|
||||
}
|
||||
.tabletoprow {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
font-size: 12px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.quicktags, .search {
|
||||
font-family: Georgia, "Times New Roman", Times, serif;
|
||||
font-size: 12px;
|
||||
color: #000000;
|
||||
background-color: #cccccc;
|
||||
}
|
||||
|
||||
.menutop {
|
||||
color: #999999;
|
||||
font-size: 10px;
|
||||
background-color: #DDEEFF;
|
||||
}
|
||||
a.menutop {
|
||||
background-color: transparent;
|
||||
color: #3366CC;
|
||||
font-weight: normal;
|
||||
border-width: 0px;
|
||||
}
|
||||
a.menutop:hover {
|
||||
color: #FF9900;
|
||||
text-decoration: underline;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.menutoptitle {
|
||||
color: #BBCCDD;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.b2menutop {
|
||||
color: #333333;
|
||||
font-size: 10px;
|
||||
}
|
||||
a.b2menutop {
|
||||
background-color: transparent;
|
||||
color: #0066ff;
|
||||
font-weight: lighter;
|
||||
}
|
||||
a.b2menutop:hover {
|
||||
color: #ff9900;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
}
|
||||
xmp { /* Just in case */
|
||||
font-size: 10pt;
|
||||
}
|
||||
.wrap {
|
||||
width: 85%;
|
||||
border: 1px solid #ccc;
|
||||
margin: 20px auto 10px auto;
|
||||
padding: 10px;
|
||||
}
|
||||
form { margin: 0; padding: 0; } /* thanks #mozilla */
|
||||
@@ -1,150 +0,0 @@
|
||||
<?php
|
||||
echo $tabletop;
|
||||
|
||||
switch($action) {
|
||||
case "post":
|
||||
$submitbutton_text = "Blog this !";
|
||||
$toprow_title = "New Post";
|
||||
$form_action = "post";
|
||||
$form_extra = "";
|
||||
if ($use_pingback) {
|
||||
$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 />';
|
||||
} else {
|
||||
$form_pingback = '';
|
||||
}
|
||||
if ($use_trackback) {
|
||||
$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" />';
|
||||
} else {
|
||||
$form_trackback = '';
|
||||
}
|
||||
$colspan = 3;
|
||||
break;
|
||||
case "edit":
|
||||
$submitbutton_text ="Edit this !";
|
||||
$toprow_title = "Editing Post #".$postdata["ID"];
|
||||
$form_action = "editpost";
|
||||
$form_extra = "\" />\n<input type=\"hidden\" name=\"post_ID\" value=\"$post";
|
||||
$colspan = 2;
|
||||
$form_pingback = '<input type="hidden" name="post_pingback" value="0" />';
|
||||
$form_trackback = '';
|
||||
break;
|
||||
case "editcomment":
|
||||
$submitbutton_text ="Edit this !";
|
||||
$toprow_title = "Editing Comment #".$commentdata["comment_ID"];
|
||||
$form_action = "editedcomment";
|
||||
$form_extra = "\" />\n<input type=\"hidden\" name=\"comment_ID\" value=\"$comment\" />\n<input type=\"hidden\" name=\"comment_post_ID\" value=\"".$commentdata["comment_post_ID"];
|
||||
$colspan = 3;
|
||||
$form_pingback = '<input type="hidden" name="post_pingback" value="0" />';
|
||||
$form_trackback = '';
|
||||
break;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<form name="post" action="b2edit.php" method="POST">
|
||||
<input type="hidden" name="user_ID" value="<?php echo $user_ID ?>" />
|
||||
<input type="hidden" name="action" value="<?php echo $form_action.$form_extra ?>" />
|
||||
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<?php if ($action != "editcomment") {
|
||||
// this is for everything but comment editing
|
||||
?> <td>
|
||||
<table height="60" align="left" cellpadding="0" cellspacing="0">
|
||||
<td height="60" width="190">
|
||||
<label for="title"><b>Title :</b></label><br />
|
||||
<input type="text" name="post_title" size="20" tabindex="1" style="width: 170px;" value="<?php echo $edited_post_title; ?>" id="title" />
|
||||
</td>
|
||||
<td>
|
||||
<label for="category"><b>Category :</b></label><br /><?php dropdown_categories(); ?>
|
||||
</td>
|
||||
</table>
|
||||
<?php
|
||||
|
||||
} else {
|
||||
|
||||
// this is for comment editing
|
||||
?> <td colspan="2"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<label for="name"><b>Name :</b></label><br />
|
||||
<input type="text" name="newcomment_author" size="20" value="<?php echo format_to_edit($commentdata["comment_author"]) ?>" tabindex="1" id="name" /></td>
|
||||
<td>
|
||||
<label for="email"><b>E-mail :</b></label><br />
|
||||
<input type="text" name="newcomment_author_email" size="20" value="<?php echo format_to_edit($commentdata["comment_author_email"]) ?>" tabindex="2" id="email" /></td>
|
||||
<td>
|
||||
<label for="URL"><b>URL :</b></label><br />
|
||||
<input type="text" name="newcomment_author_url" size="20" value="<?php echo format_to_edit($commentdata["comment_author_url"]) ?>" tabindex="3" id="URL" />
|
||||
<?php
|
||||
|
||||
} // end else comment editing
|
||||
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="<?php echo $colspan; ?>">
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<td valign="bottom">
|
||||
<?php
|
||||
if ($action != 'editcomment') {
|
||||
echo '<label for="excerpt"><b>Excerpt :</b></label>';
|
||||
} else {
|
||||
echo '<br /><label for="content"><b>Comment :</b></label>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td valign="bottom" align="right"> </td>
|
||||
</table>
|
||||
|
||||
<textarea rows="3" cols="40" style="width:100%" name="excerpt" tabindex="4" wrap="virtual" id="excerpt"><?php echo $excerpt ?></textarea><br />
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
|
||||
<?php
|
||||
if ($action != 'editcomment') {
|
||||
echo '<label for="content"><b>Post :</b></label>';
|
||||
} else {
|
||||
echo '<br /><label for="content"><b>Comment :</b></label>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td valign="bottom" align="right">
|
||||
<?php if ($use_quicktags) include($b2inc.'/b2quicktags.php'); ?>
|
||||
</td>
|
||||
</table>
|
||||
|
||||
<textarea rows="9" cols="40" style="width:100%" name="content" tabindex="4" wrap="virtual" id="content"><?php echo $content ?></textarea><br />
|
||||
|
||||
<?php echo $form_pingback ?>
|
||||
|
||||
<?php if ($use_preview) { ?>
|
||||
<input type="button" value="preview" onclick="preview(this.form);" class="search" tabindex="8" />
|
||||
<?php } ?>
|
||||
|
||||
<input type="submit" name="submit" value="<?php echo $submitbutton_text ?>" class="search" style="font-weight: bold;" tabindex="5" />
|
||||
|
||||
|
||||
<?php if ( ($use_fileupload) && ($user_level >= $fileupload_minlevel) && ((ereg(" ".$user_login." ", $fileupload_allowedusers)) || (trim($fileupload_allowedusers)=="")) ) { ?>
|
||||
<input type="button" value="upload a file/image" onclick="launchupload();" class="search" tabindex="10" />
|
||||
<?php }
|
||||
|
||||
echo $form_trackback;
|
||||
|
||||
// if the level is 5+, allow user to edit the timestamp - not on 'new post' screen though
|
||||
#if (($user_level > 4) && ($action != "post"))
|
||||
if ($user_level > 4) {
|
||||
touch_time(($action=="edit"));
|
||||
}
|
||||
?>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
// document.blog.post_content.focus();
|
||||
//-->
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php echo $tablebottom ?>
|
||||
</form>
|
||||
@@ -1,412 +0,0 @@
|
||||
<?php
|
||||
|
||||
echo $tabletop;
|
||||
require_once('b2config.php');
|
||||
|
||||
if (!$posts) {
|
||||
if ($posts_per_page) {
|
||||
$posts=$posts_per_page;
|
||||
} else {
|
||||
$posts=10;
|
||||
$posts_per_page=$posts;
|
||||
}
|
||||
}
|
||||
|
||||
if ((!empty($poststart)) && (!empty($postend)) && ($poststart == $postend)) {
|
||||
$p=$poststart;
|
||||
$poststart=0;
|
||||
$postend=0;
|
||||
}
|
||||
|
||||
if (!$poststart) {
|
||||
$poststart=0;
|
||||
$postend=$posts;
|
||||
}
|
||||
|
||||
$nextXstart=$postend;
|
||||
$nextXend=$postend+$posts;
|
||||
|
||||
$previousXstart=($poststart-$posts);
|
||||
$previousXend=$poststart;
|
||||
if ($previousXstart < 0) {
|
||||
$previousXstart=0;
|
||||
$previousXend=$posts;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td valign="top" width="200">
|
||||
Show posts:
|
||||
</td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td colspan="2" align="center"><!-- show next/previous X posts -->
|
||||
<form name="previousXposts" method="get">
|
||||
<?php
|
||||
if ($previousXstart > 0) {
|
||||
?>
|
||||
<input type="hidden" name="poststart" value="<?php echo $previousXstart; ?>" />
|
||||
<input type="hidden" name="postend" value="<?php echo $previousXend; ?>" />
|
||||
<input type="submit" name="submitprevious" class="search" value="< <?php echo $posts ?>" />
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</form>
|
||||
</td>
|
||||
<td>
|
||||
<form name="nextXposts" method="get">
|
||||
<input type="hidden" name="poststart" value="<?php echo $nextXstart; ?>" />
|
||||
<input type="hidden" name="postend" value="<?php echo $nextXend; ?>" />
|
||||
<input type="submit" name="submitnext" class="search" value="<?php echo $posts ?> >" />
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="200"><!-- show X first/last posts -->
|
||||
<form name="showXfirstlastposts" method="get">
|
||||
<input type="text" name="posts" value="<?php echo $posts ?>" style="width:40px;" /?>
|
||||
<?php
|
||||
if (!isset($order))
|
||||
$order="DESC";
|
||||
$i = $order;
|
||||
if ($i == "DESC")
|
||||
$besp_selected = "selected";
|
||||
?>
|
||||
<select name="order">
|
||||
<option value="DESC" "<?= $besp_selected ?>">last posts</option>
|
||||
<?php
|
||||
$besp_selected = "";
|
||||
if ($i == "ASC")
|
||||
$besp_selected = "selected";
|
||||
?>
|
||||
<option value="ASC" "<?= $besp_selected?>">first posts</option>
|
||||
</select>
|
||||
<input type="submit" name="submitfirstlast" class="search" value="OK" />
|
||||
</form>
|
||||
</td>
|
||||
<td valign="top"><!-- show post X to post X -->
|
||||
<form name="showXfirstlastposts" method="get">
|
||||
<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;" /?>
|
||||
<select name="order">
|
||||
<?php
|
||||
$besp_selected = "";
|
||||
$i = $order;
|
||||
if ($i == "DESC")
|
||||
$besp_selected = "selected";
|
||||
?>
|
||||
<option value="DESC" "<?= $besp_selected ?>">from the end</option>
|
||||
<?php
|
||||
$besp_selected = "";
|
||||
if ($i == "ASC")
|
||||
$besp_selected = "selected";
|
||||
?> <option value="ASC" "<?= $besp_selected ?>">from the start</option>
|
||||
</select>
|
||||
<input type="submit" name="submitXtoX" class="search" value="OK" />
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php echo $tablebottom ?>
|
||||
|
||||
<br />
|
||||
|
||||
<?php echo $tabletop ?>
|
||||
<table width="100%">
|
||||
<td valign="top" width="33%">
|
||||
<form name="searchform" action="b2edit.php" method="get">
|
||||
<input type="hidden" name="a" value="s" />
|
||||
<input onFocus="this.value='';" onBlur="if (this.value=='') {this.value='search...';}" type="text" name="s" value="search..." size="7" style="width: 100px;" />
|
||||
<input type="submit" name="submit" value="search" class="search" />
|
||||
</form>
|
||||
</td>
|
||||
<td valign="top" width="33%" align="center">
|
||||
<form name="viewcat" action="b2edit.php" method="get">
|
||||
<select name="cat" style="width:140px;">
|
||||
<option value="all">All Categories</option>
|
||||
<?php
|
||||
$query="SELECT * FROM $tablecategories";
|
||||
$result=mysql_query($query);
|
||||
$querycount++;
|
||||
$width = ($mode=="sidebar") ? "100%" : "170px";
|
||||
while($row = mysql_fetch_object($result)) {
|
||||
echo "<option value=\"".$row->cat_ID."\"";
|
||||
if ($row->cat_ID == $postdata["Category"])
|
||||
echo " selected";
|
||||
echo ">".$row->cat_name."</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
<input type="submit" name="submit" value="View" class="search" />
|
||||
</form>
|
||||
</td>
|
||||
<td valign="top" width="33%" align="right">
|
||||
<form name="viewarc" action="b2edit.php" method="get">
|
||||
<?php
|
||||
|
||||
if ($archive_mode == "monthly") {
|
||||
echo "<select name=\"m\" style=\"width:120px;\">";
|
||||
$arc_sql="SELECT DISTINCT YEAR(post_date), MONTH(post_date) FROM $tableposts ORDER BY post_date DESC";
|
||||
$querycount++;
|
||||
$arc_result=mysql_query($arc_sql) or die($arc_sql."<br />".mysql_error());
|
||||
while($arc_row = mysql_fetch_array($arc_result)) {
|
||||
$arc_year = $arc_row["YEAR(post_date)"];
|
||||
$arc_month = $arc_row["MONTH(post_date)"];
|
||||
echo "<option value=\"$arc_year".zeroise($arc_month,2)."\">";
|
||||
echo $month[zeroise($arc_month,2)]." $arc_year";
|
||||
echo "</option>\n";
|
||||
}
|
||||
} elseif ($archive_mode == "daily") {
|
||||
echo "<select name=\"d\" style=\"width:120px;\">";
|
||||
$archive_day_date_format = "Y/m/d";
|
||||
$arc_sql="SELECT DISTINCT YEAR(post_date), MONTH(post_date), DAYOFMONTH(post_date) FROM $tableposts ORDER BY post_date DESC";
|
||||
$querycount++;
|
||||
$arc_result=mysql_query($arc_sql) or die($arc_sql."<br />".mysql_error());
|
||||
while($arc_row = mysql_fetch_array($arc_result)) {
|
||||
$arc_year = $arc_row["YEAR(post_date)"];
|
||||
$arc_month = $arc_row["MONTH(post_date)"];
|
||||
$arc_dayofmonth = $arc_row["DAYOFMONTH(post_date)"];
|
||||
echo "<option value=\"$arc_year".zeroise($arc_month,2).zeroise($arc_dayofmonth,2)."\">";
|
||||
echo mysql2date($archive_day_date_format, $arc_year.zeroise($arc_month,2).zeroise($arc_dayofmonth,2)." 00:00:00");
|
||||
echo "</option>\n";
|
||||
}
|
||||
} elseif ($archive_mode == "weekly") {
|
||||
echo "<select name=\"w\" style=\"width:120px;\">";
|
||||
if (!isset($start_of_week)) {
|
||||
$start_of_week = 1;
|
||||
}
|
||||
$archive_week_start_date_format = "Y/m/d";
|
||||
$archive_week_end_date_format = "Y/m/d";
|
||||
$archive_week_separator = " - ";
|
||||
$arc_sql="SELECT DISTINCT YEAR(post_date), MONTH(post_date), DAYOFMONTH(post_date), WEEK(post_date) FROM $tableposts ORDER BY post_date DESC";
|
||||
$querycount++;
|
||||
$arc_result=mysql_query($arc_sql) or die($arc_sql."<br />".mysql_error());
|
||||
$arc_w_last = '';
|
||||
while($arc_row = mysql_fetch_array($arc_result)) {
|
||||
$arc_year = $arc_row["YEAR(post_date)"];
|
||||
$arc_w = $arc_row["WEEK(post_date)"];
|
||||
if ($arc_w != $arc_w_last) {
|
||||
$arc_w_last = $arc_w;
|
||||
$arc_ymd = $arc_year."-".zeroise($arc_row["MONTH(post_date)"],2)."-" .zeroise($arc_row["DAYOFMONTH(post_date)"],2);
|
||||
$arc_week = get_weekstartend($arc_ymd, $start_of_week);
|
||||
$arc_week_start = date($archive_week_start_date_format, $arc_week['start']);
|
||||
$arc_week_end = date($archive_week_end_date_format, $arc_week['end']);
|
||||
echo "<option value=\"$arc_w\">";
|
||||
echo $arc_week_start.$archive_week_separator.$arc_week_end;
|
||||
echo "</option>\n";
|
||||
}
|
||||
}
|
||||
} elseif ($archive_mode == "postbypost") {
|
||||
echo '<input type="hidden" name="more" value="1" />';
|
||||
echo '<select name="p" style="width:120px;">';
|
||||
$requestarc = " SELECT ID,post_date,post_title FROM $tableposts ORDER BY post_date DESC";
|
||||
$querycount++;
|
||||
$resultarc = mysql_query($requestarc);
|
||||
while($row=mysql_fetch_object($resultarc)) {
|
||||
if ($row->post_date != "0000-00-00 00:00:00") {
|
||||
echo "<option value=\"".$row->ID."\">";
|
||||
if (strip_tags($row->post_title)) {
|
||||
echo strip_tags(stripslashes($row->post_title));
|
||||
} else {
|
||||
echo $row->ID;
|
||||
}
|
||||
echo "</option>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo "</select>";
|
||||
?>
|
||||
<input type="submit" name="submit" value="View" class="search" />
|
||||
</form>
|
||||
</td>
|
||||
|
||||
</table>
|
||||
<br />
|
||||
|
||||
<table cellspacing="0" cellpadding="5" border="0" width="100%">
|
||||
<?php
|
||||
// these lines are b2's "motor", do not alter nor remove them
|
||||
include("blog.header.php");
|
||||
|
||||
while($row = mysql_fetch_object($result)) {
|
||||
$posts_per_page = 10;
|
||||
start_b2(); ?>
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<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>
|
||||
<?php
|
||||
if (($user_level > $authordata[13]) or ($user_login == $authordata[1])) {
|
||||
echo " - <a href=\"b2edit.php?action=edit&post=".$postdata["ID"];
|
||||
if ($m)
|
||||
echo "&m=$m";
|
||||
echo "\">Edit</a>";
|
||||
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> ";
|
||||
}
|
||||
?>
|
||||
]
|
||||
<br />
|
||||
<font color="#999999"><b><a href="<?php permalink_single($blogfilename); ?>" title="permalink"><?php the_title() ?></a></b> by <b><?php the_author() ?> (<a href="javascript:profile(<?php the_author_ID() ?>)"><?php the_author_nickname() ?></a>)</b>, in <b><?php the_category() ?></b></font><br />
|
||||
<?php permalink_anchor(); ?>
|
||||
<?php
|
||||
if ($safe_mode)
|
||||
echo "<xmp>";
|
||||
the_excerpt();
|
||||
echo '<br />';
|
||||
if ($safe_mode)
|
||||
echo "</xmp>";
|
||||
?>
|
||||
<?php
|
||||
if ($safe_mode)
|
||||
echo "<xmp>";
|
||||
the_content();
|
||||
if ($safe_mode)
|
||||
echo "</xmp>";
|
||||
?>
|
||||
</p>
|
||||
<?php
|
||||
|
||||
// comments
|
||||
if (($withcomments) or ($c)) {
|
||||
|
||||
$queryc = "SELECT * FROM $tablecomments WHERE comment_post_ID = $id ORDER BY comment_date";
|
||||
$resultc = mysql_query($queryc);
|
||||
if ($resultc) {
|
||||
?>
|
||||
|
||||
<a name="comments"></a>
|
||||
<p><b><font color="#ff3300">::</font> comments</b></p>
|
||||
|
||||
<?php
|
||||
while($rowc = mysql_fetch_object($resultc)) {
|
||||
$commentdata = get_commentdata($rowc->comment_ID);
|
||||
?>
|
||||
|
||||
<!-- comment -->
|
||||
<p>
|
||||
<b><?php comment_author() ?> ( <?php comment_author_email_link() ?> / <?php comment_author_url_link() ?> )</b> (IP: <?php comment_author_IP() ?>)
|
||||
<br />
|
||||
<?php comment_text() ?>
|
||||
<br />
|
||||
<?php comment_date('Y/m/d') ?> @ <?php comment_time() ?><br />
|
||||
<?php
|
||||
if (($user_level > $authordata[13]) or ($user_login == $authordata[1])) {
|
||||
echo "[ <a href=\"b2edit.php?action=editcomment&comment=".$commentdata["comment_ID"]."\">Edit</a>";
|
||||
echo " - <a href=\"b2edit.php?action=deletecomment&p=".$postdata["ID"]."&comment=".$commentdata["comment_ID"]."\">Delete</a> ]";
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
<!-- /comment -->
|
||||
|
||||
|
||||
<?php //end of the loop, don't delete
|
||||
}
|
||||
|
||||
if ($comment_error)
|
||||
echo "<p><font color=\"red\">Error: please fill the required fields (name & comment)</font></p>";
|
||||
?>
|
||||
|
||||
<p><b><font color="#ff3300">::</font> leave a comment</b></p>
|
||||
|
||||
|
||||
<!-- form to add a comment -->
|
||||
|
||||
<form action="b2comments.post.php" method="post">
|
||||
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
|
||||
<input type="hidden" name="redirect_to" value="<?php echo $HTTP_SERVER_VARS["REQUEST_URI"]; ?>" />
|
||||
<input type="text" name="author" class="textarea" value="<?php echo $user_nickname ?>" size="20" tabindex="1" /><br />
|
||||
<input type="text" name="email" class="textarea" value="<?php echo $user_email ?>" size="20" tabindex="2" /><br />
|
||||
<input type="text" name="url" class="textarea" value="<?php echo $user_url ?>" size="20" tabindex="3" /><br />
|
||||
<textarea cols="40" rows="4" name="comment" tabindex="4" class="textarea">comment</textarea><br />
|
||||
<input type="checkbox" name="comment_autobr" value="1" checked tabindex="6" class="checkbox" /> Auto-BR (line-breaks become <br> tags)<br />
|
||||
<input type="submit" name="submit" class="buttonarea" value="ok" tabindex="5" />
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<!-- /form -->
|
||||
|
||||
|
||||
<?php // if you delete this the sky will fall on your head
|
||||
}
|
||||
}
|
||||
?>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<?php echo $tablebottom ?>
|
||||
<br />
|
||||
<?php echo $tabletop ?>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td valign="top" width="200">Show posts: </td>
|
||||
<td>
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td colspan="2" align="center"><!-- show next/previous X posts -->
|
||||
<form name="previousXposts" method="get"><?php
|
||||
if ($previousXstart > -1) {
|
||||
?>
|
||||
<input type="hidden" name="poststart" value="<?php echo $previousXstart; ?>" />
|
||||
<input type="hidden" name="postend" value="<?php echo $previousXend; ?>" />
|
||||
<input type="submit" name="submitprevious" class="search" value="< Previous <?php echo $posts ?>" /><?php
|
||||
}
|
||||
?>
|
||||
</form>
|
||||
</td>
|
||||
<td>
|
||||
<form name="nextXposts" method="get">
|
||||
<input type="hidden" name="poststart" value="<?php echo $nextXstart; ?>" />
|
||||
<input type="hidden" name="postend" value="<?php echo $nextXend; ?>" />
|
||||
<input type="submit" name="submitnext" class="search" value="Next <?php echo $posts ?> >" />
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="200"><!-- show X first/last posts -->
|
||||
<form name="showXfirstlastposts" method="get">
|
||||
<input type="text" name="posts" value="<?php echo $posts ?>" style="width:40px;" /?>
|
||||
<select name="order"> <option value="DESC" <?php
|
||||
$i = $order;
|
||||
if ($i == "DESC")
|
||||
echo " selected";
|
||||
?>>last posts</option>
|
||||
<option value="ASC" <?php
|
||||
if ($i == "ASC")
|
||||
echo " selected";
|
||||
?>>first posts</option>
|
||||
</select> <input type="submit" name="submitfirstlast" class="search" value="OK" />
|
||||
</form>
|
||||
</td>
|
||||
<td valign="top"><!-- show post X to post X -->
|
||||
<form name="showXfirstlastposts" method="get">
|
||||
<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;" /?> <select name="order">
|
||||
<option value="DESC" <?php
|
||||
$i = $order;
|
||||
if ($i == "DESC")
|
||||
echo " selected";
|
||||
?>>from the end</option>
|
||||
<option value="ASC" <?php
|
||||
if ($i == "ASC")
|
||||
echo " selected";
|
||||
?>>from the start</option>
|
||||
</select> <input type="submit" name="submitXtoX" class="search" value="OK" />
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php echo $tablebottom ?>
|
||||
@@ -1,23 +0,0 @@
|
||||
</div>
|
||||
</td></table>
|
||||
<?php
|
||||
if ($debug=="1") {
|
||||
echo "<p>$querycount queries - ".number_format(timer_stop(),3)." seconds";
|
||||
}
|
||||
?>
|
||||
<p> </p>
|
||||
<div align="center" style="width: 100%" class="tabletoprow"><strong><a href="http://wordpress.org">WordPress</a></strong> <?php echo $b2_version ?> <a href="http://wordpress.org/support/">Support Forums</a></div>
|
||||
|
||||
<!-- this is for the spellchecker -->
|
||||
<form name="SPELLDATA"><div>
|
||||
<input name="formname" type="hidden" value="">
|
||||
<input name="messagebodyname" type="hidden" value="">
|
||||
<input name="subjectname" type="hidden" value="">
|
||||
<input name="companyID" type="hidden" value="">
|
||||
<input name="language" type="hidden" value="">
|
||||
<input name="opener" type="hidden" value="">
|
||||
<input name="formaction" type="hidden" value="">
|
||||
</div></form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,30 +0,0 @@
|
||||
<h1 id="wphead"><a href="http://wordpress.org" rel="external"><span>WordPress</span></a></h1>
|
||||
<ul id="adminmenu">
|
||||
<li><a href="b2edit.php"><strong>Post / Edit</strong></a></li>
|
||||
<li><a href="javascript:profile(<?php echo $user_ID ?>)">My Profile</a></li>
|
||||
<li><a href="b2team.php">Team</a></li>
|
||||
<?php
|
||||
|
||||
if ($pagenow != "b2profile.php") {
|
||||
|
||||
$menu = file($b2inc."/b2menutop.txt");
|
||||
$i=0;
|
||||
$j=$menu[0];
|
||||
while ($j != "") {
|
||||
$k = explode("\t",$j);
|
||||
if ($user_level >= $k[0]) {
|
||||
echo "\n<li><a href='".$k[1]."'>".trim($k[2]).'</a></li>';
|
||||
}
|
||||
$i=$i+1;
|
||||
$j=$menu[$i];
|
||||
if (trim($j) == "***")
|
||||
$j="";
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
<li><a href="<?php echo $siteurl."/".$blogfilename; ?>">View site</a></li>
|
||||
<li><a href="b2login.php?action=logout">Logout</a></li>
|
||||
</ul>
|
||||
|
||||
<h2><?php echo $title; ?></h2>
|
||||
@@ -1,15 +0,0 @@
|
||||
3 b2options.php Options
|
||||
3 b2categories.php Categories
|
||||
3 b2template.php Template
|
||||
5 linkmanager.php Manage Links
|
||||
***
|
||||
(Everything after the '***' is a comment.)
|
||||
|
||||
|
||||
To add sections to the menu, use this syntax:
|
||||
|
||||
the minimum level the user needs to access the section: between 0 and 10
|
||||
+tab
|
||||
+the URL of the section's file
|
||||
+tab
|
||||
+the title of this section
|
||||
@@ -1,190 +0,0 @@
|
||||
// b2 quick tags
|
||||
// - authorized adaptation of the 'bbCode control code' by subBlue design ( www.subBlue.com )
|
||||
|
||||
// Define the quick tags
|
||||
bbcode = new Array();
|
||||
bbtags = new Array('<strong>','</strong>','<em>','</em>','<u>','</u>','<del>','</del>','<blockquote>','</blockquote>','<p>','</p>','<li>','</li>','<img src="" border="0" alt="" />','','<a href="">','</a>');
|
||||
imageTag = false;
|
||||
|
||||
// Replacement for arrayname.length property
|
||||
function getarraysize(thearray) {
|
||||
for (i = 0; i < thearray.length; i++) {
|
||||
if ((thearray[i] == "undefined") || (thearray[i] == "") || (thearray[i] == null))
|
||||
return i;
|
||||
}
|
||||
return thearray.length;
|
||||
}
|
||||
|
||||
// Replacement for arrayname.push(value) not implemented in IE until version 5.5
|
||||
// Appends element to the array
|
||||
function arraypush(thearray,value) {
|
||||
thearray[ getarraysize(thearray) ] = value;
|
||||
}
|
||||
|
||||
// Replacement for arrayname.pop() not implemented in IE until version 5.5
|
||||
// Removes and returns the last element of an array
|
||||
function arraypop(thearray) {
|
||||
thearraysize = getarraysize(thearray);
|
||||
retval = thearray[thearraysize - 1];
|
||||
delete thearray[thearraysize - 1];
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
function checkForm(formObj) {
|
||||
|
||||
formErrors = false;
|
||||
|
||||
if (formObj.content.value.length < 2) {
|
||||
formErrors = "You must enter a message!";
|
||||
}
|
||||
|
||||
if (formErrors) {
|
||||
alert(formErrors);
|
||||
return false;
|
||||
} else {
|
||||
bbstyle(formObj, -1);
|
||||
//formObj.preview.disabled = true;
|
||||
//formObj.submit.disabled = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function emoticon(theSmilie) {
|
||||
if ((parseInt(navigator.appVersion) >= 4) && (navigator.appName == "Microsoft Internet Explorer"))
|
||||
theSelection = document.selection.createRange().text; // Get text selection
|
||||
|
||||
if (theSelection) {
|
||||
// Add tags around selection
|
||||
document.selection.createRange().text = theSelection + theSmilie + ' ';
|
||||
formObj.content.focus();
|
||||
theSelection = '';
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
document.post.content.value += ' ' + theSmilie + ' ';
|
||||
document.post.content.focus();
|
||||
}
|
||||
|
||||
|
||||
function bbfontstyle(formObj, bbopen, bbclose) {
|
||||
if ((parseInt(navigator.appVersion) >= 4) && (navigator.appName == "Microsoft Internet Explorer")) {
|
||||
theSelection = document.selection.createRange().text;
|
||||
if (!theSelection) {
|
||||
formObj.content.value += bbopen + bbclose;
|
||||
formObj.content.focus();
|
||||
return;
|
||||
}
|
||||
document.selection.createRange().text = bbopen + theSelection + bbclose;
|
||||
formObj.content.focus();
|
||||
return;
|
||||
} else {
|
||||
formObj.content.value += bbopen + bbclose;
|
||||
formObj.content.focus();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function bbstyle(formObj, bbnumber) {
|
||||
|
||||
donotinsert = false;
|
||||
theSelection = false;
|
||||
bblast = 0;
|
||||
|
||||
if (bbnumber == -1) { // Close all open tags & default button names
|
||||
while (bbcode[0]) {
|
||||
butnumber = arraypop(bbcode) - 1;
|
||||
formObj.content.value += bbtags[butnumber + 1];
|
||||
buttext = eval('formObj.addbbcode' + butnumber + '.value');
|
||||
eval('formObj.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"');
|
||||
}
|
||||
formObj.content.focus();
|
||||
return;
|
||||
}
|
||||
|
||||
if ((parseInt(navigator.appVersion) >= 4) && (navigator.appName == "Microsoft Internet Explorer"))
|
||||
theSelection = document.selection.createRange().text; // Get text selection
|
||||
|
||||
if (theSelection) {
|
||||
// Add tags around selection
|
||||
document.selection.createRange().text = bbtags[bbnumber] + theSelection + bbtags[bbnumber+1];
|
||||
formObj.content.focus();
|
||||
theSelection = '';
|
||||
return;
|
||||
}
|
||||
|
||||
// Find last occurance of an open tag the same as the one just clicked
|
||||
for (i = 0; i < bbcode.length; i++) {
|
||||
if (bbcode[i] == bbnumber+1) {
|
||||
bblast = i;
|
||||
donotinsert = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (donotinsert) { // Close all open tags up to the one just clicked & default button names
|
||||
while (bbcode[bblast]) {
|
||||
butnumber = arraypop(bbcode) - 1;
|
||||
formObj.content.value += bbtags[butnumber + 1];
|
||||
buttext = eval('formObj.addbbcode' + butnumber + '.value');
|
||||
eval('formObj.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"');
|
||||
imageTag = false;
|
||||
}
|
||||
formObj.content.focus();
|
||||
return;
|
||||
} else { // Open tags
|
||||
|
||||
if (imageTag && (bbnumber != 14)) { // Close image tag before adding another
|
||||
formObj.content.value += bbtags[15];
|
||||
lastValue = arraypop(bbcode) - 1; // Remove the close image tag from the list
|
||||
formObj.addbbcode14.value = "image"; // Return button back to normal state
|
||||
imageTag = false;
|
||||
}
|
||||
|
||||
// Open tag
|
||||
formObj.content.value += bbtags[bbnumber];
|
||||
if ((bbnumber == 14) && (imageTag == false)) imageTag = 1; // Check to stop additional tags after an unclosed image tag
|
||||
arraypush(bbcode,bbnumber+1);
|
||||
eval('formObj.addbbcode'+bbnumber+'.value += "*"');
|
||||
formObj.content.focus();
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// swirlee's bblink hack, slightly corrected
|
||||
function bblink(formObj, bbnumber) {
|
||||
current_url = prompt("URL:","http://");
|
||||
var re = new RegExp ('http%3A//', 'gi') ;
|
||||
var current_url = current_url.replace(re, 'http://') ;
|
||||
if((current_url == 'null') || (current_url == "http://")) {
|
||||
current_url = "";
|
||||
exit;
|
||||
}
|
||||
if(bbnumber == 16) {
|
||||
current_link_text = unescape(prompt("Link text:","link"));
|
||||
if((current_link_text == null) || (current_link_text == "") || (current_link_text == "link")) {
|
||||
link_text = 'link';
|
||||
} else {
|
||||
link_text = current_link_text;
|
||||
}
|
||||
final_link = '<a href="' + current_url + '">' + current_link_text + '</a>';
|
||||
if (final_link != '<a href="">null</a>') {
|
||||
formObj.content.value += final_link;
|
||||
}
|
||||
}
|
||||
if(bbnumber == 14) {
|
||||
current_alt = prompt("ALTernate text:","ALT");
|
||||
if((current_alt == null) || (current_alt == "") || (current_alt == "ALT")) {
|
||||
alttag = ' alt=""';
|
||||
} else {
|
||||
alttag = ' alt="' + current_alt + '"';
|
||||
}
|
||||
final_image = '<img src="' + current_url + '" border="0"' + alttag + ' />';
|
||||
if (final_image != '<img src="" border="0" alt="" />') {
|
||||
formObj.content.value += final_image;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
<script src="<?php echo $b2inc ?>/b2quicktags.js" language="JavaScript" type="text/javascript">
|
||||
</script><table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr align="center" valign="middle">
|
||||
<td>
|
||||
<input type="button" class="quicktags" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onClick="bbstyle(this.form,0)" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="button" class="quicktags" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px" onClick="bbstyle(this.form,2)" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="button" class="quicktags" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px" onClick="bbstyle(this.form,4)" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="button" class="quicktags" accesskey="s" name="addbbcode6" value="strike" style="text-decoration: line-through;width: 50px" onClick="bbstyle(this.form,6)" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="button" class="quicktags" accesskey="p" name="addbbcode10" value="<p>" style="width: 40px" onClick="bbstyle(this.form,10)" />
|
||||
</td>
|
||||
<?php if (basename($HTTP_SERVER_VARS["SCRIPT_FILENAME"]) != "b2bookmarklet.php") { ?><td>
|
||||
<input type="button" class="quicktags" accesskey="l" name="addbbcode12" value="<li>" style="width: 40px" onClick="bbstyle(this.form,12)" />
|
||||
</td><?php } ?>
|
||||
<?php if (basename($HTTP_SERVER_VARS["SCRIPT_FILENAME"]) != "b2bookmarklet.php") { ?><td>
|
||||
<input type="button" class="quicktags" accesskey="q" name="addbbcode8" value="b-quote" style="width: 60px" onClick="bbstyle(this.form,8)" />
|
||||
</td><?php } ?>
|
||||
<td>
|
||||
<input type="button" class="quicktags" accesskey="m" name="addbbcode14" value="image" title="insert an image" style="width: 40px" onClick="bblink(this.form,14)" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="button" class="quicktags" accesskey="h" name="addbbcode16" value="link" title="insert a link" style="text-decoration: underline; width: 40px" onClick="bblink(this.form,16)" />
|
||||
</td><td>
|
||||
<input type="button" class="quicktags" accesskey="c" name="closetags" value="X" title="Close all tags" style="width: 30px; font-weigh: bolder;" onClick="bbstyle(document.post,-1)" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -130,7 +130,7 @@ $b2_htmltranswinuni = array(
|
||||
# these are used for b2's interface design
|
||||
$tabletop = "\t<table cellspacing=\"0\" cellpadding=\"1\" width=\"85%\" border=\"0\" bgcolor=\"#cccccc\" align=\"center\">\n\t<td align=\"left\">\n\t\t<table cellspacing=\"0\" cellpadding=\"15\" width=\"100%\" border=\"0\"bgcolor=\"#ffffff\" align=\"center\">\n\t\t<td align=\"left\">\n";
|
||||
$tablebottom = "\t\t</td>\n\t</table>\n\t</td>\n\t</table>\n";
|
||||
$blankline = '<img src="b2-img/blank.gif" width="10" height="5" border="0" /><br />';
|
||||
$blankline = '<img src="../b2-img/blank.gif" width="10" height="5" border="0" /><br />';
|
||||
|
||||
# on which page are we ?
|
||||
$PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF'];
|
||||
|
||||
Reference in New Issue
Block a user