tableInfo('firms'); //print_r($info); $print.= $HTML_TOP; $print.= "
"; $SQL = "SELECT * FROM news ORDER BY modtime desc LIMIT 5"; $res = $db->Query($SQL); if (DB::isError($res)) { debug_print ($res->getMessage()); debug_print ($res->getDebugInfo()); } else { while ($r = $res->fetchRow(DB_FETCHMODE_ASSOC)) { $tbl_trs.= Anchor2Value("SUBJECT", stripslashes($r['subject']), Anchor2Value("BODY", stripslashes($r['news_body']), Anchor2Value("DATE", substr($r['modtime'], 0, 10), $NEWS_TABLE_TR))); } } $SQL = "SELECT * FROM auto4sale ORDER BY modtime desc LIMIT 10"; $res = $db->Query($SQL); if (DB::isError($res)) { debug_print ($res->getMessage()); debug_print ($res->getDebugInfo()); } else { while ($r = $res->fetchRow(DB_FETCHMODE_ASSOC)) { for ($i = 0; $i < 4; $i++) if ($r['preview'.$i]) debugprint ($picts[] = $i); if (is_array($picts) && count($picts)) $pict_num = $picts[rand(0, count($picts))]; debugprint($pict_num); $tbl_auto2sale_trs.= Anchor2Value("AUTO_SUBJECT", stripslashes($r['auto_subj']), Anchor2Value("AUTO_PRICE", "$".(($r['auto_price'])?$r['auto_price']:''), Anchor2Value("ID", $r['id'], Anchor2Value("PICT_NUM", sprintf("%d", $pict_num), Anchor2Value("DATE", substr($r['modtime'], 0, 10), $AUTO4SALE_TABLE_TR))))); } } $print.= Anchor2Value("CENTER", $NEWS_TABLE, Anchor2Value("LEFT", " ", Anchor2Value("RIGHT", $AUTO4SALE_TABLE, $CENTRAL_TBL))); $print.= $HTML_BOTTOM; $table['TBL_TRS'] = $tbl_trs; $table['TBL_AUTO4SALE_TRS'] = $tbl_auto2sale_trs; main_print ($print, $table); ?>