1
i add the following codes to a php block.
require (XOOPS_ROOT_PATH."/articles/global.php");
list_message(15,0);
but nothing displayed. Help!!!!!!
the follwing is the function define:
function list_message($type,$setid)
{
global $list_num,$list_brief_num,$datetxt;
global $frame_color, $title_bgcolor, $title_txtcolor, $form_bgcolor1, $form_bgcolor2, $frame_width, $alert_txtcolor;
$aSoft = new CSoft;
$aSoft->open();
$aClass = new CClass;
$aClass->open();
$aCategory = new CCategory;
$aCategory->open();
$posList = $aSoft->FilterByClass($type, "1");
$num = count($posList);
if ($num <= 0) echo "don't find.";
if (empty($setid)) $setid = 0;
$realnum = $num - $setid;
for($i = 0; $i < min($realnum, $list_num); $i++)
{
$aSoft->setAbsolutePosition($posList[$i + $setid]);
$id = $posList[$i + $setid];
$aClass->find($aSoft->class_id);
$type2 = $aClass->class_name;
$sort1id = $aClass->class_category_id;
$aCategory->find($sort1id);
$type1 = $aCategory->category_name;
// 显示列表记录
print "·$aSoft->name";
} // while
}