1
require('../../../mainfile.php');
global $xoopsOption,$xoopsUser,$xoopsTpl;
include_once "adminheader.php";
$xoopsOption['template_main'] = 'audio_adminindex.html';
//Display the admin menu
xoops_module_admin_menu(0,_AM_AU_ADMENU0);
/**
* To use this as a template you need to write code to display
* whatever it is you want displaying between here...
*/
$audiodata = audioLoader();
$xoopsTpl->assign('audios', $audiodata);
function audioLoader(){
global $xoopsDB;
$audios =array();
$q=1;
$query = $xoopsDB->queryF(' SELECT * FROM ' . $xoopsDB->prefix('audios')); while($myrow = $xoopsDB->fetchArray($query) )
{
$audios[$q]['id'] = $myrow['id'];
$audios[$q]['title'] = $myrow['title'];
$audios[$q]['play'] = $myrow['play'];
$audios[$q]['source'] = $myrow['source'];
$audios[$q]['type'] = $myrow['type'];
$audios[$q]['size'] = $myrow['size'];
$audios[$q]['download'] = $myrow['download'];
$q++;
}
return $audios;
}
i am following kaotik tutorial
it is givng me this error
Fatal error: Call to a member function assign() on a non-object in
please help