get_results("SELECT id, ip, time, referer, page, username FROM ".$wpdb->statz." ORDER BY time DESC LIMIT 0, ".$limit);
print "
";
print "
";
print "
Semmelstatz › Log
";
print "
Die neuesten ".$limit." Datensätze
";
if ($completerecords == NULL) {
print "
... noch keine Einträge";
return;
}
print "
";
print "";
print "";
print "Datum | ";
print "TCP/IP | ";
print "Referer | ";
print "Suchbegriff | ";
print "Post/Page | ";
print "Username | ";
print "
";
print "";
print "";
foreach ($completerecords as $key=>$completerecord) {
$id = $completerecord->id;
$ip = $completerecord->ip;
if(sem_checkIfIPisEncoded($ip) == true) $ip = sem_decodeIP($ip);
$date = mysql2date("d.m.Y G:i", $completerecord->time);
$referer = $completerecord->referer;
if($referer == "") {
$referer = "--";
}
else {
if(strlen($referer) >= 50) {
$printreferer = substr($referer, 0, 50)."...";
}
else {
$printreferer = $referer;
}
}
$keyword = sem_getKeyword($referer);
if(empty($keyword)) $keyword ='--';
$page = $completerecord->page;
if ($page == 0) {
$link = get_option('siteurl');
$title = "0"; //oder wie auch immer
}
else {
$link = get_permalink($page);
$postarray = get_post($page, ARRAY_A);
$title = $postarray['post_title'];
}
$username = $completerecord->username;
print "";
print "".$date." | ";
print "
| ";
print "";
if ($referer == "--") {
print "-- | ";
}
else {
if($mask != true) {
print "".$printreferer."";
}
else {
$referer = htmlspecialchars($referer, ENT_QUOTES);
print "".$printreferer."";
}
}
print "".$keyword." | ";
print "".$title." | ";
print "".$username." | ";
print "
";
}
print "";
print "
";
print "
";
if (function_exists('sem_showCopyright')) sem_showCopyright();
print "
";
?>