]> git.mxchange.org Git - mailer.git/commitdiff
More use of EL code
authorRoland Häder <roland@mxchange.org>
Wed, 6 Jul 2011 15:34:13 +0000 (15:34 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 6 Jul 2011 15:34:13 +0000 (15:34 +0000)
inc/modules/guest/what-top10.php
templates/de/html/guest/guest_top10_row_login.tpl

index 139f7f248ad6dc87ea6d8ed9ff0449c6a222cbba..863ff62ae634deac247f72891de65ee8c46852e2 100644 (file)
@@ -53,7 +53,7 @@ $rows = array();
 
 // TOP logins
 $result = SQL_QUERY("SELECT
 
 // TOP logins
 $result = SQL_QUERY("SELECT
-       `userid`, `total_logins`, `last_online`
+       `userid`, `last_online`
 FROM
        `{?_MYSQL_PREFIX?}_user_data`
 WHERE
 FROM
        `{?_MYSQL_PREFIX?}_user_data`
 WHERE
@@ -69,10 +69,7 @@ while ($content = SQL_FETCHARRAY($result)) {
        $content = array(
                'cnt'          => $count,
                'userid'       => $content['userid'],
        $content = array(
                'cnt'          => $count,
                'userid'       => $content['userid'],
-               'nickname'     => $content['nickname'],
-               'total_logins' => $content['total_logins'],
-               'points'       => getTotalPoints($content['userid']),
-               'last_online'  => generateDateTime($content['last_online'], 3),
+               'last_online'  => generateDateTime($content['last_online'], '3'),
        );
 
        // Load row template
        );
 
        // Load row template
@@ -125,13 +122,7 @@ LIMIT {?top10_max?}", __FILE__, __LINE__);
 $OUT = ''; $count = 1;
 while ($content = SQL_FETCHARRAY($result)) {
        // Prepare data for template
 $OUT = ''; $count = 1;
 while ($content = SQL_FETCHARRAY($result)) {
        // Prepare data for template
-       $content = array(
-               'cnt'         => $count,
-               'userid'      => $content['userid'],
-               'nickname'    => $content['nickname'],
-               'points'      => $content['points'],
-               'last_online' => generateDateTime($content['last_online'], 3)
-       );
+       $content['last_online'] = generateDateTime($content['last_online'], '3');
 
        // Load row template
        $OUT .= loadTemplate('guest_top10_row_earner', true, $content);
 
        // Load row template
        $OUT .= loadTemplate('guest_top10_row_earner', true, $content);
@@ -187,8 +178,7 @@ while ($content = SQL_FETCHARRAY($result)) {
                'cnt'         => $count,
                'userid'      => $content['userid'],
                'refs'        => $content['refs'],
                'cnt'         => $count,
                'userid'      => $content['userid'],
                'refs'        => $content['refs'],
-               'nickname'    => $content['nickname'],
-               'last_online' => generateDateTime($content['last_online'], 3)
+               'last_online' => generateDateTime($content['last_online'], '3')
        );
 
        // Load row template
        );
 
        // Load row template
index d390c75858f97eb130675dd7be5620ed37add930..fc17f05219394d00da510c8448b95dccf1f58942 100644 (file)
@@ -1,7 +1,7 @@
 <tr>
        <td class="top10_row1 {%template,ColorSwitch%} bottom right" align="center">$content[cnt]</td>
        <td class="top10_row2 {%template,ColorSwitch%} bottom right">$content[userid] ({%user,nickname,fixEmptyContentToDashes=$content[userid]%})</td>
 <tr>
        <td class="top10_row1 {%template,ColorSwitch%} bottom right" align="center">$content[cnt]</td>
        <td class="top10_row2 {%template,ColorSwitch%} bottom right">$content[userid] ({%user,nickname,fixEmptyContentToDashes=$content[userid]%})</td>
-       <td class="top10_row3 {%template,ColorSwitch%} bottom right">{%pipe,translateComma=$content[total_logins]%}</td>
-       <td class="top10_row4 {%template,ColorSwitch%} bottom right">{%pipe,translateComma=$content[points]%}</td>
+       <td class="top10_row3 {%template,ColorSwitch%} bottom right">{%user,total_logins,translateComma=$content[userid]%}</td>
+       <td class="top10_row4 {%template,ColorSwitch%} bottom right">{%pipe,getTotalPoints,translateComma=$content[userid]%}</td>
        <td class="top10_row5 {%template,ColorSwitch%} bottom">$content[last_online]</td>
 </tr>
        <td class="top10_row5 {%template,ColorSwitch%} bottom">$content[last_online]</td>
 </tr>