31
I just added the functions to /include/functions.php and added the following to /admin/category.php:
$client_select = new XoopsFormSelect( _AM_WFL_CATSPONSOR, 'client_id', $client_id, false);
$sql5 = "SELECT cid, name FROM " . $xoopsDB->prefix('bannerclient') . " ORDER BY name ASC";
$result5 = $xoopsDB -> query($sql5);
$client_array = array();
$client_array[0] = ' ';
while ($myrow = $xoopsDB -> fetchArray($result5)) {
$client_array[$myrow['cid']] = $myrow['name'];
}
$client_select -> addOptionArray($client_array);
$sform -> addElement( $client_select );
In viewcat.php I have
if ($head_arr['client_id'] > 0){
$catarray['imageheader'] = wfl_getbanner_from_id_client( $head_arr['client_id'] );
} else {
$catarray['imageheader'] = wfl_imageheader();
}
to display the banner or the index page logo if no banner is selected.
Probably have to do some more fine tuning.
Now I need a block to show the clients the stats....