i18n standard entries
Dieser Commit ist enthalten in:
Ursprung
d68581e0f3
Commit
ebd8b29827
1 geänderte Dateien mit 97 neuen und 97 gelöschten Zeilen
|
@ -46,106 +46,106 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if(!current_user_can('manage_statz')) {
|
if(!current_user_can('manage_statz')) {
|
||||||
die('Zugriff verweigert');
|
die(semr_i18n("Restricted Area"));
|
||||||
}
|
}
|
||||||
|
|
||||||
### ANZEIGE LOG
|
global $wpdb;
|
||||||
|
|
||||||
|
$sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen
|
||||||
|
$limit = $sem_options["statz_datarecs_limit"]; $mask = $sem_options["statz_mask_referer"];
|
||||||
|
$completerecords = $wpdb->get_results("SELECT id, ip, time, referer, page, username FROM ".
|
||||||
|
$wpdb->statz." ORDER BY time DESC LIMIT 0, ".$limit);
|
||||||
|
|
||||||
|
print "<div class='wrap'>";
|
||||||
|
print "<div id='icon-semmelstatzR' class='icon32'><br /></div>";
|
||||||
|
print "<h2>SemmelstatzR > ".semr_i18n("Log")."</h2>";
|
||||||
|
print "<div class='statz'>";
|
||||||
|
printf(semr_i18n("The %s newest records"), $limit);
|
||||||
|
print "</div>";
|
||||||
|
|
||||||
global $wpdb;
|
if ($completerecords == NULL) {
|
||||||
|
print '<small>... '. semr_i18n("no entries at all").'</small>';
|
||||||
$sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen
|
return;
|
||||||
$limit = $sem_options["statz_datarecs_limit"]; $mask = $sem_options["statz_mask_referer"];
|
}
|
||||||
$completerecords =
|
|
||||||
$wpdb->get_results("SELECT id, ip, time, referer, page, username FROM ".$wpdb->statz." ORDER BY time DESC LIMIT 0, ".$limit);
|
|
||||||
|
|
||||||
print "<div class='wrap'>";
|
|
||||||
print "<div id='icon-semmelstatzR' class='icon32'><br /></div>";
|
|
||||||
print "<h2>SemmelstatzR › Log</h2>";
|
|
||||||
print "<div class='statz'>Die neuesten ".$limit." Datensätze</div>";
|
|
||||||
|
|
||||||
if ($completerecords == NULL) {
|
print "<table cellpadding='5' style='text-align:center; width:100%;'>";
|
||||||
print "<small>... noch keine Einträge</small>";
|
print "<thead>";
|
||||||
return;
|
print "<tr>";
|
||||||
}
|
print "<th style='text-align:center;width:110px;'><small>".semr_i18n("Date")."</small></th>";
|
||||||
|
print "<th style='text-align:center;width:80px;'><small>".semr_i18n("TCP/IP")."</small></th>";
|
||||||
print "<table cellpadding='5' style='text-align:center; width:100%;'>";
|
print "<th style='text-align:left;'><small>".semr_i18n("Referrer")."</small></th>";
|
||||||
print "<thead>";
|
print "<th style='text-align:left;'><small>".semr_i18n("Search term")."</small></th>";
|
||||||
print "<tr>";
|
print "<th style='text-align:left;'><small>".semr_i18n("Post/Page")."</small></th>";
|
||||||
print "<th style='text-align:center;width:110px;'><small>Datum</small></th>";
|
print "<th style='text-align:left;'><small>".semr_i18n("Username")."</small></th>";
|
||||||
print "<th style='text-align:center;width:80px;'><small>TCP/IP</small></th>";
|
print "</tr>";
|
||||||
print "<th style='text-align:left;'><small>Referer</small></th>";
|
print "</thead>";
|
||||||
print "<th style='text-align:left;'><small>Suchbegriff</small></th>";
|
print "<tbody>";
|
||||||
print "<th style='text-align:left;'><small>Post/Page</small></th>";
|
|
||||||
print "<th style='text-align:left;'><small>Username</small></th>";
|
foreach ($completerecords as $key=>$completerecord) {
|
||||||
print "</tr>";
|
$id = $completerecord->id;
|
||||||
print "</thead>";
|
$ip = $completerecord->ip;
|
||||||
print "<tbody>";
|
if(sem_checkIfIPisEncoded($ip) == true) $ip = sem_decodeIP($ip);
|
||||||
|
$date = mysql2date("d.m.Y G:i", $completerecord->time);
|
||||||
foreach ($completerecords as $key=>$completerecord) {
|
$referer = $completerecord->referer;
|
||||||
$id = $completerecord->id;
|
if($referer == "") {
|
||||||
$ip = $completerecord->ip;
|
$referer = "--";
|
||||||
if(sem_checkIfIPisEncoded($ip) == true) $ip = sem_decodeIP($ip);
|
}
|
||||||
$date = mysql2date("d.m.Y G:i", $completerecord->time);
|
else {
|
||||||
$referer = $completerecord->referer;
|
if(strlen($referer) >= 50) {
|
||||||
if($referer == "") {
|
$printreferer = substr($referer, 0, 50)."...";
|
||||||
$referer = "--";
|
}
|
||||||
}
|
else {
|
||||||
else {
|
$printreferer = $referer;
|
||||||
if(strlen($referer) >= 50) {
|
}
|
||||||
$printreferer = substr($referer, 0, 50)."...";
|
}
|
||||||
}
|
$keyword = sem_getKeyword($referer);
|
||||||
else {
|
if(empty($keyword)) $keyword ='--';
|
||||||
$printreferer = $referer;
|
$page = $completerecord->page;
|
||||||
}
|
if ($page == 0) {
|
||||||
}
|
$link = get_option('siteurl');
|
||||||
$keyword = sem_getKeyword($referer);
|
$title = "0"; //oder wie auch immer
|
||||||
if(empty($keyword)) $keyword ='--';
|
}
|
||||||
$page = $completerecord->page;
|
else {
|
||||||
if ($page == 0) {
|
$link = get_permalink($page);
|
||||||
$link = get_option('siteurl');
|
$postarray = get_post($page, ARRAY_A);
|
||||||
$title = "0"; //oder wie auch immer
|
$title = $postarray['post_title'];
|
||||||
}
|
}
|
||||||
else {
|
$username = $completerecord->username;
|
||||||
$link = get_permalink($page);
|
print "<tr"; if(1&$key) print " class='alternate'"; print ">";
|
||||||
$postarray = get_post($page, ARRAY_A);
|
print "<td style='white-space:nowrap;text-align:center;'><small>".$date."</small></td>";
|
||||||
$title = $postarray['post_title'];
|
print "<td style='white-space:nowrap;text-align:center;'>
|
||||||
}
|
<a target='_blank' style='border:none;' href='http://ws.arin.net/whois/?queryinput=".$ip."'>
|
||||||
$username = $completerecord->username;
|
<img src='".get_option('siteurl')."/wp-content/plugins/semmelstatzR/img/arin.png' /></a>
|
||||||
print "<tr"; if(1&$key) print " class='alternate'"; print ">";
|
<a target='_blank' style='border:none;' href='http://www.ripe.net/whois?searchtext=".$ip."'>
|
||||||
print "<td style='white-space:nowrap;text-align:center;'><small>".$date."</small></td>";
|
<img src='".get_option('siteurl')."/wp-content/plugins/semmelstatzR/img/ripe.png' /></a>
|
||||||
print "<td style='white-space:nowrap;text-align:center;'>
|
<a target='_blank' style='border:none;' href='http://www.utrace.de/?query=".$ip."'>
|
||||||
<a target='_blank' style='border:none;' href='http://ws.arin.net/whois/?queryinput=".$ip."'>
|
<img src='".get_option('siteurl')."/wp-content/plugins/semmelstatzR/img/utrace.png' /></a></td>";
|
||||||
<img src='".get_option('siteurl')."/wp-content/plugins/semmelstatzR/img/arin.png' /></a>
|
print "<td style='text-align:left;'><small>";
|
||||||
<a target='_blank' style='border:none;' href='http://www.ripe.net/whois?searchtext=".$ip."'>
|
if ($referer == "--") {
|
||||||
<img src='".get_option('siteurl')."/wp-content/plugins/semmelstatzR/img/ripe.png' /></a>
|
print "--</small></td>";
|
||||||
<a target='_blank' style='border:none;' href='http://www.utrace.de/?query=".$ip."'>
|
}
|
||||||
<img src='".get_option('siteurl')."/wp-content/plugins/semmelstatzR/img/utrace.png' /></a></td>";
|
else {
|
||||||
print "<td style='text-align:left;'><small>";
|
if($mask != true) {
|
||||||
if ($referer == "--") {
|
print "<a target='_blank' style='text-decoration:none;' href='".$referer."'>".$printreferer."</a></td>";
|
||||||
print "--</small></td>";
|
}
|
||||||
}
|
else {
|
||||||
else {
|
$referer = htmlspecialchars($referer, ENT_QUOTES);
|
||||||
if($mask != true) {
|
print "<a target='_blank' style='text-decoration:none;' href='http://www.google.com/url?sa=D&q=".$referer."'>".$printreferer."</a></td>";
|
||||||
print "<a target='_blank' style='text-decoration:none;' href='".$referer."'>".$printreferer."</a></td>";
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
$referer = htmlspecialchars($referer, ENT_QUOTES);
|
print "<td style='text-align:left;'><small>".$keyword."</small></td>";
|
||||||
print "<a target='_blank' style='text-decoration:none;' href='http://www.google.com/url?sa=D&q=".$referer."'>".$printreferer."</a></td>";
|
print "<td style='text-align:left;'><small><a target='_blank' style='text-decoration:none;' href='".$link."'>".$title."</small></td>";
|
||||||
}
|
print "<td style='text-align:left;'><small>".$username."</small></td>";
|
||||||
}
|
print "</tr>";
|
||||||
|
}
|
||||||
print "<td style='text-align:left;'><small>".$keyword."</small></td>";
|
|
||||||
print "<td style='text-align:left;'><small><a target='_blank' style='text-decoration:none;' href='".$link."'>".$title."</small></td>";
|
print "</tbody>";
|
||||||
print "<td style='text-align:left;'><small>".$username."</small></td>";
|
print "</table>";
|
||||||
print "</tr>";
|
print "<hr />";
|
||||||
}
|
|
||||||
|
if (function_exists('sem_showCopyright')) sem_showCopyright();
|
||||||
print "</tbody>";
|
|
||||||
print "</table>";
|
print "</div>";
|
||||||
print "<hr />";
|
|
||||||
|
|
||||||
if (function_exists('sem_showCopyright')) sem_showCopyright();
|
|
||||||
|
|
||||||
print "</div>";
|
|
||||||
|
|
||||||
?>
|
?>
|
Laden …
In neuem Issue referenzieren