From 5749103a3e1adc19d7876b7f07aefd12911880fc Mon Sep 17 00:00:00 2001 From: Oldperl <44996956+oldperl@users.noreply.github.com> Date: Sat, 17 Dec 2011 17:02:05 +0000 Subject: [PATCH] i18n standard entries --- semmelstatzR-log.php | 194 +++++++++++++++++++++---------------------- 1 file changed, 97 insertions(+), 97 deletions(-) diff --git a/semmelstatzR-log.php b/semmelstatzR-log.php index 6a2b819..971e665 100644 --- a/semmelstatzR-log.php +++ b/semmelstatzR-log.php @@ -46,106 +46,106 @@ */ 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 "
"; +print "

"; +print "

SemmelstatzR > ".semr_i18n("Log")."

"; +print "
"; +printf(semr_i18n("The %s newest records"), $limit); +print "
"; - 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 "
"; - print "

"; - print "

SemmelstatzR › Log

"; - print "
Die neuesten ".$limit." Datensätze
"; +if ($completerecords == NULL) { + print '... '. semr_i18n("no entries at all").''; + return; +} - if ($completerecords == NULL) { - print "... noch keine Einträge"; - return; - } - - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - print ""; - 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 ""; - print ""; - print ""; - } - else { - if($mask != true) { - print "".$printreferer.""; - } - else { - $referer = htmlspecialchars($referer, ENT_QUOTES); - print "".$printreferer.""; - } - } - - print ""; - print ""; - print ""; - print ""; - } - - print ""; - print "
DatumTCP/IPRefererSuchbegriffPost/PageUsername
".$date." - -   - -   - - "; - if ($referer == "--") { - print "--".$keyword."".$title."".$username."
"; - print "
"; - - if (function_exists('sem_showCopyright')) sem_showCopyright(); - - print "
"; +print ""; +print ""; +print ""; +print ""; +print ""; +print ""; +print ""; +print ""; +print ""; +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 ""; +print ""; +print ""; +} +else { +if($mask != true) { +print "".$printreferer.""; +} +else { +$referer = htmlspecialchars($referer, ENT_QUOTES); +print "".$printreferer.""; +} +} + +print ""; +print ""; +print ""; +print ""; +} + +print ""; +print "
".semr_i18n("Date")."".semr_i18n("TCP/IP")."".semr_i18n("Referrer")."".semr_i18n("Search term")."".semr_i18n("Post/Page")."".semr_i18n("Username")."
".$date." + +  + +  + +"; +if ($referer == "--") { +print "--".$keyword."".$title."".$username."
"; +print "
"; + +if (function_exists('sem_showCopyright')) sem_showCopyright(); + +print "
"; ?> \ No newline at end of file