1
I'm working on my first module and having got the admin section working fine am now working on the front end. A user does a search and finds data in my module, clicks on the link and is directed to a normal XOOPS page called viewrecord.php
The top part of this file is like this:
include XOOPS_ROOT_PATH.'/mainfile.php';
include XOOPS_ROOT_PATH.'/header.php';
include XOOPS_ROOT_PATH.'/class/database/database.php';
function getAnyRecordViewTemplateId($idtable)
{
$db = &Database::getInstance();
// BLAH BLAH BLAH - SNIPPED
return $data['id'];
}
$idtemplate = getAnyRecordViewTemplateId($_REQUEST['idtable']);
Really the problem is in the first few lines - it gets as far as setting $db, but returns the error: Fatal error: Undefined class name 'database' in C:\dev\tool\sokkit\site\xoops\modules\directory\viewrecord.php on line 9
Its almost like its ignoring the database.php include ? I've tried typing in junk in the include line there and it doesn't error either?!!?
Please help, confused
Matt