[Comoblog-commit] modules/mod_recentpostbytitle/include mod_recentpostbytitle.inc.php,NONE,1.1
Status: Inactive
Brought to you by:
markwallis
|
From: iamdecal <iam...@us...> - 2006-01-27 22:10:31
|
Update of /cvsroot/comoblog/modules/mod_recentpostbytitle/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24093/mod_recentpostbytitle/include Added Files: mod_recentpostbytitle.inc.php Log Message: --- NEW FILE: mod_recentpostbytitle.inc.php --- <?php function mod_recentpostbytitle_list () { $post_id = ''; if (isset($_SERVER['PATH_INFO']) && $_SERVER['PATH_INFO'] != '/') $post_id = substr($_SERVER['PATH_INFO'],1,strlen($_SERVER['PATH_INFO'])-1); # echo $post_id; $query = "select * from ".CFG_MYSQL_TABPREFIX."posts order by post_mail_date desc limit CFG_RECENTPOSTBYTITLE_LIMIT "; $res = mysql_query($query); if (!$res || !mysql_num_rows($res)) return (false); $items = array(); while ($row = mysql_fetch_assoc($res)) { $row['is_selected'] =""; if ($row['post_id'] == $post_id){ $row['is_selected'] ="SELECTED";} #echo $row['post_id'] ." - " . $row['is_selected'] . "<br>"; $items[] = $row; } return ($items); } ?> |