addClick("fengshui_main", "mainpage"); $tracker = new Tracker2(); $tracker->addTracker("mainpage", "fengshui_main"); $cachetimeout=5*60; require_once("jpcache/jpcache.php"); $ServerUtilO=new ServerUtil(); $gotohost_gh=$ServerUtilO->GetHttpHost("gohome"); $gotohost_h18=$ServerUtilO->GetHttpHost("house18"); $forum_num_row=6; $channel_num_row=5; $forum_id=95; //forum id of fengshui $num_days=365; //for for messages only within num_days $select_message_sql="SELECT distinct m.message_id, m.message_subject, m.message_author, m.message_last_update FROM messages m, forums f WHERE (f.forum_id=$forum_id or f.parent_forum_id=$forum_id) and m.message_last_update = m.message_timestamp AND m.forum_id=f.forum_id and m.message_last_update>date_sub(sysdate(), interval $num_days day) ORDER BY message_last_update desc limit $forum_num_row"; $select_question_sql="select question_id, subject, name, entry_date from channel_question where source='fengshui' and status='active' order by entry_date desc limit $channel_num_row"; $channel_question_row=$dbo3->query($select_question_sql); // $forum_message_row=$dbo2->query($select_message_sql); $tpl->prepare(); $tpl->assign("top", $componentobj->GetTop("house18","fengshui")); $tpl->assign("footer", $componentobj->GetFooter("house18")); /* $hsh_ad = implode ('', file ('/www/html/homesweethome/ad_hsh.php')); $hsh_box = implode ('', file ('/www/html/homesweethome/hsh_box.php')); $tpl->assign("hsh_ad", $hsh_ad); $tpl->assign("hsh_box", $hsh_box); */ // $tpl->gotoBlock("_ROOT"); $tpl->assign("gotohost_gh", $gotohost_gh); while ($channel_row=mysql_fetch_array($channel_question_row)) { $tpl->newBlock("fengshui_channel_list"); $tpl->assign("question_subject", $channel_row["subject"]); $tpl->assign("question_author", $channel_row["name"]); $tpl->assign("question_date", $channel_row["entry_date"]); $tpl->assign("question_id", $channel_row["question_id"]); } /* while ($forum_row=mysql_fetch_array($forum_message_row)) { $tpl->newBlock("fengshui_msg_list"); $tpl->assign("forum_subject", $forum_row["message_subject"]); $tpl->assign("forum_author", $forum_row["message_author"]); $tpl->assign("forum_date", $forum_row["message_last_update"]); $tpl->assign("message_id", $forum_row["message_id"]); $tpl->assign("gotohost_gh", $gotohost_gh); } */ $tpl->printToScreen(); ?>