function credits_events($actionid = '', $currencyid = 0, $array = false)
{
global $vbulletin;
$eventids = array();
foreach ($vbulletin->vbcredits['event'] AS $aid => $currencies)
{
if (empty($actionid) OR $actionid == $aid)
{
foreach ($currencies AS $cid => $events)
{
if (empty($currencyid) OR $currencyid == $cid) $eventids = array_merge($eventids, array_keys($events));
}
}
}
[COLOR="#FF0000"] foreach ($vbulletin->vbcredits['history'] AS $aid => $currencies)[/COLOR]
{
if (empty($actionid) OR $actionid == $aid)
{
foreach ($currencies AS $cid => $events)
{
if (empty($currencyid) OR $currencyid == $cid) $eventids = array_merge($eventids, $events);
}
}
}
$eventids = array_unique($eventids);
return ( $array ? $eventids : ( sizeof($eventids) ? 'eventid IN (' . implode(', ', $eventids) . ')' : '0' ) );
We use essential cookies to make this site work, and optional cookies to enhance your experience.