Skip to content

Commit

Permalink
new devlog section
Browse files Browse the repository at this point in the history
git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@569 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
prescience committed Dec 23, 2001
1 parent fc99016 commit 1f4af33
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 2 deletions.
80 changes: 80 additions & 0 deletions 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;
}
?>

<span class="page_title">Devlog</span>
<hr size=1 noshade width="100%">
<p>
<i>This section is devoted to commentary on checkins in the Changelog and anything else that doesn't make it onto the front page.</i>
<p>
<?
$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 );
?>
<p>
<table width="100%" bgcolor="#ffffff" border="0" cellspacing="0" cellpadding="4">
<tr>
<td class="devpost">
<b><? echo $v_headline ?></b> - <span class="news_date">[ <? echo $v_date_posted ?> ]</span><br>
<? echo $v_post ?>
</td>
</tr>
</table>
<?
}
?>
<p class="center">
<?
$f_offset_next = $f_offset + $post_limit;
$f_offset_prev = $f_offset - $post_limit;

if ( $f_offset_prev >= 0 ) {
PRINT "[ <a href=\"devlog.php3?f_offset=$f_offset_prev\">newer posts</a> ]";
}
if ( $post_count==$post_limit ) {
PRINT " [ <a href=\"devlog.php3?f_offset=$f_offset_next\">older posts</a> ]";
}
?>
<? include( "../bot.php3" ); ?>
5 changes: 3 additions & 2 deletions side_menu.php3
Expand Up @@ -41,10 +41,10 @@
</tr>
<tr>
<td class="menu_items">
<a href="faq.php3">FAQ</a><br>
<a href="irc.php3">IRC</a><br>
<a href="forums.php3">Forums</a><br>
<a href="mailinglists.php3">Mailing Lists</a><br>
<a href="irc.php3">IRC</a><br>
<a href="faq.php3">FAQ</a><br>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -73,6 +73,7 @@
<a href="guidelines.php3">Coding Guidelines</a><br>
<a href="rules.php3">Developer Rules</a><br>
<a href="devnotes.php3">Dev Notes</a><br>
<a href="devlog.php3">Devlog</a><br>
<a href="roadmap.php3">Roadmap</a><br>
<a href="polls.php3">Polls</a><br>
<a href="api.php3">API</a><br>
Expand Down

0 comments on commit 1f4af33

Please sign in to comment.