diff --git a/devlog.php3 b/devlog.php3 new file mode 100644 index 0000000..2174c20 --- /dev/null +++ b/devlog.php3 @@ -0,0 +1,80 @@ + include( "top.php3" ) ?> + include( "mantis/constant_inc.php" ) ?> + include( "mantis/config_inc.php" ) ?> + + function db_connect($p_hostname="localhost", $p_username="root", + $p_password="", $p_database="mantis", + $p_port=3306 ) { + + $t_result = mysql_connect( $p_hostname.":".$p_port, + $p_username, $p_password ); + $t_result = mysql_select_db( $p_database ); + } + ### -------------------- + function string_display( $p_string ) { + $p_string = stripslashes( $p_string ); + $p_string = nl2br( $p_string ); + return $p_string; + } + ### -------------------- + function sql_to_unix_time( $p_timeString ) { + return mktime( substr( $p_timeString, 8, 2 ), + substr( $p_timeString, 10, 2 ), + substr( $p_timeString, 12, 2 ), + substr( $p_timeString, 4, 2 ), + substr( $p_timeString, 6, 2 ), + substr( $p_timeString, 0, 4 ) ); + } + ### -------------------- + db_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name ); + + $post_limit = 10; + if ( !isset( $f_offset ) ) { + $f_offset = 0; + } +?> + +Devlog +
+This section is devoted to commentary on checkins in the Changelog and anything else that doesn't make it onto the front page. +
+ + $query = "SELECT *,UNIX_TIMESTAMP(date_posted) as date_posted + FROM devlog + ORDER BY date_posted DESC + LIMIT $f_offset, $post_limit"; + $result = mysql_query( $query ); + $post_count = mysql_num_rows( $result ); + for ($i=0;$i<$post_count;$i++) { + $row = mysql_fetch_array($result); + extract( $row, EXTR_PREFIX_ALL, "v" ); + $v_headline = string_display( $v_headline ); + $v_post = string_display( $v_post ); + $v_date_posted = date( "m-d-Y h:i a T", $v_date_posted ); +?> +
+
+ echo $v_headline ?> - [ echo $v_date_posted ?> ] + echo $v_post ?> + |
+
+ + $f_offset_next = $f_offset + $post_limit; + $f_offset_prev = $f_offset - $post_limit; + + if ( $f_offset_prev >= 0 ) { + PRINT "[ newer posts ]"; + } + if ( $post_count==$post_limit ) { + PRINT " [ older posts ]"; + } +?> + include( "../bot.php3" ); ?> \ No newline at end of file diff --git a/side_menu.php3 b/side_menu.php3 index f01992c..c2eb93d 100644 --- a/side_menu.php3 +++ b/side_menu.php3 @@ -41,10 +41,10 @@