diff --git a/wp-admin/b2categories.php b/wp-admin/b2categories.php new file mode 100644 index 0000000000..d5aa31d820 --- /dev/null +++ b/wp-admin/b2categories.php @@ -0,0 +1,176 @@ + */ + +function add_magic_quotes($array) { + foreach ($array as $k => $v) { + if (is_array($v)) { + $array[$k] = add_magic_quotes($v); + } else { + $array[$k] = addslashes($v); + } + } + return $array; +} + +if (!get_magic_quotes_gpc()) { + $HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS); + $HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS); + $HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS); +} + +$b2varstoreset = array('action','standalone','cat'); +for ($i=0; $i$cat_name"); + + header("Location: b2categories.php"); + +break; + +case "Delete": + + $standalone = 1; + require_once("./b2header.php"); + + $cat_ID = $HTTP_POST_VARS["cat_ID"]; + $cat_name=get_catname($cat_ID); + $cat_name=addslashes($cat_name); + + if ($cat_ID=="1") + die("Can't delete the $cat_name category: this is the default one"); + + if ($user_level < 3) + die ("Cheatin' uh ?"); + + $query="DELETE FROM $tablecategories WHERE cat_ID=\"$cat_ID\""; + $result=mysql_query($query) or die("Couldn't delete category $cat_name".mysql_error()); + + $query="UPDATE $tableposts SET post_category='1' WHERE post_category='$cat_ID'"; + $result=mysql_query($query) or die("Couldn't reset category on posts where category was $cat_name"); + + header("Location: b2categories.php"); + +break; + +case "Rename": + + require_once ("./b2header.php"); + $cat_name=get_catname($HTTP_POST_VARS["cat_ID"]); + $cat_name=addslashes($cat_name); + ?> + + +

Old name:

+

+

+ New name:
+ + " /> +
+ +
+ + + $cat_name: ".mysql_error()); + + header("Location: b2categories.php"); + +break; + +default: + + $standalone=0; + require_once ("./b2header.php"); + if ($user_level < 3) { + die("You have no right to edit the categories for this blog.
Ask for a promotion to your blog admin :)"); + } + ?> + + + + + + +
+
+ Edit a category:
+ \n"; + while($row = mysql_fetch_object($result)) { + echo "\t\n"; + } + echo "\n"; + ?>
+ + +
+

+

+ Add a category:
+

+ +
+
+ + +
+ + + Note:
+ Deleting a category does not delete posts from that category.
It will just set them back to the default category . + + + */ +include("b2footer.php"); ?> \ No newline at end of file diff --git a/wp-admin/b2edit.form.php b/wp-admin/b2edit.form.php new file mode 100644 index 0000000000..4be4792137 --- /dev/null +++ b/wp-admin/b2edit.form.php @@ -0,0 +1,150 @@ +
'; + } else { + $form_pingback = ''; + } + if ($use_trackback) { + $form_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\n\n + +
+ + + + + + + + + + + + + + + + +
+ + + +
+
+ +
+
+
+
 
+
+ " tabindex="1" id="name" />
+
+ " tabindex="2" id="email" />
+
+ " tabindex="3" id="URL" /> + +
+ + + +
+Excerpt :'; +} else { + echo '
'; +} +?> +
 
+ +
+ + +Post :'; +} else { + echo '
'; +} +?> + + +
+ +
+ +
+ + + + + + + + + + += $fileupload_minlevel) && ((ereg(" ".$user_login." ", $fileupload_allowedusers)) || (trim($fileupload_allowedusers)=="")) ) { ?> + + 4) && ($action != "post")) +if ($user_level > 4) { + touch_time(($action=="edit")); +} +?> + +
+ +
diff --git a/wp-admin/b2edit.php b/wp-admin/b2edit.php new file mode 100644 index 0000000000..91db68c0f8 --- /dev/null +++ b/wp-admin/b2edit.php @@ -0,0 +1,349 @@ + */ + +function add_magic_quotes($array) { + foreach ($array as $k => $v) { + if (is_array($v)) { + $array[$k] = add_magic_quotes($v); + } else { + $array[$k] = addslashes($v); + } + } + return $array; +} + +if (!get_magic_quotes_gpc()) { + $HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS); + $HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS); + $HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS); +} + +$b2varstoreset = array('action','safe_mode','withcomments','c','posts','poststart','postend','content','edited_post_title','comment_error','profile', 'trackback_url', 'excerpt'); +for ($i=0; $i 4) && (!empty($HTTP_POST_VARS["edit_date"]))) { + $aa = $HTTP_POST_VARS["aa"]; + $mm = $HTTP_POST_VARS["mm"]; + $jj = $HTTP_POST_VARS["jj"]; + $hh = $HTTP_POST_VARS["hh"]; + $mn = $HTTP_POST_VARS["mn"]; + $ss = $HTTP_POST_VARS["ss"]; + $jj = ($jj > 31) ? 31 : $jj; + $hh = ($hh > 23) ? $hh - 24 : $hh; + $mn = ($mn > 59) ? $mn - 60 : $mn; + $ss = ($ss > 59) ? $ss - 60 : $ss; + $now = "$aa-$mm-$jj $hh:$mn:$ss"; + } else { + $now = date("Y-m-d H:i:s",(time() + ($time_difference * 3600))); + } + + $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."')"; + $result = mysql_query($query) or mysql_oops($query); + + $post_ID = mysql_insert_id(); + + if (isset($sleep_after_edit) && $sleep_after_edit > 0) { + sleep($sleep_after_edit); + } + + rss_update($blog_ID); + pingWeblogs($blog_ID); + pingCafelog($cafelogID, $post_title, $post_ID); + pingBlogs($blog_ID); + if ($post_pingback) { + pingback($content, $post_ID); + } + + if (!empty($HTTP_POST_VARS['trackback_url'])) { + $excerpt = (strlen(strip_tags($content)) > 255) ? substr(strip_tags($content), 0, 252).'...' : strip_tags($content); + $excerpt = stripslashes($excerpt); + $trackback_urls = explode(',', $HTTP_POST_VARS['trackback_url']); + foreach($trackback_urls as $tb_url) { + $tb_url = trim($tb_url); + trackback($tb_url, stripslashes($post_title), $excerpt, $post_ID); + } + } + + if (!empty($HTTP_POST_VARS["mode"])) { + switch($HTTP_POST_VARS["mode"]) { + case "bookmarklet": + $location="b2bookmarklet.php?a=b"; + break; + case "sidebar": + $location="b2sidebar.php?a=b"; + break; + default: + $location="b2edit.php"; + break; + } + } else { + $location="b2edit.php"; + } + header("Location: $location"); + exit(); + +break; + +case "edit": + + $standalone=0; + require_once ("./b2header.php"); + $post = $HTTP_GET_VARS["post"]; + if ($user_level > 0) { + $postdata=get_postdata($post) or die("Oops, no post with this ID. Go back !"); + $authordata = get_userdata($postdata["Author_ID"]); + if ($user_level < $authordata[13]) + die ("You don't have the right to edit ".$authordata[1]."'s posts."); + + $content = $postdata["Content"]; + $content = format_to_edit($content); + $excerpt = $postdata["Excerpt"]; + $excerpt = format_to_edit($excerpt); + $edited_post_title = format_to_edit($postdata["Title"]); + + echo $blankline; + include("b2edit.form.php"); + + } else { + ?> + +

Since you're a newcomer, you'll have to wait for an admin to raise your level to 1, in order to be authorized to post.
You can also e-mail the admin to ask for a promotion.
When you're promoted, just reload this page and you'll be able to blog. :)

+ + 4) && (!empty($HTTP_POST_VARS["edit_date"]))) { + $aa = $HTTP_POST_VARS["aa"]; + $mm = $HTTP_POST_VARS["mm"]; + $jj = $HTTP_POST_VARS["jj"]; + $hh = $HTTP_POST_VARS["hh"]; + $mn = $HTTP_POST_VARS["mn"]; + $ss = $HTTP_POST_VARS["ss"]; + $jj = ($jj > 31) ? 31 : $jj; + $hh = ($hh > 23) ? $hh - 24 : $hh; + $mn = ($mn > 59) ? $mn - 60 : $mn; + $ss = ($ss > 59) ? $ss - 60 : $ss; + $datemodif = ", post_date=\"$aa-$mm-$jj $hh:$mn:$ss\""; + } else { + $datemodif = ""; + } + + $query = "UPDATE $tableposts SET post_content=\"$content\", post_excerpt=\"$excerpt\", post_title=\"$post_title\", post_category=\"$post_category\"".$datemodif." WHERE ID=$post_ID"; + $result = mysql_query($query) or mysql_oops($query); + + if (isset($sleep_after_edit) && $sleep_after_edit > 0) { + sleep($sleep_after_edit); + } + + rss_update($blog_ID); +// pingWeblogs($blog_ID); + + $location = "Location: b2edit.php"; + header ($location); + +break; + +case "delete": + + $standalone = 1; + require_once("./b2header.php"); + + if ($user_level == 0) + die ("Cheatin' uh ?"); + + $post = $HTTP_GET_VARS['post']; + $postdata=get_postdata($post) or die("Oops, no post with this ID. Go back !"); + $authordata = get_userdata($postdata["Author_ID"]); + + if ($user_level < $authordata[13]) + die ("You don't have the right to delete ".$authordata[1]."'s posts."); + + $query = "DELETE FROM $tableposts WHERE ID=$post"; + $result = mysql_query($query) or die("Oops, no post with this ID. Go back !"); + if (!$result) + die("Error in deleting... contact the webmaster..."); + + $query = "DELETE FROM $tablecomments WHERE comment_post_ID=$post"; + $result = mysql_query($query) or die("Oops, no comment associated to that post. Go back !"); + + if (isset($sleep_after_edit) && $sleep_after_edit > 0) { + sleep($sleep_after_edit); + } + + rss_update($blog_ID); +// pingWeblogs($blog_ID); + + header ("Location: b2edit.php"); + +break; + +case "editcomment": + + $standalone=0; + require_once ("./b2header.php"); + + get_currentuserinfo(); + + if ($user_level == 0) { + die ("Cheatin' uh ?"); + } + + $comment = $HTTP_GET_VARS['comment']; + $commentdata = get_commentdata($comment,1) or die("Oops, no comment with this ID. Go back !"); + $content = $commentdata["comment_content"]; + $content = format_to_edit($content); + + echo $blankline; + include("b2edit.form.php"); + +break; + +case "deletecomment": + + $standalone = 1; + require_once("./b2header.php"); + + if ($user_level == 0) + die ("Cheatin' uh ?"); + + $comment = $HTTP_GET_VARS['comment']; + $p = $HTTP_GET_VARS['p']; + $commentdata=get_commentdata($comment) or die("Oops, no comment with this ID. Go back !"); + + $query = "DELETE FROM $tablecomments WHERE comment_ID=$comment"; + $result = mysql_query($query) or die("Oops, no comment with this ID. Go back !"); + + header ("Location: b2edit.php?p=$p&c=1#comments"); //?a=dc"); + +break; + +case "editedcomment": + + $standalone = 1; + require_once("./b2header.php"); + + if ($user_level == 0) + die ("Cheatin' uh ?"); + + $comment_ID = $HTTP_POST_VARS['comment_ID']; + $comment_post_ID = $HTTP_POST_VARS['comment_post_ID']; + $newcomment_author = $HTTP_POST_VARS['newcomment_author']; + $newcomment_author_email = $HTTP_POST_VARS['newcomment_author_email']; + $newcomment_author_url = $HTTP_POST_VARS['newcomment_author_url']; + $newcomment_author = addslashes($newcomment_author); + $newcomment_author_email = addslashes($newcomment_author_email); + $newcomment_author_url = addslashes($newcomment_author_url); + $post_autobr = $HTTP_POST_VARS["post_autobr"]; + + if (($user_level > 4) && (!empty($HTTP_POST_VARS["edit_date"]))) { + $aa = $HTTP_POST_VARS["aa"]; + $mm = $HTTP_POST_VARS["mm"]; + $jj = $HTTP_POST_VARS["jj"]; + $hh = $HTTP_POST_VARS["hh"]; + $mn = $HTTP_POST_VARS["mn"]; + $ss = $HTTP_POST_VARS["ss"]; + $jj = ($jj > 31) ? 31 : $jj; + $hh = ($hh > 23) ? $hh - 24 : $hh; + $mn = ($mn > 59) ? $mn - 60 : $mn; + $ss = ($ss > 59) ? $ss - 60 : $ss; + $datemodif = ", comment_date=\"$aa-$mm-$jj $hh:$mn:$ss\""; + } else { + $datemodif = ""; + } + $content = balanceTags($content); + $content = format_to_post($content); + + $query = "UPDATE $tablecomments SET comment_content=\"$content\", comment_author=\"$newcomment_author\", comment_author_email=\"$newcomment_author_email\", comment_author_url=\"$newcomment_author_url\"".$datemodif." WHERE comment_ID=$comment_ID"; + $result = mysql_query($query) or mysql_oops($query); + + header ("Location: b2edit.php?p=$comment_post_ID&c=1#comments"); //?a=ec"); + +break; + +default: + + $standalone=0; + require_once ("./b2header.php"); + + if ($user_level > 0) { + if ((!$withcomments) && (!$c)) { + + $action="post"; + include("b2edit.form.php"); + echo "

"; + + } + + } else { + + echo $tabletop; ?> +

Since you're a newcomer, you'll have to wait for an admin to raise your level to 1, in order to be authorized to post.
You can also e-mail the admin to ask for a promotion.
When you're promoted, just reload this page and you'll be able to blog. :)

+
"; + + } + + include("b2edit.showposts.php"); + +} + + +/* */ +include("b2footer.php"); +?> \ No newline at end of file diff --git a/wp-admin/b2edit.showposts.php b/wp-admin/b2edit.showposts.php new file mode 100644 index 0000000000..1e56b9f9a0 --- /dev/null +++ b/wp-admin/b2edit.showposts.php @@ -0,0 +1,412 @@ + + + + + + + + + + + +
+ Show posts: + + + + + + +
+
+ 0) { +?> + + + + +
+
+
+ + + +
+
+
+
+ + +   + +
+
+
+  to   +   + +
+
+ + +
+ + + + + + + +
+
+ + + +
+
+
+ + +
+
+
+ "; + $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."
".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 "\n"; + } + } elseif ($archive_mode == "daily") { + echo ""; + 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."
".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 "\n"; + } + } + } elseif ($archive_mode == "postbypost") { + echo ''; + echo '"; + ?> + +
+
+
+ + + + + + + +
+

+ [ + $authordata[13]) or ($user_login == $authordata[1])) { + echo " - Edit"; + echo " - post_title."\'\\n \'Cancel\' to stop, \'OK\' to delete.')\">Delete "; + } + ?> + ] +
+ by (), in
+ + "; + the_excerpt(); + echo '
'; + if ($safe_mode) + echo ""; + ?> + "; + the_content(); + if ($safe_mode) + echo ""; + ?> +

+ + + +

:: comments

+ + comment_ID); + ?> + + +

+ ( / ) (IP: ) +
+ +
+ @
+ $authordata[13]) or ($user_login == $authordata[1])) { + echo "[ Edit"; + echo " - Delete ]"; + } + ?> +

+ + + + Error: please fill the required fields (name & comment)

"; + ?> + +

:: leave a comment

+ + + + +
+ + " /> +
+
+
+
+ Auto-BR (line-breaks become <br> tags)
+ + +
+ + + + + + +
+
+ +
+ + + + + + + + + + +
Show posts: + + + + + +
+
-1) { +?> + + + +
+
+
+ + + +
+
+
+
+ +   +
+
+
+  to    +
+
+ \ No newline at end of file diff --git a/wp-admin/b2footer.php b/wp-admin/b2footer.php new file mode 100644 index 0000000000..e4d5db3e42 --- /dev/null +++ b/wp-admin/b2footer.php @@ -0,0 +1,23 @@ + + +$querycount queries - ".number_format(timer_stop(),3)." seconds"; +} +?> +

 

+ + + +
+ + + + + + + +
+ + + \ No newline at end of file diff --git a/wp-admin/b2header.php b/wp-admin/b2header.php new file mode 100644 index 0000000000..07b2c4f145 --- /dev/null +++ b/wp-admin/b2header.php @@ -0,0 +1,159 @@ +posts_per_page; + $what_to_show=$row->what_to_show; + $archive_mode=$row->archive_mode; + $time_difference=$row->time_difference; + $autobr=$row->AutoBR; + $date_format=stripslashes($row->date_format); + $time_format=stripslashes($row->time_format); +} + +// let's deactivate quicktags on IE Mac and Lynx, because they don't work there. +if (($is_macIE) || ($is_lynx)) + $use_quicktags=0; + +$b2varstoreset = array('profile','standalone','redirect','redirect_url','a','popuptitle','popupurl','text', 'trackback', 'pingback'); +for ($i=0; $i + + +wordpress > <?php echo $title; ?> + + + + + + + + + + + + + + + + + + +
+ +
+
+ \ No newline at end of file diff --git a/wp-admin/b2install.php b/wp-admin/b2install.php new file mode 100644 index 0000000000..8715650e63 --- /dev/null +++ b/wp-admin/b2install.php @@ -0,0 +1,102 @@ + + +b2 > Installation + + + +$msg

"; + echo "

query:
$sql

"; + echo "

error:
$error

"; + die(); +} + +$connexion = mysql_connect($server,$loginsql,$passsql) or die("Can't connect to the database
".mysql_error()); +$dbconnexion = mysql_select_db($base, $connexion); + +if (!$dbconnexion) { + echo mysql_error(); + die(); +} + +echo "Now creating the necessary tables in the database...

"; + + +# Note: if you want to start again with a clean b2 database, +# just remove the // in this file + +// $query = "DROP TABLE IF EXISTS $tableposts"; +// $q = mysql_query($query) or die ("doh, can't drop the table \"$tableposts\" in the database."); + +$query = "CREATE TABLE $tableposts ( ID int(10) unsigned NOT NULL auto_increment, post_author int(4) DEFAULT '0' NOT NULL, post_date datetime DEFAULT '0000-00-00 00:00:00' NOT NULL, post_content text NOT NULL, post_title text NOT NULL, post_category int(4) DEFAULT '0' NOT NULL, post_karma int(11) DEFAULT '0' NOT NULL, PRIMARY KEY (ID), UNIQUE ID (ID) )"; +$q = mysql_query($query) or mysql_doh("doh, can't create the table \"$tableposts\" in the database.", $query, mysql_error()); + +$now = date('Y-m-d H:i:s'); +$query = "INSERT INTO $tableposts (post_author, post_date, post_content, post_title, post_category) VALUES ('1', '$now', 'This is the first post. Edit or delete it, then start blogging !', 'Hello world !', '1')"; +$q = mysql_query($query) or mysql_doh("doh, can't insert a first post in the table \"$tableposts\" in the database.", $query, mysql_error()); + +echo "posts: OK
"; + +// $query = "DROP TABLE IF EXISTS $tablecategories"; +// $q = mysql_query($query) or mysql_doh("doh, can't drop the table \"$tablecategories\" in the database."); + +$query="CREATE TABLE $tablecategories (cat_ID int(4) NOT NULL auto_increment, cat_name TINYTEXT not null , KEY (cat_ID))"; +$q = mysql_query($query) or mysql_doh("doh, can't create the table \"$tablecategories\" in the database.", $query, mysql_error()); + +$query = "INSERT INTO $tablecategories (cat_ID, cat_name) VALUES ('0', 'General')"; +$q = mysql_query($query) or mysql_doh("doh, can't set the default category in the table \"$tablecategories\" in the database.", $query, mysql_error()); + +$query = "UPDATE $tableposts SET post_category=\"1\""; +$result = mysql_query($query) or mysql_doh("Oops, can't set the default category on $tableposts.", $query, mysql_error()); + +echo "b2categories: OK
"; + +// $query = "DROP TABLE IF EXISTS $tablecomments"; +// $q = mysql_query($query) or mysql_doh("doh, can't drop the table \"$tablecomments\" in the database."); + +$query = "CREATE TABLE $tablecomments ( comment_ID int(11) unsigned NOT NULL auto_increment, comment_post_ID int(11) DEFAULT '0' NOT NULL, comment_author tinytext NOT NULL, comment_author_email varchar(100) NOT NULL, comment_author_url varchar(100) NOT NULL, comment_author_IP varchar(100) NOT NULL, comment_date datetime DEFAULT '0000-00-00 00:00:00' NOT NULL, comment_content text NOT NULL, comment_karma int(11) DEFAULT '0' NOT NULL, PRIMARY KEY (comment_ID) )"; +$q = mysql_query($query) or mysql_doh("doh, can't create the table \"$tablecomments\" in the database.", $query, mysql_error()); + +$now = date('Y-m-d H:i:s'); +$query = "INSERT INTO $tablecomments (comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_content) VALUES ('1', 'miss b2', 'missb2@example.com', 'http://example.com', '127.0.0.1', '$now', 'Hi, this is a comment.
To delete a comment, just log in, and view the posts\' comments, there you will have the option to edit or delete them.')"; +$q = mysql_query($query) or mysql_doh("doh, can't insert a first comment in the table \"$tablecomments\" in the database.", $query, mysql_error()); + +echo "comments: OK
"; + +// $query = "DROP TABLE IF EXISTS $tablesettings"; +// $q = mysql_query($query) or mysql_doh("doh, can't drop the table \"$tablesettings\" in the database."); + +$query = "CREATE TABLE $tablesettings ( ID tinyint(3) DEFAULT '1' NOT NULL, posts_per_page int(4) unsigned DEFAULT '7' NOT NULL, what_to_show varchar(5) DEFAULT 'days' NOT NULL, archive_mode varchar(10) DEFAULT 'weekly' NOT NULL, time_difference tinyint(4) DEFAULT '0' NOT NULL, AutoBR tinyint(1) DEFAULT '1' NOT NULL, time_format varchar(20) DEFAULT 'H:i:s' NOT NULL, date_format varchar(20) DEFAULT 'Y/m/d' NOT NULL, PRIMARY KEY (ID), KEY ID (ID) )"; +$q = mysql_query($query) or mysql_doh("doh, can't create the table \"$tablesettings\" in the database.", $query, mysql_error()); + +$query = "INSERT INTO $tablesettings ( ID, posts_per_page, what_to_show, archive_mode, time_difference, AutoBR, time_format, date_format) VALUES ( '1', '20', 'posts', 'monthly', '0', '1', 'H:i:s', 'd.m.y')"; +$q = mysql_query($query) or mysql_doh("doh, can't set the default settings in the table \"$tablesettings\" in the database.", $query, mysql_error()); + +echo "settings: OK
"; + +// $query = "DROP TABLE IF EXISTS $tableusers"; +// $q = mysql_query($query) or mysql_doh("doh, can't drop the table \"$tableusers\" in the database."); + +$query = "CREATE TABLE $tableusers ( ID int(10) unsigned NOT NULL auto_increment, user_login varchar(20) NOT NULL, user_pass varchar(20) NOT NULL, user_firstname varchar(50) NOT NULL, user_lastname varchar(50) NOT NULL, user_nickname varchar(50) NOT NULL, user_icq int(10) unsigned DEFAULT '0' NOT NULL, user_email varchar(100) NOT NULL, user_url varchar(100) NOT NULL, user_ip varchar(15) NOT NULL, user_domain varchar(200) NOT NULL, user_browser varchar(200) NOT NULL, dateYMDhour datetime DEFAULT '0000-00-00 00:00:00' NOT NULL, user_level int(2) unsigned DEFAULT '0' NOT NULL, user_aim varchar(50) NOT NULL, user_msn varchar(100) NOT NULL, user_yim varchar(50) NOT NULL, user_idmode varchar(20) NOT NULL, PRIMARY KEY (ID), UNIQUE ID (ID), UNIQUE (user_login) )"; +$q = mysql_query($query) or mysql_doh("doh, can't create the table \"$tableusers\" in the database.", $query, mysql_error()); + +$random_password = substr(md5(uniqid(microtime())),0,6); + +$query = "INSERT INTO $tableusers (ID, user_login, user_pass, user_firstname, user_lastname, user_nickname, user_icq, user_email, user_url, user_ip, user_domain, user_browser, dateYMDhour, user_level, user_aim, user_msn, user_yim, user_idmode) VALUES ( '1', 'admin', '$random_password', '', '', 'admin', '0', '$admin_email', '', '127.0.0.1', '127.0.0.1', '', '00-00-0000 00:00:01', '10', '', '', '', 'nickname')"; +$q = mysql_query($query) or mysql_doh("doh, can't set the default user in the table \"$tableusers\" in the database.", $query, mysql_error()); + +echo "users: OK
"; +?> + +
+Installation successful !
+
+Now you can log in with the login "admin" and password "".

+
+Note that password carefully ! It is a random password that is given to you when you install b2. If you lose it, you will have to delete the tables from the database yourself, and re-install b2. + + + \ No newline at end of file diff --git a/wp-admin/b2menutop.php b/wp-admin/b2menutop.php new file mode 100644 index 0000000000..308381a3cf --- /dev/null +++ b/wp-admin/b2menutop.php @@ -0,0 +1,30 @@ +

WordPress

+ + +

diff --git a/wp-admin/b2options.php b/wp-admin/b2options.php new file mode 100644 index 0000000000..b2951681d6 --- /dev/null +++ b/wp-admin/b2options.php @@ -0,0 +1,193 @@ + $v) { + if (is_array($v)) { + $array[$k] = add_magic_quotes($v); + } else { + $array[$k] = addslashes($v); + } + } + return $array; +} + +if (!get_magic_quotes_gpc()) { + $HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS); + $HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS); + $HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS); +} + +$b2varstoreset = array('action','standalone'); +for ($i=0; $iwebmaster !

".mysql_errno().": ".mysql_error(); + die ($oops); + } + + header ("Location: b2options.php"); + +break; + +default: + + $standalone=0; + include ("./b2header.php"); + if ($user_level <= 3) { + die("You have no right to edit the options for this blog.
Ask for a promotion to your blog admin :)"); + } + ?> + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Show:" size="3"> +
Archive mode:
Time difference: + if you're not on the timezone of your server
Date format: + (note)
Time format: + (note)
 
+ +
+ +
+ +
+

+About Date & Time formats: +

+

You can format the date & time in many ways, using the PHP syntax.
+ As quoted from the PHP manual, here are the letters you can use:
+

+
+ The following characters are recognized in the format string:
+ a - "am" or "pm"
+ A - "AM" or "PM"
+ B - Swatch Internet time
+ d - day of the month, 2 digits with leading zeros; i.e. "01" to "31"
+ D - day of the week, textual, 3 letters; i.e. "Fri"
+ F - month, textual, long; i.e. "January"
+ g - hour, 12-hour format without leading zeros; i.e. "1" to "12"
+ G - hour, 24-hour format without leading zeros; i.e. "0" to "23"
+ h - hour, 12-hour format; i.e. "01" to "12"
+ H - hour, 24-hour format; i.e. "00" to "23"
+ i - minutes; i.e. "00" to "59"
+ I (capital i) - "1" if Daylight Savings Time, "0" otherwise.
+ j - day of the month without leading zeros; i.e. "1" to "31"
+ l (lowercase 'L') - day of the week, textual, long; i.e. "Friday"
+ L - boolean for whether it is a leap year; i.e. "0" or "1"
+ m - month; i.e. "01" to "12"
+ M - month, textual, 3 letters; i.e. "Jan"
+ n - month without leading zeros; i.e. "1" to "12"
+ r - RFC 822 formatted date; i.e. "Thu, 21 Dec 2000 16:01:07 +0200" (added in PHP 4.0.4)
+ s - seconds; i.e. "00" to "59"
+ S - English ordinal suffix, textual, 2 characters; i.e. "th", "nd"
+ t - number of days in the given month; i.e. "28" to "31"
+ T - Timezone setting of this machine; i.e. "MDT"
+ U - seconds since the epoch
+ w - day of the week, numeric, i.e. "0" (Sunday) to "6" (Saturday)
+ Y - year, 4 digits; i.e. "1999"
+ y - year, 2 digits; i.e. "99"
+ z - day of the year; i.e. "0" to "365"
+ Z - timezone offset in seconds (i.e. "-43200" to "43200"). The offset for timezones west of UTC is always negative, and for those east of UTC is always positive.
+
+ Unrecognized characters in the format string will be printed as-is. +
+ +

For more information and examples, check the PHP manual on this + page.

+
+ \ No newline at end of file diff --git a/wp-admin/b2profile.php b/wp-admin/b2profile.php new file mode 100644 index 0000000000..95ecf50846 --- /dev/null +++ b/wp-admin/b2profile.php @@ -0,0 +1,468 @@ + */ + +function add_magic_quotes($array) { + foreach ($array as $k => $v) { + if (is_array($v)) { + $array[$k] = add_magic_quotes($v); + } else { + $array[$k] = addslashes($v); + } + } + return $array; +} + +if (!get_magic_quotes_gpc()) { + $HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS); + $HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS); + $HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS); +} + +$b2varstoreset = array('action','standalone','redirect','profile','user'); +for ($i=0; $iERROR: please enter your nickname (can be the same as your login)"); + return false; + } + + /* if the ICQ UIN has been entered, check to see if it has only numbers */ + if (!empty($HTTP_POST_VARS["newuser_icq"])) { + if ((ereg("^[0-9]+$",$HTTP_POST_VARS["newuser_icq"]))==false) { + die ("ERROR: your ICQ UIN can only be a number, no letters allowed"); + return false; + } + } + + /* checking e-mail address */ + if (empty($HTTP_POST_VARS["newuser_email"])) { + die ("ERROR: please type your e-mail address"); + return false; + } else if (!is_email($HTTP_POST_VARS["newuser_email"])) { + die ("ERROR: the email address isn't correct"); + return false; + } + + if ($HTTP_POST_VARS["pass1"] == "") { + if ($HTTP_POST_VARS["pass2"] != "") + die ("ERROR: you typed your new password only once. Go back to type it twice."); + $updatepassword = ""; + } else { + if ($HTTP_POST_VARS["pass2"] == "") + die ("ERROR: you typed your new password only once. Go back to type it twice."); + if ($HTTP_POST_VARS["pass1"] != $HTTP_POST_VARS["pass2"]) + die ("ERROR: you typed two different passwords. Go back to correct that."); + $newuser_pass = $HTTP_POST_VARS["pass1"]; + $updatepassword = "user_pass='$newuser_pass', "; + setcookie("cafelogpass",md5($newuser_pass),time()+31536000); + } + + $newuser_firstname=addslashes($HTTP_POST_VARS["newuser_firstname"]); + $newuser_lastname=addslashes($HTTP_POST_VARS["newuser_lastname"]); + $newuser_nickname=addslashes($HTTP_POST_VARS["newuser_nickname"]); + $newuser_icq=addslashes($HTTP_POST_VARS["newuser_icq"]); + $newuser_aim=addslashes($HTTP_POST_VARS["newuser_aim"]); + $newuser_msn=addslashes($HTTP_POST_VARS["newuser_msn"]); + $newuser_yim=addslashes($HTTP_POST_VARS["newuser_yim"]); + $newuser_email=addslashes($HTTP_POST_VARS["newuser_email"]); + $newuser_url=addslashes($HTTP_POST_VARS["newuser_url"]); + $newuser_idmode=addslashes($HTTP_POST_VARS["newuser_idmode"]); + + $query = "UPDATE $tableusers SET user_firstname='$newuser_firstname', ".$updatepassword."user_lastname='$newuser_lastname', user_nickname='$newuser_nickname', user_icq='$newuser_icq', user_email='$newuser_email', user_url='$newuser_url', user_aim='$newuser_aim', user_msn='$newuser_msn', user_yim='$newuser_yim', user_idmode='$newuser_idmode' WHERE ID = $user_ID"; + $result = mysql_query($query); + if ($result==false) { + die ("ERROR: couldn't update your profile... please contact the webmaster !

$query

".mysql_error()); + } + + ?> + + + Profile updated !
+ If that window doesn't close itself, close it yourself :p + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
login
first name
last name
nickname
email
URL
ICQ 0) { echo make_clickable("icq:".$profiledata["user_icq"]); } ?>
AIM
MSN IM
YahooIM
+ +
+ + + + + + + + + + + + + + +
+ ID
+ level +
+ posts + +
+ identity
+ +
+ +
+ +
+ + + + + + +
+ +

To have a one-click bookmarklet, just copy and paste this
into a new text file:

+ +
+

Save it as b2.reg, and double-click on this file in an Explorer
+ window. Answer Yes to the question, and restart Internet Explorer.

+ That's it, you can now right-click in an IE window and select
+ 'Post to b2' to make the bookmarklet appear :)

+ +

+

+ +
+

+
+ + +
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
login
first name" class="postform" />
last name" class="postform" />
nickname" class="postform" />
email" class="postform" />
URL" class="postform" />
ICQ 0) { echo $profiledata["user_icq"]; } ?>" class="postform" />
AIM" class="postform" />
MSN IM" class="postform" />
YahooIM" class="postform" />
+ +
+ + + + + + + + + + + + + + + + + + 0) { +?> + + +
+ ID
+ level +
+ posts + +
+ identity on the blog:
+ +
+
+ new password (twice)
+
+ +

bookmarklet
add the link to your Favorites/Bookmarks
+ +b2 - + +b2 - + + + +

+One-click bookmarklet:
+click here + + +b2 - + +b2 - + +

+ +SideBar
+Add the b2 Sidebar ! + +

+SideBar
+Add this link to your favorites:
b2 Sidebar. + +
+


Note: closes the popup window.
+ +
+ */ +include("b2footer.php") ?> \ No newline at end of file diff --git a/wp-admin/b2quicktags.php b/wp-admin/b2quicktags.php new file mode 100644 index 0000000000..a0d57b157d --- /dev/null +++ b/wp-admin/b2quicktags.php @@ -0,0 +1,33 @@ + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/wp-admin/b2spell.php b/wp-admin/b2spell.php new file mode 100644 index 0000000000..59c568a7da --- /dev/null +++ b/wp-admin/b2spell.php @@ -0,0 +1,97 @@ + +Loading Spell Checker + + + +
+ +

Loading Spell Checker. Please wait

+ + + + + + + + + +

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+ + +
+ + diff --git a/wp-admin/b2team.php b/wp-admin/b2team.php new file mode 100644 index 0000000000..2039402ffd --- /dev/null +++ b/wp-admin/b2team.php @@ -0,0 +1,212 @@ + */ + +$b2varstoreset = array('action','standalone','redirect','profile'); +for ($i=0; $i + + + + + +
Click on an user's login name to see his/her complete Profile.
+ To edit your Profile, click on your login name.
+ +
+ +

Active users + + + + + + + + + 3) { ?> + + + + 0 ORDER BY ID"; + $result = mysql_query($request); + while($row = mysql_fetch_object($result)) { + $user_data = get_userdata2($row->ID); + echo "\n\n"; + $email = $user_data["user_email"]; + $url = $user_data["user_url"]; + $bg1 = ($user_data["user_login"] == $user_login) ? "style=\"background-image: url('b2-img/b2button.gif');\"" : "bgcolor=\"#dddddd\""; + $bg2 = ($user_data["user_login"] == $user_login) ? "style=\"background-image: url('b2-img/b2button.gif');\"" : "bgcolor=\"#eeeeee\""; + echo "\n"; + echo "\n"; + echo "\n"; + echo ""; + echo "\n"; + echo "\n"; + if ($user_level > 3) { + echo "\n"; + } + echo "\n"; + } + + ?> + +
IDNicknameNameE-mailURLLevelLogin
".$user_data["ID"]."".$user_data["user_nickname"]."".$user_data["user_firstname"]." ".$user_data["user_lastname"]." \"e-mail:  "; + if (($user_data["user_url"] != "http://") and ($user_data["user_url"] != "")) + echo "\"website: "; + echo "".$user_data["user_level"]; + if (($user_level >= 2) and ($user_level > ($user_data["user_level"] + 1))) + echo " + "; + if (($user_level >= 2) and ($user_level > $user_data["user_level"]) and ($user_data["user_level"] > 0)) + echo " - "; + echo "".$user_data["user_login"]."
+

+ + +
+ +

Inactive users (level 0) + + + + + + + + + 3) { ?> + + + + ID); + echo "\n\n"; + $email = $user_data["user_email"]; + $url = $user_data["user_url"]; + $bg1 = ($user_data["user_login"] == $user_login) ? "style=\"background-image: url('b2-img/b2button.gif');\"" : "bgcolor=\"#dddddd\""; + $bg2 = ($user_data["user_login"] == $user_login) ? "style=\"background-image: url('b2-img/b2button.gif');\"" : "bgcolor=\"#eeeeee\""; + echo "\n"; + echo "\n"; + echo "\n"; + echo ""; + echo "\n"; + echo "\n"; + if ($user_level > 3) { + echo "\n"; + } + echo "\n"; + } + + ?> + +
IDNicknameNameE-mailURLLevelLogin
".$user_data["ID"]."".$user_data["user_nickname"]."".$user_data["user_firstname"]." ".$user_data["user_lastname"]." \"e-mail:  "; + if (($user_data["user_url"] != "http://") and ($user_data["user_url"] != "")) + echo "\"website: "; + echo "".$user_data["user_level"]; + if ($user_level >= 2) + echo " + "; + if ($user_level >= 3) + echo " X "; + echo "".$user_data["user_login"]."
+

+ + + = 3) { ?> +
+ + To delete an user, bring his/her level to zero, then click on the red cross.
+ Warning: deleting an user also deletes all posts made by this user. + + */ +include("b2footer.php") ?> \ No newline at end of file diff --git a/wp-admin/b2template.php b/wp-admin/b2template.php new file mode 100644 index 0000000000..7ddaf9be86 --- /dev/null +++ b/wp-admin/b2template.php @@ -0,0 +1,156 @@ + */ + +function add_magic_quotes($array) { + foreach ($array as $k => $v) { + if (is_array($v)) { + $array[$k] = add_magic_quotes($v); + } else { + $array[$k] = addslashes($v); + } + } + return $array; +} + +if (!get_magic_quotes_gpc()) { + $HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS); + $HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS); + $HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS); +} + +$b2varstoreset = array('action','standalone','redirect','profile','error','warning','a','file'); +for ($i=0; $iAsk for a promotion to your blog admin :)"); + } + + $newcontent = stripslashes($HTTP_POST_VARS["newcontent"]); + $file = $HTTP_POST_VARS["file"]; + $f = fopen($file,"w+"); + fwrite($f,$newcontent); + fclose($f); + + header("Location: b2template.php?file=$file&a=te"); + exit(); + +break; + +default: + + include("./b2header.php"); + + if ($user_level <= 3) { + die("You have no right to edit the template for this blog.
Ask for a promotion to your blog admin :)"); + } + + if ($file=="") { + if ($blogfilename != "") { + $file = $blogfilename; + } else { + $file = "b2.php"; + } + } + + if (substr($file,0,2) == "..") + die ("Sorry, can't edit files that are up one directory or more."); + + if (substr($file,1,1) == ":") + die ("Sorry, can't call files with their real path."); + + if (substr($file,0,1) == "/") + $file = ".".$file; + + if (!is_file($file)) + $error = 1; + + $file = stripslashes($file); + + if ((substr($file,0,2) == "b2") and (substr($file,-4,4) == ".php") and ($file != "b2.php")) + $warning = " - this is a b2 file, be careful when editing it !"; + + if (!$error) { + $f = fopen($file,"r"); + $content = fread($f,filesize($file)); +// $content = template_simplify($content); + $content = htmlspecialchars($content); +// $content = str_replace(" + + + +
+ $file".$warning; + if ($a == "te") + echo " [ file edited ! ]"; + + if (!$error) { + ?> +
+ + + +
+ "; + } else { + echo ""; + } + ?> +
+ oops, no such file !

"; + } + echo $tablebottom; + ?> +
+
+ + You can also edit the comments' template or the popup comments' template, or edit any other file (provided it's writable by the server, e.g. CHMOD 766).
+
+ To edit a file, type its name here: +
+ + +
+
+ Note: of course, you can also edit the files/templates in your text editor and upload them. This online editor is only meant to be used when you don't have access to a text editor... + + + + + */ +include("b2footer.php") ?> \ No newline at end of file diff --git a/wp-admin/b2upload.php b/wp-admin/b2upload.php new file mode 100644 index 0000000000..da0d70bf91 --- /dev/null +++ b/wp-admin/b2upload.php @@ -0,0 +1,250 @@ + + +b2 > upload images/files + + + + + + + + + + + + + + +
+ +

File upload

+

You can upload files of type:

+

The maximum size of the file should be:
KB

+
+ + +

+ Description:
+ +

+ +
+
+ + + + + + +

Duplicate File?

+

The filename '' already exists!

+

filename '' moved to ''

+

Confirm or rename:

+
+ + + + + Alternate name:

+
+ Description:
+
+ +
+
+ + + +

File uploaded !

+

Your file was uploaded successfully !

+

Here's the code to display it:

+

+ +
+ +
+

+

Image Details:
+name: + +
+size: + KB +
+type: + +

+

+

+ +
+

+ + + + + + + + \ No newline at end of file diff --git a/wp-admin/linkcategories.php b/wp-admin/linkcategories.php new file mode 100644 index 0000000000..43ec2b41b3 --- /dev/null +++ b/wp-admin/linkcategories.php @@ -0,0 +1,208 @@ +$cat_name".mysql_error()); + + header("Location: linkcategories.php"); + break; + } // end addcat + case "Delete": + { + $standalone = 1; + include_once("./b2header.php"); + include_once("./links.php"); + + $cat_id = $HTTP_POST_VARS["cat_id"]; + $cat_name=get_linkcatname($cat_id); + $cat_name=addslashes($cat_name); + + if ($cat_id=="1") + die("Can't delete the $cat_name link category: this is the default one"); + + if ($user_level < $minadminlevel) + die ("Cheatin' uh ?"); + + $query="DELETE FROM $tablelinkcategories WHERE cat_id=\"$cat_id\""; + $result=mysql_query($query) or die("Couldn't delete link category $cat_name".mysql_error()); + + $query="UPDATE $tablelinks SET link_category=1 WHERE link_category='$cat_id'"; + $result=mysql_query($query) or die("Couldn't reset category on links where category was $cat_name"); + + header("Location: linkcategories.php"); + break; + } // end delete + case "Edit": + { + include_once ("./b2header.php"); + include_once("./links.php"); + $cat_id = $HTTP_POST_VARS["cat_id"]; + $cat_name=get_linkcatname($cat_id); + $cat_name=addslashes($cat_name); + $auto_toggle=get_autotoggle($cat_id); +?> + + +

Old name:

+

+

+ New name:
+ + " /> +
+ /> auto-toggle?
+ +
+

+ +$cat_name: ".$query.mysql_error()); + + header("Location: linkcategories.php"); + break; + } // end edit + default: + { + $standalone=0; + include_once ("./b2header.php"); + if ($user_level < $minadminlevel) { + die("You have no right to edit the link categories for this blog.
Ask for a promotion to your blog admin :)"); + } +?> + + + + + + + + + +
Link Categories:
+
+ Edit a link category:
+\n"; + while($row = mysql_fetch_object($result)) { + echo " \n"; + } + echo " \n"; +?> +

+ + +
+
+ + + Add a link category:
+
+ +   auto-toggle?

+ +
+
+ + + + + + Note:
+ Deleting a link category does not delete links from that category.
It will + just set them back to the default category . + + + + + + + diff --git a/wp-admin/linkmanager.php b/wp-admin/linkmanager.php new file mode 100644 index 0000000000..0a88c6e63e --- /dev/null +++ b/wp-admin/linkmanager.php @@ -0,0 +1,567 @@ + $v) { + if (is_array($v)) { + $array[$k] = add_magic_quotes($v); + } else { + $array[$k] = addslashes($v); + } + } + return $array; +} + +if (!get_magic_quotes_gpc()) { + $HTTP_GET_VARS = add_magic_quotes($HTTP_GET_VARS); + $HTTP_POST_VARS = add_magic_quotes($HTTP_POST_VARS); + $HTTP_COOKIE_VARS = add_magic_quotes($HTTP_COOKIE_VARS); +} + +$b2varstoreset = array('action','standalone','cat_id', 'linkurl', 'name', 'image', + 'description', 'visible', 'target', 'category', 'link_id', + 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel'); +for ($i=0; $iAsk for a promotion to your blog admin :)"); + } + + $sql = "SELECT link_url, link_name, link_image, link_target, link_description, link_visible, link_category AS cat_id, link_rating, link_rel " . + " FROM $tablelinks " . + " WHERE link_id = $link_id"; + + $result = mysql_query($sql) or die("Couldn't execute query.".mysql_error()); + if ($row = mysql_fetch_object($result)) { + $link_url = $row->link_url; + $link_name = stripslashes($row->link_name); + $link_image = $row->link_image; + $link_target = $row->link_target; + $link_category = $row->cat_id; + $link_description = stripslashes($row->link_description); + $link_visible = $row->link_visible; + $link_rating = $row->link_rating; + $link_rel = stripslashes($row->link_rel); + } + +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Edit a link:
URL:
Display Name/Alt text:
Image:
Description:
Rel:
Rating: +  (Leave at 0 for no rating.) +
Target: value="_blank">_blank  value="_top">_top
Visible: value="Y">Y  value="N">N
Category: +\n"; + while($row = mysql_fetch_object($result)) { + echo " \n"; + } + echo " \n"; +?> +
+   +
+ +Ask for a promotion to your blog admin :)"); + } + + switch ($order_by) + { + case 'order_name': $sqlorderby = 'name'; break; + case 'order_url': $sqlorderby = 'url'; break; + case 'order_desc': $sqlorderby = 'description'; break; + case 'order_owner': $sqlorderby = 'owner'; break; + case 'order_rating': $sqlorderby = 'rating'; break; + case 'order_id': //fall through + default: $sqlorderby = 'id'; break; + } + + if ($action != "popup") { +?> + + + + + + + + + + + + + + +
Link Categories:Manage Link Categories
+ Show links in category:
+
+ Order by: +
+\n"; + echo " \n"; + while($row = mysql_fetch_object($result)) { + echo " \n"; + } + echo " \n"; +?> + + + + +
+ + + + + + + + + + + + + + + + + + + + + +link_url); + if (strlen($short_url) > 35) { + $short_url = substr($short_url, 0, 32).'...'; + } + echo("\n"); + echo(" \n"); + echo(" \n"); + if ($row->link_image != null) { + echo(" \n"); + } else { + echo(" \n"); + } + if ($row->link_visible == 'Y') { + echo(" \n"); + } else { + echo(" \n"); + } + echo(" \n"); + echo(" \n"); + echo(" \n"); + echo("\n"); + + echo("\n"); + echo(" \n"); + echo(" \n"); + $my_rel = stripslashes($row->link_rel); + if ($my_rel == '') { + $my_rel = ' '; + } + echo(" \n"); + echo(" \n"); + echo(" \n"); + echo(" \n"); + echo("\n"); + } +?> + +
URLNameImg?Vis?Category  
link_url."\">".$short_url."".stripslashes($row->link_name)."YNYN".stripslashes($row->category)."link_id'; forms['links'].action.value='linkedit'; \" value=\"Edit\" class=\"search\" />link_id'; forms['links'].action.value='Delete'; return confirm('You are about to delete this link.\\n \'Cancel\' to stop, \'OK\' to delete.'); \" value=\"Delete\" class=\"search\" />
Desc: ".stripslashes($row->link_description)."Rel:$my_relRating: ".$row->link_rating."Owner:".$row->user_login."
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Add a link:
URL:
Display Name/Alt text:
Image:
Description:
Rel:
Rating: +  (Leave at 0 for no rating.) +
Target:_blank _top
Visible:N
Category: +\n"; + while($row = mysql_fetch_object($result)) { + echo " \n"; + } + echo " \n"; +?> +
+ +
+ + + + + +