Forum Moderators: coopster
<?php
if ($_SERVER['REQUEST_METHOD']=='GET')
{
// GET requests
}
else if ($_SERVER['REQUEST_METHOD']=='POST')
{
if (isset($_POST['contact'])) {contact();}
else if (isset($_POST['news'])) {news();}
else if (isset($_POST['blog'])) {blog();}
else if (isset($_POST['forum_thread_publish'])) {forum_thread_publish();}
else if (isset($_POST['forum_thread_preview{forum_thread_preview();}
else if (isset($_POST['forum_post_publish'])) {forum_post_publish();}
else if (isset($_POST['forum_post_preview'])) {forum_post_preview();}
}
?>
function user_date_mysql($date, $format) {return date ($format, strtotime($date));}
$result1 = mysql_query("SELECT post_date, post_name, post_title FROM wp_posts WHERE post_name != '' ORDER BY id DESC LIMIT 0,10");
if ($result1)
{
$row_count1 = mysql_num_rows($result1);
while($row1 = mysql_fetch_assoc($result1))
{
echo ' <div><a href="http://www.example.com/blog/'.$row1['post_name'].'" tabindex="3" title="'.htmlspecialchars($row1['post_title']).'">'.
/**** merge the line above and below, broke to keep forums from generating horizontal scrollbar ****/
user_date_mysql($row1['post_date'], "M d").', '.htmlspecialchars($row1['post_title']).'</a></div>'."\n";
}
}