]> git.mxchange.org Git - mailer.git/commitdiff
SQL query and inconsistencies fixed, TODOs.txt updated
authorRoland Häder <roland@mxchange.org>
Thu, 29 Oct 2009 04:14:01 +0000 (04:14 +0000)
committerRoland Häder <roland@mxchange.org>
Thu, 29 Oct 2009 04:14:01 +0000 (04:14 +0000)
DOCS/TODOs.txt
inc/modules/admin/what-config_rallye_prices.php
inc/modules/admin/what-list_rallyes.php
templates/de/html/admin/admin_list_rallye_prices_row.tpl
templates/de/html/admin/admin_list_rallyes_row.tpl

index 96ecd6353ac97951ee9de198a812e04e0ca19916..cf295ec2c53b1520b6eaf31a510e6bdb42b55e4e 100644 (file)
@@ -87,7 +87,6 @@
 ./inc/modules/admin/what-config_mods.php:137:          // @TODO Rewritings: mod->module in template
 ./inc/modules/admin/what-config_rallye_prices.php:202:                         // @TODO Rewritings: level->price_level, infos->info in template
 ./inc/modules/admin/what-config_rallye_prices.php:219:                 // @TODO Rewrite these two constants
-./inc/modules/admin/what-config_rallye_prices.php:254:                 // @TODO Rewritings: admin_id->admin_id, alogin->login in template
 ./inc/modules/admin/what-config_register.php:67:       // @TODO Move this HTML code into a template
 ./inc/modules/admin/what-edit_user.php:20: * @TODO Add support for ext-country                                    *
 ./inc/modules/admin/what-email_archiv.php:91:  // @TODO Rewrite to SQL_FETCHARRAY()
index 1e2fd625b6b89c16c93032dbfb8e8b561db772c3..ddb605da4974e3274ba793bb252cefd1ced84f9c 100644 (file)
@@ -188,8 +188,8 @@ VALUES ('%s','%s','%s','%s')",
                }
        } else {
                // a rallye was selected, so check if there are already prices assigned...
-               $result = SQL_QUERY_ESC("SELECT id, price_level, points, info FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE rallye_id=%s ORDER BY price_level",
-               array(bigintval(getRequestElement('rallye'))), __FILE__, __LINE__);
+               $result = SQL_QUERY_ESC("SELECT `id`, `price_level`, points`, `info` FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `rallye_id`=%s ORDER BY `price_level` ASC",
+                       array(bigintval(getRequestElement('rallye'))), __FILE__, __LINE__);
 
                if (SQL_NUMROWS($result) > 0) {
                        // Load all prices for the selected rallye
@@ -236,13 +236,13 @@ VALUES ('%s','%s','%s','%s')",
        $result = SQL_QUERY("SELECT
        d.id, d.admin_id, d.start_time, d.end_time, d.title, a.login, d.is_active
 FROM
-       `{?_MYSQL_PREFIX?}_rallye_data` AS d,
+       `{?_MYSQL_PREFIX?}_rallye_data` AS d
 LEFT JOIN
        `{?_MYSQL_PREFIX?}_admins` AS a
 ON
        d.admin_id=a.id
 ORDER BY
-       `d.start_time` DESC", __FILE__, __LINE__);
+       d.start_time DESC", __FILE__, __LINE__);
        if (SQL_NUMROWS($result) > 0) {
                // List found rallyes
                $OUT = ''; $SW = 2;
@@ -251,15 +251,14 @@ ORDER BY
                        if ($content['is_active'] == 'Y') $select = "<div class=\"big\">".$content['id']."</div>";
 
                        // Prepare data for the row template
-                       // @TODO Rewritings: admin_id->admin_id, alogin->login in template
                        $content = array(
                                'sw'         => $SW,
                                'id'         => $content['id'],
                                'select'     => $select,
                                'title'      => $content['title'],
-                               'admin_id'        => $content['admin_id'],
+                               'admin_id'   => $content['admin_id'],
                                'email_link' => generateEmailLink($content['admin_id']),
-                               'alogin'     => $content['login'],
+                               'login'      => $content['login'],
                                'start'      => generateDateTime($content['start_time'], 3),
                                'end'        => generateDateTime($content['end_time'], 3),
                        );
index 1b945c75a9ab0acf2c8d660b4e2f258b9d110152..93272e1003f6acc908ae2f95fbd13dc7d63cdd95 100644 (file)
@@ -283,7 +283,7 @@ ORDER BY start_time DESC",
                $OUT = ''; $SW = 2;
                while ($row = SQL_FETCHARRAY($result)) {
                        // Load admin login
-                       $row['alogin'] = getAdminLogin($row['admin_id']);
+                       $row['login'] = getAdminLogin($row['admin_id']);
 
                        // Count joined userids
                        $joined = countSumTotalData($row['id'], "rallye_users", 'id', "rallye_id", true);
@@ -295,7 +295,7 @@ ORDER BY start_time DESC",
                        } // END - if
 
                        // Alter some variables
-                       if (empty($row['alogin']))   $row['alogin']    = '???';
+                       if (empty($row['login']))   $row['login']    = '???';
                        if (empty($row['template'])) $row['template']  = '---';
                        if (empty($row['descr']))    $row['descr']     = '---';
 
@@ -305,7 +305,7 @@ ORDER BY start_time DESC",
                                'select'     => "<input type=\"checkbox\" name=\"sel[".$row['id']."]\" class=\"admin_normal\" value=\"1\" />",
                                'admin_id'        => $row['admin_id'],
                                'email_link' => generateEmailLink($row['admin_id']),
-                               'alogin'     => $row['alogin'],
+                               'login'      => $row['login'],
                                'id'         => $row['id'],
                                'sw'         => $SW,
                                'title'      => $row['title'],
index e26da996fde94ffc4cb51c1a5b65424295caa815..581c28edd7bafa8933150d31826bc254fa3dcad4 100644 (file)
@@ -1,9 +1,7 @@
 <tr>
        <td align="center" class="switch_sw$content[sw] bottom2 right2">$content[select]</td>
-       <td align="center" class="switch_sw$content[sw] bottom2 right2"><a
-               href="{?URL?}/modules.php?module=admin&amp;what=config_rallye_prices&amp;rallye=$content[id]">$content[title]</a></td>
-       <td align="center" class="switch_sw$content[sw] bottom2 right2"><a
-               href="$content[email_link]">$content[alogin]</a></td>
+       <td align="center" class="switch_sw$content[sw] bottom2 right2"><a href="{?URL?}/modules.php?module=admin&amp;what=config_rallye_prices&amp;rallye=$content[id]">$content[title]</a></td>
+       <td align="center" class="switch_sw$content[sw] bottom2 right2"><a href="$content[email_link]">$content[login]</a></td>
        <td align="center" class="switch_sw$content[sw] bottom2 right2">$content[start]</td>
        <td align="center" class="switch_sw$content[sw] bottom2">$content[end]</td>
 </tr>
index 0716996040ab7bbb6d14a914c3f2f41a2dc1c6de..29b49bebab9c8a928c1f7bb037289537b1780ddd 100644 (file)
@@ -6,7 +6,7 @@
        <td align="center" class="switch_sw$content[sw] bottom2 right2"><strong>{--RALLYE_DESCR2--}:</strong><br />
        $content[descr]</td>
        <td align="center" class="switch_sw$content[sw] bottom2 right2"><strong>{--RALLYE_ADMIN_ID--}:</strong><br />
-       <a href="$content[email_link]">$content[alogin]</a></td>
+       <a href="$content[email_link]">$content[login]</a></td>
        <td align="center" class="switch_sw$content[sw] bottom2 right2"><strong>{--RALLYE_TSTART--}:</strong><br />
        $content[start_date]</td>
        <td align="center" class="switch_sw$content[sw] bottom2"><strong>{--RALLYE_TEND--}:</strong><br />