From c5b475e13b3e1332600e33e5f8fbe2058f3038d0 Mon Sep 17 00:00:00 2001
From: Matt Mullenweg
+
+
+ (category: )
+Pages: ","
","number") ?>
+
+posted by @
+
+
+
+
Old 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.
+
+
+
+ Add a category: |
+
+ + comment_ID); ?> + + + + +
+
+
+
+
+ @
+
+ + + + + + +
No Comment on this post so far.
+ + + ++ + + + + + + + +
+ + + \ No newline at end of file diff --git a/b2comments.post.php b/b2comments.post.php new file mode 100644 index 0000000000..c5f01794c4 --- /dev/null +++ b/b2comments.post.php @@ -0,0 +1,137 @@ + $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); +} + +$author = trim($HTTP_POST_VARS["author"]); +$email = trim($HTTP_POST_VARS["email"]); +$url = trim($HTTP_POST_VARS["url"]); +$comment = trim($HTTP_POST_VARS["comment"]); +$original_comment = $comment; +$comment_autobr = $HTTP_POST_VARS["comment_autobr"]; +$comment_post_ID = $HTTP_POST_VARS["comment_post_ID"]; + +if ($require_name_email && ($email == "" || $email == "@" || $author == "" || $author == "name")) { //original fix by Dodo, and then Drinyth + echo "Error: please fill the required fields (name, email)"; + exit; +} +if ($comment == "comment" || $comment == "") { + echo "Error: please type a comment"; + exit; +} + +$user_ip = $HTTP_SERVER_VARS['REMOTE_ADDR']; +$user_domain = gethostbyaddr($user_ip); +$time_difference = get_settings("time_difference"); +$now = date("Y-m-d H:i:s",(time() + ($time_difference * 3600))); + +$author = strip_tags($author); +$email = strip_tags($email); +if (strlen($email) < 6) { + $email = ''; +} +$url = trim(strip_tags($url)); +$url = ((!stristr($url, '://')) && ($url != '')) ? 'http://'.$url : $url; +if (strlen($url) < 7) { + $url = ''; +} +$comment = strip_tags($comment, $comment_allowed_tags); +$comment = balanceTags($comment, 1); +$comment = convert_chars($comment); +$comment = format_to_post($comment); + +$comment_author = $author; +$comment_author_email = $email; +$comment_author_url = $url; + +$author = addslashes($author); +$email = addslashes($email); +$url = addslashes($url); + +/* flood-protection */ +$query = "SELECT * FROM $tablecomments WHERE comment_author_IP='$user_ip' ORDER BY comment_date DESC LIMIT 1"; +$result = mysql_query($query); +$ok=1; +if (!empty($result)) { + while($row = mysql_fetch_object($result)) { + $then=$row->comment_date; + } + $time_lastcomment=mysql2date("U","$then"); + $time_newcomment=mysql2date("U","$now"); + if (($time_newcomment - $time_lastcomment) < 30) + $ok=0; +} +/* end flood-protection */ + +if ($ok) { + + $query = "INSERT INTO $tablecomments VALUES ('0','$comment_post_ID','$author','$email','$url','$user_ip','$now','$comment','0')"; + $result = mysql_query($query); + if (!$result) + die ("There is an error with the database, it can't store your comment...
+[powered by b2.] +
+ + + + \ No newline at end of file diff --git a/b2config.php b/b2config.php new file mode 100644 index 0000000000..15ad079376 --- /dev/null +++ b/b2config.php @@ -0,0 +1,352 @@ + tag? 1=yes, 0=no +$rss_encoded_html = 0; + +# length (in words) of excerpts in the RSS feed? 0=unlimited +# note: in b2rss.php, this will be set to 0 if you use encoded HTML +$rss_excerpt_length = 50; + + + +// ** Weblogs.com ping ** + +# set this to 1 if you want your site to be listed on http://weblogs.com when you add a new post +$use_weblogsping = 0; + + +// ** Blo.gs ping ** + +# set this to 1 if you want your site to be listed on http://blo.gs when you add a new post +$use_blodotgsping = 0; + +# if you ping blo.gs, this is the URL that will be sent to it (enter your blog's URL): +$blodotgsping_url = 'http://example.com'; + + + +// ** Trackback / PingBack ** + +# set this to 0 or 1, whether you want to allow your posts to be trackback'able or not +# note: setting it to zero would also disable sending trackbacks +$use_trackback = 0; + +# set this to 0 or 1, whether you want to allow your posts to be pingback'able or not +# note: setting it to zero would also disable sending pingbacks +$use_pingback = 0; + + + +// ** Comments options ** + +# set this to 1 to require e-mail and name, or 0 to allow comments without e-mail/name +$require_name_email = 0; + +# here is a list of the tags that are allowed in the comments. +# you can add tags to the list, just add them in the string, +# add only the opening tag: for example, only '' instead of '' + +$comment_allowed_tags = '
';
+
+# set this to 1 to let every author be notified about comments on their posts
+$comments_notify = 0;
+
+
+
+// ** Smilies options **
+
+# set this to 1 to enable smiley conversion in posts
+# (note: this makes smiley conversion in ALL posts)
+$use_smilies = 0;
+
+# the directory where your smilies are (no trailing slash)
+$smilies_directory = 'http://example.com/b2-img/smilies';
+
+# here's the conversion table, you can modify it if you know what you're doing
+$b2smiliestrans = array(
+ ':)' => 'icon_smile.gif',
+ ':D' => 'icon_biggrin.gif',
+ ':-D' => 'icon_biggrin.gif',
+ ':grin:' => 'icon_biggrin.gif',
+ ':)' => 'icon_smile.gif',
+ ':-)' => 'icon_smile.gif',
+ ':smile:' => 'icon_smile.gif',
+ ':(' => 'icon_sad.gif',
+ ':-(' => 'icon_sad.gif',
+ ':sad:' => 'icon_sad.gif',
+ ':o' => 'icon_surprised.gif',
+ ':-o' => 'icon_surprised.gif',
+ ':eek:' => 'icon_surprised.gif',
+ '8O' => 'icon_eek.gif',
+ '8-O' => 'icon_eek.gif',
+ ':shock:' => 'icon_eek.gif',
+ ':?' => 'icon_confused.gif',
+ ':-?' => 'icon_confused.gif',
+ ':???:' => 'icon_confused.gif',
+ '8)' => 'icon_cool.gif',
+ '8-)' => 'icon_cool.gif',
+ ':cool:' => 'icon_cool.gif',
+ ':lol:' => 'icon_lol.gif',
+ ':x' => 'icon_mad.gif',
+ ':-x' => 'icon_mad.gif',
+ ':mad:' => 'icon_mad.gif',
+ ':P' => 'icon_razz.gif',
+ ':-P' => 'icon_razz.gif',
+ ':razz:' => 'icon_razz.gif',
+ ':oops:' => 'icon_redface.gif',
+ ':cry:' => 'icon_cry.gif',
+ ':evil:' => 'icon_evil.gif',
+ ':twisted:' => 'icon_twisted.gif',
+ ':roll:' => 'icon_rolleyes.gif',
+ ':wink:' => 'icon_wink.gif',
+ ';)' => 'icon_wink.gif',
+ ';-)' => 'icon_wink.gif',
+ ':!:' => 'icon_exclaim.gif',
+ ':?:' => 'icon_question.gif',
+ ':idea:' => 'icon_idea.gif',
+ ':arrow:' => 'icon_arrow.gif',
+ ':|' => 'icon_neutral.gif',
+ ':-|' => 'icon_neutral.gif',
+ ':neutral:' => 'icon_neutral.gif',
+ ':mrgreen:' => 'icon_mrgreen.gif',
+);
+
+
+# the weekdays and the months.. translate them if necessary
+
+$weekday[0]='Sunday';
+$weekday[1]='Monday';
+$weekday[2]='Tuesday';
+$weekday[3]='Wednesday';
+$weekday[4]='Thursday';
+$weekday[5]='Friday';
+$weekday[6]='Saturday';
+
+
+# the months, translate them if necessary - note: this isn't active everywhere yet
+$month['01']='January';
+$month['02']='February';
+$month['03']='March';
+$month['04']='April';
+$month['05']='May';
+$month['06']='June';
+$month['07']='July';
+$month['08']='August';
+$month['09']='September';
+$month['10']='October';
+$month['11']='November';
+$month['12']='December';
+
+
+
+# $b2inc is where the included b2 files are: that's generally the directory b2-include,
+# so you shouldn't have to change that setting
+$b2inc = './b2-include';
+
+
+// ** Querystring Configuration ** (don't change if you don't know what you're doing)
+
+$querystring_start = '?';
+$querystring_equal = '=';
+$querystring_separator = '&';
+
+
+
+
+// ** Configuration for b2mail.php ** (skip this if you don't intend to blog via email)
+
+# mailserver settings
+$mailserver_url = 'mail.example.com';
+$mailserver_login = 'login@example.com';
+$mailserver_pass = 'password';
+$mailserver_port = 110;
+
+# by default posts will have this category
+$default_category = 1;
+
+# subject prefix
+$subjectprefix = 'blog:';
+
+# body terminator string (starting from this string, everything will be ignored, including this string)
+$bodyterminator = "___";
+
+# set this to 1 to run in test mode
+$thisisforfunonly = 0;
+
+
+### Special Configuration for some phone email services
+
+# some mobile phone email services will send identical subject & content on the same line
+# if you use such a service, set $use_phoneemail to 1, and indicate a separator string
+# when you compose your message, you'll type your subject then the separator string
+# then you type your login:password, then the separator, then content
+
+$use_phoneemail = 0;
+$phoneemail_separator = ':::';
+
+
+
+
+
+/* Stop editing */
+
+
+$HTTP_HOST=getenv('HTTP_HOST'); /* domain name */
+$REMOTE_ADDR=getenv('REMOTE_ADDR'); /* visitor's IP */
+$HTTP_USER_AGENT=getenv('HTTP_USER_AGENT'); /* visitor's browser */
+
+$server = $dbhost;
+$loginsql = $dbusername;
+$passsql = $dbpassword;
+$path = $pathserver;
+$base = $dbname;
+
+?>
\ No newline at end of file
diff --git a/b2edit.php b/b2edit.php
new file mode 100644
index 0000000000..a5a2f5c9da
--- /dev/null
+++ b/b2edit.php
@@ -0,0 +1,342 @@
+ */
+
+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');
+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) VALUES ('0','$user_ID','$now','$content','".$post_title."','".$post_category."')";
+ $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);
+ $edited_post_title = format_to_edit($postdata["Title"]);
+
+ echo $blankline;
+ include($b2inc."/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_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($b2inc."/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($b2inc."/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($b2inc."/b2edit.showposts.php");
+
+}
+
+
+/* */
+include($b2inc."/b2footer.php") ?>
\ No newline at end of file
diff --git a/b2header.php b/b2header.php
new file mode 100644
index 0000000000..f1d43ddfa6
--- /dev/null
+++ b/b2header.php
@@ -0,0 +1,177 @@
+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
+
+
+b2 >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/b2install.php b/b2install.php
new file mode 100644
index 0000000000..8715650e63
--- /dev/null
+++ b/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/b2login.php b/b2login.php
new file mode 100644
index 0000000000..9ed4c29a43
--- /dev/null
+++ b/b2login.php
@@ -0,0 +1,382 @@
+ $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','mode','error','text','popupurl','popuptitle');
+
+for ($i = 0; $i < count($b2varstoreset); $i = $i + 1) {
+ $b2var = $b2varstoreset[$i];
+ if (!isset($$b2var)) {
+ if (empty($HTTP_POST_VARS["$b2var"])) {
+ if (empty($HTTP_GET_VARS["$b2var"])) {
+ $$b2var = '';
+ } else {
+ $$b2var = $HTTP_GET_VARS["$b2var"];
+ }
+ } else {
+ $$b2var = $HTTP_POST_VARS["$b2var"];
+ }
+ }
+}
+
+/* connecting the db */
+$connexion = @mysql_connect($server,$loginsql,$passsql) or die("Can't connect to the database
".mysql_error());
+mysql_select_db("$base");
+
+switch($action) {
+
+case "logout":
+
+ setcookie("cafeloguser");
+ setcookie("cafelogpass");
+ header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+ header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
+ header("Cache-Control: no-cache, must-revalidate"); // for HTTP/1.1
+ header("Pragma: no-cache");
+ if ($is_IIS) {
+ header("Refresh: 0;url=b2login.php");
+ } else {
+ header("Location: b2login.php");
+ }
+ exit();
+
+break;
+
+
+case "login":
+
+ if(!empty($HTTP_POST_VARS)) {
+ $log = $HTTP_POST_VARS["log"];
+ $pwd = $HTTP_POST_VARS["pwd"];
+ $redirect_to = $HTTP_POST_VARS["redirect_to"];
+ }
+
+ function login() {
+ global $server,$loginsql,$passsql,$base,$log,$pwd,$error,$user_ID;
+ global $tableusers, $pass_is_md5;
+ $user_login=$log;
+ $password=$pwd;
+ if (!$user_login) {
+ $error="ERROR: the login field is empty";
+ return false;
+ }
+
+ if (!$password) {
+ $error="ERROR: the password field is empty";
+ return false;
+ }
+
+ if (substr($password,0,4)=="md5:") {
+ $pass_is_md5 = 1;
+ $password = substr($password,4,strlen($password));
+ $query = " SELECT ID, user_login, user_pass FROM $tableusers WHERE user_login = '$user_login' AND MD5(user_pass) = '$password' ";
+ } else {
+ $pass_is_md5 = 0;
+ $query = " SELECT ID, user_login, user_pass FROM $tableusers WHERE user_login = '$user_login' AND user_pass = '$password' ";
+ }
+ $result = mysql_query($query) or die("Incorrect Login/Password request: ".mysql_error());
+
+ $lines = mysql_num_rows($result);
+ if ($lines<1) {
+ $error="ERROR: wrong login or password";
+ $pwd="";
+ return false;
+ } else {
+ $res=mysql_fetch_row($result);
+ $user_ID=$res[0];
+ if (($pass_is_md5==0 && $res[1]==$user_login && $res[2]==$password) || ($pass_is_md5==1 && $res[1]==$user_login && md5($res[2])==$password)) {
+ return true;
+ } else {
+ $error="ERROR: wrong login or password";
+ $pwd="";
+ return false;
+ }
+ }
+ }
+
+ if (!login()) {
+ header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+ header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
+ header("Cache-Control: no-cache, must-revalidate");
+ header("Pragma: no-cache");
+ if ($is_IIS) {
+ header("Refresh: 0;url=b2login.php");
+ } else {
+ header("Location: b2login.php");
+ }
+ exit();
+ } else {
+ $user_login=$log;
+ $user_pass=$pwd;
+ setcookie("cafeloguser",$user_login,time()+31536000);
+ if ($pass_is_md5) {
+ setcookie("cafelogpass",$user_pass,time()+31536000);
+ } else {
+ setcookie("cafelogpass",md5($user_pass),time()+31536000);
+ }
+ if (empty($HTTP_COOKIE_VARS["cafelogblogid"])) {
+ setcookie("cafelogblogid","1",time()+31536000);
+ }
+ header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+ header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
+ header("Cache-Control: no-cache, must-revalidate");
+ header("Pragma: no-cache");
+
+ switch($mode) {
+ case "bookmarklet":
+ $location="b2bookmarklet.php?text=$text&popupurl=$popupurl&popuptitle=$popuptitle";
+ break;
+ case "sidebar":
+ $location="sidebar.php?text=$text&popupurl=$popupurl&popuptitle=$popuptitle";
+ break;
+ case "profile":
+ $location="profile.php?text=$text&popupurl=$popupurl&popuptitle=$popuptitle";
+ break;
+ default:
+ $location="$redirect_to";
+ break;
+ }
+
+ if ($is_IIS) {
+ header("Refresh: 0;url=$location");
+ } else {
+ header("Location: $location");
+ }
+ }
+
+break;
+
+
+case "lostpassword":
+
+ ?>
+
+b2 > Lost password ?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Type your login here and click OK. You will receive an email with your password.
+$error
";
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+ The email could not be sent.
\n";
+ echo "Possible reason: your host may have disabled the mail() function...";
+ die();
+ } else {
+ echo "The email was sent successfully to $user_login's email address.
\n";
+ echo "Click here to login !
";
+ die();
+ }
+
+break;
+
+
+default:
+
+ if((!empty($HTTP_COOKIE_VARS["cafeloguser"])) && (!empty($HTTP_COOKIE_VARS["cafelogpass"]))) {
+ $user_login = $HTTP_COOKIE_VARS["cafeloguser"];
+ $user_pass_md5 = $HTTP_COOKIE_VARS["cafelogpass"];
+ }
+
+ function checklogin() {
+ global $server,$loginsql,$passsql,$base;
+ global $user_login,$user_pass_md5,$user_ID;
+
+ $userdata = get_userdatabylogin($user_login);
+
+ if ($user_pass_md5 != md5($userdata["user_pass"])) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ if ( !(checklogin()) ) {
+ if (!empty($HTTP_COOKIE_VARS["cafeloguser"])) {
+ $error="Error: wrong login/password"; //, or your session has expired.";
+ }
+ } else {
+ header("Expires: Wed, 5 Jun 1979 23:41:00 GMT"); /* private joke: this is my birthdate - though officially it's on the 6th, since I'm GMT+1 :) */
+ header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); /* different all the time */
+ header("Cache-Control: no-cache, must-revalidate"); /* to cope with HTTP/1.1 */
+ header("Pragma: no-cache");
+ header("Location: b2edit.php");
+ exit();
+ }
+ ?>
+
+b2 > Login form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+register ?
+lost your password ?
+
+
+
+
+
+$error
";
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/b2mail.php b/b2mail.php
new file mode 100644
index 0000000000..1539eaae2c
--- /dev/null
+++ b/b2mail.php
@@ -0,0 +1,262 @@
+connect($mailserver_url, $mailserver_port)) {
+ echo "Ooops $pop3->ERROR
\n";
+ exit;
+}
+
+$Count = $pop3->login($mailserver_login, $mailserver_pass);
+if((!$Count) || ($Count == -1)) {
+ echo "Login Failed: $pop3->ERROR
\n";
+ $pop3->quit();
+ exit;
+}
+
+
+// ONLY USE THIS IF YOUR PHP VERSION SUPPORTS IT!
+//register_shutdown_function($pop3->quit());
+
+for ($iCount=1; $iCount<=$Count; $iCount++) {
+
+ $MsgOne = $pop3->get($iCount);
+ if((!$MsgOne) || (gettype($MsgOne) != 'array')) {
+ echo "oops, $pop3->ERROR
\n";
+ $pop3->quit();
+ exit;
+ }
+
+ $content = '';
+ $content_type = '';
+ $boundary = '';
+ $bodysignal = 0;
+ $dmonths = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
+ 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec');
+ while ( list ( $lineNum,$line ) = each ($MsgOne) ) {
+ if (strlen($line) < 3) {
+ $bodysignal = 1;
+ }
+ if ($bodysignal) {
+ $content .= $line;
+ } else {
+ if (preg_match('/Content-Type: /', $line)) {
+ $content_type = trim($line);
+ $content_type = substr($content_type, 14, strlen($content_type)-14);
+ $content_type = explode(';', $content_type);
+ $content_type = $content_type[0];
+ }
+ if (($content_type == 'multipart/alternative') && (preg_match('/boundary="/', $line)) && ($boundary == '')) {
+ $boundary = trim($line);
+ $boundary = explode('"', $boundary);
+ $boundary = $boundary[1];
+ }
+ if (preg_match('/Subject: /', $line)) {
+ $subject = trim($line);
+ $subject = substr($subject, 9, strlen($subject)-9);
+ if ($use_phoneemail) {
+ $subject = explode($phoneemail_separator, $subject);
+ $subject = trim($subject[0]);
+ }
+ if (!ereg($subjectprefix, $subject)) {
+ continue;
+ }
+ }
+ if (preg_match('/Date: /', $line)) { // of the form '20 Mar 2002 20:32:37'
+ $ddate = trim($line);
+ $ddate = str_replace('Date: ', '', $ddate);
+ if (strpos($ddate, ',')) {
+ $ddate = trim(substr($ddate, strpos($ddate, ',')+1, strlen($ddate)));
+ }
+ $date_arr = explode(' ', $ddate);
+ $date_time = explode(':', $date_arr[3]);
+
+ $ddate_H = $date_time[0];
+ $ddate_i = $date_time[1];
+ $ddate_s = $date_time[2];
+
+ $ddate_m = $date_arr[1];
+ $ddate_d = $date_arr[0];
+ $ddate_Y = $date_arr[2];
+ for ($i=0; $i<12; $i++) {
+ if ($ddate_m == $dmonths[$i]) {
+ $ddate_m = $i+1;
+ }
+ }
+ $ddate_U = mktime($ddate_H, $ddate_i, $ddate_s, $ddate_m, $ddate_d, $ddate_Y);
+ $ddate_U = $ddate_U + ($time_difference * 3600);
+ $post_date = date('Y-m-d H:i:s', $ddate_U);
+ }
+ }
+ }
+
+ $ddate_today = time() + ($time_difference * 3600);
+ $ddate_difference_days = ($ddate_today - $ddate_U) / 86400;
+
+
+ # starts buffering the output
+ ob_start();
+
+ if ($ddate_difference_days > 14) {
+ echo 'too old
';
+ continue;
+ }
+
+ if (preg_match('/'.$subjectprefix.'/', $subject)) {
+
+ $userpassstring = '';
+
+ echo '';
+ echo "$iCount
Subject: $subject
\n";
+
+ $subject = trim(str_replace($subjectprefix, '', $subject));
+
+ if ($content_type == 'multipart/alternative') {
+ $content = explode('--'.$boundary, $content);
+ $content = $content[2];
+ $content = explode('Content-Transfer-Encoding: quoted-printable', $content);
+ $content = strip_tags($content[1], '
');
+ }
+ $content = trim($content);
+
+ echo "Content-type: $content_type, boundary: $boundary
\n";
+ echo "Raw content:
".$content.' ';
+
+ $btpos = strpos($content, $bodyterminator);
+ if ($btpos) {
+ $content = substr($content, 0, $btpos);
+ }
+ $content = trim($content);
+
+ $blah = explode("\n", $content);
+ $firstline = $blah[0];
+
+ if ($use_phoneemail) {
+ $btpos = strpos($firstline, $phoneemail_separator);
+ if ($btpos) {
+ $userpassstring = trim(substr($firstline, 0, $btpos));
+ $content = trim(substr($content, $btpos+strlen($phoneemail_separator), strlen($content)));
+ $btpos = strpos($content, $phoneemail_separator);
+ if ($btpos) {
+ $userpassstring = trim(substr($content, 0, $btpos));
+ $content = trim(substr($content, $btpos+strlen($phoneemail_separator), strlen($content)));
+ }
+ }
+ $contentfirstline = $blah[1];
+ } else {
+ $userpassstring = $firstline;
+ $contentfirstline = '';
+ }
+
+ $blah = explode(':', $userpassstring);
+ $user_login = $blah[0];
+ $user_pass = $blah[1];
+
+ $content = $contentfirstline.str_replace($firstline, '', $content);
+ $content = trim($content);
+
+ echo "Login: $user_login, Pass: $user_pass
";
+
+ $sql = "SELECT ID, user_level FROM $tableusers WHERE user_login='$user_login' AND user_pass='$user_pass' ORDER BY ID DESC LIMIT 1";
+ $result = mysql_query($sql);
+
+ if (!mysql_num_rows($result)) {
+ echo 'Wrong login or password.
';
+ continue;
+ }
+
+ $row = mysql_fetch_object($result);
+ $user_level = $row->user_level;
+ $post_author = $row->ID;
+
+ if ($user_level > 0) {
+
+ $post_title = xmlrpc_getposttitle($content);
+ $post_category = xmlrpc_getpostcategory($content);
+
+ if ($post_title == '') {
+ $post_title = $subject;
+ }
+ if ($post_category == '') {
+ $post_category = $default_category;
+ }
+
+ if ($autobr) {
+ $content = autobrize($content);
+ }
+
+ if (!$thisisforfunonly) {
+ $post_title = addslashes(trim($post_title));
+ $content = addslashes(trim($content));
+ $sql = "INSERT INTO $tableposts (post_author, post_date, post_content, post_title, post_category) VALUES ($post_author, '$post_date', '$content', '$post_title', $post_category)";
+ $result = mysql_query($sql) or die('Couldn\'t add post: '.mysql_error());
+ $post_ID = mysql_insert_id();
+
+ if (isset($sleep_after_edit) && $sleep_after_edit > 0) {
+ sleep($sleep_after_edit);
+ }
+
+ $blog_ID = 1;
+ rss_update($blog_ID);
+ pingWeblogs($blog_ID);
+ pingCafelog($cafelogID, $post_title, $post_ID);
+ pingBlogs($blog_ID);
+ pingback($content, $post_ID);
+ }
+ echo "\nPosted title: $post_title
";
+ echo "\nPosted content:
".$content.'
';
+
+ if(!$pop3->delete($iCount)) {
+ echo 'oops '.$pop3->ERROR.'
';
+ $pop3->reset();
+ exit;
+ } else {
+ echo "Mission complete, message $iCount deleted
";
+ }
+
+ } else {
+ echo 'Level 0 users can\'t post.
';
+ }
+ echo '';
+ if ($output_debugging_info) {
+ ob_end_flush();
+ } else {
+ ob_end_clean();
+ }
+ }
+}
+
+$pop3->quit();
+
+timer_stop($output_debugging_info);
+exit;
+
+?>
diff --git a/b2options.php b/b2options.php
new file mode 100644
index 0000000000..b27cd85fca
--- /dev/null
+++ b/b2options.php
@@ -0,0 +1,219 @@
+ */
+
+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');
+for ($i=0; $iERROR: couldn't update the options... please contact the webmaster !
".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 :)");
+ }
+ ?>
+
+
+
+
+
+
+
+ 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.
+
+
+
+ */
+include($b2inc."/b2footer.php") ?>
\ No newline at end of file
diff --git a/b2pingbacks.php b/b2pingbacks.php
new file mode 100644
index 0000000000..efed31b90e
--- /dev/null
+++ b/b2pingbacks.php
@@ -0,0 +1,50 @@
+
+
+ %' ORDER BY comment_date";
+ $resultc = mysql_query($queryc); if ($resultc) {
+ ?>
+
+
+
+
+:: pingbacks
+
+
+ comment_ID); ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+No Pingback on this post so far.
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/b2pingbackspopup.php b/b2pingbackspopup.php
new file mode 100644
index 0000000000..5048a30a9f
--- /dev/null
+++ b/b2pingbackspopup.php
@@ -0,0 +1,75 @@
+
+
+
+ - pingbacks on ''
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[powered by b2.]
+
+
+
+
+
\ No newline at end of file
diff --git a/b2profile.php b/b2profile.php
new file mode 100644
index 0000000000..67f1e94408
--- /dev/null
+++ b/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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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 :)
+
+
+
+
+
+
+
+
+
+ */
+include($b2inc."/b2footer.php") ?>
\ No newline at end of file
diff --git a/b2rdf.php b/b2rdf.php
new file mode 100644
index 0000000000..dad5731f2c
--- /dev/null
+++ b/b2rdf.php
@@ -0,0 +1,53 @@
+\n"; ?>
+
+
+
+">
+
+
+
+
+
+
+
+
+
+ hourly
+ 1
+ 2000-01-01T12:00+00:00
+
+
+
+
+
+
+
+
+
+
+
+-
+
+
+
+ (mailto:)
+
+
+ ]]>
+
+
+
+
\ No newline at end of file
diff --git a/b2register.php b/b2register.php
new file mode 100644
index 0000000000..7d6e878b2c
--- /dev/null
+++ b/b2register.php
@@ -0,0 +1,342 @@
+ */
+
+include("./b2config.php");
+include($b2inc."/b2functions.php");
+
+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');
+for ($i=0; $iERROR: please enter a Login");
+ }
+
+ /* checking the password has been typed twice */
+ if ($pass1=='' ||$pass2=='') {
+ die ("ERROR: please enter your password twice");
+ }
+
+ /* checking the password has been typed twice the same */
+ if ($pass1!=$pass2) {
+ die ("ERROR: please type the same password in the two password fields");
+ }
+ $user_nickname=$user_login;
+
+ /* checking e-mail address */
+ if ($user_email=="") {
+ die ("ERROR: please type your e-mail address");
+ } else if (!is_email($user_email)) {
+ die ("ERROR: the email address isn't correct");
+ }
+
+ $id=mysql_connect($server,$loginsql,$passsql);
+ if ($id==false) {
+ die ("OOPS: can't connect to the server !".mysql_error());
+ }
+
+ mysql_select_db("$base") or die ("OOPS: can't select the database $base : ".mysql_error());
+
+ /* checking the login isn't already used by another user */
+ $request = " SELECT user_login FROM $tableusers WHERE user_login = '$user_login'";
+ $result = mysql_query($request,$id) or die ("OOPS: can't check the login...");
+ $lines = mysql_num_rows($result);
+ mysql_free_result($result);
+ if ($lines>=1) {
+ die ("ERROR: this login is already registered, please choose another one");
+ }
+
+ $user_ip = $HTTP_SERVER_VARS['REMOTE_ADDR'] ;
+ $user_domain = gethostbyaddr($HTTP_SERVER_VARS['REMOTE_ADDR'] );
+ $user_browser = $HTTP_SERVER_VARS['HTTP_USER_AGENT'];
+
+ $user_login=addslashes($user_login);
+ $pass1=addslashes($pass1);
+ $user_nickname=addslashes($user_nickname);
+
+ $query = "INSERT INTO $tableusers (user_login, user_pass, user_nickname, user_email, user_ip, user_domain, user_browser, dateYMDhour, user_level, user_idmode) VALUES ('$user_login','$pass1','$user_nickname','$user_email','$user_ip','$user_domain','$user_browser',NOW(),'$new_users_can_blog','nickname')";
+ $result = mysql_query($query);
+ if ($result==false) {
+ die ("ERROR: couldn't register you... please contact the webmaster !".mysql_error());
+ }
+
+ $stars="";
+ for ($i = 0; $i < strlen($pass1); $i = $i + 1) {
+ $stars .= "*";
+ }
+
+ $message = "new user registration on your blog $blogname:\r\n\r\n";
+ $message .= "login: $user_login\r\n\r\ne-mail: $user_email";
+
+ @mail($admin_email,"new user registration on your blog $blogname",$message);
+
+ ?>
+
+b2 > Registration complete
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+registration
complete
+
+
+
+
+
+
+login:
+password:
+e-mail:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+b2 > Registration Currently Disabled
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+registration disabled
+
+
+
+
+
+
+
+User registration is currently not allowed.
+Home
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+b2 > Register form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+registration
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ \n"; ?>
+
+
+
+
+
+
+ GMT
+ http://backend.userland.com/rss092
+
+
+
+
+
+ -
+
"; the_category_unicode(); echo ""; ?>
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/b2rss.xml b/b2rss.xml
new file mode 100644
index 0000000000..8d71eaad9c
--- /dev/null
+++ b/b2rss.xml
@@ -0,0 +1 @@
+this file is blank because you either don't use the RSS function, or you forgot to ChMod that file (chmod 666)
\ No newline at end of file
diff --git a/b2rss2.php b/b2rss2.php
new file mode 100644
index 0000000000..1ad19c888c
--- /dev/null
+++ b/b2rss2.php
@@ -0,0 +1,45 @@
+\n"; ?>
+
+
+
+
+
+
+
+
+
+ Copyright
+
+
+
+ hourly
+ 1
+ 2000-01-01T12:00+00:00
+
+
+ -
+
+
+
+ (mailto:)
+
+ @
+
+ ]]>
+
+
+
+
\ No newline at end of file
diff --git a/b2sidebar.php b/b2sidebar.php
new file mode 100644
index 0000000000..04b5beaad3
--- /dev/null
+++ b/b2sidebar.php
@@ -0,0 +1,168 @@
+ */
+
+$mode = "sidebar";
+
+$standalone = 1;
+require_once("./b2header.php");
+
+get_currentuserinfo();
+
+// just your usual browser thing because we're still too far from standards
+$is_gecko = preg_match("/Gecko/",$HTTP_USER_AGENT);
+$is_winIE = ((preg_match("/MSIE/",$HTTP_USER_AGENT)) && (preg_match("/Win/",$HTTP_USER_AGENT)));
+$is_macIE = ((preg_match("/MSIE/",$HTTP_USER_AGENT)) && (preg_match("/Mac/",$HTTP_USER_AGENT)));
+$is_IE = (($is_macIE) || ($is_winIE));
+
+if ($user_level == 0)
+die ("Cheatin' uh ?");
+
+$request = " SELECT * FROM $tablesettings ";
+$result = mysql_query($request);
+while($row = mysql_fetch_object($result)) {
+ $time_difference=$row->time_difference;
+ $autobr=$row->AutoBR;
+}
+
+if ($a=="b") {
+
+?>
+
+
+
+
+
+
+
+
+ Posted !
+ Click here to post again.
+
+
+
+
+
+b2 > sidebar
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/b2spell.php b/b2spell.php
new file mode 100644
index 0000000000..59c568a7da
--- /dev/null
+++ b/b2spell.php
@@ -0,0 +1,97 @@
+
+Loading Spell Checker
+
+
+
+
+
+
diff --git a/b2team.php b/b2team.php
new file mode 100644
index 0000000000..1163191091
--- /dev/null
+++ b/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
+
+
+ ID
+ Nickname
+ Name
+ E-mail
+ URL
+ Level
+ 3) { ?>
+ Login
+
+
+ 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 "".$user_data["ID"]." \n";
+ echo "".$user_data["user_nickname"]." \n";
+ echo "".$user_data["user_firstname"]." ".$user_data["user_lastname"]." \n";
+ echo " ";
+ echo " ";
+ if (($user_data["user_url"] != "http://") and ($user_data["user_url"] != ""))
+ echo " ";
+ echo " \n";
+ 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 " \n";
+ if ($user_level > 3) {
+ echo "".$user_data["user_login"]." \n";
+ }
+ echo " \n";
+ }
+
+ ?>
+
+
+
+
+
+
+
+ Inactive users (level 0)
+
+
+ ID
+ Nickname
+ Name
+ E-mail
+ URL
+ Level
+ 3) { ?>
+ Login
+
+
+ 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 "".$user_data["ID"]." \n";
+ echo "".$user_data["user_nickname"]." \n";
+ echo "".$user_data["user_firstname"]." ".$user_data["user_lastname"]." \n";
+ echo " ";
+ echo " ";
+ if (($user_data["user_url"] != "http://") and ($user_data["user_url"] != ""))
+ echo " ";
+ echo " \n";
+ echo "".$user_data["user_level"];
+ if ($user_level >= 2)
+ echo " + ";
+ if ($user_level >= 3)
+ echo " X ";
+ echo " \n";
+ if ($user_level > 3) {
+ echo "".$user_data["user_login"]." \n";
+ }
+ echo " \n";
+ }
+
+ ?>
+
+
+
+
+
+ = 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($b2inc."/b2footer.php") ?>
\ No newline at end of file
diff --git a/b2template.php b/b2template.php
new file mode 100644
index 0000000000..c96afab3a0
--- /dev/null
+++ b/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) {
+ ?>
+
+ 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($b2inc."/b2footer.php") ?>
\ No newline at end of file
diff --git a/b2trackback.php b/b2trackback.php
new file mode 100644
index 0000000000..7e12f2d2a7
--- /dev/null
+++ b/b2trackback.php
@@ -0,0 +1,158 @@
+
+
+
+ %' ORDER BY comment_date";
+ $resultc = mysql_query($queryc); if ($resultc) {
+ ?>
+
+
+:: trackbacks
+
+
+( The URL to TrackBack this entry is:
+ )
+
+
+ comment_ID); ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 255) ? substr($title, 0, 252).'...' : $title;
+ $excerpt = strip_tags($excerpt);
+ $excerpt = (strlen($excerpt) > 255) ? substr($excerpt, 0, 252).'...' : $excerpt;
+ $blog_name = htmlspecialchars($blog_name);
+ $blog_name = (strlen($blog_name) > 255) ? substr($blog_name, 0, 252).'...' : $blog_name;
+
+ $comment = ' ';
+ $comment .= "$title
$excerpt";
+
+ $author = addslashes($blog_name);
+ $email = '';
+ $original_comment = $comment;
+ $comment_post_ID = $tb_id;
+ $autobr = 1;
+
+ $user_ip = $HTTP_SERVER_VARS['REMOTE_ADDR'];
+ $user_domain = gethostbyaddr($user_ip);
+ $time_difference = get_settings('time_difference');
+ $now = date('Y-m-d H:i:s',(time() + ($time_difference * 3600)));
+
+ $comment = convert_chars($comment);
+ $comment = format_to_post($comment);
+
+ $comment_author = $author;
+ $comment_author_email = $email;
+ $comment_author_url = $url;
+
+ $author = addslashes($author);
+
+ $query = "INSERT INTO $tablecomments VALUES ('0','$comment_post_ID','$author','$email','$url','$user_ip','$now','$comment','0')";
+ $result = mysql_query($query);
+ if (!$result) {
+ die ("There is an error with the database, it can't store your comment...
Contact the webmaster");
+ } else {
+
+ if ($comments_notify) {
+
+ $notify_message = "New trackback on your post #$comment_post_ID.\r\n\r\n";
+ $notify_message .= "website: $comment_author (IP: $user_ip , $user_domain)\r\n";
+ $notify_message .= "url : $comment_author_url\r\n";
+ $notify_message .= "excerpt: \n".stripslashes($original_comment)."\r\n\r\n";
+ $notify_message .= "You can see all trackbacks on this post there: \r\n";
+ $notify_message .= "$siteurl/$blogfilename?p=$comment_post_ID&tb=1\r\n\r\n";
+
+ $postdata = get_postdata($comment_post_ID);
+ $authordata = get_userdata($postdata["Author_ID"]);
+ $recipient = $authordata["user_email"];
+ $subject = "trackback on post #$comment_post_ID \"".$postdata["Title"]."\"";
+
+ @mail($recipient, $subject, $notify_message, "From: b2@".$HTTP_SERVER_VARS['SERVER_NAME']."\r\n"."X-Mailer: b2 $b2_version - PHP/" . phpversion());
+
+ }
+
+ trackback_response(0);
+ }
+
+}/* elseif (empty($HTTP_GET_VARS['__mode'])) {
+
+ header('Content-type: application/xml');
+ echo "\n\n1 \n";
+ echo "Tell me a lie. \nOr just a __mode or url parameter ? \n";
+ echo " ";
+
+}*/
+
+
+}
+
+?>
\ No newline at end of file
diff --git a/b2trackbackpopup.php b/b2trackbackpopup.php
new file mode 100644
index 0000000000..33d4b6f907
--- /dev/null
+++ b/b2trackbackpopup.php
@@ -0,0 +1,80 @@
+
+
+
+ - trackbacks on ''
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+[powered by b2.]
+
+
+
+
+
\ No newline at end of file
diff --git a/b2upload.php b/b2upload.php
new file mode 100644
index 0000000000..da0d70bf91
--- /dev/null
+++ b/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
+
+
+
+
+
+
+
+
+
+
+
+ Duplicate File?
+ The filename '' already exists!
+ filename '' moved to ''
+ Confirm or rename:
+
+
+
+
+
+
+
+
+File uploaded !
+Your file was uploaded successfully !
+Here's the code to display it:
+
+
+Image Details:
+name:
+
+
+size:
+ KB
+
+type:
+
+
+
+
+
+
+
+
+
+
+