1
hawkman1
how to add php code to a block? help!
  • 2003/10/22 1:24

  • hawkman1

  • Just popping in

  • Posts: 7

  • Since: 2003/10/22


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
}

2
Mithrandir
Re: how to add php code to a block? help!

What do you get from a PHP Debug?

3
hawkman1
Re: how to add php code to a block? help!
  • 2003/10/24 5:39

  • hawkman1

  • Just popping in

  • Posts: 7

  • Since: 2003/10/22


"don't find"

Login

Who's Online

256 user(s) are online (197 user(s) are browsing Support Forums)


Members: 0


Guests: 256


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Dec 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits