From 466c2804b5985a4ab993f07e1f08c911d9262c88 Mon Sep 17 00:00:00 2001
From: Matt Mullenweg Content-type: $content_type, boundary: $boundary Raw content:
';
+ echo 'Too old
';
continue;
}
@@ -148,7 +146,7 @@ for ($iCount=1; $iCount<=$Count; $iCount++) {
$content = trim($content);
echo "
Raw content:
".$content.''; $btpos = strpos($content, $bodyterminator); if ($btpos) { @@ -186,16 +184,15 @@ for ($iCount=1; $iCount<=$Count; $iCount++) { 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); + $result = $wpdb->get_row($sql); - if (!mysql_num_rows($result)) { + if (!$result) { echo 'Wrong login or password.
'; continue; } - $row = mysql_fetch_object($result); - $user_level = $row->user_level; - $post_author = $row->ID; + $user_level = $result->user_level; + $post_author = $result->ID; if ($user_level > 0) { @@ -209,15 +206,11 @@ for ($iCount=1; $iCount<=$Count; $iCount++) { $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()); + $result = $wpdb->query($sql); $post_ID = mysql_insert_id(); if (isset($sleep_after_edit) && $sleep_after_edit > 0) { @@ -232,18 +225,18 @@ for ($iCount=1; $iCount<=$Count; $iCount++) { pingback($content, $post_ID); } echo "\nPosted title: $post_title
";
- echo "\nPosted content:
".$content.''; if(!$pop3->delete($iCount)) { - echo '
oops '.$pop3->ERROR.'
'; + echo 'Oops '.$pop3->ERROR.'
'; $pop3->reset(); exit; } else { - echo "Mission complete, message $iCount deleted
"; + echo "Mission complete, message $iCount deleted.
"; } } else { - echo 'Level 0 users can\'t post.
'; + echo 'Level 0 users can\'t post.
'; } echo ''; if ($output_debugging_info) { @@ -259,4 +252,4 @@ $pop3->quit(); timer_stop($output_debugging_info); exit; -?> +?> \ No newline at end of file