1
0
Fork 0

i18n standard entries

Dieser Commit ist enthalten in:
oldperl 2011-12-17 16:26:57 +00:00
Ursprung b90587fef1
Commit 172c9c52da

Datei anzeigen

@ -147,7 +147,7 @@ function sem_draw24HoursGoo() {
print "<div align='left'>"; print "<div align='left'>";
if(empty($results)) { if(empty($results)) {
print '<small>... '. semr_i18n("no entries at all").'</small></div>'; print '<small>... '. semr_i18n("no entries at all").'</small>';
print "<hr />"; print "<hr />";
return; return;
} }
@ -223,19 +223,21 @@ function sem_draw24HoursGoo() {
AS referers, substring(time,1,10) AS date FROM ".$wpdb->statz." WHERE time >= CURDATE() - INTERVAL ".$daylimit." DAY AS referers, substring(time,1,10) AS date FROM ".$wpdb->statz." WHERE time >= CURDATE() - INTERVAL ".$daylimit." DAY
GROUP BY date ORDER BY time DESC"); GROUP BY date ORDER BY time DESC");
print "<div class='statz'>".$limit."-Tage-Statistik</div>"; print '<div class="statz">';
printf (semr_i18n("%s-Days-Statz"), $limit);
print '</div>';
if (empty($thedays)) { if (empty($thedays)) {
print '<small>... '. semr_i18n("no entries at all").'</small></div>'; print '<small>... '. semr_i18n("no entries at all").'</small>';
print "<hr />"; print "<hr />";
return; return;
} }
print "<table class='statzelement'>"; print "<table class='statzelement'>";
print "<thead>"; print "<thead>";
print "<tr>"; print "<tr>";
print "<th style='text-align:left;'>Datum</th>"; print "<th style='text-align:left;'>".semr_i18n("Date")."</th>";
print "<th style='width: 15%;text-align:center;'>Besucher</th>"; print "<th style='width: 15%;text-align:center;'>".semr_i18n("Visitors")."</th>";
print "<th style='width: 15%;text-align:center;'>Hits</th>"; print "<th style='width: 15%;text-align:center;'>".semr_i18n("Hits")."</th>";
print "<th style='width: 15%;text-align:center;'>Referer</th>"; print "<th style='width: 15%;text-align:center;'>".semr_i18n("Referer")."</th>";
print "</tr>"; print "</tr>";
print "</thead>"; print "</thead>";
print "<tbody>"; print "<tbody>";
@ -245,13 +247,13 @@ function sem_draw24HoursGoo() {
$today = time(); $today = time();
$difference = ceil(($today - $date) / (60*60*24))-1; $difference = ceil(($today - $date) / (60*60*24))-1;
if($difference == 0) { if($difference == 0) {
$date = "Heute"; $date = semr_i18n("Today");
} }
elseif($difference == 1) { elseif($difference == 1) {
$date = "Gestern"; $date = semr_i18n("Yesterday");
} }
elseif($difference == 2) { elseif($difference == 2) {
$date = "Vorgestern"; $date = semr_i18n("2 days ago");
} }
else { else {
$date = mysql2date("d.m.Y",$theday->date); $date = mysql2date("d.m.Y",$theday->date);
@ -267,7 +269,7 @@ function sem_draw24HoursGoo() {
print "</tr>"; print "</tr>";
} }
print "<tr>"; print "<tr>";
print "<td style='text-align:left;'><a href='".get_option('siteurl')."/wp-admin/admin.php?page=semmelstatzR/semmelstatzR-history.php'>mehr...</a></td>"; print "<td style='text-align:left;'><a href='".get_option('siteurl')."/wp-admin/admin.php?page=semmelstatzR/semmelstatzR-history.php'>".semr_i18n("more")."...</a></td>";
print "</tr>"; print "</tr>";
print "</tbody>"; print "</tbody>";
print "</table>"; print "</table>";
@ -284,17 +286,19 @@ function sem_draw24HoursGoo() {
$lastreferers = $wpdb->get_results("SELECT DISTINCT referer, time FROM ".$wpdb->statz." WHERE referer $lastreferers = $wpdb->get_results("SELECT DISTINCT referer, time FROM ".$wpdb->statz." WHERE referer
NOT LIKE '".$homehost."' ORDER BY time DESC LIMIT 0, ".$limit); NOT LIKE '".$homehost."' ORDER BY time DESC LIMIT 0, ".$limit);
print "<div class='statz'>Die letzten ".$limit." Referer</div>"; print "<div class='statz'>";
printf (semr_i18n("The last %s Referrer"), $limit);
print "</div>";
if (empty($lastreferers)) { if (empty($lastreferers)) {
print '<small>... '. semr_i18n("no entries at all").'</small></div>'; print '<small>... '. semr_i18n("no entries at all").'</small>';
print "<hr />"; print "<hr />";
return; return;
} }
print "<table class='statzelement'>"; print "<table class='statzelement'>";
print "<thead>"; print "<thead>";
print "<tr>"; print "<tr>";
print "<th style='text-align:center;width:12%;'>Zeit</th>"; print "<th style='text-align:center;width:12%;'>".semr_i18n("Time")."</th>";
print "<th style='text-align:left;'>Referer</th>"; print "<th style='text-align:left;'>".semr_i18n("Referrer")."</th>";
print "</tr>"; print "</tr>";
print "</thead>"; print "</thead>";
print "<tbody>"; print "<tbody>";
@ -331,18 +335,20 @@ function sem_draw24HoursGoo() {
$results = $wpdb->get_results("SELECT referer, time, ip FROM $wpdb->statz WHERE referer != 'NULL' ORDER BY time DESC"); $results = $wpdb->get_results("SELECT referer, time, ip FROM $wpdb->statz WHERE referer != 'NULL' ORDER BY time DESC");
print "<div class='statz'>Die letzten $limit Suchbegriffe</div>"; print "<div class='statz'>";
printf(semr_i18n("The last %s search terms"), $limit);
print "</div>";
if (empty($results)) { if (empty($results)) {
print '<small>... '. semr_i18n("no entries at all").'</small></div>'; print '<small>... '. semr_i18n("no entries at all").'</small>';
print "<hr />"; print "<hr />";
return; return;
} }
print "<table class='statzelement'>"; print "<table class='statzelement'>";
print "<thead>"; print "<thead>";
print "<tr>"; print "<tr>";
print "<th style='text-align: center;width:12%;'>Zeit</th>"; print "<th style='text-align: center;width:12%;'>".semr_i18n("Time")."</th>";
print "<th style='text-align:left;width:70%;'>Suchbegriff</th>"; print "<th style='text-align:left;width:70%;'>".semr_i18n("search term")."</th>";
print "<th style='text-align:left;'>TCP/IP</th>"; print "<th style='text-align:left;'>".semr_i18n("TCP/IP")."</th>";
print "</tr>"; print "</tr>";
print "</thead>"; print "</thead>";
print "<tbody>"; print "<tbody>";
@ -382,18 +388,19 @@ function sem_draw24HoursGoo() {
COUNT(".$wpdb->statz.".page) AS count FROM ".$wpdb->posts.", ".$wpdb->statz." WHERE COUNT(".$wpdb->statz.".page) AS count FROM ".$wpdb->posts.", ".$wpdb->statz." WHERE
".$wpdb->statz.".page = ".$wpdb->posts.".ID AND time >= '$today' GROUP BY postid ORDER BY count DESC LIMIT 10"); ".$wpdb->statz.".page = ".$wpdb->posts.".ID AND time >= '$today' GROUP BY postid ORDER BY count DESC LIMIT 10");
print "<div class='statz'>Die Top10 aller Posts & Pages heute</div>"; print "<div class='statz'>";
print semr_i18n("Top 10 of todays posts &amp; pages")."</div>";
if (empty($topreads)) { if (empty($topreads)) {
print '<small>... '. semr_i18n("no entries at all").'</small></div>'; print '<small>... '. semr_i18n("no entries at all").'</small>';
print "<hr />"; print "<hr />";
return; return;
} }
print "<table class='statzelement'>"; print "<table class='statzelement'>";
print "<thead>"; print "<thead>";
print "<tr>"; print "<tr>";
print "<th style='text-align: left; width: 45%;'>Post/Page</th>"; print "<th style='text-align: left; width: 45%;'>".semr_i18n("Post/Page")."</th>";
print "<th style='text-align: left; width: 45%;'>Postname</th>"; print "<th style='text-align: left; width: 45%;'>".semr_i18n("Postname")."</th>";
print "<th style='text-align: center; width: 10%;'>Hits</th>"; print "<th style='text-align: center; width: 10%;'>".semr_i18n("Hits")."</th>";
print "</tr>"; print "</tr>";
print "</thead>"; print "</thead>";
print "<tbody>"; print "<tbody>";
@ -422,18 +429,20 @@ function sem_draw24HoursGoo() {
$topreads = $wpdb->get_results("SELECT post_title AS posttitle, post_name as postname, guid AS postid, $topreads = $wpdb->get_results("SELECT post_title AS posttitle, post_name as postname, guid AS postid,
hits AS count FROM ".$wpdb->posts." WHERE hits != '0' GROUP BY postid ORDER BY hits DESC LIMIT 0, ".$limit); hits AS count FROM ".$wpdb->posts." WHERE hits != '0' GROUP BY postid ORDER BY hits DESC LIMIT 0, ".$limit);
print "<div class='statz'>Die Top".$limit." aller Posts & Pages</div>"; print "<div class='statz'>";
printf (semr_i18n("Top %s of all posts &amp; pages"), $limit);
print "</div>";
if (empty($topreads)) { if (empty($topreads)) {
print '<small>... '. semr_i18n("no entries at all").'</small></div>'; print '<small>... '. semr_i18n("no entries at all").'</small>';
print "<hr />"; print "<hr />";
return; return;
} }
print "<table class='statzelement'>"; print "<table class='statzelement'>";
print "<thead>"; print "<thead>";
print "<tr>"; print "<tr>";
print "<th style='text-align: left; width: 45%;'>Post/Page</th>"; print "<th style='text-align: left; width: 45%;'>".semr_i18n("Post/Page")."</th>";
print "<th style='text-align: left; width: 45%;'>Postname</th>"; print "<th style='text-align: left; width: 45%;'>".semr_i18n("Postname")."</th>";
print "<th style='text-align: center; width: 10%;'>Hits</th>"; print "<th style='text-align: center; width: 10%;'>".semr_i18n("Hits")."</th>";
print "</tr>"; print "</tr>";
print "</thead>"; print "</thead>";
print "<tbody>"; print "<tbody>";
@ -463,14 +472,14 @@ function sem_draw24HoursGoo() {
print semr_i18n("Known visitors today"); print semr_i18n("Known visitors today");
print '</div>'; print '</div>';
if (empty($todaysonlineusers)) { if (empty($todaysonlineusers)) {
print '<small>... '. semr_i18n("no entries at all").'</small></div>'; print '<small>... '. semr_i18n("no entries at all").'</small>';
print "<hr />"; print "<hr />";
return; return;
} }
print "<table class='statzelement'>"; print "<table class='statzelement'>";
print "<thead>"; print "<thead>";
print "<tr>"; print "<tr>";
print "<th style='text-align: left; width: 80%;'>Besucher (Hits)</th>"; print "<th style='text-align: left; width: 80%;'>".semr_i18n("Visitor (Hits)")."</th>";
print "</tr>"; print "</tr>";
print "</thead>"; print "</thead>";
print "<tbody>"; print "<tbody>";
@ -492,9 +501,10 @@ function sem_draw24HoursGoo() {
".$wpdb->comments.",". $wpdb->posts." WHERE comment_approved = '1' AND comment_post_id = id ".$wpdb->comments.",". $wpdb->posts." WHERE comment_approved = '1' AND comment_post_id = id
GROUP BY guid ORDER BY count DESC LIMIT 0, 10"); GROUP BY guid ORDER BY count DESC LIMIT 0, 10");
print "<div class='statz'>Die Top10 aller kommentierter Posts</div>"; print "<div class='statz'>";
print semr_i18n("Top 10 of all commented posts")."</div>";
if (empty($topcommentedposts)) { if (empty($topcommentedposts)) {
print "<small>... noch keine Eintr&auml;ge</small>"; print '<small>... '. semr_i18n("no entries at all").'</small>';
print "<hr />"; print "<hr />";
return; return;
} }
@ -502,8 +512,8 @@ function sem_draw24HoursGoo() {
print "<table class='statzelement'>"; print "<table class='statzelement'>";
print "<thead>"; print "<thead>";
print "<tr>"; print "<tr>";
print "<th style='text-align: left; width: 80%;'>Post/Page</th>"; print "<th style='text-align: left; width: 80%;'>".semr_i18n("Post/Page")."</th>";
print "<th style='text-align: center; width: 20%;'>Kommentare</th>"; print "<th style='text-align: center; width: 20%;'>".semr_i18n("Comments")."</th>";
print "</tr>"; print "</tr>";
print "</thead>"; print "</thead>";
print "<tbody>"; print "<tbody>";
@ -517,7 +527,6 @@ function sem_draw24HoursGoo() {
print "<td style='text-align: center;'>".$count."</td>"; print "<td style='text-align: center;'>".$count."</td>";
print "</tr>"; print "</tr>";
} }
print "</tbody>"; print "</tbody>";
print "</table>"; print "</table>";
print "<hr />"; print "<hr />";
@ -533,9 +542,11 @@ function sem_draw24HoursGoo() {
comment_author_email AS email, comment_author_url AS homepage FROM " .$wpdb->comments . " WHERE comment_author_email AS email, comment_author_url AS homepage FROM " .$wpdb->comments . " WHERE
comment_approved = '1' GROUP BY comment_author ORDER BY count DESC LIMIT 0, ".$limit); comment_approved = '1' GROUP BY comment_author ORDER BY count DESC LIMIT 0, ".$limit);
print "<div class='statz'>Die Top".$limit." aller Kommentierer</div>"; print "<div class='statz'>";
printf(semr_i18n("Top %s of all commentators"), $limit);
print "</div>";
if (empty($topcommenters)) { if (empty($topcommenters)) {
print "<small>... noch keine Eintr&auml;ge</small>"; print '<small>... '. semr_i18n("no entries at all").'</small>';
print "<hr />"; print "<hr />";
return; return;
} }
@ -543,10 +554,10 @@ function sem_draw24HoursGoo() {
print "<table class='statzelement'>"; print "<table class='statzelement'>";
print "<thead>"; print "<thead>";
print "<tr>"; print "<tr>";
print "<th style='text-align: left; width: 20%;'>User</th>"; print "<th style='text-align: left; width: 20%;'>".semr_i18n("User")."</th>";
print "<th style='text-align: left; width: 30%;'>Email</th>"; print "<th style='text-align: left; width: 30%;'>".semr_i18n("Email")."</th>";
print "<th style='text-align: left; width: 40%;'>Homepage</th>"; print "<th style='text-align: left; width: 40%;'>".semr_i18n("Homepage")."</th>";
print "<th style='text-align: center; width: 10%;'>Kommentare</th>"; print "<th style='text-align: center; width: 10%;'>".semr_i18n("Comments")."</th>";
print "</tr>"; print "</tr>";
print "</thead>"; print "</thead>";
print "<tbody>"; print "<tbody>";
@ -577,7 +588,7 @@ function sem_draw24HoursGoo() {
print "<div class='wrap'>"; print "<div class='wrap'>";
print "<div><a name='top'></a></div>"; print "<div><a name='top'></a></div>";
print "<div id='icon-semmelstatzR' class='icon32'><br /></div>"; print "<div id='icon-semmelstatzR' class='icon32'><br /></div>";
print "<h2>SemmelstatzR &rsaquo; Aktuell</h2>"; print "<h2>SemmelstatzR &gt; ".semr_i18n("Current Statz")."</h2>";
$sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen $sem_options = get_option('semmelstatzR_options'); ### optionsarray auslesen
if ($sem_options["statz_show_useronline"]) sem_showWhoIsOnline(); if ($sem_options["statz_show_useronline"]) sem_showWhoIsOnline();
sem_draw24HoursGoo(); sem_draw24HoursGoo();