]> git.mxchange.org Git - mailer.git/commitdiff
HTML improved, several tables are now have NULL and some more UNSIGNED (is both better)
authorRoland Häder <roland@mxchange.org>
Mon, 8 Nov 2010 02:22:39 +0000 (02:22 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 8 Nov 2010 02:22:39 +0000 (02:22 +0000)
inc/extensions/ext-user.php
inc/modules/member/what-nickname.php
templates/de/html/member/member_bonus.tpl
templates/de/html/member/member_reflink_no_nickname.tpl

index 7bab04d85199749b13a44b9819eefba065619e7c..708f2fe1beee4f9c9d23e1edde025b934941f7c4 100644 (file)
@@ -373,6 +373,47 @@ PRIMARY KEY (`id`)
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Der Sperrgrund wird nun mit abgespeichert und beim L&ouml;schen des Users mit ausgesendet.");
                                break;
+
+                       case '0.3.7': // SQL queries for v0.3.7
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` CHANGE `id` `id` BIGINT( 22 ) UNSIGNED NOT NULL AUTO_INCREMENT");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` CHANGE `userid` `userid` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL,");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` CHANGE `cat_id` `cat_id` TINYINT( 3 ) UNSIGNED NULL DEFAULT NULL");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `userid` `userid` BIGINT( 20 ) UNSIGNED NOT NULL AUTO_INCREMENT");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_del` CHANGE `userid` `userid` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` CHANGE `stats_id` `stats_id` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` CHANGE `userid` `userid` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` CHANGE `bonus_id` `bonus_id` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_points` CHANGE `userid` `userid` BIGINT( 22 ) UNSIGNED NULL DEFAULT NULL");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_points` CHANGE `ref_depth` `ref_depth` TINYINT( 3 ) UNSIGNED NULL DEFAULT NULL");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_refs` CHANGE `userid` `userid` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_refs` CHANGE `level` `level` SMALLINT( 6 ) UNSIGNED NULL DEFAULT NULL");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_refs` CHANGE `refid` `refid` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats` CHANGE `userid` `userid` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats` CHANGE `cat_id` `cat_id` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats` CHANGE `payment_id` `payment_id` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats` CHANGE `pool_id` `pool_id` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats_data` CHANGE `userid` `userid` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
+
+                               // Cleanup SQLs
+                               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `userid` IS NULL OR `cat_id` IS NULL");
+                               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_del` WHERE `userid` IS NULL");
+                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_user_links` SET `stats_id`=NULL WHERE `stats_id`=0");
+                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_user_links` SET `bonus_id`=NULL WHERE `bonus_id`=0");
+                               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `userid` IS NULL");
+                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_user_points` SET `ref_depth`=NULL WHERE `ref_depth`=0");
+                               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `userid` IS NULL");
+                               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_refs` WHERE `userid` IS NULL OR  `refid` IS NULL OR `level` IS NULL");
+                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_user_stats` SET `cat_id`=NULL WHERE `cat_id`=0");
+                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_user_stats` SET `payment_id`=NULL WHERE `payment_id`=0");
+                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_user_stats` SET `pool_id`=NULL WHERE `pool_id`=0");
+                               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `userid` IS NULL");
+
+                               // This update depends on ext-bonus
+                               addExtensionDependency('bonus');
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("NULL ist wichtiger als 0 und UNSIGNED auch.");
+                               break;
                } // END - switch
                break;
 
index cbb093773663322c20b5fcb17d8be8868d5224fe..d84f555aff9bfcd053ebee59d3b352937236c653 100644 (file)
@@ -65,7 +65,7 @@ if (isFormSent()) {
 
 if ($isValid === true) {
        // Look for nickname in database (we only need just one entry so don't worry about the "LIMIT 1" !)
-       $result = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `nickname`='%s' AND `userid` != '%s' LIMIT 1",
+       $result = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `nickname`='%s' AND `userid` != %s LIMIT 1",
                array(postRequestParameter('nickname'), getMemberId()), __FILE__, __LINE__);
        if (SQL_HASZERONUMS($result)) {
                // Nickname not in use, so set it now
index f3c21ca2322e369e51eb41356b6ac87a044f70fc..d0dff414f0b3c102bd704f53fd3fcf14dba743a3 100644 (file)
@@ -1,10 +1,10 @@
-<div align="center">
-
-<div class="para">
-<strong>{--MEMBER_BONUS_HERE_IS_THE_LIST--}</strong>
+<div class="table">
+<div class="table_header">
+       <strong>{--MEMBER_BONUS_HERE_IS_THE_LIST--}</strong>
+</div>
 </div>
 
-<div class="para">
+<div align="center">
 <table border="0" cellspacing="0" cellpadding="0" class="table dashed">
        <tr>
                <td width="80" align="center" class="header_column bottom"><strong>{--BONUS_RANK--}:</strong></td>
        </tr>
        $content[rows]
        <tr>
-               <td colspan="4" class="table_footer" align="center"
-                       style="padding-left: 5px; padding-right: 5px; padding-top: 5px; padding-bottom: 5px">
-               <div class="tiny notice">{--MEMBER_BONUS_RALLYE_NOTE--}</div></td>
+               <td colspan="4" class="table_footer" align="center">
+                       <div class="tiny notice">{--MEMBER_BONUS_RALLYE_NOTE--}</div>
+               </td>
        </tr>
 </table>
 </div>
 
-<div class="para">
+<div align="center">
 <table border="0" cellspacing="0" cellpadding="0" width="90%" class="table dashed">
        <tr>
-               <td class="header_column bottom"
-                       style="padding-left: 5px; padding-right: 5px; padding-top: 5px; padding-bottom: 5px"
-                       align="center"><strong>{--MEMBER_BONUS_RALLYE_CONDITIONS--}:</strong>
+               <td class="header_column bottom" align="center">
+                       <strong>{--MEMBER_BONUS_RALLYE_CONDITIONS--}:</strong>
                </td>
        </tr>
        <tr>
-               <td class="notice bottom" style="padding-left: 5px; padding-right: 5px; padding-top: 5px; padding-bottom: 5px">
+               <td class="notice bottom">
                        <ol align="left">
                                <li class="tiny">Es werden nur aktive und freigeschaltete Mitglieder ber&uuml;cksichtig.</li>
                                <li class="tiny">Der Login-Bonus wird bei der Auswertung nicht beachtet, aber dem Mitglied gutgeschrieben.</li>
@@ -42,9 +41,8 @@
                </td>
        </tr>
        <tr>
-               <td colspan="4" class="table_footer" align="center"
-                       style="padding-left: 5px; padding-right: 5px; padding-top: 5px; padding-bottom: 5px">
-               <a href="{%url=modules.php?module=login&amp;what=unconfirmed%}">{--MEMBER_BONUS_START_CONFIRMING_MAILS--}</a>
+               <td colspan="4" class="table_footer" align="center">
+                       <a href="{%url=modules.php?module=login&amp;what=unconfirmed%}">{--MEMBER_BONUS_START_CONFIRMING_MAILS--}</a>
                </td>
        </tr>
 </table>
index c13473b33e0cb0ba54937747d50c8ef6f811105c..11fbf600eacb1d938be49429c7ab76e30fdf60fa 100644 (file)
@@ -1,4 +1,8 @@
 <div class="notice">
-       {--MEMBER_NO_NICKNAME_SET--}
-       <a class="tiny" href="{%url=modules.php?module=login&amp;what=nickname%}">{--MEMBER_PLEASE_CLICK_NICKNAME_FORM--}</a>
+       <div>
+               {--MEMBER_NO_NICKNAME_SET--}
+       </div>
+       <div>
+               <a href="{%url=modules.php?module=login&amp;what=nickname%}">{--MEMBER_PLEASE_CLICK_NICKNAME_FORM--}</a>
+       </div>
 </div>