get( 'max', 15 ) ); // Style attributes for table formatting $tabstyle = $params->get( 'tabstyle', '' ); // 0 - show all logged events; 1 - show downloads; 2 - show uploads; 3 - show votes $showtype = intval( $params->get( 'showtype', 0 ) ); // Set to '1' to show guest downloads, set to 0 to not show them $showguests = intval( $params->get( 'showguests', 0 ) ); // URL string to prepend to IP of unregistered users $dnslookup = $params->get( 'dnslookup', '' ); } else { $max = $params->max; if (!$max) $max = 15; $tabstyle = $params->tabstyle; if (!$tabstyle) $tabstyle = ''; $showtype = $params->showtype; if (!is_numeric($showtype)) $showtype = 0; if (strlen($showtype)==0) $showtype = 0; $showguests = $params->showguests; if (!is_numeric($showguests)) $showguests = 0; if (strlen($showguests)==0) $showguests = 0; $dnslookup = $params->dnslookup; if (!$dnslookup) $dnslookup = ''; } if (!is_numeric($max)) $max=15; $max = max($max,1); // If set to 1 record is shown in table. Setting start value here. $showrecord=1; /*******************************************************/ $content =""; $query=("SELECT d.type, d.date, d.userid, d.fileid, d.ipaddress, u.name, f.filetitle, f.downloads" ."\n FROM #__users AS u" ."\n RIGHT JOIN #__downloads_log AS d ON d.userid = u.id" ."\n INNER JOIN #__downloads_files AS f ON d.fileid = f.id" ."\n ORDER BY d.date desc LIMIT $max"); $database->setQuery($query); $meslist = $database->loadObjectList(); //show filtered users, events $filter = "("; if ($showguests==0) { $filter.="no guests"; } else { $filter.="all users"; } $filter.="/"; if ($showtype==0) { $filter.="all events"; } elseif ($showtype==1) { $filter.="downloads only"; } elseif ($showtype==2) { $filter.="uploads only"; } elseif ($showtype==3) { $filter.="votes only"; } $filter.=")"; ?>
| Type | Date | Time | File | Hits | Initiated by |
|---|---|---|---|---|---|
| ".$type." | " ."\n".$ddate." | " ."\n".$dtime." | " ."\n".$file." | " ."\n".$hits." | "; if ($userid==0) { if ($dnslookup=='') { $content.="".$ipaddress." | ".$ipaddress." | "; } } else { $content.="".$user." | "; } } $showrecord=1; } echo($content); ?>