]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_rallyes.php
Performance hacks, encapsulation and more EL code usage:
[mailer.git] / inc / modules / admin / what-list_rallyes.php
index fa0d0a2ee912fbb408efd0230f5eec737ae9c30f..fda9a05b29ebd83329b0e48ffc1903e3e15dfa22 100644 (file)
@@ -14,8 +14,6 @@
  * $Date::                                                            $ *
  * $Tag:: 0.2.1-FINAL                                                 $ *
  * $Author::                                                          $ *
- * Needs to be in all Files and every File needs "svn propset           *
- * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
  * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
@@ -43,7 +41,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 } // END - if
 
 // Add description as navigation point
-addMenuDescription('admin', __FILE__);
+addYouAreHereLink('admin', __FILE__);
 
 // Init message
 $message = '';
@@ -244,14 +242,17 @@ ORDER BY
                $content['rallye'] = getRequestParameter('rallye');
                while ($row = SQL_FETCHARRAY($result)) {
                        // Check for referal count
-                       $cnt = getReferalRallyeRefsCount($row['userid'], $row['refs']);
+                       $count = getReferalRallyeRefsCount($row['userid'], $row['refs']);
 
                        // Init variables
                        $bl = '';
                        $br = '';
 
                        // Output row
-                       if (($row['curr_points'] > 0) && ($cnt > 0)) { $bl = '<strong>'; $br = '</strong>'; }
+                       if (($row['curr_points'] > 0) && ($count > 0)) {
+                               $bl = '<strong>';
+                               $br = '</strong>';
+                       } // END - if
 
                        // Get user points
                        $points = countSumTotalData($row['userid'], 'user_points', 'points', 'userid', false, " AND `ref_depth`=1 LIMIT 1");
@@ -262,8 +263,8 @@ ORDER BY
                                'userid'  => $row['userid'],
                                'bold_l'  => $bl ,
                                'bold_r'  => $br ,
-                               'rews'    => $row['refs'],
-                               'cnt'     => $cnt,
+                               'refs'    => $row['refs'],
+                               'cnt'     => $count,
                                'opoints' => ($points - $row['curr_points']),
                        );
 
@@ -299,9 +300,6 @@ ORDER BY
                // List found rallyes
                $OUT = '';
                while ($data = SQL_FETCHARRAY($result)) {
-                       // Load admin login
-                       $data['login'] = getAdminLogin($data['admin_id']);
-
                        // Count joined userids
                        $users = countSumTotalData($data['id'], 'rallye_users', 'id', 'rallye_id', true);
 
@@ -311,14 +309,10 @@ ORDER BY
                                $users = '<a href="{%url=modules.php?module=admin&amp;what=list_rallyes&amp;sub=users&amp;rallye=' . $data['id'] . '%}" title="{--RALLYE_LIST_USERS_TITLE--}">' . $users . '</a>';
                        } // END - if
 
-                       // Alter some variables
-                       if (empty($data['login']))    $data['login']     = '???';
-
                        // Transfer data into array for the template
                        $row = array(
-                               'select'            => '<input type="checkbox" name="sel[' . $data['id'] . ']" class="admin_normal" value="1" />',
+                               'select'            => '<input type="checkbox" name="sel[' . $data['id'] . ']" class="form_field" value="1" />',
                                'admin_id'          => $data['admin_id'],
-                               'login'             => $data['login'],
                                'id'                => $data['id'],
                                'title'             => $data['title'],
                                'template'          => $data['template'],