Old config.php is now automatically updated to new config-local.php format, several...
authorRoland Häder <roland@mxchange.org>
Sun, 12 Apr 2009 14:55:20 +0000 (14:55 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 12 Apr 2009 14:55:20 +0000 (14:55 +0000)
309 files changed:
.gitattributes
beg.php
birthday_confirm.php
debug.php
doubler.php
img.php
inc/autopurge/purge-general.php
inc/autopurge/purge-inact.php
inc/autopurge/purge-mails.php
inc/autopurge/purge-tsks.php
inc/autopurge/purge-unconfirmed.php
inc/code-functions.php
inc/config-functions.php
inc/config-local.php.dist
inc/db/lib-mysql3.php
inc/doubler_send.php
inc/extensions.php
inc/extensions/ext-
inc/extensions/ext-active.php
inc/extensions/ext-admins.php
inc/extensions/ext-admintheme1.php
inc/extensions/ext-admintheme_default.php
inc/extensions/ext-autopurge.php
inc/extensions/ext-bank.php
inc/extensions/ext-beg.php
inc/extensions/ext-birthday.php
inc/extensions/ext-bonus.php
inc/extensions/ext-booking.php
inc/extensions/ext-cache.php
inc/extensions/ext-country.php
inc/extensions/ext-debug.php
inc/extensions/ext-demo.php
inc/extensions/ext-doubler.php
inc/extensions/ext-events.php
inc/extensions/ext-holiday.php
inc/extensions/ext-html_mail.php
inc/extensions/ext-iso3166.php
inc/extensions/ext-lead.php
inc/extensions/ext-logs.php
inc/extensions/ext-mailid.php
inc/extensions/ext-maintenance.php
inc/extensions/ext-mediadata.php
inc/extensions/ext-menu.php
inc/extensions/ext-mods.php
inc/extensions/ext-mydata.php
inc/extensions/ext-network.php
inc/extensions/ext-newsletter.php
inc/extensions/ext-nickname.php
inc/extensions/ext-online.php
inc/extensions/ext-optimize.php
inc/extensions/ext-order.php
inc/extensions/ext-other.php
inc/extensions/ext-payout.php
inc/extensions/ext-primera.php
inc/extensions/ext-profile.php
inc/extensions/ext-rallye.php
inc/extensions/ext-refback.php
inc/extensions/ext-register.php
inc/extensions/ext-removeip.php
inc/extensions/ext-repair.php
inc/extensions/ext-rewrite.php
inc/extensions/ext-safe.php
inc/extensions/ext-sponsor.php
inc/extensions/ext-sql_patches.php
inc/extensions/ext-support.php
inc/extensions/ext-surfbar.php
inc/extensions/ext-task.php
inc/extensions/ext-theme.php
inc/extensions/ext-top10.php
inc/extensions/ext-transfer.php
inc/extensions/ext-usage.php
inc/extensions/ext-user.php
inc/extensions/ext-wernis.php
inc/extensions/ext-yoomedia.php
inc/filters.php
inc/footer.php
inc/functions.php
inc/gen_sql_patches.php
inc/handler.php
inc/header.php
inc/inc-functions.php
inc/install-inc.php
inc/language-functions.php [new file with mode: 0644]
inc/language.php
inc/libs/active_functions.php
inc/libs/admins_functions.php
inc/libs/autopurge_functions.php
inc/libs/beg_functions.php
inc/libs/bonus_functions.php
inc/libs/booking_functions.php
inc/libs/cache_functions.php
inc/libs/country_functions.php
inc/libs/holiday_functions.php
inc/libs/mediadata_functions.php
inc/libs/nickname_functions.php
inc/libs/online_functions.php
inc/libs/primera_functions.php
inc/libs/rallye_functions.php
inc/libs/refback_functions.php
inc/libs/register_functions.php
inc/libs/security_functions.php
inc/libs/sponsor_functions.php
inc/libs/surfbar_functions.php
inc/libs/theme_functions.php
inc/libs/user_functions.php
inc/libs/wernis_functions.php
inc/libs/yoomedia_functions.php
inc/load_config.php
inc/load_extensions.php
inc/mails/_mails.php
inc/mails/beg_mails.php
inc/mails/birthday_mails.php
inc/mails/bonus_mails.php
inc/modules/admin.php
inc/modules/admin/action-login.php
inc/modules/admin/admin-inc.php
inc/modules/admin/overview-inc.php
inc/modules/admin/what-add_points.php
inc/modules/admin/what-add_rallye.php
inc/modules/admin/what-add_sponsor.php
inc/modules/admin/what-admin_add.php
inc/modules/admin/what-adminedit.php
inc/modules/admin/what-admins_mails.php
inc/modules/admin/what-config_admin.php
inc/modules/admin/what-config_admins.php
inc/modules/admin/what-config_beg.php
inc/modules/admin/what-config_birthday.php
inc/modules/admin/what-config_bonus.php
inc/modules/admin/what-config_cats.php
inc/modules/admin/what-config_doubler.php
inc/modules/admin/what-config_email.php
inc/modules/admin/what-config_holiday.php
inc/modules/admin/what-config_home.php
inc/modules/admin/what-config_mediadata.php
inc/modules/admin/what-config_mods.php
inc/modules/admin/what-config_order.php
inc/modules/admin/what-config_payouts.php
inc/modules/admin/what-config_points.php
inc/modules/admin/what-config_rallye_prices.php
inc/modules/admin/what-config_register.php
inc/modules/admin/what-config_stats.php
inc/modules/admin/what-config_title.php
inc/modules/admin/what-config_top10.php
inc/modules/admin/what-del_email.php
inc/modules/admin/what-del_sponsor.php
inc/modules/admin/what-del_transfer.php
inc/modules/admin/what-del_user.php
inc/modules/admin/what-edit_emails.php
inc/modules/admin/what-edit_sponsor.php
inc/modules/admin/what-edit_user.php
inc/modules/admin/what-email_archiv.php
inc/modules/admin/what-email_details.php
inc/modules/admin/what-extensions.php
inc/modules/admin/what-guest_add.php
inc/modules/admin/what-guestedit.php
inc/modules/admin/what-list_autopurge.php
inc/modules/admin/what-list_bank_package.php
inc/modules/admin/what-list_beg.php
inc/modules/admin/what-list_bonus.php
inc/modules/admin/what-list_cats.php
inc/modules/admin/what-list_country.php
inc/modules/admin/what-list_doubler.php
inc/modules/admin/what-list_links.php
inc/modules/admin/what-list_newsletter.php
inc/modules/admin/what-list_payouts.php
inc/modules/admin/what-list_primera.php
inc/modules/admin/what-list_rallyes.php
inc/modules/admin/what-list_refs.php
inc/modules/admin/what-list_sponsor.php
inc/modules/admin/what-list_sponsor_pay.php
inc/modules/admin/what-list_sponsor_pays.php
inc/modules/admin/what-list_surfbar_urls.php
inc/modules/admin/what-list_task.php
inc/modules/admin/what-list_transfer.php
inc/modules/admin/what-list_unconfirmed.php
inc/modules/admin/what-list_user.php
inc/modules/admin/what-list_wernis.php
inc/modules/admin/what-lock_sponsor.php
inc/modules/admin/what-lock_user.php
inc/modules/admin/what-maintenance.php
inc/modules/admin/what-mem_add.php
inc/modules/admin/what-memedit.php
inc/modules/admin/what-payments.php
inc/modules/admin/what-refbanner.php
inc/modules/admin/what-repair_amnu.php
inc/modules/admin/what-repair_cats.php
inc/modules/admin/what-repair_gmnu.php
inc/modules/admin/what-repair_mmnu.php
inc/modules/admin/what-stats_mods.php
inc/modules/admin/what-sub_points.php
inc/modules/admin/what-surfbar_stats.php
inc/modules/admin/what-theme_edit.php
inc/modules/admin/what-theme_import.php
inc/modules/admin/what-unlock_emails.php
inc/modules/admin/what-unlock_sponsor.php
inc/modules/admin/what-usage.php
inc/modules/admin/what-user_contct.php
inc/modules/admin/what-usr_online.php
inc/modules/chk_login.php
inc/modules/frametester.php
inc/modules/guest/action-
inc/modules/guest/what-active.php
inc/modules/guest/what-confirm.php
inc/modules/guest/what-doubler.php
inc/modules/guest/what-login.php
inc/modules/guest/what-mediadata.php
inc/modules/guest/what-register.php
inc/modules/guest/what-sponsor_login.php
inc/modules/guest/what-sponsor_reg.php
inc/modules/guest/what-stats.php
inc/modules/guest/what-top10.php
inc/modules/guest/what-wernis_portal.php
inc/modules/member/action-
inc/modules/member/what-beg.php
inc/modules/member/what-beg2.php
inc/modules/member/what-bonus.php
inc/modules/member/what-categories.php
inc/modules/member/what-doubler.php
inc/modules/member/what-holiday.php
inc/modules/member/what-html_mail.php
inc/modules/member/what-mydata.php
inc/modules/member/what-newsletter.php
inc/modules/member/what-nickname.php
inc/modules/member/what-order.php
inc/modules/member/what-payout.php
inc/modules/member/what-points.php
inc/modules/member/what-primera.php
inc/modules/member/what-refback.php
inc/modules/member/what-reflinks.php
inc/modules/member/what-reflist.php
inc/modules/member/what-stats.php
inc/modules/member/what-support.php
inc/modules/member/what-themes.php
inc/modules/member/what-transfer.php
inc/modules/member/what-unconfirmed.php
inc/modules/member/what-welcome.php
inc/modules/member/what-wernis.php
inc/modules/order.php
inc/modules/sponsor.php
inc/modules/sponsor/.php
inc/modules/sponsor/account.php
inc/modules/sponsor/settings.php
inc/modules/sponsor/welcome.php
inc/monthly/monthly_
inc/monthly/monthly_beg.php
inc/monthly/monthly_bonus.php
inc/monthly/monthly_newsletter.php
inc/mysql-connect.php
inc/mysql-manager.php
inc/pool/pool-bonus.php
inc/pool/pool-user.php
inc/profile-updte.php
inc/rdf.class.php
inc/reset/reset_
inc/reset/reset_beg.php
inc/reset/reset_bonus.php
inc/reset/reset_daily.php
inc/reset/reset_holiday.php
inc/stats_bonus.php
inc/weekly/weekly_
inc/wrapper-functions.php
js.php
lead-confirm.php
mailid.php
mailid_top.php
modules.php
ref.php
show_bonus.php
sponsor_ref.php
surfbar.php
theme/business/css/active.css
theme/business/css/beg.css
theme/business/css/bonus.css
theme/business/css/doubler.css
theme/business/css/general.css
theme/business/css/install.css
theme/business/css/register.css
theme/business/css/sponsor.css
theme/business/css/surfbar.css
theme/business/css/top10.css
theme/business/css/transfer.css
theme/business/theme.php
theme/default/css/active.css
theme/default/css/beg.css
theme/default/css/bonus.css
theme/default/css/doubler.css
theme/default/css/general.css
theme/default/css/install.css
theme/default/css/register.css
theme/default/css/sponsor.css
theme/default/css/surfbar.css
theme/default/css/top10.css
theme/default/css/transfer.css
theme/default/theme.php
theme/desert/css/active.css
theme/desert/css/beg.css
theme/desert/css/bonus.css
theme/desert/css/doubler.css
theme/desert/css/general.css
theme/desert/css/help.css
theme/desert/css/install.css
theme/desert/css/paidlinks.css
theme/desert/css/register.css
theme/desert/css/sponsor.css
theme/desert/css/surfbar.css
theme/desert/css/top10.css
theme/desert/css/transfer.css
theme/desert/theme.php
view.php

index e6403632b36a1c06948c411e3afc6a17a12bdaaa..f13f3a504d7c694cdb31e3116e318bc54ec28a6d 100644 (file)
@@ -176,6 +176,7 @@ inc/hooks.php -text
 inc/img/.htaccess -text
 inc/install-inc.php -text
 inc/js/.htaccess -text
+inc/language-functions.php -text
 inc/language.php -text
 inc/language/.htaccess -text
 inc/language/_de.php -text
diff --git a/beg.php b/beg.php
index 669afcf88efcc9f450bb435c407fa5a2c4e4b60a..d69cd6b49e678a3511fbc4fec8a31f2a7404e4c6 100644 (file)
--- a/beg.php
+++ b/beg.php
@@ -73,7 +73,7 @@ if (isInstalled()) {
                        if (EXT_IS_ACTIVE('nickname')) {
                                // Maybe we have found a nickname?
                                $result = SQL_QUERY_ESC("SELECT userid, beg_clicks, ref_payout, status, last_online FROM `{!_MYSQL_PREFIX!}_user_data` WHERE nickname='%s' LIMIT 1",
-                                       array(REQUEST_GET('uid')), __FILE__, __LINE__);
+                               array(REQUEST_GET('uid')), __FILE__, __LINE__);
                        } else {
                                // Nickname entered but nickname is not active
                                $msg = getCode('EXTENSION_PROBLEM');
@@ -82,7 +82,7 @@ if (isInstalled()) {
                } else {
                        // Direct userid
                        $result = SQL_QUERY_ESC("SELECT userid, beg_clicks, ref_payout, status, last_online FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                               array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+                       array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
                }
 
                // Check if locked in so don't pay points
@@ -121,11 +121,11 @@ if (isInstalled()) {
                if (($uid > 0) && (getConfig('beg_uid') != $uid)) {
                        // Update counter
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET beg_clicks=beg_clicks+1 WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
-                               array($uid), __FILE__, __LINE__);
+                       array($uid), __FILE__, __LINE__);
 
                        // Check for last entry for userid w/o IP number
                        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_beg_ips` WHERE (timeout > (UNIX_TIMESTAMP() - ".getConfig('beg_timeout').") OR (timeout > (UNIX_TIMESTAMP() - ".getConfig('beg_uid_timeout').") AND `userid`=%s)) AND (remote_ip='%s' OR sid='%s') LIMIT 1",
-                               array($uid, detectRemoteAddr(), session_id()), __FILE__, __LINE__);
+                       array($uid, detectRemoteAddr(), session_id()), __FILE__, __LINE__);
 
                        // Entry not found, points set and not logged in?
                        if (((SQL_NUMROWS($result) == 0) || (IS_ADMIN())) && ($points > 0) && (!IS_MEMBER()) && (getConfig('beg_pay_mode') == 'NONE')) {
@@ -136,7 +136,7 @@ if (isInstalled()) {
                                        // but only when there is no admin begging.
                                        // Admins shall be able to test it!
                                        SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_beg_ips` (userid, remote_ip,sid, timeout) VALUES ('%s','%s','%s', UNIX_TIMESTAMP())",
-                                               array($uid, detectRemoteAddr(), session_id()), __FILE__, __LINE__);
+                                       array($uid, detectRemoteAddr(), session_id()), __FILE__, __LINE__);
 
                                        // Was is successfull?
                                        $pay (SQL_AFFECTEDROWS() == 1);
@@ -150,18 +150,18 @@ if (isInstalled()) {
                                        // Add points to user or begging rallye account
                                        if (BEG_ADD_POINTS($uid, $points)) {
                                                // Set 'done' message
-                                               $content['msg'] = LOAD_TEMPLATE('beg_done', true));
+                                               $content['msg'] = LOAD_TEMPLATE('beg_done', true);
                                        } else {
                                                // Error!
-                                               $content['msg'] = LOAD_TEMPLATE('beg_failed', true));
+                                               $content['msg'] = LOAD_TEMPLATE('beg_failed', true);
                                        }
                                } else {
                                        // Error!
-                                       $content['msg'] = LOAD_TEMPLATE('beg_failed', true));
+                                       $content['msg'] = LOAD_TEMPLATE('beg_failed', true);
                                }
                        } elseif (IS_MEMBER()) {
                                // Logged in user found!
-                               $content['msg'] = LOAD_TEMPLATE('beg_login', true));
+                               $content['msg'] = LOAD_TEMPLATE('beg_login', true);
                        } elseif (getConfig('beg_pay_mode') != 'NONE') { // Other pay-mode active!
                                // Prepare content for template
                                $content = array(
@@ -171,11 +171,11 @@ if (isInstalled()) {
                                );
 
                                // Load message template depending on pay-mode
-                               $content['msg'] = LOAD_TEMPLATE('beg_pay_mode_'.strtolower(getConfig('beg_pay_mode')), true, $content));
+                               $content['msg'] = LOAD_TEMPLATE('beg_pay_mode_'.strtolower(getConfig('beg_pay_mode')), true, $content);
                                $pay = true;
                        } else {
                                // Clicked received while reload lock is active
-                               $content['msg'] = LOAD_TEMPLATE('beg_failed', true));
+                               $content['msg'] = LOAD_TEMPLATE('beg_failed', true);
                        }
 
                        // Free memory
@@ -198,7 +198,7 @@ if (isInstalled()) {
                                LOAD_TEMPLATE('beg_pay_code_'.strtolower(getConfig('beg_pay_mode')), false, $content);
                        } elseif ((!$pay) && (!isset($content['msg']))) {
                                // Cannot pay! :-(
-                               $content['msg'] = LOAD_TEMPLATE('beg_failed', true));
+                               $content['msg'] = LOAD_TEMPLATE('beg_failed', true);
                        }
 
                        // Include footer
@@ -209,7 +209,7 @@ if (isInstalled()) {
                } elseif (($uid == '0') || ($status == 'failed')) {
                        // Inalid or locked account, so let's find out
                        $result = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE nickname='%s' LIMIT 1",
-                               array(REQUEST_GET('uid')), __FILE__, __LINE__);
+                       array(REQUEST_GET('uid')), __FILE__, __LINE__);
                        if (SQL_NUMROWS($result) == 1) {
                                // Locked account
                                $msg = getCode('ACCOUNT_LOCKED');
index efbb4a55cbc773ad9fdf72c0eedfc1692e22a0c7..7d4068456c462d8c7e5361e42f581518ac754046 100644 (file)
@@ -67,7 +67,7 @@ FROM `{!_MYSQL_PREFIX!}_user_birthday` AS b
 INNER JOIN `{!_MYSQL_PREFIX!}_user_data` AS d
 ON b.userid=d.userid
 WHERE b.userid=%s AND b.chk_value='%s' LIMIT 1",
- array($uid, $chk), __FILE__, __LINE__);
      array($uid, $chk), __FILE__, __LINE__);
        //* DEBUG: */ echo "uid=".$uid.",chk=".$chk." (".strlen($chk).'/'.strlen(REQUEST_GET('check')).'/'.SQL_NUMROWS($result).")<br />\n";
 
        // Prepare content
@@ -96,7 +96,7 @@ WHERE b.userid=%s AND b.chk_value='%s' LIMIT 1",
 
                        // Remove entry from table
                        SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_birthday` WHERE userid=%s AND chk_value='%s' LIMIT 1",
-                               array($uid, $chk), __FILE__, __LINE__);
+                       array($uid, $chk), __FILE__, __LINE__);
 
                        // "Translate" some data
                        $data['gender'] = translateGender($data['gender']);
index aa7c764e1ffc549dae66a068b68df1632b2366f5..ef780e47402242b70dc7bfb29cfa2405d3cae77d 100644 (file)
--- a/debug.php
+++ b/debug.php
@@ -64,8 +64,8 @@ if ((isInstalled()) && (getTotalFatalErrors() == 0)) {
                if (DEBUG_HANDLE_REQUEST(REQUEST_POST('request'))) {
                        // Construct FQFN for the module
                        $INC = sprintf("inc/debug/%s/request_%s",
-                               getConfig('debug_mode'),
-                               SQL_ESCAPE(REQUEST_POST('request'))
+                       getConfig('debug_mode'),
+                       SQL_ESCAPE(REQUEST_POST('request'))
                        );
 
                        // Is the module there? Else we log it!
index 6920cd155320bd1c71b312ebaf670453b781c553..2492b995d610197cbf992ec398b1acfbac045377 100644 (file)
@@ -66,14 +66,14 @@ if (isInstalled()) {
                $probe_nickname = ((EXT_IS_ACTIVE('nickname')) && ((''.round($GLOBALS['refid']).'') != $GLOBALS['refid']));
 
                // Do we have nickname or userid set?
-               if ($probe_nickname) {
+               if ($probe_nickname === true) {
                        // Nickname in URL, so load the ID
                        $result = SQL_QUERY_ESC("SELECT userid, status FROM `{!_MYSQL_PREFIX!}_user_data` WHERE nickname='%s' LIMIT 1",
-                               array(bigintval($GLOBALS['refid'])), __FILE__, __LINE__);
+                       array(bigintval($GLOBALS['refid'])), __FILE__, __LINE__);
                } else {
                        // Direct userid entered
                        $result = SQL_QUERY_ESC("SELECT userid, status FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                               array(bigintval($GLOBALS['refid'])), __FILE__, __LINE__);
+                       array(bigintval($GLOBALS['refid'])), __FILE__, __LINE__);
                }
 
                // Load data
@@ -105,11 +105,11 @@ if (isInstalled()) {
                        if ($probe_nickname) {
                                // Nickname in URL, so load the ID
                                $result = SQL_QUERY_ESC("SELECT userid, status, password FROM `{!_MYSQL_PREFIX!}_user_data` WHERE nickname='%s' LIMIT 1",
-                                       array(REQUEST_POST('userid')), __FILE__, __LINE__);
+                               array(REQUEST_POST('userid')), __FILE__, __LINE__);
                        } else {
                                // Direct userid entered
                                $result = SQL_QUERY_ESC("SELECT userid, status, password FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                                       array(bigintval(REQUEST_POST('userid'))), __FILE__, __LINE__);
+                               array(bigintval(REQUEST_POST('userid'))), __FILE__, __LINE__);
                        }
 
                        // Load data
@@ -134,119 +134,118 @@ if (isInstalled()) {
                                $points = GET_TOTAL_DATA($uid, 'user_points', 'points') - GET_TOTAL_DATA($uid, 'user_data', 'used_points');
 
                                // So let's continue with probing his points amount
-                               if (($points - getConfig('doubler_left') - REQUEST_POST('points') * getConfig('doubler_charge')) >= 0) 
-                                       // Enough points are left so let's continue with the doubling process
-                                       // Create doubling "account" width *DOUBLED* points
-                                       SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_doubler` (userid, refid, points, remote_ip, timemark, completed, is_ref) VALUES ('%s','%s','%s','".detectRemoteAddr()."', UNIX_TIMESTAMP(), 'N','N')",
-                                               array($uid, bigintval($GLOBALS['refid']), bigintval(REQUEST_POST('points') * 2)), __FILE__, __LINE__);
-
-                                       // Subtract entered points
-                                       SUB_POINTS('doubler', $uid, REQUEST_POST('points'));
-
-                                       // Add points to "total payed" including charge
-                                       $points = REQUEST_POST('points') - REQUEST_POST('points') * getConfig('doubler_charge');
-                                       updateConfiguration('doubler_points', $points, '+');
-                                       incrementConfigEntry('doubler_points', $points);
-
-                                       // Add second line for the referal but only when uid != refid
-                                       if (($GLOBALS['refid'] > 0) && ($GLOBALS['refid'] != $uid)) {
-                                               // Okay add a refid line and apply refid percents
-                                               SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_doubler` (userid, refid, points, remote_ip, timemark, completed, is_ref) VALUES ('%s',0,'%s','".detectRemoteAddr()."',UNIX_TIMESTAMP(),'N','Y')",
-                                                       array(
-                                                               bigintval($GLOBALS['refid']),
-                                                               bigintval(REQUEST_POST('points') * 2 * getConfig('doubler_ref'))
-                                                       ), __FILE__, __LINE__);
-
-                                               // And that's why we don't want to you more than one referal level of doubler-points. ^^^
-                                       } // END - if
-
-                                       // Update usage counter
-                                       updateConfiguration('doubler_counter', 1, '+');
-
-                                       // Set constant
-                                       define('__DOUBLER_MSG', LOAD_TEMPLATE('doubler_reflink', true, REQUEST_POST('userid')));
-                               } else {
-                                       // Not enougth points left
-                                       define('__ERROR_MSG', getMessage('DOUBLER_FORM_NO_POINTS_LEFT'));
-                               }
-                       } elseif ($status == 'CONFIRMED') {
-                               // Account is unconfirmed!
-                               define('__ERROR_MSG', getMessage('DOUBLER_FORM_WRONG_PASS'));
-                       } elseif ($status == 'UNCONFIRMED') {
-                               // Account is unconfirmed!
-                               define('__ERROR_MSG', getMessage('DOUBLER_FORM_STATUS_UNCONFIRMED'));
-                       } elseif ($status == 'LOCKED') {
-                               // Account is locked by admin / holiday!
-                               define('__ERROR_MSG', getMessage('DOUBLER_FORM_STATUS_LOCKED'));
-                       } elseif (REQUEST_POST('points') < getConfig('doubler_min')) {
-                               // Not enougth points entered
-                               define('__ERROR_MSG', getMessage('DOUBLER_FORM_POINTS_MIN'));
-                       } elseif (REQUEST_POST('points') > getConfig('doubler_max')) {
-                               // Too much points entered
-                               define('__ERROR_MSG', getMessage('DOUBLER_FORM_POINTS_MAX'));
-                       } elseif ($probe_nickname) {
-                               // Cannot resolv nickname -> userid
-                               define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_NICKNAME'));
+                               if (($points - getConfig('doubler_left') - REQUEST_POST('points') * getConfig('doubler_charge')) >= 0)
+                               // Enough points are left so let's continue with the doubling process
+                               // Create doubling "account" width *DOUBLED* points
+                               SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_doubler` (userid, refid, points, remote_ip, timemark, completed, is_ref) VALUES ('%s','%s','%s','".detectRemoteAddr()."', UNIX_TIMESTAMP(), 'N','N')",
+                               array($uid, bigintval($GLOBALS['refid']), bigintval(REQUEST_POST('points') * 2)), __FILE__, __LINE__);
+
+                               // Subtract entered points
+                               SUB_POINTS('doubler', $uid, REQUEST_POST('points'));
+
+                               // Add points to "total payed" including charge
+                               $points = REQUEST_POST('points') - REQUEST_POST('points') * getConfig('doubler_charge');
+                               updateConfiguration('doubler_points', $points, '+');
+                               incrementConfigEntry('doubler_points', $points);
+
+                               // Add second line for the referal but only when uid != refid
+                               if (($GLOBALS['refid'] > 0) && ($GLOBALS['refid'] != $uid)) {
+                                       // Okay add a refid line and apply refid percents
+                                       SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_doubler` (userid, refid, points, remote_ip, timemark, completed, is_ref) VALUES ('%s',0,'%s','".detectRemoteAddr()."',UNIX_TIMESTAMP(),'N','Y')",
+                                       array(
+                                       bigintval($GLOBALS['refid']),
+                                       bigintval(REQUEST_POST('points') * 2 * getConfig('doubler_ref'))
+                                       ), __FILE__, __LINE__);
+
+                                       // And that's why we don't want to you more than one referal level of doubler-points. ^^^
+                               } // END - if
+
+                               // Update usage counter
+                               updateConfiguration('doubler_counter', 1, '+');
+
+                               // Set constant
+                               define('__DOUBLER_MSG', LOAD_TEMPLATE('doubler_reflink', true, REQUEST_POST('userid')));
                        } else {
-                               // Wrong password or account not found
-                               define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_MEMBER'));
+                               // Not enougth points left
+                               define('__ERROR_MSG', getMessage('DOUBLER_FORM_NO_POINTS_LEFT'));
                        }
-               } elseif (!REQUEST_ISSET_POST(('userid'))) {
-                       // Login not entered
-                       define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_LOGIN'));
-               } elseif (!REQUEST_ISSET_POST(('pass'))) {
-                       // Password not entered
-                       define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_PASSWORD'));
-               } elseif (!REQUEST_ISSET_POST(('points'))) {
-                       // points not entered
-                       define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_POINTS'));
+               } elseif ($status == 'CONFIRMED') {
+                       // Account is unconfirmed!
+                       define('__ERROR_MSG', getMessage('DOUBLER_FORM_WRONG_PASS'));
+               } elseif ($status == 'UNCONFIRMED') {
+                       // Account is unconfirmed!
+                       define('__ERROR_MSG', getMessage('DOUBLER_FORM_STATUS_UNCONFIRMED'));
+               } elseif ($status == 'LOCKED') {
+                       // Account is locked by admin / holiday!
+                       define('__ERROR_MSG', getMessage('DOUBLER_FORM_STATUS_LOCKED'));
+               } elseif (REQUEST_POST('points') < getConfig('doubler_min')) {
+                       // Not enougth points entered
+                       define('__ERROR_MSG', getMessage('DOUBLER_FORM_POINTS_MIN'));
+               } elseif (REQUEST_POST('points') > getConfig('doubler_max')) {
+                       // Too much points entered
+                       define('__ERROR_MSG', getMessage('DOUBLER_FORM_POINTS_MAX'));
+               } elseif ($probe_nickname) {
+                       // Cannot resolv nickname -> userid
+                       define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_NICKNAME'));
+               } else {
+                       // Wrong password or account not found
+                       define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_MEMBER'));
                }
+       } elseif (!REQUEST_ISSET_POST(('userid'))) {
+               // Login not entered
+               define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_LOGIN'));
+       } elseif (!REQUEST_ISSET_POST(('pass'))) {
+               // Password not entered
+               define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_PASSWORD'));
+       } elseif (!REQUEST_ISSET_POST(('points'))) {
+               // points not entered
+               define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_POINTS'));
        }
+}
 
-       // Set messages to nothing
-       if (!defined('__DOUBLER_MSG')) define('__DOUBLER_MSG', '');
-       if (!defined('__ERROR_MSG'))   define('__ERROR_MSG'  , '');
+// Set messages to nothing
+if (!defined('__DOUBLER_MSG')) define('__DOUBLER_MSG', '');
+if (!defined('__ERROR_MSG'))   define('__ERROR_MSG'  , '');
 
-       // Shall I check for points immediately?
-       if (getConfig('doubler_send_mode') == 'DIRECT') loadInclude('inc/doubler_send.php');
+// Shall I check for points immediately?
+if (getConfig('doubler_send_mode') == 'DIRECT') loadInclude('inc/doubler_send.php');
 
-       // Output header
-       loadIncludeOnce('inc/header.php');
+// Output header
+loadIncludeOnce('inc/header.php');
 
-       // Banner in text
-       define('__DOUBLER_BANNER', LOAD_TEMPLATE('doubler_banner', true));
+// Banner in text
+define('__DOUBLER_BANNER', LOAD_TEMPLATE('doubler_banner', true));
 
-       // Load header/footer templates
-       define('__DOUBLER_HEADER', LOAD_TEMPLATE('doubler_header', true));
-       define('__DOUBLER_FOOTER', LOAD_TEMPLATE('doubler_footer', true));
+// Load header/footer templates
+define('__DOUBLER_HEADER', LOAD_TEMPLATE('doubler_header', true));
+define('__DOUBLER_FOOTER', LOAD_TEMPLATE('doubler_footer', true));
 
-       if (!empty($uid)) {
-               // Transfer userid/nickname to constant
-               define('__REFID', $uid);
-       } else {
-               // Transfer userid/nickname to constant
-               define('__REFID', $GLOBALS['refid']);
-       }
+if (!empty($uid)) {
+       // Transfer userid/nickname to constant
+       define('__REFID', $uid);
+} else {
+       // Transfer userid/nickname to constant
+       define('__REFID', $GLOBALS['refid']);
+}
 
-       // Percent values etc.
-       define('__CHARGE_VALUE', translateComma(getConfig('doubler_charge') * 100));
-       define('__REF_VALUE'   , translateComma(getConfig('doubler_ref') * 100));
-       define('__TOTAL_VALUE' , translateComma(getConfig('doubler_points')));
-       define('__MIN_VALUE'   , translateComma(getConfig('doubler_min')));
-       define('__MAX_VALUE'   , translateComma(getConfig('doubler_max')));
-
-       // Text "Enter login"
-       if (EXT_IS_ACTIVE('nickname')) {
-               // Choose login/nickname
-               define('DOUBLER_ENTER_LOGIN', getMessage('GUEST_ENTER_LOGIN_NICKNAME'));
-       } else {
-               // Simple login ID
-               define('DOUBLER_ENTER_LOGIN', getMessage('GUEST_ENTER_LOGIN'));
-       }
+// Percent values etc.
+define('__CHARGE_VALUE', translateComma(getConfig('doubler_charge') * 100));
+define('__REF_VALUE'   , translateComma(getConfig('doubler_ref') * 100));
+define('__TOTAL_VALUE' , translateComma(getConfig('doubler_points')));
+define('__MIN_VALUE'   , translateComma(getConfig('doubler_min')));
+define('__MAX_VALUE'   , translateComma(getConfig('doubler_max')));
+
+// Text "Enter login"
+if (EXT_IS_ACTIVE('nickname')) {
+       // Choose login/nickname
+       define('DOUBLER_ENTER_LOGIN', getMessage('GUEST_ENTER_LOGIN_NICKNAME'));
+} else {
+       // Simple login ID
+       define('DOUBLER_ENTER_LOGIN', getMessage('GUEST_ENTER_LOGIN'));
+}
 
-       // Which mail-send-mode did the admin setup?
-       switch (getConfig('doubler_send_mode'))
-       {
+// Which mail-send-mode did the admin setup?
+switch (getConfig('doubler_send_mode')) {
        case 'DIRECT':
                define('DOUBLER_PAYOUT_TIME', getMessage('DOUBLER_PAYOUT_TIME_DIRECT'));
                break;
@@ -254,25 +253,25 @@ if (isInstalled()) {
        case 'RESET':
                define('DOUBLER_PAYOUT_TIME', getMessage('DOUBLER_PAYOUT_TIME_RESET'));
                break;
-       }
+}
 
-       // Generate table with already payed out doubles
-       define('__DOUBLER_PAYOUT_HISTORY', DOUBLER_GENERATE_TABLE('0', 'Y', 'N', 'DESC'));
+// Generate table with already payed out doubles
+define('__DOUBLER_PAYOUT_HISTORY', DOUBLER_GENERATE_TABLE('0', 'Y', 'N', 'DESC'));
 
-       // Generate timemark
-       define('__TIMEOUT_MARK', createFancyTime(getConfig('doubler_timeout')));
+// Generate timemark
+define('__TIMEOUT_MARK', createFancyTime(getConfig('doubler_timeout')));
 
-       // Usage counter
-       define('__DOUBLER_COUNTER', getConfig('doubler_counter'));
+// Usage counter
+define('__DOUBLER_COUNTER', getConfig('doubler_counter'));
 
-       // Points left to doubler
-       define('__LEFT_VALUE', translateComma(DOUBLER_GET_TOTAL_POINTS_LEFT()));
+// Points left to doubler
+define('__LEFT_VALUE', translateComma(DOUBLER_GET_TOTAL_POINTS_LEFT()));
 
-       // Output neccessary form for this
-       LOAD_TEMPLATE('doubler_index');
+// Output neccessary form for this
+LOAD_TEMPLATE('doubler_index');
 
-       // Output footer
-       loadIncludeOnce('inc/footer.php');
+// Output footer
+loadIncludeOnce('inc/footer.php');
 } else {
        // You have to install first!
        redirectToUrl('install.php');
diff --git a/img.php b/img.php
index f1099706eab7efadc03e45713d6fb72369f828c5..db6512ae51338842312aeb142b1c4e0c900227fc 100644 (file)
--- a/img.php
+++ b/img.php
@@ -62,7 +62,7 @@ if (isInstalled()) {
        } elseif (REQUEST_ISSET_GET('tag')) {
                // Tag set so create the IFN (Include-FileName)
                $INC = sprintf("inc/img/tag-%s.php",
-                       REQUEST_GET('tag')
+               REQUEST_GET('tag')
                );
 
                // Include is readable?
index 0e4d9ee5220422bc05a53fd82a774c00206ccef7..b880ee8b531c6643001e50ddb72dc4a4d15bdb36 100644 (file)
@@ -65,14 +65,14 @@ FROM `{!_MYSQL_PREFIX!}_user_stats` AS s
 LEFT JOIN `{!_MYSQL_PREFIX!}_payments` AS t
 ON s.payment_id=t.id
 WHERE s.timestamp_ordered <= (UNIX_TIMESTAMP() - %s) ORDER BY s.userid",
-               array(bigintval($PURGE)), __FILE__, __LINE__);
+       array(bigintval($PURGE)), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) > 0) {
                // Start deleting procedure
                $uid = 0; $points = 0;
                while ($content = SQL_FETCHARRAY($result)) {
                        // Check if confirmation links are purged or not
                        $result_links = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_links` WHERE stats_id=%s LIMIT 1",
-                               array(bigintval($content['id'])), __FILE__, __LINE__);
+                       array(bigintval($content['id'])), __FILE__, __LINE__);
                        if (SQL_NUMROWS($result_links) == 1) {
                                // Free memory
                                SQL_FREERESULT($result_links);
@@ -89,11 +89,11 @@ WHERE s.timestamp_ordered <= (UNIX_TIMESTAMP() - %s) ORDER BY s.userid",
 
                                // Remove confirmation links from queue
                                ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_links` WHERE stats_id=%s",
-                                       array(bigintval($content['id'])), __FILE__, __LINE__, false));
+                               array(bigintval($content['id'])), __FILE__, __LINE__, false));
 
                                // Update status of order
                                ADD_SQL(SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET data_type='DELETED' WHERE `id`=%s LIMIT 1",
-                                       array(bigintval($content['pool_id'])), __FILE__, __LINE__, false));
+                               array(bigintval($content['pool_id'])), __FILE__, __LINE__, false));
                        } // END - if
                } // END - while
 
@@ -108,14 +108,14 @@ WHERE s.timestamp_ordered <= (UNIX_TIMESTAMP() - %s) ORDER BY s.userid",
        if (EXT_IS_ACTIVE('bonus', true)) {
                // Check for bonus campaigns
                $result = SQL_QUERY_ESC("SELECT id, points FROM `{!_MYSQL_PREFIX!}_bonus` WHERE data_type='SEND' AND timestamp <= %s ORDER BY `id`",
-                       array(bigintval($PURGE)), __FILE__, __LINE__);
+               array(bigintval($PURGE)), __FILE__, __LINE__);
                if (SQL_NUMROWS($result) > 0) {
                        // Start deleting procedure
                        $points = 0;
                        while ($content = SQL_FETCHARRAY($result)) {
                                // Check if confirmation links are purged or not
                                $result_links = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_links` WHERE bonus_id=%s",
-                                       array(bigintval($content['id'])), __FILE__, __LINE__);
+                               array(bigintval($content['id'])), __FILE__, __LINE__);
                                if (SQL_NUMROWS($result_links) > 0) {
                                        // At least one link was found, enougth to pay back the points
                                        $points += $content['points'] * SQL_NUMROWS($result_links);
@@ -125,11 +125,11 @@ WHERE s.timestamp_ordered <= (UNIX_TIMESTAMP() - %s) ORDER BY s.userid",
 
                                        // Remove confirmation links from queue
                                        ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_links` WHERE bonus_id=%s",
-                                               array(bigintval($content['id'])), __FILE__, __LINE__, false));
+                                       array(bigintval($content['id'])), __FILE__, __LINE__, false));
 
                                        // Update status of order
                                        ADD_SQL(SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET data_type='DELETED' WHERE `id`=%s LIMIT 1",
-                                               array(bigintval($content['id'])), __FILE__, __LINE__, false));
+                                       array(bigintval($content['id'])), __FILE__, __LINE__, false));
                                } // END - if
                        } // END - while
 
index 285a3abc784828f5d804bc4354af0a909b237ec0..fc75e5f62b980744daa565a9a101a9806d7ba140 100644 (file)
@@ -100,7 +100,7 @@ ORDER BY d.userid", array($since, $since, $since), __FILE__, __LINE__);
 
                        // Update this account
                        ADD_SQL(SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET ap_notified=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1",
-                               array(bigintval($content['userid'])), __FILE__, __LINE__, false));
+                       array(bigintval($content['userid'])), __FILE__, __LINE__, false));
                } // END - while
 
                // Remove last comma
@@ -121,7 +121,7 @@ FROM `{!_MYSQL_PREFIX!}_user_data` AS d
 WHERE `status`='CONFIRMED' AND joined < (UNIX_TIMESTAMP() - %s) AND `last_online` < (UNIX_TIMESTAMP() - %s) AND ap_notified < (UNIX_TIMESTAMP() - %s)
 ".$EXCLUDE_LIST."
 ORDER BY `userid` ASC",
-               array($since, $since, $time), __FILE__, __LINE__);
+       array($since, $since, $time), __FILE__, __LINE__);
        if (SQL_NUMROWS($result_inactive) > 0) {
                // Prepare variable...
                $UIDs = '';
index 8599f88107b18de2567b347e65a13050b9c8a401..49d13c9a63a3db30c1f0393e54e86ffbd75960f5 100644 (file)
@@ -56,7 +56,7 @@ if (getConfig('ap_del_mails') == 'Y') {
 FROM `{!_MYSQL_PREFIX!}_pool`
 WHERE data_type='DELETED' AND timestamp <= (UNIX_TIMESTAMP() - %s)
 ORDER BY sender ASC",
-        array($since), __FILE__, __LINE__);
+       array($since), __FILE__, __LINE__);
 
        // Reset counter...
        $DELETED = 0;
@@ -67,11 +67,11 @@ ORDER BY sender ASC",
                while ($content = SQL_FETCHARRAY($result_mails)) {
                        // Check now...
                        $fount = SQL_NUMROWS(SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                               array(bigintval($content['sender'])), __FILE__, __LINE__));
+                       array(bigintval($content['sender'])), __FILE__, __LINE__));
                        if ($found == 0) {
                                // Okay we found some mails!
                                SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_pool` WHERE sender=%s",
-                                       array(bigintval($content['sender'])), __FILE__, __LINE__);
+                               array(bigintval($content['sender'])), __FILE__, __LINE__);
                                $DELETED += SQL_AFFECTEDROWS();
 
                                // Reset query (to prevent possible errors) ...
@@ -80,7 +80,7 @@ ORDER BY sender ASC",
 FROM `{!_MYSQL_PREFIX!}_pool`
 WHERE data_type='DELETED' AND timestamp <= (UNIX_TIMESTAMP() - %s)
 ORDER BY sender ASC",
-                                       array($since), __FILE__, __LINE__);
+                               array($since), __FILE__, __LINE__);
                        }
                }
        }
@@ -94,7 +94,7 @@ ORDER BY sender ASC",
 FROM `{!_MYSQL_PREFIX!}_user_stats`
 WHERE data_type='DELETED' AND timestamp_send <= (UNIX_TIMESTAMP() - %s)
 ORDER BY sender ASC",
-               array($since), __FILE__, __LINE__);
+       array($since), __FILE__, __LINE__);
 
        // Do we have "purged" mails?
        if (SQL_NUMROWS($result_mails) > 0) {
@@ -113,7 +113,7 @@ ORDER BY sender ASC",
 FROM `{!_MYSQL_PREFIX!}_user_stats`
 WHERE data_type='DELETED' AND timestamp_send <= (UNIX_TIMESTAMP() - %s)
 ORDER BY sender ASC",
-                                       array($since), __FILE__, __LINE__);
+                               array($since), __FILE__, __LINE__);
                        }
                }
        }
index 68ba60ff6703e36954b11ddc4f740f9de1d76139..f596a8673a7013177038a8a602b9bd3d7ec859a6 100644 (file)
@@ -57,7 +57,7 @@ if ((GET_EXT_VERSION('task') > '0.0') && (getConfig('ap_tasks') == 'Y')) {
        SQL_QUERY_ESC("DELETE LOW_PRIORITY
 FROM `{!_MYSQL_PREFIX!}_task_system`
 WHERE `status`='DELETED' AND task_created <= (UNIX_TIMESTAMP() - %s)",
-               array($since), __FILE__, __LINE__);
+       array($since), __FILE__, __LINE__);
 
        // Get deleted rows
        $DELETED = SQL_AFFECTEDROWS();
index 0ad79fdabf14e55fc0e2e7ca9a9cc9fa50404830..a31d7b6ef6fa8f76e79cb949c33f16038cd84ce8 100644 (file)
@@ -56,7 +56,7 @@ if (getConfig('autopurge_unconfirmed') == 'Y') {
 FROM `{!_MYSQL_PREFIX!}_user_data`
 WHERE `status`='UNCONFIRMED' AND joined < (UNIX_TIMESTAMP() - %s)
 ORDER BY userid ASC",
-               array($time), __FILE__, __LINE__);
+       array($time), __FILE__, __LINE__);
        if (SQL_NUMROWS($result_uncon) > 0) {
                // Prepare variable...
                $UIDs = '';
index 95f1ea7a87ca3618f5e5688c257d88d60f8f1af4..fd952f382a43f68347a85f3f2c03e2d7506f755a 100644 (file)
@@ -53,9 +53,9 @@ function getCode ($key) {
        if (!isCodeSet($key)) {
                // Abort here
                trigger_error(sprintf("%s[%s:] Code %s is not set.",
-                       __FUNCTION__,
-                       __LINE__,
-                       $key
+               __FUNCTION__,
+               __LINE__,
+               $key
                ));
        } // END - if
 
index 506db1b908613789c62beb9e43428beecaa9d3b2..c15828ad8f04eef15f1ed6c699eec2030c3e937e 100644 (file)
@@ -45,7 +45,7 @@ if (!defined('__SECURITY')) {
 // Merges $_CONFIG with data in given array
 function mergeConfig ($newConfig) {
        global $_CONFIG;
-       $_CONFIG = merge_array($_CONFIG, $newConfig);
+       $_CONFIG = merge_array(getConfigArray(), $newConfig);
 }
 
 // Getter for $_CONFIG entries
@@ -78,6 +78,12 @@ function setConfigEntry ($configEntry, $value) {
                $configEntry = smartAddSlashes($configEntry);
        }
 
+       // If config array isn't set, set it
+       if (!isConfigLoaded()) {
+               // Init configuration array
+               initConfig();
+       } // END - if
+
        // And set it
        $_CONFIG[$configEntry] = $value;
 }
@@ -111,7 +117,6 @@ function isConfigLoaded () {
 // Init the config array
 function initConfig () {
        global $_CONFIG;
-       debug_report_bug('Reached!');
 
        // Set a minimum dummy configuration
        $_CONFIG = array(
@@ -171,5 +176,147 @@ function getConfigArray () {
        return $return;
 }
 
+// Updates an old inc/config.php to a inc/cache/config-local.php file
+function updateOldConfigFile () {
+       // Watch out for these lines and execute them as single command
+       // @TODO Make this all better... :-/
+       $watchLines = array(
+               "define('SITE_KEY',"           => 'SITE_KEY',
+               "define('DEFAULT_LANG',"       => 'DEFAULT_LANG',
+               "define('warn_no_pass',"       => 'WARN_NO_PASS',
+               "define('WRITE_FOOTER',"       => 'WRITE_FOOTER',
+               "define('OUTPUT_MODE',"        => 'OUTPUT_MODE',
+               "define('MAIN_TITLE',"         => 'MAIN_TITLE',
+               "define('SLOGAN',"             => 'SLOGAN',
+               "define('WEBMASTER',"          => 'WEBMASTER',
+               "define('mxchange_installed'," => 'MXCHANGE_INSTALLED',
+               "define('admin_registered',"   => 'ADMIN_REGISTERED',
+               "define('_MYSQL_PREFIX',"      => '_MYSQL_PREFIX',
+               "define('_TABLE_TYPE',"        => '_TABLE_TYPE',
+               "define('_DB_TYPE',"           => '_DB_TYPE',
+               "define('SMTP_HOSTNAME',"      => 'SMTP_HOSTNAME',
+               "define('SMTP_USER'"           => 'SMTP_USER',
+               "define('SMTP_PASSWORD',"      => 'SMTP_PASSWORD',
+               "define('ENABLE_BACKLINK',"    => 'ENABLE_BACKLINK',
+       );
+
+       // Make these lower-case! (damn stupid code...)
+       $lowerCase = array('WARN_NO_PASS', 'MXCHANGE_INSTALLED', 'ADMIN_REGISTERED');
+
+       // These are still constants...
+       // @TODO Rewrite these all to config entries, if somehow possible
+       $constants = array('MAIN_TITLE', 'SLOGAN', 'WEBMASTER');
+
+       // Special comments...
+       $comments = array(
+               'WARN_NO_PASS'       => 'NULLPASS-WARNING',
+               'MXCHANGE_INSTALLED' => 'INSTALLED',
+               'ADMIN_REGISTERED'   => 'ADMIN-SETUP',
+               '_MYSQL_PREFIX'      => 'MYSQL-PREFIX',
+               '_TABLE_TYPE'        => 'TABLE-TYPE',
+               '_DB_TYPE'           => 'DATABASE-TYPE',
+               'ENABLE_BACKLINK'    => 'BACKLINK',
+               'host'               => 'MYSQL-HOST',
+               'dbase'              => 'MYSQL-DBASE',
+               'login'              => 'MYSQL-LOGIN',
+               'password'           => 'MYSQL-PASSWORD'
+       );
+
+       // Copy template to new file destionation
+       copyFileVerified(constant('PATH') . 'inc/config-local.php.dist', constant('PATH') . 'inc/cache/config-local.php', 0644);
+
+       // First of all, load the old one!
+       $oldConfig = explode("\n", readFromFile(constant('PATH') . 'inc/config.php'));
+
+       // Now, analyze every entry
+       $done = array();
+       foreach ($oldConfig as $line) {
+               // Check all watch lines
+               foreach ($watchLines as $old => $new) {
+                       // Is the line found?
+                       if ((substr($line, 0, strlen($old)) == $old) && (!isset($done[$old]))) {
+                               // Entry found!
+                               //* DEBUG: */ print htmlentities($line) . " - FOUND!<br />\n";
+
+                               // Eval the line...
+                               eval($line);
+
+                               // Setting config entry is new default behaviour!
+                               $function = 'setConfigEntry';
+
+                               // Still some old constants left?
+                               if (in_array($new, $constants)) {
+                                       // Then switch over...
+                                       $function = 'define';
+                               } // END - if
+
+                               // Default comment
+                               $comment = str_replace('_', '-', $new);
+
+                               // Do we have a special comment?
+                               if (isset($comments[$new])) {
+                                       // Then use it
+                                       $comment = $comments[$new];
+                               } // END - if
+
+                               // Do we need to make $new lowercase?
+                               $oldNew = $new;
+                               if (in_array($new, $lowerCase)) {
+                                       // Then do so... :)
+                                       $new = strtolower($new);
+                               } // END - if
+
+                               /// ... and write it to the new config
+                               //* DEBUG: */ print 'function=' . $function . ',new=' . $new . ',comment=' . $comment . "<br />\n";
+                               changeDataInFile(constant('PATH') . 'inc/cache/config-local.php', $comment, $function . "('" . $oldNew . "', \"", "\");", constant($new), 0);
+                               //* DEBUG: */ print "CHANGED!<br />\n";
+
+                               // Mark it as done
+                               $done[$old] = 1;
+                       } // END - if
+               } // END - foreach
+       } // END - foreach
+
+       // By default the old array $MySQL was not found
+       $found = false;
+
+       // Analyze every entry again for the MySQL configuration
+       foreach ($oldConfig as $line) {
+               // Trim spaces
+               $line = trim($line);
+
+               // Is the $MySQL found?
+               if (substr($line, 0, 6) == "\$MySQL") {
+                       // Okay found!
+                       $found = true;
+               } elseif ($found === true) {
+                       // Now check this row
+                       if (substr($line, 0, 2) == ');') {
+                               // MySQL array is closed so stop looking for it
+                               break;
+                       } elseif (substr($line, 0, 2) == '//') {
+                               // Skip this line
+                               continue;
+                       }
+
+                       // Debug output only
+                       //* DEBUG: */ print htmlentities($line) . " - MySQL!<br />\n";
+
+                       // Split parts so we can check them and prepare them
+                       $parts = explode('=>', $line);
+                       $key = substr(trim($parts[0]), 1, -1); $value = substr(trim($parts[1]), 1, -2);
+
+                       // We can now save the right part in new config file
+                       changeDataInFile(constant('PATH') . 'inc/cache/config-local.php', $comments[$key], "    '".$key."'     => \"", "\",", $value, 0);
+               }
+       } // END - foreach
+
+       // Finally remove old config file
+       removeFile(constant('PATH') . 'inc/config.php');
+
+       // Redirect to same URL to reload our new config
+       redirectToUrl($_SERVER['REQUEST_URI']);
+}
+
 // [EOF]
 ?>
index 08e6779d5f5bc55ed6349331865bfb332e5238e0..d1c0b948572d7977ad3af956a160a6d7bb747e67 100644 (file)
@@ -70,7 +70,7 @@ setConfigEntry('MXCHANGE_INSTALLED', "N");
 // CFG: ADMIN-SETUP
 setConfigEntry('ADMIN_REGISTERED', "N");
 
-// CFG: MYSQL-PREIFX
+// CFG: MYSQL-PREFIX
 setConfigEntry('_MYSQL_PREFIX', "mxchange");
 
 // CFG: TABLE-TYPE
index 823e5d02f95ebe5949eb00875deaa5d1faad02c0..8f57bf199e99bf1edbd2716f7d0f4065172253da 100644 (file)
@@ -62,7 +62,7 @@ function SQL_QUERY ($sql_string, $F, $L) {
        // Run SQL command
        //* DEBUG: */ echo $sql_string."<br />\n";
        $result = mysql_query($sql_string, SQL_GET_LINK())
-        or addFatalMessage(__FUNCTION__, __LINE__, $F." (".$L."):".mysql_error()."<br />
+       or addFatalMessage(__FUNCTION__, __LINE__, $F." (".$L."):".mysql_error()."<br />
 Query string:<br />
 ".$sql_string);
 
@@ -87,10 +87,10 @@ Query string:<br />
                $fp = fopen(constant('PATH') . 'inc/cache/mysql.log', 'a') or app_die(__FILE__, __LINE__, "Cannot write mysql.log!");
                if (!isset($GLOBALS['sql_first_entry'])) {
                        // Write first entry
-                       fwrite($fp, "Module=".$GLOBALS['module']."\n");
+                       fwrite($fp, 'Module=' . $GLOBALS['module'] . "\n");
                        $GLOBALS['sql_first_entry'] = true;
                } // END - if
-               fwrite($fp, $F."(LINE=".$L."|NUM=".SQL_NUMROWS($result)."|AFFECTED=".SQL_AFFECTEDROWS()."|QUERYTIME:".$queryTime."): ".str_replace('\r', '', str_replace('\n', " ", $sql_string))."\n");
+               fwrite($fp, $F."(LINE=".$L."|NUM=".SQL_NUMROWS($result)."|AFFECTED=".SQL_AFFECTEDROWS()."|QUERYTIME:".$queryTime."): ".str_replace("\r", '', str_replace("\n", " ", $sql_string))."\n");
                fclose($fp);
        } // END - if
 
@@ -159,7 +159,7 @@ function SQL_FETCHARRAY($res, $nr=0, $remove_numerical=true) {
        if (is_array($row)) {
                // Shall we remove numerical data here automatically?
                if ($remove_numerical) {
-                                // So let's remove all numerical elements to save memory!
+                       // So let's remove all numerical elements to save memory!
                        $max = count($row);
                        for ($idx = 0; $idx < ($max / 2); $idx++) {
                                // Remove entry
@@ -338,11 +338,11 @@ function SQL_RESULT_FROM_ARRAY ($table, $columns, $idRow, $id, $F, $L) {
 
        // Return the result
        return SQL_QUERY_ESC($sql,
-               array(
-                       bigintval($id),
-                       $table,
-                       $idRow
-               ), $F, $L);
+       array(
+       bigintval($id),
+       $table,
+       $idRow
+       ), $F, $L);
 }
 
 // ALTER TABLE wrapper function
@@ -352,13 +352,13 @@ function SQL_ALTER_TABLE ($sql, $F, $L) {
 
        // Determine index/fulltext/unique word
        $noIndex = (
-               (
-                       strpos($sql, 'INDEX') === false
-               ) && (
-                       strpos($sql, 'FULLTEXT') === false
-               ) && (
-                       strpos($sql, 'UNIQUE') === false
-               )
+       (
+       strpos($sql, 'INDEX') === false
+       ) && (
+       strpos($sql, 'FULLTEXT') === false
+       ) && (
+       strpos($sql, 'UNIQUE') === false
+       )
        );
 
        // Extract table name
@@ -372,7 +372,7 @@ function SQL_ALTER_TABLE ($sql, $F, $L) {
 
                // Get column information
                $result = SQL_QUERY_ESC("SHOW COLUMNS FROM %s LIKE '%s'",
-                       array($tableName, $columnName), __FILE__, __LINE__);
+               array($tableName, $columnName), __FILE__, __LINE__);
 
                // Do we have no entry on ADD or an entry on DROP?
                // 123           4       4     3    3      4           4          32    23           4       4     3    3      4            4          321
@@ -408,7 +408,7 @@ function SQL_ALTER_TABLE ($sql, $F, $L) {
 
                // Show indexes
                $result = SQL_QUERY_ESC("SHOW INDEX FROM `%s`",
-                       array($tableName), __FILE__, __LINE__);
+               array($tableName), __FILE__, __LINE__);
 
                // Walk through all
                $skip = false;
index 6017dfb65e5bf50bcc0020995151155829b19e49..cc34bddfedb5cf7b6facae0e50f4d4a2d05d25b8 100644 (file)
@@ -95,7 +95,7 @@ if (((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == 'Y'))
                                // Referal points found so add them and set line(s) to completed='Y'
                                $content['points'] += $ref;
                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_doubler` SET completed='Y' WHERE refid=%s AND completed='N' AND is_ref='Y'",
-                                       array(bigintval($content['userid'])), __FILE__, __LINE__);
+                               array(bigintval($content['userid'])), __FILE__, __LINE__);
                        } else {
                                // No referal points found
                                $ref = 0;
@@ -109,7 +109,7 @@ if (((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == 'Y'))
 
                        // Set entry as "payed"
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_doubler` SET completed='Y' WHERE `id`=%s LIMIT 1",
-                               array(bigintval($content['id'])), __FILE__, __LINE__);
+                       array(bigintval($content['id'])), __FILE__, __LINE__);
 
                        $okay = false;
                        // Check for jackpot inclusion in doubling process
@@ -143,13 +143,13 @@ if (((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == 'Y'))
 
                        // Prepare array
                        $content = array(
-                               // Doubler transmission ID
+                       // Doubler transmission ID
                                'id'     => $content['id'],
-                               // Doubled points
+                       // Doubled points
                                'points' => translateComma($content['points']),
-                               // Timemark
+                       // Timemark
                                'when'   => generateDateTime($content['timemark'], '2'),
-                               // IP number when the member submitted the doubling form
+                       // IP number when the member submitted the doubling form
                                'ip'     => $content['remote_ip'],
                        );
 
index 58f22fd02851b776555ab1b8b9c8eb2d69d27b9d..09fbc8c9c091cc5d4661607aa7c51c33e05dda97 100644 (file)
@@ -106,7 +106,7 @@ function LOAD_EXTENSION ($ext_name, $EXT_LOAD_MODE = '', $EXT_VER = '', $dry_run
        EXT_SET_ALWAYS_ACTIVE('N');
 
        // Extension update notes
-       EXT_SET_UPDATE_NOTES("");
+       EXT_SET_UPDATE_NOTES('');
 
        // Include the extension file
        //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "Extension loaded.");
@@ -164,8 +164,8 @@ function REGISTER_EXTENSION ($ext_name, $task_id, $dry_run = false, $logout = tr
                if (($task_id == 0) && (!$dry_run)) {
                        // Then request a bug report
                        debug_report_bug(sprintf("%s: task_id is still zero after DETERMINE_EXTENSION_TASK_ID(%s)",
-                               __FUNCTION__,
-                               EXT_GET_CURR_NAME()
+                       __FUNCTION__,
+                       EXT_GET_CURR_NAME()
                        ));
                } // END - if
        } // END - if
@@ -277,7 +277,7 @@ function REGISTER_EXTENSION ($ext_name, $task_id, $dry_run = false, $logout = tr
                                // Register extension
                                //* DEBUG: */ print __FUNCTION__."[".__LINE__."]:insert=".EXT_GET_CURR_NAME().'/'.EXT_GET_VERSION()." - INSERT!<br />\n";
                                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_extensions` (ext_name, ext_active, ext_version) VALUES ('%s','%s','%s')",
-                                       array(EXT_GET_CURR_NAME(), EXT_GET_ALWAYS_ACTIVE(), EXT_GET_VERSION()), __FUNCTION__, __LINE__);
+                               array(EXT_GET_CURR_NAME(), EXT_GET_ALWAYS_ACTIVE(), EXT_GET_VERSION()), __FUNCTION__, __LINE__);
 
                                // Remove cache file(s) if extension is active
                                runFilterChain('post_extension_installed', array('ext_name' => EXT_GET_CURR_NAME(), 'task_id' => $task_id));
@@ -316,7 +316,7 @@ function REGISTER_EXTENSION ($ext_name, $task_id, $dry_run = false, $logout = tr
                //* DEBUG: */ print __FUNCTION__."[".__LINE__."]:currName=".EXT_GET_CURR_NAME()."<br />\n";
                // Remove task from system when id and extension's name is valid
                SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_task_system` WHERE `id`=%s AND `status`='NEW' LIMIT 1",
-                       array(bigintval($task_id)), __FUNCTION__, __LINE__);
+               array(bigintval($task_id)), __FUNCTION__, __LINE__);
        }
 
        // Is this the sql_patches?
@@ -380,7 +380,7 @@ function EXTENSION_RUN_SQLS ($ext_id, $load_mode) {
                if ($load_mode == 'remove') {
                        // Delete this extension (remember to remove it from your server *before* you click on welcome!
                        SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_extensions` WHERE `ext_name`='%s' LIMIT 1",
-                               array(EXT_GET_CURR_NAME()), __FUNCTION__, __LINE__);
+                       array(EXT_GET_CURR_NAME()), __FUNCTION__, __LINE__);
                } // END - if
        } // END - if
 
@@ -422,7 +422,7 @@ function EXT_IS_ACTIVE ($ext_name) {
                //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "DB! ext_name={$ext_name}");
                // Load from database
                $result = SQL_QUERY_ESC("SELECT ext_active FROM `{!_MYSQL_PREFIX!}_extensions` WHERE `ext_name`='%s' LIMIT 1",
-                       array($ext_name), __FUNCTION__, __LINE__);
+               array($ext_name), __FUNCTION__, __LINE__);
 
                // Entry found?
                if (SQL_NUMROWS($result) == 1) {
@@ -474,7 +474,7 @@ function GET_EXT_VERSION ($ext_name) {
        } elseif (!isCacheInstanceValid()) {
                // Load from database
                $result = SQL_QUERY_ESC("SELECT ext_version FROM `{!_MYSQL_PREFIX!}_extensions` WHERE `ext_name`='%s' LIMIT 1",
-                       array($ext_name), __FUNCTION__, __LINE__);
+               array($ext_name), __FUNCTION__, __LINE__);
                //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ": DB - ".SQL_NUMROWS($result)."");
 
                // Is the extension there?
@@ -566,7 +566,7 @@ function EXTENSION_UPDATE ($ext_name, $ext_ver, $dry_run = false) {
 
                        // Update extension's version
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_version='%s' WHERE `ext_name`='%s' LIMIT 1",
-                               array($GLOBALS['cache_array']['update_ver'][EXT_GET_CURR_NAME()], EXT_GET_CURR_NAME()), __FUNCTION__, __LINE__);
+                       array($GLOBALS['cache_array']['update_ver'][EXT_GET_CURR_NAME()], EXT_GET_CURR_NAME()), __FUNCTION__, __LINE__);
 
                        // Remove arrays
                        UNSET_SQLS();
@@ -654,7 +654,7 @@ function GET_EXT_NAME ($ext_id) {
        } elseif (!EXT_IS_ACTIVE('cache')) {
                // Load from database
                $result = SQL_QUERY_ESC("SELECT ext_name FROM `{!_MYSQL_PREFIX!}_extensions` WHERE `id`=%s LIMIT 1",
-                       array(bigintval($ext_id)), __FUNCTION__, __LINE__);
+               array(bigintval($ext_id)), __FUNCTION__, __LINE__);
                list($ret) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
        }
@@ -674,7 +674,7 @@ function GET_EXT_ID ($ext_name) {
        } elseif (!EXT_IS_ACTIVE('cache')) {
                // Load from database
                $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_extensions` WHERE `ext_name`='%s' LIMIT 1",
-                       array($ext_name), __FUNCTION__, __LINE__);
+               array($ext_name), __FUNCTION__, __LINE__);
                list($ret) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
        }
@@ -687,7 +687,7 @@ function GET_EXT_ID ($ext_name) {
 function ACTIVATE_EXTENSION ($ext_name) {
        // Activate the extension
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET `ext_active`='Y' WHERE `ext_name`='%s' LIMIT 1",
-               array($ext_name), __FUNCTION__, __LINE__);
+       array($ext_name), __FUNCTION__, __LINE__);
 
        // Extension has been activated?
        if (SQL_AFFECTEDROWS() == 1) {
@@ -700,7 +700,7 @@ function ACTIVATE_EXTENSION ($ext_name) {
 function DEACTIVATE_EXTENSION($ext_name) {
        // Activate the extension
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET `ext_active`='N' WHERE `ext_name`='%s' LIMIT 1",
-               array($ext_name), __FUNCTION__, __LINE__);
+       array($ext_name), __FUNCTION__, __LINE__);
 
        // Extension has been activated?
        if (SQL_AFFECTEDROWS() == 1) {
@@ -712,9 +712,9 @@ function DEACTIVATE_EXTENSION($ext_name) {
 
                // Notify the admin
                sendAdminNotification(
-                       getMessage('ADMIN_SUBJECT_EXTENSION_DEACTIVATED'),
+               getMessage('ADMIN_SUBJECT_EXTENSION_DEACTIVATED'),
                        'admin_ext_deactivated',
-                       array('ext_name' => $ext_name)
+               array('ext_name' => $ext_name)
                );
        } // END - if
 }
@@ -743,7 +743,7 @@ function CREATE_EXTENSION_UPDATE_TASK ($admin_id, $ext_name, $ext_ver, $notes) {
                if (DETERMINE_TASK_ID_BY_SUBJECT($subject) == 0) {
                        // Task not created so it's a brand-new extension which we need to register and create a task for!
                        SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_task_system` (assigned_admin, userid, status, task_type, subject, text, task_created) VALUES ('%s','0','NEW','EXTENSION_UPDATE','%s','%s', UNIX_TIMESTAMP())",
-                               array($admin_id, $subject, $notes), __FUNCTION__, __LINE__);
+                       array($admin_id, $subject, $notes), __FUNCTION__, __LINE__);
                } // END - if
        } // END - if
 }
@@ -754,9 +754,9 @@ function CREATE_NEW_EXTENSION_TASK ($admin_id, $subject, $ext) {
        if ((DETERMINE_TASK_ID_BY_SUBJECT($subject) == 0) && (GET_EXT_VERSION($ext) == '')) {
                // Template file
                $tpl = sprintf("%stemplates/%s/html/ext/ext_%s.tpl",
-                       constant('PATH'),
-                       getLanguage(),
-                       $ext
+               constant('PATH'),
+               getLanguage(),
+               $ext
                );
 
                // Set default message if ext-foo is missing
@@ -774,11 +774,11 @@ function CREATE_NEW_EXTENSION_TASK ($admin_id, $subject, $ext) {
                // Task not created so it's a brand-new extension which we need to register and create a task for!
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_task_system` (assigned_admin, userid, status, task_type, subject, text, task_created)
 VALUES (%s, 0, 'NEW', 'EXTENSION', '%s', '%s', UNIX_TIMESTAMP())",
-                       array(
-                               $admin_id,
-                               $subject,
-                               smartAddSlashes($msg),
-                       ),  __FUNCTION__, __LINE__, true, false, false
+               array(
+               $admin_id,
+               $subject,
+               smartAddSlashes($msg),
+               ),  __FUNCTION__, __LINE__, true, false, false
                );
        } // END - if
 }
@@ -793,10 +793,10 @@ function CREATE_EXTENSION_DEACTIVATION_TASK ($ext) {
                // Task not created so add it
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_task_system` (assigned_admin, userid, status, task_type, subject, text, task_created)
 VALUES (0, 0, 'NEW', 'EXTENSION_DEACTIVATION', '%s', '%s', UNIX_TIMESTAMP())",
-                       array(
-                               $subject,
-                               SQL_ESCAPE(LOAD_TEMPLATE('task_ext_deactivated', true, $ext)),
-                       ),  __FUNCTION__, __LINE__, true, false
+               array(
+               $subject,
+               SQL_ESCAPE(LOAD_TEMPLATE('task_ext_deactivated', true, $ext)),
+               ),  __FUNCTION__, __LINE__, true, false
                );
        } // END - if
 }
@@ -824,7 +824,7 @@ function MODULE_HAS_MENU ($mod, $forceDb = false) {
        } elseif ((GET_EXT_VERSION('sql_patches') >= '0.3.6') && ((!EXT_IS_ACTIVE('cache')) || ($forceDb === true))) {
                // Check database for entry
                $result = SQL_QUERY_ESC("SELECT has_menu FROM `{!_MYSQL_PREFIX!}_mod_reg` WHERE `module`='%s' LIMIT 1",
-                       array($mod), __FUNCTION__, __LINE__);
+               array($mod), __FUNCTION__, __LINE__);
 
                // Entry found?
                if (SQL_NUMROWS($result) == 1) {
@@ -857,7 +857,7 @@ function DETERMINE_EXTENSION_TASK_ID ($ext_name) {
 
        // Search for extension task's id
        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_task_system` WHERE task_type='EXTENSION' AND subject='[%s:]' LIMIT 1",
-               array($ext_name), __FUNCTION__, __LINE__);
+       array($ext_name), __FUNCTION__, __LINE__);
 
        // Entry found?
        if (SQL_NUMROWS($result) == 1) {
@@ -879,7 +879,7 @@ function DETERMINE_TASK_ID_BY_SUBJECT ($subject) {
 
        // Search for task id
        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_task_system` WHERE subject LIKE '%s%%' LIMIT 1",
-               array($subject), __FUNCTION__, __LINE__);
+       array($subject), __FUNCTION__, __LINE__);
 
        // Entry found?
        if (SQL_NUMROWS($result) == 1) {
@@ -911,7 +911,7 @@ function ADD_EXTENSION_NOTES ($ver) {
                        );
 
                        // Reset them
-                       EXT_SET_UPDATE_NOTES("");
+                       EXT_SET_UPDATE_NOTES('');
                } elseif (($ver == '0.0') || ($ver == '0.0.0')) {
                        // Initial release
                        $content = array(
@@ -1193,7 +1193,7 @@ function GET_EXT_SQLS () {
        if (!isset($GLOBALS['ext_sqls'][EXT_GET_CURR_NAME()])) {
                // Not found, should not happen
                debug_report_bug(sprintf("ext_sqls is empty, current extension: %s",
-                       EXT_GET_CURR_NAME()
+               EXT_GET_CURR_NAME()
                ));
        } // END - if
 
index 57c6d5a5fe4f094af1ad8b5513397dbf18d3de8e..64cd843a24c69bb543777149c43d881b7e4e1927 100644 (file)
@@ -70,10 +70,10 @@ case 'update': // Update an extension
        switch ($EXT_VER)
        {
        case '0.0.1': // SQL queries for v0.0.1
-               ADD_EXT_SQL("");
+               ADD_EXT_SQL('');
 
                // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("");
+               EXT_SET_UPDATE_NOTES('');
                break;
        }
        break;
index 4b79072c7936f4d4edcf47fb63e4f8c8c6b7811b..79d213b6e641e5cea6625834156daa1a6aa83955 100644 (file)
@@ -50,97 +50,97 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','active','Heute Online', 10, 'N','Y')");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='active'");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_active'");
-
-       // Unregister filter
-       UNREGISTER_FILTER('online_extra_links', 'ADD_LINK_ACTIVE_LIST', true, $dry_run);
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='N' WHERE `what`='active' LIMIT 1");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='active' LIMIT 1");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei ge&auml;ndert.");
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','active','Heute Online', 10, 'N','Y')");
                break;
 
-       case '0.0.2': // SQL queries for v0.0.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
-               break;
-
-       case '0.0.3': // SQL queries for v0.0.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Design &quot;Solid-Business&quot; eingebaut.");
-               break;
-
-       case '0.0.4': // SQL queries for v0.0.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
-               break;
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='active'");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_active'");
 
-       case '0.0.5': // SQL queries for v0.0.5
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD active_limit BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_active','Aktiv-Liste','Einstellungen an der Aktiv-Liste (<strong>Heute Online</strong> im Gastbereich) vornehmen.', 8)");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Aktiven-Liste im Gastbereich ist nun einschr&auml;nkbar.");
-               break;
-
-       case '0.0.6': // SQL queries for v0.0.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen gesch&uuml;tzt.");
+               // Unregister filter
+               UNREGISTER_FILTER('online_extra_links', 'ADD_LINK_ACTIVE_LIST', true, $dry_run);
                break;
 
-       case '0.0.7': // SQL queries for v0.0.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='N' WHERE `what`='active' LIMIT 1");
                break;
 
-       case '0.0.8': // SQL queries for v0.0.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='active' LIMIT 1");
                break;
 
-       case '0.0.9': // SQL queries for v0.0.9
-               // Make update depending on 'online'
-               EXT_ADD_UPDATE_DEPENDS('online');
-
-               // Register filter
-               REGISTER_FILTER('online_extra_links', 'ADD_LINK_ACTIVE_LIST', false, true, $dry_run);
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Filter f&uuml;r den &quot;Wer ist Online&quot; Block hinzugef&uuml;gt und ist von <strong>online</strong> abh&auml;ngig.");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei ge&auml;ndert.");
+                               break;
+
+                       case '0.0.2': // SQL queries for v0.0.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+                               break;
+
+                       case '0.0.3': // SQL queries for v0.0.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Design &quot;Solid-Business&quot; eingebaut.");
+                               break;
+
+                       case '0.0.4': // SQL queries for v0.0.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+                               break;
+
+                       case '0.0.5': // SQL queries for v0.0.5
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD active_limit BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_active','Aktiv-Liste','Einstellungen an der Aktiv-Liste (<strong>Heute Online</strong> im Gastbereich) vornehmen.', 8)");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Aktiven-Liste im Gastbereich ist nun einschr&auml;nkbar.");
+                               break;
+
+                       case '0.0.6': // SQL queries for v0.0.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen gesch&uuml;tzt.");
+                               break;
+
+                       case '0.0.7': // SQL queries for v0.0.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+                               break;
+
+                       case '0.0.8': // SQL queries for v0.0.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+                               break;
+
+                       case '0.0.9': // SQL queries for v0.0.9
+                               // Make update depending on 'online'
+                               EXT_ADD_UPDATE_DEPENDS('online');
+
+                               // Register filter
+                               REGISTER_FILTER('online_extra_links', 'ADD_LINK_ACTIVE_LIST', false, true, $dry_run);
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Filter f&uuml;r den &quot;Wer ist Online&quot; Block hinzugef&uuml;gt und ist von <strong>online</strong> abh&auml;ngig.");
+                               break;
+               }
                break;
-       }
-       break;
 
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 //
index 5702053bc2a3e7f29982d0056646db83f2302191..c698c25af797d85f70aa3ec88228ef1d28654ad5 100644 (file)
@@ -50,58 +50,58 @@ EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.2.0', '0.3.0', '0.3.1', '0.4.0', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins', NULL, 'Admin-Management','Administratoren anlegen, l&ouml;schen oder Passwort/E-Mail Adresse &auml;ndern.','1')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_add','Admin hinzuf&uuml;gen','Neuen Admin-Account anlegen','0')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_edit','Admin-Account &auml;ndern','Bestehende Admin-Accounts bearbeiten: E-Mail-Adresse, Passwort und/oder Login-Name &auml;ndern.','1')");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='admins'");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_acls`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_mails`");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP default_acl");
-
-       // Remove filters
-       UNREGISTER_FILTER('sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', true, $dry_run);
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.2.0': // SQL queries for v0.2
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_contact','Admin kontaktieren','Kontaktiert einen Admin per Mail oder Nachricht (nur wenn messaging-Erweiterung installiert ist).','2')");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("F&uuml;gt den Men&uuml;punkt &quot;Admin kontaktieren&quot; hinzu.");
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins', NULL, 'Admin-Management','Administratoren anlegen, l&ouml;schen oder Passwort/E-Mail Adresse &auml;ndern.','1')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_add','Admin hinzuf&uuml;gen','Neuen Admin-Account anlegen','0')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_edit','Admin-Account &auml;ndern','Bestehende Admin-Accounts bearbeiten: E-Mail-Adresse, Passwort und/oder Login-Name &auml;ndern.','1')");
                break;
 
-       case '0.3.0': // SQL queries for v0.3
-               // Add admin menu
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','config_admins','ACL einstellen','Richten Sie Zugriffskontrollzeilen f&uuml;r jeden Admin individuell ein, um ihm nur bestimmte Bereiche des Admin-Bereiches zug&auml;nglich zu machen oder zu sperren.','4')");
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='admins'");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_acls`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_mails`");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP default_acl");
 
-               // Which is the default setting when you create a new admin login?
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD admins_default_acl ENUM('deny','allow') NOT NULL DEFAULT 'deny'");
+               // Remove filters
+               UNREGISTER_FILTER('sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', true, $dry_run);
+               break;
 
-               // Default is deny everything
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD default_acl ENUM('deny','allow') NOT NULL DEFAULT 'deny'");
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
+               break;
 
-               // But allow current admin everything (THIS SHALL BE YOU!)
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admins` SET default_acl='allow' WHERE login='".getSession('admin_login')."' LIMIT 1");
-               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_acls`");
-               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admins_acls` (
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
+               break;
+
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.2.0': // SQL queries for v0.2
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_contact','Admin kontaktieren','Kontaktiert einen Admin per Mail oder Nachricht (nur wenn messaging-Erweiterung installiert ist).','2')");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("F&uuml;gt den Men&uuml;punkt &quot;Admin kontaktieren&quot; hinzu.");
+                               break;
+
+                       case '0.3.0': // SQL queries for v0.3
+                               // Add admin menu
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','config_admins','ACL einstellen','Richten Sie Zugriffskontrollzeilen f&uuml;r jeden Admin individuell ein, um ihm nur bestimmte Bereiche des Admin-Bereiches zug&auml;nglich zu machen oder zu sperren.','4')");
+
+                               // Which is the default setting when you create a new admin login?
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD admins_default_acl ENUM('deny','allow') NOT NULL DEFAULT 'deny'");
+
+                               // Default is deny everything
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD default_acl ENUM('deny','allow') NOT NULL DEFAULT 'deny'");
+
+                               // But allow current admin everything (THIS SHALL BE YOU!)
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admins` SET default_acl='allow' WHERE login='".getSession('admin_login')."' LIMIT 1");
+                               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_acls`");
+                               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admins_acls` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 admin_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 action_menu VARCHAR(255) NOT NULL DEFAULT '',
@@ -111,211 +111,211 @@ KEY (admin_id),
 PRIMARY KEY (id)
 ) TYPE={!_TABLE_TYPE!}");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Sogn. ACLs werden hinzugef&uuml;gt: <strong>A</strong>ccess <strong>C</strong>ontrol <strong>L</strong>ines sind zu deutsch Zugriffkontrollzeilen, mit denen Sie einstellen k&ouml;nnen, was welcher Admin machen darf oder nicht.");
-               break;
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Sogn. ACLs werden hinzugef&uuml;gt: <strong>A</strong>ccess <strong>C</strong>ontrol <strong>L</strong>ines sind zu deutsch Zugriffkontrollzeilen, mit denen Sie einstellen k&ouml;nnen, was welcher Admin machen darf oder nicht.");
+                               break;
 
-       case '0.3.1': // SQL queries for v0.3.1
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins_acls` MODIFY id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT");
-               break;
+                       case '0.3.1': // SQL queries for v0.3.1
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins_acls` MODIFY id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT");
+                               break;
 
-       case '0.4.0': // SQL queries for v0.4.0
-               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_mails`");
-               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admins_mails` (
+                       case '0.4.0': // SQL queries for v0.4.0
+                               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_mails`");
+                               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admins_mails` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 admin_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 mail_template VARCHAR(255) NOT NULL,
 KEY (admin_id),
 PRIMARY KEY (id)
 ) TYPE={!_TABLE_TYPE!}");
-               ADD_EXT_SQL("INSERT INTO  `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_mails','Admin-Mails','Stellen Sie hier ein, welcher Admin welche Mail erhalten soll. Sie k&ouml;nnen dies (derzeit) jedoch erst, wenn einmal die Mail versendet wurde!','5')");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Kontrollieren Sie, welche Mails welcher Admin oder alle (admin_id=0) bekommen soll oder im UserLog (admin_id=-1) verzeichnet werden soll. Standartm&auml;ssig wird weiter an alle versendet.");
-               break;
-
-       case '0.4.1': // SQL queries for v0.4.1
-               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admins_mails` WHERE mail_template LIKE '% %'");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Admins-Mails-Tabelle geleert.");
-
-       case '0.4.4': // SQL queries for v0.4.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("&amp;admin= in &amp;amp;admin= umgewandelt.");
-               break;
-
-       case '0.4.5': // SQL queries for v0.4.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Vorbereitet auf Cache-System");
-               break;
-
-       case '0.4.6': // SQL queries for v0.4.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Problem mit cache-Erweiterung gefixt. Der Admin-Bereich war permanent gesperrt.");
-               break;
-
-       case '0.4.7': // SQL queries for v0.4.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Es wurde die Zeitmarke der Cache-Datei admins.cache mit ber&uuml;cksichtigt.");
-               break;
-
-       case '0.4.8': // SQL queries for v0.4.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
-               break;
-
-       case '0.4.9': // SQL queries for v0.4.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
-               break;
-
-       case '0.5.0': // SQL queries for v0.5.0
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
-               break;
-
-       case '0.5.1': // SQL queries for v0.5.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Cache wird endlich gel&oumlscht, wenn Admin entfernt wird.");
-               break;
-
-       case '0.5.2': // SQL queries for v0.5.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("L&ouml;schen von Admin-Accounts repariert und HTML-Code ausgelagert in Templates.");
-               break;
-
-       case '0.5.3': // SQL queries for v0.5.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
-               break;
-
-       case '0.5.4': // SQL queries for v0.5.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt.");
-               break;
-
-       case '0.5.5': // SQL queries for v0.5.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Men&uuml;punkt Admin-Mails korregiert: SQL-Anweisung war fehlerhaft; und HTML-Code in Templates ausgelagert.");
-               break;
-
-       case '0.5.6': // SQL queries for v0.5.6
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='admins_contct' WHERE `what`='admins_contact' LIMIT 1");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Namenskonflikt zwischen den Erweiterungen <strong>admins</strong> und (kommender) <strong>contact</strong>.");
-               break;
-
-       case '0.5.7': // SQL queries for v0.5.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Links wegen <strong>what=admins_contct</strong> ge&auml;ndert.");
-               break;
-
-       case '0.5.8': // SQL queries for v0.5.8
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='admins_contct' WHERE `what`='admins_contact' LIMIT 1");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Ein Punkt in der Versionsnummernliste verhinderte das 0.5.6-Update.");
-               break;
-
-       case '0.5.9': // SQL queries for v0.5.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen gesch&uuml;tzt.");
-               break;
-
-       case '0.6.0': // SQL queries for v0.6.0
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Link in &quot;ACL Einstellen&quot; zum Admin-Kontaktformular korregiert.");
-               break;
-
-       case '0.6.1': // SQL queries for v0.6.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Speichern von Admin-Accounts klappt wieder.");
-               break;
-
-       case '0.6.2': // SQL queries for v0.6.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Bitte verschieben Sie die admins-Templates (Ordner: {!PATH!}/templates/de/emails/) in den neuen Order admins!");
-               break;
-
-       case '0.6.3': // SQL queries for v0.6.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
-               break;
-
-       case '0.6.4': // SQL queries for v0.6.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Problem mit der Rechtevererbung beseitigt: Geben Sie nun ein Hauptmen&uuml; frei (Allow), dann kann der Admin auch die Untermen&uuml;s erreichen. Zudem k&ouml;nnen Sie gezielte Untermen&uuml;s im freigegeben Hauptmen&uuml; dennoch sperren.");
-               break;
+                               ADD_EXT_SQL("INSERT INTO  `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_mails','Admin-Mails','Stellen Sie hier ein, welcher Admin welche Mail erhalten soll. Sie k&ouml;nnen dies (derzeit) jedoch erst, wenn einmal die Mail versendet wurde!','5')");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Kontrollieren Sie, welche Mails welcher Admin oder alle (admin_id=0) bekommen soll oder im UserLog (admin_id=-1) verzeichnet werden soll. Standartm&auml;ssig wird weiter an alle versendet.");
+                               break;
+
+                       case '0.4.1': // SQL queries for v0.4.1
+                               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admins_mails` WHERE mail_template LIKE '% %'");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Admins-Mails-Tabelle geleert.");
+
+                       case '0.4.4': // SQL queries for v0.4.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("&amp;admin= in &amp;amp;admin= umgewandelt.");
+                               break;
+
+                       case '0.4.5': // SQL queries for v0.4.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Vorbereitet auf Cache-System");
+                               break;
+
+                       case '0.4.6': // SQL queries for v0.4.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Problem mit cache-Erweiterung gefixt. Der Admin-Bereich war permanent gesperrt.");
+                               break;
+
+                       case '0.4.7': // SQL queries for v0.4.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Es wurde die Zeitmarke der Cache-Datei admins.cache mit ber&uuml;cksichtigt.");
+                               break;
+
+                       case '0.4.8': // SQL queries for v0.4.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.4.9': // SQL queries for v0.4.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.5.0': // SQL queries for v0.5.0
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.5.1': // SQL queries for v0.5.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Cache wird endlich gel&oumlscht, wenn Admin entfernt wird.");
+                               break;
+
+                       case '0.5.2': // SQL queries for v0.5.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("L&ouml;schen von Admin-Accounts repariert und HTML-Code ausgelagert in Templates.");
+                               break;
+
+                       case '0.5.3': // SQL queries for v0.5.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+                               break;
+
+                       case '0.5.4': // SQL queries for v0.5.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt.");
+                               break;
+
+                       case '0.5.5': // SQL queries for v0.5.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Men&uuml;punkt Admin-Mails korregiert: SQL-Anweisung war fehlerhaft; und HTML-Code in Templates ausgelagert.");
+                               break;
+
+                       case '0.5.6': // SQL queries for v0.5.6
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='admins_contct' WHERE `what`='admins_contact' LIMIT 1");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Namenskonflikt zwischen den Erweiterungen <strong>admins</strong> und (kommender) <strong>contact</strong>.");
+                               break;
+
+                       case '0.5.7': // SQL queries for v0.5.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Links wegen <strong>what=admins_contct</strong> ge&auml;ndert.");
+                               break;
+
+                       case '0.5.8': // SQL queries for v0.5.8
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='admins_contct' WHERE `what`='admins_contact' LIMIT 1");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Ein Punkt in der Versionsnummernliste verhinderte das 0.5.6-Update.");
+                               break;
+
+                       case '0.5.9': // SQL queries for v0.5.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen gesch&uuml;tzt.");
+                               break;
+
+                       case '0.6.0': // SQL queries for v0.6.0
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Link in &quot;ACL Einstellen&quot; zum Admin-Kontaktformular korregiert.");
+                               break;
+
+                       case '0.6.1': // SQL queries for v0.6.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Speichern von Admin-Accounts klappt wieder.");
+                               break;
+
+                       case '0.6.2': // SQL queries for v0.6.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Bitte verschieben Sie die admins-Templates (Ordner: {!PATH!}/templates/de/emails/) in den neuen Order admins!");
+                               break;
+
+                       case '0.6.3': // SQL queries for v0.6.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+                               break;
+
+                       case '0.6.4': // SQL queries for v0.6.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Problem mit der Rechtevererbung beseitigt: Geben Sie nun ein Hauptmen&uuml; frei (Allow), dann kann der Admin auch die Untermen&uuml;s erreichen. Zudem k&ouml;nnen Sie gezielte Untermen&uuml;s im freigegeben Hauptmen&uuml; dennoch sperren.");
+                               break;
+
+                       case '0.6.5': // SQL queries for v0.6.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Sicherheitsupdate f&uuml;r die Include-Befehle.");
+                               break;
+
+                       case '0.6.6': // SQL queries for v0.5.6
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='admins_contct' WHERE `what`='admins_contact' LIMIT 1");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Namenskonflikt zwischen den Erweiterungen <strong>admins</strong> und (kommender) <strong>contact</strong>.");
+                               break;
+
+                       case '0.6.7': // SQL queries for v0.6.7
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD la_mode ENUM('global','OLD','NEW') NOT NULL DEFAULT 'global'");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Namenskonflikt zwischen den Erweiterungen <strong>admins</strong> und (kommender) <strong>contact</strong>. Beseitigung eines Fehlers <strong>HTTP_POSR_VARS</strong> beim &Auml;ndern von Administratoren.");
+                               break;
+
+                       case '0.6.8': // SQL queries for v0.6.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("<strong>setSession()</strong> mit @-Zeichen gegen ungewollte Ausgaben abgesichert.");
+                               break;
+
+                       case '0.6.9': // SQL queries for v0.6.9
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Admin-Management' WHERE action = 'admins' AND (`what`='' OR `what` IS NULL) LIMIT 1");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Verwaltung nach Management umbenannt.");
+                               break;
+
+                       case '0.7.0': // SQL queries for v0.7.0
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Veraltetes Update.");
+                               break;
+
+                       case '0.7.1': // SQL queries for v0.7.1
+                               // Update depends on sql_patches
+                               EXT_ADD_UPDATE_DEPENDS('sql_patches');
+
+                               // Add filters
+                               REGISTER_FILTER('sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', false, true, $dry_run);
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Filter hinzugef&uuml;gt und ist von <strong>sql_patches</strong> abh&auml;ngig.");
+                               break;
+
+                       case '0.7.2': // SQL queries for v0.7.2
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP login_failtures");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP last_failture");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD login_failures BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD last_failure TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'");
 
-       case '0.6.5': // SQL queries for v0.6.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Sicherheitsupdate f&uuml;r die Include-Befehle.");
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Schreibweise korregiert.");
+                               break;
+               }
                break;
 
-       case '0.6.6': // SQL queries for v0.5.6
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='admins_contct' WHERE `what`='admins_contact' LIMIT 1");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Namenskonflikt zwischen den Erweiterungen <strong>admins</strong> und (kommender) <strong>contact</strong>.");
-               break;
-
-       case '0.6.7': // SQL queries for v0.6.7
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD la_mode ENUM('global','OLD','NEW') NOT NULL DEFAULT 'global'");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Namenskonflikt zwischen den Erweiterungen <strong>admins</strong> und (kommender) <strong>contact</strong>. Beseitigung eines Fehlers <strong>HTTP_POSR_VARS</strong> beim &Auml;ndern von Administratoren.");
-               break;
-
-       case '0.6.8': // SQL queries for v0.6.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("<strong>setSession()</strong> mit @-Zeichen gegen ungewollte Ausgaben abgesichert.");
-               break;
-
-       case '0.6.9': // SQL queries for v0.6.9
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Admin-Management' WHERE action = 'admins' AND (`what`='' OR `what` IS NULL) LIMIT 1");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Verwaltung nach Management umbenannt.");
-               break;
-
-       case '0.7.0': // SQL queries for v0.7.0
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Veraltetes Update.");
-               break;
-
-       case '0.7.1': // SQL queries for v0.7.1
-               // Update depends on sql_patches
-               EXT_ADD_UPDATE_DEPENDS('sql_patches');
-
-               // Add filters
-               REGISTER_FILTER('sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', false, true, $dry_run);
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Filter hinzugef&uuml;gt und ist von <strong>sql_patches</strong> abh&auml;ngig.");
-               break;
-
-       case '0.7.2': // SQL queries for v0.7.2
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP login_failtures");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP last_failture");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD login_failures BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD last_failure TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Schreibweise korregiert.");
-               break;
-       }
-       break;
-
-case 'modify': // When the extension got modified
-       break;
-
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
+
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 // Keep this extension always active!
index c6a2b932ca1dbaa694fe76890e82efd5482e8fa0..0888bd6f4b02e21b8155e2c1a2c48744791450db 100644 (file)
@@ -50,47 +50,47 @@ EXT_SET_VER_HISTORY(array('0.0'));
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // Remove all other themes
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_extensions` WHERE ext_name LIKE 'admintheme%'");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='stats' WHERE `what`='usr_online'");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='stats' WHERE `what`='email_stats'");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='misc' WHERE `what`='maintenance'");
-       break;
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // Remove all other themes
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_extensions` WHERE ext_name LIKE 'admintheme%'");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='stats' WHERE `what`='usr_online'");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='stats' WHERE `what`='email_stats'");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='misc' WHERE `what`='maintenance'");
+               break;
 
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
+               break;
 
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
+               break;
 
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
+               break;
 
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES('');
+                               break;
+               }
                break;
-       }
-       break;
 
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 //
index 1bf7756e8f1c96c0b10767b5425426e008a59c23..67320b1707559515e23bb2ea04b42cf7af848600 100644 (file)
@@ -50,47 +50,47 @@ EXT_SET_VER_HISTORY(array('0.0'));
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // Remove all other menu themes
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_extensions` WHERE ext_name LIKE 'admintheme%'");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='misc' WHERE `what`='usr_online' LIMIT 1");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='stats' WHERE `what`='email' LIMIT 1");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='setup' WHERE `what`='maintenance' LIMIT 1");
-       break;
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // Remove all other menu themes
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_extensions` WHERE ext_name LIKE 'admintheme%'");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='misc' WHERE `what`='usr_online' LIMIT 1");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='stats' WHERE `what`='email' LIMIT 1");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='setup' WHERE `what`='maintenance' LIMIT 1");
+               break;
 
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
+               break;
 
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
+               break;
 
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
+               break;
 
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES('');
+                               break;
+               }
                break;
-       }
-       break;
 
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 //
index 439280c270eb6a530764d8db8c1952756b836147..b6ce1be192fa037fab8603366cf3fbb03b449157 100644 (file)
@@ -50,218 +50,218 @@ EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` MODIFY data_type ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE','DELETED') NOT NULL DEFAULT 'TEMP'");
-       if (EXT_IS_ACTIVE('bonus')) {
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` MODIFY data_type ENUM('NEW','QUEUE','SEND','DELETED') NOT NULL DEFAULT 'NEW'");
-       }
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` MODIFY data_type ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE') NOT NULL DEFAULT 'TEMP'");
-       if (EXT_IS_ACTIVE('bonus')) {
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` MODIFY data_type ENUM('NEW','QUEUE','SEND') NOT NULL DEFAULT 'NEW'");
-       }
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN('config_autopurge','list_autopurge')");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP ap_notified");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.1.0': // SQL queries for v0.1
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD autopurge_inactive ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD autopurge_unconfirmed ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_inactive_since BIGINT(20) UNSIGNED NOT NULL DEFAULT '2592000'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_inactive_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '25200'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_unconfirmed_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '432000'");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_autopurge','Auto-L&ouml;schung','Automatisch inaktive oder nicht best&auml;tigte Accounts l&ouml;schen.','12')");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_autopurge','Inaktive finden','Lassen Sie sich vor dem t&auml;glichen Reset anzeigen, welche Mitglieder als inaktiv erkannt werden und welche gel&ouml;scht werden.','10')");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD ap_notified BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Automatisches L&ouml:schen von inaktiven bzw. nicht best&auml;tigten Accounts hinzugef&uuml;gt.");
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` MODIFY data_type ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE','DELETED') NOT NULL DEFAULT 'TEMP'");
+               if (EXT_IS_ACTIVE('bonus')) {
+                       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` MODIFY data_type ENUM('NEW','QUEUE','SEND','DELETED') NOT NULL DEFAULT 'NEW'");
+               }
                break;
 
-       case '0.1.2': // SQL queries for v0.1.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Automatisches L&ouml;schen von als zu l&ouml;schen markierte Tasks hinzugef&uuml;gt.");
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` MODIFY data_type ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE') NOT NULL DEFAULT 'TEMP'");
+               if (EXT_IS_ACTIVE('bonus')) {
+                       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` MODIFY data_type ENUM('NEW','QUEUE','SEND') NOT NULL DEFAULT 'NEW'");
+               }
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN('config_autopurge','list_autopurge')");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP ap_notified");
                break;
 
-       case '0.1.4': // SQL queries for v0.1.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler <div class=\"admin_failed\">Warning: Missing argument 2 for create_timestamp_from_selections() in {!PATH!}inc/libs/pro_functions.php on line 227</div> behoben.");
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.1.5': // SQL queries for v0.1.5
-               // Update notes (these will be set as task text!)
-
-               EXT_SET_UPDATE_NOTES("Anstelle von <strong>ref_depth</strong> wurde <strong>level</strong> programmiert.");
-               break;
-
-       case '0.1.6': // SQL queries for v0.1.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.1.7': // SQL queries for v0.1.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.1.0': // SQL queries for v0.1
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD autopurge_inactive ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD autopurge_unconfirmed ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_inactive_since BIGINT(20) UNSIGNED NOT NULL DEFAULT '2592000'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_inactive_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '25200'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_unconfirmed_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '432000'");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_autopurge','Auto-L&ouml;schung','Automatisch inaktive oder nicht best&auml;tigte Accounts l&ouml;schen.','12')");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_autopurge','Inaktive finden','Lassen Sie sich vor dem t&auml;glichen Reset anzeigen, welche Mitglieder als inaktiv erkannt werden und welche gel&ouml;scht werden.','10')");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD ap_notified BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Automatisches L&ouml:schen von inaktiven bzw. nicht best&auml;tigten Accounts hinzugef&uuml;gt.");
+                               break;
+
+                       case '0.1.2': // SQL queries for v0.1.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Automatisches L&ouml;schen von als zu l&ouml;schen markierte Tasks hinzugef&uuml;gt.");
+                               break;
+
+                       case '0.1.4': // SQL queries for v0.1.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler <div class=\"admin_failed\">Warning: Missing argument 2 for create_timestamp_from_selections() in {!PATH!}inc/libs/pro_functions.php on line 227</div> behoben.");
+                               break;
+
+                       case '0.1.5': // SQL queries for v0.1.5
+                               // Update notes (these will be set as task text!)
+
+                               EXT_SET_UPDATE_NOTES("Anstelle von <strong>ref_depth</strong> wurde <strong>level</strong> programmiert.");
+                               break;
+
+                       case '0.1.6': // SQL queries for v0.1.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.1.7': // SQL queries for v0.1.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.1.8': // SQL queries for v0.1.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
+                               break;
+
+                       case '0.1.9': // SQL queries for v0.1.9
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD autopurge_tasks ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_tasks_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('one_day')*7)."'");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Bereinigung von zu l&ouml;schenden Aufgaben klappt wieder. Zeitlimit f&uuml;r genanntes kann eingestellt werden (Default = 7 Tage).<br /><br /><u>Bitte aktualisieren Sie auch die Admin-Templates!</u>");
+                               break;
+
+                       case '0.2.0': // SQL queries for v0.2.0
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_in_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_un_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_tasks_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Mail wird bei L&ouml;schung von Aufgaben ausgesendet.<br /><br /><u>Bitte aktualisieren Sie auch die Admin-Templates!</u>");
+                               break;
+
+                       case '0.2.1': // SQL queries for v0.2.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Diverse angebundene Erweiterungen gefixt.");
+                               break;
+
+                       case '0.2.2': // SQL queries for v0.2.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Betreffzeile f&uuml;r gel&ouml;schte Aufgaben korregiert.");
+                               break;
+
+                       case '0.2.3': // SQL queries for v0.2.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
+                               break;
+
+                       case '0.2.4': // SQL queries for v0.2.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Auto-L&ouml;schung von Best&auml;tigungslinks kann unter &quot;Sonstige Einstellungen&quot; abgeschaltet werden (0 setzen!)");
+                               break;
+
+                       case '0.2.5': // SQL queries for v0.2.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+                               break;
+
+                       case '0.2.6': // SQL queries for v0.2.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Problem mit Jackpot beseitigt ({!POINTS!} wurden nicht gutgeschrieben.)");
+                               break;
+
+                       case '0.2.7': // SQL queries for v0.2.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
+                               break;
+
+                       case '0.2.8': // SQL queries for v0.2.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
+                               break;
+
+                       case '0.2.9': // SQL queries for v0.2.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Mailbetreffs korregiert.");
+                               break;
+
+                       case '0.3.0': // SQL queries for v0.3.0
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Template <u>admin_config_autopurge_pro.tpl</u> ist &uuml;berfl&uuml;ssig geworden. Bitte l&ouml;schen Sie dies!");
+                               break;
+
+                       case '0.3.1': // SQL queries for v0.3.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausf&uuml;hrlich.");
+                               break;
+
+                       case '0.3.2': // SQL queries for v0.3.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+                               break;
+
+                       case '0.3.3': // SQL queries for v0.3.3
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_del_mails ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_dm_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_dm_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '86400'");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Von bereits gel&ouml;schten Mitgliedern die Mails l&ouml;schen integriert.");
+                               break;
+
+                       case '0.3.4': // SQL queries for v0.3.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler mit <strong>timestamp_send</strong> (Zeile 308) beseitigt.");
+                               break;
+
+                       case '0.3.5': // SQL queries for v0.3.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler mit <strong>ap_del_emails</strong> (Einstellungen im Admin-Bereich) beseitigt.");
+                               break;
+
+                       case '0.3.6': // SQL queries for v0.3.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Die Accounts der Standart-Referal-ID, der Bonus-ID, Bettellink-ID und der Verdoppler-ID werden nun nicht mehr gel&ouml;scht und tauchen auch unterhalb der Inaktiven-Liste nicht mehr auf.");
+                               break;
+
+                       case '0.3.7': // SQL queries for v0.3.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+                               break;
+
+                       case '0.3.8': // SQL queries for v0.3.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
+                               break;
+
+                       case '0.3.9': // SQL queries for v0.3.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt. Unter <strong>Auto-L&ouml;schung</strong> finden Sie nun auch die Einstellungen zu Mailbest&auml;tigungs wieder. Zudem werden keine Urlauber (neue Urlaubsschaltung beachtet) mehr als inaktiv erkannt.");
+                               break;
+
+                       case '0.4.0': // SQL queries for v0.4.0
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Template-Problem beseitigt. Dies verhinderte das Abspeichern der Einstellungen.");
+                               break;
+               }
                break;
 
-       case '0.1.8': // SQL queries for v0.1.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
-               break;
-
-       case '0.1.9': // SQL queries for v0.1.9
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD autopurge_tasks ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_tasks_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('one_day')*7)."'");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Bereinigung von zu l&ouml;schenden Aufgaben klappt wieder. Zeitlimit f&uuml;r genanntes kann eingestellt werden (Default = 7 Tage).<br /><br /><u>Bitte aktualisieren Sie auch die Admin-Templates!</u>");
-               break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-       case '0.2.0': // SQL queries for v0.2.0
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_in_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_un_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_tasks_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Mail wird bei L&ouml;schung von Aufgaben ausgesendet.<br /><br /><u>Bitte aktualisieren Sie auch die Admin-Templates!</u>");
-               break;
-
-       case '0.2.1': // SQL queries for v0.2.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Diverse angebundene Erweiterungen gefixt.");
-               break;
-
-       case '0.2.2': // SQL queries for v0.2.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Betreffzeile f&uuml;r gel&ouml;schte Aufgaben korregiert.");
-               break;
-
-       case '0.2.3': // SQL queries for v0.2.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
-               break;
-
-       case '0.2.4': // SQL queries for v0.2.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Auto-L&ouml;schung von Best&auml;tigungslinks kann unter &quot;Sonstige Einstellungen&quot; abgeschaltet werden (0 setzen!)");
-               break;
-
-       case '0.2.5': // SQL queries for v0.2.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
-               break;
-
-       case '0.2.6': // SQL queries for v0.2.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Problem mit Jackpot beseitigt ({!POINTS!} wurden nicht gutgeschrieben.)");
-               break;
-
-       case '0.2.7': // SQL queries for v0.2.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
-               break;
-
-       case '0.2.8': // SQL queries for v0.2.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
-               break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-       case '0.2.9': // SQL queries for v0.2.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Mailbetreffs korregiert.");
-               break;
-
-       case '0.3.0': // SQL queries for v0.3.0
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Template <u>admin_config_autopurge_pro.tpl</u> ist &uuml;berfl&uuml;ssig geworden. Bitte l&ouml;schen Sie dies!");
-               break;
-
-       case '0.3.1': // SQL queries for v0.3.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausf&uuml;hrlich.");
-               break;
-
-       case '0.3.2': // SQL queries for v0.3.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
-               break;
-
-       case '0.3.3': // SQL queries for v0.3.3
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_del_mails ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_dm_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_dm_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '86400'");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Von bereits gel&ouml;schten Mitgliedern die Mails l&ouml;schen integriert.");
-               break;
-
-       case '0.3.4': // SQL queries for v0.3.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler mit <strong>timestamp_send</strong> (Zeile 308) beseitigt.");
-               break;
-
-       case '0.3.5': // SQL queries for v0.3.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler mit <strong>ap_del_emails</strong> (Einstellungen im Admin-Bereich) beseitigt.");
-               break;
-
-       case '0.3.6': // SQL queries for v0.3.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Die Accounts der Standart-Referal-ID, der Bonus-ID, Bettellink-ID und der Verdoppler-ID werden nun nicht mehr gel&ouml;scht und tauchen auch unterhalb der Inaktiven-Liste nicht mehr auf.");
-               break;
-
-       case '0.3.7': // SQL queries for v0.3.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
-               break;
-
-       case '0.3.8': // SQL queries for v0.3.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
-               break;
-
-       case '0.3.9': // SQL queries for v0.3.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt. Unter <strong>Auto-L&ouml;schung</strong> finden Sie nun auch die Einstellungen zu Mailbest&auml;tigungs wieder. Zudem werden keine Urlauber (neue Urlaubsschaltung beachtet) mehr als inaktiv erkannt.");
-               break;
-
-       case '0.4.0': // SQL queries for v0.4.0
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Template-Problem beseitigt. Dies verhinderte das Abspeichern der Einstellungen.");
-               break;
-       }
-       break;
-
-case 'modify': // When the extension got modified
-       break;
-
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
-
-default: // Do stuff when extension is loaded
-       // Do we have a daily-reset-run?
-       if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) {
-               // Yes, we have. So let's auto-purge some campaigns, inactive users and unconfirmed accounts
-               ADD_INC_TO_POOL(sprintf("%sinc/autopurge.php", constant('PATH')));
-       }
-       break;
+                       default: // Do stuff when extension is loaded
+                               // Do we have a daily-reset-run?
+                               if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) {
+                                       // Yes, we have. So let's auto-purge some campaigns, inactive users and unconfirmed accounts
+                                       ADD_INC_TO_POOL(sprintf("%sinc/autopurge.php", constant('PATH')));
+                               }
+                               break;
 }
 
 // Keep this extension always active!
index e9914bc2bb9baebd76a4e3154ca9d3cc2b2aa55e..c8af77f863f8c36eee263d59bb128b7389383a16 100644 (file)
@@ -50,10 +50,10 @@ EXT_SET_VER_HISTORY(array('0.0'));
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_accounts`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_accounts` (
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_accounts`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_accounts` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 account_created BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -79,8 +79,8 @@ INDEX (account_created),
 INDEX (account_locked),
 INDEX (last_tan_stamp)
 ) TYPE={!_TABLE_TYPE!}");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_transfers`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_transfers` (
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_transfers`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_transfers` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 to_account_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 from_account_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -92,8 +92,8 @@ PRIMARY KEY (id),
 INDEX (to_account_id, from_account_id),
 INDEX (day_bookkeeping, day_available)
 ) TYPE={!_TABLE_TYPE!}");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_packages`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_packages` (
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_packages`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_packages` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 title VARCHAR(255) NOT NULL DEFAULT '',
 description TINYTEXT,
@@ -112,12 +112,12 @@ free_account_stuff TINYTEXT null,
 tan_lock TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
 PRIMARY KEY (id)
 ) TYPE={!_TABLE_TYPE!}");
-       // free_account_stuff will be a list of columns of the table _bank_packages
-       // what the member shall get for the specified income. output_system_mode
-       // must be extended with the mode you get for free: output_system_mode:LOGIN
-       // should be fine. More than one entry and not DISABLED ;) are not supported.
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_tanlist`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_tanlist` (
+               // free_account_stuff will be a list of columns of the table _bank_packages
+               // what the member shall get for the specified income. output_system_mode
+               // must be extended with the mode you get for free: output_system_mode:LOGIN
+               // should be fine. More than one entry and not DISABLED ;) are not supported.
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_tanlist`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_tanlist` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 idx TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
 account_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -127,73 +127,73 @@ PRIMARY KEY (id),
 UNIQUE (account_id, tan)
 ) TYPE={!_TABLE_TYPE!}");
 
-       // Admin menu queries
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank', NULL, 'Bank-Accounts','Verwalten Sie hier alle Bank-Accounts Ihrer Mitglieder, sowie Angebotspakete und &Uuml;berweisungen.', 6)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','add_bank_package','Angebotspaket hinzuf&uuml;gen','Neues Angebotspaket erstellen.', 1)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_package','Angebotspakete auflisten','Listet alle erstellten Angebotspakete auf.', 2)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','edit_bank_package','Angebotspaket &auml;ndern','Nach Auswahl eines Angebotspaketes k&ouml;nnen Sie dieses hier ver&auml;ndern. Bitte beachten Sie, dass Ihre Mitglieder keine Mail dabei erhalten!', 3)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_package','Angebotspaket ent-/sperren','Nehmen Sie Angebotspakete zur tempor&auml;ren &Uuml;berarbeitung zuvor heraus, dann k&ouml;nnen Sie in Ruhe dr&uuml;ber nachdenken und Berechnungen anstellen. Freigabe ist hier auch m&ouml;glich.', 4)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','del_bank_package','Angebotspaket l&ouml;schen','Nach Auswahl eines Angebotspaketes k&ouml;nnen Sie mit abschliessender Best&auml;tigung Angebotspakete ganz l&ouml;schen. Bitte beachten Sie, dass dies nur m&ouml;glich ist, wenn auch alle Accounts dieses nicht mehr nutzen!', 5)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','add_bank_account','Konto anlegen','Legen Sie hier Konten f&uuml;r die Mitglieder an (falls Ihre Mitglieder nicht zurecht kommen).', 6)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_account','Konten auflisten','Auflistung aller Konto oder eines ausw&auml;hlbaren Mitglieds.', 7)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','edit_bank_account','Konto &auml;ndern','&Auml;ndern Sie hier bestehende Konten, z.B. den Dispositionskredit usw. PINs und TANs sind hier nicht &auml;nderbar! Best&auml;tigungsmails sind optional versendbar.', 8)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_account','Konto ent-/sperren','Sperren Sie hier Konten bei Bedarf. Auch das Freischalten ist hier m&ouml;glich. Eine Benachrichtigung per Mail wird dann an das Mitglied ausgesendet.', 9)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','del_bank_account','Konto l&ouml;schen','L&ouml;schen von Konten mit Best&auml;tigungsmail. Wenn Sie ein Mitglieder-Account l&ouml;schen, so m&uuml;ssen Sie derzeit seine angelegten Konten auch l&ouml;schen!', 10)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','send_bank_tanlist','TAN-Liste aussenden','Listet zuerst Anfragen von Mitgliedern auf, die eine neue (i)TAN-Liste ben&ouml;tigen, anschliessend kann die Liste dann ausgesendet werden.', 11)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_tanlist','TAN-Liste ent-/sperren','Bestehende TAN-Listen k&ouml;nnen auf Kundenwunsch hin gesperrt und wieder entsperrt werden. Dies passiert auch, wenn der Kunde x-mal (siehe Angebotspakete) eine verkehrte TAN eingegeben hat. Einzelne TANs sind nicht ent-/sperrbar.', 12)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_trans','&Uuml;berweisungen auflisten','Nach Auswahl eines Mitgliedes und einem Konto (ben&ouml;tgt JavaScript!) k&ouml;nnen Sie seitenweise die &Uuml;berweisungen durchschauen.', 13)");
+               // Admin menu queries
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank', NULL, 'Bank-Accounts','Verwalten Sie hier alle Bank-Accounts Ihrer Mitglieder, sowie Angebotspakete und &Uuml;berweisungen.', 6)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','add_bank_package','Angebotspaket hinzuf&uuml;gen','Neues Angebotspaket erstellen.', 1)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_package','Angebotspakete auflisten','Listet alle erstellten Angebotspakete auf.', 2)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','edit_bank_package','Angebotspaket &auml;ndern','Nach Auswahl eines Angebotspaketes k&ouml;nnen Sie dieses hier ver&auml;ndern. Bitte beachten Sie, dass Ihre Mitglieder keine Mail dabei erhalten!', 3)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_package','Angebotspaket ent-/sperren','Nehmen Sie Angebotspakete zur tempor&auml;ren &Uuml;berarbeitung zuvor heraus, dann k&ouml;nnen Sie in Ruhe dr&uuml;ber nachdenken und Berechnungen anstellen. Freigabe ist hier auch m&ouml;glich.', 4)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','del_bank_package','Angebotspaket l&ouml;schen','Nach Auswahl eines Angebotspaketes k&ouml;nnen Sie mit abschliessender Best&auml;tigung Angebotspakete ganz l&ouml;schen. Bitte beachten Sie, dass dies nur m&ouml;glich ist, wenn auch alle Accounts dieses nicht mehr nutzen!', 5)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','add_bank_account','Konto anlegen','Legen Sie hier Konten f&uuml;r die Mitglieder an (falls Ihre Mitglieder nicht zurecht kommen).', 6)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_account','Konten auflisten','Auflistung aller Konto oder eines ausw&auml;hlbaren Mitglieds.', 7)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','edit_bank_account','Konto &auml;ndern','&Auml;ndern Sie hier bestehende Konten, z.B. den Dispositionskredit usw. PINs und TANs sind hier nicht &auml;nderbar! Best&auml;tigungsmails sind optional versendbar.', 8)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_account','Konto ent-/sperren','Sperren Sie hier Konten bei Bedarf. Auch das Freischalten ist hier m&ouml;glich. Eine Benachrichtigung per Mail wird dann an das Mitglied ausgesendet.', 9)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','del_bank_account','Konto l&ouml;schen','L&ouml;schen von Konten mit Best&auml;tigungsmail. Wenn Sie ein Mitglieder-Account l&ouml;schen, so m&uuml;ssen Sie derzeit seine angelegten Konten auch l&ouml;schen!', 10)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','send_bank_tanlist','TAN-Liste aussenden','Listet zuerst Anfragen von Mitgliedern auf, die eine neue (i)TAN-Liste ben&ouml;tigen, anschliessend kann die Liste dann ausgesendet werden.', 11)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_tanlist','TAN-Liste ent-/sperren','Bestehende TAN-Listen k&ouml;nnen auf Kundenwunsch hin gesperrt und wieder entsperrt werden. Dies passiert auch, wenn der Kunde x-mal (siehe Angebotspakete) eine verkehrte TAN eingegeben hat. Einzelne TANs sind nicht ent-/sperrbar.', 12)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_trans','&Uuml;berweisungen auflisten','Nach Auswahl eines Mitgliedes und einem Konto (ben&ouml;tgt JavaScript!) k&ouml;nnen Sie seitenweise die &Uuml;berweisungen durchschauen.', 13)");
 
-       // Member menu
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank', NULL, 'Bank-Account','N','Y', 3)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_infos','Angebotspakete','N','Y', 1)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_create','Konto anlegen','N','Y', 2)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_deposit','Auf Konto einzahlen','N','Y', 3)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_withdraw','Vom Konto abheben','N','Y', 4)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_output','Kontoauszug','N','Y', 5)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_change','Paket wechseln','N','Y', 6)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_remove','Konto K&uuml;ndigen','N','Y', 7)");
-       break;
+               // Member menu
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank', NULL, 'Bank-Account','N','Y', 3)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_infos','Angebotspakete','N','Y', 1)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_create','Konto anlegen','N','Y', 2)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_deposit','Auf Konto einzahlen','N','Y', 3)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_withdraw','Vom Konto abheben','N','Y', 4)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_output','Kontoauszug','N','Y', 5)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_change','Paket wechseln','N','Y', 6)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_remove','Konto K&uuml;ndigen','N','Y', 7)");
+               break;
 
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_accounts`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_transfers`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_packages`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_tanlist`");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='bank'");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='bank'");
-       break;
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_accounts`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_transfers`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_packages`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_tanlist`");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='bank'");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='bank'");
+               break;
 
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `action`='bank' LIMIT 8");
-       break;
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `action`='bank' LIMIT 8");
+               break;
 
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `action`='bank' LIMIT 8");
-       break;
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `action`='bank' LIMIT 8");
+               break;
 
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               ADD_EXT_SQL("");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               ADD_EXT_SQL('');
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("");
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES('');
+                               break;
+               }
                break;
-       }
-       break;
 
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 //
index 1fe6c89720240c3c849e595c2cad8b12ec1e71e4..80920bf5540f3d3fd77c49ee9cb468b46b95cfc1 100644 (file)
@@ -50,17 +50,17 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_beg','Bettel-Link','IP-Sperre, {!POINTS!}-Verg&uuml;tung usw. k&ouml;nnen Sie hier einstellen.', 10)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','beg','{!POINTS!} erbetteln!',4,'Y','Y')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','beg','Ihr Bettel-Link',6,'Y','Y')");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '600'");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_uid_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00100");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_beg_ips`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_beg_ips` (
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_beg','Bettel-Link','IP-Sperre, {!POINTS!}-Verg&uuml;tung usw. k&ouml;nnen Sie hier einstellen.', 10)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','beg','{!POINTS!} erbetteln!',4,'Y','Y')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','beg','Ihr Bettel-Link',6,'Y','Y')");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '600'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_uid_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00100");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_beg_ips`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_beg_ips` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 remote_ip VARCHAR(15) NOT NULL DEFAULT '0.0.0.0',
@@ -68,216 +68,216 @@ timeout VARCHAR(10) NOT NULL DEFAULT '',
 KEY (userid),
 PRIMARY KEY(id)
 ) TYPE={!_TABLE_TYPE!}");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_beg' OR `what`='list_beg'");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='beg'");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='beg' OR `what`='beg2'");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_beg_ips`");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='beg' LIMIT 1");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='beg' LIMIT 1");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='beg' LIMIT 1");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='beg' LIMIT 1");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what IN('beg','beg2') LIMIT 2");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE `module`='beg' LIMIT 1");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Design &quot;Solid-Business&quot; eingebaut.");
                break;
 
-       case '0.0.2': // SQL queries for v0.0.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_beg' OR `what`='list_beg'");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='beg'");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='beg' OR `what`='beg2'");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_beg_ips`");
                break;
 
-       case '0.0.3': // SQL queries for v0.0.3
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_points_max FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '0.10000'");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Maximale Obergrenze an {!POINTS!} einstellbar (Standart: 0,1 {!POINTS!})");
-               break;
-
-       case '0.0.4': // SQL queries for v0.0.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("&Uuml;berlange Kommastellen bei Punktangaben aus Bettellink und Gastbereich entfernt und Admin-Templates repariert (&quot;Unbekannte Spalte <u>beg_points_ma</u>&quot;).");
-               break;
-
-       case '0.0.5': // SQL queries for v0.0.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Im Mitgliedsmen&uuml; wurde die Beschreibung aus dem Gastmen&uuml; verwendet.");
-               break;
-
-       case '0.0.6': // SQL queries for v0.0.6
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Ein Mitgliedsaccount (empfehlenswert ist Ihr eigenes!) kann zum Abbuchen der {!POINTS!} verwendet werden. Template <u>admin_config_beg.tpl</u> (und pro!) nicht vergessen, zu aktualisieren.");
-               break;
-
-       case '0.0.8': // SQL queries for v0.0.8
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_ip_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Zeitsperre gegen die selbe IP-Nummer hinzugef&uuml;gt.");
-               break;
-
-       case '0.0.9': // SQL queries for v0.0.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Bitte verschieben Sie die beg-Templates (Ordner: {!PATH!}/templates/".getLanguage()."/html/) in den neuen Order beg!");
-               break;
-
-       case '0.1.0': // SQL queries for v0.2.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
-               break;
-
-       case '0.1.1': // SQL queries for v0.1.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
-               break;
-
-       case '0.1.2':
-               // SQL queries for v0.1.2
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_mode ENUM('DIRECT','REF') NOT NULL DEFAULT 'REF'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_active ENUM('Y','N') NOT NULL DEFAULT 'N'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_rallye ENUM('Y','N') NOT NULL DEFAULT 'N'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_points FLOAT(21,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-
-               $VIS = 'N'; $LOCKED = 'Y';
-               if (EXT_IS_ACTIVE('beg')) { $VIS = 'Y'; $LOCKED = 'N'; }
-
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','beg2','Bettel-Rallye','".$VIS."','".$LOCKED."','7')");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_beg','Bettel-Rallye','Listet alle Teilnehmer der monatlichen Bettel-Rallye auf.','12')");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Optionale Bettel-Rallye m&ouml;glich. Und die erbettelten {!POINTS!} k&ouml;nnen entweder nur dem bettelndem Mitglied direkt oder auch seinem Werber gutgeschrieben werden k&ouml;nnen.");
-               break;
-
-       case '0.1.3': // SQL queries for v0.1.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Erbettelte {!POINTS!} werden nach Deaktivierung der Bettel-Rallye gel&ouml;scht.");
-               break;
-
-       case '0.1.4': // SQL queries for v0.1.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Rechtlichen Hinweis im Mitgliedsbereich vergessen (<strong>member_list_beg.tpl</strong>); Template <strong>member_beg_404.tpl</strong> fehlte!");
-               break;
-
-       case '0.1.5': // SQL queries for v0.1.5
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Bettellink/-rallye', descr='IP-Sperre, {!POINTS!}-Verg&uuml;tung und auch die Bettel-Rallye k&ouml;nnen Sie hier einstellen.' WHERE `what`='config_beg' LIMIT 1");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlendes Template im Admin-Bereich hinzugef&uuml;gt. Im Admin-Bereich Hinweis hinzugef&uuml;gt, wenn Bettel-Rallye inaktiv ist. Bitte Script inc/monthly_beg.php l&ouml;schen!");
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='beg' LIMIT 1");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='beg' LIMIT 1");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='beg' LIMIT 1");
                break;
 
-       case '0.1.6': // SQL queries for v0.1.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Es wurden immer dem ersten bettelndem Mitglied die {!POINTS!} gutgeschrieben.");
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='beg' LIMIT 1");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what IN('beg','beg2') LIMIT 2");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE `module`='beg' LIMIT 1");
                break;
 
-       case '0.1.7': // SQL queries for v0.1.7
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_ral_en_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_ral_di_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_new_mem_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_notify_bonus  FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Die Mitglieder k&ouml;nnen nun optional automatisch &uuml;ber eine aktivierte und/oder deaktivierte Bettel-Rallye informiert werden. Beide Benachrichtigungen k&ouml;nnen Sie unter <strong>Einstellungen --&gt; Bettel-Link/-rallye</strong> seperat ein- und ausschalten! Zudem ist eine Sperre gegen eingeloggte Mitglieder eingebaut, die das Klicken auf den eigenen Bettel-Link etwas erschweren soll.");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Design &quot;Solid-Business&quot; eingebaut.");
+                               break;
+
+                       case '0.0.2': // SQL queries for v0.0.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+                               break;
+
+                       case '0.0.3': // SQL queries for v0.0.3
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_points_max FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '0.10000'");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Maximale Obergrenze an {!POINTS!} einstellbar (Standart: 0,1 {!POINTS!})");
+                               break;
+
+                       case '0.0.4': // SQL queries for v0.0.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("&Uuml;berlange Kommastellen bei Punktangaben aus Bettellink und Gastbereich entfernt und Admin-Templates repariert (&quot;Unbekannte Spalte <u>beg_points_ma</u>&quot;).");
+                               break;
+
+                       case '0.0.5': // SQL queries for v0.0.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Im Mitgliedsmen&uuml; wurde die Beschreibung aus dem Gastmen&uuml; verwendet.");
+                               break;
+
+                       case '0.0.6': // SQL queries for v0.0.6
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Ein Mitgliedsaccount (empfehlenswert ist Ihr eigenes!) kann zum Abbuchen der {!POINTS!} verwendet werden. Template <u>admin_config_beg.tpl</u> (und pro!) nicht vergessen, zu aktualisieren.");
+                               break;
+
+                       case '0.0.8': // SQL queries for v0.0.8
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_ip_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Zeitsperre gegen die selbe IP-Nummer hinzugef&uuml;gt.");
+                               break;
+
+                       case '0.0.9': // SQL queries for v0.0.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Bitte verschieben Sie die beg-Templates (Ordner: {!PATH!}/templates/".getLanguage()."/html/) in den neuen Order beg!");
+                               break;
+
+                       case '0.1.0': // SQL queries for v0.2.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+                               break;
+
+                       case '0.1.1': // SQL queries for v0.1.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
+                               break;
+
+                       case '0.1.2':
+                               // SQL queries for v0.1.2
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_mode ENUM('DIRECT','REF') NOT NULL DEFAULT 'REF'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_active ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_rallye ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_points FLOAT(21,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+
+                               $VIS = 'N'; $LOCKED = 'Y';
+                               if (EXT_IS_ACTIVE('beg')) { $VIS = 'Y'; $LOCKED = 'N'; }
+
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','beg2','Bettel-Rallye','".$VIS."','".$LOCKED."','7')");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_beg','Bettel-Rallye','Listet alle Teilnehmer der monatlichen Bettel-Rallye auf.','12')");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Optionale Bettel-Rallye m&ouml;glich. Und die erbettelten {!POINTS!} k&ouml;nnen entweder nur dem bettelndem Mitglied direkt oder auch seinem Werber gutgeschrieben werden k&ouml;nnen.");
+                               break;
+
+                       case '0.1.3': // SQL queries for v0.1.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Erbettelte {!POINTS!} werden nach Deaktivierung der Bettel-Rallye gel&ouml;scht.");
+                               break;
+
+                       case '0.1.4': // SQL queries for v0.1.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Rechtlichen Hinweis im Mitgliedsbereich vergessen (<strong>member_list_beg.tpl</strong>); Template <strong>member_beg_404.tpl</strong> fehlte!");
+                               break;
+
+                       case '0.1.5': // SQL queries for v0.1.5
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Bettellink/-rallye', descr='IP-Sperre, {!POINTS!}-Verg&uuml;tung und auch die Bettel-Rallye k&ouml;nnen Sie hier einstellen.' WHERE `what`='config_beg' LIMIT 1");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlendes Template im Admin-Bereich hinzugef&uuml;gt. Im Admin-Bereich Hinweis hinzugef&uuml;gt, wenn Bettel-Rallye inaktiv ist. Bitte Script inc/monthly_beg.php l&ouml;schen!");
+                               break;
+
+                       case '0.1.6': // SQL queries for v0.1.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Es wurden immer dem ersten bettelndem Mitglied die {!POINTS!} gutgeschrieben.");
+                               break;
+
+                       case '0.1.7': // SQL queries for v0.1.7
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_ral_en_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_ral_di_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_new_mem_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_notify_bonus  FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Die Mitglieder k&ouml;nnen nun optional automatisch &uuml;ber eine aktivierte und/oder deaktivierte Bettel-Rallye informiert werden. Beide Benachrichtigungen k&ouml;nnen Sie unter <strong>Einstellungen --&gt; Bettel-Link/-rallye</strong> seperat ein- und ausschalten! Zudem ist eine Sperre gegen eingeloggte Mitglieder eingebaut, die das Klicken auf den eigenen Bettel-Link etwas erschweren soll.");
+                               break;
+
+                       case '0.1.8': // SQL queries for v0.1.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler im t&auml;glichen Reset beseitigt.");
+                               break;
+
+                       case '0.1.9': // SQL queries for v0.1.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("De-/Aktivieren des mit dieser Erweiterung verkn&uuml;pften Modules eingebunden.");
+                               break;
+
+                       case '0.2.0': // SQL queries for v0.2.0
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Bei {!POINTS!}-Gleichstand wird als n&auml;chstes nach wer als letztes Online war umsortiert.");
+                               break;
+
+                       case '0.2.1': // SQL queries for v0.2.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler <strong>unknown column &#39;uid&#39;</strong> beseitigt.");
+                               break;
+
+                       case '0.2.2': // SQL queries for v0.2.2
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_include_own ENUM('Y','N') NOT NULL DEFAULT 'N'");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Eigene User-ID von Bettel-Rallye ausschliessbar.");
+                               break;
+
+                       case '0.2.3': // SQL queries for v0.2.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abfrage des Account-Status eingebaut. Es k&ouml;nnen nur best&auml;tigte Accounts betteln.");
+                               break;
+
+                       case '0.2.4': // SQL queries for v0.2.4
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='1' WHERE `what`='beg' LIMIT 1");
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='rals', `sort`='3', `title`='Bettel-Rallye' WHERE `what`='beg2' LIMIT 1");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Mitgliedsmen&uuml; komplett umgebaut.");
+                               break;
+
+                       case '0.2.5': // SQL queries for v0.2.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+                               break;
+
+                       case '0.2.6': // SQL queries for v0.2.6
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_beg_ips` ADD sid VARCHAR(255) NOT NULL DEFAULT ''");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `beg_pay_mode` ENUM('IMG','JS','BOTH','NONE') DEFAULT 'NONE' NOT NULL ;");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("IP-Lock mit Session-ID erweitert. Tracker-Script eingef&uuml;gt, dass das Einbinden des Bettel-Links als Bild/Script/CSS verhindern soll.");
+                               break;
+               }
                break;
 
-       case '0.1.8': // SQL queries for v0.1.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler im t&auml;glichen Reset beseitigt.");
-               break;
-
-       case '0.1.9': // SQL queries for v0.1.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("De-/Aktivieren des mit dieser Erweiterung verkn&uuml;pften Modules eingebunden.");
-               break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-       case '0.2.0': // SQL queries for v0.2.0
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Bei {!POINTS!}-Gleichstand wird als n&auml;chstes nach wer als letztes Online war umsortiert.");
-               break;
-
-       case '0.2.1': // SQL queries for v0.2.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler <strong>unknown column &#39;uid&#39;</strong> beseitigt.");
-               break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-       case '0.2.2': // SQL queries for v0.2.2
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_include_own ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                       default: // Do stuff when extension is loaded
+                               // Remove old entries
+                               $OLD = getConfig('beg_timeout');
+                               if (getConfig('beg_uid_timeout') > $OLD) $OLD = getConfig('beg_uid_timeout');
+                               $result_ext = SQL_QUERY("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_beg_ips` WHERE timeout < (UNIX_TIMESTAMP() -".($OLD + 60*60).")", __FILE__, __LINE__);
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Eigene User-ID von Bettel-Rallye ausschliessbar.");
-               break;
-
-       case '0.2.3': // SQL queries for v0.2.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abfrage des Account-Status eingebaut. Es k&ouml;nnen nur best&auml;tigte Accounts betteln.");
-               break;
-
-       case '0.2.4': // SQL queries for v0.2.4
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='1' WHERE `what`='beg' LIMIT 1");
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='rals', `sort`='3', `title`='Bettel-Rallye' WHERE `what`='beg2' LIMIT 1");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Mitgliedsmen&uuml; komplett umgebaut.");
-               break;
-
-       case '0.2.5': // SQL queries for v0.2.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
-               break;
-
-       case '0.2.6': // SQL queries for v0.2.6
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_beg_ips` ADD sid VARCHAR(255) NOT NULL DEFAULT ''");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `beg_pay_mode` ENUM('IMG','JS','BOTH','NONE') DEFAULT 'NONE' NOT NULL ;");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("IP-Lock mit Session-ID erweitert. Tracker-Script eingef&uuml;gt, dass das Einbinden des Bettel-Links als Bild/Script/CSS verhindern soll.");
-               break;
-       }
-       break;
-
-case 'modify': // When the extension got modified
-       break;
-
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
-
-default: // Do stuff when extension is loaded
-       // Remove old entries
-       $OLD = getConfig('beg_timeout');
-       if (getConfig('beg_uid_timeout') > $OLD) $OLD = getConfig('beg_uid_timeout');
-       $result_ext = SQL_QUERY("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_beg_ips` WHERE timeout < (UNIX_TIMESTAMP() -".($OLD + 60*60).")", __FILE__, __LINE__);
-
-       // Check for beg rallye is active and send mails out
-       if ((getConfig('beg_rallye') == 'Y') && (getConfig('beg_new_mem_notify') == 'Y')) {
-               // Include file for sending out mails
-               ADD_INC_TO_POOL(sprintf("%sinc/mails/beg_mails.php", constant('PATH')));
-       } // END - if
-       break;
+                               // Check for beg rallye is active and send mails out
+                               if ((getConfig('beg_rallye') == 'Y') && (getConfig('beg_new_mem_notify') == 'Y')) {
+                                       // Include file for sending out mails
+                                       ADD_INC_TO_POOL(sprintf("%sinc/mails/beg_mails.php", constant('PATH')));
+                               } // END - if
+                               break;
 }
 
 //
index fe6cebbd3ae40dc3e21e0b891d53beb5e82b32af..843548f1a7bd7066fb6589e5d2f3194b1626b595 100644 (file)
@@ -50,160 +50,160 @@ EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD birthday_sent VARCHAR(10) NOT NULL DEFAULT 0");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP birthday_sent");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_birthday`");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_birthday'");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.1.0': // SQL queries for v0.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Wenn t&auml;glicher Reset war, wird eine ben&ouml;tigte Include-Datei nicht mehr von daily-reset.php eingebunden, sondern von der Erweiterungsdatei selber.");
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD birthday_sent VARCHAR(10) NOT NULL DEFAULT 0");
                break;
 
-       case '0.2.0': // SQL queries for v0.2
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD birthday_points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP birthday_sent");
                ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_birthday`");
-               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_birthday` (
-id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-chk_value VARCHAR(255) NOT NULL DEFAULT '',
-KEY(userid),
-PRIMARY KEY(id)
-) Type={!_TABLE_TYPE!}");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_birthday','Geburtstagsmails','Stellen Sie hier ein, ob die Mitglieder {!POINTS!} (nicht automatisch) gutgeschrieben kommen sollen oder nicht.', 9)");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Es kann nun eine Gutschrift an die Geburtstagmail angeh&auml;ngt werden. Diese wird erst beim Klick auf einen Best&auml;tigungslink gutgeschrieben.");
-               break;
-
-       case '0.2.1': // SQL queries for v0.2.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abstand zwischen ausgesendeter Geburtstagsmails auf 364 Tage erh&ouml;ht.");
-               break;
-
-       case '0.2.4': // SQL queries for v0.2.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Laden der birthday_mails.php &quot;intelligenter&quot; per Datenfeld und Lade-Schleife in load_extensions.php realisiert.");
-               break;
-
-       case '0.2.5': // SQL queries for v0.2.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
-               break;
-
-       case '0.2.6': // SQL queries for v0.2.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
-               break;
-
-       case '0.2.7': // SQL queries for v0.2.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Sicherheitsupdate am Script <u>birtday_confirm.php</u> durchgef&uuml;hrt.");
-               break;
-
-       case '0.2.8': // SQL queries for v0.2.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Vergessenes <strong>_OB_CACHING</strong> gesetzt.");
-               break;
-
-       case '0.2.9': // SQL queries for v0.2.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_birthday'");
                break;
 
-       case '0.3.0': // SQL queries for v0.3.0
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Ausgabe des generierten HTML-Codes nach <u>inc/footer.php</u> verlagert.");
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.3.1': // SQL queries for v0.3.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Wort <strong>Punkte</strong> dynamisiert.");
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.3.2': // SQL queries for v0.3.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen gesch&uuml;tzt.");
-               break;
-
-       case '0.3.3': // SQL queries for v0.3.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Bitte verschieben Sie die birthday-Templates (Ordner: {!PATH!}/templates/".getLanguage()."/html/) in den neuen Order birthday!");
-               break;
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.1.0': // SQL queries for v0.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Wenn t&auml;glicher Reset war, wird eine ben&ouml;tigte Include-Datei nicht mehr von daily-reset.php eingebunden, sondern von der Erweiterungsdatei selber.");
+                               break;
 
-       case '0.3.4': // SQL queries for v0.3.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
-               break;
-
-       case '0.3.5': // SQL queries for v0.3.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
-               break;
-
-       case '0.3.6': // SQL queries for v0.3.6
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD birthday_mode ENUM('DIRECT','REF') NOT NULL DEFAULT 'DIRECT'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD birthday_active ENUM('Y','N') NOT NULL DEFAULT 'N'");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Verg&uuml;tungsmodus des Geburtstagsbonus einstellbar.");
-               break;
+                       case '0.2.0': // SQL queries for v0.2
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD birthday_points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+                               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_birthday`");
+                               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_birthday` (
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+chk_value VARCHAR(255) NOT NULL DEFAULT '',
+KEY(userid),
+PRIMARY KEY(id)
+) Type={!_TABLE_TYPE!}");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_birthday','Geburtstagsmails','Stellen Sie hier ein, ob die Mitglieder {!POINTS!} (nicht automatisch) gutgeschrieben kommen sollen oder nicht.', 9)");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Es kann nun eine Gutschrift an die Geburtstagmail angeh&auml;ngt werden. Diese wird erst beim Klick auf einen Best&auml;tigungslink gutgeschrieben.");
+                               break;
+
+                       case '0.2.1': // SQL queries for v0.2.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abstand zwischen ausgesendeter Geburtstagsmails auf 364 Tage erh&ouml;ht.");
+                               break;
+
+                       case '0.2.4': // SQL queries for v0.2.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Laden der birthday_mails.php &quot;intelligenter&quot; per Datenfeld und Lade-Schleife in load_extensions.php realisiert.");
+                               break;
+
+                       case '0.2.5': // SQL queries for v0.2.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.2.6': // SQL queries for v0.2.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
+                               break;
+
+                       case '0.2.7': // SQL queries for v0.2.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Sicherheitsupdate am Script <u>birtday_confirm.php</u> durchgef&uuml;hrt.");
+                               break;
+
+                       case '0.2.8': // SQL queries for v0.2.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Vergessenes <strong>_OB_CACHING</strong> gesetzt.");
+                               break;
+
+                       case '0.2.9': // SQL queries for v0.2.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+                               break;
+
+                       case '0.3.0': // SQL queries for v0.3.0
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Ausgabe des generierten HTML-Codes nach <u>inc/footer.php</u> verlagert.");
+                               break;
+
+                       case '0.3.1': // SQL queries for v0.3.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Wort <strong>Punkte</strong> dynamisiert.");
+                               break;
+
+                       case '0.3.2': // SQL queries for v0.3.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen gesch&uuml;tzt.");
+                               break;
+
+                       case '0.3.3': // SQL queries for v0.3.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Bitte verschieben Sie die birthday-Templates (Ordner: {!PATH!}/templates/".getLanguage()."/html/) in den neuen Order birthday!");
+                               break;
+
+                       case '0.3.4': // SQL queries for v0.3.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+                               break;
+
+                       case '0.3.5': // SQL queries for v0.3.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
+                               break;
+
+                       case '0.3.6': // SQL queries for v0.3.6
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD birthday_mode ENUM('DIRECT','REF') NOT NULL DEFAULT 'DIRECT'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD birthday_active ENUM('Y','N') NOT NULL DEFAULT 'N'");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Verg&uuml;tungsmodus des Geburtstagsbonus einstellbar.");
+                               break;
+
+                       case '0.3.7': // SQL queries for v0.3.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Im Script <strong>inc/birthday_mails.php</strong> hat sich ein Zeichen mit dem Code 160 eingeschlichen, welches einen <strong>Parser Error</strong> verursachte, aber wie eine gew&ouml;hnliche Leerstelle aussah.");
+                               break;
+
+                       case '0.3.8': // SQL queries for v0.3.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.");
+                               break;
+
+                       case '0.3.9': // SQL queries for v0.3.9
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE `birth_day` `birth_day` SMALLINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT '01',
+CHANGE `birth_month` `birth_month` SMALLINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT '01',
+CHANGE `birth_year` `birth_year` SMALLINT(4) UNSIGNED ZEROFILL NOT NULL DEFAULT 1970");
 
-       case '0.3.7': // SQL queries for v0.3.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Im Script <strong>inc/birthday_mails.php</strong> hat sich ein Zeichen mit dem Code 160 eingeschlichen, welches einen <strong>Parser Error</strong> verursachte, aber wie eine gew&ouml;hnliche Leerstelle aussah.");
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Datenbankspalten umgestellt auf SMALLINT() UNSIGNED ZEROFILL.");
+                               break;
+               }
                break;
 
-       case '0.3.8': // SQL queries for v0.3.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.");
-               break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-       case '0.3.9': // SQL queries for v0.3.9
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE `birth_day` `birth_day` SMALLINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT '01',
-CHANGE `birth_month` `birth_month` SMALLINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT '01',
-CHANGE `birth_year` `birth_year` SMALLINT(4) UNSIGNED ZEROFILL NOT NULL DEFAULT 1970");
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Datenbankspalten umgestellt auf SMALLINT() UNSIGNED ZEROFILL.");
-               break;
-       }
-       break;
-
-case 'modify': // When the extension got modified
-       break;
-
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
-
-default: // Do stuff when extension is loaded
-       if ((isResetModeEnabled()) && (getConfig('birthday_points') > 0)) {
-               // Daily reset was run and we shall pay points so we start checking for members who
-               // has a birthday for today
-               ADD_INC_TO_POOL(sprintf("%sinc/mails/birthday_mails.php", constant('PATH')));
-       }
-       break;
+                       default: // Do stuff when extension is loaded
+                               if ((isResetModeEnabled()) && (getConfig('birthday_points') > 0)) {
+                                       // Daily reset was run and we shall pay points so we start checking for members who
+                                       // has a birthday for today
+                                       ADD_INC_TO_POOL(sprintf("%sinc/mails/birthday_mails.php", constant('PATH')));
+                               }
+                               break;
 }
 
 //
index 11316d03606945c6d8f02d672770e6f95619b6c2..7c8453f51a4202175879f07bdaaee47a56bec7b2 100644 (file)
@@ -50,12 +50,12 @@ EXT_SET_VER_HISTORY(array('0.0', '0.1.6', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('email','send_bonus','Bonusmail senden',5,'Versenden Sie hier Bonus-Mails an alle Mitglieder oder nur an alle aus einer Kategorie. Es spielt keine Rolle, wie viele Mails bereits versendet worden, Sie k&ouml;nnen hier immer senden.')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`,`counter`) VALUES ('main','bonus','Bonuspunkte',7,'Y','Y', 0)");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bonus` (
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('email','send_bonus','Bonusmail senden',5,'Versenden Sie hier Bonus-Mails an alle Mitglieder oder nur an alle aus einer Kategorie. Es spielt keine Rolle, wie viele Mails bereits versendet worden, Sie k&ouml;nnen hier immer senden.')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`,`counter`) VALUES ('main','bonus','Bonuspunkte',7,'Y','Y', 0)");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bonus` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 cat_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 subject VARCHAR(255) NOT NULL DEFAULT '',
@@ -72,76 +72,76 @@ mails_sent BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 KEY(cat_id),
 PRIMARY KEY  (id)
 )TYPE={!_TABLE_TYPE!}");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` MODIFY link_type ENUM('NORMAL','BONUS') NOT NULL DEFAULT 'NORMAL'");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` ADD bonus_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` ADD INDEX (bonus_id)");
-
-       // Run this SQL when html or html_mail extension is installed
-       if (EXT_IS_ACTIVE('html_mail')) ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` add html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN ('bonus','config_bonus','send_bonus','list_bonus','list_notifications')");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='bonus'");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='bonus'");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` MODIFY link_type ENUM('NORMAL') NOT NULL DEFAULT 'NORMAL'");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` DROP bonus_id");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_urls`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_customer`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_turbo`");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='bonus' LIMIT 1");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='bonus' LIMIT 1");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='show_bonus' LIMIT 1");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='bonus' LIMIT 1");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='bonus' LIMIT 1");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE `module`='show_bonus' LIMIT 1");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.1.6': // SQL queries for v0.1.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Paid-Links wurden verschoben in die Erweiterung <strong>paidlinks</strong>.");
-               break;
-
-       case '0.2.0': // SQL queries for v0.2.0
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET target_send=mails_sent WHERE target_send='0' AND mails_sent>0 AND receivers != ''");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Behebt ein Versand-Problem mit den Bonus-Mails. Es wurde die Spalte target_send nicht beim Einf&uuml;gen der Buchung gessetzt. Bitte laden Sie sich dazu - wenn nicht bereits geschehen - alle Patches bis mindestens Patch 240 unter <a href=\"{!URL!}/modules.php?module=admin&amp;what=updates\">Updates pr&uuml;fen</a> herunter.");
-               break;
-
-       case '0.2.1': // SQL queries for v0.2.1
-               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_bonus' LIMIT 1");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('setup','config_bonus','Bonus-{!POINTS!}',8,'Richten Sie Bonus-{!POINTS!} ein, die beim x&#39;ten Klick auf die Mail verbucht werden sollen. Beispiele: Der 1. Klick sollte mehr {!POINTS!} zus&auml;tzlich bekommen, als der 10. Klick.')");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 10.000");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 100.000");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD login_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".getConfig('one_day')."");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD turbo_rates VARCHAR(255) NOT NULL DEFAULT '50;20;10'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
-               // Use actual month for this update
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000");
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE `ext_name`='bonus' AND ext_has_css='N' LIMIT 1");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Login-Bonus und Turbo-Klick-Bonus intergriert.");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` MODIFY link_type ENUM('NORMAL','BONUS') NOT NULL DEFAULT 'NORMAL'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` ADD bonus_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` ADD INDEX (bonus_id)");
+
+               // Run this SQL when html or html_mail extension is installed
+               if (EXT_IS_ACTIVE('html_mail')) ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` add html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'");
+               break;
+
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN ('bonus','config_bonus','send_bonus','list_bonus','list_notifications')");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='bonus'");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='bonus'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` MODIFY link_type ENUM('NORMAL') NOT NULL DEFAULT 'NORMAL'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` DROP bonus_id");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_urls`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_customer`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_turbo`");
                break;
 
-       case '0.2.2': // SQL queries for v0.2.2
-               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_turbo`");
-               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bonus_turbo` (
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='bonus' LIMIT 1");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='bonus' LIMIT 1");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='show_bonus' LIMIT 1");
+               break;
+
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='bonus' LIMIT 1");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='bonus' LIMIT 1");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE `module`='show_bonus' LIMIT 1");
+               break;
+
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.1.6': // SQL queries for v0.1.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Paid-Links wurden verschoben in die Erweiterung <strong>paidlinks</strong>.");
+                               break;
+
+                       case '0.2.0': // SQL queries for v0.2.0
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET target_send=mails_sent WHERE target_send='0' AND mails_sent>0 AND receivers != ''");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Behebt ein Versand-Problem mit den Bonus-Mails. Es wurde die Spalte target_send nicht beim Einf&uuml;gen der Buchung gessetzt. Bitte laden Sie sich dazu - wenn nicht bereits geschehen - alle Patches bis mindestens Patch 240 unter <a href=\"{!URL!}/modules.php?module=admin&amp;what=updates\">Updates pr&uuml;fen</a> herunter.");
+                               break;
+
+                       case '0.2.1': // SQL queries for v0.2.1
+                               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_bonus' LIMIT 1");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('setup','config_bonus','Bonus-{!POINTS!}',8,'Richten Sie Bonus-{!POINTS!} ein, die beim x&#39;ten Klick auf die Mail verbucht werden sollen. Beispiele: Der 1. Klick sollte mehr {!POINTS!} zus&auml;tzlich bekommen, als der 10. Klick.')");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 10.000");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 100.000");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD login_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".getConfig('one_day')."");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD turbo_rates VARCHAR(255) NOT NULL DEFAULT '50;20;10'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
+                               // Use actual month for this update
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000");
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE `ext_name`='bonus' AND ext_has_css='N' LIMIT 1");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Login-Bonus und Turbo-Klick-Bonus intergriert.");
+                               break;
+
+                       case '0.2.2': // SQL queries for v0.2.2
+                               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_turbo`");
+                               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bonus_turbo` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 mail_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -155,419 +155,419 @@ KEY bonus_id (bonus_id),
 KEY userid (userid)
 ) TYPE={!_TABLE_TYPE!}");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Turbo-Bonus wird in Tabelle gez&auml;hlt f&uuml;r Anzeige, wer alles bereits geklickt hat und welchen Platz er gemacht hat.");
-               break;
-
-       case '0.2.3': // SQL queries for v0.2.3
-               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='bonus' LIMIT 1");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`,`counter`) VALUES ('main','bonus','Aktiv-Rallye',7,'Y','Y', 0)");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Aktiv-Rallye mit Klick-Verg&uuml;tung hinzugef&uuml;gt.");
-               break;
-
-       case '0.2.4': // SQL queries for v0.2.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei ge&auml;ndert.");
-               break;
-
-       case '0.2.5': // SQL queries for v0.2.5
-               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_urls`");
-               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_customer`");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Tabellen <u>{!MYSQL_PREFIX!}_bonus_urls</u> und <u>{!MYSQL_PREFIX!}_bonus_customer</u> entfernt, da dies bald von der Erweiterung <u>paidlinks</u> erledigt wird.");
-               break;
-
-       case '0.2.6': // SQL queries for v0.2.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
-               break;
-
-       case '0.2.7': // SQL queries for v0.2.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Turbo-Bonus klappt wieder (dies sind {!POINTS!} die an die schnellsten Klicker verg&uuml;tet werden!)");
-               break;
-
-       case '0.2.8': // SQL queries for v0.2.8
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET timestamp='0' WHERE timestamp='0000000000'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus_turbo` CHANGE points points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert");
-               break;
-
-       case '0.2.9': // SQL queries for v0.2.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
-               break;
-
-       case '0.3.0': // SQL queries for v0.3.0
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
-               break;
-
-       case '0.3.1': // SQL queries for v0.3.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Sicherheitsupdate am Script <u>show_bonus.php</u> durchgef&uuml;hrt.");
-               break;
-
-       case '0.3.2': // SQL queries for v0.3.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Design &quot;Solid-Business&quot; eingebaut.");
-               break;
-
-       case '0.3.3': // SQL queries for v0.3.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
-               break;
-
-       case '0.3.4': // SQL queries for v0.3.4
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_bonus','Aktiv-Rallye-Teilnehmer','Listet alle Mitglieder auf, die einen Aktiv-Bonus haben und zeigt die derzeit m&ouml;glichen Gewinner an.', 10)");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Link <u>Aktiv-Rallye-Teilnehmer</u> hinzugef&uuml;gt, inklusive manuelle Vorbereitung der Verg&uuml;tung.");
-               break;
-
-       case '0.3.5': // SQL queries for v0.3.5
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_mode ENUM('UID','JACKPOT','ADD') NOT NULL DEFAULT 'ADD'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Der Login-Bonus Aktiv-Bonus (= Klick-Bonus) k&ouml;nnen nun zuerst von einem Mitgliederaccount (das sollte Ihres sein!), vom Jackpot abgezogen oder einfach dazuadiert werden.");
-               break;
-
-       case '0.3.6': // SQL queries for v0.3.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("In der Admin-Liste werden nur aktive Mitglieder gelistet und zudem die sp&auml;teste Zeitmarke f&uuml;r die Auswertung angezeigt.");
-               break;
-
-       case '0.3.7': // SQL queries for v0.3.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Mitglieder-Account auw&auml;hlbar, von dem die {!POINTS!} f&uuml;r den Aktiv- und Login-Bonus abgebucht werden.");
-               break;
-
-       case '0.3.8': // SQL queries for v0.3.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Ausgabe des generierten HTML-Codes nach <u>inc/footer.php</u> verlagert.");
-               break;
-
-       case '0.3.9': // SQL queries for v0.3.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlende Variablen gefixt.");
-               break;
-
-       case '0.4.0': // SQL queries for v0.4.0
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*7)."");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_lines BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Automatisches L&ouml;schen von Turbo-Bonus-Zeilen ({!MYSQL_PREFIX!}_bonus_turbo) und begrenzte Anzahl von Eintr&auml;gen hinzugef&uuml;gt.");
-               break;
-
-       case '0.4.1': // SQL queries for v0.4.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Verg&uuml;tung des Aktiv-Bonus repariert.");
-               break;
-
-       case '0.4.2': // SQL queries for v0.4.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Admin-Bereich / Aktiv-Teilnehmer auflisten: Problem mit Konstante __AUTOPURGE_TIMEOUT und das Template <u>admin_list_bonus.tpl</u> korregiert.");
-               break;
-
-       case '0.4.3': // SQL queries for v0.4.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Verbesserung des Versandes von  HTML-Bonus-Mails.");
-               break;
-
-       case '0.4.4': // SQL queries for v0.4.4
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 15.00000");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_stats FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '5.00000'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_active ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_stats FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Bonus-{!POINTS!} f&uuml;r: Mailbestellung, Referal-Werbung (bei Best. der EMail-Adresse) und wenn 100% Klickrate jeder Mailbuchung erreicht wurde.<br />Template <u>admin_config_bonus_pro.tpl</u> ist &uuml;berfl&uuml;ssig geworden. Bitte l&ouml;schen Sie dies!<br />Eingestellte Bonus-{!POINTS!} f&uuml;r Rank 2 war um eins verschoben.");
-               break;
-
-       case '0.4.5': // SQL queries for v0.4.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abzug vom Bonus-Account integriert.");
-               break;
-
-       case '0.4.6': // SQL queries for v0.4.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Rank 2 bekommt nun auch seine {!POINTS!} gutgeschrieben.");
-               break;
-
-       case '0.4.7': // SQL queries for v0.4.7
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET login_bonus=0, turbo_bonus=0,bonus_ref=0,bonus_order=0,bonus_stats=0");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Die Aktiv-Rallye wurde nicht auf 0 {!POINTS!} gesetzt. Dieser Fehler ist nun behoben. Allerdings ist mit diesem Update auch die Aktiv-Rallye zur&uuml;ckgesetzt worden.");
-               break;
-
-       case '0.4.8': // SQL queries for v0.4.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("In <u>inc/monthly_bonus.php</u> fehlte ein Punkt; Fehler besseitigt.");
-               break;
-
-       case '0.4.9': // SQL queries for v0.4.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Login-Bonus wird mit angezeigt.");
-               break;
-
-       case '0.5.0': // SQL queries for v0.5.0
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Problem mit <strong>is_hundred</strong> beim t&auml;glichen Reset beseitigt.");
-               break;
-
-       case '0.5.1': // SQL queries for v0.5.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Problem mit <strong>bonus_stats / Zeile 31</strong> beim t&auml;glichen Reset beseitigt.");
-               break;
-
-       case '0.5.2': // SQL queries for v0.5.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
-               break;
-
-       case '0.5.3': // SQL queries for v0.5.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Speichern der Aktiv-{!POINTS!} f&uuml;r Platz 2 bis <strong>x</strong> korregiert.");
-               break;
-
-       case '0.5.4': // SQL queries for v0.5.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Variablenfehler in <strong>inc/monthly_bonus.php</strong> behoben.");
-               break;
-
-       case '0.5.5': // SQL queries for v0.5.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Weitere Variablenfehler in <strong>inc/monthly_bonus.php</strong> haben daf&uuml;r gesorgt, dass die monatliche Aktiv-Rallye nicht ausgesch&uuml;ttet wurde. Mit diesem Update wurde die Aussch&uuml;ttung initialisiert. Ihre Mitglieder bekommen voraussichtlicht nichts doppelt verg&uuml;tet.");
-               break;
-
-       case '0.5.6': // SQL queries for v0.5.6
-               // Get current month
-               $curr = date('m', time());
-               if (strlen($curr) == 1) $curr = '0'.$curr;
-               if ($curr == "00") $curr = "12";
-
-               // Generate timemark...
-               $mark = mktime(0, 0, 0, $curr, 1, date('Y', time()));
-
-               // Update accounts which are not active last months
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_data`
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Turbo-Bonus wird in Tabelle gez&auml;hlt f&uuml;r Anzeige, wer alles bereits geklickt hat und welchen Platz er gemacht hat.");
+                               break;
+
+                       case '0.2.3': // SQL queries for v0.2.3
+                               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='bonus' LIMIT 1");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`,`counter`) VALUES ('main','bonus','Aktiv-Rallye',7,'Y','Y', 0)");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Aktiv-Rallye mit Klick-Verg&uuml;tung hinzugef&uuml;gt.");
+                               break;
+
+                       case '0.2.4': // SQL queries for v0.2.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei ge&auml;ndert.");
+                               break;
+
+                       case '0.2.5': // SQL queries for v0.2.5
+                               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_urls`");
+                               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_customer`");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Tabellen <u>{!MYSQL_PREFIX!}_bonus_urls</u> und <u>{!MYSQL_PREFIX!}_bonus_customer</u> entfernt, da dies bald von der Erweiterung <u>paidlinks</u> erledigt wird.");
+                               break;
+
+                       case '0.2.6': // SQL queries for v0.2.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.2.7': // SQL queries for v0.2.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Turbo-Bonus klappt wieder (dies sind {!POINTS!} die an die schnellsten Klicker verg&uuml;tet werden!)");
+                               break;
+
+                       case '0.2.8': // SQL queries for v0.2.8
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET timestamp='0' WHERE timestamp='0000000000'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus_turbo` CHANGE points points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert");
+                               break;
+
+                       case '0.2.9': // SQL queries for v0.2.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
+                               break;
+
+                       case '0.3.0': // SQL queries for v0.3.0
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+                               break;
+
+                       case '0.3.1': // SQL queries for v0.3.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Sicherheitsupdate am Script <u>show_bonus.php</u> durchgef&uuml;hrt.");
+                               break;
+
+                       case '0.3.2': // SQL queries for v0.3.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Design &quot;Solid-Business&quot; eingebaut.");
+                               break;
+
+                       case '0.3.3': // SQL queries for v0.3.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+                               break;
+
+                       case '0.3.4': // SQL queries for v0.3.4
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_bonus','Aktiv-Rallye-Teilnehmer','Listet alle Mitglieder auf, die einen Aktiv-Bonus haben und zeigt die derzeit m&ouml;glichen Gewinner an.', 10)");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Link <u>Aktiv-Rallye-Teilnehmer</u> hinzugef&uuml;gt, inklusive manuelle Vorbereitung der Verg&uuml;tung.");
+                               break;
+
+                       case '0.3.5': // SQL queries for v0.3.5
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_mode ENUM('UID','JACKPOT','ADD') NOT NULL DEFAULT 'ADD'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Der Login-Bonus Aktiv-Bonus (= Klick-Bonus) k&ouml;nnen nun zuerst von einem Mitgliederaccount (das sollte Ihres sein!), vom Jackpot abgezogen oder einfach dazuadiert werden.");
+                               break;
+
+                       case '0.3.6': // SQL queries for v0.3.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("In der Admin-Liste werden nur aktive Mitglieder gelistet und zudem die sp&auml;teste Zeitmarke f&uuml;r die Auswertung angezeigt.");
+                               break;
+
+                       case '0.3.7': // SQL queries for v0.3.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Mitglieder-Account auw&auml;hlbar, von dem die {!POINTS!} f&uuml;r den Aktiv- und Login-Bonus abgebucht werden.");
+                               break;
+
+                       case '0.3.8': // SQL queries for v0.3.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Ausgabe des generierten HTML-Codes nach <u>inc/footer.php</u> verlagert.");
+                               break;
+
+                       case '0.3.9': // SQL queries for v0.3.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlende Variablen gefixt.");
+                               break;
+
+                       case '0.4.0': // SQL queries for v0.4.0
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*7)."");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_lines BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Automatisches L&ouml;schen von Turbo-Bonus-Zeilen ({!MYSQL_PREFIX!}_bonus_turbo) und begrenzte Anzahl von Eintr&auml;gen hinzugef&uuml;gt.");
+                               break;
+
+                       case '0.4.1': // SQL queries for v0.4.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Verg&uuml;tung des Aktiv-Bonus repariert.");
+                               break;
+
+                       case '0.4.2': // SQL queries for v0.4.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Admin-Bereich / Aktiv-Teilnehmer auflisten: Problem mit Konstante __AUTOPURGE_TIMEOUT und das Template <u>admin_list_bonus.tpl</u> korregiert.");
+                               break;
+
+                       case '0.4.3': // SQL queries for v0.4.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Verbesserung des Versandes von  HTML-Bonus-Mails.");
+                               break;
+
+                       case '0.4.4': // SQL queries for v0.4.4
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 15.00000");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_stats FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '5.00000'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_active ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_stats FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Bonus-{!POINTS!} f&uuml;r: Mailbestellung, Referal-Werbung (bei Best. der EMail-Adresse) und wenn 100% Klickrate jeder Mailbuchung erreicht wurde.<br />Template <u>admin_config_bonus_pro.tpl</u> ist &uuml;berfl&uuml;ssig geworden. Bitte l&ouml;schen Sie dies!<br />Eingestellte Bonus-{!POINTS!} f&uuml;r Rank 2 war um eins verschoben.");
+                               break;
+
+                       case '0.4.5': // SQL queries for v0.4.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abzug vom Bonus-Account integriert.");
+                               break;
+
+                       case '0.4.6': // SQL queries for v0.4.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Rank 2 bekommt nun auch seine {!POINTS!} gutgeschrieben.");
+                               break;
+
+                       case '0.4.7': // SQL queries for v0.4.7
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET login_bonus=0, turbo_bonus=0,bonus_ref=0,bonus_order=0,bonus_stats=0");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Die Aktiv-Rallye wurde nicht auf 0 {!POINTS!} gesetzt. Dieser Fehler ist nun behoben. Allerdings ist mit diesem Update auch die Aktiv-Rallye zur&uuml;ckgesetzt worden.");
+                               break;
+
+                       case '0.4.8': // SQL queries for v0.4.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("In <u>inc/monthly_bonus.php</u> fehlte ein Punkt; Fehler besseitigt.");
+                               break;
+
+                       case '0.4.9': // SQL queries for v0.4.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Login-Bonus wird mit angezeigt.");
+                               break;
+
+                       case '0.5.0': // SQL queries for v0.5.0
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Problem mit <strong>is_hundred</strong> beim t&auml;glichen Reset beseitigt.");
+                               break;
+
+                       case '0.5.1': // SQL queries for v0.5.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Problem mit <strong>bonus_stats / Zeile 31</strong> beim t&auml;glichen Reset beseitigt.");
+                               break;
+
+                       case '0.5.2': // SQL queries for v0.5.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+                               break;
+
+                       case '0.5.3': // SQL queries for v0.5.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Speichern der Aktiv-{!POINTS!} f&uuml;r Platz 2 bis <strong>x</strong> korregiert.");
+                               break;
+
+                       case '0.5.4': // SQL queries for v0.5.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Variablenfehler in <strong>inc/monthly_bonus.php</strong> behoben.");
+                               break;
+
+                       case '0.5.5': // SQL queries for v0.5.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Weitere Variablenfehler in <strong>inc/monthly_bonus.php</strong> haben daf&uuml;r gesorgt, dass die monatliche Aktiv-Rallye nicht ausgesch&uuml;ttet wurde. Mit diesem Update wurde die Aussch&uuml;ttung initialisiert. Ihre Mitglieder bekommen voraussichtlicht nichts doppelt verg&uuml;tet.");
+                               break;
+
+                       case '0.5.6': // SQL queries for v0.5.6
+                               // Get current month
+                               $curr = date('m', time());
+                               if (strlen($curr) == 1) $curr = '0'.$curr;
+                               if ($curr == "00") $curr = "12";
+
+                               // Generate timemark...
+                               $mark = mktime(0, 0, 0, $curr, 1, date('Y', time()));
+
+                               // Update accounts which are not active last months
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_data`
 SET `turbo_bonus`=0, `login_bonus`=0, `bonus_order`=0, `bonus_stats`=0, `bonus_ref`=0
 WHERE `last_online` < ".$mark." ORDER BY `userid` ASC");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Ein weiterer Scriptfehler hat nur die Gewinner aus der Aktiv-Rallye genommen. Die anderen Mitglieder sind somit &quot;nach oben gerutsch&quot;.");
-               break;
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Ein weiterer Scriptfehler hat nur die Gewinner aus der Aktiv-Rallye genommen. Die anderen Mitglieder sind somit &quot;nach oben gerutsch&quot;.");
+                               break;
 
-       case '0.5.7': // SQL queries for v0.5.7
-               break;
-
-       case '0.5.8': // SQL queries for v0.5.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Problem mit <strong>is_hundred</strong> beim t&auml;glichen Reset endlich beseitigt.");
-               break;
+                       case '0.5.7': // SQL queries for v0.5.7
+                               break;
+
+                       case '0.5.8': // SQL queries for v0.5.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Problem mit <strong>is_hundred</strong> beim t&auml;glichen Reset endlich beseitigt.");
+                               break;
+
+                       case '0.5.9': // SQL queries for v0.5.9
+                               EXT_SET_UPDATE_NOTES("Fehlermeldung <strong>/home/verzeichnis/html/inc/stats_bonus.php (42):You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' WHERE userid='59' LIMIT 1' at line 1</strong> beseitigt.");
+                               break;
+
+                       case '0.6.0': // SQL queries for v0.6.0
+                               EXT_SET_UPDATE_NOTES("SQL-Fehlermeldung in <strong>inc/monthly_bonus.php</strong> beseitigt.");
+                               break;
+
+                       case '0.6.1': // SQL queries for v0.6.1
+                               EXT_SET_UPDATE_NOTES("Versand von Bonus-Mails repariert.");
+                               break;
+
+                       case '0.6.2': // SQL queries for v0.6.2
+                               EXT_SET_UPDATE_NOTES("L&ouml;schen von bereits gel&ouml;schten Mails wird nun abgelehnt.");
+                               break;
+
+                       case '0.6.3': // SQL queries for v0.6.3
+                               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+                               break;
+
+                       case '0.6.4': // SQL queries for v0.6.4
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Aktiv-Rallye' WHERE `what`='config_bonus' LIMIT 1");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Der Men&uuml;punkt &quot;Bonus-{!POINTS!}&quot; unter Einstellungen wird nach &quot;Aktiv-Rallye umbenannt. Und die Aktiv-Rallye konnte aufgrund eines Template-Fehlers nicht gespeichert werden.");
+                               break;
+
+                       case '0.6.5': // SQL queries for v0.6.5
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_stats` ADD bonus_stats ENUM('Y','N') NOT NULL DEFAULT 'N'");
 
-       case '0.5.9': // SQL queries for v0.5.9
-               EXT_SET_UPDATE_NOTES("Fehlermeldung <strong>/home/verzeichnis/html/inc/stats_bonus.php (42):You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' WHERE userid='59' LIMIT 1' at line 1</strong> beseitigt.");
-               break;
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler mit bonus_stats beseitigt.");
+                               break;
 
-       case '0.6.0': // SQL queries for v0.6.0
-               EXT_SET_UPDATE_NOTES("SQL-Fehlermeldung in <strong>inc/monthly_bonus.php</strong> beseitigt.");
-               break;
+                       case '0.6.6': // SQL queries for v0.6.6
+                               EXT_SET_UPDATE_NOTES("Template-Fehler beseitigt im Admin-Bereich.");
+                               break;
 
-       case '0.6.1': // SQL queries for v0.6.1
-               EXT_SET_UPDATE_NOTES("Versand von Bonus-Mails repariert.");
-               break;
+                       case '0.6.7': // SQL queries for v0.6.7
+                               EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
+                               break;
 
-       case '0.6.2': // SQL queries for v0.6.2
-               EXT_SET_UPDATE_NOTES("L&ouml;schen von bereits gel&ouml;schten Mails wird nun abgelehnt.");
-               break;
+                       case '0.6.8': // SQL queries for v0.6.8
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET data_type='SEND' WHERE data_type != 'SEND' AND data_type != 'DELETED' AND receivers='' AND target_send='0'");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Eingegebene Anzahl auszusendener Bonus-Mails wurde bei der Empf&auml;nderauswahl nicht ber&uuml;cksichtigt. Zudem wird jetzt das eingestellte Auswahlverfahren mitber&uuml;cksichtigt.");
+                               break;
 
-       case '0.6.3': // SQL queries for v0.6.3
-               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
-               break;
+                       case '0.6.9': // SQL queries for v0.6.9
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_order_yn ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_ref_yn ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_stats_yn ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_login_yn ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_click_yn ENUM('Y','N') NOT NULL DEFAULT 'Y'");
 
-       case '0.6.4': // SQL queries for v0.6.4
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Aktiv-Rallye' WHERE `what`='config_bonus' LIMIT 1");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Der Men&uuml;punkt &quot;Bonus-{!POINTS!}&quot; unter Einstellungen wird nach &quot;Aktiv-Rallye umbenannt. Und die Aktiv-Rallye konnte aufgrund eines Template-Fehlers nicht gespeichert werden.");
-               break;
-
-       case '0.6.5': // SQL queries for v0.6.5
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_stats` ADD bonus_stats ENUM('Y','N') NOT NULL DEFAULT 'N'");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler mit bonus_stats beseitigt.");
-               break;
-
-       case '0.6.6': // SQL queries for v0.6.6
-               EXT_SET_UPDATE_NOTES("Template-Fehler beseitigt im Admin-Bereich.");
-               break;
-
-       case '0.6.7': // SQL queries for v0.6.7
-               EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
-               break;
-
-       case '0.6.8': // SQL queries for v0.6.8
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET data_type='SEND' WHERE data_type != 'SEND' AND data_type != 'DELETED' AND receivers='' AND target_send='0'");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Eingegebene Anzahl auszusendener Bonus-Mails wurde bei der Empf&auml;nderauswahl nicht ber&uuml;cksichtigt. Zudem wird jetzt das eingestellte Auswahlverfahren mitber&uuml;cksichtigt.");
-               break;
-
-       case '0.6.9': // SQL queries for v0.6.9
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_order_yn ENUM('Y','N') NOT NULL DEFAULT 'N'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_ref_yn ENUM('Y','N') NOT NULL DEFAULT 'N'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_stats_yn ENUM('Y','N') NOT NULL DEFAULT 'N'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_login_yn ENUM('Y','N') NOT NULL DEFAULT 'N'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_click_yn ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Es k&ouml;nnen nun auch die folgenden Verg&uuml;tungen bei der Auswertung der monatlichen Aktiv-Rallye mit ber&uuml;cksichtigt werden: Mailbest&auml;tigung (war vorher schon), Login-, Mailbuchung, Referal und Statistik-Bonus (100% Klickrate erreicht).");
-               break;
-
-       case '0.7.0': // SQL queries for v0.7.0
-               EXT_SET_UPDATE_NOTES("Zuschaltung von weiteren Bonis wird jetzt auch bei der Auflistung der mitmachenden Mitglieder im Mitgliedsbereich beachtet.");
-               break;
-
-       case '0.7.1': // SQL queries for v0.7.1
-               EXT_SET_UPDATE_NOTES("Im Adminbereich wird nun ebenfalls die Zuschaltung von weiteren Bonis ber&uuml;cksichtigt. Zudem wird der Gesamtbonus an alle Mitglieder errechnet und auch angezeigt.");
-               break;
-
-       case '0.7.2': // SQL queries for v0.7.2
-               EXT_SET_UPDATE_NOTES("Die Verg&uuml;tung der erreichten 100%-Klickrate war noch wegen Programmierungen am Script auskommentiert. Sorry!");
-               break;
-
-       case '0.7.3': // SQL queries for v0.7.3
-               EXT_SET_UPDATE_NOTES("Gutgeschriebene Bonus-{!POINTS!} werden nach Deaktivierung der Aktiv-Rallye gel&ouml;scht.");
-               break;
-
-       case '0.7.4': // SQL queries for v0.7.4
-               EXT_SET_UPDATE_NOTES("Rechtlichen Hinweis im Mitgliedsbereich vergessen. (<strong>member_bonus.tpl</strong>)");
-               break;
-
-       case '0.7.5': // SQL queries for v0.7.5
-               EXT_SET_UPDATE_NOTES("Im Admin-Bereich Hinweis hinzugef&uuml;gt, wenn Aktiv-Rallye inaktiv ist. Bitte Script inc/monthly_bonus.php l&ouml;schen!");
-               break;
-
-       case '0.7.6': // SQL queries for v0.7.6
-               EXT_SET_UPDATE_NOTES("Auswahlmechanismus der Gewinner repariert. Trotz Hinzuschalten von weiteren zu ber&uuml;cksichtigen Boni wurden diese bei der Sortierung der User-IDs nicht ber&uuml;cksichtig.");
-               break;
-
-       case '0.7.7': // SQL queries for v0.7.7
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_en_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_di_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_new_mem_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_notify_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Optionale automatische Benachrichtigung &uuml;ber aktivierte und/oder deaktivierte Aktiv-Rallye einstellbar.");
-               break;
-
-       case '0.7.8': // SQL queries for v0.7.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler im t&auml;glichen Reset beseitigt.");
-               break;
-
-       case '0.7.9': // SQL queries for v0.7.9
-               EXT_SET_UPDATE_NOTES("Dollarzeichen fehlte in <strong>inc/reset/reset_bonus.php</strong>, Zeile 39");
-               break;
-
-       case '0.8.0': // SQL queries for v0.8.0
-               EXT_SET_UPDATE_NOTES("De-/Aktivieren des mit dieser Erweiterung verkn&uuml;pften Modules eingebunden.");
-               break;
-
-       case '0.8.1': // SQL queries for v0.8.1
-               EXT_SET_UPDATE_NOTES("Bei {!POINTS!}-Gleichstand wird als n&auml;chstes nach wer als letztes Online war umsortiert.");
-               break;
-
-       case '0.8.2': // SQL queries for v0.8.2
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_include_own ENUM('Y','N') NOT NULL DEFAULT 'N'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` ADD is_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Eigene User-ID von Aktiv-Rallye ausschliessbar. Benachrichtigungsmails sind von Aktiv-Rallye ausgeschlossen.");
-               break;
-
-       case '0.8.3': // SQL queries for v0.8.3
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='rals', `sort`='2', `title`='Aktiv-Rallye' WHERE `what`='bonus' LIMIT 1");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Mitgliedsmen&uuml; komplett umgebaut.");
-               break;
-
-       case '0.8.4': // SQL queries for v0.8.4
-               EXT_SET_UPDATE_NOTES("Ladeproblem bei nicht installierter Erweiterung <strong>cache</strong> gefixt.");
-               break;
-
-       case '0.8.5': // SQL queries for v0.8.5
-               EXT_SET_UPDATE_NOTES("CSS-Klassenname gefixt in Templates.");
-               break;
-
-       case '0.8.6': // SQL queries for v0.8.6
-               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
-               break;
-
-       case '0.8.7': // SQL queries for v0.8.7
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','list_notifications','Benachrichtigungen','Listet alle an die Mitglieder ausgesandten Benachrichtigungen auf.', 10)");
-
-               // Update notes
-               EXT_SET_UPDATE_NOTES("Benachrichtigungsmails f&uuml;r z.B. Bettel- oder Aktiv-Rallye werden nun angezeigt.");
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Es k&ouml;nnen nun auch die folgenden Verg&uuml;tungen bei der Auswertung der monatlichen Aktiv-Rallye mit ber&uuml;cksichtigt werden: Mailbest&auml;tigung (war vorher schon), Login-, Mailbuchung, Referal und Statistik-Bonus (100% Klickrate erreicht).");
+                               break;
+
+                       case '0.7.0': // SQL queries for v0.7.0
+                               EXT_SET_UPDATE_NOTES("Zuschaltung von weiteren Bonis wird jetzt auch bei der Auflistung der mitmachenden Mitglieder im Mitgliedsbereich beachtet.");
+                               break;
+
+                       case '0.7.1': // SQL queries for v0.7.1
+                               EXT_SET_UPDATE_NOTES("Im Adminbereich wird nun ebenfalls die Zuschaltung von weiteren Bonis ber&uuml;cksichtigt. Zudem wird der Gesamtbonus an alle Mitglieder errechnet und auch angezeigt.");
+                               break;
+
+                       case '0.7.2': // SQL queries for v0.7.2
+                               EXT_SET_UPDATE_NOTES("Die Verg&uuml;tung der erreichten 100%-Klickrate war noch wegen Programmierungen am Script auskommentiert. Sorry!");
+                               break;
+
+                       case '0.7.3': // SQL queries for v0.7.3
+                               EXT_SET_UPDATE_NOTES("Gutgeschriebene Bonus-{!POINTS!} werden nach Deaktivierung der Aktiv-Rallye gel&ouml;scht.");
+                               break;
+
+                       case '0.7.4': // SQL queries for v0.7.4
+                               EXT_SET_UPDATE_NOTES("Rechtlichen Hinweis im Mitgliedsbereich vergessen. (<strong>member_bonus.tpl</strong>)");
+                               break;
+
+                       case '0.7.5': // SQL queries for v0.7.5
+                               EXT_SET_UPDATE_NOTES("Im Admin-Bereich Hinweis hinzugef&uuml;gt, wenn Aktiv-Rallye inaktiv ist. Bitte Script inc/monthly_bonus.php l&ouml;schen!");
+                               break;
+
+                       case '0.7.6': // SQL queries for v0.7.6
+                               EXT_SET_UPDATE_NOTES("Auswahlmechanismus der Gewinner repariert. Trotz Hinzuschalten von weiteren zu ber&uuml;cksichtigen Boni wurden diese bei der Sortierung der User-IDs nicht ber&uuml;cksichtig.");
+                               break;
+
+                       case '0.7.7': // SQL queries for v0.7.7
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_en_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_di_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_new_mem_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_notify_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Optionale automatische Benachrichtigung &uuml;ber aktivierte und/oder deaktivierte Aktiv-Rallye einstellbar.");
+                               break;
+
+                       case '0.7.8': // SQL queries for v0.7.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler im t&auml;glichen Reset beseitigt.");
+                               break;
+
+                       case '0.7.9': // SQL queries for v0.7.9
+                               EXT_SET_UPDATE_NOTES("Dollarzeichen fehlte in <strong>inc/reset/reset_bonus.php</strong>, Zeile 39");
+                               break;
+
+                       case '0.8.0': // SQL queries for v0.8.0
+                               EXT_SET_UPDATE_NOTES("De-/Aktivieren des mit dieser Erweiterung verkn&uuml;pften Modules eingebunden.");
+                               break;
+
+                       case '0.8.1': // SQL queries for v0.8.1
+                               EXT_SET_UPDATE_NOTES("Bei {!POINTS!}-Gleichstand wird als n&auml;chstes nach wer als letztes Online war umsortiert.");
+                               break;
+
+                       case '0.8.2': // SQL queries for v0.8.2
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_include_own ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` ADD is_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Eigene User-ID von Aktiv-Rallye ausschliessbar. Benachrichtigungsmails sind von Aktiv-Rallye ausgeschlossen.");
+                               break;
+
+                       case '0.8.3': // SQL queries for v0.8.3
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='rals', `sort`='2', `title`='Aktiv-Rallye' WHERE `what`='bonus' LIMIT 1");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Mitgliedsmen&uuml; komplett umgebaut.");
+                               break;
+
+                       case '0.8.4': // SQL queries for v0.8.4
+                               EXT_SET_UPDATE_NOTES("Ladeproblem bei nicht installierter Erweiterung <strong>cache</strong> gefixt.");
+                               break;
+
+                       case '0.8.5': // SQL queries for v0.8.5
+                               EXT_SET_UPDATE_NOTES("CSS-Klassenname gefixt in Templates.");
+                               break;
+
+                       case '0.8.6': // SQL queries for v0.8.6
+                               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+                               break;
+
+                       case '0.8.7': // SQL queries for v0.8.7
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','list_notifications','Benachrichtigungen','Listet alle an die Mitglieder ausgesandten Benachrichtigungen auf.', 10)");
+
+                               // Update notes
+                               EXT_SET_UPDATE_NOTES("Benachrichtigungsmails f&uuml;r z.B. Bettel- oder Aktiv-Rallye werden nun angezeigt.");
+                               break;
+
+                       case '0.8.8': // SQL queries for v0.8.8
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_stats` ADD bonus_stats_active ENUM('Y','N') NOT NULL DEFAULT 'N'");
+
+                               // Update notes
+                               EXT_SET_UPDATE_NOTES("Benachrichtigungsmails f&uuml;r z.B. Bettel- oder Aktiv-Rallye werden nun angezeigt.");
+                               break;
+               }
                break;
 
-       case '0.8.8': // SQL queries for v0.8.8
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_stats` ADD bonus_stats_active ENUM('Y','N') NOT NULL DEFAULT 'N'");
-
-               // Update notes
-               EXT_SET_UPDATE_NOTES("Benachrichtigungsmails f&uuml;r z.B. Bettel- oder Aktiv-Rallye werden nun angezeigt.");
-               break;
-       }
-       break;
-
-case 'modify': // When the extension got modified
-       break;
-
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
-
-default: // Do stuff when extension is loaded
-       if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) {
-               // Daily reset was run so let's check if active rallye is activated
-               if (getConfig('bonus_active') == 'Y') {
-                       // Run active rallye
-                       if (getConfig('bonus_stats') > 0) ADD_INC_TO_POOL(sprintf("%sinc/stats_bonus.php", constant('PATH')));
-                       ADD_INC_TO_POOL(sprintf("%sinc/monthly/monthly_bonus.php", constant('PATH')));
-               } else {
-                       // Reset points
-                       ADD_INC_TO_POOL(sprintf("%sinc/reset/reset_bonus.php", constant('PATH')));
-               }
-       }
-
-       // Check for bonus rallye is active and send mails out
-       if ((getConfig('bonus_active') == 'Y') && (getConfig('bonus_new_mem_notify') == 'Y')) {
-               // Include file for sending out mails
-               ADD_INC_TO_POOL(sprintf("%sinc/mails/bonus_mails.php", constant('PATH')));
-       }
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
+
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
+
+                       default: // Do stuff when extension is loaded
+                               if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) {
+                                       // Daily reset was run so let's check if active rallye is activated
+                                       if (getConfig('bonus_active') == 'Y') {
+                                               // Run active rallye
+                                               if (getConfig('bonus_stats') > 0) ADD_INC_TO_POOL(sprintf("%sinc/stats_bonus.php", constant('PATH')));
+                                               ADD_INC_TO_POOL(sprintf("%sinc/monthly/monthly_bonus.php", constant('PATH')));
+                                       } else {
+                                               // Reset points
+                                               ADD_INC_TO_POOL(sprintf("%sinc/reset/reset_bonus.php", constant('PATH')));
+                                       }
+                               }
+
+                               // Check for bonus rallye is active and send mails out
+                               if ((getConfig('bonus_active') == 'Y') && (getConfig('bonus_new_mem_notify') == 'Y')) {
+                                       // Include file for sending out mails
+                                       ADD_INC_TO_POOL(sprintf("%sinc/mails/bonus_mails.php", constant('PATH')));
+                               }
+                               break;
 }
 
 //
index cba127ff705f6a895b7c19e3d4206509b832fd35..308a402ca29070e4d827ec56fb5353a78d05ed38 100644 (file)
@@ -50,14 +50,14 @@ EXT_SET_VER_HISTORY(array('0.0'));
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // Configuration entries
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `booking_per_page` TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `booking_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 3)."");
-
-       // Drop/create table for user bookings
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_book`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_book`(
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // Configuration entries
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `booking_per_page` TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `booking_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 3)."");
+
+               // Drop/create table for user bookings
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_book`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_book`(
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `subject` VARCHAR(255) NOT NULL DEFAULT 'missing',
@@ -67,49 +67,49 @@ INDEX (`userid`),
 PRIMARY KEY(`id`)
 ) TYPE={!_TABLE_TYPE!} COMMENT='Member points booking table'");
 
-       // Admin menu
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_booking','Kontoauszug','Einstellungen am Kontoauszug f&uuml;r Mitglieder vornehmen.', 14)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_booking','Kontoauszug','Kontoausz&uuml;ge aller Ihrer Mitglieder oder eines einzelnen Mitgliedes anzeigen.',10)");
-
-       // Member menu
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','booking','{!POINTS!}-Kontoauszug',5,'Y','Y')");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_book`");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what` IN ('config_booking','list_booking')");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='booking'");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='booking' LIMIT 1");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='booking' LIMIT 1");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               ADD_EXT_SQL("");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("");
+               // Admin menu
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_booking','Kontoauszug','Einstellungen am Kontoauszug f&uuml;r Mitglieder vornehmen.', 14)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_booking','Kontoauszug','Kontoausz&uuml;ge aller Ihrer Mitglieder oder eines einzelnen Mitgliedes anzeigen.',10)");
+
+               // Member menu
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','booking','{!POINTS!}-Kontoauszug',5,'Y','Y')");
+               break;
+
+       case 'remove': // Do stuff when removing extension
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_book`");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what` IN ('config_booking','list_booking')");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='booking'");
+               break;
+
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='booking' LIMIT 1");
                break;
-       }
 
-case 'modify': // When the extension got modified
-       break;
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='booking' LIMIT 1");
+               break;
+
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               ADD_EXT_SQL('');
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES('');
+                               break;
+               }
+
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 //
index 5720fb421938c28cda3403d2abfb9001abc67463..9391294cc5c3c0ba5543bc4aa572268ae766d393 100644 (file)
@@ -51,212 +51,212 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_update BIGINT(20) UNSIGNED NOT NULL DEFAULT 3600");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_path VARCHAR(255) NOT NULL DEFAULT 'cache/'");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_tested TINYINT(1) UNSIGNED NOT NULL DEFAULT 0");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_cache','Cache-Einstellungen','Update-Interval des Caches usw. k&ouml;nnen Sie hier &auml;ndern.', 9)");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what` IN('config_cache','cache_stats')");
-
-       // Unregister all filters
-       UNREGISTER_FILTER('extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', true, $dry_run);
-       UNREGISTER_FILTER('post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', true, $dry_run);
-       UNREGISTER_FILTER('post_extension_installed', 'CACHE_PURGE_ADMIN_MENU', true, $dry_run);
-       UNREGISTER_FILTER('post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', true, $dry_run);
-       UNREGISTER_FILTER('post_extension_run_sql', 'CACHE_PURGE_ADMIN_MENU', true, $dry_run);
-       UNREGISTER_FILTER('post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, $dry_run);
-       UNREGISTER_FILTER('post_admin_edited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, $dry_run);
-       UNREGISTER_FILTER('post_admin_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, $dry_run);
-       UNREGISTER_FILTER('post_admin_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, $dry_run);
-       UNREGISTER_FILTER('extension_remove', 'CACHE_DESTROY_ALL', true, $dry_run);
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Es wurde die Zeitmarke der Cache-Datei extensions.cache mit ber&uuml;cksichtigt. Dies hatte die Folge, dass wenn bei einem Gast die Datei aktualisiert wurde, nur aktivierte und nicht die deaktivierten mit geladen wurden. Folglich fiehlen einfach ein paar Erweiterungen aus.");
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_update BIGINT(20) UNSIGNED NOT NULL DEFAULT 3600");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_path VARCHAR(255) NOT NULL DEFAULT 'cache/'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_tested TINYINT(1) UNSIGNED NOT NULL DEFAULT 0");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_cache','Cache-Einstellungen','Update-Interval des Caches usw. k&ouml;nnen Sie hier &auml;ndern.', 9)");
                break;
 
-       case '0.0.2': // SQL queries for v0.0.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what` IN('config_cache','cache_stats')");
+
+               // Unregister all filters
+               UNREGISTER_FILTER('extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', true, $dry_run);
+               UNREGISTER_FILTER('post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', true, $dry_run);
+               UNREGISTER_FILTER('post_extension_installed', 'CACHE_PURGE_ADMIN_MENU', true, $dry_run);
+               UNREGISTER_FILTER('post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', true, $dry_run);
+               UNREGISTER_FILTER('post_extension_run_sql', 'CACHE_PURGE_ADMIN_MENU', true, $dry_run);
+               UNREGISTER_FILTER('post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, $dry_run);
+               UNREGISTER_FILTER('post_admin_edited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, $dry_run);
+               UNREGISTER_FILTER('post_admin_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, $dry_run);
+               UNREGISTER_FILTER('post_admin_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, $dry_run);
+               UNREGISTER_FILTER('extension_remove', 'CACHE_DESTROY_ALL', true, $dry_run);
                break;
 
-       case '0.0.3': // SQL queries for v0.0.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Cache-Update repariert.");
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.0.4': // SQL queries for v0.0.4
-               // Is the cache extension itself there?
-               if (EXT_IS_ACTIVE('cache')) {
-                       // Check for cache when extension is already installed
-                       if ($GLOBALS['cache_instance']->loadCacheFile("extensions", true)) $GLOBALS['cache_instance']->destroyCacheFile();
-               } // END - if
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Spalte &quot;keep_active&quot; ist hinzugef&uuml;gt. Cache wurde reinitialisiert.");
-               break;
-
-       case '0.0.5': // SQL queries for v0.0.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Registrierung der Cache-Erweiterung repariert");
-               break;
-
-       case '0.0.6': // SQL queries for v0.0.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Validierung der Cache-Datei admins.cache integriert.");
-               break;
-
-       case '0.0.7': // SQL queries for v0.0.7
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD db_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats','cache_stats','DB-Cache','Auf Cache und gesamte Datenbank registrierte Anfragen anzeigen.', 4)");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Hits auf den Cache werden gez&auml;hlt.");
-               break;
-
-       case '0.0.8': // SQL queries for v0.0.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Das Umschreiben der Cache-Daten hat eine Fehlermeldung <strong>Falsches Passwort!</strong> im Admin-Bereich verursacht.");
-               break;
-
-       case '0.0.9': // SQL queries for v0.0.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Interne Datenfeld-Management korregiert und Cache-Statistiken korregiert.");
-               break;
-
-       case '0.1.0': // SQL queries for v0.2.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Problem mit fehlender admins-Erweiterung beseitigt.");
-               break;
-
-       case '0.1.1': // SQL queries for v0.1.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler <strong>Division durch 0</strong> repariert in den DB-Cache Statistiken.");
-               break;
-
-       case '0.1.2': // SQL queries for v0.1.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Die Tabelen <strong>{!_MYSQL_PREFIX!}_config</strong>, <strong>{!_MYSQL_PREFIX!}_refsystem</strong>, <strong>{!_MYSQL_PREFIX!}_refdepths</strong> und <strong>{!_MYSQL_PREFIX!}_mod_reg</strong> werden nun auch ausgelagert.");
-               break;
-
-       case '0.1.3': // SQL queries for v0.1.3
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_admins ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_acls ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_exts ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_config ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_modreg ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_refdepth ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_refsys ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Alle cache-baren Tabellen sind nun einzelnt ein- bzw. ausschaltbar. Falls die eine oder andere ausgelagerte Tabelle also Fehler verursachen sollte, so k&ouml;nnen Sie diese hier abschalten. Beachten Sie aber bitte, dass dann mehr Abfragen an die Datenbank gestellt wird und dies bedeutend mehr Zeit braucht, als nur die Daten aus einem Datenfeld zu laden, das sich im Speicher aufh&auml;lt.");
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.1.4': // SQL queries for v0.1.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler <strong>Division durch 0</strong> repariert in <strong>inc/load_cache.php</strong>.");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Es wurde die Zeitmarke der Cache-Datei extensions.cache mit ber&uuml;cksichtigt. Dies hatte die Folge, dass wenn bei einem Gast die Datei aktualisiert wurde, nur aktivierte und nicht die deaktivierten mit geladen wurden. Folglich fiehlen einfach ein paar Erweiterungen aus.");
+                               break;
+
+                       case '0.0.2': // SQL queries for v0.0.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.0.3': // SQL queries for v0.0.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Cache-Update repariert.");
+                               break;
+
+                       case '0.0.4': // SQL queries for v0.0.4
+                               // Is the cache extension itself there?
+                               if (EXT_IS_ACTIVE('cache')) {
+                                       // Check for cache when extension is already installed
+                                       if ($GLOBALS['cache_instance']->loadCacheFile("extensions", true)) $GLOBALS['cache_instance']->destroyCacheFile();
+                               } // END - if
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Spalte &quot;keep_active&quot; ist hinzugef&uuml;gt. Cache wurde reinitialisiert.");
+                               break;
+
+                       case '0.0.5': // SQL queries for v0.0.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Registrierung der Cache-Erweiterung repariert");
+                               break;
+
+                       case '0.0.6': // SQL queries for v0.0.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Validierung der Cache-Datei admins.cache integriert.");
+                               break;
+
+                       case '0.0.7': // SQL queries for v0.0.7
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD db_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats','cache_stats','DB-Cache','Auf Cache und gesamte Datenbank registrierte Anfragen anzeigen.', 4)");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Hits auf den Cache werden gez&auml;hlt.");
+                               break;
+
+                       case '0.0.8': // SQL queries for v0.0.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Das Umschreiben der Cache-Daten hat eine Fehlermeldung <strong>Falsches Passwort!</strong> im Admin-Bereich verursacht.");
+                               break;
+
+                       case '0.0.9': // SQL queries for v0.0.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Interne Datenfeld-Management korregiert und Cache-Statistiken korregiert.");
+                               break;
+
+                       case '0.1.0': // SQL queries for v0.2.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Problem mit fehlender admins-Erweiterung beseitigt.");
+                               break;
+
+                       case '0.1.1': // SQL queries for v0.1.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler <strong>Division durch 0</strong> repariert in den DB-Cache Statistiken.");
+                               break;
+
+                       case '0.1.2': // SQL queries for v0.1.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Die Tabelen <strong>{!_MYSQL_PREFIX!}_config</strong>, <strong>{!_MYSQL_PREFIX!}_refsystem</strong>, <strong>{!_MYSQL_PREFIX!}_refdepths</strong> und <strong>{!_MYSQL_PREFIX!}_mod_reg</strong> werden nun auch ausgelagert.");
+                               break;
+
+                       case '0.1.3': // SQL queries for v0.1.3
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_admins ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_acls ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_exts ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_config ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_modreg ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_refdepth ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_refsys ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Alle cache-baren Tabellen sind nun einzelnt ein- bzw. ausschaltbar. Falls die eine oder andere ausgelagerte Tabelle also Fehler verursachen sollte, so k&ouml;nnen Sie diese hier abschalten. Beachten Sie aber bitte, dass dann mehr Abfragen an die Datenbank gestellt wird und dies bedeutend mehr Zeit braucht, als nur die Daten aus einem Datenfeld zu laden, das sich im Speicher aufh&auml;lt.");
+                               break;
+
+                       case '0.1.4': // SQL queries for v0.1.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler <strong>Division durch 0</strong> repariert in <strong>inc/load_cache.php</strong>.");
+                               break;
+
+                       case '0.1.5': // SQL queries for v0.1.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Weitere Fehler im System beseitigt.");
+                               break;
+
+                       case '0.1.6': // SQL queries for v0.1.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Probleme w&auml;hrend des Installationsvorganges beseitigt.");
+                               break;
+
+                       case '0.1.7': // SQL queries for v0.1.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("CSS-Klassenname gefixt in Templates.");
+                               break;
+
+                       case '0.1.8': // SQL queries for v0.1.8
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_themes ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Daten von installierten Themes werden nun gecacht.");
+                               break;
+
+                       case '0.1.9': // SQL queries for v0.1.9
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_admin_menu ENUM('Y','N') NOT NULL DEFAULT 'N'");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Administratormen&uuml; experimentell gecacht.");
+                               break;
+
+                       case '0.2.0': // SQL queries for v0.2.0
+                               // This update depends on sql_patches
+                               EXT_ADD_UPDATE_DEPENDS('sql_patches');
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Die Erweiterung h&auml;ngt nun von der <strong>sql_patches</strong> ab.");
+                               break;
+
+                       case '0.2.1': // SQL queries for v0.2.1
+                               // Register the new filter
+                               REGISTER_FILTER('extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, $dry_run);
+                               REGISTER_FILTER('post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, $dry_run);
+                               REGISTER_FILTER('post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, $dry_run);
+                               REGISTER_FILTER('post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, $dry_run);
+                               REGISTER_FILTER('post_admin_edited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, $dry_run);
+                               REGISTER_FILTER('post_admin_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, $dry_run);
+                               REGISTER_FILTER('post_admin_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, $dry_run);
+                               REGISTER_FILTER('extension_remove', 'CACHE_DESTROY_ALL', false, true, $dry_run);
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Filter f&uuml;r Erweiterungsmanagement hinzugef&uuml;gt.");
+                               break;
+
+                       case '0.2.2': // SQL queries for v0.2.2
+                               // Register the new filter
+                               REGISTER_FILTER('post_extension_installed', 'CACHE_PURGE_ADMIN_MENU', false, true, $dry_run);
+                               REGISTER_FILTER('post_extension_run_sql', 'CACHE_PURGE_ADMIN_MENU', false, true, $dry_run);
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Weitere Filter hinzugef&uuml;gt.");
+                               break;
+               }
                break;
 
-       case '0.1.5': // SQL queries for v0.1.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Weitere Fehler im System beseitigt.");
-               break;
-
-       case '0.1.6': // SQL queries for v0.1.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Probleme w&auml;hrend des Installationsvorganges beseitigt.");
-               break;
-
-       case '0.1.7': // SQL queries for v0.1.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("CSS-Klassenname gefixt in Templates.");
-               break;
-
-       case '0.1.8': // SQL queries for v0.1.8
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_themes ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Daten von installierten Themes werden nun gecacht.");
-               break;
-
-       case '0.1.9': // SQL queries for v0.1.9
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_admin_menu ENUM('Y','N') NOT NULL DEFAULT 'N'");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Administratormen&uuml; experimentell gecacht.");
-               break;
-
-       case '0.2.0': // SQL queries for v0.2.0
-               // This update depends on sql_patches
-               EXT_ADD_UPDATE_DEPENDS('sql_patches');
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Die Erweiterung h&auml;ngt nun von der <strong>sql_patches</strong> ab.");
-               break;
-
-       case '0.2.1': // SQL queries for v0.2.1
-               // Register the new filter
-               REGISTER_FILTER('extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, $dry_run);
-               REGISTER_FILTER('post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, $dry_run);
-               REGISTER_FILTER('post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, $dry_run);
-               REGISTER_FILTER('post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, $dry_run);
-               REGISTER_FILTER('post_admin_edited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, $dry_run);
-               REGISTER_FILTER('post_admin_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, $dry_run);
-               REGISTER_FILTER('post_admin_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, $dry_run);
-               REGISTER_FILTER('extension_remove', 'CACHE_DESTROY_ALL', false, true, $dry_run);
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Filter f&uuml;r Erweiterungsmanagement hinzugef&uuml;gt.");
-               break;
-
-       case '0.2.2': // SQL queries for v0.2.2
-               // Register the new filter
-               REGISTER_FILTER('post_extension_installed', 'CACHE_PURGE_ADMIN_MENU', false, true, $dry_run);
-               REGISTER_FILTER('post_extension_run_sql', 'CACHE_PURGE_ADMIN_MENU', false, true, $dry_run);
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Weitere Filter hinzugef&uuml;gt.");
-               break;
-       }
-       break;
-
-case 'modify': // When the extension got modified
-       break;
-
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
-
-default: // Do stuff when extension is loaded
-       // Create instance on class
-       if ($GLOBALS['cache_mode'] != 'init') {
-               // Initialize cache system only when it's needed
-               $GLOBALS['cache_instance'] = new CacheSystem(getConfig('cache_update'), "inc/".getConfig('cache_path'), getConfig('cache_tested'));
-               if ($GLOBALS['cache_instance']->getStatus() != 'done') {
-                       // Failed to initialize cache sustem
-                       addFatalMessage(__FILE__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_CANNOT_INITIALIZE'));
-               } // END - if
-       } // END - if
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
+
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
+
+                       default: // Do stuff when extension is loaded
+                               // Create instance on class
+                               if ($GLOBALS['cache_mode'] != 'init') {
+                                       // Initialize cache system only when it's needed
+                                       $GLOBALS['cache_instance'] = new CacheSystem(getConfig('cache_update'), "inc/".getConfig('cache_path'), getConfig('cache_tested'));
+                                       if ($GLOBALS['cache_instance']->getStatus() != 'done') {
+                                               // Failed to initialize cache sustem
+                                               addFatalMessage(__FILE__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_CANNOT_INITIALIZE'));
+                                       } // END - if
+                               } // END - if
+                               break;
 }
 
 // Keep this extension always active!
index 58c20692383059c6615afba01b4c63c1ba3d5c21..e54e5e7b79b1775f06b1f13608b3655994907027 100644 (file)
@@ -50,10 +50,10 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4'));
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_countries`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_countries` (
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_countries`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_countries` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 code CHAR(2) NOT NULL DEFAULT 'DE',
 descr VARCHAR(255) NOT NULL DEFAULT 'Deutschland',
@@ -61,65 +61,65 @@ is_active ENUM('Y','N') NOT NULL DEFAULT 'N',
 KEY(code),
 PRIMARY KEY(id)
 ) TYPE={!_TABLE_TYPE!}");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_countries` (code, descr, is_active) VALUES ('DE','Deutschland','Y')");
-
-       // Admin menu
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('country', NULL, 'L&auml;ndercodes verwalten','Stellen Sie hier L&auml;ndercodes ein, damit auch internationale Mitglieder sich zu Ihrem {!MT_WORD!} anmelden k&ouml;nnen.', 8)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('country','list_country','Verwalten','Hinzuf&uuml;gen, &Auml;ndern und L&ouml;schen von L&auml;ndercodes.', 1)");
-
-       // Add entry to user table
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD country_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 1");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_countries`");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='country'");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("SQL-Dateien hinzugef&uuml;gt, die Sie mit z.B. phpMyAdmin einspielen k&ouml;nnen. (DOCS/country/README.de lesen!)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_countries` (code, descr, is_active) VALUES ('DE','Deutschland','Y')");
+
+               // Admin menu
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('country', NULL, 'L&auml;ndercodes verwalten','Stellen Sie hier L&auml;ndercodes ein, damit auch internationale Mitglieder sich zu Ihrem {!MT_WORD!} anmelden k&ouml;nnen.', 8)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('country','list_country','Verwalten','Hinzuf&uuml;gen, &Auml;ndern und L&ouml;schen von L&auml;ndercodes.', 1)");
+
+               // Add entry to user table
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD country_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 1");
+               break;
+
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_countries`");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='country'");
                break;
 
-       case '0.0.2': // SQL queries for v0.0.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen gesch&uuml;tzt.");
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.0.3': // SQL queries for v0.0.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.0.4': // SQL queries for v0.0.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Sicherheitsupdate f&uuml;r die Include-Befehle.");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("SQL-Dateien hinzugef&uuml;gt, die Sie mit z.B. phpMyAdmin einspielen k&ouml;nnen. (DOCS/country/README.de lesen!)");
+                               break;
+
+                       case '0.0.2': // SQL queries for v0.0.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen gesch&uuml;tzt.");
+                               break;
+
+                       case '0.0.3': // SQL queries for v0.0.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+                               break;
+
+                       case '0.0.4': // SQL queries for v0.0.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Sicherheitsupdate f&uuml;r die Include-Befehle.");
+                               break;
+               }
                break;
-       }
-       break;
 
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 // Keep this extension always active!
index 94c0a7808c6aed4e19e68f298cd06f786476663b..627030c78613ba577e916465a7ad0c5bddb2f27e 100644 (file)
@@ -50,10 +50,10 @@ EXT_SET_VER_HISTORY(array('0.0'));
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // Table for debug log entries
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_debug_log` (
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // Table for debug log entries
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_debug_log` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `sender_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00',
@@ -67,9 +67,9 @@ INDEX (`sender_id`),
 PRIMARY KEY (`id`)
 ) TYPE={!_TABLE_TYPE!} COMMENT='Debug log data'");
 
-       // Table against debug log abuse
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log_abuse`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_debug_log_abuse` (
+               // Table against debug log abuse
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log_abuse`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_debug_log_abuse` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `client_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00',
@@ -79,9 +79,9 @@ INDEX (`client_id`),
 PRIMARY KEY (`id`)
 ) TYPE={!_TABLE_TYPE!} COMMENT='Debug log abuse'");
 
-       // Table on relay/server for client exchanges
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_debug_client` (
+               // Table on relay/server for client exchanges
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_debug_client` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `key` VARCHAR(255) NOT NULL DEFAULT 'SELF',
 `url` VARCHAR(255) NOT NULL DEFAULT '',
@@ -96,12 +96,12 @@ UNIQUE (`url`),
 PRIMARY KEY (`id`)
 ) TYPE={!_TABLE_TYPE!} COMMENT='Debug clients'");
 
-       // Add this exchange as first client
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_debug_client` (`url`,`title`,`webmaster`,`status`) VALUES ('{!URL!}','{!MAIN_TITLE!}','{!WEBMASTER!}','ACTIVE')");
+               // Add this exchange as first client
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_debug_client` (`url`,`title`,`webmaster`,`status`) VALUES ('{!URL!}','{!MAIN_TITLE!}','{!WEBMASTER!}','ACTIVE')");
 
-       // Table for debug log <-> client connection
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client_log`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_debug_client_log` (
+               // Table for debug log <-> client connection
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client_log`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_debug_client_log` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `client_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 1,
 `log_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -110,71 +110,71 @@ UNIQUE (`log_id`),
 PRIMARY KEY (`id`)
 ) TYPE={!_TABLE_TYPE!} COMMENT='Debug client <-> log connection'");
 
-       // Guest menus
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug',NULL,'Debug-System','Y','Y',2)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_info','Informationen','Y','Y',1)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_reg','Anmeldung','Y','Y',2)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_unreg','Abmeldung','Y','Y',3)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_pilory','Spam-Pranger','Y','Y',4)");
-
-       // Admin menu
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug',NULL,'Debug-System','Verwalten Sie hier komfortabel das debug.log, welches sich im Verzeichnis <strong>inc/cache/</strong> befindet.',10)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','import_debug','debug.log importieren','Importieren Sie hier manuell die debug.log, damit neue Eintr&auml;ge mit bestehenden abgeglichen werden k&ouml;nnen und dann evtl. hinzugef&uuml;gt werden. Die <em>debug.log</em> wird nach dem Import automatisch vom Server entfernt. Dieser Vorgang wird f&uuml;r Sie nachts automatisch erledigt!',1)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','list_debug','Eintr&auml;ge anzeigen','Listet alle bereits importierten Eintr&auml;ge auf. Von hier aus versenden Sie noch nicht gemeldete Fehler an das Relay-Netzwerk, damt diese vom MXChange-Team gepr&uuml;ft werden k&ouml;nnen.',2)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','reg_debug','Am Server anmelden','Sie m&uuml;ssen zuerst Ihren Debug-Client (Ihr {!MT_WORD!} ist dies) oder Relay am Server von MXChange.org anmelden. Dies geschieht f&uuml;r Sie nicht automatisch, da Sie Ihre Daten zuvor &uuml;berpr&uuml;fen m&uuml;ssen, wie z.B. URL, eMail-Adresse und {!MT_WORD!}-Titel.',3)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','unreg_debug','Vom Server abmelden','Melden Sie bitte Ihren {!MT_WORD!} wieder vom MXChange-Server ab, damit das Team von MXChange.org weiss, welche Keys nicht mehr genutzt werden.',4)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','config_debug','Einstellungen','&Auml;ndern Sie hier alle Einstellungen, wie auch den Debug-Modus - ob Client, Hub oder selber Server sein. Lesen Sie dazu die Anleitung unter DOCs/de/debug/README.txt durch! Oder kommen Sie in&#39;s Forum. Das Team von MXChange.org hilft Ihnen gerne weiter.',5)");
-
-       // Config entries
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_key` VARCHAR(255) NOT NULL DEFAULT ''");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_mode` ENUM('CLIENT','RELAY','SERVER') NOT NULL DEFAULT 'CLIENT'");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_new_log` ENUM('ACCEPT','FIRST','REG') NOT NULL DEFAULT 'FIRST'");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_new_client` ENUM('ACTIVE','NEW','REG') NOT NULL DEFAULT 'NEW'");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_reject_log` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 30)."");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_master_url` VARCHAR(255) NOT NULL DEFAULT '{!SERVER_URL!}'");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client_log`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log_abuse`");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='debug'");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='debug'");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y',`locked`='N' WHERE `action`='debug' LIMIT 5");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `locked`='Y' WHERE `action`='debug' LIMIT 5");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               ADD_EXT_SQL("");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("");
+               // Guest menus
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug',NULL,'Debug-System','Y','Y',2)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_info','Informationen','Y','Y',1)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_reg','Anmeldung','Y','Y',2)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_unreg','Abmeldung','Y','Y',3)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_pilory','Spam-Pranger','Y','Y',4)");
+
+               // Admin menu
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug',NULL,'Debug-System','Verwalten Sie hier komfortabel das debug.log, welches sich im Verzeichnis <strong>inc/cache/</strong> befindet.',10)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','import_debug','debug.log importieren','Importieren Sie hier manuell die debug.log, damit neue Eintr&auml;ge mit bestehenden abgeglichen werden k&ouml;nnen und dann evtl. hinzugef&uuml;gt werden. Die <em>debug.log</em> wird nach dem Import automatisch vom Server entfernt. Dieser Vorgang wird f&uuml;r Sie nachts automatisch erledigt!',1)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','list_debug','Eintr&auml;ge anzeigen','Listet alle bereits importierten Eintr&auml;ge auf. Von hier aus versenden Sie noch nicht gemeldete Fehler an das Relay-Netzwerk, damt diese vom MXChange-Team gepr&uuml;ft werden k&ouml;nnen.',2)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','reg_debug','Am Server anmelden','Sie m&uuml;ssen zuerst Ihren Debug-Client (Ihr {!MT_WORD!} ist dies) oder Relay am Server von MXChange.org anmelden. Dies geschieht f&uuml;r Sie nicht automatisch, da Sie Ihre Daten zuvor &uuml;berpr&uuml;fen m&uuml;ssen, wie z.B. URL, eMail-Adresse und {!MT_WORD!}-Titel.',3)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','unreg_debug','Vom Server abmelden','Melden Sie bitte Ihren {!MT_WORD!} wieder vom MXChange-Server ab, damit das Team von MXChange.org weiss, welche Keys nicht mehr genutzt werden.',4)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','config_debug','Einstellungen','&Auml;ndern Sie hier alle Einstellungen, wie auch den Debug-Modus - ob Client, Hub oder selber Server sein. Lesen Sie dazu die Anleitung unter DOCs/de/debug/README.txt durch! Oder kommen Sie in&#39;s Forum. Das Team von MXChange.org hilft Ihnen gerne weiter.',5)");
+
+               // Config entries
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_key` VARCHAR(255) NOT NULL DEFAULT ''");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_mode` ENUM('CLIENT','RELAY','SERVER') NOT NULL DEFAULT 'CLIENT'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_new_log` ENUM('ACCEPT','FIRST','REG') NOT NULL DEFAULT 'FIRST'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_new_client` ENUM('ACTIVE','NEW','REG') NOT NULL DEFAULT 'NEW'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_reject_log` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 30)."");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_master_url` VARCHAR(255) NOT NULL DEFAULT '{!SERVER_URL!}'");
                break;
-       }
-       break;
 
-case 'modify': // When the extension got modified
-       break;
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client_log`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log_abuse`");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='debug'");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='debug'");
+               break;
+
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y',`locked`='N' WHERE `action`='debug' LIMIT 5");
+               break;
+
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `locked`='Y' WHERE `action`='debug' LIMIT 5");
+               break;
+
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               ADD_EXT_SQL('');
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES('');
+                               break;
+               }
+               break;
+
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 // Keep this extension always active!
index b86937030bd4be28c7609092da760368955d8f6b..8b4c28d808a4ef1efb3da61d846b8246ea0c8077 100644 (file)
@@ -50,44 +50,44 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1'));
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL('');
+               break;
 
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
+               break;
 
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
+               break;
 
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
+               break;
 
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+                               break;
+               }
                break;
-       }
-       break;
 
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 //
index 26b47623fd6b9ddf6714da3e4b4d197bdf7ab985..226560cf2a580b4c747d4906f0f1dc974c743337 100644 (file)
@@ -50,10 +50,10 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // Doubler table
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_doubler`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_doubler` (
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // Doubler table
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_doubler`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_doubler` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 refid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -67,187 +67,187 @@ KEY(userid),
 PRIMARY KEY(id)
 )TYPE=MYISAM");
 
-       //
-       // --- SETTINGS ---
-       //
-       // Minimum points to double
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_min FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000");
-       // Maximum points to double
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_max FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 10000.00000");
-       // Points left on users account after doubling
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_left BIGINT(20) UNSIGNED NOT NULL DEFAULT 1000");
-       // Charge for doubling points which goes to the webmaster (shreddered in fact!)
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_charge FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.03000");
-       // Referal percents
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_ref FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.02000");
-       // Shall I use the jackpot to take points from? (Y/N, default=Y)
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_jackpot ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-       // A user account to take points from (default: 0->none)
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-       // Total payed out points from your doublers
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-       // Sending mode of mails (immediately/daily reset)
-       // --> This also means who fast the doubled points will be payed out!
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_send_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'DIRECT'");
-       // Timeout for entries to be purged (default: one week)
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*7)."");
-       // Number of newest entries to display
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_display_new TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
-       // Number of entries which will be payed out soon
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_display_pay TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
-       // Number of entries which are already payed out
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_display_old TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
-       // Points used by every member
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD doubler_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-       // Counter for usage of the doubler
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_counter BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-
-       //
-       // --- MENU SYSTEMS ---
-       //
-       // Admin menu
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler', NULL, '{!POINTS!}-Verdoppler','Einstellungen und Eintr&auml;ge auflisten.', 4)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler','list_doubler','Auflisten','Eintr&auml;ge aus der Verdiensttabelle auflisten', 1)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler','config_doubler','Einstellungen','Prozentuale Geb&uuml;hr usw. einstellen.', 2)");
-
-       // Guest menu (informations / default doubler link)
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','doubler','Verdoppeln!',3,'Y','Y')");
-
-       // Member menu
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','doubler','Verdoppeln!','Y','Y',7)");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_doubler`");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='doubler'");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='doubler'");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='doubler'");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='doubler' LIMIT 1");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='doubler' LIMIT 1");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='doubler' LIMIT 1");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='doubler' LIMIT 1");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='doubler' LIMIT 1");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE `module`='doubler' LIMIT 1");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Problem mit User-ID behoben!");
-               break;
-
-       case '0.0.2': // SQL queries for v0.0.2
-               // Total used points
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_used FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Geb&uuml;hr wird vom Verdoppler-Pott abgezogen.");
-               break;
-
-       case '0.0.3': // SQL queries for v0.0.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Drei SQL-Fehler beseitigt.");
-               break;
-
-       case '0.0.4': // SQL queries for v0.0.4
-               // Shall I use the doubler's account to take points from? (Y/N, default=Y)
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_own ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES(POINTS."-Guthaben des Verdopplers kann optional nicht mit einbezogen werden.");
-               break;
-
-       case '0.0.5': // SQL queries for v0.0.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Counter-Stand und noch zum Verdoppeln &uuml;brige {!POINTS!} in Templates eingebunden. Auflistung in Admin-Bereich komplettiert.");
-               break;
-
-       case '0.0.6': // SQL queries for v0.0.6
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_max_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT 1");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_group_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT 1");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_sent_all ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Geb&uuml;hrenabzug wird beim Einzahlen abgezogen (wurde von Auszahlung abgezogen) und maximal bei Auszahlung zu kontrollierende Accounts einstellbar.<br />Template <u>admin_config_doubler_pro.tpl</u> ist &uuml;berfl&uuml;ssig geworden. Bitte l&ouml;schen Sie dies!");
-               break;
-
-       case '0.0.7': // SQL queries for v0.0.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.<br /><br />Minus-Guthaben des Verdoppler-Accounts repariert und Mitgliedsmail erweitert mit Transaktionsummer und IP-Nummer.");
-               break;
-
-       case '0.0.8': // SQL queries for v0.0.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Bitte verschieben Sie die doubler-Templates (Ordner: {!PATH!}/templates/".getLanguage()."/html/) in den neuen Order doubler!");
-               break;
-
-       case '0.0.9': // SQL queries for v0.0.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
-               break;
-
-       case '0.1.0': // SQL queries for v0.2.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
-               break;
-
-       case '0.1.1': // SQL queries for v0.1.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Zwei SQL-Fehler in <strong>inc/doubler_send.php</strong> beseitigt.");
-               break;
-
-       case '0.1.2': // SQL queries for v0.1.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Sicherheitsupdate f&uuml;r die Include-Befehle.");
-               break;
-
-       case '0.1.3': // SQL queries for v0.1.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("De-/Aktivieren des mit dieser Erweiterung verkn&uuml;pften Modules eingebunden.");
-               break;
-
-       case '0.1.4': // SQL queries for v0.1.4
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='4' WHERE `what`='doubler' LIMIT 1");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Mitgliedsmen&uuml; komplett umgebaut.");
-               break;
-
-       case '0.1.5': // SQL queries for v0.1.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.");
-               break;
-
-       case '0.1.6': // SQL queries for v0.1.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
-               break;
-       }
-       break;
-
-case 'modify': // When the extension got modified
-       break;
-
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
-
-default: // Do stuff when extension is loaded
-       if ((isResetModeEnabled()) && (getConfig('doubler_send_mode') == "RESET")) {
-               // So let's check for points
-               ADD_INC_TO_POOL(sprintf("%sinc/doubler_send.php", constant('PATH')));
-       }
-       break;
+               //
+               // --- SETTINGS ---
+               //
+               // Minimum points to double
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_min FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000");
+               // Maximum points to double
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_max FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 10000.00000");
+               // Points left on users account after doubling
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_left BIGINT(20) UNSIGNED NOT NULL DEFAULT 1000");
+               // Charge for doubling points which goes to the webmaster (shreddered in fact!)
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_charge FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.03000");
+               // Referal percents
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_ref FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.02000");
+               // Shall I use the jackpot to take points from? (Y/N, default=Y)
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_jackpot ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+               // A user account to take points from (default: 0->none)
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+               // Total payed out points from your doublers
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+               // Sending mode of mails (immediately/daily reset)
+               // --> This also means who fast the doubled points will be payed out!
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_send_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'DIRECT'");
+               // Timeout for entries to be purged (default: one week)
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*7)."");
+               // Number of newest entries to display
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_display_new TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
+               // Number of entries which will be payed out soon
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_display_pay TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
+               // Number of entries which are already payed out
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_display_old TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
+               // Points used by every member
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD doubler_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+               // Counter for usage of the doubler
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_counter BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+
+               //
+               // --- MENU SYSTEMS ---
+               //
+               // Admin menu
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler', NULL, '{!POINTS!}-Verdoppler','Einstellungen und Eintr&auml;ge auflisten.', 4)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler','list_doubler','Auflisten','Eintr&auml;ge aus der Verdiensttabelle auflisten', 1)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler','config_doubler','Einstellungen','Prozentuale Geb&uuml;hr usw. einstellen.', 2)");
+
+               // Guest menu (informations / default doubler link)
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','doubler','Verdoppeln!',3,'Y','Y')");
+
+               // Member menu
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','doubler','Verdoppeln!','Y','Y',7)");
+               break;
+
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_doubler`");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='doubler'");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='doubler'");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='doubler'");
+               break;
+
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='doubler' LIMIT 1");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='doubler' LIMIT 1");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='doubler' LIMIT 1");
+               break;
+
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='doubler' LIMIT 1");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='doubler' LIMIT 1");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE `module`='doubler' LIMIT 1");
+               break;
+
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Problem mit User-ID behoben!");
+                               break;
+
+                       case '0.0.2': // SQL queries for v0.0.2
+                               // Total used points
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_used FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Geb&uuml;hr wird vom Verdoppler-Pott abgezogen.");
+                               break;
+
+                       case '0.0.3': // SQL queries for v0.0.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Drei SQL-Fehler beseitigt.");
+                               break;
+
+                       case '0.0.4': // SQL queries for v0.0.4
+                               // Shall I use the doubler's account to take points from? (Y/N, default=Y)
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_own ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES(POINTS."-Guthaben des Verdopplers kann optional nicht mit einbezogen werden.");
+                               break;
+
+                               case '0.0.5': // SQL queries for v0.0.5
+                                       // Update notes (these will be set as task text!)
+                                       EXT_SET_UPDATE_NOTES("Counter-Stand und noch zum Verdoppeln &uuml;brige {!POINTS!} in Templates eingebunden. Auflistung in Admin-Bereich komplettiert.");
+                                       break;
+
+                               case '0.0.6': // SQL queries for v0.0.6
+                                       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_max_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT 1");
+                                       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_group_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT 1");
+                                       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_sent_all ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+
+                                       // Update notes (these will be set as task text!)
+                                       EXT_SET_UPDATE_NOTES("Geb&uuml;hrenabzug wird beim Einzahlen abgezogen (wurde von Auszahlung abgezogen) und maximal bei Auszahlung zu kontrollierende Accounts einstellbar.<br />Template <u>admin_config_doubler_pro.tpl</u> ist &uuml;berfl&uuml;ssig geworden. Bitte l&ouml;schen Sie dies!");
+                                       break;
+
+                               case '0.0.7': // SQL queries for v0.0.7
+                                       // Update notes (these will be set as task text!)
+                                       EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.<br /><br />Minus-Guthaben des Verdoppler-Accounts repariert und Mitgliedsmail erweitert mit Transaktionsummer und IP-Nummer.");
+                                       break;
+
+                               case '0.0.8': // SQL queries for v0.0.8
+                                       // Update notes (these will be set as task text!)
+                                       EXT_SET_UPDATE_NOTES("Bitte verschieben Sie die doubler-Templates (Ordner: {!PATH!}/templates/".getLanguage()."/html/) in den neuen Order doubler!");
+                                       break;
+
+                               case '0.0.9': // SQL queries for v0.0.9
+                                       // Update notes (these will be set as task text!)
+                                       EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+                                       break;
+
+                               case '0.1.0': // SQL queries for v0.2.1
+                                       // Update notes (these will be set as task text!)
+                                       EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
+                                       break;
+
+                               case '0.1.1': // SQL queries for v0.1.1
+                                       // Update notes (these will be set as task text!)
+                                       EXT_SET_UPDATE_NOTES("Zwei SQL-Fehler in <strong>inc/doubler_send.php</strong> beseitigt.");
+                                       break;
+
+                               case '0.1.2': // SQL queries for v0.1.2
+                                       // Update notes (these will be set as task text!)
+                                       EXT_SET_UPDATE_NOTES("Sicherheitsupdate f&uuml;r die Include-Befehle.");
+                                       break;
+
+                               case '0.1.3': // SQL queries for v0.1.3
+                                       // Update notes (these will be set as task text!)
+                                       EXT_SET_UPDATE_NOTES("De-/Aktivieren des mit dieser Erweiterung verkn&uuml;pften Modules eingebunden.");
+                                       break;
+
+                               case '0.1.4': // SQL queries for v0.1.4
+                                       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='4' WHERE `what`='doubler' LIMIT 1");
+
+                                       // Update notes (these will be set as task text!)
+                                       EXT_SET_UPDATE_NOTES("Mitgliedsmen&uuml; komplett umgebaut.");
+                                       break;
+
+                               case '0.1.5': // SQL queries for v0.1.5
+                                       // Update notes (these will be set as task text!)
+                                       EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.");
+                                       break;
+
+                               case '0.1.6': // SQL queries for v0.1.6
+                                       // Update notes (these will be set as task text!)
+                                       EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+                                       break;
+               }
+               break;
+
+                               case 'modify': // When the extension got modified
+                                       break;
+
+                               case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                                       break;
+
+                               default: // Do stuff when extension is loaded
+                                       if ((isResetModeEnabled()) && (getConfig('doubler_send_mode') == "RESET")) {
+                                               // So let's check for points
+                                               ADD_INC_TO_POOL(sprintf("%sinc/doubler_send.php", constant('PATH')));
+                                       }
+                                       break;
 }
 
 //
index bc7acadd86490e39693d87403e98de16d50fa30a..1566f089f4c2b5a2582709b1ca1e6ee75ffd9d5a 100644 (file)
@@ -51,42 +51,42 @@ EXT_SET_VER_HISTORY(array('0.0'));
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       break;
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               break;
 
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       break;
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               break;
 
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       break;
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               break;
 
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       break;
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               break;
 
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               ADD_EXT_SQL("");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               ADD_EXT_SQL('');
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("");
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES('');
+                               break;
+               }
                break;
-       }
-       break;
 
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 //
index a54950bc13e80f7ef62744f3b2a336ffdc8b3888..2421145e56121296f16c265c71ac695e91033959 100644 (file)
@@ -50,10 +50,10 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // Create database
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_holidays`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_holidays` (
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // Create database
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_holidays`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_holidays` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 holiday_start VARCHAR(10) NOT NULL DEFAULT 0,
@@ -63,175 +63,175 @@ KEY (userid),
 PRIMARY KEY(id)
 ) TYPE={!_TABLE_TYPE!}");
 
-       // Add default values to config
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'");
-
-       // Add member menu
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','holiday','Urlaubsschaltung','4','Y','Y')");
-
-       // Add admin menus
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('holiday', NULL, 'Urlaubsmanagement','4','Hier k&ouml;nnen Sie Urlaubsschaltungen Ihrer Mitglieder auflisten oder auch wieder aufheben.')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('holiday','list_holiday','Auflisten','1','Alle Urlaubsschaltungen auflisten.')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('holiday','del_holiday','Urlaub beenden','2','Urlaubsschaltungen aufheben. Geben Sie bitte mehr als nur &quot;Verstoss gegen unsere AGBs&quot; ein!')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('holiday','config_holiday','Einstellungen','3','Maximale Tage f&uuml;r Urlaub usw. einstellen.')");
-
-       // Remove 0 max mails per day
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value='0' LIMIT 1");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_holidays`");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='holiday' LIMIT 1");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='holiday' LIMIT 4");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value='0' LIMIT 1");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_max_receive` (value, comment) VALUES ('0','Urlaub')");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='holiday' LIMIT 1");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='holiday' LIMIT 1");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.2': // SQL queries for v0.0.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
-               break;
+               // Add default values to config
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'");
 
-       case '0.0.3': // SQL queries for v0.0.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
-               break;
+               // Add member menu
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','holiday','Urlaubsschaltung','4','Y','Y')");
 
-       case '0.0.4': // SQL queries for v0.0.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
-               break;
-
-       case '0.0.5': // SQL queries for v0.0.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
-               break;
+               // Add admin menus
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('holiday', NULL, 'Urlaubsmanagement','4','Hier k&ouml;nnen Sie Urlaubsschaltungen Ihrer Mitglieder auflisten oder auch wieder aufheben.')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('holiday','list_holiday','Auflisten','1','Alle Urlaubsschaltungen auflisten.')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('holiday','del_holiday','Urlaub beenden','2','Urlaubsschaltungen aufheben. Geben Sie bitte mehr als nur &quot;Verstoss gegen unsere AGBs&quot; ein!')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('holiday','config_holiday','Einstellungen','3','Maximale Tage f&uuml;r Urlaub usw. einstellen.')");
 
-       case '0.0.6': // SQL queries for v0.0.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+               // Remove 0 max mails per day
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value='0' LIMIT 1");
                break;
 
-       case '0.0.7': // SQL queries for v0.0.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt.");
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_holidays`");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='holiday' LIMIT 1");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='holiday' LIMIT 4");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value='0' LIMIT 1");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_max_receive` (value, comment) VALUES ('0','Urlaub')");
                break;
 
-       case '0.0.8': // SQL queries for v0.0.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='holiday' LIMIT 1");
                break;
 
-       case '0.0.9': // SQL queries for v0.0.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
-               break;
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='holiday' LIMIT 1");
+               break;
+
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.2': // SQL queries for v0.0.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
+                               break;
+
+                       case '0.0.3': // SQL queries for v0.0.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
 
-       case '0.1.0': // SQL queries for v0.2.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen gesch&uuml;tzt.");
-               break;
+                       case '0.0.4': // SQL queries for v0.0.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
+                               break;
 
-       case '0.1.1': // SQL queries for v0.1.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
-               break;
+                       case '0.0.5': // SQL queries for v0.0.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+                               break;
+
+                       case '0.0.6': // SQL queries for v0.0.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+                               break;
 
-       case '0.1.2': // SQL queries for v0.1.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abspeichern der Urlaubsanfrage korregiert.");
-               break;
+                       case '0.0.7': // SQL queries for v0.0.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt.");
+                               break;
 
-       case '0.1.3': // SQL queries for v0.1.3
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD holiday_active ENUM('Y','N') NOT NULL DEFAULT 'N'");
-               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value='0' LIMIT 1");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_lock BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('one_day')*2)."'");
+                       case '0.0.8': // SQL queries for v0.0.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
+                               break;
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Die Mitglieder-Accounts werden nicht mehr gesperrt, sondern nur auf <strong>Urlaub</strong> geschaltet. Lassen Sie sich nicht davon verwirren, dass sie &quot;freigegeben&quot; sind!");
-               break;
+                       case '0.0.9': // SQL queries for v0.0.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+                               break;
 
-       case '0.1.4': // SQL queries for v0.1.4
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'");
+                       case '0.1.0': // SQL queries for v0.2.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen gesch&uuml;tzt.");
+                               break;
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Urlaubsschaltung wird erst Abends um 00:00 Uhr aktiv und nicht durch die Beantragung. Dies kann nun auch auf direkte Umstellung eingestellt werden.");
-               break;
+                       case '0.1.1': // SQL queries for v0.1.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+                               break;
 
-       case '0.1.5': // SQL queries for v0.1.5
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'");
+                       case '0.1.2': // SQL queries for v0.1.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abspeichern der Urlaubsanfrage korregiert.");
+                               break;
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Sicherheitsupdate f&uuml;r die Include-Befehle.");
-               break;
+                       case '0.1.3': // SQL queries for v0.1.3
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD holiday_active ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value='0' LIMIT 1");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_lock BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('one_day')*2)."'");
 
-       case '0.1.6': // SQL queries for v0.1.6
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD holiday_activated BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Die Mitglieder-Accounts werden nicht mehr gesperrt, sondern nur auf <strong>Urlaub</strong> geschaltet. Lassen Sie sich nicht davon verwirren, dass sie &quot;freigegeben&quot; sind!");
+                               break;
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlende Tabellenspalte hinzugef&uuml;gt.");
-               break;
+                       case '0.1.4': // SQL queries for v0.1.4
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'");
 
-       case '0.1.7': // SQL queries for v0.1.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt.");
-               break;
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Urlaubsschaltung wird erst Abends um 00:00 Uhr aktiv und nicht durch die Beantragung. Dies kann nun auch auf direkte Umstellung eingestellt werden.");
+                               break;
 
-       case '0.1.8': // SQL queries for v0.1.8
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'list_holiday')");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'del_holiday')");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('config', '', 'config_holiday')");
+                       case '0.1.5': // SQL queries for v0.1.5
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'");
 
-               // Depends on sql_patches (or you have to execute these both SQL statements by phpMyAdmin
-               EXT_ADD_UPDATE_DEPENDS('sql_patches');
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Sicherheitsupdate f&uuml;r die Include-Befehle.");
+                               break;
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Erweiterung in's neue Men&uuml;system integriert.");
-               break;
+                       case '0.1.6': // SQL queries for v0.1.6
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD holiday_activated BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
 
-       case '0.1.9': // SQL queries for v0.1.9
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='account', `sort`='2', `title`='In Urlaub' WHERE `what`='holiday' LIMIT 1");
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlende Tabellenspalte hinzugef&uuml;gt.");
+                               break;
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Mitgliedsmen&uuml; komplett umgebaut.");
-               break;
+                       case '0.1.7': // SQL queries for v0.1.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt.");
+                               break;
 
-       case '0.2.0': // SQL queries for v0.2.0
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Urlaubsmanagement' WHERE action = 'holiday' AND (`what`='' OR `what` IS NULL) LIMIT 1");
+                       case '0.1.8': // SQL queries for v0.1.8
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'list_holiday')");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'del_holiday')");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('config', '', 'config_holiday')");
+
+                               // Depends on sql_patches (or you have to execute these both SQL statements by phpMyAdmin
+                               EXT_ADD_UPDATE_DEPENDS('sql_patches');
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Erweiterung in's neue Men&uuml;system integriert.");
+                               break;
+
+                       case '0.1.9': // SQL queries for v0.1.9
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='account', `sort`='2', `title`='In Urlaub' WHERE `what`='holiday' LIMIT 1");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Mitgliedsmen&uuml; komplett umgebaut.");
-               break;
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Mitgliedsmen&uuml; komplett umgebaut.");
+                               break;
 
-       case '0.2.1': // SQL queries for v0.2.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+                       case '0.2.0': // SQL queries for v0.2.0
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Urlaubsmanagement' WHERE action = 'holiday' AND (`what`='' OR `what` IS NULL) LIMIT 1");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Mitgliedsmen&uuml; komplett umgebaut.");
+                               break;
+
+                       case '0.2.1': // SQL queries for v0.2.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+                               break;
+               }
                break;
-       }
-       break;
 
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 //
index b32605ae41ddf6468c2851df62643f396126c662..88613c11eb1944f01c12922ef3dddf3e4d2d26cc 100644 (file)
@@ -50,97 +50,97 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', "0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD html ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` ADD html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` ADD html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','html_mail','HTML-Empfang','3','Y','Y')");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP html");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` DROP html_msg");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` DROP html_msg");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='html_mail'");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='html_mail' LIMIT 1");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='html_mail' LIMIT 1");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.6': // SQL queries for v0.0.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Der erstellte HTML-Code wird noch kompiliert (eigene HTML-Codes umgewandelt).");
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD html ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` ADD html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` ADD html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','html_mail','HTML-Empfang','3','Y','Y')");
                break;
 
-       case '0.0.8': // SQL queries for v0.0.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP html");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` DROP html_msg");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` DROP html_msg");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='html_mail'");
                break;
 
-       case '0.0.9': // SQL queries for v0.0.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='html_mail' LIMIT 1");
                break;
 
-       case '0.1.0': // SQL queries for v0.2.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='html_mail' LIMIT 1");
                break;
 
-       case '0.1.1': // SQL queries for v0.1.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.6': // SQL queries for v0.0.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Der erstellte HTML-Code wird noch kompiliert (eigene HTML-Codes umgewandelt).");
+                               break;
+
+                       case '0.0.8': // SQL queries for v0.0.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
+                               break;
+
+                       case '0.0.9': // SQL queries for v0.0.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.1.0': // SQL queries for v0.2.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+                               break;
+
+                       case '0.1.1': // SQL queries for v0.1.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+                               break;
+
+                       case '0.1.2': // SQL queries for v0.1.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+                               break;
+
+                       case '0.1.3': // SQL queries for v0.1.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen gesch&uuml;tzt.");
+                               break;
+
+                       case '0.1.4': // SQL queries for v0.1.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+                               break;
+
+                       case '0.1.5': // SQL queries for v0.1.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+                               break;
+
+                       case '0.1.6':
+                               // Dependency is needed for ext-registration!! (want to alter a non existent Table)
+                               EXT_ADD_UPDATE_DEPENDS('bonus');
+                               EXT_SET_UPDATE_NOTES("Abh&auml;nigkeit von der Erweiterung <strong>bonus</strong> hinzugef&uuml;gt.");
+                               break;
+               }
                break;
 
-       case '0.1.2': // SQL queries for v0.1.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
-               break;
-
-       case '0.1.3': // SQL queries for v0.1.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen gesch&uuml;tzt.");
-               break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-       case '0.1.4': // SQL queries for v0.1.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
-               break;
-
-       case '0.1.5': // SQL queries for v0.1.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
-               break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-       case '0.1.6':
-               // Dependency is needed for ext-registration!! (want to alter a non existent Table)
-               EXT_ADD_UPDATE_DEPENDS('bonus');
-               EXT_SET_UPDATE_NOTES("Abh&auml;nigkeit von der Erweiterung <strong>bonus</strong> hinzugef&uuml;gt.");
-               break;
-       }
-       break;
-
-case 'modify': // When the extension got modified
-       break;
-
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
-
-default: // Do stuff when extension is loaded
-       // Valid HTML tags (only simple and no attributes!)
-       $GLOBALS['html_tags'] = array(
+                       default: // Do stuff when extension is loaded
+                               // Valid HTML tags (only simple and no attributes!)
+                               $GLOBALS['html_tags'] = array(
                'b',
                'i',
                'u',
@@ -152,26 +152,26 @@ default: // Do stuff when extension is loaded
                'left',
                'right',
                'br',
-       );
+                               );
 
-       // URL ends which are used to indentify the end of an URL or email link
-       // Don't use these chars in links... ;-)
-       //
-       $GLOBALS['url_ends'] = array(
+                               // URL ends which are used to indentify the end of an URL or email link
+                               // Don't use these chars in links... ;-)
+                               //
+                               $GLOBALS['url_ends'] = array(
                ' ',
                "\n",
                "\r",
                ')',
-       );
+                               );
 
-       // Valid email chars (without @, or do you want to have another @ inside your email addy?)
-       $GLOBALS['valid_email_chars'] = array(
+                               // Valid email chars (without @, or do you want to have another @ inside your email addy?)
+                               $GLOBALS['valid_email_chars'] = array(
                'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s',
                't','u','v','w','x','y','z','a','B','C','D','E','F','G','H','I','J','K','L',
                'M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','-','.','_','0','1',
                '2','3','4','5','6','7','8','9'
-       );
-       break;
+               );
+               break;
 }
 
 //
index cc1f6b7abe83e249fb89a4df64ef3dbaa7324479..71fbd97affe97eecc0f09345f4a3351d6c2d9fe2 100644 (file)
@@ -51,33 +51,33 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1'));
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL('');
+               break;
 
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DELETE FROM `{!_MYSQL_PREFIX!}_countries` WHERE provider = 'ext-iso3166';");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_countries` DROP `provider`;");
-       break;
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DELETE FROM `{!_MYSQL_PREFIX!}_countries` WHERE provider = 'ext-iso3166';");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_countries` DROP `provider`;");
+               break;
 
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_countries` SET is_active = 'Y' WHERE provider = 'ext-iso3166';");
-       break;
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_countries` SET is_active = 'Y' WHERE provider = 'ext-iso3166';");
+               break;
 
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_countries` SET is_active='N' WHERE provider = 'ext-iso3166';");
-       break;
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_countries` SET is_active='N' WHERE provider = 'ext-iso3166';");
+               break;
 
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.2
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_countries` ADD `provider` ENUM( 'user', 'ext-iso3166' ) NOT NULL DEFAULT 'user';");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_countries` (`code`,`descr`,`provider`)
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.2
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_countries` ADD `provider` ENUM( 'user', 'ext-iso3166' ) NOT NULL DEFAULT 'user';");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_countries` (`code`,`descr`,`provider`)
 VALUES ('AD', 'Andorra', 'ext-iso3166'),
 ('AE', 'Vereinigte Arabische Emirate', 'ext-iso3166'),
 ('AF', 'Afghanistan', 'ext-iso3166'),
@@ -322,24 +322,24 @@ VALUES ('AD', 'Andorra', 'ext-iso3166'),
 ('ZM', 'Sambia', 'ext-iso3166'),
 ('ZW', 'Zimbabwe', 'ext-iso3166');");
 
-               // This extension depends on the country extension
-               EXT_ADD_UPDATE_DEPENDS('country');
+                               // This extension depends on the country extension
+                               EXT_ADD_UPDATE_DEPENDS('country');
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Erste Liste von 243 L&auml;ndercodes nach ISO 3166. (Quelle: Selfhtml)<br />Alle L&auml;nder sind zuerst deaktiviert. Achtung DE k&ouml;nnte doppelt vorkommen.<br />Ein Aktivieren/Deaktivieren l&auml;sst alle L&auml;nder beim Registrieren anzeigen oder nicht Anzeigen.");
-               break;
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Erste Liste von 243 L&auml;ndercodes nach ISO 3166. (Quelle: Selfhtml)<br />Alle L&auml;nder sind zuerst deaktiviert. Achtung DE k&ouml;nnte doppelt vorkommen.<br />Ein Aktivieren/Deaktivieren l&auml;sst alle L&auml;nder beim Registrieren anzeigen oder nicht Anzeigen.");
+                               break;
 
-       }
-       break;
+               }
+               break;
 
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 // [EOF]
index 1e8d7ea6a5ab21d4c4bd0ef7119a6a01505906c8..6f919dc48904d57b3bf3011c30a489c4d4ae407a 100644 (file)
@@ -50,42 +50,42 @@ EXT_SET_VER_HISTORY(array('0.0'));
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       break;
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               break;
 
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       break;
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               break;
 
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       break;
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               break;
 
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       break;
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               break;
 
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               ADD_EXT_SQL("");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               ADD_EXT_SQL('');
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("");
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES('');
+                               break;
+               }
                break;
-       }
-       break;
 
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 //
index 3f6678dad343c1c3415cbcf7031334b222a02d7c..489701c2eeb5ebd66a56feca85f07ef88347bae9 100644 (file)
@@ -50,45 +50,45 @@ EXT_SET_VER_HISTORY(array('0.0'));
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats','logs','Aufruflogb&uuml;cher','Verwalten Sie Ihre Aufruflogb&uuml;cher mit diesem Admin-Bereich! (Derzeit nur Download!)',8)");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `logs_base` VARCHAR(255) NOT NULL DEFAULT 'logs'");
-       break;
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats','logs','Aufruflogb&uuml;cher','Verwalten Sie Ihre Aufruflogb&uuml;cher mit diesem Admin-Bereich! (Derzeit nur Download!)',8)");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `logs_base` VARCHAR(255) NOT NULL DEFAULT 'logs'");
+               break;
 
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='logs'");
-       break;
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='logs'");
+               break;
 
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       break;
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               break;
 
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       break;
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               break;
 
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               ADD_EXT_SQL("");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               ADD_EXT_SQL('');
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("");
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES('');
+                               break;
+               }
                break;
-       }
-       break;
 
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 //
index f6454f1425d0f5ccceff39bd84a39562806ad5ef..bde901eed0dda63bce603dfedb47d83d377465b8 100644 (file)
@@ -50,199 +50,199 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='mailid' LIMIT 1");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE `module`='mailid' LIMIT 1");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Veraltetes Update.");
-               break;
-
-       case '0.0.2': // SQL queries for v0.0.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Turbo-Bonus interegiert, nur wenn bonus-Erweiterung v0.2.2 oder h&ouml;her ist.");
-               break;
-
-       case '0.0.4': // SQL queries for v0.0.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Absicherung der Variablen <em>uid</em>, <em>mailid</em> und <em>bonusid</em> durch die eigene Funktion <em>bigintval()</em> in den beiden Dateien <em>mailid.php</em> und <em>mailid_top.php</em>.");
-               break;
-
-       case '0.0.5': // SQL queries for v0.0.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Weisse Seite im Mozilla bzw. <em>Seite nicht gefunden</em> unter dem IE behoben.");
-               break;
-
-       case '0.0.6': // SQL queries for v0.0.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("register_globals-Problem behoben");
-               break;
-
-       case '0.0.7': // SQL queries for v0.0.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
-               break;
-
-       case '0.0.8': // SQL queries for v0.0.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
-               break;
-
-       case '0.0.9': // SQL queries for v0.0.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Mailbest&auml;tigung klappt wieder.");
-               break;
-
-       case '0.1.0': // SQL queries for v0.2.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert");
-               break;
-
-       case '0.1.1': // SQL queries for v0.1.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
-               break;
-
-       case '0.1.2': // SQL queries for v0.1.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Probe-Fix wegen falschen Best&auml;tigungcodes bei Druck auf Return-Taste. Bitte aktualisieren Sie auch das Template <u>mailid_confirm_buttom.tpl</u>, damit die Best&auml;tigung ohne Code auch klappt!");
-               break;
-
-       case '0.1.3': // SQL queries for v0.1.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
-               break;
-
-       case '0.1.4': // SQL queries for v0.1.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Sicherheitsupdate an den Scripten <u>mailid.php</u> und <strong>mailid_top.php</strong> durchgef&uuml;hrt.");
-               break;
-
-       case '0.1.5': // SQL queries for v0.1.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Sende-Pool wird nicht mehr ben&ouml;tigt, um die Best&auml;tigung durchzuf&uuml;hren.");
-               break;
-
-       case '0.1.6': // SQL queries for v0.1.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Template <u>mailid_frameset.tpl</u> nach <u>mailid_frames.tpl</u> umbenannt.");
-               break;
-
-       case '0.1.7': // SQL queries for v0.1.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Ausgabe des generierten HTML-Codes nach <u>inc/footer.php</u> verlagert.");
-               break;
-
-       case '0.1.8': // SQL queries for v0.1.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlende Variablen gefixt.");
-               break;
-
-       case '0.1.9': // SQL queries for v0.1.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Gesamt-{!POINTS!} werden nun nach Best&auml;tigung angezeigt. Bitte aktualisieren Sie die Templates <u>mailid_points_done.tpl</u>, <u>mailid_points_done2.tpl</u> und <u>mailid_frames.tpl</u> !");
-               break;
-
-       case '0.2.0': // SQL queries for v0.2.0
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Variablen abgesichert (Diverse Warnhinweise des Webservers sind damit unterbunden).");
-               break;
-
-       case '0.2.1': // SQL queries for v0.2.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Parser-Fehler beseitigt.");
-               break;
-
-       case '0.2.2': // SQL queries for v0.2.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler wegen fehlende Datenfeldelementen behoben.");
-               break;
-
-       case '0.2.3': // SQL queries for v0.2.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Modul <strong>mailid</strong> war nicht gesetzt. Dadurch wurden die URLs (loader z.B.) umgeschrieben und f&uuml;hrten somit zu Fehlern.");
-               break;
-
-       case '0.2.4': // SQL queries for v0.2.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
-               break;
-
-       case '0.2.5': // SQL queries for v0.2.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Den Punkte in der Gesamt-{!POINTS!}-Anzahl in ein Komma umgewandelt.");
-               break;
-
-       case '0.2.6': // SQL queries for v0.2.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("De-/Aktivieren des mit dieser Erweiterung verkn&uuml;pften Modules eingebunden.");
-               break;
-
-       case '0.2.7': // SQL queries for v0.2.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Wenn die {!POINTS!} dem <strong>noch auf Auszahlung wartendem Guthaben</strong> aufaddiert wird, wird eine entsprechende Nachricht ausgegeben (neue Templates <strong>mailid_points_locked</strong> und <strong>mailid_points_locked2</strong> sind hinzugekommen!)");
-               break;
-
-       case '0.2.8': // SQL queries for v0.2.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Bonus- und Standart-Referal-ID ausblendbar aus Aktiv-Rallye und bekommt kein Aktiv-Guthaben.");
-               break;
-
-       case '0.2.9': // SQL queries for v0.2.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("<strong>Code wiederholen</strong> nach <strong>Code eingeben</strong> hin ge&auml;ndert.");
-               break;
-
-       case '0.3.0': // SQL queries for v0.3.0
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlende Templates hinzugef&uuml;gt.");
-               break;
-
-       case '0.3.1': // SQL queries for v0.3.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("mailid.php und mailid_top.php k&ouml;nnen erst bei aktivierter Erweiterung <strong>mailid</strong> benutzt werden. Solange gibt es fatale Fehlermeldungen.");
-               break;
-
-       case '0.3.2': // SQL queries for v0.3.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Bitte das Template <em><strong>{!PATH!}/templates/de/html/mailid/mailid_points_lcoked2.tpl</strong></em> l&ouml;schen. Noices fixed.");
-               break;
-
-       case '0.3.3': // SQL queries for v0.3.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Variablen-Handling skriptglobal ge&auml;ndert.");
-               break;
-       }
-       break;
-
-case 'modify': // When the extension got modified
-       break;
-
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
-
-default: // Do stuff when extension is loaded
-       break;
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL('');
+               break;
+
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
+               break;
+
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='mailid' LIMIT 1");
+               break;
+
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE `module`='mailid' LIMIT 1");
+               break;
+
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Veraltetes Update.");
+                               break;
+
+                       case '0.0.2': // SQL queries for v0.0.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Turbo-Bonus interegiert, nur wenn bonus-Erweiterung v0.2.2 oder h&ouml;her ist.");
+                               break;
+
+                       case '0.0.4': // SQL queries for v0.0.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Absicherung der Variablen <em>uid</em>, <em>mailid</em> und <em>bonusid</em> durch die eigene Funktion <em>bigintval()</em> in den beiden Dateien <em>mailid.php</em> und <em>mailid_top.php</em>.");
+                               break;
+
+                       case '0.0.5': // SQL queries for v0.0.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Weisse Seite im Mozilla bzw. <em>Seite nicht gefunden</em> unter dem IE behoben.");
+                               break;
+
+                       case '0.0.6': // SQL queries for v0.0.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("register_globals-Problem behoben");
+                               break;
+
+                       case '0.0.7': // SQL queries for v0.0.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.0.8': // SQL queries for v0.0.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.0.9': // SQL queries for v0.0.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Mailbest&auml;tigung klappt wieder.");
+                               break;
+
+                       case '0.1.0': // SQL queries for v0.2.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert");
+                               break;
+
+                       case '0.1.1': // SQL queries for v0.1.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.1.2': // SQL queries for v0.1.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Probe-Fix wegen falschen Best&auml;tigungcodes bei Druck auf Return-Taste. Bitte aktualisieren Sie auch das Template <u>mailid_confirm_buttom.tpl</u>, damit die Best&auml;tigung ohne Code auch klappt!");
+                               break;
+
+                       case '0.1.3': // SQL queries for v0.1.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+                               break;
+
+                       case '0.1.4': // SQL queries for v0.1.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Sicherheitsupdate an den Scripten <u>mailid.php</u> und <strong>mailid_top.php</strong> durchgef&uuml;hrt.");
+                               break;
+
+                       case '0.1.5': // SQL queries for v0.1.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Sende-Pool wird nicht mehr ben&ouml;tigt, um die Best&auml;tigung durchzuf&uuml;hren.");
+                               break;
+
+                       case '0.1.6': // SQL queries for v0.1.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Template <u>mailid_frameset.tpl</u> nach <u>mailid_frames.tpl</u> umbenannt.");
+                               break;
+
+                       case '0.1.7': // SQL queries for v0.1.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Ausgabe des generierten HTML-Codes nach <u>inc/footer.php</u> verlagert.");
+                               break;
+
+                       case '0.1.8': // SQL queries for v0.1.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlende Variablen gefixt.");
+                               break;
+
+                       case '0.1.9': // SQL queries for v0.1.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Gesamt-{!POINTS!} werden nun nach Best&auml;tigung angezeigt. Bitte aktualisieren Sie die Templates <u>mailid_points_done.tpl</u>, <u>mailid_points_done2.tpl</u> und <u>mailid_frames.tpl</u> !");
+                               break;
+
+                       case '0.2.0': // SQL queries for v0.2.0
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Variablen abgesichert (Diverse Warnhinweise des Webservers sind damit unterbunden).");
+                               break;
+
+                       case '0.2.1': // SQL queries for v0.2.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Parser-Fehler beseitigt.");
+                               break;
+
+                       case '0.2.2': // SQL queries for v0.2.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler wegen fehlende Datenfeldelementen behoben.");
+                               break;
+
+                       case '0.2.3': // SQL queries for v0.2.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Modul <strong>mailid</strong> war nicht gesetzt. Dadurch wurden die URLs (loader z.B.) umgeschrieben und f&uuml;hrten somit zu Fehlern.");
+                               break;
+
+                       case '0.2.4': // SQL queries for v0.2.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
+                               break;
+
+                       case '0.2.5': // SQL queries for v0.2.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Den Punkte in der Gesamt-{!POINTS!}-Anzahl in ein Komma umgewandelt.");
+                               break;
+
+                       case '0.2.6': // SQL queries for v0.2.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("De-/Aktivieren des mit dieser Erweiterung verkn&uuml;pften Modules eingebunden.");
+                               break;
+
+                       case '0.2.7': // SQL queries for v0.2.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Wenn die {!POINTS!} dem <strong>noch auf Auszahlung wartendem Guthaben</strong> aufaddiert wird, wird eine entsprechende Nachricht ausgegeben (neue Templates <strong>mailid_points_locked</strong> und <strong>mailid_points_locked2</strong> sind hinzugekommen!)");
+                               break;
+
+                       case '0.2.8': // SQL queries for v0.2.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Bonus- und Standart-Referal-ID ausblendbar aus Aktiv-Rallye und bekommt kein Aktiv-Guthaben.");
+                               break;
+
+                       case '0.2.9': // SQL queries for v0.2.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("<strong>Code wiederholen</strong> nach <strong>Code eingeben</strong> hin ge&auml;ndert.");
+                               break;
+
+                       case '0.3.0': // SQL queries for v0.3.0
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlende Templates hinzugef&uuml;gt.");
+                               break;
+
+                       case '0.3.1': // SQL queries for v0.3.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("mailid.php und mailid_top.php k&ouml;nnen erst bei aktivierter Erweiterung <strong>mailid</strong> benutzt werden. Solange gibt es fatale Fehlermeldungen.");
+                               break;
+
+                       case '0.3.2': // SQL queries for v0.3.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Bitte das Template <em><strong>{!PATH!}/templates/de/html/mailid/mailid_points_lcoked2.tpl</strong></em> l&ouml;schen. Noices fixed.");
+                               break;
+
+                       case '0.3.3': // SQL queries for v0.3.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Variablen-Handling skriptglobal ge&auml;ndert.");
+                               break;
+               }
+               break;
+
+                       case 'modify': // When the extension got modified
+                               break;
+
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
+
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 //
index 3e1c405d72ceb54c2aaf88a1e2793d857e18e9b0..c1cf578c396c727203861d99490630501aff97d2 100644 (file)
@@ -50,70 +50,70 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD maintenance ENUM('Y','N') NOT NULL DEFAULT 'N';");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','maintenance','Wartungsmodus','Schalten Sie den Wartungsmodus ein, nur wenn sehr schwerwiegende Fehler vorliegen, die Sie oder mxchange.org nicht schenll genug beheben k&ouml;nnen.','10')");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='maintenance'");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD maintenance ENUM('Y','N') NOT NULL DEFAULT 'N';");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','maintenance','Wartungsmodus','Schalten Sie den Wartungsmodus ein, nur wenn sehr schwerwiegende Fehler vorliegen, die Sie oder mxchange.org nicht schenll genug beheben k&ouml;nnen.','10')");
                break;
 
-       case '0.0.2': // SQL queries for v0.0.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='maintenance'");
                break;
 
-       case '0.0.3': // SQL queries for v0.0.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.0.4': // SQL queries for v0.0.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.0.5': // SQL queries for v0.0.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen gesch&uuml;tzt.");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.0.2': // SQL queries for v0.0.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
+                               break;
+
+                       case '0.0.3': // SQL queries for v0.0.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
+                               break;
+
+                       case '0.0.4': // SQL queries for v0.0.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+                               break;
+
+                       case '0.0.5': // SQL queries for v0.0.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen gesch&uuml;tzt.");
+                               break;
+
+                       case '0.0.6': // SQL queries for v0.0.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+                               break;
+               }
                break;
 
-       case '0.0.6': // SQL queries for v0.0.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
-               break;
-       }
-       break;
-
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 // Keep this extension always active!
index d98c9512601b6df40a727d4a9bd19032181ac8b4..ccb30ca84ec3c8aa8351f5d26a3282e5c443cc22 100644 (file)
@@ -50,101 +50,101 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_mediadata`");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_mediadata'");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='mediadata'");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Berechnung der Gesamt-{!POINTS!} korregiert.");
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.0.2': // SQL queries for v0.0.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Daten des Scriptes mit eingebunden.");
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_mediadata`");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_mediadata'");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='mediadata'");
                break;
 
-       case '0.0.3': // SQL queries for v0.0.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen gesch&uuml;tzt.");
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.0.4': // SQL queries for v0.0.4
+       case 'deactivate': // Do stuff when admin deactivates this extension
                // SQL commands to run
-               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_mediadata`");
-               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_mediadata` (
+               ADD_EXT_SQL('');
+               break;
+
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Berechnung der Gesamt-{!POINTS!} korregiert.");
+                               break;
+
+                       case '0.0.2': // SQL queries for v0.0.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Daten des Scriptes mit eingebunden.");
+                               break;
+
+                       case '0.0.3': // SQL queries for v0.0.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen gesch&uuml;tzt.");
+                               break;
+
+                       case '0.0.4': // SQL queries for v0.0.4
+                               // SQL commands to run
+                               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_mediadata`");
+                               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_mediadata` (
 media_key VARCHAR(255) NOT NULL DEFAULT '',
 media_value VARCHAR(255) NOT NULL DEFAULT '',
 PRIMARY KEY(media_key)
 ) TYPE={!_TABLE_TYPE!}");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Teile der Mediendaten werden in seperater Tabelle gesichert. Bitte beachten Sie, dass dieses Update nur Daten des <strong>aktuellen</strong> Zustandes ber&uuml;cksichtigen kann und <strong>nicht</strong> bereits gel&ouml;schter Mitglieder.");
-               break;
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Teile der Mediendaten werden in seperater Tabelle gesichert. Bitte beachten Sie, dass dieses Update nur Daten des <strong>aktuellen</strong> Zustandes ber&uuml;cksichtigen kann und <strong>nicht</strong> bereits gel&ouml;schter Mitglieder.");
+                               break;
 
-       case '0.0.5': // SQL queries for v0.0.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt.");
-               break;
+                       case '0.0.5': // SQL queries for v0.0.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt.");
+                               break;
 
-       case '0.0.6': // SQL queries for v0.0.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Mediendaten mussten komplett regeneriert werden.");
-               break;
+                       case '0.0.6': // SQL queries for v0.0.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Mediendaten mussten komplett regeneriert werden.");
+                               break;
 
-       case '0.0.7': // SQL queries for v0.0.7
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_start BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_stage BIGINT(20) UNSIGNED NOT NULL DEFAULT '500'");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_mediadata','Mediendaten','Stellen Sie allgemeine Einstellungen zu den Mediendaten ein.', 10)");
+                       case '0.0.7': // SQL queries for v0.0.7
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_start BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_stage BIGINT(20) UNSIGNED NOT NULL DEFAULT '500'");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_mediadata','Mediendaten','Stellen Sie allgemeine Einstellungen zu den Mediendaten ein.', 10)");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Start des {!MT_WORD2!} und Anzahl Anmeldungen aufgenommen. (Task #13)<br />
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Start des {!MT_WORD2!} und Anzahl Anmeldungen aufgenommen. (Task #13)<br />
 Bitte stellen Sie diesen derzeit manuell unter <a href=\"{!URL!}/modules.php?module=admin&amp;what=config_mediadata\">Einstellungen-Medidata</a> selber einstellen.");
-               break;
+                               break;
 
-       case '0.0.8': // SQL queries for v0.0.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
-               break;
+                       case '0.0.8': // SQL queries for v0.0.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+                               break;
 
-       case '0.0.9': // SQL queries for v0.0.9
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','mediadata','Mediendaten',3,'Y','N')");
+                       case '0.0.9': // SQL queries for v0.0.9
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','mediadata','Mediendaten',3,'Y','N')");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Men&uuml;punkt wird durch diese Erweiterung generiert.");
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Men&uuml;punkt wird durch diese Erweiterung generiert.");
+                               break;
+               }
                break;
-       }
-       break;
 
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 if ((isset($dry_run)) && (isset($EXT_LOAD_MODE))) {
index dcd649008392382e12a5fe783b6b3c30cd809c24..17072e1dbfcb75c82b099c4fa4ddfa5485d368eb 100644 (file)
@@ -50,50 +50,50 @@ EXT_SET_VER_HISTORY(array('0.0'));
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu',NULL,'Men&uuml;-System','Alle drei Men&uuml;-System bearbeiten (Admin-, Mitglied- und Gast-Men&uuml;)',1)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','adminedit','Vom Admin editieren','Das Administrationsmen&uuml; mit neuen Men&uuml;s erweitern, bestehende &auml;ndern oder l&ouml;schen. <strong>Vorsicht!</strong> L&ouml;schen Sie nicht das Login-Men&uuml;!',2)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','admin_add','Admin-Men&uuml; hinzuf&uuml;gen','Weiteren Men&uuml;punkt zum Admin-Bereich hinzuf&uuml;gen',3)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','guest_add','G&auml;ste-Men&uuml; hinzuf&uuml;gen','F&uuml;gen Sie weitere Men&uuml;punkte dem G&auml;ste-Men&uuml; hinzu.',5)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','memedit','Mitgliedsmen&uuml; editieren','Mitgliedsmen&uuml; editieren oder l&ouml;schen',6)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','guestedit','G&auml;ste-Men&uuml; editieren','G&auml;ste-Men&uuml; editieren, l&ouml;schen',4)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','mem_add','Mitgliedsmen&uuml; hinzuf&uuml;gen','Weiteren Men&uuml;punkt zum Mitgliedsmen&uuml; hinzuf&uuml;gen',7)");
-       break;
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu',NULL,'Men&uuml;-System','Alle drei Men&uuml;-System bearbeiten (Admin-, Mitglied- und Gast-Men&uuml;)',1)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','adminedit','Vom Admin editieren','Das Administrationsmen&uuml; mit neuen Men&uuml;s erweitern, bestehende &auml;ndern oder l&ouml;schen. <strong>Vorsicht!</strong> L&ouml;schen Sie nicht das Login-Men&uuml;!',2)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','admin_add','Admin-Men&uuml; hinzuf&uuml;gen','Weiteren Men&uuml;punkt zum Admin-Bereich hinzuf&uuml;gen',3)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','guest_add','G&auml;ste-Men&uuml; hinzuf&uuml;gen','F&uuml;gen Sie weitere Men&uuml;punkte dem G&auml;ste-Men&uuml; hinzu.',5)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','memedit','Mitgliedsmen&uuml; editieren','Mitgliedsmen&uuml; editieren oder l&ouml;schen',6)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','guestedit','G&auml;ste-Men&uuml; editieren','G&auml;ste-Men&uuml; editieren, l&ouml;schen',4)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','mem_add','Mitgliedsmen&uuml; hinzuf&uuml;gen','Weiteren Men&uuml;punkt zum Mitgliedsmen&uuml; hinzuf&uuml;gen',7)");
+               break;
 
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='menu'");
-       break;
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='menu'");
+               break;
 
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       break;
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               break;
 
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       break;
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               break;
 
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               ADD_EXT_SQL("");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               ADD_EXT_SQL('');
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("");
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES('');
+                               break;
+               }
                break;
-       }
-       break;
 
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 //
index 9912cf77bb7c37054adb9c05182707b4aab0e8c2..c91e18ae08634a5f4aeb80358873bf6a56a5555b 100644 (file)
@@ -50,78 +50,78 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('mods', NULL, 'Modul-Management','Verwalten Sie die Basis-Module index, login, admin usw.', 4)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('mods','config_mods','Module &auml;ndern','&Auml;ndern Sie hier die Zugtiffsrechte auf die Module. Was dennoch nicht geht: Mitglied- oder Gastzugriffsrtechte auf Admin-Module bzw. Gastzugriffsrechte auf Mitglieder-Module. Diese sind extra abgesichert.', 1)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('mods','stats_mods','Modul-Statistiken','Sehen Sie sich hier die Statistiken der Module und die damit verkn&uuml;pften action- und what-Dateien an. Bei einigen Modulen gibt es allerdings keine verkn&uuml;pften Dateien und somit keine Extra-Statistik.', 2)");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='mods'");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.2': // SQL queries for v0.0.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('mods', NULL, 'Modul-Management','Verwalten Sie die Basis-Module index, login, admin usw.', 4)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('mods','config_mods','Module &auml;ndern','&Auml;ndern Sie hier die Zugtiffsrechte auf die Module. Was dennoch nicht geht: Mitglied- oder Gastzugriffsrtechte auf Admin-Module bzw. Gastzugriffsrechte auf Mitglieder-Module. Diese sind extra abgesichert.', 1)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('mods','stats_mods','Modul-Statistiken','Sehen Sie sich hier die Statistiken der Module und die damit verkn&uuml;pften action- und what-Dateien an. Bei einigen Modulen gibt es allerdings keine verkn&uuml;pften Dateien und somit keine Extra-Statistik.', 2)");
                break;
 
-       case '0.0.3': // SQL queries for v0.0.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Dummy-Release im Internet???");
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='mods'");
                break;
 
-       case '0.0.4': // SQL queries for v0.0.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.0.5': // SQL queries for v0.0.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.0.6': // SQL queries for v0.0.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.2': // SQL queries for v0.0.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.0.3': // SQL queries for v0.0.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Dummy-Release im Internet???");
+                               break;
+
+                       case '0.0.4': // SQL queries for v0.0.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+                               break;
+
+                       case '0.0.5': // SQL queries for v0.0.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+                               break;
+
+                       case '0.0.6': // SQL queries for v0.0.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+                               break;
+
+                       case '0.0.7': // SQL queries for v0.0.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Sicherheitsupdate f&uuml;r die Include-Befehle.");
+                               break;
+
+                       case '0.0.8': // SQL queries for v0.0.8
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Modul-Management' WHERE action = 'mods' AND (`what`='' OR `what` IS NULL) LIMIT 1");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Verwaltung auf Management umgestellt.");
+                               break;
+               }
                break;
 
-       case '0.0.7': // SQL queries for v0.0.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Sicherheitsupdate f&uuml;r die Include-Befehle.");
-               break;
-
-       case '0.0.8': // SQL queries for v0.0.8
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Modul-Management' WHERE action = 'mods' AND (`what`='' OR `what` IS NULL) LIMIT 1");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Verwaltung auf Management umgestellt.");
-               break;
-       }
-       break;
-
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 //
index 39338716728bb8b6156795d3c51f2b855ad99089..da3bc2b1e94f607938b6f1c25b150683169bdf95 100644 (file)
@@ -50,129 +50,129 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.2': // SQL queries for v0.0.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
-               break;
-
-       case '0.0.3': // SQL queries for v0.0.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
-               break;
-
-       case '0.0.4': // SQL queries for v0.0.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
-               break;
-
-       case '0.0.5': // SQL queries for v0.0.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
-               break;
-
-       case '0.0.6': // SQL queries for v0.0.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
-               break;
-
-       case '0.0.7': // SQL queries for v0.0.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Sperrung des Mitgliederprofiles nach &Auml;nderung kann unter &quot;Sonstige Einstellungen&quot; abgeschaltet werden (0 setzen!)");
-               break;
-
-       case '0.0.8': // SQL queries for v0.0.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
-               break;
-
-       case '0.0.9': // SQL queries for v0.0.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Anrede &quot;Firma&quot; hinzugef&uuml;gt.");
-               break;
-
-       case '0.1.0': // SQL queries for v0.2.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausf&uuml;hrlich.");
-               break;
-
-       case '0.1.1': // SQL queries for v0.1.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Email-Adresse wird vor dem Speichern auf G&uml;tigkeit hin getestet.");
-               break;
-
-       case '0.1.2': // SQL queries for v0.1.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Einbindung der Erweiterung <strong>country</strong>, die Sie sich noch optional von <a href=\"{!URL!}/modules.php?module=admin&amp;what=extensions&amp;do=search\">meiner Seite herunterladen</a> m&uuml;ssen.<br />
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL('');
+               break;
+
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
+               break;
+
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
+               break;
+
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
+               break;
+
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.2': // SQL queries for v0.0.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
+                               break;
+
+                       case '0.0.3': // SQL queries for v0.0.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.0.4': // SQL queries for v0.0.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.0.5': // SQL queries for v0.0.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.0.6': // SQL queries for v0.0.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+                               break;
+
+                       case '0.0.7': // SQL queries for v0.0.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Sperrung des Mitgliederprofiles nach &Auml;nderung kann unter &quot;Sonstige Einstellungen&quot; abgeschaltet werden (0 setzen!)");
+                               break;
+
+                       case '0.0.8': // SQL queries for v0.0.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+                               break;
+
+                       case '0.0.9': // SQL queries for v0.0.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Anrede &quot;Firma&quot; hinzugef&uuml;gt.");
+                               break;
+
+                       case '0.1.0': // SQL queries for v0.2.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausf&uuml;hrlich.");
+                               break;
+
+                       case '0.1.1': // SQL queries for v0.1.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Email-Adresse wird vor dem Speichern auf G&uml;tigkeit hin getestet.");
+                               break;
+
+                       case '0.1.2': // SQL queries for v0.1.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Einbindung der Erweiterung <strong>country</strong>, die Sie sich noch optional von <a href=\"{!URL!}/modules.php?module=admin&amp;what=extensions&amp;do=search\">meiner Seite herunterladen</a> m&uuml;ssen.<br />
 <br />
 <strong>Wichtig: Laden Sie noch die Template member_mydata_overview und member_mydata_edit (beide zu finden unter templates/".getLanguage()."/html/member/ !) mit hoch!</strong>");
 
-               // Depends on 'country'!
-               EXT_ADD_UPDATE_DEPENDS('country');
-               break;
+                               // Depends on 'country'!
+                               EXT_ADD_UPDATE_DEPENDS('country');
+                               break;
 
-       case '0.1.3': // SQL queries for v0.1.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Es werden dem Mitglied nur aktivierte L&auml;ndercodes zur Auswahl angeboten.");
-               break;
+                       case '0.1.3': // SQL queries for v0.1.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Es werden dem Mitglied nur aktivierte L&auml;ndercodes zur Auswahl angeboten.");
+                               break;
 
-       case '0.1.4': // SQL queries for v0.1.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("SQL-Anweisungen mit SQL_QUERY_ESC() abgesichert.");
-               break;
+                       case '0.1.4': // SQL queries for v0.1.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("SQL-Anweisungen mit SQL_QUERY_ESC() abgesichert.");
+                               break;
 
-       case '0.1.5': // SQL queries for v0.1.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
-               break;
+                       case '0.1.5': // SQL queries for v0.1.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+                               break;
 
-       case '0.1.6': // SQL queries for v0.1.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Die Einstellungen k&ouml;nnen nun auch ohne der Erweiterung <strong>country</strong> abgespeichert werden.");
-               break;
+                       case '0.1.6': // SQL queries for v0.1.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Die Einstellungen k&ouml;nnen nun auch ohne der Erweiterung <strong>country</strong> abgespeichert werden.");
+                               break;
 
-       case '0.1.7': // SQL queries for v0.1.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.");
-               break;
+                       case '0.1.7': // SQL queries for v0.1.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.");
+                               break;
 
-       case '0.1.8': // SQL queries for v0.1.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+                       case '0.1.8': // SQL queries for v0.1.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+                               break;
+               }
                break;
-       }
-       break;
 
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 //
index 89e6a92ec00de8bbead8b4d1c0a219cf87f26e71..d0580940414503c49cf448d641a9151d093fb839 100644 (file)
@@ -50,42 +50,42 @@ EXT_SET_VER_HISTORY(array('0.0'));
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       break;
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               break;
 
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       break;
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               break;
 
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       break;
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               break;
 
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       break;
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               break;
 
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               ADD_EXT_SQL("");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               ADD_EXT_SQL('');
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("");
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES('');
+                               break;
+               }
                break;
-       }
-       break;
 
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 //
index 83f9bdd7797412ef1548509401ae6af7fa2dc613..4c1b1de4c807c7ff41b4bb3b161b6583468aa464 100644 (file)
@@ -50,133 +50,133 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='newsletter' AND what != 'send_newsletter'");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='newsletter'");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `locked`='N', `visible`='Y' WHERE `what`='newsletter' LIMIT 1");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `locked`='Y', `visible`='N' WHERE `what`='newsletter' LIMIT 1");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter', NULL, 'Newsletter','Einstellungen am Newsletter, Newsletter versenden, Abbestellungen auflisten usw.', 3)");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter','list_newsletter','Abbestellungen','Alle Abbestellungen auflisten und bearbeiten.', 2)");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter','config_newsletter','Einstellungen','Geb&uuml;hr zum Abbestellen des Newsletters usw. sind hier einstellbar.', 3)");
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='newsletter', `what`='send_newsletter', `title`='Versenden', `sort`='1' WHERE `what`='newsletter' LIMIT 1");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','newsletter','Newsletter-Empfang','N','Y', 10)");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD nl_charge FLOAT(10,2) UNSIGNED NOT NULL DEFAULT '5.00'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nl_receive ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nl_until VARCHAR(10) NOT NULL DEFAULT 0");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nl_timespan VARCHAR(10) NOT NULL DEFAULT 0");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Vor der eigentlichen Freigabe dieser Erweiterungen habe ich sie versehendlich im Archiv mit auf den Server hochgeladen. Diese Version f&uuml;gt die bereits angek&uuml;ndigte Funktionalit&auml;ten, wie zum Beispiel das Einstellen der Abschaltgeb&uuml;hr.");
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.0.2': // SQL queries for v0.0.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("URL im Versendeformular und Option <em>Immer aktiv</em> f&uuml;r diese Erweiterung deaktiviert.");
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='newsletter' AND what != 'send_newsletter'");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='newsletter'");
                break;
 
-       case '0.0.3': // SQL queries for v0.0.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `locked`='N', `visible`='Y' WHERE `what`='newsletter' LIMIT 1");
                break;
 
-       case '0.0.4': // SQL queries for v0.0.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `locked`='Y', `visible`='N' WHERE `what`='newsletter' LIMIT 1");
                break;
 
-       case '0.0.5': // SQL queries for v0.0.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter', NULL, 'Newsletter','Einstellungen am Newsletter, Newsletter versenden, Abbestellungen auflisten usw.', 3)");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter','list_newsletter','Abbestellungen','Alle Abbestellungen auflisten und bearbeiten.', 2)");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter','config_newsletter','Einstellungen','Geb&uuml;hr zum Abbestellen des Newsletters usw. sind hier einstellbar.', 3)");
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='newsletter', `what`='send_newsletter', `title`='Versenden', `sort`='1' WHERE `what`='newsletter' LIMIT 1");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','newsletter','Newsletter-Empfang','N','Y', 10)");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD nl_charge FLOAT(10,2) UNSIGNED NOT NULL DEFAULT '5.00'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nl_receive ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nl_until VARCHAR(10) NOT NULL DEFAULT 0");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nl_timespan VARCHAR(10) NOT NULL DEFAULT 0");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Vor der eigentlichen Freigabe dieser Erweiterungen habe ich sie versehendlich im Archiv mit auf den Server hochgeladen. Diese Version f&uuml;gt die bereits angek&uuml;ndigte Funktionalit&auml;ten, wie zum Beispiel das Einstellen der Abschaltgeb&uuml;hr.");
+                               break;
+
+                       case '0.0.2': // SQL queries for v0.0.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("URL im Versendeformular und Option <em>Immer aktiv</em> f&uuml;r diese Erweiterung deaktiviert.");
+                               break;
+
+                       case '0.0.3': // SQL queries for v0.0.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+                               break;
+
+                       case '0.0.4': // SQL queries for v0.0.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+                               break;
+
+                       case '0.0.5': // SQL queries for v0.0.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+                               break;
+
+                       case '0.0.6': // SQL queries for v0.0.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Bitte Script inc/monthly_newsletter.php l&ouml;schen!");
+                               break;
+
+                       case '0.0.7': // SQL queries for v0.0.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Script <strong>inc/monthly/monthly_newsletter.php</strong> wird nicht mehr ausgef&uuml;hrt, wenn die Erweiterung nicht aktiviert ist.");
+                               break;
+
+                       case '0.0.8': // SQL queries for v0.0.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Sicherheitsupdate f&uuml;r die Include-Befehle.");
+                               break;
+
+                       case '0.0.9': // SQL queries for v0.0.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Nur bei installierter Erweiterung <strong>html_mail</strong> k&ouml;nnen Sie auch HTML-Mails versenden.");
+                               break;
+
+                       case '0.1.0': // SQL queries for v0.2.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Nur bei installierter Erweiterung <strong>html_mail</strong> k&ouml;nnen Sie auch HTML-Mails versenden.");
+                               break;
+
+                       case '0.1.1': // SQL queries for v0.1.1
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("W&auml;hrung auf die Erweiterung <a href=\"#\"><strong>ext-other.zip</strong></a> verlagert. Bitte auch diese aktualisieren.");
+                               break;
+
+                       case '0.1.2': // SQL queries for v0.1.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+                               break;
+               }
                break;
 
-       case '0.0.6': // SQL queries for v0.0.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Bitte Script inc/monthly_newsletter.php l&ouml;schen!");
-               break;
-
-       case '0.0.7': // SQL queries for v0.0.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Script <strong>inc/monthly/monthly_newsletter.php</strong> wird nicht mehr ausgef&uuml;hrt, wenn die Erweiterung nicht aktiviert ist.");
-               break;
-
-       case '0.0.8': // SQL queries for v0.0.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Sicherheitsupdate f&uuml;r die Include-Befehle.");
-               break;
-
-       case '0.0.9': // SQL queries for v0.0.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Nur bei installierter Erweiterung <strong>html_mail</strong> k&ouml;nnen Sie auch HTML-Mails versenden.");
-               break;
-
-       case '0.1.0': // SQL queries for v0.2.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Nur bei installierter Erweiterung <strong>html_mail</strong> k&ouml;nnen Sie auch HTML-Mails versenden.");
-               break;
-
-       case '0.1.1': // SQL queries for v0.1.1
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("W&auml;hrung auf die Erweiterung <a href=\"#\"><strong>ext-other.zip</strong></a> verlagert. Bitte auch diese aktualisieren.");
-               break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-       case '0.1.2': // SQL queries for v0.1.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
-               break;
-       }
-       break;
-
-case 'modify': // When the extension got modified
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
-
-default: // Do stuff when extension is loaded
-       // URL ends which are used to indentify the end of an URL or email link
-       // Don't use these chars in links... ;-)
-       //
-       $GLOBALS['url_ends'] = array(
+                       default: // Do stuff when extension is loaded
+                               // URL ends which are used to indentify the end of an URL or email link
+                               // Don't use these chars in links... ;-)
+                               //
+                               $GLOBALS['url_ends'] = array(
                ' ',
                "\n",
                "\r",
                ')',
-       );
+                               );
 
-       // Valid email chars (without @, or do you want to have another @ inside your email addy?)
-       $GLOBALS['valid_email_chars'] = array(
+                               // Valid email chars (without @, or do you want to have another @ inside your email addy?)
+                               $GLOBALS['valid_email_chars'] = array(
                'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s',
                't','u','v','w','x','y','z','a','B','C','D','E','F','G','H','I','J','K','L',
                'M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','-','.','_','0','1',
                '2','3','4','5','6','7','8','9'
-       );
+               );
 
-       if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) {
-               // Daily reset was run so let's check out for expired newsletter orders
-               ADD_INC_TO_POOL(sprintf("%sinc/monthly/monthly_newsletter.php", constant('PATH')));
-       }
-       break;
+               if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) {
+                       // Daily reset was run so let's check out for expired newsletter orders
+                       ADD_INC_TO_POOL(sprintf("%sinc/monthly/monthly_newsletter.php", constant('PATH')));
+               }
+               break;
 }
 
 //
index 53e42ef4e0c2a501f442793d707e9ad27ec80351..c524c0dd15e383db7a05fa688860666914489c4a 100644 (file)
@@ -50,136 +50,136 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nickname VARCHAR(255) NOT NULL DEFAULT ''");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nick_uid ENUM ('nick','uid') NOT NULL DEFAULT 'uid'");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','nickname','Nicknamen','5','Y','Y')");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='nickname'");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN ('config_nickname','list_nickname')");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_nickname_history`");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='nickname' LIMIT 1");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='nickname' LIMIT 1");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE `ext_name`='nickname' AND ext_has_css='N' LIMIT 1");
-
-               // This update depends on sql_patches update!
-               EXT_ADD_UPDATE_DEPENDS('sql_patches');
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("CSS-Datei kann per Adminbereich ein- und ausgeschaltet werden.");
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nickname VARCHAR(255) NOT NULL DEFAULT ''");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nick_uid ENUM ('nick','uid') NOT NULL DEFAULT 'uid'");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','nickname','Nicknamen','5','Y','Y')");
                break;
 
-       case '0.0.3': // SQL queries for v0.0.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
-               break;
-
-       case '0.0.4': // SQL queries for v0.0.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei ge&auml;ndert.");
-               break;
-
-       case '0.0.5': // SQL queries for v0.0.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
-               break;
-
-       case '0.0.6': // SQL queries for v0.0.6
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD nickname_len TINYINT(3) UNSIGNED NOT NULL DEFAULT '5'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD nickname_pattern VARCHAR(255) NOT NULL DEFAULT 'a-zA-Z0-9_'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD nickname_chars VARCHAR(255) NOT NULL DEFAULT 'a-z, A-Z, 0-9, _'");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_nickname','Nicknamen','Stellen Sie minimale Nicknamenl&auml;nge, sowie erlaubte Zeichen hier ein.', 12)");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Minimale L&auml;nge, sowie erlaubte Zeichen sind per Adminbereich &auml;nderbar. Setzen Sie als erlaubte Zeichen nur URL-konforme Zeichen ein!");
-               break;
-
-       case '0.0.7': // SQL queries for v0.0.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
-               break;
-
-       case '0.0.8': // SQL queries for v0.0.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
-               break;
-
-       case '0.0.9': // SQL queries for v0.0.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Design &quot;Solid-Business&quot; eingebaut.");
-               break;
-
-       case '0.1.0': // SQL queries for v0.2.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
-               break;
-
-       case '0.1.1': // SQL queries for v0.1.1
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP nick_uid");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Auswahlf&uuml;r Mitglied ob mit Nickname oder User-ID einloggen entfernt.");
-               break;
-
-       case '0.1.2': // SQL queries for v0.1.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Zum Zusenden eines neuen Passwortes kann jetzt entweder der Nickname / User-ID <u>ODER</u> die angemeldete EMail-Adresse eingegeben werden.");
-               break;
-
-       case '0.1.3': // SQL queries for v0.1.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("CSS-Datei in general.css verschmolzen (Patch 435!)");
-               break;
-
-       case '0.1.4': // SQL queries for v0.1.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
-               break;
-
-       case '0.1.5': // SQL queries for v0.1.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
-               break;
-
-       case '0.1.6': // SQL queries for v0.1.6
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='2' WHERE `what`='nickname' LIMIT 1");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Mitgliedsmen&uuml; komplett umgebaut.");
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='nickname'");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN ('config_nickname','list_nickname')");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_nickname_history`");
                break;
 
-       case '0.1.7': // SQL queries for v0.1.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Mitglieder ohne Nickname sollten kein <strong>*failed*</strong> mehr sehen.");
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='nickname' LIMIT 1");
                break;
 
-       case '0.1.8': // SQL queries for v0.1.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='nickname' LIMIT 1");
                break;
-
-       case '0.1.9': // SQL queries for v0.1.9
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_nickname','Nickname-Historie','Listet alle verwendeten Nicknames der Mitglieder auf.', 12)");
-               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_nickname_history`");
-               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_nickname_history` (
+
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE `ext_name`='nickname' AND ext_has_css='N' LIMIT 1");
+
+                               // This update depends on sql_patches update!
+                               EXT_ADD_UPDATE_DEPENDS('sql_patches');
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("CSS-Datei kann per Adminbereich ein- und ausgeschaltet werden.");
+                               break;
+
+                       case '0.0.3': // SQL queries for v0.0.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
+                               break;
+
+                       case '0.0.4': // SQL queries for v0.0.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei ge&auml;ndert.");
+                               break;
+
+                       case '0.0.5': // SQL queries for v0.0.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.0.6': // SQL queries for v0.0.6
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD nickname_len TINYINT(3) UNSIGNED NOT NULL DEFAULT '5'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD nickname_pattern VARCHAR(255) NOT NULL DEFAULT 'a-zA-Z0-9_'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD nickname_chars VARCHAR(255) NOT NULL DEFAULT 'a-z, A-Z, 0-9, _'");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_nickname','Nicknamen','Stellen Sie minimale Nicknamenl&auml;nge, sowie erlaubte Zeichen hier ein.', 12)");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Minimale L&auml;nge, sowie erlaubte Zeichen sind per Adminbereich &auml;nderbar. Setzen Sie als erlaubte Zeichen nur URL-konforme Zeichen ein!");
+                               break;
+
+                       case '0.0.7': // SQL queries for v0.0.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
+                               break;
+
+                       case '0.0.8': // SQL queries for v0.0.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+                               break;
+
+                       case '0.0.9': // SQL queries for v0.0.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Design &quot;Solid-Business&quot; eingebaut.");
+                               break;
+
+                       case '0.1.0': // SQL queries for v0.2.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+                               break;
+
+                       case '0.1.1': // SQL queries for v0.1.1
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP nick_uid");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Auswahlf&uuml;r Mitglied ob mit Nickname oder User-ID einloggen entfernt.");
+                               break;
+
+                       case '0.1.2': // SQL queries for v0.1.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Zum Zusenden eines neuen Passwortes kann jetzt entweder der Nickname / User-ID <u>ODER</u> die angemeldete EMail-Adresse eingegeben werden.");
+                               break;
+
+                       case '0.1.3': // SQL queries for v0.1.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("CSS-Datei in general.css verschmolzen (Patch 435!)");
+                               break;
+
+                       case '0.1.4': // SQL queries for v0.1.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+                               break;
+
+                       case '0.1.5': // SQL queries for v0.1.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+                               break;
+
+                       case '0.1.6': // SQL queries for v0.1.6
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='2' WHERE `what`='nickname' LIMIT 1");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Mitgliedsmen&uuml; komplett umgebaut.");
+                               break;
+
+                       case '0.1.7': // SQL queries for v0.1.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Mitglieder ohne Nickname sollten kein <strong>*failed*</strong> mehr sehen.");
+                               break;
+
+                       case '0.1.8': // SQL queries for v0.1.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+                               break;
+
+                       case '0.1.9': // SQL queries for v0.1.9
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_nickname','Nickname-Historie','Listet alle verwendeten Nicknames der Mitglieder auf.', 12)");
+                               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_nickname_history`");
+                               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_nickname_history` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 nickname VARCHAR(255) NOT NULL DEFAULT '',
@@ -190,20 +190,20 @@ INDEX (last_used DESC),
 PRIMARY KEY(id)
 ) TYPE={!_TABLE_TYPE!} COMMENT='History of used nicknames'");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Historie eingegebener Nicknames hinzugef&uuml;gt. Mitglied kann auf bereits verwendeter zur&uuml;ckgreifen und Liste selbst l&ouml;schen.");
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Historie eingegebener Nicknames hinzugef&uuml;gt. Mitglied kann auf bereits verwendeter zur&uuml;ckgreifen und Liste selbst l&ouml;schen.");
+                               break;
+               }
                break;
-       }
-       break;
 
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 //
index ef07a9cefdf679cdee4c50a1022ce35a97c1f49e..de64a56dc30ac16bcaabad086ead2accd13eba2f 100644 (file)
@@ -50,10 +50,10 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5'));
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_online`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_online` (
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_online`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_online` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 sid VARCHAR(32) NOT NULL DEFAULT '',
 ip VARCHAR(15) NOT NULL DEFAULT '',
@@ -70,72 +70,72 @@ KEY(userid),
 KEY(refid),
 KEY `admin_member` (`is_admin`,`is_member`)
 ) TYPE={!_TABLE_TYPE!}");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','usr_online','Online-Statistik','Eine Liste von derzeit &quot;Online&quot; Usern. Doppelte Eintr&auml;ge k&ouml;nnte auf mangelnden Cookie-Support des Browsers oder auf einen Spider hindeuten.', 1)");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_online`");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='usr_online'");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='online'");
-
-       // Unregister filter
-       UNREGISTER_FILTER('init', 'UPDATE_ONLINE_LIST', true, $dry_run);
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='online' LIMIT 1");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='online' LIMIT 1");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler <u>Unknown column 'visibled' in 'field list'</u> behoben.");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','usr_online','Online-Statistik','Eine Liste von derzeit &quot;Online&quot; Usern. Doppelte Eintr&auml;ge k&ouml;nnte auf mangelnden Cookie-Support des Browsers oder auf einen Spider hindeuten.', 1)");
                break;
 
-       case '0.0.2': // SQL queries for v0.0.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
-               break;
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_online`");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='usr_online'");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='online'");
 
-       case '0.0.3': // SQL queries for v0.0.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+               // Unregister filter
+               UNREGISTER_FILTER('init', 'UPDATE_ONLINE_LIST', true, $dry_run);
                break;
 
-       case '0.0.4': // SQL queries for v0.0.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Erstellung der Datenbanktabelle `{!_MYSQL_PREFIX!}_online` in diese Erweiterung ausgelagert.");
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='online' LIMIT 1");
                break;
 
-       case '0.0.5': // SQL queries for v0.0.5
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('online',NULL,'Jetzt Online','2','Y','N')");
-
-               // Register filter
-               REGISTER_FILTER('init', 'UPDATE_ONLINE_LIST', false, true, $dry_run);
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='online' LIMIT 1");
+               break;
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Hinzuf&uuml;gen des Men&uuml;punktes &quot;Jetzt Online&quot; wird nun von dieser Erweiterung erledigt. Filter hinzugef&uuml;gt.");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler <u>Unknown column 'visibled' in 'field list'</u> behoben.");
+                               break;
+
+                       case '0.0.2': // SQL queries for v0.0.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+                               break;
+
+                       case '0.0.3': // SQL queries for v0.0.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+                               break;
+
+                       case '0.0.4': // SQL queries for v0.0.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Erstellung der Datenbanktabelle `{!_MYSQL_PREFIX!}_online` in diese Erweiterung ausgelagert.");
+                               break;
+
+                       case '0.0.5': // SQL queries for v0.0.5
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('online',NULL,'Jetzt Online','2','Y','N')");
+
+                               // Register filter
+                               REGISTER_FILTER('init', 'UPDATE_ONLINE_LIST', false, true, $dry_run);
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Hinzuf&uuml;gen des Men&uuml;punktes &quot;Jetzt Online&quot; wird nun von dieser Erweiterung erledigt. Filter hinzugef&uuml;gt.");
+                               break;
+               }
                break;
-       }
-       break;
 
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 //
index 6dc8c6eed06c7dbc6b14e591dee8864a89d95f95..908f2dde826abd7f21f19ba8bd740c6a07c9938b 100644 (file)
@@ -50,75 +50,75 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_optimize_gain`(
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_optimize_gain`(
   id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
   gain decimal(10,3) NOT NULL DEFAULT '0.000',
   PRIMARY KEY(id)
 ) TYPE={!_TABLE_TYPE!}");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','optimize','DB optimieren','F&uuml;hren Sie dies ab und an aus, damit &uuml;berfl&uuml;ssige Daten aus der Datenbank entfernt werden.','5')");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_optimize_gain`");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='optimize'");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','optimize','DB optimieren','F&uuml;hren Sie dies ab und an aus, damit &uuml;berfl&uuml;ssige Daten aus der Datenbank entfernt werden.','5')");
                break;
 
-       case '0.0.2': // SQL queries for v0.0.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_optimize_gain`");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='optimize'");
                break;
 
-       case '0.0.3': // SQL queries for v0.0.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.0.4': // SQL queries for v0.0.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.0.5': // SQL queries for v0.0.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.0.2': // SQL queries for v0.0.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.0.3': // SQL queries for v0.0.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
+                               break;
+
+                       case '0.0.4': // SQL queries for v0.0.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+                               break;
+
+                       case '0.0.5': // SQL queries for v0.0.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.0.6': // SQL queries for v0.0.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates.");
+                               break;
+               }
                break;
 
-       case '0.0.6': // SQL queries for v0.0.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates.");
-               break;
-       }
-       break;
-
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 // Keep this extension always active!
index 044217af8bf45bea45bef16017870e9bd8868337..38eae38ced910f7c80c928f0c0300658a16f7dd6 100644 (file)
@@ -50,118 +50,118 @@ EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_order'");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='order' LIMIT 1");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='Y' WHERE `module`='order' LIMIT 1");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='order' LIMIT 1");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `visible`='N', `locked`='Y' WHERE `module`='order' LIMIT 1");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.1.0': // SQL queries for v0.1
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD order_max_full ENUM('ORDER','MAX') NOT NULL DEFAULT 'MAX'");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('setup','config_order','Mailbuchungsseite','7','Einstellungen am Mailbuchungsformular.')");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Maximale Mailbuchungen sind nun vom maximalen Empfang abh&auml;gig.");
-               break;
-
-       case '0.1.1': // SQL queries for v0.1.1
-               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_order' LIMIT 1");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('setup','config_order','Mailbuchungsseite','7','Einstellungen am Mailbuchungsformular.')");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD mail_orders BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Maximale Mailbuchung vervollst&auml;ndigt (Admin-Bereich und im Buchungsformular selber).");
-               break;
-
-       case '0.1.3': // SQL queries for v0.1.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Maximale Mailbuchungen repariert (werden nun hochgez&auml;hlt und bei t&auml;glichem Reset auf 0 gesetzt).");
-               break;
-
-       case '0.1.4': // SQL queries for v0.1.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Dummy-Datenfeld wird wieder gel&ouml;scht, um Probleme zu vermeiden. Fehlende Spalte <em>mail_order</em> korregiert auf <em>mail_orders</em>.");
-               break;
-
-       case '0.1.5': // SQL queries for v0.1.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
-               break;
-
-       case '0.1.6': // SQL queries for v0.1.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
-               break;
-
-       case '0.1.7': // SQL queries for v0.1.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
-               break;
-
-       case '0.1.8': // SQL queries for v0.1.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
-               break;
-
-       case '0.1.9': // SQL queries for v0.1.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
-               break;
-
-       case '0.2.0': // SQL queries for v0.2.0
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
-               break;
-
-       case '0.2.1': // SQL queries for v0.2.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Templates <u>member_frameset-back.tpl</u> und <u>member_frameset-send.tpl</u> nach <u>member_order_back.tpl</u> und <u>member_order_send.tpl</u> umbenannt.");
-               break;
-
-       case '0.2.2': // SQL queries for v0.2.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Es wird nun &uuml;berpr&uuml;ft ob auch gen&uuml;gend Empf&auml;nger eingegeben worden sind und ob auch gen&uuml;gend empfangsbereit sind.");
-               break;
-
-       case '0.2.3': // SQL queries for v0.2.3
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD order_min BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Minimum an Empf&auml;nger pro Mailbuchung einstellbar. Standart: 10 Empf&auml;nger");
-               break;
-
-       case '0.2.4': // SQL queries for v0.2.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Anzahl mindestens einszustellende Empf&auml;nger wird nun auch angezeigt.");
-               break;
-
-       case '0.2.5': // SQL queries for v0.2.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Speicherung der Einstellungen klappt.");
-               break;
-
-       case '0.2.6': // SQL queries for v0.2.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler in Mailbuchung behoben: Es wurde beim Ermitteln der n&ouml;tigen {!POINTS!} die maximale Anzahl von Usern in der Kategorie gew&auml;hlt und
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL('');
+               break;
+
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_order'");
+               break;
+
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='order' LIMIT 1");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='Y' WHERE `module`='order' LIMIT 1");
+               break;
+
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='order' LIMIT 1");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `visible`='N', `locked`='Y' WHERE `module`='order' LIMIT 1");
+               break;
+
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.1.0': // SQL queries for v0.1
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD order_max_full ENUM('ORDER','MAX') NOT NULL DEFAULT 'MAX'");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('setup','config_order','Mailbuchungsseite','7','Einstellungen am Mailbuchungsformular.')");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Maximale Mailbuchungen sind nun vom maximalen Empfang abh&auml;gig.");
+                               break;
+
+                       case '0.1.1': // SQL queries for v0.1.1
+                               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_order' LIMIT 1");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('setup','config_order','Mailbuchungsseite','7','Einstellungen am Mailbuchungsformular.')");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD mail_orders BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Maximale Mailbuchung vervollst&auml;ndigt (Admin-Bereich und im Buchungsformular selber).");
+                               break;
+
+                       case '0.1.3': // SQL queries for v0.1.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Maximale Mailbuchungen repariert (werden nun hochgez&auml;hlt und bei t&auml;glichem Reset auf 0 gesetzt).");
+                               break;
+
+                       case '0.1.4': // SQL queries for v0.1.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Dummy-Datenfeld wird wieder gel&ouml;scht, um Probleme zu vermeiden. Fehlende Spalte <em>mail_order</em> korregiert auf <em>mail_orders</em>.");
+                               break;
+
+                       case '0.1.5': // SQL queries for v0.1.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.1.6': // SQL queries for v0.1.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.1.7': // SQL queries for v0.1.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.1.8': // SQL queries for v0.1.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
+                               break;
+
+                       case '0.1.9': // SQL queries for v0.1.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+                               break;
+
+                       case '0.2.0': // SQL queries for v0.2.0
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+                               break;
+
+                       case '0.2.1': // SQL queries for v0.2.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Templates <u>member_frameset-back.tpl</u> und <u>member_frameset-send.tpl</u> nach <u>member_order_back.tpl</u> und <u>member_order_send.tpl</u> umbenannt.");
+                               break;
+
+                       case '0.2.2': // SQL queries for v0.2.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Es wird nun &uuml;berpr&uuml;ft ob auch gen&uuml;gend Empf&auml;nger eingegeben worden sind und ob auch gen&uuml;gend empfangsbereit sind.");
+                               break;
+
+                       case '0.2.3': // SQL queries for v0.2.3
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD order_min BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Minimum an Empf&auml;nger pro Mailbuchung einstellbar. Standart: 10 Empf&auml;nger");
+                               break;
+
+                       case '0.2.4': // SQL queries for v0.2.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Anzahl mindestens einszustellende Empf&auml;nger wird nun auch angezeigt.");
+                               break;
+
+                       case '0.2.5': // SQL queries for v0.2.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Speicherung der Einstellungen klappt.");
+                               break;
+
+                       case '0.2.6': // SQL queries for v0.2.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler in Mailbuchung behoben: Es wurde beim Ermitteln der n&ouml;tigen {!POINTS!} die maximale Anzahl von Usern in der Kategorie gew&auml;hlt und
 nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der User h&auml;tte nicht gen&uuml;gend {!POINTS!} auf dem Konto. Ein Rechenbeispiel:
 <ol>
   <li>Das Mitglied w&auml;hlt eine Kategorie XYZ mit maximal 15 Empf&auml;ngern aus.</li>
@@ -172,137 +172,137 @@ nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der Us
   <li>Hatte es aber, wie hier im Beispiel 31 {!POINTS!}, konnte es nicht mehr buchen.</li>
   <li>Jetzt ist der Fehler endlich weg! Machen Sie dies bitte Ihren Mitgliedern bekannt.</li>
 </ol>");
-               break;
-
-       case '0.2.7': // SQL queries for v0.2.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler mit <u>__MIN_VALUE</u> behoben.");
-               break;
-
-       case '0.2.8': // SQL queries for v0.2.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Konstantenproblem beseitigt.");
-               break;
-
-       case '0.2.9': // SQL queries for v0.2.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Problem mit nicht funktionierenden Mailbuchungen beseitigt.");
-               break;
-
-       case '0.3.0': // SQL queries for v0.3.0
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Basis-Modul <strong>order.php</strong> abgesichert, wenn Erweiterung nicht aktiviert ist.");
-               break;
-
-       case '0.3.1': // SQL queries for v0.3.1
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD order_select VARCHAR(255) NOT NULL DEFAULT 'userid'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD order_mode ENUM('ASC','DESC') NOT NULL DEFAULT 'DESC'");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Beworbene URL wird nun getestet.");
-               break;
-
-       case '0.3.2': // SQL queries for v0.3.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausf&uuml;hrlich.");
-               break;
-
-       case '0.3.3': // SQL queries for v0.3.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Unter <strong>Einstellungen - Mailbuchungsseite</strong> war immer die Tabellenspalte <strong>Mitgliedsnummer</strong> ausgew&auml;hlt.");
-               break;
-
-       case '0.3.4': // SQL queries for v0.3.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Dateiamenskonflikt zwischen den Erweiterungen <strong>support</strong> und <strong>order</strong> behoben.");
-               break;
-
-       case '0.3.5': // SQL queries for v0.3.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Das Mitglied konnte geziehlt die Anzahl Mailbuchungen durch Abspeichern seines Profiles beeinflussen. Der Fehler war eine falsche Tabellenspalte. Dies war <strong>max_mails</strong>, die durch das Mitglieder ver&auml;nderbar ist und zur Festellung der Maximalen Mailbuchungen herangezogen wurde.");
-               break;
-
-       case '0.3.6': // SQL queries for v0.3.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Im Modul order (<strong>inc/modules/order.php</strong>) wurde fehlerhafterweise die Erweiterung <strong>beg</strong> getestet.");
-               break;
-
-       case '0.3.7': // SQL queries for v0.3.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("SQL-Anweisungen mit SQL_QUERY_ESC() abgesichert.");
-               break;
-
-       case '0.3.8': // SQL queries for v0.3.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Mailbuchungsseite korregiert.");
-               break;
-
-       case '0.3.9': // SQL queries for v0.3.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Erneuten Fehler in Mailbuchungsseite behoben.");
-               break;
-
-       case '0.4.0': // SQL queries for v0.4.0
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES(POINTS."-Abzug klappt wieder. Danke an Andreman!");
-               break;
-
-       case '0.4.1': // SQL queries for v0.4.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
-               break;
-
-       case '0.4.2': // SQL queries for v0.4.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
-               break;
-
-       case '0.4.3': // SQL queries for v0.4.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Neue Urlaubsschaltung mit integriert.");
-               break;
-
-       case '0.4.4': // SQL queries for v0.4.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Ein <strong>WHERE &#96;ext_active&#96;='Y'</strong> tauchte bei einigen Betreibern auf und ist mit dieser Version beseitigt.");
-               break;
-
-       case '0.4.5': // SQL queries for v0.4.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("De-/Aktivieren des mit dieser Erweiterung verkn&uuml;pften Modules eingebunden.");
-               break;
-
-       case '0.4.6': // SQL queries for v0.4.6
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('order',NULL,'Mailbuchungen',3,'Y','N')");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('order','order2','Framekiller-Mails',2,'Y','N')");
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='order', `sort`='1', `title`='Klick-Mails' WHERE `what`='order' LIMIT 1");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Mitgliedsmen&uuml; komplett umgebaut.");
-               break;
-
-       case '0.4.7': // SQL queries for v0.4.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
-               break;
-
-       case '0.4.8': // SQL queries for v0.4.8
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Mailbuchung' WHERE `what`='config_order' LIMIT 1");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Men&uuml;punkt &quot;Mailbuchungsseite&quot; nach &quot;Mailbuchung&quot; umbenannt und weitere Einstellungen aus Sonstige Einstellungen verschoben.");
-               break;
-
-       case '0.4.9': // SQL queries for v0.4.9
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD repay_deleted_mails ENUM('REPAY','JACKPOT','SHRED') NOT NULL DEFAULT 'REPAY'");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Bei L&ouml;schung von Mailbuchungen kann nun global entschieden werden (Einstellungen also), ob die verbliebenen {!POINTS!} wieder gutgeschrieben werden sollen oder in den Jackpot landen.");
-               break;
-
-       case '0.5.0': // SQL queries for v0.5.0
-               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_url_blacklist`");
-               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_url_blacklist` (
+                               break;
+
+                       case '0.2.7': // SQL queries for v0.2.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler mit <u>__MIN_VALUE</u> behoben.");
+                               break;
+
+                       case '0.2.8': // SQL queries for v0.2.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Konstantenproblem beseitigt.");
+                               break;
+
+                       case '0.2.9': // SQL queries for v0.2.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Problem mit nicht funktionierenden Mailbuchungen beseitigt.");
+                               break;
+
+                       case '0.3.0': // SQL queries for v0.3.0
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Basis-Modul <strong>order.php</strong> abgesichert, wenn Erweiterung nicht aktiviert ist.");
+                               break;
+
+                       case '0.3.1': // SQL queries for v0.3.1
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD order_select VARCHAR(255) NOT NULL DEFAULT 'userid'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD order_mode ENUM('ASC','DESC') NOT NULL DEFAULT 'DESC'");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Beworbene URL wird nun getestet.");
+                               break;
+
+                       case '0.3.2': // SQL queries for v0.3.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausf&uuml;hrlich.");
+                               break;
+
+                       case '0.3.3': // SQL queries for v0.3.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Unter <strong>Einstellungen - Mailbuchungsseite</strong> war immer die Tabellenspalte <strong>Mitgliedsnummer</strong> ausgew&auml;hlt.");
+                               break;
+
+                       case '0.3.4': // SQL queries for v0.3.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Dateiamenskonflikt zwischen den Erweiterungen <strong>support</strong> und <strong>order</strong> behoben.");
+                               break;
+
+                       case '0.3.5': // SQL queries for v0.3.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Das Mitglied konnte geziehlt die Anzahl Mailbuchungen durch Abspeichern seines Profiles beeinflussen. Der Fehler war eine falsche Tabellenspalte. Dies war <strong>max_mails</strong>, die durch das Mitglieder ver&auml;nderbar ist und zur Festellung der Maximalen Mailbuchungen herangezogen wurde.");
+                               break;
+
+                       case '0.3.6': // SQL queries for v0.3.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Im Modul order (<strong>inc/modules/order.php</strong>) wurde fehlerhafterweise die Erweiterung <strong>beg</strong> getestet.");
+                               break;
+
+                       case '0.3.7': // SQL queries for v0.3.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("SQL-Anweisungen mit SQL_QUERY_ESC() abgesichert.");
+                               break;
+
+                       case '0.3.8': // SQL queries for v0.3.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Mailbuchungsseite korregiert.");
+                               break;
+
+                       case '0.3.9': // SQL queries for v0.3.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Erneuten Fehler in Mailbuchungsseite behoben.");
+                               break;
+
+                       case '0.4.0': // SQL queries for v0.4.0
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES(POINTS."-Abzug klappt wieder. Danke an Andreman!");
+                               break;
+
+                       case '0.4.1': // SQL queries for v0.4.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+                               break;
+
+                       case '0.4.2': // SQL queries for v0.4.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
+                               break;
+
+                       case '0.4.3': // SQL queries for v0.4.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Neue Urlaubsschaltung mit integriert.");
+                               break;
+
+                       case '0.4.4': // SQL queries for v0.4.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Ein <strong>WHERE &#96;ext_active&#96;='Y'</strong> tauchte bei einigen Betreibern auf und ist mit dieser Version beseitigt.");
+                               break;
+
+                       case '0.4.5': // SQL queries for v0.4.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("De-/Aktivieren des mit dieser Erweiterung verkn&uuml;pften Modules eingebunden.");
+                               break;
+
+                       case '0.4.6': // SQL queries for v0.4.6
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('order',NULL,'Mailbuchungen',3,'Y','N')");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('order','order2','Framekiller-Mails',2,'Y','N')");
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='order', `sort`='1', `title`='Klick-Mails' WHERE `what`='order' LIMIT 1");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Mitgliedsmen&uuml; komplett umgebaut.");
+                               break;
+
+                       case '0.4.7': // SQL queries for v0.4.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+                               break;
+
+                       case '0.4.8': // SQL queries for v0.4.8
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Mailbuchung' WHERE `what`='config_order' LIMIT 1");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Men&uuml;punkt &quot;Mailbuchungsseite&quot; nach &quot;Mailbuchung&quot; umbenannt und weitere Einstellungen aus Sonstige Einstellungen verschoben.");
+                               break;
+
+                       case '0.4.9': // SQL queries for v0.4.9
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD repay_deleted_mails ENUM('REPAY','JACKPOT','SHRED') NOT NULL DEFAULT 'REPAY'");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Bei L&ouml;schung von Mailbuchungen kann nun global entschieden werden (Einstellungen also), ob die verbliebenen {!POINTS!} wieder gutgeschrieben werden sollen oder in den Jackpot landen.");
+                               break;
+
+                       case '0.5.0': // SQL queries for v0.5.0
+                               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_url_blacklist`");
+                               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_url_blacklist` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `url` VARCHAR(255) NOT NULL DEFAULT '',
 `pool_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -311,25 +311,25 @@ PRIMARY KEY (`id`),
 INDEX (`pool_id`)
 ) TYPE=MYISAM COMMENT='URL blacklist'");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Tabelle f&uuml;r URL-Sperrliste angelegt.");
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Tabelle f&uuml;r URL-Sperrliste angelegt.");
+                               break;
+               }
                break;
-       }
-       break;
-
-case 'modify': // When the extension got modified
-       break;
-
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
-
-default: // Do stuff when extension is loaded
-       // Do daily reset only when installed and extension version is at least 0.1.1
-       if ((isResetModeEnabled()) && (isInstalled()) && (isAdminRegistered()) && (GET_EXT_VERSION('order') >= '0.1.1')) {
-               // Reset mail order values
-               $result_ext = SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET mail_orders=0 WHERE mail_orders > 0", __FILE__, __LINE__);
-       } // END - if
-       break;
+
+                       case 'modify': // When the extension got modified
+                               break;
+
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
+
+                       default: // Do stuff when extension is loaded
+                               // Do daily reset only when installed and extension version is at least 0.1.1
+                               if ((isResetModeEnabled()) && (isInstalled()) && (isAdminRegistered()) && (GET_EXT_VERSION('order') >= '0.1.1')) {
+                                       // Reset mail order values
+                                       $result_ext = SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET mail_orders=0 WHERE mail_orders > 0", __FILE__, __LINE__);
+                               } // END - if
+                               break;
 }
 
 //
index 36d58b5a2fb0a8e5531344ceeb90ef2e6a253301..3a10272a82b6e242daff54527951dcfc689764d3 100644 (file)
@@ -50,79 +50,79 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_other','Sonstige Einstellungen','Sonstige Einstellungen an Ihrem Mailtausch.',13)");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_other'");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler <div class=\"admin_failed\">Warning: Missing argument 2 for create_timestamp_from_selections() in {!PATH!}inc/libs/pro_functions.php on line 227</div> behoben.");
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_other','Sonstige Einstellungen','Sonstige Einstellungen an Ihrem Mailtausch.',13)");
                break;
 
-       case '0.0.2': // SQL queries for v0.0.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Speichern der Einstellungen vereinfacht. Es wird dazu die Funktion ADMIN_SAVE_SETTINGS() verwendet.");
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_other'");
                break;
 
-       case '0.0.3': // SQL queries for v0.0.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.0.4': // SQL queries for v0.0.4
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD max_comma TINYINT(3) UNSIGNED NOT NULL DEFAULT '3'");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Angezeigte Kommastellen k&ouml;nnen zwischen 0 und 5 eingestellt werden.");
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.0.5': // SQL queries for v0.0.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
-               break;
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler <div class=\"admin_failed\">Warning: Missing argument 2 for create_timestamp_from_selections() in {!PATH!}inc/libs/pro_functions.php on line 227</div> behoben.");
+                               break;
 
-       case '0.0.6': // SQL queries for v0.0.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen endlich beseitigt.");
-               break;
+                       case '0.0.2': // SQL queries for v0.0.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Speichern der Einstellungen vereinfacht. Es wird dazu die Funktion ADMIN_SAVE_SETTINGS() verwendet.");
+                               break;
 
-       case '0.0.7': // SQL queries for v0.0.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Ausgabemodus der CSS-Dateien hinzugef&uuml;gt. Bitte auch das Admin-Template aktualisieren!");
-               break;
+                       case '0.0.3': // SQL queries for v0.0.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
 
-       case '0.0.8': // SQL queries for v0.0.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
-               break;
+                       case '0.0.4': // SQL queries for v0.0.4
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD max_comma TINYINT(3) UNSIGNED NOT NULL DEFAULT '3'");
 
-       case '0.0.9': // SQL queries for v0.0.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abspeichern der Einstellungen repariert.");
-               break;
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Angezeigte Kommastellen k&ouml;nnen zwischen 0 und 5 eingestellt werden.");
+                               break;
+
+                       case '0.0.5': // SQL queries for v0.0.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
+                               break;
+
+                       case '0.0.6': // SQL queries for v0.0.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen endlich beseitigt.");
+                               break;
+
+                       case '0.0.7': // SQL queries for v0.0.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Ausgabemodus der CSS-Dateien hinzugef&uuml;gt. Bitte auch das Admin-Template aktualisieren!");
+                               break;
+
+                       case '0.0.8': // SQL queries for v0.0.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
+                               break;
+
+                       case '0.0.9': // SQL queries for v0.0.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abspeichern der Einstellungen repariert.");
+                               break;
 
-       case '0.1.0': // SQL queries for v0.2.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Folgende Einstellungen k&ouml;nnen auf 0 gesetzt werden:
+                       case '0.1.0': // SQL queries for v0.2.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Folgende Einstellungen k&ouml;nnen auf 0 gesetzt werden:
 <ol>
 <li>Selbe beworbene URL nicht mehr bewerbar (0 = URL kann sofort wieder gebucht werden)</li>
 <li>G&uuml;tigkeitsdauer der Best&auml;tigungslinks (0 = Best&auml;tigungslinks laufen nie ab)</li>
@@ -130,83 +130,83 @@ case 'update': // Update an extension
 <li>Profilaktualisierungsinterval (0 = Es wird keine Mail zum Profilaktualisierunng durch das Mitglied ausgesendet(</li>
 <li>Erneute Aussendung der Mail (0 = Siehe oben)</li>
 </ol>");
-               break;
+                               break;
 
-       case '0.1.1': // SQL queries for v0.1.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Gast- und Mitgliedsmen&uuml;s lassen sich voneinander getrentt ein- und auschalten.");
-               break;
+                       case '0.1.1': // SQL queries for v0.1.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Gast- und Mitgliedsmen&uuml;s lassen sich voneinander getrentt ein- und auschalten.");
+                               break;
 
-       case '0.1.2': // SQL queries for v0.1.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
-               break;
+                       case '0.1.2': // SQL queries for v0.1.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+                               break;
 
-       case '0.1.3': // SQL queries for v0.1.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Wort &quot;Baustelle&quot; vom Auto-Versand entfernt, da dieser nun klappt.");
-               break;
+                       case '0.1.3': // SQL queries for v0.1.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Wort &quot;Baustelle&quot; vom Auto-Versand entfernt, da dieser nun klappt.");
+                               break;
 
-       case '0.1.4': // SQL queries for v0.1.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
-               break;
+                       case '0.1.4': // SQL queries for v0.1.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+                               break;
 
-       case '0.1.5': // SQL queries for v0.1.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
-               break;
+                       case '0.1.5': // SQL queries for v0.1.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+                               break;
 
-       case '0.1.6': // SQL queries for v0.1.6
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD reject_url VARCHAR(255) NOT NULL DEFAULT '{!URL!}'");
+                       case '0.1.6': // SQL queries for v0.1.6
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD reject_url VARCHAR(255) NOT NULL DEFAULT '{!URL!}'");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Bei Ablehnung der URL wird jetzt endlich eine Standart-URL eingesetzt, die konfigurierbar ist. Fehler beim Laden der Konfiguration gefunden.");
-               break;
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Bei Ablehnung der URL wird jetzt endlich eine Standart-URL eingesetzt, die konfigurierbar ist. Fehler beim Laden der Konfiguration gefunden.");
+                               break;
 
-       case '0.1.7': // SQL queries for v0.1.7
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD currency VARCHAR(255) NOT NULL DEFAULT '&euro;'");
+                       case '0.1.7': // SQL queries for v0.1.7
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD currency VARCHAR(255) NOT NULL DEFAULT '&euro;'");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Standart-W&auml;hrung der Geb&uuml;hren f&uuml;r alle Erweiterungen geltend hinzugef&uuml;gt.");
-               break;
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Standart-W&auml;hrung der Geb&uuml;hren f&uuml;r alle Erweiterungen geltend hinzugef&uuml;gt.");
+                               break;
 
-       case '0.1.8': // SQL queries for v0.1.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Die sonstigen Einstellungen lassen sich nun nur noch &auml;ndern, wenn die Erweiterung <strong>other</strong> auch installiert ist. Anderfalls gibt es einen SQL-Fehler beim Speichern und GROSS_GESCHRIEBENE Worte im Formular.");
-               break;
+                       case '0.1.8': // SQL queries for v0.1.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Die sonstigen Einstellungen lassen sich nun nur noch &auml;ndern, wenn die Erweiterung <strong>other</strong> auch installiert ist. Anderfalls gibt es einen SQL-Fehler beim Speichern und GROSS_GESCHRIEBENE Worte im Formular.");
+                               break;
 
-       case '0.1.9': // SQL queries for v0.1.9
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mailid_error_redirect ENUM('index','reject') NOT NULL DEFAULT 'index'");
+                       case '0.1.9': // SQL queries for v0.1.9
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mailid_error_redirect ENUM('index','reject') NOT NULL DEFAULT 'index'");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Bei fehlerhafter Mail w&auml;hrend der Best&auml;tigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden.");
-               break;
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Bei fehlerhafter Mail w&auml;hrend der Best&auml;tigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden.");
+                               break;
 
-       case '0.2.0': // SQL queries for v0.2.0
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE `mailid_error_redirect` `mailid_error_redirect` ENUM('INDEX','REJECT') NOT NULL DEFAULT 'INDEX'");
+                       case '0.2.0': // SQL queries for v0.2.0
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE `mailid_error_redirect` `mailid_error_redirect` ENUM('INDEX','REJECT') NOT NULL DEFAULT 'INDEX'");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Bei fehlerhafter Mail w&auml;hrend der Best&auml;tigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden.");
-               break;
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Bei fehlerhafter Mail w&auml;hrend der Best&auml;tigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden.");
+                               break;
 
-       case '0.2.1': // SQL queries for v0.2.1
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `min_age` TINYINT(3) UNSIGNED NOT NULL DEFAULT 16");
+                       case '0.2.1': // SQL queries for v0.2.1
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `min_age` TINYINT(3) UNSIGNED NOT NULL DEFAULT 16");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Minimumalter ist nun konfigurierbar.");
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Minimumalter ist nun konfigurierbar.");
+                               break;
+               }
                break;
-       }
-       break;
 
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 // Keep this extension always active!
index f050ce94897535c8c4430f1862d1d3aaa050f862..eb609455a1953bf94398a6bae0d6ac529191ab9b 100644 (file)
@@ -50,10 +50,10 @@ EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_payouts`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_payouts` (
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_payouts`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_payouts` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 payout_total FLOAT(22,3) UNSIGNED NOT NULL DEFAULT '0.000',
@@ -66,188 +66,188 @@ KEY(userid),
 KEY(payout_id),
 PRIMARY KEY(id)
 ) TYPE={!_TABLE_TYPE!}");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_payout_types`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_payout_types` (
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_payout_types`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_payout_types` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 type VARCHAR(255) NOT NULL DEFAULT '',
 rate FLOAT(22,3) UNSIGNED NOT NULL DEFAULT '0.000',
 min_points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 PRIMARY KEY(id)
 ) TYPE={!_TABLE_TYPE!}");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_payouts','Auszahlungen','Auszahlungsarten einstellen, neu anlegen oder l&ouml;schen.','15')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('payouts','list_payouts','Anfragen auflisten','Listet alle Auszahlungsanfragen Ihrer Mitglieder auf.','16')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','payout','Auszahlungen','N','N','11')");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_payouts`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_payout_types`");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='payouts'");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='payout'");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='payout' LIMIT 1");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='payout' LIMIT 1");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.1.2': // SQL queries for v0.1.2
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('payouts', NULL, 'Auszahlungsmanagement','Management der Auszahlungsarten.','8')");
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='payouts', `title`='Einstellungen' WHERE `action`='setup' AND `what`='config_payouts' LIMIT 1");
-               break;
-
-       case '0.1.3': // SQL queries for v0.1.3
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD from_account VARCHAR(255) NOT NULL DEFAULT ''");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD from_pass VARCHAR(255) NOT NULL DEFAULT ''");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD engine_url VARCHAR(255) NOT NULL DEFAULT ''");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD engine_ret_ok VARCHAR(255) NOT NULL DEFAULT ''");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD engine_ret_failed VARCHAR(255) NOT NULL DEFAULT ''");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD pass_enc ENUM('md5','base64','none') NOT NULL DEFAULT 'md5'");
-               break;
-
-       case '0.1.4': // SQL queries for v0.1.4
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD password VARCHAR(255) NOT NULL DEFAULT ''");
-               break;
-
-       case '0.1.5': // SQL queries for v0.1.5
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD target_url LONGTEXT NOT NULL");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD banner_url LONGTEXT NOT NULL");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD link_text VARCHAR(30) NOT NULL DEFAULT ''");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD allow_url ENUM('Y','N') NOT NULL DEFAULT 'N'");
-               break;
-
-       case '0.1.6': // SQL queries for v0.1.6
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` CHANGE pass_enc pass_enc ENUM('md5','base64','xxx') NOT NULL DEFAULT 'xxx'");
-               break;
-
-       case '0.1.8': // SQL queries for v0.1.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Auflistung der Auszahlungen ausgelagert in Template <em>member_payout.tpl</em>.");
-               break;
-
-       case '0.1.9': // SQL queries for v0.1.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
-               break;
-
-       case '0.2.0': // SQL queries for v0.2.0
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert.");
-               break;
-
-       case '0.2.1': // SQL queries for v0.2.1
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` CHANGE payout_total payout_total FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` CHANGE rate rate FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
-
-       case '0.2.2': // SQL queries for v0.2.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Buttons aus Aufgabenauflisten ausgelagert");
-               break;
-
-       case '0.2.3': // SQL queries for v0.2.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
-               break;
-
-       case '0.2.4': // SQL queries for v0.2.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Ausgabe der Auszahlungsm&ouml;glichkeiten im Mitgliedsbereich repariert.");
-               break;
-
-       case '0.2.5': // SQL queries for v0.2.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
-               break;
-
-       case '0.2.6': // SQL queries for v0.2.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt.");
-               break;
-
-       case '0.2.7': // SQL queries for v0.2.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
-               break;
-
-       case '0.2.8': // SQL queries for v0.2.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Work-Arount-L&ouml;sung zu tempor&auml;ren Problemen mit der Task-ID eingebaut.");
-               break;
-
-       case '0.2.9': // SQL queries for v0.2.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Nachricht an Admin bei Auszahlungsanfrage wird endlich versendet.");
-               break;
-
-       case '0.3.0': // SQL queries for v0.3.0
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
-               break;
-
-       case '0.3.1': // SQL queries for v0.3.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler in Auszahlungsfunktion beseitigt, wenn Umrechnungsrate ungleich 1 eingestellt ist.");
-               break;
-
-       case '0.3.2': // SQL queries for v0.3.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
-               break;
-
-       case '0.3.3': // SQL queries for v0.3.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
-               break;
-
-       case '0.3.4': // SQL queries for v0.3.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Anzahl zu &uuml;berweisende {!POINTS!} m&uuml;ssen immer gr&ouml;sser 0 sein, ansonsten bricht das Script mit einer Fehlermeldung an das Mitglied ab.");
-               break;
-
-       case '0.3.5': // SQL queries for v0.3.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Sicherheitsupdate f&uuml;r die Include-Befehle.");
-               break;
-
-       case '0.3.6': // SQL queries for v0.3.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.");
-               break;
-
-       case '0.3.7': // SQL queries for v0.3.7
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Auszahlungsmanagement' WHERE action = 'payouts' AND (`what`='' OR `what` IS NULL) LIMIT 1");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Verwaltung nach Management umgestellt.");
-               break;
-
-       case '0.3.8': // SQL queries for v0.3.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
-               break;
-       }
-       break;
-
-case 'modify': // When the extension got modified
-       break;
-
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
-
-default: // Do stuff when extension is loaded
-       break;
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_payouts','Auszahlungen','Auszahlungsarten einstellen, neu anlegen oder l&ouml;schen.','15')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('payouts','list_payouts','Anfragen auflisten','Listet alle Auszahlungsanfragen Ihrer Mitglieder auf.','16')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','payout','Auszahlungen','N','N','11')");
+               break;
+
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_payouts`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_payout_types`");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='payouts'");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='payout'");
+               break;
+
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='payout' LIMIT 1");
+               break;
+
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='payout' LIMIT 1");
+               break;
+
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.1.2': // SQL queries for v0.1.2
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('payouts', NULL, 'Auszahlungsmanagement','Management der Auszahlungsarten.','8')");
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='payouts', `title`='Einstellungen' WHERE `action`='setup' AND `what`='config_payouts' LIMIT 1");
+                               break;
+
+                       case '0.1.3': // SQL queries for v0.1.3
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD from_account VARCHAR(255) NOT NULL DEFAULT ''");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD from_pass VARCHAR(255) NOT NULL DEFAULT ''");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD engine_url VARCHAR(255) NOT NULL DEFAULT ''");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD engine_ret_ok VARCHAR(255) NOT NULL DEFAULT ''");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD engine_ret_failed VARCHAR(255) NOT NULL DEFAULT ''");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD pass_enc ENUM('md5','base64','none') NOT NULL DEFAULT 'md5'");
+                               break;
+
+                       case '0.1.4': // SQL queries for v0.1.4
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD password VARCHAR(255) NOT NULL DEFAULT ''");
+                               break;
+
+                       case '0.1.5': // SQL queries for v0.1.5
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD target_url LONGTEXT NOT NULL");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD banner_url LONGTEXT NOT NULL");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD link_text VARCHAR(30) NOT NULL DEFAULT ''");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD allow_url ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               break;
+
+                       case '0.1.6': // SQL queries for v0.1.6
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` CHANGE pass_enc pass_enc ENUM('md5','base64','xxx') NOT NULL DEFAULT 'xxx'");
+                               break;
+
+                       case '0.1.8': // SQL queries for v0.1.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Auflistung der Auszahlungen ausgelagert in Template <em>member_payout.tpl</em>.");
+                               break;
+
+                       case '0.1.9': // SQL queries for v0.1.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.2.0': // SQL queries for v0.2.0
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert.");
+                               break;
+
+                       case '0.2.1': // SQL queries for v0.2.1
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` CHANGE payout_total payout_total FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` CHANGE rate rate FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
+
+                       case '0.2.2': // SQL queries for v0.2.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Buttons aus Aufgabenauflisten ausgelagert");
+                               break;
+
+                       case '0.2.3': // SQL queries for v0.2.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+                               break;
+
+                       case '0.2.4': // SQL queries for v0.2.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Ausgabe der Auszahlungsm&ouml;glichkeiten im Mitgliedsbereich repariert.");
+                               break;
+
+                       case '0.2.5': // SQL queries for v0.2.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+                               break;
+
+                       case '0.2.6': // SQL queries for v0.2.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt.");
+                               break;
+
+                       case '0.2.7': // SQL queries for v0.2.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
+                               break;
+
+                       case '0.2.8': // SQL queries for v0.2.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Work-Arount-L&ouml;sung zu tempor&auml;ren Problemen mit der Task-ID eingebaut.");
+                               break;
+
+                       case '0.2.9': // SQL queries for v0.2.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Nachricht an Admin bei Auszahlungsanfrage wird endlich versendet.");
+                               break;
+
+                       case '0.3.0': // SQL queries for v0.3.0
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+                               break;
+
+                       case '0.3.1': // SQL queries for v0.3.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler in Auszahlungsfunktion beseitigt, wenn Umrechnungsrate ungleich 1 eingestellt ist.");
+                               break;
+
+                       case '0.3.2': // SQL queries for v0.3.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+                               break;
+
+                       case '0.3.3': // SQL queries for v0.3.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
+                               break;
+
+                       case '0.3.4': // SQL queries for v0.3.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Anzahl zu &uuml;berweisende {!POINTS!} m&uuml;ssen immer gr&ouml;sser 0 sein, ansonsten bricht das Script mit einer Fehlermeldung an das Mitglied ab.");
+                               break;
+
+                       case '0.3.5': // SQL queries for v0.3.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Sicherheitsupdate f&uuml;r die Include-Befehle.");
+                               break;
+
+                       case '0.3.6': // SQL queries for v0.3.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.");
+                               break;
+
+                       case '0.3.7': // SQL queries for v0.3.7
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Auszahlungsmanagement' WHERE action = 'payouts' AND (`what`='' OR `what` IS NULL) LIMIT 1");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Verwaltung nach Management umgestellt.");
+                               break;
+
+                       case '0.3.8': // SQL queries for v0.3.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+                               break;
+               }
+               break;
+
+                       case 'modify': // When the extension got modified
+                               break;
+
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
+
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 //
index 62dcb87e60805d7c4df586b401d4dc4e5b1d2412..eeb837bc2a8ff1a4d94ea290bed1575e6d42de80 100644 (file)
@@ -45,10 +45,10 @@ EXT_SET_VER_HISTORY(array('0.0'));
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_primera`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_primera` (
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_primera`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_primera` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 primera_account VARCHAR(255) NOT NULL DEFAULT '',
@@ -61,60 +61,60 @@ KEY(userid),
 PRIMARY KEY(id)
 ) TYPE={!_TABLE_TYPE!}");
 
-       // Confiuration
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT 40000");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT 5000");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_api_name VARCHAR(255) NOT NULL DEFAULT ''");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_api_md5 VARCHAR(32) NOT NULL DEFAULT ''");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_refid VARCHAR(255) NOT NULL DEFAULT ''");
-
-       // User data
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD primera_userid VARCHAR(255) NOT NULL DEFAULT ''");
-
-       // Admin menu
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('primera', NULL, 'Primera-Management','Konfiguration zur Primera-API einstellen, Auszahlungen auflisten usw..', 15)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('primera','config_primera','Primera-API-Einstellungen','Konfiguration zur Primera-API einstellen.', 1)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('primera','list_primera','Primera-Anfragen auflisten','Listet alle Primera-Auszahlungsanfragen Ihrer Mitglieder auf.', 2)");
-
-       // Member menu
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','primera','Primera-Ein-/Auszahlungen','N','N','11')");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_primera`");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='primera'");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='primera'");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='primera' LIMIT 1");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='primera' LIMIT 1");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("");
+               // Confiuration
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT 40000");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT 5000");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_api_name VARCHAR(255) NOT NULL DEFAULT ''");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_api_md5 VARCHAR(32) NOT NULL DEFAULT ''");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_refid VARCHAR(255) NOT NULL DEFAULT ''");
+
+               // User data
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD primera_userid VARCHAR(255) NOT NULL DEFAULT ''");
+
+               // Admin menu
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('primera', NULL, 'Primera-Management','Konfiguration zur Primera-API einstellen, Auszahlungen auflisten usw..', 15)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('primera','config_primera','Primera-API-Einstellungen','Konfiguration zur Primera-API einstellen.', 1)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('primera','list_primera','Primera-Anfragen auflisten','Listet alle Primera-Auszahlungsanfragen Ihrer Mitglieder auf.', 2)");
+
+               // Member menu
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','primera','Primera-Ein-/Auszahlungen','N','N','11')");
+               break;
+
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_primera`");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='primera'");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='primera'");
+               break;
+
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='primera' LIMIT 1");
+               break;
+
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='primera' LIMIT 1");
+               break;
+
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES('');
+                               break;
+               }
                break;
-       }
-       break;
 
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 //
index e50fc40fc94830b4f0144f55cdffc6a6115b427d..3a6a27d81eaa63439f90df30b24ea5c63784baaf 100644 (file)
@@ -50,89 +50,89 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Benachrichtungsmails werden nur beim t&auml;gichen Reset ausgesendet");
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.0.2': // SQL queries for v0.0.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.0.3': // SQL queries for v0.0.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert");
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.0.4': // SQL queries for v0.0.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Dummy-Release im Intranet??? Hmmm...");
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.0.5': // SQL queries for v0.0.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Profilaktualisierungsmails werden nur dann ausgesendet, wenn <u>profile_update</u> und <u>prof_reupdate</u> &gt; 0 sind.");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Benachrichtungsmails werden nur beim t&auml;gichen Reset ausgesendet");
+                               break;
+
+                       case '0.0.2': // SQL queries for v0.0.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.0.3': // SQL queries for v0.0.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert");
+                               break;
+
+                       case '0.0.4': // SQL queries for v0.0.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Dummy-Release im Intranet??? Hmmm...");
+                               break;
+
+                       case '0.0.5': // SQL queries for v0.0.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Profilaktualisierungsmails werden nur dann ausgesendet, wenn <u>profile_update</u> und <u>prof_reupdate</u> &gt; 0 sind.");
+                               break;
+
+                       case '0.0.6': // SQL queries for v0.0.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausf&uuml;hrlich.");
+                               break;
+
+                       case '0.0.7': // SQL queries for v0.0.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+                               break;
+
+                       case '0.0.8': // SQL queries for v0.0.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Namenskonflikt gel&ouml;sst mit Erweiterung <strong>update</strong> (kommt noch raus!)");
+                               break;
+
+                       case '0.0.9': // SQL queries for v0.0.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+                               break;
+               }
                break;
 
-       case '0.0.6': // SQL queries for v0.0.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausf&uuml;hrlich.");
-               break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-       case '0.0.7': // SQL queries for v0.0.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
-               break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-       case '0.0.8': // SQL queries for v0.0.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Namenskonflikt gel&ouml;sst mit Erweiterung <strong>update</strong> (kommt noch raus!)");
-               break;
-
-       case '0.0.9': // SQL queries for v0.0.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
-               break;
-       }
-       break;
-
-case 'modify': // When the extension got modified
-       break;
-
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
-
-default: // Do stuff when extension is loaded
-       // Do we have a daily-reset-run?
-       if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) {
-               // So let's check for profiles which needs an update
-               ADD_INC_TO_POOL(sprintf("%sinc/profile-updte.php", constant('PATH')));
-       }
-       break;
+                       default: // Do stuff when extension is loaded
+                               // Do we have a daily-reset-run?
+                               if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) {
+                                       // So let's check for profiles which needs an update
+                                       ADD_INC_TO_POOL(sprintf("%sinc/profile-updte.php", constant('PATH')));
+                               }
+                               break;
 }
 
 //
index 90b7f0d1ecdef69989835b0259ac76596cc8ae84..ad8df4d644a5d02ca2e9253f98082173639d7a7d 100644 (file)
@@ -50,12 +50,12 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_data`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_prices`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_users`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_rallye_data` (
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_data`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_prices`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_users`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_rallye_data` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 admin_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 title VARCHAR(255) NOT NULL DEFAULT '',
@@ -70,7 +70,7 @@ notified ENUM('Y','N') NOT NULL DEFAULT 'N',
 KEY (admin_id),
 PRIMARY KEY (id)
 ) TYPE={!_TABLE_TYPE!}");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_rallye_prices` (
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_rallye_prices` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 rallye_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 price_level BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -79,7 +79,7 @@ info LONGTEXT NOT NULL,
 KEY (rallye_id),
 PRIMARY KEY(id)
 ) TYPE={!_TABLE_TYPE!}");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_rallye_users` (
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_rallye_users` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 rallye_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -89,141 +89,141 @@ KEY (userid),
 PRIMARY KEY(id)
 ) TYPE={!_TABLE_TYPE!}");
 
-       // Admin menu
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye', NULL, 'Rallye-Management','Richten Sie neue Ref-Rallyes ein, die zeitgesteuert anfangen und aufh&ouml;hren. Dabei wird alles weitere automatisch geregelt.','9')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','add_rallye','Neue Rallye hinzuf&uuml;gen','Neue Ref-Rallye hinzuf&uuml;gen.','1')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','config_rallye_prices','Preise einrichten','Richten Sie Preise zu den Rallyes ein.','2')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','list_rallyes','Rallyes verwalten','Alle bestehenden Ref-Rallyes auflisten, bearbeiten, stoppen, l&ouml;schen usw.','3')");
-
-       // Guest menu
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','rallyes','Ref-Rallyes','Y','Y','9')");
-
-       // Member menu
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','rallyes','Ref-Rallyes','Y','Y','9')");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // Drop tables
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_data`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_prices`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_users`");
-
-       // Remove menus
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='rallye'");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='rallyes'");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='rallyes'");
-
-       // Unregister filter
-       UNREGISTER_FILTER('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', true, $dry_run);
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='rallyes' LIMIT 1");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='rallyes' LIMIT 1");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='rallyes' LIMIT 1");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='rallyes' LIMIT 1");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_data` ADD expired ENUM('Y','N') NOT NULL DEFAULT 'N'");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Ablaufen der Rallyes intergriert.");
-               break;
-
-       case '0.0.2': // SQL queries for v0.0.2
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_users` ADD curr_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Aktueller {!POINTS!}-Stand wird beachtet.");
-               break;
-
-       case '0.0.6': // SQL queries for v0.0.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler <em>Unknown column 'd.useid' in 'on clause'</em> behoben.");
-               break;
-
-       case '0.0.7': // SQL queries for v0.0.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
-               break;
+               // Admin menu
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye', NULL, 'Rallye-Management','Richten Sie neue Ref-Rallyes ein, die zeitgesteuert anfangen und aufh&ouml;hren. Dabei wird alles weitere automatisch geregelt.','9')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','add_rallye','Neue Rallye hinzuf&uuml;gen','Neue Ref-Rallye hinzuf&uuml;gen.','1')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','config_rallye_prices','Preise einrichten','Richten Sie Preise zu den Rallyes ein.','2')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','list_rallyes','Rallyes verwalten','Alle bestehenden Ref-Rallyes auflisten, bearbeiten, stoppen, l&ouml;schen usw.','3')");
 
-       case '0.0.8': // SQL queries for v0.0.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler <u>Template nicht gefunden</u> behoben und Admin-Formulare ausgelagert");
-               break;
-
-       case '0.0.9': // SQL queries for v0.0.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist. Und der vorherige Fehler <u>Template nicht gefunden</u> ist endlich beseitigt.");
-               break;
-
-       case '0.1.0': // SQL queries for v0.2.1
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_users` CHANGE curr_points curr_points FLOAT(23,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+               // Guest menu
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','rallyes','Ref-Rallyes','Y','Y','9')");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert.");
+               // Member menu
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','rallyes','Ref-Rallyes','Y','Y','9')");
                break;
 
-       case '0.1.1': // SQL queries for v0.1.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
-               break;
+       case 'remove': // Do stuff when removing extension
+               // Drop tables
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_data`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_prices`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_users`");
 
-       case '0.1.2': // SQL queries for v0.1.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
-               break;
+               // Remove menus
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='rallye'");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='rallyes'");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='rallyes'");
 
-       case '0.1.3': // SQL queries for v0.1.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Anzeigefehler im Gast-/Mitgliedsbereich behoben.");
+               // Unregister filter
+               UNREGISTER_FILTER('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', true, $dry_run);
+               break;
+
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='rallyes' LIMIT 1");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='rallyes' LIMIT 1");
                break;
 
-       case '0.1.4': // SQL queries for v0.1.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Admin-Mails korregiert.");
-               break;
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='rallyes' LIMIT 1");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='rallyes' LIMIT 1");
+               break;
+
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_data` ADD expired ENUM('Y','N') NOT NULL DEFAULT 'N'");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Ablaufen der Rallyes intergriert.");
+                               break;
+
+                       case '0.0.2': // SQL queries for v0.0.2
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_users` ADD curr_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Aktueller {!POINTS!}-Stand wird beachtet.");
+                               break;
+
+                       case '0.0.6': // SQL queries for v0.0.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler <em>Unknown column 'd.useid' in 'on clause'</em> behoben.");
+                               break;
+
+                       case '0.0.7': // SQL queries for v0.0.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
+                               break;
+
+                       case '0.0.8': // SQL queries for v0.0.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler <u>Template nicht gefunden</u> behoben und Admin-Formulare ausgelagert");
+                               break;
+
+                       case '0.0.9': // SQL queries for v0.0.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist. Und der vorherige Fehler <u>Template nicht gefunden</u> ist endlich beseitigt.");
+                               break;
+
+                       case '0.1.0': // SQL queries for v0.2.1
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_users` CHANGE curr_points curr_points FLOAT(23,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert.");
+                               break;
+
+                       case '0.1.1': // SQL queries for v0.1.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.1.2': // SQL queries for v0.1.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
+                               break;
+
+                       case '0.1.3': // SQL queries for v0.1.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Anzeigefehler im Gast-/Mitgliedsbereich behoben.");
+                               break;
+
+                       case '0.1.4': // SQL queries for v0.1.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Admin-Mails korregiert.");
+                               break;
+
+                       case '0.1.5': // SQL queries for v0.1.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+                               break;
 
-       case '0.1.5': // SQL queries for v0.1.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
-               break;
-
-       case '0.1.6': // SQL queries for v0.1.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
-               break;
-
-       case '0.1.7': // SQL queries for v0.1.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Aktivierte bzw. abgelaufene Rallyes werden nur ausserhalb des CSS-Modus geladen (wenn also nicht css.php aufgerufen wurde)");
-               break;
-
-       case '0.1.8': // SQL queries for v0.1.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Weitere Templates vom Admin-Bereich ausgelagert und Referal-Anazahl in der Mail zur Rallye-Ank&uuml;ndigung repariert.");
-               break;
-
-       case '0.1.9': // SQL queries for v0.1.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Funktion <u>generateUserProfileLink()</u> mit Verlinkung auf Referal-Liste implementiert.");
-               break;
-
-       case '0.2.0': // SQL queries for v0.2.0
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_data` ADD min_users BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_data` ADD min_prices BIGINT(20) UNSIGNED NOT NULL DEFAULT '3'");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Ablaufen der Rallyes intergriert. Bauen Sie in Ihr Template <strong>templates/de/emails/member/member_rallye_notify.tpl</strong> folgende zwei Zeilen ein:<br />
+                       case '0.1.6': // SQL queries for v0.1.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+                               break;
+
+                       case '0.1.7': // SQL queries for v0.1.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Aktivierte bzw. abgelaufene Rallyes werden nur ausserhalb des CSS-Modus geladen (wenn also nicht css.php aufgerufen wurde)");
+                               break;
+
+                       case '0.1.8': // SQL queries for v0.1.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Weitere Templates vom Admin-Bereich ausgelagert und Referal-Anazahl in der Mail zur Rallye-Ank&uuml;ndigung repariert.");
+                               break;
+
+                       case '0.1.9': // SQL queries for v0.1.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Funktion <u>generateUserProfileLink()</u> mit Verlinkung auf Referal-Liste implementiert.");
+                               break;
+
+                       case '0.2.0': // SQL queries for v0.2.0
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_data` ADD min_users BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_data` ADD min_prices BIGINT(20) UNSIGNED NOT NULL DEFAULT '3'");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Ablaufen der Rallyes intergriert. Bauen Sie in Ihr Template <strong>templates/de/emails/member/member_rallye_notify.tpl</strong> folgende zwei Zeilen ein:<br />
 <ul>
   <li>&#36;DATA&#91;min_users&#93;</li>
   <li>&#36;DATA&#91;min_prices&#93;</li>
@@ -233,141 +233,141 @@ Zudem sollten Sie mindestens folgende Templates (in <strong>templates/".getLangu
   <li><strong>guest_rallye_footer.tpl</strong></li>
   <li><strong>guest_rallye_header.tpl</strong></li>
 </ul>");
-               break;
-
-       case '0.2.1': // SQL queries for v0.2.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
-               break;
-
-       case '0.2.2': // SQL queries for v0.2.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Links wegen <strong>what=admins_contct</strong> ge&auml;ndert.");
-               break;
-
-       case '0.2.3': // SQL queries for v0.2.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
-               break;
-
-       case '0.2.4': // SQL queries for v0.2.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
-               break;
-
-       case '0.2.5': // SQL queries for v0.2.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Men&uuml;punkt &quot;Rallyes verwalten&quot; repariert.");
-               break;
-
-       case '0.2.6': // SQL queries for v0.2.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Automatisches Starten von Referal-Rallyes repariert.");
-               break;
-
-       case '0.2.7': // SQL queries for v0.2.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fatalen Fehler beseitigt.");
-               break;
-
-       case '0.2.8': // SQL queries for v0.2.8
-               // Update notes (these will be set as task text!)
-
-               EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
-               break;
-
-       case '0.2.9': // SQL queries for v0.2.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Sicherheitsupdate f&uuml;r die Include-Befehle.");
-               break;
-
-       case '0.3.0': // SQL queries for v0.3.0
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt.");
-               break;
-
-       case '0.3.1': // SQL queries for v0.3.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Erweiterung f&uuml;r automatisch generierte Admin-Kontaktlinks ge&auml;ndert.");
-               break;
-
-       case '0.3.2': // SQL queries for v0.3.2
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='rals', `sort`='1', `title`='Referal-Rallye' WHERE `what`='rallyes' LIMIT 1");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Mitgliedsmen&uuml; komplett umgebaut.");
-               break;
-
-       case '0.3.3': // SQL queries for v0.3.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Rallyes werden nun nur dann automatisch beseitigt, wenn die Erweiterung <strong>autopurge</strong> installiert und aktiviert ist.");
-               break;
-
-       case '0.3.4': // SQL queries for v0.3.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
-               break;
-
-       case '0.3.5': // SQL queries for 0.3.5
-               // This update depends on sql_patches
-               EXT_ADD_UPDATE_DEPENDS('sql_patches');
-
-               // Register filter
-               REGISTER_FILTER('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', false, true, $dry_run);
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Filter hinzugef&uuml;gt und ist von <strong>sql_patches</strong> abh&auml;ngig.");
-               break;
-       }
-       break;
-
-case 'modify': // When the extension got modified
-       break;
-
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
-
-default: // Do stuff when extension is loaded
-       // Do stuff only when not in CSS mode
-       if (($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != '-1') && ($GLOBALS['cache_mode'] != 'init')) {
-               // Get total member count
-               $total = GET_TOTAL_DATA('CONFIRMED', 'user_data', 'userid', 'status', true);
-
-               // Add more data on higher versions
-               $ADD1 = ''; $ADD2 = ''; $OR = '';
-               if (GET_EXT_VERSION('rallye') >= '0.2.0') {
-                       $ADD1 = ", min_users, min_prices";
-                       $ADD2 = ", d.min_users, d.min_prices";
-                       $OR   = " OR (d.min_users <= ".$total." AND d.min_users > 0)";
-               } // END  - if
-
-               // Check for new started but not notified rallyes
-               $result = SQL_QUERY("SELECT SQL_SMALL_RESULT id, title, start_time, end_time, send_notify".$ADD1."
+                               break;
+
+                       case '0.2.1': // SQL queries for v0.2.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+                               break;
+
+                       case '0.2.2': // SQL queries for v0.2.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Links wegen <strong>what=admins_contct</strong> ge&auml;ndert.");
+                               break;
+
+                       case '0.2.3': // SQL queries for v0.2.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+                               break;
+
+                       case '0.2.4': // SQL queries for v0.2.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+                               break;
+
+                       case '0.2.5': // SQL queries for v0.2.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Men&uuml;punkt &quot;Rallyes verwalten&quot; repariert.");
+                               break;
+
+                       case '0.2.6': // SQL queries for v0.2.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Automatisches Starten von Referal-Rallyes repariert.");
+                               break;
+
+                       case '0.2.7': // SQL queries for v0.2.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fatalen Fehler beseitigt.");
+                               break;
+
+                       case '0.2.8': // SQL queries for v0.2.8
+                               // Update notes (these will be set as task text!)
+
+                               EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
+                               break;
+
+                       case '0.2.9': // SQL queries for v0.2.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Sicherheitsupdate f&uuml;r die Include-Befehle.");
+                               break;
+
+                       case '0.3.0': // SQL queries for v0.3.0
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt.");
+                               break;
+
+                       case '0.3.1': // SQL queries for v0.3.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Erweiterung f&uuml;r automatisch generierte Admin-Kontaktlinks ge&auml;ndert.");
+                               break;
+
+                       case '0.3.2': // SQL queries for v0.3.2
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='rals', `sort`='1', `title`='Referal-Rallye' WHERE `what`='rallyes' LIMIT 1");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Mitgliedsmen&uuml; komplett umgebaut.");
+                               break;
+
+                       case '0.3.3': // SQL queries for v0.3.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Rallyes werden nun nur dann automatisch beseitigt, wenn die Erweiterung <strong>autopurge</strong> installiert und aktiviert ist.");
+                               break;
+
+                       case '0.3.4': // SQL queries for v0.3.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+                               break;
+
+                       case '0.3.5': // SQL queries for 0.3.5
+                               // This update depends on sql_patches
+                               EXT_ADD_UPDATE_DEPENDS('sql_patches');
+
+                               // Register filter
+                               REGISTER_FILTER('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', false, true, $dry_run);
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Filter hinzugef&uuml;gt und ist von <strong>sql_patches</strong> abh&auml;ngig.");
+                               break;
+               }
+               break;
+
+                       case 'modify': // When the extension got modified
+                               break;
+
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
+
+                       default: // Do stuff when extension is loaded
+                               // Do stuff only when not in CSS mode
+                               if (($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != '-1') && ($GLOBALS['cache_mode'] != 'init')) {
+                                       // Get total member count
+                                       $total = GET_TOTAL_DATA('CONFIRMED', 'user_data', 'userid', 'status', true);
+
+                                       // Add more data on higher versions
+                                       $ADD1 = ''; $ADD2 = ''; $OR = '';
+                                       if (GET_EXT_VERSION('rallye') >= '0.2.0') {
+                                               $ADD1 = ", min_users, min_prices";
+                                               $ADD2 = ", d.min_users, d.min_prices";
+                                               $OR   = " OR (d.min_users <= ".$total." AND d.min_users > 0)";
+                                       } // END  - if
+
+                                       // Check for new started but not notified rallyes
+                                       $result = SQL_QUERY("SELECT SQL_SMALL_RESULT id, title, start_time, end_time, send_notify".$ADD1."
 FROM `{!_MYSQL_PREFIX!}_rallye_data`
 WHERE is_active='Y' AND notified='N' AND expired='N' AND start_time <= UNIX_TIMESTAMP() AND end_time > UNIX_TIMESTAMP()
 LIMIT 1", __FILE__, __LINE__);
-               if (SQL_NUMROWS($result) == 1) {
-                       // Start rallye
-                       RALLYE_AUTOSTART_RALLYES($result);
-               } // END - if
+                                       if (SQL_NUMROWS($result) == 1) {
+                                               // Start rallye
+                                               RALLYE_AUTOSTART_RALLYES($result);
+                                       } // END - if
 
-               // Free memory
-               SQL_FREERESULT($result);
+                                       // Free memory
+                                       SQL_FREERESULT($result);
 
-               // Check for expired rallyes
-               $result = SQL_QUERY("SELECT SQL_SMALL_RESULT d.id, d.title, d.start_time, d.end_time, d.send_notify".$ADD2."
+                                       // Check for expired rallyes
+                                       $result = SQL_QUERY("SELECT SQL_SMALL_RESULT d.id, d.title, d.start_time, d.end_time, d.send_notify".$ADD2."
 FROM `{!_MYSQL_PREFIX!}_rallye_data` AS d
 WHERE d.is_active='Y' AND d.notified='Y' AND d.expired='N' AND (d.end_time <= UNIX_TIMESTAMP()".$OR.")
 LIMIT 1", __FILE__, __LINE__);
-               if ((SQL_NUMROWS($result) == 1) && (EXT_IS_ACTIVE('autopurge'))) {
-                       // End rallye here...
-                       RALLYE_EXPIRE_RALLYES($result);
-               } // END - if
-
-               // Free memory
-               SQL_FREERESULT($result);
-       } // END - if
-       break;
+                                       if ((SQL_NUMROWS($result) == 1) && (EXT_IS_ACTIVE('autopurge'))) {
+                                               // End rallye here...
+                                               RALLYE_EXPIRE_RALLYES($result);
+                                       } // END - if
+
+                                       // Free memory
+                                       SQL_FREERESULT($result);
+                               } // END - if
+                               break;
 }
 
 //
index 7550159db4ca0ca6d3043c19c0a0d094cba3b298..487c83895d28c5eb8bd4d2bcc622e3f030e68b6b 100644 (file)
@@ -50,10 +50,10 @@ EXT_SET_VER_HISTORY(array('0.0','0.0.1'));
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_refs`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_refs` (
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_refs`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_refs` (
 `id` BIGINT(20) UNSIGNED NOT NULL auto_increment,
 `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `level` smallINT(6) UNSIGNED NOT NULL DEFAULT 0,
@@ -65,59 +65,59 @@ UNIQUE `user_refid` (`userid`,`level`,`refid`),
 KEY (`level`),
 KEY (`refid`)
 ) ENGINE={!_TABLE_TYPE!} COMMENT='User Referals With Refback'");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','refback','Ref-Back einstellen',4,'N','N')");
-       break;
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','refback','Ref-Back einstellen',4,'N','N')");
+               break;
 
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_refs`");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='refback'");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN('config_refback','list_refback')");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_refsystem` SET level=level-1");
-       break;
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_refs`");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='refback'");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN('config_refback','list_refback')");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_refsystem` SET level=level-1");
+               break;
 
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='refback' LIMIT 1");
-       break;
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='refback' LIMIT 1");
+               break;
 
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='refback' LIMIT 1");
-       break;
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='refback' LIMIT 1");
+               break;
 
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD refback_enabled ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD refback_min_perc TINYINT(3) NOT NULL DEFAULT 0");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD refback_max_perc TINYINT(3) NOT NULL DEFAULT 100");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_refback','Refback','&Auml;ndern Sie Einstellungen zum Refback, wie z.B. Minium- und Maximum-Prozente, was die Mitglieder einstellen d&uuml;rfen.',15)");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_refback','Refback auflisten','Refback aller Mitglieder auflisten.',15)");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD refback_enabled ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD refback_min_perc TINYINT(3) NOT NULL DEFAULT 0");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD refback_max_perc TINYINT(3) NOT NULL DEFAULT 100");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_refback','Refback','&Auml;ndern Sie Einstellungen zum Refback, wie z.B. Minium- und Maximum-Prozente, was die Mitglieder einstellen d&uuml;rfen.',15)");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_refback','Refback auflisten','Refback aller Mitglieder auflisten.',15)");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Refback-System ist nun ein-/ausschaltbar und minimale/maximale Refback-Prozente sind festlegbar.");
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Refback-System ist nun ein-/ausschaltbar und minimale/maximale Refback-Prozente sind festlegbar.");
+                               break;
+               }
                break;
-       }
-       break;
 
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       // When the refback is not installed we cannot load it's configuration... *sigh*
-       break;
+                       default: // Do stuff when extension is loaded
+                               // When the refback is not installed we cannot load it's configuration... *sigh*
+                               break;
 }
 
 // Shall we include special files?
 if ($EXT_LOAD_MODE == 'register') {
        // Execute this special file on this update
        ADD_INC_TO_POOL(sprintf("%sinc/gen_refback.php",
-               constant('PATH')
+       constant('PATH')
        ));
 } // END - if
 
index b5d4a308373696d89f58ae3f9ff9f53a4b2048f5..ac4fb0305c95242ae6966c5decd2c564a79a6c67 100644 (file)
@@ -50,284 +50,284 @@ EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_register'");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.1.0': // SQL queries for v0.1
-               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_must_register`");
-               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_must_register` (
-id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-field_name VARCHAR(255) NOT NULL DEFAULT '',
-field_required ENUM('Y','N') NOT NULL DEFAULT 'Y',
-PRIMARY KEY(id)
-) TYPE={!_TABLE_TYPE!}");
-
-               // Add all entries as required (DO NOT DELETE THEM FROM DATABASE!)
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('surname','Y')");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('family_name','Y')");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('street_nr','Y')");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('cntry','Y')");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('zip','Y')");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('city','Y')");
-
-               // Add admin menu
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_register','Pflichtfelder','Stellen Sie hier die Pflichtfelder sowohl im Anmeldeformular, als auch im Mitgliedsbereich unter <strong>Profildaten &auml;ndern</strong> ein.', 12)");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Einstellbare Pflichtfelder hinzugef&uuml;gt.");
-               break;
-
-       case '0.1.1': // SQL queries for v0.1.1
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE `ext_name`='register' AND ext_has_css='N' LIMIT 1");
-
-               // This update depends on sql_patches update!
-               EXT_ADD_UPDATE_DEPENDS('sql_patches');
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("CSS-Datei kann per Admin-Bereich ein- und ausgeschaltet werden.");
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.1.3': // SQL queries for v0.1.3
-               // This update depends on sql_patches update!
-               EXT_ADD_UPDATE_DEPENDS('sql_patches');
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Standart Referal-ID kann per Admin-Bereich eingestellt werden (war vorher nur in modules.php und index.php direkt eingebbar.)");
-               break;
-
-       case '0.1.4': // SQL queries for v0.1.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei ge&auml;ndert.");
-               break;
-
-       case '0.1.5': // SQL queries for v0.1.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Konfiguration der Pflichtangaben ausgelagert in Template");
-               break;
-
-       case '0.1.6': // SQL queries for v0.1.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
-               break;
-
-       case '0.1.7': // SQL queries for v0.1.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_register'");
                break;
 
-       case '0.1.8': // SQL queries for v0.1.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.1.9': // SQL queries for v0.1.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Pflichtfelder wieder eingebaut (waren irgentwie ausgebaut???)");
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.2.0': // SQL queries for v0.2.0
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
-               break;
-
-       case '0.2.1': // SQL queries for v0.2.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
-               break;
-
-       case '0.2.2': // SQL queries for v0.2.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("S&auml;mtliche Sperren bei eingeloggten Admin deaktiviert.");
-               break;
-
-       case '0.2.3': // SQL queries for v0.2.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Cookie <u>refid</u> aus Anmeldeformular entfernt.");
-               break;
-
-       case '0.2.4': // SQL queries for v0.2.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Design &quot;Solid-Business&quot; eingebaut.");
-               break;
-
-       case '0.2.5': // SQL queries for v0.2.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
-               break;
-
-       case '0.2.6': // SQL queries for v0.2.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt.");
-               break;
-
-       case '0.2.7': // SQL queries for v0.2.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Referal-ID wird endlich korrekt gesetzt.");
-               break;
-
-       case '0.2.8': // SQL queries for v0.2.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Parse error in <u>what-register.php</u> beseitigt.");
-               break;
-
-       case '0.2.9': // SQL queries for v0.2.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Anrede &quot;Firma&quot; hinzugef&uuml;gt.");
-               break;
-
-       case '0.3.0': // SQL queries for v0.3.0
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
-               break;
-
-       case '0.3.1': // SQL queries for v0.3.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Email-Adresse wird vor dem Speichern auf G&uml;tigkeit hin getestet.");
-               break;
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.1.0': // SQL queries for v0.1
+                               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_must_register`");
+                               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_must_register` (
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+field_name VARCHAR(255) NOT NULL DEFAULT '',
+field_required ENUM('Y','N') NOT NULL DEFAULT 'Y',
+PRIMARY KEY(id)
+) TYPE={!_TABLE_TYPE!}");
 
-       case '0.3.2': // SQL queries for v0.3.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Einbindung der Erweiterung <strong>country</strong>, die Sie sich noch optional von <a href=\"{!URL!}/modules.php?module=admin&amp;what=extensions&amp;do=search\">meiner Seite herunterladen</a> m&uuml;ssen.<br />
+                               // Add all entries as required (DO NOT DELETE THEM FROM DATABASE!)
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('surname','Y')");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('family_name','Y')");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('street_nr','Y')");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('cntry','Y')");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('zip','Y')");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('city','Y')");
+
+                               // Add admin menu
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_register','Pflichtfelder','Stellen Sie hier die Pflichtfelder sowohl im Anmeldeformular, als auch im Mitgliedsbereich unter <strong>Profildaten &auml;ndern</strong> ein.', 12)");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Einstellbare Pflichtfelder hinzugef&uuml;gt.");
+                               break;
+
+                       case '0.1.1': // SQL queries for v0.1.1
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE `ext_name`='register' AND ext_has_css='N' LIMIT 1");
+
+                               // This update depends on sql_patches update!
+                               EXT_ADD_UPDATE_DEPENDS('sql_patches');
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("CSS-Datei kann per Admin-Bereich ein- und ausgeschaltet werden.");
+                               break;
+
+                       case '0.1.3': // SQL queries for v0.1.3
+                               // This update depends on sql_patches update!
+                               EXT_ADD_UPDATE_DEPENDS('sql_patches');
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Standart Referal-ID kann per Admin-Bereich eingestellt werden (war vorher nur in modules.php und index.php direkt eingebbar.)");
+                               break;
+
+                       case '0.1.4': // SQL queries for v0.1.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei ge&auml;ndert.");
+                               break;
+
+                       case '0.1.5': // SQL queries for v0.1.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Konfiguration der Pflichtangaben ausgelagert in Template");
+                               break;
+
+                       case '0.1.6': // SQL queries for v0.1.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.1.7': // SQL queries for v0.1.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.1.8': // SQL queries for v0.1.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.1.9': // SQL queries for v0.1.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Pflichtfelder wieder eingebaut (waren irgentwie ausgebaut???)");
+                               break;
+
+                       case '0.2.0': // SQL queries for v0.2.0
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
+                               break;
+
+                       case '0.2.1': // SQL queries for v0.2.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+                               break;
+
+                       case '0.2.2': // SQL queries for v0.2.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("S&auml;mtliche Sperren bei eingeloggten Admin deaktiviert.");
+                               break;
+
+                       case '0.2.3': // SQL queries for v0.2.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Cookie <u>refid</u> aus Anmeldeformular entfernt.");
+                               break;
+
+                       case '0.2.4': // SQL queries for v0.2.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Design &quot;Solid-Business&quot; eingebaut.");
+                               break;
+
+                       case '0.2.5': // SQL queries for v0.2.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+                               break;
+
+                       case '0.2.6': // SQL queries for v0.2.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt.");
+                               break;
+
+                       case '0.2.7': // SQL queries for v0.2.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Referal-ID wird endlich korrekt gesetzt.");
+                               break;
+
+                       case '0.2.8': // SQL queries for v0.2.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Parse error in <u>what-register.php</u> beseitigt.");
+                               break;
+
+                       case '0.2.9': // SQL queries for v0.2.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Anrede &quot;Firma&quot; hinzugef&uuml;gt.");
+                               break;
+
+                       case '0.3.0': // SQL queries for v0.3.0
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+                               break;
+
+                       case '0.3.1': // SQL queries for v0.3.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Email-Adresse wird vor dem Speichern auf G&uml;tigkeit hin getestet.");
+                               break;
+
+                       case '0.3.2': // SQL queries for v0.3.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Einbindung der Erweiterung <strong>country</strong>, die Sie sich noch optional von <a href=\"{!URL!}/modules.php?module=admin&amp;what=extensions&amp;do=search\">meiner Seite herunterladen</a> m&uuml;ssen.<br />
 <br />
 <strong>Wichtig: Laden Sie noch das Template <strong>guest_register.tpl</strong> mit hoch, welches unter templates/".getLanguage()."/html/guest/ zu finden ist!</strong>");
 
-               // Depends on 'country'
-               EXT_ADD_UPDATE_DEPENDS('country');
-               break;
-
-       case '0.3.3': // SQL queries for v0.3.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Es werden dem Mitglied nur aktivierte L&auml;ndercodes zur Auswahl angeboten.");
-               break;
-
-       case '0.3.4': // SQL queries for v0.3.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Auf Grund der Integration der neue Erweiterung <strong>country</strong> in die Anmeldephase klappte die Anmeldung nicht. Die dazu n&uuml;tige Verkn&uuml;pfung ist nun eingebaut und die Anmeldung klappt wieder. Vielen Dank nochmals an den Bug-Reporter (Fehlermelder)!");
-               break;
-
-       case '0.3.5': // SQL queries for v0.3.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Design wird nach Anmeldung auch endlich im Mitgliedsmen&uuml; &uuml;bernommen.");
-               break;
-
-       case '0.3.6': // SQL queries for v0.3.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlermeldung <strong>Fatal error: Call to undefined function: get_theme() in /../../guest/what-register.php on line 190</strong> beseitigt.");
-               break;
-
-       case '0.3.7': // SQL queries for v0.3.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlermeldung <strong>Fatal error: Call to undefined function: get_curr_theme<u>e</u>() in /../../guest/what-register.php on line 190</strong> beseitigt.");
-               break;
-
-       case '0.3.8': // SQL queries for v0.3.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Weitere SQL-Befehle abgesichert.");
-               break;
-
-       case '0.3.9': // SQL queries for v0.3.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
-               break;
-
-       case '0.4.0': // SQL queries for v0.4.0
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
-               break;
-
-       case '0.4.1': // SQL queries for v0.4.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
-               break;
-
-       case '0.4.2': // SQL queries for v0.4.2
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD register_default ENUM('Y','N') NOT NULL DEFAULT 'N'");
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='config_register2' WHERE `what`='config_reg' LIMIT 1");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Bei der Anmeldung kann die Standart-Auswahl zwischen Ja/Nein umgeschaltet werden. Das &Auml;ndern des Templates <strong>templates/".getLanguage()."/html/guest/guest_register.tpl</strong> ist nicht mehr n&ouml;tig.");
-               break;
-
-       case '0.4.3': // SQL queries for v0.4.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Parser-Error in <strong>inc/modules/guest/what-register.php</strong> beseitigt.");
-               break;
-
-       case '0.4.4': // SQL queries for v0.4.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Anmeldefehler (EMail-Adresse war immer ein Ausrufezeichen) beseitigt.");
-               break;
-
-       case '0.4.5': // SQL queries for v0.4.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt.");
-               break;
-
-       case '0.4.6': // SQL queries for v0.4.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Einstellung nach {!POINTS!}-Einstellungen verlagert.");
-               break;
-
-       case '0.4.7': // SQL queries for v0.4.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("<strong>setSession()</strong> mit @-Zeichen gegen ungewollte Ausgaben abgesichert.");
-               break;
-
-       case '0.4.8': // SQL queries for v0.4.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.");
-               break;
-
-       case '0.4.9': // SQL queries for v0.4.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Problem mit nicht anzeigbaren Kategorien in der Anmeldung beseitigt.");
-               break;
-
-       case '0.5.0': // SQL queries for v0.5.0
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlermeldung <em><strong>Fatal error:</strong> Call to undefined function registerGenerateCategoryTable() in <strong>{!PATH!}/inc/modules/guest/what-register.php</strong> on line <strong>434</strong></em> beseitigt.");
-               break;
-
-       case '0.5.1': // SQL queries for v0.5.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Mail-Template <strong>register-member.tpl</strong> gefixt. Danke an <a href=\"http://forum.mxchange.org/profile-59.html\" target=\"_blank\" title=\"Mitgliedsprofil aufrufen\">wliepe</a> f&uuml;r die Fehlerfindung!");
-               break;
-
-       case '0.5.2': // SQL queries for v0.5.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
-               break;
-       }
-       break;
-
-case 'modify': // When the extension got modified
-       break;
-
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
-
-default: // Do stuff when extension is loaded
-       break;
+                               // Depends on 'country'
+                               EXT_ADD_UPDATE_DEPENDS('country');
+                               break;
+
+                       case '0.3.3': // SQL queries for v0.3.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Es werden dem Mitglied nur aktivierte L&auml;ndercodes zur Auswahl angeboten.");
+                               break;
+
+                       case '0.3.4': // SQL queries for v0.3.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Auf Grund der Integration der neue Erweiterung <strong>country</strong> in die Anmeldephase klappte die Anmeldung nicht. Die dazu n&uuml;tige Verkn&uuml;pfung ist nun eingebaut und die Anmeldung klappt wieder. Vielen Dank nochmals an den Bug-Reporter (Fehlermelder)!");
+                               break;
+
+                       case '0.3.5': // SQL queries for v0.3.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Design wird nach Anmeldung auch endlich im Mitgliedsmen&uuml; &uuml;bernommen.");
+                               break;
+
+                       case '0.3.6': // SQL queries for v0.3.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlermeldung <strong>Fatal error: Call to undefined function: get_theme() in /../../guest/what-register.php on line 190</strong> beseitigt.");
+                               break;
+
+                       case '0.3.7': // SQL queries for v0.3.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlermeldung <strong>Fatal error: Call to undefined function: get_curr_theme<u>e</u>() in /../../guest/what-register.php on line 190</strong> beseitigt.");
+                               break;
+
+                       case '0.3.8': // SQL queries for v0.3.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Weitere SQL-Befehle abgesichert.");
+                               break;
+
+                       case '0.3.9': // SQL queries for v0.3.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+                               break;
+
+                       case '0.4.0': // SQL queries for v0.4.0
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+                               break;
+
+                       case '0.4.1': // SQL queries for v0.4.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
+                               break;
+
+                       case '0.4.2': // SQL queries for v0.4.2
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD register_default ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='config_register2' WHERE `what`='config_reg' LIMIT 1");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Bei der Anmeldung kann die Standart-Auswahl zwischen Ja/Nein umgeschaltet werden. Das &Auml;ndern des Templates <strong>templates/".getLanguage()."/html/guest/guest_register.tpl</strong> ist nicht mehr n&ouml;tig.");
+                               break;
+
+                       case '0.4.3': // SQL queries for v0.4.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Parser-Error in <strong>inc/modules/guest/what-register.php</strong> beseitigt.");
+                               break;
+
+                       case '0.4.4': // SQL queries for v0.4.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Anmeldefehler (EMail-Adresse war immer ein Ausrufezeichen) beseitigt.");
+                               break;
+
+                       case '0.4.5': // SQL queries for v0.4.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt.");
+                               break;
+
+                       case '0.4.6': // SQL queries for v0.4.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Einstellung nach {!POINTS!}-Einstellungen verlagert.");
+                               break;
+
+                       case '0.4.7': // SQL queries for v0.4.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("<strong>setSession()</strong> mit @-Zeichen gegen ungewollte Ausgaben abgesichert.");
+                               break;
+
+                       case '0.4.8': // SQL queries for v0.4.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.");
+                               break;
+
+                       case '0.4.9': // SQL queries for v0.4.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Problem mit nicht anzeigbaren Kategorien in der Anmeldung beseitigt.");
+                               break;
+
+                       case '0.5.0': // SQL queries for v0.5.0
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlermeldung <em><strong>Fatal error:</strong> Call to undefined function registerGenerateCategoryTable() in <strong>{!PATH!}/inc/modules/guest/what-register.php</strong> on line <strong>434</strong></em> beseitigt.");
+                               break;
+
+                       case '0.5.1': // SQL queries for v0.5.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Mail-Template <strong>register-member.tpl</strong> gefixt. Danke an <a href=\"http://forum.mxchange.org/profile-59.html\" target=\"_blank\" title=\"Mitgliedsprofil aufrufen\">wliepe</a> f&uuml;r die Fehlerfindung!");
+                               break;
+
+                       case '0.5.2': // SQL queries for v0.5.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+                               break;
+               }
+               break;
+
+                       case 'modify': // When the extension got modified
+                               break;
+
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
+
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 //
index 885139b7d4bee6a3b27be6192991338c533306af..0c3b40c1651bf2a29bdc9b03b09043f77b7f9ca0 100644 (file)
@@ -50,60 +50,60 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1'));
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_anon_ip` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_anon_host` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_anon_ua` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_anon_ref` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_admin_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_guest_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_member_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_sponsor_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `anonymous_ip` ENUM('127.0.0.1','0.0.0.0','RANDOM') NOT NULL DEFAULT '127.0.0.1'");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_removeip','Anonymit&auml;t/Privatsph&auml;hre','Stellen Sie hier ein, ob die IP-Nummer, User-Agent und/oder Referer-Adresse anonymisiert im gesamten Script verwendet werden soll.',15)");
-       break;
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_anon_ip` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_anon_host` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_anon_ua` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_anon_ref` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_admin_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_guest_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_member_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_sponsor_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `anonymous_ip` ENUM('127.0.0.1','0.0.0.0','RANDOM') NOT NULL DEFAULT '127.0.0.1'");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_removeip','Anonymit&auml;t/Privatsph&auml;hre','Stellen Sie hier ein, ob die IP-Nummer, User-Agent und/oder Referer-Adresse anonymisiert im gesamten Script verwendet werden soll.',15)");
+               break;
 
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_removeip'");
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_removeip'");
 
-       // Remove filters
-       UNREGISTER_FILTER('post_youhere_line', 'ADD_ANONYMITY_NOTICE', true, $dry_run);
-       break;
+               // Remove filters
+               UNREGISTER_FILTER('post_youhere_line', 'ADD_ANONYMITY_NOTICE', true, $dry_run);
+               break;
 
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       break;
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               break;
 
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       break;
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               break;
 
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               // Update depends on sql_patches
-               EXT_ADD_UPDATE_DEPENDS('sql_patches');
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               // Update depends on sql_patches
+                               EXT_ADD_UPDATE_DEPENDS('sql_patches');
 
-               // Add filters
-               REGISTER_FILTER('post_youhere_line', 'ADD_ANONYMITY_NOTICE', false, true, $dry_run);
+                               // Add filters
+                               REGISTER_FILTER('post_youhere_line', 'ADD_ANONYMITY_NOTICE', false, true, $dry_run);
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Filter hinzugef&uuml;gt und ist von <strong>sql_patches</strong> abh&auml;ngig.");
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Filter hinzugef&uuml;gt und ist von <strong>sql_patches</strong> abh&auml;ngig.");
+                               break;
+               }
                break;
-       }
-       break;
 
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 //
index ff2b5d590fb1f4987bd141774ae4994e13e07056..0b0fbf38216fa81a1c041b9682e6d80f3b39ce45 100644 (file)
@@ -50,83 +50,83 @@ EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair', NULL, 'Reperaturen','7','Repariert u.a. die Kategorie-Auswahlen der Mitglieder usw.')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_cats','Kategorieauswahlen','1','Repariert die Kategorieauswahlen Ihrer Mitglieder.')");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='repair'");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.1.0': // SQL queries for v0.1
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_amnu','Admin-Men&uuml;', 2, 'Repariert die Gewichtung des Admin-Men&uuml;-Systems')");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_gmnu','Gast-Men&uuml;', 3, 'Repariert die Gewichtung des G&auml;ste-Men&uuml;-Systems')");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_mmnu','Mitglied-Men&uuml;', 4, 'Repariert die Gewichtung des Mitglieder-Men&uuml;-Systems')");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("F&uuml;gt ein Men&uuml;punkt zur Reperatur der Gewichtung des Admin-Men&uuml;s hinzu.");
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair', NULL, 'Reperaturen','7','Repariert u.a. die Kategorie-Auswahlen der Mitglieder usw.')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_cats','Kategorieauswahlen','1','Repariert die Kategorieauswahlen Ihrer Mitglieder.')");
                break;
 
-       case '0.1.1': // SQL queries for v0.1.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Dummy-Release im Intranet??? Hmmmm....");
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='repair'");
                break;
 
-       case '0.1.2': // SQL queries for v0.1.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.1.3': // SQL queries for v0.1.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Ung&uuml;tiges Update nach neuster Konvention (Erweiterung <strong>menu</strong> ist ung&uum;ltig).");
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.1.4': // SQL queries for v0.1.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.1.0': // SQL queries for v0.1
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_amnu','Admin-Men&uuml;', 2, 'Repariert die Gewichtung des Admin-Men&uuml;-Systems')");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_gmnu','Gast-Men&uuml;', 3, 'Repariert die Gewichtung des G&auml;ste-Men&uuml;-Systems')");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_mmnu','Mitglied-Men&uuml;', 4, 'Repariert die Gewichtung des Mitglieder-Men&uuml;-Systems')");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("F&uuml;gt ein Men&uuml;punkt zur Reperatur der Gewichtung des Admin-Men&uuml;s hinzu.");
+                               break;
+
+                       case '0.1.1': // SQL queries for v0.1.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Dummy-Release im Intranet??? Hmmmm....");
+                               break;
+
+                       case '0.1.2': // SQL queries for v0.1.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+                               break;
+
+                       case '0.1.3': // SQL queries for v0.1.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Ung&uuml;tiges Update nach neuster Konvention (Erweiterung <strong>menu</strong> ist ung&uum;ltig).");
+                               break;
+
+                       case '0.1.4': // SQL queries for v0.1.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+                               break;
+
+                       case '0.1.5': // SQL queries for v0.1.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Sicherheitsupdate f&uuml;r die Include-Befehle.");
+                               break;
+
+                       case '0.1.6': // SQL queries for v0.1.6
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='repair_amnu' WHERE `what`='repair_amenu' LIMIT 1");
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='repair_gmnu' WHERE `what`='repair_gmenu' LIMIT 1");
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='repair_mmnu' WHERE `what`='repair_mmenu' LIMIT 1");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Scripte umbenannt, damit diese nicht mit <u>ext-menu</u> konfliktieren");
+                               break;
+               }
                break;
 
-       case '0.1.5': // SQL queries for v0.1.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Sicherheitsupdate f&uuml;r die Include-Befehle.");
-               break;
-
-       case '0.1.6': // SQL queries for v0.1.6
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='repair_amnu' WHERE `what`='repair_amenu' LIMIT 1");
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='repair_gmnu' WHERE `what`='repair_gmenu' LIMIT 1");
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='repair_mmnu' WHERE `what`='repair_mmenu' LIMIT 1");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Scripte umbenannt, damit diese nicht mit <u>ext-menu</u> konfliktieren");
-               break;
-       }
-       break;
-
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 //
index 15f0bc6d73f78a70bc6c6a5716f9155228d9b371..911b226beb33bbe85916b4d4db293e6184a19129 100644 (file)
@@ -50,127 +50,127 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // Check if mod_rewrite is loadeded
-       if (!isApacheModuleLoaded('mod_rewrite')){
-               EXT_SET_REPORTS_FAILURE(true);
-               addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR'));
-       } // END - if
-
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_rewrite'");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // Check if mod_rewrite is loadeded
-       if (!isApacheModuleLoaded('mod_rewrite')) {
-               SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET `ext_active`='N' WHERE `ext_name`='rewrite' LIMIT 1", __FILE__, __LINE__);
-               EXT_SET_REPORTS_FAILURE(true);
-               addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR'));
-        } // END - if
-
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Folgende Linkvariablen werden nun auch ausgetauscht: bid, mid, url, page, offset");
-               break;
-
-       case '0.0.2': // SQL queries for v0.0.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Folgende Linkvariablen werden nun auch ausgetauscht: type, do=search");
-
-       case '0.0.3': // SQL queries for v0.0.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("URLs zu MXChange.org ({!SERVER_URL!}) sind nun auch wieder g&uuml;ltig.");
-               break;
-
-       case '0.0.4': // SQL queries for v0.0.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Folgende Linkvariablen werden nun auch ausgetausch: sub, home");
-               break;
-
-       case '0.0.5': // SQL queries for v0.0.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Links im Admin- und Mitgliedsbereich werden nicht mehr umgeschrieben. Entsprechend f&auml;llt die neue .htaccess-Datei kleiner aus. Bitte anpassen!");
-
-       case '0.0.6': // SQL queries for v0.0.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Links im Frametester-Modul werden nicht mehr umgeschrieben.");
-               break;
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // Check if mod_rewrite is loadeded
+               if (!isApacheModuleLoaded('mod_rewrite')){
+                       EXT_SET_REPORTS_FAILURE(true);
+                       addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR'));
+               } // END - if
 
-       case '0.0.7': // SQL queries for v0.0.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.0.8': // SQL queries for v0.0.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_rewrite'");
                break;
 
-       case '0.0.9': // SQL queries for v0.0.9
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD rewrite_skip VARCHAR(255) NOT NULL DEFAULT 'login:admin:frametester:mailid'");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_rewrite','Rewrite-Engine','Stellen Sie hier ein, welche Module &uuml;bersprungen werden sollen, in denen also kein Umschreiben des HTML-Codes stattfinden soll.', 8)");
+       case 'activate': // Do stuff when admin activates this extension
+               // Check if mod_rewrite is loadeded
+               if (!isApacheModuleLoaded('mod_rewrite')) {
+                       SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET `ext_active`='N' WHERE `ext_name`='rewrite' LIMIT 1", __FILE__, __LINE__);
+                       EXT_SET_REPORTS_FAILURE(true);
+                       addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR'));
+        } // END - if
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Zu &uuml;berspringende Module k&ouml;nnen per Admin-Bereich eingestellt werden.");
-               break;
+        // SQL commands to run
+        ADD_EXT_SQL('');
+        break;
 
-       case '0.1.0': // SQL queries for v0.2.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.1.1': // SQL queries for v0.1.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Folgende Linkvariablen werden nun auch ausgetauscht: bid, mid, url, page, offset");
+                               break;
+
+                       case '0.0.2': // SQL queries for v0.0.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Folgende Linkvariablen werden nun auch ausgetauscht: type, do=search");
+
+                       case '0.0.3': // SQL queries for v0.0.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("URLs zu MXChange.org ({!SERVER_URL!}) sind nun auch wieder g&uuml;ltig.");
+                               break;
+
+                       case '0.0.4': // SQL queries for v0.0.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Folgende Linkvariablen werden nun auch ausgetausch: sub, home");
+                               break;
+
+                       case '0.0.5': // SQL queries for v0.0.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Links im Admin- und Mitgliedsbereich werden nicht mehr umgeschrieben. Entsprechend f&auml;llt die neue .htaccess-Datei kleiner aus. Bitte anpassen!");
+
+                       case '0.0.6': // SQL queries for v0.0.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Links im Frametester-Modul werden nicht mehr umgeschrieben.");
+                               break;
+
+                       case '0.0.7': // SQL queries for v0.0.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.0.8': // SQL queries for v0.0.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.0.9': // SQL queries for v0.0.9
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD rewrite_skip VARCHAR(255) NOT NULL DEFAULT 'login:admin:frametester:mailid'");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_rewrite','Rewrite-Engine','Stellen Sie hier ein, welche Module &uuml;bersprungen werden sollen, in denen also kein Umschreiben des HTML-Codes stattfinden soll.', 8)");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Zu &uuml;berspringende Module k&ouml;nnen per Admin-Bereich eingestellt werden.");
+                               break;
+
+                       case '0.1.0': // SQL queries for v0.2.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+                               break;
+
+                       case '0.1.1': // SQL queries for v0.1.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+                               break;
+
+                       case '0.1.2': // SQL queries for v0.1.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+                               break;
+                       case '0.1.3':
+                               // Check if mod_rewrite is loadeded
+                               if (!isApacheModuleLoaded('mod_rewrite')){
+                                       EXT_SET_REPORTS_FAILURE(true);
+                                       //addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR'));
+                               } // END - if
+                               EXT_SET_UPDATE_NOTES("Es wird beim Registrieren und aktivieren gepr&uuml;ft, ob im Apache das Modul mod_rewrite geladen wurde. Wenn mod_rewrite nicht gefunden werden konnte, wird abgebrochen.");
+                               break;
+               }
                break;
 
-       case '0.1.2': // SQL queries for v0.1.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
-               break;
-       case '0.1.3':
-               // Check if mod_rewrite is loadeded
-               if (!isApacheModuleLoaded('mod_rewrite')){
-                       EXT_SET_REPORTS_FAILURE(true);
-                       //addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR'));
-               } // END - if
-               EXT_SET_UPDATE_NOTES("Es wird beim Registrieren und aktivieren gepr&uuml;ft, ob im Apache das Modul mod_rewrite geladen wurde. Wenn mod_rewrite nicht gefunden werden konnte, wird abgebrochen.");
-               break;
-       }
-       break;
-
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       // Check if mod_rewrite is loadeded
-       if (!isApacheModuleLoaded('mod_rewrite')){
-               EXT_SET_REPORTS_FAILURE(true);
-               SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET `ext_active`='N' WHERE `ext_name`='rewrite' LIMIT 1", __FILE__, __LINE__);
-               if (!IS_ADMIN()) addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR'));
-        } // END - if
-       break;
+                       default: // Do stuff when extension is loaded
+                               // Check if mod_rewrite is loadeded
+                               if (!isApacheModuleLoaded('mod_rewrite')){
+                                       EXT_SET_REPORTS_FAILURE(true);
+                                       SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET `ext_active`='N' WHERE `ext_name`='rewrite' LIMIT 1", __FILE__, __LINE__);
+                                       if (!IS_ADMIN()) addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR'));
+                               } // END - if
+                               break;
 }
 
 //
index 7939e9adfc8a2ae8a20f595b0e7bbac70956c23f..b8a2c7f83686707e6bcd4b26e5ad665e412ddb56 100644 (file)
@@ -51,42 +51,42 @@ EXT_SET_VER_HISTORY(array('0.0'));
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       break;
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               break;
 
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       break;
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               break;
 
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       break;
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               break;
 
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       break;
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               break;
 
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               ADD_EXT_SQL("");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               ADD_EXT_SQL('');
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("");
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES('');
+                               break;
+               }
                break;
-       }
-       break;
 
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 //
index 94a8dfacec66e331ff54ed710cb229653ea15c0d..4e85c9666d963b8edc4bdd06854de23277233571 100644 (file)
@@ -49,18 +49,18 @@ EXT_SET_VER_HISTORY(array('0.0'));
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       //
-       // SQL commands to run
-       //
-       // Try to make it depend on repair
-       EXT_ADD_UPDATE_DEPENDS('repair');
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               //
+               // SQL commands to run
+               //
+               // Try to make it depend on repair
+               EXT_ADD_UPDATE_DEPENDS('repair');
 
-       //
-       // Sponsor data
-       //
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_data`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_data` (
+               //
+               // Sponsor data
+               //
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_data`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_data` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 company VARCHAR(255) NOT NULL DEFAULT '',
 position VARCHAR(255) NOT NULL DEFAULT '',
@@ -97,11 +97,11 @@ KEY(refid),
 KEY(email),
 PRIMARY KEY(id)
 )TYPE={!_TABLE_TYPE!}");
-       //
-       // Sponsor orders
-       //
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_orders`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_orders` (
+               //
+               // Sponsor orders
+               //
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_orders`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_orders` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 aid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -117,11 +117,11 @@ KEY (aid),
 KEY (sponsorid),
 PRIMARY KEY(id)
 )TYPE={!_TABLE_TYPE!}");
-       //
-       // Pay-types
-       //
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_paytypes`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_paytypes` (
+               //
+               // Pay-types
+               //
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_paytypes`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_paytypes` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 pay_name VARCHAR(255) NOT NULL DEFAULT '',
 pay_rate FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
@@ -129,11 +129,11 @@ pay_min_count BIGINT(20) UNSIGNED NOT NULL DEFAULT 1,
 pay_currency VARCHAR(255) NOT NULL DEFAULT '&euro;',
 PRIMARY KEY(id)
 )TYPE={!_TABLE_TYPE!}");
-       //
-       // Points-to-action converting
-       //
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_action_convert`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_action_convert` (
+               //
+               // Points-to-action converting
+               //
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_action_convert`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_action_convert` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 ext_name VARCHAR(255) NOT NULL DEFAULT 'sponsor',
 conv_rate BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -141,11 +141,11 @@ conv_name VARCHAR(255) NOT NULL DEFAULT 'Mails',
 KEY (ext_name),
 PRIMARY KEY(id)
 )TYPE={!_TABLE_TYPE!}");
-       //
-       // Sponsor menu system (default)
-       //
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_menu`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_menu` (
+               //
+               // Sponsor menu system (default)
+               //
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_menu`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_menu` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 action VARCHAR(255) NOT NULL DEFAULT '',
 what  VARCHAR(255) NULL DEFAULT NULL,
@@ -156,11 +156,11 @@ KEY (action),
 UNIQUE KEY (what),
 PRIMARY KEY(id)
 )TYPE={!_TABLE_TYPE!}");
-       //
-       // Registry for performable actions by your sponsors
-       //
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_registry`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_registry` (
+               //
+               // Registry for performable actions by your sponsors
+               //
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_registry`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_registry` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 aid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 ext_name VARCHAR(255) NOT NULL DEFAULT 'sponsor',
@@ -170,11 +170,11 @@ KEY(ext_name),
 KEY(aid),
 PRIMARY KEY(id)
 )TYPE={!_TABLE_TYPE!}");
-       //
-       // URLs from the sponsors
-       //
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_urls`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_urls` (
+               //
+               // URLs from the sponsors
+               //
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_urls`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_urls` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 url VARCHAR(255) NOT NULL DEFAULT 'http://',
@@ -184,11 +184,11 @@ status ENUM('PENDING','ACTIVE','LOCKED') NOT NULL DEFAULT 'PENDING',
 KEY(sponsorid),
 PRIMARY KEY(id)
 )TYPE={!_TABLE_TYPE!}");
-       //
-       // Banners of any size from the sponsors
-       //
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_banner`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_banner` (
+               //
+               // Banners of any size from the sponsors
+               //
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_banner`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_banner` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 url VARCHAR(255) NOT NULL DEFAULT 'http://',
@@ -200,11 +200,11 @@ status ENUM('PENDING','ACTIVE','LOCKED') NOT NULL DEFAULT 'PENDING',
 KEY(sponsorid),
 PRIMARY KEY(id)
 )TYPE={!_TABLE_TYPE!}");
-       //
-       // Campaigns
-       //
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaigns`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_campaigns` (
+               //
+               // Campaigns
+               //
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaigns`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_campaigns` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 aid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -222,11 +222,11 @@ KEY(aid),
 KEY(sponsorid),
 PRIMARY KEY(id)
 )TYPE={!_TABLE_TYPE!}");
-       //
-       // Campaigns + URLs + Banner
-       //
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaign_assigns`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_campaign_assigns` (
+               //
+               // Campaigns + URLs + Banner
+               //
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaign_assigns`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_campaign_assigns` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 campaignid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 urlid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -238,21 +238,21 @@ KEY(urlid),
 KEY(campaignid),
 PRIMARY KEY(id)
 )TYPE={!_TABLE_TYPE!}");
-       //
-       // Allowed data to display (administrative)
-       //
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_admin_data`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_admin_data` (
+               //
+               // Allowed data to display (administrative)
+               //
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_admin_data`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_admin_data` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 data_row VARCHAR(255) NOT NULL DEFAULT '',
 display ENUM('Y','N') NOT NULL DEFAULT 'N',
 PRIMARY KEY(id)
 )TYPE={!_TABLE_TYPE!}");
-       //
-       // Allowed data to display (sponsor-side)
-       //
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_display_data`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_display_data` (
+               //
+               // Allowed data to display (sponsor-side)
+               //
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_display_data`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_display_data` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 data_row VARCHAR(255) NOT NULL DEFAULT '',
@@ -260,170 +260,170 @@ display ENUM('Y','N') NOT NULL DEFAULT 'N',
 KEY(sponsorid),
 PRIMARY KEY(id)
 )TYPE={!_TABLE_TYPE!}");
-       //
-       // Default allowed data to display
-       //
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('id','N')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('company','Y')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('position','N')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('tax_ident','N')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('gender','N')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('surname','N')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('family','N')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('street_nr1','Y')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('street_nr2','Y')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('zip','Y')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('city','Y')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('country','Y')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('phone','Y')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('fax','Y')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('email','Y')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('url','N')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('password','N')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('remote_addr','N')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('sponsor_created','N')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_online','N')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_change','N')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('status','N')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('receive_warnings','N')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('warning_interval','N')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('points_amount','N')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('points_used','N')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('refid','N')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('ref_count','N')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('hash','N')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_pay','N')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_curr','N')");
-       //
-       // Add default entries
-       //
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_registry` (ext_name, is_active, aid, stamp_added) VALUES ('sponsor','N',".getCurrentAdminId().",UNIX_TIMESTAMP())");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_action_convert` (ext_name, conv_rate, conv_name) VALUES ('sponsor','10','Mails')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Standart-Paket', 5, 1000.00000, '&euro;')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Spar-Paket', 1, 200.00000, '&euro;')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Power-Paket', 10, 2000.00000, '&euro;')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Sponsor-Paket', 20, 4000.00000, '&euro;')");
-       //
-       // Admin menu
-       //
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor', NULL, 'Sponsorenbereich','Den Sponsorenbereich verwalten. Hier k&ouml;nnen Sie auch Sonderaktionen seperat deakvieren oder wieder aktivieren, Sponsorenaccounts verwalten usw.', 7)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','add_sponsor','Neuer Sponsor','Neues Sponsorenaccount hinzuf&uuml;gen.', 1)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','unlock_sponsor','Sponsor freischalten','Sponsorenaccounts freigeben / sperren.', 2)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor','Sponsoren auflisten','Listet alle verf&uuml;gbaren Sponsorenaccounts auf.', 3)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','edit_sponsor','Sponsor &auml;ndern','Sponsorenaccount &auml;ndern (Grundaten, nicht Freigabe!).', 4)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','lock_sponsor','Sponsor ent-/sperren','Sponsorenaccount sperren und entsperren.', 5)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','del_sponsor','Sponsor l&ouml;schen','Sponsorenaccount l&ouml;schen.', 6)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','allow_sponsor_data','Datenverwaltung','Stellen Sie hier ein, welche Daten der Sponsor im Mitgliedsbereich &uuml;ber sicht anzeigen darf und welche nicht.', 7)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_pays','Bestellungen...','Bestellungen der Sponsoren auflisten / bearbeiten.', 8)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_menu','Sponsorenmen&uuml;','Das Sponsorenmen&uuml; kann hier ge&auml;ndert werden.', 9)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_campaigns','Kampagnen...','Verwaltung aller von Ihren Sponsoren eingerichteten Kampagnen.', 10)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_urls','URL-Verwaltung','Verwaltung (freischalten, sperren, l&ouml;schen, testen, bearbeiten usw.) von gebuchten URLs.', 11)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_banner','Banner-Verwaltung','Verwaltung (freischalten, sperren, l&ouml;schen, testen, bearbeiten usw.) von gebuchten Bannern.', 12)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_reg','Sponsor-Aktionen','Alle Sponsor-Aktionen auflisten und verwalten.', 13)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_pay','Buchungspakete','Die Sponsoren k&ouml;nnen sich {!POINTS!}-Pakete kaufen. Hier k&ouml;nnen Sie diese verwalten.', 14)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_conv','{!POINTS!} umwandeln...','Mit den vom Sponsor gekauften {!POINTS!} kann er Aktionen buchen. Hier stellen Sie die Umrechnungsrate von {!POINTS!} nach Sponsoraktionen um. Beispiel: 1 {!POINTS!} = 10 Mails.', 15)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','config_sponsor','Einstellungen','Allgemeine Einstellungen am Sponsoring-System.', 16)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('repair','repr_sponsor','Sponsormen&uuml;','Gewichtung des Sponsormen&uuml;s reparieren.', 5)");
-       //
-       // Menu system (still admin menu)
-       //
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','sponsor_medit','Sponsor-Men&uuml; editieren','Hier k&ouml;nnen Sie das Sponsorenmen&uuml; ver&auml;ndern: Positionen ver&auml;ndern, Men&uuml;titel &auml;ndern usw.', 7)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','sponsor_madd','Sponsor-Men&uuml; hinzuf&uuml;gen','Hier k&ouml;nnen Sie einen neuen Men&uuml;punkt hinzuf&uuml;gen (falls Sie z.B. eigene Sponsoraktionen entwickelt haben oder welche versehendlich gel&ouml;scht haben.', 8)");
-       //
-       // Guest menu
-       //
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor', NULL, 'Sponsoren', 2)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_reg','Anmeldung', 1)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_login','Einloggen', 2)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_infos','Infos/Preise', 3)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_agb','AGBs', 4)");
-       //
-       // Member menu
-       //
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`) VALUES ('main','sponsor','Unsere Sponsoren', 8)");
-       //
-       // Add default menus to sponsor menu
-       //
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main', NULL, 'Hauptauswahl','N', 1)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','welcome','Willkommen','N', 1)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','account','Ihr Account','N', 2)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','campaigns','Kampagnen','N', 3)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','list_urls','URL-Verwaltung','N', 4)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','list_banner','Banner-Verwaltung','N', 5)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','settings','Einstellungen','N', 6)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','fillup','Konto auff&uuml;llen','N', 7)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','stats','Statistiken','N', 8)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','inquiry','Kontaktanfrage','N', 9)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','refid','Referal-Link','N', 10)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions', NULL, 'Sponsorenaktionen','N', 2)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions','mail','Sponsor-Mail','N', 1)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions','banner','Banner buchen','N', 2)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions','text','Textlink buchen','N', 3)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('logout', NULL, 'Ausloggen','N', 3)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('logout','logout','Ausloggen','N', 1)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('logout','guest','Zum Gastbereich','N', 2)");
-       //
-       // General configuration stuff
-       //
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD sponsor_ref_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD sponsor_min_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1000.00000");
-       break;
+               //
+               // Default allowed data to display
+               //
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('id','N')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('company','Y')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('position','N')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('tax_ident','N')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('gender','N')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('surname','N')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('family','N')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('street_nr1','Y')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('street_nr2','Y')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('zip','Y')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('city','Y')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('country','Y')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('phone','Y')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('fax','Y')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('email','Y')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('url','N')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('password','N')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('remote_addr','N')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('sponsor_created','N')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_online','N')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_change','N')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('status','N')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('receive_warnings','N')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('warning_interval','N')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('points_amount','N')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('points_used','N')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('refid','N')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('ref_count','N')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('hash','N')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_pay','N')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_curr','N')");
+               //
+               // Add default entries
+               //
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_registry` (ext_name, is_active, aid, stamp_added) VALUES ('sponsor','N',".getCurrentAdminId().",UNIX_TIMESTAMP())");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_action_convert` (ext_name, conv_rate, conv_name) VALUES ('sponsor','10','Mails')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Standart-Paket', 5, 1000.00000, '&euro;')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Spar-Paket', 1, 200.00000, '&euro;')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Power-Paket', 10, 2000.00000, '&euro;')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Sponsor-Paket', 20, 4000.00000, '&euro;')");
+               //
+               // Admin menu
+               //
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor', NULL, 'Sponsorenbereich','Den Sponsorenbereich verwalten. Hier k&ouml;nnen Sie auch Sonderaktionen seperat deakvieren oder wieder aktivieren, Sponsorenaccounts verwalten usw.', 7)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','add_sponsor','Neuer Sponsor','Neues Sponsorenaccount hinzuf&uuml;gen.', 1)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','unlock_sponsor','Sponsor freischalten','Sponsorenaccounts freigeben / sperren.', 2)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor','Sponsoren auflisten','Listet alle verf&uuml;gbaren Sponsorenaccounts auf.', 3)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','edit_sponsor','Sponsor &auml;ndern','Sponsorenaccount &auml;ndern (Grundaten, nicht Freigabe!).', 4)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','lock_sponsor','Sponsor ent-/sperren','Sponsorenaccount sperren und entsperren.', 5)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','del_sponsor','Sponsor l&ouml;schen','Sponsorenaccount l&ouml;schen.', 6)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','allow_sponsor_data','Datenverwaltung','Stellen Sie hier ein, welche Daten der Sponsor im Mitgliedsbereich &uuml;ber sicht anzeigen darf und welche nicht.', 7)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_pays','Bestellungen...','Bestellungen der Sponsoren auflisten / bearbeiten.', 8)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_menu','Sponsorenmen&uuml;','Das Sponsorenmen&uuml; kann hier ge&auml;ndert werden.', 9)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_campaigns','Kampagnen...','Verwaltung aller von Ihren Sponsoren eingerichteten Kampagnen.', 10)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_urls','URL-Verwaltung','Verwaltung (freischalten, sperren, l&ouml;schen, testen, bearbeiten usw.) von gebuchten URLs.', 11)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_banner','Banner-Verwaltung','Verwaltung (freischalten, sperren, l&ouml;schen, testen, bearbeiten usw.) von gebuchten Bannern.', 12)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_reg','Sponsor-Aktionen','Alle Sponsor-Aktionen auflisten und verwalten.', 13)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_pay','Buchungspakete','Die Sponsoren k&ouml;nnen sich {!POINTS!}-Pakete kaufen. Hier k&ouml;nnen Sie diese verwalten.', 14)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_conv','{!POINTS!} umwandeln...','Mit den vom Sponsor gekauften {!POINTS!} kann er Aktionen buchen. Hier stellen Sie die Umrechnungsrate von {!POINTS!} nach Sponsoraktionen um. Beispiel: 1 {!POINTS!} = 10 Mails.', 15)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','config_sponsor','Einstellungen','Allgemeine Einstellungen am Sponsoring-System.', 16)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('repair','repr_sponsor','Sponsormen&uuml;','Gewichtung des Sponsormen&uuml;s reparieren.', 5)");
+               //
+               // Menu system (still admin menu)
+               //
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','sponsor_medit','Sponsor-Men&uuml; editieren','Hier k&ouml;nnen Sie das Sponsorenmen&uuml; ver&auml;ndern: Positionen ver&auml;ndern, Men&uuml;titel &auml;ndern usw.', 7)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','sponsor_madd','Sponsor-Men&uuml; hinzuf&uuml;gen','Hier k&ouml;nnen Sie einen neuen Men&uuml;punkt hinzuf&uuml;gen (falls Sie z.B. eigene Sponsoraktionen entwickelt haben oder welche versehendlich gel&ouml;scht haben.', 8)");
+               //
+               // Guest menu
+               //
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor', NULL, 'Sponsoren', 2)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_reg','Anmeldung', 1)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_login','Einloggen', 2)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_infos','Infos/Preise', 3)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_agb','AGBs', 4)");
+               //
+               // Member menu
+               //
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`) VALUES ('main','sponsor','Unsere Sponsoren', 8)");
+               //
+               // Add default menus to sponsor menu
+               //
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main', NULL, 'Hauptauswahl','N', 1)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','welcome','Willkommen','N', 1)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','account','Ihr Account','N', 2)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','campaigns','Kampagnen','N', 3)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','list_urls','URL-Verwaltung','N', 4)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','list_banner','Banner-Verwaltung','N', 5)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','settings','Einstellungen','N', 6)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','fillup','Konto auff&uuml;llen','N', 7)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','stats','Statistiken','N', 8)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','inquiry','Kontaktanfrage','N', 9)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','refid','Referal-Link','N', 10)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions', NULL, 'Sponsorenaktionen','N', 2)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions','mail','Sponsor-Mail','N', 1)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions','banner','Banner buchen','N', 2)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions','text','Textlink buchen','N', 3)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('logout', NULL, 'Ausloggen','N', 3)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('logout','logout','Ausloggen','N', 1)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('logout','guest','Zum Gastbereich','N', 2)");
+               //
+               // General configuration stuff
+               //
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD sponsor_ref_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD sponsor_min_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1000.00000");
+               break;
 
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_data`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_orders`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_action_convert`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_paytypes`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_menu`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_registry`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_urls`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_banner`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaigns`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaign_assigns`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_admin_data`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_display_data`");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='sponsor' OR what IN('repr_sponsor','sponsor_medit','sponsor_madd')");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='sponsor'");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='sponsor'");
-       break;
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_data`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_orders`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_action_convert`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_paytypes`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_menu`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_registry`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_urls`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_banner`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaigns`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaign_assigns`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_admin_data`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_display_data`");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='sponsor' OR what IN('repr_sponsor','sponsor_medit','sponsor_madd')");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='sponsor'");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='sponsor'");
+               break;
 
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='sponsor' LIMIT 4");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='sponsor' LIMIT 1");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_menu` SET active='Y' WHERE active='N'");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_registry` SET is_active='Y' WHERE is_active='N'");
-       break;
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='sponsor' LIMIT 4");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='sponsor' LIMIT 1");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_menu` SET active='Y' WHERE active='N'");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_registry` SET is_active='Y' WHERE is_active='N'");
+               break;
 
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='sponsor' LIMIT 4");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='sponsor' LIMIT 1");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_menu` SET active='N' WHERE active='Y'");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_registry` SET is_active='N' WHERE is_active='Y'");
-       break;
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='sponsor' LIMIT 4");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='sponsor' LIMIT 1");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_menu` SET active='N' WHERE active='Y'");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_registry` SET is_active='N' WHERE is_active='Y'");
+               break;
 
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               ADD_EXT_SQL("");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               ADD_EXT_SQL('');
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("");
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES('');
+                               break;
+               }
                break;
-       }
-       break;
 
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 //
index 994690552338b21372f0b9079b773e94feb578ac..4c7c818459b104a8389dcd70b27714ee2fa75644 100644 (file)
@@ -50,20 +50,20 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // Drop tables
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_las`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_las_data`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_stats`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_filters`");
-
-       // Delete admin menu entries
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL('');
+               break;
+
+       case 'remove': // Do stuff when removing extension
+               // Drop tables
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_las`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_las_data`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_stats`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_filters`");
+
+               // Delete admin menu entries
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE
 `what`='config_extensions' OR
 `what`='config_home' OR
 `what`='list_unconfirmed' OR
@@ -75,324 +75,324 @@ case 'remove': // Do stuff when removing extension
 `what`='config_session' OR
 `what`='list_filter'");
 
-       // Delete/update member menu entries
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE
+               // Delete/update member menu entries
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE
 `what`='stats2' OR
 `what`='reflist' OR
 (`action`='stats' AND (`what`='' OR `what` IS NULL)) OR
 (`action`='extras' AND (`what`='' OR `what` IS NULL)) OR
 (`action`='rals' AND (`what`='' OR `what` IS NULL)) OR
 (`action`='account' AND (`what`='' OR `what` IS NULL))");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='main' WHERE
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='main' WHERE
 `action`='stats' OR
 `action`='extras' OR
 `action`='rals' OR
 `action`='account'");
 
-       // Drop indexes
-       /* @TODO SQL_ALTER_TABLE() should work now properly
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP UNIQUE KEY `ext_name`");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP UNIQUE KEY `login`");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refbanner` DROP INDEX `visible`");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refdepths` DROP UNIQUE KEY `level`");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` DROP INDEX `level`");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` DROP INDEX `data_type`");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_mod_reg` DROP UNIQUE KEY `module`");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` DROP INDEX `action`");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` DROP INDEX `what`");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `task_type`");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `status`");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `task_created`");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP FULLTEXT `subject`");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `subject`");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP INDEX `ext_active`");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `action`");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `what`");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `sort`");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `visible`");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `locked`");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `what`");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `sort`");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `visible`");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `locked`");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` DROP INDEX `visible`");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` DROP INDEX `sort`");
-       */
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ext_autopurge ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_extensions','Erweitungsmanagement','Alle Einstellungen am Erweiterungsmanagement.', 10)");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Es kann nun bestimmt werden, ob vom Server gel&ouml;schte ext-xxx.php erkannt werden sollen und die verkn&uuml;pften Daten auch aus der Datenbank entfernt werden sollen.");
-               break;
-
-       case '0.0.2': // SQL queries for v0.0.2
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE auto_purge auto_purge BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*14)."");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("In der Tabelle <strong>{!_MYSQL_PREFIX!}_config</strong> musste die Spalte <strong>auto_purge</strong> (autom. L&ouml;schen von Best&auml;tigungsmails angepasst werden (war auf dem Testsystem auf TINYINT(4) gesetzt.)");
-               break;
-
-       case '0.0.3': // SQL queries for v0.0.3
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD points_word VARCHAR(255) NOT NULL DEFAULT 'Punkte'");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Das Wort &quot;Punkte&quot; kann nun per Datenbank ge&auml;ndert werden. Damit k&ouml;nnen Sie anstelle des Wortes Punkte auch Klammlose oder &euro; schreiben.");
+               // Drop indexes
+               /* @TODO SQL_ALTER_TABLE() should work now properly
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP UNIQUE KEY `ext_name`");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP UNIQUE KEY `login`");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refbanner` DROP INDEX `visible`");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refdepths` DROP UNIQUE KEY `level`");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` DROP INDEX `level`");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` DROP INDEX `data_type`");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_mod_reg` DROP UNIQUE KEY `module`");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` DROP INDEX `action`");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` DROP INDEX `what`");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `task_type`");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `status`");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `task_created`");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP FULLTEXT `subject`");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `subject`");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP INDEX `ext_active`");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `action`");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `what`");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `sort`");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `visible`");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `locked`");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `what`");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `sort`");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `visible`");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `locked`");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` DROP INDEX `visible`");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` DROP INDEX `sort`");
+               */
                break;
 
-       case '0.0.4': // SQL queries for v0.0.4
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mails_page BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Anzahl Mails pro Seite in <strong>EMail-Details ansehen</strong> und <strong>EMail-Archiv</strong> hinzugef&uuml;gt.");
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.0.5': // SQL queries for v0.0.5
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD index_home VARCHAR(255) NOT NULL DEFAULT 'welcome'");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_home','Home-Seite festlegen','Stellen Sie hier ein, welcher Men&uuml;punkt (what-welcome ist Standart) als Einstiegspunkt in das Men&uuml;system genutzt werden soll.', 5)");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Die what-welcome.php ist derzeit die &quot;Home&quot;-Seite (Eingangsseite). Dies kann nun per Datenbank ge&auml;ndert werden.");
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.0.6': // SQL queries for v0.0.6
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` ADD ext_has_css ENUM('Y','N') NOT NULL DEFAULT 'N'");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ext_autopurge ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_extensions','Erweitungsmanagement','Alle Einstellungen am Erweiterungsmanagement.', 10)");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Es k&ouml;nnen nun SQL-Updates von einander abh&auml;ngig gemacht werden und die CSS-Datei kann per Admin-Bereich (wegen Debuggings) ein- bzw. ausgeschaltet werden.");
-               break;
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Es kann nun bestimmt werden, ob vom Server gel&ouml;schte ext-xxx.php erkannt werden sollen und die verkn&uuml;pften Daten auch aus der Datenbank entfernt werden sollen.");
+                               break;
 
-       case '0.0.7': // SQL queries for v0.0.7
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD verbose_sql ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+                       case '0.0.2': // SQL queries for v0.0.2
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE auto_purge auto_purge BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*14)."");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Die SQL-Anweisungen werden bei eingeschalteter Verbose-Funktion detailiert angezeigt.");
-               break;
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("In der Tabelle <strong>{!_MYSQL_PREFIX!}_config</strong> musste die Spalte <strong>auto_purge</strong> (autom. L&ouml;schen von Best&auml;tigungsmails angepasst werden (war auf dem Testsystem auf TINYINT(4) gesetzt.)");
+                               break;
 
-       case '0.0.8': // SQL queries for v0.0.8
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD menu_blur_spacer VARCHAR(255) NOT NULL DEFAULT '&nbsp;<strong><big>&middot;</big></strong>&nbsp;'");
+                       case '0.0.3': // SQL queries for v0.0.3
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD points_word VARCHAR(255) NOT NULL DEFAULT 'Punkte'");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Nette Mouse-Hover-Effekte eingebaut (Anleitung <strong>MENUE_HOVER.txt</strong> zum Patchen der general.css bitte lesen!)");
-               break;
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Das Wort &quot;Punkte&quot; kann nun per Datenbank ge&auml;ndert werden. Damit k&ouml;nnen Sie anstelle des Wortes Punkte auch Klammlose oder &euro; schreiben.");
+                               break;
 
-       case '0.0.9': // SQL queries for v0.0.9
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','list_unconfirmed','Unbest. Mails auflisten','Schauen Sie sich hier unbest&auml;tigte Maillinks an. Bitte diesen Link nur &uuml;ber dem EMail-Archiv oder EMail-Details aufrufen, direkt aufgerufen bekommen Sie eine Fehlermeldung.', 8)");
+                       case '0.0.4': // SQL queries for v0.0.4
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mails_page BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Unbest&auml;tigte Maillinks k&ouml;nnen unter Email-Management -&gt; Unbest. Mails auflisten aufgelistet werden.");
-               break;
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Anzahl Mails pro Seite in <strong>EMail-Details ansehen</strong> und <strong>EMail-Archiv</strong> hinzugef&uuml;gt.");
+                               break;
 
-       case '0.1.0': // SQL queries for v0.2.1
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD reg_points_mode ENUM('ref','direct') NOT NULL DEFAULT 'ref'");
+                       case '0.0.5': // SQL queries for v0.0.5
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD index_home VARCHAR(255) NOT NULL DEFAULT 'welcome'");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_home','Home-Seite festlegen','Stellen Sie hier ein, welcher Men&uuml;punkt (what-welcome ist Standart) als Einstiegspunkt in das Men&uuml;system genutzt werden soll.', 5)");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Soll der einmalige Ref-Bonus &uuml;ber das Referal-System (also alle oberen Refs bekommen auch etwas davon ab) oder direkt dem Werber aufgebucht werden?");
-               break;
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Die what-welcome.php ist derzeit die &quot;Home&quot;-Seite (Eingangsseite). Dies kann nun per Datenbank ge&auml;ndert werden.");
+                               break;
 
-       case '0.1.1': // SQL queries for v0.1.1
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Home-/Eingangsseite', descr='Stellen Sie hier ein, welcher Men&uuml;punkt (what-welcome ist Standart) als Einstiegspunkt in das Men&uuml;system genutzt werden soll und wie die automatische Weiterleitung in der Eingangsseite funktionieren soll.' WHERE `what`='config_home' LIMIT 1");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD index_delay TINYINT(3) UNSIGNED NOT NULL DEFAULT 0");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD index_cookie BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*365)."");
+                       case '0.0.6': // SQL queries for v0.0.6
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` ADD ext_has_css ENUM('Y','N') NOT NULL DEFAULT 'N'");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Sie k&ouml;nnen nun <a href=\"{!URL!}/modules.php?module=admin&amp;`what`=config_home\">hier</a> die Verz&ouml;gerungszeit in der <a href=\"{!URL!}/index.php\">Eingangsseite</a> einstellen.");
-               break;
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Es k&ouml;nnen nun SQL-Updates von einander abh&auml;ngig gemacht werden und die CSS-Datei kann per Admin-Bereich (wegen Debuggings) ein- bzw. ausgeschaltet werden.");
+                               break;
 
-       case '0.1.2': // SQL queries for v0.1.2
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_refid','Standart-Ref-ID','Stellen Sie hier die User-ID ein, die genommen werden soll, wenn der Gast n icht per Referal-Link Ihren Mailtausch aufgerufen hat.', 7)");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD def_refid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+                       case '0.0.7': // SQL queries for v0.0.7
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD verbose_sql ENUM('Y','N') NOT NULL DEFAULT 'Y'");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Standart Referal-ID kann per Admin-Bereich eingestellt werden (war vorher nur in modules.php und index.php direkt eingebbar.)");
-               break;
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Die SQL-Anweisungen werden bei eingeschalteter Verbose-Funktion detailiert angezeigt.");
+                               break;
 
-       case '0.1.3': // SQL queries for v0.1.3
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD refid_target ENUM('register','index') NOT NULL DEFAULT 'register'");
+                       case '0.0.8': // SQL queries for v0.0.8
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD menu_blur_spacer VARCHAR(255) NOT NULL DEFAULT '&nbsp;<strong><big>&middot;</big></strong>&nbsp;'");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Auf welche Seite soll der Ref-Link zeigen? Eingangsseite oder Anmeldeformular?");
-               break;
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Nette Mouse-Hover-Effekte eingebaut (Anleitung <strong>MENUE_HOVER.txt</strong> zum Patchen der general.css bitte lesen!)");
+                               break;
 
-       case '0.1.4': // SQL queries for v0.1.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Ung&uuml;ltiges Update (nach ext-theme.php verschoben!).");
-               break;
+                       case '0.0.9': // SQL queries for v0.0.9
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','list_unconfirmed','Unbest. Mails auflisten','Schauen Sie sich hier unbest&auml;tigte Maillinks an. Bitte diesen Link nur &uuml;ber dem EMail-Archiv oder EMail-Details aufrufen, direkt aufgerufen bekommen Sie eine Fehlermeldung.', 8)");
 
-       case '0.1.5': // SQL queries for v0.1.5
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP ext_has_admin");
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Unbest&auml;tigte Maillinks k&ouml;nnen unter Email-Management -&gt; Unbest. Mails auflisten aufgelistet werden.");
+                               break;
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Spalte <u>ext_has_admin</u> aus der Tabelle <u>{!_MYSQL_PREFIX!}_extensions</u> entfernt, da sie keinen Sinn mehr macht.");
-               break;
+                       case '0.1.0': // SQL queries for v0.2.1
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD reg_points_mode ENUM('ref','direct') NOT NULL DEFAULT 'ref'");
 
-       case '0.1.6': // SQL queries for v0.1.6
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD enable_title_deco ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD title_left VARCHAR(10) NOT NULL DEFAULT '[--'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD title_middle VARCHAR(10) NOT NULL DEFAULT '-'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD title_right VARCHAR(10) NOT NULL DEFAULT '--]'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD enable_mod_title ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD enable_what_title ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_title','Seitentitel &auml;ndern','De-/aktivieren Sie hier die Dekorationen, sowie Modul-Titel und what-Titel im Seitentitel.', 8)");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Dekorationen des Seitentiteles lassen sich ein- und ausschalten und selber definieren; Modul-Titel und Titel der <strong>what</strong>-Dateien kann hinzugef&uuml;gt werden.");
-               break;
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Soll der einmalige Ref-Bonus &uuml;ber das Referal-System (also alle oberen Refs bekommen auch etwas davon ab) oder direkt dem Werber aufgebucht werden?");
+                               break;
 
-       case '0.1.7': // SQL queries for v0.1.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
-               break;
+                       case '0.1.1': // SQL queries for v0.1.1
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Home-/Eingangsseite', descr='Stellen Sie hier ein, welcher Men&uuml;punkt (what-welcome ist Standart) als Einstiegspunkt in das Men&uuml;system genutzt werden soll und wie die automatische Weiterleitung in der Eingangsseite funktionieren soll.' WHERE `what`='config_home' LIMIT 1");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD index_delay TINYINT(3) UNSIGNED NOT NULL DEFAULT 0");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD index_cookie BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*365)."");
 
-       case '0.1.8': // SQL queries for v0.1.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("mad_count und last_mad werden nun aus der Datenbank geladen");
-               break;
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Sie k&ouml;nnen nun <a href=\"{!URL!}/modules.php?module=admin&amp;`what`=config_home\">hier</a> die Verz&ouml;gerungszeit in der <a href=\"{!URL!}/index.php\">Eingangsseite</a> einstellen.");
+                               break;
 
-       case '0.1.9': // SQL queries for v0.1.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
-               break;
+                       case '0.1.2': // SQL queries for v0.1.2
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_refid','Standart-Ref-ID','Stellen Sie hier die User-ID ein, die genommen werden soll, wenn der Gast n icht per Referal-Link Ihren Mailtausch aufgerufen hat.', 7)");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD def_refid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
 
-       case '0.2.0': // SQL queries for v0.2.0
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_jackpot` CHANGE points points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Standart Referal-ID kann per Admin-Bereich eingestellt werden (war vorher nur in modules.php und index.php direkt eingebbar.)");
+                               break;
 
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payments` CHANGE payment payment FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payments` CHANGE price price FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+                       case '0.1.3': // SQL queries for v0.1.3
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD refid_target ENUM('register','index') NOT NULL DEFAULT 'register'");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert");
-               break;
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Auf welche Seite soll der Ref-Link zeigen? Eingangsseite oder Anmeldeformular?");
+                               break;
 
-       case '0.2.1': // SQL queries for v0.2.1
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD css_php ENUM('DIRECT','FILE') NOT NULL DEFAULT 'FILE'");
+                       case '0.1.4': // SQL queries for v0.1.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Ung&uuml;ltiges Update (nach ext-theme.php verschoben!).");
+                               break;
+
+                       case '0.1.5': // SQL queries for v0.1.5
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP ext_has_admin");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Ausgabe der CSS-Dateien entweder per css.php oder sie sind direkt eingebunden.");
-               break;
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Spalte <u>ext_has_admin</u> aus der Tabelle <u>{!_MYSQL_PREFIX!}_extensions</u> entfernt, da sie keinen Sinn mehr macht.");
+                               break;
 
-       case '0.2.2': // SQL queries for v0.2.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
-               break;
-
-       case '0.2.3': // SQL queries for v0.2.3
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD guest_menu ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD member_menu ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD youre_here ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Gast- und Mitgliedsmen&uuml;s lassen sich getrennt voneinander abschalten.");
-               break;
-
-       case '0.2.4': // SQL queries for v0.2.4
-               $auto_type = 'png'; // PNG image is the default
-               if ((isIncludeReadable('theme/'.getCurrentTheme().'/images/code_bg.jpg')) && function_exists('imagecreatefromjpeg')) {
-                       // Switch to JPEG format
-                       $auto_type = 'jpg';
-               }
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD img_type ENUM('jpg','png') NOT NULL DEFAULT '".$auto_type."'");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Generierung des Mailbest&auml;tigungscodes h&auml;ngt davon ab, ob die PHP-Funktion <u>imagecreatefromjpeg()</u> und das JPEG-Bild vorhanden sind oder nicht.");
-               break;
-
-       case '0.2.5': // SQL queries for v0.2.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Spalten <u>max_mails</u> und <u>receive_mails</u> auf BIGINT(20) gesetzt.");
-               break;
-
-       case '0.2.6': // SQL queries for v0.2.6
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','sub_points','{!POINTS!} abziehen','Allen oder einem Mitglied {!POINTS!} abziehen.', 8)");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abzug von {!POINTS!} nun m&ouml;glich.");
-               break;
-
-       case '0.2.7': // SQL queries for v0.2.7
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD stats_limit BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='config_stats' WHERE `what`='stats' LIMIT 1");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("<ol>
+                       case '0.1.6': // SQL queries for v0.1.6
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD enable_title_deco ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD title_left VARCHAR(10) NOT NULL DEFAULT '[--'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD title_middle VARCHAR(10) NOT NULL DEFAULT '-'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD title_right VARCHAR(10) NOT NULL DEFAULT '--]'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD enable_mod_title ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD enable_what_title ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_title','Seitentitel &auml;ndern','De-/aktivieren Sie hier die Dekorationen, sowie Modul-Titel und what-Titel im Seitentitel.', 8)");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Dekorationen des Seitentiteles lassen sich ein- und ausschalten und selber definieren; Modul-Titel und Titel der <strong>what</strong>-Dateien kann hinzugef&uuml;gt werden.");
+                               break;
+
+                       case '0.1.7': // SQL queries for v0.1.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.1.8': // SQL queries for v0.1.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("mad_count und last_mad werden nun aus der Datenbank geladen");
+                               break;
+
+                       case '0.1.9': // SQL queries for v0.1.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.2.0': // SQL queries for v0.2.0
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_jackpot` CHANGE points points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payments` CHANGE payment payment FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payments` CHANGE price price FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert");
+                               break;
+
+                       case '0.2.1': // SQL queries for v0.2.1
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD css_php ENUM('DIRECT','FILE') NOT NULL DEFAULT 'FILE'");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Ausgabe der CSS-Dateien entweder per css.php oder sie sind direkt eingebunden.");
+                               break;
+
+                       case '0.2.2': // SQL queries for v0.2.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
+                               break;
+
+                       case '0.2.3': // SQL queries for v0.2.3
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD guest_menu ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD member_menu ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD youre_here ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Gast- und Mitgliedsmen&uuml;s lassen sich getrennt voneinander abschalten.");
+                               break;
+
+                       case '0.2.4': // SQL queries for v0.2.4
+                               $auto_type = 'png'; // PNG image is the default
+                               if ((isIncludeReadable('theme/'.getCurrentTheme().'/images/code_bg.jpg')) && function_exists('imagecreatefromjpeg')) {
+                                       // Switch to JPEG format
+                                       $auto_type = 'jpg';
+                               }
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD img_type ENUM('jpg','png') NOT NULL DEFAULT '".$auto_type."'");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Generierung des Mailbest&auml;tigungscodes h&auml;ngt davon ab, ob die PHP-Funktion <u>imagecreatefromjpeg()</u> und das JPEG-Bild vorhanden sind oder nicht.");
+                               break;
+
+                       case '0.2.5': // SQL queries for v0.2.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Spalten <u>max_mails</u> und <u>receive_mails</u> auf BIGINT(20) gesetzt.");
+                               break;
+
+                       case '0.2.6': // SQL queries for v0.2.6
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','sub_points','{!POINTS!} abziehen','Allen oder einem Mitglied {!POINTS!} abziehen.', 8)");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abzug von {!POINTS!} nun m&ouml;glich.");
+                               break;
+
+                       case '0.2.7': // SQL queries for v0.2.7
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD stats_limit BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='config_stats' WHERE `what`='stats' LIMIT 1");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("<ol>
 <li>Das Mitglied kann das derzeitige Design in sein Profil abspeichern.</li>
 <li>Mitgliederstatistik mit Seitennavigation.</li>
 </ol>");
-               break;
-
-       case '0.2.8': // SQL queries for v0.2.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Nicht mehr g&uuml;ltiges Update.");
-               break;
-
-       case '0.2.9': // SQL queries for v0.2.9
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_word VARCHAR(255) NOT NULL DEFAULT 'Mailtausch'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_word2 VARCHAR(255) NOT NULL DEFAULT 'Mailtausches'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_word3 VARCHAR(255) NOT NULL DEFAULT 'Mailtauscher'");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
-               break;
-
-       case '0.3.0': // SQL queries for v0.3.0
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='{!POINTS!}/Referal-Ebenen' WHERE `what`='config_points' LIMIT 1");
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Mailverg&uuml;tungen...' WHERE `what`='payments' LIMIT 1");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Zwei Men&uuml;punkte umbenannt.");
-               break;
-
-       case '0.3.1': // SQL queries for v0.3.1
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` ADD UNIQUE KEY (ext_name)");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD UNIQUE KEY (login)");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refbanner` ADD INDEX (visible)");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refdepths` ADD UNIQUE KEY (level)");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` ADD INDEX (level)");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` ADD INDEX (data_type)");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_mod_reg` ADD UNIQUE KEY (module)");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` ADD INDEX (action)");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` ADD INDEX (what)");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (task_type)");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (status)");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (task_created)");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD FULLTEXT (subject)");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (subject)");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` ADD INDEX (ext_active)");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (action)");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (what)");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (sort)");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (visible)");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (locked)");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (what)");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (sort)");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (visible)");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (locked)");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` ADD INDEX (visible)");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` ADD INDEX (sort)");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Eindeutige Schl&uuml;ssel (UNIQUE KEY) und normale Schl&uuml;ssel (INDEX) gesetzt.");
-               break;
-
-       case '0.3.2': // SQL queries for v0.3.2
-               // Connection table between the menu system and the "logical area" system
-               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_las`");
-               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admin_menu_las` (
+                               break;
+
+                       case '0.2.8': // SQL queries for v0.2.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Nicht mehr g&uuml;ltiges Update.");
+                               break;
+
+                       case '0.2.9': // SQL queries for v0.2.9
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_word VARCHAR(255) NOT NULL DEFAULT 'Mailtausch'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_word2 VARCHAR(255) NOT NULL DEFAULT 'Mailtausches'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_word3 VARCHAR(255) NOT NULL DEFAULT 'Mailtauscher'");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+                               break;
+
+                       case '0.3.0': // SQL queries for v0.3.0
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='{!POINTS!}/Referal-Ebenen' WHERE `what`='config_points' LIMIT 1");
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Mailverg&uuml;tungen...' WHERE `what`='payments' LIMIT 1");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Zwei Men&uuml;punkte umbenannt.");
+                               break;
+
+                       case '0.3.1': // SQL queries for v0.3.1
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` ADD UNIQUE KEY (ext_name)");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD UNIQUE KEY (login)");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refbanner` ADD INDEX (visible)");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refdepths` ADD UNIQUE KEY (level)");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` ADD INDEX (level)");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` ADD INDEX (data_type)");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_mod_reg` ADD UNIQUE KEY (module)");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` ADD INDEX (action)");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` ADD INDEX (what)");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (task_type)");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (status)");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (task_created)");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD FULLTEXT (subject)");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (subject)");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` ADD INDEX (ext_active)");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (action)");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (what)");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (sort)");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (visible)");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (locked)");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (what)");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (sort)");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (visible)");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (locked)");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` ADD INDEX (visible)");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` ADD INDEX (sort)");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Eindeutige Schl&uuml;ssel (UNIQUE KEY) und normale Schl&uuml;ssel (INDEX) gesetzt.");
+                               break;
+
+                       case '0.3.2': // SQL queries for v0.3.2
+                               // Connection table between the menu system and the "logical area" system
+                               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_las`");
+                               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admin_menu_las` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 la_id VARCHAR(255) NOT NULL DEFAULT '',
 la_action VARCHAR(255) NOT NULL DEFAULT '',
@@ -402,9 +402,9 @@ INDEX (la_action),
 INDEX (la_what),
 PRIMARY KEY(id)
 ) TYPE={!_TABLE_TYPE!}");
-               // All "logical areas" together
-               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_las_data`");
-               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admin_menu_las_data` (
+                               // All "logical areas" together
+                               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_las_data`");
+                               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admin_menu_las_data` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 la_id VARCHAR(255) NOT NULL DEFAULT '',
 la_title VARCHAR(255) NOT NULL DEFAULT '',
@@ -415,23 +415,23 @@ INDEX (la_posx),
 INDEX (la_posy),
 PRIMARY KEY(id)
 ) TYPE={!_TABLE_TYPE!}");
-               // Which menu do you like?
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD admin_menu ENUM('NEW','OLD') NOT NULL DEFAULT 'OLD'");
+                               // Which menu do you like?
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD admin_menu ENUM('NEW','OLD') NOT NULL DEFAULT 'OLD'");
 
-               // Insert menus
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_admin','Adminmen&uuml;','Diverse Einstellungen am Adminmen&uuml; vornehmen.', 9)");
+                               // Insert menus
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_admin','Adminmen&uuml;','Diverse Einstellungen am Adminmen&uuml; vornehmen.', 9)");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Logische Bereiche (Logical Areas = LAs) eingef&uuml;hrt. Dadurch wird das immer st&auml;rker anwachsende Admin-Men&uuml; in grosse Hauptgruppen unterteilt, wodurch ein Auffinden von Men&uuml;punkten verbessert wird.");
-               break;
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Logische Bereiche (Logical Areas = LAs) eingef&uuml;hrt. Dadurch wird das immer st&auml;rker anwachsende Admin-Men&uuml; in grosse Hauptgruppen unterteilt, wodurch ein Auffinden von Men&uuml;punkten verbessert wird.");
+                               break;
 
-       case '0.3.3': // SQL queries for v0.3.3
-               // Switch of the "intelligent menu sorter" when you want to have a fixed menu structure...
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD admin_menu_sorter ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+                       case '0.3.3': // SQL queries for v0.3.3
+                               // Switch of the "intelligent menu sorter" when you want to have a fixed menu structure...
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD admin_menu_sorter ENUM('Y','N') NOT NULL DEFAULT 'Y'");
 
-               // The statistics table
-               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_stats`");
-               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admin_menu_stats` (
+                               // The statistics table
+                               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_stats`");
+                               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admin_menu_stats` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 aid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 type ENUM('la','action','what') NOT NULL DEFAULT 'what',
@@ -440,215 +440,215 @@ INDEX (aid),
 PRIMARY KEY (id)
 ) TYPE={!_TABLE_TYPE!}");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Admin-abh&auml;ngig werden nun Klicks im Admin-Men&uuml; gez&auml;hlt, die zur automatischen Anpassung des Men&uuml;s in den logischen Bereichen diennen. Dieses &quot;intelligente Unbauen&quot; k&ouml;nnen Sie auch ganz abschalten.");
-               break;
-
-       case '0.3.4': // SQL queries for v0.3.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Veraltetes Update (what=list_user&amp;mode=noref)");
-               break;
-
-       case '0.3.5': // SQL queries for v0.3.5
-               // List accounts with no referal
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('stats',NULL,'Statistiken',4,'Y','N')");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('stats','stats2','Framekiller-Mails',2,'Y','N')");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('extras',NULL,'Extras',5,'Y','N')");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('rals',NULL,'Rallyes',6,'Y','N')");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('account',NULL,'Ihr Account',7,'Y','N')");
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='stats', `sort`='1', `title`='Klick-Mails' WHERE `what`='stats' LIMIT 1");
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='3' WHERE `what`='reflinks' LIMIT 1");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Mitgliedsmen&uuml; komplett umgebaut.");
-               break;
-
-       case '0.3.6': // SQL queries for v0.3.6
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD salt_length TINYINT(3) UNSIGNED NOT NULL DEFAULT '9'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD pass_scramble VARCHAR(255) NOT NULL DEFAULT ''");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` MODIFY password VARCHAR(255) NOT NULL DEFAULT ''");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD rand_no BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD file_hash VARCHAR(255) NOT NULL DEFAULT ''");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD master_salt VARCHAR(255) NOT NULL DEFAULT ''");
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_config` SET rand_no=(ROUND(RAND() * 99999) + 100000) WHERE config=0 LIMIT 1");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_mod_reg` ADD has_menu ENUM('Y','N') NOT NULL DEFAULT 'N'");
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET has_menu='Y' WHERE `module`='admin' OR `module`='index' OR `module`='login' LIMIT 3");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Passwort-System mit Zufallshash erweitert (Schutzt gegen Dictionary-Attacks!)");
-               break;
-
-       case '0.3.7': // SQL queries for v0.3.7
-               EXT_SET_UPDATE_NOTES("Problem w&auml;hrend des Installationsvorganges behoben.");
-               break;
-
-       case '0.3.8': // SQL queries for v0.3.8
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` CHANGE descr descr MEDIUMTEXT NULL");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` CHANGE `text` `text` LONGTEXT NOT NULL");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Beschreibungstexte f&uuml;r Admin-Men&uuml;s k&ouml;nnen l&auml;nger sein. Diverse Fixes.");
-               break;
-
-       case '0.3.9': // SQL queries for v0.3.9
-               ADD_EXT_SQL("UPDATE  `{!_MYSQL_PREFIX!}_admin_menu` SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'");
-               ADD_EXT_SQL("UPDATE  `{!_MYSQL_PREFIX!}_admin_menu` SET descr = REPLACE(descr, '--POINTS--','!POINTS!') WHERE descr LIKE '%--POINTS--%'");
-               ADD_EXT_SQL("UPDATE  `{!_MYSQL_PREFIX!}_guest_menu` SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'");
-               ADD_EXT_SQL("UPDATE  `{!_MYSQL_PREFIX!}_member_menu` SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Beschreibungstexte f&uuml;r Admin-Men&uuml;s k&ouml;nnen l&auml;nger sein. Diverse Fixes.");
-               break;
-
-       case '0.4.0': // SQL queries for v0.4.0
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Email-Management' WHERE action = 'email' AND (`what`='' OR `what` IS NULL) LIMIT 1");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Email-Verwaltung nach Email-Management umbenannt.");
-               break;
-
-       case '0.4.1': // SQL queries for v0.4.1
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `show_timings` ENUM ('Y','N') NOT NULL DEFAULT 'Y'");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Tabellen-Schl&uuml;ssel neu gesetzt und Parsing-Zeit im Footer eingeblendet.");
-               break;
-
-       case '0.4.2': // SQL queries for v0.4.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Nicht mehr g&uuml;ltiges Update.");
-               break;
-
-       case '0.4.3': // SQL queries for v0.4.3
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `proxy_host` VARCHAR(255) NOT NULL DEFAULT ''");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `proxy_port` INT(5) UNSIGNED NOT NULL DEFAULT 0");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `proxy_username` VARCHAR(255) NOT NULL DEFAULT ''");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `proxy_password` VARCHAR(255) NOT NULL DEFAULT ''");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_proxy','Proxy-Einstellungen','Sollte Ihr Webserver sich hinter einem Proxy befinden, so k&ouml;nnen Sie hier MXChange so konfigurieren, dass es Updates durch diesen hindurch sucht!', 15)");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Proxy-Einstellungen hinzugef&uuml;gt.");
-               break;
-
-       case '0.4.4': // SQL queries for v0.4.4
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL");
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`=NULL WHERE `what`=''");
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `what`=NULL WHERE `what`=''");
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `what`=NULL WHERE `what`=''");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` DROP INDEX `what`");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` ADD UNIQUE (`what`)");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `what`");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD UNIQUE (`what`)");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX `action` (`action`)");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `what`");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD UNIQUE (`what`)");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Schl&uuml;ssel in Admin-, Gast- und Mitgliedsmen&uuml; verbessert.");
-               break;
-
-       case '0.4.5': // SQL queries for v0.4.5
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD last_month CHAR(2) NOT NULL DEFAULT '00'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD last_week CHAR(2) NOT NULL DEFAULT '00'");
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Admin-abh&auml;ngig werden nun Klicks im Admin-Men&uuml; gez&auml;hlt, die zur automatischen Anpassung des Men&uuml;s in den logischen Bereichen diennen. Dieses &quot;intelligente Unbauen&quot; k&ouml;nnen Sie auch ganz abschalten.");
+                               break;
+
+                       case '0.3.4': // SQL queries for v0.3.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Veraltetes Update (what=list_user&amp;mode=noref)");
+                               break;
+
+                       case '0.3.5': // SQL queries for v0.3.5
+                               // List accounts with no referal
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('stats',NULL,'Statistiken',4,'Y','N')");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('stats','stats2','Framekiller-Mails',2,'Y','N')");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('extras',NULL,'Extras',5,'Y','N')");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('rals',NULL,'Rallyes',6,'Y','N')");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('account',NULL,'Ihr Account',7,'Y','N')");
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='stats', `sort`='1', `title`='Klick-Mails' WHERE `what`='stats' LIMIT 1");
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='3' WHERE `what`='reflinks' LIMIT 1");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Mitgliedsmen&uuml; komplett umgebaut.");
+                               break;
+
+                       case '0.3.6': // SQL queries for v0.3.6
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD salt_length TINYINT(3) UNSIGNED NOT NULL DEFAULT '9'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD pass_scramble VARCHAR(255) NOT NULL DEFAULT ''");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` MODIFY password VARCHAR(255) NOT NULL DEFAULT ''");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD rand_no BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD file_hash VARCHAR(255) NOT NULL DEFAULT ''");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD master_salt VARCHAR(255) NOT NULL DEFAULT ''");
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_config` SET rand_no=(ROUND(RAND() * 99999) + 100000) WHERE config=0 LIMIT 1");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_mod_reg` ADD has_menu ENUM('Y','N') NOT NULL DEFAULT 'N'");
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET has_menu='Y' WHERE `module`='admin' OR `module`='index' OR `module`='login' LIMIT 3");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Passwort-System mit Zufallshash erweitert (Schutzt gegen Dictionary-Attacks!)");
+                               break;
+
+                       case '0.3.7': // SQL queries for v0.3.7
+                               EXT_SET_UPDATE_NOTES("Problem w&auml;hrend des Installationsvorganges behoben.");
+                               break;
+
+                       case '0.3.8': // SQL queries for v0.3.8
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` CHANGE descr descr MEDIUMTEXT NULL");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` CHANGE `text` `text` LONGTEXT NOT NULL");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Beschreibungstexte f&uuml;r Admin-Men&uuml;s k&ouml;nnen l&auml;nger sein. Diverse Fixes.");
+                               break;
+
+                       case '0.3.9': // SQL queries for v0.3.9
+                               ADD_EXT_SQL("UPDATE  `{!_MYSQL_PREFIX!}_admin_menu` SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'");
+                               ADD_EXT_SQL("UPDATE  `{!_MYSQL_PREFIX!}_admin_menu` SET descr = REPLACE(descr, '--POINTS--','!POINTS!') WHERE descr LIKE '%--POINTS--%'");
+                               ADD_EXT_SQL("UPDATE  `{!_MYSQL_PREFIX!}_guest_menu` SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'");
+                               ADD_EXT_SQL("UPDATE  `{!_MYSQL_PREFIX!}_member_menu` SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Beschreibungstexte f&uuml;r Admin-Men&uuml;s k&ouml;nnen l&auml;nger sein. Diverse Fixes.");
+                               break;
+
+                       case '0.4.0': // SQL queries for v0.4.0
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Email-Management' WHERE action = 'email' AND (`what`='' OR `what` IS NULL) LIMIT 1");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Email-Verwaltung nach Email-Management umbenannt.");
+                               break;
+
+                       case '0.4.1': // SQL queries for v0.4.1
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `show_timings` ENUM ('Y','N') NOT NULL DEFAULT 'Y'");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Tabellen-Schl&uuml;ssel neu gesetzt und Parsing-Zeit im Footer eingeblendet.");
+                               break;
+
+                       case '0.4.2': // SQL queries for v0.4.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Nicht mehr g&uuml;ltiges Update.");
+                               break;
+
+                       case '0.4.3': // SQL queries for v0.4.3
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `proxy_host` VARCHAR(255) NOT NULL DEFAULT ''");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `proxy_port` INT(5) UNSIGNED NOT NULL DEFAULT 0");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `proxy_username` VARCHAR(255) NOT NULL DEFAULT ''");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `proxy_password` VARCHAR(255) NOT NULL DEFAULT ''");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_proxy','Proxy-Einstellungen','Sollte Ihr Webserver sich hinter einem Proxy befinden, so k&ouml;nnen Sie hier MXChange so konfigurieren, dass es Updates durch diesen hindurch sucht!', 15)");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Proxy-Einstellungen hinzugef&uuml;gt.");
+                               break;
+
+                       case '0.4.4': // SQL queries for v0.4.4
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL");
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`=NULL WHERE `what`=''");
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `what`=NULL WHERE `what`=''");
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `what`=NULL WHERE `what`=''");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` DROP INDEX `what`");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` ADD UNIQUE (`what`)");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `what`");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD UNIQUE (`what`)");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX `action` (`action`)");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `what`");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD UNIQUE (`what`)");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Schl&uuml;ssel in Admin-, Gast- und Mitgliedsmen&uuml; verbessert.");
+                               break;
+
+                       case '0.4.5': // SQL queries for v0.4.5
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD last_month CHAR(2) NOT NULL DEFAULT '00'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD last_week CHAR(2) NOT NULL DEFAULT '00'");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("T&auml;glichen/w&ouml;chentlichen/monatlichen Reset verbessert.");
+                               break;
+
+                       case '0.4.6': // SQL queries for v0.4.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Nicht mehr g&uuml;ltiges Update.");
+                               break;
+
+                       case '0.4.7': // SQL queries for v0.4.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Veraltetes Update.");
+                               break;
+
+                       case '0.4.8': // SQL queries for v0.4.8
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (subject)");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Index f&uuml;r Betreff eingef&uuml;gt.");
+                               break;
+
+                       case '0.4.9': // SQL queries for v0.4.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Nicht mehr g&uuml;ltiges Update.");
+                               break;
+
+                       case '0.5.0': // SQL queries for v0.5.0
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` DROP INDEX `level`");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` DROP INDEX `userid`");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` ADD UNIQUE `userid_level` (`userid`,`level`)");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Referal-System unterst&uuml;tzt nun detailierte Referal-&Uuml;bersicht und vieles mehr.");
+                               break;
+
+                       case '0.5.1': // SQL queries for v0.5.1
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP `descr`");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Beschreibungsspalte von Mitgliedsmen&uuml; entfernt, welche ohnehin nicht genutzt wird.");
+                               break;
+
+                       case '0.5.2': // SQL queries for v0.5.2
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refdepths` CHANGE `percents` `percents` FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Prozents&aum;tze k&ouml;nnen nun f&uuml;nf Stelle hinter dem Komma sein.");
+                               break;
+
+                       case '0.5.3': // SQL queries for v0.5.3
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD session_save_path VARCHAR(255) NOT NULL DEFAULT ''");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_session','Session-Einstellungen','&Auml;ndern Sie hier den Speicherpfad f&uuml;r Sessiondateien (Sitzungsdateien) ab, falls die Standart-Einstellung bei Ihrem Hoster zu Problem f&uuml;hren sollte.', 16)");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Session-Speicherpfad konfigurierbar. Beispielsweise ist dies bei all-inkl.com n&ouml;tig.");
+                               break;
+
+                       case '0.5.4': // SQL queries for v0.5.4
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','reflist','Ref-&Uuml;bersicht',5,'Y','N')");
+
+                               // Depends on refback extension
+                               EXT_ADD_UPDATE_DEPENDS('refback');
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Ref-&Uuml;bersicht eingebaut. Diese h&auml;ngt von der Erweiterung <strong>refback</strong> ab.");
+                               break;
+
+                       case '0.5.5': // SQL queries for v0.5.5
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD show_points_unconfirmed ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Anzeige der {!POINTS!} unter den unbest&auml;tigten Mails kann nun optional abgeschaltet werden.");
+                               break;
+
+                       case '0.5.6': // SQL queries for v0.5.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Nicht mehr g&uuml;ltiges Update.");
+                               break;
+
+                       case '0.5.7': // SQL queries for v0.5.7
+                               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='list_norefs' LIMIT 1");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Auflistung der Mitglieder ohne Werber nach what=list_user&amp;mode=norefs verschoben.");
+                               break;
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("T&auml;glichen/w&ouml;chentlichen/monatlichen Reset verbessert.");
-               break;
+                       case '0.5.8': // SQL queries for v0.5.8
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP `ext_lang_file`");
 
-       case '0.4.6': // SQL queries for v0.4.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Nicht mehr g&uuml;ltiges Update.");
-               break;
-
-       case '0.4.7': // SQL queries for v0.4.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Veraltetes Update.");
-               break;
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Sprachdateinamen werden nicht mehr in der Datenbank behalten.");
+                               break;
 
-       case '0.4.8': // SQL queries for v0.4.8
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (subject)");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Index f&uuml;r Betreff eingef&uuml;gt.");
-               break;
-
-       case '0.4.9': // SQL queries for v0.4.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Nicht mehr g&uuml;ltiges Update.");
-               break;
-
-       case '0.5.0': // SQL queries for v0.5.0
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` DROP INDEX `level`");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` DROP INDEX `userid`");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` ADD UNIQUE `userid_level` (`userid`,`level`)");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Referal-System unterst&uuml;tzt nun detailierte Referal-&Uuml;bersicht und vieles mehr.");
-               break;
-
-       case '0.5.1': // SQL queries for v0.5.1
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP `descr`");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Beschreibungsspalte von Mitgliedsmen&uuml; entfernt, welche ohnehin nicht genutzt wird.");
-               break;
-
-       case '0.5.2': // SQL queries for v0.5.2
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refdepths` CHANGE `percents` `percents` FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Prozents&aum;tze k&ouml;nnen nun f&uuml;nf Stelle hinter dem Komma sein.");
-               break;
-
-       case '0.5.3': // SQL queries for v0.5.3
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD session_save_path VARCHAR(255) NOT NULL DEFAULT ''");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_session','Session-Einstellungen','&Auml;ndern Sie hier den Speicherpfad f&uuml;r Sessiondateien (Sitzungsdateien) ab, falls die Standart-Einstellung bei Ihrem Hoster zu Problem f&uuml;hren sollte.', 16)");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Session-Speicherpfad konfigurierbar. Beispielsweise ist dies bei all-inkl.com n&ouml;tig.");
-               break;
-
-       case '0.5.4': // SQL queries for v0.5.4
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','reflist','Ref-&Uuml;bersicht',5,'Y','N')");
-
-               // Depends on refback extension
-               EXT_ADD_UPDATE_DEPENDS('refback');
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Ref-&Uuml;bersicht eingebaut. Diese h&auml;ngt von der Erweiterung <strong>refback</strong> ab.");
-               break;
-
-       case '0.5.5': // SQL queries for v0.5.5
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD show_points_unconfirmed ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Anzeige der {!POINTS!} unter den unbest&auml;tigten Mails kann nun optional abgeschaltet werden.");
-               break;
-
-       case '0.5.6': // SQL queries for v0.5.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Nicht mehr g&uuml;ltiges Update.");
-               break;
-
-       case '0.5.7': // SQL queries for v0.5.7
-               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='list_norefs' LIMIT 1");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Auflistung der Mitglieder ohne Werber nach what=list_user&amp;mode=norefs verschoben.");
-               break;
-
-       case '0.5.8': // SQL queries for v0.5.8
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP `ext_lang_file`");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Sprachdateinamen werden nicht mehr in der Datenbank behalten.");
-               break;
-
-       case '0.5.9': // SQL queries for v0.5.9
-               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_filters`");
-               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_filters` (
+                       case '0.5.9': // SQL queries for v0.5.9
+                               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_filters`");
+                               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_filters` (
 `filter_id` BIGINT(20) UNSIGNED AUTO_INCREMENT,
 `filter_name` VARCHAR(255) NOT NULL DEFAULT '',
 `filter_function` VARCHAR(255) NOT NULL DEFAULT '',
@@ -656,97 +656,97 @@ PRIMARY KEY (id)
 `filter_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 PRIMARY KEY (`filter_id`)
 ) TYPE={!_TABLE_TYPE!} COMMENT='Filter system'");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','list_filter','Filter-Management', 'Zeigt alle im System registrierten Filter an und l&auml;sst diese de- bzw. wieder aktivieren.', 17)");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','list_filter','Filter-Management', 'Zeigt alle im System registrierten Filter an und l&auml;sst diese de- bzw. wieder aktivieren.', 17)");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Tabellen f&uuml;r Filter-System hinzugef&uuml;gt.");
-               break;
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Tabellen f&uuml;r Filter-System hinzugef&uuml;gt.");
+                               break;
 
-       case '0.6.0': // SQL queries for v0.6.0
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `update_filter_usage` ENUM('N','Y') NOT NULL DEFAULT 'N'");
+                       case '0.6.0': // SQL queries for v0.6.0
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `update_filter_usage` ENUM('N','Y') NOT NULL DEFAULT 'N'");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Benutzungsstatistik eingebaut. Das Z&auml;hlen der Filterverwendungen sollte <strong>ausschliesslich</strong> zu Debugging-Zwecken eingesetzt werden.");
-               break;
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Benutzungsstatistik eingebaut. Das Z&auml;hlen der Filterverwendungen sollte <strong>ausschliesslich</strong> zu Debugging-Zwecken eingesetzt werden.");
+                               break;
 
-       case '0.6.1': // SQL queries for v0.6.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Nicht mehr g&uuml;ltiges Update.");
-               break;
+                       case '0.6.1': // SQL queries for v0.6.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Nicht mehr g&uuml;ltiges Update.");
+                               break;
 
-       case '0.6.2': // SQL queries for v0.6.2
-               // Depends on refback extension
-               EXT_ADD_UPDATE_DEPENDS('user');
+                       case '0.6.2': // SQL queries for v0.6.2
+                               // Depends on refback extension
+                               EXT_ADD_UPDATE_DEPENDS('user');
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abh&auml;ngigkeit von <u>ext-user</u> gesetzt.");
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abh&auml;ngigkeit von <u>ext-user</u> gesetzt.");
+                               break;
+               }
                break;
-       }
-       break;
-
-case 'modify': // When the extension got modified
-       break;
-
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
-
-default: // Do stuff when extension is loaded
-       // When the sql_patches is not installed we cannot load it's configuration... *sigh*
-       if (GET_EXT_VERSION('sql_patches') != '') {
-               // Init key
-               setConfigEntry('secret_key', '');
-
-               // Read key from secret file
-               if ((getConfig('file_hash') == '') || (getConfig('master_salt') == '') || (getConfig('pass_scramble') == '')) {
-                       // Cache instance
-                       // Maybe need setup of secret key!
-                       loadIncludeOnce('inc/gen_sql_patches.php');
-
-                       // @TODO Rewrite this to a filter!
-                       if ((GET_EXT_VERSION('cache') >= '0.1.2') && (isCacheInstanceValid())) {
-                               // Remove extensions and mod_reg cache file
-                               loadIncludeOnce('inc/libs/cache_functions.php');
-                               require(sprintf("%sinc/extensions/ext-cache.php", constant('PATH')));
-                               if ($GLOBALS['cache_instance']->loadCacheFile("extensions", true)) $GLOBALS['cache_instance']->destroyCacheFile();
-                               if ($GLOBALS['cache_instance']->loadCacheFile("modreg"))           $GLOBALS['cache_instance']->destroyCacheFile();
-                       } // END - if
-               } // END - if
-
-               // Test again
-               if ((getConfig('file_hash') != '') && (getConfig('master_salt') != '') && (getConfig('pass_scramble') != '')) {
-                       // File hash fas generated so we can also file the secret file... hopefully.
-                       $hashFile = sprintf("%sinc/.secret/.%s", constant('PATH'), getConfig('file_hash'));
-                       if (isFileReadable($hashFile)) {
-                               // Read file
-                               setConfigEntry('secret_key', readFromFile($hashFile));
-                       } else {
-                               // Remove it from database
-                               updateConfiguration('file_hash', '');
-
-                               // Cannot read secret file!
-                               app_die(__FILE__, __LINE__, "Cannot read secret file! Please try to reload");
-                       }
-               } // END - if
-
-               // Transfer words/numbers to constants
-               define('POINTS'  , getConfig('points_word'));
-               define('MT_WORD' , getConfig('mt_word'));
-               define('MT_WORD2', getConfig('mt_word2'));
-               define('MT_WORD3', getConfig('mt_word3'));
-               define('_MAX'    , getConfig('rand_no'));
-       } else {
-               // Set some lame ( ;-) ) default settings
-               setConfigEntry('def_refid'        , 0);
-               setConfigEntry('enable_title_deco', 'N');
-               setConfigEntry('title_mod_show'   , 'Y');
-               setConfigEntry('title_middle'     , '-');
-               // @TODO Can we remove this? setConfigEntry('verbose_sql'        , 'N');
-               define('MT_WORD' , getMessage('DEFAULT_MT_WORD'));
-               define('MT_WORD2', getMessage('DEFAULT_MT_WORD2'));
-               define('MT_WORD3', getMessage('DEFAULT_MT_WORD3'));
-               define('POINTS'  , getMessage('DEFAULT_POINTS'));
-       }
-       break;
+
+                       case 'modify': // When the extension got modified
+                               break;
+
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
+
+                       default: // Do stuff when extension is loaded
+                               // When the sql_patches is not installed we cannot load it's configuration... *sigh*
+                               if (GET_EXT_VERSION('sql_patches') != '') {
+                                       // Init key
+                                       setConfigEntry('secret_key', '');
+
+                                       // Read key from secret file
+                                       if ((getConfig('file_hash') == '') || (getConfig('master_salt') == '') || (getConfig('pass_scramble') == '')) {
+                                               // Cache instance
+                                               // Maybe need setup of secret key!
+                                               loadIncludeOnce('inc/gen_sql_patches.php');
+
+                                               // @TODO Rewrite this to a filter!
+                                               if ((GET_EXT_VERSION('cache') >= '0.1.2') && (isCacheInstanceValid())) {
+                                                       // Remove extensions and mod_reg cache file
+                                                       loadIncludeOnce('inc/libs/cache_functions.php');
+                                                       require(sprintf("%sinc/extensions/ext-cache.php", constant('PATH')));
+                                                       if ($GLOBALS['cache_instance']->loadCacheFile("extensions", true)) $GLOBALS['cache_instance']->destroyCacheFile();
+                                                       if ($GLOBALS['cache_instance']->loadCacheFile("modreg"))           $GLOBALS['cache_instance']->destroyCacheFile();
+                                               } // END - if
+                                       } // END - if
+
+                                       // Test again
+                                       if ((getConfig('file_hash') != '') && (getConfig('master_salt') != '') && (getConfig('pass_scramble') != '')) {
+                                               // File hash fas generated so we can also file the secret file... hopefully.
+                                               $hashFile = sprintf("%sinc/.secret/.%s", constant('PATH'), getConfig('file_hash'));
+                                               if (isFileReadable($hashFile)) {
+                                                       // Read file
+                                                       setConfigEntry('secret_key', readFromFile($hashFile));
+                                               } else {
+                                                       // Remove it from database
+                                                       updateConfiguration('file_hash', '');
+
+                                                       // Cannot read secret file!
+                                                       app_die(__FILE__, __LINE__, "Cannot read secret file! Please try to reload");
+                                               }
+                                       } // END - if
+
+                                       // Transfer words/numbers to constants
+                                       define('POINTS'  , getConfig('points_word'));
+                                       define('MT_WORD' , getConfig('mt_word'));
+                                       define('MT_WORD2', getConfig('mt_word2'));
+                                       define('MT_WORD3', getConfig('mt_word3'));
+                                       define('_MAX'    , getConfig('rand_no'));
+                               } else {
+                                       // Set some lame ( ;-) ) default settings
+                                       setConfigEntry('def_refid'        , 0);
+                                       setConfigEntry('enable_title_deco', 'N');
+                                       setConfigEntry('title_mod_show'   , 'Y');
+                                       setConfigEntry('title_middle'     , '-');
+                                       // @TODO Can we remove this? setConfigEntry('verbose_sql'        , 'N');
+                                       define('MT_WORD' , getMessage('DEFAULT_MT_WORD'));
+                                       define('MT_WORD2', getMessage('DEFAULT_MT_WORD2'));
+                                       define('MT_WORD3', getMessage('DEFAULT_MT_WORD3'));
+                                       define('POINTS'  , getMessage('DEFAULT_POINTS'));
+                               }
+                               break;
 }
 
 // Keep this extension always active!
index d962ccc810d0175436b73192ec7793a62768ca21..b3f90a0e9ec1904bf5af3074f7514955f4d4740c 100644 (file)
@@ -50,94 +50,94 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.2': // SQL queries for v0.0.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.0.3': // SQL queries for v0.0.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.0.4': // SQL queries for v0.0.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.0.5': // SQL queries for v0.0.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.0.6': // SQL queries for v0.0.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.2': // SQL queries for v0.0.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
+                               break;
+
+                       case '0.0.3': // SQL queries for v0.0.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.0.4': // SQL queries for v0.0.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.0.5': // SQL queries for v0.0.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+                               break;
+
+                       case '0.0.6': // SQL queries for v0.0.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+                               break;
+
+                       case '0.0.7': // SQL queries for v0.0.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt.");
+                               break;
+
+                       case '0.0.8': // SQL queries for v0.0.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+                               break;
+
+                       case '0.0.9': // SQL queries for v0.0.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Dateiamenskonflikt zwischen den Erweiterungen <strong>support</strong> und <strong>order</strong> behoben.");
+                               break;
+
+                       case '0.1.0': // SQL queries for v0.2.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Sicherheitsupdate vom 27.08.2005.");
+                               break;
+
+                       case '0.1.1': // SQL queries for v0.1.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abspeichern der Support-Anfrage repariert und Mail wird an Mitglied wieder versendet.");
+                               break;
+
+                       case '0.1.2': // SQL queries for v0.1.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+                               break;
+               }
                break;
 
-       case '0.0.7': // SQL queries for v0.0.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt.");
-               break;
-
-       case '0.0.8': // SQL queries for v0.0.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
-               break;
-
-       case '0.0.9': // SQL queries for v0.0.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Dateiamenskonflikt zwischen den Erweiterungen <strong>support</strong> und <strong>order</strong> behoben.");
-               break;
-
-       case '0.1.0': // SQL queries for v0.2.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Sicherheitsupdate vom 27.08.2005.");
-               break;
-
-       case '0.1.1': // SQL queries for v0.1.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abspeichern der Support-Anfrage repariert und Mail wird an Mitglied wieder versendet.");
-               break;
-
-       case '0.1.2': // SQL queries for v0.1.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
-               break;
-       }
-       break;
-
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 //
index a272bb5b0a79f88ad064ac6ca39c876ad23c5bd1..72abee9559c3e3cfa63769ecf1a870ef84c081f1 100644 (file)
@@ -50,10 +50,10 @@ EXT_SET_VER_HISTORY(array('0.0'));
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run (surfbar URLs)
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_urls`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_urls` (
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run (surfbar URLs)
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_urls`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_urls` (
 `id` BIGINT(20) UNSIGNED  NOT NULL AUTO_INCREMENT,
 `userid` BIGINT(20) UNSIGNED  NOT NULL DEFAULT 0,
 `url` VARCHAR(255) NOT NULL DEFAULT '',
@@ -72,9 +72,9 @@ UNIQUE KEY `userid_url` (`userid`,`url`),
 INDEX `status_userid` (`status`,`userid`)
 ) TYPE={!_TABLE_TYPE!} COMMENT='Surfbar URLs'");
 
-       // Reload locks
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_locks`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_locks` (
+               // Reload locks
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_locks`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_locks` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `userid` BIGINT(20) UNSIGNED  NOT NULL DEFAULT 0,
 `url_id` BIGINT(20) UNSIGNED  NOT NULL DEFAULT 0,
@@ -84,9 +84,9 @@ UNIQUE KEY `userid_url` (`userid`,`url_id`),
 INDEX (`url_id`)
 ) TYPE={!_TABLE_TYPE!} COMMENT='Surfbar reload locks'");
 
-       // Surfbar salts
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_salts`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_salts` (
+               // Surfbar salts
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_salts`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_salts` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `userid` BIGINT(20) UNSIGNED  NOT NULL DEFAULT 0,
 `url_id` BIGINT(20) UNSIGNED  NOT NULL DEFAULT 0,
@@ -96,9 +96,9 @@ UNIQUE KEY `userid_url` (`userid`,`url_id`),
 INDEX (`url_id`)
 ) TYPE={!_TABLE_TYPE!} COMMENT='Surfbar last used salts'");
 
-       // Statistics
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_stats`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_stats` (
+               // Statistics
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_stats`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_stats` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `url_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -109,9 +109,9 @@ UNIQUE KEY `userid_url` (`userid`,`url_id`),
 INDEX (`url_id`)
 ) TYPE={!_TABLE_TYPE!} COMMENT='Surfbar Statistics'");
 
-       // Member actions pending on status
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_actions`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_actions` (
+               // Member actions pending on status
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_actions`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_actions` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `status` ENUM('PENDING','ACTIVE','LOCKED','STOPPED','REJECTED','DELETED','MIGRATED','DEPLETED') NULL DEFAULT NULL,
 `action` ENUM('EDIT','DELETE','PAUSE','UNPAUSE','FRAMETEST','RETREAT','RESUBMIT','BOOKNOW') NULL DEFAULT NULL,
@@ -120,123 +120,123 @@ PRIMARY KEY (`id`),
 UNIQUE KEY `status_action` (`status`,`action`)
 ) TYPE={!_TABLE_TYPE!} COMMENT='Surfbar Member Actions'");
 
-       // Member actions
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','RETREAT','DELETED')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','FRAMETEST',NULL)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','EDIT',NULL)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','EDIT','PENDING')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','DELETE','DELETED')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','PAUSE','STOPPED')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','FRAMETEST',NULL)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','DELETE','DELETED')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','FRAMETEST',NULL)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','RESUBMIT','PENDING')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','EDIT','PENDING')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','DELETE','DELETED')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','UNPAUSE','PENDING')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('DEPLETED','EDIT','PENDING')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('DEPLETED','DELETE','DELETED')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','EDIT','PENDING')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','DELETE','DELETED')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','FRAMETEST',NULL)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','RESUBMIT','PENDING')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','EDIT','MIGRATED')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','DELETE','DELETED')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','FRAMETEST',NULL)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','BOOKNOW','PENDING')");
-
-       // Config entries
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_pay_model` ENUM('STATIC','DYNAMIC') NOT NULL DEFAULT 'STATIC'");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_reward` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.25000");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_costs` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_time` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_lock` SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(60*5)."");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_dynamic_percent` FLOAT(10,5) UNSIGNED NOT NULL DEFAULT 10.00000");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_max_order` INT(7) UNSIGNED NOT NULL DEFAULT 10");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_restart_time` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(60*6)."");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_autostart` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_migrate_urls` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_total_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_daily_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_yester_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_weekly_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_monthly_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_stats_reload` BIGINT(20) UNSIGNED NOT NULL DEFAULT 30");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_purge_deleted` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*7)."");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_purge_migrated` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*3)."");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_pause_mode` ENUM('INTERNAL','EXERNAL') NOT NULL DEFAULT 'INTERNAL'");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_pause_url` VARCHAR(255) NOT NULL DEFAULT ''");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_notify_limits` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_notify_admin_unlock` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_warn_low_points` BIGINT(20) UNSIGNED NOT NULL DEFAULT 100");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_low_interval` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".getConfig('one_day')."");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_migrate_order` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_notification_mode` ENUM('INSTANT','RESET') NOT NULL DEFAULT 'INSTANT'");
-
-       // Extend user data
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `surfbar_low_notified` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'");
-
-       // Member menus
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar',NULL,'Surfbar','Y','Y',4)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_start','Surfbar starten','Y','Y',1)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_book','URL buchen','Y','Y',2)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_list','URL-Verwaltung','Y','Y',3)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_stats','URL-Statistiken','Y','Y',4)");
-
-       // Admin menus
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar',NULL,'Surfbar','URLs in der Surfbar verwalten, Einstellungen &auml;ndern und vieles mehr.',7)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','add_surfbar_url','URL hinzuf&uuml;gen','F&uuml;gen Sie URLs z.B. von Werbenetzwerken hinzu, oder Ihre eigenen Projekte. <strong>Vorsicht!</strong> Ihnen muss es auch gestattet sein, URLs aus dem Werbenetzwerk in die Surfbar einzuf&uuml;gen.',1)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','list_surfbar_urls','URLs verwalten','Verwalten Sie hier alle in der Surfbar befindlichen URLs mit nur wenigen Klicks.',2)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','unlock_surfbar_urls','Wartende URLs freigeben','Geben Sie hier nur direkt in der Surfbar gebuchte URLs frei.',3)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','config_surfbar','Einstellungen','Einstellungen an der Surfbar &auml;ndern, wie Festverg&uuml;tung, prozentuale Ref-Verg&uuml;tung und vieles mehr.',4)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','surfbar_stats','Statistiken','Detailierte Statistiken zu einer ausgew&auml;hlten URL anzeigen.',5)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','list_surfbar_actions','Mitgliederaktionen','Listet alle Mitgliederaktionen auf.',6)");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_actions`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_locks`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_salts`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_stats`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_urls`");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='surfbar'");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='surfbar'");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `action`='surfbar' LIMIT 5");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='Y' WHERE `module`='surfbar' LIMIT 1");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `action` = 'surfbar' LIMIT 5");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE `module`='surfbar' LIMIT 1");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER) {
-       case '0.0.1': // SQL queries for v0.0.1
-               ADD_EXT_SQL("");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("");
+               // Member actions
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','RETREAT','DELETED')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','FRAMETEST',NULL)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','EDIT',NULL)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','EDIT','PENDING')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','DELETE','DELETED')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','PAUSE','STOPPED')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','FRAMETEST',NULL)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','DELETE','DELETED')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','FRAMETEST',NULL)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','RESUBMIT','PENDING')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','EDIT','PENDING')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','DELETE','DELETED')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','UNPAUSE','PENDING')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('DEPLETED','EDIT','PENDING')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('DEPLETED','DELETE','DELETED')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','EDIT','PENDING')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','DELETE','DELETED')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','FRAMETEST',NULL)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','RESUBMIT','PENDING')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','EDIT','MIGRATED')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','DELETE','DELETED')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','FRAMETEST',NULL)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','BOOKNOW','PENDING')");
+
+               // Config entries
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_pay_model` ENUM('STATIC','DYNAMIC') NOT NULL DEFAULT 'STATIC'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_reward` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.25000");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_costs` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_time` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_lock` SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(60*5)."");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_dynamic_percent` FLOAT(10,5) UNSIGNED NOT NULL DEFAULT 10.00000");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_max_order` INT(7) UNSIGNED NOT NULL DEFAULT 10");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_restart_time` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(60*6)."");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_autostart` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_migrate_urls` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_total_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_daily_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_yester_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_weekly_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_monthly_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_stats_reload` BIGINT(20) UNSIGNED NOT NULL DEFAULT 30");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_purge_deleted` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*7)."");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_purge_migrated` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*3)."");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_pause_mode` ENUM('INTERNAL','EXERNAL') NOT NULL DEFAULT 'INTERNAL'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_pause_url` VARCHAR(255) NOT NULL DEFAULT ''");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_notify_limits` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_notify_admin_unlock` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_warn_low_points` BIGINT(20) UNSIGNED NOT NULL DEFAULT 100");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_low_interval` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".getConfig('one_day')."");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_migrate_order` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_notification_mode` ENUM('INSTANT','RESET') NOT NULL DEFAULT 'INSTANT'");
+
+               // Extend user data
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `surfbar_low_notified` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'");
+
+               // Member menus
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar',NULL,'Surfbar','Y','Y',4)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_start','Surfbar starten','Y','Y',1)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_book','URL buchen','Y','Y',2)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_list','URL-Verwaltung','Y','Y',3)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_stats','URL-Statistiken','Y','Y',4)");
+
+               // Admin menus
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar',NULL,'Surfbar','URLs in der Surfbar verwalten, Einstellungen &auml;ndern und vieles mehr.',7)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','add_surfbar_url','URL hinzuf&uuml;gen','F&uuml;gen Sie URLs z.B. von Werbenetzwerken hinzu, oder Ihre eigenen Projekte. <strong>Vorsicht!</strong> Ihnen muss es auch gestattet sein, URLs aus dem Werbenetzwerk in die Surfbar einzuf&uuml;gen.',1)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','list_surfbar_urls','URLs verwalten','Verwalten Sie hier alle in der Surfbar befindlichen URLs mit nur wenigen Klicks.',2)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','unlock_surfbar_urls','Wartende URLs freigeben','Geben Sie hier nur direkt in der Surfbar gebuchte URLs frei.',3)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','config_surfbar','Einstellungen','Einstellungen an der Surfbar &auml;ndern, wie Festverg&uuml;tung, prozentuale Ref-Verg&uuml;tung und vieles mehr.',4)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','surfbar_stats','Statistiken','Detailierte Statistiken zu einer ausgew&auml;hlten URL anzeigen.',5)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','list_surfbar_actions','Mitgliederaktionen','Listet alle Mitgliederaktionen auf.',6)");
                break;
-       }
-       break;
 
-case 'modify': // When the extension got modified
-       break;
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_actions`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_locks`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_salts`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_stats`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_urls`");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='surfbar'");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='surfbar'");
+               break;
+
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `action`='surfbar' LIMIT 5");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='Y' WHERE `module`='surfbar' LIMIT 1");
+               break;
+
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `action` = 'surfbar' LIMIT 5");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE `module`='surfbar' LIMIT 1");
+               break;
+
+       case 'update': // Update an extension
+               switch ($EXT_VER) {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               ADD_EXT_SQL('');
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES('');
+                               break;
+               }
+               break;
+
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       // @TODO Set some constants we need???
-       define('edit', 'edit');
-       break;
+                       default: // Do stuff when extension is loaded
+                               // @TODO Set some constants we need???
+                               define('edit', 'edit');
+                               break;
 }
 
 //
index 92064c86152d02198ccc0d68277f76ec9bdfb8df..3186a59eda6c2e8f7fec86e1804d29d6b09501e4 100644 (file)
@@ -50,109 +50,109 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('task', NULL, 'Aufgaben-Management','1','Erweitertes Aufgaben-Management zur leichten verwaltung der vom System erzeugten Aufgaben.')");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('task','list_task','Aufgaben auflisten','1','Alle Ihnen zugewiesenen Aufgaben auflisten (keine Updates).')");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_task_system` SET `status`='SOLVED' WHERE `status`='CLOSED'");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='task'");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE `ext_name`='task' AND ext_has_css='N' LIMIT 1");
-
-               // This update depends on sql_patches update!
-               EXT_ADD_UPDATE_DEPENDS('sql_patches');
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("CSS-Datei kann per Admin-Bereich ein- und ausgeschaltet werden.");
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('task', NULL, 'Aufgaben-Management','1','Erweitertes Aufgaben-Management zur leichten verwaltung der vom System erzeugten Aufgaben.')");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('task','list_task','Aufgaben auflisten','1','Alle Ihnen zugewiesenen Aufgaben auflisten (keine Updates).')");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_task_system` SET `status`='SOLVED' WHERE `status`='CLOSED'");
                break;
 
-       case '0.0.1': // SQL queries for v0.0.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Unn&ouml;tige Script-Teile aus what-list_tasks.php herausgel&ouml;scht; beim Anzeigen einer Extension-Update, oder -Register Aufgabe werden bei eingeschaltetem Verbose-Modus alle SQL-Anweisungen aufgelistet.");
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='task'");
                break;
 
-       case '0.0.4': // SQL queries for v0.0.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler <div class=\"admin_failed\">Warning: Missing argument 2 for create_timestamp_from_selections() in {!PATH!}inc/libs/pro_functions.php on line 227</div> behoben.");
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.0.5': // SQL queries for v0.0.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("&amp;admin= in &amp;amp;admin= umgewandelt.");
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.0.6': // SQL queries for v0.0.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei ge&auml;ndert.");
-               break;
-
-       case '0.0.7': // SQL queries for v0.0.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Erstellung der Extra-&Uuml;bersichten verbessert.");
-               break;
-
-       case '0.0.8': // SQL queries for v0.0.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
-               break;
-
-       case '0.0.9': // SQL queries for v0.0.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler bei Abfrage der payout-Erweiterung beseitigt.");
-               break;
-
-       case '0.1.0': // SQL queries for v0.2.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Task-Liste ausgelagert als Template");
-               break;
-
-       case '0.1.1': // SQL queries for v0.1.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Design &quot;Solid-Business&quot; eingebaut.");
-               break;
-
-       case '0.1.2': // SQL queries for v0.1.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
-               break;
-
-       case '0.1.3': // SQL queries for v0.1.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
-               break;
-
-       case '0.1.4': // SQL queries for v0.1.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
-               break;
-
-       case '0.1.5': // SQL queries for v0.1.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Links wegen <strong>what=admins_contct</strong> ge&auml;ndert.");
-               break;
-
-       case '0.1.6': // SQL queries for v0.1.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Weitere Direkt-Links eingebaut:<br />
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE `ext_name`='task' AND ext_has_css='N' LIMIT 1");
+
+                               // This update depends on sql_patches update!
+                               EXT_ADD_UPDATE_DEPENDS('sql_patches');
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("CSS-Datei kann per Admin-Bereich ein- und ausgeschaltet werden.");
+                               break;
+
+                       case '0.0.1': // SQL queries for v0.0.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Unn&ouml;tige Script-Teile aus what-list_tasks.php herausgel&ouml;scht; beim Anzeigen einer Extension-Update, oder -Register Aufgabe werden bei eingeschaltetem Verbose-Modus alle SQL-Anweisungen aufgelistet.");
+                               break;
+
+                       case '0.0.4': // SQL queries for v0.0.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler <div class=\"admin_failed\">Warning: Missing argument 2 for create_timestamp_from_selections() in {!PATH!}inc/libs/pro_functions.php on line 227</div> behoben.");
+                               break;
+
+                       case '0.0.5': // SQL queries for v0.0.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("&amp;admin= in &amp;amp;admin= umgewandelt.");
+                               break;
+
+                       case '0.0.6': // SQL queries for v0.0.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei ge&auml;ndert.");
+                               break;
+
+                       case '0.0.7': // SQL queries for v0.0.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Erstellung der Extra-&Uuml;bersichten verbessert.");
+                               break;
+
+                       case '0.0.8': // SQL queries for v0.0.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.0.9': // SQL queries for v0.0.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler bei Abfrage der payout-Erweiterung beseitigt.");
+                               break;
+
+                       case '0.1.0': // SQL queries for v0.2.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Task-Liste ausgelagert als Template");
+                               break;
+
+                       case '0.1.1': // SQL queries for v0.1.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Design &quot;Solid-Business&quot; eingebaut.");
+                               break;
+
+                       case '0.1.2': // SQL queries for v0.1.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+                               break;
+
+                       case '0.1.3': // SQL queries for v0.1.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
+                               break;
+
+                       case '0.1.4': // SQL queries for v0.1.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+                               break;
+
+                       case '0.1.5': // SQL queries for v0.1.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Links wegen <strong>what=admins_contct</strong> ge&auml;ndert.");
+                               break;
+
+                       case '0.1.6': // SQL queries for v0.1.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Weitere Direkt-Links eingebaut:<br />
 <ul>
   <li>L&auml;ndercodes</li>
   <li>Wartende Verdopplungen</li>
@@ -160,101 +160,101 @@ case 'update': // Update an extension
   <li>Teilnehmer an der Aktiv-Rallye</li>
   <li>Nett hinweisende Linktitel hinzugef&uuml;gt. :-)</li>
 </ul>");
+                               break;
+
+                       case '0.1.7': // SQL queries for v0.1.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Direkt Links zum Sponsorenbereich vorbereitend eingebaut.");
+                               break;
+
+                       case '0.1.8': // SQL queries for v0.1.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Es werden alle installierten und aktivierten Themes angezeigt und verlinkt.");
+                               break;
+
+                       case '0.1.9': // SQL queries for v0.1.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("CSS-Datei in general.css verschmolzen (Patch 435!)");
+                               break;
+
+                       case '0.2.0': // SQL queries for v0.2.0
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Alle Administratoren, Referal-Banner und aktivierte Referal-Banner werden nun eingeblendet.");
+                               break;
+
+                       case '0.2.1': // SQL queries for v0.2.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Problem mit &uuml;berlanger Textbreite beseitigt.");
+                               break;
+
+                       case '0.2.2': // SQL queries for v0.2.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Link zum Freischalten von Sponoren-Accounts korregiert.");
+                               break;
+
+                       case '0.2.3': // SQL queries for v0.2.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Sortierungsreihenfolge grundlegend ge&auml;ndert: Es wird jetzt nach Mitglieder-ID, Aufgabenbereich, Infos und nach dem Erstellunsdatum sortiert.");
+                               break;
+
+                       case '0.2.4': // SQL queries for v0.2.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+                               break;
+
+                       case '0.2.5': // SQL queries for v0.2.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("<strong>Nur mit bonus v0.6.9 oder h&ouml;her:</strong> Zuschaltbare Bonis werden auch bei der Ermittlung Anzahl teilnehmender Mitglieder mit ber&uumk;cksichtigt.");
+                               break;
+
+                       case '0.2.6': // SQL queries for v0.2.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Teilnehmer der Bettel-Rallye werden angezeigt.");
+                               break;
+
+                       case '0.2.7': // SQL queries for v0.2.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Link zum direkten Aufheben einer Urlaubsschaltung eines Mitgliedes korregiert.");
+                               break;
+
+                       case '0.2.8': // SQL queries for v0.2.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Sicherheitsupdate f&uuml;r die Include-Befehle.");
+                               break;
+
+                       case '0.2.9': // SQL queries for v0.2.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt. Update-Aufgaben werden nach &quot;Bearbeitung&quot; nicht mehr als <strong>Erledigt</strong> gesetzt. Dies hatte sonst den Anschein, die Update-Aufgaben m&uuml;ssten erledigt werden, um die Erweiterungs-Updates einzuspielen, was aber automatisch geschieht.");
+                               break;
+
+                       case '0.3.0': // SQL queries for v0.3.0
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Export-Accounts werden in Task-&Uuml;bersicht aufgelistet.");
+                               break;
+
+                       case '0.3.1': // SQL queries for v0.3.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Diverse Fixes an den Templates (Notice-Hinweise vom PHP-Interpreter entfernt).");
+                               break;
+
+                       case '0.3.2': // SQL queries for v0.3.2
+                               // This update depends on user update
+                               EXT_ADD_UPDATE_DEPENDS('sql_patches');
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("H&auml;ngt nun von <u>ext-user</u> ab.");
+                               break;
+               }
                break;
 
-       case '0.1.7': // SQL queries for v0.1.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Direkt Links zum Sponsorenbereich vorbereitend eingebaut.");
-               break;
-
-       case '0.1.8': // SQL queries for v0.1.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Es werden alle installierten und aktivierten Themes angezeigt und verlinkt.");
-               break;
-
-       case '0.1.9': // SQL queries for v0.1.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("CSS-Datei in general.css verschmolzen (Patch 435!)");
-               break;
-
-       case '0.2.0': // SQL queries for v0.2.0
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Alle Administratoren, Referal-Banner und aktivierte Referal-Banner werden nun eingeblendet.");
-               break;
-
-       case '0.2.1': // SQL queries for v0.2.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Problem mit &uuml;berlanger Textbreite beseitigt.");
-               break;
-
-       case '0.2.2': // SQL queries for v0.2.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Link zum Freischalten von Sponoren-Accounts korregiert.");
-               break;
-
-       case '0.2.3': // SQL queries for v0.2.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Sortierungsreihenfolge grundlegend ge&auml;ndert: Es wird jetzt nach Mitglieder-ID, Aufgabenbereich, Infos und nach dem Erstellunsdatum sortiert.");
-               break;
-
-       case '0.2.4': // SQL queries for v0.2.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
-               break;
-
-       case '0.2.5': // SQL queries for v0.2.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("<strong>Nur mit bonus v0.6.9 oder h&ouml;her:</strong> Zuschaltbare Bonis werden auch bei der Ermittlung Anzahl teilnehmender Mitglieder mit ber&uumk;cksichtigt.");
-               break;
-
-       case '0.2.6': // SQL queries for v0.2.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Teilnehmer der Bettel-Rallye werden angezeigt.");
-               break;
-
-       case '0.2.7': // SQL queries for v0.2.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Link zum direkten Aufheben einer Urlaubsschaltung eines Mitgliedes korregiert.");
-               break;
-
-       case '0.2.8': // SQL queries for v0.2.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Sicherheitsupdate f&uuml;r die Include-Befehle.");
-               break;
-
-       case '0.2.9': // SQL queries for v0.2.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt. Update-Aufgaben werden nach &quot;Bearbeitung&quot; nicht mehr als <strong>Erledigt</strong> gesetzt. Dies hatte sonst den Anschein, die Update-Aufgaben m&uuml;ssten erledigt werden, um die Erweiterungs-Updates einzuspielen, was aber automatisch geschieht.");
-               break;
-
-       case '0.3.0': // SQL queries for v0.3.0
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Export-Accounts werden in Task-&Uuml;bersicht aufgelistet.");
-               break;
-
-       case '0.3.1': // SQL queries for v0.3.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Diverse Fixes an den Templates (Notice-Hinweise vom PHP-Interpreter entfernt).");
-               break;
-
-       case '0.3.2': // SQL queries for v0.3.2
-               // This update depends on user update
-               EXT_ADD_UPDATE_DEPENDS('sql_patches');
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("H&auml;ngt nun von <u>ext-user</u> ab.");
-               break;
-       }
-       break;
-
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 // Keep this extension always active!
index be1cc942d6901afc3e6b53b61da3f447f6d8fd79..9a8e5313db292452399b35a8a8c9660f0df0597e 100644 (file)
@@ -50,76 +50,76 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // Drop theme table
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_themes`");
-
-       // Delete admin menu
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='theme'");
-
-       // Delete guest menu entries
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='themes'");
-
-       // Delete member menu entries
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='themes' OR `what`='themes'");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("HTML-Code f&uuml;r ein Zeilen-Template ausgelagert.");
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
                break;
 
-       case '0.0.2': // SQL queries for v0.0.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
-               break;
+       case 'remove': // Do stuff when removing extension
+               // Drop theme table
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_themes`");
 
-       case '0.0.3': // SQL queries for v0.0.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Im Men&uuml;punkt &quot;Pr&uuml;fen&quot; wurden die bereits installierten und auch aktuellen Themes nicht ausgeblendet.");
-               break;
+               // Delete admin menu
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='theme'");
 
-       case '0.0.4': // SQL queries for v0.0.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Sicherheitsupdate f&uuml;r die Include-Befehle.");
-               break;
+               // Delete guest menu entries
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='themes'");
 
-       case '0.0.5': // SQL queries for v0.0.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("<strong>setSession()</strong> mit @-Zeichen gegen ungewollte Ausgaben abgesichert.");
+               // Delete member menu entries
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='themes' OR `what`='themes'");
                break;
 
-       case '0.0.6': // SQL queries for v0.0.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Variablen-Handling skriptglobal ge&auml;ndert.");
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.0.7': // SQL queries for v0.0.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Ung&uuml;ltiges Update.");
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.0.8': // SQL queries for v0.0.8
-               // Theme table
-               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_themes`");
-               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_themes` (
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("HTML-Code f&uuml;r ein Zeilen-Template ausgelagert.");
+                               break;
+
+                       case '0.0.2': // SQL queries for v0.0.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+                               break;
+
+                       case '0.0.3': // SQL queries for v0.0.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Im Men&uuml;punkt &quot;Pr&uuml;fen&quot; wurden die bereits installierten und auch aktuellen Themes nicht ausgeblendet.");
+                               break;
+
+                       case '0.0.4': // SQL queries for v0.0.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Sicherheitsupdate f&uuml;r die Include-Befehle.");
+                               break;
+
+                       case '0.0.5': // SQL queries for v0.0.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("<strong>setSession()</strong> mit @-Zeichen gegen ungewollte Ausgaben abgesichert.");
+                               break;
+
+                       case '0.0.6': // SQL queries for v0.0.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Variablen-Handling skriptglobal ge&auml;ndert.");
+                               break;
+
+                       case '0.0.7': // SQL queries for v0.0.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Ung&uuml;ltiges Update.");
+                               break;
+
+                       case '0.0.8': // SQL queries for v0.0.8
+                               // Theme table
+                               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_themes`");
+                               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_themes` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 theme_path VARCHAR(255) NOT NULL DEFAULT '',
 theme_name VARCHAR(255) NOT NULL DEFAULT '',
@@ -130,38 +130,38 @@ UNIQUE KEY (`theme_path`),
 INDEX (`theme_active`)
 ) TYPE={!_TABLE_TYPE!} COMMENT='Themes'");
 
-               // Admin menu
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme', NULL, 'Themes','Verwalten Sie hier alle Designs (Themes) Ihres Mailtausch-Scriptes.', 8)");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_import','Importieren','Es wird das Verzeichnis &quot;theme&quot; nach neuen Ordnern durchsucht und anschliessend in die Datenbank gesperrt aufgenommen.', 1)");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_edit','Modifizieren','&Auml;ndern Sie Titel, Freigaben usw. an den Themes. Sie k&ouml;nnen bis auf das Standart-Theme &quot;default&quot; auch Themes aus der Datenbank entfernen. Vorher sollten Sie es jedoch vom Server l&ouml;schen, damit es niht erneut importiert werden kann.', 2)");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_check','Pr&uuml;fen','Nach neuen Themes suchen bzw. nach Updates zu den Themes suchen.', 3)");
+                               // Admin menu
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme', NULL, 'Themes','Verwalten Sie hier alle Designs (Themes) Ihres Mailtausch-Scriptes.', 8)");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_import','Importieren','Es wird das Verzeichnis &quot;theme&quot; nach neuen Ordnern durchsucht und anschliessend in die Datenbank gesperrt aufgenommen.', 1)");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_edit','Modifizieren','&Auml;ndern Sie Titel, Freigaben usw. an den Themes. Sie k&ouml;nnen bis auf das Standart-Theme &quot;default&quot; auch Themes aus der Datenbank entfernen. Vorher sollten Sie es jedoch vom Server l&ouml;schen, damit es niht erneut importiert werden kann.', 2)");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_check','Pr&uuml;fen','Nach neuen Themes suchen bzw. nach Updates zu den Themes suchen.', 3)");
 
-               // Guest menu
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',4,'Y','N')");
+                               // Guest menu
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',4,'Y','N')");
 
-               // Memember menu
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',3,'Y','N')");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','themes','Designs', 6,'Y','N')");
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `sort`='8' WHERE `action`='themes' LIMIT 1");
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='account', `sort`='1', `title`='Designs' WHERE `what`='themes' LIMIT 1");
+                               // Memember menu
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',3,'Y','N')");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','themes','Designs', 6,'Y','N')");
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `sort`='8' WHERE `action`='themes' LIMIT 1");
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='account', `sort`='1', `title`='Designs' WHERE `what`='themes' LIMIT 1");
 
-               // User data
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD curr_theme VARCHAR(255) NOT NULL DEFAULT 'default'");
+                               // User data
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD curr_theme VARCHAR(255) NOT NULL DEFAULT 'default'");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Update von <u>sql_patches</u> &uuml;bertragen. (Kann Fehlermeldungen verursacht haben!)");
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Update von <u>sql_patches</u> &uuml;bertragen. (Kann Fehlermeldungen verursacht haben!)");
+                               break;
+               }
                break;
-       }
-       break;
 
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 //
index 6823e6bee590c5e3bac0294f0f5840e7946ff095..10bba6821e997e7b9b6da6bc38ebdc8b725a29e8 100644 (file)
@@ -50,102 +50,102 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','top10','TOP-10','Y','Y', 7)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_top10','TOP-10 Listen','Stellen Sie hier ein, wie lang die TOP-Listen sein sollen, also wie viele Pl&auml;tze angezeigt werden sollen.', 8)");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD top10_max TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='top10'");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_top10'");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='top10' LIMIT 1");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='top10' LIMIT 1");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler <em>Column: 'userid' in group statement is ambiguous</em> im Gastbereich beseitigt.");
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','top10','TOP-10','Y','Y', 7)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_top10','TOP-10 Listen','Stellen Sie hier ein, wie lang die TOP-Listen sein sollen, also wie viele Pl&auml;tze angezeigt werden sollen.', 8)");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD top10_max TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
                break;
 
-       case '0.0.2': // SQL queries for v0.0.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei ge&auml;ndert.");
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='top10'");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_top10'");
                break;
 
-       case '0.0.3': // SQL queries for v0.0.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='top10' LIMIT 1");
                break;
 
-       case '0.0.4': // SQL queries for v0.0.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='top10' LIMIT 1");
                break;
 
-       case '0.0.5': // SQL queries for v0.0.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler <em>Column: 'userid' in group statement is ambiguous</em> im Gastbereich beseitigt.");
+                               break;
+
+                       case '0.0.2': // SQL queries for v0.0.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei ge&auml;ndert.");
+                               break;
+
+                       case '0.0.3': // SQL queries for v0.0.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.0.4': // SQL queries for v0.0.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
+                               break;
+
+                       case '0.0.5': // SQL queries for v0.0.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+                               break;
+
+                       case '0.0.6': // SQL queries for v0.0.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Im Gastbereich konnte als Nicht-Admin die Seite nicht ge&ouml;ffnet werden.");
+                               break;
+
+                       case '0.0.7': // SQL queries for v0.0.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Design &quot;Solid-Business&quot; eingebaut.");
+                               break;
+
+                       case '0.0.8': // SQL queries for v0.0.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+                               break;
+
+                       case '0.0.9': // SQL queries for v0.0.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Rechtschreibefehler beseitigt.");
+                               break;
+
+                       case '0.1.0': // SQL queries for v0.2.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+                               break;
+
+                       case '0.1.1': // SQL queries for v0.1.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+                               break;
+
+                       case '0.1.2': // SQL queries for v0.1.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+                               break;
+               }
                break;
 
-       case '0.0.6': // SQL queries for v0.0.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Im Gastbereich konnte als Nicht-Admin die Seite nicht ge&ouml;ffnet werden.");
-               break;
-
-       case '0.0.7': // SQL queries for v0.0.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Design &quot;Solid-Business&quot; eingebaut.");
-               break;
-
-       case '0.0.8': // SQL queries for v0.0.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
-               break;
-
-       case '0.0.9': // SQL queries for v0.0.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Rechtschreibefehler beseitigt.");
-               break;
-
-       case '0.1.0': // SQL queries for v0.2.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
-               break;
-
-       case '0.1.1': // SQL queries for v0.1.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
-               break;
-
-       case '0.1.2': // SQL queries for v0.1.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
-               break;
-       }
-       break;
-
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 //
index c9f433d9c3db302c7ba094f1a7d7d4707b82c00b..658b82d40af5b859bbe4b7627b495cf0dd96933a 100644 (file)
@@ -50,13 +50,13 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running
-       // SQL commands to run
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_in`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_out`");
+       case 'register': // Do stuff when installation is running
+               // SQL commands to run
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_in`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_out`");
 
-       // Transfer from a member
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_transfers_in` (
+               // Transfer from a member
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_transfers_in` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 from_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -69,8 +69,8 @@ KEY (from_uid),
 PRIMARY KEY(id)
 ) Type={!_TABLE_TYPE!}");
 
-       // Transfers to a member
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_transfers_out` (
+               // Transfers to a member
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_transfers_out` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 to_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -83,213 +83,213 @@ KEY (to_uid),
 PRIMARY KEY(id)
 ) Type={!_TABLE_TYPE!}");
 
-       // Admin menu
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer', NULL, '{!POINTS!}-Transfer','Verwalten Sie hier die {!POINTS!}-Transaktionen zwischen Ihren Mitgliedern.', 7)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','list_transfer','Auflisten','Hier bekommen Sie alle ein- und ausgehende Transaktionen aufgelistet.', 1)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','config_transfer','Einstellungen','Stellen Sie ein, wie viele Transaktionen aufgelistet werden sollen und wie alt diese werden d&uuml;rfen. Die evtl. installierte autopurge-Erweiterung kann dann automatisch die veralteten Transktionen l&ouml;schen.', 2)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','del_transfer','Manuell l&ouml;schen','Hier k&ouml;nnen Sie - abgesehen von der automatischen L&ouml;schung - Transaktionen selber l&ouml;schen. Bitte beachten Sie, dass immer aus- und eingehende Transaktionen gleichzeitig gel&ouml;scht werden.', 3)");
-
-       // Member menu
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','transfer','{!POINTS!}-Transfer','Y','Y', 5)");
-
-       // Add config values
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '50'");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_age BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('one_day')*28)."'");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '".getConfig('one_day')."'");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_balance BIGINT(20) UNSIGNED NOT NULL DEFAULT 100");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 5");
-
-       // Add row(s) to user's data
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD opt_in ENUM('Y','N') NOT NULL DEFAULT 'N'");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_in`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_out`");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='transfer'");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='transfer'");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP `opt_in`");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='transfer' LIMIT 1");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='transfer' LIMIT 1");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.2': // SQL queries for v0.0.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler <div class=\"admin_failed\">Warning: Missing argument 2 for create_timestamp_from_selections() in {!PATH!}inc/libs/pro_functions.php on line 227</div> behoben.");
-               break;
-
-       case '0.0.3': // SQL queries for v0.0.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("&Uuml;berfl&uuml;ssige unset()-Anweisungen aus der what-config_transfer.php entfernt. Dies wird bereits von der eigenen Funktion ADMIN_SAVE_SETTINGS() erledigt.");
-               break;
-
-       case '0.0.3': // SQL queries for v0.0.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
-               break;
-
-       case '0.0.5': // SQL queries for v0.0.5
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_transfer ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Link <em>Auflisten</em> im Admin-Bereich hatte das eingeloggte Mitglied und nicht den eingeloggten Admin abgefragt. Automatisches L&ouml;schen von veraltete Eintr&auml;gen kann unabh&auml;ngig von der autopurge-Erweiterung de-/aktiviert werden. Bitte aktualisieren Sie auch die beiden Admin-Templates!");
-               break;
-
-       case '0.0.6': // SQL queries for v0.0.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei ge&auml;ndert.");
-               break;
-
-       case '0.0.7': // SQL queries for v0.0.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
-               break;
-
-       case '0.0.8': // SQL queries for v0.0.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Problem mit E in Transaktionsnummer beseitigt.");
-               break;
-
-       case '0.0.9': // SQL queries for v0.0.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
-               break;
-
-       case '0.1.0': // SQL queries for v0.2.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
-               break;
-
-       case '0.1.1': // SQL queries for v0.1.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Design &quot;Solid-Business&quot; eingebaut.");
-               break;
-
-       case '0.1.2': // SQL queries for v0.1.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
-               break;
-
-       case '0.1.3': // SQL queries for v0.1.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt.");
-               break;
+               // Admin menu
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer', NULL, '{!POINTS!}-Transfer','Verwalten Sie hier die {!POINTS!}-Transaktionen zwischen Ihren Mitgliedern.', 7)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','list_transfer','Auflisten','Hier bekommen Sie alle ein- und ausgehende Transaktionen aufgelistet.', 1)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','config_transfer','Einstellungen','Stellen Sie ein, wie viele Transaktionen aufgelistet werden sollen und wie alt diese werden d&uuml;rfen. Die evtl. installierte autopurge-Erweiterung kann dann automatisch die veralteten Transktionen l&ouml;schen.', 2)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','del_transfer','Manuell l&ouml;schen','Hier k&ouml;nnen Sie - abgesehen von der automatischen L&ouml;schung - Transaktionen selber l&ouml;schen. Bitte beachten Sie, dass immer aus- und eingehende Transaktionen gleichzeitig gel&ouml;scht werden.', 3)");
 
-       case '0.1.4': // SQL queries for v0.1.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
-               break;
-
-       case '0.1.5': // SQL queries for v0.1.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Template <u>admin_config_transfer_pro.tpl</u> ist &uuml;berfl&uuml;ssig geworden. Bitte l&ouml;schen Sie dies!");
-               break;
-
-       case '0.1.6': // SQL queries for v0.1.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
-               break;
-
-       case '0.1.7': // SQL queries for v0.1.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Wort <strong>Punkte</strong> dynamisiert.");
-               break;
-
-       case '0.1.8': // SQL queries for v0.1.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
-               break;
-
-       case '0.1.9': // SQL queries for v0.1.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Parser-Error im Mitgliedsbereich beseitigt.");
-               break;
-
-       case '0.2.0': // SQL queries for v0.2.0
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
-               break;
-
-       case '0.2.1': // SQL queries for v0.2.1
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Durchf&uuml;hrung des Transfers korregiert.");
-               break;
-
-       case '0.2.2': // SQL queries for v0.2.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Sicherheitsupdate f&uuml;r die Include-Befehle.");
-               break;
-
-       case '0.2.3': // SQL queries for v0.2.3
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'list_transfer')");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'del_transfer')");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('config', '', 'config_transfer')");
-
-               // Depends on sql_patches (or you have to execute these both SQL statements by phpMyAdmin
-               EXT_ADD_UPDATE_DEPENDS('sql_patches');
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Erweiterung in's neue Men&uuml;system integriert.");
-               break;
-
-       case '0.2.4': // SQL queries for v0.2.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("<strong>Touring-Code wiederholen</strong> nach <strong>Touring-Code eingeben</strong> hin ge&auml;ndert.");
-               break;
+               // Member menu
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','transfer','{!POINTS!}-Transfer','Y','Y', 5)");
 
-       case '0.2.5': // SQL queries for v0.2.5
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='5' WHERE `what`='transfer' LIMIT 1");
+               // Add config values
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '50'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_age BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('one_day')*28)."'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '".getConfig('one_day')."'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_balance BIGINT(20) UNSIGNED NOT NULL DEFAULT 100");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 5");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Mitgliedsmen&uuml; komplett ge&auml;ndert.");
+               // Add row(s) to user's data
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD opt_in ENUM('Y','N') NOT NULL DEFAULT 'N'");
                break;
 
-       case '0.2.6': // SQL queries for v0.2.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.");
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_in`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_out`");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='transfer'");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='transfer'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP `opt_in`");
                break;
 
-       case '0.2.7': // SQL queries for v0.2.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Die {!POINTS!} k&ouml;nnen nun wieder wie gewohnt transferiert werden. Der Grund f&uuml;r <em>{--TRANSFER_INVALID_PASSWORD--}</em> war, dass der Cookie-Hash ein anderer ist, als der in der Datenbank... :-/");
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='transfer' LIMIT 1");
                break;
 
-       case '0.2.8': // SQL queries for v0.2.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlermeldung <em>Notice: Undefined index: to_uid in {!PATH!}/inc/modules/member/what-transfer.php on line 301</em> gefixt. Danke an <a href=\"http://forum.mxchange.org/profile-8.html\" target=\"_blank\" title=\"Forumprofil von Piter01\">Piter01</a>.");
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='transfer' LIMIT 1");
                break;
 
-       case '0.2.9': // SQL queries for v0.2.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.2': // SQL queries for v0.0.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler <div class=\"admin_failed\">Warning: Missing argument 2 for create_timestamp_from_selections() in {!PATH!}inc/libs/pro_functions.php on line 227</div> behoben.");
+                               break;
+
+                       case '0.0.3': // SQL queries for v0.0.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("&Uuml;berfl&uuml;ssige unset()-Anweisungen aus der what-config_transfer.php entfernt. Dies wird bereits von der eigenen Funktion ADMIN_SAVE_SETTINGS() erledigt.");
+                               break;
+
+                       case '0.0.3': // SQL queries for v0.0.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
+                               break;
+
+                       case '0.0.5': // SQL queries for v0.0.5
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_transfer ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Link <em>Auflisten</em> im Admin-Bereich hatte das eingeloggte Mitglied und nicht den eingeloggten Admin abgefragt. Automatisches L&ouml;schen von veraltete Eintr&auml;gen kann unabh&auml;ngig von der autopurge-Erweiterung de-/aktiviert werden. Bitte aktualisieren Sie auch die beiden Admin-Templates!");
+                               break;
+
+                       case '0.0.6': // SQL queries for v0.0.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei ge&auml;ndert.");
+                               break;
+
+                       case '0.0.7': // SQL queries for v0.0.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.0.8': // SQL queries for v0.0.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Problem mit E in Transaktionsnummer beseitigt.");
+                               break;
+
+                       case '0.0.9': // SQL queries for v0.0.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
+                               break;
+
+                       case '0.1.0': // SQL queries for v0.2.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Men&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;nnen nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+                               break;
+
+                       case '0.1.1': // SQL queries for v0.1.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Design &quot;Solid-Business&quot; eingebaut.");
+                               break;
+
+                       case '0.1.2': // SQL queries for v0.1.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+                               break;
+
+                       case '0.1.3': // SQL queries for v0.1.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt.");
+                               break;
+
+                       case '0.1.4': // SQL queries for v0.1.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
+                               break;
+
+                       case '0.1.5': // SQL queries for v0.1.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Template <u>admin_config_transfer_pro.tpl</u> ist &uuml;berfl&uuml;ssig geworden. Bitte l&ouml;schen Sie dies!");
+                               break;
+
+                       case '0.1.6': // SQL queries for v0.1.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+                               break;
+
+                       case '0.1.7': // SQL queries for v0.1.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Wort <strong>Punkte</strong> dynamisiert.");
+                               break;
+
+                       case '0.1.8': // SQL queries for v0.1.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+                               break;
+
+                       case '0.1.9': // SQL queries for v0.1.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Parser-Error im Mitgliedsbereich beseitigt.");
+                               break;
+
+                       case '0.2.0': // SQL queries for v0.2.0
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+                               break;
+
+                       case '0.2.1': // SQL queries for v0.2.1
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Durchf&uuml;hrung des Transfers korregiert.");
+                               break;
+
+                       case '0.2.2': // SQL queries for v0.2.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Sicherheitsupdate f&uuml;r die Include-Befehle.");
+                               break;
+
+                       case '0.2.3': // SQL queries for v0.2.3
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'list_transfer')");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'del_transfer')");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('config', '', 'config_transfer')");
+
+                               // Depends on sql_patches (or you have to execute these both SQL statements by phpMyAdmin
+                               EXT_ADD_UPDATE_DEPENDS('sql_patches');
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Erweiterung in's neue Men&uuml;system integriert.");
+                               break;
+
+                       case '0.2.4': // SQL queries for v0.2.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("<strong>Touring-Code wiederholen</strong> nach <strong>Touring-Code eingeben</strong> hin ge&auml;ndert.");
+                               break;
+
+                       case '0.2.5': // SQL queries for v0.2.5
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='5' WHERE `what`='transfer' LIMIT 1");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Mitgliedsmen&uuml; komplett ge&auml;ndert.");
+                               break;
+
+                       case '0.2.6': // SQL queries for v0.2.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.");
+                               break;
+
+                       case '0.2.7': // SQL queries for v0.2.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Die {!POINTS!} k&ouml;nnen nun wieder wie gewohnt transferiert werden. Der Grund f&uuml;r <em>{--TRANSFER_INVALID_PASSWORD--}</em> war, dass der Cookie-Hash ein anderer ist, als der in der Datenbank... :-/");
+                               break;
+
+                       case '0.2.8': // SQL queries for v0.2.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlermeldung <em>Notice: Undefined index: to_uid in {!PATH!}/inc/modules/member/what-transfer.php on line 301</em> gefixt. Danke an <a href=\"http://forum.mxchange.org/profile-8.html\" target=\"_blank\" title=\"Forumprofil von Piter01\">Piter01</a>.");
+                               break;
+
+                       case '0.2.9': // SQL queries for v0.2.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+                               break;
+               }
                break;
-       }
-       break;
 
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       if ((isResetModeEnabled()) && (getConfig('ap_transfer') == 'Y')) {
-               // Automatically remove outdated or not displayed transactions
-               TRANSFER_AUTPPURGE(getConfig('transfer_max'), getConfig('transfer_age'));
-       }
-       break;
+                       default: // Do stuff when extension is loaded
+                               if ((isResetModeEnabled()) && (getConfig('ap_transfer') == 'Y')) {
+                                       // Automatically remove outdated or not displayed transactions
+                                       TRANSFER_AUTPPURGE(getConfig('transfer_max'), getConfig('transfer_age'));
+                               }
+                               break;
 }
 
 //
index c9feacedb939cbf9b55e9a2373a754e83eafb9f3..253ec886f6c8874251c62b2e2588a9306174071c 100644 (file)
@@ -50,45 +50,45 @@ EXT_SET_VER_HISTORY(array('0.0'));
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats','usage','Aufrufstatistik','Erkennt automatisch Ihre Aufrufstatisiken und bindet diese in das Admin-Interface ein. (Derzeit nur Webalizer!)',9)");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `usage_base` VARCHAR(255) NOT NULL DEFAULT 'usage'");
-       break;
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats','usage','Aufrufstatistik','Erkennt automatisch Ihre Aufrufstatisiken und bindet diese in das Admin-Interface ein. (Derzeit nur Webalizer!)',9)");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `usage_base` VARCHAR(255) NOT NULL DEFAULT 'usage'");
+               break;
 
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='usage'");
-       break;
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='usage'");
+               break;
 
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       break;
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               break;
 
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       break;
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               break;
 
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               ADD_EXT_SQL("");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               ADD_EXT_SQL('');
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("");
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES('');
+                               break;
+               }
                break;
-       }
-       break;
 
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 //
index 8b4a1c8b75f567367faad5ed4f6b392a89e61999..7fdd09ae579348c463f4cc3d71351c557a0e3b50 100644 (file)
@@ -50,9 +50,9 @@ EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.2', '0.1.3', '0
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_cats`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_cats` (
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_cats`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_cats` (
   `id` BIGINT(22) NOT NULL AUTO_INCREMENT,
   `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
   `cat_id` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
@@ -61,8 +61,8 @@ INDEX (`userid`),
 INDEX (`cat_id`)
 ) TYPE={!_TABLE_TYPE!}");
 
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_data`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_data` (
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_data`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_data` (
   `userid` BIGINT(22) NOT NULL AUTO_INCREMENT,
   `surname` VARCHAR(255) NOT NULL DEFAULT '',
   `family` VARCHAR(255) NOT NULL DEFAULT '',
@@ -102,8 +102,8 @@ INDEX (`refid`),
 INDEX `status_mails` (`status`,`max_mails`)
 ) TYPE={!_TABLE_TYPE!}");
 
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_points`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_points` (
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_points`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_points` (
   `id` BIGINT(22) NOT NULL AUTO_INCREMENT,
   `userid` BIGINT(22) NOT NULL DEFAULT 0,
   `ref_depth` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
@@ -113,8 +113,8 @@ PRIMARY KEY  (`id`),
 INDEX (`userid`)
 ) TYPE={!_TABLE_TYPE!}");
 
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_links`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_links` (
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_links`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_links` (
   `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
   `stats_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
   `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -124,8 +124,8 @@ INDEX (`userid`),
 INDEX (`stats_id`)
 ) TYPE={!_TABLE_TYPE!}");
 
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_stats` (
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_stats` (
   `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
   `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
   `cat_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -145,8 +145,8 @@ INDEX (`payment_id`),
 INDEX (`pool_id`)
 ) TYPE={!_TABLE_TYPE!}");
 
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats_data`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_stats_data` (
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats_data`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_stats_data` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `stats_type` VARCHAR(255) NOT NULL DEFAULT 'unknown',
@@ -157,198 +157,198 @@ INDEX (`userid`),
 INDEX (`stats_type`)
 ) TYPE={!_TABLE_TYPE!} COMMENT='Member statistics data'");
 
-       // Admin menu
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user',NULL,'Mitglieder-Management','Mitglieder freischalten, sperren, Accounts editieren, Neuanmeldungen verwalten, {!POINTS!} gutschreiben und abziehen und und und...',3)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','del_user','Mitglied l&ouml;schen','L&ouml;schen Sie hier Mitglied, die gegen die AGBs mehrmals verstossen haben. Bitte seien Sie nett zu Ihren Mitgliedern und l&ouml;schen Sie nicht gleich.',1)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','chk_regs','Anmeldungen pr&uuml;fen','Pr&uuml;fen Sie hier neue Anmeldungen zu Ihrem System. Hier k&ouml;nnen Sie im Falle einer Fehler-Mail den Mitglied gleich wieder l&ouml;schen!',2)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','lock_user','Mitglied sperren / entsperren','Sperren Sie Mitglied, die zu viele unbest&auml;tigte Mails haben oder gegen Ihre AGBs verstossen haben &uuml;ber diesen Men&uuml;punkt.',3)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_user','Mitglied auflisten','Listen Sie alle Mitglied oder eingeschr&auml;nkt nach Suchkritieren Ihre Userdatenbank auf. Sie k&ouml;nen per Klick auf die Usernummer sich Details zum Mitglied ansehen.',4)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','add_points','{!POINTS!} gutschreiben','Buchen Sie einem Mitglied direkt {!POINTS!} auf. Sie k&ouml;nnen dazu auch einen Kommentar mitsenden.',5)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','edit_user','Account editieren','Daten eines Mitglieder-Accountes &auml;ndern.',6)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_refs','Referals anzeigen','Mit diesem Men&uuml;punkt k&ouml;nnen Sie die generierten Referals eines Mitgliedes auflisten.',7)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_links','Unbest&auml;tigte Mails','Mit diesem Men&uuml;punkt k&ouml;nnen Sie die vom Mitglied nicht best&auml;tigten Mails anzeigen.',8)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_cats','Kategorien anzeigen','Listet die ausgew&auml;hlten Kategorien eines Mitgliedes auf.',9)");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what` IN('config_user','user_contct','list_user_del') OR `action`='user'");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_del`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_cats`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_data`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_points`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_links`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats`");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats_data`");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.1.0': // SQL queries for v0.1
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_limit` INT(7) UNSIGNED NOT NULL DEFAULT 20");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Seitenweises Anzeigen der User-Liste ist nun m&ouml;glich.");
+               // Admin menu
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user',NULL,'Mitglieder-Management','Mitglieder freischalten, sperren, Accounts editieren, Neuanmeldungen verwalten, {!POINTS!} gutschreiben und abziehen und und und...',3)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','del_user','Mitglied l&ouml;schen','L&ouml;schen Sie hier Mitglied, die gegen die AGBs mehrmals verstossen haben. Bitte seien Sie nett zu Ihren Mitgliedern und l&ouml;schen Sie nicht gleich.',1)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','chk_regs','Anmeldungen pr&uuml;fen','Pr&uuml;fen Sie hier neue Anmeldungen zu Ihrem System. Hier k&ouml;nnen Sie im Falle einer Fehler-Mail den Mitglied gleich wieder l&ouml;schen!',2)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','lock_user','Mitglied sperren / entsperren','Sperren Sie Mitglied, die zu viele unbest&auml;tigte Mails haben oder gegen Ihre AGBs verstossen haben &uuml;ber diesen Men&uuml;punkt.',3)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_user','Mitglied auflisten','Listen Sie alle Mitglied oder eingeschr&auml;nkt nach Suchkritieren Ihre Userdatenbank auf. Sie k&ouml;nen per Klick auf die Usernummer sich Details zum Mitglied ansehen.',4)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','add_points','{!POINTS!} gutschreiben','Buchen Sie einem Mitglied direkt {!POINTS!} auf. Sie k&ouml;nnen dazu auch einen Kommentar mitsenden.',5)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','edit_user','Account editieren','Daten eines Mitglieder-Accountes &auml;ndern.',6)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_refs','Referals anzeigen','Mit diesem Men&uuml;punkt k&ouml;nnen Sie die generierten Referals eines Mitgliedes auflisten.',7)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_links','Unbest&auml;tigte Mails','Mit diesem Men&uuml;punkt k&ouml;nnen Sie die vom Mitglied nicht best&auml;tigten Mails anzeigen.',8)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_cats','Kategorien anzeigen','Listet die ausgew&auml;hlten Kategorien eines Mitgliedes auf.',9)");
                break;
 
-       case '0.1.1': // SQL queries for v0.1.1
-               // This update depends on sql_patches update!
-               EXT_ADD_UPDATE_DEPENDS('sql_patches');
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Ung&uuml;ltiges Update.");
-               break;
-
-       case '0.1.2': // SQL queries for v0.1.2
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `mails_confirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Dem Mitglied wird nun angezeigt, wie viele Mails er best&auml;tigt hat. Alle vor dieser Version best. Mails werden leider nicht mehr ber&uuml;cksichtigt! Bitte teilen Sie dies Ihren Mitgliedern mit.");
-               break;
-
-       case '0.1.3': // SQL queries for v0.1.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Den Pfad <em>Sie sind hier</em> im Men&uuml;punkt <u>Online-Liste</u> erweitert.");
-               break;
-
-       case '0.1.4': // SQL queries for v0.1.4
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `emails_received` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Anzahl empfangener Mails wird angezeigt. <big>Diese Anzeige kann fehlerhaft sein, wenn Sie bereits Mitglieder in Ihrem {!MT_WORD!} haben sollen!</big>");
-               break;
-
-       case '0.1.5': // SQL queries for v0.1.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
-               break;
-
-       case '0.1.6': // SQL queries for v0.1.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
-               break;
-
-       case '0.1.7': // SQL queries for v0.1.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
-               break;
-
-       case '0.1.8': // SQL queries for v0.1.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
-               break;
-
-       case '0.1.9': // SQL queries for v0.1.9
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
-               break;
-
-       case '0.2.0': // SQL queries for v0.2.0
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("User-Liste ausgelagert in Templates und &uuml;berbreite Zeile in 2er-Zeile umgewandelt.");
-               break;
-
-       case '0.2.1': // SQL queries for v0.2.1
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_alpha` TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_user','Mitgliederliste','Anzahl Mitglieder pro Seite, Anzahl Buchstaben pro Zeile usw.', 8)");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("User-Liste ist konfigurierbar: Anzahl Mitglieder pro Seite und Anzahl Buchstaben pro Zeile; Template-Fehler beseitigt.");
-               break;
-
-       case '0.2.2': // SQL queries for v0.2.2
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE `gender` `gender` ENUM('M','F','C') NOT NULL DEFAULT 'M'");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Anrede &quot;Firma&quot; hinzugef&uuml;gt.");
-               break;
-
-       case '0.2.3': // SQL queries for v0.2.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausf&uuml;hrlich.");
-               break;
-
-       case '0.2.4': // SQL queries for v0.2.4
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
-               break;
-
-       case '0.2.5': // SQL queries for v0.2.5
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("SQL-Anweisungen abgesichert.");
-               break;
-
-       case '0.2.6': // SQL queries for v0.2.6
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
-               break;
-
-       case '0.2.7': // SQL queries for v0.2.7
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Sicherheitsupdate f&uuml;r die Include-Befehle.");
-               break;
-
-       case '0.2.8': // SQL queries for v0.2.8
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt.");
-               break;
-
-       case '0.2.9': // SQL queries for v0.2.9
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','user_contct','Mitglied kontaktieren','Kontaktieren Sie hier Ihre Mitglieder ganz direkt &uuml;ber ein Webformular. Sie brauchen somit kein EMail-Programm mehr starten!', 8)");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Admin-Kontaktformular hinzugef&uuml;gt.");
-               break;
-
-       case '0.3.0': // SQL queries for v0.3.0
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.<br />Diverse Fixes f&uuml;r <em>0.2.1-Beta1</em> Release.");
-               break;
-
-       case '0.3.1': // SQL queries for v0.3.1
-               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title` = 'Mitglieder-Management' WHERE `action`='user' AND (`what`='' OR `what` IS NULL) LIMIT 1");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Verwaltung auf Management umgestellt");
-               break;
-
-       case '0.3.2': // SQL queries for v0.3.2
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("PHP-Hinweis in Userauflistung gefixt (trat bei fehlender nickname-Erweiterung auf) und Darstellungsfehler von <strong>0.00000</strong> unbest&auml;tigten Mails gefixt.");
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what` IN('config_user','user_contct','list_user_del') OR `action`='user'");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_del`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_cats`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_data`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_points`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_links`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats`");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats_data`");
                break;
 
-       case '0.3.3': // SQL queries for v0.3.3
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Mitglieder sind nun per Formular kontaktierbar (es wird eine EMail versendet), gesperrte und best&auml;tigte Mitglieder-Accounts sind seperat oder gemeinsam auflistbar (seperat nur mit der Erweiterung <em>task</em>!)");
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.3.4': // SQL queries for v0.3.4
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `select_user_zero_refid` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_min_confirmed` SMALLINT(5) UNSIGNED NOT NULL DEFAULT 10");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `rand_confirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Mitglieder werden per Zufall als Referal-ID ausgew&auml;hlt, die eine Mindestanzahl an best&auml;tigten Mails haben, wenn die Ref-Id 0 ist.");
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL('');
                break;
 
-       case '0.3.5': // SQL queries for v0.3.5
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `lock_reason` TINYTEXT");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `lock_timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_delete_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 30)."");
-               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_user_del','L&ouml;schungen auflisten','Listet die L&ouml;schungen von Usern auf.', 9)");
-               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_del`");
-               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_del` (
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.1.0': // SQL queries for v0.1
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_limit` INT(7) UNSIGNED NOT NULL DEFAULT 20");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Seitenweises Anzeigen der User-Liste ist nun m&ouml;glich.");
+                               break;
+
+                       case '0.1.1': // SQL queries for v0.1.1
+                               // This update depends on sql_patches update!
+                               EXT_ADD_UPDATE_DEPENDS('sql_patches');
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Ung&uuml;ltiges Update.");
+                               break;
+
+                       case '0.1.2': // SQL queries for v0.1.2
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `mails_confirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Dem Mitglied wird nun angezeigt, wie viele Mails er best&auml;tigt hat. Alle vor dieser Version best. Mails werden leider nicht mehr ber&uuml;cksichtigt! Bitte teilen Sie dies Ihren Mitgliedern mit.");
+                               break;
+
+                       case '0.1.3': // SQL queries for v0.1.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Den Pfad <em>Sie sind hier</em> im Men&uuml;punkt <u>Online-Liste</u> erweitert.");
+                               break;
+
+                       case '0.1.4': // SQL queries for v0.1.4
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `emails_received` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Anzahl empfangener Mails wird angezeigt. <big>Diese Anzeige kann fehlerhaft sein, wenn Sie bereits Mitglieder in Ihrem {!MT_WORD!} haben sollen!</big>");
+                               break;
+
+                       case '0.1.5': // SQL queries for v0.1.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.1.6': // SQL queries for v0.1.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+                               break;
+
+                       case '0.1.7': // SQL queries for v0.1.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
+                               break;
+
+                       case '0.1.8': // SQL queries for v0.1.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> &uuml;berfl&uuml;ssige HTML-Tags entfernt.");
+                               break;
+
+                       case '0.1.9': // SQL queries for v0.1.9
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
+                               break;
+
+                       case '0.2.0': // SQL queries for v0.2.0
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("User-Liste ausgelagert in Templates und &uuml;berbreite Zeile in 2er-Zeile umgewandelt.");
+                               break;
+
+                       case '0.2.1': // SQL queries for v0.2.1
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_alpha` TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_user','Mitgliederliste','Anzahl Mitglieder pro Seite, Anzahl Buchstaben pro Zeile usw.', 8)");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("User-Liste ist konfigurierbar: Anzahl Mitglieder pro Seite und Anzahl Buchstaben pro Zeile; Template-Fehler beseitigt.");
+                               break;
+
+                       case '0.2.2': // SQL queries for v0.2.2
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE `gender` `gender` ENUM('M','F','C') NOT NULL DEFAULT 'M'");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Anrede &quot;Firma&quot; hinzugef&uuml;gt.");
+                               break;
+
+                       case '0.2.3': // SQL queries for v0.2.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausf&uuml;hrlich.");
+                               break;
+
+                       case '0.2.4': // SQL queries for v0.2.4
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+                               break;
+
+                       case '0.2.5': // SQL queries for v0.2.5
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("SQL-Anweisungen abgesichert.");
+                               break;
+
+                       case '0.2.6': // SQL queries for v0.2.6
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+                               break;
+
+                       case '0.2.7': // SQL queries for v0.2.7
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Sicherheitsupdate f&uuml;r die Include-Befehle.");
+                               break;
+
+                       case '0.2.8': // SQL queries for v0.2.8
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt.");
+                               break;
+
+                       case '0.2.9': // SQL queries for v0.2.9
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','user_contct','Mitglied kontaktieren','Kontaktieren Sie hier Ihre Mitglieder ganz direkt &uuml;ber ein Webformular. Sie brauchen somit kein EMail-Programm mehr starten!', 8)");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Admin-Kontaktformular hinzugef&uuml;gt.");
+                               break;
+
+                       case '0.3.0': // SQL queries for v0.3.0
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.<br />Diverse Fixes f&uuml;r <em>0.2.1-Beta1</em> Release.");
+                               break;
+
+                       case '0.3.1': // SQL queries for v0.3.1
+                               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title` = 'Mitglieder-Management' WHERE `action`='user' AND (`what`='' OR `what` IS NULL) LIMIT 1");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Verwaltung auf Management umgestellt");
+                               break;
+
+                       case '0.3.2': // SQL queries for v0.3.2
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("PHP-Hinweis in Userauflistung gefixt (trat bei fehlender nickname-Erweiterung auf) und Darstellungsfehler von <strong>0.00000</strong> unbest&auml;tigten Mails gefixt.");
+                               break;
+
+                       case '0.3.3': // SQL queries for v0.3.3
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Mitglieder sind nun per Formular kontaktierbar (es wird eine EMail versendet), gesperrte und best&auml;tigte Mitglieder-Accounts sind seperat oder gemeinsam auflistbar (seperat nur mit der Erweiterung <em>task</em>!)");
+                               break;
+
+                       case '0.3.4': // SQL queries for v0.3.4
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `select_user_zero_refid` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_min_confirmed` SMALLINT(5) UNSIGNED NOT NULL DEFAULT 10");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `rand_confirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Mitglieder werden per Zufall als Referal-ID ausgew&auml;hlt, die eine Mindestanzahl an best&auml;tigten Mails haben, wenn die Ref-Id 0 ist.");
+                               break;
+
+                       case '0.3.5': // SQL queries for v0.3.5
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `lock_reason` TINYTEXT");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `lock_timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_delete_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 30)."");
+                               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_user_del','L&ouml;schungen auflisten','Listet die L&ouml;schungen von Usern auf.', 9)");
+                               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_del`");
+                               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_del` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `email` VARCHAR(255) NOT NULL DEFAULT '',
@@ -362,20 +362,20 @@ INDEX (`userid`),
 PRIMARY KEY(`id`)
 ) TYPE={!_TABLE_TYPE!} COMMENT='List of deleted users'");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Der Sperrgrund wird nun mit abgespeichert und beim L&ouml;schen des Users mit ausgesendet.");
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Der Sperrgrund wird nun mit abgespeichert und beim L&ouml;schen des Users mit ausgesendet.");
+                               break;
+               }
                break;
-       }
-       break;
 
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       break;
+                       default: // Do stuff when extension is loaded
+                               break;
 }
 
 // Keep this extension always active!
index ce5edc68a351d657da743b0d6db4fed7ee76d4f3..9d03db33ff890eaf0eda4e85aba4e444def4eb51 100644 (file)
@@ -45,10 +45,10 @@ EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4'));
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_wernis`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_wernis` (
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_wernis`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_wernis` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 wernis_account VARCHAR(255) NOT NULL DEFAULT '',
@@ -61,98 +61,98 @@ KEY(userid),
 PRIMARY KEY(id)
 ) TYPE={!_TABLE_TYPE!}");
 
-       // Confiuration
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT '40000'");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT '5000'");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_api_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_api_md5 VARCHAR(32) NOT NULL DEFAULT ''");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_api_url VARCHAR(255) NOT NULL DEFAULT 'http://www.wds66.com/api/'");
-
-       // User data
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD wernis_userid VARCHAR(6) NOT NULL DEFAULT ''");
-
-       // Admin menu
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis', NULL, 'Wernis-Management','Konfiguration zur WDS66-API einstellen, Auszahlungen auflisten usw..', 15)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis','config_wernis','WDS66-API-Einstellungen','Konfiguration zur WDS66-API einstellen.', 1)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis','list_wernis','Wernis-Anfragen auflisten','Listet alle Wernis-Auszahlungsanfragen Ihrer Mitglieder auf.', 2)");
-
-       // Member menu
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','wernis','Wernis-Ein-/Auszahlungen','N','N', 11)");
-
-       // Guest menu
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','wernis_portal','WDS66-News','N','N', 7)");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_wernis`");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='wernis'");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='wernis'");
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='wernis_portal'");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='wernis_portal' LIMIT 1");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='wernis' LIMIT 1");
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='wernis_portal' LIMIT 1");
-       ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='wernis' LIMIT 1");
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_factor FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_factor FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_fee_fix BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_fee_fix BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Ein-/Auszahlungsfunktion getrennt ein- und ausschaltbar, sowie mit Umrechungsfaktoren {!POINTS!}-&gt;Wernis versehen. Prozentualer Abzug als &quot;Betreibergeb&uuml;hr hinzugef&uuml;gt, was z.B. f&uuml;r Wechselstuben interessant ist.");
-               break;
+               // Confiuration
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT '40000'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT '5000'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_api_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_api_md5 VARCHAR(32) NOT NULL DEFAULT ''");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_api_url VARCHAR(255) NOT NULL DEFAULT 'http://www.wds66.com/api/'");
+
+               // User data
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD wernis_userid VARCHAR(6) NOT NULL DEFAULT ''");
+
+               // Admin menu
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis', NULL, 'Wernis-Management','Konfiguration zur WDS66-API einstellen, Auszahlungen auflisten usw..', 15)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis','config_wernis','WDS66-API-Einstellungen','Konfiguration zur WDS66-API einstellen.', 1)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis','list_wernis','Wernis-Anfragen auflisten','Listet alle Wernis-Auszahlungsanfragen Ihrer Mitglieder auf.', 2)");
 
-       case '0.0.2': // SQL queries for v0.0.2
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_pass_md5 VARCHAR(32) NOT NULL DEFAULT ''");
+               // Member menu
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','wernis','Wernis-Ein-/Auszahlungen','N','N', 11)");
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Auszahlunsfunktion an die neue API 0.2-BETA angepasst. Demnach muss Ihr Wernis-Passwort beim Auszahlen benutzt werden und in Ihrem {!MT_WORD!} als MD5-Hash gespeichert werden.");
+               // Guest menu
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','wernis_portal','WDS66-News','N','N', 7)");
                break;
 
-       case '0.0.3': // SQL queries for v0.0.3
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE `wernis_refid` `wernis_refid` INT(5) UNSIGNED ZEROFILL NOT NULL DEFAULT '00000'");
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_wernis`");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='wernis'");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='wernis'");
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='wernis_portal'");
+               break;
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Spaltentyp von VARCHAR(6) auf BIGINT(5) ge&auml;ndert.");
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='wernis_portal' LIMIT 1");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='wernis' LIMIT 1");
                break;
 
-       case '0.0.4': // SQL queries for v0.0.4
-               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `wernis_refid` INT(5) UNSIGNED ZEROFILL NOT NULL DEFAULT '00000'");
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='wernis_portal' LIMIT 1");
+               ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='wernis' LIMIT 1");
+               break;
 
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("Fehlende Ref-Id hinzugetan.");
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_factor FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_factor FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_fee_fix BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_fee_fix BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Ein-/Auszahlungsfunktion getrennt ein- und ausschaltbar, sowie mit Umrechungsfaktoren {!POINTS!}-&gt;Wernis versehen. Prozentualer Abzug als &quot;Betreibergeb&uuml;hr hinzugef&uuml;gt, was z.B. f&uuml;r Wechselstuben interessant ist.");
+                               break;
+
+                       case '0.0.2': // SQL queries for v0.0.2
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_pass_md5 VARCHAR(32) NOT NULL DEFAULT ''");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Auszahlunsfunktion an die neue API 0.2-BETA angepasst. Demnach muss Ihr Wernis-Passwort beim Auszahlen benutzt werden und in Ihrem {!MT_WORD!} als MD5-Hash gespeichert werden.");
+                               break;
+
+                       case '0.0.3': // SQL queries for v0.0.3
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE `wernis_refid` `wernis_refid` INT(5) UNSIGNED ZEROFILL NOT NULL DEFAULT '00000'");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Spaltentyp von VARCHAR(6) auf BIGINT(5) ge&auml;ndert.");
+                               break;
+
+                       case '0.0.4': // SQL queries for v0.0.4
+                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `wernis_refid` INT(5) UNSIGNED ZEROFILL NOT NULL DEFAULT '00000'");
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES("Fehlende Ref-Id hinzugetan.");
+                               break;
+               }
                break;
-       }
-       break;
 
-case 'modify': // When the extension got modified
-       break;
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       // Init array
-       $GLOBALS['wernis_data'] = array();
-       break;
+                       default: // Do stuff when extension is loaded
+                               // Init array
+                               $GLOBALS['wernis_data'] = array();
+                               break;
 }
 
 //
index e03be7fc2ce6d30548f405c431a010d72b29af15..8fe3925bf05b9d7edbb323e7c03ffc7bd4c88cc4 100644 (file)
@@ -54,26 +54,26 @@ EXT_SET_VER_HISTORY(array('0.0'));
 
 switch ($EXT_LOAD_MODE)
 {
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_sid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_passwd` VARCHAR(255) NOT NULL DEFAULT ''");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_erotic_allowed` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_max_reload` SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(24 * 8)."");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_min_wait` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_clicks_remain` INT(7) UNSIGNED NOT NULL DEFAULT 1000");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_min_pay` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_requests_total` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200");
-       ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_requests_remain` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200");
-
-       // Admin menu
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_yoomedia','Yoo!Media Interface 2.0','Einstellungen zum Yoo!Media Interface 2.0, wie User-ID, Interface-Passwort und vieles mehr.',17)");
-       ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','list_yoomedia_tm','Yoo!Media Textmails','Listet Textmail-Buchungen &uuml;ber das Interface 2.0 von Yoo!Media nach Ihren eingestellten Kriterien auf. <strong>Vorsicht:</strong> Jede Aktualisierung dieser Liste kostet Ihnen eine Abfrage!',10)");
-
-       // Reload lock table
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_yoomedia_reload`");
-       ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_yoomedia_reload` (
+       case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+               // SQL commands to run
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_sid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_passwd` VARCHAR(255) NOT NULL DEFAULT ''");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_erotic_allowed` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_max_reload` SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(24 * 8)."");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_min_wait` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_clicks_remain` INT(7) UNSIGNED NOT NULL DEFAULT 1000");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_min_pay` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_requests_total` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_requests_remain` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200");
+
+               // Admin menu
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_yoomedia','Yoo!Media Interface 2.0','Einstellungen zum Yoo!Media Interface 2.0, wie User-ID, Interface-Passwort und vieles mehr.',17)");
+               ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','list_yoomedia_tm','Yoo!Media Textmails','Listet Textmail-Buchungen &uuml;ber das Interface 2.0 von Yoo!Media nach Ihren eingestellten Kriterien auf. <strong>Vorsicht:</strong> Jede Aktualisierung dieser Liste kostet Ihnen eine Abfrage!',10)");
+
+               // Reload lock table
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_yoomedia_reload`");
+               ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_yoomedia_reload` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `type` VARCHAR(255) NOT NULL DEFAULT 'general',
 `y_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -82,65 +82,65 @@ case 'register': // Do stuff when installation is running (modules.php?module=ad
 PRIMARY KEY (`id`),
 UNIQUE `y_type` (`type`,`y_id`)
 ) TYPE={!_TABLE_TYPE!} COMMENT='Reload lock reminder for Yoo!Media campaigns'");
-       break;
-
-case 'remove': // Do stuff when removing extension
-       // SQL commands to run
-       ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what` IN('config_yoomedia','list_yoomedia_tm')");
-       ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_yoomedia_reload`");
-       break;
-
-case 'activate': // Do stuff when admin activates this extension
-       // SQL commands to run
-       break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       break;
-
-case 'update': // Update an extension
-       switch ($EXT_VER)
-       {
-       case '0.0.1': // SQL queries for v0.0.1
-               ADD_EXT_SQL("");
-
-               // Update notes (these will be set as task text!)
-               EXT_SET_UPDATE_NOTES("");
                break;
-       }
-       break;
 
-case 'modify': // When the extension got modified
-       break;
+       case 'remove': // Do stuff when removing extension
+               // SQL commands to run
+               ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what` IN('config_yoomedia','list_yoomedia_tm')");
+               ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_yoomedia_reload`");
+               break;
+
+       case 'activate': // Do stuff when admin activates this extension
+               // SQL commands to run
+               break;
+
+       case 'deactivate': // Do stuff when admin deactivates this extension
+               // SQL commands to run
+               break;
+
+       case 'update': // Update an extension
+               switch ($EXT_VER)
+               {
+                       case '0.0.1': // SQL queries for v0.0.1
+                               ADD_EXT_SQL('');
+
+                               // Update notes (these will be set as task text!)
+                               EXT_SET_UPDATE_NOTES('');
+                               break;
+               }
+               break;
+
+                       case 'modify': // When the extension got modified
+                               break;
 
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
-       break;
+                       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+                               break;
 
-default: // Do stuff when extension is loaded
-       // The translation table
-       $GLOBALS['translation_tables']['yoomedia'] = array(
-               // Error messages
+                       default: // Do stuff when extension is loaded
+                               // The translation table
+                               $GLOBALS['translation_tables']['yoomedia'] = array(
+                               // Error messages
                'error_codes' => array(
-                       1  => 'wrong_pass',
-                       2  => 'wrong_sid',
-                       3  => 'website_locked',
-                       4  => 'api_data_error',
-                       5  => 'requests_depleted',
-                       6  => 'zero_result',
-                       10 => 'incomplete_request'
-               ),
-               // For text mails
+                               1  => 'wrong_pass',
+                               2  => 'wrong_sid',
+                               3  => 'website_locked',
+                               4  => 'api_data_error',
+                               5  => 'requests_depleted',
+                               6  => 'zero_result',
+                               10 => 'incomplete_request'
+                               ),
+                               // For text mails
                'textmail' => array(
-                       0 => 'id',
-                       1 => 'name',
-                       2 => 'reload',
-                       3 => 'wait',
-                       4 => 'remain',
-                       5 => 'pay',
-                       6 => 'text'
-               )
-       );
-       break;
+                               0 => 'id',
+                               1 => 'name',
+                               2 => 'reload',
+                               3 => 'wait',
+                               4 => 'remain',
+                               5 => 'pay',
+                               6 => 'text'
+                               )
+                               );
+                               break;
 }
 
 // Keep this extension always active!
index 098a2157f952ce2a53cd8b7a794d0a6c616f4012..e5714e88b7017e4e2997ed51b7034428a821b842 100644 (file)
@@ -53,11 +53,11 @@ function INIT_FILTER_SYSTEM () {
 
        // Init the filter system (just some ideas)
        $GLOBALS['filters']['chains'] = array(
-               // Filters for pre-init phase
+       // Filters for pre-init phase
                'preinit'   => array(),
-               // Filters for post-init phase
+       // Filters for post-init phase
                'postinit'  => array(),
-               // Filters for shutdown phase
+       // Filters for shutdown phase
                'shutdown'  => array()
        );
 
@@ -100,7 +100,7 @@ ORDER BY `filter_id` ASC", __FUNCTION__, __LINE__);
                                } // END - if
                        } // END - while
                } // END - if
-       
+
                // Free result
                SQL_FREERESULT($result);
        } // END - if
@@ -313,9 +313,9 @@ function FILTER_FLUSH_FILTERS () {
                        foreach ($filterArray as $filterFunction => $cnt) {
                                // Construct and add the query
                                ADD_SQL(sprintf("UPDATE `{!_MYSQL_PREFIX!}_filters` SET `filter_counter`=%s WHERE `filter_name`='%s' AND `filter_function`='%s' LIMIT 1",
-                                       bigintval($cnt),
-                                       $filterName,
-                                       $filterFunction
+                               bigintval($cnt),
+                               $filterName,
+                               $filterFunction
                                ));
                        } // END - foreach
                } // END - foreach
@@ -462,7 +462,7 @@ function FILTER_UPDATE_LOGIN_DATA () {
 
        // Load last module and last online time
        $result = SQL_QUERY_ESC("SELECT last_module, last_online FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-               array(getUserId()), __FUNCTION__, __LINE__);
+       array(getUserId()), __FUNCTION__, __LINE__);
 
        // Entry found?
        if (SQL_NUMROWS($result) == 1) {
@@ -480,13 +480,13 @@ function FILTER_UPDATE_LOGIN_DATA () {
                // "what" not set?
                if (empty($GLOBALS['what'])) {
                        // Fix it to default
-                       $GLOBALS['what'] = "welcome";
-                       if (getConfig('index_home') != '') $GLOBALS['what'] = getConfig('index_home');
+                       $GLOBALS['what'] = "welcome";
+                       if (getConfig('index_home') != '') $GLOBALS['what'] = getConfig('index_home');
                } // END - if
 
                // Update last module / online time
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `last_module`='%s', last_online=UNIX_TIMESTAMP(), REMOTE_ADDR='%s' WHERE userid=%s LIMIT 1",
-                       array($GLOBALS['what'], detectRemoteAddr(), getUserId()), __FUNCTION__, __LINE__);
+               array($GLOBALS['what'], detectRemoteAddr(), getUserId()), __FUNCTION__, __LINE__);
        }  else {
                // Destroy session, we cannot update!
                destroyUserSession();
index d822c4eb7fbf31158211b3171f428b0932cbed79..49b2f4e8312720494d0b7367e8a710a88a8f8cad 100644 (file)
@@ -49,18 +49,18 @@ if ((((!isset($GLOBALS['footer_sent'])) || (($GLOBALS['footer_sent'] != '1') &&
        // Output the generated HTML code or do nothing in direct-mode
        if (getTotalFatalErrors() > 0) {
                // Output fatal error messages
-               loadIncludeOnce("inc/fatal_errors.php");
+               loadIncludeOnce('inc/fatal_errors.php');
        } // END - if
 
        // Shall we display the copyright notice?
-       if ((!REQUEST_ISSET_GET(('frame'))) && (basename($_SERVER['PHP_SELF']) != "mailid_top.php") && (getConfig('WRITE_FOOTER') == 'Y') && ($GLOBALS['header_sent'] == '2')) {
+       if ((!REQUEST_ISSET_GET(('frame'))) && (basename($_SERVER['PHP_SELF']) != 'mailid_top.php') && (getConfig('WRITE_FOOTER') == 'Y') && ($GLOBALS['header_sent'] == '2')) {
                // Backlink enabled?
                if ((getConfig('ENABLE_BACKLINK') == 'Y') || (isInstalling())) {
                        // Copyright with backlink, thanks! :-)
-                       LOAD_TEMPLATE("copyright_backlink");
+                       LOAD_TEMPLATE('copyright_backlink');
                } else {
                        // No backlink in Copyright note
-                       LOAD_TEMPLATE("copyright");
+                       LOAD_TEMPLATE('copyright');
                }
        } // END - if
 
@@ -71,17 +71,17 @@ if ((((!isset($GLOBALS['footer_sent'])) || (($GLOBALS['footer_sent'] != '1') &&
        } // END - if
 
        // Load page footer
-       LOAD_TEMPLATE("page_footer");
+       LOAD_TEMPLATE('page_footer');
 
        // And the last closing HTML tag
-       OUTPUT_HTML("</html>");
+       OUTPUT_HTML('</html>');
 } // END - if
 
 // Footer has been reached
 $GLOBALS['footer_sent'] = 1;
 
 // Output HTML code
-OUTPUT_HTML("");
+OUTPUT_HTML('');
 
 // Shutdown
 shutdown();
index bc817b99d0dbf53cdc2d5bf14aeba16d394ad86f..2276a0f42b35d7aec9db2ec014aa7ab8926f6c53 100644 (file)
@@ -51,36 +51,36 @@ function OUTPUT_HTML ($HTML, $newLine = true) {
                // Yes, so we handle it as you have configured
                switch (getConfig('OUTPUT_MODE'))
                {
-               case 'render':
-                       // That's why you don't need any \n at the end of your HTML code... :-)
-                       if (constant('_OB_CACHING') == 'on') {
-                               // Output into PHP's internal buffer
-                               outputRawCode($HTML);
-
+                       case 'render':
                                // That's why you don't need any \n at the end of your HTML code... :-)
-                               if ($newLine) echo "\n";
-                       } else {
-                               // Render mode for old or lame servers...
-                               $OUTPUT .= $HTML;
+                               if (constant('_OB_CACHING') == 'on') {
+                                       // Output into PHP's internal buffer
+                                       outputRawCode($HTML);
 
-                               // That's why you don't need any \n at the end of your HTML code... :-)
-                               if ($newLine) $OUTPUT .= "\n";
-                       }
-                       break;
+                                       // That's why you don't need any \n at the end of your HTML code... :-)
+                                       if ($newLine) echo "\n";
+                               } else {
+                                       // Render mode for old or lame servers...
+                                       $OUTPUT .= $HTML;
 
-               case 'direct':
-                       // If we are switching from render to direct output rendered code
-                       if ((!empty($OUTPUT)) && (constant('_OB_CACHING') != 'on')) { outputRawCode($OUTPUT); $OUTPUT = ''; }
+                                       // That's why you don't need any \n at the end of your HTML code... :-)
+                                       if ($newLine) $OUTPUT .= "\n";
+                               }
+                               break;
 
-                       // The same as above... ^
-                       outputRawCode($HTML);
-                       if ($newLine) echo "\n";
-                       break;
+                       case 'direct':
+                               // If we are switching from render to direct output rendered code
+                               if ((!empty($OUTPUT)) && (constant('_OB_CACHING') != 'on')) { outputRawCode($OUTPUT); $OUTPUT = ''; }
 
-               default:
-                       // Huh, something goes wrong or maybe you have edited config.php ???
-                       app_die(__FUNCTION__, __LINE__, "<strong>{--FATAL_ERROR--}:</strong> {--LANG_NO_RENDER_DIRECT--}");
-                       break;
+                               // The same as above... ^
+                               outputRawCode($HTML);
+                               if ($newLine) echo "\n";
+                               break;
+
+                       default:
+                               // Huh, something goes wrong or maybe you have edited config.php ???
+                               app_die(__FUNCTION__, __LINE__, "<strong>{--FATAL_ERROR--}:</strong> {--LANG_NO_RENDER_DIRECT--}");
+                               break;
                }
        } elseif ((constant('_OB_CACHING') == 'on') && (isset($GLOBALS['footer_sent'])) && ($GLOBALS['footer_sent'] == 1)) {
                // Headers already sent?
@@ -233,7 +233,7 @@ function LOAD_TEMPLATE ($template, $return=false, $content=array()) {
        if ($template == "member_support_form") {
                // Support request of a member
                $result = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                       array(getUserId()), __FUNCTION__, __LINE__);
+               array(getUserId()), __FUNCTION__, __LINE__);
 
                // Is content an array?
                if (is_array($content)) {
@@ -300,10 +300,10 @@ function LOAD_TEMPLATE ($template, $return=false, $content=array()) {
        if ((!empty($GLOBALS['what'])) && ((strpos($template, "_header") > 0) || (strpos($template, "_footer") > 0)) && (($mode == "guest/") || ($mode == "member/") || ($mode == "admin/"))) {
                // Select what depended header/footer template file for admin/guest/member area
                $file2 = sprintf("%s%s%s_%s.tpl",
-                       $basePath,
-                       $mode,
-                       $template,
-                       SQL_ESCAPE($GLOBALS['what'])
+               $basePath,
+               $mode,
+               $template,
+               SQL_ESCAPE($GLOBALS['what'])
                );
 
                // Probe for it...
@@ -548,28 +548,28 @@ function generateDateTime ($time, $mode = '0') {
 
        switch (getLanguage())
        {
-       case 'de': // German date / time format
-               switch ($mode) {
-                       case '0': $ret = date("d.m.Y \u\m H:i \U\h\\r", $time); break;
-                       case '1': $ret = strtolower(date("d.m.Y - H:i", $time)); break;
-                       case '2': $ret = date("d.m.Y|H:i", $time); break;
-                       case '3': $ret = date("d.m.Y", $time); break;
-                       default:
-                               DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Invalid date mode %s detected.", $mode));
-                               break;
-               }
-               break;
-
-       default: // Default is the US date / time format!
-               switch ($mode) {
-                       case '0': $ret = date("r", $time); break;
-                       case '1': $ret = date("Y-m-d - g:i A", $time); break;
-                       case '2': $ret = date("y-m-d|H:i", $time); break;
-                       case '3': $ret = date("y-m-d", $time); break;
-                       default:
-                               DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Invalid date mode %s detected.", $mode));
-                               break;
-               }
+               case 'de': // German date / time format
+                       switch ($mode) {
+                               case '0': $ret = date("d.m.Y \u\m H:i \U\h\\r", $time); break;
+                               case '1': $ret = strtolower(date("d.m.Y - H:i", $time)); break;
+                               case '2': $ret = date("d.m.Y|H:i", $time); break;
+                               case '3': $ret = date("d.m.Y", $time); break;
+                               default:
+                                       DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Invalid date mode %s detected.", $mode));
+                                       break;
+                       }
+                       break;
+
+                               default: // Default is the US date / time format!
+                                       switch ($mode) {
+                                               case '0': $ret = date("r", $time); break;
+                                               case '1': $ret = date("Y-m-d - g:i A", $time); break;
+                                               case '2': $ret = date("y-m-d|H:i", $time); break;
+                                               case '3': $ret = date("y-m-d", $time); break;
+                                               default:
+                                                       DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Invalid date mode %s detected.", $mode));
+                                                       break;
+                                       }
        }
        return $ret;
 }
@@ -635,13 +635,13 @@ function translateComma ($dotted, $cut = true, $max = 0) {
 
        // Translate it now
        switch (getLanguage()) {
-       case 'de':
-               $dotted = number_format($dotted, $maxComma, ',', '.');
-               break;
+               case 'de':
+                       $dotted = number_format($dotted, $maxComma, ',', '.');
+                       break;
 
-       default:
-               $dotted = number_format($dotted, $maxComma, '.', ',');
-               break;
+               default:
+                       $dotted = number_format($dotted, $maxComma, '.', ',');
+                       break;
        }
 
        // Return translated value
@@ -672,21 +672,21 @@ function translateGender ($gender) {
 function translateUserStatus ($status) {
        switch ($status)
        {
-       case 'UNCONFIRMED':
-       case 'CONFIRMED':
-       case 'LOCKED':
-               $ret = getMessage(sprintf("ACCOUNT_%s", $status));
-               break;
-
-       case '':
-       case null:
-               $ret = getMessage('ACCOUNT_DELETED');
-               break;
-
-       default:
-               DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown status %s detected.", $status));
-               $ret = sprintf(getMessage('UNKNOWN_STATUS'), $status);
-               break;
+               case 'UNCONFIRMED':
+               case 'CONFIRMED':
+               case 'LOCKED':
+                       $ret = getMessage(sprintf("ACCOUNT_%s", $status));
+                       break;
+
+               case '':
+               case null:
+                       $ret = getMessage('ACCOUNT_DELETED');
+                       break;
+
+               default:
+                       DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown status %s detected.", $status));
+                       $ret = sprintf(getMessage('UNKNOWN_STATUS'), $status);
+                       break;
        }
 
        // Return it
@@ -709,7 +709,7 @@ function DEREFERER ($URL) {
 function FRAMETESTER ($URL) {
        // Prepare frametester URL
        $frametesterUrl = sprintf("{!URL!}/modules.php?module=frametester&amp;url=%s",
-               encodeString(compileUriCode($URL))
+       encodeString(compileUriCode($URL))
        );
        return $frametesterUrl;
 }
@@ -730,51 +730,6 @@ function generateCaptchaCode ($code, $type, $DATA, $uid) {
        return '<IMG border="0" alt="Code" src="{!URL!}/mailid_top.php?uid=' . $uid . '&amp;' . $type . '=' . $DATA . '&amp;mode=img&amp;code=' . $code . '" />';
 }
 
-// "Getter" for language
-function getLanguage () {
-       // Set default return value to default language from config
-       $ret = getConfig('DEFAULT_LANG');
-
-       // Init variable
-       $lang = '';
-
-       // Is the variable set
-       if (REQUEST_ISSET_GET('mx_lang')) {
-               // Accept only first 2 chars
-               $lang = substr(REQUEST_GET('mx_lang'), 0, 2);
-       } elseif (isset($GLOBALS['cache_array']['language'])) {
-               // Use cached
-               $ret = $GLOBALS['cache_array']['language'];
-       } elseif (!empty($lang)) {
-               // Check if main language file does exist
-               if (isFileReadable(constant('PATH') . 'inc/language/'.$lang.'.php')) {
-                       // Okay found, so let's update cookies
-                       setLanguage($lang);
-               } // END - if
-       } elseif (isSessionVariableSet('mx_lang')) {
-               // Return stored value from cookie
-               $ret = getSession('mx_lang');
-
-               // Fixes a warning before the session has the mx_lang constant
-               if (empty($ret)) $ret = getConfig('DEFAULT_LANG');
-       }
-
-       // Cache entry
-       $GLOBALS['cache_array']['language'] = $ret;
-
-       // Return value
-       return $ret;
-}
-
-// "Setter" for language
-function setLanguage ($lang) {
-       // Accept only first 2 chars!
-       $lang = substr(SQL_ESCAPE(strip_tags($lang)), 0, 2);
-
-       // Set cookie
-       setSession('mx_lang', $lang);
-}
-
 // Loads an email template and compiles it
 function LOAD_EMAIL_TEMPLATE ($template, $content = array(), $UID = '0') {
        global $DATA, $_CONFIG;
@@ -828,12 +783,12 @@ function LOAD_EMAIL_TEMPLATE ($template, $content = array(), $UID = '0') {
                        //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):NICKNAME!<br />\n";
                        // Load nickname
                        $result = SQL_QUERY_ESC("SELECT surname, family, gender, email, nickname FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                               array(bigintval($UID)), __FUNCTION__, __LINE__);
+                       array(bigintval($UID)), __FUNCTION__, __LINE__);
                } else {
                        //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):NO-NICK!<br />\n";
                        /// Load normal data
                        $result = SQL_QUERY_ESC("SELECT surname, family, gender, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                               array(bigintval($UID)), __FUNCTION__, __LINE__);
+                       array(bigintval($UID)), __FUNCTION__, __LINE__);
                }
 
                // Fetch and merge data
@@ -950,7 +905,7 @@ function redirectToUrl ($URL) {
        } // END - if
 
        // Three different debug ways...
-       //* DEBUG: */ debug_report_bug(sprintf("%s[%s:] URL=%s", __FUNCTION__, __LINE__, $URL));
+       /* DEBUG: */ debug_report_bug(sprintf("%s[%s:] URL=%s", __FUNCTION__, __LINE__, $URL));
        //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, $URL);
        //* DEBUG: */ die($URL);
 
@@ -1160,98 +1115,98 @@ function ADD_SELECTION ($type, $default, $prefix = '', $id = '0') {
        }
 
        switch ($type) {
-       case "day": // Day
-               for ($idx = 1; $idx < 32; $idx++) {
-                       $OUT .= "<option value=\"".$idx."\"";
-                       if ($default == $idx) $OUT .= ' selected="selected"';
-                       $OUT .= ">".$idx."</option>\n";
-               } // END - for
-               break;
+               case "day": // Day
+                       for ($idx = 1; $idx < 32; $idx++) {
+                               $OUT .= "<option value=\"".$idx."\"";
+                               if ($default == $idx) $OUT .= ' selected="selected"';
+                               $OUT .= ">".$idx."</option>\n";
+                       } // END - for
+                       break;
 
-       case "month": // Month
-               foreach ($GLOBALS['month_descr'] as $month => $descr) {
-                       $OUT .= "<option value=\"".$month."\"";
-                       if ($default == $month) $OUT .= ' selected="selected"';
-                       $OUT .= ">".$descr."</option>\n";
-               } // END - for
-               break;
+               case "month": // Month
+                       foreach ($GLOBALS['month_descr'] as $month => $descr) {
+                               $OUT .= "<option value=\"".$month."\"";
+                               if ($default == $month) $OUT .= ' selected="selected"';
+                               $OUT .= ">".$descr."</option>\n";
+                       } // END - for
+                       break;
 
-       case "year": // Year
-               // Get current year
-               $year = date('Y', time());
+               case "year": // Year
+                       // Get current year
+                       $year = date('Y', time());
 
-               // Use configured min age or fixed?
-               if (GET_EXT_VERSION('other') >= '0.2.1') {
-                       // Configured
-                       $startYear = $year - getConfig('min_age');
-               } else {
-                       // Fixed 16 years
-                       $startYear = $year - 16;
-               }
+                       // Use configured min age or fixed?
+                       if (GET_EXT_VERSION('other') >= '0.2.1') {
+                               // Configured
+                               $startYear = $year - getConfig('min_age');
+                       } else {
+                               // Fixed 16 years
+                               $startYear = $year - 16;
+                       }
 
-               // Calculate earliest year (100 years old people can still enter Internet???)
-               $minYear = $year - 100;
+                       // Calculate earliest year (100 years old people can still enter Internet???)
+                       $minYear = $year - 100;
+
+                       // Check if the default value is larger than minimum and bigger than actual year
+                       if (($default > $minYear) && ($default >= $year)) {
+                               for ($idx = $year; $idx < ($year + 11); $idx++) {
+                                       $OUT .= "<option value=\"".$idx."\"";
+                                       if ($default == $idx) $OUT .= ' selected="selected"';
+                                       $OUT .= ">".$idx."</option>\n";
+                               } // END - for
+                       } elseif ($default == -1) {
+                               // Current year minus 1
+                               for ($idx = $startYear; $idx <= ($year + 1); $idx++)
+                               {
+                                       $OUT .= "<option value=\"".$idx."\">".$idx."</option>\n";
+                               }
+                       } else {
+                               // Get current year and subtract the configured minimum age
+                               $OUT .= "<option value=\"".($minYear - 1)."\">&lt;".$minYear."</option>\n";
+                               // Calculate earliest year depending on extension version
+                               if (GET_EXT_VERSION('other') >= '0.2.1') {
+                                       // Use configured minimum age
+                                       $year = date('Y', time()) - getConfig('min_age');
+                               } else {
+                                       // Use fixed 16 years age
+                                       $year = date('Y', time()) - 16;
+                               }
 
-               // Check if the default value is larger than minimum and bigger than actual year
-               if (($default > $minYear) && ($default >= $year)) {
-                       for ($idx = $year; $idx < ($year + 11); $idx++) {
+                               // Construct year selection list
+                               for ($idx = $minYear; $idx <= $year; $idx++) {
+                                       $OUT .= "<option value=\"".$idx."\"";
+                                       if ($default == $idx) $OUT .= ' selected="selected"';
+                                       $OUT .= ">".$idx."</option>\n";
+                               } // END - for
+                       }
+                       break;
+
+               case "sec":
+               case "min":
+                       for ($idx = 0; $idx < 60; $idx+=5) {
+                               if (strlen($idx) == 1) $idx = '0'.$idx;
                                $OUT .= "<option value=\"".$idx."\"";
                                if ($default == $idx) $OUT .= ' selected="selected"';
                                $OUT .= ">".$idx."</option>\n";
                        } // END - for
-               } elseif ($default == -1) {
-                       // Current year minus 1
-                       for ($idx = $startYear; $idx <= ($year + 1); $idx++)
-                       {
-                               $OUT .= "<option value=\"".$idx."\">".$idx."</option>\n";
-                       }
-               } else {
-                       // Get current year and subtract the configured minimum age
-                       $OUT .= "<option value=\"".($minYear - 1)."\">&lt;".$minYear."</option>\n";
-                       // Calculate earliest year depending on extension version
-                       if (GET_EXT_VERSION('other') >= '0.2.1') {
-                               // Use configured minimum age
-                               $year = date('Y', time()) - getConfig('min_age');
-                       } else {
-                               // Use fixed 16 years age
-                               $year = date('Y', time()) - 16;
-                       }
+                       break;
 
-                       // Construct year selection list
-                       for ($idx = $minYear; $idx <= $year; $idx++) {
+               case "hour":
+                       for ($idx = 0; $idx < 24; $idx++) {
+                               if (strlen($idx) == 1) $idx = '0'.$idx;
                                $OUT .= "<option value=\"".$idx."\"";
                                if ($default == $idx) $OUT .= ' selected="selected"';
                                $OUT .= ">".$idx."</option>\n";
                        } // END - for
-               }
-               break;
-
-       case "sec":
-       case "min":
-               for ($idx = 0; $idx < 60; $idx+=5) {
-                       if (strlen($idx) == 1) $idx = '0'.$idx;
-                       $OUT .= "<option value=\"".$idx."\"";
-                       if ($default == $idx) $OUT .= ' selected="selected"';
-                       $OUT .= ">".$idx."</option>\n";
-               } // END - for
-               break;
-
-       case "hour":
-               for ($idx = 0; $idx < 24; $idx++) {
-                       if (strlen($idx) == 1) $idx = '0'.$idx;
-                       $OUT .= "<option value=\"".$idx."\"";
-                       if ($default == $idx) $OUT .= ' selected="selected"';
-                       $OUT .= ">".$idx."</option>\n";
-               } // END - for
-               break;
-
-       case 'yn':
-               $OUT .= "<option value=\"Y\"";
-               if ($default == 'Y') $OUT .= ' selected="selected"';
-               $OUT .= ">{--YES--}</option>\n<option value=\"N\"";
-               if ($default == 'N') $OUT .= ' selected="selected"';
-               $OUT .= ">{--NO--}</option>\n";
-               break;
+                       break;
+
+               case 'yn':
+                       $OUT .= "<option value=\"Y\"";
+                       if ($default == 'Y') $OUT .= ' selected="selected"';
+                       $OUT .= ">{--YES--}</option>\n<option value=\"N\"";
+                       if ($default == 'N') $OUT .= ' selected="selected"';
+                       $OUT .= ">{--NO--}</option>\n";
+                       break;
        }
        $OUT .= "    </select>\n";
        return $OUT;
@@ -1350,15 +1305,15 @@ function GENERATE_IMAGE ($img_code, $headerSent=true) {
                // Switch image type
                switch (getConfig('img_type'))
                {
-               case 'jpg':
-                       // Okay, load image and hide all errors
-                       $image = @imagecreatefromjpeg($img);
-                       break;
+                       case 'jpg':
+                               // Okay, load image and hide all errors
+                               $image = @imagecreatefromjpeg($img);
+                               break;
 
-               case 'png':
-                       // Okay, load image and hide all errors
-                       $image = @imagecreatefrompng($img);
-                       break;
+                       case 'png':
+                               // Okay, load image and hide all errors
+                               $image = @imagecreatefrompng($img);
+                               break;
                }
        } else {
                // Exit function here
@@ -1496,7 +1451,7 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align =
                        $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"".$prefix."_mo\" size=\"1\">\n";
                        for ($idx = 0; $idx <= 11; $idx++)
                        {
-                                       $OUT .= "  <option class=\"mini_select\" value=\"".$idx."\"";
+                               $OUT .= "  <option class=\"mini_select\" value=\"".$idx."\"";
                                if ($idx == $M) $OUT .= ' selected="selected"';
                                $OUT .= ">".$idx."</option>\n";
                        }
@@ -1617,11 +1572,11 @@ function SEND_ADMIN_EMAILS_PRO ($subj, $template, $content, $UID) {
 
        // Check which admin shall receive this mail
        $result = SQL_QUERY_ESC("SELECT DISTINCT admin_id FROM `{!_MYSQL_PREFIX!}_admins_mails` WHERE mail_template='%s' ORDER BY admin_id",
-               array($template), __FUNCTION__, __LINE__);
+       array($template), __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result) == 0) {
                // Create new entry (to all admins)
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_admins_mails` (admin_id, mail_template) VALUES (0, '%s')",
-                       array($template), __FUNCTION__, __LINE__);
+               array($template), __FUNCTION__, __LINE__);
        } else {
                // Load admin IDs...
                // @TODO This can be, somehow, rewritten
@@ -1645,19 +1600,19 @@ function SEND_ADMIN_EMAILS_PRO ($subj, $template, $content, $UID) {
                        } else {
                                // Log error for debug
                                DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Extension 'events' missing: tpl=%s,subj=%s,UID=%s",
-                                       $template,
-                                       $subj,
-                                       $UID
+                               $template,
+                               $subj,
+                               $UID
                                ));
                        }
                } elseif ($aid == '0') {
                        // Select all email adresses
                        $result = SQL_QUERY("SELECT email FROM `{!_MYSQL_PREFIX!}_admins` ORDER BY `id`",
-                               __FUNCTION__, __LINE__);
+                       __FUNCTION__, __LINE__);
                } else {
                        // If Admin-ID is not "to-all" select
                        $result = SQL_QUERY_ESC("SELECT email FROM `{!_MYSQL_PREFIX!}_admins` WHERE id IN (%s) ORDER BY `id`",
-                               array($aid), __FUNCTION__, __LINE__);
+                       array($aid), __FUNCTION__, __LINE__);
                }
        }
 
@@ -2048,7 +2003,7 @@ function generateMemberEmailLink ($email, $table = 'admins') {
        if ((EXT_IS_ACTIVE('admins')) && ($table == 'admins')) {
                // Create email link for contacting admin in guest area
                $EMAIL = adminsCreateEmailLink($email);
-               } elseif ((EXT_IS_ACTIVE('user')) && (GET_EXT_VERSION('user') >= '0.3.3') && ($table == 'user_data')) {
+       } elseif ((EXT_IS_ACTIVE('user')) && (GET_EXT_VERSION('user') >= '0.3.3') && ($table == 'user_data')) {
                // Create email link for contacting a member within admin area (or later in other areas, too?)
                $EMAIL = USER_generateMemberEmailLink($email);
        } elseif ((EXT_IS_ACTIVE('sponsor')) && ($table == 'sponsor_data')) {
@@ -2263,9 +2218,6 @@ function app_die ($F, $L, $msg) {
 
                // Load footer
                loadIncludeOnce('inc/footer.php');
-
-               // Exit explicitly
-               shutdown();
        } else {
                // Script tried to kill itself twice
                debug_report_bug('Script wanted to kill itself more than once! Raw message=' . $msg . ', file/function=' . $F . ', line=' . $L);
@@ -2336,31 +2288,6 @@ function isApacheModuleLoaded ($apacheModule) {
        return (((function_exists('apache_get_modules')) && (in_array($apacheModule, apache_get_modules()))) || (!function_exists('apache_get_modules')));
 }
 
-// "Getter" for language strings
-// @TODO Rewrite all language constants to this function.
-function getMessage ($messageId) {
-       // Default is not found!
-       $return = '!'.$messageId.'!';
-
-       // Is the language string found?
-       if (isset($GLOBALS['msg'][strtolower($messageId)])) {
-               // Language array element found in small_letters
-               $return = $GLOBALS['msg'][$messageId];
-       } elseif (isset($GLOBALS['msg'][strtoupper($messageId)])) {
-               // @DEPRECATED Language array element found in BIG_LETTERS
-               $return = $GLOBALS['msg'][$messageId];
-       } elseif (defined($messageId)) {
-               // @DEPRECATED Deprecated constant found
-               $return = constant($messageId);
-       } else {
-               // Missing language constant
-               DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Missing message string %s detected.", $messageId));
-       }
-
-       // Return the string
-       return $return;
-}
-
 // Get current theme name
 function getCurrentTheme() {
        // The default theme is 'default'... ;-)
@@ -2433,7 +2360,7 @@ function getThemeId ($name) {
        } elseif (GET_EXT_VERSION('cache') != '0.1.8') {
                // Check if current theme is already imported or not
                $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_themes` WHERE theme_path='%s' LIMIT 1",
-                       array($name), __FUNCTION__, __LINE__);
+               array($name), __FUNCTION__, __LINE__);
 
                // Entry found?
                if (SQL_NUMROWS($result) == 1) {
@@ -2475,7 +2402,7 @@ function searchDirsRecursive ($dir, &$last_changed) {
        // Get dir as array
        //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):dir=".$dir."<br />\n";
        // Does it match what we are looking for? (We skip a lot files already!)
-    // RegexPattern to exclude  ., .., .revision,  .svn, debug.log or .cache in the filenames
+       // RegexPattern to exclude  ., .., .revision,  .svn, debug.log or .cache in the filenames
        $excludePattern = '@(\.|\.\.|\.revision|\.svn|debug\.log|\.cache|config\.php)$@';
        $ds = getArrayFromDirectory($dir, '', true, false, $excludePattern);
        //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):ds[]=".count($ds)."<br />\n";
@@ -2488,7 +2415,7 @@ function searchDirsRecursive ($dir, &$last_changed) {
                // Is it a file and readable?
                //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):FQFN={$FQFN}<br />\n";
                if (isDirectory($FQFN)) {
-                        // $FQFN is a directory so also crawl into this directory
+                       // $FQFN is a directory so also crawl into this directory
                        $newDir = $d;
                        if (!empty($dir)) $newDir = $dir . '/'. $d;
                        //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):DESCENT: ".$newDir."<br />\n";
@@ -2516,8 +2443,8 @@ function getActualVersion ($type = 'Revision') {
                // Check if REQUEST_GET('check_revision_data') is setted (switch for manually rewrite the .revision-File)
                if (REQUEST_ISSET_GET('check_revision_data') && REQUEST_GET('check_revision_data') == 'yes') $new = true;
                if (!isset($GLOBALS['cache_array']['revision'][$type])
-                       || count($GLOBALS['cache_array']['revision']) < 3
-                       || !$GLOBALS['cache_instance']->loadCacheFile('revision')) $new = true;
+               || count($GLOBALS['cache_array']['revision']) < 3
+               || !$GLOBALS['cache_instance']->loadCacheFile('revision')) $new = true;
 
                // Is the cache file outdated/invalid?
                if ($new === true){
@@ -2617,9 +2544,9 @@ function getArrayFromActualVersion () {
 
        // at least 3 keyword-Tags are needed for propper values
        if ($res && $res >= 3
-               && isset($akt_vers['Revision']) && $akt_vers['Revision'] != ''
-               && isset($akt_vers['Date']) && $akt_vers['Date'] != ''
-               && isset($akt_vers['Tag']) && $akt_vers['Tag'] != '') {
+       && isset($akt_vers['Revision']) && $akt_vers['Revision'] != ''
+       && isset($akt_vers['Date']) && $akt_vers['Date'] != ''
+       && isset($akt_vers['Tag']) && $akt_vers['Tag'] != '') {
                // Prepare content witch need special treadment
 
                // Prepare timestamp for date
@@ -2676,7 +2603,7 @@ function debug_report_bug ($message = '') {
        if (!empty($message)) {
                // Use and log it
                $debug = sprintf("Note: %s<br />\n",
-                       $message
+               $message
                );
 
                // @TODO Add a little more infos here
@@ -2784,15 +2711,15 @@ function compileUriCode ($code, $simple=true) {
 
        // Compile QUOT and other non-HTML codes
        $code = str_replace('{DOT}', '.',
-               str_replace('{SLASH}', '/',
-               str_replace('{QUOT}', "'",
-               str_replace('{DOLLAR}', '$',
-               str_replace('{OPEN_ANCHOR}', '(',
-               str_replace('{CLOSE_ANCHOR}', ')',
-               str_replace('{OPEN_SQR}', '[',
-               str_replace('{CLOSE_SQR}', ']',
-               str_replace('{PER}', '%',
-               $code
+       str_replace('{SLASH}', '/',
+       str_replace('{QUOT}', "'",
+       str_replace('{DOLLAR}', '$',
+       str_replace('{OPEN_ANCHOR}', '(',
+       str_replace('{CLOSE_ANCHOR}', ')',
+       str_replace('{OPEN_SQR}', '[',
+       str_replace('{CLOSE_SQR}', ']',
+       str_replace('{PER}', '%',
+       $code
        )))))))));
 
        // Return compiled code
@@ -2877,16 +2804,16 @@ function changeDataInFile ($FQFN, $comment, $prefix, $suffix, $DATA, $seek=0) {
 
        // Is the file there and read-/write-able?
        if ((isFileReadable($FQFN)) && (is_writeable($FQFN))) {
-               $search = "CFG: ".$comment;
-               $tmp = $FQFN.".tmp";
+               $search = 'CFG: ' . $comment;
+               $tmp = $FQFN . '.tmp';
 
                // Open the source file
-               $fp = fopen($FQFN, 'r') or OUTPUT_HTML("<strong>READ:</strong> ".$FQFN."<br />");
+               $fp = fopen($FQFN, 'r') or OUTPUT_HTML('<strong>READ:</strong> ' . $FQFN . "<br />\n");
 
                // Is the resource valid?
                if (is_resource($fp)) {
                        // Open temporary file
-                       $fp_tmp = fopen($tmp, 'w') or OUTPUT_HTML("<strong>WRITE:</strong> ".$tmp."<br />");
+                       $fp_tmp = fopen($tmp, 'w') or OUTPUT_HTML('<strong>WRITE:</strong> ' . $tmp . "<br />\n");
 
                        // Is the resource again valid?
                        if (is_resource($fp_tmp)) {
@@ -2899,7 +2826,7 @@ function changeDataInFile ($FQFN, $comment, $prefix, $suffix, $DATA, $seek=0) {
                                        if ($next > -1) {
                                                if ($next === $seek) {
                                                        $next = -1;
-                                                       $line = $prefix . $DATA . $suffix."\n";
+                                                       $line = $prefix . $DATA . $suffix . "\n";
                                                } else {
                                                        $next++;
                                                }
@@ -2907,31 +2834,31 @@ function changeDataInFile ($FQFN, $comment, $prefix, $suffix, $DATA, $seek=0) {
 
                                        // Write to temp file
                                        fputs($fp_tmp, $line);
-                               }
+                               } // END - while
 
                                // Close temp file
                                fclose($fp_tmp);
 
                                // Finished writing tmp file
                                $done = true;
-                       }
+                       } // END - if
 
                        // Close source file
                        fclose($fp);
 
-                       if (($done) && ($found)) {
+                       if (($done === true) && ($found === true)) {
                                // Copy back tmp file and delete tmp :-)
-                               copy($tmp, $FQFN);
-                               return unlink($tmp);
-                       } elseif (!$found) {
-                               OUTPUT_HTML("<strong>CHANGE:</strong> 404!");
+                               copyFileVerified($tmp, $FQFN, 0644);
+                               return removeFile($tmp);
+                       } elseif ($found === false) {
+                               OUTPUT_HTML('<strong>CHANGE:</strong> 404!');
                        } else {
-                               OUTPUT_HTML("<strong>TMP:</strong> UNDONE!");
+                               OUTPUT_HTML('<strong>TMP:</strong> UNDONE!');
                        }
                }
        } else {
                // File not found, not readable or writeable
-               OUTPUT_HTML("<strong>404:</strong> ".$FQFN."<br />");
+               OUTPUT_HTML('<strong>404:</strong> ' . $FQFN . '<br />');
        }
 
        // An error was detected!
@@ -3211,15 +3138,15 @@ function addNewBonusMail ($data, $mode = '', $output=true) {
        if (!empty($RECEIVER)) {
                // Add bonus mail to queue
                addBonusMailToQueue(
-                       $data['subject'],
-                       $data['text'],
-                       $RECEIVER,
-                       $data['points'],
-                       $data['seconds'],
-                       $data['url'],
-                       $data['cat'],
-                       $mode,
-                       $data['receiver']
+               $data['subject'],
+               $data['text'],
+               $RECEIVER,
+               $data['points'],
+               $data['seconds'],
+               $data['url'],
+               $data['cat'],
+               $mode,
+               $data['receiver']
                );
 
                // Mail inserted into bonus pool
index 58283c56cb2362f9554a6b43c3dc7c5cea50d2d1..e2b45f2eab75893a31c0360bc290e53ec3ae87a9 100644 (file)
@@ -52,7 +52,7 @@ if (getConfig('pass_scramble') == '') {
 
        // ... and store it there for future usage
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_config` SET pass_scramble='%s' WHERE config=0 LIMIT 1",
-               array($scrambleString), __FILE__, __LINE__);
+       array($scrambleString), __FILE__, __LINE__);
 
        // Also remember it in config
        setConfigEntry('pass_scramble', $scrambleString);
@@ -67,7 +67,7 @@ if (getConfig('master_salt') == '') {
 
        // ... and store it there for future usage
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_config` SET master_salt='%s' WHERE config=0 LIMIT 1",
-               array($masterSalt), __FILE__, __LINE__);
+       array($masterSalt), __FILE__, __LINE__);
 
        // Also remember it in config
        setConfigEntry('master_salt', $masterSalt);
@@ -78,8 +78,8 @@ if (getConfig('file_hash') == '') {
        // Create filename from hashed random string
        $fileHash = sha1(generatePassword(mt_rand(128, 256)));
        $FQFN = sprintf("%sinc/.secret/.%s",
-               constant('PATH'),
-               $fileHash
+       constant('PATH'),
+       $fileHash
        );
 
        // Count of chars to be taken from back of the string
@@ -93,18 +93,18 @@ if (getConfig('file_hash') == '') {
 
        // Is the file there?
        if (isFileReadable($FQFN)) {
-               //* DEBUG: */ unlink($FQFN);
+               //* DEBUG: */ removeFile($FQFN);
                //* DEBUG: */ $test = hexdec(getSession('u_hash')) / hexdec($secretKey);
                //* DEBUG: */ $test = generateHash(str_replace('.', '', $test));
                //* DEBUG: */ die("Secret-Key: ".$secretKey."<br />Cookie: ".getSession('u_hash')."<br />Test: ".$test);
 
                // Write $fileHash to database
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_config` SET file_hash='%s' WHERE config=0 LIMIT 1",
-                       array($fileHash), __FILE__, __LINE__);
+               array($fileHash), __FILE__, __LINE__);
 
                // Generate FQFN for .htaccess file
                $FQFN = sprintf("%sinc/.secret/.htaccess",
-                       constant('PATH')
+               constant('PATH')
                );
 
                // Is the .htaccess file there?
index 09fc98937897af00392d8b0f9285ea81073e5d48..7dd84499a46be738879f49b8030c2d35c69927d8 100644 (file)
@@ -46,10 +46,10 @@ if (!defined('__SECURITY')) {
 function __errorHandler ($errno, $errstr, $errfile, $errline) {
        // Construct message
        $msg = sprintf("errno=%s,errstr=%s,errfile=%s,errline=%s",
-               $errno,
-               $errstr,
-               basename($errfile),
-               $errline
+       $errno,
+       $errstr,
+       basename($errfile),
+       $errline
        );
 
        // Write debug log message
index bd4c3e3075fe9c6bd8e311130f07cbceeb91dd36..7ec799623caaab9b03e5a8c2c2096f8c495ebcb9 100644 (file)
@@ -73,7 +73,7 @@ if (($GLOBALS['header_sent'] != '1') && ($GLOBALS['header_sent'] != '2')) {
                                // Add title from what file
                                $mode = '';
                                if ($GLOBALS['module'] == "login") $mode = 'member';
-                                elseif ($GLOBALS['module'] == 'index') $mode = 'guest';
+                               elseif ($GLOBALS['module'] == 'index') $mode = 'guest';
                                if ((!empty($mode)) && (getConfig('enable_what_title') == 'Y')) $TITLE .= " ".trim(getConfig('title_middle'))." ".getModuleDescription($mode, $GLOBALS['what']);
 
                                // Add title decorations? (right)
index a2a63b59298d2fc8443b330fa35f2fdd0789e743..a001ed06a1afa49456b66c25419dfb726a3adae7 100644 (file)
@@ -70,7 +70,7 @@ function getArrayFromDirectory ($baseDir, $prefix, $includeDirs = false, $addBas
                // Steps over this returned $baseFile-Name, when it matches the $excludePattern
                if (preg_match($excludePattern, $baseFile, $match)) {
                        // These Lines are only for debugging!!
-                   //$INC = $baseDir . '/' . $baseFile;
+                       //$INC = $baseDir . '/' . $baseFile;
                        //$FQFN = constant('PATH') . $INC;
                        //echo '<pre>$baseDir:'.print_r($baseDir, true).'</pre>';
                        //echo '<pre>$baseDir:'.print_r(constant('PATH') . $baseDir, true).'</pre>';
index 3b938296277fc3c2282137a9d7c9c5c73e2ca1f5..d2fb295a77c7c02fc72edc60713ca5a9048b37d4 100644 (file)
@@ -86,105 +86,105 @@ if ((!isInstalled()) || (!isAdminRegistered())) {
        // Output page for entered value
        switch (REQUEST_GET('page'))
        {
-       case 'welcome': // Welcome to the installation!
-               LOAD_TEMPLATE('install_welcome');
-               break;
-
-       case '1': // Server path, base URL
-               // @Profi-Concept: Hab meine Meinung doch geaendert! :-)
-               // Load template
-               LOAD_TEMPLATE('install_page1');
-               break;
-
-       case '2': // MySQL data (alone!)
-               if (empty($mysql['dbase']))  $mysql['dbase']  = 'your_database';
-               if (empty($mysql['login']))  $mysql['login']  = 'your_login';
-               if (empty($mysql['host']))   $mysql['host']   = 'localhost';
-               if (empty($mysql['prefix'])) $mysql['prefix'] = 'mxchange';
-               if (empty($mysql['type']))   $mysql['type']   = 'MyISAM';
-               if (getTotalFatalErrors() > 0) {
-                       OUTPUT_HTML("<span class=\"install_fatal\">");
-                       foreach (getFatalArray() as $key => $err) {
-                               OUTPUT_HTML("  <strong>&middot;</strong>&nbsp;{--FATAL_NO--}".($key + 1).":&nbsp;".$err."<br />");
+               case 'welcome': // Welcome to the installation!
+                       LOAD_TEMPLATE('install_welcome');
+                       break;
+
+               case '1': // Server path, base URL
+                       // @Profi-Concept: Hab meine Meinung doch geaendert! :-)
+                       // Load template
+                       LOAD_TEMPLATE('install_page1');
+                       break;
+
+               case '2': // MySQL data (alone!)
+                       if (empty($mysql['dbase']))  $mysql['dbase']  = 'your_database';
+                       if (empty($mysql['login']))  $mysql['login']  = 'your_login';
+                       if (empty($mysql['host']))   $mysql['host']   = 'localhost';
+                       if (empty($mysql['prefix'])) $mysql['prefix'] = 'mxchange';
+                       if (empty($mysql['type']))   $mysql['type']   = 'MyISAM';
+                       if (getTotalFatalErrors() > 0) {
+                               OUTPUT_HTML("<span class=\"install_fatal\">");
+                               foreach (getFatalArray() as $key => $err) {
+                                       OUTPUT_HTML("  <strong>&middot;</strong>&nbsp;{--FATAL_NO--}".($key + 1).":&nbsp;".$err."<br />");
+                               }
+                               OUTPUT_HTML("</span><br />");
                        }
-                       OUTPUT_HTML("</span><br />");
-               }
-               define('__MYSQL_HOST'  , $mysql['host']);
-               define('__MYSQL_DBASE' , $mysql['dbase']);
-               define('__MYSQL_PREFIX', $mysql['prefix']);
-               define('__TABLE_TYPE'  , $mysql['type']);
-               define('__MYSQL_LOGIN' , $mysql['login']);
-               define('__SPATH_VALUE' , REQUEST_POST('spath'));
-               define('__BURL_VALUE'  , REQUEST_POST('burl'));
-               define('__TITLE_VALUE' , REQUEST_POST('title'));
-               define('__SLOGAN_VALUE', REQUEST_POST('slogan'));
-               define('__EMAIL_VALUE' , REQUEST_POST('email'));
-
-               // Load template
-               LOAD_TEMPLATE('install_page2');
-               break;
-
-       case '3':
-               // Set more values
-               define('__SPATH_VALUE' , REQUEST_POST('spath'));
-               define('__BURL_VALUE'  , REQUEST_POST('burl'));
-               define('__TITLE_VALUE' , REQUEST_POST('title'));
-               define('__SLOGAN_VALUE', REQUEST_POST('slogan'));
-               define('__EMAIL_VALUE' , REQUEST_POST('email'));
-
-               // Use default SMTP data
-               $smtpHost  = getConfig('SMTP_HOSTNAME');
-               $smtpUser  = getConfig('SMTP_USER');
-               $smtpPass1 = getConfig('SMTP_PASSWORD');
-               $smtpPass2 = getConfig('SMTP_PASSWORD');
-
-               // Overwrite it with the data from sent (failed) form
-               if (REQUEST_ISSET_POST(('smtp_host'))) $smtpHost = REQUEST_POST('smtp_host');
-               if (REQUEST_ISSET_POST(('smtp_user'))) $smtpUser = REQUEST_POST('smtp_user');
-               if (REQUEST_ISSET_POST(('smtp_pass'))) {
-                       $smtpPass1 = REQUEST_POST('smtp_pass');
-                       $smtpPass2 = REQUEST_POST('smtp_pass');
-               } // END - if
-
-               // MySQL settings
-               define('__MYSQL_HOST'  , $mysql['host']);
-               define('__MYSQL_DBASE' , $mysql['dbase']);
-               define('__MYSQL_PREFIX', $mysql['prefix']);
-               define('__TABLE_TYPE'  , $mysql['type']);
-               define('__MYSQL_LOGIN' , $mysql['login']);
-               define('__MYSQL_PASS1' , $mysql['pass1']);
-               define('__MYSQL_PASS2' , $mysql['pass2']);
-
-               // Set constants for SMTP data
-               define('__SMTP_HOST' , $smtpHost);
-               define('__SMTP_USER' , $smtpUser);
-               define('__SMTP_PASS1', $smtpPass1);
-               define('__SMTP_PASS2', $smtpPass2);
-
-               // Load template
-               LOAD_TEMPLATE('install_page3');
-               break;
-
-       case '5': // Misc settings
-               // General settings
-               define('__SPATH_VALUE' , REQUEST_POST('spath'));
-               define('__BURL_VALUE'  , REQUEST_POST('burl'));
-               define('__TITLE_VALUE' , REQUEST_POST('title'));
-               define('__SLOGAN_VALUE', REQUEST_POST('slogan'));
-               define('__EMAIL_VALUE' , REQUEST_POST('email'));
-
-               // MySQL settings
-               define('__MYSQL_HOST'  , $mysql['host']);
-               define('__MYSQL_DBASE' , $mysql['dbase']);
-               define('__MYSQL_PREFIX', $mysql['prefix']);
-               define('__TABLE_TYPE'  , $mysql['type']);
-               define('__MYSQL_LOGIN' , $mysql['login']);
-
-               // SMTP settings
-               define('__SMTP_HOST', REQUEST_POST('smtp_host'));
-               define('__SMTP_USER', REQUEST_POST('smtp_user'));
-               define('__SMTP_PASS', REQUEST_POST('smtp_pass1'));
-               OUTPUT_HTML("<form action=\"{!__BURL_ACTION!}/install.php?page=finalize\" method=\"POST\" target=\"_self\">
+                       define('__MYSQL_HOST'  , $mysql['host']);
+                       define('__MYSQL_DBASE' , $mysql['dbase']);
+                       define('__MYSQL_PREFIX', $mysql['prefix']);
+                       define('__TABLE_TYPE'  , $mysql['type']);
+                       define('__MYSQL_LOGIN' , $mysql['login']);
+                       define('__SPATH_VALUE' , REQUEST_POST('spath'));
+                       define('__BURL_VALUE'  , REQUEST_POST('burl'));
+                       define('__TITLE_VALUE' , REQUEST_POST('title'));
+                       define('__SLOGAN_VALUE', REQUEST_POST('slogan'));
+                       define('__EMAIL_VALUE' , REQUEST_POST('email'));
+
+                       // Load template
+                       LOAD_TEMPLATE('install_page2');
+                       break;
+
+               case '3':
+                       // Set more values
+                       define('__SPATH_VALUE' , REQUEST_POST('spath'));
+                       define('__BURL_VALUE'  , REQUEST_POST('burl'));
+                       define('__TITLE_VALUE' , REQUEST_POST('title'));
+                       define('__SLOGAN_VALUE', REQUEST_POST('slogan'));
+                       define('__EMAIL_VALUE' , REQUEST_POST('email'));
+
+                       // Use default SMTP data
+                       $smtpHost  = getConfig('SMTP_HOSTNAME');
+                       $smtpUser  = getConfig('SMTP_USER');
+                       $smtpPass1 = getConfig('SMTP_PASSWORD');
+                       $smtpPass2 = getConfig('SMTP_PASSWORD');
+
+                       // Overwrite it with the data from sent (failed) form
+                       if (REQUEST_ISSET_POST(('smtp_host'))) $smtpHost = REQUEST_POST('smtp_host');
+                       if (REQUEST_ISSET_POST(('smtp_user'))) $smtpUser = REQUEST_POST('smtp_user');
+                       if (REQUEST_ISSET_POST(('smtp_pass'))) {
+                               $smtpPass1 = REQUEST_POST('smtp_pass');
+                               $smtpPass2 = REQUEST_POST('smtp_pass');
+                       } // END - if
+
+                       // MySQL settings
+                       define('__MYSQL_HOST'  , $mysql['host']);
+                       define('__MYSQL_DBASE' , $mysql['dbase']);
+                       define('__MYSQL_PREFIX', $mysql['prefix']);
+                       define('__TABLE_TYPE'  , $mysql['type']);
+                       define('__MYSQL_LOGIN' , $mysql['login']);
+                       define('__MYSQL_PASS1' , $mysql['pass1']);
+                       define('__MYSQL_PASS2' , $mysql['pass2']);
+
+                       // Set constants for SMTP data
+                       define('__SMTP_HOST' , $smtpHost);
+                       define('__SMTP_USER' , $smtpUser);
+                       define('__SMTP_PASS1', $smtpPass1);
+                       define('__SMTP_PASS2', $smtpPass2);
+
+                       // Load template
+                       LOAD_TEMPLATE('install_page3');
+                       break;
+
+               case '5': // Misc settings
+                       // General settings
+                       define('__SPATH_VALUE' , REQUEST_POST('spath'));
+                       define('__BURL_VALUE'  , REQUEST_POST('burl'));
+                       define('__TITLE_VALUE' , REQUEST_POST('title'));
+                       define('__SLOGAN_VALUE', REQUEST_POST('slogan'));
+                       define('__EMAIL_VALUE' , REQUEST_POST('email'));
+
+                       // MySQL settings
+                       define('__MYSQL_HOST'  , $mysql['host']);
+                       define('__MYSQL_DBASE' , $mysql['dbase']);
+                       define('__MYSQL_PREFIX', $mysql['prefix']);
+                       define('__TABLE_TYPE'  , $mysql['type']);
+                       define('__MYSQL_LOGIN' , $mysql['login']);
+
+                       // SMTP settings
+                       define('__SMTP_HOST', REQUEST_POST('smtp_host'));
+                       define('__SMTP_USER', REQUEST_POST('smtp_user'));
+                       define('__SMTP_PASS', REQUEST_POST('smtp_pass1'));
+                       OUTPUT_HTML("<form action=\"{!__BURL_ACTION!}/install.php?page=finalize\" method=\"POST\" target=\"_self\">
 <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"install_main\">
 <tr>
   <td colspan=\"2\" align=\"center\">
@@ -240,10 +240,10 @@ if ((!isInstalled()) || (!isAdminRegistered())) {
 <tr><td colspan=\"2\" height=\"21\" class=\"seperator\">&nbsp;</td></tr>
 <tr>
   <td colspan=\"2\" align=\"center\">");
-               foreach ($mysql as $key => $value) {
-                       OUTPUT_HTML("    <input type=\"hidden\" name=\"mysql[".$key."]\" value=\"".$value."\" />");
-               }
-               OUTPUT_HTML("    <input type=\"hidden\" name=\"spath\" value=\"{!__SPATH_VALUE!}\" />
+                       foreach ($mysql as $key => $value) {
+                               OUTPUT_HTML("    <input type=\"hidden\" name=\"mysql[".$key."]\" value=\"".$value."\" />");
+                       }
+                       OUTPUT_HTML("    <input type=\"hidden\" name=\"spath\" value=\"{!__SPATH_VALUE!}\" />
     <input type=\"hidden\" name=\"burl\" value=\"{!__BURL_VALUE!}\" />
     <input type=\"hidden\" name=\"title\" value=\"{!__TITLE_VALUE!}\" />
     <input type=\"hidden\" name=\"slogan\" value=\"{!__SLOGAN_VALUE!}\" />
@@ -257,131 +257,131 @@ if ((!isInstalled()) || (!isAdminRegistered())) {
 <tr><td colspan=\"2\" height=\"21\" class=\"seperator\">&nbsp;</td></tr>
 </table>
 </form>");
-               break;
-
-       case 'finalize': // Write captured data to files
-               if ((REQUEST_ISSET_POST(('finalize'))) && (!isInstalled())) {
-                       // You have submitted data then we have to reset the SQLs
-                       INIT_SQLS();
-
-                       // Connect to MySQL server
-                       SQL_CONNECT($mysql['host'], $mysql['login'], $mysql['pass1'], __FILE__, __LINE__);
-                       if (SQL_IS_LINK_UP()) {
-                               // Seems to work, also right database?
-                               if (SQL_SELECT_DB($mysql['dbase'], __FILE__, __LINE__) === true) {
-                                       // Automatically run install.sql
-                                       if ((isFileReadable(REQUEST_POST('spath') . 'install/tables.sql')) && (isFileReadable(REQUEST_POST('spath') . 'install/menu-'.getLanguage().'.sql'))) {
-                                               // Both exists so import them
-                                               foreach (array('tables', 'menu-'.getLanguage()) as $dump) {
-                                                       // Should be save here because file_exists() is there but we check it again. :)
-                                                       $FQFN = REQUEST_POST('spath') . 'install/' . $dump . '.sql';
-
-                                                       // Is the file readable?
-                                                       if (isFileReadable($FQFN)) {
-                                                               // Read the file
-                                                               $fileContent = readFromFile($FQFN, true);
-
-                                                               // Replace the {!prefix/type!} with actual one
-                                                               foreach (array('prefix', 'type') as $replace) {
-                                                                       while (strpos($fileContent, '{!' . $replace . '!}') !== false) {
-                                                                               $fileContent = str_replace('{!' . $replace . '!}', $mysql[$replace], $fileContent);
-                                                                       } // END - while
-                                                               } // END - foreach
-
-                                                               // Split it up against ";\n" and merge it into existing SQLs
-                                                               MERGE_SQLS(explode(";\n", $fileContent));
-                                                       } else {
-                                                               // Not readable!
-                                                               debug_report_bug(sprintf("SQL dump %s is not readable!", $dump));
-                                                       }
-                                               } // END - foreach
-
-                                               // Are some SQLs found?
-                                               if (COUNT_SQLS() == 0) {
-                                                       // Abort here
-                                                       addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_SQL_IMPORT_FAILED'));
-                                                       return;
-                                               } // END - if
-
-                                               // Now run all queries through and try to keep out empty or comment queries
-                                               runFilterChain('run_sqls');
-
-                                               // Copy the config template and verify it
-                                               copyFileVerified(REQUEST_POST('spath') . 'inc/config-local.php.dist', REQUEST_POST('spath') . 'inc/cache/config-local.php', 0644);
-
-                                               // Ok, all done. So we can write the config data to the php files
-                                               if (REQUEST_POST('spath') != constant('PATH')) changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "SERVER-PATH", "define('PATH', \"", "\");", REQUEST_POST('spath'), 0);
-                                               if (REQUEST_POST('burl')  != constant('URL'))  changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "HOST-URL", "define('URL', \"", "\");", REQUEST_POST('burl'), 0);
-                                               changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "MAIN-TITLE", "define('MAIN_TITLE', \"", "\");", REQUEST_POST('title'), 0);
-                                               changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "SLOGAN", "define('SLOGAN', \"", "\");", REQUEST_POST('slogan'), 0);
-                                               changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "WEBMASTER", "define('WEBMASTER', \"", "\");", REQUEST_POST('email'), 0);
-                                               changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "NULLPASS-WARNING", "setConfigEntry('WARN_NO_PASS', \"", "\");", REQUEST_POST('warn_no_pass'), 0);
-                                               changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "WRITE-FOOTER", "setConfigEntry('WRITE_FOOTER', \"", "\");", REQUEST_POST('wfooter'), 0);
-                                               changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "BACKLINK", "setConfigEntry('ENABLE_BACKLINK', \"", "\");", REQUEST_POST('blink'), 0);
-                                               // DEACTIVATED: changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "OUTPUT-MODE", "define('OUTPUT_MODE', \"", "\");", REQUEST_POST('omode'), 0);
-                                               changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "MYSQL-HOST", "  'host'     => \"", "\",", $mysql['host'], 0);
-                                               changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "MYSQL-DBASE", " 'dbase'    => \"", "\",", $mysql['dbase'], 0);
-                                               changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "MYSQL-LOGIN", " 'login'    => \"", "\",", $mysql['login'], 0);
-                                               changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "MYSQL-PASSWORD", "      'password' => \"", "\",", $mysql['pass1'], 0);
-                                               changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "MYSQL-PREFIX", "setConfigEntry('_MYSQL_PREFIX', \"", "\");", $mysql['prefix'], 0);
-                                               changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "TABLE-TYPE", "setConfigEntry('_TABLE_TYPE', \"", "\");", $mysql['type'], 0);
-                                               changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "SMTP-HOSTNAME", "setConfigEntry('SMTP_HOSTNAME', \"", "\");", REQUEST_POST('smtp_host'), 0);
-                                               changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "SMTP-USER", "setConfigEntry('SMTP_USER', \"", "\");", REQUEST_POST('smtp_user'), 0);
-                                               changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "SMTP-PASSWORD", "setConfigEntry('SMTP_PASSWORD', \"", "\");", REQUEST_POST('smtp_pass1'), 0);
-
-                                               // Generate a long site key
-                                               $siteKey = generatePassword(50);
-
-                                               // And write it
-                                               changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "SITE-KEY", "setConfigEntry('SITE_KEY', \"", "\");", $siteKey, 0);
-
-                                               // Script is now installed
-                                               changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "INSTALLED", "setConfigEntry('MXCHANGE_INSTALLED', \"", "\");", 'Y', 0);
-                                       } else {
-                                               // Installation area not found!
-                                               addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_MISSING_DUMPS'));
-                                       }
+                       break;
+
+               case 'finalize': // Write captured data to files
+                       if ((REQUEST_ISSET_POST(('finalize'))) && (!isInstalled())) {
+                               // You have submitted data then we have to reset the SQLs
+                               INIT_SQLS();
+
+                               // Connect to MySQL server
+                               SQL_CONNECT($mysql['host'], $mysql['login'], $mysql['pass1'], __FILE__, __LINE__);
+                               if (SQL_IS_LINK_UP()) {
+                                       // Seems to work, also right database?
+                                       if (SQL_SELECT_DB($mysql['dbase'], __FILE__, __LINE__) === true) {
+                                               // Automatically run install.sql
+                                               if ((isFileReadable(REQUEST_POST('spath') . 'install/tables.sql')) && (isFileReadable(REQUEST_POST('spath') . 'install/menu-'.getLanguage().'.sql'))) {
+                                                       // Both exists so import them
+                                                       foreach (array('tables', 'menu-'.getLanguage()) as $dump) {
+                                                               // Should be save here because file_exists() is there but we check it again. :)
+                                                               $FQFN = REQUEST_POST('spath') . 'install/' . $dump . '.sql';
+
+                                                               // Is the file readable?
+                                                               if (isFileReadable($FQFN)) {
+                                                                       // Read the file
+                                                                       $fileContent = readFromFile($FQFN, true);
+
+                                                                       // Replace the {!prefix/type!} with actual one
+                                                                       foreach (array('prefix', 'type') as $replace) {
+                                                                               while (strpos($fileContent, '{!' . $replace . '!}') !== false) {
+                                                                                       $fileContent = str_replace('{!' . $replace . '!}', $mysql[$replace], $fileContent);
+                                                                               } // END - while
+                                                                       } // END - foreach
+
+                                                                       // Split it up against ";\n" and merge it into existing SQLs
+                                                                       MERGE_SQLS(explode(";\n", $fileContent));
+                                                               } else {
+                                                                       // Not readable!
+                                                                       debug_report_bug(sprintf("SQL dump %s is not readable!", $dump));
+                                                               }
+                                                       } // END - foreach
+
+                                                       // Are some SQLs found?
+                                                       if (COUNT_SQLS() == 0) {
+                                                               // Abort here
+                                                               addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_SQL_IMPORT_FAILED'));
+                                                               return;
+                                                       } // END - if
+
+                                                       // Now run all queries through and try to keep out empty or comment queries
+                                                       runFilterChain('run_sqls');
+
+                                                       // Copy the config template and verify it
+                                                       copyFileVerified(REQUEST_POST('spath') . 'inc/config-local.php.dist', REQUEST_POST('spath') . 'inc/cache/config-local.php', 0644);
+
+                                                       // Ok, all done. So we can write the config data to the php files
+                                                       if (REQUEST_POST('spath') != constant('PATH')) changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "SERVER-PATH", "define('PATH', \"", "\");", REQUEST_POST('spath'), 0);
+                                                       if (REQUEST_POST('burl')  != constant('URL'))  changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "HOST-URL", "define('URL', \"", "\");", REQUEST_POST('burl'), 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "MAIN-TITLE", "define('MAIN_TITLE', \"", "\");", REQUEST_POST('title'), 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "SLOGAN", "define('SLOGAN', \"", "\");", REQUEST_POST('slogan'), 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "WEBMASTER", "define('WEBMASTER', \"", "\");", REQUEST_POST('email'), 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "NULLPASS-WARNING", "setConfigEntry('WARN_NO_PASS', \"", "\");", REQUEST_POST('warn_no_pass'), 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "WRITE-FOOTER", "setConfigEntry('WRITE_FOOTER', \"", "\");", REQUEST_POST('wfooter'), 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "BACKLINK", "setConfigEntry('ENABLE_BACKLINK', \"", "\");", REQUEST_POST('blink'), 0);
+                                                       // DEACTIVATED: changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "OUTPUT-MODE", "define('OUTPUT_MODE', \"", "\");", REQUEST_POST('omode'), 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "MYSQL-HOST", "  'host'     => \"", "\",", $mysql['host'], 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "MYSQL-DBASE", " 'dbase'    => \"", "\",", $mysql['dbase'], 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "MYSQL-LOGIN", " 'login'    => \"", "\",", $mysql['login'], 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "MYSQL-PASSWORD", "      'password' => \"", "\",", $mysql['pass1'], 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "MYSQL-PREFIX", "setConfigEntry('_MYSQL_PREFIX', \"", "\");", $mysql['prefix'], 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "TABLE-TYPE", "setConfigEntry('_TABLE_TYPE', \"", "\");", $mysql['type'], 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "SMTP-HOSTNAME", "setConfigEntry('SMTP_HOSTNAME', \"", "\");", REQUEST_POST('smtp_host'), 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "SMTP-USER", "setConfigEntry('SMTP_USER', \"", "\");", REQUEST_POST('smtp_user'), 0);
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "SMTP-PASSWORD", "setConfigEntry('SMTP_PASSWORD', \"", "\");", REQUEST_POST('smtp_pass1'), 0);
+
+                                                       // Generate a long site key
+                                                       $siteKey = generatePassword(50);
+
+                                                       // And write it
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "SITE-KEY", "setConfigEntry('SITE_KEY', \"", "\");", $siteKey, 0);
+
+                                                       // Script is now installed
+                                                       changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "INSTALLED", "setConfigEntry('MXCHANGE_INSTALLED', \"", "\");", 'Y', 0);
+                                               } else {
+                                                       // Installation area not found!
+                                                       addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_MISSING_DUMPS'));
+                                               }
+                                       } // END - if
                                } // END - if
-                       } // END - if
 
-                       if (getTotalFatalErrors() > 0) {
-                               $OUT = '';
-                               foreach (getFatalArray() as $value) {
-                                       $OUT .= "    <li>".$value."</li>\n";
-                               } // END foreach
-                               define('__FATAL_ERROR_LI', $OUT);
-                               $OUT = '';
-                               foreach ($mysql as $key => $value) {
-                                       $OUT .= "    <input type=\"hidden\" name=\"mysql[".$key."]\" value=\"".$value."\" />\n";
-                               } // END foreach
-                               define('__MYSQL_DATA'   , $OUT);
-                               define('__SPATH_VALUE'  , REQUEST_POST('spath'));
-                               define('__BURL_VALUE'   , REQUEST_POST('burl'));
-                               define('__TITLE_VALUE'  , REQUEST_POST('title'));
-                               define('__SMTP_HOST'    , REQUEST_POST('smtp_host'));
-                               define('__SMTP_USER'    , REQUEST_POST('smtp_user'));
-                               define('__SMTP_PASS'    , REQUEST_POST('smtp_pass1'));
-
-                               // Load template
-                               LOAD_TEMPLATE('install_fatal_errors');
+                               if (getTotalFatalErrors() > 0) {
+                                       $OUT = '';
+                                       foreach (getFatalArray() as $value) {
+                                               $OUT .= "    <li>".$value."</li>\n";
+                                       } // END foreach
+                                       define('__FATAL_ERROR_LI', $OUT);
+                                       $OUT = '';
+                                       foreach ($mysql as $key => $value) {
+                                               $OUT .= "    <input type=\"hidden\" name=\"mysql[".$key."]\" value=\"".$value."\" />\n";
+                                       } // END foreach
+                                       define('__MYSQL_DATA'   , $OUT);
+                                       define('__SPATH_VALUE'  , REQUEST_POST('spath'));
+                                       define('__BURL_VALUE'   , REQUEST_POST('burl'));
+                                       define('__TITLE_VALUE'  , REQUEST_POST('title'));
+                                       define('__SMTP_HOST'    , REQUEST_POST('smtp_host'));
+                                       define('__SMTP_USER'    , REQUEST_POST('smtp_user'));
+                                       define('__SMTP_PASS'    , REQUEST_POST('smtp_pass1'));
+
+                                       // Load template
+                                       LOAD_TEMPLATE('install_fatal_errors');
+                               } else {
+                                       // Installation is done!
+                                       redirectToUrl('install.php?page=finalize');
+                               }
+                       } elseif (isInstalled()) {
+                               // Redirection after writing data... :-)
+                               LOAD_TEMPLATE('install_finished');
                        } else {
-                               // Installation is done!
-                               redirectToUrl('install.php?page=finalize');
+                               // Something goes wrong during installation! :-(
+                               addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_FINALIZER_FAILED'));
+                               loadInclude('inc/fatal_errors.php');
                        }
-               } elseif (isInstalled()) {
-                       // Redirection after writing data... :-)
-                       LOAD_TEMPLATE('install_finished');
-               } else {
-                       // Something goes wrong during installation! :-(
-                       addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_FINALIZER_FAILED'));
-                       loadInclude('inc/fatal_errors.php');
-               }
-               break;
-
-       default:
-               DEBUG_LOG(__FILE__, __LINE__, sprintf("Wrong page %s detected", REQUEST_GET('page')));
-               OUTPUT_HTML("    <div class=\"install_error\">{--WRONG_PAGE--}</div>");
-               break;
+                       break;
+
+               default:
+                       DEBUG_LOG(__FILE__, __LINE__, sprintf("Wrong page %s detected", REQUEST_GET('page')));
+                       OUTPUT_HTML("    <div class=\"install_error\">{--WRONG_PAGE--}</div>");
+                       break;
        }
 } else {
        // Already installed!
diff --git a/inc/language-functions.php b/inc/language-functions.php
new file mode 100644 (file)
index 0000000..b416d32
--- /dev/null
@@ -0,0 +1,115 @@
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 08/25/2003 *
+ * ===============                              Last change: 11/29/2005 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : language-functions.php                           *
+ * -------------------------------------------------------------------- *
+ * Short description : Language functions                               *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Sprachfunktionen                                 *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $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 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
+       require($INC);
+}
+
+// "Getter" for language strings
+// @TODO Rewrite all language constants to this function.
+function getMessage ($messageId) {
+       // Default is not found!
+       $return = '!'.$messageId.'!';
+
+       // Is the language string found?
+       if (isset($GLOBALS['msg'][strtolower($messageId)])) {
+               // Language array element found in small_letters
+               $return = $GLOBALS['msg'][$messageId];
+       } elseif (isset($GLOBALS['msg'][strtoupper($messageId)])) {
+               // @DEPRECATED Language array element found in BIG_LETTERS
+               $return = $GLOBALS['msg'][$messageId];
+       } elseif (defined($messageId)) {
+               // @DEPRECATED Deprecated constant found
+               $return = constant($messageId);
+       } else {
+               // Missing language constant
+               DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Missing message string %s detected.", $messageId));
+       }
+
+       // Return the string
+       return $return;
+}
+
+// "Getter" for language
+function getLanguage () {
+       // Set default return value to default language from config
+       $ret = getConfig('DEFAULT_LANG');
+
+       // Init variable
+       $lang = '';
+
+       // Is the variable set
+       if (REQUEST_ISSET_GET('mx_lang')) {
+               // Accept only first 2 chars
+               $lang = substr(REQUEST_GET('mx_lang'), 0, 2);
+       } elseif (isset($GLOBALS['cache_array']['language'])) {
+               // Use cached
+               $ret = $GLOBALS['cache_array']['language'];
+       } elseif (!empty($lang)) {
+               // Check if main language file does exist
+               if (isFileReadable(constant('PATH') . 'inc/language/'.$lang.'.php')) {
+                       // Okay found, so let's update cookies
+                       setLanguage($lang);
+               } // END - if
+       } elseif (isSessionVariableSet('mx_lang')) {
+               // Return stored value from cookie
+               $ret = getSession('mx_lang');
+
+               // Fixes a warning before the session has the mx_lang constant
+               if (empty($ret)) $ret = getConfig('DEFAULT_LANG');
+       }
+
+       // Cache entry
+       $GLOBALS['cache_array']['language'] = $ret;
+
+       // Return value
+       return $ret;
+}
+
+// "Setter" for language
+function setLanguage ($lang) {
+       // Accept only first 2 chars!
+       $lang = substr(SQL_ESCAPE(strip_tags($lang)), 0, 2);
+
+       // Set cookie
+       setSession('mx_lang', $lang);
+}
+
+// [EOF]
+?>
index 9b2b5a6caa6570ae64fb68b2c626f1f148ae8038..fdb0d6dbec9916950f6732e64124c3d7e543c7fe 100644 (file)
@@ -54,7 +54,7 @@ $INC = sprintf("inc/language/%s.php", SQL_ESCAPE($mx_lang));
 // Look for file
 if (!isIncludeReadable($INC)) {
        // Switch to default (DO NOT CHANGE!!!)
-       setSession('mx_lang', 'de');
+       setLanguage('de');
        $INC = 'inc/language/de.php';
 
        // And set it temporarily
index b3c079aac547672ef5f4006f00b9be4f887c94b1..99718e51dce93c7ab2f6b1c55b8d962cac97fe94 100644 (file)
@@ -50,10 +50,10 @@ function FILTER_ADD_LINK_ACTIVE_LIST () {
                $content = array(
                        'menu' => "<a class=\"menu_blur\" href=\"{!URL!}/modules.php?module=index&amp;what=active\">".getConfig('menu_blur_spacer').GUEST_ACTIVE_LINK."</a>",
                        'what' => 'active'
-               );
+                       );
 
-               // Add link to "we were active today" page
-               LOAD_TEMPLATE("guest_menu_bottom", false, $content);
+                       // Add link to "we were active today" page
+                       LOAD_TEMPLATE("guest_menu_bottom", false, $content);
        } // END - if
 }
 
index 1279145d40b2a8490589c7c6db979bbadaf520f9..04511c31430ea6ed6bf07600def8898a5acb4f65 100644 (file)
@@ -91,11 +91,11 @@ function adminsCheckAdminAcl ($act, $wht) {
                if (!empty($act)) {
                        // Main menu
                        $result = SQL_QUERY_ESC("SELECT access_mode FROM `{!_MYSQL_PREFIX!}_admins_acls` WHERE admin_id=%s AND action_menu='%s' LIMIT 1",
-                               array(bigintval($aid), $act), __FUNCTION__, __LINE__);
+                       array(bigintval($aid), $act), __FUNCTION__, __LINE__);
                } elseif (!empty($wht)) {
                        // Sub menu
                        $result = SQL_QUERY_ESC("SELECT access_mode FROM `{!_MYSQL_PREFIX!}_admins_acls` WHERE admin_id=%s AND what_menu='%s' LIMIT 1",
-                               array(bigintval($aid), $wht), __FUNCTION__, __LINE__);
+                       array(bigintval($aid), $wht), __FUNCTION__, __LINE__);
                }
 
                // Is an entry found?
@@ -127,7 +127,7 @@ function adminsCreateEmailLink ($email, $mod='admin') {
                $result = SQL_QUERY_ESC("SELECT `id`
 FROM `{!_MYSQL_PREFIX!}_admins`
 WHERE `email`='%s' LIMIT 1",
-                       array($email), __FUNCTION__, __LINE__);
+               array($email), __FUNCTION__, __LINE__);
 
                // Is there an entry?
                if (SQL_NUMROWS($result) == 1) {
@@ -201,13 +201,13 @@ email='%s',
 default_acl='%s',
 la_mode='%s'
 WHERE `id`=%s LIMIT 1",
-                                       array(
-                                               $login,
-                                               $POST['email'][$id],
-                                               $POST['mode'][$id],
-                                               $POST['la_mode'][$id],
-                                               $id
-                                       ), __FUNCTION__, __LINE__);
+                               array(
+                               $login,
+                               $POST['email'][$id],
+                               $POST['mode'][$id],
+                               $POST['la_mode'][$id],
+                               $id
+                               ), __FUNCTION__, __LINE__);
                        } else {
                                // Do not allow it here
                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admins` SET
@@ -215,12 +215,12 @@ login='%s'".$add.",
 email='%s',
 la_mode='%s'
 WHERE `id`=%s LIMIT 1",
-                                       array(
-                                               $login,
-                                               $POST['email'][$id],
-                                               $POST['la_mode'][$id],
-                                               $id
-                                       ), __FUNCTION__, __LINE__);
+                               array(
+                               $login,
+                               $POST['email'][$id],
+                               $POST['la_mode'][$id],
+                               $id
+                               ), __FUNCTION__, __LINE__);
                        }
 
                        // Purge cache
@@ -256,7 +256,7 @@ function adminsEditAdminAccount ($POST) {
 
                // Get the admin's data
                $result = SQL_QUERY_ESC("SELECT login, email, default_acl AS mode, la_mode FROM `{!_MYSQL_PREFIX!}_admins` WHERE `id`=%s LIMIT 1",
-                       array($id), __FUNCTION__, __LINE__);
+               array($id), __FUNCTION__, __LINE__);
                if ((SQL_NUMROWS($result) == 1) && ($selected == 1)) {
                        // Entry found
                        $content = SQL_FETCHARRAY($result);
@@ -302,7 +302,7 @@ function adminsDeleteAdminAccount ($POST) {
 
                        // Get the admin's data
                        $result = SQL_QUERY_ESC("SELECT login, email, default_acl AS mode, la_mode FROM `{!_MYSQL_PREFIX!}_admins` WHERE `id`=%s LIMIT 1",
-                               array($id), __FUNCTION__, __LINE__);
+                       array($id), __FUNCTION__, __LINE__);
                        if (SQL_NUMROWS($result) == 1) {
                                // Entry found
                                $content = SQL_FETCHARRAY($result);
@@ -341,11 +341,11 @@ function adminsRemoveAdminAccount ($POST) {
                if (($del == 1) && (getCurrentAdminId() != $id)) {
                        // Rewrite his tasks to all admins
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_task_system` SET `assigned_admin`=0 WHERE `assigned_admin`=%s",
-                        array($id), __FUNCTION__, __LINE__);
+                       array($id), __FUNCTION__, __LINE__);
 
                        // Remove account
                        SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admins` WHERE `id`=%s LIMIT 1",
-                               array($id), __FUNCTION__, __LINE__);
+                       array($id), __FUNCTION__, __LINE__);
 
                        // Purge cache
                        cachePurgeAdminMenu($id);
index b0c8a2e38a258cbb452659f4cacc60d8979dfbe2..e9b9fdffadefed0da6dab5581be285e777063a11 100644 (file)
@@ -45,7 +45,7 @@ if (!defined('__SECURITY')) {
 function AUTOPURGE_ADD_POINTS($uid, $points) {
        // Check if he has locked points or not
        $result = SQL_QUERY_ESC("SELECT ref_payout FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-               array(bigintval($uid)), __FUNCTION__, __LINE__);
+       array(bigintval($uid)), __FUNCTION__, __LINE__);
        list($payout) = SQL_FETCHROW($result);
        SQL_FREERESULT($result);
 
@@ -66,7 +66,7 @@ function AUTOPURGE_ADD_POINTS($uid, $points) {
        } else {
                // .. to user's account
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_points` SET %s=%s+%s WHERE userid=%s AND ref_depth=0 LIMIT 1",
-                       array($target, $target, $points, bigintval($uid)), __FUNCTION__, __LINE__);
+               array($target, $target, $points, bigintval($uid)), __FUNCTION__, __LINE__);
 
                // Update mediadata as well
                if ((GET_EXT_VERSION('mediadata') >= '0.0.4') && ($target == "points")) {
index c80c3e129dde7fde43c784c128ef4c22c3f9676c..f0208c5e0a938de1acb362648350f45d9913e369 100644 (file)
@@ -52,7 +52,7 @@ function BEG_ADD_POINTS ($uid, $points) {
        if (getConfig('beg_rallye') == 'Y') {
                // Add points to rallye account
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET beg_points=beg_points+%s WHERE userid=%s LIMIT 1",
-                       array($points, $uid), __FUNCTION__, __LINE__);
+               array($points, $uid), __FUNCTION__, __LINE__);
        } else {
                // Add points to account
                unset($GLOBALS['ref_level']);
index d5a360e57cb9699117cca66dcc8d5c248e35f1af..a13aec9642ac2bec0e371ffb9c92c3284c2e7c2f 100644 (file)
@@ -53,19 +53,19 @@ function BONUS_ADD_TURBO_POINTS ($mid, $uid, $type) {
        // Select SQL command
        switch ($type)
        {
-       case 'bonusid':
-               $column = 'bonus_id';
-               $bonus = $mid;
-               break;
-
-       case 'mailid' :
-               $column = 'mail_id';
-               $mail = $mid;
-               break;
-
-       default:
-               DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Invalid type %s detected.", $type));
-               break;
+               case 'bonusid':
+                       $column = 'bonus_id';
+                       $bonus = $mid;
+                       break;
+
+               case 'mailid' :
+                       $column = 'mail_id';
+                       $mail = $mid;
+                       break;
+
+               default:
+                       DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Invalid type %s detected.", $type));
+                       break;
        }
 
        // Is a column name set?
@@ -76,7 +76,7 @@ function BONUS_ADD_TURBO_POINTS ($mid, $uid, $type) {
 
        // Check for entry
        $result = SQL_QUERY_ESC("SELECT COUNT(id) AS cnt FROM  `{!_MYSQL_PREFIX!}_bonus_turbo` WHERE userid=%s AND %s=%s LIMIT 1",
-               array($uid, $column, $mid), __FUNCTION__, __LINE__);
+       array($uid, $column, $mid), __FUNCTION__, __LINE__);
 
        // Load clicks from table as current rank
        list($rank) = SQL_FETCHROW($result);
@@ -105,11 +105,11 @@ function BONUS_ADD_TURBO_POINTS ($mid, $uid, $type) {
 
        // Add points to his account directly
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET turbo_bonus=turbo_bonus+".$points." WHERE userid=%s LIMIT 1",
-               array(bigintval($uid)), __FUNCTION__, __LINE__);
+       array(bigintval($uid)), __FUNCTION__, __LINE__);
 
        // Rember this whole data for displaying ranking list
        SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_bonus_turbo` (userid, mail_id, bonus_id, level, points, timemark) VALUES ('%s', '%s', '%s', '%s', '%s', UNIX_TIMESTAMP())",
-               array(bigintval($uid), bigintval($mail), bigintval($bonus), $rank, $points), __FUNCTION__, __LINE__);
+       array(bigintval($uid), bigintval($mail), bigintval($bonus), $rank, $points), __FUNCTION__, __LINE__);
 
        if ((GET_EXT_VERSION('bonus') >= '0.3.5') && (getConfig('bonus_mode') != "ADD") && ($points > 0)) BONUS_POINTS_HANDLER($points);
 }
@@ -122,7 +122,7 @@ function BONUS_MAKE_RANK_ROWS ($data, $type, $uid) {
 
        // Load current user's data
        $result = SQL_QUERY_ESC("SELECT level, points, timemark FROM `{!_MYSQL_PREFIX!}_bonus_turbo` WHERE %s=%s AND `userid`=%s LIMIT 1",
-               array($type, $data, $uid), __FUNCTION__, __LINE__);
+       array($type, $data, $uid), __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Load data
                list($rank, $points, $mark) = SQL_FETCHROW($result);
@@ -141,7 +141,7 @@ function BONUS_MAKE_RANK_ROWS ($data, $type, $uid) {
 
        // Load rankings
        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_bonus_turbo` WHERE %s=%s ORDER BY level LIMIT %s",
-               array($type, $data, getConfig('bonus_lines')), __FUNCTION__, __LINE__);
+       array($type, $data, getConfig('bonus_lines')), __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result) > 0) {
                // Start generating the ranking list
                $max = SQL_NUMROWS($result);
@@ -150,7 +150,7 @@ function BONUS_MAKE_RANK_ROWS ($data, $type, $uid) {
                for ($rank = 1; $rank <= $max; $rank++) {
                        // Load data
                        $result_users = SQL_QUERY_ESC("SELECT userid, points, timemark FROM `{!_MYSQL_PREFIX!}_bonus_turbo` WHERE %s=%s AND level=%s LIMIT 1",
-                               array($type, $data, $rank), __FUNCTION__, __LINE__);
+                       array($type, $data, $rank), __FUNCTION__, __LINE__);
 
                        // Nothing found by default
                        $userid = '---'; $points = '---';
@@ -210,28 +210,28 @@ function BONUS_POINTS_HANDLER ($mode) {
        // Subtract points from...
        switch (getConfig('bonus_mode'))
        {
-       case 'JACKPOT': // ... jackpot
-               if ((SUB_JACKPOT($points) == -1) && (getConfig('bonus_uid') > 0)) {
-                       // Check points amount first...
+               case 'JACKPOT': // ... jackpot
+                       if ((SUB_JACKPOT($points) == -1) && (getConfig('bonus_uid') > 0)) {
+                               // Check points amount first...
+                               $total = GET_TOTAL_DATA(getConfig('bonus_uid'), 'user_points', 'points') - GET_TOTAL_DATA(getConfig('bonus_uid'), 'user_data', 'used_points');
+                               if ($total >= $points) {
+                                       // Subtract points from userid's account
+                                       SUB_POINTS('bonus_payout_jackpot', getConfig('bonus_uid'), $points);
+                               } // END - if
+                       } // END - if
+                       break;
+
+               case 'UID': // ... userid's account
+                       // Check his amount first
                        $total = GET_TOTAL_DATA(getConfig('bonus_uid'), 'user_points', 'points') - GET_TOTAL_DATA(getConfig('bonus_uid'), 'user_data', 'used_points');
                        if ($total >= $points) {
                                // Subtract points from userid's account
-                               SUB_POINTS('bonus_payout_jackpot', getConfig('bonus_uid'), $points);
-                       } // END - if
-               } // END - if
-               break;
-
-       case 'UID': // ... userid's account
-               // Check his amount first
-               $total = GET_TOTAL_DATA(getConfig('bonus_uid'), 'user_points', 'points') - GET_TOTAL_DATA(getConfig('bonus_uid'), 'user_data', 'used_points');
-               if ($total >= $points) {
-                       // Subtract points from userid's account
-                       SUB_POINTS('bonus_payout_uid', getConfig('bonus_uid'), $points);
-               } else {
-                       // Try to subtract from jackpot
-                       $dummy = SUB_JACKPOT($points);
-               }
-               break;
+                               SUB_POINTS('bonus_payout_uid', getConfig('bonus_uid'), $points);
+                       } else {
+                               // Try to subtract from jackpot
+                               $dummy = SUB_JACKPOT($points);
+                       }
+                       break;
        }
 }
 
index 20bda61bbd2578f1666278d030af9695279ffb7b..4297becaeb54847e85bdb52d6863595ca015c261 100644 (file)
@@ -53,7 +53,7 @@ function ADD_BOOKING_RECORD ($subject, $uid, $points, $mode) {
 
        // Add record entry here
        SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_book` (`userid`,`subject`,`mode`,`points`) VALUES(%s,'%s','%s',%s)",
-               array($uid, $subject, $mode, $points), __FUNCTION__, __LINE__);
+       array($uid, $subject, $mode, $points), __FUNCTION__, __LINE__);
 }
 
 // [EOF]
index 1e38e1faf6763a3ba996c0b5ca1a358c0647789e..4dfed15897d770f3a997001f0523f7fdba06c8de 100644 (file)
@@ -76,7 +76,7 @@ class CacheSystem {
                        // Is the file there?
                        if (isFileReadable($fqfn)) {
                                // Yes, we can do. So let's remove it
-                               unlink($fqfn);
+                               removeFile($fqfn);
 
                                // Is there a .htaccess file?
                                if (isFileReadable($path . '.htaccess')) {
@@ -234,7 +234,7 @@ class CacheSystem {
 
                        // Remove cache file from system
                        //* DEBUG: */ print __METHOD__."(<font color=\"#0000aa\">".__LINE__."</font>): {$this->name} - DESTROYED!<br />\n";
-                       unlink($this->fqfn);
+                       removeFile($this->fqfn);
                        // @TODO remove from $GLOBALS['cache_array']!!!
 
                        // Is the file there?
index 6da1d355a5e29a36ea0e8546fc415872d11805d8..e8f7df36f5d37d505d4554acdc886ab6686b0d91 100644 (file)
@@ -46,7 +46,7 @@ if (!defined('__SECURITY')) {
 function COUNTRY_GENERATE_INFO ($id) {
        // Load code and description
        $result = SQL_QUERY_ESC("SELECT code, descr FROM `{!_MYSQL_PREFIX!}_countries` WHERE `id`=%s LIMIT 1",
-               array(bigintval($id)), __FUNCTION__, __LINE__);
+       array(bigintval($id)), __FUNCTION__, __LINE__);
 
        // Is there an entry?
        if (SQL_NUMROWS($result) == 1) {
index 885c6551a7243c00edd5164907aad520fa4bad87..4e82a02ce4535f24dbc9fafc87b7fc02e0d0d171 100644 (file)
@@ -59,7 +59,7 @@ ORDER BY `userid` ASC", __FUNCTION__, __LINE__);
                while ($content = SQL_FETCHARRAY($result_stop)) {
                        // Stop holiday
                        ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_holidays` WHERE userid=%s LIMIT 1",
-                               array(bigintval($content['userid'])), __FUNCTION__, __LINE__, false));
+                       array(bigintval($content['userid'])), __FUNCTION__, __LINE__, false));
 
                        // Unlock account
                        ADD_SQL(SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data`
index dfa0e4f5fbb3131c01b2f7348e34848fa7396290..bfcd911183cb4e16a53a2ca808eb92b27d732eb4 100644 (file)
@@ -53,7 +53,7 @@ WHERE media_key = '%s' LIMIT 1", array($key), __FUNCTION__, __LINE__);
                        if (SQL_NUMROWS($result_media) == 0) {
                                // Not found so we create it (mode will be ignored here!)
                                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_mediadata` (media_key, media_value) VALUES ('%s', '%s')",
-                                       array($key, $value), __FUNCTION__, __LINE__);
+                               array($key, $value), __FUNCTION__, __LINE__);
                        } else {
                                // Update entry
                                switch ($mode) {
@@ -64,11 +64,11 @@ WHERE media_key = '%s' LIMIT 1", array($key), __FUNCTION__, __LINE__);
                                if ($mode == 'init') {
                                        // Initialize entry
                                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_mediadata` SET media_value=%s WHERE media_key='%s' LIMIT 1",
-                                               array($value, $key), __FUNCTION__, __LINE__);
+                                       array($value, $key), __FUNCTION__, __LINE__);
                                } else {
                                        // Update entry
                                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_mediadata` SET media_value=media_value".$mode."%s WHERE media_key='%s' LIMIT 1",
-                                               array($value, $key), __FUNCTION__, __LINE__);
+                                       array($value, $key), __FUNCTION__, __LINE__);
                                }
                        }
                }
@@ -82,7 +82,7 @@ function MEDIA_GET_ENTRY ($key) {
 
        // Check for entry
        $result = SQL_QUERY_ESC("SELECT media_value FROM `{!_MYSQL_PREFIX!}_mediadata` WHERE media_key='%s' LIMIT 1",
-               array($key), __FUNCTION__, __LINE__);
+       array($key), __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Load data
                list($value) = SQL_FETCHROW($result);
index 71eabb03aa939bf667b3da7b364cacd32a033abb..cb013cf8ab6416b49399106aa6aec796831f92fe 100644 (file)
@@ -58,7 +58,7 @@ function NICKNAME_IS_ACTIVE ($uidNick) {
                // Search in database
                // @TODO Can we replace this with GET_TOTAL_DATA() ?
                $result = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s OR nickname='%s' LIMIT 1",
-                       array(bigintval($uidNick), $uidNick), __FUNCTION__, __LINE__);
+               array(bigintval($uidNick), $uidNick), __FUNCTION__, __LINE__);
 
                // Check existence of nickname
                $ret = (SQL_NUMROWS($result) == 1);
@@ -89,7 +89,7 @@ function NICKNAME_GET_NICK ($userid) {
        } elseif (NICKNAME_IS_ACTIVE($userid)) {
                // Search for non-empty nickname
                $result = SQL_QUERY_ESC("SELECT nickname FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND nickname != '' LIMIT 1",
-                       array(bigintval($userid)), __FUNCTION__, __LINE__);
+               array(bigintval($userid)), __FUNCTION__, __LINE__);
 
                // Found?
                if (SQL_NUMROWS($result) == 1) {
index 3d8578fc8443a47fa64efd2a290f238864980609..7d1eb61339e95b7faec89c03b4371c98c7a259c4 100644 (file)
@@ -75,7 +75,7 @@ function FILTER_UPDATE_ONLINE_LIST () {
 
        // Now search for the user
        $result = SQL_QUERY_ESC("SELECT timestamp FROM `{!_MYSQL_PREFIX!}_online` WHERE sid='%s' LIMIT 1",
-               array(session_id()), __FUNCTION__, __LINE__);
+       array(session_id()), __FUNCTION__, __LINE__);
 
        // Entry found?
        if (SQL_NUMROWS($result) == 1) {
@@ -91,32 +91,32 @@ is_admin='%s',
 timestamp=UNIX_TIMESTAMP(),
 ip='%s'
 WHERE sid='%s' LIMIT 1",
-                       array(
-                               $GLOBALS['module'],
-                               $GLOBALS['action'],
-                               $GLOBALS['what'],
-                               $uid,
-                               $rid,
-                               $MEM,
-                               $ADMIN,
-                               detectRemoteAddr(),
-                               session_id()
-                       ), __FUNCTION__, __LINE__
+               array(
+               $GLOBALS['module'],
+               $GLOBALS['action'],
+               $GLOBALS['what'],
+               $uid,
+               $rid,
+               $MEM,
+               $ADMIN,
+               detectRemoteAddr(),
+               session_id()
+               ), __FUNCTION__, __LINE__
                );
        } else {
                // No entry does exists so we simply add it!
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_online` (module, action, what, userid, refid, is_member, is_admin, timestamp, sid, ip) VALUES ('%s','%s','%s', %s, %s, '%s','%s', UNIX_TIMESTAMP(), '%s','%s')",
-                       array(
-                               $GLOBALS['module'],
-                               $GLOBALS['action'],
-                               $GLOBALS['what'],
-                               $uid,
-                               $rid,
-                               $MEM,
-                               $ADMIN,
-                               session_id(),
-                               detectRemoteAddr()
-                       ), __FUNCTION__, __LINE__
+               array(
+               $GLOBALS['module'],
+               $GLOBALS['action'],
+               $GLOBALS['what'],
+               $uid,
+               $rid,
+               $MEM,
+               $ADMIN,
+               session_id(),
+               detectRemoteAddr()
+               ), __FUNCTION__, __LINE__
                );
        }
 
@@ -125,7 +125,7 @@ WHERE sid='%s' LIMIT 1",
 
        // Purge old entries
        SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_online` WHERE timestamp <= (UNIX_TIMESTAMP() - %s)",
-               array(getConfig('online_timeout')), __FUNCTION__, __LINE__);
+       array(getConfig('online_timeout')), __FUNCTION__, __LINE__);
 }
 
 //
index 26c282c6effb5068d83d00874807cd318d9bdd1a..3f7f445f79f577809e72029c9387691a4f9690eb 100644 (file)
@@ -28,7 +28,7 @@
  *
  *     Wobei $PayReicer der Username des Empfängers bei
  *     Primusportal.de ist. $PayAmount ist der gerundete( !! ) Betrag an Primera,
- *     die der Empfänger erhalten soll. $PayDescription ist eine von Ihnen 
+ *     die der Empfänger erhalten soll. $PayDescription ist eine von Ihnen
  *     festgelegte kurze Beschreibung. Die Länge dieses Textes darf 100 Zeichen
  *     nicht überschreiten. Beispiel:
  *       $status = $Interface->payPrimera("garbage", 10000, "Auszahlung IhreSeite.de - ID: 12345");
index 46e8c4584720e3d758b942abc7268a91f8cec122..607f4a15421001b00debde8abf2083c4c5817fcf 100644 (file)
@@ -54,7 +54,7 @@ function RALLYE_AUTOSTART_RALLYES ($result) {
 
        // Set notified to Y
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET notified='Y' WHERE `id`=%s LIMIT 1",
-               array(bigintval($id)), __FUNCTION__, __LINE__);
+       array(bigintval($id)), __FUNCTION__, __LINE__);
 
        // Do a snapshot off all user refs
        $result_user = SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `status`='CONFIRMED' ORDER BY `userid` ASC", __FUNCTION__, __LINE__);
@@ -84,7 +84,7 @@ function RALLYE_AUTOSTART_RALLYES ($result) {
 
                // Check if line is already included...
                $result_ref = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_rallye_users` WHERE rallye_id=%s AND `userid`=%s LIMIT 1",
-                       array(bigintval($id), bigintval($content['userid'])), __FUNCTION__, __LINE__);
+               array(bigintval($id), bigintval($content['userid'])), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result_ref) == 0) {
                        // Free memory
                        SQL_FREERESULT($result_ref);
@@ -95,7 +95,7 @@ FROM `{!_MYSQL_PREFIX!}_user_points` AS p
 LEFT JOIN `{!_MYSQL_PREFIX!}_user_data` AS d
 ON p.userid=d.userid
 WHERE d.`status`='CONFIRMED' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND p.ref_depth=1 AND p.points > 0 AND d.userid=%s",
-                               array(getConfig('ref_payout'), bigintval($content['userid'])), __FUNCTION__, __LINE__);
+                       array(getConfig('ref_payout'), bigintval($content['userid'])), __FUNCTION__, __LINE__);
                        list($cpoints) = SQL_FETCHROW($result_ref);
                        SQL_FREERESULT($result_ref);
 
@@ -104,7 +104,7 @@ WHERE d.`status`='CONFIRMED' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND
                        // Add info line
                        SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_rallye_users` (rallye_id, userid, refs, curr_points)
 VALUES ('%s','%s','%s','%s')",
-                               array(bigintval($id), bigintval($content['userid']), bigintval($cnt), $cpoints), __FUNCTION__, __LINE__);
+                       array(bigintval($id), bigintval($content['userid']), bigintval($cnt), $cpoints), __FUNCTION__, __LINE__);
                        $un = true;
                } // END - if
 
@@ -171,7 +171,7 @@ function RALLYE_ADD_PRICES ($rallye, $mode='email') {
 function RALLYE_ADD_TOPUSERS ($rallye, $default=0) {
        // First check how many prices are set
        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id=%s ORDER BY price_level",
-               array(bigintval($rallye)), __FUNCTION__, __LINE__);
+       array(bigintval($rallye)), __FUNCTION__, __LINE__);
        $prices = SQL_NUMROWS($result);
        SQL_FREERESULT($result);
 
@@ -180,7 +180,7 @@ function RALLYE_ADD_TOPUSERS ($rallye, $default=0) {
 LEFT JOIN `{!_MYSQL_PREFIX!}_refsystem` AS r
 ON u.userid=r.userid
 WHERE u.rallye_id=%s AND r.counter > 0 ORDER BY u.refs DESC",
-               array(bigintval($rallye)), __FUNCTION__, __LINE__);
+       array(bigintval($rallye)), __FUNCTION__, __LINE__);
 
        // Load users
        $DATA = array(
@@ -278,14 +278,14 @@ function RALLYE_AUTOADD_USER ($uid) {
 
                // Check if line is already included...
                $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_rallye_users` WHERE rallye_id=%s AND `userid`=%s LIMIT 1",
-                       array(bigintval($id), bigintval($uid)), __FUNCTION__, __LINE__);
+               array(bigintval($id), bigintval($uid)), __FUNCTION__, __LINE__);
 
                // Is this user added?
                if (SQL_NUMROWS($result) == 0) {
                        // Add userid and his ref count to table
                        SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_rallye_users` (rallye_id, userid, refs)
 VALUES ('%s','%s','0')",
-                               array(bigintval($id), bigintval($uid)), __FUNCTION__, __LINE__);
+                       array(bigintval($id), bigintval($uid)), __FUNCTION__, __LINE__);
                } // END - if
 
                // Free memory
@@ -363,7 +363,7 @@ LIMIT 1", array(bigintval($uid)), __FUNCTION__, __LINE__);
 
        // Expire rallye
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET expired='Y' WHERE `id`=%s LIMIT 1",
-               array(bigintval($id)), __FUNCTION__, __LINE__);
+       array(bigintval($id)), __FUNCTION__, __LINE__);
 
        // Run array through (by uid is the most important 2nd-level-array)
        foreach($prices['uid'] as $key => $uid) {
@@ -434,7 +434,7 @@ LIMIT 1", array(bigintval($uid)), __FUNCTION__, __LINE__);
        // Add task
        SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_task_system` (status, task_type, subject, text, task_created)
 VALUES ('NEW','RALLYE_EXPIRED','{--RALLYE_ADMIN_EXPIRED--}: %s','{--RALLYE_ADMIN_EXPIRED_TEXT--}',UNIX_TIMESTAMP())",
-               array($title), __FUNCTION__, __LINE__);
+       array($title), __FUNCTION__, __LINE__);
 
        // All work done here...
 }
@@ -449,15 +449,15 @@ function RALLYE_LOAD_USER_DATA ($uids_array) {
 
        // Load users
        $result = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid IN(%s) AND `status`='CONFIRMED' ORDER BY userid LIMIT %s",
-               array($uid_string, count($uids_array)), __FUNCTION__, __LINE__);
+       array($uid_string, count($uids_array)), __FUNCTION__, __LINE__);
        while ($content = SQL_FETCHARRAY($result)) {
                // Construct the message masked and add it
                $ret .= sprintf("%s %s %s (%s) - %s\n",
-                       translateGender($content['gender']),
-                       $content['surname'],
-                       $content['family'],
-                       $content['email'],
-                       $uids_array['poi'][$content['userid']]
+               translateGender($content['gender']),
+               $content['surname'],
+               $content['family'],
+               $content['email'],
+               $uids_array['poi'][$content['userid']]
                );
        } // END - while
 
@@ -476,7 +476,7 @@ function RALLYE_LOAD_PRICES_ARRAY ($rallye) {
 
        // Load prices
        $result = SQL_QUERY_ESC("SELECT price_level, points, info FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id=%s ORDER BY price_level",
-               array(bigintval($rallye)), __FUNCTION__, __LINE__);
+       array(bigintval($rallye)), __FUNCTION__, __LINE__);
 
        // Transfer elements
        while ($content = SQL_FETCHARRAY($result)) {
@@ -506,7 +506,7 @@ function RALLYE_LOAD_USERS_ARRAY ($rallye) {
 
        // Load users                          uid    old  points earned
        $result_user = SQL_QUERY_ESC("SELECT userid, refs, curr_points FROM `{!_MYSQL_PREFIX!}_rallye_users` WHERE rallye_id=%s ORDER BY `userid` ASC",
-               array(bigintval($rallye)), __FUNCTION__, __LINE__);
+       array(bigintval($rallye)), __FUNCTION__, __LINE__);
        while ($content = SQL_FETCHARRAY($result_user)) {
                // Load current ref count
                $cnt = RALLYE_GET_REFCOUNT($content['userid'], $content['refs']);
@@ -517,7 +517,7 @@ FROM `{!_MYSQL_PREFIX!}_user_points` AS p
 LEFT JOIN `{!_MYSQL_PREFIX!}_user_data` AS d
 ON p.userid=d.userid
 WHERE d.`status`='CONFIRMED' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND p.ref_depth=1 AND p.points > 0 AND d.userid=%s",
-                       array(getConfig('ref_payout'), bigintval($content['userid'])), __FUNCTION__, __LINE__);
+               array(getConfig('ref_payout'), bigintval($content['userid'])), __FUNCTION__, __LINE__);
                list($refpoints) = SQL_FETCHROW($result_ref);
                SQL_FREERESULT($result_ref);
 
@@ -559,7 +559,7 @@ WHERE d.`status`='CONFIRMED' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND
 function RALLYE_LIST_WINNERS ($rallye, $default=0) {
        // First check how many prices are set
        $result_prices = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id=%s ORDER BY price_level",
-               array(bigintval($rallye)), __FUNCTION__, __LINE__);
+       array(bigintval($rallye)), __FUNCTION__, __LINE__);
        $prices = SQL_NUMROWS($result_prices);
        SQL_FREERESULT($result_prices);
 
@@ -574,7 +574,7 @@ function RALLYE_LIST_WINNERS ($rallye, $default=0) {
                //   active = 1: account is still confirmed
                //   active = 0: account is deleted or locked
                $result_active = SQL_QUERY_ESC("SELECT COUNT(userid) FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
-                       array(bigintval($DATA['uid'][$idx])), __FUNCTION__, __LINE__);
+               array(bigintval($DATA['uid'][$idx])), __FUNCTION__, __LINE__);
                list($active) = SQL_FETCHROW($result_active);
                SQL_FREERESULT($result_active);
 
@@ -632,7 +632,7 @@ function RALLYE_DELETE_EXPIRED_RALLYES () {
        $result_rallye = SQL_QUERY_ESC("SELECT id, title, start_time, end_time
 FROM `{!_MYSQL_PREFIX!}_rallye_data`
 WHERE end_time <= (UNIX_TIMESTAMP() - %s) AND expired='Y'",
-               array($EXPIRE), __FUNCTION__, __LINE__);
+       array($EXPIRE), __FUNCTION__, __LINE__);
 
        if (SQL_NUMROWS($result_rallye) > 0) {
                // Init SQLs
@@ -651,17 +651,17 @@ WHERE end_time <= (UNIX_TIMESTAMP() - %s) AND expired='Y'",
 
                        // Purge whole rallye
                        ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_rallye_data` WHERE `id`=%s LIMIT 1",
-                               array(bigintval($content['id'])), __FUNCTION__, __LINE__, false));
+                       array(bigintval($content['id'])), __FUNCTION__, __LINE__, false));
                        ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id=%s LIMIT 1",
-                               array(bigintval($content['id'])), __FUNCTION__, __LINE__, false));
+                       array(bigintval($content['id'])), __FUNCTION__, __LINE__, false));
                        ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_rallye_users` WHERE rallye_id=%s LIMIT 1",
-                               array(bigintval($content['id'])), __FUNCTION__, __LINE__, false));
+                       array(bigintval($content['id'])), __FUNCTION__, __LINE__, false));
 
                        // Add task
                        // @TODO Rewrite this to a function
                        ADD_SQL(SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_task_system` (status, task_type, subject, text, task_created)
 VALUES ('NEW','RALLYE_PURGED','{--RALLYE_ADMIN_PURGED--}: %s','{--RALLYE_ADMIN_PURGED_TEXT--}',UNIX_TIMESTAMP())",
-                               array($content['title']), __FUNCTION__, __LINE__, false));
+                       array($content['title']), __FUNCTION__, __LINE__, false));
                } // END - while
 
                // Run all SQLs
index 22d611da747f8ddac5fdcb2e0c36149c13268ea7..8da7941e98923c82468b942db8e24d74ad0be1c2 100644 (file)
@@ -46,14 +46,14 @@ if (!defined('__SECURITY')) {
 function ADD_REFBACK_POINTS ($uid, $ref, $points, $ref_points) {
        //* DEBUG: */ print "----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n";
        // Back ref depths
-       $GLOBALS['cache_array']['depth'][$uid][$ref] = $GLOBALS['ref_level']; 
+       $GLOBALS['cache_array']['depth'][$uid][$ref] = $GLOBALS['ref_level'];
 
        // Init points
        $return = $points;
 
        // Get all ref levels
        $result_refs = SQL_QUERY("SELECT level, percents FROM `{!_MYSQL_PREFIX!}_refdepths` WHERE level > 0 ORDER BY level ASC",
-               __FUNCTION__, __LINE__);
+       __FUNCTION__, __LINE__);
 
        // "Walk" through all level
        while ($content = SQL_FETCHARRAY($result_refs)) {
@@ -78,7 +78,7 @@ function ADD_REFBACK_POINTS ($uid, $ref, $points, $ref_points) {
 
                                // Update refback table ("refid" and "uid" must be exchanged!)
                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_refs` SET points=points+%s WHERE userid=%s AND refid=%s LIMIT 1",
-                                       array($refback, $refid, $uid), __FUNCTION__, __LINE__);
+                               array($refback, $refid, $uid), __FUNCTION__, __LINE__);
                                //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):refback={$refback},uid={$uid},refid={$refid} - UPDATE! (".SQL_AFFECTEDROWS().")<br />\n";
 
                                // Add points again, but only directly
@@ -118,7 +118,7 @@ function GET_REFBACK_PERCENTS ($uid, $ref) {
 
        // Get percents from database
        $result = SQL_QUERY_ESC("SELECT refback FROM `{!_MYSQL_PREFIX!}_user_refs` WHERE userid=%s AND refid=%s LIMIT 1",
-               array($ref, $uid), __FUNCTION__, __LINE__);
+       array($ref, $uid), __FUNCTION__, __LINE__);
 
        // Entry found? (Should be!)
        if (SQL_NUMROWS($result) == 1) {
@@ -151,7 +151,7 @@ function GET_REFBACK_USERID_ARRAY ($rid, $level) {
 FROM `{!_MYSQL_PREFIX!}_user_refs`
 WHERE refid=%s AND level=%s
 ORDER BY userid ASC",
-               array($rid,$level), __FUNCTION__, __LINE__);
+       array($rid,$level), __FUNCTION__, __LINE__);
 
        // Entries found?
        //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):numRows=".SQL_NUMROWS($result)."<br />\n";
@@ -185,7 +185,7 @@ function updateRefbackTable ($uid) {
 
        // Check for his referal
        $result_refid = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE refid=%s ORDER BY userid ASC",
-               array(bigintval($uid)), __FUNCTION__, __LINE__);
+       array(bigintval($uid)), __FUNCTION__, __LINE__);
 
        // When no entry was updated then we have to create it here
        //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):found=".SQL_NUMROWS($result_refid)."<br />\n";
@@ -209,7 +209,7 @@ function updateRefbackTable ($uid) {
 
                                // Check existence
                                $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_refs` WHERE userid=%s AND level='%s' AND refid=%s LIMIT 1",
-                                       array(bigintval($uid), $GLOBALS['cache_array']['back_level'], bigintval($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']])), __FUNCTION__, __LINE__);
+                               array(bigintval($uid), $GLOBALS['cache_array']['back_level'], bigintval($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']])), __FUNCTION__, __LINE__);
 
                                // Do we have no entry?
                                //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},level={$GLOBALS['cache_array']['back_level']},ref={$GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']]},minus={$minus},numRows=".SQL_NUMROWS($result)." - FOUND!<br />\n";
@@ -217,7 +217,7 @@ function updateRefbackTable ($uid) {
                                        // Insert this level
                                        //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},level={$GLOBALS['cache_array']['back_level']},ref={$GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']]} - ADD!<br />\n";
                                        SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_refs` (userid,level,refid) VALUES (%s,%s,%s)",
-                                               array(bigintval($uid), $GLOBALS['cache_array']['back_level'], bigintval($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']])), __FUNCTION__, __LINE__);
+                                       array(bigintval($uid), $GLOBALS['cache_array']['back_level'], bigintval($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']])), __FUNCTION__, __LINE__);
 
                                        // Move to next referal level and count his counter one up!
                                        $GLOBALS['cache_array']['back_level']++; updateRefbackTable($GLOBALS['cache_array']['up_refid'][($GLOBALS['cache_array']['back_level'] - 1)]);
@@ -230,14 +230,14 @@ function updateRefbackTable ($uid) {
 
                                        // Shall we add this as well?
                                        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_refs` WHERE userid=%s AND level='%s' AND refid=%s LIMIT 1",
-                                               array(bigintval($uid), ($GLOBALS['cache_array']['back_level']-$minus), bigintval($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']])), __FUNCTION__, __LINE__);
+                                       array(bigintval($uid), ($GLOBALS['cache_array']['back_level']-$minus), bigintval($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']])), __FUNCTION__, __LINE__);
 
                                        // Do we have no entry?
                                        //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},level=".($GLOBALS['cache_array']['back_level']-$minus).",ref={$GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']]},numRows=".SQL_NUMROWS($result)." - BACK!<br />\n";
                                        if (SQL_NUMROWS($result) == 0) {
                                                // Insert this level
                                                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_refs` (userid,level,refid) VALUES (%s,%s,%s)",
-                                                       array(bigintval($uid), ($GLOBALS['cache_array']['back_level']-$minus), bigintval($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']])), __FUNCTION__, __LINE__);
+                                               array(bigintval($uid), ($GLOBALS['cache_array']['back_level']-$minus), bigintval($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']])), __FUNCTION__, __LINE__);
                                                //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},level=".($GLOBALS['cache_array']['back_level']-$minus).",ref={$GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']]} - RETURNED!<br />\n";
                                        } // END - if
                                } // END - if
@@ -285,7 +285,7 @@ LEFT JOIN `{!_MYSQL_PREFIX!}_user_data` AS d
 ON r.refid=d.userid
 WHERE r.userid=%s AND r.level=%s
 ORDER BY r.refid ASC",
-               array(bigintval($uid), bigintval($level)), __FUNCTION__, __LINE__);
+       array(bigintval($uid), bigintval($level)), __FUNCTION__, __LINE__);
 
        // Are there some entries?
        if (SQL_NUMROWS($result) > 0) {
@@ -315,7 +315,7 @@ function GET_USER_REF_ENTRY ($id) {
 
        // Get entry from database
        $result = SQL_QUERY_ESC("SELECT id, refid, refback, level FROM `{!_MYSQL_PREFIX!}_user_refs` WHERE `id`=%s AND `userid`=%s LIMIT 1",
-               array($id, getUserId()), __FUNCTION__, __LINE__);
+       array($id, getUserId()), __FUNCTION__, __LINE__);
 
        // Is there an entry?
        if (SQL_NUMROWS($result) == 1) {
@@ -367,7 +367,7 @@ function REFBACK_CHANGE_MEMBER_PERCENTS ($id, $percents) {
 
        // Update entry
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_refs` SET refback='%s' WHERE `id`=%s AND `userid`=%s LIMIT 1",
-               array($percents, $id, getUserId()), __FUNCTION__, __LINE__);
+       array($percents, $id, getUserId()), __FUNCTION__, __LINE__);
 
        // Entry updated?
        if (SQL_AFFECTEDROWS() < 1) {
index ceab0b90fec9ab015570c09f3a792c6c074e5ec3..3e7d980cf3de366f3c809b6cf329ee874b16d497 100644 (file)
@@ -45,7 +45,7 @@ if (!defined('__SECURITY')) {
 //
 function registerMustFillout () {
        $result = SQL_QUERY("SELECT field_name, field_required FROM `{!_MYSQL_PREFIX!}_must_register` ORDER BY `id`",
-               __FUNCTION__, __LINE__);
+       __FUNCTION__, __LINE__);
 
        while ($content = SQL_FETCHARRAY($result)) {
                $value = '';
@@ -71,7 +71,7 @@ function REGISTER_CHECK_REQUIRED_FIELDS (&$array) {
        $ret = false;
        foreach ($array as $key => $value) {
                $result = SQL_QUERY("SELECT field_required FROM `{!_MYSQL_PREFIX!}_must_register` WHERE field_name='".$key."' LIMIT 1",
-                       __FUNCTION__, __LINE__);
+               __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result) == 1) {
                        // "Must-line" found
                        list($chk) = SQL_FETCHROW($result);
@@ -123,7 +123,7 @@ function registerGenerateCategoryTable ($mode, $return=false) {
 
        // Look for categories
        $result = SQL_QUERY("SELECT `id`, `cat`, `visible` FROM `{!_MYSQL_PREFIX!}_cats` ".$AND." ORDER BY `sort` ASC",
-               __FUNCTION__, __LINE__);
+       __FUNCTION__, __LINE__);
 
        if (SQL_NUMROWS($result) > 0) {
                // List alle visible modules (or all to the admin)
index 6e1084ce94a7c7181b4e5664ad049cb494260291..fa1679ab02bff27f40217711a067204871905276 100644 (file)
@@ -89,9 +89,9 @@ if (!isset($_POST)) {
 
 // Generate arrays which holds the relevante chars to replace
 $GLOBALS['security_chars'] = array(
-       // The chars we are looking for...
+// The chars we are looking for...
        'from' => array("{", "}", '/', '.', "'", "$", '(', ')', '{--', '--}', "%", ';', "[", "]", ':', "--"),
-       // ... and we will replace to.
+// ... and we will replace to.
        'to'   => array(
                "{OPEN_ANCHOR2}",
                "{CLOSE_ANCHOR2}",
@@ -109,98 +109,98 @@ $GLOBALS['security_chars'] = array(
                "{CLOSE_INDEX}",
                "{DBL_DOT}",
                "{COMMENT}"
-       ),
-);
-
-// Characters allowed in URLs
-//
-// Note: Do not replace 'to' with 'from' and vise-versa! When you do this all booked URLs will be
-//       rejected because of the {SLASH}, {DOT} and all below listed items inside the URL.
-$GLOBALS['url_chars'] = array(
-       // Search for these secured characters
+               ),
+               );
+
+               // Characters allowed in URLs
+               //
+               // Note: Do not replace 'to' with 'from' and vise-versa! When you do this all booked URLs will be
+               //       rejected because of the {SLASH}, {DOT} and all below listed items inside the URL.
+               $GLOBALS['url_chars'] = array(
+               // Search for these secured characters
        'to'   => array("{SLASH}", "{DOT}", "{PER}", "{DBL_DOT}", "{COMMENT}"),
-       // Replace with these characters
+               // Replace with these characters
        'from' => array('/', '.', "%", ':', "--")
-);
-
-// Overworked security part:
-if (is_array($_GET)) {
-       foreach ($_GET as $seckey => $secvalue) {
-               if (is_array($secvalue)) {
-                       // Throw arrays away...
-                       unset($_GET[$seckey]);
-               } else {
-                       // Only variables are allowed (non-array) but we secure them all!
-                       foreach ($GLOBALS['security_chars']['from'] as $key => $char) {
-                               // Pass all through
-                               $_GET[$seckey] = str_replace($char  , $GLOBALS['security_chars']['to'][$key], $_GET[$seckey]);
+               );
+
+               // Overworked security part:
+               if (is_array($_GET)) {
+                       foreach ($_GET as $seckey => $secvalue) {
+                               if (is_array($secvalue)) {
+                                       // Throw arrays away...
+                                       unset($_GET[$seckey]);
+                               } else {
+                                       // Only variables are allowed (non-array) but we secure them all!
+                                       foreach ($GLOBALS['security_chars']['from'] as $key => $char) {
+                                               // Pass all through
+                                               $_GET[$seckey] = str_replace($char  , $GLOBALS['security_chars']['to'][$key], $_GET[$seckey]);
+                                       }
+
+                                       // Strip all other out
+                                       $_GET[$seckey] = strip_tags($_GET[$seckey]);
+                               }
                        }
-
-                       // Strip all other out
-                       $_GET[$seckey] = strip_tags($_GET[$seckey]);
                }
-       }
-}
 
-if (basename($_SERVER['PHP_SELF']) != 'install.php') {
-       // And POST data
-       foreach ($_POST as $seckey => $secvalue) {
-               if (!is_array($secvalue)) {
-                       // Only variables are allowed (non-array) to be secured...
-                       foreach ($GLOBALS['security_chars']['from'] as $key => $char) {
-                               // Pass all through
-                               $_POST[$seckey] = str_replace($char  , $GLOBALS['security_chars']['to'][$key], $_POST[$seckey]);
+               if (basename($_SERVER['PHP_SELF']) != 'install.php') {
+                       // And POST data
+                       foreach ($_POST as $seckey => $secvalue) {
+                               if (!is_array($secvalue)) {
+                                       // Only variables are allowed (non-array) to be secured...
+                                       foreach ($GLOBALS['security_chars']['from'] as $key => $char) {
+                                               // Pass all through
+                                               $_POST[$seckey] = str_replace($char  , $GLOBALS['security_chars']['to'][$key], $_POST[$seckey]);
+                                       }
+
+                                       // Strip all other out
+                                       $_POST[$seckey] = strip_tags($_POST[$seckey]);
+                               }
                        }
-
-                       // Strip all other out
-                       $_POST[$seckey] = strip_tags($_POST[$seckey]);
                }
-       }
-}
 
-// Activate caching or transparent compressing when it is not already done
-if (!defined('_OB_CACHING')) {
-       if (phpversion() >= '4.0.4pl1' && (strstr(getenv('HTTP_USER_AGENT'),'compatible') || (strstr(getenv('HTTP_USER_AGENT'), "Mozilla")))) {
-               if ((extension_loaded('zlib')) && (function_exists('ob_start'))) {
-                       // Start caching
-                       define('_OB_CACHING', 'on');
-                       ob_start();
-               } else {
-                       // Extension not loaded or required function is missing
-                       define('_OB_CACHING', '404');
+               // Activate caching or transparent compressing when it is not already done
+               if (!defined('_OB_CACHING')) {
+                       if (phpversion() >= '4.0.4pl1' && (strstr(getenv('HTTP_USER_AGENT'),'compatible') || (strstr(getenv('HTTP_USER_AGENT'), "Mozilla")))) {
+                               if ((extension_loaded('zlib')) && (function_exists('ob_start'))) {
+                                       // Start caching
+                                       define('_OB_CACHING', 'on');
+                                       ob_start();
+                               } else {
+                                       // Extension not loaded or required function is missing
+                                       define('_OB_CACHING', '404');
+                               }
+                       } else {
+                               // Old PHP version
+                               define('_OB_CACHING', 'old');
+                       }
                }
-       } else {
-               // Old PHP version
-               define('_OB_CACHING', 'old');
-       }
-}
 
-// At last secure the $_SERVER['PHP_SELF'] element
-$_SERVER['PHP_SELF'] = secureString($_SERVER['PHP_SELF']);
-
-// Split it up into path and filename
-$SELF_DIR  = dirname($_SERVER['PHP_SELF']);
-$SELF_FILE = basename($_SERVER['PHP_SELF']);
-
-// Check for a .php inside the $SELF_DIR...
-while (ereg('.php', $SELF_DIR)) {
-       // Correct the dirname
-       $SELF_DIR = substr($SELF_DIR, 0, (strpos($SELF_DIR, '.php') + 4));
-       // Rewrite filename...
-       $SELF_FILE = basename($SELF_DIR);
-       // ... and dirname
-       $SELF_DIR = dirname($SELF_DIR);
-}
+               // At last secure the $_SERVER['PHP_SELF'] element
+               $_SERVER['PHP_SELF'] = secureString($_SERVER['PHP_SELF']);
+
+               // Split it up into path and filename
+               $SELF_DIR  = dirname($_SERVER['PHP_SELF']);
+               $SELF_FILE = basename($_SERVER['PHP_SELF']);
+
+               // Check for a .php inside the $SELF_DIR...
+               while (ereg('.php', $SELF_DIR)) {
+                       // Correct the dirname
+                       $SELF_DIR = substr($SELF_DIR, 0, (strpos($SELF_DIR, '.php') + 4));
+                       // Rewrite filename...
+                       $SELF_FILE = basename($SELF_DIR);
+                       // ... and dirname
+                       $SELF_DIR = dirname($SELF_DIR);
+               }
 
-// Put both together again and let's pray it is secured now...
-$_SERVER['PHP_SELF'] = $SELF_DIR.'/'.$SELF_FILE;
+               // Put both together again and let's pray it is secured now...
+               $_SERVER['PHP_SELF'] = $SELF_DIR.'/'.$SELF_FILE;
 
-// Remove uneccessary variables
-unset($SELF_DIR);
-unset($SELF_FILE);
+               // Remove uneccessary variables
+               unset($SELF_DIR);
+               unset($SELF_FILE);
 
-// Security system loaded...
-define('__SECURITY', '1');
+               // Security system loaded...
+               define('__SECURITY', '1');
 
-//
-?>
+               //
+               ?>
index bc7a15d08f85b598a5bc87c367608cfe6b57321c..63de70b3bafe730e49f936b6cdc791e086cdc232 100644 (file)
@@ -53,161 +53,161 @@ function SPONSOR_HANDLE_SPONSOR (&$POST, $NO_UPDATE=false, $messageArray=array()
        // Skip these entries
        $SKIPPED = array(
                'ok', 'edit', 'terms', 'pay_type'
-       );
+               );
 
-       // Save sponsor data
-       $DATA = array(
+               // Save sponsor data
+               $DATA = array(
                'keys'   => array(),
                'values' => array()
-       );
-
-       // Check if sponsor already exists
-       foreach ($POST as $k => $v) {
-               if (!(array_search($k, $SKIPPED) > -1)) {
-                       // Check only posted input entries not the submit button
-                       switch ($k)
-                       {
-                       case 'email':
-                               $ALREADY = false;
-                               if (!isEmailValid($v)) {
-                                       // Email address is not valid
-                                       $SAVE = false;
-                               } else {
-                                       // Do we want to add a new sponsor or update his data?
-                                       $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE email='%s' LIMIT 1",
-                                               array($POST['email']), __FUNCTION__, __LINE__);
-
-                                       // Is a sponsor alread in the db?
-                                       if (SQL_NUMROWS($result) == 1) {
-                                               // Yes, he is!
-                                               if (($GLOBALS['what'] == "add_sponsor") || ($NO_UPDATE)) {
-                                                       // Already found!
-                                                       $ALREADY = true;
+               );
+
+               // Check if sponsor already exists
+               foreach ($POST as $k => $v) {
+                       if (!(array_search($k, $SKIPPED) > -1)) {
+                               // Check only posted input entries not the submit button
+                               switch ($k)
+                               {
+                                       case 'email':
+                                               $ALREADY = false;
+                                               if (!isEmailValid($v)) {
+                                                       // Email address is not valid
+                                                       $SAVE = false;
                                                } else {
-                                                       // Update his data
-                                                       $UPDATE = true;
+                                                       // Do we want to add a new sponsor or update his data?
+                                                       $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE email='%s' LIMIT 1",
+                                                       array($POST['email']), __FUNCTION__, __LINE__);
+
+                                                       // Is a sponsor alread in the db?
+                                                       if (SQL_NUMROWS($result) == 1) {
+                                                               // Yes, he is!
+                                                               if (($GLOBALS['what'] == "add_sponsor") || ($NO_UPDATE)) {
+                                                                       // Already found!
+                                                                       $ALREADY = true;
+                                                               } else {
+                                                                       // Update his data
+                                                                       $UPDATE = true;
+                                                               }
+                                                       }
+
+                                                       // Free memory
+                                                       SQL_FREERESULT($result);
                                                }
-                                       }
+                                               break;
 
-                                       // Free memory
-                                       SQL_FREERESULT($result);
-                               }
-                               break;
-
-                       case "pass1":
-                               $k = ''; $v = '';
-                               break;
+                                       case "pass1":
+                                               $k = ''; $v = '';
+                                               break;
 
-                       case "pass2":
-                               $k = "password"; $v = md5($v);
-                               break;
+                                       case "pass2":
+                                               $k = "password"; $v = md5($v);
+                                               break;
 
-                       case "url":
-                               if (!isUrlValid($v)) $SAVE = false;
-                               break;
+                                       case "url":
+                                               if (!isUrlValid($v)) $SAVE = false;
+                                               break;
 
-                       default:
-                               // Test if there is are time selections
-                               convertSelectionsToTimestamp($POST, $DATA, $k, $skip);
-                               break;
-                       }
+                                       default:
+                                               // Test if there is are time selections
+                                               convertSelectionsToTimestamp($POST, $DATA, $k, $skip);
+                                               break;
+                               }
 
-                       if ((!empty($k)) && ($skip == false)) {
-                               // Add data
-                               $DATA['keys'][] = $k; $DATA['values'][] = $v;
+                               if ((!empty($k)) && ($skip == false)) {
+                                       // Add data
+                                       $DATA['keys'][] = $k; $DATA['values'][] = $v;
+                               }
                        }
                }
-       }
 
-       // Save sponsor?
-       if ($SAVE) {
-               // Default is no force even when a guest want to abuse this force switch
-               if ((empty($POST['force'])) || (!IS_ADMIN())) $POST['force'] = 0;
+               // Save sponsor?
+               if ($SAVE) {
+                       // Default is no force even when a guest want to abuse this force switch
+                       if ((empty($POST['force'])) || (!IS_ADMIN())) $POST['force'] = 0;
 
-               // SQL and message string is empty by default
-               $sql = ''; $message = '';
+                       // SQL and message string is empty by default
+                       $sql = ''; $message = '';
 
-               // Update?
-               if ($UPDATE) {
-                       // Update his data
-                       $sql = "UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET ";
-                       foreach ($DATA['keys'] as $k => $v) {
-                               $sql .= $v."='%s', ";
-                       }
+                       // Update?
+                       if ($UPDATE) {
+                               // Update his data
+                               $sql = "UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET ";
+                               foreach ($DATA['keys'] as $k => $v) {
+                                       $sql .= $v."='%s', ";
+                               }
+
+                               // Remove last ", " from SQL string
+                               $sql = substr($sql, 0, -2)." WHERE `id`='%s' LIMIT 1";
+                               $DATA['values'][] = bigintval(REQUEST_GET('id'));
+
+                               // Generate message
+                               $message = SPONSOR_GET_MESSAGE(ADMIN_SPONSOR_UPDATED, "updated", $messageArray);
+                               $ret = "updated";
+                       } elseif ((!$ALREADY) || (($POST['force'] == '1') && (IS_ADMIN()))) {
+                               // Add new sponsor, first add more data
+                               $DATA['keys'][] = "sponsor_created"; $DATA['values'][] = time();
+                               $DATA['keys'][] = 'status';
+                               if ((!$NO_UPDATE) && (IS_ADMIN()) && ($GLOBALS['what'] == "add_sponsor")) {
+                                       // Only allowed for admin
+                                       $DATA['values'][] = "PENDING";
+                               } else {
+                                       // Guest area
+                                       $DATA['values'][] = "UNCONFIRMED";
+
+                                       // Generate hash code
+                                       $DATA['keys'][] = "hash";
+                                       $DATA['values'][] = md5(session_id().':'.$POST['email'].':'.detectRemoteAddr().':'.detectUserAgent().':'.time());
+                                       $DATA['keys'][] = "remote_addr";
+                                       $DATA['values'][] = detectRemoteAddr();
+                               }
+
+                               // Implode all data into strings
+                               $KEYS   = implode(", "  , $DATA['keys']);
+                               $valueS = str_repeat("%s', '", count($DATA['values']) - 1);
+
+                               // Generate string
+                               $sql = "INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_data` (".$KEYS.") VALUES ('".$valueS."%s')";
+
+                               // Generate message
+                               $message = SPONSOR_GET_MESSAGE(getMessage('ADMIN_SPONSOR_ADDED'), "added", $messageArray);
+                               $ret = "added";
+                       } elseif ((!$NO_UPDATE) && (IS_ADMIN())) {
+                               // Add all data as hidden data
+                               $OUT = '';
+                               foreach ($POST as $k => $v) {
+                                       // Do not add 'force' !
+                                       if ($k != "force") {
+                                               $OUT .= "<input type=\"hidden\" name=\"".$k."\" value=\"".stripslashes($v)."\" />\n";
+                                       }
+                               }
+                               define('__HIDDEN_DATA', $OUT);
+                               define('__EMAIL'      , $POST['email']);
 
-                       // Remove last ", " from SQL string
-                       $sql = substr($sql, 0, -2)." WHERE `id`='%s' LIMIT 1";
-                       $DATA['values'][] = bigintval(REQUEST_GET('id'));
-
-                       // Generate message
-                       $message = SPONSOR_GET_MESSAGE(ADMIN_SPONSOR_UPDATED, "updated", $messageArray);
-                       $ret = "updated";
-               } elseif ((!$ALREADY) || (($POST['force'] == '1') && (IS_ADMIN()))) {
-                       // Add new sponsor, first add more data
-                       $DATA['keys'][] = "sponsor_created"; $DATA['values'][] = time();
-                       $DATA['keys'][] = 'status';
-                       if ((!$NO_UPDATE) && (IS_ADMIN()) && ($GLOBALS['what'] == "add_sponsor")) {
-                               // Only allowed for admin
-                               $DATA['values'][] = "PENDING";
+                               // Ask for adding a sponsor with same email address
+                               LOAD_TEMPLATE("admin_add_sponsor_already");
+                               return;
                        } else {
-                               // Guest area
-                               $DATA['values'][] = "UNCONFIRMED";
-
-                               // Generate hash code
-                               $DATA['keys'][] = "hash";
-                               $DATA['values'][] = md5(session_id().':'.$POST['email'].':'.detectRemoteAddr().':'.detectUserAgent().':'.time());
-                               $DATA['keys'][] = "remote_addr";
-                               $DATA['values'][] = detectRemoteAddr();
+                               // Already added!
+                               $message = sprintf(getMessage('SPONSOR_ALREADY_FOUND', $POST['email']));
+                               $ret = "already";
                        }
 
-                       // Implode all data into strings
-                       $KEYS   = implode(", "  , $DATA['keys']);
-                       $valueS = str_repeat("%s', '", count($DATA['values']) - 1);
-
-                       // Generate string
-                       $sql = "INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_data` (".$KEYS.") VALUES ('".$valueS."%s')";
-
-                       // Generate message
-                       $message = SPONSOR_GET_MESSAGE(getMessage('ADMIN_SPONSOR_ADDED'), "added", $messageArray);
-                       $ret = "added";
-               } elseif ((!$NO_UPDATE) && (IS_ADMIN())) {
-                       // Add all data as hidden data
-                       $OUT = '';
-                       foreach ($POST as $k => $v) {
-                               // Do not add 'force' !
-                               if ($k != "force") {
-                                       $OUT .= "<input type=\"hidden\" name=\"".$k."\" value=\"".stripslashes($v)."\" />\n";
-                               }
+                       if (!empty($sql)) {
+                               // Run SQL command
+                               $result = SQL_QUERY_ESC($sql, $DATA['values'], __FUNCTION__, __LINE__);
                        }
-                       define('__HIDDEN_DATA', $OUT);
-                       define('__EMAIL'      , $POST['email']);
 
-                       // Ask for adding a sponsor with same email address
-                       LOAD_TEMPLATE("admin_add_sponsor_already");
-                       return;
+                       // Output message
+                       if ((!$NO_UPDATE) && (IS_ADMIN())) {
+                               LOAD_TEMPLATE('admin_settings_saved', false, $message);
+                       }
                } else {
-                       // Already added!
-                       $message = sprintf(getMessage('SPONSOR_ALREADY_FOUND', $POST['email']));
-                       $ret = "already";
-               }
-
-               if (!empty($sql)) {
-                       // Run SQL command
-                       $result = SQL_QUERY_ESC($sql, $DATA['values'], __FUNCTION__, __LINE__);
-               }
-
-               // Output message
-               if ((!$NO_UPDATE) && (IS_ADMIN())) {
+                       // Error found!
+                       $message = SPONSOR_GET_MESSAGE(getMessage('SPONSOR_DATA_NOT_SAVED'), "failed", $messageArray);
                        LOAD_TEMPLATE('admin_settings_saved', false, $message);
                }
-       } else {
-               // Error found!
-               $message = SPONSOR_GET_MESSAGE(getMessage('SPONSOR_DATA_NOT_SAVED'), "failed", $messageArray);
-               LOAD_TEMPLATE('admin_settings_saved', false, $message);
-       }
 
-       // Shall we return the status?
-       if ($RET_STATUS) return $ret;
+               // Shall we return the status?
+               if ($RET_STATUS) return $ret;
 }
 //
 function sponsorTranslateUserStatus ($status) {
@@ -256,7 +256,7 @@ function IS_SPONSOR () {
                // Check cookies against database records...
                $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_sponsor_data`
 WHERE `id`='%s' AND password='%s' AND `status`='CONFIRMED' LIMIT 1",
-                       array(bigintval(getSession('sponsorid')), getSession('sponsorpass')), __FUNCTION__, __LINE__);
+               array(bigintval(getSession('sponsorid')), getSession('sponsorpass')), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result) == 1) {
                        // All is fine
                        $ret = true;
@@ -287,7 +287,7 @@ ORDER BY `sort`", __FUNCTION__, __LINE__);
                        $result_sub = SQL_QUERY_ESC("SELECT what AS sub_what, title AS sub_title FROM `{!_MYSQL_PREFIX!}_sponsor_menu`
 WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ".$WHERE."
 ORDER BY `sort`",
-                               array($content['main_action']), __FUNCTION__, __LINE__);
+                       array($content['main_action']), __FUNCTION__, __LINE__);
                        if (SQL_NUMROWS($result_sub) > 0) {
                                // Load sub menus
                                $SUB = '';
@@ -363,7 +363,7 @@ function UPDATE_SPONSOR_LOGIN () {
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data`
 SET last_online=UNIX_TIMESTAMP()
 WHERE `id`='%s' AND password='%s' LIMIT 1",
-                       array(bigintval(getSession('sponsorid')), getSession('sponsorpass')), __FUNCTION__, __LINE__);
+               array(bigintval(getSession('sponsorid')), getSession('sponsorpass')), __FUNCTION__, __LINE__);
 
                // This update went fine?
                $login = (SQL_AFFECTEDROWS() == 1);
@@ -441,34 +441,34 @@ function SPONSOR_SAVE_DATA ($POST, $content) {
        // Saving data was completed... ufff...
        switch ($GLOBALS['what'])
        {
-       case "account": // Change account data
-               if ($EMAIL === true) {
-                       $message   = getMessage('SPONSOR_ACCOUNT_EMAIL_CHANGED');
-                       $templ = "admin_sponsor_change_email";
-                       $subj  = getMessage('ADMIN_SPONSOR_ACC_EMAIL_SUBJ');
-               } else {
-                       $message   = getMessage('SPONSOR_ACCOUNT_DATA_SAVED');
-                       $templ = "admin_sponsor_change_data";
-                       $subj  = getMessage('ADMIN_SPONSOR_ACC_DATA_SUBJ');
-               }
-               break;
-
-       case "settings": // Change settings
-               // Translate some data
-               $content['receive']  = translateYesNo($content['receive_warnings']);
-               $content['interval'] = createFancyTime($content['warning_interval']);
-
-               // Set message template and subject for admin
-               $message   = getMessage('SPONSOR_SETTINGS_SAVED');
-               $templ = "admin_sponsor_settings";
-               $subj  = getMessage('ADMIN_SPONSOR_SETTINGS_SUBJ');
-               break;
-
-       default: // Unknown sponsor what value!
-               DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown sponsor module (what) %s detected.", $GLOBALS['what']));
-               $message = sprintf(getMessage('SPONSOR_UNKNOWN_WHAT'), $GLOBALS['what']);
-               $templ = ''; $subj = '';
-               break;
+               case "account": // Change account data
+                       if ($EMAIL === true) {
+                               $message   = getMessage('SPONSOR_ACCOUNT_EMAIL_CHANGED');
+                               $templ = "admin_sponsor_change_email";
+                               $subj  = getMessage('ADMIN_SPONSOR_ACC_EMAIL_SUBJ');
+                       } else {
+                               $message   = getMessage('SPONSOR_ACCOUNT_DATA_SAVED');
+                               $templ = "admin_sponsor_change_data";
+                               $subj  = getMessage('ADMIN_SPONSOR_ACC_DATA_SUBJ');
+                       }
+                       break;
+
+               case "settings": // Change settings
+                       // Translate some data
+                       $content['receive']  = translateYesNo($content['receive_warnings']);
+                       $content['interval'] = createFancyTime($content['warning_interval']);
+
+                       // Set message template and subject for admin
+                       $message   = getMessage('SPONSOR_SETTINGS_SAVED');
+                       $templ = "admin_sponsor_settings";
+                       $subj  = getMessage('ADMIN_SPONSOR_SETTINGS_SUBJ');
+                       break;
+
+               default: // Unknown sponsor what value!
+                       DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown sponsor module (what) %s detected.", $GLOBALS['what']));
+                       $message = sprintf(getMessage('SPONSOR_UNKNOWN_WHAT'), $GLOBALS['what']);
+                       $templ = ''; $subj = '';
+                       break;
        }
 
        if (SQL_AFFECTEDROWS() == 1) {
@@ -497,25 +497,25 @@ function SPONSOR_SAVE_DATA ($POST, $content) {
                                // First to old address
                                switch ($GLOBALS['what'])
                                {
-                               case "account": // Change account data
-                                       $email_msg = LOAD_EMAIL_TEMPLATE("sponsor_change_data", $content);
-                                       sendEmail($content['email'], getMessage('SPONSOR_ACC_DATA_SUBJ'), $email_msg);
+                                       case "account": // Change account data
+                                               $email_msg = LOAD_EMAIL_TEMPLATE("sponsor_change_data", $content);
+                                               sendEmail($content['email'], getMessage('SPONSOR_ACC_DATA_SUBJ'), $email_msg);
 
-                                       if ($EMAIL === true) {
-                                               // Add hash code to content array
-                                               $content['hash'] = $HASH;
+                                               if ($EMAIL === true) {
+                                                       // Add hash code to content array
+                                                       $content['hash'] = $HASH;
 
-                                               // Second mail goes to the new address
-                                               $email_msg = LOAD_EMAIL_TEMPLATE("sponsor_change_email", $content);
-                                               sendEmail($content['email'], getMessage('SPONSOR_ACC_EMAIL_SUBJ'), $email_msg);
-                                       }
-                                       break;
+                                                       // Second mail goes to the new address
+                                                       $email_msg = LOAD_EMAIL_TEMPLATE("sponsor_change_email", $content);
+                                                       sendEmail($content['email'], getMessage('SPONSOR_ACC_EMAIL_SUBJ'), $email_msg);
+                                               }
+                                               break;
 
-                               case "settings": // Change settings
-                                       // Send email
-                                       $email_msg = LOAD_EMAIL_TEMPLATE("sponsor_settings", $content);
-                                       sendEmail($content['email'], getMessage('SPONSOR_SETTINGS_SUBJ'), $email_msg);
-                                       break;
+                                       case "settings": // Change settings
+                                               // Send email
+                                               $email_msg = LOAD_EMAIL_TEMPLATE("sponsor_settings", $content);
+                                               sendEmail($content['email'], getMessage('SPONSOR_SETTINGS_SUBJ'), $email_msg);
+                                               break;
                                }
                        } // END - if
                } // END - if
index 82ae305ab19236c64445d92560b69567ddd75947..d9585d024b8677874ec192ce614615a5a09dcf67 100644 (file)
@@ -193,11 +193,11 @@ function SURFBAR_MEMBER_ACTIONS ($urlId, $status) {
        foreach ($actionArray as $actionId => $action) {
                // Add form for this action
                $OUT .= sprintf(LOAD_TEMPLATE('member_surfbar_list_form', true),
-                       $width,
-                       bigintval($urlId),
-                       strtolower($action),
-                       strtoupper($action),
-                       strtoupper($action)
+               $width,
+               bigintval($urlId),
+               strtolower($action),
+               strtoupper($action),
+               strtoupper($action)
                );
        } // END - foreach
 
@@ -265,7 +265,7 @@ function SURFBAR_MEMBER_DO_FORM ($formData, $URLs) {
 function SURFBAR_VALIDATE_MEMBER_ACTION_STATUS ($action, $status) {
        // Search for the requested action/status combination in database
        $result = SQL_QUERY_ESC("SELECT new_status FROM `{!_MYSQL_PREFIX!}_surfbar_actions` WHERE `action`='%s' AND `status`='%s' LIMIT 1",
-               array($action, $status), __FUNCTION__, __LINE__);
+       array($action, $status), __FUNCTION__, __LINE__);
 
        // Is the entry there?
        $isValid = (SQL_NUMROWS($result) == 1);
@@ -292,7 +292,7 @@ function SURFBAR_VALIDATE_MEMBER_ACTION_STATUS ($action, $status) {
 function SURFBAR_MEMBER_RETREAT_ACTION ($urlData) {
        // Create the data array for next function call
        $data = array(
-               $urlData['id'] => $urlData
+       $urlData['id'] => $urlData
        );
 
        // Simply change the status here
@@ -303,7 +303,7 @@ function SURFBAR_MEMBER_RETREAT_ACTION ($urlData) {
 function SURFBAR_MEMBER_BOOKNOW_ACTION ($urlData) {
        // Create the data array for next function call
        $data = array(
-               $urlData['id'] => $urlData
+       $urlData['id'] => $urlData
        );
 
        // Simply change the status here
@@ -439,10 +439,10 @@ function SURFBAR_MEMBER_EXECUTE_EDIT_ACTION ($urlData) {
 
        // Has the URL or limit changed?
        if (true) {
-       //if (($urlData['views_allowed'] != $urlData['edit']['limit']) || ($url1 != $url2)) {
+               //if (($urlData['views_allowed'] != $urlData['edit']['limit']) || ($url1 != $url2)) {
                // Run the query
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_surfbar_urls` SET url='%s', views_allowed=%s, views_max=%s WHERE `id`=%s AND `status`='%s' LIMIT 1",
-                       array($urlData['url'], $urlData['edit']['limit'], $urlData['edit']['limit'], $urlData['id'], $urlData['status']), __FUNCTION__, __LINE__);
+               array($urlData['url'], $urlData['edit']['limit'], $urlData['edit']['limit'], $urlData['id'], $urlData['status']), __FUNCTION__, __LINE__);
 
                // All fine
                $status = true;
@@ -513,7 +513,7 @@ function SURFBAR_HANDLE_LOW_POINTS () {
 
                        // Update last notified
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET surfbar_low_notified=NOW() WHERE userid=%s LIMIT 1",
-                               array($uid), __FUNCTION__, __LINE__);
+                       array($uid), __FUNCTION__, __LINE__);
                } // END - if
        } // END - foreach
 }
@@ -556,7 +556,7 @@ FROM `{!_MYSQL_PREFIX!}_surfbar_urls`
 WHERE %s='%s'".$add."
 ORDER BY %s %s
 %s",
-               array($column, $searchTerm, $order, $sort, $limit), __FUNCTION__, __LINE__);
+       array($column, $searchTerm, $order, $sort, $limit), __FUNCTION__, __LINE__);
 
        // Is there at least one record?
        if (SQL_NUMROWS($result) > 0) {
@@ -632,14 +632,14 @@ function SURFBAR_INSERT_URL_BY_ARRAY ($urlData) {
 
        // Just run the insert query for now
        SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_urls` (userid,url,status,views_max,views_allowed,fixed_reload) VALUES (%s,'%s','%s',%s,%s,%s)",
-               array(
-                       $uid,
-                       $urlData['url'],
-                       $urlData['status'],
-                       $urlData['limit'],
-                       $urlData['limit'],
-                       $urlData['reload']
-               ), __FUNCTION__, __LINE__
+       array(
+       $uid,
+       $urlData['url'],
+       $urlData['status'],
+       $urlData['limit'],
+       $urlData['limit'],
+       $urlData['reload']
+       ), __FUNCTION__, __LINE__
        );
 
        // Return insert id
@@ -653,7 +653,7 @@ function SURFBAR_NOTIFY_ADMIN ($messageType, $content) {
 
        // Prepare subject
        $subject = getMessage(sprintf("ADMIN_SURFBAR_NOTIFY_%s_SUBJECT",
-               strtoupper($messageType)
+       strtoupper($messageType)
        ));
 
        // Is the subject line there?
@@ -686,7 +686,7 @@ function SURFBAR_NOTIFY_USER ($messageType, $content) {
 
        // Prepare subject
        $subject = getMessage(sprintf("MEMBER_SURFBAR_NOTIFY_%s_SUBJECT",
-               strtoupper($messageType)
+       strtoupper($messageType)
        ));
 
        // Is the subject line there?
@@ -800,7 +800,7 @@ function SURFBAR_DETERMINE_TEMPLATE_NAME() {
        if (REQUEST_ISSET_GET(('frame'))) {
                // Use the frame as a template name part... ;-)
                $templateName = sprintf("surfbar_frame_%s",
-                       REQUEST_GET(('frame'))
+               REQUEST_GET(('frame'))
                );
        } // END - if
 
@@ -830,7 +830,7 @@ INNER JOIN `{!_MYSQL_PREFIX!}_surfbar_urls` AS u
 ON u.id=l.url_id
 WHERE l.userid=%s AND (UNIX_TIMESTAMP() - ".SURFBAR_GET_SURF_LOCK().") < UNIX_TIMESTAMP(l.last_surfed) AND (((UNIX_TIMESTAMP(l.last_surfed) - u.fixed_reload) < 0 AND u.fixed_reload > 0) OR u.fixed_reload = 0)
 LIMIT 1",
-               array(getUserId()), __FUNCTION__, __LINE__
+       array(getUserId()), __FUNCTION__, __LINE__
        );
 
        // Fetch row
@@ -871,7 +871,7 @@ function SURFBAR_GET_TOTAL_URLS ($status = 'ACTIVE', $excludeUserId = 0) {
        $result = SQL_QUERY_ESC("SELECT COUNT(id) AS cnt
 FROM `{!_MYSQL_PREFIX!}_surfbar_urls`
 WHERE userid NOT IN (".implode(',', $UIDs['uid']).") AND `status`='%s'",
-               array($status), __FUNCTION__, __LINE__
+       array($status), __FUNCTION__, __LINE__
        );
 
        // Fetch row
@@ -924,7 +924,7 @@ function SURFBAR_GET_TOTAL_USER_URLS ($uid=0, $status = '',$exclude = '') {
 FROM `{!_MYSQL_PREFIX!}_surfbar_urls`
 WHERE userid=%s".$add."
 LIMIT %s",
-               array($uid, getConfig('surfbar_max_order')), __FUNCTION__, __LINE__
+       array($uid, getConfig('surfbar_max_order')), __FUNCTION__, __LINE__
        );
 
        // Fetch row
@@ -998,11 +998,11 @@ function SURFBAR_LOCKDOWN_ID ($urlId) {
        ///* DEBUG: */ return;
        // Just add it to the database
        SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_locks` (userid, url_id) VALUES (%s, %s)",
-               array(getUserId(), bigintval($urlId)), __FUNCTION__, __LINE__);
+       array(getUserId(), bigintval($urlId)), __FUNCTION__, __LINE__);
 
        // Remove the salt from database
        SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_surfbar_salts` WHERE url_id=%s AND `userid`=%s LIMIT 1",
-               array(bigintval($urlId), getUserId()), __FUNCTION__, __LINE__);
+       array(bigintval($urlId), getUserId()), __FUNCTION__, __LINE__);
 }
 
 // Pay points to the user and remove it from the sender if userid is given else it is a "sponsored surf"
@@ -1034,17 +1034,17 @@ function SURFBAR_UPDATE_INSERT_STATS_RECORD () {
 
        // Update URL stats
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_surfbar_urls` SET views_total=views_total+1".$add." WHERE `id`=%s LIMIT 1",
-               array(SURFBAR_GET_ID()), __FUNCTION__, __LINE__);
+       array(SURFBAR_GET_ID()), __FUNCTION__, __LINE__);
 
        // Update the stats entry
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_surfbar_stats` SET count=count+1 WHERE userid=%s AND url_id=%s LIMIT 1",
-               array(getUserId(), SURFBAR_GET_ID()), __FUNCTION__, __LINE__);
+       array(getUserId(), SURFBAR_GET_ID()), __FUNCTION__, __LINE__);
 
        // Was that update okay?
        if (SQL_AFFECTEDROWS() < 1) {
                // No, then insert entry
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_stats` (userid,url_id,count) VALUES (%s,%s,1)",
-                       array(getUserId(), SURFBAR_GET_ID()), __FUNCTION__, __LINE__);
+               array(getUserId(), SURFBAR_GET_ID()), __FUNCTION__, __LINE__);
        } // END - if
 
        // Update total/daily/weekly/monthly counter
@@ -1064,7 +1064,7 @@ function SURFBAR_UPDATE_SALT_STATS () {
 
        // Simply store the salt from cache away in database...
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_surfbar_salts` SET last_salt='%s' WHERE url_id=%s AND `userid`=%s LIMIT 1",
-               array(SURFBAR_GET_SALT(), SURFBAR_GET_ID(), getUserId()), __FUNCTION__, __LINE__);
+       array(SURFBAR_GET_SALT(), SURFBAR_GET_ID(), getUserId()), __FUNCTION__, __LINE__);
 
        // Debug message
        //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "salt=".SURFBAR_GET_SALT().",id=".SURFBAR_GET_ID().",uid=".getUserId()."", false);
@@ -1073,7 +1073,7 @@ function SURFBAR_UPDATE_SALT_STATS () {
        if (SQL_AFFECTEDROWS() < 1) {
                // Insert missing entry!
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_salts` (url_id,userid,last_salt) VALUES (%s, %s, '%s')",
-                       array(SURFBAR_GET_ID(), getUserId(), SURFBAR_GET_SALT()), __FUNCTION__, __LINE__);
+               array(SURFBAR_GET_ID(), getUserId(), SURFBAR_GET_SALT()), __FUNCTION__, __LINE__);
        } // END - if
 
        // Debug message
@@ -1092,7 +1092,7 @@ FROM `{!_MYSQL_PREFIX!}_surfbar_locks`
 WHERE userid=%s AND url_id=%s AND (UNIX_TIMESTAMP() - ".SURFBAR_GET_SURF_LOCK().") < UNIX_TIMESTAMP(last_surfed)
 ORDER BY last_surfed ASC
 LIMIT 1",
-               array(getUserId(), bigintval($urlId)), __FUNCTION__, __LINE__
+       array(getUserId(), bigintval($urlId)), __FUNCTION__, __LINE__
        );
 
        // Fetch counter
@@ -1130,7 +1130,7 @@ ON u.userid=d.userid
 WHERE u.userid NOT IN (%s,0) AND u.`status`='ACTIVE'
 GROUP BY u.userid
 ORDER BY u.userid ASC",
-                       array(getUserId()), __FUNCTION__, __LINE__);
+               array(getUserId()), __FUNCTION__, __LINE__);
        } else {
                // Get all userid
                $result = SQL_QUERY("SELECT u.userid, UNIX_TIMESTAMP(d.surfbar_low_notified) AS notified
@@ -1175,7 +1175,7 @@ function SURFBAR_DETERMINE_TOTAL_ONLINE () {
 FROM `{!_MYSQL_PREFIX!}_surfbar_stats`
 WHERE (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(last_online)) <= %s
 GROUP BY userid",
-               array(getConfig('online_timeout')), __FUNCTION__, __LINE__);
+       array(getConfig('online_timeout')), __FUNCTION__, __LINE__);
 
        // Fetch count
        $cnt = SQL_NUMROWS($result);
@@ -1187,7 +1187,7 @@ GROUP BY userid",
        return $cnt;
 }
 
-// Determine waiting time for one URL 
+// Determine waiting time for one URL
 function SURFBAR_DETERMINE_WAIT_TIME () {
        // Get fixed reload lock
        $fixed = SURFBAR_GET_FIXED_RELOAD();
@@ -1362,7 +1362,7 @@ WHERE
        userid=%s
 ORDER BY
        id ASC", array(getUserId()),
-               __FUNCTION__, __LINE__);
+       __FUNCTION__, __LINE__);
 
        // Load all entries
        while ($content = SQL_FETCHARRAY($result)) {
@@ -1436,7 +1436,7 @@ function SURFBAR_GET_USER_URLS () {
 FROM `{!_MYSQL_PREFIX!}_surfbar_urls` AS u
 WHERE u.userid=%s AND u.status != 'DELETED'
 ORDER BY u.id ASC",
-               array(getUserId()), __FUNCTION__, __LINE__);
+       array(getUserId()), __FUNCTION__, __LINE__);
 
        // Are there entries?
        if (SQL_NUMROWS($result) > 0) {
@@ -1461,7 +1461,7 @@ function SURFBAR_getModeAction_ARRAY ($status) {
 
        // Get all assigned actions
        $result = SQL_QUERY_ESC("SELECT action FROM `{!_MYSQL_PREFIX!}_surfbar_actions` WHERE `status`='%s' ORDER BY `id` ASC",
-               array($status), __FUNCTION__, __LINE__);
+       array($status), __FUNCTION__, __LINE__);
 
        // Some entries there?
        if (SQL_NUMROWS($result) > 0) {
@@ -1541,7 +1541,7 @@ WHERE sbu.userid NOT IN (".implode(',', $UIDs['uid']).") AND sbu.`status`='ACTIV
 GROUP BY sbu.id
 ORDER BY l.last_surfed ASC, sbu.id ASC
 LIMIT %s,1",
-                       array($randNum), __FUNCTION__, __LINE__
+               array($randNum), __FUNCTION__, __LINE__
                );
        } else {
                // Get data from specified id number
@@ -1553,7 +1553,7 @@ LEFT JOIN `{!_MYSQL_PREFIX!}_surfbar_locks` AS l
 ON sbu.id=l.url_id
 WHERE sbu.userid != %s AND sbu.`status`='ACTIVE' AND sbu.id=%s AND (sbu.views_allowed=0 OR (sbu.views_allowed > 0 AND sbu.views_max > 0))
 LIMIT 1",
-                       array(getUserId(), bigintval($urlId)), __FUNCTION__, __LINE__
+               array(getUserId(), bigintval($urlId)), __FUNCTION__, __LINE__
                );
        }
 
index d2e5da8b03344cfbb234edf509553cb8f239d698..ff9e5e3497297cb6348b51c708204abd1b3f3da5 100644 (file)
@@ -109,7 +109,7 @@ function THEME_GET_VERSION ($name) {
        } elseif (GET_EXT_VERSION('cache') != '0.1.8') {
                // Load version from database
                $result = SQL_QUERY_ESC("SELECT theme_ver FROM `{!_MYSQL_PREFIX!}_themes` WHERE theme_path='%s' LIMIT 1",
-                       array($name), __FUNCTION__, __LINE__);
+               array($name), __FUNCTION__, __LINE__);
 
                // Entry found?
                if (SQL_NUMROWS($result) == 1) {
@@ -152,7 +152,7 @@ function isThemeActive ($name) {
        } elseif (GET_EXT_VERSION('cache') != '0.1.8') {
                // Check if current theme is already imported or not
                $result = SQL_QUERY_ESC("SELECT theme_active FROM `{!_MYSQL_PREFIX!}_themes` WHERE theme_path='%s' AND theme_active='Y' LIMIT 1",
-                       array($name), __FUNCTION__, __LINE__);
+               array($name), __FUNCTION__, __LINE__);
 
                // Is the theme active and installed?
                $active = (SQL_NUMROWS($result) == 1);
@@ -186,7 +186,7 @@ function getCurrentThemeName () {
        } elseif (GET_EXT_VERSION('cache') != '0.1.8') {
                // Check if current theme is already imported or not
                $result = SQL_QUERY_ESC("SELECT theme_name FROM `{!_MYSQL_PREFIX!}_themes` WHERE theme_path='%s' AND theme_active='Y' LIMIT 1",
-                       array($name), __FUNCTION__, __LINE__);
+               array($name), __FUNCTION__, __LINE__);
 
                // Load theme name
                list($name) = SQL_FETCHROW($result);
index 8ef78b4c6fcbd42d2619a1808fed3af7883a895f..a861f8c0b7524ab3b3ef62c31778a97a3bc46cef 100644 (file)
@@ -94,7 +94,7 @@ function SortLinks ($letter, $sortby, $colspan, $return=false) {
 
        // Add status or mode
        if (REQUEST_ISSET_GET(('status'))) $add .= "&amp;mode=".REQUEST_GET(('status'));
-        elseif (REQUEST_ISSET_GET(('mode'))) $add .= "&amp;mode=".REQUEST_GET(('mode'));
+       elseif (REQUEST_ISSET_GET(('mode'))) $add .= "&amp;mode=".REQUEST_GET(('mode'));
 
        // Makes order by links..
        if ($letter == "front") $letter = getMessage('_ALL2');
@@ -164,9 +164,9 @@ function ADD_PAGENAV ($PAGES, $offset, $show_form, $colspan,$return=false) {
 
                        // Add status or mode
                        if (REQUEST_ISSET_GET(('status'))) $OUT .= "&amp;mode=".REQUEST_GET(('status'));
-                        elseif (REQUEST_ISSET_GET(('mode'))) $OUT .= "&amp;mode=".REQUEST_GET(('mode'));
+                       elseif (REQUEST_ISSET_GET(('mode'))) $OUT .= "&amp;mode=".REQUEST_GET(('mode'));
 
-                        // Letter and so on
+                       // Letter and so on
                        $OUT .= "&amp;letter=".REQUEST_GET(('letter'))."&amp;sortby=".REQUEST_GET(('sortby'))."&amp;page=".$page."&amp;offset=".$offset."\">";
                }
 
@@ -205,7 +205,7 @@ function USER_generateMemberEmailLink($email, $mod='admin') {
        $result = SQL_QUERY_ESC("SELECT userid
 FROM `{!_MYSQL_PREFIX!}_user_data`
 WHERE `email`='%s'".$locked." LIMIT 1",
-        array($email), __FUNCTION__, __LINE__);
+       array($email), __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Load userid
                list($uid) = SQL_FETCHROW($result);
@@ -238,7 +238,7 @@ function determineRandomReferalId () {
 
                        // Look for random user
                        $result = SQL_QUERY_ESC("SELECT `userid` FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `status`='CONFIRMED' AND `rand_confirmed` >= %s ORDER BY `rand_confirmed` DESC LIMIT %s, 1",
-                               array(getConfig('user_min_confirmed'), $randNum), __FUNCTION__, __LINE__);
+                       array(getConfig('user_min_confirmed'), $randNum), __FUNCTION__, __LINE__);
 
                        // Do we have one entry there?
                        if (SQL_NUMROWS($result) == 1) {
@@ -247,7 +247,7 @@ function determineRandomReferalId () {
 
                                // Reset this user's counter
                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `rand_confirmed`=0 WHERE userid=%s LIMIT 1",
-                                       array($refid), __FUNCTION__, __LINE__);
+                               array($refid), __FUNCTION__, __LINE__);
                        } // END - if
 
                        // Free result
@@ -265,7 +265,7 @@ function USER_DO_LOGIN ($uid, $passwd) {
        $dmy = '';
 
        // Add last_login if available
-       $lastOnline = ''; 
+       $lastOnline = '';
        if (GET_EXT_VERSION('sql_patches') >= '0.2.8') {
                $lastOnline = ', last_login';
        } // END - if
@@ -277,128 +277,128 @@ function USER_DO_LOGIN ($uid, $passwd) {
                'last_online' => 0,
                'last_login'  => 0,
                'hash'        => ''
-       );
+               );
 
-       // Check login data
-       if ((EXT_IS_ACTIVE('nickname')) && (NICKNAME_PROBE_ON_USERID($uid))) {
-               // Nickname entered
-               $result = SQL_QUERY_ESC("SELECT userid, password, last_online".$lastOnline." FROM `{!_MYSQL_PREFIX!}_user_data` WHERE nickname='%s' AND `status`='CONFIRMED' LIMIT 1",
+               // Check login data
+               if ((EXT_IS_ACTIVE('nickname')) && (NICKNAME_PROBE_ON_USERID($uid))) {
+                       // Nickname entered
+                       $result = SQL_QUERY_ESC("SELECT userid, password, last_online".$lastOnline." FROM `{!_MYSQL_PREFIX!}_user_data` WHERE nickname='%s' AND `status`='CONFIRMED' LIMIT 1",
                        array($uid), __FUNCTION__, __LINE__);
-       } else {
-               // Direct userid entered
-               $result = SQL_QUERY_ESC("SELECT userid, password, last_online".$lastOnline." FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
+               } else {
+                       // Direct userid entered
+                       $result = SQL_QUERY_ESC("SELECT userid, password, last_online".$lastOnline." FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
                        array($uid, $content['hash']), __FUNCTION__, __LINE__);
-       }
+               }
 
-       // Load entry
-       $content = SQL_FETCHARRAY($result);
-       if (!empty($content['userid'])) $uid = bigintval($content['userid']);
+               // Load entry
+               $content = SQL_FETCHARRAY($result);
+               if (!empty($content['userid'])) $uid = bigintval($content['userid']);
 
-       // Is there an entry?
-       if ((SQL_NUMROWS($result) == 1) && ((($probe_nickname) && (!empty($content['userid']))) || ($content['userid'] == $uid))) {
-               // Free result
-               SQL_FREERESULT($result);
+               // Is there an entry?
+               if ((SQL_NUMROWS($result) == 1) && ((($probe_nickname) && (!empty($content['userid']))) || ($content['userid'] == $uid))) {
+                       // Free result
+                       SQL_FREERESULT($result);
 
-               // Check for old MD5 passwords
-               if ((strlen($content['password']) == 32) && (md5($passwd) == $content['password'])) {
-                       // Just set the hash to the password from DB... :)
-                       $content['hash'] = $content['password'];
-               } else {
-                       // Hash password with improved way for comparsion
-                       $content['hash'] = generateHash($passwd, substr($content['password'], 0, -40));
-               }
+                       // Check for old MD5 passwords
+                       if ((strlen($content['password']) == 32) && (md5($passwd) == $content['password'])) {
+                               // Just set the hash to the password from DB... :)
+                               $content['hash'] = $content['password'];
+                       } else {
+                               // Hash password with improved way for comparsion
+                               $content['hash'] = generateHash($passwd, substr($content['password'], 0, -40));
+                       }
 
-               // Does the password match the hash?
-               if ($content['hash'] == $content['password']) {
-                       // New hashed password found so let's generate a new one
-                       $content['hash'] = generateHash($passwd);
+                       // Does the password match the hash?
+                       if ($content['hash'] == $content['password']) {
+                               // New hashed password found so let's generate a new one
+                               $content['hash'] = generateHash($passwd);
 
-                       // ... and update database
-                       // @TODO Make this filter working: $ADDON = runFilterChain('post_login_update', $content);
-                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET password='%s' WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
+                               // ... and update database
+                               // @TODO Make this filter working: $ADDON = runFilterChain('post_login_update', $content);
+                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET password='%s' WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
                                array($content['hash'], $uid), __FUNCTION__, __LINE__);
 
-                       // No login bonus by default
-                       $GLOBALS['bonus_payed'] = false;
+                               // No login bonus by default
+                               $GLOBALS['bonus_payed'] = false;
 
-                       // Probe for last online timemark
-                       $probe = time() -  $content['last_online'];
-                       if (!empty($content['last_login'])) $probe = time() - $content['last_login'];
-                       if ((GET_EXT_VERSION('bonus') >= '0.2.2') && ($probe >= getConfig('login_timeout'))) {
-                               // Add login bonus to user's account
-                               $add = sprintf(", login_bonus=login_bonus+%s",
+                               // Probe for last online timemark
+                               $probe = time() -  $content['last_online'];
+                               if (!empty($content['last_login'])) $probe = time() - $content['last_login'];
+                               if ((GET_EXT_VERSION('bonus') >= '0.2.2') && ($probe >= getConfig('login_timeout'))) {
+                                       // Add login bonus to user's account
+                                       $add = sprintf(", login_bonus=login_bonus+%s",
                                        (float)getConfig('login_bonus')
-                               );
-                               $GLOBALS['bonus_payed'] = true;
+                                       );
+                                       $GLOBALS['bonus_payed'] = true;
 
-                               // Subtract login bonus from userid's account or jackpot
-                               if ((GET_EXT_VERSION('bonus') >= '0.3.5') && (getConfig('bonus_mode') != "ADD")) BONUS_POINTS_HANDLER('login_bonus');
-                       } // END - if
+                                       // Subtract login bonus from userid's account or jackpot
+                                       if ((GET_EXT_VERSION('bonus') >= '0.3.5') && (getConfig('bonus_mode') != "ADD")) BONUS_POINTS_HANDLER('login_bonus');
+                               } // END - if
 
-                       // Calculate new hash with the secret key and master salt together
-                       $content['hash'] = generatePassString($content['hash']);
+                               // Calculate new hash with the secret key and master salt together
+                               $content['hash'] = generatePassString($content['hash']);
 
-                       // Update global array
-                       // @TODO Make this filter working: $URL = runFilterChain('do_login', array('content' => $content, 'addon' => $ADDON));
-                       setUserId($uid);
+                               // Update global array
+                               // @TODO Make this filter working: $URL = runFilterChain('do_login', array('content' => $content, 'addon' => $ADDON));
+                               setUserId($uid);
 
-                       // Try to set session data (which shall normally always work!)
-                       if ((setSession('userid', $uid )) && (setSession('u_hash', $content['hash']))) {
-                               // Update database records
-                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET total_logins=total_logins+1".$add." WHERE userid=%s LIMIT 1",
+                               // Try to set session data (which shall normally always work!)
+                               if ((setSession('userid', $uid )) && (setSession('u_hash', $content['hash']))) {
+                                       // Update database records
+                                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET total_logins=total_logins+1".$add." WHERE userid=%s LIMIT 1",
                                        array($uid), __FUNCTION__, __LINE__);
-                               if (SQL_AFFECTEDROWS() == 1) {
-                                       // Procedure to checking for login data
-                                       if (($GLOBALS['bonus_payed']) && (EXT_IS_ACTIVE('bonus'))) {
-                                               // Bonus added (just displaying!)
-                                               $URL = 'modules.php?module=chk_login&amp;mode=bonus';
+                                       if (SQL_AFFECTEDROWS() == 1) {
+                                               // Procedure to checking for login data
+                                               if (($GLOBALS['bonus_payed']) && (EXT_IS_ACTIVE('bonus'))) {
+                                                       // Bonus added (just displaying!)
+                                                       $URL = 'modules.php?module=chk_login&amp;mode=bonus';
+                                               } else {
+                                                       // Bonus not added
+                                                       $URL = 'modules.php?module=chk_login&amp;mode=login';
+                                               }
                                        } else {
-                                               // Bonus not added
-                                               $URL = 'modules.php?module=chk_login&amp;mode=login';
+                                               // Cannot update counter!
+                                               $URL = 'modules.php?module=index&amp;what=login&amp;login='.getCode('CNTR_FAILED');
                                        }
                                } else {
-                                       // Cannot update counter!
-                                       $URL = 'modules.php?module=index&amp;what=login&amp;login='.getCode('CNTR_FAILED');
+                                       // Cookies not setable!
+                                       $URL = 'modules.php?module=index&amp;what=login&amp;login='.getCode('NO_COOKIES');
                                }
-                       } else {
-                               // Cookies not setable!
-                               $URL = 'modules.php?module=index&amp;what=login&amp;login='.getCode('NO_COOKIES');
-                       }
-               } elseif (GET_EXT_VERSION('sql_patches') >= '0.6.1') {
-                       // Update failture counter
-                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET login_failures=login_failures+1,last_failure=NOW() WHERE userid=%s LIMIT 1",
+                       } elseif (GET_EXT_VERSION('sql_patches') >= '0.6.1') {
+                               // Update failture counter
+                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET login_failures=login_failures+1,last_failure=NOW() WHERE userid=%s LIMIT 1",
                                array($uid), __FUNCTION__, __LINE__);
 
-                       // Wrong password!
-                       $URL = 'modules.php?module=index&amp;what=login&amp;login='.getCode('WRONG_PASS');
-               }
-       } elseif ((($probe_nickname) && (!empty($content['userid']))) || ($content['userid'] == $uid)) {
-               // Other account status?
-               // @TODO Can this query be merged with above query?
-               $result = SQL_QUERY_ESC("SELECT status FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
+                               // Wrong password!
+                               $URL = 'modules.php?module=index&amp;what=login&amp;login='.getCode('WRONG_PASS');
+                       }
+               } elseif ((($probe_nickname) && (!empty($content['userid']))) || ($content['userid'] == $uid)) {
+                       // Other account status?
+                       // @TODO Can this query be merged with above query?
+                       $result = SQL_QUERY_ESC("SELECT status FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
                        array($uid), __FUNCTION__, __LINE__);
 
-               // Entry found?
-               if (SQL_NUMROWS($result) == 1) {
-                       // Load status
-                       list($status) = SQL_FETCHROW($result);
+                       // Entry found?
+                       if (SQL_NUMROWS($result) == 1) {
+                               // Load status
+                               list($status) = SQL_FETCHROW($result);
 
-                       // Create an error code from given status
-                       $errorCode = generateErrorCodeFromUserStatus($status);
+                               // Create an error code from given status
+                               $errorCode = generateErrorCodeFromUserStatus($status);
+                       } else {
+                               // ID not found!
+                               $errorCode = getCode('WRONG_ID');
+                       }
+
+                       // Construct URL
+                       $URL = 'modules.php?module=index&amp;what=login&amp;login='.$errorCode;
                } else {
                        // ID not found!
-                       $errorCode = getCode('WRONG_ID');
+                       $URL = 'modules.php?module=index&amp;what=login&amp;login='.getCode('WRONG_ID');
                }
 
-               // Construct URL
-               $URL = 'modules.php?module=index&amp;what=login&amp;login='.$errorCode;
-       } else {
-               // ID not found!
-               $URL = 'modules.php?module=index&amp;what=login&amp;login='.getCode('WRONG_ID');
-       }
-
-       // Return URL
-       return $URL;
+               // Return URL
+               return $URL;
 }
 
 // Try to send a new password for the given user account
@@ -414,15 +414,15 @@ function USER_DO_NEW_PASSWORD ($email, $uid) {
        if ((EXT_IS_ACTIVE('nickname')) && (NICKNAME_PROBE_ON_USERID($uid))) {
                // Nickname entered
                $result = SQL_QUERY_ESC("SELECT userid, status FROM `{!_MYSQL_PREFIX!}_user_data` WHERE nickname='%s' OR email='%s' LIMIT 1",
-                       array($uid, $email), __FUNCTION__, __LINE__);
+               array($uid, $email), __FUNCTION__, __LINE__);
        } elseif (($uid > 0) && (empty($email))) {
                // Direct userid entered
                $result = SQL_QUERY_ESC("SELECT userid, status FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                       array(bigintval($uid)), __FUNCTION__, __LINE__);
+               array(bigintval($uid)), __FUNCTION__, __LINE__);
        } elseif (!empty($email)) {
                // Email entered
                $result = SQL_QUERY_ESC("SELECT userid, status FROM `{!_MYSQL_PREFIX!}_user_data` WHERE email='%s' LIMIT 1",
-                       array($email), __FUNCTION__, __LINE__);
+               array($email), __FUNCTION__, __LINE__);
        } else {
                // Userid not set!
                DEBUG_LOG(__FUNCTION__, __LINE__, 'Userid is not set! BUG!');
@@ -438,7 +438,7 @@ function USER_DO_NEW_PASSWORD ($email, $uid) {
                        // Ooppps, this was missing! ;-) We should update the database...
                        $NEW_PASS = generatePassword();
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET password='%s' WHERE userid=%s LIMIT 1",
-                               array(generateHash($NEW_PASS), $uid), __FUNCTION__, __LINE__);
+                       array(generateHash($NEW_PASS), $uid), __FUNCTION__, __LINE__);
 
                        // Prepare data and message for email
                        $msg = LOAD_EMAIL_TEMPLATE('new-pass', array('new_pass' => $NEW_PASS), $uid);
index 56302d59e66111f31ec5a272116ca2c2fa10f152..121dc2871b14db00f4eb30b48e88827273ba7bc5 100644 (file)
@@ -327,7 +327,7 @@ function WERNIS_TRANSFER_STATUS ($status) {
 function WERNIS_LOG_TRANSFER ($wdsId, $amount, $type = 'FAILED', $message = '', $status = '') {
        // Register this wernis movement
        SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_wernis` (`userid`,`wernis_account`,`wernis_amount`,`wernis_timestamp`,`wernis_type`,`wernis_api_message`,`wernis_api_status`) VALUES (%d, %d, %d, UNIX_TIMESTAMP(), '%s', '%s', '%s')",
-               array(getUserId(), bigintval($wdsId), bigintval($amount), $type, $message, $status), __FUNCTION__, __LINE__);
+       array(getUserId(), bigintval($wdsId), bigintval($amount), $type, $message, $status), __FUNCTION__, __LINE__);
 }
 
 // Take fees and factor
index 25f3dd9dbb0ffe9bd1b80679e9109aaaf10ee7cf..e236335de6ee403bcc76b168824ebc13e3999e67 100644 (file)
@@ -86,15 +86,15 @@ function YOOMEDIA_QUERY_API ($script, $countQuery = true) {
        if ((getConfig('yoomedia_requests_remain') > 0) || (!$countQuery)) {
                // Prepare the low-level request
                $requestString = sprintf("http://www.yoomedia.de/interface_2.0/%s?id=%s&sid=%s&pw=%s&reload=%s&ma=%s&uebrig=%s&verguetung=%s&erotik=%s",
-                       $script,
-                       getConfig(('yoomedia_id')),
-                       getConfig(('yoomedia_sid')),
-                       getConfig('yoomedia_passwd'),
-                       getConfig(('yoomedia_tm_max_reload')),
-                       getConfig(('yoomedia_tm_min_wait')),
-                       getConfig(('yoomedia_tm_clicks_remain')),
-                       getConfig(('yoomedia_tm_min_pay')),
-                       getConfig(('yoomedia_erotic_allowed'))
+               $script,
+               getConfig(('yoomedia_id')),
+               getConfig(('yoomedia_sid')),
+               getConfig('yoomedia_passwd'),
+               getConfig(('yoomedia_tm_max_reload')),
+               getConfig(('yoomedia_tm_min_wait')),
+               getConfig(('yoomedia_tm_clicks_remain')),
+               getConfig(('yoomedia_tm_min_pay')),
+               getConfig(('yoomedia_erotic_allowed'))
                );
 
                // Run the query
@@ -225,9 +225,9 @@ function YOOMEDIA_SEND_BONUS_MAIL ($data, $mode) {
 
        // Auto-generate URL
        $data['url'] = sprintf("http://www.yoomedia.de/code/%s-mail.php?id=%s&sid=%s",
-               $type,
-               $data['id'],
-               $data['sid']
+       $type,
+       $data['id'],
+       $data['sid']
        );
 
        // Lock this mail for new delivery
@@ -246,7 +246,7 @@ function YOOMEDIA_EXCLUDE_MAIL ($data, $mode) {
 
                // Add the entry
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_yoomedia_reload` (`type`,`y_id`,`y_reload`,`inserted`) VALUES ('%s',%s,%s,'0000-00-00 00:00')",
-                       array($mode, bigintval($data['id']), bigintval($data['reload'])), __FUNCTION__, __LINE__);
+               array($mode, bigintval($data['id']), bigintval($data['reload'])), __FUNCTION__, __LINE__);
        } // END - if
 }
 
@@ -257,7 +257,7 @@ function YOOMEDIA_UNLIST_MAIL ($data, $mode) {
 
        // Add the entry
        SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_yoomedia_reload` WHERE `type`='%s' AND `y_id`=%s LIMIT 1",
-               array($mode, bigintval($data['id'])), __FUNCTION__, __LINE__);
+       array($mode, bigintval($data['id'])), __FUNCTION__, __LINE__);
 }
 
 // "Translates" the index number into an assosiative value
@@ -303,7 +303,7 @@ function YOOMEDIA_CHECK_RELOAD ($id, $reload, $type) {
 
        // Query database
        $result = SQL_QUERY_ESC("SELECT `id`, UNIX_TIMESTAMP(`inserted`) AS inserted FROM `{!_MYSQL_PREFIX!}_yoomedia_reload` WHERE `type`='%s' AND `y_id`=%s LIMIT 1",
-               array($type, bigintval($id)), __FUNCTION__, __LINE__);
+       array($type, bigintval($id)), __FUNCTION__, __LINE__);
 
        // Entry found?
        if (SQL_NUMROWS($result) == 1) {
@@ -314,7 +314,7 @@ function YOOMEDIA_CHECK_RELOAD ($id, $reload, $type) {
                if (((time() - $time) >= ($reload * 60*60)) && ($time > 0)) {
                        // Remove entry
                        SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_yoomedia_reload` WHERE `id`=%s LIMIT 1",
-                               array($id), __FUNCTION__, __LINE__);
+                       array($id), __FUNCTION__, __LINE__);
                } else {
                        // Dont' sent again this mail
                        $reloaded = $time;
@@ -337,7 +337,7 @@ function YOOMEDIA_RELOAD_LOCK ($data, $mode) {
 
                // Add the entry
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_yoomedia_reload` (`type`,`y_id`,`y_reload`) VALUES ('%s',%s,%s)",
-                       array($mode, bigintval($data['id']), bigintval($data['reload'])), __FUNCTION__, __LINE__);
+               array($mode, bigintval($data['id']), bigintval($data['reload'])), __FUNCTION__, __LINE__);
        } // END - if
 }
 
index f0b36d146a2bf9c54075b714d6c1706bf0aee696..51b4aeee1607715b11f64d5577d245049179b88a 100644 (file)
@@ -51,12 +51,27 @@ setConfigEntry('_DB_TYPE'    , 'mysql3');
 $GLOBALS['config_local_loaded'] = false;
 
 // Is the local configuration there?
-if (isIncludeReadable('inc/cache/config-local.php')) {
+if ((isIncludeReadable('inc/cache/config-local.php')) && (isIncludeReadable('inc/config.php'))) {
+       // We are better in installation mode
+       $GLOBALS['mxchange_installing'] = true;
+
+       // Define default main_title here
+       define('MAIN_TITLE', 'Your mail-exchange title');
+
+       // Set output mode here
+       setConfigEntry('OUTPUT_MODE', 'render');
+
+       // Both exist! This is bad and should be avoided by the admin
+       app_die(__FILE__, __LINE__, 'You have uploaded or kept an out-dated file at <strong>inc/config.php</strong> along with the new file <strong>inc/cache/config-local.php</strong>. Please remove <strong>inc/config.php</strong> to avoid incompatiblity issues. Thank you.');
+} elseif (isIncludeReadable('inc/cache/config-local.php')) {
        // Then load it
        loadIncludeOnce('inc/cache/config-local.php');
 
        // Mark configuration as loaded
        $GLOBALS['config_local_loaded'] = true;
+} elseif (isIncludeReadable('inc/config.php')) {
+       // Out-dated inc/config.php found, falling back to load and "wrap" it
+       updateOldConfigFile();
 } elseif (isInstalling()) {
        // Set some essential constants
        // @TODO Rewrite them to avoid this else block
index f6ba3df7f3388d4bfdcb7e4b2484aa6afa233ca0..baeff4c5730a915e99cd41286ac0caae281bd3c0 100644 (file)
@@ -301,11 +301,11 @@ if (!empty($DEL[0])) {
        foreach ($DEL as $del_ext) {
                // First remove entry from extensions table
                SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_extensions` WHERE `ext_name`='%s' LIMIT 1",
-                       array($del_ext), __FILE__, __LINE__);
+               array($del_ext), __FILE__, __LINE__);
 
                // Remove (maybe?) found tasks (main task and possible updates
                SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_task_system` WHERE subject='[%s:]' AND (task_type='EXTENSION' OR task_type='EXTENSION_UPDATE')",
-                       array($del_ext), __FILE__, __LINE__);
+               array($del_ext), __FILE__, __LINE__);
        } // END - foreach
 
        // I think it's not neccessary to run the optimization function here
index 977f72bf08e9165ae8405f2c106731edee4f38d6..0576148bd58b60f2d9c0d18fe73be09e5beebac7 100644 (file)
@@ -40,7 +40,7 @@
 if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
        require($INC);
-} elseif (!EXT_IS_ACTIVE("")) {
+} elseif (!EXT_IS_ACTIVE('')) {
        return;
 }
 
index fee209debf188c05173fa2b883eaf4579acba22c..9a9872f746ee695a9967574d7f67cd0016b6ef98 100644 (file)
@@ -55,33 +55,33 @@ $sql = ''; $mode = '';
 $sql = "SELECT userid, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE (beg_ral_notify ";
 switch (getConfig('beg_rallye'))
 {
-case 'Y': // Begging rallye is activated
-       if (getConfig('beg_ral_en_notify') == 'Y')
-       {
-               // Okay, let's check for member accounts
-               $sql .= "= 0 OR (beg_ral_notify > 0 AND beg_ral_en_notify < beg_ral_di_notify)";
-               $mode = "en";
-       }
+       case 'Y': // Begging rallye is activated
+               if (getConfig('beg_ral_en_notify') == 'Y')
+               {
+                       // Okay, let's check for member accounts
+                       $sql .= "= 0 OR (beg_ral_notify > 0 AND beg_ral_en_notify < beg_ral_di_notify)";
+                       $mode = "en";
+               }
         else
-       {
-               // Do not notify!
-               $sql = '';
-       }
-       break;
-
-case 'N': // Begging rallye is deactivated
-       if (getConfig('beg_ral_di_notify') == 'Y')
-       {
-               // Okay, let's check for member accounts
-               $sql .= " > 0 AND beg_ral_di_notify < beg_ral_en_notify";
-               $mode = "di";
-       }
+        {
+               // Do not notify!
+               $sql = '';
+        }
+        break;
+
+       case 'N': // Begging rallye is deactivated
+               if (getConfig('beg_ral_di_notify') == 'Y')
+               {
+                       // Okay, let's check for member accounts
+                       $sql .= " > 0 AND beg_ral_di_notify < beg_ral_en_notify";
+                       $mode = "di";
+               }
         else
-       {
-               // Do not notify!
-               $sql = '';
-       }
-       break;
+        {
+               // Do not notify!
+               $sql = '';
+        }
+        break;
 }
 
 if (!empty($sql)) {
@@ -97,7 +97,7 @@ if (!empty($sql)) {
                // No IP locking setuped!
                define('__BEG_IP_LOCKER', getMessage('BEG_NO_LIMITATION'));
        }
-        else
+       else
        {
                // Create timemark
                define('__BEG_IP_LOCKER', createFancyTime(getConfig('beg_ip_timeout')));
@@ -123,7 +123,7 @@ if (!empty($sql)) {
 SET beg_ral_notify='%s', beg_ral_%s_notify='%s'
 WHERE userid=%s
 LIMIT 1",
-                               array(time(), $mode, time(), $content['userid']), __FILE__, __LINE__);
+                       array(time(), $mode, time(), $content['userid']), __FILE__, __LINE__);
 
                        // Load email template and send it to the user!
                        if ($sentBonusMails === true) {
index bb5b53496ffea036f066bdda263fb2385878ee23..609c65af8d1618c7a892f41d62b937ec87ea7f08 100644 (file)
@@ -64,7 +64,7 @@ $result_birthday = SQL_QUERY_ESC("SELECT userid, email, birth_year
 FROM `{!_MYSQL_PREFIX!}_user_data`
 WHERE `status`='CONFIRMED' AND birth_day=%s AND birth_month=%s AND birthday_sent < (UNIX_TIMESTAMP() - ".(getConfig('one_day') * 364).")".$add."
 ORDER BY `userid` ASC",
-       array($day, $month, $value), __FILE__, __LINE__);
+array($day, $month, $value), __FILE__, __LINE__);
 
 if (SQL_NUMROWS($result_birthday) > 0) {
        // Start sending out birthday mails
@@ -89,7 +89,7 @@ if (SQL_NUMROWS($result_birthday) > 0) {
 
                        // Insert row into database
                        SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_birthday` (userid, points, chk_value) VALUES ('%s','%s','%s' )",
-                               array(bigintval($content['userid']), getConfig('birthday_points'), $content['check']), __FILE__, __LINE__);
+                       array(bigintval($content['userid']), getConfig('birthday_points'), $content['check']), __FILE__, __LINE__);
 
                        // Load email template with confirmation link
                        $msg = LOAD_EMAIL_TEMPLATE("member_birthday_confirm", $content, bigintval($content['userid']));
@@ -103,7 +103,7 @@ if (SQL_NUMROWS($result_birthday) > 0) {
 
                // Remember him that he has received a birthday mail
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET birthday_sent=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1",
-                       array(bigintval($content['userid'])), __FILE__, __LINE__);
+               array(bigintval($content['userid'])), __FILE__, __LINE__);
        } // END - while
 
        // Free memory
index b6b4d8102a47e1f37ab3509448cbde310bbdbc64..620488d25b6e8995d9fe568789dcf5882d108dbe 100644 (file)
@@ -55,27 +55,27 @@ $sql = ''; $mode = '';
 $sql = "SELECT userid, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE (bonus_ral_notify ";
 switch (getConfig('bonus_active'))
 {
-case 'Y': // Active rallye is activated
-       if (getConfig('bonus_en_notify') == 'Y') {
-               // Okay, let's check for member accounts
-               $sql .= "= 0 OR (bonus_ral_notify > 0 AND bonus_ral_en_notify < bonus_ral_di_notify)";
-               $mode = "en";
-       } else {
-               // Do not notify!
-               $sql = '';
-       }
-       break;
-
-case 'N': // Active rallye is deactivated
-       if (getConfig('bonus_di_notify') == 'Y') {
-               // Okay, let's check for member accounts
-               $sql .= " > 0 AND bonus_ral_di_notify < bonus_ral_en_notify";
-               $mode = "di";
-       } else {
-               // Do not notify!
-               $sql = '';
-       }
-       break;
+       case 'Y': // Active rallye is activated
+               if (getConfig('bonus_en_notify') == 'Y') {
+                       // Okay, let's check for member accounts
+                       $sql .= "= 0 OR (bonus_ral_notify > 0 AND bonus_ral_en_notify < bonus_ral_di_notify)";
+                       $mode = "en";
+               } else {
+                       // Do not notify!
+                       $sql = '';
+               }
+               break;
+
+       case 'N': // Active rallye is deactivated
+               if (getConfig('bonus_di_notify') == 'Y') {
+                       // Okay, let's check for member accounts
+                       $sql .= " > 0 AND bonus_ral_di_notify < bonus_ral_en_notify";
+                       $mode = "di";
+               } else {
+                       // Do not notify!
+                       $sql = '';
+               }
+               break;
 }
 
 if (!empty($sql)) {
@@ -102,7 +102,7 @@ if (!empty($sql)) {
 SET bonus_ral_notify='%s', bonus_ral_%s_notify='%s'
 WHERE userid=%s
 LIMIT 1",
-                               array(time(), $mode, time(), $content['userid']), __FILE__, __LINE__);
+                       array(time(), $mode, time(), $content['userid']), __FILE__, __LINE__);
 
                        // Load email template and send it to the user!
                        if ($sentBonusMails === true) {
index a7c5c9146c7217bb53e4f7dcaa06a2951e72be1c..76f07380d12ac78ebc2c2f71ad3806eaea9931c7 100644 (file)
@@ -69,41 +69,41 @@ if (!isAdminRegistered()) {
                $ret = REGISTER_ADMIN(REQUEST_POST('login'), $hashedPass, constant('WEBMASTER'));
                switch ($ret)
                {
-               case 'done':
-                       $done = changeDataInFile(constant('PATH') . 'inc/cache/config-local.php', "ADMIN-SETUP", "setConfigEntry('ADMIN_REGISTERED', \"", "\");", 'Y', 0);
-                       if ($done === true) {
-                               // Registering is done
-                               redirectToUrl('modules.php?module=admin&amp;register=done');
-                       } else {
-                               $ret = getMessage('ADMIN_CANNOT_COMPLETE');
-                       }
-                       break;
-
-               case 'failed':
-                       $ret = getMessage('ADMIN_REGISTER_FAILED');
-                       break;
-
-               case 'already':
-               default:
-                       if ($ret == 'already') {
-                               // Admin does already exists!
-                               $ret = getMessage('ADMIN_LOGIN_ALREADY_REG');
-                       } else {
-                               // Any other kind will be logged and interpreted as 'done'
-                               DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown return code %s from CHECK_ADMIN_LOGIN() and interpreted as 'done'!", $ret));
-                               // @TODO Why is this set to 'done'?
-                               $ret = 'done';
-                       }
-
-                       // Admin still not registered?
-                       if (!isAdminRegistered()) {
-                               // Write to config that registration is done
-                               changeDataInFile(constant('PATH') . 'inc/cache/config-local.php', "ADMIN-SETUP", "setConfigEntry('ADMIN_REGISTERED', \"", "\");", 'Y', 0);
-
-                               // Load URL for login
-                               redirectToUrl('modules.php?module=admin');
-                       } // END - if
-                       break;
+                       case 'done':
+                               $done = changeDataInFile(constant('PATH') . 'inc/cache/config-local.php', "ADMIN-SETUP", "setConfigEntry('ADMIN_REGISTERED', \"", "\");", 'Y', 0);
+                               if ($done === true) {
+                                       // Registering is done
+                                       redirectToUrl('modules.php?module=admin&amp;register=done');
+                               } else {
+                                       $ret = getMessage('ADMIN_CANNOT_COMPLETE');
+                               }
+                               break;
+
+                       case 'failed':
+                               $ret = getMessage('ADMIN_REGISTER_FAILED');
+                               break;
+
+                       case 'already':
+                       default:
+                               if ($ret == 'already') {
+                                       // Admin does already exists!
+                                       $ret = getMessage('ADMIN_LOGIN_ALREADY_REG');
+                               } else {
+                                       // Any other kind will be logged and interpreted as 'done'
+                                       DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown return code %s from CHECK_ADMIN_LOGIN() and interpreted as 'done'!", $ret));
+                                       // @TODO Why is this set to 'done'?
+                                       $ret = 'done';
+                               }
+
+                               // Admin still not registered?
+                               if (!isAdminRegistered()) {
+                                       // Write to config that registration is done
+                                       changeDataInFile(constant('PATH') . 'inc/cache/config-local.php', "ADMIN-SETUP", "setConfigEntry('ADMIN_REGISTERED', \"", "\");", 'Y', 0);
+
+                                       // Load URL for login
+                                       redirectToUrl('modules.php?module=admin');
+                               } // END - if
+                               break;
                }
        }
 
@@ -217,39 +217,39 @@ if (!isAdminRegistered()) {
                // Which status do we have?
                switch ($ret)
                {
-               case 'done': // Admin and password are okay, so we log in now
-                       // Construct URL and redirect
-                       $URL = 'modules.php?module=admin&amp;';
+                       case 'done': // Admin and password are okay, so we log in now
+                               // Construct URL and redirect
+                               $URL = 'modules.php?module=admin&amp;';
 
-                       // Rewrite overview module
-                       if ($GLOBALS['what'] == 'overview') {
-                               $GLOBALS['action'] = getModeAction($GLOBALS['module'], $GLOBALS['what']);
-                       } // END - if
+                               // Rewrite overview module
+                               if ($GLOBALS['what'] == 'overview') {
+                                       $GLOBALS['action'] = getModeAction($GLOBALS['module'], $GLOBALS['what']);
+                               } // END - if
 
-                       // Add data to URL
-                       if (!empty($GLOBALS['what'])) $URL .= 'what='.$GLOBALS['what'];
+                               // Add data to URL
+                               if (!empty($GLOBALS['what'])) $URL .= 'what='.$GLOBALS['what'];
                         elseif (!empty($GLOBALS['action'])) $URL .= 'action='.$GLOBALS['action'];
                         elseif (REQUEST_ISSET_GET('area')) $URL .= 'area='.REQUEST_GET('area');
 
-                       // Load URL
-                       redirectToUrl($URL);
-                       break;
-
-               case '404': // Administrator login not found
-                       REQUEST_SET_POST('ok', $ret);
-                       $ret = getMessage('ADMIN_NOT_FOUND');
-                       destroyAdminSession();
-                       break;
-
-               case 'pass': // Wrong password
-                       REQUEST_SET_POST('ok', $ret);
-                       $ret = '{--WRONG_PASS--} [<a href="{!URL!}/modules.php?module=admin&amp;reset_pass=1">{--ADMIN_RESET_PASS--}</a>]';
-                       destroyAdminSession();
-                       break;
-
-               default: // Others will be logged
-                       DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown return code %s from CHECK_ADMIN_LOGIN()", $ret));
-                       break;
+                        // Load URL
+                        redirectToUrl($URL);
+                        break;
+
+                       case '404': // Administrator login not found
+                               REQUEST_SET_POST('ok', $ret);
+                               $ret = getMessage('ADMIN_NOT_FOUND');
+                               destroyAdminSession();
+                               break;
+
+                       case 'pass': // Wrong password
+                               REQUEST_SET_POST('ok', $ret);
+                               $ret = '{--WRONG_PASS--} [<a href="{!URL!}/modules.php?module=admin&amp;reset_pass=1">{--ADMIN_RESET_PASS--}</a>]';
+                               destroyAdminSession();
+                               break;
+
+                       default: // Others will be logged
+                               DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown return code %s from CHECK_ADMIN_LOGIN()", $ret));
+                               break;
                } // END - switch
        } // END - if
 
@@ -349,48 +349,48 @@ if (!isAdminRegistered()) {
        $ret = CHECK_ADMIN_COOKIES(getSession('admin_login'), getSession('admin_md5'));
        switch ($ret)
        {
-       case 'done':
-               // Check for access control line of current menu entry
-               $GLOBALS['acl_allow'] = runFilterChain('check_admin_acl');
+               case 'done':
+                       // Check for access control line of current menu entry
+                       $GLOBALS['acl_allow'] = runFilterChain('check_admin_acl');
 
-               // When type of admin menu is not set fallback to old menu system
-               if (!isConfigEntrySet('admin_menu')) setConfigEntry('admin_menu', 'OLD');
+                       // When type of admin menu is not set fallback to old menu system
+                       if (!isConfigEntrySet('admin_menu')) setConfigEntry('admin_menu', 'OLD');
 
-               // Check for version and switch between old menu system and new intelligent menu system
-               if ((ADMIN_CHECK_MENU_MODE() == 'NEW') && (isIncludeReadable('inc/modules/admin/lasys-inc.php'))) {
-                       // Default area is the entrance, of course
-                       $area = 'entrance';
+                       // Check for version and switch between old menu system and new intelligent menu system
+                       if ((ADMIN_CHECK_MENU_MODE() == 'NEW') && (isIncludeReadable('inc/modules/admin/lasys-inc.php'))) {
+                               // Default area is the entrance, of course
+                               $area = 'entrance';
 
-                       // Check for similar URL variable
-                       if (REQUEST_ISSET_GET('area')) $area = REQUEST_GET('area');
+                               // Check for similar URL variable
+                               if (REQUEST_ISSET_GET('area')) $area = REQUEST_GET('area');
 
-                       // Load logical-area menu-system file
-                       loadIncludeOnce('inc/modules/admin/lasys-inc.php');
+                               // Load logical-area menu-system file
+                               loadIncludeOnce('inc/modules/admin/lasys-inc.php');
 
-                       // Create new-style menu system will logical areas
-                       ADMIN_LOGICAL_AREA_SYSTEM($area, $act, $GLOBALS['what']);
-               } else {
-                       // This little call constructs the whole default old and lacky menu system
-                       // on left side. It also renders the content on right side
-                       ADMIN_DO_ACTION($GLOBALS['what']);
-               }
-               break;
-
-       case '404': // Administrator login not found
-               REQUEST_SET_POST('ok', $ret);
-               destroyAdminSession();
-               addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_NOT_FOUND'));
-               break;
-
-       case 'pass': // Wrong password
-               REQUEST_SET_POST('ok', $ret);
-               destroyAdminSession();
-               addFatalMessage(__FILE__, __LINE__, getMessage('WRONG_PASS'));
-               break;
-
-       default: // Others will be logged
-               DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown return code %s from CHECK_ADMIN_COOKIES()", $ret));
-               break;
+                               // Create new-style menu system will logical areas
+                               ADMIN_LOGICAL_AREA_SYSTEM($area, $act, $GLOBALS['what']);
+                       } else {
+                               // This little call constructs the whole default old and lacky menu system
+                               // on left side. It also renders the content on right side
+                               ADMIN_DO_ACTION($GLOBALS['what']);
+                       }
+                       break;
+
+               case '404': // Administrator login not found
+                       REQUEST_SET_POST('ok', $ret);
+                       destroyAdminSession();
+                       addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_NOT_FOUND'));
+                       break;
+
+               case 'pass': // Wrong password
+                       REQUEST_SET_POST('ok', $ret);
+                       destroyAdminSession();
+                       addFatalMessage(__FILE__, __LINE__, getMessage('WRONG_PASS'));
+                       break;
+
+               default: // Others will be logged
+                       DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown return code %s from CHECK_ADMIN_COOKIES()", $ret));
+                       break;
        }
 }
 
index 7fdcf95297f7680e0fe366f122d0349711478447..1a9cf120d6e54da1ac37df1f7f84c6fd5e1f889f 100644 (file)
@@ -47,7 +47,7 @@ ADD_DESCR('admin', __FILE__);
 
 // Load the include file
 $INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
-if (isIncludeReadable($INC)) { 
+if (isIncludeReadable($INC)) {
        // Ok, we finally load the admin action module
        loadInclude($INC);
 } else {
index af3e0ab424fe5be2d47a080a647e2a8936e36278..3ce4e97ca2e30ff4efe7eae997a4ab42178e029d 100644 (file)
@@ -49,13 +49,13 @@ function REGISTER_ADMIN ($user, $md5, $email) {
 
        // Lookup the admin
        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_admins` WHERE login='%s' LIMIT 1",
-               array($user), __FUNCTION__, __LINE__);
+       array($user), __FUNCTION__, __LINE__);
 
        // Is the entry there?
        if (SQL_NUMROWS($result) == 0) {
                // Ok, let's create the admin login
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_admins` (login, password, email) VALUES ('%s', '%s', '%s')",
-                       array($user, $md5, $email), __FUNCTION__, __LINE__);
+               array($user, $md5, $email), __FUNCTION__, __LINE__);
                $ret = 'done';
        } // END - if
 
@@ -96,7 +96,7 @@ function CHECK_ADMIN_LOGIN ($admin_login, $password) {
 
                // Get password from DB
                $result = SQL_QUERY_ESC("SELECT password".$add." FROM `{!_MYSQL_PREFIX!}_admins` WHERE `id`=%s LIMIT 1",
-                       array($aid), __FUNCTION__, __LINE__);
+               array($aid), __FUNCTION__, __LINE__);
 
                // Entry found?
                if (SQL_NUMROWS($result) == 1) {
@@ -145,11 +145,11 @@ function CHECK_ADMIN_LOGIN ($admin_login, $password) {
 
                        // Update password and reset login failures
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admins` SET password='%s',login_failures=0,last_failure='0000-00-00 00:00:00' WHERE `id`=%s LIMIT 1",
-                               array($data['password'], $aid), __FUNCTION__, __LINE__);
+                       array($data['password'], $aid), __FUNCTION__, __LINE__);
                } else {
                        // Update password
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admins` SET password='%s' WHERE `id`=%s LIMIT 1",
-                               array($data['password'], $aid), __FUNCTION__, __LINE__);
+                       array($data['password'], $aid), __FUNCTION__, __LINE__);
                }
 
                // Rebuild cache
@@ -178,7 +178,7 @@ function CHECK_ADMIN_LOGIN ($admin_login, $password) {
        if (($ret == 'pass') && (GET_EXT_VERSION('admins') >= '0.7.0')) {
                // Update counter
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admins` SET login_failures=login_failures+1,last_failure=NOW() WHERE `id`=%s LIMIT 1",
-                       array($aid), __FUNCTION__, __LINE__);
+               array($aid), __FUNCTION__, __LINE__);
 
                // Rebuild cache
                rebuildCacheFiles('admins', 'admin');
@@ -195,7 +195,7 @@ function LOGIN_ADMIN ($adminLogin, $passHash) {
        if ((GET_EXT_VERSION('admins') >= '0.7.0') && ((EXT_VERSION_IS_OLDER('sql_patches', '0.3.6')) || (GET_EXT_VERSION('sql_patches') == ''))) {
                // Reset counter on out-dated sql_patches version
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admins` SET login_failures=0,last_failure='0000-00-00 00:00:00' WHERE login='%s' LIMIT 1",
-                       array($adminLogin), __FUNCTION__, __LINE__);
+               array($adminLogin), __FUNCTION__, __LINE__);
 
                // Rebuild cache
                rebuildCacheFiles('admins', 'admin');
@@ -203,15 +203,15 @@ function LOGIN_ADMIN ($adminLogin, $passHash) {
 
        // Now set all session variables and return the result
        return (
-               (
-                       setSession('admin_md5', generatePassString($passHash))
-               ) && (
-                       setSession('admin_login', $adminLogin)
-               ) && (
-                       setSession('admin_last', time())
-               ) && (
-                       setSession('admin_to', bigintval(REQUEST_POST('timeout')))
-               )
+       (
+       setSession('admin_md5', generatePassString($passHash))
+       ) && (
+       setSession('admin_login', $adminLogin)
+       ) && (
+       setSession('admin_last', time())
+       ) && (
+       setSession('admin_to', bigintval(REQUEST_POST('timeout')))
+       )
        );
 }
 
@@ -377,7 +377,7 @@ function ADD_ADMIN_MENU ($act, $wht, $return=false) {
 
                                // Check for menu entries
                                $result_what = SQL_QUERY_ESC("SELECT what, title, descr FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`, id DESC",
-                                       array($menu), __FUNCTION__, __LINE__);
+                               array($menu), __FUNCTION__, __LINE__);
 
                                // Remember the count for later checks
                                setAdminMenuHasEntries($menu, ((SQL_NUMROWS($result_what) > 0) && ($act == $menu)));
@@ -488,7 +488,7 @@ function ADD_MEMBER_SELECTION_BOX ($def='0', $add_all=false, $return=false, $non
 
        // USe this only for adding points (e.g. adding refs really makes no sence ;-) )
        if ($add_all === true)   $OUT = "      <option value=\"all\">{--ALL_MEMBERS--}</option>\n";
-        elseif ($none === true) $OUT = "      <option value=\"0\">{--SELECT_NONE--}</option>\n";
+       elseif ($none === true) $OUT = "      <option value=\"0\">{--SELECT_NONE--}</option>\n";
 
        while ($content = SQL_FETCHARRAY($result)) {
                $OUT .= "      <option value=\"".bigintval($content['userid'])."\"";
@@ -520,7 +520,7 @@ function ADMIN_MENU_SELECTION ($mode, $default = '', $defid = '') {
        $wht = "`what` != ''";
        if ($mode == "action") $wht = "(`what`='' OR `what` IS NULL) AND action !='login'";
        $result = SQL_QUERY_ESC("SELECT %s, title FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE ".$wht." ORDER BY `sort`",
-               array($mode), __FUNCTION__, __LINE__);
+       array($mode), __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result) > 0) {
                // Load menu as selection
                $OUT = "<select name=\"".$mode."_menu";
@@ -611,9 +611,9 @@ function ADMIN_SAVE_SETTINGS (&$POST, $tableName = "_config", $whereStatement =
 
                // Generate SQL string
                $sql = sprintf("UPDATE `{!_MYSQL_PREFIX!}%s` SET %s WHERE %s LIMIT 1",
-                       $tableName,
-                       $DATA_UPDATE,
-                       $whereStatement
+               $tableName,
+               $DATA_UPDATE,
+               $whereStatement
                );
        } else {
                // Add Line (does only work with auto_increment!
@@ -630,9 +630,9 @@ function ADMIN_SAVE_SETTINGS (&$POST, $tableName = "_config", $whereStatement =
 
                // Generate SQL string
                $sql = sprintf("INSERT INTO {!_MYSQL_PREFIX!}%s (%s) VALUES (%s)",
-                       $tableName,
-                       $KEYs,
-                       $values
+               $tableName,
+               $KEYs,
+               $values
                );
        }
 
@@ -683,7 +683,7 @@ function ADMIN_MAKE_MENU_SELECTION ($menu, $type, $name, $default = '') {
 
        // Close selection box
        $OUT .= "</select>\n";
-       
+
        // Return contents
        return $OUT;
 }
@@ -722,7 +722,7 @@ function ADMIN_CHECK_MENU_MODE () {
        } elseif (GET_EXT_VERSION('admins') >= '0.6.7') {
                // Load from database when version of 'admins' is enough
                $result = SQL_QUERY_ESC("SELECT la_mode FROM `{!_MYSQL_PREFIX!}_admins` WHERE `id`=%s LIMIT 1",
-                       array($aid), __FUNCTION__, __LINE__);
+               array($aid), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result) == 1) {
                        // Load data
                        list($ADMIN) = SQL_FETCHROW($result);
@@ -752,7 +752,7 @@ function ADMIN_CHANGE_ACTIVATION_STATUS ($IDs, $table, $row, $idRow = "id") {
                        if (!empty($selected)) {
                                // Determine new status
                                $result = SQL_QUERY_ESC("SELECT %s FROM `{!_MYSQL_PREFIX!}_%s` WHERE %s=%s LIMIT 1",
-                                       array($row, $table, $idRow, $id), __FUNCTION__, __LINE__);
+                               array($row, $table, $idRow, $id), __FUNCTION__, __LINE__);
 
                                // Row found?
                                if (SQL_NUMROWS($result) == 1) {
@@ -764,7 +764,7 @@ function ADMIN_CHANGE_ACTIVATION_STATUS ($IDs, $table, $row, $idRow = "id") {
 
                                        // Change this status
                                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_%s` SET %s='%s' WHERE %s=%s LIMIT 1",
-                                               array($table, $row, $newStatus, $idRow, $id), __FUNCTION__, __LINE__);
+                                       array($table, $row, $newStatus, $idRow, $id), __FUNCTION__, __LINE__);
 
                                        // Count up affected rows
                                        $cnt += SQL_AFFECTEDROWS();
@@ -858,9 +858,9 @@ function ADMIN_BUILD_LIST ($listType, $IDs, $table, $columns, $filterFunctions,
 
                        // Then list it
                        $OUT .= LOAD_TEMPLATE(sprintf("admin_%s_%s_row",
-                                       $listType,
-                                       $table
-                               ), true, $content
+                       $listType,
+                       $table
+                       ), true, $content
                        );
 
                        // Switch color
@@ -873,9 +873,9 @@ function ADMIN_BUILD_LIST ($listType, $IDs, $table, $columns, $filterFunctions,
 
        // Load master template
        LOAD_TEMPLATE(sprintf("admin_%s_%s",
-                       $listType,
-                       $table
-               ), false, $OUT
+       $listType,
+       $table
+       ), false, $OUT
        );
 }
 
@@ -887,12 +887,12 @@ function ADMIN_BUILD_STATUS_HANDLER ($mode, $IDs, $table, $columns, $filterFunct
                foreach ($IDs as $id => $sel) {
                        // Construct SQL query
                        $sql = sprintf("UPDATE `{!_MYSQL_PREFIX!}_%s` SET",
-                               SQL_ESCAPE($table)
+                       SQL_ESCAPE($table)
                        );
 
                        // Load data of entry
                        $result = SQL_QUERY_ESC("SELECT * FROM `{!_MYSQL_PREFIX!}_%s` WHERE %s=%s LIMIT 1",
-                               array($table, $idColumn, $id), __FUNCTION__, __LINE__);
+                       array($table, $idColumn, $id), __FUNCTION__, __LINE__);
 
                        // Fetch the data
                        $content = SQL_FETCHARRAY($result);
@@ -943,10 +943,10 @@ function ADMIN_BUILD_STATUS_HANDLER ($mode, $IDs, $table, $columns, $filterFunct
 
                        // Finish SQL statement
                        $sql = substr($sql, 0, -1) . sprintf(" WHERE `%s`=%s AND `%s`='%s' LIMIT 1",
-                               $idColumn,
-                               bigintval($id),
-                               $statusColumn,
-                               $oldStatus
+                       $idColumn,
+                       bigintval($id),
+                       $statusColumn,
+                       $oldStatus
                        );
 
                        // Run the SQL
@@ -980,7 +980,7 @@ function ADMIN_DELETE_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFu
                                if (REQUEST_ISSET_POST('uid_raw', $id)) {
                                        // Load all data from that id
                                        $result = SQL_QUERY_ESC("SELECT * FROM `{!_MYSQL_PREFIX!}_%s` WHERE %s=%s LIMIT 1",
-                                               array($table, $idColumn, $id), __FUNCTION__, __LINE__);
+                                       array($table, $idColumn, $id), __FUNCTION__, __LINE__);
 
                                        // Fetch the data
                                        $content = SQL_FETCHARRAY($result);
@@ -1028,7 +1028,7 @@ function ADMIN_EDIT_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunc
 
                                // Prepare SQL for this row
                                $sql = sprintf("UPDATE `{!_MYSQL_PREFIX!}_ SET",
-                                       SQL_ESCAPE($table)
+                               SQL_ESCAPE($table)
                                );
                                foreach (REQUEST_POST_ARRAY() as $key => $entries) {
                                        // Skip raw userid which is always invalid
@@ -1050,8 +1050,8 @@ function ADMIN_EDIT_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunc
 
                                                // Then add this value
                                                $sql .= sprintf(" %s='%s',",
-                                                       SQL_ESCAPE($key),
-                                                       SQL_ESCAPE($entries[$id])
+                                               SQL_ESCAPE($key),
+                                               SQL_ESCAPE($entries[$id])
                                                );
                                        } elseif (($key != $idColumn) && (!is_array($entries))) {
                                                // Add normal entries as well!
@@ -1076,7 +1076,7 @@ function ADMIN_EDIT_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunc
 
                                // Load all data from that id
                                $result = SQL_QUERY_ESC("SELECT * FROM `{!_MYSQL_PREFIX!}_%s` WHERE `%s`=%s LIMIT 1",
-                                       array($table, $idColumn, $id), __FUNCTION__, __LINE__);
+                               array($table, $idColumn, $id), __FUNCTION__, __LINE__);
 
                                // Fetch the data
                                global $DATA;
@@ -1159,7 +1159,7 @@ function ADMIN_SEND_PASSWORD_RESET_LINK ($email) {
 
        // Look up administator login
        $result = SQL_QUERY_ESC("SELECT id, login, password FROM `{!_MYSQL_PREFIX!}_admins` WHERE email='%s' LIMIT 1",
-               array($email), __FUNCTION__, __LINE__);
+       array($email), __FUNCTION__, __LINE__);
 
        // Is there an account?
        if (SQL_NUMROWS($result) == 0) {
@@ -1200,7 +1200,7 @@ function ADMIN_VALIDATE_RESET_LINK_HASH_LOGIN ($hash, $login) {
 
        // Then try to find that user
        $result = SQL_QUERY_ESC("SELECT id, password, email FROM `{!_MYSQL_PREFIX!}_admins` WHERE login='%s' LIMIT 1",
-               array($login), __FUNCTION__, __LINE__);
+       array($login), __FUNCTION__, __LINE__);
 
        // Is an account here?
        if (SQL_NUMROWS($result) == 1) {
@@ -1237,7 +1237,7 @@ function ADMIN_RESET_PASSWORD ($login, $password) {
 
        // Update database
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admins` SET password='%s' WHERE login='%s' LIMIT 1",
-               array($passHash, $login), __FUNCTION__, __LINE__);
+       array($passHash, $login), __FUNCTION__, __LINE__);
 
        // Run filters
        runFilterChain('post_admin_reset_pass', array('login' => $login, 'hash' => $passHash));
@@ -1264,27 +1264,27 @@ function ADMIN_UPDATE_TASK_DATA ($id, $row, $data) {
        if ($id <= 0) {
                // Initiate backtrace
                debug_report_bug(sprintf("id is invalid: %s. row=%s, data=%s",
-                       $id,
-                       $row,
-                       $data
+               $id,
+               $row,
+               $data
                ));
        } // END - if
 
        // Update the task
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_task_system` SET %s='%s' WHERE `id`=%s LIMIT 1",
-               array($row, $data, bigintval($id)), __FUNCTION__, __LINE__);
+       array($row, $data, bigintval($id)), __FUNCTION__, __LINE__);
 }
 
 // Checks wether if the admin menu has entries
 function ifAdminMenuHasEntries ($action) {
        return (
-               ((
-                       isset($GLOBALS['admin_menu_has_entries'][$action])
-               ) && (
-                       $GLOBALS['admin_menu_has_entries'][$action] === true
-               )) || (
-                       $action == "login"
-               )
+       ((
+       isset($GLOBALS['admin_menu_has_entries'][$action])
+       ) && (
+       $GLOBALS['admin_menu_has_entries'][$action] === true
+       )) || (
+       $action == "login"
+       )
        );
 }
 
index 14944df068121621c3e0ebbf08f50ee901f19518..36cf9c6f3fe6ffc09814ff0bbac6d2fb9946aa45 100644 (file)
@@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 function OUTPUT_STANDARD_OVERVIEW(&$result_tasks) {
        // First check for solved and not assigned tasks and assign them to current admin
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_task_system` SET `assigned_admin`=%s WHERE assigned_admin < 1 AND status != 'NEW'",
-               array(getCurrentAdminId()), __FILE__, __LINE__);
+       array(getCurrentAdminId()), __FILE__, __LINE__);
 
        // We currently don't want to install an extension so let's find out if we need...
        $EXT_LOAD_MODE = 'register';
@@ -103,7 +103,7 @@ function OUTPUT_STANDARD_OVERVIEW(&$result_tasks) {
 FROM `{!_MYSQL_PREFIX!}_task_system`
 WHERE `assigned_admin`=%s OR (`assigned_admin`=0 AND `status`='NEW')
 ORDER BY `userid` DESC, `task_type` DESC, `subject` ASC, `task_created` DESC",
-               array(getCurrentAdminId()), __FILE__, __LINE__);
+       array(getCurrentAdminId()), __FILE__, __LINE__);
 
        if (SQL_NUMROWS($result_tasks) > 0) {
                // New jobs found!
@@ -127,7 +127,7 @@ function OUTPUT_SELECTED_TASKS ($POST, $result_tasks) {
 FROM `{!_MYSQL_PREFIX!}_task_system`
 WHERE `id`=%s AND (`assigned_admin`=%s OR (`assigned_admin`=0 AND `status`='NEW'))
 LIMIT 1",
-                               array(bigintval($id), getCurrentAdminId()), __FILE__, __LINE__);
+                       array(bigintval($id), getCurrentAdminId()), __FILE__, __LINE__);
                        if (SQL_NUMROWS($result_task) == 1) {
                                // Task is valid...
                                list($tid, $uid, $type, $subj, $text, $created, $status, $aid) = SQL_FETCHROW($result_task);
@@ -136,7 +136,7 @@ LIMIT 1",
                                if ($aid == '0') {
                                        // Assgin current admin to unassgigned task
                                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_task_system` SET `assigned_admin`=%s WHERE `id`=%s LIMIT 1",
-                                               array(getCurrentAdminId(), bigintval($tid)), __FILE__, __LINE__);
+                                       array(getCurrentAdminId(), bigintval($tid)), __FILE__, __LINE__);
                                } // END - if
 
                                $add = '';
@@ -149,7 +149,7 @@ LIMIT 1",
 
                                if ($uid > 0) {
                                        $result_user = SQL_QUERY_ESC("SELECT gender, surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                                        array(bigintval($uid)), __FILE__, __LINE__);
+                                       array(bigintval($uid)), __FILE__, __LINE__);
                                        if (SQL_NUMROWS($result_user) == 1) {
                                                list($gender, $sname, $fname, $email) = SQL_FETCHROW($result_user);
                                                SQL_FREERESULT($result_user);
@@ -230,129 +230,129 @@ LIMIT 1",
                                // @TODO Rewrite this to something with include files
                                switch ($type)
                                {
-                               case 'EXTENSION': // Install new extensions
-                                       $ext_name = substr($subj, 1, strpos($subj, ':') - 1);
-                                       $result_lines = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_extensions` WHERE `ext_name`='%s' LIMIT 1",
+                                       case 'EXTENSION': // Install new extensions
+                                               $ext_name = substr($subj, 1, strpos($subj, ':') - 1);
+                                               $result_lines = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_extensions` WHERE `ext_name`='%s' LIMIT 1",
                                                array($ext_name), __FILE__, __LINE__);
-                                       $lines = SQL_NUMROWS($result_lines);
-                                       SQL_FREERESULT($result_lines);
-                                       if ($lines == '0') {
-                                               // New extension found
-                                               $OUT .= LOAD_TEMPLATE('admin_ext_reg_form', true, array(
+                                               $lines = SQL_NUMROWS($result_lines);
+                                               SQL_FREERESULT($result_lines);
+                                               if ($lines == '0') {
+                                                       // New extension found
+                                                       $OUT .= LOAD_TEMPLATE('admin_ext_reg_form', true, array(
                                                        'id'       => bigintval($id),
                                                        'ext_name' => $ext_name
-                                               ));
-                                       } else {
-                                               // Task is closed so nothing is todo
-                                               $OUT .= "<div class=\"admin_failed\">{--ADMIN_EXT_ALREADY_REGISTERED--}</div>\n";
+                                                       ));
+                                               } else {
+                                                       // Task is closed so nothing is todo
+                                                       $OUT .= "<div class=\"admin_failed\">{--ADMIN_EXT_ALREADY_REGISTERED--}</div>\n";
+
+                                                       // Close task but not already closes or deleted or update tasks
+                                                       if (($status != 'CLOSED') && ($status != 'DELETED') && ($type != 'EXTENSION_UPDATE')) {
+                                                               // Solve the task
+                                                               runFilterChain('solve_task', $tid);
+                                                       } // END - if
+                                               }
+                                               break;
 
-                                               // Close task but not already closes or deleted or update tasks
-                                               if (($status != 'CLOSED') && ($status != 'DELETED') && ($type != 'EXTENSION_UPDATE')) {
+                                       case 'EXTENSION_UPDATE': // Extension update
+                                               // Extension updates are installed automatically
+                                               $OUT .= "<div class=\"admin_failed medium\">{--ADMIN_EXTENSION_UPDATED--}</div>\n";
+
+                                               // Close task
+                                               if (($status != 'CLOSED') && ($status != 'DELETED')) {
                                                        // Solve the task
                                                        runFilterChain('solve_task', $tid);
                                                } // END - if
-                                       }
-                                       break;
-
-                               case 'EXTENSION_UPDATE': // Extension update
-                                       // Extension updates are installed automatically
-                                       $OUT .= "<div class=\"admin_failed medium\">{--ADMIN_EXTENSION_UPDATED--}</div>\n";
-
-                                       // Close task
-                                       if (($status != 'CLOSED') && ($status != 'DELETED')) {
-                                               // Solve the task
-                                               runFilterChain('solve_task', $tid);
-                                       } // END - if
-                                       break;
+                                               break;
 
-                               case 'SUPPORT_MEMBER': // Assign on member's support request
-                                       // @TODO This may also be rewritten to include files
-                                       switch ($mode)
-                                       {
-                                       default: // @TODO Unknown support mode
-                                               DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown support mode %s detected. This part is under construction!", $mode));
-                                               $OUT .= "<div class=\"admin_failed medium\">".sprintf(getMessage('ADMIN_UNKNOWN_SUPPORT_MODE'), $mode)."</div>\n";
+                                       case 'SUPPORT_MEMBER': // Assign on member's support request
+                                               // @TODO This may also be rewritten to include files
+                                               switch ($mode)
+                                               {
+                                                       default: // @TODO Unknown support mode
+                                                       DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown support mode %s detected. This part is under construction!", $mode));
+                                                       $OUT .= "<div class=\"admin_failed medium\">".sprintf(getMessage('ADMIN_UNKNOWN_SUPPORT_MODE'), $mode)."</div>\n";
+                                                       break;
+                                               }
                                                break;
-                                       }
-                                       break;
 
-                               case 'PAYOUT_REQUEST': // Payout requests
-                                       if (EXT_IS_ACTIVE('payout')) {
-                                               // Extension is installed so let him send a notification to the user
-                                               $result_pay = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_payouts` WHERE userid=%s AND payout_timestamp=%s LIMIT 1",
-                                                       array(bigintval($uid), bigintval($created)), __FILE__, __LINE__);
-                                               list($pid) = SQL_FETCHROW($result_pay);
-                                               SQL_FREERESULT($result_pay);
-
-                                               if ((!empty($pid)) && ($pid > 0)) {
-                                                       // Payout ID can be obtained
-                                                       $content = array(
+                                                       case 'PAYOUT_REQUEST': // Payout requests
+                                                               if (EXT_IS_ACTIVE('payout')) {
+                                                                       // Extension is installed so let him send a notification to the user
+                                                                       $result_pay = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_payouts` WHERE userid=%s AND payout_timestamp=%s LIMIT 1",
+                                                                       array(bigintval($uid), bigintval($created)), __FILE__, __LINE__);
+                                                                       list($pid) = SQL_FETCHROW($result_pay);
+                                                                       SQL_FREERESULT($result_pay);
+
+                                                                       if ((!empty($pid)) && ($pid > 0)) {
+                                                                               // Payout ID can be obtained
+                                                                               $content = array(
                                                                'pid' => $pid,
                                                                'tid' => $tid,
-                                                       );
-                                                       $OUT .= LOAD_TEMPLATE('admin_payout_overview_form', true, $content);
-                                               } else {
-                                                       // Problem obtaining payout ID
-                                                       $OUT .= "<div class=\"admin_failed medium\">{--PAYOUT_OBTAIN_ID_FAILED--}</div>\n";
-                                               }
-                                       } else {
-                                               // Extension is not installed
-                                               $OUT .= "<div class=\"admin_failed medium\">{--ADMIN_PAYOUT_NOT_INSTALLED--}</div>\n";
-                                       }
-                                       break;
-
-                               case 'WERNIS_REQUEST': // Wernis requests
-                                       if (EXT_IS_ACTIVE('wernis')) {
-                                               // Extension is installed so let him send a notification to the user
-                                               $result_pay = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_wernis` WHERE userid=%s AND wernis_timestamp=%s LIMIT 1",
-                                                       array(bigintval($uid), bigintval($created)), __FILE__, __LINE__);
-                                               list($pid) = SQL_FETCHROW($result_pay);
-                                               SQL_FREERESULT($result_pay);
-
-                                               if ((!empty($pid)) && ($pid > 0)) {
-                                                       // Payout ID can be obtained
-                                                       $content = array(
+                                                                               );
+                                                                               $OUT .= LOAD_TEMPLATE('admin_payout_overview_form', true, $content);
+                                                                       } else {
+                                                                               // Problem obtaining payout ID
+                                                                               $OUT .= "<div class=\"admin_failed medium\">{--PAYOUT_OBTAIN_ID_FAILED--}</div>\n";
+                                                                       }
+                                                               } else {
+                                                                       // Extension is not installed
+                                                                       $OUT .= "<div class=\"admin_failed medium\">{--ADMIN_PAYOUT_NOT_INSTALLED--}</div>\n";
+                                                               }
+                                                               break;
+
+                                                       case 'WERNIS_REQUEST': // Wernis requests
+                                                               if (EXT_IS_ACTIVE('wernis')) {
+                                                                       // Extension is installed so let him send a notification to the user
+                                                                       $result_pay = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_wernis` WHERE userid=%s AND wernis_timestamp=%s LIMIT 1",
+                                                                       array(bigintval($uid), bigintval($created)), __FILE__, __LINE__);
+                                                                       list($pid) = SQL_FETCHROW($result_pay);
+                                                                       SQL_FREERESULT($result_pay);
+
+                                                                       if ((!empty($pid)) && ($pid > 0)) {
+                                                                               // Payout ID can be obtained
+                                                                               $content = array(
                                                                'pid' => $pid,
                                                                'tid' => $tid,
-                                                       );
-                                                       $OUT .= LOAD_TEMPLATE('admin_wernis_overview_form', true, $content);
-                                               } else {
-                                                       // Problem obtaining wernis ID
-                                                       $OUT .= "<div class=\"admin_failed medium\">{--WERNIS_OBTAIN_ID_FAILED--}</div>\n";
-                                               }
-                                       } else {
-                                               // Extension is not installed
-                                               $OUT .= "<div class=\"admin_failed medium\">{--ADMIN_WERNIS_NOT_INSTALLED--}</div>\n";
-                                       }
-                                       break;
-
-                               case 'HOLIDAY_REQUEST': // Holiday requests
-                                       $OUT .= LOAD_TEMPLATE('admin_task_holiday', true, $uid);
-                                       break;
-
-                               case 'NL_UNSUBSCRIBE': // Newsletter unsubscriptions
-                                       $result = SQL_QUERY_ESC("SELECT nl_timespan FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                                               array(bigintval($uid)), __FILE__, __LINE__);
-                                       list($span) = SQL_FETCHROW($result);
-                                       SQL_FREERESULT($result);
-
-                                       if ($span > 0) {
-                                               // Undone unscubscribe request
-                                               $content = array(
+                                                                               );
+                                                                               $OUT .= LOAD_TEMPLATE('admin_wernis_overview_form', true, $content);
+                                                                       } else {
+                                                                               // Problem obtaining wernis ID
+                                                                               $OUT .= "<div class=\"admin_failed medium\">{--WERNIS_OBTAIN_ID_FAILED--}</div>\n";
+                                                                       }
+                                                               } else {
+                                                                       // Extension is not installed
+                                                                       $OUT .= "<div class=\"admin_failed medium\">{--ADMIN_WERNIS_NOT_INSTALLED--}</div>\n";
+                                                               }
+                                                               break;
+
+                                                       case 'HOLIDAY_REQUEST': // Holiday requests
+                                                               $OUT .= LOAD_TEMPLATE('admin_task_holiday', true, $uid);
+                                                               break;
+
+                                                       case 'NL_UNSUBSCRIBE': // Newsletter unsubscriptions
+                                                               $result = SQL_QUERY_ESC("SELECT nl_timespan FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
+                                                               array(bigintval($uid)), __FILE__, __LINE__);
+                                                               list($span) = SQL_FETCHROW($result);
+                                                               SQL_FREERESULT($result);
+
+                                                               if ($span > 0) {
+                                                                       // Undone unscubscribe request
+                                                                       $content = array(
                                                        'uid' => $uid,
                                                        'id'  => $tid
-                                               );
-                                               $OUT .= LOAD_TEMPLATE('admin_newsletter_tsk', true, $content);
-                                       } else {
-                                               // Already unsubscribed
-                                               $OUT .= "<div class=\"admin_failed medium\">".ADMIN_NL_UNSUBSCRIBE_ALREADY."</div>\n";
-                                       }
-                                       break;
-
-                               default: // Unknown task type
-                                       DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown task type %s detected.", $type));
-                                       $OUT .= "<div class=\"admin_failed medium\">".sprintf(getMessage('ADMIN_UNKNOWN_TASK_TYPE'), $type, $id)."</div>\n";
-                                       break;
+                                                                       );
+                                                                       $OUT .= LOAD_TEMPLATE('admin_newsletter_tsk', true, $content);
+                                                               } else {
+                                                                       // Already unsubscribed
+                                                                       $OUT .= "<div class=\"admin_failed medium\">".ADMIN_NL_UNSUBSCRIBE_ALREADY."</div>\n";
+                                                               }
+                                                               break;
+
+                                                       default: // Unknown task type
+                                                               DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown task type %s detected.", $type));
+                                                               $OUT .= "<div class=\"admin_failed medium\">".sprintf(getMessage('ADMIN_UNKNOWN_TASK_TYPE'), $type, $id)."</div>\n";
+                                                               break;
                                }
                                $OUT .= "  </td>
   <td width=\"1%\" class=\"switch_sw".$SW." bottom2 right2\">&nbsp;</td>
@@ -371,19 +371,19 @@ LIMIT 1",
                                // Unassign from tasks
                                foreach ($POST['task'] as $id => $sel) {
                                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_task_system` SET `assigned_admin`=0 WHERE `id`=%s AND `assigned_admin`=%s LIMIT 1",
-                                               array(bigintval($id), getCurrentAdminId()), __FILE__, __LINE__);
+                                       array(bigintval($id), getCurrentAdminId()), __FILE__, __LINE__);
                                }
                        } elseif (isset($POST['del'])) {
                                // Delete tasks
                                foreach ($POST['task'] as $id => $sel) {
                                        SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_task_system` WHERE `id`=%s AND assigned_admin IN (%s,0) LIMIT 1",
-                                               array(bigintval($id), getCurrentAdminId()), __FILE__, __LINE__);
+                                       array(bigintval($id), getCurrentAdminId()), __FILE__, __LINE__);
                                }
                        }
 
                        // Update query
                        $result_tasks = SQL_QUERY_ESC("SELECT id, assigned_admin, userid, task_type, subject, text, task_created FROM `{!_MYSQL_PREFIX!}_task_system` WHERE `assigned_admin`=%s OR (`assigned_admin`=0 AND `status`='NEW') ORDER BY task_created DESC",
-                               array(getCurrentAdminId()), __FILE__, __LINE__);
+                       array(getCurrentAdminId()), __FILE__, __LINE__);
                } // END - if
 
                // There are uncompleted jobs!
@@ -398,10 +398,10 @@ LIMIT 1",
                        // Generate infos
                        switch ($content['task_type'])
                        {
-                       case 'EXTENSION':
-                       case 'EXTENSION_UPDATE':
-                               $content['infos'] = substr($content['subject'], 1, strpos($content['subject'], ':') - 1);
-                               break;
+                               case 'EXTENSION':
+                               case 'EXTENSION_UPDATE':
+                                       $content['infos'] = substr($content['subject'], 1, strpos($content['subject'], ':') - 1);
+                                       break;
                        }
 
                        // Get task type
index b8ddd1adcb231e1e2ff8be0cceedfc06f28ad21b..442720021aac27d5c4bca25476b6e6a37fee5956 100644 (file)
@@ -56,7 +56,7 @@ if (REQUEST_GET('uid') == "all") {
 
                // Select all users
                $result_main = SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `status`='CONFIRMED' ORDER BY `userid` ASC",
-                       __FILE__, __LINE__);
+               __FILE__, __LINE__);
 
                // Process all entries
                while ($content = SQL_FETCHARRAY($result_main)) {
@@ -89,7 +89,7 @@ if (REQUEST_GET('uid') == "all") {
 } elseif (REQUEST_ISSET_GET('uid')) {
        // User ID found in URL so we use this give him some credits
        $result = SQL_QUERY_ESC("SELECT surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
-               array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+       array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Selected user does exist
                list($sname, $fname, $email) = SQL_FETCHROW($result);
index 7ee5f72fbec4c619c5b92eb0c36710043b180c78..5d8ef99f762ef46161ec27265ac6bca40a129ccf 100644 (file)
@@ -52,27 +52,27 @@ if (IS_FORM_SENT()) {
 
        // Is there already a rallye running?
        $result = SQL_QUERY_ESC("SELECT id, admin_id FROM `{!_MYSQL_PREFIX!}_rallye_data` WHERE (start_time <= %s AND end_time >= %s) OR (start_time >= %s AND start_time <= %s) LIMIT 1",
-               array($START, $START, $START, $END), __FILE__, __LINE__);
+       array($START, $START, $START, $END), __FILE__, __LINE__);
 
        if (SQL_NUMROWS($result) == 0) {
                // Ok, start and end time did not overlap
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_rallye_data` (admin_id, title, descr, template, start_time, end_time, auto_add_new_user, is_active, send_notify)
 VALUES ('%s','%s','%s','%s','%s','%s','%s','%s','%s')",
- array(
-       getCurrentAdminId(),
-       REQUEST_POST('title'),
-       REQUEST_POST('descr'),
-       REQUEST_POST('template'),
-       $START,
-       $END,
-       REQUEST_POST('auto_add'),
-       REQUEST_POST('active'),
-       REQUEST_POST('notify'),
-), __FILE__, __LINE__);
              array(
+               getCurrentAdminId(),
+               REQUEST_POST('title'),
+               REQUEST_POST('descr'),
+               REQUEST_POST('template'),
+               $START,
+               $END,
+               REQUEST_POST('auto_add'),
+               REQUEST_POST('active'),
+               REQUEST_POST('notify'),
+               ), __FILE__, __LINE__);
 
                // Load ID
                $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_rallye_data` WHERE start_time='%s' AND end_time='%s' AND `title`='%s' LIMIT 1",
-                array($START, $END, REQUEST_POST('title')), __FILE__, __LINE__);
+               array($START, $END, REQUEST_POST('title')), __FILE__, __LINE__);
                list($id) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
 
index a39fb725ff5e3d05aaa73d5127afc344b02d4257..df69c723aa6800890a8f9618e2cb5a581f0554f0 100644 (file)
@@ -46,7 +46,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR('admin', __FILE__);
 
 if (IS_FORM_SENT()) {
-       // Save sponsor in database
+       // Save sponsor in database
        SPONSOR_HANDLE_SPONSOR(REQUEST_POST_ARRAY());
 } else {
        // Prepare constants for the template
index 7c14e581392f9c1e81418e723fba34f9a98ebe83..3bb45b511fb9d34631daad763e20755fbb7eebb3 100644 (file)
@@ -94,7 +94,7 @@ if (!IS_FORM_SENT())
                // Load sub menus :)
                foreach ($menus as $key_main => $value_main) {
                        $result = SQL_QUERY_ESC("SELECT what, title, sort FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
-                               array($value_main), __FILE__, __LINE__);
+                       array($value_main), __FILE__, __LINE__);
                        if (SQL_NUMROWS($result) > 0) {
                                // Init arrays
                                $menus[$value_main] = array();
@@ -148,7 +148,7 @@ if (!IS_FORM_SENT())
                                $OUT .= "</option>\n";
                        }
                }
-                else
+               else
                {
                        $OUT .= "      <option value=\"".$m."\">".$titles[$key]."</option>\n";
                }
@@ -166,24 +166,24 @@ if (!IS_FORM_SENT())
        if (REQUEST_ISSET_POST(('menu'))) {
                // Add sub menu
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('%s','%s','%s','%s','%s')",
-                       array(
-                               REQUEST_POST('menu'),
-                               REQUEST_POST('name'),
-                               REQUEST_POST('title'),
-                               REQUEST_POST('descr'),
-                               bigintval(REQUEST_POST('sort')),
-                       ), __FILE__, __LINE__
+               array(
+               REQUEST_POST('menu'),
+               REQUEST_POST('name'),
+               REQUEST_POST('title'),
+               REQUEST_POST('descr'),
+               bigintval(REQUEST_POST('sort')),
+               ), __FILE__, __LINE__
                );
                cachePurgeAdminMenu(0, REQUEST_POST('menu'), REQUEST_POST('name'));
        } else {
                // Add main menu
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (action, title, descr, sort) VALUES ('%s','%s','%s','%s')",
-                       array(
-                               REQUEST_POST('name'),
-                               REQUEST_POST('title'),
-                               REQUEST_POST('descr'),
-                               bigintval(REQUEST_POST('sort')),
-                       ), __FILE__, __LINE__
+               array(
+               REQUEST_POST('name'),
+               REQUEST_POST('title'),
+               REQUEST_POST('descr'),
+               bigintval(REQUEST_POST('sort')),
+               ), __FILE__, __LINE__
                );
                cachePurgeAdminMenu(0, REQUEST_POST('name'));
        }
index 2528ba750ce9e579a50b56928cc1158253512bf3..19af03ec6d25286e9987319ba5ac6e590c4cb076 100644 (file)
@@ -69,7 +69,7 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO())) {
                {
                        $cnt++;
                        $result = SQL_QUERY_ESC("SELECT title, action, what, descr FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE ".$AND." AND id=%s LIMIT 1",
-                        array(bigintval($sel)), __FILE__, __LINE__);
+                       array(bigintval($sel)), __FILE__, __LINE__);
                        if (SQL_NUMROWS($result) == 1)
                        {
                                // Entry found so we load the stuff...
@@ -88,7 +88,7 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO())) {
                                );
                                $OUT .= LOAD_TEMPLATE("admin_amenu_edit_row", true, $content);
                        }
-                        else
+                       else
                        {
                                // Entry not found?
                                $content = array(
@@ -106,7 +106,7 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO())) {
        // Load template
        LOAD_TEMPLATE("admin_amenu_edit_form");
 }
- elseif ((REQUEST_ISSET_POST('del')) && (!IS_DEMO()))
+elseif ((REQUEST_ISSET_POST('del')) && (!IS_DEMO()))
 {
        define('__SUB_VALUE', $SUB);
        define('__CHK_VALUE', $chk);
@@ -118,7 +118,7 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO())) {
                {
                        $cnt++;
                        $result = SQL_QUERY_ESC("SELECT title FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE ".$AND." AND id=%s LIMIT 1",
-                        array(bigintval($sel)), __FILE__, __LINE__);
+                       array(bigintval($sel)), __FILE__, __LINE__);
                        if (SQL_NUMROWS($result) == 1)
                        {
                                // Entry found so we load the stuff...
@@ -134,7 +134,7 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO())) {
                                );
                                $OUT .= LOAD_TEMPLATE("admin_amenu_delete_row", true, $content);
                        }
-                        else
+                       else
                        {
                                // Entry not found?
                                $content = array(
@@ -155,50 +155,50 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO())) {
        // An action is done...
        switch (REQUEST_POST('ok'))
        {
-       case 'edit': // Edit menu
-               foreach (REQUEST_POST('sel') as $sel => $menu) {
-                       // Secure ID
-                       $sel = bigintval($sel);
+               case 'edit': // Edit menu
+                       foreach (REQUEST_POST('sel') as $sel => $menu) {
+                               // Secure ID
+                               $sel = bigintval($sel);
 
-                       // Update entry
-                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET
+                               // Update entry
+                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET
 title='%s',
 `action`='%s',
 `what`='%s',
 descr='%s'
 WHERE ".$AND." AND id=%s LIMIT 1",
- array(
-       $menu,
-       REQUEST_POST('sel_action', $sel),
-       REQUEST_POST('sel_what', $sel),
-       REQUEST_POST('sel_desc', $sel),
-       $sel,
-), __FILE__, __LINE__);
-               }
                              array(
+                               $menu,
+                               REQUEST_POST('sel_action', $sel),
+                               REQUEST_POST('sel_what', $sel),
+                               REQUEST_POST('sel_desc', $sel),
+                               $sel,
+                               ), __FILE__, __LINE__);
+                       }
 
-               // Purge admin menu cache
-               cachePurgeAdminMenu(0, REQUEST_POST('sel_action', $sel), REQUEST_POST('sel_what', $sel));
+                       // Purge admin menu cache
+                       cachePurgeAdminMenu(0, REQUEST_POST('sel_action', $sel), REQUEST_POST('sel_what', $sel));
 
-               // Load template
-               LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
-               break;
+                       // Load template
+                       LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
+                       break;
 
-       case 'del': // Delete menu
-               foreach (REQUEST_POST('sel') as $sel => $menu) {
-                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE ".$AND." AND id=%s LIMIT 1",
+               case 'del': // Delete menu
+                       foreach (REQUEST_POST('sel') as $sel => $menu) {
+                               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE ".$AND." AND id=%s LIMIT 1",
                                array(bigintval($sel)), __FILE__, __LINE__);
-                       cachePurgeAdminMenu(0, '', '', $AND);
-               } // END - foreach
+                               cachePurgeAdminMenu(0, '', '', $AND);
+                       } // END - foreach
 
-               // Load template
-               LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
-               break;
+                       // Load template
+                       LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
+                       break;
 
-       default: // Unexpected action
-               DEBUG_LOG(__FILE__, __LINE__, sprintf("Unsupported action %s detected.", REQUEST_POST('ok')));
-               define('__OK_VALUE', REQUEST_POST('ok'));
-               LOAD_TEMPLATE("admin_menu_unknown_okay");
-               break;
+               default: // Unexpected action
+                       DEBUG_LOG(__FILE__, __LINE__, sprintf("Unsupported action %s detected.", REQUEST_POST('ok')));
+                       define('__OK_VALUE', REQUEST_POST('ok'));
+                       LOAD_TEMPLATE("admin_menu_unknown_okay");
+                       break;
        }
 } else {
        if ((REQUEST_ISSET_GET(('act'))) && (REQUEST_ISSET_GET(('tid'))) && (REQUEST_ISSET_GET(('fid')))) {
@@ -206,21 +206,21 @@ WHERE ".$AND." AND id=%s LIMIT 1",
                if (REQUEST_ISSET_GET(('w'))) {
                        // Sub menus selected
                        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1",
-                               array(REQUEST_GET('act'), bigintval(REQUEST_GET('tid'))), __FILE__, __LINE__);
+                       array(REQUEST_GET('act'), bigintval(REQUEST_GET('tid'))), __FILE__, __LINE__);
                        list($tid) = SQL_FETCHROW($result);
                        SQL_FREERESULT($result);
                        $result = SQL_QUERY("SELECT `id` FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1",
-                               array(REQUEST_GET('act'), bigintval(REQUEST_GET('fid'))), __FILE__, __LINE__);
+                       array(REQUEST_GET('act'), bigintval(REQUEST_GET('fid'))), __FILE__, __LINE__);
                        list($fid) = SQL_FETCHROW($result);
                        SQL_FREERESULT($result);
                } else {
                        // Main menu selected
                        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE (`what`='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1",
-                               array(bigintval(REQUEST_GET('tid'))), __FILE__, __LINE__);
+                       array(bigintval(REQUEST_GET('tid'))), __FILE__, __LINE__);
                        list($tid) = SQL_FETCHROW($result);
                        SQL_FREERESULT($result);
                        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE (`what`='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1",
-                               array(bigintval(REQUEST_GET('fid'))), __FILE__, __LINE__);
+                       array(bigintval(REQUEST_GET('fid'))), __FILE__, __LINE__);
                        list($fid) = SQL_FETCHROW($result);
                        SQL_FREERESULT($result);
                }
@@ -228,9 +228,9 @@ WHERE ".$AND." AND id=%s LIMIT 1",
                if ((!empty($tid)) && (!empty($fid))) {
                        // Sort menu
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
-                               array(bigintval(REQUEST_GET('tid')), bigintval($fid)), __FILE__, __LINE__);
+                       array(bigintval(REQUEST_GET('tid')), bigintval($fid)), __FILE__, __LINE__);
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
-                               array(bigintval(REQUEST_GET('fid')), bigintval($tid)), __FILE__, __LINE__);
+                       array(bigintval(REQUEST_GET('fid')), bigintval($tid)), __FILE__, __LINE__);
                        cachePurgeAdminMenu(0, '', '', $AND);
                }
        }
@@ -239,7 +239,7 @@ WHERE ".$AND." AND id=%s LIMIT 1",
        if (!empty($SUB)) {
                // Sub menus of a main menu
                $result = SQL_QUERY_ESC("SELECT id, action, what, title, sort FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort` ASC",
-                array($SUB), __FILE__, __LINE__);
+               array($SUB), __FILE__, __LINE__);
        } else {
                // Main menus
                $result = SQL_QUERY("SELECT id, action, what, title, sort FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE (`what`='' OR `what` IS NULL) ORDER BY `sort` ASC", __FILE__, __LINE__);
index 6029cfd708628e6dcd4763f4cdc8813d3ca63ac7..101f6f21a8448fed92d5d06c76d9beae68d3e377 100644 (file)
@@ -55,7 +55,7 @@ if (REQUEST_ISSET_POST('edit')) {
                foreach (REQUEST_POST('sel') as $template => $sel) {
                        // First of all load data from DB
                        $result = SQL_QUERY_ESC("SELECT admin_id, id FROM `{!_MYSQL_PREFIX!}_admins_mails` WHERE mail_template='%s' ORDER BY `id`",
-                               array($template), __FILE__, __LINE__);
+                       array($template), __FILE__, __LINE__);
                        $OUT = ''; $aid2 = 0;
                        while ($content = SQL_FETCHARRAY($result)) {
                                // @TODO Can this be rewritten???
@@ -129,18 +129,18 @@ ORDER BY m.admin_id, m.mail_template", __FILE__, __LINE__);
 
                                // Update entry
                                ADD_SQL(SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admins_mails` SET admin_id=%s WHERE `id`=%s ORDER BY `id` LIMIT 1",
-                                       array($content['admin_id'], $id), __FILE__, __LINE__, false));
+                               array($content['admin_id'], $id), __FILE__, __LINE__, false));
 
                                if (($content['admin_id'] < 1) && (REQUEST_ISSET_POST('template', $id))) {
                                        // Remove any other admin entries
                                        ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admins_mails` WHERE mail_template='%s' AND id != '%s'",
-                                               array(REQUEST_POST('template', $id), $id), __FILE__, __LINE__, false));
+                                       array(REQUEST_POST('template', $id), $id), __FILE__, __LINE__, false));
                                } // END - if
 
                                if (REQUEST_POST('admin_new', REQUEST_POST('template', $id)) > 0) {
                                        // Add new admin
                                        ADD_SQL(SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_admins_mails` (admin_id, mail_template) VALUES ('%s','%s')",
-                                               array($content['admin_id'], REQUEST_POST('template', $id)), __FILE__, __LINE__, false));
+                                       array($content['admin_id'], REQUEST_POST('template', $id)), __FILE__, __LINE__, false));
                                } // END - if
                        } // END - foreach
 
index ab6c8b395ab35c72fe904f9b1705ba091b75fa6d..4d78ddb8c6fbd7d8feb6e48e5337ae6ba2f5e45b 100644 (file)
@@ -51,15 +51,15 @@ if (IS_FORM_SENT()) {
        // Prepare data for the template
        switch (getConfig('admin_menu'))
        {
-       case "NEW":
-               define('__ADMIN_MENU_NEW', ' checked="checked"');
-               define('__ADMIN_MENU_OLD'   , '');
-               break;
+               case "NEW":
+                       define('__ADMIN_MENU_NEW', ' checked="checked"');
+                       define('__ADMIN_MENU_OLD'   , '');
+                       break;
 
-       case "OLD":
-               define('__ADMIN_MENU_NEW', '');
-               define('__ADMIN_MENU_OLD'   , ' checked="checked"');
-               break;
+               case "OLD":
+                       define('__ADMIN_MENU_NEW', '');
+                       define('__ADMIN_MENU_OLD'   , ' checked="checked"');
+                       break;
        }
 
        // Display form
index 481435be66e0091264f6a0a474f9bebdb6e2cf6f..16933597a9cac21e795a96fdf6d1a41e34c5ffe3 100644 (file)
@@ -54,7 +54,7 @@ if ((REQUEST_ISSET_POST('edit')) && ($SEL > 0)) {
        foreach (REQUEST_POST('sel') as $id => $selected) {
                // Load data for the ID
                $result = SQL_QUERY_ESC("SELECT admin_id, action_menu, what_menu, access_mode FROM `{!_MYSQL_PREFIX!}_admins_acls` WHERE `id`=%s LIMIT 1",
-                array(bigintval($id)), __FILE__, __LINE__);
+               array(bigintval($id)), __FILE__, __LINE__);
                list($aid, $act, $wht, $mode) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
 
@@ -67,10 +67,10 @@ if ((REQUEST_ISSET_POST('edit')) && ($SEL > 0)) {
                        'what_selection'   => ADMIN_MENU_SELECTION("what", $wht, $id),
                        'mode_options'     => generateOptionList(
                                '/ARRAY/',
-                               array("allow", "deny"),
-                               array(constant('ADMINS_ALLOW_MODE'), constant('ADMINS_DENY_MODE')),
-                               $mode
-                       ),
+               array("allow", "deny"),
+               array(constant('ADMINS_ALLOW_MODE'), constant('ADMINS_DENY_MODE')),
+               $mode
+               ),
                );
 
                // Load row template
@@ -89,13 +89,13 @@ if ((REQUEST_ISSET_POST('edit')) && ($SEL > 0)) {
 
                // Update entries
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admins_acls` SET admin_id=%s, action_menu='%s', what_menu='%s', access_mode='%s' WHERE `id`=%s LIMIT 1",
-                       array(
-                               REQUEST_POST('admin', $id),
-                               REQUEST_POST('action_menu', $id),
-                               REQUEST_POST('what_menu', $id),
-                               REQUEST_POST('mode', $id),
-                               $id
-                       ),__FILE__, __LINE__);
+               array(
+               REQUEST_POST('admin', $id),
+               REQUEST_POST('action_menu', $id),
+               REQUEST_POST('what_menu', $id),
+               REQUEST_POST('mode', $id),
+               $id
+               ),__FILE__, __LINE__);
        }
 
        // Update cache when installed
@@ -114,7 +114,7 @@ if ((REQUEST_ISSET_POST('edit')) && ($SEL > 0)) {
        foreach (REQUEST_POST('sel') as $id => $selected) {
                // Load data for the ID
                $result = SQL_QUERY_ESC("SELECT admin_id, action_menu, what_menu, access_mode FROM `{!_MYSQL_PREFIX!}_admins_acls` WHERE `id`=%s LIMIT 1",
-                       array(bigintval($id)), __FILE__, __LINE__);
+               array(bigintval($id)), __FILE__, __LINE__);
                list($admin, $act, $wht, $mode) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
 
@@ -150,7 +150,7 @@ if ((REQUEST_ISSET_POST('edit')) && ($SEL > 0)) {
        // Remove entries
        foreach (REQUEST_POST('sel') as $id => $selected) {
                SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admins_acls` WHERE `id`=%s LIMIT 1",
-                       array(bigintval($id)),__FILE__, __LINE__);
+               array(bigintval($id)),__FILE__, __LINE__);
        }
 
        // Update cache when installed
@@ -180,17 +180,17 @@ if ((REQUEST_ISSET_POST('edit')) && ($SEL > 0)) {
                if (((REQUEST_ISSET_POST(('action_menu'))) || (REQUEST_ISSET_POST(('what_menu')))) && (!$BOTH)) {
                        // Main or sub menu selected
                        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_admins_acls` WHERE admin_id=%s AND action_menu='%s' AND what_menu='%s' LIMIT 1",
-                               array(bigintval(REQUEST_POST('admin_id')), REQUEST_POST('action_menu'), REQUEST_POST('what_menu')), __FILE__, __LINE__);
+                       array(bigintval(REQUEST_POST('admin_id')), REQUEST_POST('action_menu'), REQUEST_POST('what_menu')), __FILE__, __LINE__);
                        if (SQL_NUMROWS($result) == 0) {
                                // Finally add the new ACL
                                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_admins_acls` (admin_id, action_menu, what_menu, access_mode)
 VALUES ('%s','%s','%s','%s')",
- array(
-       bigintval(REQUEST_POST('admin_id')),
-       REQUEST_POST('action_menu'),
-       REQUEST_POST('what_menu'),
-       REQUEST_POST('mode')
-), __FILE__, __LINE__);
                              array(
+                               bigintval(REQUEST_POST('admin_id')),
+                               REQUEST_POST('action_menu'),
+                               REQUEST_POST('what_menu'),
+                               REQUEST_POST('mode')
+                               ), __FILE__, __LINE__);
                                $content = getMessage('ADMIN_ADMINS_ACL_SAVED');
 
                                // Update cache when installed
@@ -260,14 +260,14 @@ VALUES ('%s','%s','%s','%s')",
        define('_ACTION_SELECTION', ADMIN_MENU_SELECTION("action"));
        define('_WHAT_SELECTION'  , ADMIN_MENU_SELECTION("what"));
        define('_MODE_OPTIONS'    ,
-               generateOptionList(
+       generateOptionList(
                        '/ARRAY/',
-                       array("allow", "deny"),
-                       array(
-                               getMessage('ADMINS_ALLOW_MODE'),
-                               getMessage('ADMINS_DENY_MODE')
-                       )
-               )
+       array("allow", "deny"),
+       array(
+       getMessage('ADMINS_ALLOW_MODE'),
+       getMessage('ADMINS_DENY_MODE')
+       )
+       )
        );
 
        // Load template for adding new ACL
index babddaa4a8b142698507ea021710b9cf041a9ad3..516538aaafa8427b866f542f47e2d79152a36351 100644 (file)
@@ -72,93 +72,93 @@ if (IS_FORM_SENT()) {
        // Activate / Deactivate beg rallye (Y/N)
        switch (getConfig('beg_rallye'))
        {
-       case 'Y':
-               $content['rallye_yes'] = ' checked="checked"';
-               $content['rallye_no']  = '';
-               break;
-
-       case 'N':
-               $content['rallye_yes'] = '';
-               $content['rallye_no']  = ' checked="checked"';
-               break;
+               case 'Y':
+                       $content['rallye_yes'] = ' checked="checked"';
+                       $content['rallye_no']  = '';
+                       break;
+
+               case 'N':
+                       $content['rallye_yes'] = '';
+                       $content['rallye_no']  = ' checked="checked"';
+                       break;
        }
 
        switch (getConfig('beg_active'))
        {
-       case 'Y':
-               $content['active_yes'] = ' checked="checked"';
-               $content['active_no']  = '';
-               break;
-
-       case 'N':
-               $content['active_yes'] = '';
-               $content['active_no']  = ' checked="checked"';
-               break;
+               case 'Y':
+                       $content['active_yes'] = ' checked="checked"';
+                       $content['active_no']  = '';
+                       break;
+
+               case 'N':
+                       $content['active_yes'] = '';
+                       $content['active_no']  = ' checked="checked"';
+                       break;
        }
 
        switch (getConfig('beg_mode'))
        {
-       case 'DIRECT':
-               $content['mode_direct'] = ' checked="checked"';
-               $content['mode_ref']    = '';
-               break;
-
-       case 'REF':
-               $content['mode_direct'] = '';
-               $content['mode_ref']    = ' checked="checked"';
-               break;
+               case 'DIRECT':
+                       $content['mode_direct'] = ' checked="checked"';
+                       $content['mode_ref']    = '';
+                       break;
+
+               case 'REF':
+                       $content['mode_direct'] = '';
+                       $content['mode_ref']    = ' checked="checked"';
+                       break;
        }
 
        switch (getConfig('beg_ral_en_notify'))
        {
-       case 'Y':
-               $content['ral_enable_notify_yes'] = ' checked="checked"';
-               $content['ral_enable_notify_no']  = '';
-               break;
-
-       case 'N':
-               $content['ral_enable_notify_yes'] = '';
-               $content['ral_enable_notify_no']  = ' checked="checked"';
-               break;
+               case 'Y':
+                       $content['ral_enable_notify_yes'] = ' checked="checked"';
+                       $content['ral_enable_notify_no']  = '';
+                       break;
+
+               case 'N':
+                       $content['ral_enable_notify_yes'] = '';
+                       $content['ral_enable_notify_no']  = ' checked="checked"';
+                       break;
        }
 
        switch (getConfig('beg_ral_di_notify'))
        {
-       case 'Y':
-               $content['ral_disable_notify_yes'] = ' checked="checked"';
-               $content['ral_disable_notify_no']  = '';
-               break;
-
-       case 'N':
-               $content['ral_disable_notify_yes'] = '';
-               $content['ral_disable_notify_no']  = ' checked="checked"';
-               break;
+               case 'Y':
+                       $content['ral_disable_notify_yes'] = ' checked="checked"';
+                       $content['ral_disable_notify_no']  = '';
+                       break;
+
+               case 'N':
+                       $content['ral_disable_notify_yes'] = '';
+                       $content['ral_disable_notify_no']  = ' checked="checked"';
+                       break;
        }
 
        switch (getConfig('beg_new_mem_notify'))
        {
-       case 'Y':
-               $content['new_member_notify_yes'] = ' checked="checked"';
-               $content['new_member_notify_no']  = '';
-               break;
-
-       case 'N':
-               $content['new_member_notify_yes'] = '';
-               $content['new_member_notify_no']  = ' checked="checked"';
-               break;
+               case 'Y':
+                       $content['new_member_notify_yes'] = ' checked="checked"';
+                       $content['new_member_notify_no']  = '';
+                       break;
+
+               case 'N':
+                       $content['new_member_notify_yes'] = '';
+                       $content['new_member_notify_no']  = ' checked="checked"';
+                       break;
        }
 
        switch (getConfig('beg_include_own'))
        {
-       case 'Y':
-               $content['include_own_yes'] = ' checked="checked"';
-               $content['include_own_no']  = '';
-               break;
-
-       case 'N':
-               $content['include_own_yes'] = '';
-               $content['include_own_no']  = ' checked="checked"';
-               break;
+               case 'Y':
+                       $content['include_own_yes'] = ' checked="checked"';
+                       $content['include_own_no']  = '';
+                       break;
+
+               case 'N':
+                       $content['include_own_yes'] = '';
+                       $content['include_own_no']  = ' checked="checked"';
+                       break;
        }
 
        // Init elements
index 6261ae22d25e30a308a001f0d10437adb49c1e1c..f614f54e10e3612373c928976c45773fb88c139d 100644 (file)
@@ -53,27 +53,27 @@ if (IS_FORM_SENT()) {
        define('__POINTS_VALUE', getConfig('birthday_points'));
        switch (getConfig('birthday_active'))
        {
-       case 'Y':
-               $content['active_yes'] = ' checked="checked"';
-               $content['active_no']  = '';
-               break;
+               case 'Y':
+                       $content['active_yes'] = ' checked="checked"';
+                       $content['active_no']  = '';
+                       break;
 
-       case 'N':
-               $content['active_yes'] = '';
-               $content['active_no']  = ' checked="checked"';
-               break;
+               case 'N':
+                       $content['active_yes'] = '';
+                       $content['active_no']  = ' checked="checked"';
+                       break;
        }
        switch (getConfig('birthday_mode'))
        {
-       case 'DIRECT':
-               $content['mode_direct'] = ' checked="checked"';
-               $content['mode_ref']    = '';
-               break;
+               case 'DIRECT':
+                       $content['mode_direct'] = ' checked="checked"';
+                       $content['mode_ref']    = '';
+                       break;
 
-       case 'REF':
-               $content['mode_direct'] = '';
-               $content['mode_ref']    = ' checked="checked"';
-               break;
+               case 'REF':
+                       $content['mode_direct'] = '';
+                       $content['mode_ref']    = ' checked="checked"';
+                       break;
        }
 
        // Display form
index 8d65db67a6330d0cd9d7fcc02221e7a3edbbcae4..d5d8a09f1d580d45d3381c23d7175751952ad9b5 100644 (file)
@@ -122,124 +122,124 @@ if (IS_FORM_SENT()) {
        // Activate / Deactivate bonus active rallye (Y/N)
        switch (getConfig('bonus_active'))
        {
-       case 'Y':
-               define('__BONUS_ACTIVE_Y', ' checked="checked"');
-               define('__BONUS_ACTIVE_N', '');
-               break;
-
-       case 'N':
-               define('__BONUS_ACTIVE_Y', '');
-               define('__BONUS_ACTIVE_N', ' checked="checked"');
-               break;
+               case 'Y':
+                       define('__BONUS_ACTIVE_Y', ' checked="checked"');
+                       define('__BONUS_ACTIVE_N', '');
+                       break;
+
+               case 'N':
+                       define('__BONUS_ACTIVE_Y', '');
+                       define('__BONUS_ACTIVE_N', ' checked="checked"');
+                       break;
        }
        // Other bonus to de-/activate
        switch (getConfig('bonus_login_yn'))
        {
-       case 'Y':
-               define('__BONUS_LOGIN_Y', ' checked="checked"');
-               define('__BONUS_LOGIN_N', '');
-               break;
-
-       case 'N':
-               define('__BONUS_LOGIN_Y', '');
-               define('__BONUS_LOGIN_N', ' checked="checked"');
-               break;
+               case 'Y':
+                       define('__BONUS_LOGIN_Y', ' checked="checked"');
+                       define('__BONUS_LOGIN_N', '');
+                       break;
+
+               case 'N':
+                       define('__BONUS_LOGIN_Y', '');
+                       define('__BONUS_LOGIN_N', ' checked="checked"');
+                       break;
        }
        switch (getConfig('bonus_stats_yn'))
        {
-       case 'Y':
-               define('__BONUS_STATS_Y', ' checked="checked"');
-               define('__BONUS_STATS_N', '');
-               break;
-
-       case 'N':
-               define('__BONUS_STATS_Y', '');
-               define('__BONUS_STATS_N', ' checked="checked"');
-               break;
+               case 'Y':
+                       define('__BONUS_STATS_Y', ' checked="checked"');
+                       define('__BONUS_STATS_N', '');
+                       break;
+
+               case 'N':
+                       define('__BONUS_STATS_Y', '');
+                       define('__BONUS_STATS_N', ' checked="checked"');
+                       break;
        }
        switch (getConfig('bonus_order_yn'))
        {
-       case 'Y':
-               define('__BONUS_ORDER_Y', ' checked="checked"');
-               define('__BONUS_ORDER_N', '');
-               break;
-
-       case 'N':
-               define('__BONUS_ORDER_Y', '');
-               define('__BONUS_ORDER_N', ' checked="checked"');
-               break;
+               case 'Y':
+                       define('__BONUS_ORDER_Y', ' checked="checked"');
+                       define('__BONUS_ORDER_N', '');
+                       break;
+
+               case 'N':
+                       define('__BONUS_ORDER_Y', '');
+                       define('__BONUS_ORDER_N', ' checked="checked"');
+                       break;
        }
        switch (getConfig('bonus_ref_yn'))
        {
-       case 'Y':
-               define('__BONUS_REF_Y', ' checked="checked"');
-               define('__BONUS_REF_N', '');
-               break;
-
-       case 'N':
-               define('__BONUS_REF_Y', '');
-               define('__BONUS_REF_N', ' checked="checked"');
-               break;
+               case 'Y':
+                       define('__BONUS_REF_Y', ' checked="checked"');
+                       define('__BONUS_REF_N', '');
+                       break;
+
+               case 'N':
+                       define('__BONUS_REF_Y', '');
+                       define('__BONUS_REF_N', ' checked="checked"');
+                       break;
        }
        switch (getConfig('bonus_click_yn'))
        {
-       case 'Y':
-               define('__BONUS_CLICK_Y', ' checked="checked"');
-               define('__BONUS_CLICK_N', '');
-               break;
-
-       case 'N':
-               define('__BONUS_CLICK_Y', '');
-               define('__BONUS_CLICK_N', ' checked="checked"');
-               break;
+               case 'Y':
+                       define('__BONUS_CLICK_Y', ' checked="checked"');
+                       define('__BONUS_CLICK_N', '');
+                       break;
+
+               case 'N':
+                       define('__BONUS_CLICK_Y', '');
+                       define('__BONUS_CLICK_N', ' checked="checked"');
+                       break;
        }
        switch (getConfig('bonus_en_notify'))
        {
-       case 'Y':
-               define('__BONUS_EN_NOTIFY_Y', ' checked="checked"');
-               define('__BONUS_EN_NOTIFY_N', '');
-               break;
-
-       case 'N':
-               define('__BONUS_EN_NOTIFY_Y', '');
-               define('__BONUS_EN_NOTIFY_N', ' checked="checked"');
-               break;
+               case 'Y':
+                       define('__BONUS_EN_NOTIFY_Y', ' checked="checked"');
+                       define('__BONUS_EN_NOTIFY_N', '');
+                       break;
+
+               case 'N':
+                       define('__BONUS_EN_NOTIFY_Y', '');
+                       define('__BONUS_EN_NOTIFY_N', ' checked="checked"');
+                       break;
        }
        switch (getConfig('bonus_di_notify'))
        {
-       case 'Y':
-               define('__BONUS_DI_NOTIFY_Y', ' checked="checked"');
-               define('__BONUS_DI_NOTIFY_N', '');
-               break;
-
-       case 'N':
-               define('__BONUS_DI_NOTIFY_Y', '');
-               define('__BONUS_DI_NOTIFY_N', ' checked="checked"');
-               break;
+               case 'Y':
+                       define('__BONUS_DI_NOTIFY_Y', ' checked="checked"');
+                       define('__BONUS_DI_NOTIFY_N', '');
+                       break;
+
+               case 'N':
+                       define('__BONUS_DI_NOTIFY_Y', '');
+                       define('__BONUS_DI_NOTIFY_N', ' checked="checked"');
+                       break;
        }
        switch (getConfig('bonus_new_mem_notify'))
        {
-       case 'Y':
-               define('__BONUS_NEW_MEMBER_NOTIFY_Y', ' checked="checked"');
-               define('__BONUS_NEW_MEMBER_NOTIFY_N', '');
-               break;
-
-       case 'N':
-               define('__BONUS_NEW_MEMBER_NOTIFY_Y', '');
-               define('__BONUS_NEW_MEMBER_NOTIFY_N', ' checked="checked"');
-               break;
+               case 'Y':
+                       define('__BONUS_NEW_MEMBER_NOTIFY_Y', ' checked="checked"');
+                       define('__BONUS_NEW_MEMBER_NOTIFY_N', '');
+                       break;
+
+               case 'N':
+                       define('__BONUS_NEW_MEMBER_NOTIFY_Y', '');
+                       define('__BONUS_NEW_MEMBER_NOTIFY_N', ' checked="checked"');
+                       break;
        }
        switch (getConfig('bonus_include_own'))
        {
-       case 'Y':
-               define('__BONUS_INCLUDE_OWN_Y', ' checked="checked"');
-               define('__BONUS_INCLUDE_OWN_N', '');
-               break;
-
-       case 'N':
-               define('__BONUS_INCLUDE_OWN_Y', '');
-               define('__BONUS_INCLUDE_OWN_N', ' checked="checked"');
-               break;
+               case 'Y':
+                       define('__BONUS_INCLUDE_OWN_Y', ' checked="checked"');
+                       define('__BONUS_INCLUDE_OWN_N', '');
+                       break;
+
+               case 'N':
+                       define('__BONUS_INCLUDE_OWN_Y', '');
+                       define('__BONUS_INCLUDE_OWN_N', ' checked="checked"');
+                       break;
        }
 
        // Load final template
index 7d8f4a3b8abf72d30a5dc5bcb5c2f355e0f604f7..7132bfe2392049b2038fe82ec513d68d013a46d6 100644 (file)
@@ -52,11 +52,11 @@ $CATS = '';
 if (REQUEST_ISSET_POST(('add'))) {
        // Add a new category
        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_cats` WHERE cat='%s' LIMIT 1",
-               array(REQUEST_POST('catname')), __FILE__, __LINE__);
+       array(REQUEST_POST('catname')), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 0) {
                // Category does not exists, we simply add it...
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_cats` (cat, visible, sort) VALUES ('%s','%s','%s')",
-                       array(REQUEST_POST('catname'), REQUEST_POST('visible'), bigintval(REQUEST_POST('parent') + 1)), __FILE__, __LINE__);
+               array(REQUEST_POST('catname'), REQUEST_POST('visible'), bigintval(REQUEST_POST('parent') + 1)), __FILE__, __LINE__);
                $content = CATEGORY_ADDED;
        } else {
                // Category does already exists
@@ -79,24 +79,24 @@ if (REQUEST_ISSET_POST(('add'))) {
                if (!empty($cat)) {
                        switch (REQUEST_GET('do'))
                        {
-                       case 'edit': // Change categories
-                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_cats` SET cat='%s', `visible`='%s', sort=%s WHERE `id`=%s LIMIT 1",
+                               case 'edit': // Change categories
+                                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_cats` SET cat='%s', `visible`='%s', sort=%s WHERE `id`=%s LIMIT 1",
                                        array(
-                                               $cat,
-                                               REQUEST_POST('vis', $id),
-                                               REQUEST_POST('sort', $id),
-                                               $id
+                                       $cat,
+                                       REQUEST_POST('vis', $id),
+                                       REQUEST_POST('sort', $id),
+                                       $id
                                        ), __FILE__, __LINE__);
-                               $TEXT = CATEGORIES_SAVED;
-                               break;
+                                       $TEXT = CATEGORIES_SAVED;
+                                       break;
 
-                       case 'del': // Delete categories
-                               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_cats` WHERE `id`=%s LIMIT 1",
+                               case 'del': // Delete categories
+                                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_cats` WHERE `id`=%s LIMIT 1",
                                        array($id), __FILE__, __LINE__);
-                               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_cats` WHERE cat_id=%s",
+                                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_cats` WHERE cat_id=%s",
                                        array($id), __FILE__, __LINE__);
-                               $TEXT = CATEGORIES_DELETED;
-                               break;
+                                       $TEXT = CATEGORIES_DELETED;
+                                       break;
                        }
                } else {
                        // Entry not saved
@@ -114,7 +114,7 @@ if (REQUEST_ISSET_POST(('add'))) {
        foreach (REQUEST_POST('sel') as $id => $value) {
                // Load data of category
                $result = SQL_QUERY_ESC("SELECT cat FROM `{!_MYSQL_PREFIX!}_cats` WHERE `id`=%s LIMIT 1",
-                       array(bigintval($id)), __FILE__, __LINE__);
+               array(bigintval($id)), __FILE__, __LINE__);
                list($cat) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
 
@@ -140,7 +140,7 @@ if (REQUEST_ISSET_POST(('add'))) {
        {
                // Load data from the category
                $result = SQL_QUERY_ESC("SELECT cat, visible, sort FROM `{!_MYSQL_PREFIX!}_cats` WHERE `id`=%s LIMIT 1",
-                array(bigintval($id)), __FILE__, __LINE__);
+               array(bigintval($id)), __FILE__, __LINE__);
                list($cat, $vis, $sort) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
 
index a4370e8659a4e30d161e9d08c371c96bd28914a4..db841a13eabd12d4b28a85a6b84daf8cc50423fb 100644 (file)
@@ -75,57 +75,57 @@ if (IS_FORM_SENT()) {
        // Take points from jackpot (Y/N)
        switch (getConfig('doubler_jackpot'))
        {
-       case 'Y':
-               define('__DOUBLER_JACKPOT_Y', ' checked="checked"');
-               define('__DOUBLER_JACKPOT_N', '');
-               break;
-
-       case 'N':
-               define('__DOUBLER_JACKPOT_Y', '');
-               define('__DOUBLER_JACKPOT_N', ' checked="checked"');
-               break;
+               case 'Y':
+                       define('__DOUBLER_JACKPOT_Y', ' checked="checked"');
+                       define('__DOUBLER_JACKPOT_N', '');
+                       break;
+
+               case 'N':
+                       define('__DOUBLER_JACKPOT_Y', '');
+                       define('__DOUBLER_JACKPOT_N', ' checked="checked"');
+                       break;
        }
 
        // Take points from own account (Y/N)
        switch (getConfig('doubler_own'))
        {
-       case 'Y':
-               define('__DOUBLER_OWN_Y', ' checked="checked"');
-               define('__DOUBLER_OWN_N', '');
-               break;
-
-       case 'N':
-               define('__DOUBLER_OWN_Y', '');
-               define('__DOUBLER_OWN_N', ' checked="checked"');
-               break;
+               case 'Y':
+                       define('__DOUBLER_OWN_Y', ' checked="checked"');
+                       define('__DOUBLER_OWN_N', '');
+                       break;
+
+               case 'N':
+                       define('__DOUBLER_OWN_Y', '');
+                       define('__DOUBLER_OWN_N', ' checked="checked"');
+                       break;
        }
 
        // Mail send mode
        switch (getConfig('doubler_send_mode'))
        {
-       case 'DIRECT':
-               define('__DOUBLER_SEND_DIRECT', ' checked="checked"');
-               define('__DOUBLER_SEND_RESET' , '');
-               break;
-
-       case "RESET":
-               define('__DOUBLER_SEND_DIRECT', '');
-               define('__DOUBLER_SEND_RESET' , ' checked="checked"');
-               break;
+               case 'DIRECT':
+                       define('__DOUBLER_SEND_DIRECT', ' checked="checked"');
+                       define('__DOUBLER_SEND_RESET' , '');
+                       break;
+
+               case "RESET":
+                       define('__DOUBLER_SEND_DIRECT', '');
+                       define('__DOUBLER_SEND_RESET' , ' checked="checked"');
+                       break;
        }
 
        // Take points from own account (Y/N)
        switch (getConfig('doubler_sent_all'))
        {
-       case 'Y':
-               define('__DOUBLER_SENT_ALL_Y', ' checked="checked"');
-               define('__DOUBLER_SENT_ALL_N', '');
-               break;
-
-       case 'N':
-               define('__DOUBLER_SENT_ALL_Y', '');
-               define('__DOUBLER_SENT_ALL_N', ' checked="checked"');
-               break;
+               case 'Y':
+                       define('__DOUBLER_SENT_ALL_Y', ' checked="checked"');
+                       define('__DOUBLER_SENT_ALL_N', '');
+                       break;
+
+               case 'N':
+                       define('__DOUBLER_SENT_ALL_Y', '');
+                       define('__DOUBLER_SENT_ALL_N', ' checked="checked"');
+                       break;
        }
 
        // Transfer options (!!!) to __MEMBER_SELECTION
index 975ee4c6d8eb54fc6e23cacd191c2e848d2d577c..1771aa54dfea63fcfe8d907691e4e72487f2d7d8 100644 (file)
@@ -51,11 +51,11 @@ if (!REQUEST_ISSET_POST(('max'))) REQUEST_UNSET_POST(('add_max'));
 if (REQUEST_ISSET_POST(('add_max'))) {
        // Save all settings
        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value='%s' LIMIT 1",
-        array(bigintval(REQUEST_POST('max'))), __FILE__, __LINE__);
+       array(bigintval(REQUEST_POST('max'))), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 0) {
                // Add this value (including comment)
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_max_receive` (value, comment) VALUES ('%s','%s')",
-                       array(bigintval(REQUEST_POST('max')), REQUEST_POST('comment')),__FILE__, __LINE__);
+               array(bigintval(REQUEST_POST('max')), REQUEST_POST('comment')),__FILE__, __LINE__);
                $content = MAX_VALUE_SAVED;
        } else {
                // Value does alread exists!
@@ -76,21 +76,21 @@ if (REQUEST_ISSET_POST(('add_max'))) {
 
                switch (REQUEST_GET('do'))
                {
-               case 'edit': // Change entries
-                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_max_receive` SET value='%s', comment='%s' WHERE `id`=%s LIMIT 1",
+                       case 'edit': // Change entries
+                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_max_receive` SET value='%s', comment='%s' WHERE `id`=%s LIMIT 1",
                                array(
-                                       bigintval(REQUEST_POST('val', $id)),
-                                       REQUEST_POST('comm', $id),
-                                       $id
+                               bigintval(REQUEST_POST('val', $id)),
+                               REQUEST_POST('comm', $id),
+                               $id
                                ),__FILE__, __LINE__);
-                       $TEXT = MRECEIVE_SAVED;
-                       break;
+                               $TEXT = MRECEIVE_SAVED;
+                               break;
 
-               case 'del':
-                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE `id`=%s LIMIT 1",
+                       case 'del':
+                               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE `id`=%s LIMIT 1",
                                array($id), __FILE__, __LINE__);
-                       $TEXT = MRECEIVE_DELETED;
-                       break;
+                               $TEXT = MRECEIVE_DELETED;
+                               break;
                }
        }
 
@@ -105,7 +105,7 @@ if (REQUEST_ISSET_POST(('add_max'))) {
        {
                // Load data
                $result = SQL_QUERY_ESC("SELECT value, comment FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE `id`=%s LIMIT 1",
-                array(bigintval($id)), __FILE__, __LINE__);
+               array(bigintval($id)), __FILE__, __LINE__);
                list($value, $comment) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
 
@@ -131,7 +131,7 @@ if (REQUEST_ISSET_POST(('add_max'))) {
        foreach (REQUEST_POST('sel') as $id => $value) {
                // Load data
                $result = SQL_QUERY_ESC("SELECT value, comment FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE `id`=%s LIMIT 1",
-                array(bigintval($id)), __FILE__, __LINE__);
+               array(bigintval($id)), __FILE__, __LINE__);
                list($value, $comment) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
 
@@ -153,7 +153,7 @@ if (REQUEST_ISSET_POST(('add_max'))) {
        LOAD_TEMPLATE("admin_config_email_edit");
 } else {
        $result = SQL_QUERY("SELECT id, value, comment FROM `{!_MYSQL_PREFIX!}_max_receive` ORDER BY value",
-               __FILE__, __LINE__);
+       __FILE__, __LINE__);
        if (SQL_NUMROWS($result) > 0) {
                // List already existing entries for editing
                $OUT = ''; $SW = 2;
index ac6f9091e434e3ee552a944fb3a3824aa0f46590..07ac413f57474368f13ffb1e7dc6fb19edfb8405 100644 (file)
@@ -50,22 +50,22 @@ if (IS_FORM_SENT())
        // Save settings
        ADMIN_SAVE_SETTINGS_POST();
 }
- else
+else
 {
        // Prepare constants for the template
        define('__MAX_VALUE', getConfig('holiday_max'));
        define('__LOCKED'   , createTimeSelections(getConfig('holiday_lock')  , "holiday_lock"  , "WDh"));
 
        switch (getConfig('holiday_mode')) {
-       case "RESET":
-               define('__RESET_DEFAULT' , ' checked="checked"');
-               define('__DIRECT_DEFAULT', '');
-               break;
+               case "RESET":
+                       define('__RESET_DEFAULT' , ' checked="checked"');
+                       define('__DIRECT_DEFAULT', '');
+                       break;
 
-       case 'DIRECT':
-               define('__RESET_DEFAULT' , '');
-               define('__DIRECT_DEFAULT', ' checked="checked"');
-               break;
+               case 'DIRECT':
+                       define('__RESET_DEFAULT' , '');
+                       define('__DIRECT_DEFAULT', ' checked="checked"');
+                       break;
        }
 
        // Load form template
index a9119193b72dddb01c53f27725fd7dc9b8821fb3..294d0ffff0740fdb1664448379780867c4c78814 100644 (file)
@@ -51,71 +51,71 @@ if (REQUEST_ISSET_GET('sub')) $sub = REQUEST_GET('sub');
 
 switch ($sub)
 {
-case "settings": // Settings related to the index page
-       if (IS_FORM_SENT()) {
-               // Save settings
-               ADMIN_SAVE_SETTINGS_POST();
-               OUTPUT_HTML("<a href=\"{!URL!}/modules.php?module=admin&amp;what=config_home&amp;sub=settings\">{--ADMIN_CONTINUE_TO_CONFIG--}</a>");
-       } else {
-               // Prepare data for the template
-               $content = array_fill(-1, 60, '');
-               $content[getConfig('index_delay')] = ' selected="selected"';
-
-               define('__INDEX_COOKIE_SELECTION', createTimeSelections(getConfig('index_cookie'), "index_cookie", "YMWD"));
-               LOAD_TEMPLATE("admin_config_home_settings", false, $content);
-       }
-       break;
-
-case "target": // Set which what-file will be placed in home-page (only modules.php?module=index)
-       if (REQUEST_ISSET_GET(('home'))) {
-               // Set new home
-               updateConfiguration('index_home', REQUEST_GET(('home')));
-       } // END - if
-
-       // Load all what menu points
-       $result = SQL_QUERY("SELECT id, what, title
+       case "settings": // Settings related to the index page
+               if (IS_FORM_SENT()) {
+                       // Save settings
+                       ADMIN_SAVE_SETTINGS_POST();
+                       OUTPUT_HTML("<a href=\"{!URL!}/modules.php?module=admin&amp;what=config_home&amp;sub=settings\">{--ADMIN_CONTINUE_TO_CONFIG--}</a>");
+               } else {
+                       // Prepare data for the template
+                       $content = array_fill(-1, 60, '');
+                       $content[getConfig('index_delay')] = ' selected="selected"';
+
+                       define('__INDEX_COOKIE_SELECTION', createTimeSelections(getConfig('index_cookie'), "index_cookie", "YMWD"));
+                       LOAD_TEMPLATE("admin_config_home_settings", false, $content);
+               }
+               break;
+
+       case "target": // Set which what-file will be placed in home-page (only modules.php?module=index)
+               if (REQUEST_ISSET_GET(('home'))) {
+                       // Set new home
+                       updateConfiguration('index_home', REQUEST_GET(('home')));
+               } // END - if
+
+               // Load all what menu points
+               $result = SQL_QUERY("SELECT id, what, title
 FROM `{!_MYSQL_PREFIX!}_guest_menu`
 WHERE `action`='main' AND `what` != '' AND `what` IS NOT NULL AND `locked`='N'
 ORDER BY `sort` ASC", __FILE__, __LINE__);
 
-       // Init variables
-       $SW = 2;
-       $OUT = '';
+               // Init variables
+               $SW = 2;
+               $OUT = '';
 
-       // Process all entries
-       while ($content = SQL_FETCHARRAY($result)) {
-               // Link for setting 'what' as new "home"
-               $LINK = "<a href=\"{!URL!}/modules.php?module=admin&amp;what=config_home&amp;sub=target&amp;home=".$content['what']."\">{--_IS_NEW_HOME--}</a>";
+               // Process all entries
+               while ($content = SQL_FETCHARRAY($result)) {
+                       // Link for setting 'what' as new "home"
+                       $LINK = "<a href=\"{!URL!}/modules.php?module=admin&amp;what=config_home&amp;sub=target&amp;home=".$content['what']."\">{--_IS_NEW_HOME--}</a>";
 
-               // Is this current home?
-               if ($content['what'] == getConfig('index_home')) {
-                       // Is current home
-                       $LINK = "<div class=\"admin_note\">{!_IS_CURRENT_HOME!}</div>";
-                       $content['title'] = "<div class=\"admin_note\">".$content['title']."</div>";
-               } // END - if
+                       // Is this current home?
+                       if ($content['what'] == getConfig('index_home')) {
+                               // Is current home
+                               $LINK = "<div class=\"admin_note\">{!_IS_CURRENT_HOME!}</div>";
+                               $content['title'] = "<div class=\"admin_note\">".$content['title']."</div>";
+                       } // END - if
 
-               // Prepare content
-               $content['sw'] = $SW;
-               $content['link'] = $LINK;
+                       // Prepare content
+                       $content['sw'] = $SW;
+                       $content['link'] = $LINK;
 
-               // Load row template
-               $OUT .= LOAD_TEMPLATE("admin_config_home_row", true, $content);
+                       // Load row template
+                       $OUT .= LOAD_TEMPLATE("admin_config_home_row", true, $content);
 
-               // Switch color
-               $SW = 3 - $SW;
-       } // END - while
+                       // Switch color
+                       $SW = 3 - $SW;
+               } // END - while
 
-       // Free memory
-       SQL_FREERESULT($result);
-       define('__HOME_ROWS', $OUT);
+               // Free memory
+               SQL_FREERESULT($result);
+               define('__HOME_ROWS', $OUT);
 
-       // Load template
-       LOAD_TEMPLATE("admin_config_home");
-       break;
+               // Load template
+               LOAD_TEMPLATE("admin_config_home");
+               break;
 
-default: // Output selection table
-       LOAD_TEMPLATE("admin_config_home_main");
-       break;
+       default: // Output selection table
+               LOAD_TEMPLATE("admin_config_home_main");
+               break;
 
 }
 
index c719cc17299811493b97acf57e6e22335b007b30..05c1482eea9819d8a52c9a5c74878962b1e8d033 100644 (file)
@@ -80,9 +80,9 @@ if (IS_FORM_SENT()) {
        } else {
                // Make start editable
                define('__MT_START',
-                       ADD_SELECTION("day"  , date('d', time())).
-                       ADD_SELECTION("month", date('m', time())).
-                       ADD_SELECTION("year",  -1)
+               ADD_SELECTION("day"  , date('d', time())).
+               ADD_SELECTION("month", date('m', time())).
+               ADD_SELECTION("year",  -1)
                );
        }
 
index c5233e570ce467032e86ef69f132e3fc85f72adc..f6a86aeca31d01d7ce69970c571335a42f40a7a0 100644 (file)
@@ -57,7 +57,7 @@ if (REQUEST_ISSET_POST('edit')) {
                foreach (REQUEST_POST('sel') as $id => $sel) {
                        // Load module data
                        $result = SQL_QUERY_ESC("SELECT module, title, locked, hidden, admin_only, mem_only FROM `{!_MYSQL_PREFIX!}_mod_reg` WHERE `id`=%s LIMIT 1",
-                               array(bigintval($id)), __FILE__, __LINE__);
+                       array(bigintval($id)), __FILE__, __LINE__);
                        list($mod, $title, $locked, $hidden, $admin, $mem) = SQL_FETCHROW($result);
                        SQL_FREERESULT($result);
 
@@ -99,14 +99,14 @@ if (REQUEST_ISSET_POST('edit')) {
 
                // Update module
                ADD_SQL(SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `title`='%s', `locked`='%s', `hidden`='%s', `admin_only`='%s', `mem_only`='%s' WHERE `id`=%s LIMIT 1",
-                       array(
-                               REQUEST_POST('title', $id),
-                               REQUEST_POST('locked', $id),
-                               REQUEST_POST('hidden', $id),
-                               REQUEST_POST('admin', $id),
-                               REQUEST_POST('member', $id),
-                               $id
-                       ),  __FILE__, __LINE__, false));
+               array(
+               REQUEST_POST('title', $id),
+               REQUEST_POST('locked', $id),
+               REQUEST_POST('hidden', $id),
+               REQUEST_POST('admin', $id),
+               REQUEST_POST('member', $id),
+               $id
+               ),  __FILE__, __LINE__, false));
        }
 
        // Run all sqls
index 665e149a17ccb963fadc79c695591c6afb779663..3bf7eed2470cbfb1f46900b48e06589a23ab9381 100644 (file)
@@ -52,15 +52,15 @@ if (IS_FORM_SENT()) {
        // Prepare constants for the template
        switch (getConfig('order_max_full'))
        {
-       case 'ORDER':
-               define('__ORDER_DEFAULT', ' checked="checked"');
-               define('__MAX_DEFAULT'  , '');
-               break;
-
-       case 'MAX':
-               define('__ORDER_DEFAULT', '');
-               define('__MAX_DEFAULT'  , ' checked="checked"');
-               break;
+               case 'ORDER':
+                       define('__ORDER_DEFAULT', ' checked="checked"');
+                       define('__MAX_DEFAULT'  , '');
+                       break;
+
+               case 'MAX':
+                       define('__ORDER_DEFAULT', '');
+                       define('__MAX_DEFAULT'  , ' checked="checked"');
+                       break;
        }
 
        // Minimum mails / order
@@ -69,15 +69,15 @@ if (IS_FORM_SENT()) {
        // Sorting mode (ascending / descending)
        switch (getConfig('order_mode'))
        {
-       case "ASC":
-               define('__ASC_DEFAULT' , ' selected="selected"');
-               define('__DESC_DEFAULT', '');
-               break;
-
-       case "DESC":
-               define('__ASC_DEFAULT' , '');
-               define('__DESC_DEFAULT', ' selected="selected"');
-               break;
+               case "ASC":
+                       define('__ASC_DEFAULT' , ' selected="selected"');
+                       define('__DESC_DEFAULT', '');
+                       break;
+
+               case "DESC":
+                       define('__ASC_DEFAULT' , '');
+                       define('__DESC_DEFAULT', ' selected="selected"');
+                       break;
        }
 
        // Transfer other config data into constants for the template
index 94ecd2f11d40e6f4eb021b4ce2054b122a1a80dd..47b031141f4079d86d8f3573b3e215ba38465fd3 100644 (file)
@@ -51,24 +51,24 @@ if (REQUEST_ISSET_POST(('rate'))) REQUEST_SET_POST('rate', convertCommaToDot(REQ
 if ((REQUEST_ISSET_POST(('add'))) && (REQUEST_ISSET_POST(('title'))) && (REQUEST_POST('rate') > 0)) {
        // Add new payout type
        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_payout_types` WHERE type='%s' LIMIT 1",
-               array(REQUEST_POST('title')), __FILE__, __LINE__);
+       array(REQUEST_POST('title')), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 0) {
                // Add now
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_payout_types`
 (type, rate, min_points, from_account, from_pass, engine_url, engine_ret_ok, engine_ret_failed, pass_enc, allow_url)
 VALUES ('%s', %d, %d,'%s','%s','%s','%s','%s','%s','%s')",
- array(
-       REQUEST_POST('title'),
-       bigintval(REQUEST_POST('rate')),
-       bigintval(REQUEST_POST('mpoi')),
-       REQUEST_POST('yacc'),
-       REQUEST_POST('ypass'),
-       REQUEST_POST('yurl'),
-       REQUEST_POST('yrdone'),
-       REQUEST_POST('yrfailed'),
-       REQUEST_POST('ytrans'),
-       REQUEST_POST('allow_url'),
-), __FILE__, __LINE__);
              array(
+               REQUEST_POST('title'),
+               bigintval(REQUEST_POST('rate')),
+               bigintval(REQUEST_POST('mpoi')),
+               REQUEST_POST('yacc'),
+               REQUEST_POST('ypass'),
+               REQUEST_POST('yurl'),
+               REQUEST_POST('yrdone'),
+               REQUEST_POST('yrfailed'),
+               REQUEST_POST('ytrans'),
+               REQUEST_POST('allow_url'),
+               ), __FILE__, __LINE__);
                $msg = getMessage('ADMIN_PAYOUT_TYPE_ADDED');
        } else {
                // Free memory
@@ -95,7 +95,7 @@ if ((REQUEST_ISSET_POST('edit')) && (countPostSelection() > 0)) {
                        $id = bigintval($id);
 
                        // Edit only if something is entered
-                       if ((REQUEST_ISSET_POST(('title', $id))) && (REQUEST_POST('rate', $id) > 0)) {
+                       if ((REQUEST_ISSET_POST('title', $id)) && (REQUEST_POST('rate', $id) > 0)) {
                                // Update entry
                                ADD_SQL(SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_payout_types` SET
 type='%s',
@@ -103,12 +103,12 @@ rate=%s,
 min_points=%s,
 allow_url='%s'
 WHERE `id`='".$id."' LIMIT 1",
- array(
-       REQUEST_POST('title', $id),
-       convertCommaToDot(REQUEST_POST('rate', $id)),
-       convertCommaToDot(REQUEST_POST('mpoi' , $id)),
-       REQUEST_POST('allow', $id),
-),__FILE__, __LINE__, false));
                              array(
+                               REQUEST_POST('title', $id),
+                               convertCommaToDot(REQUEST_POST('rate', $id)),
+                               convertCommaToDot(REQUEST_POST('mpoi' , $id)),
+                               REQUEST_POST('allow', $id),
+                               ),__FILE__, __LINE__, false));
                        }
                }
 
@@ -123,7 +123,7 @@ WHERE `id`='".$id."' LIMIT 1",
                foreach (REQUEST_POST('sel') as $id => $sel) {
                        // Load data
                        $result = SQL_QUERY_ESC("SELECT type, rate, min_points, allow_url FROM `{!_MYSQL_PREFIX!}_payout_types` WHERE `id`=%s LIMIT 1",
-                               array(bigintval($id)), __FILE__, __LINE__);
+                       array(bigintval($id)), __FILE__, __LINE__);
                        list($title, $rate, $mpoi, $allow) = SQL_FETCHROW($result);
                        SQL_FREERESULT($result);
 
@@ -157,7 +157,7 @@ WHERE `id`='".$id."' LIMIT 1",
                // Delete entries
                foreach (REQUEST_POST('sel') as $id => $sel) {
                        ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_payout_types` WHERE `id`=%s LIMIT 1",
-                               array(bigintval($id)), __FILE__, __LINE__, false));
+                       array(bigintval($id)), __FILE__, __LINE__, false));
                } // END - foreach
 
                // Run all SQLs
@@ -174,7 +174,7 @@ WHERE `id`='".$id."' LIMIT 1",
 
                        // Load data
                        $result = SQL_QUERY_ESC("SELECT type, rate, min_points FROM `{!_MYSQL_PREFIX!}_payout_types` WHERE `id`=%s LIMIT 1",
-                               array($id), __FILE__, __LINE__);
+                       array($id), __FILE__, __LINE__);
                        list($title, $rate, $mpoi) = SQL_FETCHROW($result);
                        SQL_FREERESULT($result);
 
index df3046a98509252b7cc79c81ef8db8e0a8ef5694..3b714a963fdda08295db709b1cb6f4898e057c3b 100644 (file)
@@ -53,19 +53,19 @@ if (REQUEST_ISSET_GET('sub')) {
        // Yes, then do some sanity-checks
        switch (REQUEST_GET('sub'))
        {
-       case "points":
-               if ((!REQUEST_ISSET_POST(('points_register'))) || (!REQUEST_ISSET_POST(('points_ref')))) {
-                       REQUEST_UNSET_POST('ok');
-               }
-               break;
-
-       case "ref":
-               if (REQUEST_ISSET_GET('do')) {
-                       if (((!REQUEST_ISSET_POST(('lvl'))) || (!REQUEST_ISSET_POST(('perc')))) && (REQUEST_GET('do') == 'add')) {
+               case "points":
+                       if ((!REQUEST_ISSET_POST(('points_register'))) || (!REQUEST_ISSET_POST(('points_ref')))) {
                                REQUEST_UNSET_POST('ok');
                        }
-               }
-               break;
+                       break;
+
+               case "ref":
+                       if (REQUEST_ISSET_GET('do')) {
+                               if (((!REQUEST_ISSET_POST(('lvl'))) || (!REQUEST_ISSET_POST(('perc')))) && (REQUEST_GET('do') == 'add')) {
+                                       REQUEST_UNSET_POST('ok');
+                               }
+                       }
+                       break;
        }
 } else {
        // Display overview
@@ -76,75 +76,75 @@ if (IS_FORM_SENT()) {
        INIT_SQLS();
        switch (REQUEST_GET('sub'))
        {
-       case "points":
-               ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_config` SET points_register='".REQUEST_POST('points_register')."', points_ref='".REQUEST_POST('points_ref')."' WHERE config=0 LIMIT 1");
-               break;
-
-       case "ref":
-               switch (REQUEST_GET('do'))
-               {
-               case 'add':
-                       ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_refdepths` (level, percents) VALUES ('".REQUEST_POST('lvl')."','".REQUEST_POST('perc')."')");
+               case "points":
+                       ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_config` SET points_register='".REQUEST_POST('points_register')."', points_ref='".REQUEST_POST('points_ref')."' WHERE config=0 LIMIT 1");
                        break;
 
-               case 'edit': // Change entries
-                       foreach (REQUEST_POST('lvl') as $id => $value) {
-                               // Secure ID
-                               $id = bigintval($id);
-
-                               // Revert german commata
-                               REQUEST_SET_POST(array('perc', $id), convertCommaToDot(REQUEST_POST('perc', $id)));
-
-                               // Update entry
-                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_refdepths` SET level='%s', percents='%s' WHERE `id`=%s LIMIT 1",
-                                       array(bigintval($value), REQUEST_POST('perc', $id), $id), __FILE__, __LINE__);
+               case "ref":
+                       switch (REQUEST_GET('do'))
+                       {
+                               case 'add':
+                                       ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_refdepths` (level, percents) VALUES ('".REQUEST_POST('lvl')."','".REQUEST_POST('perc')."')");
+                                       break;
+
+                               case 'edit': // Change entries
+                                       foreach (REQUEST_POST('lvl') as $id => $value) {
+                                               // Secure ID
+                                               $id = bigintval($id);
+
+                                               // Revert german commata
+                                               REQUEST_SET_POST(array('perc', $id), convertCommaToDot(REQUEST_POST('perc', $id)));
+
+                                               // Update entry
+                                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_refdepths` SET level='%s', percents='%s' WHERE `id`=%s LIMIT 1",
+                                               array(bigintval($value), REQUEST_POST('perc', $id), $id), __FILE__, __LINE__);
+                                       }
+                                       $message = getMessage('REF_DEPTHS_SAVED');
+                                       break;
+
+                               case 'del':
+                                       foreach (REQUEST_POST('id') as $id => $value) {
+                                               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_refdepths` WHERE `id`=%s LIMIT 1",
+                                               array(bigintval($id)), __FILE__, __LINE__);
+                                       }
+                                       $message = getMessage('REF_DEPTHS_DELETED');
+                                       break;
                        }
-                       $message = getMessage('REF_DEPTHS_SAVED');
-                       break;
 
-               case 'del':
-                       foreach (REQUEST_POST('id') as $id => $value) {
-                               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_refdepths` WHERE `id`=%s LIMIT 1",
-                                       array(bigintval($id)), __FILE__, __LINE__);
+                       // Update cache file
+                       if (GET_EXT_VERSION('cache') >= '0.1.2') {
+                               if ($GLOBALS['cache_instance']->loadCacheFile("refdepths")) $GLOBALS['cache_instance']->destroyCacheFile();
                        }
-                       $message = getMessage('REF_DEPTHS_DELETED');
                        break;
-               }
-
-               // Update cache file
-               if (GET_EXT_VERSION('cache') >= '0.1.2') {
-                       if ($GLOBALS['cache_instance']->loadCacheFile("refdepths")) $GLOBALS['cache_instance']->destroyCacheFile();
-               }
-               break;
 
-       case "settings":
-               $REF = bigintval(REQUEST_POST('ref_payout'));
-               ADD_SQL(sprintf("UPDATE `{!_MYSQL_PREFIX!}_config` SET
+                               case "settings":
+                                       $REF = bigintval(REQUEST_POST('ref_payout'));
+                                       ADD_SQL(sprintf("UPDATE `{!_MYSQL_PREFIX!}_config` SET
 allow_direct_pay='%s',
 reg_points_mode='%s',
 ref_payout='%s'
 WHERE config=0 LIMIT 1",
-                       REQUEST_POST('allow_direct_pay'),
-                       REQUEST_POST('reg_points_mode'),
-                       $REF
-               ));
-               if ((getConfig('ref_payout') == 0) && (REQUEST_POST('ref_payout') > 0)) {
-                       // Update account's ref_payout for "must-confirm"
-                       ADD_SQL(sprintf("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET ref_payout=(%s - mails_confirmed)
+                                       REQUEST_POST('allow_direct_pay'),
+                                       REQUEST_POST('reg_points_mode'),
+                                       $REF
+                                       ));
+                                       if ((getConfig('ref_payout') == 0) && (REQUEST_POST('ref_payout') > 0)) {
+                                               // Update account's ref_payout for "must-confirm"
+                                               ADD_SQL(sprintf("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET ref_payout=(%s - mails_confirmed)
 WHERE mails_confirmed < %s", $REF, $REF));
-               } elseif ((getConfig('ref_payout') > 0) && (REQUEST_POST('ref_payout') == 0)) {
-                       // Update account's ref_payout for "not-must-confirm"
-                       ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET ref_payout=0 WHERE ref_payout > 0");
-                       ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_points` SET points=points+locked_points WHERE locked_points>0");
-                       ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_points` SET locked_points=0 WHERE locked_points>0");
-               }
-               break;
+                                       } elseif ((getConfig('ref_payout') > 0) && (REQUEST_POST('ref_payout') == 0)) {
+                                               // Update account's ref_payout for "not-must-confirm"
+                                               ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET ref_payout=0 WHERE ref_payout > 0");
+                                               ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_points` SET points=points+locked_points WHERE locked_points>0");
+                                               ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_points` SET locked_points=0 WHERE locked_points>0");
+                                       }
+                                       break;
        }
 
        if ((IS_SQLS_VALID()) && (IS_SQLS_VALID())) {
                if (strpos($GLOBALS['sqls'][0], "INSERT") > -1) {
                        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_refdepths` WHERE level='%s' LIMIT 1",
-                               array(bigintval(REQUEST_POST('lvl'))), __FILE__, __LINE__);
+                       array(bigintval(REQUEST_POST('lvl'))), __FILE__, __LINE__);
                        SQL_FREERESULT($result);
                } // END - if
 
@@ -175,15 +175,15 @@ WHERE mails_confirmed < %s", $REF, $REF));
        // Setup some settings like direct pay and so on
        // Including new add-mode for one-time referal bonus
        switch (getConfig('allow_direct_pay')) {
-       case 'Y':
-               define('__DIRECT_Y', ' checked="checked"');
-               define('__DIRECT_N', '');
-               break;
-
-       case 'N':
-               define('__DIRECT_Y', '');
-               define('__DIRECT_N', ' checked="checked"');
-               break;
+               case 'Y':
+                       define('__DIRECT_Y', ' checked="checked"');
+                       define('__DIRECT_N', '');
+                       break;
+
+               case 'N':
+                       define('__DIRECT_Y', '');
+                       define('__DIRECT_N', ' checked="checked"');
+                       break;
        }
 
        // One-time referal bonus add-mode
@@ -211,7 +211,7 @@ WHERE mails_confirmed < %s", $REF, $REF));
                $OUT = ''; $SW = 2;
                foreach (REQUEST_POST('sel') as $id => $value) {
                        $result = SQL_QUERY_ESC("SELECT level, percents FROM `{!_MYSQL_PREFIX!}_refdepths` WHERE `id`=%s LIMIT 1",
-                               array(bigintval($id)), __FILE__, __LINE__);
+                       array(bigintval($id)), __FILE__, __LINE__);
                        list($lvl, $perc) = SQL_FETCHROW($result);
                        SQL_FREERESULT($result);
 
@@ -236,7 +236,7 @@ WHERE mails_confirmed < %s", $REF, $REF));
                $OUT = ''; $SW = 2;
                foreach (REQUEST_POST('sel') as $id => $value) {
                        $result = SQL_QUERY_ESC("SELECT level, percents FROM `{!_MYSQL_PREFIX!}_refdepths` WHERE `id`=%s LIMIT 1",
-                        array(bigintval($id)), __FILE__, __LINE__);
+                       array(bigintval($id)), __FILE__, __LINE__);
                        list($lvl, $perc) = SQL_FETCHROW($result);
                        SQL_FREERESULT($result);
 
index 05af9628f26f4d65ef3990e494d59b32686e28f7..82fee1e1552249d2c7081067e72c1f9086a936b5 100644 (file)
@@ -51,18 +51,18 @@ if (REQUEST_ISSET_GET(('rallye'))) {
                if ((REQUEST_ISSET_POST(('level'))) && ((REQUEST_ISSET_POST(('points'))) || (REQUEST_ISSET_POST(('info'))))) {
                        // Submitted data is valid, but maybe we already have this price level?
                        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id=%s AND price_level='%s' LIMIT 1",
-                               array(bigintval(REQUEST_GET('rallye')), bigintval(REQUEST_POST('level'))), __FILE__, __LINE__);
+                       array(bigintval(REQUEST_GET('rallye')), bigintval(REQUEST_POST('level'))), __FILE__, __LINE__);
 
                        if (SQL_NUMROWS($result) == 0) {
                                // Ok, new price level entered!
                                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_rallye_prices` (rallye_id, price_level, points, info)
 VALUES ('%s','%s','%s','%s')",
- array(
-       bigintval(REQUEST_GET('rallye')),
-       bigintval(REQUEST_POST('level')),
-       REQUEST_POST('points'),
-       REQUEST_POST('info')
-), __FILE__, __LINE__);
                              array(
+                               bigintval(REQUEST_GET('rallye')),
+                               bigintval(REQUEST_POST('level')),
+                               REQUEST_POST('points'),
+                               REQUEST_POST('info')
+                               ), __FILE__, __LINE__);
                                LOAD_TEMPLATE('admin_settings_saved', false, getMessage('RALLYE_PRICE_LEVEL_SAVED'));
                        } else {
                                // Free memory
@@ -79,7 +79,7 @@ VALUES ('%s','%s','%s','%s')",
                        // Delete selected entries
                        foreach (REQUEST_POST('sel') as $id => $sel) {
                                SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE `id`=%s LIMIT 1",
-                                       array(bigintval($id)), __FILE__, __LINE__);
+                               array(bigintval($id)), __FILE__, __LINE__);
                        }
 
                        // Output message
@@ -95,13 +95,13 @@ VALUES ('%s','%s','%s','%s')",
 
                        // Update entry
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_rallye_prices` SET rallye_id=%s, price_level='%s', points='%s', info='%s' WHERE `id`=%s LIMIT 1",
-                               array(
-                                       REQUEST_POST('rallye_id', $id),
-                                       bigintval($level),
-                                       REQUEST_POST('points', $id]),
-                                       REQUEST_POST('infos', $id),
-                                       $id
-                               ), __FILE__, __LINE__);
+                       array(
+                       REQUEST_POST('rallye_id', $id),
+                       bigintval($level),
+                       REQUEST_POST('points', $id),
+                       REQUEST_POST('infos', $id),
+                       $id
+                       ), __FILE__, __LINE__);
                }
 
                // Output message
@@ -117,7 +117,7 @@ VALUES ('%s','%s','%s','%s')",
                        foreach (REQUEST_POST('sel') as $id => $sel) {
                                // Load data to selected rallye
                                $result = SQL_QUERY_ESC("SELECT rallye_id, price_level, points, info FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE `id`=%s LIMIT 1",
-                                       array(bigintval($id)), __FILE__, __LINE__);
+                               array(bigintval($id)), __FILE__, __LINE__);
                                list($rallye, $level, $points, $infos) = SQL_FETCHROW($result);
                                SQL_FREERESULT($result);
 
@@ -156,7 +156,7 @@ VALUES ('%s','%s','%s','%s')",
                        foreach (REQUEST_POST('sel') as $id => $sel) {
                                // Load data to selected rallye
                                $result = SQL_QUERY_ESC("SELECT rallye_id, price_level, points, info FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE `id`=%s LIMIT 1",
-                                       array(bigintval($id)), __FILE__, __LINE__);
+                               array(bigintval($id)), __FILE__, __LINE__);
                                list($rallye, $level, $points, $infos) = SQL_FETCHROW($result);
                                SQL_FREERESULT($result);
 
@@ -190,7 +190,7 @@ 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(REQUEST_GET('rallye'))), __FILE__, __LINE__);
+               array(bigintval(REQUEST_GET('rallye'))), __FILE__, __LINE__);
 
                if (SQL_NUMROWS($result) > 0) {
                        // Load all prices for the selected rallye
index 1c92b3ba2a0820bc228c801840ea7926d347cf1a..f1d578d871c54fae402b041a4afa3b64961a3f12 100644 (file)
@@ -49,7 +49,7 @@ ADD_DESCR('admin', __FILE__);
 if (IS_FORM_SENT()) {
        foreach (REQUEST_POST('sel') as $id => $value) {
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_must_register` SET field_required='%s' WHERE `id`=%s AND field_required != '%s' LIMIT 1",
-                       array($value, bigintval($id), $value),__FILE__, __LINE__);
+               array($value, bigintval($id), $value),__FILE__, __LINE__);
        }
        LOAD_TEMPLATE('admin_settings_saved', false, getMessage('REGISTER_ADMIN_CHANGES_SAVED'));
 }
index d1534963688241593dde8fbbeb44e1ac275a85c3..0118f7e7c2870d2bafc6e89ca33ca0134888b70c 100644 (file)
@@ -53,23 +53,23 @@ if (IS_FORM_SENT()) {
        // Guest stats
        switch (getConfig('guest_stats'))
        {
-       case "MEMBERS":
-               define('__MEMBERS_RADIO', ' selected="selected"');
-               define('__MODULES_RADIO', '');
-               define('__INACTIVE_RADIO', '');
-               break;
+               case "MEMBERS":
+                       define('__MEMBERS_RADIO', ' selected="selected"');
+                       define('__MODULES_RADIO', '');
+                       define('__INACTIVE_RADIO', '');
+                       break;
 
-       case "MODULES":
-               define('__MEMBERS_RADIO', '');
-               define('__MODULES_RADIO', ' selected="selected"');
-               define('__INACTIVE_RADIO', '');
-               break;
+               case "MODULES":
+                       define('__MEMBERS_RADIO', '');
+                       define('__MODULES_RADIO', ' selected="selected"');
+                       define('__INACTIVE_RADIO', '');
+                       break;
 
-       case "INACTIVE":
-               define('__MEMBERS_RADIO', '');
-               define('__MODULES_RADIO', '');
-               define('__INACTIVE_RADIO', ' selected="selected"');
-               break;
+               case "INACTIVE":
+                       define('__MEMBERS_RADIO', '');
+                       define('__MODULES_RADIO', '');
+                       define('__INACTIVE_RADIO', ' selected="selected"');
+                       break;
        }
 
        // Max stats entries per page
index a01e85053562b721fa8b229fb8879d906ca52deb..f1da62aea665cfeb487fecc736f0beca67eeb323 100644 (file)
@@ -50,7 +50,7 @@ if (IS_FORM_SENT())
        // Save settings
        ADMIN_SAVE_SETTINGS_POST();
 }
- else
+else
 {
        // Remember config data in constants for the template
        define('__CFG_TITLE_LEFT'     , getConfig('title_left'));
index 47e5a4d86bb96e6e041c38def990ab8a790d0cce..25ddd963a38ffbb3bca0ac52e4ee3b91ee52a043 100644 (file)
@@ -50,7 +50,7 @@ if (IS_FORM_SENT())
        // Save settings
        ADMIN_SAVE_SETTINGS_POST();
 }
- else
+else
 {
        // Prepare constants for the template
        define('__MAX_VALUE', getConfig('top10_max'));
index b5a3fedd71c5ff454768cc46bf6b145d265dada7..1019bd17cfd76cad4d75991504b083b0a58fc46c 100644 (file)
@@ -49,7 +49,7 @@ $cnt = 0;
 if (REQUEST_ISSET_GET(('mid'))) {
        // Load email data
        $result = SQL_QUERY_ESC("SELECT id, sender, subject, url, timestamp, payment_id FROM `{!_MYSQL_PREFIX!}_pool` WHERE `id`=%s LIMIT 1",
-               array(bigintval(REQUEST_GET('mid'))), __FILE__, __LINE__);
+       array(bigintval(REQUEST_GET('mid'))), __FILE__, __LINE__);
 
        // Delete mail only once
        if (SQL_NUMROWS($result) == 1) {
@@ -82,7 +82,7 @@ if (REQUEST_ISSET_GET(('mid'))) {
 LEFT JOIN `{!_MYSQL_PREFIX!}_pool` AS p
 ON s.pool_id=p.id
 WHERE s.pool_id=%s LIMIT 1",
- array(bigintval(REQUEST_GET('mid'))), __FILE__, __LINE__);
              array(bigintval(REQUEST_GET('mid'))), __FILE__, __LINE__);
                if (SQL_NUMROWS($result_pool) == 1) {
                        // Fetch stats id
                        list($stats_id) = SQL_FETCHROW($result_pool);
@@ -114,12 +114,12 @@ WHERE s.pool_id=%s LIMIT 1",
                                        if (getConfig('repay_deleted_mails') == 'REPAY') {
                                                // Repayed
                                                LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_POINTS_REPAYED'),
-                                                       translateComma($totalPoints)
+                                               translateComma($totalPoints)
                                                ));
                                        } else {
                                                // To jackpot
                                                LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_POINTS_TO_JACKPOT'),
-                                                       translateComma($totalPoints)
+                                               translateComma($totalPoints)
                                                ));
                                        }
                                } else {
@@ -133,7 +133,7 @@ WHERE s.pool_id=%s LIMIT 1",
 
                        // Remove links from DB
                        SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_links` WHERE stats_id=%s",
-                               array(bigintval($stats_id)), __FILE__, __LINE__);
+                       array(bigintval($stats_id)), __FILE__, __LINE__);
                        $cnt += SQL_AFFECTEDROWS();
 
                        // Load template for link
@@ -145,7 +145,7 @@ WHERE s.pool_id=%s LIMIT 1",
 
                // Delete mail from queue
                SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_pool` WHERE `id`=%s LIMIT 1",
-                       array(bigintval(REQUEST_GET('mid'))), __FILE__, __LINE__);
+               array(bigintval(REQUEST_GET('mid'))), __FILE__, __LINE__);
                $cnt += SQL_AFFECTEDROWS();
 
                // Output link for manually removing stats entry
@@ -157,14 +157,14 @@ WHERE s.pool_id=%s LIMIT 1",
 } elseif (REQUEST_ISSET_GET(('pid'))) {
        // Remove stats entries
        SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE pool_id=%s LIMIT 1",
-               array(bigintval(REQUEST_GET('pid'))), __FILE__, __LINE__);
+       array(bigintval(REQUEST_GET('pid'))), __FILE__, __LINE__);
 
        // Output message
        LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_USER_STATS_REMOVED'));
 } elseif ((REQUEST_ISSET_GET(('bid'))) && (EXT_IS_ACTIVE('bonus'))) {
        // Load data from bonus mail
        $result = SQL_QUERY_ESC("SELECT id, subject, url, timestamp, mails_sent FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s",
-               array(bigintval(REQUEST_GET('bid'))), __FILE__, __LINE__);
+       array(bigintval(REQUEST_GET('bid'))), __FILE__, __LINE__);
 
        // Delete mail only once
        if (SQL_NUMROWS($result) == 1) {
@@ -179,10 +179,10 @@ WHERE s.pool_id=%s LIMIT 1",
 
                // Delete bonus mail entirely from database
                SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
-                       array(bigintval(REQUEST_GET('bid'))), __FILE__, __LINE__);
+               array(bigintval(REQUEST_GET('bid'))), __FILE__, __LINE__);
                $cnt += SQL_AFFECTEDROWS();
                SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_links` WHERE bonus_id=%s",
-                       array(bigintval(REQUEST_GET('bid'))), __FILE__, __LINE__);
+               array(bigintval(REQUEST_GET('bid'))), __FILE__, __LINE__);
                $cnt += SQL_AFFECTEDROWS();
 
                // Prepare data for the template
@@ -204,7 +204,7 @@ WHERE s.pool_id=%s LIMIT 1",
 } elseif ((REQUEST_ISSET_GET(('nid'))) && (GET_EXT_VERSION('bonus') >= '0.8.7')) {
        // Load data from bonus mail
        $result = SQL_QUERY_ESC("SELECT id, subject, url, timestamp FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s",
-               array(bigintval(REQUEST_GET('nid'))), __FILE__, __LINE__);
+       array(bigintval(REQUEST_GET('nid'))), __FILE__, __LINE__);
 
        // Delete mail only once
        if (SQL_NUMROWS($result) == 1) {
@@ -217,10 +217,10 @@ WHERE s.pool_id=%s LIMIT 1",
 
                // Delete bonus mail entirely from database
                SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
-                       array(bigintval(REQUEST_GET('nid'))), __FILE__, __LINE__);
+               array(bigintval(REQUEST_GET('nid'))), __FILE__, __LINE__);
                $cnt += SQL_AFFECTEDROWS();
                SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_links` WHERE bonus_id=%s",
-                       array(bigintval(REQUEST_GET('nid'))), __FILE__, __LINE__);
+               array(bigintval(REQUEST_GET('nid'))), __FILE__, __LINE__);
                $cnt += SQL_AFFECTEDROWS();
 
                // Prepare data for the template
index 06b6242446faa0fc5fc50166f1375af8ea66cbf0..9291a2a39fed2939c4c16eba1a68548a760f1afb 100644 (file)
@@ -48,7 +48,7 @@ ADD_DESCR('admin', __FILE__);
 if (REQUEST_ISSET_GET('id')) {
        // Check for selected sponsor
        $result = SQL_QUERY_ESC("SELECT email, gender, surname, family FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE `id`='%s' LIMIT 1",
-               array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
+       array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Remove sponsor
                if (IS_FORM_SENT()) {
@@ -69,11 +69,11 @@ if (REQUEST_ISSET_GET('id')) {
 
                        // Remove account
                        SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE `id`='%s' LIMIT 1",
-                               array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
+                       array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
 
                        // Remove orders
                        SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_sponsor_orders` WHERE sponsorid='%s' LIMIT 1",
-                               array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
+                       array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
 
                        // Output message
                        LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_DELETED'), bigintval(REQUEST_GET('id'))));
index 04f171e199ee916f93ee84d52a5aa4e7658dbb1f..33c375ad5ec2260274b7172a50966873cf8540ea 100644 (file)
@@ -55,9 +55,9 @@ if (REQUEST_ISSET_POST('del')) {
                // Delete entries...
                foreach (REQUEST_POST('sel') as $id => $sel) {
                        ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_transfers_in` WHERE trans_id=%s LIMIT 1",
-                               array(bigintval($id)), __FILE__, __LINE__, false));
+                       array(bigintval($id)), __FILE__, __LINE__, false));
                        ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_transfers_out` WHERE trans_id=%s LIMIT 1",
-                               array(bigintval($id)), __FILE__, __LINE__, false));
+                       array(bigintval($id)), __FILE__, __LINE__, false));
                } // END - foreach
 
                // Run all SQLs
index bc5cde104ab3d454a733fc4342c94d31191f8fb0..400a7292b3b4758c8d403d0af54ddeb384c93f4d 100644 (file)
@@ -49,7 +49,7 @@ ADD_DESCR('admin', __FILE__);
 if ((IS_FORM_SENT()) || ((REQUEST_ISSET_POST('del')) && (REQUEST_ISSET_POST(('reason'))))) {
        // Delete users account
        $result_user = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-               array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+       array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
        if (SQL_NUMROWS($result_user) == 1) {
                // Free memory
                SQL_FREERESULT($result_user);
@@ -72,7 +72,7 @@ if ((IS_FORM_SENT()) || ((REQUEST_ISSET_POST('del')) && (REQUEST_ISSET_POST(('re
 } else {
        // Realy want to delete?
        $result = SQL_QUERY_ESC("SELECT email, surname, family FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-               array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+       array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Load data
                list ($email, $sname, $fname) = SQL_FETCHROW($result);
index 3ac617bee570beab991fef8cfe8b7b1755410868..264bb43b5ca9c6736cb3f7cab93de2b963c80041 100644 (file)
@@ -54,7 +54,7 @@ if (SQL_NUMROWS($result) > 0) {
        if (IS_FORM_SENT()) {
                // Make mail editable...
                $result = SQL_QUERY_ESC("SELECT subject, text, url FROM `{!_MYSQL_PREFIX!}_pool` WHERE `id`=%s LIMIT 1",
-                array(bigintval(REQUEST_POST('id'))), __FILE__, __LINE__);
+               array(bigintval(REQUEST_POST('id'))), __FILE__, __LINE__);
                list($subj, $text, $url) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
                // @TODO More constants to rewrite
@@ -72,12 +72,12 @@ subject='%s',
 text='%s',
 url='%s'
 WHERE `id`=%s LIMIT 1",
- array(
-       REQUEST_POST('subj'),
-       REQUEST_POST('text'),
-       REQUEST_POST('url'),
-       bigintval(REQUEST_POST('id')),
-), __FILE__, __LINE__);
              array(
+               REQUEST_POST('subj'),
+               REQUEST_POST('text'),
+               REQUEST_POST('url'),
+               bigintval(REQUEST_POST('id')),
+               ), __FILE__, __LINE__);
 
                if (SQL_AFFECTEDROWS() == 1) {
                        $content = getMessage('SETTINGS_SAVED');
index 747d4728a58412ea065d18dca6cf4059eae61488..64b052ff662f09f0f9c184c3c3c5cf8da517f7e7 100644 (file)
@@ -48,7 +48,7 @@ ADD_DESCR('admin', __FILE__);
 if ((REQUEST_ISSET_GET('id')) && (REQUEST_ISSET_GET(('mode')))) {
        // Check for selected sponsor
        $result = SQL_QUERY_ESC("SELECT company, position, gender, surname, family, street_nr1, street_nr2, zip, city, country, phone, fax, cell, email, url, tax_ident, receive_warnings, warning_interval FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE `id`='%s' LIMIT 1",
-        array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
+       array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Load sponsor details
                $DATA = SQL_FETCHARRAY($result);
@@ -64,23 +64,23 @@ if ((REQUEST_ISSET_GET('id')) && (REQUEST_ISSET_GET(('mode')))) {
                //  Personal data
                switch ($DATA['gender'])
                {
-               case "M":
-                       define('__GENDER_M', ' selected="selected"');
-                       define('__GENDER_F', '');
-                       define('__GENDER_C', '');
-                       break;
-
-               case "F":
-                       define('__GENDER_M', '');
-                       define('__GENDER_F', ' selected="selected"');
-                       define('__GENDER_C', '');
-                       break;
-
-               case "C":
-                       define('__GENDER_M', '');
-                       define('__GENDER_F', '');
-                       define('__GENDER_C', ' selected="selected"');
-                       break;
+                       case "M":
+                               define('__GENDER_M', ' selected="selected"');
+                               define('__GENDER_F', '');
+                               define('__GENDER_C', '');
+                               break;
+
+                       case "F":
+                               define('__GENDER_M', '');
+                               define('__GENDER_F', ' selected="selected"');
+                               define('__GENDER_C', '');
+                               break;
+
+                       case "C":
+                               define('__GENDER_M', '');
+                               define('__GENDER_F', '');
+                               define('__GENDER_C', ' selected="selected"');
+                               break;
                }
                define('__SURNAME'    , $DATA['surname']);
                define('__FAMILY'     , $DATA['family']);
@@ -108,83 +108,83 @@ if ((REQUEST_ISSET_GET('id')) && (REQUEST_ISSET_GET(('mode')))) {
                        // Perform action on mode
                        switch (REQUEST_GET('mode'))
                        {
-                       case "add_points": // Add points
-                               if (strval(REQUEST_POST('points')) > 0) {
-                                       // Replace german decimal comma with computer's decimal dot
-                                       $POINTS = strval(convertCommaToDot(REQUEST_POST('points')));
+                               case "add_points": // Add points
+                                       if (strval(REQUEST_POST('points')) > 0) {
+                                               // Replace german decimal comma with computer's decimal dot
+                                               $POINTS = strval(convertCommaToDot(REQUEST_POST('points')));
 
-                                       // Add points to account
-                                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET points_amount=points_amount+%s WHERE `id`='%s' LIMIT 1",
+                                               // Add points to account
+                                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET points_amount=points_amount+%s WHERE `id`='%s' LIMIT 1",
                                                array($POINTS, bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
 
-                                       // Remember points /reason for the template
-                                       define('__POINTS' , translateComma($POINTS));
-                                       define('__REASON' , REQUEST_POST('reason'));
-
-                                       // Send email
-                                       $msg = LOAD_EMAIL_TEMPLATE("sponsor_add_points", REQUEST_POST('reason'), true);
-                                       sendEmail(__EMAIL, ADMIN_SPONSOR_ADD_POINTS_SUBJ, $msg);
-                                       $message = ADMIN_SPONSOR_POINTS_ADDED;
-                               } else {
-                                       // No points entered to add!
-                                       $message = ADMIN_SPONSPOR_NO_POINTS_TO_ADD;
-                               }
-                               break;
-
-                       case "sub_points": // Subtract points
-                               if (strval(REQUEST_POST('points')) > 0) {
-                                       // Replace german decimal comma with computer's decimal dot
-                                       $POINTS = strval(convertCommaToDot(REQUEST_POST('points')));
-
-                                       // Add points to account
-                                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET points_used=points_used+%s WHERE `id`='%s' LIMIT 1",
+                                               // Remember points /reason for the template
+                                               define('__POINTS' , translateComma($POINTS));
+                                               define('__REASON' , REQUEST_POST('reason'));
+
+                                               // Send email
+                                               $msg = LOAD_EMAIL_TEMPLATE("sponsor_add_points", REQUEST_POST('reason'), true);
+                                               sendEmail(__EMAIL, ADMIN_SPONSOR_ADD_POINTS_SUBJ, $msg);
+                                               $message = ADMIN_SPONSOR_POINTS_ADDED;
+                                       } else {
+                                               // No points entered to add!
+                                               $message = ADMIN_SPONSPOR_NO_POINTS_TO_ADD;
+                                       }
+                                       break;
+
+                               case "sub_points": // Subtract points
+                                       if (strval(REQUEST_POST('points')) > 0) {
+                                               // Replace german decimal comma with computer's decimal dot
+                                               $POINTS = strval(convertCommaToDot(REQUEST_POST('points')));
+
+                                               // Add points to account
+                                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET points_used=points_used+%s WHERE `id`='%s' LIMIT 1",
                                                array($POINTS, bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
 
-                                       // Remember points /reason for the template
-                                       define('__POINTS' , translateComma($POINTS));
-                                       define('__REASON' , REQUEST_POST('reason'));
-
-                                       // Send email
-                                       $msg = LOAD_EMAIL_TEMPLATE("sponsor_sub_points", REQUEST_POST('reason'), true);
-                                       sendEmail(__EMAIL, ADMIN_SPONSOR_SUB_POINTS_SUBJ, $msg);
-                                       $message = ADMIN_SPONSOR_POINTS_SUBTRACTED;
-                               } else {
-                                       // No points entered to add!
-                                       $message = ADMIN_SPONSPOR_NO_POINTS_TO_SUBTRACT;
-                               }
-                               break;
-
-                       case 'edit': // Edit sponsor account
-                               $PASS = true;
-                               if ((REQUEST_POST('pass1') != REQUEST_POST('pass2')) || ((!REQUEST_ISSET_POST(('pass1'))) && (!REQUEST_ISSET_POST(('pass1'))))) {
-                                       // Remove passwords
-                                       REQUEST_UNSET_POST(('pass1'));
-                                       REQUEST_UNSET_POST(('pass2'));
-                                       $PASS = false;
-                               }
-
-                               // Convert time selection
-                               $DATA = array(); $id = "warning_interval_ye"; $skip = false;
-                               convertSelectionsToTimestamp(REQUEST_POST_ARRAY(), $DATA, $id, $skip);
-
-                               // Save the sponsor
-                               SPONSOR_HANDLE_SPONSOR(REQUEST_POST_ARRAY());
-
-                               // Convert some data for the email template
-                               REQUEST_POST('gender'          , translateGender(REQUEST_POST('gender')));
-                               REQUEST_POST('warning_interval', createFancyTime(REQUEST_POST('warning_interval')));
-
-                               if (!$PASS) REQUEST_SET_POST('pass1', getMessage('SPONSOR_PASS_UNCHANGED'));
-
-                               // Load email template and send the mail away
-                               $msg = LOAD_EMAIL_TEMPLATE("admin_sponsor_edit", REQUEST_POST_ARRAY(), false);
-                               sendEmail(REQUEST_POST('email'), getMessage('ADMIN_SPONSOR_EDIT_SUBJECT'), $msg);
-                               break;
-
-                       default: // Unknown mode
-                               DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown mode %s detected.", REQUEST_GET('mode')));
-                               $message = sprintf(getMessage('ADMIN_SPONSOR_INVALID_MODE'), REQUEST_GET(('mode')));
-                               break;
+                                               // Remember points /reason for the template
+                                               define('__POINTS' , translateComma($POINTS));
+                                               define('__REASON' , REQUEST_POST('reason'));
+
+                                               // Send email
+                                               $msg = LOAD_EMAIL_TEMPLATE("sponsor_sub_points", REQUEST_POST('reason'), true);
+                                               sendEmail(__EMAIL, ADMIN_SPONSOR_SUB_POINTS_SUBJ, $msg);
+                                               $message = ADMIN_SPONSOR_POINTS_SUBTRACTED;
+                                       } else {
+                                               // No points entered to add!
+                                               $message = ADMIN_SPONSPOR_NO_POINTS_TO_SUBTRACT;
+                                       }
+                                       break;
+
+                               case 'edit': // Edit sponsor account
+                                       $PASS = true;
+                                       if ((REQUEST_POST('pass1') != REQUEST_POST('pass2')) || ((!REQUEST_ISSET_POST(('pass1'))) && (!REQUEST_ISSET_POST(('pass1'))))) {
+                                               // Remove passwords
+                                               REQUEST_UNSET_POST(('pass1'));
+                                               REQUEST_UNSET_POST(('pass2'));
+                                               $PASS = false;
+                                       }
+
+                                       // Convert time selection
+                                       $DATA = array(); $id = "warning_interval_ye"; $skip = false;
+                                       convertSelectionsToTimestamp(REQUEST_POST_ARRAY(), $DATA, $id, $skip);
+
+                                       // Save the sponsor
+                                       SPONSOR_HANDLE_SPONSOR(REQUEST_POST_ARRAY());
+
+                                       // Convert some data for the email template
+                                       REQUEST_POST('gender'          , translateGender(REQUEST_POST('gender')));
+                                       REQUEST_POST('warning_interval', createFancyTime(REQUEST_POST('warning_interval')));
+
+                                       if (!$PASS) REQUEST_SET_POST('pass1', getMessage('SPONSOR_PASS_UNCHANGED'));
+
+                                       // Load email template and send the mail away
+                                       $msg = LOAD_EMAIL_TEMPLATE("admin_sponsor_edit", REQUEST_POST_ARRAY(), false);
+                                       sendEmail(REQUEST_POST('email'), getMessage('ADMIN_SPONSOR_EDIT_SUBJECT'), $msg);
+                                       break;
+
+                               default: // Unknown mode
+                                       DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown mode %s detected.", REQUEST_GET('mode')));
+                                       $message = sprintf(getMessage('ADMIN_SPONSOR_INVALID_MODE'), REQUEST_GET(('mode')));
+                                       break;
                        }
 
                        if (!empty($message)) {
index b81215da76fb47a11e678d188f9034083e5e6df4..e8d3fbd99fc77b95ddd540922bca45de037017f3 100644 (file)
@@ -53,7 +53,7 @@ if (REQUEST_ISSET_GET('uid')) {
 FROM `{!_MYSQL_PREFIX!}_user_data`
 WHERE userid=%s
 LIMIT 1",
-               array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+       array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
 }
 
 if ((SQL_NUMROWS($result_main) == 1) || (!REQUEST_ISSET_GET('uid')))
@@ -64,7 +64,7 @@ if ((SQL_NUMROWS($result_main) == 1) || (!REQUEST_ISSET_GET('uid')))
                // Output selection form with all confirmed user accounts listed
                ADD_MEMBER_SELECTION_BOX();
        }
-        elseif (REQUEST_ISSET_POST('edit'))
+       elseif (REQUEST_ISSET_POST('edit'))
        {
                // Ok, change the account...
                $PASS = false; $add = '';
@@ -73,7 +73,7 @@ if ((SQL_NUMROWS($result_main) == 1) || (!REQUEST_ISSET_GET('uid')))
                        // Don't change the password
                        $PASS = true;
                }
-                elseif ((REQUEST_POST('pass1') == REQUEST_POST('pass2')))
+               elseif ((REQUEST_POST('pass1') == REQUEST_POST('pass2')))
                {
                        // Change the password
                        $PASS = true;
@@ -93,20 +93,20 @@ city='%s',
 email='%s'
 ".$add."
 WHERE userid=%s LIMIT 1",
- array(
-       substr(REQUEST_POST('gender'), 0, 1),
-       REQUEST_POST('surname'),
-       REQUEST_POST('family'),
-       REQUEST_POST('street_nr'),
-       REQUEST_POST('country'),
-       bigintval(REQUEST_POST('zip')),
-       REQUEST_POST('city'),
-       REQUEST_POST('email'),
-       bigintval(REQUEST_GET('uid')),
-), __FILE__, __LINE__);
                      array(
+                       substr(REQUEST_POST('gender'), 0, 1),
+                       REQUEST_POST('surname'),
+                       REQUEST_POST('family'),
+                       REQUEST_POST('street_nr'),
+                       REQUEST_POST('country'),
+                       bigintval(REQUEST_POST('zip')),
+                       REQUEST_POST('city'),
+                       REQUEST_POST('email'),
+                       bigintval(REQUEST_GET('uid')),
+                       ), __FILE__, __LINE__);
                        $content = USER_ACCOUNT_SAVED;
                }
-                else
+               else
                {
                        // Problem while saving data
                        $content = USER_ACCOUNT_NOT_SAVED;
@@ -115,7 +115,7 @@ WHERE userid=%s LIMIT 1",
                // Load template
                LOAD_TEMPLATE('admin_settings_saved', false, $content);
        }
-        else
+       else
        {
                // Display form to edit
                list($gender, $surname, $family, $street, $zip, $city, $country, $email, $bday, $bmonth, $byear, $max) = SQL_FETCHROW($result_main);
@@ -124,23 +124,23 @@ WHERE userid=%s LIMIT 1",
                // Transfer data to constants for the template
                switch ($gender)
                {
-               case "M":
-                       define('_GENDER_M', ' selected="selected"');
-                       define('_GENDER_F', '');
-                       define('_GENDER_C', '');
-                       break;
+                       case "M":
+                               define('_GENDER_M', ' selected="selected"');
+                               define('_GENDER_F', '');
+                               define('_GENDER_C', '');
+                               break;
 
-               case "F":
-                       define('_GENDER_M', '');
-                       define('_GENDER_F', ' selected="selected"');
-                       define('_GENDER_C', '');
-                       break;
+                       case "F":
+                               define('_GENDER_M', '');
+                               define('_GENDER_F', ' selected="selected"');
+                               define('_GENDER_C', '');
+                               break;
 
-               case "C":
-                       define('_GENDER_M', '');
-                       define('_GENDER_F', '');
-                       define('_GENDER_C', ' selected="selected"');
-                       break;
+                       case "C":
+                               define('_GENDER_M', '');
+                               define('_GENDER_F', '');
+                               define('_GENDER_C', ' selected="selected"');
+                               break;
                }
 
                define('_SURNAME', $surname); define('_FAMILY', $family); define('_CITY'     , $city);
index f86d378d2e4a9093dc9f4776eeac596acfc8b157..cc64a19bff1cafa304bed4d8f9b1b873e3d18ecc 100644 (file)
@@ -87,7 +87,7 @@ if (SQL_NUMROWS($result) > 0) {
        while ($pool = SQL_FETCHROW($result)) {
                // Check sent mails and clicks
                $result_mails = SQL_QUERY_ESC("SELECT max_rec, clicks FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE pool_id=%s LIMIT 1",
-                       array(bigintval($pool[0])), __FILE__, __LINE__);
+               array(bigintval($pool[0])), __FILE__, __LINE__);
                list($sent, $clicks) = SQL_FETCHROW($result_mails);
                SQL_FREERESULT($result_mails);
 
index 8fc1566d93ba306bd814d24a2b76f38eb9ce853f..0b2fe94e44d0d9a6514b5accc1f2e8bd598656b1 100644 (file)
@@ -145,7 +145,7 @@ if (SQL_NUMROWS($result_list) > 0) {
        while ($pool = SQL_FETCHARRAY($result_list)) {
                // Unconfirmed mails and sent mails
                $result_uncon = SQL_QUERY_ESC("SELECT max_rec, clicks FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE pool_id=%s LIMIT 1",
-                array(bigintval($pool['id'])), __FILE__, __LINE__);
+               array(bigintval($pool['id'])), __FILE__, __LINE__);
                list($pool['sent_email'], $pool['clicks']) = SQL_FETCHROW($result_uncon);
                SQL_FREERESULT($result_uncon);
 
index 53abc64888c001907ff674f046df8056df910226..cd21e9208ed5d91222f58002163b5ec3660829d4 100644 (file)
@@ -65,7 +65,7 @@ if (REQUEST_ISSET_GET(('reg_ext'))) {
                        $ACT = 'N'; $EXT_LOAD_MODE = 'deactivate';
                        if ($active == 'N') { $ACT = 'Y'; $EXT_LOAD_MODE = 'activate'; }
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET `ext_active`='".$ACT."' WHERE `id`=%s AND `ext_active`='%s' LIMIT 1",
-                               array(bigintval($ext_id), $active), __FILE__, __LINE__);
+                       array(bigintval($ext_id), $active), __FILE__, __LINE__);
 
                        // Run embeded SQL commands
                        EXTENSION_RUN_SQLS($ext_id, $EXT_LOAD_MODE);
@@ -92,11 +92,11 @@ if (REQUEST_ISSET_GET(('reg_ext'))) {
                                if (GET_EXT_VERSION('sql_patches') >= '0.0.6') {
                                        // Update also CSS column when extensions sql_patches is newer or exact v0.0.6
                                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='%s', `ext_active`='%s' WHERE `id`=%s LIMIT 1",
-                                               array(REQUEST_POST('css', $ext_id), $active, $ext_id), __FILE__, __LINE__);
+                                       array(REQUEST_POST('css', $ext_id), $active, $ext_id), __FILE__, __LINE__);
                                } else {
                                        // When extension is older than v0.0.6 there is no column for the CSS information
                                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET `ext_active`='%s' WHERE `id`=%s LIMIT 1",
-                                               array($active, $ext_id), __FILE__, __LINE__);
+                                       array($active, $ext_id), __FILE__, __LINE__);
                                }
 
                                // Run SQLs on activation / deactivation
@@ -121,12 +121,12 @@ if (REQUEST_ISSET_GET(('reg_ext'))) {
                                // Load required data
                                if (GET_EXT_VERSION('sql_patches') >= '0.0.6') {
                                        $result = SQL_QUERY_ESC("SELECT ext_name, ext_has_css, ext_active FROM `{!_MYSQL_PREFIX!}_extensions` WHERE `id`=%s LIMIT 1",
-                                        array(bigintval($ext_id)), __FILE__, __LINE__);
+                                       array(bigintval($ext_id)), __FILE__, __LINE__);
                                        list($name, $css, $active) = SQL_FETCHROW($result);
                                        SQL_FREERESULT($result);
                                } else {
                                        $result = SQL_QUERY_ESC("SELECT ext_name, ext_active FROM `{!_MYSQL_PREFIX!}_extensions` WHERE `id`=%s LIMIT 1",
-                                        array(bigintval($ext_id)), __FILE__, __LINE__);
+                                       array(bigintval($ext_id)), __FILE__, __LINE__);
                                        list($name, $active) = SQL_FETCHROW($result);
                                        SQL_FREERESULT($result);
                                        $css = "X";
@@ -230,32 +230,32 @@ if (REQUEST_ISSET_GET(('active'))) {
 
 // Case selection
 switch ($do) {
-case "overview": // List all registered extensions
-       if (GET_EXT_VERSION('sql_patches') >= '0.0.6') {
-               // Load extension data with CSS informations
-               $result = SQL_QUERY("SELECT id AS ext_id, ext_name, ext_active, ext_has_css AS ext_css, ext_version
+       case "overview": // List all registered extensions
+               if (GET_EXT_VERSION('sql_patches') >= '0.0.6') {
+                       // Load extension data with CSS informations
+                       $result = SQL_QUERY("SELECT id AS ext_id, ext_name, ext_active, ext_has_css AS ext_css, ext_version
 FROM `{!_MYSQL_PREFIX!}_extensions`
 ".$where."
 ORDER BY ext_name", __FILE__, __LINE__);
-       } else {
-               // Load extension data without CSS informations
-               $result = SQL_QUERY("SELECT id AS ext_id, ext_name, ext_active, id, ext_version
+               } else {
+                       // Load extension data without CSS informations
+                       $result = SQL_QUERY("SELECT id AS ext_id, ext_name, ext_active, id, ext_version
 FROM `{!_MYSQL_PREFIX!}_extensions`
 ".$where."
 ORDER BY ext_name", __FILE__, __LINE__);
-       }
+               }
 
-       // Are there some entries?
-       if (SQL_NUMROWS($result) > 0) {
-               // Extensions are registered
-               $OUT = ''; $SW = 2;
-               while ($content = SQL_FETCHARRAY($result)) {
-                       // Prepare CSS selection output
-                       $cssSelection = '---';
-                       if (GET_EXT_VERSION('sql_patches') >= '0.0.6') $cssSelection = translateYesNo($content['ext_css']);
-
-                       // Prepare data for the row template
-                       $content = array(
+               // Are there some entries?
+               if (SQL_NUMROWS($result) > 0) {
+                       // Extensions are registered
+                       $OUT = ''; $SW = 2;
+                       while ($content = SQL_FETCHARRAY($result)) {
+                               // Prepare CSS selection output
+                               $cssSelection = '---';
+                               if (GET_EXT_VERSION('sql_patches') >= '0.0.6') $cssSelection = translateYesNo($content['ext_css']);
+
+                               // Prepare data for the row template
+                               $content = array(
                                'sw'      => $SW,
                                'id'      => $content['ext_id'],
                                'name'    => $content['ext_name'],
@@ -263,107 +263,107 @@ ORDER BY ext_name", __FILE__, __LINE__);
                                'act_val' => $content['ext_active'],
                                'css'     => $cssSelection,
                                'ver'     => $content['ext_version'],
-                       );
+                               );
 
-                       // Load row template and switch color
-                       $OUT .= LOAD_TEMPLATE("admin_extensions_row", true, $content);
-                       $SW = 3 - $SW;
-               }
+                               // Load row template and switch color
+                               $OUT .= LOAD_TEMPLATE("admin_extensions_row", true, $content);
+                               $SW = 3 - $SW;
+                       }
 
-               // Free memory
-               SQL_FREERESULT($result);
+                       // Free memory
+                       SQL_FREERESULT($result);
 
-               // Remember rows in constant for the template
-               define('__EXT_ROWS', $OUT);
+                       // Remember rows in constant for the template
+                       define('__EXT_ROWS', $OUT);
 
-               // Load template
-               LOAD_TEMPLATE("admin_extensions");
-       } else {
-               // No extensions are registered
-               LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NO_EXTENSION_REGISTERED'));
-       }
-       break;
+                       // Load template
+                       LOAD_TEMPLATE("admin_extensions");
+               } else {
+                       // No extensions are registered
+                       LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NO_EXTENSION_REGISTERED'));
+               }
+               break;
 
-case 'register': // Register new extension
-       $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_task_system` WHERE `assigned_admin`=%s AND `task_type`='EXTENSION' LIMIT 1",
+       case 'register': // Register new extension
+               $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_task_system` WHERE `assigned_admin`=%s AND `task_type`='EXTENSION' LIMIT 1",
                array(getCurrentAdminId()), __FILE__, __LINE__);
-       $task_found = SQL_NUMROWS($result);
-
-       // Free result
-       SQL_FREERESULT($result);
+               $task_found = SQL_NUMROWS($result);
 
-       // Is the ID number valid and the task was found?
-       if (($ext_id > 0) && ($task_found == 1)) {
-               // ID is valid so begin with registration, we first want to it's real name from task management (subject column)
-               $result = SQL_QUERY_ESC("SELECT subject FROM `{!_MYSQL_PREFIX!}_task_system` WHERE `id`=%s LIMIT 1",
-                       array(bigintval($ext_id)), __FILE__, __LINE__);
-               list($subj) = SQL_FETCHROW($result);
+               // Free result
                SQL_FREERESULT($result);
 
-               // Disable cache update by default
-               $cache_update = 0;
-               if (!empty($subj)) {
-                       // Extract extension's name from subject...
-                       $ext_name = trim(substr($subj, 1, strpos($subj, ':') - 1));
-
-                       // Test the extension for deprecation
-                       LOAD_EXTENSION($ext_name, 'test');
-
-                       // Is the extension deprecated?
-                       if (EXT_GET_DEPRECATED() == 'N') {
-                               // ... so we can finally register and load it in registration mode
-                               if (REGISTER_EXTENSION($ext_name, $ext_id)) {
-                                       // Extension was found and successfully registered
-                                       LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_EXTENSION_REGISTERED'));
-
-                                       // Show next link
-                                       if (EXT_IS_ACTIVE('task')) {
-                                               LOAD_TEMPLATE('admin_next_link', false, array(
+               // Is the ID number valid and the task was found?
+               if (($ext_id > 0) && ($task_found == 1)) {
+                       // ID is valid so begin with registration, we first want to it's real name from task management (subject column)
+                       $result = SQL_QUERY_ESC("SELECT subject FROM `{!_MYSQL_PREFIX!}_task_system` WHERE `id`=%s LIMIT 1",
+                       array(bigintval($ext_id)), __FILE__, __LINE__);
+                       list($subj) = SQL_FETCHROW($result);
+                       SQL_FREERESULT($result);
+
+                       // Disable cache update by default
+                       $cache_update = 0;
+                       if (!empty($subj)) {
+                               // Extract extension's name from subject...
+                               $ext_name = trim(substr($subj, 1, strpos($subj, ':') - 1));
+
+                               // Test the extension for deprecation
+                               LOAD_EXTENSION($ext_name, 'test');
+
+                               // Is the extension deprecated?
+                               if (EXT_GET_DEPRECATED() == 'N') {
+                                       // ... so we can finally register and load it in registration mode
+                                       if (REGISTER_EXTENSION($ext_name, $ext_id)) {
+                                               // Extension was found and successfully registered
+                                               LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_EXTENSION_REGISTERED'));
+
+                                               // Show next link
+                                               if (EXT_IS_ACTIVE('task')) {
+                                                       LOAD_TEMPLATE('admin_next_link', false, array(
                                                        'url'   => 'modules.php?module=admin&amp;what=list_task',
                                                        'title' => getMessage('ADMIN_EXT_REGISTER_NEXT_LINK')
-                                               ));
-                                       } else {
-                                               LOAD_TEMPLATE('admin_next_link', false, array(
+                                                       ));
+                                               } else {
+                                                       LOAD_TEMPLATE('admin_next_link', false, array(
                                                        'url'   => 'modules.php?module=admin',
                                                        'title' => getMessage('ADMIN_EXT_REGISTER_NEXT_LINK')
-                                               ));
+                                                       ));
+                                               }
+
+                                               // Do we need to update cache file?
+                                               // @TODO Rewrite this to a filter
+                                               if ((EXT_IS_ACTIVE('cache')) && ($GLOBALS['cache_mode'] != 'no')) {
+                                                       // Remove cache file (will be auto-created again!)
+                                                       if ($GLOBALS['cache_instance']->loadCacheFile('config')) $GLOBALS['cache_instance']->destroyCacheFile();
+                                                       if ($GLOBALS['cache_instance']->loadCacheFile('extensions', true)) $GLOBALS['cache_instance']->destroyCacheFile();
+                                                       if ($GLOBALS['cache_instance']->loadCacheFile('modreg')) $GLOBALS['cache_instance']->destroyCacheFile();
+                                               } // END - if
+                                       } elseif (GET_EXT_VERSION($ext_name) != '') {
+                                               // Notify the admin that we have a problem here...
+                                               LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_ALREADY'));
+                                       } else {
+                                               // Notify the admin that we have a problem here...
+                                               LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_REG_FAILED_404'), $ext_name));
                                        }
-
-                                       // Do we need to update cache file?
-                                       // @TODO Rewrite this to a filter
-                                       if ((EXT_IS_ACTIVE('cache')) && ($GLOBALS['cache_mode'] != 'no')) {
-                                               // Remove cache file (will be auto-created again!)
-                                               if ($GLOBALS['cache_instance']->loadCacheFile('config')) $GLOBALS['cache_instance']->destroyCacheFile();
-                                               if ($GLOBALS['cache_instance']->loadCacheFile('extensions', true)) $GLOBALS['cache_instance']->destroyCacheFile();
-                                               if ($GLOBALS['cache_instance']->loadCacheFile('modreg')) $GLOBALS['cache_instance']->destroyCacheFile();
-                                       } // END - if
-                               } elseif (GET_EXT_VERSION($ext_name) != '') {
-                                       // Notify the admin that we have a problem here...
-                                       LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_ALREADY'));
                                } else {
-                                       // Notify the admin that we have a problem here...
-                                       LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_REG_FAILED_404'), $ext_name));
+                                       // Motify the admin that we have a problem here...
+                                       LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_DEPRECATED'));
                                }
                        } else {
-                               // Motify the admin that we have a problem here...
-                               LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_DEPRECATED'));
+                               // Extension was not found in task management
+                               LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_ID_404'));
                        }
+               } elseif ($task_found == '0') {
+                       // No longer assigned or old task
+                       LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_ASSIGED'));
                } else {
-                       // Extension was not found in task management
-                       LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_ID_404'));
+                       // ID is invalid
+                       LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_INVALID'));
                }
-       } elseif ($task_found == '0') {
-               // No longer assigned or old task
-               LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_ASSIGED'));
-       } else {
-               // ID is invalid
-               LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_INVALID'));
-       }
-       break;
+               break;
 
-case 'demo':
-       LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_NOT_SAVED'));
-       break;
+       case 'demo':
+               LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_NOT_SAVED'));
+               break;
 }
 //
 ?>
index f75c256fb5b5e0c76d361d49f50c97ce2890e58c..fbee30723a5f56792486df2ed194c56b58b5e824 100644 (file)
@@ -96,7 +96,7 @@ if (!IS_FORM_SENT()) {
                        $result = SQL_QUERY_ESC("SELECT what, title, sort
 FROM `{!_MYSQL_PREFIX!}_guest_menu`
 WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
-                               array($value_main), __FILE__, __LINE__);
+                       array($value_main), __FILE__, __LINE__);
                        if (SQL_NUMROWS($result) > 0) {
                                // Initialize arrays
                                $menus[$value_main] = array();
@@ -168,23 +168,23 @@ WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
        // Insert new menu entry
        if (REQUEST_ISSET_POST(('menu'))) {
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('%s','%s','%s','%s','%s','%s')",
- array(
-       REQUEST_POST('menu'),
-       REQUEST_POST('name'),
-       REQUEST_POST('title'),
-       bigintval(REQUEST_POST('sort')),
-       REQUEST_POST('visible'),
-       REQUEST_POST('active'),
-), __FILE__, __LINE__);
              array(
+               REQUEST_POST('menu'),
+               REQUEST_POST('name'),
+               REQUEST_POST('title'),
+               bigintval(REQUEST_POST('sort')),
+               REQUEST_POST('visible'),
+               REQUEST_POST('active'),
+               ), __FILE__, __LINE__);
        } else {
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (action, title, sort, visible, locked) VALUES ('%s','%s','%s','%s','%s')",
- array(
-       REQUEST_POST('name'),
-       REQUEST_POST('title'),
-       bigintval(REQUEST_POST('sort')),
-       REQUEST_POST('visible'),
-       REQUEST_POST('active'),
-), __FILE__, __LINE__);
              array(
+               REQUEST_POST('name'),
+               REQUEST_POST('title'),
+               bigintval(REQUEST_POST('sort')),
+               REQUEST_POST('visible'),
+               REQUEST_POST('active'),
+               ), __FILE__, __LINE__);
        }
        LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
 } else {
index 64ee46891adf94a714adc01c078e9187c66a55b0..fdab16c8b601170e6be1a3bb8c6131e095fa5cdf 100644 (file)
@@ -71,7 +71,7 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO()))
                {
                        $cnt++;
                        $result = SQL_QUERY_ESC("SELECT title, action, what FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE ".$AND." AND id=%s LIMIT 1",
-                        array(bigintval($sel)), __FILE__, __LINE__);
+                       array(bigintval($sel)), __FILE__, __LINE__);
                        if (SQL_NUMROWS($result) == 1)
                        {
                                // Entry found so we load the stuff...
@@ -87,7 +87,7 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO()))
                                );
                                $OUT .= LOAD_TEMPLATE("admin_gmenu_edit_row", true, $DATA);
                        }
-                        else
+                       else
                        {
                                // Entry not found?
                                $content = array(
@@ -114,7 +114,7 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO()))
                if ($confirm == 1) {
                        $cnt++;
                        $result = SQL_QUERY_ESC("SELECT title FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE ".$AND." AND id=%s LIMIT 1",
-                               array(bigintval($sel)), __FILE__, __LINE__);
+                       array(bigintval($sel)), __FILE__, __LINE__);
                        if (SQL_NUMROWS($result) == 1) {
                                // Entry found so we load the stuff...
                                list($menu) = SQL_FETCHROW($result);
@@ -146,44 +146,44 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO()))
        // An action is done...
        switch (REQUEST_POST('ok'))
        {
-       case 'edit': // Edit menu
-               foreach (REQUEST_POST('sel') as $sel => $menu) {
-                       // Secure selector
-                       $sel = bigintval($sel);
+               case 'edit': // Edit menu
+                       foreach (REQUEST_POST('sel') as $sel => $menu) {
+                               // Secure selector
+                               $sel = bigintval($sel);
 
-                       // Update entry
-                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `title`='%s', `action`='%s', `what`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+                               // Update entry
+                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `title`='%s', `action`='%s', `what`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
                                array($menu, REQUEST_POST('sel_action', $sel), REQUEST_POST('sel_what', $sel), $sel),__FILE__, __LINE__);
-               }
-               LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
-               break;
+                       }
+                       LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
+                       break;
 
-       case 'del': // Delete menu
-               foreach (REQUEST_POST('sel') as $sel => $menu) {
-                       // Delete enty
-                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE ".$AND." AND id=%s LIMIT 1",
+               case 'del': // Delete menu
+                       foreach (REQUEST_POST('sel') as $sel => $menu) {
+                               // Delete enty
+                               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE ".$AND." AND id=%s LIMIT 1",
                                array(bigintval($sel)), __FILE__, __LINE__);
-               }
-               LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
-               break;
+                       }
+                       LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
+                       break;
 
-       case 'status': // Change access levels
-               foreach (REQUEST_POST('sel') as $sel => $menu) {
-                       // Secure selector
-                       $sel = bigintval($sel);
+               case 'status': // Change access levels
+                       foreach (REQUEST_POST('sel') as $sel => $menu) {
+                               // Secure selector
+                               $sel = bigintval($sel);
 
-                       // Update entry
-                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='%s', `locked`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+                               // Update entry
+                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='%s', `locked`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
                                array(REQUEST_POST('visible', $sel), REQUEST_POST('locked', $sel), $sel), __FILE__, __LINE__);
-               }
-               LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
-               break;
+                       }
+                       LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
+                       break;
 
-       default: // Unexpected action
-               define('__OK_VALUE', REQUEST_POST('ok'));
-               DEBUG_LOG(__FILE__, __LINE__, sprintf("Unsupported action %s detected.", REQUEST_POST('ok')));
-               LOAD_TEMPLATE("admin_menu_unknown_okay");
-               break;
+               default: // Unexpected action
+                       define('__OK_VALUE', REQUEST_POST('ok'));
+                       DEBUG_LOG(__FILE__, __LINE__, sprintf("Unsupported action %s detected.", REQUEST_POST('ok')));
+                       LOAD_TEMPLATE("admin_menu_unknown_okay");
+                       break;
        }
 } elseif ((REQUEST_ISSET_POST(('status'))) && ($chk > 0) && (!IS_DEMO())) {
        // Change status (visible / locked)
@@ -198,7 +198,7 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO()))
                {
                        $cnt++;
                        $result = SQL_QUERY_ESC("SELECT title, visible, locked FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE ".$AND." AND id=%s LIMIT 1",
-                        array(bigintval($sel)), __FILE__, __LINE__);
+                       array(bigintval($sel)), __FILE__, __LINE__);
                        if (SQL_NUMROWS($result) == 1)
                        {
                                // Entry found so we load the stuff...
@@ -216,7 +216,7 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO()))
                                // Load template
                                $OUT .= LOAD_TEMPLATE("admin_menu_status_row", true, $content);
                        }
-                        else
+                       else
                        {
                                // Entry not found?
                                $content = array(
@@ -239,21 +239,21 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO()))
                if (REQUEST_ISSET_GET(('w'))) {
                        // Sub menus selected
                        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1",
-                        array(REQUEST_GET('act'), bigintval(REQUEST_GET('tid'))), __FILE__, __LINE__);
+                       array(REQUEST_GET('act'), bigintval(REQUEST_GET('tid'))), __FILE__, __LINE__);
                        list($tid) = SQL_FETCHROW($result);
                        SQL_FREERESULT($result);
                        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1",
-                        array(REQUEST_GET('act'), bigintval(REQUEST_GET('fid'))), __FILE__, __LINE__);
+                       array(REQUEST_GET('act'), bigintval(REQUEST_GET('fid'))), __FILE__, __LINE__);
                        list($fid) = SQL_FETCHROW($result);
                        SQL_FREERESULT($result);
                } else {
                        // Main menu selected
                        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE (`what`='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1",
-                        array(bigintval(REQUEST_GET('tid'))), __FILE__, __LINE__);
+                       array(bigintval(REQUEST_GET('tid'))), __FILE__, __LINE__);
                        list($tid) = SQL_FETCHROW($result);
                        SQL_FREERESULT($result);
                        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE (`what`='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1",
-                        array(bigintval(REQUEST_GET('fid'))), __FILE__, __LINE__);
+                       array(bigintval(REQUEST_GET('fid'))), __FILE__, __LINE__);
                        list($fid) = SQL_FETCHROW($result);
                        SQL_FREERESULT($result);
                }
@@ -261,9 +261,9 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO()))
                if ((!empty($tid)) && (!empty($fid))) {
                        // Sort menu
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
-                               array(bigintval(REQUEST_GET('tid')), bigintval($fid)), __FILE__, __LINE__);
+                       array(bigintval(REQUEST_GET('tid')), bigintval($fid)), __FILE__, __LINE__);
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
-                               array(bigintval(REQUEST_GET('fid')), bigintval($tid)), __FILE__, __LINE__);
+                       array(bigintval(REQUEST_GET('fid')), bigintval($tid)), __FILE__, __LINE__);
                } // END - if
        } // END - if
 
@@ -274,7 +274,7 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO()))
        } else {
                // List sub menus
                $result = SQL_QUERY_ESC("SELECT `id`,`action`,`what`,`title`,`sort` FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort` ASC",
-                       array($SUB), __FILE__, __LINE__);
+               array($SUB), __FILE__, __LINE__);
        }
 
        // Get number of menu entries
@@ -315,9 +315,9 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO()))
                                'title'  => $content['title'],
                                'navi'   => $NAVI,
                                'mode'   => 'guest'
-                       );
-                       $OUT .= LOAD_TEMPLATE("admin_menu_overview_row", true, $content);
-                       $SW = 3 - $SW;
+                               );
+                               $OUT .= LOAD_TEMPLATE("admin_menu_overview_row", true, $content);
+                               $SW = 3 - $SW;
                }
 
                // Free memory
index be29dfad9fabe69ffefbba69daa22548f6c9f676..9dbd590edf9fe5a04fd75f76f7b654fc16d43a52 100644 (file)
@@ -64,11 +64,11 @@ FROM `{!_MYSQL_PREFIX!}_user_data` AS d
 WHERE d.`status`='CONFIRMED' AND d.joined < (UNIX_TIMESTAMP() - %s) AND d.last_online < (UNIX_TIMESTAMP() - %s) AND d.ap_notified < (UNIX_TIMESTAMP() - %s)
 ".$EXCLUDE_LIST."
 ORDER BY d.userid",
-       array(
-               getConfig('ap_inactive_since'),
-               getConfig('ap_inactive_since'),
-               getConfig('ap_inactive_since')
-       ), __FILE__, __LINE__);
+array(
+getConfig('ap_inactive_since'),
+getConfig('ap_inactive_since'),
+getConfig('ap_inactive_since')
+), __FILE__, __LINE__);
 
 if (SQL_NUMROWS($result) > 0) {
        // Ok, we have found some inactive accounts
index ebfaa3dab7a3b93fc27d51f0760862a24dd07d26..144b4142fdebecd1e7a37b40cf188a7636749a60 100644 (file)
@@ -55,11 +55,11 @@ if ((REQUEST_ISSET_POST('id')) && (is_array(REQUEST_POST('id'))) && (count(REQUE
        } elseif (REQUEST_ISSET_POST('edit')) {
                // Delete entries (with confirmation)
                ADMIN_EDIT_ENTRIES_CONFIRM(
-                       REQUEST_POST('id'),
+               REQUEST_POST('id'),
                        'bank_packages',
-                       array('id', 'title', 'description', 'account_fee', 'free_transfers', 'transfer_fee', 'output_system_mode', 'package_active', 'free_months_no_fee', 'interest_plus', 'interest_minus', 'first_payment', 'free_account_income', 'free_account_stuff', 'tan_lock'),
-                       array('bigintval', '', '', 'translateComma', 'bigintval', 'translateComma', '', '', 'bigintval', 'translateComma', 'translateComma', 'translateComma', 'translateComma', '', 'bigintval'),
-                       array('', '', '', '', '', '', '', '', '', '', '', '', '', '', '')
+               array('id', 'title', 'description', 'account_fee', 'free_transfers', 'transfer_fee', 'output_system_mode', 'package_active', 'free_months_no_fee', 'interest_plus', 'interest_minus', 'first_payment', 'free_account_income', 'free_account_stuff', 'tan_lock'),
+               array('bigintval', '', '', 'translateComma', 'bigintval', 'translateComma', '', '', 'bigintval', 'translateComma', 'translateComma', 'translateComma', 'translateComma', '', 'bigintval'),
+               array('', '', '', '', '', '', '', '', '', '', '', '', '', '', '')
                );
                $show = false;
        } elseif (REQUEST_ISSET_POST(('do_edit'))) {
index ed8b864cd4847370035fe5f55aaa3148c60a0976..aa529945939a792020ebc9660e152796a05ff664 100644 (file)
@@ -67,7 +67,7 @@ if (getConfig('beg_rallye') == 'Y') {
 FROM `{!_MYSQL_PREFIX!}_user_data`
 WHERE `status`='CONFIRMED' AND beg_points > 0".$lastOnline."
 ORDER BY beg_points DESC, last_online DESC, userid",
-        array($ONLINE), __FILE__, __LINE__);
+       array($ONLINE), __FILE__, __LINE__);
 
        if (SQL_NUMROWS($result) > 0) {
                // List users
index ef776061a6ecc49e7184c2926d1a97e7bf6cd173..1052ebf4009c76c6e3e7e58fc2e14ed3da33fb3f 100644 (file)
@@ -82,7 +82,7 @@ if (getConfig('bonus_active') == 'Y') {
 FROM `{!_MYSQL_PREFIX!}_user_data`
 WHERE `status`='CONFIRMED' AND ".$USE." > 0".$lastOnline."
 ORDER BY points DESC, last_online DESC, userid",
-        array($ONLINE), __FILE__, __LINE__);
+       array($ONLINE), __FILE__, __LINE__);
 
        if (SQL_NUMROWS($result) > 0) {
                // List users
index 804b2c92e4a64b0c5cb5a02501b7172dce5ec456..4483c96ecc13cb3b11423d85f89c8d56d3ff7da8 100644 (file)
@@ -49,7 +49,7 @@ ADD_DESCR('admin', __FILE__);
 if (REQUEST_ISSET_GET('uid')) {
        // Check if the user already exists
        $result = SQL_QUERY_ESC("SELECT surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-               array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+       array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Loads surname, family's name and the email address
                list($sname, $fname, $email) = SQL_FETCHROW($result);
@@ -70,7 +70,7 @@ if (REQUEST_ISSET_GET('uid')) {
                        while ($content = SQL_FETCHARRAY($result_cats)) {
                                // Check user's selection
                                $result_user = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_cats` WHERE userid=%s AND cat_id=%s LIMIT 1",
-                                       array(bigintval(REQUEST_GET('uid')), bigintval($content['id'])), __FILE__, __LINE__);
+                               array(bigintval(REQUEST_GET('uid')), bigintval($content['id'])), __FILE__, __LINE__);
 
                                // Set selection
                                $selection = "<font color=\"#ee0000\">{--NO--}</div>";
index e3f0ab16e972711fffb6042abacf817063f3ddc7..780a8f392c65b350b6934b77c84a0c933b9199fe 100644 (file)
@@ -49,15 +49,15 @@ ADD_DESCR('admin', __FILE__);
 if ((REQUEST_ISSET_POST(('add'))) && (REQUEST_ISSET_POST(('code'))) && (REQUEST_ISSET_POST(('descr')))) {
        // Check if country code does already exist
        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_countries` WHERE code='%s' LIMIT 1",
-        array(strtoupper(REQUEST_POST('code'))), __FILE__, __LINE__);
+       array(strtoupper(REQUEST_POST('code'))), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 0) {
                // Save entry
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_countries` (code, descr, is_active) VALUES ('%s','%s','%s')",
-                       array(
-                               strtoupper(substr(REQUEST_POST('code'), 0, 2)),
-                               REQUEST_POST('descr'),
-                               REQUEST_POST('is_active')
-                       ), __FILE__, __LINE__);
+               array(
+               strtoupper(substr(REQUEST_POST('code'), 0, 2)),
+               REQUEST_POST('descr'),
+               REQUEST_POST('is_active')
+               ), __FILE__, __LINE__);
 
                // Country added
                $message = sprintf(getMessage('ADMIN_COUNTRY_ADDED'), strtoupper(REQUEST_POST('descr')));
@@ -105,7 +105,7 @@ if ((REQUEST_ISSET_POST(('add'))) && (REQUEST_ISSET_POST(('code'))) && (REQUEST_
                foreach (REQUEST_POST('id') as $id => $status) {
                        // Load data from DB
                        $result = SQL_QUERY_ESC("SELECT code, descr FROM `{!_MYSQL_PREFIX!}_countries` WHERE `id`=%s LIMIT 1",
-                               array(bigintval($id)), __FILE__, __LINE__);
+                       array(bigintval($id)), __FILE__, __LINE__);
                        if (SQL_NUMROWS($result) == 1) {
                                // Load data
                                list($code, $descr) = SQL_FETCHROW($result);
@@ -172,7 +172,7 @@ if ((REQUEST_ISSET_POST(('add'))) && (REQUEST_ISSET_POST(('code'))) && (REQUEST_
 
        // Load currenty setup country codes to list
        $result = SQL_QUERY('SELECT id, code, descr, is_active FROM `{!_MYSQL_PREFIX!}_countries` ORDER BY code',
-               __FILE__, __LINE__);
+       __FILE__, __LINE__);
        if (SQL_NUMROWS($result) > 0) {
                // List all countries
                $OUT = ''; $SW = 2;
index d64026ba2800fe9fae2dcf60c149ed3803adb029..103d448c6cea7bf42c6c479ec25dd21f761902f6 100644 (file)
@@ -58,79 +58,79 @@ if (!REQUEST_ISSET_GET(('mode'))) {
 // Load data for the template
 switch (REQUEST_GET('mode'))
 {
-case "already":  // Already payed out points
-       break;
+       case "already":  // Already payed out points
+               break;
 
-case "overview": // General overview page
-       $SUM_ALREADY = 0; $SUM_WAITING = 0;
-       // Number of direct already payouts and referal
-       $result = SQL_QUERY("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_doubler` WHERE completed='Y' AND is_ref='N'", __FILE__, __LINE__);
-       list($cnt) = SQL_FETCHROW($result);
-       SQL_FREERESULT($result);
+       case "overview": // General overview page
+               $SUM_ALREADY = 0; $SUM_WAITING = 0;
+               // Number of direct already payouts and referal
+               $result = SQL_QUERY("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_doubler` WHERE completed='Y' AND is_ref='N'", __FILE__, __LINE__);
+               list($cnt) = SQL_FETCHROW($result);
+               SQL_FREERESULT($result);
 
-       if ((empty($cnt)) || ($cnt == '0'))
-       {
-               // Nothing payed out so far
-               define('__DOUBLER_ALREADY_DIRECT_LINK', '0');
-       }
+               if ((empty($cnt)) || ($cnt == '0'))
+               {
+                       // Nothing payed out so far
+                       define('__DOUBLER_ALREADY_DIRECT_LINK', '0');
+               }
         else
-       {
-               // Something was payed out
-               $SUM_ALREADY += $cnt;
-               define('__DOUBLER_ALREADY_DIRECT_LINK', "<a href=\"{!URL!}/modules.php?module=admin&amp;what=list_doubler&amp;mode=already&amp;select=direct\">".$cnt."</a>");
-       }
-       $result = SQL_QUERY("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_doubler` WHERE completed='Y' AND is_ref='Y'", __FILE__, __LINE__);
-       list($cnt) = SQL_FETCHROW($result);
-       SQL_FREERESULT($result);
+        {
+               // Something was payed out
+               $SUM_ALREADY += $cnt;
+               define('__DOUBLER_ALREADY_DIRECT_LINK', "<a href=\"{!URL!}/modules.php?module=admin&amp;what=list_doubler&amp;mode=already&amp;select=direct\">".$cnt."</a>");
+        }
+        $result = SQL_QUERY("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_doubler` WHERE completed='Y' AND is_ref='Y'", __FILE__, __LINE__);
+        list($cnt) = SQL_FETCHROW($result);
+        SQL_FREERESULT($result);
 
-       if ((empty($cnt)) || ($cnt == '0'))
-       {
-               // Nothing payed out so far
-               define('__DOUBLER_ALREADY_REF_LINK', '0');
-       }
+        if ((empty($cnt)) || ($cnt == '0'))
+        {
+               // Nothing payed out so far
+               define('__DOUBLER_ALREADY_REF_LINK', '0');
+        }
         else
-       {
-               // Something was payed out
-               $SUM_ALREADY += $cnt;
-               define('__DOUBLER_ALREADY_REF_LINK', "<a href=\"{!URL!}/modules.php?module=admin&amp;what=list_doubler&amp;mode=already&amp;select=ref\">".$cnt."</a>");
-       }
-       define('__DOUBLER_ALREADY_ALL_LINK', "<a href=\"{!URL!}/modules.php?module=admin&amp;what=list_doubler&amp;mode=already&amp;select=all\">".$SUM_ALREADY."</a>");
+        {
+               // Something was payed out
+               $SUM_ALREADY += $cnt;
+               define('__DOUBLER_ALREADY_REF_LINK', "<a href=\"{!URL!}/modules.php?module=admin&amp;what=list_doubler&amp;mode=already&amp;select=ref\">".$cnt."</a>");
+        }
+        define('__DOUBLER_ALREADY_ALL_LINK', "<a href=\"{!URL!}/modules.php?module=admin&amp;what=list_doubler&amp;mode=already&amp;select=all\">".$SUM_ALREADY."</a>");
 
-       // And the same for waiting pouts (direct and referal)
-       $result = SQL_QUERY("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_doubler` WHERE completed='N' AND is_ref='N'", __FILE__, __LINE__);
-       list($cnt) = SQL_FETCHROW($result);
-       SQL_FREERESULT($result);
+        // And the same for waiting pouts (direct and referal)
+        $result = SQL_QUERY("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_doubler` WHERE completed='N' AND is_ref='N'", __FILE__, __LINE__);
+        list($cnt) = SQL_FETCHROW($result);
+        SQL_FREERESULT($result);
 
-       if ((empty($cnt)) || ($cnt == '0'))
-       {
-               // Nothing payed out so far
-               define('__DOUBLER_WAITING_DIRECT_LINK', '0');
-       }
+        if ((empty($cnt)) || ($cnt == '0'))
+        {
+               // Nothing payed out so far
+               define('__DOUBLER_WAITING_DIRECT_LINK', '0');
+        }
         else
-       {
-               // Something was payed out
-               $SUM_WAITING += $cnt;
-               define('__DOUBLER_WAITING_DIRECT_LINK', "<a href=\"{!URL!}/modules.php?module=admin&amp;what=list_doubler&amp;mode=waiting&amp;select=direct\">".$cnt."</a>");
-       }
-       $result = SQL_QUERY("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_doubler` WHERE completed='N' AND is_ref='Y'", __FILE__, __LINE__);
-       list($cnt) = SQL_FETCHROW($result);
-       SQL_FREERESULT($result);
+        {
+               // Something was payed out
+               $SUM_WAITING += $cnt;
+               define('__DOUBLER_WAITING_DIRECT_LINK', "<a href=\"{!URL!}/modules.php?module=admin&amp;what=list_doubler&amp;mode=waiting&amp;select=direct\">".$cnt."</a>");
+        }
+        $result = SQL_QUERY("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_doubler` WHERE completed='N' AND is_ref='Y'", __FILE__, __LINE__);
+        list($cnt) = SQL_FETCHROW($result);
+        SQL_FREERESULT($result);
 
-       if ((empty($cnt)) || ($cnt == '0'))
-       {
-               // Nothing payed out so far
-               define('__DOUBLER_WAITING_REF_LINK', '0');
-       }
+        if ((empty($cnt)) || ($cnt == '0'))
+        {
+               // Nothing payed out so far
+               define('__DOUBLER_WAITING_REF_LINK', '0');
+        }
         else
-       {
-               // Something was payed out
-               $SUM_WAITING += $cnt;
-               define('__DOUBLER_WAITING_REF_LINK', "<a href=\"{!URL!}/modules.php?module=admin&amp;what=list_doubler&amp;mode=waiting&amp;select=ref\">".$cnt."</a>");
-       }
-       define('__DOUBLER_WAITING_ALL_LINK', "<a href=\"{!URL!}/modules.php?module=admin&amp;what=list_doubler&amp;mode=waiting&amp;select=all\">".$SUM_WAITING."</a>");
+        {
+               // Something was payed out
+               $SUM_WAITING += $cnt;
+               define('__DOUBLER_WAITING_REF_LINK', "<a href=\"{!URL!}/modules.php?module=admin&amp;what=list_doubler&amp;mode=waiting&amp;select=ref\">".$cnt."</a>");
+        }
+        define('__DOUBLER_WAITING_ALL_LINK', "<a href=\"{!URL!}/modules.php?module=admin&amp;what=list_doubler&amp;mode=waiting&amp;select=all\">".$SUM_WAITING."</a>");
 
-       // All data is loaded here...
-       break;
+        // All data is loaded here...
+        break;
 }
 
 // Load mode template
index 0f31e43bd914ea48c7f0e917809f0a0a4814a5bf..e69026afb7046fce5cfb69702d529be557d880f9 100644 (file)
@@ -53,9 +53,9 @@ if (!REQUEST_ISSET_GET('del')) REQUEST_SET_GET('del', '');
 if (REQUEST_ISSET_GET('uid')) {
        // Check if the user already exists
        $result = SQL_QUERY_ESC("SELECT surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-               array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+       array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
 
-        // Is there an entry?
+       // Is there an entry?
        if (SQL_NUMROWS($result) == 1) {
                // Loads surname, family's name and the email address
                list($sname, $fname, $email) = SQL_FETCHROW($result);
@@ -65,11 +65,11 @@ if (REQUEST_ISSET_GET('uid')) {
                if (EXT_IS_ACTIVE('bonus')) {
                        // Load bonus ID
                        $result = SQL_QUERY_ESC("SELECT stats_id, bonus_id, link_type FROM `{!_MYSQL_PREFIX!}_user_links` WHERE userid=%s ORDER BY `id`",
-                               array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+                       array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
                } else {
                        // Load stats ID (2nd will be ignored later! But it is needed for the same fetchrow command)
                        $result = SQL_QUERY_ESC("SELECT stats_id, stats_id, link_type FROM `{!_MYSQL_PREFIX!}_user_links` WHERE userid=%s ORDER BY `id`",
-                               array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+                       array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
                }
 
                // Get number of rows from the query
@@ -80,7 +80,7 @@ if (REQUEST_ISSET_GET('uid')) {
                        if (REQUEST_GET('del') == "all") {
                                // Delete all unconfirmed mails by this user
                                SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_links` WHERE userid=%s LIMIT %s",
-                                       array(bigintval(REQUEST_GET('uid')), $nums), __FILE__, __LINE__);
+                               array(bigintval(REQUEST_GET('uid')), $nums), __FILE__, __LINE__);
 
                                // Prepare mail and send it away
                                $msg = LOAD_EMAIL_TEMPLATE("admin-del_links", $nums, bigintval(REQUEST_GET('uid')));
@@ -104,24 +104,24 @@ if (REQUEST_ISSET_GET('uid')) {
                                        // Load data from stats table...
                                        switch ($type)
                                        {
-                                       case "NORMAL":
-                                               $result_data = SQL_QUERY_ESC("SELECT subject, timestamp_ordered, cat_id FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE `id`=%s LIMIT 1",
+                                               case "NORMAL":
+                                                       $result_data = SQL_QUERY_ESC("SELECT subject, timestamp_ordered, cat_id FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE `id`=%s LIMIT 1",
                                                        array(bigintval($id)), __FILE__, __LINE__);
-                                               $type = 'mailid'; $DATA = $id; $PROBLEM = getMessage('NORMAL_MAIL_PROBLEM');
-                                               $LINK = "<a href=\"{!URL!}/mailid.php?uid=".REQUEST_GET('uid')."&amp;mailid=".$id."\" target=\"_blank\">".$id."</a>";
-                                               break;
+                                                       $type = 'mailid'; $DATA = $id; $PROBLEM = getMessage('NORMAL_MAIL_PROBLEM');
+                                                       $LINK = "<a href=\"{!URL!}/mailid.php?uid=".REQUEST_GET('uid')."&amp;mailid=".$id."\" target=\"_blank\">".$id."</a>";
+                                                       break;
 
-                                       case "BONUS":
-                                               $result_data = SQL_QUERY_ESC("SELECT subject, timestamp, cat_id FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
+                                               case "BONUS":
+                                                       $result_data = SQL_QUERY_ESC("SELECT subject, timestamp, cat_id FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
                                                        array(bigintval($id2)), __FILE__, __LINE__);
-                                               $type = 'bonusid'; $DATA = $id2; $PROBLEM = getMessage('BONUS_MAIL_PROBLEM');
-                                               $LINK = "<a href=\"{!URL!}/mailid.php?uid=".REQUEST_GET('uid')."&amp;bonusid=".$id2."\" target=\"_blank\">".$id2."</a>";
-                                               break;
-
-                                       default: // Problem in application detected!
-                                               // Log the error
-                                               DEBUG_LOG(__FILE__, __LINE__, sprintf("Invalid email type %s detected.", $type));
-                                               break;
+                                                       $type = 'bonusid'; $DATA = $id2; $PROBLEM = getMessage('BONUS_MAIL_PROBLEM');
+                                                       $LINK = "<a href=\"{!URL!}/mailid.php?uid=".REQUEST_GET('uid')."&amp;bonusid=".$id2."\" target=\"_blank\">".$id2."</a>";
+                                                       break;
+
+                                               default: // Problem in application detected!
+                                                       // Log the error
+                                                       DEBUG_LOG(__FILE__, __LINE__, sprintf("Invalid email type %s detected.", $type));
+                                                       break;
                                        }
 
                                        if (SQL_NUMROWS($result_data) == 1) {
@@ -144,11 +144,11 @@ if (REQUEST_ISSET_GET('uid')) {
                                        } else {
                                                // Load template for error
                                                $OUT .= LOAD_TEMPLATE("admin_list_links_problem",
-                                                       array(
+                                               array(
                                                                'sw'            => $SW,
                                                                'problem'       => $PROBLEM,
                                                                'data'          => $DATA
-                                                       )
+                                               )
                                                );
                                        }
                                        $SW = 3 - $SW;
index 7b2f85209cf82c8b4e68dbfbc35c23fc03451aab..0a28997115e3d95090b89e7285c39f3124ca1286 100644 (file)
@@ -49,7 +49,7 @@ if ((REQUEST_ISSET_POST('uid')) && (REQUEST_ISSET_POST('id'))) {
        // Update database...
        // First user's account
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET nl_until=(UNIX_TIMESTAMP() + nl_timespan), nl_receive='N', nl_timespan=0 WHERE userid=%s LIMIT 1",
-               array(bigintval(REQUEST_POST('uid'))), __FILE__, __LINE__);
+       array(bigintval(REQUEST_POST('uid'))), __FILE__, __LINE__);
 
        // Next the task system...
        runFilterChain('solve_task', bigintval(REQUEST_POST('id')));
index 5a63f110c453468f1e30d5d392e35f4b6b70f7c1..921c40e79502d5a310c328ec418107c7b3898389 100644 (file)
@@ -48,7 +48,7 @@ ADD_DESCR('admin', __FILE__);
 if (REQUEST_ISSET_GET(('pid'))) {
        // First let's get the member's ID
        $result = SQL_QUERY_ESC("SELECT userid, target_account, payout_total, payout_timestamp, password FROM `{!_MYSQL_PREFIX!}_user_payouts` WHERE `id`=%s LIMIT 1",
-               array(REQUEST_GET('pid')), __FILE__, __LINE__);
+       array(REQUEST_GET('pid')), __FILE__, __LINE__);
        list($uid, $tuid, $points, $tstamp, $tpass) = SQL_FETCHROW($result);
        SQL_FREERESULT($result);
 
@@ -56,7 +56,7 @@ if (REQUEST_ISSET_GET(('pid'))) {
        if (!REQUEST_ISSET_GET(('task')) && (!empty($uid)) && ($uid > 0)) {
                // Get task ID from database
                $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_task_system` WHERE userid=%s AND `task_type`='PAYOUT_REQUEST' AND task_created='".$tstamp."' LIMIT 1",
-                       array(bigintval($uid)), __FILE__, __LINE__);
+               array(bigintval($uid)), __FILE__, __LINE__);
                list($task) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
                if (empty($task)) $task = 0;
@@ -71,7 +71,7 @@ if (REQUEST_ISSET_GET(('pid'))) {
        if ((!empty($task)) && (!empty($uid)) && ($uid > 0)) {
                // Load user's data
                $result = SQL_QUERY_ESC("SELECT email, gender, surname, family FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                       array(bigintval($uid)), __FILE__, __LINE__);
+               array(bigintval($uid)), __FILE__, __LINE__);
                list($email, $gender, $surname, $family) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
 
@@ -83,14 +83,14 @@ if (REQUEST_ISSET_GET(('pid'))) {
                        if (IS_FORM_SENT()) {
                                // Obtain payout type and other data
                                $result = SQL_QUERY_ESC("SELECT payout_id FROM `{!_MYSQL_PREFIX!}_user_payouts` WHERE `id`=%s LIMIT 1",
-                                array(bigintval(REQUEST_GET('pid'))), __FILE__, __LINE__);
+                               array(bigintval(REQUEST_GET('pid'))), __FILE__, __LINE__);
                                list($ptype) = SQL_FETCHROW($result);
                                SQL_FREERESULT($result);
 
                                if (!empty($ptype)) {
                                        // Obtain data from payout type
                                        $result = SQL_QUERY_ESC("SELECT from_account, from_pass, engine_url, engine_ret_ok, engine_ret_failed, pass_enc, allow_url FROM `{!_MYSQL_PREFIX!}_payout_types` WHERE `id`=%s LIMIT 1",
-                                        array(bigintval($ptype)), __FILE__, __LINE__);
+                                       array(bigintval($ptype)), __FILE__, __LINE__);
                                        list($fuid, $fpass, $eurl, $eok, $failed, $eenc, $allow) = SQL_FETCHROW($result);
                                        SQL_FREERESULT($result);
 
@@ -99,15 +99,15 @@ if (REQUEST_ISSET_GET(('pid'))) {
                                                $eurl = COMPILE_CODE($eurl);
                                                switch ($eenc)
                                                {
-                                               case "md5":
-                                                       $fpass = md5($fpass);
-                                                       $tpass = md5($tpass);
-                                                       break;
-
-                                               case "base64":
-                                                       $fpass = base64_encode($fpass);
-                                                       $tpass = base64_encode($tpass);
-                                                       break;
+                                                       case "md5":
+                                                               $fpass = md5($fpass);
+                                                               $tpass = md5($tpass);
+                                                               break;
+
+                                                       case "base64":
+                                                               $fpass = base64_encode($fpass);
+                                                               $tpass = base64_encode($tpass);
+                                                               break;
                                                }
 
                                                // Transfer variables...
@@ -132,7 +132,7 @@ if (REQUEST_ISSET_GET(('pid'))) {
 
                                                // Clear payout request
                                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_payouts` SET `status`='ACCEPTED' WHERE `id`=%s LIMIT 1",
-                                                       array(bigintval(REQUEST_GET('pid'))), __FILE__, __LINE__);
+                                               array(bigintval(REQUEST_GET('pid'))), __FILE__, __LINE__);
 
                                                // Send out mail
                                                $msg = LOAD_EMAIL_TEMPLATE("member_payout_accepted", REQUEST_POST('text'), $uid);
@@ -177,7 +177,7 @@ if (REQUEST_ISSET_GET(('pid'))) {
 
                                // Clear payout request
                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_payouts` SET `status`='REJECTED' WHERE `id`=%s LIMIT 1",
-                                       array(bigintval(REQUEST_GET('pid'))), __FILE__, __LINE__);
+                               array(bigintval(REQUEST_GET('pid'))), __FILE__, __LINE__);
 
                                // Send out mail
                                $msg = LOAD_EMAIL_TEMPLATE("member_payout_rejected", REQUEST_POST('text'), $uid);
@@ -190,7 +190,7 @@ if (REQUEST_ISSET_GET(('pid'))) {
                        } else {
                                // Prepare content
                                $content = array(
-                                       'task' => $task
+                                       'task' => $task,
                                        'pid'  => bigintval(REQUEST_GET('pid'))
                                );
 
index f2bddbfa2faf37d21a1288d373622c554e26a3d9..e062ed0f6bb33aa13cc4632252f5a83b47088d39 100644 (file)
@@ -47,7 +47,7 @@ ADD_DESCR('admin', __FILE__);
 
 // Check for entries
 $result = SQL_QUERY("SELECT id, userid, primera_account, primera_amount, primera_timestamp, primera_type, primera_api_message, primera_api_status FROM `{!_MYSQL_PREFIX!}_user_primera` ORDER BY primera_timestamp DESC, id DESC",
-       __FILE__, __LINE__);
+__FILE__, __LINE__);
 
 // Are there some entries to display?
 if (SQL_NUMROWS($result) > 0) {
index 5d8c97163f4b550e24f8ad2251a63f53d87f9897..a302b092241b165d2a73781e20886e950e63bfdb 100644 (file)
@@ -57,37 +57,37 @@ if (REQUEST_ISSET_GET(('rallye'))) {
                // Activate / deactivate
                switch (REQUEST_GET('activate'))
                {
-               case '1': // Activate
-                       ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET is_active='Y' WHERE `id`=%s AND is_active='N' LIMIT 1");
-                       break;
+                       case '1': // Activate
+                               ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET is_active='Y' WHERE `id`=%s AND is_active='N' LIMIT 1");
+                               break;
 
-               case '0': // Deactivate
-                       ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET is_active='N' WHERE `id`=%s AND is_active='Y' LIMIT 1");
-                       break;
+                       case '0': // Deactivate
+                               ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET is_active='N' WHERE `id`=%s AND is_active='Y' LIMIT 1");
+                               break;
                }
        } elseif (REQUEST_ISSET_GET(('notify'))) {
                // Automatic notification
                switch (REQUEST_GET('notify'))
                {
-               case '1': // Activate
-                       ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET send_notify='Y' WHERE `id`=%s AND send_notify='N' LIMIT 1");
-                       break;
+                       case '1': // Activate
+                               ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET send_notify='Y' WHERE `id`=%s AND send_notify='N' LIMIT 1");
+                               break;
 
-               case '0': // Deactivate
-                       ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET send_notify='N' WHERE `id`=%s AND send_notify='Y' LIMIT 1");
-                       break;
+                       case '0': // Deactivate
+                               ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET send_notify='N' WHERE `id`=%s AND send_notify='Y' LIMIT 1");
+                               break;
                }
        } elseif (REQUEST_ISSET_GET(('auto'))) {
                // Automatic adding of new members
                switch (REQUEST_GET('auto'))
                {
-               case '1': // Activate
-                       ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET auto_add_new_user='Y' WHERE `id`=%s AND auto_add_new_user='N' LIMIT 1");
-                       break;
+                       case '1': // Activate
+                               ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET auto_add_new_user='Y' WHERE `id`=%s AND auto_add_new_user='N' LIMIT 1");
+                               break;
 
-               case '0': // Deactivate
-                       ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET auto_add_new_user='N' WHERE `id`=%s AND auto_add_new_user='Y' LIMIT 1");
-                       break;
+                       case '0': // Deactivate
+                               ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET auto_add_new_user='N' WHERE `id`=%s AND auto_add_new_user='Y' LIMIT 1");
+                               break;
                }
        }
 
@@ -104,11 +104,11 @@ if (REQUEST_ISSET_GET(('rallye'))) {
                foreach (REQUEST_POST('sel') as $id => $selected) {
                        // Remove selected rallye entirely...
                        ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_rallye_data` WHERE `id`=%s LIMIT 1",
-                               array(bigintval($id)), __FILE__, __LINE__, false));
+                       array(bigintval($id)), __FILE__, __LINE__, false));
                        ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id=%s",
-                               array(bigintval($id)), __FILE__, __LINE__, false));
+                       array(bigintval($id)), __FILE__, __LINE__, false));
                        ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_rallye_users` WHERE rallye_id=%s",
-                               array(bigintval($id)), __FILE__, __LINE__, false));
+                       array(bigintval($id)), __FILE__, __LINE__, false));
                } // END - foreach
 
                // Run SQLS
@@ -146,16 +146,16 @@ end_time='%s',
 min_users='%s',
 min_prices='%s'
 WHERE `id`='".$id."' LIMIT 1",
-                               array(
-                                       $title,
-                                       REQUEST_POST('descr', $id),
-                                       REQUEST_POST('templ', $id),
-                                       bigintval($START),
-                                       bigintval($END),
-                                       bigintval(REQUEST_POST('min_users', $id)),
-                                       bigintval(REQUEST_POST('min_prices', $id)),
-                                       $id
-                               ), __FILE__, __LINE__, false));
+                       array(
+                       $title,
+                       REQUEST_POST('descr', $id),
+                       REQUEST_POST('templ', $id),
+                       bigintval($START),
+                       bigintval($END),
+                       bigintval(REQUEST_POST('min_users', $id)),
+                       bigintval(REQUEST_POST('min_prices', $id)),
+                       $id
+                       ), __FILE__, __LINE__, false));
                }
 
                // Run SQLS
@@ -178,7 +178,7 @@ if (REQUEST_ISSET_POST('edit')) {
 FROM `{!_MYSQL_PREFIX!}_rallye_data`
 WHERE `id`=%s
 LIMIT 1",
-                               array(bigintval($id)), __FILE__, __LINE__);
+                       array(bigintval($id)), __FILE__, __LINE__);
                        // Fetch an array
                        $content = SQL_FETCHARRAY($result);
 
@@ -225,7 +225,7 @@ LIMIT 1",
 } elseif ((REQUEST_GET('sub') == 'users') && (REQUEST_GET('rallye') > 0)) {
        // List users and their refs before start and current
        $result = SQL_QUERY_ESC("SELECT userid, refs, curr_points FROM `{!_MYSQL_PREFIX!}_rallye_users` WHERE rallye_id=%s ORDER BY `userid` ASC",
-               array(bigintval(REQUEST_GET('rallye'))), __FILE__, __LINE__);
+       array(bigintval(REQUEST_GET('rallye'))), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) > 0) {
                $OUT = ''; $SW = 2;
                // @TODO Rewrite this constant
@@ -283,7 +283,7 @@ LIMIT 1",
        $result = SQL_QUERY("SELECT id, admin_id, title, descr, template, start_time, end_time, auto_add_new_user, is_active, send_notify, notified, min_users, min_prices
 FROM `{!_MYSQL_PREFIX!}_rallye_data`
 ORDER BY start_time DESC",
-               __FILE__, __LINE__);
+       __FILE__, __LINE__);
        if (SQL_NUMROWS($result) > 0) {
                // List found rallyes
                $OUT = ''; $SW = 2;
@@ -332,45 +332,45 @@ ORDER BY start_time DESC",
                        // Is the rallye active or not?
                        switch ($content['is_active'])
                        {
-                       case 'Y':
-                               // Rallye is active so do not edit it!
-                               $content['select'] = "<div class=\"big\">".$content['id']."</div>";
-                               $content['active_title'] = getMessage('RALLYE_DEACTIVATE_NOW');
-                               $content['active'] = 0;
-                               break;
-
-                       case 'N':
-                               $content['active_title'] = getMessage('RALLYE_ACTIVATE_NOW');
-                               $content['active'] = '1';
-                               break;
+                               case 'Y':
+                                       // Rallye is active so do not edit it!
+                                       $content['select'] = "<div class=\"big\">".$content['id']."</div>";
+                                       $content['active_title'] = getMessage('RALLYE_DEACTIVATE_NOW');
+                                       $content['active'] = 0;
+                                       break;
+
+                               case 'N':
+                                       $content['active_title'] = getMessage('RALLYE_ACTIVATE_NOW');
+                                       $content['active'] = '1';
+                                       break;
                        }
 
                        // Notification to members?
                        switch ($content['send_notify'])
                        {
-                       case 'Y':
-                               $content['notify_title'] = getMessage('RALLYE_STOP_NOTIFY_NOW');
-                               $content['notify'] = 0;
-                               break;
-
-                       case 'N':
-                               $content['notify_title'] = getMessage('RALLYE_START_NOTIFY_NOW');
-                               $content['notify'] = '1';
-                               break;
+                               case 'Y':
+                                       $content['notify_title'] = getMessage('RALLYE_STOP_NOTIFY_NOW');
+                                       $content['notify'] = 0;
+                                       break;
+
+                               case 'N':
+                                       $content['notify_title'] = getMessage('RALLYE_START_NOTIFY_NOW');
+                                       $content['notify'] = '1';
+                                       break;
                        }
 
                        // Auto-add of new joined members?
                        switch ($content['auto_add_new_user'])
                        {
-                       case 'Y':
-                               $content['auto_title'] = getMessage('RALLYE_STOP_AUTO_ADD_NOW');
-                               $content['auto'] = 0;
-                               break;
-
-                       case 'N':
-                               $content['auto_title'] = getMessage('RALLYE_START_AUTO_ADD_NOW');
-                               $content['auto'] = '1';
-                               break;
+                               case 'Y':
+                                       $content['auto_title'] = getMessage('RALLYE_STOP_AUTO_ADD_NOW');
+                                       $content['auto'] = 0;
+                                       break;
+
+                               case 'N':
+                                       $content['auto_title'] = getMessage('RALLYE_START_AUTO_ADD_NOW');
+                                       $content['auto'] = '1';
+                                       break;
                        }
 
                        // Output row
index 4bfaa48adcc307294940a36f8c868253b8f2a573..e6c5b31f89df9d375bb016bbcd0a56cfefff28ea 100644 (file)
@@ -52,7 +52,7 @@ if (REQUEST_ISSET_GET('uid')) {
 
        // Check if the user already exists
        $result_user = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-               array($uid), __FILE__, __LINE__);
+       array($uid), __FILE__, __LINE__);
 
        // User found?
        if (SQL_NUMROWS($result_user) == 1) {
@@ -66,9 +66,9 @@ ORDER BY level ASC", __FILE__, __LINE__);
                } else {
                        // Loads surname, family's name and the email address
                        $result     = SQL_QUERY_ESC("SELECT COUNT(*) FROM `{!_MYSQL_PREFIX!}_user_data` WHERE refid=%s",
-                               array($uid), __FILE__, __LINE__);
+                       array($uid), __FILE__, __LINE__);
                        $result_lck = SQL_QUERY_ESC("SELECT COUNT(*) FROM `{!_MYSQL_PREFIX!}_user_data` WHERE refid=%s AND status != 'CONFIRMED' ORDER BY `userid` ASC",
-                               array($uid), __FILE__, __LINE__);
+                       array($uid), __FILE__, __LINE__);
                        $menge      = SQL_RESULT($result    , 0, 0);
                        $menge_lck  = SQL_RESULT($result_lck, 0, 0);
 
@@ -78,7 +78,7 @@ ORDER BY level ASC", __FILE__, __LINE__);
 
                        // Query for refs
                        $result_levels = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email, status, joined FROM `{!_MYSQL_PREFIX!}_user_data` WHERE refid=%s ORDER BY userid ASC",
-                               array($uid), __FILE__, __LINE__);
+                       array($uid), __FILE__, __LINE__);
 
                        // Output info message
                        LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), generateUserProfileLink(REQUEST_GET('uid')), $menge, $menge_lck));
@@ -96,16 +96,16 @@ ORDER BY level ASC", __FILE__, __LINE__);
                                if (EXT_IS_ACTIVE('refback')) {
                                        // Load all refs of this user
                                        $result_refs = SQL_QUERY_ESC("SELECT refid FROM `{!_MYSQL_PREFIX!}_user_refs` WHERE userid=%s AND level='%s' ORDER BY refid ASC",
-                                               array($uid, $levels['level']), __FILE__, __LINE__);
+                                       array($uid, $levels['level']), __FILE__, __LINE__);
                                        //* DEBUG: */ echo $uid.'/'.$levels['level'].'/'.SQL_NUMROWS($result_refs)."<br />\n";
 
                                        // Do we have levels?
                                        if (SQL_NUMROWS($result_refs) > 0) {
                                                // Loads surname, family's name and the email address
                                                $result     = SQL_QUERY_ESC("SELECT COUNT(*) FROM `{!_MYSQL_PREFIX!}_user_data` WHERE refid=%s",
-                                                       array($uid), __FILE__, __LINE__);
+                                               array($uid), __FILE__, __LINE__);
                                                $result_lck = SQL_QUERY_ESC("SELECT COUNT(*) FROM `{!_MYSQL_PREFIX!}_user_data` WHERE refid=%s AND status != 'CONFIRMED' ORDER BY `userid` ASC",
-                                                       array($uid), __FILE__, __LINE__);
+                                               array($uid), __FILE__, __LINE__);
                                                $menge      = SQL_RESULT($result    , 0, 0);
                                                $menge_lck  = SQL_RESULT($result_lck, 0, 0);
 
@@ -123,7 +123,7 @@ ORDER BY level ASC", __FILE__, __LINE__);
                                                while ($content = SQL_FETCHARRAY($result_refs)) {
                                                        // Query for data
                                                        $result_user = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email, status, joined FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                                                               array($content['refid']), __FILE__, __LINE__);
+                                                       array($content['refid']), __FILE__, __LINE__);
 
                                                        // Is the data there?
                                                        if (SQL_NUMROWS($result_user) == 1) {
@@ -132,7 +132,7 @@ ORDER BY level ASC", __FILE__, __LINE__);
 
                                                                // Check for referals
                                                                $result_cnt = SQL_QUERY_ESC("SELECT COUNT(userid) FROM `{!_MYSQL_PREFIX!}_user_data` WHERE refid=%s",
-                                                                       array($content['refid']), __FILE__, __LINE__);
+                                                               array($content['refid']), __FILE__, __LINE__);
 
                                                                // Load refs
                                                                $refs_cnt = SQL_RESULT($result_cnt, 0, 0);
@@ -188,7 +188,7 @@ ORDER BY level ASC", __FILE__, __LINE__);
                                } else {
                                        // Check for referals
                                        $result_refs = SQL_QUERY_ESC("SELECT COUNT(userid) FROM `{!_MYSQL_PREFIX!}_user_data` WHERE refid=%s",
-                                        array(bigintval($levels['userid'])), __FILE__, __LINE__);
+                                       array(bigintval($levels['userid'])), __FILE__, __LINE__);
                                        $refs_cnt = SQL_RESULT($result_refs, 0, 0);
                                        SQL_FREERESULT($result_refs);
 
index efb727b5e62f556d7a08ec860d077619c1dd56f8..f665e9e7fd7eb93861e8daadcf62812a75d6615e 100644 (file)
@@ -50,7 +50,7 @@ if (REQUEST_ISSET_GET('id')) {
        $result = SQL_QUERY_ESC("SELECT company, position, gender, surname, family, street_nr1, street_nr2, zip, city, country, phone, fax, cell, email, url, tax_ident, status, sponsor_created, last_online, last_change, receive_warnings, points_amount, points_used, remote_addr, warning_interval, refid, ref_count
 FROM `{!_MYSQL_PREFIX!}_sponsor_data`
 WHERE `id`='%s' LIMIT 1",
- array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
      array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
 
        if (SQL_NUMROWS($result) == 1) {
                // Load sponsor details
@@ -64,7 +64,7 @@ WHERE `id`='%s' LIMIT 1",
 
                // Check for sponsor's orders (only count)
                $result_orders = SQL_QUERY_ESC("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_sponsor_orders` WHERE sponsorid='%s'",
-                array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
+               array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
                list($orders) = SQL_FETCHROW($result_orders);
                SQL_FREERESULT($result_orders);
                if (empty($orders)) $orders = 0;
@@ -120,7 +120,7 @@ WHERE `id`='%s' LIMIT 1",
 } elseif (REQUEST_ISSET_GET(('rid'))) {
        // Search for sponsor
        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE `id`='%s' LIMIT 1",
-        array(bigintval(REQUEST_GET('rid'))), __FILE__, __LINE__);
+       array(bigintval(REQUEST_GET('rid'))), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Free memory
                SQL_FREERESULT($result);
@@ -129,7 +129,7 @@ WHERE `id`='%s' LIMIT 1",
                $result = SQL_QUERY_ESC("SELECT id, gender, surname, family, email, status, sponsor_created, last_online, points_amount, points_used, remote_addr, ref_count
 FROM `{!_MYSQL_PREFIX!}_sponsor_data`
 WHERE refid='%s' ORDER BY `id`",
- array(bigintval(REQUEST_GET('rid'))), __FILE__, __LINE__);
              array(bigintval(REQUEST_GET('rid'))), __FILE__, __LINE__);
 
                if (SQL_NUMROWS($result) > 0) {
                        // List refs now
index 77ed5f9b3153a30c8ab423b6e25fc0b42ebbe38c..512e2a7064a26076647f27cdeedc5d00a839cbd3 100644 (file)
@@ -74,13 +74,13 @@ if (REQUEST_ISSET_POST(('add'))) {
                        // Save entry
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_paytypes`
 SET pay_name='%s', pay_rate='%s', pay_min_count='%s', pay_currency='%s' WHERE `id`='%s' LIMIT 1",
-                               array(
-                                       REQUEST_POST('name', $id),
-                                       REQUEST_POST('rate', $id),
-                                       bigintval(REQUEST_POST('min', $id)),
-                                       REQUEST_POST('curr', $id),
-                                       $id
-                               ), __FILE__, __LINE__);
+                       array(
+                       REQUEST_POST('name', $id),
+                       REQUEST_POST('rate', $id),
+                       bigintval(REQUEST_POST('min', $id)),
+                       REQUEST_POST('curr', $id),
+                       $id
+                       ), __FILE__, __LINE__);
                }
 
                // Generate message
@@ -90,7 +90,7 @@ SET pay_name='%s', pay_rate='%s', pay_min_count='%s', pay_currency='%s' WHERE `i
                foreach (REQUEST_POST('id') as $id => $sel) {
                        // Remove entry
                        SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_sponsor_paytypes` WHERE `id`='%s' LIMIT 1",
-                               array(bigintval($id)), __FILE__, __LINE__);
+                       array(bigintval($id)), __FILE__, __LINE__);
                }
 
                // Generate message
@@ -106,16 +106,16 @@ SET pay_name='%s', pay_rate='%s', pay_min_count='%s', pay_currency='%s' WHERE `i
 if (REQUEST_ISSET_POST(('add'))) {
        // Check if entry with same name does exists
        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_sponsor_paytypes` WHERE pay_name='%s' LIMIT 1",
-               array(REQUEST_POST('pay_name')), __FILE__, __LINE__);
+       array(REQUEST_POST('pay_name')), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 0) {
                // No entry found so add this line
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_rate, pay_min_count, pay_currency) VALUES ('%s','%s','%s','%s')",
-                       array(
-                               htmlspecialchars(REQUEST_POST('pay_name')),
-                               convertCommaToDot(REQUEST_POST('pay_rate')),
-                               bigintval(REQUEST_POST('pay_min_count')),
-                               htmlspecialchars(REQUEST_POST('pay_currency'))
-                       ), __FILE__, __LINE__);
+               array(
+               htmlspecialchars(REQUEST_POST('pay_name')),
+               convertCommaToDot(REQUEST_POST('pay_rate')),
+               bigintval(REQUEST_POST('pay_min_count')),
+               htmlspecialchars(REQUEST_POST('pay_currency'))
+               ), __FILE__, __LINE__);
 
                // Payment type added!
                $message = sprintf(getMessage('ADMIN_SPONSOR_PAYTYPE_ADDED'), REQUEST_POST('pay_name'));
@@ -135,7 +135,7 @@ if (REQUEST_ISSET_POST(('add'))) {
        foreach (REQUEST_POST('id') as $id => $sel) {
                // Load entry
                $result = SQL_QUERY_ESC("SELECT pay_name, pay_rate, pay_min_count, pay_currency FROM `{!_MYSQL_PREFIX!}_sponsor_paytypes` WHERE `id`='%s' LIMIT 1",
-                array(bigintval($id)), __FILE__, __LINE__);
+               array(bigintval($id)), __FILE__, __LINE__);
                if (SQL_NUMROWS($result) == 1) {
                        // Load data
                        list($name, $rate, $min, $curr) = SQL_FETCHROW($result);
@@ -181,7 +181,7 @@ if (REQUEST_ISSET_POST(('add'))) {
 } else {
        // Load all payment types
        $result = SQL_QUERY("SELECT id, pay_name, pay_rate, pay_min_count, pay_currency FROM `{!_MYSQL_PREFIX!}_sponsor_paytypes` ORDER BY pay_name",
-        __FILE__, __LINE__);
+       __FILE__, __LINE__);
 
        // Do we have some paytypes setup?
        if (SQL_NUMROWS($result) > 0) {
index 1052478aa77285008374bfcda64c23c788b1b13a..b6bdbe3deaede729474ea379cd2c8f2d4a2c3b61 100644 (file)
@@ -48,7 +48,7 @@ ADD_DESCR('admin', __FILE__);
 if (REQUEST_ISSET_GET('id')) {
        // Check for selected sponsor
        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE `id`='%s' LIMIT 1",
-        array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
+       array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // ...
                // Free memory
index e134b7ecdb5a56b6162bf48c394440bf4aac103a..cea4de3da6519c8ed6f051ddfe1eb24cf39c7e21 100644 (file)
@@ -61,31 +61,31 @@ if ((REQUEST_POST_COUNT() > 0) && ((!REQUEST_ISSET_POST('id')) || (!is_array(REQ
 if (REQUEST_ISSET_POST('edit')) {
        // Show entries for editing
        ADMIN_EDIT_ENTRIES_CONFIRM(
-               REQUEST_POST('id'),
+       REQUEST_POST('id'),
                'surfbar_urls',
-               array('id', 'userid', 'url'),
-               array('bigintval', 'ADD_MEMBER_SELECTION_BOX', ''),
-               array('', array(false, true, true), '')
+       array('id', 'userid', 'url'),
+       array('bigintval', 'ADD_MEMBER_SELECTION_BOX', ''),
+       array('', array(false, true, true), '')
        );
        $show = false;
 } elseif (REQUEST_ISSET_POST(('do_edit'))) {
        // Change data of entries
        ADMIN_EDIT_ENTRIES_CONFIRM(
-               REQUEST_POST('id'),
+       REQUEST_POST('id'),
                'surfbar_urls',
-               array(),
-               array(),
-               array(),
-               true
+       array(),
+       array(),
+       array(),
+       true
        );
 } elseif (REQUEST_ISSET_POST('delete')) {
        // Show entries for deletion
        ADMIN_DELETE_ENTRIES_CONFIRM(
-               REQUEST_POST('id'),
+       REQUEST_POST('id'),
                'surfbar_urls',
-               array('id', 'userid', 'url', 'registered'),
-               array('bigintval', 'generateUserProfileLink', 'FRAMETESTER', ''),
-               array('', '', '', '')
+       array('id', 'userid', 'url', 'registered'),
+       array('bigintval', 'generateUserProfileLink', 'FRAMETESTER', ''),
+       array('', '', '', '')
        );
        $show = false;
 } elseif (REQUEST_ISSET_POST(('do_delete'))) {
@@ -94,44 +94,44 @@ if (REQUEST_ISSET_POST('edit')) {
 } elseif (REQUEST_ISSET_POST(('lock'))) {
        // Un-/lock selected URLs. This does not work for pending URLs
        ADMIN_LOCK_ENTRIES_CONFIRM(
-               REQUEST_POST('id'),
+       REQUEST_POST('id'),
                'surfbar_urls',
-               array('id', 'userid', 'url', 'registered', 'status'),
-               array('bigintval', 'generateUserProfileLink', 'FRAMETESTER', '', 'surfbarTranslateUserStatus'),
-               array('', '', '', '', '')
+       array('id', 'userid', 'url', 'registered', 'status'),
+       array('bigintval', 'generateUserProfileLink', 'FRAMETESTER', '', 'surfbarTranslateUserStatus'),
+       array('', '', '', '', '')
        );
        $show = false;
 } elseif (REQUEST_ISSET_POST(('do_lock'))) {
        // Un-/lock selected URLs. This does not work for pending URLs
        ADMIN_LOCK_ENTRIES_CONFIRM(
-               REQUEST_POST('id'),
+       REQUEST_POST('id'),
                'surfbar_urls',
-               array(),
-               array(),
-               array(),
-               array('status' => array('ACTIVE' => 'LOCKED', 'LOCKED' => 'ACTIVE')),
-               true
+       array(),
+       array(),
+       array(),
+       array('status' => array('ACTIVE' => 'LOCKED', 'LOCKED' => 'ACTIVE')),
+       true
        );
 } elseif (REQUEST_ISSET_POST(('undelete'))) {
        // Undelete selected URLs. This does only work for deleted URLs... ;-)
        ADMIN_UNDELETE_ENTRIES_CONFIRM(
-               REQUEST_POST('id'),
+       REQUEST_POST('id'),
                'surfbar_urls',
-               array('id', 'userid', 'url', 'registered', 'status'),
-               array('bigintval', 'generateUserProfileLink', 'FRAMETESTER', '', 'surfbarTranslateUserStatus'),
-               array('', '', '', '', '')
+       array('id', 'userid', 'url', 'registered', 'status'),
+       array('bigintval', 'generateUserProfileLink', 'FRAMETESTER', '', 'surfbarTranslateUserStatus'),
+       array('', '', '', '', '')
        );
        $show = false;
 } elseif (REQUEST_ISSET_POST(('do_undelete'))) {
        // Undelete selected URLs. This does only work for deleted URLs... ;-)
        ADMIN_UNDELETE_ENTRIES_CONFIRM(
-               REQUEST_POST('id'),
+       REQUEST_POST('id'),
                'surfbar_urls',
-               array(),
-               array(),
-               array(),
-               array('status' => array('DELETED' => 'ACTIVE')),
-               true
+       array(),
+       array(),
+       array(),
+       array('status' => array('DELETED' => 'ACTIVE')),
+       true
        );
 }
 
index c4a7f8d21744a655afa6d4c32b883cd0edd7cd93..45c9c4bb7153e7aee434b97bea22a1ce2371e851 100644 (file)
@@ -53,34 +53,34 @@ if (!REQUEST_ISSET_GET(('type'))) REQUEST_SET_GET('type', "your");
 
 switch (REQUEST_GET('type'))
 {
-case "your": // List only your own open (new) tasks
-       $whereStatement = "`assigned_admin`='".getCurrentAdminId()."' AND `status`='NEW' AND task_type != 'EXTENSION_UPDATE'";
-       break;
-
-case "updates": // List only updates assigned to you
-       $whereStatement = "`assigned_admin`=".getCurrentAdminId()." AND `status`='NEW' AND task_type = 'EXTENSION_UPDATE'";
-       break;
-
-case "solved": // List only solved tasks assigned to you
-       $whereStatement = "`assigned_admin`=".getCurrentAdminId()." AND `status`='SOLVED'";
-       break;
-
-case "unassigned": // List unassigned (but not deleted) tasks
-       $whereStatement = "`assigned_admin`=0 AND `status` != 'DELETED'";
-       break;
-
-case "deleted": // List all deleted
-       $whereStatement = "`status`='DELETED'";
-       break;
-
-case "closed": // List all closed
-       $whereStatement = "`assigned_admin`=".getCurrentAdminId()." AND `status`='CLOSED'";
-       break;
-
-default: // Unknown type
-       DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown task type %s detected.", REQUEST_GET('type')));
-       LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_TASK_UNKNOWN_MODE'), REQUEST_GET('type')));
-       break;
+       case "your": // List only your own open (new) tasks
+               $whereStatement = "`assigned_admin`='".getCurrentAdminId()."' AND `status`='NEW' AND task_type != 'EXTENSION_UPDATE'";
+               break;
+
+       case "updates": // List only updates assigned to you
+               $whereStatement = "`assigned_admin`=".getCurrentAdminId()." AND `status`='NEW' AND task_type = 'EXTENSION_UPDATE'";
+               break;
+
+       case "solved": // List only solved tasks assigned to you
+               $whereStatement = "`assigned_admin`=".getCurrentAdminId()." AND `status`='SOLVED'";
+               break;
+
+       case "unassigned": // List unassigned (but not deleted) tasks
+               $whereStatement = "`assigned_admin`=0 AND `status` != 'DELETED'";
+               break;
+
+       case "deleted": // List all deleted
+               $whereStatement = "`status`='DELETED'";
+               break;
+
+       case "closed": // List all closed
+               $whereStatement = "`assigned_admin`=".getCurrentAdminId()." AND `status`='CLOSED'";
+               break;
+
+       default: // Unknown type
+               DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown task type %s detected.", REQUEST_GET('type')));
+               LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_TASK_UNKNOWN_MODE'), REQUEST_GET('type')));
+               break;
 }
 
 if (!empty($whereStatement)) {
@@ -104,7 +104,7 @@ ORDER BY userid DESC, task_type DESC, subject, task_created DESC", __FILE__, __L
                                // Unassign from tasks
                                foreach (REQUEST_POST('task') as $id => $sel) {
                                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_task_system` SET `assigned_admin`=0 WHERE `id`=%s AND `assigned_admin`=%s LIMIT 1",
-                                               array(bigintval($id), getCurrentAdminId()), __FILE__, __LINE__);
+                                       array(bigintval($id), getCurrentAdminId()), __FILE__, __LINE__);
                                }
                        } elseif (REQUEST_ISSET_POST('del')) {
                                // Delete tasks
@@ -112,7 +112,7 @@ ORDER BY userid DESC, task_type DESC, subject, task_created DESC", __FILE__, __L
                                        if (REQUEST_GET('type') == "deleted") {
                                                // Delete task immediately
                                                SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_task_system` WHERE `id`=%s LIMIT 1",
-                                                       array(bigintval($id)),__FILE__, __LINE__);
+                                               array(bigintval($id)),__FILE__, __LINE__);
                                        } else {
                                                // Mark task as to be deleted (purged by autppurge extension)
                                                ADMIN_DELETE_TASK($id);
@@ -145,10 +145,10 @@ ORDER BY userid DESC, task_type DESC, subject, task_created DESC", __FILE__, __L
                        // Generate infos
                        switch ($content['task_type'])
                        {
-                       case 'EXTENSION':
-                       case 'EXTENSION_UPDATE':
-                               $content['infos'] = substr($content['subject'], 1, strpos($content['subject'], ':') - 1);
-                               break;
+                               case 'EXTENSION':
+                               case 'EXTENSION_UPDATE':
+                                       $content['infos'] = substr($content['subject'], 1, strpos($content['subject'], ':') - 1);
+                                       break;
                        }
 
                        // Member assigned with task?
index 17d79344fab0b36d8f6b074467f73cb28120319c..dd2a3cdf92e3a3c1ed820432443958f49b21271c 100644 (file)
@@ -72,7 +72,7 @@ if (SQL_NUMROWS($result) > 0)
        // Free memory
        SQL_FREERESULT($result);
 }
- else
+else
 {
        // Nothing for in and out
        $OUT = "<tr>
index 2d9cb3b7635514a5c39fb332870dec2726211088..9dff0083b289d476f6235b8394b35f1e061703bb 100644 (file)
@@ -104,7 +104,7 @@ FROM `{!_MYSQL_PREFIX!}_user_links` AS l
 LEFT JOIN `{!_MYSQL_PREFIX!}_user_data` AS u
 ON l.userid=u.userid
 WHERE l.%s='%s' ORDER BY l.userid LIMIT %s",
-                       array($col, $ID, bigintval($max)),__FILE__, __LINE__);
+               array($col, $ID, bigintval($max)),__FILE__, __LINE__);
                $unconfirmed = SQL_NUMROWS($result);
 
                if ($unconfirmed > 0) {
@@ -156,9 +156,9 @@ WHERE l.%s='%s' ORDER BY l.userid LIMIT %s",
        } elseif (REQUEST_GET('mid') > 0) {
                // Data in pool or in user_stats not found, so let's find out where data is missing
                $result1 = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_pool` WHERE `id`=%s LIMIT 1",
-                       array(bigintval($ID)), __FILE__, __LINE__);
+               array(bigintval($ID)), __FILE__, __LINE__);
                $result2 = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE pool_id=%s LIMIT 1",
-                       array(bigintval($ID)), __FILE__, __LINE__);
+               array(bigintval($ID)), __FILE__, __LINE__);
                if (SQL_NUMROWS($result1) == 1) {
                        // pool table
                        LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_UNCONFIRMED_POOL_MISSING'), $ID));
index c21ac0a8fc6e59048cb8601bf7d13c48e1230052..284edf0d0f6928e231ce3c320d90e1917a6def99 100644 (file)
@@ -106,7 +106,7 @@ if (REQUEST_ISSET_GET('uid')) {
 FROM `{!_MYSQL_PREFIX!}_user_data`
 WHERE userid=%s
 LIMIT 1",
-               array($uid), __FILE__, __LINE__);
+       array($uid), __FILE__, __LINE__);
        if (SQL_NUMROWS($result_user) == 1) {
                // Account found!
                $DATA  = SQL_FETCHARRAY($result_user);
@@ -159,7 +159,7 @@ LIMIT 1",
                // Nickname inclusion?
                // @TODO Rewrite these to filters
                if (EXT_IS_ACTIVE('nickname')) {
-                       // Nickname not set or invalid? Then 
+                       // Nickname not set or invalid? Then
                        if ((empty($DATA['nickname'])) || ($DATA['nickname'] == $uid)) $DATA['nickname'] = '---';
                } else {
                        // Extension not found
index cce8fb1049f3c0f4cd5848ac89bd061d758dae49..999906f7c88296a4bd5bea70dfb13ff15e67b264 100644 (file)
@@ -47,7 +47,7 @@ ADD_DESCR('admin', __FILE__);
 
 // Check for entries
 $result = SQL_QUERY("SELECT id, userid, wernis_account, wernis_amount, wernis_timestamp, wernis_type, wernis_api_message, wernis_api_status FROM `{!_MYSQL_PREFIX!}_user_wernis` ORDER BY wernis_timestamp DESC, id DESC",
-       __FILE__, __LINE__);
+__FILE__, __LINE__);
 
 // Are there some entries to display?
 if (SQL_NUMROWS($result) > 0) {
index e640e77360babcfe5794fcd493a305b0e17bc295..37f54d1bee1e7f79b8f5189d60d58ee49bc06b9c 100644 (file)
@@ -49,7 +49,7 @@ $message = '';
 if (REQUEST_ISSET_GET('id')) {
        // Check for selected sponsor
        $result = SQL_QUERY_ESC("SELECT gender, surname, family, email, status FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE `id`='%s' LIMIT 1",
-        array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
+       array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Get sponsor's current status and let only confirmed and locked status pass
                list($gender, $sname, $fname, $email, $status) = SQL_FETCHROW($result);
@@ -84,7 +84,7 @@ if (REQUEST_ISSET_GET('id')) {
 
                                // Update sponsor's account
                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET `status`='".$status."' WHERE `id`='%s' LIMIT 1",
-                                       array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
+                               array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
                        } elseif (REQUEST_ISSET_POST(('no'))) {
                                // No don't lock / unlock now!
                                redirectToUrl('modules.php?module=admin&amp;what=list_sponsor&amp;id='.bigintval(REQUEST_GET('id')));
index efde7fa314caf417311f89b62be43c878723d92a..a23e065e6d94662030d0e32cbec7f8ab1abde745 100644 (file)
@@ -49,7 +49,7 @@ ADD_DESCR('admin', __FILE__);
 if (REQUEST_ISSET_GET('uid')) {
        // Load user's data
        $result_user = SQL_QUERY_ESC("SELECT status, gender, surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-               array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+       array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
        $ACT = false;
        if (SQL_NUMROWS($result_user) == 1) {
                // User found
@@ -64,11 +64,11 @@ if (REQUEST_ISSET_GET('uid')) {
                        if (GET_EXT_VERSION('user') >= '0.3.5') {
                                // Lock with reason
                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `status`='LOCKED',lock_reason='%s',lock_timestamp=NOW() WHERE userid=%s LIMIT 1",
-                                       array(REQUEST_POST('reason'), bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+                               array(REQUEST_POST('reason'), bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
                        } else {
                                // Lock with no lock reason saved
                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `status`='LOCKED' WHERE userid=%s LIMIT 1",
-                                       array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+                               array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
                        }
 
                        // Entry updated?
@@ -88,11 +88,11 @@ if (REQUEST_ISSET_GET('uid')) {
                        if (GET_EXT_VERSION('user') >= '0.3.5') {
                                // Reset lock reason as well
                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `status`='CONFIRMED',lock_reason='',lock_timestamp='0000-00-00 00:00' WHERE userid=%s LIMIT 1",
-                                       array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+                               array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
                        } else {
                                // No lock reason to reset
                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `status`='CONFIRMED' WHERE userid=%s LIMIT 1",
-                                       array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+                               array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
                        }
 
                        // Entry updated?
@@ -119,7 +119,7 @@ if (REQUEST_ISSET_GET('uid')) {
                        $URL = ADMIN_CREATE_USERID_LINK(REQUEST_GET('uid'));
                } else {
                        $result = SQL_QUERY_ESC("SELECT email, surname, family FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                               array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+                       array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
 
                        // Entry found?
                        if (SQL_NUMROWS($result) == 1) {
@@ -139,23 +139,23 @@ if (REQUEST_ISSET_GET('uid')) {
                                // Realy want to lock?
                                switch ($status)
                                {
-                               case 'CONFIRMED': // Yes, lock him down... ;-)
-                                       define('__OK_VALUE'    , 'lock');
-                                       define('__HEADER_VALUE', sprintf(getMessage('ADMIN_HEADER_LOCK_ACCOUNT'), constant('__UID')));
-                                       define('__TEXT_VALUE'  , sprintf(getMessage('ADMIN_TEXT_LOCK_ACCOUNT'), constant('__UID')));
-                                       break;
-
-                               case 'LOCKED': // Unlock the user
-                                       define('__OK_VALUE'    , 'unlock');
-                                       define('__HEADER_VALUE', sprintf(getMessage('ADMIN_HEADER_UNLOCK_ACCOUNT'), constant('__UID')));
-                                       define('__TEXT_VALUE'  , sprintf(getMessage('ADMIN_TEXT_UNLOCK_ACCOUNT'), constant('__UID')));
-                                       break;
-
-                               case 'UNCONFIRMED': // Unconfirmed accounts cannot be unlocked!
-                                       define('__OK_VALUE'    , 'del');
-                                       define('__HEADER_VALUE', sprintf(getMessage('ADMIN_HEADER_DEL_ACCOUNT'), constant('__UID')));
-                                       define('__TEXT_VALUE'  , sprintf(getMessage('ADMIN_TEXT_DEL_ACCOUNT'), constant('__UID')));
-                                       break;
+                                       case 'CONFIRMED': // Yes, lock him down... ;-)
+                                               define('__OK_VALUE'    , 'lock');
+                                               define('__HEADER_VALUE', sprintf(getMessage('ADMIN_HEADER_LOCK_ACCOUNT'), constant('__UID')));
+                                               define('__TEXT_VALUE'  , sprintf(getMessage('ADMIN_TEXT_LOCK_ACCOUNT'), constant('__UID')));
+                                               break;
+
+                                       case 'LOCKED': // Unlock the user
+                                               define('__OK_VALUE'    , 'unlock');
+                                               define('__HEADER_VALUE', sprintf(getMessage('ADMIN_HEADER_UNLOCK_ACCOUNT'), constant('__UID')));
+                                               define('__TEXT_VALUE'  , sprintf(getMessage('ADMIN_TEXT_UNLOCK_ACCOUNT'), constant('__UID')));
+                                               break;
+
+                                       case 'UNCONFIRMED': // Unconfirmed accounts cannot be unlocked!
+                                               define('__OK_VALUE'    , 'del');
+                                               define('__HEADER_VALUE', sprintf(getMessage('ADMIN_HEADER_DEL_ACCOUNT'), constant('__UID')));
+                                               define('__TEXT_VALUE'  , sprintf(getMessage('ADMIN_TEXT_DEL_ACCOUNT'), constant('__UID')));
+                                               break;
                                }
 
                                // Output form
index 9fc9045f46203358202f5e437ea169fe396b9592..100c998567fc83d109461512bc5eb7bc8fc663ac 100644 (file)
@@ -49,15 +49,15 @@ if (IS_FORM_SENT()) {
        // De- or activate maintenance mode
        switch (getConfig('maintenance'))
        {
-       case 'Y':
-               $target_mode = 'N';
-               $out = getMessage('ADMIN_MAINTENANCE_DEACTIVATED');
-               break;
+               case 'Y':
+                       $target_mode = 'N';
+                       $out = getMessage('ADMIN_MAINTENANCE_DEACTIVATED');
+                       break;
 
-       case 'N':
-               $target_mode = 'Y';
-               $out = getMessage('ADMIN_MAINTENANCE_ACTIVATED');
-               break;
+               case 'N':
+                       $target_mode = 'Y';
+                       $out = getMessage('ADMIN_MAINTENANCE_ACTIVATED');
+                       break;
        }
 
        // Update config
@@ -68,13 +68,13 @@ if (IS_FORM_SENT()) {
 } else {
        switch (getConfig('maintenance'))
        {
-       case 'Y': // Maintenance mode is active
-               define('ADMIN_MAINTENANCE_MODE', getMessage('ADMIN_MAINTENANCE_MODE_IS_ACTIVE'));
-               break;
+               case 'Y': // Maintenance mode is active
+                       define('ADMIN_MAINTENANCE_MODE', getMessage('ADMIN_MAINTENANCE_MODE_IS_ACTIVE'));
+                       break;
 
-       case 'N': // Maintenance mode is inactive
-               define('ADMIN_MAINTENANCE_MODE', getMessage('ADMIN_MAINTENANCE_MODE_IS_INACTIVE'));
-               break;
+               case 'N': // Maintenance mode is inactive
+                       define('ADMIN_MAINTENANCE_MODE', getMessage('ADMIN_MAINTENANCE_MODE_IS_INACTIVE'));
+                       break;
        }
        // Display form
        LOAD_TEMPLATE("admin_maintenance_form");
index d96a8491d99885fac9bc1e8883510d0c82f33fb7..8a445316b128c52c5b597cb11708795dc2f90da9 100644 (file)
@@ -57,7 +57,7 @@ if (!IS_FORM_SENT()) {
 
        // Get all available main menus
        $result = SQL_QUERY("SELECT action, title, sort FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE (`what`='' OR `what` IS NULL) ORDER BY `sort`",
-               __FILE__, __LINE__);
+       __FILE__, __LINE__);
        if (SQL_NUMROWS($result) > 0) {
                // Read menu structure
                while ($content = SQL_FETCHARRAY($result)) {
@@ -94,7 +94,7 @@ if (!IS_FORM_SENT()) {
                // Load sub menus :)
                foreach ($menus as $key_main => $value_main) {
                        $result = SQL_QUERY_ESC("SELECT what, title, sort FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='%s' AND `what` != '' ORDER BY `sort`",
-                               array($value_main), __FILE__, __LINE__);
+                       array($value_main), __FILE__, __LINE__);
                        if (SQL_NUMROWS($result) > 0) {
                                // Initialize arrays
                                $menus[$value_main] = array();
@@ -166,23 +166,23 @@ if (!IS_FORM_SENT()) {
        // Insert new menu entry
        if (REQUEST_ISSET_POST(('menu'))) {
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('%s','%s','%s','%s','%s','%s')",
-                       array(
-                               REQUEST_POST('menu'),
-                               REQUEST_POST('name'),
-                               REQUEST_POST('title'),
-                               REQUEST_POST('visible'),
-                               REQUEST_POST('active'),
-                               bigintval(REQUEST_POST('sort')),
-                       ), __FILE__, __LINE__);
+               array(
+               REQUEST_POST('menu'),
+               REQUEST_POST('name'),
+               REQUEST_POST('title'),
+               REQUEST_POST('visible'),
+               REQUEST_POST('active'),
+               bigintval(REQUEST_POST('sort')),
+               ), __FILE__, __LINE__);
        } else {
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`title`,`visible`,`locked`,`sort`) VALUES ('%s','%s','%s','%s','%s')",
-                       array(
-                               REQUEST_POST('name'),
-                               REQUEST_POST('title'),
-                               REQUEST_POST('visible'),
-                               REQUEST_POST('active'),
-                               bigintval(REQUEST_POST('sort')),
-                       ), __FILE__, __LINE__);
+               array(
+               REQUEST_POST('name'),
+               REQUEST_POST('title'),
+               REQUEST_POST('visible'),
+               REQUEST_POST('active'),
+               bigintval(REQUEST_POST('sort')),
+               ), __FILE__, __LINE__);
        }
        LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
 } else {
index dcf88df56d36cc25421b7e3ad187e2d83dd78943..bcb3844f31e484afb601b55e06e0691a77581fda 100644 (file)
@@ -67,7 +67,7 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO())) {
                if ($confirm == 1) {
                        $cnt++;
                        $result = SQL_QUERY_ESC("SELECT title, action, what FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE ".$AND." AND id=%s LIMIT 1",
-                               array(bigintval($sel)), __FILE__, __LINE__);
+                       array(bigintval($sel)), __FILE__, __LINE__);
                        if (SQL_NUMROWS($result) == 1) {
                                // Entry found so we load the stuff...
                                list($menu, $act, $wht, $descr) = SQL_FETCHROW($result);
@@ -107,7 +107,7 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO())) {
                if ($confirm == 1) {
                        $cnt++;
                        $result = SQL_QUERY_ESC("SELECT title FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE ".$AND." AND id=%s LIMIT 1",
-                               array(bigintval($sel)), __FILE__, __LINE__);
+                       array(bigintval($sel)), __FILE__, __LINE__);
                        if (SQL_NUMROWS($result) == 1) {
                                // Entry found so we load the stuff...
                                list($title) = SQL_FETCHROW($result);
@@ -142,7 +142,7 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO())) {
                if ($confirm == 1) {
                        $cnt++;
                        $result = SQL_QUERY_ESC("SELECT title, visible, locked FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE ".$AND." AND id=%s LIMIT 1",
-                               array(bigintval($sel)), __FILE__, __LINE__);
+                       array(bigintval($sel)), __FILE__, __LINE__);
                        if (SQL_NUMROWS($result) == 1) {
                                // Entry found so we load the stuff...
                                list($menu, $vis, $locked) = SQL_FETCHROW($result);
@@ -159,7 +159,7 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO())) {
                                // Load template
                                $OUT .= LOAD_TEMPLATE("admin_menu_status_row", true, $content);
                        }
-                        else
+                       else
                        {
                                // Entry not found?
                                $content = array(
@@ -183,20 +183,20 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO())) {
                if (!empty($SUB)) $AND = "`action`='".$SUB."'";
                switch (REQUEST_POST('ok'))
                {
-               case 'edit': // Edit menu
-                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `title`='%s', `action`='%s', `what`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+                       case 'edit': // Edit menu
+                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `title`='%s', `action`='%s', `what`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
                                array($menu, REQUEST_POST('sel_act', $sel), REQUEST_POST('sel_what', $sel), $sel), __FILE__, __LINE__);
-                       break;
+                               break;
 
-               case 'del': // Delete menu
-                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE ".$AND." AND id=%s LIMIT 1",
+                       case 'del': // Delete menu
+                               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE ".$AND." AND id=%s LIMIT 1",
                                array($sel), __FILE__, __LINE__);
-                       break;
+                               break;
 
-               case 'status': // Change status of menus
-                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='%s', `locked`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+                       case 'status': // Change status of menus
+                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='%s', `locked`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
                                array(REQUEST_POST('visible', $sel), REQUEST_POST('locked', $sel), $sel), __FILE__, __LINE__);
-                       break;
+                               break;
                }
                break;
        }
@@ -212,29 +212,29 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO())) {
                if (REQUEST_ISSET_GET(('w'))) {
                        // Sub menus selected
                        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1",
-                               array(bigintval(REQUEST_GET('act')), bigintval(REQUEST_GET('tid'))), __FILE__, __LINE__);
+                       array(bigintval(REQUEST_GET('act')), bigintval(REQUEST_GET('tid'))), __FILE__, __LINE__);
                        list($tid) = SQL_FETCHROW($result);
                        SQL_FREERESULT($result);
                        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1",
-                               array(bigintval(REQUEST_GET('act')), bigintval(REQUEST_GET('fid'))), __FILE__, __LINE__);
+                       array(bigintval(REQUEST_GET('act')), bigintval(REQUEST_GET('fid'))), __FILE__, __LINE__);
                        list($fid) = SQL_FETCHROW($result);
                        SQL_FREERESULT($result);
                } else {
                        // Main menu selected
                        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE (`what`='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1",
-                               array(bigintval(REQUEST_GET('tid'))), __FILE__, __LINE__);
+                       array(bigintval(REQUEST_GET('tid'))), __FILE__, __LINE__);
                        list($tid) = SQL_FETCHROW($result);
                        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE (`what`='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1",
-                               array(bigintval(REQUEST_GET('fid'))), __FILE__, __LINE__);
+                       array(bigintval(REQUEST_GET('fid'))), __FILE__, __LINE__);
                        list($fid) = SQL_FETCHROW($result);
                }
 
                if ((!empty($tid)) && (!empty($fid))) {
                        // Sort menu
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
-                               array(bigintval(REQUEST_GET('tid')), bigintval($fid)), __FILE__, __LINE__);
+                       array(bigintval(REQUEST_GET('tid')), bigintval($fid)), __FILE__, __LINE__);
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
-                               array(bigintval(REQUEST_GET('fid')), bigintval($tid)), __FILE__, __LINE__);
+                       array(bigintval(REQUEST_GET('fid')), bigintval($tid)), __FILE__, __LINE__);
                } // END - -fi
        }
 
index eed43ee98fb2a8008a27b7c107c03900d49a0152..a296935eab04a067f7f5d0dd5b3101ba69704fbf 100644 (file)
@@ -51,30 +51,30 @@ if (((!REQUEST_ISSET_POST(('t_wait'))) || (!REQUEST_ISSET_POST(('payment')))) &&
 
 if (IS_FORM_SENT()) {
        switch (REQUEST_GET('do')) {
-       case 'add':
-               ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_payments` (time, payment, mail_title, price) VALUES ('".REQUEST_POST('t_wait')."','".REQUEST_POST('payment')."','".REQUEST_POST('title')."','".REQUEST_POST('price')."')");
-               $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_payments` WHERE time='%s' LIMIT 1",
+               case 'add':
+                       ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_payments` (time, payment, mail_title, price) VALUES ('".REQUEST_POST('t_wait')."','".REQUEST_POST('payment')."','".REQUEST_POST('title')."','".REQUEST_POST('price')."')");
+                       $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_payments` WHERE time='%s' LIMIT 1",
                        array(REQUEST_POST('t_wait')), __FILE__, __LINE__);
-               if (SQL_NUMROWS($result) == 1) {
-                       // Re-init the array here
-                       INIT_SQLS();
-
-                       // Free memory
-                       SQL_FREERESULT($result);
-               }
-               break;
-
-       case 'edit':
-               foreach (REQUEST_POST('time') as $id => $value) {
-                       ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_payments` SET time='".$value."', payment='".REQUEST_POST('pay', $id)."', price='".REQUEST_POST('price', $id)."', mail_title='".REQUEST_POST('title', $id)."' WHERE `id`='".$id."' LIMIT 1");
-               }
-               break;
-
-       case 'del':
-               foreach (REQUEST_POST('id') as $id => $value) {
-                       ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_payments` WHERE `id`='".$id."' LIMIT 1");
-               }
-               break;
+                       if (SQL_NUMROWS($result) == 1) {
+                               // Re-init the array here
+                               INIT_SQLS();
+
+                               // Free memory
+                               SQL_FREERESULT($result);
+                       }
+                       break;
+
+               case 'edit':
+                       foreach (REQUEST_POST('time') as $id => $value) {
+                               ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_payments` SET time='".$value."', payment='".REQUEST_POST('pay', $id)."', price='".REQUEST_POST('price', $id)."', mail_title='".REQUEST_POST('title', $id)."' WHERE `id`='".$id."' LIMIT 1");
+                       }
+                       break;
+
+               case 'del':
+                       foreach (REQUEST_POST('id') as $id => $value) {
+                               ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_payments` WHERE `id`='".$id."' LIMIT 1");
+                       }
+                       break;
        }
 
        // Save settings
@@ -94,7 +94,7 @@ if (IS_FORM_SENT()) {
        $OUT = ''; $SW = 2;
        foreach (REQUEST_POST('sel') as $id => $value) {
                $result = SQL_QUERY_ESC("SELECT time, mail_title FROM `{!_MYSQL_PREFIX!}_payments` WHERE `id`=%s LIMIT 1",
-                       array(bigintval($id)), __FILE__, __LINE__);
+               array(bigintval($id)), __FILE__, __LINE__);
                list($time, $title) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
 
@@ -119,7 +119,7 @@ if (IS_FORM_SENT()) {
        $OUT = ''; $SW = 2;
        foreach (REQUEST_POST('sel') as $id => $value) {
                $result = SQL_QUERY_ESC("SELECT time, payment, mail_title, price FROM `{!_MYSQL_PREFIX!}_payments` WHERE `id`=%s LIMIT 1",
-                array(bigintval($id)), __FILE__, __LINE__);
+               array(bigintval($id)), __FILE__, __LINE__);
                list($time, $pay, $title, $price) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
 
index 857b516d6e2759e3dcfb5453133688a21705c9aa..525e427f7d56d1945745ca6fe034f0eb78c2d927 100644 (file)
@@ -62,36 +62,36 @@ if (IS_FORM_SENT()) {
        $sql = '';
        switch (REQUEST_GET('mode'))
        {
-       case 'add':
-               // Check if banner is already added
-               $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_refbanner` WHERE url='%s' LIMIT 1",
+               case 'add':
+                       // Check if banner is already added
+                       $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_refbanner` WHERE url='%s' LIMIT 1",
                        array(REQUEST_POST('url')), __FILE__, __LINE__);
-               if (SQL_NUMROWS($result) == 0) {
-                       // Add banner
-                       SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_refbanner` (url, alternate, visible)
+                       if (SQL_NUMROWS($result) == 0) {
+                               // Add banner
+                               SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_refbanner` (url, alternate, visible)
 VALUES ('%s','%s','%s')",
                                array(REQUEST_POST('url'), REQUEST_POST('alternate'), REQUEST_POST('visible')), __FILE__, __LINE__);
-               } else {
-                       // Free memory
-                       SQL_FREERESULT($result);
-               }
-               break;
-
-       case 'edit': // Update banner
-               foreach (REQUEST_POST('sel') as $id => $sel) {
-                       // Secure ID
-                       $id = bigintval($id);
-
-                       // Update entry
-                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_refbanner` SET url='%s', alternate='%s', `visible`='%s' WHERE `id`=%s LIMIT 1",
+                       } else {
+                               // Free memory
+                               SQL_FREERESULT($result);
+                       }
+                       break;
+
+               case 'edit': // Update banner
+                       foreach (REQUEST_POST('sel') as $id => $sel) {
+                               // Secure ID
+                               $id = bigintval($id);
+
+                               // Update entry
+                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_refbanner` SET url='%s', alternate='%s', `visible`='%s' WHERE `id`=%s LIMIT 1",
                                array(
-                                       REQUEST_POST('url', $id),
-                                       REQUEST_POST('alternate', $id),
-                                       REQUEST_POST('visible'),
-                                       $id
+                               REQUEST_POST('url', $id),
+                               REQUEST_POST('alternate', $id),
+                               REQUEST_POST('visible'),
+                               $id
                                ), __FILE__, __LINE__);
-               }
-               break;
+                       }
+                       break;
        }
 
        if (SQL_AFFECTEDROWS() == 1) {
@@ -106,7 +106,7 @@ VALUES ('%s','%s','%s')",
        foreach (REQUEST_POST('sel') as $id => $sel) {
                // Load data
                $result = SQL_QUERY_ESC("SELECT url, alternate, visible FROM `{!_MYSQL_PREFIX!}_refbanner` WHERE `id`=%s LIMIT 1",
-                       array(bigintval($id)), __FILE__, __LINE__);
+               array(bigintval($id)), __FILE__, __LINE__);
                list($url, $alt, $vis) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
 
@@ -134,13 +134,13 @@ VALUES ('%s','%s','%s')",
                // Delete banner
                foreach (REQUEST_POST('sel') as $id => $sel) {
                        SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_refbanner` WHERE `id`=%s LIMIT 1",
-                               array(bigintval($id)), __FILE__, __LINE__);
+                       array(bigintval($id)), __FILE__, __LINE__);
                }
        }
 
        // Referal levels
        $result = SQL_QUERY("SELECT id, url, alternate, visible, counter, clicks FROM `{!_MYSQL_PREFIX!}_refbanner` ORDER BY url",
-               __FILE__, __LINE__);
+       __FILE__, __LINE__);
        if (SQL_NUMROWS($result) > 0) {
                // Make referal banner editable and deletable
                $OUT = ''; $SW = 2;
index 86c4f765b83517366883ba805fe8eb4ca942410f..1c523a686889fb384f9f1f342cc68e3efb8ce33f 100644 (file)
@@ -56,7 +56,7 @@ while ($content = SQL_FETCHARRAY($result_fix)) {
 
        // Fix weight
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET sort=%s WHERE `id`=%s LIMIT 1",
-               array($cnt, $content['id']), __FILE__, __LINE__);
+       array($cnt, $content['id']), __FILE__, __LINE__);
        $REP += SQL_AFFECTEDROWS();
 
        // Count one up
@@ -69,12 +69,12 @@ SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `sort`='999' WHERE `action`
 // Now sort every each menu
 foreach ($ACTIONS as $act) {
        $result_fix = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
-               array($act), __FILE__, __LINE__);
+       array($act), __FILE__, __LINE__);
        $cnt = 1;
        while ($content = SQL_FETCHARRAY($result_fix)) {
                // Fix weight
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET sort=%s WHERE `id`=%s LIMIT 1",
-                       array($cnt, $content['id']), __FILE__, __LINE__);
+               array($cnt, $content['id']), __FILE__, __LINE__);
                $REP += SQL_AFFECTEDROWS();
 
                // Count one up
index bdc599ce7643e3d2e034c28a9b6220464567a977..f0e0168ee1afd009580f5242f9766dfa019ed7ba 100644 (file)
@@ -51,11 +51,11 @@ if (SQL_NUMROWS($result) > 0) {
        $REMOVED = 0; // Nothing is removed for now... ;-)
        while ($content = SQL_FETCHARRAY($result)) {
                $result_user = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                       array(bigintval($content['userid'])), __FILE__, __LINE__);
+               array(bigintval($content['userid'])), __FILE__, __LINE__);
                if (SQL_NUMROWS($result_user) == 0) {
                        // Ok, we found something to remove
                        SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_cats` WHERE userid=%s",
-                               array(bigintval($content['userid'])), __FILE__, __LINE__);
+                       array(bigintval($content['userid'])), __FILE__, __LINE__);
                        $REMOVED += SQL_AFFECTEDROWS();
                } else {
                        // Free memory
index 1b468759c51364d3e02812dbe361d9b457aab669..50fc21ed3f96e0a48b398753be4b99263e96a505 100644 (file)
@@ -66,12 +66,12 @@ $result_sort = SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET sort='999' W
 // Now sort every each menu
 foreach ($ACTIONS as $act) {
        $result_fix = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
-               array($act), __FILE__, __LINE__);
+       array($act), __FILE__, __LINE__);
        $cnt = 1;
        while ($content = SQL_FETCHARRAY($result_fix)) {
                // Fix weight
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET sort=%s WHERE `id`=%s LIMIT 1",
-                       array($cnt, $content['id']), __FILE__, __LINE__);
+               array($cnt, $content['id']), __FILE__, __LINE__);
                $REP += SQL_AFFECTEDROWS();
 
                // Count one up
index c489100b49417fb0a77feca29fc8026b5dcf7a19..a6afa5cfdda68437823460d1774fd472597f3ac7 100644 (file)
@@ -56,7 +56,7 @@ while ($content = SQL_FETCHARRAY($result_fix)) {
 
        // Fix weight
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET sort=%s WHERE `id`=%s LIMIT 1",
-               array($cnt, $content['id']), __FILE__, __LINE__);
+       array($cnt, $content['id']), __FILE__, __LINE__);
        $REP += SQL_AFFECTEDROWS();
 
        // Count one up
@@ -69,12 +69,12 @@ SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET sort='999' WHERE `action`=
 // Now sort every each menu
 foreach ($ACTIONS as $act) {
        $result_fix = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
-               array($act), __FILE__, __LINE__);
+       array($act), __FILE__, __LINE__);
        $cnt = 1;
        while ($content = SQL_FETCHARRAY($result_fix)) {
                // Fix weight
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET sort=%s WHERE `id`=%s LIMIT 1",
-                       array($cnt, $content['id']), __FILE__, __LINE__);
+               array($cnt, $content['id']), __FILE__, __LINE__);
                $REP += SQL_AFFECTEDROWS();
 
                // Count one up
index 35c27142665b38015a6f7bdd9408a83c92972c78..7afc2e81400b35a20ed9056c9c1c16bc58d3692c 100644 (file)
@@ -62,7 +62,7 @@ if ((REQUEST_GET('mod') == 'index') || (REQUEST_GET('mod') == 'login')) {
 
        // Load module's detail statistic
        $result = SQL_QUERY_ESC("SELECT action, title, counter FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `what` != '' AND `what` IS NOT NULL ORDER BY counter DESC",
-               array($mod), __FILE__, __LINE__);
+       array($mod), __FILE__, __LINE__);
        $OUT = ''; $SW = 2;
        while ($content = SQL_FETCHARRAY($result)) {
                // Add color switch
index 57123d9487eaae15debe4d27b1ae65af8ba10784..804e29413fef74ece1565f4e33fa47970c5eafa5 100644 (file)
@@ -56,7 +56,7 @@ if (REQUEST_GET('uid') == "all") {
        // Is the form sent?
        if ((IS_FORM_SENT()) && (REQUEST_POST('points') > 0)) {
                $result_main = SQL_QUERY("SELECT userid, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `status`='CONFIRMED' ORDER BY `userid` ASC",
-                       __FILE__, __LINE__);
+               __FILE__, __LINE__);
                while ($content = SQL_FETCHARRAY($result_main)) {
                        // Ok, add points to used points and send an email to him...
                        SUB_POINTS("admin_all", $content['userid'], REQUEST_POST('points'));
@@ -82,7 +82,7 @@ if (REQUEST_GET('uid') == "all") {
 } elseif (REQUEST_ISSET_GET('uid')) {
        // User ID found in URL so we use this give him some credits
        $result = SQL_QUERY_ESC("SELECT surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
-               array(bigintval(REQUEST_GET('uid'))),__FILE__, __LINE__);
+       array(bigintval(REQUEST_GET('uid'))),__FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Selected user does exist
                $content = SQL_FETCHARRAY($result);
index 05416d05f5ab21a81e347a81009ccbb589d43dac..7db1aaf511aef397877bd8471ebd0ae3d0d15fd2 100644 (file)
@@ -52,7 +52,7 @@ if (REQUEST_ISSET_GET(('url_id'))) {
 FROM `{!_MYSQL_PREFIX!}_surfbar_stats`
 WHERE `url_id`=%s
 ORDER BY `userid` ASC",
-               array(bigintval(REQUEST_GET('url_id'))), __FILE__, __LINE__);
+       array(bigintval(REQUEST_GET('url_id'))), __FILE__, __LINE__);
 
        // Entries found?
        if (SQL_NUMROWS($result) > 0) {
index 57c5ffe1a1c77b25102802a65c2b95083ceaca11..f95e49cec0a3a27d2a13f13457c63791f2a9047f 100644 (file)
@@ -137,7 +137,7 @@ if (SQL_NUMROWS($result) > 0) {
        // Free memory
        SQL_FREERESULT($result);
 } else {
-               // No themes found???
+       // No themes found???
        $OUT .= "<tr>
   <td colspan=\"7\" class=\"bottom2\" height=\"60\">
     ".LOAD_TEMPLATE('admin_settings_saved', true, getMessage('ADMIN_NO_THEMES_FOUND'))."
index 72caa77374bcb5c7c01645e8339f2c85f6cf40f5..2dc7a4535ea9856ffb6bf35ebc5f9afbaf0921b2 100644 (file)
@@ -64,7 +64,7 @@ if (REQUEST_ISSET_POST('theme')) {
                        // Register it ith the exchange
                        SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_themes` (`theme_path`,`theme_active`,`theme_ver`,`theme_name`)
 VALUES ('%s','N','%s','%s')",
-                               array(REQUEST_POST('theme'), $GLOBALS['theme_data']['version'], $GLOBALS['theme_data']['name']), __FILE__, __LINE__);
+                       array(REQUEST_POST('theme'), $GLOBALS['theme_data']['version'], $GLOBALS['theme_data']['name']), __FILE__, __LINE__);
 
                        // Destroy cache
                        rebuildCacheFiles("themes", "them");
index 7411003f73633a4828db2c27dd3ae6aa0a0fbf50..36a3e66ed4e5d3bb593ba196dd0a0d4d2456d746 100644 (file)
@@ -79,7 +79,7 @@ INNER JOIN `{!_MYSQL_PREFIX!}_payments` AS pay
 ON po.payment_id=pay.id
 WHERE po.id=%s
 LIMIT 1",
-                                       array($id), __FILE__, __LINE__);
+                               array($id), __FILE__, __LINE__);
 
                                // Update wents fine?
                                if (SQL_NUMROWS($result) == 1) {
@@ -99,7 +99,7 @@ LIMIT 1",
                                        if ((GET_EXT_VERSION('bonus') >= '0.4.4') && (getConfig('bonus_active') == 'Y')) {
                                                // Add points directly
                                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET bonus_order=bonus_order+".getConfig('bonus_order')." WHERE userid=%s LIMIT 1",
-                                                       array(bigintval($DATA['sender'])), __FILE__, __LINE__);
+                                               array(bigintval($DATA['sender'])), __FILE__, __LINE__);
 
                                                // Subtract bonus points from system
                                                BONUS_POINTS_HANDLER(getConfig('bonus_order'));
@@ -113,7 +113,7 @@ LIMIT 1",
 
                                        // Unlock selected email
                                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET data_type='NEW' WHERE `id`=%s AND data_type='ADMIN' LIMIT 1",
-                                               array($id), __FILE__, __LINE__);
+                                       array($id), __FILE__, __LINE__);
                                } // END - if
                        } // END - foreach
 
@@ -136,7 +136,7 @@ LIMIT 1",
 
                                // Load URL and subject from pool
                                $result = SQL_QUERY_ESC("SELECT url, subject, sender FROM `{!_MYSQL_PREFIX!}_pool` WHERE `id`=%s LIMIT 1",
-                                       array($id), __FILE__, __LINE__);
+                               array($id), __FILE__, __LINE__);
 
                                // Load data
                                $DATA = SQL_FETCHARRAY($result);
@@ -153,7 +153,7 @@ LIMIT 1",
 
                                // Redirect URL
                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET url='%s', data_type='NEW' WHERE `id`=%s LIMIT 1",
-                                       array(REQUEST_POST('redirect'), $id),__FILE__, __LINE__);
+                               array(REQUEST_POST('redirect'), $id),__FILE__, __LINE__);
 
                                // Prepare data for the row template
                                $content = array(
@@ -182,11 +182,11 @@ LIMIT 1",
 
                        // Lookup in blacklist
                        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_url_blacklist` WHERE `url`='%s' LIMIT 1",
-                               array($url), __FILE__, __LINE__);
+                       array($url), __FILE__, __LINE__);
                        if (SQL_NUMROWS($result) == 0) {
                                // Did not find a record so we can add it... :)
                                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_url_blacklist` (`url`,`pool_id`) VALUES ('%s',%s)",
-                                       array($url, $id), __FILE__, __LINE__);
+                               array($url, $id), __FILE__, __LINE__);
                        } // END - if
 
                        // Free memory
index 65418b104b5864f4332cc2e03673fc7747259304..58a59baed3cde224f701dc268f23cbd8592afcd4 100644 (file)
@@ -61,7 +61,7 @@ if (IS_FORM_SENT()) {
                        $result_main = SQL_QUERY_ESC("SELECT gender, surname, family, email, remote_addr, sponsor_created, points_amount, refid
 FROM `{!_MYSQL_PREFIX!}_sponsor_data`
 WHERE `status`='PENDING' AND id='%s' LIMIT 1",
-                               array($content['id']), __FILE__, __LINE__);
+                       array($content['id']), __FILE__, __LINE__);
 
                        if (SQL_NUMROWS($result_main) == 1) {
                                // Load data
@@ -75,7 +75,7 @@ LEFT JOIN `{!_MYSQL_PREFIX!}_sponsor_paytypes` AS sp
 ON sp.id=so.payid
 WHERE so.sponsorid='%s'
 ORDER BY sp.pay_name",
-                                       array($content['id']), __FILE__, __LINE__);
+                               array($content['id']), __FILE__, __LINE__);
                                if (SQL_NUMROWS($result) > 0) {
                                        // Payment does exist
                                        while ($content2 = SQL_FETCHARRAY($result)) {
@@ -96,7 +96,7 @@ ORDER BY sp.pay_name",
                                                        'stamp' => generateDateTime($content['pay_ordered'], '2'),
                                                        'pname' => $content['pay_name'],
                                                );
-       
+
                                                // Load email template
                                                $content['msg'] = LOAD_EMAIL_TEMPLATE("sponsor_unlock_sponsor_pay", $data, $content['id']);
                                        }
@@ -115,7 +115,7 @@ ORDER BY sp.pay_name",
                        // Unlock sponsor account
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET `status`='CONFIRMED'
 WHERE `id`='%s' AND `status`='PENDING' LIMIT 1",
-                               array($content['id']), __FILE__, __LINE__);
+                       array($content['id']), __FILE__, __LINE__);
 
                        // Update, if applyable, referal count and points
                        if (($content['refid'] > 0) && ($content['refid'] != $content['id'])) {
@@ -123,7 +123,7 @@ WHERE `id`='%s' AND `status`='PENDING' LIMIT 1",
                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data`
 SET points_amount=points_amount+%s, ref_count=ref_count+1
 WHERE `id`='%s' LIMIT 1",
-                                       array(getConfig('sponsor_ref_points'), bigintval($content['refid'])), __FILE__, __LINE__);
+                               array(getConfig('sponsor_ref_points'), bigintval($content['refid'])), __FILE__, __LINE__);
 
                                // Whas that update fine?
                                if (SQL_AFFECTEDROWS() == 1) {
@@ -132,7 +132,7 @@ WHERE `id`='%s' LIMIT 1",
 (points_amount - points_used) AS points, receive_warnings, ref_count AS refs
 FROM `{!_MYSQL_PREFIX!}_sponsor_data`
 WHERE `id`='%s' LIMIT 1",
-                                               array(bigintval($content['refid'])), __FILE__, __LINE__);
+                                       array(bigintval($content['refid'])), __FILE__, __LINE__);
                                        $REFERRAL = SQL_FETCHARRAY($result);
 
                                        // Send warnings out?
index bd1a7e0378db7f35c3d1bf29b8d66abc094c1b17..0f77c2730caa11d760d009ed4137b582a30540f8 100644 (file)
@@ -51,16 +51,16 @@ $usage = getConfig('usage_base') . '/';
 if (REQUEST_ISSET_GET(('image'))) {
        if (REQUEST_GET('type') == 'usage') {
                $FQFN = sprintf("%s%s/usage.png",
-                       constant('PATH'),
-                       getConfig('usage_base')
+               constant('PATH'),
+               getConfig('usage_base')
                );
        } else {
                if (strpos(REQUEST_GET('image'), "\\") > 0) REQUEST_SET_GET('image', substr(REQUEST_GET('image'), 0, strpos(REQUEST_GET('image'), "\\")));
                $FQFN = sprintf("%s%s/%s_usage_%s.png",
-                       constant('PATH'),
-                       getConfig('usage_base'),
-                       REQUEST_GET(('type')),
-                       REQUEST_GET(('image'))
+               constant('PATH'),
+               getConfig('usage_base'),
+               REQUEST_GET(('type')),
+               REQUEST_GET(('image'))
                );
        }
 
@@ -73,14 +73,14 @@ if (REQUEST_ISSET_GET(('image'))) {
        shutdown();
 } elseif (!REQUEST_ISSET_GET(('usage'))) {
        $FQFN = sprintf("%s%s/index.html",
-               constant('PATH'),
-               getConfig('usage_base')
+       constant('PATH'),
+       getConfig('usage_base')
        );
 } else {
        $FQFN = sprintf("%s%s/usage_%s.html",
-               constant('PATH'),
-               getConfig('usage_base'),
-               REQUEST_GET(('usage'))
+       constant('PATH'),
+       getConfig('usage_base'),
+       REQUEST_GET(('usage'))
        );
 }
 
index 1fd14be6b8844120c1e41612f9a0523f9ed849b3..002bccaa9f88a9310f545207fe384a91bc8ecb64 100644 (file)
@@ -49,7 +49,7 @@ ADD_DESCR('admin', __FILE__);
 if ((REQUEST_ISSET_GET('uid')) && (bigintval(REQUEST_GET('uid')) > 0)) {
        // Load user data and display it
        $result = SQL_QUERY_ESC("SELECT surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-               array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+       array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
 
        // Is a user account found?
        if (SQL_NUMROWS($result) == 1) {
index b73b91080718a5a165f69218fc074bdb6ca57438..404bf3f0c1fd93409cad1173563edd0a872f5da7 100644 (file)
@@ -59,7 +59,7 @@ if (EXT_IS_ACTIVE('online')) {
 
        // Check for online users
        $result = SQL_QUERY("SELECT id, ip, userid, refid, module, action, what, is_member, is_admin, timestamp FROM `{!_MYSQL_PREFIX!}_online` ORDER by timestamp DESC",
-               __FILE__, __LINE__);
+       __FILE__, __LINE__);
        if (SQL_NUMROWS($result) > 0) {
                // Load header template
                LOAD_TEMPLATE('admin_online_header');
index 64e2f26ce1dfa1ace676eb59ba84bd33fdcd2fe4..bba4b8c3e410951b366493dec175915ab38103e1 100644 (file)
@@ -56,7 +56,7 @@ if (isUserIdSet() && (isSessionVariableSet('u_hash'))) {
 
        // Get theme from profile
        $result = SQL_QUERY_ESC("SELECT curr_theme".$add." FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-               array(getUserId()), __FILE__, __LINE__);
+       array(getUserId()), __FILE__, __LINE__);
 
        // Load data
        $data = SQL_FETCHARRAY($result);
@@ -74,7 +74,7 @@ if (isUserIdSet() && (isSessionVariableSet('u_hash'))) {
 SET login_failures=0, last_failure='0000-00-00 00:00:00'
 WHERE userid=%s
 LIMIT 1",
-                       array(getUserId()), __FILE__, __LINE__);
+               array(getUserId()), __FILE__, __LINE__);
 
                // Store it in session
                setSession('mxchange_member_failures', $data['login_failures']);
@@ -89,10 +89,10 @@ LIMIT 1",
 SET last_login=UNIX_TIMESTAMP()
 WHERE userid=%s AND last_login < (UNIX_TIMESTAMP() - %s)
 LIMIT 1",
-                       array(
-                               getUserId(),
-                               getConfig('login_timeout')
-                       ), __FILE__, __LINE__
+               array(
+               getUserId(),
+               getConfig('login_timeout')
+               ), __FILE__, __LINE__
                );
                if (SQL_AFFECTEDROWS() == 1) $bonus = true;
        } // END - if
index 80e829565226a8a54125e90a22836e87a747a304..3c81aa5e3b2d37874a516d5db4f94405e572d5f3 100644 (file)
@@ -49,7 +49,7 @@ if (REQUEST_ISSET_GET(('order'))) {
        if (IS_MEMBER()) {
                // Ok, test passed... :)
                $result = SQL_QUERY_ESC("SELECT subject, url FROM `{!_MYSQL_PREFIX!}_pool` WHERE `id`=%s AND sender=%s AND data_type='TEMP' LIMIT 1",
-                       array(bigintval(REQUEST_GET('order')), getUserId()), __FILE__, __LINE__);
+               array(bigintval(REQUEST_GET('order')), getUserId()), __FILE__, __LINE__);
 
                // Finally is the entry valid?
                if (SQL_NUMROWS($result) == 1) {
@@ -89,34 +89,34 @@ if ((REQUEST_ISSET_POST(('url'))) || (REQUEST_ISSET_GET(('url'))) || (REQUEST_IS
        if (REQUEST_ISSET_GET(('frame'))) $frame = REQUEST_GET(('frame'));
        switch ($frame)
        {
-       case '':
-               switch ($mode)
-               {
-               case 'member':
-                       // Build frameset
-                       define('__ORDER_VALUE', bigintval(REQUEST_GET('order')));
-                       define('__URL_VALUE'  , DEREFERER($url));
-                       LOAD_TEMPLATE('member_order_frametester');
-                       break;
+               case '':
+                       switch ($mode)
+                       {
+                               case 'member':
+                                       // Build frameset
+                                       define('__ORDER_VALUE', bigintval(REQUEST_GET('order')));
+                                       define('__URL_VALUE'  , DEREFERER($url));
+                                       LOAD_TEMPLATE('member_order_frametester');
+                                       break;
 
-               case 'guest':
-                       define('__URL_VALUE'  , DEREFERER($url));
-                       LOAD_TEMPLATE('guest_frametester');
+                               case 'guest':
+                                       define('__URL_VALUE'  , DEREFERER($url));
+                                       LOAD_TEMPLATE('guest_frametester');
+                                       break;
+                       }
                        break;
-               }
-               break;
 
-       case 'test_top':
-               LOAD_TEMPLATE('admin_settings_saved', false, '<div class="guest_done">{--GUEST_FRAMETESTER_TOP--}</span>');
-               break;
+                               case 'test_top':
+                                       LOAD_TEMPLATE('admin_settings_saved', false, '<div class="guest_done">{--GUEST_FRAMETESTER_TOP--}</span>');
+                                       break;
 
-       case 'back': // Back buttom
-               LOAD_TEMPLATE('member_order_back', false, REQUEST_GET('order'));
-               break;
+                               case 'back': // Back buttom
+                                       LOAD_TEMPLATE('member_order_back', false, REQUEST_GET('order'));
+                                       break;
 
-       case 'send': // Send mail away
-               LOAD_TEMPLATE('member_order_send', false, REQUEST_GET('order'));
-               break;
+                               case 'send': // Send mail away
+                                       LOAD_TEMPLATE('member_order_send', false, REQUEST_GET('order'));
+                                       break;
        }
 } else {
        // Go away...
index f1aeadc24b28b275822cbdefd0ea328b1e49d4f3..d8c3188863f84adbdac837edf1f6fa03bfd3ced9 100644 (file)
@@ -40,7 +40,7 @@
 if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
        require($INC);
-} elseif ((!EXT_IS_ACTIVE("")) && (!IS_ADMIN())) {
+} elseif ((!EXT_IS_ACTIVE('')) && (!IS_ADMIN())) {
        addFatalMessage(__FILE__, __LINE__, EXTENSION_PROBLEM_EXT_INACTIVE, "");
        return;
 } elseif ($BLOCK_MODE) {
index 53f144ba4a4b79705ca9dd5f45fb6bf5c2fada85..7cde3f864e2c1ad3a568f09afa58d97f7782d939 100644 (file)
@@ -59,7 +59,7 @@ $result = SQL_QUERY_ESC("SELECT userid, ".$add.", last_online
 FROM `{!_MYSQL_PREFIX!}_user_data`
 WHERE last_online >= %s AND `status`='CONFIRMED'
 ORDER BY last_online DESC LIMIT %s",
-       array(START_TDAY, getConfig('active_limit')), __FILE__, __LINE__);
+array(START_TDAY, getConfig('active_limit')), __FILE__, __LINE__);
 
 // Entries found?
 if (SQL_NUMROWS($result) > 0) {
index 91595cf84aa762ef7f4b2821e89f602cc462e256..75ddaba89b46491d10f61ea6eb8b35a02e59e014 100644 (file)
@@ -51,14 +51,14 @@ if (REQUEST_ISSET_GET(('hash'))) {
 
        // Search for an unconfirmed or confirmed account
        $result = SQL_QUERY_ESC("SELECT userid, email, refid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE user_hash='%s' AND (`status`='UNCONFIRMED' OR `status`='CONFIRMED') LIMIT 1",
-               array(REQUEST_GET('hash')), __FILE__, __LINE__);
+       array(REQUEST_GET('hash')), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Ok, he want's to confirm now so we load some data
                list ($uid, $email, $rid) = SQL_FETCHROW($result);
 
                // Unlock his account (but only when it is on UNCONFIRMED!)
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `status`='CONFIRMED', ref_payout=%s, user_hash=NULL WHERE user_hash='%s' AND `status`='UNCONFIRMED' LIMIT 1",
-                       array(getConfig('ref_payout'), REQUEST_GET('hash')), __FILE__, __LINE__);
+               array(getConfig('ref_payout'), REQUEST_GET('hash')), __FILE__, __LINE__);
                if (SQL_AFFECTEDROWS() == 1) {
                        $msg = LOAD_EMAIL_TEMPLATE("confirm-member", array('points' => getConfig('points_register')), bigintval($uid));
 
@@ -69,7 +69,7 @@ if (REQUEST_ISSET_GET(('hash'))) {
                        if (($rid > 0) && ($rid != $uid)) {
                                // Select the referal userid
                                $result = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                                       array(bigintval($rid)), __FILE__, __LINE__);
+                               array(bigintval($rid)), __FILE__, __LINE__);
                                if (SQL_NUMROWS($result) == 1) {
                                        // Update ref counter...
                                        updateReferalCounter($rid);
@@ -90,7 +90,7 @@ if (REQUEST_ISSET_GET(('hash'))) {
                                        if ((GET_EXT_VERSION('bonus') >= '0.4.4') && (getConfig('bonus_active') == 'Y')) {
                                                // Add points (directly only!)
                                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET bonus_ref=bonus_ref+%s WHERE userid=%s LIMIT 1",
-                                                       array(getConfig('bonus_ref'), bigintval($rid)), __FILE__, __LINE__);
+                                               array(getConfig('bonus_ref'), bigintval($rid)), __FILE__, __LINE__);
 
                                                // Subtract points from system
                                                BONUS_POINTS_HANDLER(getConfig('bonus_ref'));
@@ -140,25 +140,25 @@ if (REQUEST_ISSET_GET(('hash'))) {
 } elseif ((IS_FORM_SENT()) && (REQUEST_ISSET_POST(('email')))) {
        // Confirmation link requested      0     1         2
        $result = SQL_QUERY_ESC("SELECT userid, status, user_hash FROM `{!_MYSQL_PREFIX!}_user_data` WHERE email='%s' LIMIT 1",
-               array(REQUEST_POST('email')), __FILE__, __LINE__);
+       array(REQUEST_POST('email')), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Email address found
                $DATA = SQL_FETCHROW($result);
                switch ($DATA[1])
                {
-               case "UNCONFIRMED": // Account not confirmed
-                       $msg = LOAD_EMAIL_TEMPLATE("guest_request_confirm", array('hash' => $DATA[2]), $DATA[0]);
-                       sendEmail(REQUEST_POST('email'), getMessage('REQUEST_CONFIRM_LINK_SUBJ'), $msg);
-                       $content = getMessage('CONFIRM_LINK_SENT');
-                       break;
-
-               case 'CONFIRMED': // Account already confirmed
-                       $content = getMessage('LOGIN_ID_CONFIRMED');
-                       break;
-
-               case "LOCKED": // Account is locked
-                       $content = getMessage('LOGIN_ID_LOCKED');
-                       break;
+                       case "UNCONFIRMED": // Account not confirmed
+                               $msg = LOAD_EMAIL_TEMPLATE("guest_request_confirm", array('hash' => $DATA[2]), $DATA[0]);
+                               sendEmail(REQUEST_POST('email'), getMessage('REQUEST_CONFIRM_LINK_SUBJ'), $msg);
+                               $content = getMessage('CONFIRM_LINK_SENT');
+                               break;
+
+                       case 'CONFIRMED': // Account already confirmed
+                               $content = getMessage('LOGIN_ID_CONFIRMED');
+                               break;
+
+                       case "LOCKED": // Account is locked
+                               $content = getMessage('LOGIN_ID_LOCKED');
+                               break;
                }
        } else {
                // Email address not registered
index 1d585370a6f543e744ffc11bff5722ada9031391..7b85a732aa0b94e97bde4593a53ad7bed9909727 100644 (file)
@@ -64,13 +64,13 @@ define('__DOUBLER_COUNTER', getConfig('doubler_counter'));
 // Which mail-send-mode did the admin setup?
 switch (getConfig('doubler_send_mode'))
 {
-case "DIRECT":
-       define('DOUBLER_PAYOUT_TIME', DOUBLER_PAYOUT_TIME_DIRECT);
-       break;
+       case "DIRECT":
+               define('DOUBLER_PAYOUT_TIME', DOUBLER_PAYOUT_TIME_DIRECT);
+               break;
 
-case "RESET":
-       define('DOUBLER_PAYOUT_TIME', DOUBLER_PAYOUT_TIME_RESET);
-       break;
+       case "RESET":
+               define('DOUBLER_PAYOUT_TIME', DOUBLER_PAYOUT_TIME_RESET);
+               break;
 }
 
 // Generate table with already payed out doubles
index c0f493ff823eb197e41efa43566c637860984017..36a113f829322b85ef62333747c6f47c146d1a7b 100644 (file)
@@ -146,12 +146,12 @@ if (!empty($errorCode)) {
                        DEBUG_LOG(__FILE__, __LINE__, sprintf("Unhandled error code %s detected.", $errorCode));
                        $message .= getMessage('LOGIN_WRONG_ID');
                        break;
-               }
-               $message .= "</span>
+       }
+       $message .= "</span>
   </td>
   <td width=\"10\" class=\"seperator\">&nbsp;</td>
 </tr>\n";
-               define('LOGIN_FAILURE_MSG', $message);
+       define('LOGIN_FAILURE_MSG', $message);
 } else {
        // No problems, no output
        define('LOGIN_FAILURE_MSG', '');
index a9a263de05018039d883ddd7fc23b17561e8ea99..d024107efb7623e68f963db284462d0fc8d71c4b 100644 (file)
@@ -220,24 +220,24 @@ if (EXT_IS_ACTIVE('doubler')) {
                'lang'  => getMessage('MEDIA_DOUBLER_COUNT'),
                'value' => $count1,
                'rows'  => '4'
-       );
-       // Add points
-       $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row2', true, $content);
-       $content = array(
+               );
+               // Add points
+               $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row2', true, $content);
+               $content = array(
                'lang'  => getMessage('MEDIA_DOUBLER_CPOINTS'),
                'value' => translateComma($points1)
-       );
-       $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row', true, $content);
-       $content = array(
+               );
+               $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row', true, $content);
+               $content = array(
                'lang'  => getMessage('MEDIA_DOUBLER_WAITING'),
                'value' => translateComma($count2)
-       );
-       $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row', true, $content);
-       $content = array(
+               );
+               $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row', true, $content);
+               $content = array(
                'lang'  => getMessage('MEDIA_DOUBLER_WPOINTS'),
                'value' => translateComma($points2)
-       );
-       $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row', true, $content);
+               );
+               $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row', true, $content);
 }
 
 if (EXT_IS_ACTIVE('holiday')) {
@@ -247,7 +247,7 @@ FROM `{!_MYSQL_PREFIX!}_user_holidays` AS h
 LEFT JOIN `{!_MYSQL_PREFIX!}_user_data` AS d
 ON h.userid=d.userid
 WHERE d.`holiday_active`='Y'",
- __FILE__, __LINE__);
      __FILE__, __LINE__);
        list($holiday) = SQL_FETCHROW($result);
        if (empty($holiday)) $holiday = 0;
        $content = array(
@@ -264,7 +264,7 @@ if (EXT_IS_ACTIVE('transfer')) {
 FROM `{!_MYSQL_PREFIX!}_user_transfers_in` AS t
 LEFT JOIN `{!_MYSQL_PREFIX!}_user_data` AS d
 ON t.userid=d.userid",
- __FILE__, __LINE__);
      __FILE__, __LINE__);
        list($count_in, $points_in) = SQL_FETCHROW($result);
        if (empty($count_in))  $count_in  = 0;
        if (empty($points_in)) $points_in = 0;
@@ -273,7 +273,7 @@ ON t.userid=d.userid",
 FROM `{!_MYSQL_PREFIX!}_user_transfers_out` AS t
 LEFT JOIN `{!_MYSQL_PREFIX!}_user_data` AS d
 ON t.userid=d.userid",
- __FILE__, __LINE__);
      __FILE__, __LINE__);
        list($count_out, $points_out) = SQL_FETCHROW($result);
        if (empty($count_out))  $count_out  = 0;
        if (empty($points_out)) $points_out = 0;
@@ -284,23 +284,23 @@ ON t.userid=d.userid",
                'lang'  => getMessage('MEDIA_TRANSFER_IN_COUNT'),
                'value' => $count_in,
                'rows'  => '4'
-       );
-       $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row2', true, $content);
-       $content = array(
+               );
+               $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row2', true, $content);
+               $content = array(
                'lang'  => getMessage('MEDIA_TRANSFER_IN_POINTS'),
                'value' => translateComma($points_in)
-       );
-       $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row', true, $content);
-       $content = array(
+               );
+               $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row', true, $content);
+               $content = array(
                'lang'  => getMessage('MEDIA_TRANSFER_OUT_COUNT'),
                'value' => $count_out
-       );
-       $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row', true, $content);
-       $content = array(
+               );
+               $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row', true, $content);
+               $content = array(
                'lang'  => getMessage('MEDIA_TRANSFER_OUT_POINTS'),
                'value' => translateComma($points_out)
-       );
-       $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row', true, $content);
+               );
+               $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row', true, $content);
 }
 
 define('__EXTRA_MEDIADATA'  , $OUT_EXTRA);
index c856e14dd790119f9e780bffeccddd7ca58978a6..d1fcfb1cd2c8178c00e7afea645d8e9ee40b9365 100644 (file)
@@ -76,7 +76,7 @@ REQUEST_SET_POST('refid', 0);
 if ($GLOBALS['refid'] > 0) {
        // Test if the refid is valid
        $result = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-               array(bigintval($GLOBALS['refid'])), __FILE__, __LINE__);
+       array(bigintval($GLOBALS['refid'])), __FILE__, __LINE__);
 
        // Userid found?
        //* DEBUG: */ die("refid={$GLOBALS['refid']}/numRows=".SQL_NUMROWS($result)."");
@@ -163,7 +163,7 @@ if (IS_FORM_SENT()) {
        if (getConfig('ip_timeout') > 0) {
                // Check his IP number
                $result = SQL_QUERY_ESC("SELECT joined, last_update FROM `{!_MYSQL_PREFIX!}_user_data` WHERE REMOTE_ADDR='%s' AND (joined > (UNIX_TIMESTAMP() - %s) OR last_update > (UNIX_TIMESTAMP() - %s)) LIMIT 1",
-                       array(detectRemoteAddr(), getConfig('ip_timeout'), getConfig('ip_timeout')), __FILE__, __LINE__);
+               array(detectRemoteAddr(), getConfig('ip_timeout'), getConfig('ip_timeout')), __FILE__, __LINE__);
                if (SQL_NUMROWS($result) == 1) {
                        // Same IP in timeout range and different email address entered... Eat this, faker! ;-)
                        // But admins are allowed to fake their own exchange service.
@@ -198,7 +198,7 @@ if ((IS_FORM_SENT()) && (($isFailed === false) || (IS_ADMIN()))) {
        if (GET_EXT_VERSION('sql_patches') >= '0.2.7') {
                // Okay, add design here
                $ADD1 = ", `curr_theme`";
-               $ADD2 = ', ''.getCurrentTheme().''';
+               $ADD2 = ", '".getCurrentTheme()."'";
        } // END - if
 
        // Check if I shall disable sending mail to newly registered members out about active/begging rallye
@@ -239,24 +239,24 @@ if ((IS_FORM_SENT()) && (($isFailed === false) || (IS_ADMIN()))) {
        SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_data` (gender, surname, family, street_nr,%s, zip, city, email, birth_day, birth_month, birth_year, password, max_mails, receive_mails, refid, status, user_hash, REMOTE_ADDR, joined, last_update".$ADD1.")
 VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONFIRMED','%s','%s', UNIX_TIMESTAMP(), UNIX_TIMESTAMP()".$ADD2.")",
        array(
-               $countryRow,
-               substr(REQUEST_POST('gender'), 0, 1),
-               REQUEST_POST('surname'),
-               REQUEST_POST('family'),
-               REQUEST_POST('street_nr'),
-               $countryData,
-               bigintval(REQUEST_POST('zip')),
-               REQUEST_POST('city'),
-               REQUEST_POST('addy'),
-               bigintval(REQUEST_POST('day')),
-               bigintval(REQUEST_POST('month')),
-               bigintval(REQUEST_POST('year')),
-               generateHash(REQUEST_POST('pass1')),
-               bigintval(REQUEST_POST('max_mails')),
-               bigintval(REQUEST_POST('max_mails')),
-               bigintval(REQUEST_POST('refid')),
-               $hash,
-               detectRemoteAddr(),
+       $countryRow,
+       substr(REQUEST_POST('gender'), 0, 1),
+       REQUEST_POST('surname'),
+       REQUEST_POST('family'),
+       REQUEST_POST('street_nr'),
+       $countryData,
+       bigintval(REQUEST_POST('zip')),
+       REQUEST_POST('city'),
+       REQUEST_POST('addy'),
+       bigintval(REQUEST_POST('day')),
+       bigintval(REQUEST_POST('month')),
+       bigintval(REQUEST_POST('year')),
+       generateHash(REQUEST_POST('pass1')),
+       bigintval(REQUEST_POST('max_mails')),
+       bigintval(REQUEST_POST('max_mails')),
+       bigintval(REQUEST_POST('refid')),
+       $hash,
+       detectRemoteAddr(),
        ), __FILE__, __LINE__);
 
        // Get his userid
@@ -278,13 +278,13 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF
 
        // Write his welcome-points
        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_points` WHERE userid=%s AND ref_depth=0 LIMIT 1",
-               array(bigintval($userid)), __FILE__, __LINE__);
+       array(bigintval($userid)), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 0) {
                // Add only when the line was not found (maybe some more secure?)
                $locked = "points";
                if (getConfig('ref_payout') > 0) $locked = "locked_points"; // Pay him later. First he has to confirm some mails!
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_points` (userid, ref_depth, ".$locked.") VALUES (%s,0,'%s')",
-                array(bigintval($userid), getConfig('points_register')), __FILE__, __LINE__);
+               array(bigintval($userid), getConfig('points_register')), __FILE__, __LINE__);
 
                // Update mediadata as well
                if ((GET_EXT_VERSION('mediadata') >= '0.0.4') && ($locked == "points")) {
@@ -299,7 +299,7 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF
                        if ($joined == 'Y') {
                                // Insert category entry
                                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_cats` (userid, cat_id) VALUES (%s, %s)",
-                                array(bigintval($userid), bigintval($cat)), __FILE__, __LINE__);
+                               array(bigintval($userid), bigintval($cat)), __FILE__, __LINE__);
                        } // END - if
                } // END - foreach
        } // END - if
@@ -349,13 +349,13 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF
        // Continue with birthday...
        switch (getLanguage())
        {
-       case 'de':
-               $DATA['birthday'] = bigintval(REQUEST_POST('day')).'.'.bigintval(REQUEST_POST('month')).'.'.bigintval(REQUEST_POST('year'));
-               break;
+               case 'de':
+                       $DATA['birthday'] = bigintval(REQUEST_POST('day')).'.'.bigintval(REQUEST_POST('month')).'.'.bigintval(REQUEST_POST('year'));
+                       break;
 
-       default:
-               $DATA['birthday'] = bigintval(REQUEST_POST('month')).'/'.bigintval(REQUEST_POST('day')).'/'.bigintval(REQUEST_POST('year'));
-               break;
+               default:
+                       $DATA['birthday'] = bigintval(REQUEST_POST('month')).'/'.bigintval(REQUEST_POST('day')).'/'.bigintval(REQUEST_POST('year'));
+                       break;
        }
 
        // Display information to the user that he got mail and send it away
@@ -417,13 +417,13 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF
        // Generate birthday selection
        switch (getLanguage())
        {
-       case 'de': // German date format
-               define('BIRTHDAY_SELECTION', ADD_SELECTION('day', REQUEST_POST('day')).ADD_SELECTION('month', REQUEST_POST('month')).ADD_SELECTION('year', REQUEST_POST('year')));
-               break;
+               case 'de': // German date format
+                       define('BIRTHDAY_SELECTION', ADD_SELECTION('day', REQUEST_POST('day')).ADD_SELECTION('month', REQUEST_POST('month')).ADD_SELECTION('year', REQUEST_POST('year')));
+                       break;
 
-       default: // Default is the US date format... :)
-               define('BIRTHDAY_SELECTION', ADD_SELECTION('month', REQUEST_POST('month')).ADD_SELECTION('day', REQUEST_POST('day')).ADD_SELECTION('year', REQUEST_POST('year')));
-               break;
+               default: // Default is the US date format... :)
+                       define('BIRTHDAY_SELECTION', ADD_SELECTION('month', REQUEST_POST('month')).ADD_SELECTION('day', REQUEST_POST('day')).ADD_SELECTION('year', REQUEST_POST('year')));
+                       break;
        }
 
        // Adds a table for the guests with all visible categories
index 192a4b4b225e377422114efeed6c33b35c22c502..4eefc1343b0f4fb8a28dc6a7f8440f5b6f67c95e 100644 (file)
@@ -81,7 +81,7 @@ LIMIT 1", array(REQUEST_GET('hash')), __FILE__, __LINE__);
                        // Set account to pending
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET `status`='PENDING'
 WHERE `id`='%s' AND hash='%s' AND `status`='UNCONFIRMED' LIMIT 1",
-                               array(bigintval($SPONSOR['id']), REQUEST_GET('hash')), __FILE__, __LINE__);
+                       array(bigintval($SPONSOR['id']), REQUEST_GET('hash')), __FILE__, __LINE__);
 
                        // Check on success
                        if (SQL_AFFECTEDROWS() == 1) {
@@ -102,9 +102,9 @@ WHERE `id`='%s' AND hash='%s' AND `status`='UNCONFIRMED' LIMIT 1",
                        // Changed email adress need to be confirmed
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET `status`='CONFIRMED'
 WHERE `id`='%s' AND hash='%s' AND `status`='EMAIL' LIMIT 1",
-                               array(bigintval($SPONSOR['id']), REQUEST_GET('hash')), __FILE__, __LINE__);
+                       array(bigintval($SPONSOR['id']), REQUEST_GET('hash')), __FILE__, __LINE__);
 
-                       // Check on success 
+                       // Check on success
                        if (SQL_AFFECTEDROWS() == 1) {
                                // Sponsor account is unlocked again
                                LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_ACCOUNT_IS_CONFIRMED_AGAIN'));
@@ -135,7 +135,7 @@ WHERE `id`='%s' AND hash='%s' AND `status`='EMAIL' LIMIT 1",
                $result = SQL_QUERY_ESC("SELECT id, hash, status, remote_addr, gender, surname, family, sponsor_created
 FROM `{!_MYSQL_PREFIX!}_sponsor_data`
 WHERE email='%s' AND (`status`='UNCONFIRMED' OR `status`='EMAIL') LIMIT 1",
-                       array(REQUEST_POST('email')), __FILE__, __LINE__);
+               array(REQUEST_POST('email')), __FILE__, __LINE__);
 
                // Entry found?
                if (SQL_NUMROWS($result) == 1) {
@@ -181,7 +181,7 @@ WHERE email='%s' AND (`status`='UNCONFIRMED' OR `status`='EMAIL') LIMIT 1",
                $result = SQL_QUERY_ESC("SELECT id, hash, remote_addr, gender, surname, family, sponsor_created
 FROM `{!_MYSQL_PREFIX!}_sponsor_data`
 WHERE email='%s' AND id='%s' AND `status`='CONFIRMED' LIMIT 1",
-                       array(REQUEST_POST('email'), bigintval(REQUEST_POST('id'))), __FILE__, __LINE__);
+               array(REQUEST_POST('email'), bigintval(REQUEST_POST('id'))), __FILE__, __LINE__);
 
                // Entry found?
                if (SQL_NUMROWS($result) == 1) {
@@ -202,7 +202,7 @@ WHERE email='%s' AND id='%s' AND `status`='CONFIRMED' LIMIT 1",
                        // Update password
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET password='%s'
 WHERE `id`='%s' LIMIT 1",
-                               array(md5($SPONSOR['password']), bigintval($SPONSOR['id'])), __FILE__, __LINE__);
+                       array(md5($SPONSOR['password']), bigintval($SPONSOR['id'])), __FILE__, __LINE__);
 
                        // Output message
                        LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_LOST_PASSWORD_SENT'));
@@ -221,7 +221,7 @@ WHERE `id`='%s' LIMIT 1",
        // Check status and login data ...
        $result = SQL_QUERY_ESC("SELECT status FROM `{!_MYSQL_PREFIX!}_sponsor_data`
 WHERE `id`='%s' AND password='%s' LIMIT 1",
-               array(bigintval(REQUEST_POST('sponsorid')), md5(REQUEST_POST('pass'))), __FILE__, __LINE__);
+       array(bigintval(REQUEST_POST('sponsorid')), md5(REQUEST_POST('pass'))), __FILE__, __LINE__);
 
        if (SQL_NUMROWS($result) == 1) {
                // Okay, first login data check passed, now has he/she an approved (CONFIRMED) account?
@@ -229,7 +229,7 @@ WHERE `id`='%s' AND password='%s' LIMIT 1",
                if ($status == 'CONFIRMED') {
                        // Is confirmed so both is fine and we can continue with login procedure
                        $login = ((setSession('sponsorid'  , bigintval(REQUEST_POST('sponsorid')))) &&
-                                 (setSession('sponsorpass', md5(REQUEST_POST('pass'))           ))
+                       (setSession('sponsorpass', md5(REQUEST_POST('pass'))           ))
                        );
 
                        if ($login === true) {
index fbd31a5ef6cffa2852f38e28966d2f6b750ab878..6bcfa6c4078cae9f8d8e5819c6b1a1a1acae1385 100644 (file)
@@ -191,7 +191,7 @@ if (IS_FORM_SENT()) {
                // Homepage URL is empty
                $FORM_ERRORS[] = getMessage('SPONSOR_TERMS_NOT_ACCEPTED');
        }
-       
+
        // If there is something wrong/missing stop registration
        if (count($FORM_ERRORS) > 0) REQUEST_UNSET_POST('ok');
 }
@@ -224,52 +224,52 @@ WHERE `id`='%s' LIMIT 1", array(REQUEST_POST('pay_type')), __FILE__, __LINE__);
        // Check the status of the registration process
        switch ($STATUS)
        {
-       case "added": // Sponsor successfully added with account status = UNCONFIRMED!
-               // Check for his ID number
-               $result = SQL_QUERY_ESC("SELECT id, hash FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE email='%s' LIMIT 1",
+               case "added": // Sponsor successfully added with account status = UNCONFIRMED!
+                       // Check for his ID number
+                       $result = SQL_QUERY_ESC("SELECT id, hash FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE email='%s' LIMIT 1",
                        array(REQUEST_POST('email')), __FILE__, __LINE__);
-               if (SQL_NUMROWS($result) == 1) {
-                       // ID found so let's load it for the confirmation email
-                       list($id, $hash) = SQL_FETCHROW($result);
-
-                       // Prepare data for the email template
-                       define('__ID'       , $id);
-                       define('__HASH'     , $hash);
-                       define('__EMAIL'    , REQUEST_POST('email'));
-                       define('__SURNAME'  , REQUEST_POST('surname'));
-                       define('__FAMILY'   , REQUEST_POST('family'));
-                       define('__GENDER'   , translateGender(REQUEST_POST('gender')));
-                       define('__TIMESTAMP', generateDateTime(time(), 0));
-                       define('__PASSWORD' , REQUEST_POST('pass1'));
-
-                       // Generate email and send it to the new sponsor
-                       $EMAIL_MSG = LOAD_EMAIL_TEMPLATE("sponsor_confirm", $hash);
-                       sendEmail(REQUEST_POST('email'), getMessage('SPONSOR_PLEASE_CONFIRM_SUBJ'), $EMAIL_MSG);
-
-                       // Send mail to admin
-                       sendAdminNotification(getMessage('ADMIN_NEW_SPONSOR'), "admin_sponsor_reg", $hash);
-
-                       // Output message: DONE
-                       $message = $messageArray['added'];
-               } else {
-                       // Sponsor account not found???
-                       $message = sprintf(getMessage('SPONSOR_EMAIL_404'), REQUEST_POST('email'));
-               }
-
-               // Free memory
-               SQL_FREERESULT($result);
-               break;
+                       if (SQL_NUMROWS($result) == 1) {
+                               // ID found so let's load it for the confirmation email
+                               list($id, $hash) = SQL_FETCHROW($result);
+
+                               // Prepare data for the email template
+                               define('__ID'       , $id);
+                               define('__HASH'     , $hash);
+                               define('__EMAIL'    , REQUEST_POST('email'));
+                               define('__SURNAME'  , REQUEST_POST('surname'));
+                               define('__FAMILY'   , REQUEST_POST('family'));
+                               define('__GENDER'   , translateGender(REQUEST_POST('gender')));
+                               define('__TIMESTAMP', generateDateTime(time(), 0));
+                               define('__PASSWORD' , REQUEST_POST('pass1'));
+
+                               // Generate email and send it to the new sponsor
+                               $EMAIL_MSG = LOAD_EMAIL_TEMPLATE("sponsor_confirm", $hash);
+                               sendEmail(REQUEST_POST('email'), getMessage('SPONSOR_PLEASE_CONFIRM_SUBJ'), $EMAIL_MSG);
+
+                               // Send mail to admin
+                               sendAdminNotification(getMessage('ADMIN_NEW_SPONSOR'), "admin_sponsor_reg", $hash);
+
+                               // Output message: DONE
+                               $message = $messageArray['added'];
+                       } else {
+                               // Sponsor account not found???
+                               $message = sprintf(getMessage('SPONSOR_EMAIL_404'), REQUEST_POST('email'));
+                       }
 
-       default:
-               DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown status %s detected.", $STATUS));
-               if (!IS_ADMIN()) {
-                       // Message for testing admin
-                       $message = sprintf(getMessage('ADMIN_SPONSOR_UNKNOWN_STATUS'), $STATUS);
-               } else {
-                       // Message for the guest
-                       $message = sprintf(getMessage('SPONSOR_UNKNOWN_STATUS'), $STATUS);
-               }
-               break;
+                       // Free memory
+                       SQL_FREERESULT($result);
+                       break;
+
+               default:
+                       DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown status %s detected.", $STATUS));
+                       if (!IS_ADMIN()) {
+                               // Message for testing admin
+                               $message = sprintf(getMessage('ADMIN_SPONSOR_UNKNOWN_STATUS'), $STATUS);
+                       } else {
+                               // Message for the guest
+                               $message = sprintf(getMessage('SPONSOR_UNKNOWN_STATUS'), $STATUS);
+                       }
+                       break;
        }
 
        // Display message
@@ -321,37 +321,37 @@ ORDER BY pay_name", __FILE__, __LINE__);
                        // Check for gender selection
                        switch (REQUEST_POST('gender'))
                        {
-                       case "M": // Male
-                               define('__GENDER_M'  , ' selected="selected"');
-                               define('__GENDER_F'  , '');
-                               define('__GENDER_C'  , '');
-                               break;
-
-                       case "F": // Female
-                               define('__GENDER_M'  , '');
-                               define('__GENDER_F'  , ' selected="selected"');
-                               define('__GENDER_C'  , '');
-                               break;
-
-                       case "C": // Company
-                               define('__GENDER_M'  , '');
-                               define('__GENDER_F'  , '');
-                               define('__GENDER_C'  , ' selected="selected"');
-                               break;
+                               case "M": // Male
+                                       define('__GENDER_M'  , ' selected="selected"');
+                                       define('__GENDER_F'  , '');
+                                       define('__GENDER_C'  , '');
+                                       break;
+
+                               case "F": // Female
+                                       define('__GENDER_M'  , '');
+                                       define('__GENDER_F'  , ' selected="selected"');
+                                       define('__GENDER_C'  , '');
+                                       break;
+
+                               case "C": // Company
+                                       define('__GENDER_M'  , '');
+                                       define('__GENDER_F'  , '');
+                                       define('__GENDER_C'  , ' selected="selected"');
+                                       break;
                        }
 
                        // Check for receive_warnings
                        switch (REQUEST_POST('receive_warnings'))
                        {
-                       case 'Y':
-                               define('__REC_Y'    , ' selected="selected"');
-                               define('__REC_N'    , '');
-                               break;
-
-                       case 'N':
-                               define('__REC_Y'    , '');
-                               define('__REC_N'    , ' selected="selected"');
-                               break;
+                               case 'Y':
+                                       define('__REC_Y'    , ' selected="selected"');
+                                       define('__REC_N'    , '');
+                                       break;
+
+                               case 'N':
+                                       define('__REC_Y'    , '');
+                                       define('__REC_N'    , ' selected="selected"');
+                                       break;
                        }
 
                        // Errors found
index 2c217a39169a1d16d4e89a9c4bfb607d8f6a42a8..3c12d48d5c02f6c73a449d1fb71f46efa85e8d95 100644 (file)
@@ -70,176 +70,176 @@ switch (REQUEST_GET('mode')) {
 
 switch (getConfig('guest_stats'))
 {
-case 'MEMBERS': // Statistics about your members
-       // Members yesterday / today online
-       $ymem = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE last_online >= ".getConfig('START_YDAY')." AND `last_online` < ".getConfig('START_TDAY')." AND `status`='CONFIRMED'", __FILE__, __LINE__));
-       $tmem = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE last_online >= ".getConfig('START_TDAY')." AND `status`='CONFIRMED'", __FILE__, __LINE__));
-
-       // Yesterday / today registered
-       $yreg = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE joined >= ".getConfig('START_YDAY')." AND joined < ".getConfig('START_TDAY'), __FILE__, __LINE__));
-       $treg = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE joined >= ".getConfig('START_TDAY'), __FILE__, __LINE__));
-
-       // Only males / females
-       $male   = GET_TOTAL_DATA('M', 'user_data', 'userid', 'gender', true, " AND `status`='CONFIRMED'");
-       $female = GET_TOTAL_DATA('F', 'user_data', 'userid', 'gender', true, " AND `status`='CONFIRMED'");
-
-       // Unconfirmed accounts
-       $unconfirmed = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE status != 'CONFIRMED'", __FILE__, __LINE__));
-
-       // Total members
-       $total = $male + $female;
-
-       // List every month
-       $months = array();
-       for ($idx = 1; $idx < 13; $idx++) {
-               // Copy it so we don't touch the for() loop index
-               $month = $idx;
-
-               // Append leading zero
-               if ($idx < 10) $month = '0'.$idx;
-
-               // Count months
-               $months[$month] = GET_TOTAL_DATA(bigintval($month), 'user_data', 'userid', 'birth_month', true, " AND `status`='CONFIRMED'");
-       }
-
-       // Members in categories
-       $result = SQL_QUERY("SELECT id, cat FROM `{!_MYSQL_PREFIX!}_cats` WHERE `visible`='Y' ORDER BY `id`", __FILE__, __LINE__);
-
-       // Load categories first
-       $cats = array(); $cat_cnt = array();
-       // @TODO This can be somehow rewritten
-       while ($content = SQL_FETCHARRAY($result)) {
-               // Simple...
-               $cats[$content['id']] = $content['cat'];
-       }
-
-       // Now we have all categories loaded, count members
-       foreach ($cats as $id => $dummy) {
-               // We only need id and nothing more to count...
-               $cat_cnt[$id] = GET_TOTAL_DATA(bigintval($id), 'user_cats', 'id', 'cat_id', true);
-       }
-
-       // Prepare data for the template
-       // @TODO Rewrite all these constants
-       define('__TOTAL_USERS' , $total);
-       define('__UNCONFIRMED' , $unconfirmed);
-       define('__MALE_COUNT'  , $male);
-       define('__FEMALE_COUNT', $female);
-       define('__TMEM_COUNT'  , $tmem);
-       define('__YMEM_COUNT'  , $ymem);
-       define('__TREG_COUNT'  , $treg);
-       define('__YREG_COUNT'  , $yreg);
-       define('__LMODE_VALUE' , $lmode);
-       define('__LINK_TITLE'  , $ltitle);
-
-       // Generate monthly stats
-       $SW = 2; $r2 = ' right2'; $l = 'll'; $r = 'lr'; $OUT = '';
-       foreach ($months as $month => $cnt) {
-               if ($SW == 2) $OUT .= "<tr>\n";
-
-               // Prepare data for template
-               $content = array(
+       case 'MEMBERS': // Statistics about your members
+               // Members yesterday / today online
+               $ymem = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE last_online >= ".getConfig('START_YDAY')." AND `last_online` < ".getConfig('START_TDAY')." AND `status`='CONFIRMED'", __FILE__, __LINE__));
+               $tmem = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE last_online >= ".getConfig('START_TDAY')." AND `status`='CONFIRMED'", __FILE__, __LINE__));
+
+               // Yesterday / today registered
+               $yreg = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE joined >= ".getConfig('START_YDAY')." AND joined < ".getConfig('START_TDAY'), __FILE__, __LINE__));
+               $treg = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE joined >= ".getConfig('START_TDAY'), __FILE__, __LINE__));
+
+               // Only males / females
+               $male   = GET_TOTAL_DATA('M', 'user_data', 'userid', 'gender', true, " AND `status`='CONFIRMED'");
+               $female = GET_TOTAL_DATA('F', 'user_data', 'userid', 'gender', true, " AND `status`='CONFIRMED'");
+
+               // Unconfirmed accounts
+               $unconfirmed = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE status != 'CONFIRMED'", __FILE__, __LINE__));
+
+               // Total members
+               $total = $male + $female;
+
+               // List every month
+               $months = array();
+               for ($idx = 1; $idx < 13; $idx++) {
+                       // Copy it so we don't touch the for() loop index
+                       $month = $idx;
+
+                       // Append leading zero
+                       if ($idx < 10) $month = '0'.$idx;
+
+                       // Count months
+                       $months[$month] = GET_TOTAL_DATA(bigintval($month), 'user_data', 'userid', 'birth_month', true, " AND `status`='CONFIRMED'");
+               }
+
+               // Members in categories
+               $result = SQL_QUERY("SELECT id, cat FROM `{!_MYSQL_PREFIX!}_cats` WHERE `visible`='Y' ORDER BY `id`", __FILE__, __LINE__);
+
+               // Load categories first
+               $cats = array(); $cat_cnt = array();
+               // @TODO This can be somehow rewritten
+               while ($content = SQL_FETCHARRAY($result)) {
+                       // Simple...
+                       $cats[$content['id']] = $content['cat'];
+               }
+
+               // Now we have all categories loaded, count members
+               foreach ($cats as $id => $dummy) {
+                       // We only need id and nothing more to count...
+                       $cat_cnt[$id] = GET_TOTAL_DATA(bigintval($id), 'user_cats', 'id', 'cat_id', true);
+               }
+
+               // Prepare data for the template
+               // @TODO Rewrite all these constants
+               define('__TOTAL_USERS' , $total);
+               define('__UNCONFIRMED' , $unconfirmed);
+               define('__MALE_COUNT'  , $male);
+               define('__FEMALE_COUNT', $female);
+               define('__TMEM_COUNT'  , $tmem);
+               define('__YMEM_COUNT'  , $ymem);
+               define('__TREG_COUNT'  , $treg);
+               define('__YREG_COUNT'  , $yreg);
+               define('__LMODE_VALUE' , $lmode);
+               define('__LINK_TITLE'  , $ltitle);
+
+               // Generate monthly stats
+               $SW = 2; $r2 = ' right2'; $l = 'll'; $r = 'lr'; $OUT = '';
+               foreach ($months as $month => $cnt) {
+                       if ($SW == 2) $OUT .= "<tr>\n";
+
+                       // Prepare data for template
+                       $content = array(
                        'l_class'  => $l,
                        'm_descr'  => $GLOBALS['month_descr'][$month],
                        'r_class'  => $r,
                        'r2_class' => $r2,
                        'cnt'      => $cnt
-               );
-
-               // Load row template
-               $OUT .= LOAD_TEMPLATE("guest_stats_month_row", true, $content);
-
-               if ($SW == 2) {
-                       $r2 = '';
-                       $l = 'rl'; $r = 'rr';
-               } else {
-                       $OUT .= "</tr>\n";
-                       $r2 = ' right2';
-                       $l = 'll'; $r = 'lr';
+                       );
+
+                       // Load row template
+                       $OUT .= LOAD_TEMPLATE("guest_stats_month_row", true, $content);
+
+                       if ($SW == 2) {
+                               $r2 = '';
+                               $l = 'rl'; $r = 'rr';
+                       } else {
+                               $OUT .= "</tr>\n";
+                               $r2 = ' right2';
+                               $l = 'll'; $r = 'lr';
+                       }
+                       $SW = 3 - $SW;
                }
-               $SW = 3 - $SW;
-       }
-       define('__MONTH_STATS_ROWS', $OUT);
+               define('__MONTH_STATS_ROWS', $OUT);
 
-       // Generate category stats
-       $OUT = ''; $SW = 2;
-       foreach ($cat_cnt as $id => $cnt) {
-               // Prepare data for the template
-               $content = array(
+               // Generate category stats
+               $OUT = ''; $SW = 2;
+               foreach ($cat_cnt as $id => $cnt) {
+                       // Prepare data for the template
+                       $content = array(
                        'sw'  => $SW,
                        'cat' => $cats[$id],
                        'cnt' => $cnt,
-               );
-
-               // Load row template and switch colors
-               $OUT .= LOAD_TEMPLATE('guest_stats_cats_row', true, $content);
-               $SW = 3 - $SW;
-       }
-       define('__CATS_STATS_ROWS', $OUT);
-
-       // Load final template
-       LOAD_TEMPLATE('guest_stats_member');
-       break;
-
-case 'MODULES': // TOP10 module clicks
-       $AND = '';
-       if (!IS_ADMIN()) $AND = " AND `locked`='N' AND `visible`='Y'";
-       $guest_t10 = SQL_QUERY("SELECT counter, title FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE counter > 0".$AND." ORDER BY counter DESC LIMIT 0,10", __FILE__, __LINE__);
-       $mem_t10   = SQL_QUERY("SELECT counter, title FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE counter > 0".$AND." ORDER BY counter DESC LIMIT 0,10", __FILE__, __LINE__);
-       $OUT = '';
-       if ((SQL_NUMROWS($guest_t10) > 0) || (SQL_NUMROWS($mem_t10) > 0)) {
-               // Output header
-               // @TODO Rewrite this to one template and $OUT .= ....
-               OUTPUT_HTML("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"guest_table dashed\" width=\"310\">
+                       );
+
+                       // Load row template and switch colors
+                       $OUT .= LOAD_TEMPLATE('guest_stats_cats_row', true, $content);
+                       $SW = 3 - $SW;
+               }
+               define('__CATS_STATS_ROWS', $OUT);
+
+               // Load final template
+               LOAD_TEMPLATE('guest_stats_member');
+               break;
+
+       case 'MODULES': // TOP10 module clicks
+               $AND = '';
+               if (!IS_ADMIN()) $AND = " AND `locked`='N' AND `visible`='Y'";
+               $guest_t10 = SQL_QUERY("SELECT counter, title FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE counter > 0".$AND." ORDER BY counter DESC LIMIT 0,10", __FILE__, __LINE__);
+               $mem_t10   = SQL_QUERY("SELECT counter, title FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE counter > 0".$AND." ORDER BY counter DESC LIMIT 0,10", __FILE__, __LINE__);
+               $OUT = '';
+               if ((SQL_NUMROWS($guest_t10) > 0) || (SQL_NUMROWS($mem_t10) > 0)) {
+                       // Output header
+                       // @TODO Rewrite this to one template and $OUT .= ....
+                       OUTPUT_HTML("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"guest_table dashed\" width=\"310\">
 <tr>
   <td align=\"center\" class=\"guest_stats_title bottom2\" colspan=\"2\"><strong>{--GUEST_TOPTEN_STATS--}</strong></td>
 </tr>");
-       }
+               }
 
-       if (SQL_NUMROWS($guest_t10) > 0) {
-               // Guest clicks
-               OUTPUT_HTML("<tr>
+               if (SQL_NUMROWS($guest_t10) > 0) {
+                       // Guest clicks
+                       OUTPUT_HTML("<tr>
   <td align=\"center\" class=\"guest_title2 bottom2\" colspan=\"2\">{--GUEST_TOP_GUEST_STATS--}</td>
 </tr>");
-               $SW = 2;
-               while ($content = SQL_FETCHARRAY($guest_t10)) {
-                       OUTPUT_HTML("<tr>
+                       $SW = 2;
+                       while ($content = SQL_FETCHARRAY($guest_t10)) {
+                               OUTPUT_HTML("<tr>
   <td class=\"switch_sw".$SW." bottom2 right2\" align=\"right\" width=\"250\">".$content['title']."&nbsp;</td>
   <td class=\"switch_sw".$SW." bottom2\" width=\"50\">&nbsp;".$content['counter']."</td>
 </tr>");
-                       $SW = 3 - $SW;
+                               $SW = 3 - $SW;
+                       }
                }
-       }
 
-       if (SQL_NUMROWS($guest_t10) > 0) {
-               // Guest clicks
-               OUTPUT_HTML("<tr>
+               if (SQL_NUMROWS($guest_t10) > 0) {
+                       // Guest clicks
+                       OUTPUT_HTML("<tr>
   <td align=\"center\" class=\"guest_title2 bottom2\" colspan=\"2\">{--GUEST_TOP_MEMBER_STATS--}</td>
 </tr>");
-               $SW = 2;
-               while ($content = SQL_FETCHARRAY($mem_t10)) {
-                       OUTPUT_HTML("<tr>
+                       $SW = 2;
+                       while ($content = SQL_FETCHARRAY($mem_t10)) {
+                               OUTPUT_HTML("<tr>
   <td class=\"switch_sw".$SW." bottom2 right2\" align=\"right\" width=\"250\">".$content['title']."&nbsp;</td>
   <td class=\"switch_sw".$SW." bottom2\" width=\"50\">&nbsp;".$content['counter']."</td>
 </tr>");
-                       $SW = 3 - $SW;
+                               $SW = 3 - $SW;
+                       }
                }
-       }
 
-       if ((SQL_NUMROWS($guest_t10) > 0) || (SQL_NUMROWS($mem_t10) > 0)) {
-               // Output footer
-               OUTPUT_HTML("<tr>
+               if ((SQL_NUMROWS($guest_t10) > 0) || (SQL_NUMROWS($mem_t10) > 0)) {
+                       // Output footer
+                       OUTPUT_HTML("<tr>
   <td align=\"center\" class=\"guest_stats_footer\" colspan=\"2\">
     <a href=\"{!URL!}/modules.php?module=index&amp;what=stats&amp;mode=".$lmode."\">".$ltitle."</a>
   </td>
 </tr>
 </table>");
-       }
-       break;
+               }
+               break;
 
-case 'INACTIVE': // Deactivated stats
-       LOAD_TEMPLATE('admin_settings_saved', false, "<strong>{--GUEST_STATS_DEACTIVATED--}</strong>");
-       break;
+       case 'INACTIVE': // Deactivated stats
+               LOAD_TEMPLATE('admin_settings_saved', false, "<strong>{--GUEST_STATS_DEACTIVATED--}</strong>");
+               break;
 }
 
 //
index 3acd9680593b5d5ac4b04e6b73d371816991fd7d..8ccdf36800e601b0dd2ecdc24ac68038df5d320b 100644 (file)
@@ -60,7 +60,7 @@ WHERE
 ORDER BY
        total_logins DESC
 LIMIT %s",
-       array(getConfig('top10_max')), __FILE__, __LINE__);
+array(getConfig('top10_max')), __FILE__, __LINE__);
 
 $OUT = ''; $SW = 2; $cnt = 1;
 while ($content = SQL_FETCHARRAY($result)) {
@@ -131,7 +131,7 @@ ORDER BY
        tpoints DESC,
        d.last_online DESC
 LIMIT %s",
-       array(getConfig('top10_max')), __FILE__, __LINE__);
+array(getConfig('top10_max')), __FILE__, __LINE__);
 
 $OUT = ''; $SW = 2; $cnt = 1;
 while ($content = SQL_FETCHARRAY($result)) {
@@ -201,7 +201,7 @@ ORDER BY
        refs DESC,
        d.last_online DESC
 LIMIT %s",
-       array(getConfig('top10_max')), __FILE__, __LINE__);
+array(getConfig('top10_max')), __FILE__, __LINE__);
 
 $OUT = ''; $SW = 2; $cnt = 1;
 while ($content = SQL_FETCHARRAY($result)) {
index 96444b1780f156ce053104ca1b4818ae043fcb5d..af08f495b60d260be660d5425bc67e312513d74f 100644 (file)
@@ -58,12 +58,12 @@ $rdf->set_CacheDir(constant('PATH')."inc/cache/");
 $rdf->set_salt(md5(getConfig('SITE_KEY')));
 $rdf->set_max_item(10);
 $rdf->set_Options(
-       array(
+array(
                'textinput' => "hidden",
                'sitelink'  => "http://www.wds66.com",
                'refid'     => getConfig('wernis_refid'),
                'reflink'   => "/ref.php?refid=",
-       )
+)
 );
 
 // Use proxy?
index 1baf1ad3cc1f06f6117ae00ee34f3fc2b520f958..1e224526ea912b89285cb25825752ef29128b65e 100644 (file)
@@ -42,7 +42,7 @@ if (!defined('__SECURITY')) {
        require($INC);
 } elseif (!IS_LOGGED_IN()) {
        redirectToUrl(URL."/modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("")) && (!IS_ADMIN())) {
+} elseif ((!EXT_IS_ACTIVE('')) && (!IS_ADMIN())) {
        addFatalMessage(__FILE__, __LINE__, EXTENSION_PROBLEM_EXT_INACTIVE, "");
        return;
 } elseif ($BLOCK_MODE) {
index 9462fd67d8638789c7c22e07b4733d3076645688..5cc06a11b681e8ea04f12f3c7c34dec5955e19b9 100644 (file)
@@ -56,7 +56,7 @@ if (EXT_IS_ACTIVE('nickname'))
        // Load nickname
        $data = 'nickname';
 }
- else
+else
 {
        // Load userid
        $data = 'userid';
index 217b63ed43d4caa38c90a4578bd66be2c666096b..4de9d086f0a0a104f5777c0b61950e1d33347507 100644 (file)
@@ -62,7 +62,7 @@ if (EXT_IS_ACTIVE('autopurge')) {
 $result = SQL_QUERY_ESC("SELECT userid, beg_points AS beg, last_online FROM `{!_MYSQL_PREFIX!}_user_data`
 WHERE beg_points > 0 AND `status`='CONFIRMED'".$lastOnline."
 ORDER BY beg_points DESC, last_online DESC, userid LIMIT %s",
-       array($ONLINE, getConfig('beg_ranks')), __FILE__, __LINE__);
+array($ONLINE, getConfig('beg_ranks')), __FILE__, __LINE__);
 
 // Reset temporary variable and check for users
 $OUT = '';
index 059b028234b0b3083b0765608e40be021bb22720..0344efecca1179f53e941b17be6bc5dd0f57c615 100644 (file)
@@ -78,7 +78,7 @@ $result = SQL_QUERY_ESC("SELECT userid, ".$USE." AS points, last_online FROM `{!
 WHERE ".$USE." > 0 AND `status`='CONFIRMED'".$lastOnline."
 ORDER BY points DESC, last_online DESC, userid
 LIMIT %s",
-       array($ONLINE, getConfig('bonus_ranks')), __FILE__, __LINE__);
+array($ONLINE, getConfig('bonus_ranks')), __FILE__, __LINE__);
 
 // Reset temporary variable and check for users
 $OUT = '';
@@ -88,17 +88,18 @@ if (SQL_NUMROWS($result) > 0) {
        while ($content = SQL_FETCHARRAY($result)) {
                // Prepare data for the template
                $content = array(
-               $content['sw']     = $SW;
-               $content['cnt']    = $cnt;
-               $content['uid']    = bigintval($content['uid']);
-               $content['points'] = translateComma($content['points']);
-               $content['last']   = generateDateTime($content['last'], '2');
+                       'sw'     => $SW,
+                       'cnt'    => $cnt,
+                       'uid'    => bigintval($content['uid']),
+                       'points' => translateComma($content['points']),
+                       'last'   => generateDateTime($content['last'], '2')
+               );
 
                // Load row template
                $OUT .= LOAD_TEMPLATE("member_bonus_row", true, $content);
 
                // Count one up and switch colors
-               $cnt++;$SW = 3 - $SW;
+               $cnt++; $SW = 3 - $SW;
        }
 } else {
        // No one is interested in our "active rallye" ! :-(
index 9f2f814446bd8e5722794bf15e0cfdf5b6d362a5..34beb1f902228748529fdd1c96b815934bf88374 100644 (file)
@@ -74,7 +74,7 @@ if ($cats > 0) {
                                case 'Y':
                                        $sql = '';
                                        $result_user = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_cats` WHERE userid=%s AND cat_id=%s LIMIT 1",
-                                        array($UID, bigintval($cat)), __FILE__, __LINE__);
+                                       array($UID, bigintval($cat)), __FILE__, __LINE__);
 
                                        if (SQL_NUMROWS($result_user) == 0) {
                                                $sql = "INSERT INTO `{!_MYSQL_PREFIX!}_user_cats` (userid, cat_id) VALUES ('%s','%s')";
index 0941c4a58dd65deb23193e111b23e138c88f232c..ba890802f5f34b8fcd8eb18f7cf03409daf2da55 100644 (file)
@@ -79,18 +79,18 @@ define('__DOUBLER_COUNTER', translateComma(getConfig('doubler_counter')));
 
 // Which mail-send-mode did the admin setup?
 switch (getConfig('doubler_send_mode')) {
-case "DIRECT":
-       define('DOUBLER_PAYOUT_TIME', getMessage('DOUBLER_PAYOUT_TIME_DIRECT'));
-       break;
-
-case "RESET":
-       define('DOUBLER_PAYOUT_TIME', getMessage('DOUBLER_PAYOUT_TIME_RESET'));
-       break;
-
-default:
-       define('DOUBLER_PAYOUT_TIME', sprintf(getMessage('DOUBLER_PAYOUT_TIME_UNKNOWN'), getConfig('doubler_send_mode')));
-       DEBUG_LOG(__FILE__, __LINE__, constant('DOUBLER_PAYOUT_TIME'));
-       break;
+       case "DIRECT":
+               define('DOUBLER_PAYOUT_TIME', getMessage('DOUBLER_PAYOUT_TIME_DIRECT'));
+               break;
+
+       case "RESET":
+               define('DOUBLER_PAYOUT_TIME', getMessage('DOUBLER_PAYOUT_TIME_RESET'));
+               break;
+
+       default:
+               define('DOUBLER_PAYOUT_TIME', sprintf(getMessage('DOUBLER_PAYOUT_TIME_UNKNOWN'), getConfig('doubler_send_mode')));
+               DEBUG_LOG(__FILE__, __LINE__, constant('DOUBLER_PAYOUT_TIME'));
+               break;
 }
 
 // Generate table with already payed out doubles
index 30863ddd6eaf5df03dde7862e3c6bef5e808b470..ec15bd331b3dd4dfcb51f5751b660ed174674fe3 100644 (file)
@@ -101,13 +101,13 @@ if (IS_FORM_SENT()) {
        } else {
                // Everything went okay so let's store his request and send mails
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_holidays` (userid, holiday_start, holiday_end, comments) VALUES ('%s','%s','%s','%s')",
-                array(getUserId(), $START, $END, REQUEST_POST('comments')), __FILE__, __LINE__);
+               array(getUserId(), $START, $END, REQUEST_POST('comments')), __FILE__, __LINE__);
 
                // Activate holiday system
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data`
 SET `holiday_active`='N', holiday_activated=UNIX_TIMESTAMP()
 WHERE userid=%s LIMIT 1",
-                array(getUserId()), __FILE__, __LINE__);
+               array(getUserId()), __FILE__, __LINE__);
 
                // Prepare constants
                define('_START_DAY'  , REQUEST_POST('start_day'));
@@ -126,7 +126,7 @@ WHERE userid=%s LIMIT 1",
 
                // Create task
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_task_system` (userid, assigned_admin, status, task_type, subject, text, task_created) VALUES ('%s','0','NEW','HOLIDAY_REQUEST','{--HOLIDAY_ADMIN_SUBJECT--}','%s', UNIX_TIMESTAMP())",
-                       array(getUserId(), $msg), __FILE__, __LINE__);
+               array(getUserId(), $msg), __FILE__, __LINE__);
 
                // Display message
                LOAD_TEMPLATE('admin_settings_saved', false, getMessage('HOLIDAY_IS_ACTIVATED_NOW'));
@@ -134,7 +134,7 @@ WHERE userid=%s LIMIT 1",
 }
 
 // Holiday shall be ended now
-if (REQUEST_ISSET_POST(('stop'))) {
+if (REQUEST_ISSET_POST('stop')) {
        // Okay, end the holiday here...
        $result = SQL_QUERY_ESC("SELECT holiday_active, holiday_activated FROM `{!_MYSQL_PREFIX!}_user_data`
 WHERE userid=%s LIMIT 1", array(getUserId()), __FILE__, __LINE__);
@@ -179,7 +179,7 @@ WHERE userid=%s LIMIT 1", array(getUserId()), __FILE__, __LINE__);
 }
 
 // If something is wrong or link in menu is just clicked display form
-if ((!IS_FORM_SENT()) && (!REQUEST_ISSET_POST(('stop'))) {
+if ((!IS_FORM_SENT()) && (!REQUEST_ISSET_POST('stop'))) {
        // Check if user is in holiday...
        $result = SQL_QUERY_ESC("SELECT holiday_active, holiday_activated FROM `{!_MYSQL_PREFIX!}_user_data`
 WHERE userid=%s LIMIT 1", array(getUserId()), __FILE__, __LINE__);
@@ -191,57 +191,57 @@ WHERE userid=%s LIMIT 1", array(getUserId()), __FILE__, __LINE__);
                // User can deactivate his holiday request
                switch ($active)
                {
-               case 'Y': // Display deactivation form
-                       // Load starting and ending date
-                       $result = SQL_QUERY_ESC("SELECT holiday_start, holiday_end FROM `{!_MYSQL_PREFIX!}_user_holidays`
+                       case 'Y': // Display deactivation form
+                               // Load starting and ending date
+                               $result = SQL_QUERY_ESC("SELECT holiday_start, holiday_end FROM `{!_MYSQL_PREFIX!}_user_holidays`
 WHERE userid=%s LIMIT 1", array(getUserId()), __FILE__, __LINE__);
-                       if (SQL_NUMROWS($result) == 1) {
-                               // Data was found
-                               list($start, $end) = SQL_FETCHROW($result);
-                               SQL_FREERESULT($result);
-
-                               // Prepare it for the template
-                               define('__HOLIDAY_START', generateDateTime($start , '3'));
-                               define('__HOLIDAY_END'  , generateDateTime($end   , '3'));
-                               define('__HOLIDAY_LOCK' , generateDateTime($locked, '1'));
-
-                               // Load template
-                               LOAD_TEMPLATE('member_holiday_deactivate');
-                       } else {
-                               // Free memory
-                               SQL_FREERESULT($result);
-
-                               // Remove entry and reload URL
-                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data`
+                               if (SQL_NUMROWS($result) == 1) {
+                                       // Data was found
+                                       list($start, $end) = SQL_FETCHROW($result);
+                                       SQL_FREERESULT($result);
+
+                                       // Prepare it for the template
+                                       define('__HOLIDAY_START', generateDateTime($start , '3'));
+                                       define('__HOLIDAY_END'  , generateDateTime($end   , '3'));
+                                       define('__HOLIDAY_LOCK' , generateDateTime($locked, '1'));
+
+                                       // Load template
+                                       LOAD_TEMPLATE('member_holiday_deactivate');
+                               } else {
+                                       // Free memory
+                                       SQL_FREERESULT($result);
+
+                                       // Remove entry and reload URL
+                                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data`
 SET `holiday_active`='N'
 WHERE userid=%s LIMIT 1", array(getUserId()), __FILE__, __LINE__);
-                               redirectToUrl('modules.php?module=login&amp;what=holiday');
-                               return;
-                       }
-                       break;
-
-               case 'N': // Display activation form
-                       // Starting day
-                       define('_START_DAY'  , ADD_SELECTION('day'  , date('d', (time() + getConfig('one_day'))), 'start'));
-                       define('_START_MONTH', ADD_SELECTION('month', date('m', (time() + getConfig('one_day'))), 'start'));
-                       define('_START_YEAR' , ADD_SELECTION('year' , date('Y', (time() + getConfig('one_day'))), 'start'));
-
-                       // Calcualte ending date
-                       $D = date('d', time() + getConfig('one_day') + (getConfig('one_day') * getConfig('holiday_max')));
-                       $M = date('m', time() + getConfig('one_day') + (getConfig('one_day') * getConfig('holiday_max')));
-                       $Y = date('Y', time() + getConfig('one_day') + (getConfig('one_day') * getConfig('holiday_max')));
-
-                       // Ending day
-                       define('_END_DAY'  , ADD_SELECTION('day'  , $D, 'end'));
-                       define('_END_MONTH', ADD_SELECTION('month', $M, 'end'));
-                       define('_END_YEAR' , ADD_SELECTION('year' , $Y, 'end'));
-
-                       // Copy value from configuration
-                       define('__HOLIDAY_MAX', getConfig('holiday_max'));
-
-                       // Output form
-                       LOAD_TEMPLATE('member_holiday_form');
-                       break;
+                                       redirectToUrl('modules.php?module=login&amp;what=holiday');
+                                       return;
+                               }
+                               break;
+
+                       case 'N': // Display activation form
+                               // Starting day
+                               define('_START_DAY'  , ADD_SELECTION('day'  , date('d', (time() + getConfig('one_day'))), 'start'));
+                               define('_START_MONTH', ADD_SELECTION('month', date('m', (time() + getConfig('one_day'))), 'start'));
+                               define('_START_YEAR' , ADD_SELECTION('year' , date('Y', (time() + getConfig('one_day'))), 'start'));
+
+                               // Calcualte ending date
+                               $D = date('d', time() + getConfig('one_day') + (getConfig('one_day') * getConfig('holiday_max')));
+                               $M = date('m', time() + getConfig('one_day') + (getConfig('one_day') * getConfig('holiday_max')));
+                               $Y = date('Y', time() + getConfig('one_day') + (getConfig('one_day') * getConfig('holiday_max')));
+
+                               // Ending day
+                               define('_END_DAY'  , ADD_SELECTION('day'  , $D, 'end'));
+                               define('_END_MONTH', ADD_SELECTION('month', $M, 'end'));
+                               define('_END_YEAR' , ADD_SELECTION('year' , $Y, 'end'));
+
+                               // Copy value from configuration
+                               define('__HOLIDAY_MAX', getConfig('holiday_max'));
+
+                               // Output form
+                               LOAD_TEMPLATE('member_holiday_form');
+                               break;
                }
        } else {
                // To fast!
index 7baa959b92f67b456fb42378366b90489212a49c..0695f2a3b7ff239921643d6fc5c45e5fbca8bc7e 100644 (file)
@@ -54,12 +54,12 @@ ADD_DESCR('member', __FILE__);
 if (IS_FORM_SENT()) {
        // Save settings
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `html`='%s' WHERE userid=%s LIMIT 1",
-               array(REQUEST_POST('html'), getUserId()), __FILE__, __LINE__);
+       array(REQUEST_POST('html'), getUserId()), __FILE__, __LINE__);
        LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_SETTINGS_SAVED'));
 } else {
        // Load template for changing settings
        $result = SQL_QUERY_ESC("SELECT html FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-               array(getUserId()), __FILE__, __LINE__);
+       array(getUserId()), __FILE__, __LINE__);
        list($mode) = SQL_FETCHROW($result);
        SQL_FREERESULT($result);
 
index 07603834339cd12041d411bb2b255283e37d19c0..2e8b77d3b13f7b503bb922bfecb89bbd9055c044 100644 (file)
@@ -60,169 +60,169 @@ if (REQUEST_ISSET_POST(('notify'))) $mode = 'notify'; // Switch off notification
 
 switch ($mode)
 {
-case 'show': // Show his data
-       if (EXT_IS_ACTIVE('country', true)) {
-               // New way                         0        1         2          3         4     5     6        7           8            9       10      11           12           13
-               $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country_code, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
+       case 'show': // Show his data
+               if (EXT_IS_ACTIVE('country', true)) {
+                       // New way                         0        1         2          3         4     5     6        7           8            9       10      11           12           13
+                       $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country_code, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
                        array(getUserId()), __FILE__, __LINE__);
-       } else {
-               // Old way                         0        1         2        3      4     5     6        7           8            9       10      11           12           13
-               $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
+               } else {
+                       // Old way                         0        1         2        3      4     5     6        7           8            9       10      11           12           13
+                       $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
                        array(getUserId()), __FILE__, __LINE__);
-       }
-       $DATA = SQL_FETCHROW($result);
-       SQL_FREERESULT($result);
-
-       // Translate / add some things
-       $DATA[10] = translateGender($DATA[10]);
-       $DATA[13] = generateDateTime($DATA[13], '0');
-
-       // How far is last change on his profile away from now?
-       if ((($DATA[13] + getConfig('profile_lock')) > time()) && (!IS_ADMIN()) && (getConfig('profile_lock') > 0)) {
-               // You cannot change your account
-               define('CHANGE', "<div class=\"member_failed\">".sprintf(getMessage('MEMBER_PROFILE_LOCKED'), generateDateTime($DATA[13] + getConfig('profile_lock'), '0'))."</div>");
-       } else {
-               // He is allowed to change his profile
-               define('CHANGE', LOAD_TEMPLATE("member_mydata_button", true));
-       }
-
-       if (strlen($DATA[7]) == 1) $DATA[7] = '0'.$DATA[7];
-       if (strlen($DATA[8]) == 1) $DATA[8] = '0'.$DATA[8];
-
-       switch (getLanguage()) {
-               case 'de': define('DOB', $DATA[7].'.'.$DATA[8].'.'.$DATA[9]); break;
-               default  : define('DOB', $DATA[8].'-'.$DATA[7].'-'.$DATA[9]); break;
-       }
-
-       if (EXT_IS_ACTIVE('country')) {
-               // Load country's description and code
-               $DATA[3] = COUNTRY_GENERATE_INFO($DATA[3]);
-       }
-
-       // Load template
-       LOAD_TEMPLATE('member_mydata_overview');
-       break;
-
-case 'edit': // Edit data
-       if (EXT_IS_ACTIVE('country', true)) {
-               // New way                         0        1         2          3         4     5     6        7           8            9       10      11           12           13
-               $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country_code, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update
-FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                array(constant('UID_VALUE')), __FILE__, __LINE__);
-       } else {
-               // Old way                         0        1         2        3      4     5     6        7           8            9       10      11           12           13
-               $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update
-FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                array(constant('UID_VALUE')), __FILE__, __LINE__);
-       }
-
-       $DATA = SQL_FETCHROW($result);
-       SQL_FREERESULT($result);
-       $DATA[13] = $DATA[12] + getConfig('profile_lock');
-
-       // How far is last change on his profile away from now?
-       if (($DATA[13] > time()) && (!IS_ADMIN()) && (getConfig('profile_lock') > 0)) {
-               $DATA[13] = generateDateTime($DATA[13] + getConfig('profile_lock'), '0');
-               // You cannot change your account
-               LOAD_TEMPLATE('member_mydata_locked');
-       } else {
-               // He is allowed to change his profile
-               switch ($DATA[10])
-               {
-               case 'M':
-                       define('M_DEFAULT', ' selected="selected"');
-                       define('F_DEFAULT', '');
-                       define('C_DEFAULT', '');
-                       break;
-
-               case 'F':
-                       define('M_DEFAULT', '');
-                       define('F_DEFAULT', ' selected="selected"');
-                       define('C_DEFAULT', '');
-                       break;
-
-               case 'C':
-                       define('M_DEFAULT', '');
-                       define('F_DEFAULT', '');
-                       define('C_DEFAULT', ' selected="selected"');
-                       break;
                }
-               $DOB = '';
-               switch (getLanguage())
-               {
-               case 'de': // German date format
-                       // Day
-                       $DOB .= ADD_SELECTION('day', $DATA[7]);
-
-                       // Month
-                       $DOB .= ADD_SELECTION('month', $DATA[8]);
-
-                       // Year
-                       $DOB .= ADD_SELECTION('year', $DATA[9]);
-                       break;
-
-               default: // Default is the US date format... :)
-                       break;
+               $DATA = SQL_FETCHROW($result);
+               SQL_FREERESULT($result);
+
+               // Translate / add some things
+               $DATA[10] = translateGender($DATA[10]);
+               $DATA[13] = generateDateTime($DATA[13], '0');
+
+               // How far is last change on his profile away from now?
+               if ((($DATA[13] + getConfig('profile_lock')) > time()) && (!IS_ADMIN()) && (getConfig('profile_lock') > 0)) {
+                       // You cannot change your account
+                       define('CHANGE', "<div class=\"member_failed\">".sprintf(getMessage('MEMBER_PROFILE_LOCKED'), generateDateTime($DATA[13] + getConfig('profile_lock'), '0'))."</div>");
+               } else {
+                       // He is allowed to change his profile
+                       define('CHANGE', LOAD_TEMPLATE("member_mydata_button", true));
                }
 
-               define('DOB', $DOB);
-               define('MAX_REC_LIST', addMaxReceiveList('member', $DATA[11], true));
+               if (strlen($DATA[7]) == 1) $DATA[7] = '0'.$DATA[7];
+               if (strlen($DATA[8]) == 1) $DATA[8] = '0'.$DATA[8];
+
+               switch (getLanguage()) {
+                       case 'de': define('DOB', $DATA[7].'.'.$DATA[8].'.'.$DATA[9]); break;
+                       default  : define('DOB', $DATA[8].'-'.$DATA[7].'-'.$DATA[9]); break;
+               }
 
                if (EXT_IS_ACTIVE('country')) {
-                       // Generate selection box
-                       $OUT  = "<select name=\"country_code\" class=\"member_select\" size=\"1\">\n";
-                       $whereStatement = "WHERE is_active='Y'";
-                       if (IS_ADMIN()) $whereStatement = '';
-                       $OUT .= generateOptionList("countries", "id", "descr", $DATA[3], "code", $whereStatement);
-                       $OUT .= "</select>";
-                       define('__COUNTRY_CONTENT', $OUT);
-               } else {
-                       // Ouput default input box
-                       define('__COUNTRY_CONTENT', "<input type=\"text\" name=\"cntry\" class=\"member_normal\" size=\"2\" maxlength=\"3\" value=\"".$DATA[3]."\" />");
+                       // Load country's description and code
+                       $DATA[3] = COUNTRY_GENERATE_INFO($DATA[3]);
                }
 
                // Load template
-               LOAD_TEMPLATE('member_mydata_edit');
-       }
-       break;
-
-case 'save': // Save entered data
-       // Load old email / password:      0        1          2
-       $result = SQL_QUERY_ESC("SELECT email, password, last_update FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-               array(getUserId()), __FILE__, __LINE__);
-       $DATA = SQL_FETCHROW($result);
-       SQL_FREERESULT($result);
-       $DATA[3] = $DATA[2] + getConfig('profile_lock');
-
-       // How far is last change on his profile away from now?
-       if (($DATA[3] > time()) && (!IS_ADMIN()) && (getConfig('profile_lock') > 0)) {
-               $DATA[3] = generateDateTime($DATA[3] + getConfig('profile_lock'), '0');
-               // You cannot change your account
-               LOAD_TEMPLATE("member_mydata_locked");
-       } elseif (!isEmailValid(REQUEST_POST('addy'))) {
-               // Invalid email address!
-               LOAD_TEMPLATE('admin_settings_saved', false, getMessage('INVALID_EMAIL_ADDRESS_ENTERED'));
-       } else {
-               // Generate hash
-               $hash = generateHash(REQUEST_POST('pass1'), substr($DATA[1], 0, -40));
-               if ((($hash == $DATA[1]) || (REQUEST_POST('pass1') == REQUEST_POST('pass2'))) && (REQUEST_ISSET_POST(('pass1')))) {
-                       // Only on simple changes normal mode is active = no email or password changed
-                       $mode = 'normal'; $AND = '';
-
-                       // Did the user changed the password?
-                       if ($hash != $DATA[1]) { $AND = ", password='".$hash."'"; $mode = 'pass'; }
-
-                       // Or did he changed his password?
-                       if (REQUEST_POST('addy') != $DATA[0]) {
-                               // Jupp
-                               if ($mode == 'normal') { $mode = 'email'; } else { $mode .= ";email"; }
-                               REQUEST_SET_POST('old_addy', $DATA[0]);
-                       }
-
-                       // Update member's profile
-                       if (EXT_IS_ACTIVE('country')) {
-                               // New way
-                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET
+               LOAD_TEMPLATE('member_mydata_overview');
+               break;
+
+                       case 'edit': // Edit data
+                               if (EXT_IS_ACTIVE('country', true)) {
+                                       // New way                         0        1         2          3         4     5     6        7           8            9       10      11           12           13
+                                       $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country_code, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update
+FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
+                                       array(constant('UID_VALUE')), __FILE__, __LINE__);
+                               } else {
+                                       // Old way                         0        1         2        3      4     5     6        7           8            9       10      11           12           13
+                                       $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update
+FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
+                                       array(constant('UID_VALUE')), __FILE__, __LINE__);
+                               }
+
+                               $DATA = SQL_FETCHROW($result);
+                               SQL_FREERESULT($result);
+                               $DATA[13] = $DATA[12] + getConfig('profile_lock');
+
+                               // How far is last change on his profile away from now?
+                               if (($DATA[13] > time()) && (!IS_ADMIN()) && (getConfig('profile_lock') > 0)) {
+                                       $DATA[13] = generateDateTime($DATA[13] + getConfig('profile_lock'), '0');
+                                       // You cannot change your account
+                                       LOAD_TEMPLATE('member_mydata_locked');
+                               } else {
+                                       // He is allowed to change his profile
+                                       switch ($DATA[10])
+                                       {
+                                               case 'M':
+                                                       define('M_DEFAULT', ' selected="selected"');
+                                                       define('F_DEFAULT', '');
+                                                       define('C_DEFAULT', '');
+                                                       break;
+
+                                               case 'F':
+                                                       define('M_DEFAULT', '');
+                                                       define('F_DEFAULT', ' selected="selected"');
+                                                       define('C_DEFAULT', '');
+                                                       break;
+
+                                               case 'C':
+                                                       define('M_DEFAULT', '');
+                                                       define('F_DEFAULT', '');
+                                                       define('C_DEFAULT', ' selected="selected"');
+                                                       break;
+                                       }
+                                       $DOB = '';
+                                       switch (getLanguage())
+                                       {
+                                               case 'de': // German date format
+                                                       // Day
+                                                       $DOB .= ADD_SELECTION('day', $DATA[7]);
+
+                                                       // Month
+                                                       $DOB .= ADD_SELECTION('month', $DATA[8]);
+
+                                                       // Year
+                                                       $DOB .= ADD_SELECTION('year', $DATA[9]);
+                                                       break;
+
+                                               default: // Default is the US date format... :)
+                                                       break;
+                                       }
+
+                                       define('DOB', $DOB);
+                                       define('MAX_REC_LIST', addMaxReceiveList('member', $DATA[11], true));
+
+                                       if (EXT_IS_ACTIVE('country')) {
+                                               // Generate selection box
+                                               $OUT  = "<select name=\"country_code\" class=\"member_select\" size=\"1\">\n";
+                                               $whereStatement = "WHERE is_active='Y'";
+                                               if (IS_ADMIN()) $whereStatement = '';
+                                               $OUT .= generateOptionList("countries", "id", "descr", $DATA[3], "code", $whereStatement);
+                                               $OUT .= "</select>";
+                                               define('__COUNTRY_CONTENT', $OUT);
+                                       } else {
+                                               // Ouput default input box
+                                               define('__COUNTRY_CONTENT', "<input type=\"text\" name=\"cntry\" class=\"member_normal\" size=\"2\" maxlength=\"3\" value=\"".$DATA[3]."\" />");
+                                       }
+
+                                       // Load template
+                                       LOAD_TEMPLATE('member_mydata_edit');
+                               }
+                               break;
+
+                                               case 'save': // Save entered data
+                                                       // Load old email / password:      0        1          2
+                                                       $result = SQL_QUERY_ESC("SELECT email, password, last_update FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
+                                                       array(getUserId()), __FILE__, __LINE__);
+                                                       $DATA = SQL_FETCHROW($result);
+                                                       SQL_FREERESULT($result);
+                                                       $DATA[3] = $DATA[2] + getConfig('profile_lock');
+
+                                                       // How far is last change on his profile away from now?
+                                                       if (($DATA[3] > time()) && (!IS_ADMIN()) && (getConfig('profile_lock') > 0)) {
+                                                               $DATA[3] = generateDateTime($DATA[3] + getConfig('profile_lock'), '0');
+                                                               // You cannot change your account
+                                                               LOAD_TEMPLATE("member_mydata_locked");
+                                                       } elseif (!isEmailValid(REQUEST_POST('addy'))) {
+                                                               // Invalid email address!
+                                                               LOAD_TEMPLATE('admin_settings_saved', false, getMessage('INVALID_EMAIL_ADDRESS_ENTERED'));
+                                                       } else {
+                                                               // Generate hash
+                                                               $hash = generateHash(REQUEST_POST('pass1'), substr($DATA[1], 0, -40));
+                                                               if ((($hash == $DATA[1]) || (REQUEST_POST('pass1') == REQUEST_POST('pass2'))) && (REQUEST_ISSET_POST(('pass1')))) {
+                                                                       // Only on simple changes normal mode is active = no email or password changed
+                                                                       $mode = 'normal'; $AND = '';
+
+                                                                       // Did the user changed the password?
+                                                                       if ($hash != $DATA[1]) { $AND = ", password='".$hash."'"; $mode = 'pass'; }
+
+                                                                       // Or did he changed his password?
+                                                                       if (REQUEST_POST('addy') != $DATA[0]) {
+                                                                               // Jupp
+                                                                               if ($mode == 'normal') { $mode = 'email'; } else { $mode .= ";email"; }
+                                                                               REQUEST_SET_POST('old_addy', $DATA[0]);
+                                                                       }
+
+                                                                       // Update member's profile
+                                                                       if (EXT_IS_ACTIVE('country')) {
+                                                                               // New way
+                                                                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET
 gender='%s', surname='%s', family='%s',
 street_nr='%s',
 country_code=%s, zip=%s, city='%s',
@@ -233,25 +233,25 @@ last_update=UNIX_TIMESTAMP()".$AND.",
 notified='N',
 last_profile_sent=UNIX_TIMESTAMP()
 WHERE userid=%s AND password='%s' LIMIT 1",
-array(
-       REQUEST_POST('gender'),
-       REQUEST_POST('surname'),
-       REQUEST_POST('family'),
-       REQUEST_POST('street_nr'),
-       bigintval(REQUEST_POST('country_code')),
-       bigintval(REQUEST_POST('zip')),
-       REQUEST_POST('city'),
-       REQUEST_POST('addy'),
-       bigintval(REQUEST_POST('day')),
-       bigintval(REQUEST_POST('month')),
-       bigintval(REQUEST_POST('year')),
-       bigintval(REQUEST_POST('max_mails')),
-       UID_VALUE,
-       getSession('u_hash')
- ), __FILE__, __LINE__);
-                       } else {
-                               // Old way
-                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET
+                                                                               array(
+                                                                               REQUEST_POST('gender'),
+                                                                               REQUEST_POST('surname'),
+                                                                               REQUEST_POST('family'),
+                                                                               REQUEST_POST('street_nr'),
+                                                                               bigintval(REQUEST_POST('country_code')),
+                                                                               bigintval(REQUEST_POST('zip')),
+                                                                               REQUEST_POST('city'),
+                                                                               REQUEST_POST('addy'),
+                                                                               bigintval(REQUEST_POST('day')),
+                                                                               bigintval(REQUEST_POST('month')),
+                                                                               bigintval(REQUEST_POST('year')),
+                                                                               bigintval(REQUEST_POST('max_mails')),
+                                                                               UID_VALUE,
+                                                                               getSession('u_hash')
                                                                              ), __FILE__, __LINE__);
+                                                                       } else {
+                                                                               // Old way
+                                                                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET
 gender='%s', surname='%s', family='%s',
 street_nr='%s',
 country='%s', zip=%s, city='%s',
@@ -262,41 +262,41 @@ last_update=UNIX_TIMESTAMP()".$AND.",
 notified='N',
 last_profile_sent=UNIX_TIMESTAMP()
 WHERE userid=%s AND password='%s' LIMIT 1",
-array(
-       REQUEST_POST('gender'),
-       REQUEST_POST('surname'),
-       REQUEST_POST('family'),
-       REQUEST_POST('street_nr'),
-       REQUEST_POST('cntry'),
-       bigintval(REQUEST_POST('zip')),
-       REQUEST_POST('city'),
-       REQUEST_POST('addy'),
-       bigintval(REQUEST_POST('day')),
-       bigintval(REQUEST_POST('month')),
-       bigintval(REQUEST_POST('year')),
-       bigintval(REQUEST_POST('max_mails')),
-       UID_VALUE,
-       getSession('u_hash')
- ), __FILE__, __LINE__);
-                       }
-
-                       // Get all modes ...
-                       $modes = explode(';', $mode);
-
-                       // ... and run them through
-                       sendModeMails ('mydata', $modes);
-               } else {
-                       // Entered wrong pass for updating profile
-                       LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEBER_UPDATE_PWD_WRONG'));
-               }
-       }
-       break;
-
-case 'notify': // Switch off notfication
-       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET notified='N', last_update=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1",
-               array(getUserId()), __FILE__, __LINE__);
-       $URL = 'modules.php?module=login&amp;what=welcome&amp;msg=' . urlencode(getMessage('PROFILE_UPDATED'));
-       break;
+                                                                               array(
+                                                                               REQUEST_POST('gender'),
+                                                                               REQUEST_POST('surname'),
+                                                                               REQUEST_POST('family'),
+                                                                               REQUEST_POST('street_nr'),
+                                                                               REQUEST_POST('cntry'),
+                                                                               bigintval(REQUEST_POST('zip')),
+                                                                               REQUEST_POST('city'),
+                                                                               REQUEST_POST('addy'),
+                                                                               bigintval(REQUEST_POST('day')),
+                                                                               bigintval(REQUEST_POST('month')),
+                                                                               bigintval(REQUEST_POST('year')),
+                                                                               bigintval(REQUEST_POST('max_mails')),
+                                                                               UID_VALUE,
+                                                                               getSession('u_hash')
                                                                              ), __FILE__, __LINE__);
+                                                                       }
+
+                                                                       // Get all modes ...
+                                                                       $modes = explode(';', $mode);
+
+                                                                       // ... and run them through
+                                                                       sendModeMails ('mydata', $modes);
+                                                               } else {
+                                                                       // Entered wrong pass for updating profile
+                                                                       LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEBER_UPDATE_PWD_WRONG'));
+                                                               }
+                                                       }
+                                                       break;
+
+                                               case 'notify': // Switch off notfication
+                                                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET notified='N', last_update=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1",
+                                                       array(getUserId()), __FILE__, __LINE__);
+                                                       $URL = 'modules.php?module=login&amp;what=welcome&amp;msg=' . urlencode(getMessage('PROFILE_UPDATED'));
+                                                       break;
 }
 
 if (!empty($URL)) {
index 3294b49517c63fd164491c8d70a57c9931606643..cc14a7c17792275c0f8895e2b47a1d5ac744f978 100644 (file)
@@ -52,7 +52,7 @@ ADD_DESCR('member', __FILE__);
 
 // Load status
 $result = SQL_QUERY_ESC("SELECT nl_receive, nl_until, nl_timespan FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-       array(getUserId()), __FILE__, __LINE__);
+array(getUserId()), __FILE__, __LINE__);
 list($status, $until, $span) = SQL_FETCHROW($result);
 SQL_FREERESULT($result);
 
@@ -62,7 +62,7 @@ define('__CHARGE_VALUE', translateComma(getConfig('nl_charge')));
 if ((IS_FORM_SENT()) && ($status == 'Y') && ($span == '0')) {
        // Save request
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET nl_timespan='".(getConfig('one_day') * 30)."' WHERE userid=%s LIMIT 1",
-               array(getUserId()), __FILE__, __LINE__);
+       array(getUserId()), __FILE__, __LINE__);
 
        // Load admin message
        $admin_msg = LOAD_EMAIL_TEMPLATE("admin_newsletter_request", array(), getUserId());
@@ -90,17 +90,17 @@ VALUES ('0','NEW','NL_UNSUBSCRIBE','{--ADMIN_NL_SUBJECT--}','".$admin_msg."', UN
        // Set status message and submit button
        switch ($status)
        {
-       case 'Y': // Receives the newsletter
-               define('__STATUS_VALUE', getMessage('NL_MEMBER_ON'));
-               define('__UNTIL_VALUE' , '');
-               define('NL_SUBMIT'     , getMessage('NL_MEMBER_SUBMIT_OFF'));
-               break;
+               case 'Y': // Receives the newsletter
+                       define('__STATUS_VALUE', getMessage('NL_MEMBER_ON'));
+                       define('__UNTIL_VALUE' , '');
+                       define('NL_SUBMIT'     , getMessage('NL_MEMBER_SUBMIT_OFF'));
+                       break;
 
-       case 'N': // Does not receive the newsletter
-               define('__STATUS_VALUE', getMessage('NL_MEMBER_OFF'));
-               define('__UNTIL_VALUE' , generateDateTime($until, '2'));
-               define('NL_SUBMIT'     , getMessage('NL_MEMBER_SUBMIT_ON'));
-               break;
+               case 'N': // Does not receive the newsletter
+                       define('__STATUS_VALUE', getMessage('NL_MEMBER_OFF'));
+                       define('__UNTIL_VALUE' , generateDateTime($until, '2'));
+                       define('NL_SUBMIT'     , getMessage('NL_MEMBER_SUBMIT_ON'));
+                       break;
        }
 
        // Load template and member settings
index 0895810e901f86500772b1a05a0ddb4619c32324..d8b505d5354ee06b93ea8201deee8f084f82a518 100644 (file)
@@ -66,11 +66,11 @@ if (IS_FORM_SENT()) {
 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",
-               array(REQUEST_POST('nickname'), getUserId()), __FILE__, __LINE__);
+       array(REQUEST_POST('nickname'), getUserId()), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 0) {
                // Nickname not in use, so set it now
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET nickname='%s' WHERE userid=%s LIMIT 1",
-                       array(REQUEST_POST('nickname'), getUserId()), __FILE__, __LINE__);
+               array(REQUEST_POST('nickname'), getUserId()), __FILE__, __LINE__);
                $content = getMessage('NICKNAME_SAVED');
        } else {
                // Free result
index 78916d846e7890ac64402734dc65d2402543b318..5c4f57833a2e9c0b354904df434f9f96742f0b7f 100644 (file)
@@ -76,7 +76,7 @@ if (GET_EXT_VERSION('holiday') >= '0.1.3') {
 $result_mmails = SQL_QUERY_ESC("SELECT userid, receive_mails, mail_orders, ".$HOLIDAY."
 FROM `{!_MYSQL_PREFIX!}_user_data`
 WHERE userid=%s AND max_mails > 0 LIMIT 1",
-       array(getUserId()), __FILE__, __LINE__);
+array(getUserId()), __FILE__, __LINE__);
 
 $mmails = SQL_NUMROWS($result_mmails);
 list($DMY, $MAXI, $ORDERS, $HOLIDAY) = SQL_FETCHROW($result_mmails);
@@ -99,7 +99,7 @@ if (($HOLIDAY == 'Y') && (GET_EXT_VERSION('holiday') >= '0.1.3')) {
        $result = SQL_QUERY_ESC("SELECT id, data_type
 FROM `{!_MYSQL_PREFIX!}_pool`
 WHERE sender=%s AND url='%s' AND timestamp > (UNIX_TIMESTAMP() - %s) LIMIT 1",
-               array(getUserId(), REQUEST_POST('url'), getConfig('url_tlock')), __FILE__, __LINE__);
+       array(getUserId(), REQUEST_POST('url'), getConfig('url_tlock')), __FILE__, __LINE__);
 
        $type = "TEMP"; $id = 0;
        if (SQL_NUMROWS($result) == 1) {
@@ -145,7 +145,7 @@ WHERE sender=%s AND url='%s' AND timestamp > (UNIX_TIMESTAMP() - %s) LIMIT 1",
                if (getConfig('url_blacklist') == 'Y') {
                        // Ok, I do that for you know...
                        $result = SQL_QUERY_ESC("SELECT UNIX_TIMESTAMP(`timestamp`) AS tstamp FROM `{!_MYSQL_PREFIX!}_url_blacklist` WHERE `url`='%s' LIMIT 1",
-                               array(REQUEST_POST('url')), __FILE__, __LINE__);
+                       array(REQUEST_POST('url')), __FILE__, __LINE__);
 
                        if (SQL_NUMROWS($result) == 1) {
                                // Jupp, we got one listed
@@ -205,12 +205,12 @@ LEFT JOIN `{!_MYSQL_PREFIX!}_user_data` AS d
 ON c.userid=d.userid
 WHERE c.cat_id=%s AND c.userid != '%s' AND d.`status`='CONFIRMED' AND d.receive_mails > 0".$add."
 ORDER BY d.%s %s",
- array(
-       bigintval(REQUEST_POST('cat')),
-       getUserId(),
-       getConfig('order_select'),
-       getConfig('order_mode'),
- ), __FILE__, __LINE__);
              array(
+               bigintval(REQUEST_POST('cat')),
+               getUserId(),
+               getConfig('order_select'),
+               getConfig('order_mode'),
              ), __FILE__, __LINE__);
 
                // Do we enougth receivers left?
                if (SQL_NUMROWS($result) >= REQUEST_POST('receiver')) {
@@ -228,8 +228,8 @@ ORDER BY d.%s %s",
                                        // Check for his holiday status
                                        $result_holiday = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_holidays`
 WHERE userid=%s AND holiday_start < UNIX_TIMESTAMP() AND holiday_end > UNIX_TIMESTAMP() LIMIT 1",
- array(bigintval($content['userid'])), __FILE__, __LINE__);
-                                       if (SQL_NUMROWS($result_holiday) == 1) $content['userid'] = 0; // Exclude user who are in holiday
                                      array(bigintval($content['userid'])), __FILE__, __LINE__);
+                                       if (SQL_NUMROWS($result_holiday) == 1) $content['userid'] = 0; // Exclude user who are in holiday
 
                                        // Free memory
                                        SQL_FREERESULT($result_holiday);
@@ -253,7 +253,7 @@ WHERE userid=%s AND holiday_start < UNIX_TIMESTAMP() AND holiday_end > UNIX_TIME
 
                        // Update receiver list
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET receive_mails=receive_mails-1 WHERE userid IN (%s) LIMIT %s",
-                               array(str_replace(';', ", ", $RECEIVER), $MAX_SEND), __FILE__, __LINE__);
+                       array(str_replace(';', ", ", $RECEIVER), $MAX_SEND), __FILE__, __LINE__);
 
                        // Is calculated max receivers larger than wanted receivers then reset it
                        if ($MAX_SEND > REQUEST_POST('receiver')) $MAX_SEND = REQUEST_POST('receiver');
@@ -275,35 +275,35 @@ WHERE userid=%s AND holiday_start < UNIX_TIMESTAMP() AND holiday_end > UNIX_TIME
                                                // HTML extension is active
                                                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_pool` (sender, subject, text, receivers, payment_id, data_type, timestamp, url, cat_id, target_send, zip, html_msg)
  VALUES ('%s','%s','%s','%s','%s','TEMP','%s','%s','%s','%s','%s','%s')",
-array(
-       getUserId(),
-       REQUEST_POST('subject'),
-       REQUEST_POST('text'),
-       $RECEIVER,
-       bigintval(REQUEST_POST('type')),
-       $TIME,
-       REQUEST_POST('url'),
-       bigintval(REQUEST_POST('cat')),
-       $MAX_SEND,
-       bigintval(REQUEST_POST('zip')),
-       REQUEST_POST('html')
-), __FILE__, __LINE__);
+                                               array(
+                                               getUserId(),
+                                               REQUEST_POST('subject'),
+                                               REQUEST_POST('text'),
+                                               $RECEIVER,
+                                               bigintval(REQUEST_POST('type')),
+                                               $TIME,
+                                               REQUEST_POST('url'),
+                                               bigintval(REQUEST_POST('cat')),
+                                               $MAX_SEND,
+                                               bigintval(REQUEST_POST('zip')),
+                                               REQUEST_POST('html')
+                                               ), __FILE__, __LINE__);
                                        } else {
                                                // No HTML extension is active
                                                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_pool` (sender, subject, text, receivers, payment_id, data_type, timestamp, url, cat_id, target_send, zip)
  VALUES ('%s','%s','%s','%s','%s','TEMP','%s','%s','%s','%s','%s')",
-array(
-       getUserId(),
-       REQUEST_POST('subject'),
-       REQUEST_POST('text'),
-       $RECEIVER,
-       bigintval(REQUEST_POST('type')),
-       $TIME,
-       REQUEST_POST('url'),
-       bigintval(REQUEST_POST('cat')),
-       $MAX_SEND,
-       bigintval(REQUEST_POST('zip')),
-), __FILE__, __LINE__);
+                                               array(
+                                               getUserId(),
+                                               REQUEST_POST('subject'),
+                                               REQUEST_POST('text'),
+                                               $RECEIVER,
+                                               bigintval(REQUEST_POST('type')),
+                                               $TIME,
+                                               REQUEST_POST('url'),
+                                               bigintval(REQUEST_POST('cat')),
+                                               $MAX_SEND,
+                                               bigintval(REQUEST_POST('zip')),
+                                               ), __FILE__, __LINE__);
                                        }
                                } else {
                                        // Change current order
@@ -321,18 +321,18 @@ target_send=%s,
 zip=%s,
 html_msg='%s'
 WHERE `id`=%s LIMIT 1",
-array(
-       REQUEST_POST('subject'),
-       REQUEST_POST('text'),
-       $RECEIVER,
-       bigintval(REQUEST_POST('type')),
-       REQUEST_POST('url'),
-       bigintval(REQUEST_POST('cat')),
-       $MAX_SEND,
-       bigintval(REQUEST_POST('zip')),
-       REQUEST_POST('html'),
-       bigintval($id)
-), __FILE__, __LINE__);
+                                               array(
+                                               REQUEST_POST('subject'),
+                                               REQUEST_POST('text'),
+                                               $RECEIVER,
+                                               bigintval(REQUEST_POST('type')),
+                                               REQUEST_POST('url'),
+                                               bigintval(REQUEST_POST('cat')),
+                                               $MAX_SEND,
+                                               bigintval(REQUEST_POST('zip')),
+                                               REQUEST_POST('html'),
+                                               bigintval($id)
+                                               ), __FILE__, __LINE__);
                                        } else {
                                                // No HTML extension is active
                                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET
@@ -346,17 +346,17 @@ cat_id=%s,
 target_send=%s,
 zip=%s
 WHERE `id`=%s LIMIT 1",
-array(
-       REQUEST_POST('subject'),
-       REQUEST_POST('text'),
-       $RECEIVER,
-       bigintval(REQUEST_POST('type')),
-       REQUEST_POST('url'),
-       bigintval(REQUEST_POST('cat')),
-       $MAX_SEND,
-       bigintval(REQUEST_POST('zip')),
-       bigintval($id)
-), __FILE__, __LINE__);
+                                               array(
+                                               REQUEST_POST('subject'),
+                                               REQUEST_POST('text'),
+                                               $RECEIVER,
+                                               bigintval(REQUEST_POST('type')),
+                                               REQUEST_POST('url'),
+                                               bigintval(REQUEST_POST('cat')),
+                                               $MAX_SEND,
+                                               bigintval(REQUEST_POST('zip')),
+                                               bigintval($id)
+                                               ), __FILE__, __LINE__);
                                        }
                                }
 
@@ -365,10 +365,10 @@ array(
                                        // Order is placed as temporary. We need to get it's id for the frametester
                                        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_pool` WHERE sender=%s AND subject='%s' AND payment_id=%s AND data_type='TEMP' AND timestamp=%s LIMIT 1",
                                        array(
-                                               getUserId(),
-                                               REQUEST_POST('subject'),
-                                               bigintval(REQUEST_POST('type')),
-                                               $TIME
+                                       getUserId(),
+                                       REQUEST_POST('subject'),
+                                       bigintval(REQUEST_POST('type')),
+                                       $TIME
                                        ), __FILE__, __LINE__);
 
                                        list($id) = SQL_FETCHROW($result);
@@ -423,7 +423,7 @@ array(
 
                                // Select users in current category
                                $result_uids = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_cats` WHERE cat_id=%s AND userid != '%s' ORDER BY `userid` ASC",
-                                       array(bigintval($content['id']), getUserId()), __FILE__, __LINE__);
+                               array(bigintval($content['id']), getUserId()), __FILE__, __LINE__);
 
                                $uid_cnt = 0;
                                while (list($ucat) = SQL_FETCHROW($result_uids)) {
@@ -449,7 +449,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__);
                                        if (!$HOL_ACTIVE) {
                                                // Check if the user want's to receive mails?
                                                $result_ver = SQL_QUERY_ESC("SELECT zip FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s".$HTML." AND receive_mails > 0 AND `status`='CONFIRMED' LIMIT 1",
-                                                       array(bigintval($ucat)), __FILE__, __LINE__);
+                                               array(bigintval($ucat)), __FILE__, __LINE__);
 
                                                if ((SQL_NUMROWS($result_ver) == 1) && (REQUEST_ISSET_POST('zip')) && (getConfig('order_multi_page') == 'Y')) {
                                                        list($zip) = SQL_FETCHROW($result_ver);
@@ -482,84 +482,84 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__);
                                $message = '';
                                switch (REQUEST_GET('msg'))
                                {
-                               case getCode('URL_TLOCK'):
-                                       $result = SQL_QUERY_ESC("SELECT timestamp FROM `{!_MYSQL_PREFIX!}_pool` WHERE `id`=%s LIMIT 1",
+                                       case getCode('URL_TLOCK'):
+                                               $result = SQL_QUERY_ESC("SELECT timestamp FROM `{!_MYSQL_PREFIX!}_pool` WHERE `id`=%s LIMIT 1",
                                         array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
 
-                                       // Load timestamp from last order
-                                       list($LORDER) = SQL_FETCHROW($result);
-                                       $LORDER = generateDateTime($LORDER, '1');
+                                        // Load timestamp from last order
+                                        list($LORDER) = SQL_FETCHROW($result);
+                                        $LORDER = generateDateTime($LORDER, '1');
 
-                                       // Free memory
-                                       SQL_FREERESULT($result);
+                                        // Free memory
+                                        SQL_FREERESULT($result);
 
-                                       // Calculate hours...
-                                       $STD = round(getConfig('url_tlock') / 60 / 60);
+                                        // Calculate hours...
+                                        $STD = round(getConfig('url_tlock') / 60 / 60);
 
-                                       // Minutes...
-                                       $MIN = round((getConfig('url_tlock') - $STD * 60 * 60) / 60);
+                                        // Minutes...
+                                        $MIN = round((getConfig('url_tlock') - $STD * 60 * 60) / 60);
 
-                                       // And seconds
-                                       $SEC = getConfig('url_tlock') - $STD * 60 * 60 - $MIN * 60;
+                                        // And seconds
+                                        $SEC = getConfig('url_tlock') - $STD * 60 * 60 - $MIN * 60;
 
-                                       // Finally contruct the message
-                                       // @TODO Rewrite this old lost code to a template
-                                       $message = "{--MEMBER_URL_TIME_LOCK--}<br />{--CONFIG_URL_TLOCK--} ".$STD."
+                                        // Finally contruct the message
+                                        // @TODO Rewrite this old lost code to a template
+                                        $message = "{--MEMBER_URL_TIME_LOCK--}<br />{--CONFIG_URL_TLOCK--} ".$STD."
                                                {--_HOURS--}, ".$MIN." {--_MINUTES--} {--_AND--} ".$SEC." {--_SECONDS--}<br />
                                                {--MEMBER_LAST_TLOCK--}: ".$LORDER;
-                                       break;
+                                        break;
 
-                               case getCode('OVERLENGTH'):
-                                       $message = getMessage('MEMBER_TEXT_OVERLENGTH');
-                                       break;
+                                       case getCode('OVERLENGTH'):
+                                               $message = getMessage('MEMBER_TEXT_OVERLENGTH');
+                                               break;
 
-                               case getCode('URL_FOUND'):
-                                       $message = getMessage('MEMBER_TEXT_CONTAINS_URL');
-                                       break;
+                                       case getCode('URL_FOUND'):
+                                               $message = getMessage('MEMBER_TEXT_CONTAINS_URL');
+                                               break;
 
-                               case getCode('SUBJ_URL'):
-                                       $message = getMessage('MEMBER_SUBJ_CONTAINS_URL');
-                                       break;
+                                       case getCode('SUBJ_URL'):
+                                               $message = getMessage('MEMBER_SUBJ_CONTAINS_URL');
+                                               break;
 
-                               case getCode('BLIST_URL'):
-                                       $message = "{--MEMBER_URL_BLACK_LISTED--}<br />\n{--MEMBER_BLIST_TIME--}: ".generateDateTime(REQUEST_GET('blist'), '0');
-                                       break;
+                                       case getCode('BLIST_URL'):
+                                               $message = "{--MEMBER_URL_BLACK_LISTED--}<br />\n{--MEMBER_BLIST_TIME--}: ".generateDateTime(REQUEST_GET('blist'), '0');
+                                               break;
 
-                               case getCode('NO_RECS_LEFT'):
-                                       $message = getMessage('MEMBER_SELECTED_MORE_RECS');
-                                       break;
+                                       case getCode('NO_RECS_LEFT'):
+                                               $message = getMessage('MEMBER_SELECTED_MORE_RECS');
+                                               break;
 
-                               case getCode('INVALID_TAGS'):
-                                       $message = getMessage('MEMBER_HTML_INVALID_TAGS');
-                                       break;
+                                       case getCode('INVALID_TAGS'):
+                                               $message = getMessage('MEMBER_HTML_INVALID_TAGS');
+                                               break;
 
-                               case getCode('MORE_POINTS'):
-                                       $message = getMessage('MEMBER_MORE_POINTS_NEEDED');
-                                       break;
+                                       case getCode('MORE_POINTS'):
+                                               $message = getMessage('MEMBER_MORE_POINTS_NEEDED');
+                                               break;
 
-                               case getCode('MORE_RECEIVERS1'):
-                                       $message = getMessage('MEMBER_ENTER_MORE_RECEIVERS');
-                                       break;
+                                       case getCode('MORE_RECEIVERS1'):
+                                               $message = getMessage('MEMBER_ENTER_MORE_RECEIVERS');
+                                               break;
 
-                               case getCode('MORE_RECEIVERS2'):
-                                       $message = getMessage('MEMBER_NO_MORE_RECEIVERS_FOUND');
-                                       break;
+                                       case getCode('MORE_RECEIVERS2'):
+                                               $message = getMessage('MEMBER_NO_MORE_RECEIVERS_FOUND');
+                                               break;
 
-                               case getCode('MORE_RECEIVERS3'):
-                                       $message = sprintf(getMessage('MEMBER_ENTER_MORE_MIN_RECEIVERS'), getConfig('order_min'));
-                                       break;
+                                       case getCode('MORE_RECEIVERS3'):
+                                               $message = sprintf(getMessage('MEMBER_ENTER_MORE_MIN_RECEIVERS'), getConfig('order_min'));
+                                               break;
 
-                               case getCode('INVALID_URL'):
-                                       $message = getMessage('MEMBER_ENTER_INVALID_URL');
-                                       break;
+                                       case getCode('INVALID_URL'):
+                                               $message = getMessage('MEMBER_ENTER_INVALID_URL');
+                                               break;
 
-                               case "": // When no error code is included in the URL we do not need to output an error message as well...
-                                       break;
+                                       case "": // When no error code is included in the URL we do not need to output an error message as well...
+                                               break;
 
-                               default:
-                                       DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown error code %s detected.", REQUEST_GET('msg')));
-                                       $message = sprintf(getMessage('UNKNOWN_CODE'), REQUEST_GET('msg'));
-                                       break;
+                                       default:
+                                               DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown error code %s detected.", REQUEST_GET('msg')));
+                                               $message = sprintf(getMessage('UNKNOWN_CODE'), REQUEST_GET('msg'));
+                                               break;
                                }
 
                                if (!empty($message)) {
@@ -581,18 +581,18 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__);
                                // Check how many mail orders he has placed today and how many he's allowed to send
                                switch (getConfig('order_max_full'))
                                {
-                               case 'MAX': // He is allowed to send as much as possible
-                                       define('ORDER_MAX_VALUE', getMessage('MEMBER_ORDER_ALLOWED_MAX'));
-                                       break;
-
-                               case 'ORDER': // He is allowed to send as much as he setup the receiving value
-                                       define('ORDER_MAX_VALUE', sprintf(getMessage('MEMBER_ORDER_ALLOWED_RECEIVE'), $ALLOWED, $MAXI));
-                                       break;
-
-                               default: // Unknown/invalid
-                                       DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown order_mas_full config detected.", getConfig('order_max_full')));
-                                       define('ORDER_MAX_VALUE', getMessage('MEMBER_ORDER_ALLOWED_UNKNOWN'));
-                                       break;
+                                       case 'MAX': // He is allowed to send as much as possible
+                                               define('ORDER_MAX_VALUE', getMessage('MEMBER_ORDER_ALLOWED_MAX'));
+                                               break;
+
+                                       case 'ORDER': // He is allowed to send as much as he setup the receiving value
+                                               define('ORDER_MAX_VALUE', sprintf(getMessage('MEMBER_ORDER_ALLOWED_RECEIVE'), $ALLOWED, $MAXI));
+                                               break;
+
+                                       default: // Unknown/invalid
+                                               DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown order_mas_full config detected.", getConfig('order_max_full')));
+                                               define('ORDER_MAX_VALUE', getMessage('MEMBER_ORDER_ALLOWED_UNKNOWN'));
+                                               break;
                                }
 
                                // Load final template
@@ -603,7 +603,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__);
 
                                // Check if we already have an order placed and make it editable
                                $result = SQL_QUERY_ESC("SELECT subject, text, payment_id, timestamp, url, target_send, cat_id, zip FROM `{!_MYSQL_PREFIX!}_pool` WHERE sender=%s AND data_type='TEMP' LIMIT 1",
-                                array(getUserId()), __FILE__, __LINE__);
+                               array(getUserId()), __FILE__, __LINE__);
 
                                if (SQL_NUMROWS($result) == 1) {
                                        // Old order found
index 3717af5a04ab1b2d496132751c2a7de3a1e2b444..5c6e5e2c9ec04fa73a8f350ea070b36f6ba03ca6 100644 (file)
@@ -57,7 +57,7 @@ $TPTS = 0;
 while ($content = SQL_FETCHARRAY($result_depths)) {
        // Load referal points
        $result_points = SQL_QUERY_ESC("SELECT points FROM `{!_MYSQL_PREFIX_user_points!}` WHERE userid=%s AND ref_depth=%d LIMIT 1",
-               array(getUserId(), bigintval($content['level'])), __FILE__, __LINE__);
+       array(getUserId(), bigintval($content['level'])), __FILE__, __LINE__);
 
        // Entry found?
        if (SQL_NUMROWS($result_points) == 1) {
@@ -90,7 +90,7 @@ if (!REQUEST_ISSET_GET(('payout'))) {
 FROM `{!_MYSQL_PREFIX!}_payout_types`
 WHERE %s >= min_points
 ORDER BY type ASC",
-               array(convertCommaToDot($TPTS)), __FILE__, __LINE__);
+       array(convertCommaToDot($TPTS)), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) > 0) {
                // Free memory
                SQL_FREERESULT($result);
@@ -102,7 +102,7 @@ LEFT JOIN `{!_MYSQL_PREFIX!}_payout_types` AS t
 ON p.payout_id = t.id
 WHERE p.userid = %s
 ORDER BY p.payout_timestamp DESC",
-                array(getUserId()), __FILE__, __LINE__);
+               array(getUserId()), __FILE__, __LINE__);
                if (SQL_NUMROWS($result_payouts) > 0) {
                        // List all his requests
                        $OUT = ''; $SW = 2;
@@ -161,7 +161,7 @@ ORDER BY p.payout_timestamp DESC",
 } else {
        // Chedk if he can get paid by selected type
        $result = SQL_QUERY_ESC("SELECT type, rate, min_points, allow_url AS allow FROM `{!_MYSQL_PREFIX!}_payout_types` WHERE `id`=%s LIMIT 1",
-               array(bigintval(REQUEST_GET('payout'))), __FILE__, __LINE__);
+       array(bigintval(REQUEST_GET('payout'))), __FILE__, __LINE__);
 
        if (SQL_NUMROWS($result) == 1) {
                // ID is valid so load the data
@@ -198,14 +198,14 @@ ORDER BY p.payout_timestamp DESC",
                                        // Banner/textlink ordered
                                        SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_payouts` (userid, payout_total, payout_id, payout_timestamp, status, target_url, link_text, banner_url)
 VALUES (%s,%s,%s, UNIX_TIMESTAMP(), 'NEW','%s','%s','%s')",
- array(
-       getUserId(),
-       bigintval(REQUEST_POST('payout')),
-       bigintval(REQUEST_GET('payout')),
-       REQUEST_POST('turl'),
-       REQUEST_POST('alt'),
-       REQUEST_POST('banner')
-), __FILE__, __LINE__);
                                      array(
+                                       getUserId(),
+                                       bigintval(REQUEST_POST('payout')),
+                                       bigintval(REQUEST_GET('payout')),
+                                       REQUEST_POST('turl'),
+                                       REQUEST_POST('alt'),
+                                       REQUEST_POST('banner')
+                                       ), __FILE__, __LINE__);
 
                                        // Load templates
                                        $msg_mem = LOAD_EMAIL_TEMPLATE("member_payout_request_banner", array(), getUserId());
@@ -218,14 +218,14 @@ VALUES (%s,%s,%s, UNIX_TIMESTAMP(), 'NEW','%s','%s','%s')",
                                        // e-currency payout requested
                                        SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_payouts` (userid, payout_total, target_account, target_bank, payout_id, payout_timestamp, status, password)
 VALUES (%s,%s,%s,'%s',%s, UNIX_TIMESTAMP(), 'NEW','%s')",
- array(
-       getUserId(),
-       bigintval(REQUEST_POST('payout')),
-       bigintval(REQUEST_POST('account')),
-       REQUEST_POST('bank'),
-       bigintval(REQUEST_GET('payout')),
-       REQUEST_POST('pass')
-), __FILE__, __LINE__);
                                      array(
+                                       getUserId(),
+                                       bigintval(REQUEST_POST('payout')),
+                                       bigintval(REQUEST_POST('account')),
+                                       REQUEST_POST('bank'),
+                                       bigintval(REQUEST_GET('payout')),
+                                       REQUEST_POST('pass')
+                                       ), __FILE__, __LINE__);
 
                                        // Load templates
                                        $msg_mem = LOAD_EMAIL_TEMPLATE("member_payout_request", array(), getUserId());
@@ -241,10 +241,10 @@ VALUES (%s,%s,%s,'%s',%s, UNIX_TIMESTAMP(), 'NEW','%s')",
                                // Generate task
                                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_task_system` (assigned_admin, status, task_type, subject, text, task_created, userid)
 VALUES (0, 'NEW','PAYOUT_REQUEST','[payout:] {--PAYOUT_REQUEST_ADMIN--}','%s', UNIX_TIMESTAMP(), %s)",
- array(
-       $msg_adm,
-       getUserId()
-), __FILE__, __LINE__);
                              array(
+                               $msg_adm,
+                               getUserId()
+                               ), __FILE__, __LINE__);
 
                                // Send out mails
                                sendEmail(getUserId(), getMessage('PAYOUT_REQUEST_MEMBER'), $msg_mem);
index 59abf34a1342ddd2287bc1b34aad924ac040d5d0..a0fdc3f0c92a6f5082d9a6e51026e5412a5adc17 100644 (file)
@@ -80,7 +80,7 @@ while ($content = SQL_FETCHARRAY($result_depths)) {
 
        // Load referal counts
        $result_refs = SQL_QUERY_ESC("SELECT counter FROM `{!_MYSQL_PREFIX!}_refsystem` WHERE userid=%s AND level='%s' LIMIT 1",
-               array(getUserId(), bigintval($content['level'])), __FILE__, __LINE__);
+       array(getUserId(), bigintval($content['level'])), __FILE__, __LINE__);
        if (SQL_NUMROWS($result_refs) == 1) {
                list($REFS) = SQL_FETCHROW($result_refs);
                SQL_FREERESULT($result_refs);
@@ -108,7 +108,7 @@ SQL_FREERESULT($result_depths);
 define('__REF_LEVEL_ROWS', $OUT);
 
 $result = SQL_QUERY_ESC("SELECT used_points, ref_payout FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-       array(getUserId()), __FILE__, __LINE__);
+array(getUserId()), __FILE__, __LINE__);
 list($USED, $PAY) = SQL_FETCHROW($result);
 SQL_FREERESULT($result);
 
@@ -152,7 +152,7 @@ if ((GET_EXT_VERSION('bonus') >= '0.2.2') && (EXT_IS_ACTIVE('bonus')) && (getCon
 
        // Load data
        $result = SQL_QUERY_ESC("SELECT login_bonus, turbo_bonus".$add." FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-               array(getUserId()), __FILE__, __LINE__);
+       array(getUserId()), __FILE__, __LINE__);
 
        // We don't add this points now. This will be done after each month
        list($login, $turbo, $ref, $order, $stats) = SQL_FETCHROW($result);
index 078af8325ec816e136603e1f8e1b89d0c14d6caa..9642d44c6e00c5bdfd949fabbb890c0f0cddda26 100644 (file)
@@ -69,7 +69,7 @@ if (!REQUEST_ISSET_GET(('mode'))) {
 
        // Get Primus id
        $result = SQL_QUERY_ESC("SELECT primera_userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-               array(getUserId()), __FILE__, __LINE__);
+       array(getUserId()), __FILE__, __LINE__);
 
        // Are there some entries?
        if (SQL_NUMROWS($result) == 1) {
@@ -87,7 +87,7 @@ if (!REQUEST_ISSET_GET(('mode'))) {
 
                // And load all rows!
                $result = SQL_QUERY_ESC("SELECT `id`,`primera_account`,`primera_amount`,`primera_timestamp`,`primera_type` FROM `{!_MYSQL_PREFIX!}_user_primera` WHERE `userid` = %s ORDER BY `primera_timestamp` DESC",
-                       array(getUserId()), __FILE__, __LINE__);
+               array(getUserId()), __FILE__, __LINE__);
 
                // Load all rows
                $content['rows'] = ''; $SW = 2;
@@ -139,7 +139,7 @@ if (REQUEST_GET('mode') == "pay") {
        // Get Primera id
        $content['primera_nickname'] = '';
        $result = SQL_QUERY_ESC("SELECT primera_userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-               array(getUserId()), __FILE__, __LINE__);
+       array(getUserId()), __FILE__, __LINE__);
 
        // Are there some entries?
        if (SQL_NUMROWS($result) == 1) {
@@ -197,7 +197,7 @@ if ((IS_FORM_SENT()) && (REQUEST_ISSET_GET(('mode')))) {
 
                                        // Update primera nickname
                                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `primera_userid`=%s WHERE userid=%s LIMIT 1",
-                                               array(REQUEST_POST('primera_nickname'), getUserId()), __FILE__, __LINE__);
+                                       array(REQUEST_POST('primera_nickname'), getUserId()), __FILE__, __LINE__);
 
                                        // All done!
                                        LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PRIMERA_MEMBER_PAYOUT_DONE'));
index 3b2513acb4dcb6d7a9fe69f0c77a63ab0f94b96a..9ef24d564451a23fe28e2cf60a9197c6af599822 100644 (file)
@@ -107,7 +107,7 @@ $result = SQL_QUERY_ESC("SELECT r.level, r.percents
 FROM `{!_MYSQL_PREFIX!}_refdepths` AS r
 WHERE r.level > 0
 ORDER BY r.level ASC",
-       array(getUserId()), __FILE__, __LINE__);
+array(getUserId()), __FILE__, __LINE__);
 
 // Are there some entries? (Shall be!)
 if (SQL_NUMROWS($result) > 0) {
index 64e00bf64faa9d6cf29f07e77f6e5719695da347..375e1f66a4938f2f0714b1f9ba28e261f4d32406 100644 (file)
@@ -49,7 +49,7 @@ ADD_DESCR('member', __FILE__);
 
 // Load current referal clicks
 $result = SQL_QUERY_ESC("SELECT ref_clicks FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-       array(getUserId()), __FILE__, __LINE__);
+array(getUserId()), __FILE__, __LINE__);
 list($c) = SQL_FETCHROW($result);
 SQL_FREERESULT($result);
 
@@ -87,7 +87,7 @@ if (SQL_NUMROWS($result) > 0) {
                if ($test == $content['url']) {
                        // Download banner (I hope you keep the banner on same server???)
                        $fp = sendGetRequest($content['url']); $bannerContent = '';
-                       if ((!empty($fp)) && (is_array($fp)) && (count($fp) > 0) {
+                       if ((!empty($fp)) && (is_array($fp)) && (count($fp) > 0)) {
                                // Loads only found banner, when there is a 404 error this foreach() command
                                // will cause an "Invalid argument supplied for foreach()" error
                                foreach ($fp as $f) {
index ec95e5364ffcf14716f217f493fa43f80aff6f21..1418fca9f607f51470b881d2d6e41b880b623a2e 100644 (file)
@@ -53,7 +53,7 @@ $result = SQL_QUERY_ESC("SELECT r.level, r.percents
 FROM `{!_MYSQL_PREFIX!}_refdepths` AS r
 WHERE r.level > 0
 ORDER BY r.level ASC",
-       array(getUserId()), __FILE__, __LINE__);
+array(getUserId()), __FILE__, __LINE__);
 
 // Are there some entries? (Shall be!)
 if (SQL_NUMROWS($result) > 0) {
index c8ff9de9298fe4bd810df10681cd592cdf2697aa..739b83a55b0f262415df34f32587e20933921bc6 100644 (file)
@@ -55,7 +55,7 @@ $result = SQL_QUERY_ESC("SELECT id, cat_id, payment_id, subject, url, timestamp,
 FROM `{!_MYSQL_PREFIX!}_pool`
 WHERE sender=%s AND data_type != 'SEND'
 ORDER BY timestamp DESC",
-       array(getUserId()), __FILE__, __LINE__);
+array(getUserId()), __FILE__, __LINE__);
 
 // Are there mails left in pool?
 if (SQL_NUMROWS($result) > 0) {
@@ -102,7 +102,7 @@ $result = SQL_QUERY_ESC("SELECT id, cat_id, payment_id, subject, url, timestamp_
 FROM `{!_MYSQL_PREFIX!}_user_stats`
 WHERE userid=%s
 ORDER BY timestamp_ordered DESC",
-       array(getUserId()), __FILE__, __LINE__);
+array(getUserId()), __FILE__, __LINE__);
 
 if (SQL_NUMROWS($result) > 0) {
        // Mail orders are in pool so we can display them
index ab4a5b950f551c62caf1157e1326594afea59d0a..b16ca6ba8a19bbf79242a615b828cfe4f1d7d25e 100644 (file)
@@ -88,7 +88,7 @@ if ((!IS_FORM_SENT()) || (!REQUEST_ISSET_POST(('qsummary')))) {
 
        // Drop a message in the admin's area
        SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_task_system` (userid, assigned_admin, status, task_type, subject, text, task_created) VALUES ('%s','0','NEW','SUPPORT_MEMBER','%s','%s', UNIX_TIMESTAMP())",
-               array(getUserId(), $subj_a, REQUEST_POST('qsummary') . ':'.array('text' => REQUEST_POST('qdetails'))), __FILE__, __LINE__);
+       array(getUserId(), $subj_a, REQUEST_POST('qsummary') . ':'.array('text' => REQUEST_POST('qdetails'))), __FILE__, __LINE__);
 
        // Form sent
        LOAD_TEMPLATE("member_support_contcted");
index 26865409cbba09a67049a5dd262e7aad06c9744c..95188d411442cb2193bc81e97983f8c2a652f775 100644 (file)
@@ -53,7 +53,7 @@ ADD_DESCR('member', __FILE__);
 if (REQUEST_ISSET_POST(('member_theme'))) {
        // Save theme to member's profile
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET curr_theme='%s' WHERE userid=%s LIMIT 1",
-               array(REQUEST_POST('member_theme'), getUserId()), __FILE__, __LINE__);
+       array(REQUEST_POST('member_theme'), getUserId()), __FILE__, __LINE__);
 
        // Set new theme for guests
        $newTheme = SQL_ESCAPE(REQUEST_POST('member_theme'));
@@ -125,7 +125,7 @@ foreach ($THEMES['theme_unix'] as $key => $unix) {
 }
 
 if (empty($OUT)) {
-       // No themes found???
+       // No themes found???
        $OUT = "<tr>
   <td colspan=\"5\" class=\"bottom2\" height=\"80\">
     ".LOAD_TEMPLATE('admin_settings_saved', true, getMessage('MEMBER_NO_THEMES_FOUND'))."
index aa017d8a3a8dbf9cbea8446edc35c309cc078095..86a69e9b076b7e4acdc57a75405b6622748e8f72 100644 (file)
@@ -52,7 +52,7 @@ ADD_DESCR('member', __FILE__);
 
 // Load data
 $result = SQL_QUERY_ESC("SELECT opt_in FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-       array(getUserId()), __FILE__, __LINE__);
+array(getUserId()), __FILE__, __LINE__);
 list($opt_in) = SQL_FETCHROW($result);
 
 // Free memory
@@ -66,318 +66,318 @@ if (($opt_in == 'N') && ($mode == "new")) $mode = '';
 
 switch ($mode)
 {
-case "new": // Start new transfer
-       // Get total points and subtract the balance amount from it = maximum transferable points
-       $total = GET_TOTAL_DATA(getUserId(), "user_points", "points")  - GET_TOTAL_DATA(getUserId(), "user_data", "used_points");
-
-       // Remember maximum value for template
-       define('__TRANSFER_MAX_VALUE', round($total - getConfig('transfer_balance') - 0.5));
-
-       if (IS_FORM_SENT()) {
-               // Add new transfer
-               if (getConfig('transfer_code') > 0) {
-                       // Check for code
-                       $code = generateRandomCodde(getConfig('transfer_code'), REQUEST_POST('code_chk'), getUserId(), constant('__TRANSFER_MAX_VALUE'));
-                       $valid_code = ($code == REQUEST_POST('code'));
-               } else {
-                       // Zero length (= disabled) is always valid!
-                       $valid_code = true;
-               }
+       case "new": // Start new transfer
+               // Get total points and subtract the balance amount from it = maximum transferable points
+               $total = GET_TOTAL_DATA(getUserId(), "user_points", "points")  - GET_TOTAL_DATA(getUserId(), "user_data", "used_points");
+
+               // Remember maximum value for template
+               define('__TRANSFER_MAX_VALUE', round($total - getConfig('transfer_balance') - 0.5));
+
+               if (IS_FORM_SENT()) {
+                       // Add new transfer
+                       if (getConfig('transfer_code') > 0) {
+                               // Check for code
+                               $code = generateRandomCodde(getConfig('transfer_code'), REQUEST_POST('code_chk'), getUserId(), constant('__TRANSFER_MAX_VALUE'));
+                               $valid_code = ($code == REQUEST_POST('code'));
+                       } else {
+                               // Zero length (= disabled) is always valid!
+                               $valid_code = true;
+                       }
 
-               // Test password
-               $valid_pass = ($pass == generateHash(REQUEST_POST('password'), $pass));
+                       // Test password
+                       $valid_pass = ($pass == generateHash(REQUEST_POST('password'), $pass));
 
-               // Test transfer amount
-               $valid_amount = ((REQUEST_ISSET_POST(('points'))) && (REQUEST_POST('points') <= constant('__TRANSFER_MAX_VALUE')));
+                       // Test transfer amount
+                       $valid_amount = ((REQUEST_ISSET_POST(('points'))) && (REQUEST_POST('points') <= constant('__TRANSFER_MAX_VALUE')));
 
-               // Test reason for transfer
-               $valid_reason = (REQUEST_ISSET_POST(('reason')));
+                       // Test reason for transfer
+                       $valid_reason = (REQUEST_ISSET_POST(('reason')));
 
-               // Test if a recipient is selected
-               $valid_recipient = (REQUEST_POST('to_uid') > 0);
+                       // Test if a recipient is selected
+                       $valid_recipient = (REQUEST_POST('to_uid') > 0);
 
-               // Check for nickname extension and set additional data
-               $nick = false; $add = ", userid";
-               if (EXT_IS_ACTIVE('nickname')) {
-                       $add = ", nickname";
-                       $nick = true;
-               }
+                       // Check for nickname extension and set additional data
+                       $nick = false; $add = ", userid";
+                       if (EXT_IS_ACTIVE('nickname')) {
+                               $add = ", nickname";
+                               $nick = true;
+                       }
 
-               // Re-check receivers and own personal data
-               $result = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email".$add." FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid IN ('%s','%s') AND `status`='CONFIRMED' ORDER BY userid LIMIT 2",
+                       // Re-check receivers and own personal data
+                       $result = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email".$add." FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid IN ('%s','%s') AND `status`='CONFIRMED' ORDER BY userid LIMIT 2",
                        array(getUserId(), bigintval(REQUEST_POST('to_uid'))), __FILE__, __LINE__);
-               $valid_data = (SQL_NUMROWS($result) == 2);
-
-               if ($valid_code && $valid_pass && $valid_amount && $valid_reason && $valid_recipient) {
-                       // Let's start the transfer and load user data
-                       list($uid1, $gender1, $sname1, $fname1, $email1, $nick1) = SQL_FETCHROW($result);
-                       list($uid2, $gender2, $sname2, $fname2, $email2, $nick2) = SQL_FETCHROW($result);
-                       SQL_FREERESULT($result);
-                       // @TODO Rewrite all these constants to array elements
-                       if ($uid1 == getUserId()) {
-                               // Data row 1 is sender's data
-                               define('__SENDER_GENDER'   , translateGender($gender1));
-                               define('__SENDER_NICK'     , $nick1);
-                               define('__SENDER_SNAME'    , $sname1);
-                               define('__SENDER_FNAME'    , $fname1);
-                               define('__SENDER_EMAIL'    , $email1);
-                               // Data row 2 is recpient's data
-                               define('__RECIPIENT_GENDER', translateGender($gender2));
-                               define('__RECIPIENT_NICK'  , $nick2);
-                               define('__RECIPIENT_SNAME' , $sname2);
-                               define('__RECIPIENT_FNAME' , $fname2);
-                               define('__RECIPIENT_EMAIL' , $email2);
-
-                               // Prepare variables for testing
-                               $TEST_NICK_SENDER = $nick1;
-                               $TEST_NICK_REC = $nick2;
-                       } else {
-                               // Data row 2 is sender's data
-                               define('__SENDER_GENDER'   , translateGender($gender2));
-                               define('__SENDER_NICK'     , $nick2);
-                               define('__SENDER_SNAME'    , $sname2);
-                               define('__SENDER_FNAME'    , $fname2);
-                               define('__SENDER_EMAIL'    , $email2);
-                               // Data row 1 is recpient's data
-                               define('__RECIPIENT_GENDER', translateGender($gender1));
-                               define('__RECIPIENT_NICK'  , $nick1);
-                               define('__RECIPIENT_SNAME' , $sname1);
-                               define('__RECIPIENT_FNAME' , $fname1);
-                               define('__RECIPIENT_EMAIL' , $email1);
-
-                               // Prepare variables for testing
-                               $TEST_NICK_SENDER = $nick2;
-                               $TEST_NICK_REC = $nick1;
-                       }
+                       $valid_data = (SQL_NUMROWS($result) == 2);
+
+                       if ($valid_code && $valid_pass && $valid_amount && $valid_reason && $valid_recipient) {
+                               // Let's start the transfer and load user data
+                               list($uid1, $gender1, $sname1, $fname1, $email1, $nick1) = SQL_FETCHROW($result);
+                               list($uid2, $gender2, $sname2, $fname2, $email2, $nick2) = SQL_FETCHROW($result);
+                               SQL_FREERESULT($result);
+                               // @TODO Rewrite all these constants to array elements
+                               if ($uid1 == getUserId()) {
+                                       // Data row 1 is sender's data
+                                       define('__SENDER_GENDER'   , translateGender($gender1));
+                                       define('__SENDER_NICK'     , $nick1);
+                                       define('__SENDER_SNAME'    , $sname1);
+                                       define('__SENDER_FNAME'    , $fname1);
+                                       define('__SENDER_EMAIL'    , $email1);
+                                       // Data row 2 is recpient's data
+                                       define('__RECIPIENT_GENDER', translateGender($gender2));
+                                       define('__RECIPIENT_NICK'  , $nick2);
+                                       define('__RECIPIENT_SNAME' , $sname2);
+                                       define('__RECIPIENT_FNAME' , $fname2);
+                                       define('__RECIPIENT_EMAIL' , $email2);
+
+                                       // Prepare variables for testing
+                                       $TEST_NICK_SENDER = $nick1;
+                                       $TEST_NICK_REC = $nick2;
+                               } else {
+                                       // Data row 2 is sender's data
+                                       define('__SENDER_GENDER'   , translateGender($gender2));
+                                       define('__SENDER_NICK'     , $nick2);
+                                       define('__SENDER_SNAME'    , $sname2);
+                                       define('__SENDER_FNAME'    , $fname2);
+                                       define('__SENDER_EMAIL'    , $email2);
+                                       // Data row 1 is recpient's data
+                                       define('__RECIPIENT_GENDER', translateGender($gender1));
+                                       define('__RECIPIENT_NICK'  , $nick1);
+                                       define('__RECIPIENT_SNAME' , $sname1);
+                                       define('__RECIPIENT_FNAME' , $fname1);
+                                       define('__RECIPIENT_EMAIL' , $email1);
+
+                                       // Prepare variables for testing
+                                       $TEST_NICK_SENDER = $nick2;
+                                       $TEST_NICK_REC = $nick1;
+                               }
 
-                       // Sender's UID is always currently stored in cookie userid...
-                       define('__SENDER_UID'     , getUserId());
-                       define('__RECIPIENT_UID'  , REQUEST_POST('to_uid'));
+                               // Sender's UID is always currently stored in cookie userid...
+                               define('__SENDER_UID'     , getUserId());
+                               define('__RECIPIENT_UID'  , REQUEST_POST('to_uid'));
 
-                       $SENDER = constant('__SENDER_UID');
-                       $RECIPIENT = constant('__RECIPIENT_UID');
-                       if ($nick) {
-                               if (($TEST_NICK_SENDER != constant('__SENDER_UID')) && (!empty($TEST_NICK_SENDER))) {
-                                       $SENDER = constant('__SENDER_NICK');
-                               }
+                               $SENDER = constant('__SENDER_UID');
+                               $RECIPIENT = constant('__RECIPIENT_UID');
+                               if ($nick) {
+                                       if (($TEST_NICK_SENDER != constant('__SENDER_UID')) && (!empty($TEST_NICK_SENDER))) {
+                                               $SENDER = constant('__SENDER_NICK');
+                                       }
 
-                               if (($TEST_NICK_REC != constant('__RECIPIENT_UID')) && (!empty($TEST_NICK_REC))) {
-                                       $RECIPIENT = constant('__RECIPIENT_NICK');
+                                       if (($TEST_NICK_REC != constant('__RECIPIENT_UID')) && (!empty($TEST_NICK_REC))) {
+                                               $RECIPIENT = constant('__RECIPIENT_NICK');
+                                       }
                                }
-                       }
 
-                       // Remember transfer reason and fancy date/time in constants
-                       define('__TRANSFER_REASON', REQUEST_POST('reason'));
-                       define('__TRANSFER_EXPIRES', createFancyTime(getConfig('transfer_age')));
+                               // Remember transfer reason and fancy date/time in constants
+                               define('__TRANSFER_REASON', REQUEST_POST('reason'));
+                               define('__TRANSFER_EXPIRES', createFancyTime(getConfig('transfer_age')));
 
-                       // Generate tranafer id
-                       define('__TRANS_ID', bigintval(generateRandomCodde("10", mt_rand(0, 99999), getUserId(), REQUEST_POST('reason'))));
+                               // Generate tranafer id
+                               define('__TRANS_ID', bigintval(generateRandomCodde("10", mt_rand(0, 99999), getUserId(), REQUEST_POST('reason'))));
 
-                       // Add entries to both tables
-                       SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_transfers_in` (userid, from_uid, points, reason, time_trans, trans_id) VALUES ('%s','%s','%s','%s', UNIX_TIMESTAMP(),'%s')",
+                               // Add entries to both tables
+                               SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_transfers_in` (userid, from_uid, points, reason, time_trans, trans_id) VALUES ('%s','%s','%s','%s', UNIX_TIMESTAMP(),'%s')",
                                array(bigintval(REQUEST_POST('to_uid')), getUserId(), bigintval(REQUEST_POST('points')), REQUEST_POST('reason'), __TRANS_ID),
                                __FILE__, __LINE__);
-                       SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_transfers_out` (userid, to_uid, points, reason, time_trans, trans_id) VALUES ('%s','%s','%s','%s', UNIX_TIMESTAMP(),'%s')",
+                               SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_transfers_out` (userid, to_uid, points, reason, time_trans, trans_id) VALUES ('%s','%s','%s','%s', UNIX_TIMESTAMP(),'%s')",
                                array(getUserId(), bigintval(REQUEST_POST('to_uid')), bigintval(REQUEST_POST('points')), REQUEST_POST('reason'), __TRANS_ID),
                                __FILE__, __LINE__);
 
-                       // Add points to account *directly* ...
-                       ADD_POINTS_REFSYSTEM_DIRECT('member_transfer', bigintval(REQUEST_POST('to_uid')), bigintval(REQUEST_POST('points')));
-
-                       // ... and add it to current user's used points
-                       SUB_POINTS('transfer', getUserId(), REQUEST_POST('points'));
-
-                       // First send email to recipient
-                       $msg = LOAD_EMAIL_TEMPLATE("member_transfer_recipient", '', constant('__RECIPIENT_UID'));
-                       sendEmail(constant('__RECIPIENT_EMAIL'), getMessage('TRANSFER_MEMBER_RECIPIENT_SUBJ').": ".$SENDER, $msg);
-
-                       // Second send email to sender
-                       $msg = LOAD_EMAIL_TEMPLATE("member_transfer_sender", '', constant('__SENDER_UID'));
-                       sendEmail(constant('__SENDER_EMAIL'), getMessage('TRANSFER_MEMBER_SENDER_SUBJ').": ".$RECIPIENT, $msg);
-
-                       // At last send admin mail(s)
-                       $ADMIN_SUBJ = sprintf("%s (%s->%s)", getMessage('TRANSFER_ADMIN_SUBJECT'), $SENDER, $RECIPIENT);
-                       sendAdminNotification($ADMIN_SUBJ, "admin_transfer_points");
-
-                       // Transfer is completed
-                       LOAD_TEMPLATE('admin_settings_saved', false, getMessage('TRANSFER_COMPLETED')."<br /><a href=\"{!URL!}/modules.php?module=login&amp;what=transfer\">{--TRANSFER_CONTINUE_OVERVIEW--}</a>");
-               } elseif (!$valid_code) {
-                       // Invalid Touring code!
-                       LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_CODE--}</div>");
-                       REQUEST_UNSET_POST('ok');
-               } elseif (!$valid_pass) {
-                       // Wrong password entered
-                       LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_PASSWORD--}</div>");
-                       REQUEST_UNSET_POST('ok');
-               } elseif (!$valid_amount) {
-                       // Too much points entered
-                       LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_POINTS--}</div>");
-                       REQUEST_UNSET_POST('ok');
-               } elseif (!$valid_reason) {
-                       // No transfer reason entered
-                       LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_REASON--}</div>");
-                       REQUEST_UNSET_POST('ok');
-               } elseif (!$valid_recipient) {
-                       // No recipient selected
-                       LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_RECIPIENT--}</div>");
-                       REQUEST_UNSET_POST('ok');
-               } elseif (!$valid_data) {
-                       // No recipient selected
-                       LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_DATA--}</div>");
-                       REQUEST_UNSET_POST('ok');
+                               // Add points to account *directly* ...
+                               ADD_POINTS_REFSYSTEM_DIRECT('member_transfer', bigintval(REQUEST_POST('to_uid')), bigintval(REQUEST_POST('points')));
+
+                               // ... and add it to current user's used points
+                               SUB_POINTS('transfer', getUserId(), REQUEST_POST('points'));
+
+                               // First send email to recipient
+                               $msg = LOAD_EMAIL_TEMPLATE("member_transfer_recipient", '', constant('__RECIPIENT_UID'));
+                               sendEmail(constant('__RECIPIENT_EMAIL'), getMessage('TRANSFER_MEMBER_RECIPIENT_SUBJ').": ".$SENDER, $msg);
+
+                               // Second send email to sender
+                               $msg = LOAD_EMAIL_TEMPLATE("member_transfer_sender", '', constant('__SENDER_UID'));
+                               sendEmail(constant('__SENDER_EMAIL'), getMessage('TRANSFER_MEMBER_SENDER_SUBJ').": ".$RECIPIENT, $msg);
+
+                               // At last send admin mail(s)
+                               $ADMIN_SUBJ = sprintf("%s (%s->%s)", getMessage('TRANSFER_ADMIN_SUBJECT'), $SENDER, $RECIPIENT);
+                               sendAdminNotification($ADMIN_SUBJ, "admin_transfer_points");
+
+                               // Transfer is completed
+                               LOAD_TEMPLATE('admin_settings_saved', false, getMessage('TRANSFER_COMPLETED')."<br /><a href=\"{!URL!}/modules.php?module=login&amp;what=transfer\">{--TRANSFER_CONTINUE_OVERVIEW--}</a>");
+                       } elseif (!$valid_code) {
+                               // Invalid Touring code!
+                               LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_CODE--}</div>");
+                               REQUEST_UNSET_POST('ok');
+                       } elseif (!$valid_pass) {
+                               // Wrong password entered
+                               LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_PASSWORD--}</div>");
+                               REQUEST_UNSET_POST('ok');
+                       } elseif (!$valid_amount) {
+                               // Too much points entered
+                               LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_POINTS--}</div>");
+                               REQUEST_UNSET_POST('ok');
+                       } elseif (!$valid_reason) {
+                               // No transfer reason entered
+                               LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_REASON--}</div>");
+                               REQUEST_UNSET_POST('ok');
+                       } elseif (!$valid_recipient) {
+                               // No recipient selected
+                               LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_RECIPIENT--}</div>");
+                               REQUEST_UNSET_POST('ok');
+                       } elseif (!$valid_data) {
+                               // No recipient selected
+                               LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_DATA--}</div>");
+                               REQUEST_UNSET_POST('ok');
+                       }
                }
-       }
 
-       if (!IS_FORM_SENT()) {
-               // Load member list
-               if (EXT_IS_ACTIVE('nickname')) {
-                       // Load userid and nickname
-                       $result = SQL_QUERY_ESC("SELECT userid, nickname FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `status`='CONFIRMED' AND opt_in='Y' AND userid != '%s' ORDER BY `userid` ASC",
+               if (!IS_FORM_SENT()) {
+                       // Load member list
+                       if (EXT_IS_ACTIVE('nickname')) {
+                               // Load userid and nickname
+                               $result = SQL_QUERY_ESC("SELECT userid, nickname FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `status`='CONFIRMED' AND opt_in='Y' AND userid != '%s' ORDER BY `userid` ASC",
                         array(getUserId()), __FILE__, __LINE__);
-               } else {
-                       // Load only userid
-                       $result = SQL_QUERY_ESC("SELECT userid, userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `status`='CONFIRMED' AND opt_in='Y' AND userid != '%s' ORDER BY `userid` ASC",
+                       } else {
+                               // Load only userid
+                               $result = SQL_QUERY_ESC("SELECT userid, userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `status`='CONFIRMED' AND opt_in='Y' AND userid != '%s' ORDER BY `userid` ASC",
                         array(getUserId()), __FILE__, __LINE__);
-               }
+                       }
 
-               if (SQL_NUMROWS($result) > 0) {
-                       // Load list
-                       $OUT  = "<select name=\"to_uid\" size=\"1\" class=\"member_select\">
+                       if (SQL_NUMROWS($result) > 0) {
+                               // Load list
+                               $OUT  = "<select name=\"to_uid\" size=\"1\" class=\"member_select\">
        <option value=\"0\">{--SELECT_NONE--}</option>\n";
-                       // @TODO Try to rewrite his to $content = SQL_FETCHARRAY(), see some lines above for two different queries
-                       while (list($uid, $nick) = SQL_FETCHROW($result)) {
-                               $OUT .= "       <option value=\"".$uid."\"";
-                               if ((REQUEST_ISSET_POST(('to_uid'))) && (REQUEST_POST('to_uid') == $uid)) $OUT .= ' selected="selected"';
-                               $OUT .= ">";
-                               if (($nick != $uid) && (!empty($nick))) {
-                                       // Output nickname
-                                       $OUT .= $nick;
-                               } else {
-                                       // Output userid
-                                       $OUT .= $uid;
+                               // @TODO Try to rewrite his to $content = SQL_FETCHARRAY(), see some lines above for two different queries
+                               while (list($uid, $nick) = SQL_FETCHROW($result)) {
+                                       $OUT .= "       <option value=\"".$uid."\"";
+                                       if ((REQUEST_ISSET_POST(('to_uid'))) && (REQUEST_POST('to_uid') == $uid)) $OUT .= ' selected="selected"';
+                                       $OUT .= ">";
+                                       if (($nick != $uid) && (!empty($nick))) {
+                                               // Output nickname
+                                               $OUT .= $nick;
+                                       } else {
+                                               // Output userid
+                                               $OUT .= $uid;
+                                       }
+                                       $OUT .= "</option>\n";
                                }
-                               $OUT .= "</option>\n";
+                               $OUT .= "</select>\n";
+                               define('__TRANSFER_TO_DISABLED', '');
+
+                               // Free memory
+                               SQL_FREERESULT($result);
+                       } else {
+                               // No one else is opt-in
+                               $OUT = getMessage('TRANSFER_NO_ONE_ELSE_OPT_IN');
+                               define('__TRANSFER_TO_DISABLED', " disabled");
                        }
-                       $OUT .= "</select>\n";
-                       define('__TRANSFER_TO_DISABLED', '');
 
-                       // Free memory
-                       SQL_FREERESULT($result);
-               } else {
-                       // No one else is opt-in
-                       $OUT = getMessage('TRANSFER_NO_ONE_ELSE_OPT_IN');
-                       define('__TRANSFER_TO_DISABLED', " disabled");
-               }
+                       // Transfer output to constant for the template
+                       define('__TRANSFER_USERID_SELECTION', $OUT);
 
-               // Transfer output to constant for the template
-               define('__TRANSFER_USERID_SELECTION', $OUT);
+                       // Generate Code
+                       if (getConfig('transfer_code') > 0) {
+                               $rand = mt_rand(0, 99999);
+                               $code = generateRandomCodde(getConfig('transfer_code'), $rand, getUserId(), constant('__TRANSFER_MAX_VALUE'));
+                               $img = GENERATE_IMAGE($code, false);
+                               define('__TRANSFER_IMAGE_INPUT', "<input type=\"hidden\" name=\"code_chk\" value=\"".$rand."\" /><input type=\"text\" name=\"code\" class=\"member_normal\" size=\"5\" maxlength=\"7\"{!__TRANSFER_TO_DISABLED!} />&nbsp;".$img);
+                       } else {
+                               $code = "00000";
+                               define('__TRANSFER_IMAGE_INPUT', getMessage('TRANSFER_NO_CODE'));
+                       }
 
-               // Generate Code
-               if (getConfig('transfer_code') > 0) {
-                       $rand = mt_rand(0, 99999);
-                       $code = generateRandomCodde(getConfig('transfer_code'), $rand, getUserId(), constant('__TRANSFER_MAX_VALUE'));
-                       $img = GENERATE_IMAGE($code, false);
-                       define('__TRANSFER_IMAGE_INPUT', "<input type=\"hidden\" name=\"code_chk\" value=\"".$rand."\" /><input type=\"text\" name=\"code\" class=\"member_normal\" size=\"5\" maxlength=\"7\"{!__TRANSFER_TO_DISABLED!} />&nbsp;".$img);
-               } else {
-                       $code = "00000";
-                       define('__TRANSFER_IMAGE_INPUT', getMessage('TRANSFER_NO_CODE'));
-               }
+                       // Transfer maybe already entered valued'
+                       if (REQUEST_ISSET_GET('ok')) {
+                               // Get values from form
+                               define('__TRANSFER_POINTS_VALUE', bigintval(REQUEST_POST('points')));
+                               define('__TRANSFER_REASON_VALUE', strip_tags(REQUEST_POST('reason')));
+                       } else {
+                               // Set empty values
+                               define('__TRANSFER_POINTS_VALUE', '');
+                               define('__TRANSFER_REASON_VALUE', '');
+                       }
 
-               // Transfer maybe already entered valued'
-               if (REQUEST_ISSET_GET('ok')) {
-                       // Get values from form
-                       define('__TRANSFER_POINTS_VALUE', bigintval(REQUEST_POST('points')));
-                       define('__TRANSFER_REASON_VALUE', strip_tags(REQUEST_POST('reason')));
-               } else {
-                       // Set empty values
-                       define('__TRANSFER_POINTS_VALUE', '');
-                       define('__TRANSFER_REASON_VALUE', '');
+                       // Output form
+                       LOAD_TEMPLATE("member_transfer_new");
                }
-
-               // Output form
-               LOAD_TEMPLATE("member_transfer_new");
-       }
-       break;
-
-case "list_in": // List only incoming transactions
-case "list_out": // List only outgoing transactions
-       // As you can see I put list_in and list_out together. I now do a switch() again on it for the right SQL command
-       switch ($mode)
-       {
-       case "list_in":
-               $sql = "SELECT trans_id, from_uid, points, reason, time_trans FROM `{!_MYSQL_PREFIX!}_user_transfers_in` WHERE userid=%s ORDER BY time_trans DESC LIMIT ".getConfig('transfer_max');
-               // @TODO Rewrite these constants
-               $NOTHING = getMessage('TRANSFER_NO_INCOMING_TRANSFERS');
-               define('__TRANSFER_SUM', getMessage('TRANSFER_TOTAL_INCOMING'));
-               define('__TRANSFER_TITLE', getMessage('TRANSFER_LIST_INCOMING'));
                break;
 
-       case "list_out":
-               $sql = "SELECT trans_id, to_uid, points, reason, time_trans FROM `{!_MYSQL_PREFIX!}_user_transfers_out` WHERE userid=%s ORDER BY time_trans DESC LIMIT ".getConfig('transfer_max');
-               // @TODO Rewrite these constants
-               $NOTHING = getMessage('TRANSFER_NO_OUTGOING_TRANSFERS');
-               define('__TRANSFER_SUM', getMessage('TRANSFER_TOTAL_OUTGOING'));
-               define('__TRANSFER_TITLE', getMessage('TRANSFER_LIST_OUTGOING'));
-               break;
-       }
-
-       // Run the SQL command
-       $total = 0;
-       $result = SQL_QUERY_ESC($sql, array(getUserId()), __FILE__, __LINE__);
-       if (SQL_NUMROWS($result) > 0) {
-               $OUT = ''; $SW = 2;
-               // @TODO This should be somehow rewritten to $content = SQL_FETCHARRAY(), see switch() block above for SQL queries
-               while (list($tid, $uid, $points, $reason, $stamp) = SQL_FETCHROW($result)) {
-                       // Rewrite points
-                       if ($type == "OUT") $points = $points.'-';
-
-                       // Prepare content for template
-                       $content = array(
+       case "list_in": // List only incoming transactions
+       case "list_out": // List only outgoing transactions
+               // As you can see I put list_in and list_out together. I now do a switch() again on it for the right SQL command
+               switch ($mode)
+               {
+                       case "list_in":
+                               $sql = "SELECT trans_id, from_uid, points, reason, time_trans FROM `{!_MYSQL_PREFIX!}_user_transfers_in` WHERE userid=%s ORDER BY time_trans DESC LIMIT ".getConfig('transfer_max');
+                               // @TODO Rewrite these constants
+                               $NOTHING = getMessage('TRANSFER_NO_INCOMING_TRANSFERS');
+                               define('__TRANSFER_SUM', getMessage('TRANSFER_TOTAL_INCOMING'));
+                               define('__TRANSFER_TITLE', getMessage('TRANSFER_LIST_INCOMING'));
+                               break;
+
+                       case "list_out":
+                               $sql = "SELECT trans_id, to_uid, points, reason, time_trans FROM `{!_MYSQL_PREFIX!}_user_transfers_out` WHERE userid=%s ORDER BY time_trans DESC LIMIT ".getConfig('transfer_max');
+                               // @TODO Rewrite these constants
+                               $NOTHING = getMessage('TRANSFER_NO_OUTGOING_TRANSFERS');
+                               define('__TRANSFER_SUM', getMessage('TRANSFER_TOTAL_OUTGOING'));
+                               define('__TRANSFER_TITLE', getMessage('TRANSFER_LIST_OUTGOING'));
+                               break;
+               }
+
+               // Run the SQL command
+               $total = 0;
+               $result = SQL_QUERY_ESC($sql, array(getUserId()), __FILE__, __LINE__);
+               if (SQL_NUMROWS($result) > 0) {
+                       $OUT = ''; $SW = 2;
+                       // @TODO This should be somehow rewritten to $content = SQL_FETCHARRAY(), see switch() block above for SQL queries
+                       while (list($tid, $uid, $points, $reason, $stamp) = SQL_FETCHROW($result)) {
+                               // Rewrite points
+                               if ($type == "OUT") $points = $points.'-';
+
+                               // Prepare content for template
+                               $content = array(
                                'sw'     => $SW,
                                'tid'    => $id,
                                'stamp'  => generateDateTime($stamp, '3'),
                                'uid'    => $uid,
                                'reason' => $reason,
                                'points' => translateComma($points)
-                       );
+                               );
 
-                       // Load row template
-                       $OUT .= LOAD_TEMPLATE("member_transfer_row2", true, $content);
+                               // Load row template
+                               $OUT .= LOAD_TEMPLATE("member_transfer_row2", true, $content);
 
-                       // Add points and switch color
-                       $total += $points;
-                       $SW = 3 - $SW;
-               }
+                               // Add points and switch color
+                               $total += $points;
+                               $SW = 3 - $SW;
+                       }
 
-               // Free memory
-               SQL_FREERESULT($result);
-       } else {
-               // Nothing for in or out
-               $OUT = "<tr>
+                       // Free memory
+                       SQL_FREERESULT($result);
+               } else {
+                       // Nothing for in or out
+                       $OUT = "<tr>
   <td colspan=\"5\" align=\"center\" class=\"bottom2\" height=\"70\">
     ".LOAD_TEMPLATE('admin_settings_saved', true, $NOTHING)."
   </td>
 </tr>";
-       }
-
-       // ... and add them to a constant for the template
-       // @TODO Rewrite these constants
-       define('__TRANSFER_ROWS', $OUT);
-
-       // Remeber total amount
-       define('__TRANSFER_TOTAL_VALUE', $total);
-
-       // Load final template
-       LOAD_TEMPLATE("member_transfer_list");
-       break;
-
-case "list_all": // List all transactions
-       // We fill a temporary table with data from both tables. This is much easier
-       // to code and unstand by you as sub-SELECT queries. I know this is not the
-       // fastest way but it shall be fine for now.
-       //
-       // First of all create the temporary table
-       $result = SQL_QUERY("CREATE TEMPORARY TABLE `{!_MYSQL_PREFIX!}_transfers_tmp` (
+               }
+
+               // ... and add them to a constant for the template
+               // @TODO Rewrite these constants
+               define('__TRANSFER_ROWS', $OUT);
+
+               // Remeber total amount
+               define('__TRANSFER_TOTAL_VALUE', $total);
+
+               // Load final template
+               LOAD_TEMPLATE("member_transfer_list");
+               break;
+
+                       case "list_all": // List all transactions
+                               // We fill a temporary table with data from both tables. This is much easier
+                               // to code and unstand by you as sub-SELECT queries. I know this is not the
+                               // fastest way but it shall be fine for now.
+                               //
+                               // First of all create the temporary table
+                               $result = SQL_QUERY("CREATE TEMPORARY TABLE `{!_MYSQL_PREFIX!}_transfers_tmp` (
 trans_id VARCHAR(12) NOT NULL DEFAULT '',
 party_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
 points BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
@@ -387,167 +387,167 @@ trans_type ENUM('IN','OUT') NOT NULL DEFAULT 'IN',
 KEY(party_uid)
 ) TYPE=HEAP", __FILE__, __LINE__);
 
-       // Let's begin with the incoming list
-       $result = SQL_QUERY_ESC("SELECT trans_id, from_uid, points, reason, time_trans FROM `{!_MYSQL_PREFIX!}_user_transfers_in` WHERE userid=%s ORDER BY `id` LIMIT %s",
-array(getUserId(), getConfig('transfer_max')), __FILE__, __LINE__);
-       while ($DATA = SQL_FETCHROW($result)) {
-               $DATA[] = "IN";
-               $DATA = implode("','", $DATA);
-               $res_temp = SQL_QUERY("INSERT INTO `{!_MYSQL_PREFIX!}_transfers_tmp` (trans_id, party_uid, points, reason, time_trans, trans_type) VALUES ('".$DATA."')", __FILE__, __LINE__);
-       }
-
-       // Free memory
-       SQL_FREERESULT($result);
-
-       // As the last table transfer data from outgoing table to temporary
-       $result = SQL_QUERY_ESC("SELECT trans_id, to_uid, points, reason, time_trans FROM `{!_MYSQL_PREFIX!}_user_transfers_out` WHERE userid=%s ORDER BY `id` LIMIT %s",
-array(getUserId(), getConfig('transfer_max')), __FILE__, __LINE__);
-       while ($DATA = SQL_FETCHROW($result)) {
-               $DATA[] = "OUT";
-               $DATA = implode("','", $DATA);
-               $res_temp = SQL_QUERY("INSERT INTO `{!_MYSQL_PREFIX!}_transfers_tmp` (trans_id, party_uid, points, reason, time_trans, trans_type) VALUES ('".$DATA."')", __FILE__, __LINE__);
-       }
-
-       // Free memory
-       SQL_FREERESULT($result);
-
-       $total = 0;
-       if (SQL_NUMROWS($result) > 0) {
-               // Search for entries
-               $result = SQL_QUERY("SELECT party_uid, trans_id, points, reason, time_trans, trans_type FROM `{!_MYSQL_PREFIX!}_transfers_tmp` ORDER BY time_trans DESC",
-                       __FILE__, __LINE__);
-
-               // Output rows
-               $OUT = ''; $SW = 2;
-               while ($content = SQL_FETCHARRAY($result)) {
-                       // Rewrite points
-                       if ($content['trans_type'] == "OUT") $content['points'] = '-'.$content['points']."";
-
-                       // Prepare content for template
-                       $content['sw']     = $SW;
-                       $content['time']   = generateDateTime($content['time_trans'], '3');
-                       $content['points'] = translateComma($content['points']);
-
-                       // Load row template
-                       $OUT .= LOAD_TEMPLATE("member_transfer_row", true, $content);
-
-                       // Add points and switch color
-                       $total += $content['points'];
-                       $SW = 3 - $SW;
-               }
+                               // Let's begin with the incoming list
+                               $result = SQL_QUERY_ESC("SELECT trans_id, from_uid, points, reason, time_trans FROM `{!_MYSQL_PREFIX!}_user_transfers_in` WHERE userid=%s ORDER BY `id` LIMIT %s",
+                               array(getUserId(), getConfig('transfer_max')), __FILE__, __LINE__);
+                               while ($DATA = SQL_FETCHROW($result)) {
+                                       $DATA[] = "IN";
+                                       $DATA = implode("','", $DATA);
+                                       $res_temp = SQL_QUERY("INSERT INTO `{!_MYSQL_PREFIX!}_transfers_tmp` (trans_id, party_uid, points, reason, time_trans, trans_type) VALUES ('".$DATA."')", __FILE__, __LINE__);
+                               }
+
+                               // Free memory
+                               SQL_FREERESULT($result);
+
+                               // As the last table transfer data from outgoing table to temporary
+                               $result = SQL_QUERY_ESC("SELECT trans_id, to_uid, points, reason, time_trans FROM `{!_MYSQL_PREFIX!}_user_transfers_out` WHERE userid=%s ORDER BY `id` LIMIT %s",
+                               array(getUserId(), getConfig('transfer_max')), __FILE__, __LINE__);
+                               while ($DATA = SQL_FETCHROW($result)) {
+                                       $DATA[] = "OUT";
+                                       $DATA = implode("','", $DATA);
+                                       $res_temp = SQL_QUERY("INSERT INTO `{!_MYSQL_PREFIX!}_transfers_tmp` (trans_id, party_uid, points, reason, time_trans, trans_type) VALUES ('".$DATA."')", __FILE__, __LINE__);
+                               }
+
+                               // Free memory
+                               SQL_FREERESULT($result);
 
-               // Free memory
-               SQL_FREERESULT($result);
-       } else {
-               // Nothing for in and out
-               $OUT = "<tr>
+                               $total = 0;
+                               if (SQL_NUMROWS($result) > 0) {
+                                       // Search for entries
+                                       $result = SQL_QUERY("SELECT party_uid, trans_id, points, reason, time_trans, trans_type FROM `{!_MYSQL_PREFIX!}_transfers_tmp` ORDER BY time_trans DESC",
+                                       __FILE__, __LINE__);
+
+                                       // Output rows
+                                       $OUT = ''; $SW = 2;
+                                       while ($content = SQL_FETCHARRAY($result)) {
+                                               // Rewrite points
+                                               if ($content['trans_type'] == "OUT") $content['points'] = '-'.$content['points']."";
+
+                                               // Prepare content for template
+                                               $content['sw']     = $SW;
+                                               $content['time']   = generateDateTime($content['time_trans'], '3');
+                                               $content['points'] = translateComma($content['points']);
+
+                                               // Load row template
+                                               $OUT .= LOAD_TEMPLATE("member_transfer_row", true, $content);
+
+                                               // Add points and switch color
+                                               $total += $content['points'];
+                                               $SW = 3 - $SW;
+                                       }
+
+                                       // Free memory
+                                       SQL_FREERESULT($result);
+                               } else {
+                                       // Nothing for in and out
+                                       $OUT = "<tr>
   <td colspan=\"5\" align=\"center\" class=\"bottom2\" height=\"70\">
     ".LOAD_TEMPLATE('admin_settings_saved', true, getMessage('TRANSFER_NO_INOUT_TRANSFERS'))."
   </td>
 </tr>";
-       }
-
-       // ... and add them to a constant for the template
-       // @TODO Rewrite all these constants
-       define('__TRANSFER_ROWS', $OUT);
-
-       // Remeber total amount
-       define('__TRANSFER_TOTAL_VALUE', $total);
-
-       // Set title
-       define('__TRANSFER_TITLE', getMessage('TRANSFER_LIST_ALL'));
-
-       // Set "balance" word
-       define('__TRANSFER_SUM', getMessage('TRANSFER_TOTAL_BALANCE'));
-
-       // Load final template
-       LOAD_TEMPLATE("member_transfer_list");
-
-       // At the end we don't need a temporary table in memory
-       $result = SQL_QUERY("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_transfers_tmp`", __FILE__, __LINE__);
-
-       // Free some memory...
-       SQL_FREERESULT($result);
-       break;
-
-case "": // Overview page
-       // Check incoming transfers
-       $result = SQL_QUERY_ESC("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_user_transfers_in` WHERE userid=%s", array(getUserId()), __FILE__, __LINE__);
-       list($dmy) = SQL_FETCHROW($result);
-       SQL_FREERESULT($result);
-
-       $total=$dmy;
-       if ($dmy > 0) {
-               define('__TRANSFER_IN_LINK', "<a href=\"{!URL!}/modules.php?module=login&amp;what=transfer&amp;mode=list_in\">".$dmy."</a>");
-       } else {
-               define('__TRANSFER_IN_LINK', $dmy);
-       }
-
-       // Check outgoing transfers
-       $result = SQL_QUERY_ESC("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_user_transfers_out` WHERE userid=%s", array(getUserId()), __FILE__, __LINE__);
-       list($dmy) = SQL_FETCHROW($result);
-       SQL_FREERESULT($result);
-
-       $total+=$dmy;
-       if ($dmy > 0) {
-               define('__TRANSFER_OUT_LINK', "<a href=\"{!URL!}/modules.php?module=login&amp;what=transfer&amp;mode=list_out\">".$dmy."</a>");
-       } else {
-               define('__TRANSFER_OUT_LINK', $dmy);
-       }
-
-       // Total transactions
-       if ($total > 0) {
-               define('__TRANSFER_ALL_LINK', "<a href=\"{!URL!}/modules.php?module=login&amp;what=transfer&amp;mode=list_all\">".$total."</a>");
-       } else {
-               define('__TRANSFER_ALL_LINK', $total);
-       }
-
-       if (IS_FORM_SENT()) {
-               // Save settings
-               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET opt_in='%s' WHERE userid=%s LIMIT 1",
-                       array(REQUEST_POST('opt_in'), getUserId()), __FILE__, __LINE__);
-
-               // Rember for next switch() command
-               $opt_in = REQUEST_POST('opt_in');
-
-               // "Settings saved..."
-               LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_done\">{--SETTINGS_SAVED--}</div>");
-       }
-
-       switch ($opt_in)
-       {
-       case 'Y':
-               define('__TRANSFER_ALLOW_Y', ' checked="checked"');
-               define('__TRANSFER_ALLOW_N', '');
-               define('__TRANSFER_NEW_LINK', "<a href=\"{!URL!}/modules.php?module=login&amp;what=transfer&amp;mode=new\">{--TRANSFER_NOW_LINK--}</a>");
-               break;
+                               }
 
-       case 'N':
-               define('__TRANSFER_ALLOW_Y', '');
-               define('__TRANSFER_ALLOW_N', ' checked="checked"');
-               define('__TRANSFER_NEW_LINK', getMessage('TRANSFER_PLEASE_ALLOW_OPT_IN'));
-               break;
-       }
+                               // ... and add them to a constant for the template
+                               // @TODO Rewrite all these constants
+                               define('__TRANSFER_ROWS', $OUT);
+
+                               // Remeber total amount
+                               define('__TRANSFER_TOTAL_VALUE', $total);
+
+                               // Set title
+                               define('__TRANSFER_TITLE', getMessage('TRANSFER_LIST_ALL'));
+
+                               // Set "balance" word
+                               define('__TRANSFER_SUM', getMessage('TRANSFER_TOTAL_BALANCE'));
 
-       // Check for latest out-transfers
-       $result = SQL_QUERY_ESC("SELECT time_trans
+                               // Load final template
+                               LOAD_TEMPLATE("member_transfer_list");
+
+                               // At the end we don't need a temporary table in memory
+                               $result = SQL_QUERY("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_transfers_tmp`", __FILE__, __LINE__);
+
+                               // Free some memory...
+                               SQL_FREERESULT($result);
+                               break;
+
+                       case "": // Overview page
+                               // Check incoming transfers
+                               $result = SQL_QUERY_ESC("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_user_transfers_in` WHERE userid=%s", array(getUserId()), __FILE__, __LINE__);
+                               list($dmy) = SQL_FETCHROW($result);
+                               SQL_FREERESULT($result);
+
+                               $total=$dmy;
+                               if ($dmy > 0) {
+                                       define('__TRANSFER_IN_LINK', "<a href=\"{!URL!}/modules.php?module=login&amp;what=transfer&amp;mode=list_in\">".$dmy."</a>");
+                               } else {
+                                       define('__TRANSFER_IN_LINK', $dmy);
+                               }
+
+                               // Check outgoing transfers
+                               $result = SQL_QUERY_ESC("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_user_transfers_out` WHERE userid=%s", array(getUserId()), __FILE__, __LINE__);
+                               list($dmy) = SQL_FETCHROW($result);
+                               SQL_FREERESULT($result);
+
+                               $total+=$dmy;
+                               if ($dmy > 0) {
+                                       define('__TRANSFER_OUT_LINK', "<a href=\"{!URL!}/modules.php?module=login&amp;what=transfer&amp;mode=list_out\">".$dmy."</a>");
+                               } else {
+                                       define('__TRANSFER_OUT_LINK', $dmy);
+                               }
+
+                               // Total transactions
+                               if ($total > 0) {
+                                       define('__TRANSFER_ALL_LINK', "<a href=\"{!URL!}/modules.php?module=login&amp;what=transfer&amp;mode=list_all\">".$total."</a>");
+                               } else {
+                                       define('__TRANSFER_ALL_LINK', $total);
+                               }
+
+                               if (IS_FORM_SENT()) {
+                                       // Save settings
+                                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET opt_in='%s' WHERE userid=%s LIMIT 1",
+                                       array(REQUEST_POST('opt_in'), getUserId()), __FILE__, __LINE__);
+
+                                       // Rember for next switch() command
+                                       $opt_in = REQUEST_POST('opt_in');
+
+                                       // "Settings saved..."
+                                       LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_done\">{--SETTINGS_SAVED--}</div>");
+                               }
+
+                               switch ($opt_in)
+                               {
+                                       case 'Y':
+                                               define('__TRANSFER_ALLOW_Y', ' checked="checked"');
+                                               define('__TRANSFER_ALLOW_N', '');
+                                               define('__TRANSFER_NEW_LINK', "<a href=\"{!URL!}/modules.php?module=login&amp;what=transfer&amp;mode=new\">{--TRANSFER_NOW_LINK--}</a>");
+                                               break;
+
+                                       case 'N':
+                                               define('__TRANSFER_ALLOW_Y', '');
+                                               define('__TRANSFER_ALLOW_N', ' checked="checked"');
+                                               define('__TRANSFER_NEW_LINK', getMessage('TRANSFER_PLEASE_ALLOW_OPT_IN'));
+                                               break;
+                               }
+
+                               // Check for latest out-transfers
+                               $result = SQL_QUERY_ESC("SELECT time_trans
 FROM `{!_MYSQL_PREFIX!}_user_transfers_out`
 WHERE time_trans > (UNIX_TIMESTAMP() - %s) AND `userid`=%s
 ORDER BY time_trans DESC
 LIMIT 1", array(getConfig('transfer_timeout'), getUserId()), __FILE__, __LINE__);
-       if (SQL_NUMROWS($result) == 0) {
-               // Load template
-               define('__TRANSFER_SETTINGS_CONTENT', LOAD_TEMPLATE("member_transfer_settings", true));
-       } else {
-               // Load newest transaction
-               list($newest) = SQL_FETCHROW($result);
-               SQL_FREERESULT($result);
-               define('__TRANSFER_SETTINGS_CONTENT', sprintf(getMessage('TRANSFER_LATEST_IS'), generateDateTime($newest, '3')));
-       }
-
-       // Load template
-       LOAD_TEMPLATE("member_transfer_overview");
-       break;
+                               if (SQL_NUMROWS($result) == 0) {
+                                       // Load template
+                                       define('__TRANSFER_SETTINGS_CONTENT', LOAD_TEMPLATE("member_transfer_settings", true));
+                               } else {
+                                       // Load newest transaction
+                                       list($newest) = SQL_FETCHROW($result);
+                                       SQL_FREERESULT($result);
+                                       define('__TRANSFER_SETTINGS_CONTENT', sprintf(getMessage('TRANSFER_LATEST_IS'), generateDateTime($newest, '3')));
+                               }
+
+                               // Load template
+                               LOAD_TEMPLATE("member_transfer_overview");
+                               break;
 }
 
 //
index 73eff91ad6b0ad403c47d99656a675c7236be0cd..b10c723aa538b93a64efd76276ea38c4950bf127 100644 (file)
@@ -55,7 +55,7 @@ if ((REQUEST_ISSET_GET(('bonusid'))) && (EXT_IS_ACTIVE('bonus'))) {
        $result_data = SQL_QUERY_ESC("SELECT id, subject, timestamp, cat_id, points, text, is_notify, data_type, time, url
 FROM `{!_MYSQL_PREFIX!}_bonus`
 WHERE `id`=%s LIMIT 1",
-               array(bigintval(REQUEST_GET('bonusid'))), __FILE__, __LINE__);
+       array(bigintval(REQUEST_GET('bonusid'))), __FILE__, __LINE__);
 
        // Load data
        $content = SQL_FETCHARRAY($result_data);
@@ -73,7 +73,7 @@ WHERE `id`=%s LIMIT 1",
 
        // Get timestamp from insert
        $content['user_status'] = sprintf(getMessage('MEMBER_MAIL_BONUS_CONFIRMED_ON'),
-               generateDateTime(getTimestampFromUserStats('bonusid', $content['id']), '2')
+       generateDateTime(getTimestampFromUserStats('bonusid', $content['id']), '2')
        );
 
        // Display it depending on mail (data) type
@@ -90,7 +90,7 @@ ON s.pool_id=p.id
 LEFT JOIN `{!_MYSQL_PREFIX!}_payments` AS pay
 ON p.payment_id=pay.id
 WHERE s.id=%s LIMIT 1",
-               array(bigintval(REQUEST_GET('mailid'))), __FILE__, __LINE__);
+       array(bigintval(REQUEST_GET('mailid'))), __FILE__, __LINE__);
 
        // Load data
        $content = SQL_FETCHARRAY($result_data);
@@ -106,7 +106,7 @@ WHERE s.id=%s LIMIT 1",
 
        // Get timestamp from insert
        $content['user_status'] = sprintf(getMessage('MEMBER_MAIL_NORMAL_CONFIRMED_ON'),
-               generateDateTime(getTimestampFromUserStats('mailid', $content['id']), '2')
+       generateDateTime(getTimestampFromUserStats('mailid', $content['id']), '2')
        );
 
        // Display it depending on mail (data) type
@@ -119,11 +119,11 @@ WHERE s.id=%s LIMIT 1",
 if (EXT_IS_ACTIVE('bonus')) {
        // Load bonus ID
        $result = SQL_QUERY_ESC("SELECT stats_id, bonus_id, link_type FROM `{!_MYSQL_PREFIX!}_user_links` WHERE userid=%s ORDER BY bonus_id DESC, stats_id DESC",
-               array(getUserId()), __FILE__, __LINE__);
+       array(getUserId()), __FILE__, __LINE__);
 } else {
        // Don't load bonus ID
        $result = SQL_QUERY_ESC("SELECT stats_id, stats_id, link_type FROM `{!_MYSQL_PREFIX!}_user_links` WHERE userid=%s ORDER BY stats_id DESC",
-               array(getUserId()), __FILE__, __LINE__);
+       array(getUserId()), __FILE__, __LINE__);
 }
 
 // Mails left for confirmation?
@@ -137,26 +137,26 @@ if (SQL_NUMROWS($result) > 0) {
                $cat = ''; $result_data = false;
                switch ($type)
                {
-               case 'NORMAL':
-                       $result_data = SQL_QUERY_ESC("SELECT s.subject, s.timestamp_ordered, s.cat_id, s.payment_id, p.sender
+                       case 'NORMAL':
+                               $result_data = SQL_QUERY_ESC("SELECT s.subject, s.timestamp_ordered, s.cat_id, s.payment_id, p.sender
 FROM `{!_MYSQL_PREFIX!}_user_stats` AS s
 LEFT JOIN `{!_MYSQL_PREFIX!}_pool` AS p
 ON s.pool_id=p.id
 WHERE s.id=%s
 LIMIT 1",
                                array(bigintval($id)), __FILE__, __LINE__);
-                       $type = 'mailid'; $DATA = $id; $PROBLEM = getMessage('NORMAL_MAIL_PROBLEM');
-                       break;
+                               $type = 'mailid'; $DATA = $id; $PROBLEM = getMessage('NORMAL_MAIL_PROBLEM');
+                               break;
 
-               case 'BONUS':
-                       $result_data = SQL_QUERY_ESC("SELECT subject, timestamp, cat_id, points, 0 FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
+                       case 'BONUS':
+                               $result_data = SQL_QUERY_ESC("SELECT subject, timestamp, cat_id, points, 0 FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
                         array(bigintval($id2)), __FILE__, __LINE__);
-                       $type = 'bonusid'; $DATA = $id2; $PROBLEM = getMessage('BONUS_MAIL_PROBLEM');
-                       break;
+                        $type = 'bonusid'; $DATA = $id2; $PROBLEM = getMessage('BONUS_MAIL_PROBLEM');
+                        break;
 
-               default: // Unknown type detected!
-                       DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown mail type %s detected.", $type));
-                       break;
+                       default: // Unknown type detected!
+                               DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown mail type %s detected.", $type));
+                               break;
                }
 
                // Data found to this mail?
index 8aa3ff90674f5c2fc2f6746667fb1be608a1531a..dde69a53100884c2a47d315dada79204803a8345 100644 (file)
@@ -58,7 +58,7 @@ LOAD_TEMPLATE("member_welcome_header", false, $content);
 
 // Chedk if he is returning from a profile update notification
 $result = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE notified='Y' AND `userid`=%s LIMIT 1",
-       array(getUserId()), __FILE__, __LINE__);
+array(getUserId()), __FILE__, __LINE__);
 
 if ((SQL_NUMROWS($result) == 1) && (EXT_IS_ACTIVE('profile'))) {
        // Yes, he is so let's place him his wanted buttons
index 9e5768ee17a9bafe2b2e7f74601194584dff72aa..b704421a6a91e1f8494a1a9b9355f16b95510f31 100644 (file)
@@ -69,7 +69,7 @@ if ((!REQUEST_ISSET_GET(('mode'))) || (REQUEST_GET('mode') == "choose")) {
 
        // Get WDS66 id
        $result = SQL_QUERY_ESC("SELECT wernis_userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-               array(getUserId()), __FILE__, __LINE__);
+       array(getUserId()), __FILE__, __LINE__);
 
        // Are there some entries?
        if (SQL_NUMROWS($result) == 1) {
@@ -87,7 +87,7 @@ if ((!REQUEST_ISSET_GET(('mode'))) || (REQUEST_GET('mode') == "choose")) {
 
                // And load all rows!
                $result = SQL_QUERY_ESC("SELECT `id`,`wernis_account`,`wernis_amount`,`wernis_timestamp`,`wernis_type` FROM `{!_MYSQL_PREFIX!}_user_wernis` WHERE `userid` = %s ORDER BY `wernis_timestamp` DESC",
-                       array(getUserId()), __FILE__, __LINE__);
+               array(getUserId()), __FILE__, __LINE__);
 
                // Load all rows
                $content['rows'] = ''; $SW = 2;
@@ -160,7 +160,7 @@ if ((!REQUEST_ISSET_GET(('mode'))) || (REQUEST_GET('mode') == "choose")) {
        // Get WDS66 id
        $content['wds66_id'] = '';
        $result = SQL_QUERY_ESC("SELECT wernis_userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-               array(getUserId()), __FILE__, __LINE__);
+       array(getUserId()), __FILE__, __LINE__);
 
        // Are there some entries?
        if (SQL_NUMROWS($result) == 1) {
@@ -184,7 +184,7 @@ if ((!REQUEST_ISSET_GET(('mode'))) || (REQUEST_GET('mode') == "choose")) {
 
        // Get WDS66 id
        $result = SQL_QUERY_ESC("SELECT wernis_userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-               array(getUserId()), __FILE__, __LINE__);
+       array(getUserId()), __FILE__, __LINE__);
 
        // Are there some entries?
        if (SQL_NUMROWS($result) == 1) {
@@ -235,7 +235,7 @@ if ((IS_FORM_SENT()) && (REQUEST_ISSET_GET(('mode')))) {
 
                                                // Update the user data as well..
                                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `wernis_userid`=%s WHERE userid=%s LIMIT 1",
-                                                       array(bigintval(REQUEST_POST('wds66_id')), getUserId()), __FILE__, __LINE__);
+                                               array(bigintval(REQUEST_POST('wds66_id')), getUserId()), __FILE__, __LINE__);
 
                                                // All done!
                                                LOAD_TEMPLATE('admin_settings_saved', false, getMessage('WERNIS_MEMBER_WITHDRAW_DONE'));
@@ -266,7 +266,7 @@ if ((IS_FORM_SENT()) && (REQUEST_ISSET_GET(('mode')))) {
 
                                                // Update WDS66 id
                                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `wernis_userid`=%s WHERE userid=%s LIMIT 1",
-                                                       array(bigintval(REQUEST_POST('wds66_id')), getUserId()), __FILE__, __LINE__);
+                                               array(bigintval(REQUEST_POST('wds66_id')), getUserId()), __FILE__, __LINE__);
 
                                                // All done!
                                                LOAD_TEMPLATE('admin_settings_saved', false, getMessage('WERNIS_MEMBER_PAYOUT_DONE'));
index c4db5c2f9fd28de59b1dead685d6a483c22ebed1..f66863aee273556dda17fc6501de2f1314c00821 100644 (file)
@@ -69,19 +69,19 @@ if (empty($URL)) {
 
        // Update sending pool
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET data_type='%s' WHERE `id`=%s AND sender=%s AND data_type='TEMP' LIMIT 1",
-               array($type, bigintval(REQUEST_GET('order')), getUserId()), __FILE__, __LINE__);
+       array($type, bigintval(REQUEST_GET('order')), getUserId()), __FILE__, __LINE__);
 
        // Finally is the entry valid?
        if (SQL_AFFECTEDROWS() == 1) {
                // Load personal data...
                $result = SQL_QUERY_ESC("SELECT gender, surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                       array(getUserId()), __FILE__, __LINE__);
+               array(getUserId()), __FILE__, __LINE__);
                list($gender, $sname, $fname, $email) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
 
                // Load mail again...              0       1        2           3          4      5      6         7
                $result = SQL_QUERY_ESC("SELECT subject, text, receivers, payment_id, timestamp, url, cat_id, target_send FROM `{!_MYSQL_PREFIX!}_pool` WHERE `id`=%s AND sender=%s LIMIT 1",
-                       array(bigintval(REQUEST_GET('order')), getUserId()), __FILE__, __LINE__);
+               array(bigintval(REQUEST_GET('order')), getUserId()), __FILE__, __LINE__);
                $DATA = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
                if (empty($DATA[0])) $DATA[0] = getMessage('DEFAULT_SUBJECT_LINE');
index 81b0992f9b1c922c1440a623fa0a8aa96282ac79..e81c2b04c69faafae763e3889669a4c00101eef7 100644 (file)
@@ -39,7 +39,7 @@
 if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
        require($INC);
-} elseif ((!EXT_IS_ACTIVE('sponsor'))
+} elseif ((!EXT_IS_ACTIVE('sponsor'))) {
        addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE')));
        return;
 } elseif (!IS_SPONSOR()) {
index f61d42dcbf5b78ecc70cf2c3b171790d9287704c..28d8babf5bc5fac844eda85abdf8dcaae2b29a66 100644 (file)
@@ -39,7 +39,7 @@
 if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
        require($INC);
-} elseif ((!EXT_IS_ACTIVE('sponsor'))
+} elseif ((!EXT_IS_ACTIVE('sponsor'))) {
        addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'sponsor'));
        return;
 } elseif (!IS_SPONSOR()) {
index cb46839d0a31873e14dc3e0bd80e98ef86a7b62c..52db53f8fe49b50028aac6fbd9a85ef7c39573ff 100644 (file)
@@ -39,7 +39,7 @@
 if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
        require($INC);
-} elseif ((!EXT_IS_ACTIVE('sponsor'))
+} elseif (!EXT_IS_ACTIVE('sponsor')) {
        addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'sponsor'));
        return;
 } elseif (!IS_SPONSOR()) {
@@ -55,7 +55,7 @@ phone, fax, cell, email, url,
 status, receive_warnings
 FROM `{!_MYSQL_PREFIX!}_sponsor_data`
 WHERE `id`='%s' AND password='%s' LIMIT 1",
-       array(bigintval(getSession('sponsorid')), getSession('sponsorpass')), __FILE__, __LINE__);
+array(bigintval(getSession('sponsorid')), getSession('sponsorpass')), __FILE__, __LINE__);
 
 // Entry found?
 if (SQL_NUMROWS($result) == 1) {
@@ -95,7 +95,7 @@ if (SQL_NUMROWS($result) == 1) {
                                }
 
                                // Unsecure data which we don't want here
-                                       $UNSAFE = array('receive_warnings', 'warning_interval');
+                               $UNSAFE = array('receive_warnings', 'warning_interval');
 
                                // Remove all (maybe spoofed) unsafe data from array
                                foreach ($UNSAFE as $remove) {
@@ -120,23 +120,23 @@ if (SQL_NUMROWS($result) == 1) {
                        // Check for gender selection
                        switch ($content['gender'])
                        {
-                       case "M": // Male
-                               define('__GENDER_M', ' selected="selected"');
-                               define('__GENDER_F', '');
-                               define('__GENDER_C', '');
-                               break;
+                               case "M": // Male
+                                       define('__GENDER_M', ' selected="selected"');
+                                       define('__GENDER_F', '');
+                                       define('__GENDER_C', '');
+                                       break;
 
-                       case "F": // Female
-                               define('__GENDER_M', '');
-                               define('__GENDER_F', ' selected="selected"');
-                               define('__GENDER_C', '');
-                               break;
+                               case "F": // Female
+                                       define('__GENDER_M', '');
+                                       define('__GENDER_F', ' selected="selected"');
+                                       define('__GENDER_C', '');
+                                       break;
 
-                       case "C": // Company
-                               define('__GENDER_M', '');
-                               define('__GENDER_F', '');
-                               define('__GENDER_C', ' selected="selected"');
-                               break;
+                               case "C": // Company
+                                       define('__GENDER_M', '');
+                                       define('__GENDER_F', '');
+                                       define('__GENDER_C', ' selected="selected"');
+                                       break;
                        }
 
                        // Output formular
index 96ce1e5b2e571e8809b0a5871ede776d6e6b5ac4..2aa04e5342e590bc0f6e8c3c6d0f6bc005ef0b58 100644 (file)
@@ -39,7 +39,7 @@
 if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
        require($INC);
-} elseif ((!EXT_IS_ACTIVE('sponsor'))
+} elseif (!EXT_IS_ACTIVE('sponsor')) {
        addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'sponsor'));
        return;
 } elseif (!IS_SPONSOR()) {
@@ -52,7 +52,7 @@ if (!defined('__SECURITY')) {
 $result = SQL_QUERY_ESC("SELECT status, receive_warnings, warning_interval, email, surname, family, gender
 FROM `{!_MYSQL_PREFIX!}_sponsor_data`
 WHERE `id`='%s' AND password='%s' LIMIT 1",
- array(bigintval(getSession('sponsorid')), getSession('sponsorpass')), __FILE__, __LINE__);
+array(bigintval(getSession('sponsorid')), getSession('sponsorpass')), __FILE__, __LINE__);
 if (SQL_NUMROWS($result) == 1) {
        // Load sponsor data
        $content = SQL_FETCHARRAY($result);
index 05462781e2c65f12b7830e7d7f7b3bb28e100ca9..c0b55f1653f66d5b0041a9006e657a32df111460 100644 (file)
@@ -39,7 +39,7 @@
 if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
        require($INC);
-} elseif ((!EXT_IS_ACTIVE('sponsor'))
+} elseif (!EXT_IS_ACTIVE('sponsor')) {
        addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'sponsor'));
        return;
 } elseif (!IS_SPONSOR()) {
@@ -52,7 +52,7 @@ if (!defined('__SECURITY')) {
 $result = SQL_QUERY_ESC("SELECT gender, surname, family, (points_amount - points_used) AS points
 FROM `{!_MYSQL_PREFIX!}_sponsor_data`
 WHERE `id`='%s' AND password='%s' LIMIT 1",
- array(bigintval(getSession('sponsorid')), getSession('sponsorpass')), __FILE__, __LINE__);
+array(bigintval(getSession('sponsorid')), getSession('sponsorpass')), __FILE__, __LINE__);
 list($gender, $surname, $family, $points) = SQL_FETCHROW($result);
 
 // Free memory
index f86562c6df7669fd61fe564e4039840893924ad7..8c1981f1269fcb18969d0eaed14923cbe46b8e48 100644 (file)
@@ -40,7 +40,7 @@
 if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
        require($INC);
-} elseif (!EXT_IS_ACTIVE("")) {
+} elseif (!EXT_IS_ACTIVE('')) {
        ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE);
        return;
 }
index 673e63a05e6ed9ad895ffbd43937a2b14f0003c5..0b431b74287febad71201c5364d5d329f5791b48 100644 (file)
@@ -78,7 +78,7 @@ FROM `{!_MYSQL_PREFIX!}_user_data`
 WHERE `status`='CONFIRMED'".$whereStatement1." AND beg_points > 0
 ORDER BY beg_points DESC, userid
 LIMIT %s",
-               array($whereStatement2), __FILE__, __LINE__);
+       array($whereStatement2), __FILE__, __LINE__);
 
        if (SQL_NUMROWS($result_main) > 0) {
                // Load our winners...
index 6490b4702509225a2b8eb850ae8485366276b7db..1d6026ebb48cdc0622c03c5bb0984a10f859ea71 100644 (file)
@@ -85,7 +85,7 @@ FROM `{!_MYSQL_PREFIX!}_user_data`
 ".$whereStatement1."".$add."
 ORDER BY points DESC, userid
 LIMIT %s",
-               array($whereStatement2), __FILE__, __LINE__);
+       array($whereStatement2), __FILE__, __LINE__);
 
        // Some entries were found?
        if (SQL_NUMROWS($result_main) > 0) {
index 6c2303c7a2a3c58dc4530e44b21023daf7479507..716079e381107931c884bd92bf828d4e81ff2e27 100644 (file)
@@ -59,7 +59,7 @@ if (getConfig('last_month') != $curr) {
                while ($content = SQL_FETCHARRAY($result)) {
                        // Update account
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `nl_receive`='Y', `nl_until`=0 WHERE `userid`=%s LIMIT 1",
-                               array(bigintval($content['userid'])), __FILE__, __LINE__);
+                       array(bigintval($content['userid'])), __FILE__, __LINE__);
 
                        // Send email to him
                        $msg = LOAD_EMAIL_TEMPLATE("member_newsletter_reset", true, bigintval($content['userid']));
index f4e1d42d3a81aaec36f3cb735d57b32964f77b14..0fe09b27dcc09db9466e64e8a8094d51403189a1 100644 (file)
@@ -49,7 +49,7 @@ require('inc/functions.php');
 require('inc/wrapper-functions.php');
 
 // Load more function libraries or includes
-foreach (array('request-functions', 'session-functions', 'config-functions', 'code-functions', 'inc-functions', 'filters', 'mysql-manager', 'extensions', 'db/lib', 'handler', 'hooks') as $lib) {
+foreach (array('request-functions', 'session-functions', 'config-functions', 'code-functions', 'inc-functions', 'language-functions', 'filters', 'mysql-manager', 'extensions', 'db/lib', 'handler', 'hooks') as $lib) {
        // Load special functions
        loadIncludeOnce('inc/' . $lib . '.php');
 } // END - foreach
@@ -65,6 +65,15 @@ initFatalMessages();
 
 // Check if this file is writeable or read-only and warn the user
 if ((!isInstalling()) && (isInstalled())) {
+       // Load "databases" aka static arrays
+       loadIncludeOnce('inc/databases.php');
+
+       // Init session
+       loadIncludeOnce('inc/session.php');
+
+       // Load versions
+       loadIncludeOnce('inc/versions.php');
+
        // Load configuration file(s) here
        loadIncludeOnce('inc/load_config.php');
 
@@ -92,15 +101,6 @@ if ((!isInstalling()) && (isInstalled())) {
                                // Load configuration stuff
                                loadConfiguration();
 
-                               // Load "databases" aka static arrays
-                               loadIncludeOnce('inc/databases.php');
-
-                               // Init session
-                               loadIncludeOnce('inc/session.php');
-
-                               // Load versions
-                               loadIncludeOnce('inc/versions.php');
-
                                // Loading patching system is required here...
                                loadIncludeOnce('inc/patch-system.php');
 
@@ -180,6 +180,12 @@ if ((!isInstalling()) && (isInstalled())) {
        // Include neccessary functions for installation //
        ///////////////////////////////////////////////////
 
+       // This hack prevents a backtrace in CSS output
+       if ($GLOBALS['output_mode'] == '1') {
+               // Problem with config so set output mode
+               setConfigEntry('OUTPUT_MODE', 'render');
+       } // END - if
+
        // Set other missing variables
        if (!isset($GLOBALS['output_mode'])) $GLOBALS['output_mode'] = '0';
 
index a8532d69974104018b6e6dc2a1f02ed7d169f53e..302e9d2091f5477de43a17fa60ebe0bedd383968 100644 (file)
@@ -60,7 +60,7 @@ function getModuleTitle ($mod) {
                } elseif (!EXT_IS_ACTIVE('cache')) {
                        // Load from database
                        $result = SQL_QUERY_ESC("SELECT title FROM `{!_MYSQL_PREFIX!}_mod_reg` WHERE `module`='%s' LIMIT 1",
-                               array($mod), __FUNCTION__, __LINE__);
+                       array($mod), __FUNCTION__, __LINE__);
                        list($name) = SQL_FETCHROW($result);
                        SQL_FREERESULT($result);
                }
@@ -96,7 +96,7 @@ function getModuleDescription ($mode, $wht, $column = 'what') {
 
        // Look for title
        $result = SQL_QUERY_ESC("SELECT title FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE %s='%s' LIMIT 1",
-               array($mode, $column, $wht), __FUNCTION__, __LINE__);
+       array($mode, $column, $wht), __FUNCTION__, __LINE__);
 
        // Is there an entry?
        if (SQL_NUMROWS($result) == 1) {
@@ -169,7 +169,7 @@ function checkModulePermissions ($mod) {
        } elseif (!EXT_IS_ACTIVE('cache')) {
                // Check for module in database
                $result = SQL_QUERY_ESC("SELECT locked, hidden, admin_only, mem_only FROM `{!_MYSQL_PREFIX!}_mod_reg` WHERE `module`='%s' LIMIT 1",
-                       array($mod_chk), __FUNCTION__, __LINE__);
+               array($mod_chk), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result) == 1) {
                        // Read data
                        list($locked, $hidden, $admin, $mem) = SQL_FETCHROW($result);
@@ -198,10 +198,10 @@ function checkModulePermissions ($mod) {
                } else {
                        // @TODO Nothing helped???
                        DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("ret=%s,locked=%s,admin=%s,mem=%s",
-                               $ret,
-                               $locked,
-                               $admin,
-                               $mem
+                       $ret,
+                       $locked,
+                       $admin,
+                       $mem
                        ));
                }
        } // END - if
@@ -242,12 +242,12 @@ function checkModulePermissions ($mod) {
        } elseif (!$found) {
                // Problem with module detected
                DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Problem in module %s detected. ret=%s, locked=%s, hidden=%s, mem=%s, admin=%s",
-                       $mod,
-                       $ret,
-                       $locked,
-                       $hidden,
-                       $mem,
-                       $admin
+               $mod,
+               $ret,
+               $locked,
+               $hidden,
+               $mem,
+               $admin
                ));
        }
 
@@ -271,15 +271,15 @@ function ADD_DESCR ($ACC_LVL, $FQFN, $return = false, $output = true) {
                $type = "action";
                $search = substr($file, 7);
                switch ($ACC_LVL) {
-               case 'admin':
-                       $modCheck = 'admin';
-                       break;
-
-               case 'sponsor':
-               case 'guest':
-               case 'member':
-                       $modCheck = $GLOBALS['module'];
-                       break;
+                       case 'admin':
+                               $modCheck = 'admin';
+                               break;
+
+                       case 'sponsor':
+                       case 'guest':
+                       case 'member':
+                               $modCheck = $GLOBALS['module'];
+                               break;
                }
                $AND = " AND (`what`='' OR `what` IS NULL)";
        } elseif (substr($file, 0, 5) == "what-") {
@@ -288,17 +288,17 @@ function ADD_DESCR ($ACC_LVL, $FQFN, $return = false, $output = true) {
                $search = substr($file, 5);
                $AND = '';
                switch ($ACC_LVL) {
-               case 'admin':
-                       $modCheck = 'admin';
-                       break;
-
-               case 'guest':
-               case 'member':
-                       $modCheck = $GLOBALS['module'];
-                       if (!IS_ADMIN()) {
-                               $AND = " AND `visible`='Y' AND `locked`='N'";
-                       }
-                       break;
+                       case 'admin':
+                               $modCheck = 'admin';
+                               break;
+
+                       case 'guest':
+                       case 'member':
+                               $modCheck = $GLOBALS['module'];
+                               if (!IS_ADMIN()) {
+                                       $AND = " AND `visible`='Y' AND `locked`='N'";
+                               }
+                               break;
                }
                $dummy = substr($search, 0, -4);
                $AND .= " AND `action`='".getModeAction($ACC_LVL, $dummy)."'";
@@ -335,7 +335,7 @@ function ADD_DESCR ($ACC_LVL, $FQFN, $return = false, $output = true) {
 
        // Get the title from menu
        $result = SQL_QUERY_ESC("SELECT title FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE %s='%s' ".$AND." LIMIT 1",
-               array($ACC_LVL, $type, $search), __FUNCTION__, __LINE__);
+       array($ACC_LVL, $type, $search), __FUNCTION__, __LINE__);
 
        // Menu found?
        if (SQL_NUMROWS($result) == 1) {
@@ -398,7 +398,7 @@ function ADD_MENU ($mode, $act, $wht) {
 
        // Load SQL data and add the menu to the output stream...
        $result_main = SQL_QUERY_ESC("SELECT title, action FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE (`what`='' OR `what` IS NULL)".$AND." ORDER BY `sort`",
-               array($mode), __FUNCTION__, __LINE__);
+       array($mode), __FUNCTION__, __LINE__);
        //* DEBUG: */ echo __LINE__.'/'.$main_cnt.'/'.$main_action.'/'.$sub_what.':'.$GLOBALS['what']."*<br />\n";
        if (SQL_NUMROWS($result_main) > 0) {
                OUTPUT_HTML("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"".$mode."_menu\">");
@@ -414,7 +414,7 @@ function ADD_MENU ($mode, $act, $wht) {
 
                        // Sub menu
                        $result_sub = SQL_QUERY_ESC("SELECT title AS sub_title, what AS sub_what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ".$AND." ORDER BY `sort`",
-                               array($mode, $content['action']), __FUNCTION__, __LINE__);
+                       array($mode, $content['action']), __FUNCTION__, __LINE__);
 
                        // Get number of rows
                        $ctl = SQL_NUMROWS($result_sub);
@@ -529,7 +529,7 @@ function IS_MEMBER () {
        if ((isUserIdSet()) && (isSessionVariableSet('u_hash'))) {
                // Cookies are set with values, but are they valid?
                $result = SQL_QUERY_ESC("SELECT password, status, last_module, last_online FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                       array(getUserId()), __FUNCTION__, __LINE__);
+               array(getUserId()), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result) == 1) {
                        // Load data from cookies
                        list($password, $status, $mod, $onl) = SQL_FETCHROW($result);
@@ -604,7 +604,7 @@ function IS_ADMIN ($admin = '') {
        } elseif ((!empty($admin)) && ((!EXT_IS_ACTIVE('cache'))) || (!isset($GLOBALS['cache_array']['admins']['password'][$admin]))) {
                // Search for admin
                $result = SQL_QUERY_ESC("SELECT HIGH_PRIORITY password FROM `{!_MYSQL_PREFIX!}_admins` WHERE login='%s' LIMIT 1",
-                       array($admin), __FUNCTION__, __LINE__);
+               array($admin), __FUNCTION__, __LINE__);
 
                // Is he admin?
                $passDB = '';
@@ -643,13 +643,13 @@ function addMaxReceiveList ($mode, $default = '', $return = false) {
                case 'guest':
                        // Guests (in the registration form) are not allowed to select 0 mails per day.
                        $result = SQL_QUERY("SELECT value, comment FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value > 0 ORDER BY value",
-                               __FUNCTION__, __LINE__);
+                       __FUNCTION__, __LINE__);
                        break;
 
                case 'member':
                        // Members are allowed to set to zero mails per day (we will change this soon!)
                        $result = SQL_QUERY("SELECT value, comment FROM `{!_MYSQL_PREFIX!}_max_receive` ORDER BY value",
-                               __FUNCTION__, __LINE__);
+                       __FUNCTION__, __LINE__);
                        break;
 
                default: // Invalid!
@@ -692,7 +692,7 @@ function addMaxReceiveList ($mode, $default = '', $return = false) {
 function isEmailTaken ($email) {
        // Query the database
        $result = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE email LIKE '{PER}%s{PER}' LIMIT 1",
-               array($email), __FUNCTION__, __LINE__);
+       array($email), __FUNCTION__, __LINE__);
 
        // Is the email there?
        $ret = (SQL_NUMROWS($result) == 1);
@@ -726,15 +726,15 @@ function isMenuActionValid ($mode, $act, $wht, $UPDATE=false) {
        if (($mode != 'admin') && ($UPDATE === true)) {
                // Update guest or member menu
                $sql = SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_%s_menu` SET counter=counter+1 WHERE `action`='%s' AND `what`='%s'".$add." LIMIT 1",
-                       array($mode, $act, $wht), __FUNCTION__, __LINE__, false);
+               array($mode, $act, $wht), __FUNCTION__, __LINE__, false);
        } elseif (($wht != "overview") && (!empty($wht))) {
                // Other actions
                $sql = SQL_QUERY_ESC("SELECT id, what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `action`='%s' AND `what`='%s'".$add." ORDER BY action DESC LIMIT 1",
-                       array($mode, $act, $wht), __FUNCTION__, __LINE__, false);
+               array($mode, $act, $wht), __FUNCTION__, __LINE__, false);
        } else {
                // Admin login overview
                $sql = SQL_QUERY_ESC("SELECT id, what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `action`='%s' AND (`what`='' OR `what` IS NULL)".$add." ORDER BY action DESC LIMIT 1",
-                       array($mode, $act), __FUNCTION__, __LINE__, false);
+               array($mode, $act), __FUNCTION__, __LINE__, false);
        }
 
        // Run SQL command
@@ -763,7 +763,7 @@ function sendModeMails ($mod, $modes) {
 
        // Load hash
        $result_main = SQL_QUERY_ESC("SELECT password FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
-               array(getUserId()), __FUNCTION__, __LINE__);
+       array(getUserId()), __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result_main) == 1) {
                // Load hash from database
                list($hashDB) = SQL_FETCHROW($result_main);
@@ -776,7 +776,7 @@ function sendModeMails ($mod, $modes) {
                if (($hash == getSession('u_hash')) || (REQUEST_POST('pass1') == REQUEST_POST('pass2'))) {
                        // Load user's data
                        $result = SQL_QUERY_ESC("SELECT gender, surname, family, street_nr, country, zip, city, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND password='%s' LIMIT 1",
-                               array(getUserId(), $hashDB), __FUNCTION__, __LINE__);
+                       array(getUserId(), $hashDB), __FUNCTION__, __LINE__);
                        if (SQL_NUMROWS($result) == 1) {
                                // Load the data
                                $DATA = SQL_FETCHROW($result);
@@ -793,56 +793,56 @@ function sendModeMails ($mod, $modes) {
 
                                switch ($mod)
                                {
-                               case 'mydata':
-                                       foreach ($modes as $mode) {
-                                               switch ($mode)
-                                               {
-                                               case 'normal': break; // Do not add any special lines
-
-                                               case 'email': // Email was changed!
-                                                       $content = getMessage('MEMBER_CHANGED_EMAIL').": ".REQUEST_POST('old_addy')."\n";
-                                                       break;
-
-                                               case 'pass': // Password was changed
-                                                       $content = getMessage('MEMBER_CHANGED_PASS')."\n";
-                                                       break;
-
-                                               default:
-                                                       DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown mode %s detected.", $mode));
-                                                       $content = getMessage('MEMBER_UNKNOWN_MODE').": ".$mode."\n\n";
-                                                       break;
-                                               } // END - switch
-                                       } // END - if
-
-                                       if (EXT_IS_ACTIVE('country')) {
-                                               // Replace code with description
-                                               $DATA[4] = COUNTRY_GENERATE_INFO(REQUEST_POST('country_code'));
-                                       } // END - if
-
-                                       // Load template
-                                       $msg = LOAD_EMAIL_TEMPLATE("member_mydata_notify", $content, getUserId());
-
-                                       if (getConfig('admin_notify') == 'Y') {
-                                               // The admin needs to be notified about a profile change
-                                               $msg_admin = "admin_mydata_notify";
-                                               $sub_adm   = getMessage('ADMIN_CHANGED_DATA');
-                                       } else {
-                                               // No mail to admin
-                                               $msg_admin = '';
-                                               $sub_adm   = '';
-                                       }
+                                       case 'mydata':
+                                               foreach ($modes as $mode) {
+                                                       switch ($mode)
+                                                       {
+                                                               case 'normal': break; // Do not add any special lines
+
+                                                               case 'email': // Email was changed!
+                                                                       $content = getMessage('MEMBER_CHANGED_EMAIL').": ".REQUEST_POST('old_addy')."\n";
+                                                                       break;
+
+                                                               case 'pass': // Password was changed
+                                                                       $content = getMessage('MEMBER_CHANGED_PASS')."\n";
+                                                                       break;
+
+                                                               default:
+                                                                       DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown mode %s detected.", $mode));
+                                                                       $content = getMessage('MEMBER_UNKNOWN_MODE').": ".$mode."\n\n";
+                                                                       break;
+                                                       } // END - switch
+                                               } // END - if
+
+                                               if (EXT_IS_ACTIVE('country')) {
+                                                       // Replace code with description
+                                                       $DATA[4] = COUNTRY_GENERATE_INFO(REQUEST_POST('country_code'));
+                                               } // END - if
+
+                                               // Load template
+                                               $msg = LOAD_EMAIL_TEMPLATE("member_mydata_notify", $content, getUserId());
+
+                                               if (getConfig('admin_notify') == 'Y') {
+                                                       // The admin needs to be notified about a profile change
+                                                       $msg_admin = "admin_mydata_notify";
+                                                       $sub_adm   = getMessage('ADMIN_CHANGED_DATA');
+                                               } else {
+                                                       // No mail to admin
+                                                       $msg_admin = '';
+                                                       $sub_adm   = '';
+                                               }
 
-                                       // Set subject lines
-                                       $sub_mem = getMessage('MEMBER_CHANGED_DATA');
+                                               // Set subject lines
+                                               $sub_mem = getMessage('MEMBER_CHANGED_DATA');
 
-                                       // Output success message
-                                       $content = "<span class=\"member_done\">{--MYDATA_MAIL_SENT--}</span>";
-                                       break;
+                                               // Output success message
+                                               $content = "<span class=\"member_done\">{--MYDATA_MAIL_SENT--}</span>";
+                                               break;
 
-                               default:
-                                       DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unsupported module %s detected.", $mod));
-                                       $content = "<span class=\"member_failed\">{--UNKNOWN_MODULE--}</span>";
-                                       break;
+                                                               default:
+                                                                       DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unsupported module %s detected.", $mod));
+                                                                       $content = "<span class=\"member_failed\">{--UNKNOWN_MODULE--}</span>";
+                                                                       break;
                                } // END - switch
                        } else {
                                // Could not load profile data
@@ -886,7 +886,7 @@ function countModuleHit($mod) {
        if ($mod != "css") {
                // Do count all other modules but not accesses on CSS file css.php!
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET clicks=clicks+1 WHERE `module`='%s' LIMIT 1",
-                       array($mod), __FUNCTION__, __LINE__);
+               array($mod), __FUNCTION__, __LINE__);
        } // END - if
 }
 
@@ -932,7 +932,7 @@ function getModeAction ($mode, &$wht) {
 
                // Load from database
                $result = SQL_QUERY_ESC("SELECT action FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `what`='%s' LIMIT 1",
-                       array($mode, $wht), __FUNCTION__, __LINE__);
+               array($mode, $wht), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result) == 1) {
                        // Load action value and pray that this one is the right you want... ;-)
                        list($ret) = SQL_FETCHROW($result);
@@ -965,7 +965,7 @@ function getCategory ($cid) {
        } elseif ($cid > 0) {
                // Lookup the category in database
                $result = SQL_QUERY_ESC("SELECT cat FROM `{!_MYSQL_PREFIX!}_cats` WHERE `id`=%s LIMIT 1",
-                       array(bigintval($cid)), __FUNCTION__, __LINE__);
+               array(bigintval($cid)), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result) == 1) {
                        // Category found... :-)
                        list($ret) = SQL_FETCHROW($result);
@@ -986,7 +986,7 @@ function getPaymentTitlePrice ($pid, $full=false) {
 
        // Load payment data
        $result = SQL_QUERY_ESC("SELECT mail_title, price FROM `{!_MYSQL_PREFIX!}_payments` WHERE `id`=%s LIMIT 1",
-               array(bigintval($pid)), __FUNCTION__, __LINE__);
+       array(bigintval($pid)), __FUNCTION__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Payment type found... :-)
                if (!$full) {
@@ -1013,7 +1013,7 @@ function getPaymentPoints ($pid, $lookFor = 'price') {
 
        // Search for it in database
        $result = SQL_QUERY_ESC("SELECT %s FROM `{!_MYSQL_PREFIX!}_payments` WHERE `id`=%s LIMIT 1",
-               array($lookFor, $pid), __FUNCTION__, __LINE__);
+       array($lookFor, $pid), __FUNCTION__, __LINE__);
 
        // Is the entry there?
        if (SQL_NUMROWS($result) == 1) {
@@ -1046,13 +1046,13 @@ function removeReceiver (&$receivers, $key, $uid, $pool_id, $stats_id='', $bonus
 
                        // Try to look the entry up
                        $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_links` WHERE %s='%s' AND `userid`=%s AND link_type='%s' LIMIT 1",
-                               array($rowName, $stats_id, bigintval($uid), $type), __FUNCTION__, __LINE__);
+                       array($rowName, $stats_id, bigintval($uid), $type), __FUNCTION__, __LINE__);
 
                        // Was it *not* found?
                        if (SQL_NUMROWS($result) == 0) {
                                // So we add one!
                                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_links` (%s, userid, link_type) VALUES ('%s','%s','%s')",
-                                       array($rowName, $stats_id, bigintval($uid), $type), __FUNCTION__, __LINE__);
+                               array($rowName, $stats_id, bigintval($uid), $type), __FUNCTION__, __LINE__);
                                $ret = 'done';
                        } else {
                                // Already found
@@ -1077,22 +1077,22 @@ function GET_TOTAL_DATA ($search, $tableName, $lookFor = 'id', $whereStatement =
                if ($countRows === true) {
                        // Count whole table
                        $result = SQL_QUERY_ESC("SELECT COUNT(`%s`) FROM `{!_MYSQL_PREFIX!}_%s`".$add,
-                               array($lookFor, $tableName), __FUNCTION__, __LINE__);
+                       array($lookFor, $tableName), __FUNCTION__, __LINE__);
                } else {
                        // Sum whole table
                        $result = SQL_QUERY_ESC("SELECT SUM(`%s`) FROM `{!_MYSQL_PREFIX!}_%s`".$add,
-                               array($lookFor, $tableName), __FUNCTION__, __LINE__);
+                       array($lookFor, $tableName), __FUNCTION__, __LINE__);
                }
        } elseif (($countRows === true) || ($lookFor == 'userid')) {
                // Count rows
                //* DEBUG: */ echo "COUNT!<br />\n";
                $result = SQL_QUERY_ESC("SELECT COUNT(`%s`) FROM `{!_MYSQL_PREFIX!}_%s` WHERE `%s`='%s'".$add,
-                       array($lookFor, $tableName, $whereStatement, $search), __FUNCTION__, __LINE__);
+               array($lookFor, $tableName, $whereStatement, $search), __FUNCTION__, __LINE__);
        } else {
                // Add all rows
                //* DEBUG: */ echo "SUM!<br />\n";
                $result = SQL_QUERY_ESC("SELECT SUM(`%s`) FROM `{!_MYSQL_PREFIX!}_%s` WHERE `%s`='%s'".$add,
-                       array($lookFor, $tableName, $whereStatement, $search), __FUNCTION__, __LINE__);
+               array($lookFor, $tableName, $whereStatement, $search), __FUNCTION__, __LINE__);
        }
 
        // Load row
@@ -1132,7 +1132,7 @@ function getReferalLevelPercents ($level) {
        } elseif (!EXT_IS_ACTIVE('cache')) {
                // Get referal data
                $result_lvl = SQL_QUERY_ESC("SELECT percents FROM `{!_MYSQL_PREFIX!}_refdepths` WHERE level='%s' LIMIT 1",
-                       array(bigintval($level)), __FUNCTION__, __LINE__);
+               array(bigintval($level)), __FUNCTION__, __LINE__);
 
                // Entry found?
                if (SQL_NUMROWS($result_lvl) == 1) {
@@ -1200,7 +1200,7 @@ function ADD_POINTS_REFSYSTEM ($subject, $uid, $points, $send_notify = false, $r
 
        // Check user account
        $result_user = SQL_QUERY_ESC("SELECT refid, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
-               array(bigintval($uid)), __FUNCTION__, __LINE__);
+       array(bigintval($uid)), __FUNCTION__, __LINE__);
 
        //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},numRows=".SQL_NUMROWS($result_user).",points={$points}<br />\n";
        if (SQL_NUMROWS($result_user) == 1) {
@@ -1227,14 +1227,14 @@ function ADD_POINTS_REFSYSTEM ($subject, $uid, $points, $send_notify = false, $r
 
                        // Update points...
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_points` SET %s=%s+%s WHERE userid=%s AND ref_depth='%s' LIMIT 1",
-                               array($data, $data, $ref_points, bigintval($uid), bigintval($GLOBALS['ref_level'])), __FUNCTION__, __LINE__);
+                       array($data, $data, $ref_points, bigintval($uid), bigintval($GLOBALS['ref_level'])), __FUNCTION__, __LINE__);
                        //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):data={$data},ref_points={$ref_points},uid={$uid},depth={$GLOBALS['ref_level']},mode={$add_mode} - UPDATE! (".SQL_AFFECTEDROWS().")<br />\n";
 
                        // No entry updated?
                        if (SQL_AFFECTEDROWS() < 1) {
                                // First ref in this level! :-)
                                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_points` (userid,ref_depth,%s) VALUES (%s,'%s',%s)",
-                                       array($data, bigintval($uid), bigintval($GLOBALS['ref_level']), $ref_points), __FUNCTION__, __LINE__);
+                               array($data, bigintval($uid), bigintval($GLOBALS['ref_level']), $ref_points), __FUNCTION__, __LINE__);
                                //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):data={$data},ref_points={$ref_points},uid={$uid},depth={$GLOBALS['ref_level']},mode={$add_mode} - INSERTED! (".SQL_AFFECTEDROWS().")<br />\n";
                        } // END - if
 
@@ -1303,20 +1303,20 @@ function updateReferalCounter ($uid) {
 
        // Update counter
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_refsystem` SET counter=counter+1 WHERE userid=%s AND level='%s' LIMIT 1",
-               array(bigintval($uid), $GLOBALS['cache_array']['ref_level'][$uid]), __FUNCTION__, __LINE__);
+       array(bigintval($uid), $GLOBALS['cache_array']['ref_level'][$uid]), __FUNCTION__, __LINE__);
 
        // When no entry was updated then we have to create it here
        //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):updated=".SQL_AFFECTEDROWS()."<br />\n";
        if (SQL_AFFECTEDROWS() < 1) {
                // First count!
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_refsystem` (userid, level, counter) VALUES (%s,%s,1)",
-                       array(bigintval($uid), $GLOBALS['cache_array']['ref_level'][$uid]), __FUNCTION__, __LINE__);
+               array(bigintval($uid), $GLOBALS['cache_array']['ref_level'][$uid]), __FUNCTION__, __LINE__);
                //* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid}<br />\n";
        } // END - if
 
        // Check for his referal
        $result = SQL_QUERY_ESC("SELECT refid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-               array(bigintval($uid)), __FUNCTION__, __LINE__);
+       array(bigintval($uid)), __FUNCTION__, __LINE__);
 
        // Load refid
        list($ref) = SQL_FETCHROW($result);
@@ -1376,7 +1376,7 @@ function GET_ADMIN_ID ($login) {
        } elseif (!EXT_IS_ACTIVE('cache')) {
                // Load from database
                $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_admins` WHERE login='%s' LIMIT 1",
-                       array($login), __FUNCTION__, __LINE__);
+               array($login), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result) == 1) {
                        list($ret) = SQL_FETCHROW($result);
                } // END - if
@@ -1413,7 +1413,7 @@ function GET_ADMIN_HASH ($aid) {
        } elseif (!EXT_IS_ACTIVE('cache')) {
                // Load from database
                $result = SQL_QUERY_ESC("SELECT password FROM `{!_MYSQL_PREFIX!}_admins` WHERE `id`=%s LIMIT 1",
-                array($aid), __FUNCTION__, __LINE__);
+               array($aid), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result) == 1) {
                        // Fetch data
                        list($ret) = SQL_FETCHROW($result);
@@ -1442,7 +1442,7 @@ function getAdminLogin ($aid) {
        } elseif (!EXT_IS_ACTIVE('cache')) {
                // Load from database
                $result = SQL_QUERY_ESC("SELECT login FROM `{!_MYSQL_PREFIX!}_admins` WHERE `id`=%s LIMIT 1",
-                       array(bigintval($aid)), __FUNCTION__, __LINE__);
+               array(bigintval($aid)), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result) == 1) {
                        // Fetch data
                        list($ret) = SQL_FETCHROW($result);
@@ -1471,14 +1471,14 @@ function getAdminEmail ($aid) {
        } elseif (!EXT_IS_ACTIVE('cache')) {
                // Load from database
                $result_aid = SQL_QUERY_ESC("SELECT email FROM `{!_MYSQL_PREFIX!}_admins` WHERE `id`=%s LIMIT 1",
-                       array(bigintval($aid)), __FUNCTION__, __LINE__);
+               array(bigintval($aid)), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result_aid) == 1) {
                        // Get data
                        list($ret) = SQL_FETCHROW($result_aid);
 
                        // Set cache
                        $GLOBALS['cache_array']['admins']['email'][$aid] = $ret;
-                       } // END - if
+               } // END - if
 
                // Free result
                SQL_FREERESULT($result_aid);
@@ -1506,7 +1506,7 @@ function getAdminDefaultAcl ($aid) {
        } elseif (!EXT_IS_ACTIVE('cache')) {
                // Load from database
                $result_aid = SQL_QUERY_ESC("SELECT default_acl FROM `{!_MYSQL_PREFIX!}_admins` WHERE `id`=%s LIMIT 1",
-                       array(bigintval($aid)), __FUNCTION__, __LINE__);
+               array(bigintval($aid)), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result_aid) == 1) {
                        // Fetch data
                        list($ret) = SQL_FETCHROW($result_aid);
@@ -1543,7 +1543,7 @@ function generateOptionList ($table, $id, $name, $default='', $special='', $wher
                $ORDER = $name.$SPEC;
                if ($table == 'country') $ORDER = $special;
                $result = SQL_QUERY_ESC("SELECT %s, %s".$SPEC." FROM `{!_MYSQL_PREFIX!}_%s` ".$where." ORDER BY %s",
-                       array($id, $ORDER, $table, $name), __FUNCTION__, __LINE__);
+               array($id, $ORDER, $table, $name), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result) > 0) {
                        // Found data so add them as OPTION lines: $id is the value and $name is the "name" of the option
                        // @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
@@ -1583,15 +1583,15 @@ function activateExchange () {
                        "UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `mem_only`='Y' WHERE `module`='order' LIMIT 1",
                        "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='order' OR `what`='unconfirmed' LIMIT 2",
                        "UPDATE `{!_MYSQL_PREFIX!}_config` SET `activate_xchange`=0 WHERE `config`=0 LIMIT 1"
-               ));
+                       ));
 
-               // Run SQLs
-               runFilterChain('run_sqls');
+                       // Run SQLs
+                       runFilterChain('run_sqls');
 
-               // Rebuild caches
-               // @TODO Rewrite this to a filter
-               rebuildCacheFiles('config', 'config');
-               rebuildCacheFiles('modreg', 'modreg');
+                       // Rebuild caches
+                       // @TODO Rewrite this to a filter
+                       rebuildCacheFiles('config', 'config');
+                       rebuildCacheFiles('modreg', 'modreg');
        } // END - if
 }
 
@@ -1625,12 +1625,12 @@ WHERE p.userid=%s", array(bigintval($uid)), __FUNCTION__, __LINE__);
 
        // Delete category selections as well...
        SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_cats` WHERE userid=%s",
-               array(bigintval($uid)), __FUNCTION__, __LINE__);
+       array(bigintval($uid)), __FUNCTION__, __LINE__);
 
        // Remove from rallye if found
        if (EXT_IS_ACTIVE('rallye')) {
                SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_rallye_users` WHERE userid=%s",
-                       array(bigintval($uid)), __FUNCTION__, __LINE__);
+               array(bigintval($uid)), __FUNCTION__, __LINE__);
        } // END - if
 
        // Now a mail to the user and that's all...
@@ -1668,7 +1668,7 @@ function ADD_JACKPOT ($points) {
 
                // Update points
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_jackpot` SET points=points+%s WHERE ok='ok' LIMIT 1",
-                       array($points), __FUNCTION__, __LINE__);
+               array($points), __FUNCTION__, __LINE__);
        }
 }
 
@@ -1688,7 +1688,7 @@ function SUB_JACKPOT ($points) {
                if ($jackpot >= $points) {
                        // Update points when there are enougth points in jackpot
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_jackpot` SET points=points-%s WHERE ok='ok' LIMIT 1",
-                               array($points), __FUNCTION__, __LINE__);
+                       array($points), __FUNCTION__, __LINE__);
                        $ret = $jackpot - $points;
                } // END - if
        }
@@ -1714,19 +1714,19 @@ function getWhatFromModule ($modCheck) {
        //* DEBUG: */ echo __LINE__.'!'.$modCheck."!<br />\n";
        switch ($modCheck)
        {
-       case 'admin':
-               $wht = 'overview';
-               break;
-
-       case 'login':
-       case 'index':
-               $wht = 'welcome';
-               if (($modCheck == 'index') && (getConfig('index_home') != '')) $wht = getConfig('index_home');
-               break;
-
-       default:
-               $wht = '';
-               break;
+               case 'admin':
+                       $wht = 'overview';
+                       break;
+
+               case 'login':
+               case 'index':
+                       $wht = 'welcome';
+                       if (($modCheck == 'index') && (getConfig('index_home') != '')) $wht = getConfig('index_home');
+                       break;
+
+               default:
+                       $wht = '';
+                       break;
        }
 
        // Return what value
@@ -1737,7 +1737,7 @@ function getWhatFromModule ($modCheck) {
 function SUB_POINTS ($subject, $uid, $points) {
        // Add points to used points
        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `used_points`=`used_points`+%s WHERE userid=%s LIMIT 1",
-        array($points, bigintval($uid)), __FUNCTION__, __LINE__);
+       array($points, bigintval($uid)), __FUNCTION__, __LINE__);
 
        // Insert booking record
        if (EXT_IS_ACTIVE('booking')) {
@@ -1836,7 +1836,7 @@ function getTotalReceivers ($mode='normal') {
        $result_all = SQL_QUERY("SELECT userid
 FROM `{!_MYSQL_PREFIX!}_user_data`
 WHERE `status`='CONFIRMED' AND receive_mails > 0 ".PREPARE_SQL_HTML_HOLIDAY($mode),
-               __FUNCTION__, __LINE__);
+       __FUNCTION__, __LINE__);
 
        // Get num rows
        $numRows = SQL_NUMROWS($result_all);
@@ -1872,7 +1872,7 @@ function generateCategoryOptionsList ($mode) {
 
                        // Check which users are in this category
                        $result_uids = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_cats` WHERE cat_id=%s",
-                               array(bigintval($content['id'])), __FUNCTION__, __LINE__);
+                       array(bigintval($content['id'])), __FUNCTION__, __LINE__);
 
                        // Start adding all
                        $uid_cnt = 0;
@@ -1880,7 +1880,7 @@ function generateCategoryOptionsList ($mode) {
                        while (list($ucat) = SQL_FETCHROW($result_uids)) {
                                $result_ver = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data`
 WHERE userid=%s AND `status`='CONFIRMED' AND receive_mails > 0".PREPARE_SQL_HTML_HOLIDAY($mode)." LIMIT 1",
-                                       array(bigintval($ucat)), __FUNCTION__, __LINE__);
+                               array(bigintval($ucat)), __FUNCTION__, __LINE__);
 
                                // Add user count
                                $uid_cnt += SQL_NUMROWS($result_ver);
@@ -1946,34 +1946,34 @@ function addBonusMailToQueue ($subject, $text, $receiverList, $points, $seconds,
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_bonus`
 (subject, text, receivers, points, time, data_type, timestamp, url, cat_id, target_send, mails_sent, html_msg)
 VALUES ('%s','%s','%s','%s','%s','NEW', UNIX_TIMESTAMP(),'%s','%s','%s','%s','%s')",
-                       array(
-                               $subject,
-                               $text,
-                               $receiverList,
-                               $points,
-                               $seconds,
-                               $url,
-                               $cat,
-                               $target,
-                               bigintval($receiver),
-                               $HTML
-                       ), __FUNCTION__, __LINE__);
+               array(
+               $subject,
+               $text,
+               $receiverList,
+               $points,
+               $seconds,
+               $url,
+               $cat,
+               $target,
+               bigintval($receiver),
+               $HTML
+               ), __FUNCTION__, __LINE__);
        } else {
                // Add regular mail
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_bonus`
 (subject, text, receivers, points, time, data_type, timestamp, url, cat_id, target_send, mails_sent)
 VALUES ('%s','%s','%s','%s','%s','NEW', UNIX_TIMESTAMP(),'%s','%s','%s','%s')",
-                       array(
-                               $subject,
-                               $text,
-                               $receiverList,
-                               $points,
-                               $seconds,
-                               $url,
-                               $cat,
-                               $target,
-                               bigintval($receiver),
-                       ), __FUNCTION__, __LINE__);
+               array(
+               $subject,
+               $text,
+               $receiverList,
+               $points,
+               $seconds,
+               $url,
+               $cat,
+               $target,
+               bigintval($receiver),
+               ), __FUNCTION__, __LINE__);
        }
 }
 
@@ -2011,11 +2011,11 @@ function generateReceiverList ($cat, $receiver, $mode = '') {
        if ((EXT_IS_ACTIVE('html_mail')) && ($mode == 'html')) {
                // Only include HTML receivers
                $result = SQL_QUERY_ESC("SELECT d.userid FROM `{!_MYSQL_PREFIX!}_user_data` AS d ".$CAT_TABS." WHERE d.`status`='CONFIRMED' AND d.`html`='Y'".$CAT_WHERE." ORDER BY d.%s %s LIMIT %s",
-                       array($cat, getConfig('order_select'), getConfig('order_mode'), $receiver), __FUNCTION__, __LINE__);
+               array($cat, getConfig('order_select'), getConfig('order_mode'), $receiver), __FUNCTION__, __LINE__);
        } else {
                // Include all
                $result = SQL_QUERY_ESC("SELECT d.userid FROM `{!_MYSQL_PREFIX!}_user_data` AS d ".$CAT_TABS." WHERE d.`status`='CONFIRMED'".$CAT_WHERE." ORDER BY d.%s %s LIMIT %s",
-                       array($cat, getConfig('order_select'), getConfig('order_mode'), $receiver), __FUNCTION__, __LINE__);
+               array($cat, getConfig('order_select'), getConfig('order_mode'), $receiver), __FUNCTION__, __LINE__);
        }
 
        // Entries found?
@@ -2058,7 +2058,7 @@ function getTimestampFromUserStats ($type, $data, $uid = 0) {
 FROM `{!_MYSQL_PREFIX!}_user_stats_data`
 WHERE userid=%s AND stats_type='%s' AND stats_data='%s'
 LIMIT 1",
-               array(bigintval($uid), $type, $data), __FUNCTION__, __LINE__);
+       array(bigintval($uid), $type, $data), __FUNCTION__, __LINE__);
 
        // Is the entry there?
        if (SQL_NUMROWS($result) == 1) {
@@ -2085,7 +2085,7 @@ function insertUserStatsRecord ($uid, $type, $data) {
        if ((!getTimestampFromUserStats($type, $data, $uid)) && (!is_array($data))) {
                // Then insert it!
                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_stats_data` (`userid`,`stats_type`,`stats_data`) VALUES (%s,'%s','%s')",
-                       array(bigintval($uid), $type, $data), __FUNCTION__, __LINE__);
+               array(bigintval($uid), $type, $data), __FUNCTION__, __LINE__);
        } elseif (is_array($data)) {
                // Invalid data!
                DEBUG_LOG(__FUNCTION__, __LINE__, " uid={$uid},type={$type},data={".gettype($data).": Invalid statistics data type!");
@@ -2113,7 +2113,7 @@ LEFT JOIN `{!_MYSQL_PREFIX!}_user_data` AS ud
 ON ur.refid=ud.userid
 WHERE ur.userid=%s AND ur.level=%s
 ORDER BY ur.refid ASC",
-               array(bigintval($uid), bigintval($level)), __FUNCTION__, __LINE__);
+       array(bigintval($uid), bigintval($level)), __FUNCTION__, __LINE__);
 
        // Are there some entries?
        if (SQL_NUMROWS($result) > 0) {
@@ -2165,7 +2165,7 @@ ORDER BY ur.refid ASC",
 function reduceRecipientReceivedMails ($column, $id, $count) {
        // Search for mail in database
        $result = SQL_QUERY_ESC("SELECT `userid` FROM `{!_MYSQL_PREFIX!}_user_links` WHERE `%s`=%s ORDER BY `userid` ASC LIMIT %s",
-               array($column, bigintval($id), $count), __FUNCTION__, __LINE__);
+       array($column, bigintval($id), $count), __FUNCTION__, __LINE__);
 
        // Are there entries?
        if (SQL_NUMROWS($result) > 0) {
@@ -2178,7 +2178,7 @@ function reduceRecipientReceivedMails ($column, $id, $count) {
 
                // Now update all user accounts
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `emails_received`=`emails_received`-1 WHERE `userid` IN (%s) LIMIT %s",
-                       array(implode(',', $UIDs), count($UIDs)), __FUNCTION__, __LINE__);
+               array(implode(',', $UIDs), count($UIDs)), __FUNCTION__, __LINE__);
        } // END - if
 
        // Free result
@@ -2245,8 +2245,8 @@ function COUNT_SQLS () {
 // Checks wether the SQLs array is filled
 function IS_SQLS_VALID () {
        return (
-               (IS_SQLS_INITIALIZED()) &&
-               (COUNT_SQLS() > 0)
+       (IS_SQLS_INITIALIZED()) &&
+       (COUNT_SQLS() > 0)
        );
 }
 
index f2259d1bfe8d8fb1750b107d2f0c15c7f932f7c3..2471f46ef021cba6096eba7b329e5b9cf6ea9e8e 100644 (file)
@@ -72,7 +72,7 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) {
 
                        // Message is active in queue
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET data_type='QUEUE' WHERE `id`=%s LIMIT 1",
-                               array(bigintval($DATA['id'])), __FILE__, __LINE__);
+                       array(bigintval($DATA['id'])), __FILE__, __LINE__);
 
                        // "Explode" all receivers into an array
                        if (ereg(';', $DATA['receivers'])) {
@@ -93,7 +93,7 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) {
                                // Load personal data
                                //* DEBUG: */ echo "*L:".__LINE__.'/'.$uid."*<br />";
                                $result_user = SQL_QUERY_ESC("SELECT surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                                       array(bigintval($uid)), __FILE__, __LINE__);
+                               array(bigintval($uid)), __FILE__, __LINE__);
 
                                // Is his data available?
                                if (SQL_NUMROWS($result_user) == 1) {
@@ -136,7 +136,7 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) {
                                                if (GET_EXT_VERSION('user') >= '0.1.4') {
                                                        // Update mails received for receiver
                                                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET emails_received=emails_received+1 WHERE userid=%s LIMIT 1",
-                                                               array(bigintval($uid)), __FILE__, __LINE__);
+                                                       array(bigintval($uid)), __FILE__, __LINE__);
                                                } // END - if
 
                                                // Do we have send maximum mails?
@@ -166,7 +166,7 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) {
                        if (countSelection($dummy) == 0) {
                                // Queue reached!
                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET `data_type`='SEND', `target_send`=0, `receivers`='' WHERE `id`=%s LIMIT 1",
-                                       array(bigintval($DATA['id'])), __FILE__, __LINE__);
+                               array(bigintval($DATA['id'])), __FILE__, __LINE__);
                                //* DEBUG: */ echo "*L:".__LINE__."*<br />";
 
                                // Update mediadata if version is 0.0.4 or higher
@@ -178,7 +178,7 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) {
                        } elseif ($GLOBALS['pool_cnt'] >= getConfig('max_send')) {
                                // Update bonus pool
                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET `data_type`='NEW', `target_send`=%s, `receivers`='%s' WHERE `id`=%s LIMIT 1",
-                                       array(countSelection($dummy), implode(';', $dummy), bigintval($DATA['id'])), __FILE__, __LINE__);
+                               array(countSelection($dummy), implode(';', $dummy), bigintval($DATA['id'])), __FILE__, __LINE__);
                                //* DEBUG: */ echo "*L:".__LINE__."<pre>";
                                //* DEBUG: */ print_r($dummy);
                                //* DEBUG: */ echo "</pre>\n!!!<br />";
index 3613f38d1f0a092190d4fbe0b7bfb2fa8eff4cd9..fa5a74fc3012e5e2e160627afbe2778b4858563b 100644 (file)
@@ -68,7 +68,7 @@ if (SQL_NUMROWS($result_main) > 0) {
        while ($DATA = SQL_FETCHROW($result_main)) {
                // Set mail order as 'active'. That means it will be sent out
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET data_type='ACTIVE' WHERE `id`=%s AND data_type='NEW' LIMIT 1",
-                       array($DATA[0]), __FILE__, __LINE__);
+               array($DATA[0]), __FILE__, __LINE__);
 
                // Check fetched data for HTML
                $HTML = $DATA[10]; if ($HTML == $DATA[0]) $HTML = 'N';
@@ -96,7 +96,7 @@ if (SQL_NUMROWS($result_main) > 0) {
                        foreach ($RECEIVERS as $key => $uid) {
                                // Lookup user ID
                                $result_user = SQL_QUERY_ESC("SELECT gender, surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                                       array(bigintval($uid)), __FILE__, __LINE__);
+                               array(bigintval($uid)), __FILE__, __LINE__);
 
                                // Is his data available?
                                //* DEBUG: */ echo "*L:".__LINE__.'/'.SQL_NUMROWS($result_user)."*<br />";
@@ -109,18 +109,18 @@ if (SQL_NUMROWS($result_main) > 0) {
 
                                        // Do we have a stats entry?
                                        $result_stats = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE pool_id=%s AND `userid`=%s AND timestamp_ordered='%s' LIMIT 1",
-                                               array($DATA[0], $DATA[1], $DATA[6]), __FILE__, __LINE__);
+                                       array($DATA[0], $DATA[1], $DATA[6]), __FILE__, __LINE__);
 
                                        // If there's no stats entry add it!
                                        //* DEBUG: */ echo "!L:".__LINE__.'/'.SQL_NUMROWS($result_stats)."!<br />";
                                        if (SQL_NUMROWS($result_stats) == 0) {
                                                // No entry was found, so we add him!
                                                SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_stats` (pool_id , userid, cat_id, payment_id, subject, url , max_rec , timestamp_ordered, timestamp_sstart) VALUES ('%s','%s','%s','%s','%s','%s','%s','%s' , UNIX_TIMESTAMP())",
-                                                       array(bigintval($DATA[0]), bigintval($DATA[1]), bigintval($DATA[9]), bigintval($DATA[5]), $DATA[2], $DATA[7], $DATA[8], bigintval($DATA[6])), __FILE__, __LINE__);
+                                               array(bigintval($DATA[0]), bigintval($DATA[1]), bigintval($DATA[9]), bigintval($DATA[5]), $DATA[2], $DATA[7], $DATA[8], bigintval($DATA[6])), __FILE__, __LINE__);
 
                                                // Receive it's ID for the links table
                                                $result_stats = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE pool_id=%s AND `userid`=%s AND timestamp_ordered='%s' LIMIT 1",
-                                                       array(bigintval($DATA[0]), bigintval($DATA[1]), bigintval($DATA[6])), __FILE__, __LINE__);
+                                               array(bigintval($DATA[0]), bigintval($DATA[1]), bigintval($DATA[6])), __FILE__, __LINE__);
                                        } // END - if
 
                                        //* DEBUG: */ echo "!L:".__LINE__.'/'.SQL_NUMROWS($result_stats)."!<br />";
@@ -132,20 +132,20 @@ if (SQL_NUMROWS($result_main) > 0) {
                                                //* DEBUG: */ echo "?L:".__LINE__.'/'.$dummy.'/'.$key.'/'.$uid.'('.$DATA[1].")/".$DATA[0].'/'.$stats_id."?<br />";
                                                switch (removeReceiver($dummy, $key, bigintval($uid), bigintval($DATA[0]), bigintval($stats_id)))
                                                {
-                                               case 'done':
-                                                       // Prepare the mail
-                                                       $DATA[11] = bigintval($stats_id);
-                                                       $DATA[12] = $sname;
-                                                       $DATA[13] = $fname;
-                                                       $DATA[14] = translateGender($gender);
-
-                                                       // Replace text variables
-                                                       foreach ($GLOBALS['replacer'] as $key => $value) {
-                                                               if (isset($DATA[$key])) $DATA[3] = str_replace($value, $DATA[$key], $DATA[3]);
-                                                       } // END - if
-
-                                                       // Prepare content
-                                                       $content = array(
+                                                       case 'done':
+                                                               // Prepare the mail
+                                                               $DATA[11] = bigintval($stats_id);
+                                                               $DATA[12] = $sname;
+                                                               $DATA[13] = $fname;
+                                                               $DATA[14] = translateGender($gender);
+
+                                                               // Replace text variables
+                                                               foreach ($GLOBALS['replacer'] as $key => $value) {
+                                                                       if (isset($DATA[$key])) $DATA[3] = str_replace($value, $DATA[$key], $DATA[3]);
+                                                               } // END - if
+
+                                                               // Prepare content
+                                                               $content = array(
                                                                'id'         => $DATA[11],
                                                                'url'        => $DATA[7],
                                                                'sender_uid' => $DATA[1],
@@ -153,41 +153,41 @@ if (SQL_NUMROWS($result_main) > 0) {
                                                                'time'       => createFancyTime(getPaymentPoints($DATA[5], "time")),
                                                                'points'     => translateComma(getPaymentPoints($DATA[5], "payment")),
                                                                'text'       => $DATA[3]
-                                                       );
+                                                               );
 
-                                                       // Load message template
-                                                       $mailText = LOAD_EMAIL_TEMPLATE("normal-mail", $content, bigintval($uid));
+                                                               // Load message template
+                                                               $mailText = LOAD_EMAIL_TEMPLATE("normal-mail", $content, bigintval($uid));
 
-                                                       // Send mail away
-                                                       sendEmail($email, $DATA[2], $mailText, $HTML);
+                                                               // Send mail away
+                                                               sendEmail($email, $DATA[2], $mailText, $HTML);
 
-                                                       // Count sent mails...
-                                                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET emails_sent=emails_sent+1 WHERE userid=%s LIMIT 1",
+                                                               // Count sent mails...
+                                                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET emails_sent=emails_sent+1 WHERE userid=%s LIMIT 1",
                                                                array(bigintval($DATA[1])), __FILE__, __LINE__);
 
-                                                       if (GET_EXT_VERSION('user') >= '0.1.4') {
-                                                               // Update mails received for receiver
-                                                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET emails_received=emails_received+1 WHERE userid=%s LIMIT 1",
+                                                               if (GET_EXT_VERSION('user') >= '0.1.4') {
+                                                                       // Update mails received for receiver
+                                                                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET emails_received=emails_received+1 WHERE userid=%s LIMIT 1",
                                                                        array(bigintval($uid)), __FILE__, __LINE__);
-                                                       } // END - if
-
-                                                       // Update mediadata if version is 0.0.4 or higher
-                                                       if (GET_EXT_VERSION('mediadata') >= '0.0.4') {
-                                                               // Update entry (or add missing)
-                                                               //* DEBUG: */ echo "*MEDIA/L:".__LINE__."*<br />";
-                                                               MEDIA_UPDATE_ENTRY(array("total_send", "normal_send"), 'add', 1);
-                                                       } // END - if
-
-                                                       // And count up the mail
-                                                       $GLOBALS['pool_cnt']++;
-                                                       //* DEBUG: */ echo"*EXIT/L:".__LINE__.'/'.$GLOBALS['pool_cnt']."*<br />";
-                                                       break;
-
-                                               case "already":
-                                                       // Entry already found, but we still count one up!
-                                                       $GLOBALS['pool_cnt']++;
-                                                       //* DEBUG: */ echo"*EXIT/L:".__LINE__.'/'.$GLOBALS['pool_cnt']."<br />";
-                                                       break;
+                                                               } // END - if
+
+                                                               // Update mediadata if version is 0.0.4 or higher
+                                                               if (GET_EXT_VERSION('mediadata') >= '0.0.4') {
+                                                                       // Update entry (or add missing)
+                                                                       //* DEBUG: */ echo "*MEDIA/L:".__LINE__."*<br />";
+                                                                       MEDIA_UPDATE_ENTRY(array("total_send", "normal_send"), 'add', 1);
+                                                               } // END - if
+
+                                                               // And count up the mail
+                                                               $GLOBALS['pool_cnt']++;
+                                                               //* DEBUG: */ echo"*EXIT/L:".__LINE__.'/'.$GLOBALS['pool_cnt']."*<br />";
+                                                               break;
+
+                                                       case "already":
+                                                               // Entry already found, but we still count one up!
+                                                               $GLOBALS['pool_cnt']++;
+                                                               //* DEBUG: */ echo"*EXIT/L:".__LINE__.'/'.$GLOBALS['pool_cnt']."<br />";
+                                                               break;
                                                }
                                        }
 
@@ -208,7 +208,7 @@ if (SQL_NUMROWS($result_main) > 0) {
 
                                                // Get sender's data
                                                $result_sender = SQL_QUERY_ESC("SELECT surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                                                       array(bigintval($DATA[1])), __FILE__, __LINE__);
+                                               array(bigintval($DATA[1])), __FILE__, __LINE__);
 
                                                // Is the sender found?
                                                if (SQL_NUMROWS($result_sender) == 1) {
@@ -227,11 +227,11 @@ if (SQL_NUMROWS($result_main) > 0) {
 
                                                // Set status to SEND because we completely send it away
                                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET `data_type`='SEND', `target_send`=0, `receivers`='' WHERE `id`=%s LIMIT 1",
-                                                       array(bigintval($DATA[0])), __FILE__, __LINE__);
+                                               array(bigintval($DATA[0])), __FILE__, __LINE__);
 
                                                // Update send-completed-time
                                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_stats` SET `timestamp_send`=UNIX_TIMESTAMP() WHERE `pool_id`=%s LIMIT 1",
-                                                       array(bigintval($DATA[0])), __FILE__, __LINE__);
+                                               array(bigintval($DATA[0])), __FILE__, __LINE__);
 
                                                $lastSentId = $DATA[0]; $GLOBALS['pool_cnt'] = 0;
                                                $cnt2 += $GLOBALS['pool_cnt'];
@@ -247,12 +247,12 @@ if (SQL_NUMROWS($result_main) > 0) {
                                                break;
                                        }
                                        // Do we have send maximum mails?
-                                        elseif (($GLOBALS['pool_cnt'] >= getConfig('max_send')) || ($cnt2 >= getConfig('max_send'))) {
+                                       elseif (($GLOBALS['pool_cnt'] >= getConfig('max_send')) || ($cnt2 >= getConfig('max_send'))) {
                                                // There are some mails left to send for next round, so we reset the status back to NEW (=still not fully delivered)
                                                $add = '';
                                                if ($GLOBALS['pool_cnt'] <= $DATA[8]) $add = ", target_send=target_send-".$GLOBALS['pool_cnt'];
                                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET data_type='NEW', receivers='%s'".$add." WHERE `id`=%s LIMIT 1",
-                                                array(implode(';', $dummy), bigintval($DATA[0])), __FILE__, __LINE__);
+                                               array(implode(';', $dummy), bigintval($DATA[0])), __FILE__, __LINE__);
 
                                                //* DEBUG: */ echo"*EXIT/L:".__LINE__."*<br />";
                                                break;
@@ -265,7 +265,7 @@ if (SQL_NUMROWS($result_main) > 0) {
                                        if (($RECEIVERS[0] == '0') || (empty($RECEIVERS[0]))) {
                                                // List was empty
                                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET data_type='SEND' WHERE `id`=%s LIMIT 1",
-                                                array(bigintval($DATA[0])), __FILE__, __LINE__);
+                                               array(bigintval($DATA[0])), __FILE__, __LINE__);
                                        } else {
                                                // Is the userid set?
                                                if ($uid > 0) {
@@ -286,7 +286,7 @@ if (SQL_NUMROWS($result_main) > 0) {
 
                                        // Update receivers
                                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET receivers='%s' WHERE `id`=%s LIMIT 1",
-                                               array(implode(';', $dummy), bigintval($DATA[0])), __FILE__, __LINE__);
+                                       array(implode(';', $dummy), bigintval($DATA[0])), __FILE__, __LINE__);
                                }
                        }
                }
@@ -305,7 +305,7 @@ if (SQL_NUMROWS($result_main) > 0) {
 
                                // We have to pay back some points to the sender (we add them directly :-P)
                                $result = SQL_QUERY_ESC("SELECT email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
-                                       array(bigintval($uid)), __FILE__, __LINE__);
+                               array(bigintval($uid)), __FILE__, __LINE__);
                                $DATA[10] = $PB; $DATA[11] = $cnt_back[$uid];
 
                                // User found?
index 042f44c740ff20ac2fa71aa97ba6e8507957d1ff..ca85ac4d330235dbe37dbe2434ab6932020adbb6 100644 (file)
@@ -75,7 +75,7 @@ ORDER BY `userid` ASC", array(getConfig('profile_update'), getConfig('resend_pro
 
                        // Update profile data
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET last_profile_sent=UNIX_TIMESTAMP(), notified='Y' WHERE userid=%s LIMIT 1",
-                               array(bigintval($content['userid'])), __FILE__, __LINE__);
+                       array(bigintval($content['userid'])), __FILE__, __LINE__);
                } // END - while
        } // END - if
 
index 51c32088214f37b849f06f5b595e4adc5f72578b..17b8050bbea001d2153eb3a7afba4215943fef18 100644 (file)
 // +----------------------------------------------------------------------+
 
 /**
-* Class RSS Parser
-*
-* This class offers methods to parse RSS Files
-*
-* @link      http://www.fase4.com/rdf/ Latest release of this class
-* @package   rss
-* @copyright Copyright (c) 2001 fase4.com. All rights reserved.
-* @author    Stefan Saasen <s@fase4.com>
-* @author    Roland Haeder <webmaster@mxchange.org>
-* @version   1.7 ($Date$Revision: 856 $
-* @access    public
-*/
+ * Class RSS Parser
+ *
+ * This class offers methods to parse RSS Files
+ *
+ * @link      http://www.fase4.com/rdf/ Latest release of this class
+ * @package   rss
+ * @copyright Copyright (c) 2001 fase4.com. All rights reserved.
+ * @author    Stefan Saasen <s@fase4.com>
+ * @author    Roland Haeder <webmaster@mxchange.org>
+ * @version   1.7 ($Date$Revision: 856 $
+ * @access    public
+ */
 
 class fase4_rdf {
 
-    /**
-    * Word-wrapping mode for description, set it to 0 do disable this feature! Ommits _use_nl2br!
-    *
-    * @access private
-    * @var    integer
-    */
-    var $_word_wrap = 0;
-
-    /**
-    * Wether to recode \n -> <br /> or not in description
-    *
-    * @access private
-    * @var    boolean
-    */
-    var $_use_nl2br = true;
-
-    /**
-    * Sets the decoding mode of the read data (UTF8 scrambles some german umlauts here!)
-    *
-    * "htmlentities" - Use the function htmlentities()
-    * "utf8_decode"  - Use the function ut8_decode() when you have UTF8 encoded text
-    *
-    * @access private
-    * @var    string
-    */
-    var $_decoding_mode = "utf8_decode";
-
-    /**
-    * If $_link_target is set a target='xxx' attribute in each <a /> and <form /> html tag will be added
-    *
-    * Possible values are "_blank", "_content", "_parent", "_self", "_top"
-    *
-    * @access private
-    * @var    string
-    */
-    var $_link_target = "_blank";
-
-    /**
-    * vars for proxy settings - Prox Host
-    *
-    * @access private
-    * @var      string
-    */
-    var $_phost = "";
-
-    /**
-    * vars for proxy settings - Prox Port
-    *
-    * @access private
-    * @var      string
-    */
-    var $_pport = "";
-
-    /**
-    * vars for proxy settings - Prox Username
-    *
-    * @access private
-    * @var      string
-    */
-    var $_pname = "";
-
-    /**
-    * vars for proxy settings - Prox Password
-    *
-    * @access private
-    * @var      string
-    */
-    var $_ppasswd = "";
-
-    /**
-    * just a flag for checking if proxy-support should be enabled
-    * set default to false (will be enabled if set_proxy is called)
-    *
-    * @access   private
-    * @see      set_proxy()
-    * @var      bool
-    */
-    var $_use_proxy = false;
-
-    /**
-    * just a flag for checking if proxy-support with authentication
-    * should be enabled
-    * set default to false (will be enabled if set_proxy is called)
-    *
-    * @access   private
-    * @see      set_proxy()
-    * @var      boolean
-    */
-    var $_use_proxy_auth = false;
-
-    /**
-    * The time the Files will be cached (in seconds).
-    *
-    * @access private
-    * @var    int
-    */
-    var $_refresh = 60;   // int
-
-    /**
-    * The Name of the cached File.
-    *
-    * @access private
-    * @var    string
-    */
-    var $_cached_file = "";   // String
-
-    /**
-    * Indicates whether the cached or the remote file was used.
-    *
-    * @access private
-    * @var    boolean
-    */
-    var $_use_cached_file = true;
-
-    /**
-    * (fast|normal) depends on _use_dynamic_display(). _use_dynamic_display( TRUE ) -> 'normal', otherwise 'fast'
-    *
-    * @access private
-    * @var    string
-    */
-    var $_cache_type = "fast";
-
-    /**
-    * The Name of the Remote File.
-    *
-    * @access private
-    * @var    string
-    */
-    var $_remote_file = "";
-
-    /**
-    * Path to the Cache Directory.
-    *
-    * @access private
-    * @var    string
-    */
-    var $_cache_dir = "cache/";  // String
-
-    /**
-    * Indicates whether the Creating of the Cache Directory needs to be done or not.
-    *
-    * @access private
-    * @var    boolean
-    */
-    var $_cache_dir_ok = false;
-
-    /**
-    * Type of the file to be parsed (RSS or RDF).
-    *
-    * The Type depends on the root node
-    *
-    * @access private
-    * @var    string
-    */
-    var $_type = "rss"; // string (rss or rdf)
-
-    /**
-    * Array of Display Settings.
-    *
-    * Specific Parameters can be set to hidden. These are:
-    * image, channel and textinput. If set to "hidden" those elements won't be displayed.
-    *
-    * @access private
-    * @var    array
-    */
-    var $_display_opt = array(
+       /**
+        * Word-wrapping mode for description, set it to 0 do disable this feature! Ommits _use_nl2br!
+        *
+        * @access private
+        * @var    integer
+        */
+       var $_word_wrap = 0;
+
+       /**
+        * Wether to recode \n -> <br /> or not in description
+        *
+        * @access private
+        * @var    boolean
+        */
+       var $_use_nl2br = true;
+
+       /**
+        * Sets the decoding mode of the read data (UTF8 scrambles some german umlauts here!)
+        *
+        * "htmlentities" - Use the function htmlentities()
+        * "utf8_decode"  - Use the function ut8_decode() when you have UTF8 encoded text
+        *
+        * @access private
+        * @var    string
+        */
+       var $_decoding_mode = "utf8_decode";
+
+       /**
+        * If $_link_target is set a target='xxx' attribute in each <a /> and <form /> html tag will be added
+        *
+        * Possible values are "_blank", "_content", "_parent", "_self", "_top"
+        *
+        * @access private
+        * @var    string
+        */
+       var $_link_target = "_blank";
+
+       /**
+        * vars for proxy settings - Prox Host
+        *
+        * @access private
+        * @var      string
+        */
+       var $_phost = "";
+
+       /**
+        * vars for proxy settings - Prox Port
+        *
+        * @access private
+        * @var      string
+        */
+       var $_pport = "";
+
+       /**
+        * vars for proxy settings - Prox Username
+        *
+        * @access private
+        * @var      string
+        */
+       var $_pname = "";
+
+       /**
+        * vars for proxy settings - Prox Password
+        *
+        * @access private
+        * @var      string
+        */
+       var $_ppasswd = "";
+
+       /**
+        * just a flag for checking if proxy-support should be enabled
+        * set default to false (will be enabled if set_proxy is called)
+        *
+        * @access   private
+        * @see      set_proxy()
+        * @var      bool
+        */
+       var $_use_proxy = false;
+
+       /**
+        * just a flag for checking if proxy-support with authentication
+        * should be enabled
+        * set default to false (will be enabled if set_proxy is called)
+        *
+        * @access   private
+        * @see      set_proxy()
+        * @var      boolean
+        */
+       var $_use_proxy_auth = false;
+
+       /**
+        * The time the Files will be cached (in seconds).
+        *
+        * @access private
+        * @var    int
+        */
+       var $_refresh = 60;   // int
+
+       /**
+        * The Name of the cached File.
+        *
+        * @access private
+        * @var    string
+        */
+       var $_cached_file = "";   // String
+
+       /**
+        * Indicates whether the cached or the remote file was used.
+        *
+        * @access private
+        * @var    boolean
+        */
+       var $_use_cached_file = true;
+
+       /**
+        * (fast|normal) depends on _use_dynamic_display(). _use_dynamic_display( TRUE ) -> 'normal', otherwise 'fast'
+        *
+        * @access private
+        * @var    string
+        */
+       var $_cache_type = "fast";
+
+       /**
+        * The Name of the Remote File.
+        *
+        * @access private
+        * @var    string
+        */
+       var $_remote_file = "";
+
+       /**
+        * Path to the Cache Directory.
+        *
+        * @access private
+        * @var    string
+        */
+       var $_cache_dir = "cache/";  // String
+
+       /**
+        * Indicates whether the Creating of the Cache Directory needs to be done or not.
+        *
+        * @access private
+        * @var    boolean
+        */
+       var $_cache_dir_ok = false;
+
+       /**
+        * Type of the file to be parsed (RSS or RDF).
+        *
+        * The Type depends on the root node
+        *
+        * @access private
+        * @var    string
+        */
+       var $_type = "rss"; // string (rss or rdf)
+
+       /**
+        * Array of Display Settings.
+        *
+        * Specific Parameters can be set to hidden. These are:
+        * image, channel and textinput. If set to "hidden" those elements won't be displayed.
+        *
+        * @access private
+        * @var    array
+        */
+       var $_display_opt = array(
                'build' => "",
                'image' => "",
                'channel' => "",
@@ -221,329 +221,329 @@ class fase4_rdf {
                'sitelink' => "",
                'refid' => "",
                'reflink' => "",
-    );
-
-    /**
-    * Defines the width attribute in the table that holds the rdf/rss representation
-    *
-    * @access private
-    * @var    int
-    * @see    see_table_width()
-    */
-    var $_table_width = "100%";
-
-    /**
-    * Indicates whether or not to use dynamic Display Settings
-    *
-    * @access private
-    * @var    array
-    */
-    var $_use_dynamic_display = false;
-
-    /**
-    * <item> count
-    *
-    * @access private
-    * @var    int
-    */
-    var $_item_count = 0;
-
-    /**
-    * No of max <item>s
-    *
-    * @access private
-    * @var    boolean
-    */
-    var $_max_count = false;
-
-    /**
-    * Array containing the content of <channel />
-    *
-    * @access private
-    * @var    array
-    */
-    var $_array_channel = array();
-
-    /**
-    * Array containing the content of each <item />
-    *
-    * @access private
-    * @var    array
-    */
-    var $_array_item = array();
-
-    /**
-    * Array containing the content of <textinput />
-    *
-    * @access private
-    * @var    array
-    */
-    var $_array_textinput = array();
-
-    /**
-    * Array containing the content of <image />
-    *
-    * @access private
-    * @var    array
-    */
-    var $_array_image = array();
-
-    /**
-    * Array containing the Channel content. Just For internal XML Parser Purposes.
-    *
-    * @access private
-    * @var    array
-    */
-    var $_citem = array();
-
-    /**
-    * Array containing the Channel Parser Depth. Just For internal XML Parser Purposes.
-    *
-    * @access private
-    * @var    array
-    */
-    var $_cdepth = array();
-
-    /**
-    * Array containing the Channel tags. Just For internal XML Parser Purposes.
-    *
-    * @access private
-    * @var    array
-    */
-    var $_ctags = array( "x" );
-
-    /**
-    * Array containing the Channel content. Just For internal XML Parser Purposes.
-    *
-    * @access private
-    * @var    array
-    */
-    var $_item = array();   // Array
-
-    /**
-    * Array containing the Channel Parser Depth. Just For internal XML Parser Purposes.
-    *
-    * @access private
-    * @var    array
-    */
-    var $_depth = array();  // Array
-
-    /**
-    * Array containing the tags. Just For internal XML Parser Purposes.
-    *
-    * @access private
-    * @var    array
-    */
-    var $_tags = array( "x" );  // Array
-
-    /**
-    * Garbage collection: probability in percent
-    *
-    * @var      integer     0 => never
-    * @access   public
-    */
-    var $gc_probability = 1;
-
-    /**
-    * HTML Output
-    *
-    * @var      string
-    * @access   private
-    */
-    var $_output = "";
-
-    /**
-    * @var  string
-    */
-    var $_parse_mode = "";
-
-    // Output variable
-    var $out = "";
-
-    // Salt for hashing
-    var $salt = "";
-
-    /**
-    * Constructor of our Class
-    *
-    * This Method checks if the Cache Directory can be found. Otherwise it tries to creat the Cache Directory at the specified Path.
-    * Additionally the Refresh Time is set to a default Value of 1200s (20 min).
-       *
-    * @access    public
-       * @author    Stefan Saasen <s@fase4.com>
-       * @see           _refresh
-    */
-    function fase4_rdf()
-    {
-        // default Value, to be overwritten in set_refresh()
-        $this->_refresh = (time() - 1200);
-        $this->_clear_cItems();
-        $this->_clear_Items();
-    }
-
-    /**
-    * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
-    *
-    * @access    public
-       * @author    Stefan Saasen <s@fase4.com>
-    * @param     string $rdf    RDF File (Location)
-    * @return    string Displays RDF Content ( using _display() )
-       * @see           _remote_file, cache()
-    */
-    function parse_RDF( $rdf )
-    {
-        unset($this->_array_item);
-        $this->_remote_file = $rdf;
-        $this->out .= "<!-- http://www.fase4.com/rdf/ -->";
-        $this->out .= "<table width=\"".$this->_table_width."\">";
-        $this->out .= $this->cache();
-        $this->out .= "</table>";
-        $this->_output = "";
-        $this->_item_count = 0;
-        return true;
-    }
-
-    /**
-    * This Method is called when all parsing is finished to use the garbage collection
-    *
-    * @access    public
-       * @author    Stefan Saasen <s@fase4.com>
-    * @param     string $rdf    RDF File (Location)
-    * @return    string Displays RDF Content ( using _display() )
-       * @see           _remote_file, cache()
-    */
-    function finish($return = false)
-    {
+       );
+
+       /**
+        * Defines the width attribute in the table that holds the rdf/rss representation
+        *
+        * @access private
+        * @var    int
+        * @see    see_table_width()
+        */
+       var $_table_width = "100%";
+
+       /**
+        * Indicates whether or not to use dynamic Display Settings
+        *
+        * @access private
+        * @var    array
+        */
+       var $_use_dynamic_display = false;
+
+       /**
+        * <item> count
+        *
+        * @access private
+        * @var    int
+        */
+       var $_item_count = 0;
+
+       /**
+        * No of max <item>s
+        *
+        * @access private
+        * @var    boolean
+        */
+       var $_max_count = false;
+
+       /**
+        * Array containing the content of <channel />
+        *
+        * @access private
+        * @var    array
+        */
+       var $_array_channel = array();
+
+       /**
+        * Array containing the content of each <item />
+        *
+        * @access private
+        * @var    array
+        */
+       var $_array_item = array();
+
+       /**
+        * Array containing the content of <textinput />
+        *
+        * @access private
+        * @var    array
+        */
+       var $_array_textinput = array();
+
+       /**
+        * Array containing the content of <image />
+        *
+        * @access private
+        * @var    array
+        */
+       var $_array_image = array();
+
+       /**
+        * Array containing the Channel content. Just For internal XML Parser Purposes.
+        *
+        * @access private
+        * @var    array
+        */
+       var $_citem = array();
+
+       /**
+        * Array containing the Channel Parser Depth. Just For internal XML Parser Purposes.
+        *
+        * @access private
+        * @var    array
+        */
+       var $_cdepth = array();
+
+       /**
+        * Array containing the Channel tags. Just For internal XML Parser Purposes.
+        *
+        * @access private
+        * @var    array
+        */
+       var $_ctags = array( "x" );
+
+       /**
+        * Array containing the Channel content. Just For internal XML Parser Purposes.
+        *
+        * @access private
+        * @var    array
+        */
+       var $_item = array();   // Array
+
+       /**
+        * Array containing the Channel Parser Depth. Just For internal XML Parser Purposes.
+        *
+        * @access private
+        * @var    array
+        */
+       var $_depth = array();  // Array
+
+       /**
+        * Array containing the tags. Just For internal XML Parser Purposes.
+        *
+        * @access private
+        * @var    array
+        */
+       var $_tags = array( "x" );  // Array
+
+       /**
+        * Garbage collection: probability in percent
+        *
+        * @var      integer     0 => never
+        * @access   public
+        */
+       var $gc_probability = 1;
+
+       /**
+        * HTML Output
+        *
+        * @var      string
+        * @access   private
+        */
+       var $_output = "";
+
+       /**
+        * @var  string
+        */
+       var $_parse_mode = "";
+
+       // Output variable
+       var $out = "";
+
+       // Salt for hashing
+       var $salt = "";
+
+       /**
+        * Constructor of our Class
+        *
+        * This Method checks if the Cache Directory can be found. Otherwise it tries to creat the Cache Directory at the specified Path.
+        * Additionally the Refresh Time is set to a default Value of 1200s (20 min).
+        *
+        * @access    public
+        * @author    Stefan Saasen <s@fase4.com>
+        * @see          _refresh
+        */
+       function fase4_rdf()
+       {
+               // default Value, to be overwritten in set_refresh()
+               $this->_refresh = (time() - 1200);
+               $this->_clear_cItems();
+               $this->_clear_Items();
+       }
+
+       /**
+        * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+        *
+        * @access    public
+        * @author    Stefan Saasen <s@fase4.com>
+        * @param     string $rdf    RDF File (Location)
+        * @return    string Displays RDF Content ( using _display() )
+        * @see          _remote_file, cache()
+        */
+       function parse_RDF( $rdf )
+       {
+               unset($this->_array_item);
+               $this->_remote_file = $rdf;
+               $this->out .= "<!-- http://www.fase4.com/rdf/ -->";
+               $this->out .= "<table width=\"".$this->_table_width."\">";
+               $this->out .= $this->cache();
+               $this->out .= "</table>";
+               $this->_output = "";
+               $this->_item_count = 0;
+               return true;
+       }
+
+       /**
+        * This Method is called when all parsing is finished to use the garbage collection
+        *
+        * @access    public
+        * @author    Stefan Saasen <s@fase4.com>
+        * @param     string $rdf    RDF File (Location)
+        * @return    string Displays RDF Content ( using _display() )
+        * @see          _remote_file, cache()
+        */
+       function finish($return = false)
+       {
                if (!$return) {
                        echo $this->out;
                } else {
                        return $this->out;
                }
-        flush();
-        $this->_garbage_collection();
-    }
-
-    /**
-    * With this method you can decide whether to use the normal cache and dynamic display Options or to use a static cache.
-    *
-    * In the first case the rdf/rss File will be stored locally, in the second case the html output of the specified source will be stored.
-    * In this case you can not modify the display settings.
-    * processing time: ( 1.4792) --> remote file
-    * processing time: ( 0.0313) --> using 'normal cache' with display Modification turned on.
-    * processing time: ( 0.0019) --> using 'fast cache'
-    *
-    * @access    public
-       * @author    Stefan Saasen <s@fase4.com>
-    * @param     string $rdf    RDF File (Location)
-    * @return    string Displays RDF Content ( using _display() )
-       * @see           _remote_file, cache()
-    */
-    function use_dynamic_display( $bool )
-    {
-        $this->_use_dynamic_display = $bool;
-        return true;
-    }
-
-    /**
-    * This Method avtually parses the XML data.
-    *
-    * @access    private
-    * @author    Stefan Saasen <s@fase4.com>
-    * @param     string $data    RDF File XML Data
-    * @see       _clear_Items()
-    */
-    function _parse_xRDF( $data )
-    {
-        $this->_clear_Items();
-        $xml_parser = xml_parser_create();
-        xml_set_object($xml_parser,$this);
-        xml_parser_set_option($xml_parser,XML_OPTION_CASE_FOLDING,0);
-        xml_set_element_handler($xml_parser, "_startElement", "_endElement");
-        xml_set_character_data_handler($xml_parser, "_parseData");
-        if (!xml_parse($xml_parser, trim($data))) {
-                $this->_throw_exception(sprintf("XML error: %s at line %d",
-                xml_error_string(xml_get_error_code($xml_parser)),
-                xml_get_current_line_number($xml_parser))."<br /><br />Exception in function parse_RDF().");
-            }
-        xml_parser_free($xml_parser);
-    }
-
-
-    /**
-    * This Methods allows you to set the Refresh Time
-    *
-    * @access    public
-       * @author    Stefan Saasen <s@fase4.com>
-    * @param     int $seconds time files will be cached (in seconds).
-       * @return        boolean
-       * @see           _refresh
-    */
-    function set_refresh( $seconds )
-    {
-        $this->_refresh = (time() - $seconds);
-        return true;
-    }
-
-    function set_salt( $saltPara )
-    {
-        $this->salt = $saltPara;
-        return true;
-    }
-
-    /**
-    * This Methods allows you to set the No. of <item>s to display
-    *
-    * @access    public
-    * @param     int $int No of max <item>s
-       * @author    Stefan Saasen <s@fase4.com>
-       * @return        boolean
-       * @see           _max_count, _endElement()
-    */
-    function set_max_item( $int )
-    {
-        $this->_max_count = $int;
-        return true;
-    }
-
-    /**
-    * This Methods allows you to set the Cache Directory
-    *
-    * @access    public
-       * @author    Stefan Saasen <s@fase4.com>
-    * @param     string $dir Path to Directory.
-       * @return        boolean
-       * @see           _cache_dir
-    */
-    function set_CacheDir( $dir )
-    {
-        if(substr($dir, -1) != "/") {
-            $dir = $dir."/";
-        }
-        $this->_cache_dir = $dir;
-    }
-
-    /**
-    * This Method displays Error Messages and terminates the Execution of the Script
-    *
-    * @access    private
-    * @param     string $msg Message to display on failure
-       * @author    Stefan Saasen <s@fase4.com>
-    */
-    function _throw_exception( $msg )
-    {
-        $this->out .= "<div style=\"font-family: verdana, helvetica, arial, sans-serif;font-size:11px; color: #6699cc;margin-top:10px;margin-bottom:10px;\" align=\"center\">fase4 RDF Error: ".$msg."</div>";
-        return true;
-    }
-
-    /**
-    * This Method clears the Array containig the Items.
-    *
-    * @access    private
-       * @author    Stefan Saasen <s@fase4.com>
-    * @see       _item
-    */
-    function _clear_Items( ) {
-        $this->_item = array(
+               flush();
+               $this->_garbage_collection();
+       }
+
+       /**
+        * With this method you can decide whether to use the normal cache and dynamic display Options or to use a static cache.
+        *
+        * In the first case the rdf/rss File will be stored locally, in the second case the html output of the specified source will be stored.
+        * In this case you can not modify the display settings.
+        * processing time: ( 1.4792) --> remote file
+        * processing time: ( 0.0313) --> using 'normal cache' with display Modification turned on.
+        * processing time: ( 0.0019) --> using 'fast cache'
+        *
+        * @access    public
+        * @author    Stefan Saasen <s@fase4.com>
+        * @param     string $rdf    RDF File (Location)
+        * @return    string Displays RDF Content ( using _display() )
+        * @see          _remote_file, cache()
+        */
+       function use_dynamic_display( $bool )
+       {
+               $this->_use_dynamic_display = $bool;
+               return true;
+       }
+
+       /**
+        * This Method avtually parses the XML data.
+        *
+        * @access    private
+        * @author    Stefan Saasen <s@fase4.com>
+        * @param     string $data    RDF File XML Data
+        * @see       _clear_Items()
+        */
+       function _parse_xRDF( $data )
+       {
+               $this->_clear_Items();
+               $xml_parser = xml_parser_create();
+               xml_set_object($xml_parser,$this);
+               xml_parser_set_option($xml_parser,XML_OPTION_CASE_FOLDING,0);
+               xml_set_element_handler($xml_parser, "_startElement", "_endElement");
+               xml_set_character_data_handler($xml_parser, "_parseData");
+               if (!xml_parse($xml_parser, trim($data))) {
+                       $this->_throw_exception(sprintf("XML error: %s at line %d",
+                       xml_error_string(xml_get_error_code($xml_parser)),
+                       xml_get_current_line_number($xml_parser))."<br /><br />Exception in function parse_RDF().");
+               }
+               xml_parser_free($xml_parser);
+       }
+
+
+       /**
+        * This Methods allows you to set the Refresh Time
+        *
+        * @access    public
+        * @author    Stefan Saasen <s@fase4.com>
+        * @param     int $seconds time files will be cached (in seconds).
+        * @return       boolean
+        * @see          _refresh
+        */
+       function set_refresh( $seconds )
+       {
+               $this->_refresh = (time() - $seconds);
+               return true;
+       }
+
+       function set_salt( $saltPara )
+       {
+               $this->salt = $saltPara;
+               return true;
+       }
+
+       /**
+        * This Methods allows you to set the No. of <item>s to display
+        *
+        * @access    public
+        * @param     int $int No of max <item>s
+        * @author    Stefan Saasen <s@fase4.com>
+        * @return       boolean
+        * @see          _max_count, _endElement()
+        */
+       function set_max_item( $int )
+       {
+               $this->_max_count = $int;
+               return true;
+       }
+
+       /**
+        * This Methods allows you to set the Cache Directory
+        *
+        * @access    public
+        * @author    Stefan Saasen <s@fase4.com>
+        * @param     string $dir Path to Directory.
+        * @return       boolean
+        * @see          _cache_dir
+        */
+       function set_CacheDir( $dir )
+       {
+               if(substr($dir, -1) != "/") {
+                       $dir = $dir."/";
+               }
+               $this->_cache_dir = $dir;
+       }
+
+       /**
+        * This Method displays Error Messages and terminates the Execution of the Script
+        *
+        * @access    private
+        * @param     string $msg Message to display on failure
+        * @author    Stefan Saasen <s@fase4.com>
+        */
+       function _throw_exception( $msg )
+       {
+               $this->out .= "<div style=\"font-family: verdana, helvetica, arial, sans-serif;font-size:11px; color: #6699cc;margin-top:10px;margin-bottom:10px;\" align=\"center\">fase4 RDF Error: ".$msg."</div>";
+               return true;
+       }
+
+       /**
+        * This Method clears the Array containig the Items.
+        *
+        * @access    private
+        * @author    Stefan Saasen <s@fase4.com>
+        * @see       _item
+        */
+       function _clear_Items( ) {
+               $this->_item = array(
             'title'=>"",
             'link'=>"",
             'description'=>"",
@@ -553,17 +553,17 @@ class fase4_rdf {
             'lastBuildDate'=>"",
             'width'=>"",
             'height'=>""
-        );
-    }
-    /**
-    * This Method clears the Array containig the Channel Items.
-    *
-    * @access    private
-       * @author    Stefan Saasen <s@fase4.com>
-    * @see       _item
-    */
-    function _clear_cItems( ) {
-        $this->_citem = array(
+            );
+       }
+       /**
+        * This Method clears the Array containig the Channel Items.
+        *
+        * @access    private
+        * @author    Stefan Saasen <s@fase4.com>
+        * @see       _item
+        */
+       function _clear_cItems( ) {
+               $this->_citem = array(
             'title'=>"",
             'link'=>"",
             'description'=>"",
@@ -586,278 +586,278 @@ class fase4_rdf {
             'sitelink'=>"",
             'refid'=>"",
             'reflink'=>"",
-        );
-    }
-
-    /**
-    * XML Parser Start Element Handler
-    *
-    * @access    private
-       * @author    Stefan Saasen <s@fase4.com>
-    * @param     mixed  $parser a reference to the XML parser calling the handler.
-    * @param     string $name contains the name of the element for which this handler is called.
-    * @param     string $attrs contains an associative array with the element's attributes (if any).
-       * @see           _get_ChannelData(), _clear_Items(), _type, _parse_mode, _depth, _tags, _cdepth, _ctags
-    */
-    function _startElement($parser, $name, $attrs) {
-        // We have to determine, which type of xml data we have to parse
-        if($name == "rss") {
-            $this->_type = "rss";
-        } elseif($name == "rdf:RDF" OR $name == "rdf") {
-            $this->_type = "rdf";
-        }
-
-
-        if ( $name == "channel" AND $this->_type != "rdf" ) {
-            $this->_parse_mode = "channel";
-        } elseif ( ($name=="item")
-                    ||($name=="image")
-                    ||($name=="textinput")
-                    ||(($name=="channel") && ($this->_type != "rss")) ) {
-            if($this->_parse_mode=="channel") {
-                $this->_get_ChannelData( $parser );
-            }
-            $this->_parse_mode = "all";
-        }
-
-        if( !isset( $this->_depth[$this->get_parser_id($parser)] ) ) {
-            $this->_depth[$this->get_parser_id($parser)] = 0;
-        }
-        $this->_depth[$this->get_parser_id($parser)]++;
-        array_push($this->_tags, $name);
-
-        if( !isset( $this->_cdepth[$this->get_parser_id($parser)] ) ) {
-            $this->_cdepth[$this->get_parser_id($parser)] = 0;
-        }
-        $this->_cdepth[$this->get_parser_id($parser)]++;
-        array_push($this->_ctags, $name);
-    }   // END _startElement()
-
-    /**
-    * Retrives the Channel Data in <rss> File
-    *
-    * @access    private
-       * @author    Stefan Saasen <s@fase4.com>
-    * @param     mixed  $parser a reference to the XML parser calling the handler.
-       * @see           _output, _display_opt, _citem
-    */
-    function _get_ChannelData( $parser )
-    {
-                $this->_citem["link"] = trim($this->_citem["link"]);
-                        if (($this->_display_opt["sitelink"] == $this->_citem["link"]) && (!empty($this->_display_opt["reflink"])) && (!empty($this->_display_opt["refid"])))
-                {
-                    $this->_citem["link"] .= $this->_display_opt["reflink"].$this->_display_opt["refid"];
-                }
-
-                if( empty($this->_display_opt["channel"]) OR
-                    $this->_display_opt["channel"] != "hidden") {
-                $this->_output .= "<tr><td>\n";
-                $this->_output .= "<table border=\"0\" width=\"100%\" class=\"fase4_rdf_meta\" cellspacing=\"5\" cellpadding=\"2\">\n";
-                $this->_output .= "<tr><td class=\"fase4_rdf_main_title\"><div class=\"fase4_rdf_main_title\">".htmlspecialchars($this->_citem["title"])."</div></td></tr>\n";
-                $this->_output .= "<tr><td class=\"fase4_rdf\">".strip_tags($this->_citem["description"], "<a>, <img>")."</td></tr>\n";
-                $this->_output .= "<tr><td>&nbsp;</td></tr>\n";
-                $this->_output .= "<tr><td class=\"fase4_rdf\">\n";
-                if(isset($this->_display_opt["build"]) && $this->_display_opt["build"] != "hidden") {
-                    if($this->_citem["lastBuildDate"]){$this->_output .= "build: ". $this->_citem["lastBuildDate"]."<br />";}
-                }
-                if(isset($this->_display_opt["cache_update"]) && $this->_display_opt["cache_update"] != "hidden" && ( $_update = $this->get_cache_update_time()) ) {
-                $this->_output .= "cache update: ".$_update."<br />\n";
-                }
-                $this->_output .= "<a href=\"".$this->_citem["link"]."\" ";
-                if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; }
-                $this->_output .= ">".$this->_cut_string($this->_citem["link"])."</a>";
-                $this->_output .= "</td></tr>\n";
-                $this->_output .= "<tr><td><hr noshade width=\"100%\" size=\"1\"></td></tr>\n";
-                $this->_output .= "</table></td></tr>";
-                }
-                    $this->_array_channel = array(  "title"=>$this->_citem["title"],
+               );
+       }
+
+       /**
+        * XML Parser Start Element Handler
+        *
+        * @access    private
+        * @author    Stefan Saasen <s@fase4.com>
+        * @param     mixed  $parser a reference to the XML parser calling the handler.
+        * @param     string $name contains the name of the element for which this handler is called.
+        * @param     string $attrs contains an associative array with the element's attributes (if any).
+        * @see          _get_ChannelData(), _clear_Items(), _type, _parse_mode, _depth, _tags, _cdepth, _ctags
+        */
+       function _startElement($parser, $name, $attrs) {
+               // We have to determine, which type of xml data we have to parse
+               if($name == "rss") {
+                       $this->_type = "rss";
+               } elseif($name == "rdf:RDF" OR $name == "rdf") {
+                       $this->_type = "rdf";
+               }
+
+
+               if ( $name == "channel" AND $this->_type != "rdf" ) {
+                       $this->_parse_mode = "channel";
+               } elseif ( ($name=="item")
+               ||($name=="image")
+               ||($name=="textinput")
+               ||(($name=="channel") && ($this->_type != "rss")) ) {
+                       if($this->_parse_mode=="channel") {
+                               $this->_get_ChannelData( $parser );
+                       }
+                       $this->_parse_mode = "all";
+               }
+
+               if( !isset( $this->_depth[$this->get_parser_id($parser)] ) ) {
+                       $this->_depth[$this->get_parser_id($parser)] = 0;
+               }
+               $this->_depth[$this->get_parser_id($parser)]++;
+               array_push($this->_tags, $name);
+
+               if( !isset( $this->_cdepth[$this->get_parser_id($parser)] ) ) {
+                       $this->_cdepth[$this->get_parser_id($parser)] = 0;
+               }
+               $this->_cdepth[$this->get_parser_id($parser)]++;
+               array_push($this->_ctags, $name);
+       }   // END _startElement()
+
+       /**
+        * Retrives the Channel Data in <rss> File
+        *
+        * @access    private
+        * @author    Stefan Saasen <s@fase4.com>
+        * @param     mixed  $parser a reference to the XML parser calling the handler.
+        * @see          _output, _display_opt, _citem
+        */
+       function _get_ChannelData( $parser )
+       {
+               $this->_citem["link"] = trim($this->_citem["link"]);
+               if (($this->_display_opt["sitelink"] == $this->_citem["link"]) && (!empty($this->_display_opt["reflink"])) && (!empty($this->_display_opt["refid"])))
+               {
+                       $this->_citem["link"] .= $this->_display_opt["reflink"].$this->_display_opt["refid"];
+               }
+
+               if( empty($this->_display_opt["channel"]) OR
+               $this->_display_opt["channel"] != "hidden") {
+                       $this->_output .= "<tr><td>\n";
+                       $this->_output .= "<table border=\"0\" width=\"100%\" class=\"fase4_rdf_meta\" cellspacing=\"5\" cellpadding=\"2\">\n";
+                       $this->_output .= "<tr><td class=\"fase4_rdf_main_title\"><div class=\"fase4_rdf_main_title\">".htmlspecialchars($this->_citem["title"])."</div></td></tr>\n";
+                       $this->_output .= "<tr><td class=\"fase4_rdf\">".strip_tags($this->_citem["description"], "<a>, <img>")."</td></tr>\n";
+                       $this->_output .= "<tr><td>&nbsp;</td></tr>\n";
+                       $this->_output .= "<tr><td class=\"fase4_rdf\">\n";
+                       if(isset($this->_display_opt["build"]) && $this->_display_opt["build"] != "hidden") {
+                               if($this->_citem["lastBuildDate"]){$this->_output .= "build: ". $this->_citem["lastBuildDate"]."<br />";}
+                       }
+                       if(isset($this->_display_opt["cache_update"]) && $this->_display_opt["cache_update"] != "hidden" && ( $_update = $this->get_cache_update_time()) ) {
+                               $this->_output .= "cache update: ".$_update."<br />\n";
+                       }
+                       $this->_output .= "<a href=\"".$this->_citem["link"]."\" ";
+                       if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; }
+                       $this->_output .= ">".$this->_cut_string($this->_citem["link"])."</a>";
+                       $this->_output .= "</td></tr>\n";
+                       $this->_output .= "<tr><td><hr noshade width=\"100%\" size=\"1\"></td></tr>\n";
+                       $this->_output .= "</table></td></tr>";
+               }
+               $this->_array_channel = array(  "title"=>$this->_citem["title"],
                                                     "link"=>$this->_citem["link"],
                                                     "description"=>$this->_citem["description"],
                                                     "lastBuildDate"=>$this->_citem["lastBuildDate"]);
-    }
-
-    /**
-    * XML Parser End Element Handler
-    *
-    * @access    private
-       * @author    Stefan Saasen <s@fase4.com>
-    * @param     mixed  $parser a reference to the XML parser calling the handler.
-    * @param     string $name contains the name of the element for which this handler is called.
-       * @see           _clear_Items(), _type, _parse_mode, _depth, _tags, _cdepth, _ctags, _item, _output, _display_opt
-    */
-    function _endElement($parser, $name) {
-        array_pop($this->_tags);
-        $this->_depth[$this->get_parser_id($parser)]--;
-        array_pop($this->_ctags);
-        $this->_cdepth[$this->get_parser_id($parser)]--;
-        $this->_item["link"] = trim($this->_item["link"]);
-          if ((!empty($this->_display_opt["refid"])) && (!empty($this->_item["link"])))
-          {
-            if (!ereg("refid=", $this->_item["link"])) $this->_item["link"] .= "?refid=" . $this->_display_opt["refid"];
-          }
-        switch ($name) {
-            case "item":
-                if(empty($this->_max_count) OR $this->_item_count < $this->_max_count) {
-                    if($this->_item["title"] != $this->_item["description"]
-                                            AND $this->_item["description"]) {
-
-                        // word-wrapping added by Roland Haeder <webmaster@mxchange.org>
-                          if (($this->_word_wrap > 0) && (strlen($this->_item["description"]) > $this->_word_wrap))
-                        {
-                            // Switch off _use_nl2br
-                            $this->_use_nl2br = false;
-                            // First remove all \n
-                            $this->_item["description"] = str_replace('\n', ' ', $this->_item["description"]);
-                            // Wrap with <br />\n
-                            $this->_item["description"] = wordwrap($this->_item["description"], $this->_word_wrap, "*<br>\n");
-                        }
-                         elseif (($this->_word_wrap == 0) && (!$this->_use_nl2br))
-                        {
-                            // Strip tags out instead when word-wrap is disabled
-                            $this->_item["description"] = strip_tags($this->_item["description"], "<a>, <img>");
-                        }
-
-                        // nl2br added by Roland Haeder <webmaster@mxchange.org>
-                        if ($this->_use_nl2br) $this->_item["description"] = nl2br($this->_item["description"]);
-
-                        $this->_output .= "<tr><td class=\"fase4_rdf_title\"><div class=\"fase4_rdf_title\"><a class=\"fase4_rdf_title\" href=\"".$this->_item["link"]."\" ";
-                        if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; }
-                        $this->_output .= ">".strip_tags($this->_item["title"], "<a>, <img>")."</a> (".$this->_item["pubDate"].")</div></td></tr>\n";
-                                       $this->_output .= "<tr><td class=\"fase4_rdf\">".$this->_item["description"]."</td></tr>\n";
-                        // we just display the <hr> if there is a description
-                        $this->_output .= "<tr><td><hr noshade=\"noshade\" size=\"1\" /></td></tr>\n";
-                    } else {
-                        $this->_output .= "<tr><td class=\"fase4_rdf\">\n";
-                        $this->_output .= "<a href=\"".$this->_item["link"]."\" ";
-                        if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; }
-                        $this->_output .= ">".$this->_item["title"]."</a></td></tr>\n";
-                    }
-                        $this->_array_item[] = array(   "title"=>$this->_item["title"],
+       }
+
+       /**
+        * XML Parser End Element Handler
+        *
+        * @access    private
+        * @author    Stefan Saasen <s@fase4.com>
+        * @param     mixed  $parser a reference to the XML parser calling the handler.
+        * @param     string $name contains the name of the element for which this handler is called.
+        * @see          _clear_Items(), _type, _parse_mode, _depth, _tags, _cdepth, _ctags, _item, _output, _display_opt
+        */
+       function _endElement($parser, $name) {
+               array_pop($this->_tags);
+               $this->_depth[$this->get_parser_id($parser)]--;
+               array_pop($this->_ctags);
+               $this->_cdepth[$this->get_parser_id($parser)]--;
+               $this->_item["link"] = trim($this->_item["link"]);
+               if ((!empty($this->_display_opt["refid"])) && (!empty($this->_item["link"])))
+               {
+                       if (!ereg("refid=", $this->_item["link"])) $this->_item["link"] .= "?refid=" . $this->_display_opt["refid"];
+               }
+               switch ($name) {
+                       case "item":
+                               if(empty($this->_max_count) OR $this->_item_count < $this->_max_count) {
+                                       if($this->_item["title"] != $this->_item["description"]
+                                       AND $this->_item["description"]) {
+
+                                               // word-wrapping added by Roland Haeder <webmaster@mxchange.org>
+                                               if (($this->_word_wrap > 0) && (strlen($this->_item["description"]) > $this->_word_wrap))
+                                               {
+                                                       // Switch off _use_nl2br
+                                                       $this->_use_nl2br = false;
+                                                       // First remove all \n
+                                                       $this->_item["description"] = str_replace("\n", ' ', $this->_item["description"]);
+                                                       // Wrap with <br />\n
+                                                       $this->_item["description"] = wordwrap($this->_item["description"], $this->_word_wrap, "*<br>\n");
+                                               }
+                                               elseif (($this->_word_wrap == 0) && (!$this->_use_nl2br))
+                                               {
+                                                       // Strip tags out instead when word-wrap is disabled
+                                                       $this->_item["description"] = strip_tags($this->_item["description"], "<a>, <img>");
+                                               }
+
+                                               // nl2br added by Roland Haeder <webmaster@mxchange.org>
+                                               if ($this->_use_nl2br) $this->_item["description"] = nl2br($this->_item["description"]);
+
+                                               $this->_output .= "<tr><td class=\"fase4_rdf_title\"><div class=\"fase4_rdf_title\"><a class=\"fase4_rdf_title\" href=\"".$this->_item["link"]."\" ";
+                                               if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; }
+                                               $this->_output .= ">".strip_tags($this->_item["title"], "<a>, <img>")."</a> (".$this->_item["pubDate"].")</div></td></tr>\n";
+                                               $this->_output .= "<tr><td class=\"fase4_rdf\">".$this->_item["description"]."</td></tr>\n";
+                                               // we just display the <hr> if there is a description
+                                               $this->_output .= "<tr><td><hr noshade=\"noshade\" size=\"1\" /></td></tr>\n";
+                                       } else {
+                                               $this->_output .= "<tr><td class=\"fase4_rdf\">\n";
+                                               $this->_output .= "<a href=\"".$this->_item["link"]."\" ";
+                                               if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; }
+                                               $this->_output .= ">".$this->_item["title"]."</a></td></tr>\n";
+                                       }
+                                       $this->_array_item[] = array(   "title"=>$this->_item["title"],
                                                         "link"=>$this->_item["link"],
                                                         "description"=>$this->_item["description"]);
-                        ++$this->_item_count;
-                }
-                    $this->_clear_Items();
-            break;
-            case "image":
-                if(isset($this->_display_opt["image"]) && ($this->_display_opt["image"] != "hidden") && $this->_item["url"]) {
-                    $this->_output .= "<tr><td class=\"fase4_rdf\">\n";
-                    $this->_output .= "<a href=\"".$this->_item["link"]."\" ";
-                    if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; }
-                    $this->_output .= "><img src=\"".$this->_item["url"]."\"";
-                if(isset($this->_item["width"]) && isset($this->_item["height"])) {
-                    $this->_output .= " width=\"".$this->_item["width"]."\" height=\"".$this->_item["height"]."\"";
-                }
-                $this->_output .= " alt=\"".$this->_item["title"]."\" border=\"0\" /></a></td></tr>\n";
-
-                    $this->_array_image[] = array(  "url"=>$this->_item["url"],
+                                       ++$this->_item_count;
+                               }
+                               $this->_clear_Items();
+                               break;
+                       case "image":
+                               if(isset($this->_display_opt["image"]) && ($this->_display_opt["image"] != "hidden") && $this->_item["url"]) {
+                                       $this->_output .= "<tr><td class=\"fase4_rdf\">\n";
+                                       $this->_output .= "<a href=\"".$this->_item["link"]."\" ";
+                                       if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; }
+                                       $this->_output .= "><img src=\"".$this->_item["url"]."\"";
+                                       if(isset($this->_item["width"]) && isset($this->_item["height"])) {
+                                               $this->_output .= " width=\"".$this->_item["width"]."\" height=\"".$this->_item["height"]."\"";
+                                       }
+                                       $this->_output .= " alt=\"".$this->_item["title"]."\" border=\"0\" /></a></td></tr>\n";
+
+                                       $this->_array_image[] = array(  "url"=>$this->_item["url"],
                                                     "link"=>$this->_item["link"],
                                                     "width"=>$this->_item["width"],
                                                     "height"=>$this->_item["height"]);
-                    $this->_clear_Items();
-                } elseif( isset($this->_display_opt["image"] ) && ($this->_display_opt["image"] == "hidden") ) {
-                    $this->_clear_Items();
-                }
-
-            break;
-            case "channel":
-                if(isset($this->_display_opt["channel"]) AND $this->_display_opt["channel"] != "hidden" AND $this->_item["title"] != '') {
-                    $this->_output .= "<tr><td>\n";
-                    $this->_output .= '<table border="0" width="100%" class="fase4_rdf_meta" cellspacing="5" cellpadding="2">'."\n";
-                    $this->_output .= "<tr><td class=\"fase4_rdf\"><div class=\"fase4_rdf_title\">".htmlspecialchars($this->_item["title"])."</div></td></tr>\n";
-                    $this->_output .= "<tr><td class=\"fase4_rdf\">".strip_tags($this->_item["description"], "<a>, <img>")."</td></tr>\n";
-                    $this->_output .= "<tr><td>&nbsp;</td></tr>\n";
-                    $this->_output .= "<tr><td class=\"fase4_rdf\">\n";
-                if($this->_display_opt["build"] != "hidden") {
-                    if($this->_item["lastBuildDate"]){$this->_output .= "build: ". $this->_item["lastBuildDate"]."<br />";}
-                }
-                if($this->_display_opt["cache_update"] != "hidden" && ( $_update = $this->get_cache_update_time()) ) {
-                    $this->_output .= "cache update: ".$_update."<br />\n";
-                }
-                $this->_output .= "<a href=\"".$this->_item["link"]."\" ";
-                if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; }
-                $this->_output .= ">".$this->_cut_string($this->_item["link"])."</a>\n";
-                $this->_output .= "</td></tr>\n";
-                $this->_output .= "</table></td></tr>\n";
-                }
-                    $this->_array_channel = array(  "title"=>$this->_item["title"],
+                                       $this->_clear_Items();
+                               } elseif( isset($this->_display_opt["image"] ) && ($this->_display_opt["image"] == "hidden") ) {
+                                       $this->_clear_Items();
+                               }
+
+                               break;
+                       case "channel":
+                               if(isset($this->_display_opt["channel"]) AND $this->_display_opt["channel"] != "hidden" AND $this->_item["title"] != '') {
+                                       $this->_output .= "<tr><td>\n";
+                                       $this->_output .= '<table border="0" width="100%" class="fase4_rdf_meta" cellspacing="5" cellpadding="2">'."\n";
+                                       $this->_output .= "<tr><td class=\"fase4_rdf\"><div class=\"fase4_rdf_title\">".htmlspecialchars($this->_item["title"])."</div></td></tr>\n";
+                                       $this->_output .= "<tr><td class=\"fase4_rdf\">".strip_tags($this->_item["description"], "<a>, <img>")."</td></tr>\n";
+                                       $this->_output .= "<tr><td>&nbsp;</td></tr>\n";
+                                       $this->_output .= "<tr><td class=\"fase4_rdf\">\n";
+                                       if($this->_display_opt["build"] != "hidden") {
+                                               if($this->_item["lastBuildDate"]){$this->_output .= "build: ". $this->_item["lastBuildDate"]."<br />";}
+                                       }
+                                       if($this->_display_opt["cache_update"] != "hidden" && ( $_update = $this->get_cache_update_time()) ) {
+                                               $this->_output .= "cache update: ".$_update."<br />\n";
+                                       }
+                                       $this->_output .= "<a href=\"".$this->_item["link"]."\" ";
+                                       if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; }
+                                       $this->_output .= ">".$this->_cut_string($this->_item["link"])."</a>\n";
+                                       $this->_output .= "</td></tr>\n";
+                                       $this->_output .= "</table></td></tr>\n";
+                               }
+                               $this->_array_channel = array(  "title"=>$this->_item["title"],
                                                     "link"=>$this->_item["link"],
                                                     "description"=>$this->_item["description"],
                                                     "lastBuildDate"=>$this->_item["lastBuildDate"]);
-                    $this->_clear_Items();
-                    $this->_clear_cItems();
-            break;
+                               $this->_clear_Items();
+                               $this->_clear_cItems();
+                               break;
                        case "textinput":
-                if(isset($this->_display_opt["textinput"]) && ($this->_display_opt["textinput"] != "hidden") && $this->_item["name"] && $this->_item["link"]) {
-                    $this->_output .= "<tr><td class=\"fase4_rdf\">\n";
-                               $this->_output .= "<form action=\"".$this->_item["link"]."\" ";
-                    if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; }
-                    $this->_output .= "method=\"get\">\n";
-                    $this->_output .= "<div class=\"fase4_rdf_title\">".$this->_item["title"]."</div>";
-                    $this->_output .= strip_tags($this->_item["description"], "<a>, <img>")."<br><br>\n";
-                    $this->_output .= "<input class=\"fase4_rdf_input\" type=\"text\" name=\"".$this->_item["name"]."\">&nbsp;\n";
-                    $this->_output .= "<input class=\"fase4_rdf_input\" type=\"submit\" value=\"go\">";
-                    $this->_output .= "</form>\n";
-                    $this->_output .= "</td></tr>\n";
-                    $this->_array_textinput = array(    "title"=>$this->_item["title"],
+                               if(isset($this->_display_opt["textinput"]) && ($this->_display_opt["textinput"] != "hidden") && $this->_item["name"] && $this->_item["link"]) {
+                                       $this->_output .= "<tr><td class=\"fase4_rdf\">\n";
+                                       $this->_output .= "<form action=\"".$this->_item["link"]."\" ";
+                                       if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; }
+                                       $this->_output .= "method=\"get\">\n";
+                                       $this->_output .= "<div class=\"fase4_rdf_title\">".$this->_item["title"]."</div>";
+                                       $this->_output .= strip_tags($this->_item["description"], "<a>, <img>")."<br><br>\n";
+                                       $this->_output .= "<input class=\"fase4_rdf_input\" type=\"text\" name=\"".$this->_item["name"]."\">&nbsp;\n";
+                                       $this->_output .= "<input class=\"fase4_rdf_input\" type=\"submit\" value=\"go\">";
+                                       $this->_output .= "</form>\n";
+                                       $this->_output .= "</td></tr>\n";
+                                       $this->_array_textinput = array(    "title"=>$this->_item["title"],
                                                         "name"=>$this->_item["name"],
                                                         "link"=>$this->_item["link"],
                                                         "description"=>$this->_item["description"]);
-                    $this->_clear_Items();
-                } elseif( isset($this->_display_opt["textinput"]) && ($this->_display_opt["textinput"] == "hidden") ) {
-                    $this->_clear_Items();
-                }
-
-                       break;
-        }
-    }
-
-    /**
-    * This Method returns the data from the <channel /> paragraph.
-    *
-    * @access    public
-       * @author    Stefan Saasen <s@fase4.com>
-    * @return    array
-       * @see           _array_channel
-    */
-    function get_array_channel( )
-    {
-        return $this->_array_channel;
-    }
-
-    /**
-    * This Method returns the data from each <item /> paragraph.
-    *
-    * @access    public
-       * @author    Stefan Saasen <s@fase4.com>
-    * @return    array
-       * @see           _array_item
-    */
-    function get_array_item( )
-    {
-        return $this->_array_item;
-    }
-
-    /**
-    * This Method returns the data from <textinput />.
-    *
-    * @access    public
-       * @author    Stefan Saasen <s@fase4.com>
-    * @return    array
-       * @see           _array_textinput
-    */
-    function get_array_textinput( )
-    {
-        return $this->_array_textinput;
-    }
-
-       /**
-       * Getter for parser id from resource
-       *
-       * @access private
-       * @author       Roland Haeder <webmaster@mxchange.org>
-       * @return       int
-       */
+                                       $this->_clear_Items();
+                               } elseif( isset($this->_display_opt["textinput"]) && ($this->_display_opt["textinput"] == "hidden") ) {
+                                       $this->_clear_Items();
+                               }
+
+                               break;
+               }
+       }
+
+       /**
+        * This Method returns the data from the <channel /> paragraph.
+        *
+        * @access    public
+        * @author    Stefan Saasen <s@fase4.com>
+        * @return    array
+        * @see          _array_channel
+        */
+       function get_array_channel( )
+       {
+               return $this->_array_channel;
+       }
+
+       /**
+        * This Method returns the data from each <item /> paragraph.
+        *
+        * @access    public
+        * @author    Stefan Saasen <s@fase4.com>
+        * @return    array
+        * @see          _array_item
+        */
+       function get_array_item( )
+       {
+               return $this->_array_item;
+       }
+
+       /**
+        * This Method returns the data from <textinput />.
+        *
+        * @access    public
+        * @author    Stefan Saasen <s@fase4.com>
+        * @return    array
+        * @see          _array_textinput
+        */
+       function get_array_textinput( )
+       {
+               return $this->_array_textinput;
+       }
+
+       /**
+        * Getter for parser id from resource
+        *
+        * @access private
+        * @author      Roland Haeder <webmaster@mxchange.org>
+        * @return      int
+        */
        function get_parser_id ($parser) {
                // Default is zero
                $id = 0;
@@ -872,512 +872,512 @@ class fase4_rdf {
                return $id;
        }
 
-    /**
-    * This Method returns the data from <image />.
-    *
-    * @access    public
-       * @author    Stefan Saasen <s@fase4.com>
-    * @return    array
-       * @see           _array_image
-    */
-    function get_array_image( )
-    {
-        return $this->_array_image;
-    }
-
-    /**
-    * XML Parser Data Handler
-    *
-    * @access    private
-       * @author    Stefan Saasen <s@fase4.com>
-    * @param     mixed  $parser a reference to the XML parser calling the handler.
-    * @param     string $text contains the character data as a string.
-       * @see           _parse_mode, _item, _tags, _depth, _citem, _ctags, _cdepth
-    */
-    function _parseData($parser, $text)
-    {
-        // Deocing mode added by Roland Haeder <webmaster@mxchange.org>
-        switch ($this->_decoding_mode)
-        {
-        case "utf8_decode":
-            $text = utf8_decode($text);
-            break;
-
-        case "htmlentities":
-            $text = htmlentities($text);
-            break;
-        }
-
-        $clean = preg_replace("/\s/", "", $text);
-        if ($clean) {
-            $text = preg_replace("/^\s+/", "", $text)."\n";
-                if($this->_parse_mode == "all") {
-                        if ( isset($this->_item[$this->_tags[$this->_depth[$this->get_parser_id($parser)]]]) &&
-                            $this->_item[$this->_tags[$this->_depth[$this->get_parser_id($parser)]]] ) {
-                           $this->_item[$this->_tags[$this->_depth[$this->get_parser_id($parser)]]] .= $text;
-                        } else {
-                           $this->_item[$this->_tags[$this->_depth[$this->get_parser_id($parser)]]] = $text;
-                        }
-                } elseif (isset($this->_parse_mode) && $this->_parse_mode == "channel") {
-                        if ( isset($this->_citem[$this->_ctags[$this->_cdepth[$this->get_parser_id($parser)]]]) ) {
-                           $this->_citem[$this->_ctags[$this->_cdepth[$this->get_parser_id($parser)]]] .= $text;
-                        } else {
-                           $this->_citem[$this->_ctags[$this->_cdepth[$this->get_parser_id($parser)]]] = $text;
-                        }
-                }
-        }
-    }
-
-    /**
-    * This Method allows you to choose if specific Parameters are displayed or not. These are:
-    * image, channel, textinput, build and cache_update. If set to "hidden" those elements won't be displayed.
-    *
-    * @access    public
-       * @author    Stefan Saasen <s@fase4.com>
-    * @param     array  $options
-       * @see           _display_opt
-    */
-    function set_Options( $options = "" )
-    {
-        if(is_array( $options )) {
-            $this->_display_opt = $options;
-            return true;
-        } else {
-            unset($this->_display_opt);
-            return false;
-        }
-    }
-
-    /**
-    * This Method allows you to define the width of the table that holds the representation of the rdf/rss file.
-    *
-    * @access    public
-       * @author    Stefan Saasen <s@fase4.com>
-    * @param     int  $width  attribute width in tag <table>
-       * @see           _table_width
-    */
-    function set_table_width( $width = 400 )
-    {
-        $this->_table_width = $width;
-        return true;
-    }
-
-    /**
-    * This Method returns an assocative Array with available Options.
-    *
-    * The Keys are the Name of the Options to be set.
-    * The Values are  short Description of available Options.
-    *
-    * @access    public
-       * @author    Stefan Saasen <s@fase4.com>
-    * @return    array  $options
-       * @see           _display_opt
-    */
-    function get_Options()
-    {
-        $options = array(   "image"=>"If 'image' is set to \"hidden\" no image provided by the RDF Publisher will be displayed.",
+       /**
+        * This Method returns the data from <image />.
+        *
+        * @access    public
+        * @author    Stefan Saasen <s@fase4.com>
+        * @return    array
+        * @see          _array_image
+        */
+       function get_array_image( )
+       {
+               return $this->_array_image;
+       }
+
+       /**
+        * XML Parser Data Handler
+        *
+        * @access    private
+        * @author    Stefan Saasen <s@fase4.com>
+        * @param     mixed  $parser a reference to the XML parser calling the handler.
+        * @param     string $text contains the character data as a string.
+        * @see          _parse_mode, _item, _tags, _depth, _citem, _ctags, _cdepth
+        */
+       function _parseData($parser, $text)
+       {
+               // Deocing mode added by Roland Haeder <webmaster@mxchange.org>
+               switch ($this->_decoding_mode)
+               {
+                       case "utf8_decode":
+                               $text = utf8_decode($text);
+                               break;
+
+                       case "htmlentities":
+                               $text = htmlentities($text);
+                               break;
+               }
+
+               $clean = preg_replace("/\s/", "", $text);
+               if ($clean) {
+                       $text = preg_replace("/^\s+/", "", $text)."\n";
+                       if($this->_parse_mode == "all") {
+                               if ( isset($this->_item[$this->_tags[$this->_depth[$this->get_parser_id($parser)]]]) &&
+                               $this->_item[$this->_tags[$this->_depth[$this->get_parser_id($parser)]]] ) {
+                                       $this->_item[$this->_tags[$this->_depth[$this->get_parser_id($parser)]]] .= $text;
+                               } else {
+                                       $this->_item[$this->_tags[$this->_depth[$this->get_parser_id($parser)]]] = $text;
+                               }
+                       } elseif (isset($this->_parse_mode) && $this->_parse_mode == "channel") {
+                               if ( isset($this->_citem[$this->_ctags[$this->_cdepth[$this->get_parser_id($parser)]]]) ) {
+                                       $this->_citem[$this->_ctags[$this->_cdepth[$this->get_parser_id($parser)]]] .= $text;
+                               } else {
+                                       $this->_citem[$this->_ctags[$this->_cdepth[$this->get_parser_id($parser)]]] = $text;
+                               }
+                       }
+               }
+       }
+
+       /**
+        * This Method allows you to choose if specific Parameters are displayed or not. These are:
+        * image, channel, textinput, build and cache_update. If set to "hidden" those elements won't be displayed.
+        *
+        * @access    public
+        * @author    Stefan Saasen <s@fase4.com>
+        * @param     array  $options
+        * @see          _display_opt
+        */
+       function set_Options( $options = "" )
+       {
+               if(is_array( $options )) {
+                       $this->_display_opt = $options;
+                       return true;
+               } else {
+                       unset($this->_display_opt);
+                       return false;
+               }
+       }
+
+       /**
+        * This Method allows you to define the width of the table that holds the representation of the rdf/rss file.
+        *
+        * @access    public
+        * @author    Stefan Saasen <s@fase4.com>
+        * @param     int  $width  attribute width in tag <table>
+        * @see          _table_width
+        */
+       function set_table_width( $width = 400 )
+       {
+               $this->_table_width = $width;
+               return true;
+       }
+
+       /**
+        * This Method returns an assocative Array with available Options.
+        *
+        * The Keys are the Name of the Options to be set.
+        * The Values are  short Description of available Options.
+        *
+        * @access    public
+        * @author    Stefan Saasen <s@fase4.com>
+        * @return    array  $options
+        * @see          _display_opt
+        */
+       function get_Options()
+       {
+               $options = array(   "image"=>"If 'image' is set to \"hidden\" no image provided by the RDF Publisher will be displayed.",
                             "channel"=>"If 'channel' is set to \"hidden\" the Channel Meta Data (i.e the Title and the short description regarding the RDF Publisher will not be displayed",
                             "textinput"=>"If set to \"hidden\" no Input Form will be displayed",
                             "build"=>"If set to \"hidden\" the Build Date (if provided) of the RDF File will not be displayed",
                             "cache_update"=>"If set to \"hidden\" the Update Date/Time of the cached Rdf File will not be displayed");
-        return $options;
-    }
-
-    /**
-    * This Method returns the Content of the RDF File in one string. The String actually holds the whole XML Document.
-    *
-    * @access    public
-       * @author    Stefan Saasen <s@fase4.com>
-    * @param     string $rdf    RDF File (Location)
-    * @return    string XML Presentation of parsed RDF File
-       * @see           _cached_file, _remote_file, _cache_dir, _refresh, _update_cache()
-    */
-    function cache()
-    {
-        // checks if the cache directory already exists
-        // if not, the cache directory will be created
-        if(!$this->_cache_dir_ok) {
-            $this->_create_cache_dir();
-        }
-        if($this->_use_dynamic_display == true) {
-            $this->_cached_file = md5("dynamic".$this->salt.$this->_remote_file);
-            $this->_cache_type = "normal";
-        } else {
-            $this->_cached_file = md5($this->salt.$this->_remote_file);
-            $this->_cache_type = "fast";
-        }
-
-        $_cache_f = $this->_cache_dir.$this->_cached_file;
-
-        if ( (!file_exists($_cache_f)) || (filemtime($_cache_f) < $this->_refresh) || (filesize($_cache_f) == 0)) {
-        // We have to parse the remote file
-        $this->_use_cached_file = false;
-            // --> we want to provide proper Information for Use in
-            // get_cache_update_time()
-            clearstatcache();
-            if($this->_use_dynamic_display == true) {
-                $_rdf = @implode(" ", $this->_rdf_data()); // -> proxy
-                if(!$_rdf) {
-                    $this->_throw_exception( $this->_remote_file." is not available" );
-                }
-                $this->_parse_xRDF( $_rdf );
-                $this->_update_cache( $_rdf );
-                $data = $this->_output;
-            } else {
-                $_rdf = @implode(" ", $this->_rdf_data()); // -> proxy
-                if(!$_rdf) {
-                    $this->_throw_exception( $this->_remote_file." is not available" );
-                }
-                $this->_parse_xRDF( $_rdf );
-                $this->_update_cache( $this->_output );
-                $data = $this->_output;
-            }
-        } else {
-        // we can use the cached file
-        $this->_use_cached_file = true;
-            if($this->_use_dynamic_display == true) {
-                $this->_parse_xRDF( implode(" ", file($_cache_f)) );
-                $data = $this->_output;
-            } else {
-                $data = @implode(" ", file($_cache_f));
-            }
-        }
-        return trim($data);
-    }   // END cache()
-
-    /**
-    * This Methods creates the Cache Directory if the specified Directory does not exist.
-    *
-    * @access    private
-       * @author    Stefan Saasen <s@fase4.com>
-    * @param     string $dir Path to Directory.
-       * @return        boolean
-       * @see           _cache_dir, _cache_dir_ok
-    */
-    function _create_cache_dir()
-    {
-        $path = "";
-        if(!@is_dir($this->_cache_dir)) {
-            $arr = explode("/", $this->_cache_dir);
-            $c = count($arr);
-            if($arr[0]=="") {
-                $path = "/";
-            }
-            for($i = 0;$i<$c;$i++)
-            {
-                if($arr[$i]!="") {
-                    $path .= $arr[$i]."/";
-                    if(!@is_dir($path)) {
-                       if(!@mkdir($path, 0777)) {
-                            $this->_throw_exception("failed to create directory:<b>".$this->_cache_dir."</b>.<br /><br />Exception on Line: ".__LINE__);
-                        return false;
-                        }
-                    }
-                }
-            }
-            $this->_cache_dir_ok = true;
-            return true;
-        } else {
-            $this->_cache_dir_ok = true;
-            return true;
-        }
-    }   // END _create_cache_dir()
-
-    /**
-    * This Method updates the cached RDF Files and synchronises them with their remote Counterparts.
-    *
-    * @access    private
-       * @author    Stefan Saasen <s@fase4.com>
-    * @param     string $rdf    RDF File (Location)
-       * @see           _cache_dir, _cached_file, _throw_exception()
-    */
-    function _update_cache( $content = "" )
-    {
-             $_local = @fopen( $this->_cache_dir.$this->_cached_file, 'w' );
-             if(!$_local) {
-                $this->_throw_exception( "Cannot open ".$this->_cached_file."<br /><br />Exception at Line: ".__LINE__ );
-                return false;
-             }
-             if (fwrite( $_local, $content) === false) {
-                       $this->_throw_exception( "Cannot write to ".$this->_cached_file."<br /<br />Exeception at Line: ".__LINE__);
-                       return false;
-                  }
-             fclose( $_local );
-                  @chmod( $this->_cache_dir.$this->_cached_file, 0666);
-             return true;
-    }   // END _update_cache()
-
-    /**
-    * This Method returns the Date/Time of last Cache Update of the actually parsed RDF File.
-       *
-    * @access    public
-       * @author    Stefan Saasen <s@fase4.com>
-       * @return        string Date/Time of last Update
-       * @see           _cache_dir, _cached_file
-    */
-    function get_cache_update_time()
-    {
-            return (file_exists($this->_cache_dir.$this->_cached_file))?date("d.m.Y H:i:s", filemtime($this->_cache_dir.$this->_cached_file)):"Cachemiss";
-    }   // END get_cache_update_time()
-
-    /**
-    * This Method returns the Type of Cache that was used ('normal' or 'fast')
-    *
-    * @access    public
-       * @author    Stefan Saasen <s@fase4.com>
-    * @param     string $rdf    RDF File (Location)
-    * @return    string Displays RDF Content ( using _display() )
-       * @see           _remote_file, cache()
-    */
-    function get_CacheType()
-    {
-        return $this->_cache_type;
-    }
-
-    /**
-    * Returns true if cached file was used, otherwise false
-    *
-    * @access    public
-       * @author    Stefan Saasen <s@fase4.com>
-    * @return    array  $options
-       * @see           _use_cached_file
-    */
-    function is_cachedFile()
-    {
-        return $this->_use_cached_file;
-    }
-
-    /**
-    * This Method deletes all the cached Files.
-    *
-    * Please keep in mind to use this method just as a 'manual garbage collection'
-    * You should cache the rss/rdf files locally to avoid unnecessary traffic.
-    * (Both for your visitors and the Publisher)
-       *
-    * @access    public
-       * @author    Stefan Saasen <s@fase4.com>
-       * @see           _cache_dir
-    */
-    function clear_cache()
-    {
-        $dir = dir($this->_cache_dir);
-        while($file=$dir->read()) {
-            // Exclude directories
-            if (is_file($dir->path.$file) && substr($file, -6, 6) != ".cache" && substr($file, -4, 4) != ".log")  {
-                if(!@unlink($dir->path.$file)) {
-                    $this->_throw_exception("Unable to unlink ".$dir->path.$file."<br />\n<br />\nException at Line: ".__LINE__ );
-                    return false;
-                } // END - if
-            } // END - if
-        } // END - while
-        $dir->close();
-        return true;
-    }   // END clear_cache()
-
-    /**
-    * Cuts the String $string after $str_len and adds "... "
-    *
-    * @access   private
-    * @param    string  $string String to be shortened
-    * @param    int     $str_len length of the returned String (overall length including "... ")
-    * @return   string  Cut String
-    */
-    function _cut_string( $string, $str_len = "30" )
-    {
-        if(strlen(trim($string))>$str_len) {
-            $string = substr( trim($string) , 0, $str_len - 4);
-            $string .= " ...";
-        }
-        return $string;
-    }   // END _cut_string()
-
-    /**
-    * this Method implements simple Garbage Collection
-    *
-    * @access    private
-       * @author    Stefan Saasen <s@fase4.com>
-       * @see           _cache_dir, gc_probability, gc_maxlifetime
-    */
-    function _garbage_collection()
-    {
-        srand((double) microtime() * 1000000);
-        if (mt_rand(1, 100) <= $this->gc_probability) {
-            $dir = dir($this->_cache_dir);
-            while($file=$dir->read()) {
-                if (is_file($dir->path.$file) && substr($file, -6, 6) != ".cache" && substr($file, -4, 4) != ".log" && filemtime($dir->path.$file) <= time() - $this->_refresh )  {
-                    @unlink($dir->path.$file);
-                } // END - if
-        }
-        $dir->close();
-        }   // END if
-    }
-
-    /* ==== Proxy/Auth methods ==== */
-
-   /**
-    * this method sets a proxy server
-    *
-    * @access    public
-    * @param     string $phost Proxy Host
-    * @param     string $pport Prox Port
-    * @author    Marco Kraus <marco.kraus@siemens.com>
-    */
-    function set_proxy($phost, $pport)
-    {
-     $this->_use_proxy = true;
-
-     if ($phost != '')
-        $this->_phost = $phost;
-
-     if ($pport != '')
-        $this->_pport = $pport;
-    }
-
-    /**
-    * this method sets a proxy server authentification
-    *
-    * @access    public
-    * @param     string $pname Username
-    * @param     string $ppaswd Password
-    * @author    Marco Kraus <marco.kraus@siemens.com>
-    */
-    function set_proxy_auth( $pname, $ppasswd )
-    {
-     $this->_use_proxy_auth = true;
-
-     if ($pname != '')
-        $this->_pname = $pname;
-
-     if ($ppasswd != '')
-        $this->_ppasswd = $ppasswd;
-    }
-
-
-   /**
-    * gets _remote_file into an array
-    *
-    * needed, cause if you use a proxy, you have to open
-    * a raw-tcp-socket to get the data
-    *
-    * @access    private
-    * @author    Marco Kraus <Marco.Kraus@siemens.com>
-    * @return array
-    * @see _use_proxy, cache()
-    */
-    function _rdf_data()
-    {
-      if ( $this->_use_proxy == true )
-      {
-       // we need a raw socket here to connect to proxy
-       $fp = fsockopen($this->_phost,$this->_pport);
-
-       if (!$fp) {
-           $this->_throw_exception( $this->_remote_file." is not available with proxy" );
-       } else {
-        if ( $this->_use_proxy_auth == true ) {
-             fputs($fp, "GET ".$this->_remote_file." HTTP/1.0\r\nUser-Agent: Fase4 RDF-Reader/1.40 modified by Quix0r\r\n\r\n");
-           } else {
-             fputs($fp, "GET ".$this->_remote_file." HTTP/1.0\r\nUser-Agent: Fase4 RDF-Reader/1.40 modified by Quix0r\r\nProxy-Authorization: Basic ".base64_encode("$this->_pname:$this->_ppasswd") ."\r\n\r\n");
-           }
-        }
-
-
-       for ( $i = 0; !feof ($fp) ; $i++)
-       {
-          $usable_data[$i] = "";
-          $usable_data[$i] = fgets($fp,4096);
-
-        // PARSE HEADER ---- first line has to be <?xml, second rdf or rss, and third is blank
-
-        // strstr did not fit (ask Rasmus why), so we compare each character
-            if ( ($usable_data[$i][0] == "<" ) &&
-               ($usable_data[$i][1] == "?" ) &&
-               ($usable_data[$i][2] == "x" ) &&
-               ($usable_data[$i][3] == "m" ) &&
-               ($usable_data[$i][4] == "l" ) ) {
-                    $usable_data[0] = $usable_data[$i]; // save current field
-                      $i = 1; // just reset array to start
-              }
-
-        // there seems to be proxystuff after the <?xml....we delete this
-            if ( (
-               ($usable_data[$i][0] == "<" ) &&
-               ($usable_data[$i][1] == "r" ) &&
-               ($usable_data[$i][2] == "d" ) &&
-               ($usable_data[$i][3] == "f" ) &&
-               ($usable_data[$i][4] == ":" )
-               )
-               ||
-               (
-               ($usable_data[$i][0] == "<" ) &&
-               ($usable_data[$i][1] == "r" ) &&
-               ($usable_data[$i][2] == "s" ) &&
-               ($usable_data[$i][3] == "s" )
-               )
-            ) {
-
-                $usable_data[1] = $usable_data[$i]; // save current field
-                $usable_data[2] = "\n";
-                $i = 2; // just reset array to start
-          }
-       }
-
-       fclose($fp);
-       return $usable_data;
-     } else {
-               if (substr($this->_remote_file, 0, 7) != "http://") {
-                       $this->_throw_exception( "Cannot find http:// in ".$this->_remote_file."!" );
-                       return "";
+               return $options;
+       }
+
+       /**
+        * This Method returns the Content of the RDF File in one string. The String actually holds the whole XML Document.
+        *
+        * @access    public
+        * @author    Stefan Saasen <s@fase4.com>
+        * @param     string $rdf    RDF File (Location)
+        * @return    string XML Presentation of parsed RDF File
+        * @see          _cached_file, _remote_file, _cache_dir, _refresh, _update_cache()
+        */
+       function cache()
+       {
+               // checks if the cache directory already exists
+               // if not, the cache directory will be created
+               if(!$this->_cache_dir_ok) {
+                       $this->_create_cache_dir();
+               }
+               if($this->_use_dynamic_display == true) {
+                       $this->_cached_file = md5("dynamic".$this->salt.$this->_remote_file);
+                       $this->_cache_type = "normal";
+               } else {
+                       $this->_cached_file = md5($this->salt.$this->_remote_file);
+                       $this->_cache_type = "fast";
+               }
+
+               $_cache_f = $this->_cache_dir.$this->_cached_file;
+
+               if ( (!file_exists($_cache_f)) || (filemtime($_cache_f) < $this->_refresh) || (filesize($_cache_f) == 0)) {
+                       // We have to parse the remote file
+                       $this->_use_cached_file = false;
+                       // --> we want to provide proper Information for Use in
+                       // get_cache_update_time()
+                       clearstatcache();
+                       if($this->_use_dynamic_display == true) {
+                               $_rdf = @implode(" ", $this->_rdf_data()); // -> proxy
+                               if(!$_rdf) {
+                                       $this->_throw_exception( $this->_remote_file." is not available" );
+                               }
+                               $this->_parse_xRDF( $_rdf );
+                               $this->_update_cache( $_rdf );
+                               $data = $this->_output;
+                       } else {
+                               $_rdf = @implode(" ", $this->_rdf_data()); // -> proxy
+                               if(!$_rdf) {
+                                       $this->_throw_exception( $this->_remote_file." is not available" );
+                               }
+                               $this->_parse_xRDF( $_rdf );
+                               $this->_update_cache( $this->_output );
+                               $data = $this->_output;
+                       }
                } else {
-                       // Extract host information
-                       $host = substr($this->_remote_file, 7);
-                       // Extract the GET part
-                       $get = "/";
-                       if (strpos($host, "/") > 0) {
-                               $get = substr($host, strpos($host, "/"));
-                               $host = substr($host, 0, strpos($host, "/"));
+                       // we can use the cached file
+                       $this->_use_cached_file = true;
+                       if($this->_use_dynamic_display == true) {
+                               $this->_parse_xRDF( implode(" ", file($_cache_f)) );
+                               $data = $this->_output;
+                       } else {
+                               $data = @implode(" ", file($_cache_f));
+                       }
+               }
+               return trim($data);
+       }   // END cache()
+
+       /**
+        * This Methods creates the Cache Directory if the specified Directory does not exist.
+        *
+        * @access    private
+        * @author    Stefan Saasen <s@fase4.com>
+        * @param     string $dir Path to Directory.
+        * @return       boolean
+        * @see          _cache_dir, _cache_dir_ok
+        */
+       function _create_cache_dir()
+       {
+               $path = "";
+               if(!@is_dir($this->_cache_dir)) {
+                       $arr = explode("/", $this->_cache_dir);
+                       $c = count($arr);
+                       if($arr[0]=="") {
+                               $path = "/";
                        }
-                       // Extract port
-                       $port = "80";
-                       if (strpos($host, ":") > 0) {
-                               $port = substr($host, (strpos($host, ":") + 1));
-                               $host = substr($host, 0, (strpos($host, ":") - 1));
+                       for($i = 0;$i<$c;$i++)
+                       {
+                               if($arr[$i]!="") {
+                                       $path .= $arr[$i]."/";
+                                       if(!@is_dir($path)) {
+                                               if(!@mkdir($path, 0777)) {
+                                                       $this->_throw_exception("failed to create directory:<b>".$this->_cache_dir."</b>.<br /><br />Exception on Line: ".__LINE__);
+                                                       return false;
+                                               }
+                                       }
+                               }
                        }
+                       $this->_cache_dir_ok = true;
+                       return true;
+               } else {
+                       $this->_cache_dir_ok = true;
+                       return true;
+               }
+       }   // END _create_cache_dir()
 
-                       // Start connection to server
-                       $fp = fsockopen($host, $port);
-                       if (!$fp) {
-                   $this->_throw_exception( $this->_remote_file." is maybe not available." );
-                         return "";
+       /**
+        * This Method updates the cached RDF Files and synchronises them with their remote Counterparts.
+        *
+        * @access    private
+        * @author    Stefan Saasen <s@fase4.com>
+        * @param     string $rdf    RDF File (Location)
+        * @see          _cache_dir, _cached_file, _throw_exception()
+        */
+       function _update_cache( $content = "" )
+       {
+               $_local = @fopen( $this->_cache_dir.$this->_cached_file, 'w' );
+               if(!$_local) {
+                       $this->_throw_exception( "Cannot open ".$this->_cached_file."<br /><br />Exception at Line: ".__LINE__ );
+                       return false;
+               }
+               if (fwrite( $_local, $content) === false) {
+                       $this->_throw_exception( "Cannot write to ".$this->_cached_file."<br /<br />Exeception at Line: ".__LINE__);
+                       return false;
+               }
+               fclose( $_local );
+               @chmod( $this->_cache_dir.$this->_cached_file, 0666);
+               return true;
+       }   // END _update_cache()
+
+       /**
+        * This Method returns the Date/Time of last Cache Update of the actually parsed RDF File.
+        *
+        * @access    public
+        * @author    Stefan Saasen <s@fase4.com>
+        * @return       string Date/Time of last Update
+        * @see          _cache_dir, _cached_file
+        */
+       function get_cache_update_time()
+       {
+               return (file_exists($this->_cache_dir.$this->_cached_file))?date("d.m.Y H:i:s", filemtime($this->_cache_dir.$this->_cached_file)):"Cachemiss";
+       }   // END get_cache_update_time()
+
+       /**
+        * This Method returns the Type of Cache that was used ('normal' or 'fast')
+        *
+        * @access    public
+        * @author    Stefan Saasen <s@fase4.com>
+        * @param     string $rdf    RDF File (Location)
+        * @return    string Displays RDF Content ( using _display() )
+        * @see          _remote_file, cache()
+        */
+       function get_CacheType()
+       {
+               return $this->_cache_type;
+       }
+
+       /**
+        * Returns true if cached file was used, otherwise false
+        *
+        * @access    public
+        * @author    Stefan Saasen <s@fase4.com>
+        * @return    array  $options
+        * @see          _use_cached_file
+        */
+       function is_cachedFile()
+       {
+               return $this->_use_cached_file;
+       }
+
+       /**
+        * This Method deletes all the cached Files.
+        *
+        * Please keep in mind to use this method just as a 'manual garbage collection'
+        * You should cache the rss/rdf files locally to avoid unnecessary traffic.
+        * (Both for your visitors and the Publisher)
+        *
+        * @access    public
+        * @author    Stefan Saasen <s@fase4.com>
+        * @see          _cache_dir
+        */
+       function clear_cache()
+       {
+               $dir = dir($this->_cache_dir);
+               while($file=$dir->read()) {
+                       // Exclude directories
+                       if (is_file($dir->path.$file) && substr($file, -6, 6) != ".cache" && substr($file, -4, 4) != ".log")  {
+                               if(!@unlink($dir->path.$file)) {
+                                       $this->_throw_exception("Unable to unlink ".$dir->path.$file."<br />\n<br />\nException at Line: ".__LINE__ );
+                                       return false;
+                               } // END - if
+                       } // END - if
+               } // END - while
+               $dir->close();
+               return true;
+       }   // END clear_cache()
+
+       /**
+        * Cuts the String $string after $str_len and adds "... "
+        *
+        * @access   private
+        * @param    string  $string String to be shortened
+        * @param    int     $str_len length of the returned String (overall length including "... ")
+        * @return   string  Cut String
+        */
+       function _cut_string( $string, $str_len = "30" )
+       {
+               if(strlen(trim($string))>$str_len) {
+                       $string = substr( trim($string) , 0, $str_len - 4);
+                       $string .= " ...";
+               }
+               return $string;
+       }   // END _cut_string()
+
+       /**
+        * this Method implements simple Garbage Collection
+        *
+        * @access    private
+        * @author    Stefan Saasen <s@fase4.com>
+        * @see          _cache_dir, gc_probability, gc_maxlifetime
+        */
+       function _garbage_collection()
+       {
+               srand((double) microtime() * 1000000);
+               if (mt_rand(1, 100) <= $this->gc_probability) {
+                       $dir = dir($this->_cache_dir);
+                       while($file=$dir->read()) {
+                               if (is_file($dir->path.$file) && substr($file, -6, 6) != ".cache" && substr($file, -4, 4) != ".log" && filemtime($dir->path.$file) <= time() - $this->_refresh )  {
+                                       @unlink($dir->path.$file);
+                               } // END - if
                        }
-                       // Repare request line
-                       $request = sprintf("GET %s HTTP/1.0\r\nHost: %s\r\nUser-Agent: Fase4 RDF-Reader/1.40 modified by Quix0r\r\n\r\n", $get, $host);
-                       // Send request out
-                       fputs($fp, $request);
-                       $reply = ""; $isContent = false; $dummy = "";
-                       // Read reply
-                       $i=0;
-                       while ( !feof($fp) ) {
-                               $read = trim(fgets($fp, 4096));
-                               if (substr($read, 0, 5) == "<?xml" || $isContent) {
-                                       // Add content
-                                       $reply[] = $read;
-                                       $isContent = true;
+                       $dir->close();
+               }   // END if
+       }
+
+       /* ==== Proxy/Auth methods ==== */
+
+       /**
+        * this method sets a proxy server
+        *
+        * @access    public
+        * @param     string $phost Proxy Host
+        * @param     string $pport Prox Port
+        * @author    Marco Kraus <marco.kraus@siemens.com>
+        */
+       function set_proxy($phost, $pport)
+       {
+               $this->_use_proxy = true;
+
+               if ($phost != '')
+               $this->_phost = $phost;
+
+               if ($pport != '')
+               $this->_pport = $pport;
+       }
+
+       /**
+        * this method sets a proxy server authentification
+        *
+        * @access    public
+        * @param     string $pname Username
+        * @param     string $ppaswd Password
+        * @author    Marco Kraus <marco.kraus@siemens.com>
+        */
+       function set_proxy_auth( $pname, $ppasswd )
+       {
+               $this->_use_proxy_auth = true;
+
+               if ($pname != '')
+               $this->_pname = $pname;
+
+               if ($ppasswd != '')
+               $this->_ppasswd = $ppasswd;
+       }
+
+
+       /**
+        * gets _remote_file into an array
+        *
+        * needed, cause if you use a proxy, you have to open
+        * a raw-tcp-socket to get the data
+        *
+        * @access    private
+        * @author    Marco Kraus <Marco.Kraus@siemens.com>
+        * @return array
+        * @see _use_proxy, cache()
+        */
+       function _rdf_data()
+       {
+               if ( $this->_use_proxy == true )
+               {
+                       // we need a raw socket here to connect to proxy
+                       $fp = fsockopen($this->_phost,$this->_pport);
+
+                       if (!$fp) {
+                               $this->_throw_exception( $this->_remote_file." is not available with proxy" );
+                       } else {
+                               if ( $this->_use_proxy_auth == true ) {
+                                       fputs($fp, "GET ".$this->_remote_file." HTTP/1.0\r\nUser-Agent: Fase4 RDF-Reader/1.40 modified by Quix0r\r\n\r\n");
                                } else {
-                                       // Put in dummy
-                                       $dummy[] = $read;
+                                       fputs($fp, "GET ".$this->_remote_file." HTTP/1.0\r\nUser-Agent: Fase4 RDF-Reader/1.40 modified by Quix0r\r\nProxy-Authorization: Basic ".base64_encode("$this->_pname:$this->_ppasswd") ."\r\n\r\n");
                                }
-                               $i++;
                        }
-                       if ((count($dummy) > 0) && (count($reply) == 0) && (!$isContent)) {
-                               // Transfer content from dummy
-                               $reply = $content;
+
+
+                       for ( $i = 0; !feof ($fp) ; $i++)
+                       {
+                               $usable_data[$i] = "";
+                               $usable_data[$i] = fgets($fp,4096);
+
+                               // PARSE HEADER ---- first line has to be <?xml, second rdf or rss, and third is blank
+
+                               // strstr did not fit (ask Rasmus why), so we compare each character
+                               if ( ($usable_data[$i][0] == "<" ) &&
+                               ($usable_data[$i][1] == "?" ) &&
+                               ($usable_data[$i][2] == "x" ) &&
+                               ($usable_data[$i][3] == "m" ) &&
+                               ($usable_data[$i][4] == "l" ) ) {
+                                       $usable_data[0] = $usable_data[$i]; // save current field
+                                       $i = 1; // just reset array to start
+                               }
+
+                               // there seems to be proxystuff after the <?xml....we delete this
+                               if ( (
+                               ($usable_data[$i][0] == "<" ) &&
+                               ($usable_data[$i][1] == "r" ) &&
+                               ($usable_data[$i][2] == "d" ) &&
+                               ($usable_data[$i][3] == "f" ) &&
+                               ($usable_data[$i][4] == ":" )
+                               )
+                               ||
+                               (
+                               ($usable_data[$i][0] == "<" ) &&
+                               ($usable_data[$i][1] == "r" ) &&
+                               ($usable_data[$i][2] == "s" ) &&
+                               ($usable_data[$i][3] == "s" )
+                               )
+                               ) {
+
+                                       $usable_data[1] = $usable_data[$i]; // save current field
+                                       $usable_data[2] = "\n";
+                                       $i = 2; // just reset array to start
+                               }
                        }
+
                        fclose($fp);
-                       //die(htmlentities($reply));
-                       return $reply;
+                       return $usable_data;
+               } else {
+                       if (substr($this->_remote_file, 0, 7) != "http://") {
+                               $this->_throw_exception( "Cannot find http:// in ".$this->_remote_file."!" );
+                               return "";
+                       } else {
+                               // Extract host information
+                               $host = substr($this->_remote_file, 7);
+                               // Extract the GET part
+                               $get = "/";
+                               if (strpos($host, "/") > 0) {
+                                       $get = substr($host, strpos($host, "/"));
+                                       $host = substr($host, 0, strpos($host, "/"));
+                               }
+                               // Extract port
+                               $port = "80";
+                               if (strpos($host, ":") > 0) {
+                                       $port = substr($host, (strpos($host, ":") + 1));
+                                       $host = substr($host, 0, (strpos($host, ":") - 1));
+                               }
+
+                               // Start connection to server
+                               $fp = fsockopen($host, $port);
+                               if (!$fp) {
+                                       $this->_throw_exception( $this->_remote_file." is maybe not available." );
+                         return "";
+                               }
+                               // Repare request line
+                               $request = sprintf("GET %s HTTP/1.0\r\nHost: %s\r\nUser-Agent: Fase4 RDF-Reader/1.40 modified by Quix0r\r\n\r\n", $get, $host);
+                               // Send request out
+                               fputs($fp, $request);
+                               $reply = ""; $isContent = false; $dummy = "";
+                               // Read reply
+                               $i=0;
+                               while ( !feof($fp) ) {
+                                       $read = trim(fgets($fp, 4096));
+                                       if (substr($read, 0, 5) == "<?xml" || $isContent) {
+                                               // Add content
+                                               $reply[] = $read;
+                                               $isContent = true;
+                                       } else {
+                                               // Put in dummy
+                                               $dummy[] = $read;
+                                       }
+                                       $i++;
+                               }
+                               if ((count($dummy) > 0) && (count($reply) == 0) && (!$isContent)) {
+                                       // Transfer content from dummy
+                                       $reply = $content;
+                               }
+                               fclose($fp);
+                               //die(htmlentities($reply));
+                               return $reply;
+                       }
                }
-     }
-   }    // END _rdf_data()
+       }    // END _rdf_data()
 }   // END class
 ?>
index 1533ba8943fbae4616022f9f95f138b461c75590..b1b4384da106ab9d16c08426b196be767b3287a9 100644 (file)
@@ -40,7 +40,7 @@
 if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
        require($INC);
-} elseif (!EXT_IS_ACTIVE("")) {
+} elseif (!EXT_IS_ACTIVE('')) {
        return;
 }
 
index a147ff1f848f4fdfbf7ca144d899ac8df81a17cb..58460c22c9e70e553e7019b2113a5cd45bddf1d7 100644 (file)
@@ -50,7 +50,7 @@ if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled()) || (getConfig('beg
 
 // Reset accounts
 $result = SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET beg_points=0.00000 WHERE beg_points > 0",
- __FILE__, __LINE__);
+__FILE__, __LINE__);
 
 //
 ?>
index f181838fd4da1495f2d5f69fe4bf2aec6faf9e0b..449a2c1f094f163213b0cfe23be812cddd9ed5cc 100644 (file)
@@ -53,7 +53,7 @@ BONUS_PURGE_EXPIRED_TURBO_BONUS();
 
 // Reset accounts
 $result = SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET turbo_bonus=0, login_bonus=0, bonus_order=0, bonus_stats=0, bonus_ref=0",
- __FILE__, __LINE__);
+__FILE__, __LINE__);
 
 //
 ?>
index 844c5182daae7e13b519d043ffef9b9d19535277..9eabcfd2dfdc02a9ec40040de8efda9893db0426 100644 (file)
@@ -70,7 +70,7 @@ if (SQL_NUMROWS($result_daily) > 0) {
                //* DEBUG: */ echo basename(__FILE__).":uid={$content['userid']}<br />\n";
                $result_points = SQL_QUERY_ESC("SELECT ref_depth, locked_points FROM `{!_MYSQL_PREFIX!}_user_points`
 WHERE userid=%s AND locked_points != 0.00000 ORDER BY ref_depth",
-                       array(bigintval($content['userid'])), __FILE__, __LINE__);
+               array(bigintval($content['userid'])), __FILE__, __LINE__);
 
                //* DEBUG: */ echo basename(__FILE__).":payout=0;points|numRows=".SQL_NUMROWS($result_points)."<br />\n";
                if (SQL_NUMROWS($result_points) > 0) {
@@ -83,7 +83,7 @@ WHERE userid=%s AND locked_points != 0.00000 ORDER BY ref_depth",
                                ADD_SQL(SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_points` SET points=points+%s, locked_points=0.00000
 WHERE userid=%s AND ref_depth=%d
 LIMIT 1",
-                                       array($content['locked_points'], bigintval($content['userid']), $content['ref_depth']), __FILE__, __LINE__, false));
+                               array($content['locked_points'], bigintval($content['userid']), $content['ref_depth']), __FILE__, __LINE__, false));
 
                                // Update mediadata as well
                                if (GET_EXT_VERSION('mediadata') >= '0.0.4') {
index d8e3660b10c9dc5c287a54426e9d63aaf63861f9..c68de78391ea255a2ff13b5ba0befe0aede69141 100644 (file)
@@ -53,7 +53,7 @@ $result_main = SQL_QUERY("SELECT userid, holiday_activated
 FROM `{!_MYSQL_PREFIX!}_user_data`
 WHERE holiday_activated > 0 AND holiday_activated < UNIX_TIMESTAMP() AND `holiday_active`='N'
 ORDER BY holiday_activated",
-       __FILE__, __LINE__);
+__FILE__, __LINE__);
 
 // Entries found?
 if (SQL_NUMROWS($result_main) > 0) {
@@ -67,7 +67,7 @@ if (SQL_NUMROWS($result_main) > 0) {
 FROM `{!_MYSQL_PREFIX!}_user_holidays`
 WHERE userid=%s AND holiday_start <= UNIX_TIMESTAMP() AND holiday_end > UNIX_TIMESTAMP()
 LIMIT 1",
-                       array(bigintval($content['userid'])), __FILE__, __LINE__);
+               array(bigintval($content['userid'])), __FILE__, __LINE__);
                if (SQL_NUMROWS($result_holiday) == 1) {
                        // Okay, this user can be send away to holiday...
                        $content = merge_array($content, SQL_FETCHARRAY($result_holiday));
@@ -88,7 +88,7 @@ LIMIT 1",
 SET `holiday_active`='Y'
 WHERE userid=%s
 LIMIT 1",
-                               array(bigintval($content['userid'])), __FILE__, __LINE__, false));
+                       array(bigintval($content['userid'])), __FILE__, __LINE__, false));
                } // END - if
 
                // Free memory
index b13a2ff7bd33a061a720af6ae1eca0f74174d083..ae18934d68ea6a0aa00a03f89888d94f3ea77231 100644 (file)
@@ -56,10 +56,10 @@ if (SQL_NUMROWS($result_bonus) > 0) {
        while ($content = SQL_FETCHARRAY($result_bonus)) {
                // Add points
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET bonus_stats=bonus_stats+%s WHERE userid=%s LIMIT 1",
-                       array(getConfig('bonus_stats'), bigintval($content['userid'])), __FILE__, __LINE__);
+               array(getConfig('bonus_stats'), bigintval($content['userid'])), __FILE__, __LINE__);
 
                // Translate some data
-               $content['timestamp'] generateDateTime($content['timestamp_ordered'], '2');
+               $content['timestamp'] generateDateTime($content['timestamp_ordered'], '2');
 
                // Load email template and send email
                $msg = LOAD_EMAIL_TEMPLATE("member_stats_bonus", $content, bigintval($content['userid']));
@@ -67,7 +67,7 @@ if (SQL_NUMROWS($result_bonus) > 0) {
 
                // Update database
                $result_update = SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_stats` SET bonus_stats_active='Y' WHERE `id`=%s LIMIT 1",
-                       array(bigintval($content['id'])), __FILE__, __LINE__);
+               array(bigintval($content['id'])), __FILE__, __LINE__);
        } // END - while
 
        // Handle bonus points
index a0fe9645dad44b0401c56203b6afec840f5fe223..708d5075674d339a7b61bcab76b6b050cf801620 100644 (file)
@@ -40,7 +40,7 @@
 if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
        require($INC);
-} elseif (!EXT_IS_ACTIVE("")) {
+} elseif (!EXT_IS_ACTIVE('')) {
        return;
 }
 
index b3c3c1359075475571a31c68efae5c3145b8cdb1..bed3c34916a04f6bd33c80a21738e181de978602 100644 (file)
@@ -278,7 +278,28 @@ function isInstalling () {
 
 // Check wether this script is installed
 function isInstalled () {
-       return ((getConfig('MXCHANGE_INSTALLED') == 'Y') || (isIncludeReadable('inc/cache/config-local.php')));
+       return (
+       (
+       // New config file found and loaded
+       getConfig('MXCHANGE_INSTALLED') == 'Y'
+       ) || (
+       // Fall-back!
+       isIncludeReadable('inc/config.php')
+       ) || (
+       (
+       // New config file found, but not yet read
+       isIncludeReadable('inc/cache/config-local.php')
+       ) && (
+       (
+       // Only new config file is found
+       !isIncludeReadable('inc/config.php')
+       ) || (
+       // Is installation mode
+       isInstalling()
+       )
+       )
+       )
+       );
 }
 
 // Check wether an admin is registered
@@ -358,7 +379,7 @@ function sendHeader ($header) {
 // @TODO Do some more sanity check here
 function changeMode ($FQFN, $mode) {
        // Is the file/directory there?
-       if ((!isFile($FQFN)) && (!isDirectory($FQFN))) {
+       if ((!isFileReadable($FQFN)) && (!isDirectory($FQFN))) {
                // Neither, so abort here
                debug_report_bug('Cannot chmod() on ' . basename($FQFN) . '.');
        } // END - if
@@ -367,6 +388,19 @@ function changeMode ($FQFN, $mode) {
        chmod($FQFN, $mode);
 }
 
+// Wrapper for unlink()
+function removeFile ($FQFN) {
+       // Is the file there?
+       if (isFileReadable($FQFN)) {
+               // Yes, so remove it
+               return unlink($FQFN);
+       } // END - if
+
+       // All fine if no file was removed. If we change this to 'false' or rewrite
+       // above if() block it would be to restrictive.
+       return true;
+}
+
 // Wrapper for $_POST['sel']
 function countPostSelection () {
        return countSelection(REQUEST_POST('sel'));
diff --git a/js.php b/js.php
index 6ec94157d83b4d8d7d1ee2b584b1e8a0670e31c9..b666aac864617cfc44d52b9ccfb0d5a8ad205200 100644 (file)
--- a/js.php
+++ b/js.php
@@ -66,14 +66,14 @@ if ((isInstalled()) && (REQUEST_ISSET_GET('tag'))) {
 
        // Prepare include file for looking
        $INC = sprintf("inc/js/tag-%s.php",
-               REQUEST_GET('tag')
+       REQUEST_GET('tag')
        );
 
        // Is that file readable?
        if (isIncludeReadable($INC)) {
                // Include it
                loadIncludeOnce($INC);
-       } // END - if 
+       } // END - if
 
        // Load footer
        loadIncludeOnce('inc/footer.php');
index e21f4f6070ebf6cc7b200ef7e78dba70134f5d5d..d3d804eb39cd71b6d1229ff11c1f519cd1c924a3 100644 (file)
@@ -62,36 +62,36 @@ if (isInstalled()) {
        $content = array(
                'lead_uid'   => -1,
                'lead_email' => 'INVALID@EMAIL'
-       );
+               );
 
-       // Is the cookie set?
-       if (isSessionVariableSet('lead_uid')) {
-               // Is the user-account unlocked and valid?
-               $result = SQL_QUERY_ESC("SELECT email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
+               // Is the cookie set?
+               if (isSessionVariableSet('lead_uid')) {
+                       // Is the user-account unlocked and valid?
+                       $result = SQL_QUERY_ESC("SELECT email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
                        array(bigintval(getSession('lead_uid'))), __FILE__, __LINE__);
-               if (SQL_NUMROWS($result) == 1) {
-                       // Secure the ID number
-                       $content['lead_uid'] = bigintval(getSession('lead_uid'));
+                       if (SQL_NUMROWS($result) == 1) {
+                               // Secure the ID number
+                               $content['lead_uid'] = bigintval(getSession('lead_uid'));
 
-                       // Load the email address
-                       list($email) = SQL_FETCHROW($result);
+                               // Load the email address
+                               list($email) = SQL_FETCHROW($result);
 
-                       // Compile email
-                       $content['lead_email'] = COMPILE_CODE($email);
+                               // Compile email
+                               $content['lead_email'] = COMPILE_CODE($email);
+                       } else {
+                               // Not found!
+                               $content['lead_uid'] = 0;
+                       }
                } else {
-                       // Not found!
-                       $content['lead_uid'] = 0;
+                       // Maybe spider?
+                       $content['lead_email'] = constant('WEBMASTER');
                }
-       } else {
-               // Maybe spider?
-               $content['lead_email'] = constant('WEBMASTER');
-       }
 
-       // Load the lead template
-       LOAD_TEMPLATE('lead_code', false, $content);
+               // Load the lead template
+               LOAD_TEMPLATE('lead_code', false, $content);
 
-       // Footer
-       loadIncludeOnce('inc/footer.php');
+               // Footer
+               loadIncludeOnce('inc/footer.php');
 } else {
        // You have to install first!
        redirectToUrl('install.php');
index b08e29be383a28fbf8ecaa9270a371c5168be1cf..eeea089cf86659620bc32e113a2fd5f48bda274d 100644 (file)
@@ -68,12 +68,12 @@ if (isInstalled()) {
                if ($url_mid > 0) {
                        // Normal-Mails
                        $result = SQL_QUERY_ESC("SELECT link_type FROM `{!_MYSQL_PREFIX!}_user_links` WHERE stats_id=%s AND `userid`=%s LIMIT 1",
-                               array($url_mid, $url_uid), __FILE__, __LINE__);
+                       array($url_mid, $url_uid), __FILE__, __LINE__);
                        $type = 'mailid'; $urlId = $url_mid;
                } elseif ($url_bid > 0) {
                        // Bonus-Mail
                        $result = SQL_QUERY_ESC("SELECT link_type FROM `{!_MYSQL_PREFIX!}_user_links` WHERE bonus_id=%s AND `userid`=%s LIMIT 1",
-                               array($url_bid, $url_uid), __FILE__, __LINE__);
+                       array($url_bid, $url_uid), __FILE__, __LINE__);
                        $type = 'bonusid'; $urlId = $url_bid;
                } else {
                        // Problem: No ID entered
@@ -89,20 +89,20 @@ if (isInstalled()) {
 
                        switch ($ltype)
                        {
-                       case 'NORMAL':
-                               // Is the stats ID valid?
-                               $result = SQL_QUERY_ESC("SELECT pool_id, url, subject FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE `id`=%s LIMIT 1",
+                               case 'NORMAL':
+                                       // Is the stats ID valid?
+                                       $result = SQL_QUERY_ESC("SELECT pool_id, url, subject FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE `id`=%s LIMIT 1",
                                        array($url_mid), __FILE__, __LINE__);
-                               break;
+                                       break;
 
-                       case 'BONUS':
-                               // Is the bonus extension active?
-                               redirectOnUninstalledExtension('bonus');
+                               case 'BONUS':
+                                       // Is the bonus extension active?
+                                       redirectOnUninstalledExtension('bonus');
 
-                               // Bonus-Mails
-                               $result = SQL_QUERY_ESC("SELECT id, url, subject FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
+                                       // Bonus-Mails
+                                       $result = SQL_QUERY_ESC("SELECT id, url, subject FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
                                        array($url_bid), __FILE__, __LINE__);
-                               break;
+                                       break;
                        }
 
                        if (SQL_NUMROWS($result) == 1) {
@@ -120,7 +120,7 @@ if (isInstalled()) {
 
                                // Is the user's ID unlocked?
                                $result = SQL_QUERY_ESC("SELECT status, gender, surname, family FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                                       array($url_uid), __FILE__, __LINE__);
+                               array($url_uid), __FILE__, __LINE__);
                                if (SQL_NUMROWS($result) == 1) {
                                        list($status, $gender, $sname, $fname) = SQL_FETCHROW($result);
                                        SQL_FREERESULT($result);
@@ -128,32 +128,32 @@ if (isInstalled()) {
                                                // User has confirmed his account so we can procede...
                                                switch ($ltype)
                                                {
-                                               case 'NORMAL':
-                                                       $result = SQL_QUERY_ESC("SELECT payment_id FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE pool_id=%s LIMIT 1",
+                                                       case 'NORMAL':
+                                                               $result = SQL_QUERY_ESC("SELECT payment_id FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE pool_id=%s LIMIT 1",
                                                                array(bigintval($pool)), __FILE__, __LINE__);
-                                                       if (SQL_NUMROWS($result) == 1) {
-                                                               list($pay) = SQL_FETCHROW($result);
-                                                               $time      = getPaymentPoints($pay, 'time');
-                                                               $payment   = getPaymentPoints($pay, 'payment');
-                                                               $isValid   = true;
-                                                       }
-
-                                                       // Free memory
-                                                       SQL_FREERESULT($result);
-                                                       break;
-
-                                               case 'BONUS':
-                                                       $result = SQL_QUERY_ESC("SELECT points, time FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
+                                                               if (SQL_NUMROWS($result) == 1) {
+                                                                       list($pay) = SQL_FETCHROW($result);
+                                                                       $time      = getPaymentPoints($pay, 'time');
+                                                                       $payment   = getPaymentPoints($pay, 'payment');
+                                                                       $isValid   = true;
+                                                               }
+
+                                                               // Free memory
+                                                               SQL_FREERESULT($result);
+                                                               break;
+
+                                                       case 'BONUS':
+                                                               $result = SQL_QUERY_ESC("SELECT points, time FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
                                                                array($url_bid), __FILE__, __LINE__);
-                                                       if (SQL_NUMROWS($result) == 1) {
-                                                               list($points, $time) = SQL_FETCHROW($result);
-                                                               $payment = '0.00000';
-                                                               $isValid = true;
-                                                       }
-
-                                                       // Free memory
-                                                       SQL_FREERESULT($result);
-                                                       break;
+                                                               if (SQL_NUMROWS($result) == 1) {
+                                                                       list($points, $time) = SQL_FETCHROW($result);
+                                                                       $payment = '0.00000';
+                                                                       $isValid = true;
+                                                               }
+
+                                                               // Free memory
+                                                               SQL_FREERESULT($result);
+                                                               break;
                                                }
 
                                                // Add header
index c292aaf2ddb35ef49f149ac91e0dc97e54e9a02a..5273f72e9ca9e5c5f98e2c8c125401ef0842b6ee 100644 (file)
@@ -70,11 +70,11 @@ if (isInstalled()) {
                // Maybe he wants to confirm an email?
                if ($url_mid > 0) {
                        $result = SQL_QUERY_ESC("SELECT id, link_type FROM `{!_MYSQL_PREFIX!}_user_links` WHERE stats_id=%s AND `userid`=%s LIMIT 1",
-                        array($url_mid, $url_uid), __FILE__, __LINE__);
+                       array($url_mid, $url_uid), __FILE__, __LINE__);
                        $type = 'mailid'; $urlId = $url_mid;
                } elseif ($url_bid > 0) {
                        $result = SQL_QUERY_ESC("SELECT id, link_type FROM `{!_MYSQL_PREFIX!}_user_links` WHERE bonus_id=%s AND `userid`=%s LIMIT 1",
-                        array($url_bid, $url_uid), __FILE__, __LINE__);
+                       array($url_bid, $url_uid), __FILE__, __LINE__);
                        $type = 'bonusid'; $urlId = $url_bid;
                }
 
@@ -84,15 +84,15 @@ if (isInstalled()) {
                        SQL_FREERESULT($result);
                        switch ($ltype)
                        {
-                       case 'NORMAL':
-                               $result_mailid = SQL_QUERY_ESC("SELECT pool_id, userid, id FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE `id`=%s LIMIT 1",
+                               case 'NORMAL':
+                                       $result_mailid = SQL_QUERY_ESC("SELECT pool_id, userid, id FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE `id`=%s LIMIT 1",
                                        array($url_mid), __FILE__, __LINE__);
-                               break;
+                                       break;
 
-                       case 'BONUS':
-                               $result_mailid = SQL_QUERY_ESC("SELECT id, id, is_notify FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
+                               case 'BONUS':
+                                       $result_mailid = SQL_QUERY_ESC("SELECT id, id, is_notify FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
                                        array($url_bid), __FILE__, __LINE__);
-                               break;
+                                       break;
                        }
 
                        // Entry found?
@@ -111,7 +111,7 @@ if (isInstalled()) {
 
                                // Is the user's ID unlocked?
                                $result = SQL_QUERY_ESC("SELECT status, gender, surname, family, ref_payout FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                                       array($url_uid), __FILE__, __LINE__);
+                               array($url_uid), __FILE__, __LINE__);
                                if (SQL_NUMROWS($result) == 1) {
                                        // Load data
                                        list($status, $gender, $sname, $fname, $ref_pay) = SQL_FETCHROW($result);
@@ -122,40 +122,40 @@ if (isInstalled()) {
                                        if ($status == 'CONFIRMED') {
                                                // Update last activity
                                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET last_online=UNIX_TIMESTAMP(), `last_module`='mailid_top' WHERE userid=%s LIMIT 1",
-                                                       array($url_uid), __FILE__, __LINE__);
+                                               array($url_uid), __FILE__, __LINE__);
 
                                                // User has confirmed his account so we can procede...
                                                switch ($ltype)
                                                {
-                                               case 'NORMAL':
-                                                       $result = SQL_QUERY_ESC("SELECT payment_id FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE pool_id=%s LIMIT 1",
+                                                       case 'NORMAL':
+                                                               $result = SQL_QUERY_ESC("SELECT payment_id FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE pool_id=%s LIMIT 1",
                                                                array(bigintval($pool)), __FILE__, __LINE__);
 
-                                                       // Entry found?
-                                                       if (SQL_NUMROWS($result) == 1) {
-                                                               list($pay) = SQL_FETCHROW($result);
-                                                               $time      = getPaymentPoints($pay, 'time');
-                                                               $payment   = getPaymentPoints($pay, 'payment');
-                                                               $isValid   = true;
-                                                       } // END - if
+                                                               // Entry found?
+                                                               if (SQL_NUMROWS($result) == 1) {
+                                                                       list($pay) = SQL_FETCHROW($result);
+                                                                       $time      = getPaymentPoints($pay, 'time');
+                                                                       $payment   = getPaymentPoints($pay, 'payment');
+                                                                       $isValid   = true;
+                                                               } // END - if
 
-                                                       // Free memory...
-                                                       SQL_FREERESULT($result);
-                                                       break;
+                                                               // Free memory...
+                                                               SQL_FREERESULT($result);
+                                                               break;
 
-                                               case 'BONUS':
-                                                       $result = SQL_QUERY_ESC("SELECT time, points FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
+                                                       case 'BONUS':
+                                                               $result = SQL_QUERY_ESC("SELECT time, points FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
                                                                array(bigintval($pool)), __FILE__, __LINE__);
 
-                                                       // Entry found?
-                                                       if (SQL_NUMROWS($result) == 1) {
-                                                               list($time, $payment) = SQL_FETCHROW($result);
-                                                               $isValid = true;
-                                                       }
+                                                               // Entry found?
+                                                               if (SQL_NUMROWS($result) == 1) {
+                                                                       list($time, $payment) = SQL_FETCHROW($result);
+                                                                       $isValid = true;
+                                                               }
 
-                                                       // Free memory...
-                                                       SQL_FREERESULT($result);
-                                                       break;
+                                                               // Free memory...
+                                                               SQL_FREERESULT($result);
+                                                               break;
                                                }
 
                                                // Is this entry valid?
@@ -168,163 +168,163 @@ if (isInstalled()) {
                                                                } // END - if
 
                                                                switch ($mode) {
-                                                               case 'add':
-                                                                       // Init stats data
-                                                                       $stats_data = 0;
-
-                                                                       // Count clicks
-                                                                       switch ($ltype)
-                                                                       {
-                                                                       case 'NORMAL':
-                                                                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_stats` SET clicks=clicks + 1 WHERE `id`=%s LIMIT 1",
-                                                                                       array($url_mid), __FILE__, __LINE__);
-
-                                                                               // Update mediadata as well
-                                                                               if (GET_EXT_VERSION('mediadata') >= '0.0.4') {
-                                                                                       // Update database
-                                                                                       MEDIA_UPDATE_ENTRY(array('total_clicks', 'normal_clicks'), 'add', 1);
+                                                                       case 'add':
+                                                                               // Init stats data
+                                                                               $stats_data = 0;
+
+                                                                               // Count clicks
+                                                                               switch ($ltype)
+                                                                               {
+                                                                                       case 'NORMAL':
+                                                                                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_stats` SET clicks=clicks + 1 WHERE `id`=%s LIMIT 1",
+                                                                                               array($url_mid), __FILE__, __LINE__);
+
+                                                                                               // Update mediadata as well
+                                                                                               if (GET_EXT_VERSION('mediadata') >= '0.0.4') {
+                                                                                                       // Update database
+                                                                                                       MEDIA_UPDATE_ENTRY(array('total_clicks', 'normal_clicks'), 'add', 1);
+                                                                                               }
+                                                                                               $stats_data = $url_mid;
+                                                                                               break;
+
+                                                                                       case 'BONUS':
+                                                                                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET clicks=clicks + 1 WHERE `id`=%s LIMIT 1",
+                                                                                               array($url_bid), __FILE__, __LINE__);
+
+                                                                                               // Update mediadata as well
+                                                                                               if (GET_EXT_VERSION('mediadata') >= '0.0.4') {
+                                                                                                       // Update database
+                                                                                                       MEDIA_UPDATE_ENTRY(array('total_clicks', 'bonus_clicks'), 'add', 1);
+                                                                                               }
+                                                                                               $stats_data = $url_bid;
+                                                                                               break;
                                                                                }
-                                                                               $stats_data = $url_mid;
-                                                                               break;
-
-                                                                       case 'BONUS':
-                                                                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET clicks=clicks + 1 WHERE `id`=%s LIMIT 1",
-                                                                                       array($url_bid), __FILE__, __LINE__);
-
-                                                                               // Update mediadata as well
-                                                                               if (GET_EXT_VERSION('mediadata') >= '0.0.4') {
-                                                                                       // Update database
-                                                                                       MEDIA_UPDATE_ENTRY(array('total_clicks', 'bonus_clicks'), 'add', 1);
-                                                                               }
-                                                                               $stats_data = $url_bid;
-                                                                               break;
-                                                                       }
 
-                                                                       // Export data into constants for the template
-                                                                       define('_POINTS_VALUE'   , translateComma($payment));
-                                                                       define('_TEMPLATE_BANNER', LOAD_TEMPLATE('mailid_banner', true));
+                                                                               // Export data into constants for the template
+                                                                               define('_POINTS_VALUE'   , translateComma($payment));
+                                                                               define('_TEMPLATE_BANNER', LOAD_TEMPLATE('mailid_banner', true));
 
-                                                                       // Only when user extension = v0.1.2: Update mails-confirmed counter
-                                                                       // @TODO Rewrite these blocks to filter
-                                                                       if (GET_EXT_VERSION('user') >= '0.1.2') {
-                                                                               // Update counter
-                                                                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET mails_confirmed=mails_confirmed + 1 WHERE userid=%s LIMIT 1",
+                                                                               // Only when user extension = v0.1.2: Update mails-confirmed counter
+                                                                               // @TODO Rewrite these blocks to filter
+                                                                               if (GET_EXT_VERSION('user') >= '0.1.2') {
+                                                                                       // Update counter
+                                                                                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET mails_confirmed=mails_confirmed + 1 WHERE userid=%s LIMIT 1",
                                                                                        array($url_uid), __FILE__, __LINE__);
 
-                                                                               // Update random confirmed as well?
-                                                                               if (GET_EXT_VERSION('user') >= '0.3.4') {
-                                                                                       // Update second counter
-                                                                                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET rand_confirmed=rand_confirmed + 1 WHERE userid=%s LIMIT 1",
+                                                                                       // Update random confirmed as well?
+                                                                                       if (GET_EXT_VERSION('user') >= '0.3.4') {
+                                                                                               // Update second counter
+                                                                                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET rand_confirmed=rand_confirmed + 1 WHERE userid=%s LIMIT 1",
                                                                                                array($url_uid), __FILE__, __LINE__);
+                                                                                       } // END - if
                                                                                } // END - if
-                                                                       } // END - if
-
-                                                                       // Insert stats record
-                                                                       insertUserStatsRecord($url_uid, $type, $stats_data);
-
-                                                                       // Right code entered?
-                                                                       if (bigintval(REQUEST_POST('gfx_check')) == $img_code) {
-                                                                               // Add points over referal system is the default
-                                                                               $locked = false;
-                                                                               $template = 'mailid_points_done';
-
-                                                                               // Right code entered add points and remove entry
-                                                                               if (($ref_pay > 0) && (getConfig('allow_direct_pay') != 'Y')) {
-                                                                                       // Don't add points over the referal system
-                                                                                       $locked = true;
-                                                                                       $template = 'mailid_points_locked';
-                                                                               } // END - if
 
-                                                                               // Count down ref_payout value
-                                                                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET ref_payout=ref_payout-1 WHERE userid=%s AND ref_payout > 0 LIMIT 1",
+                                                                               // Insert stats record
+                                                                               insertUserStatsRecord($url_uid, $type, $stats_data);
+
+                                                                               // Right code entered?
+                                                                               if (bigintval(REQUEST_POST('gfx_check')) == $img_code) {
+                                                                                       // Add points over referal system is the default
+                                                                                       $locked = false;
+                                                                                       $template = 'mailid_points_done';
+
+                                                                                       // Right code entered add points and remove entry
+                                                                                       if (($ref_pay > 0) && (getConfig('allow_direct_pay') != 'Y')) {
+                                                                                               // Don't add points over the referal system
+                                                                                               $locked = true;
+                                                                                               $template = 'mailid_points_locked';
+                                                                                       } // END - if
+
+                                                                                       // Count down ref_payout value
+                                                                                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET ref_payout=ref_payout-1 WHERE userid=%s AND ref_payout > 0 LIMIT 1",
                                                                                        array($url_uid), __FILE__, __LINE__);
 
-                                                                               // Add points
-                                                                               unset($GLOBALS['ref_level']);
-                                                                               ADD_POINTS_REFSYSTEM('mailid_okay', $url_uid, $payment, false, '0', $locked);
-
-                                                                               // Shall I add bonus points for "turbo clickers" ?
-                                                                               if (GET_EXT_VERSION('bonus') >= '0.2.2') {
-                                                                                       // Is an active-rallye running and this is not a notification mail?
-                                                                                       if ((getConfig('bonus_active') == 'Y') && ($notify == 'N')) {
-                                                                                               // Shall I exclude the webmaster's own userid from the active-rallye?
-                                                                                               if ((((getConfig('bonus_uid') == $url_uid) && (getConfig('bonus_include_own') == 'Y')) || (getConfig('bonus_uid') != $url_uid)) && (getConfig('def_refid') != $url_uid)) {
-                                                                                                       // Add points and remember ranking are done in this function....
-                                                                                                       BONUS_ADD_TURBO_POINTS($urlId, $url_uid, $type);
-
-                                                                                                       // Set template to mailid_points_done2 which contains a link to the ranking list
-                                                                                                       $template = 'mailid_points_done2';
-                                                                                                       if ($locked) $template = 'mailid_points_locked2';
-                                                                                                       define('_UID_VALUE' , $url_uid);
-                                                                                                       define('_TYPE_VALUE', $type);
-                                                                                                       define('_DATA_VALUE', translateComma($urlId));
+                                                                                       // Add points
+                                                                                       unset($GLOBALS['ref_level']);
+                                                                                       ADD_POINTS_REFSYSTEM('mailid_okay', $url_uid, $payment, false, '0', $locked);
+
+                                                                                       // Shall I add bonus points for "turbo clickers" ?
+                                                                                       if (GET_EXT_VERSION('bonus') >= '0.2.2') {
+                                                                                               // Is an active-rallye running and this is not a notification mail?
+                                                                                               if ((getConfig('bonus_active') == 'Y') && ($notify == 'N')) {
+                                                                                                       // Shall I exclude the webmaster's own userid from the active-rallye?
+                                                                                                       if ((((getConfig('bonus_uid') == $url_uid) && (getConfig('bonus_include_own') == 'Y')) || (getConfig('bonus_uid') != $url_uid)) && (getConfig('def_refid') != $url_uid)) {
+                                                                                                               // Add points and remember ranking are done in this function....
+                                                                                                               BONUS_ADD_TURBO_POINTS($urlId, $url_uid, $type);
+
+                                                                                                               // Set template to mailid_points_done2 which contains a link to the ranking list
+                                                                                                               $template = 'mailid_points_done2';
+                                                                                                               if ($locked) $template = 'mailid_points_locked2';
+                                                                                                               define('_UID_VALUE' , $url_uid);
+                                                                                                               define('_TYPE_VALUE', $type);
+                                                                                                               define('_DATA_VALUE', translateComma($urlId));
+                                                                                                       } // END - if
                                                                                                } // END - if
                                                                                        } // END - if
-                                                                               } // END - if
 
-                                                                               // Load total points
-                                                                               define('__TOTAL_POINTS', translateComma(
+                                                                                       // Load total points
+                                                                                       define('__TOTAL_POINTS', translateComma(
                                                                                        GET_TOTAL_DATA($url_uid, 'user_points', 'points') -
                                                                                        GET_TOTAL_DATA($url_uid, 'user_data', 'used_points'))
-                                                                               );
+                                                                                       );
 
-                                                                               // Load template
-                                                                               LOAD_TEMPLATE($template);
-                                                                       } else {
-                                                                               // Wrong image code! So add points to sender's account
-                                                                               unset($GLOBALS['ref_level']);
-                                                                               ADD_POINTS_REFSYSTEM_DIRECT('mailid_payback', $sender, $payment);
+                                                                                       // Load template
+                                                                                       LOAD_TEMPLATE($template);
+                                                                               } else {
+                                                                                       // Wrong image code! So add points to sender's account
+                                                                                       unset($GLOBALS['ref_level']);
+                                                                                       ADD_POINTS_REFSYSTEM_DIRECT('mailid_payback', $sender, $payment);
 
-                                                                               // Load template
-                                                                               LOAD_TEMPLATE('mailid_points_failed');
-                                                                       }
+                                                                                       // Load template
+                                                                                       LOAD_TEMPLATE('mailid_points_failed');
+                                                                               }
 
-                                                                       // Remove link from table
-                                                                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_links` WHERE `id`=%s LIMIT 1",
+                                                                               // Remove link from table
+                                                                               SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_links` WHERE `id`=%s LIMIT 1",
                                                                                array(bigintval($lid)), __FILE__, __LINE__);
-                                                                       break;
-
-                                                               case 'img':
-                                                                       GENERATE_IMAGE($img_code);
-                                                                       break;
+                                                                               break;
 
-                                                               case 'confirm':
-                                                                       if ($code > 0) {
-                                                                               // Export data into constants for the template
-                                                                               define('_CODE_VALUE', $code);
-                                                                               define('_UID_VALUE' , $url_uid );
-                                                                               define('_TYPE_VALUE', $type);
-                                                                               define('_DATA_VALUE', $urlId);
-                                                                               define('_TEMPLATE_BANNER', LOAD_TEMPLATE('mailid_banner', true));
-                                                                               if (getConfig('code_length') > 0) {
-                                                                                       // Generate Code
-                                                                                       define('_IMAGE_CODE', generateCaptchaCode($code, $type, $urlId, $url_uid));
-                                                                                       $templ = 'mailid_enter_code';
-                                                                               } else {
-                                                                                       // Disabled code
-                                                                                       define('__GFX_CODE', $img_code);
-                                                                                       $templ = 'mailid_confirm_buttom';
-                                                                               }
+                                                                                       case 'img':
+                                                                                               GENERATE_IMAGE($img_code);
+                                                                                               break;
 
-                                                                               // Load template
-                                                                               LOAD_TEMPLATE($templ);
-                                                                       }
-                                                                       break;
-
-                                                               case '':
-                                                                       // Ok, all data is valid and loaded. Finally let's output the timer... :-)
-                                                                       // Export data into constants for the template
-                                                                       define('_TIME_VALUE', $time);
-                                                                       define('_TIM2_VALUE', strlen($time));
-                                                                       define('_UID_VALUE' , $url_uid );
-                                                                       define('_TYPE_VALUE', $type);
-                                                                       define('_DATA_VALUE', $urlId);
-                                                                       define('_RAND_VALUE', mt_rand(0, 99999));
-                                                                       define('_TEMPLATE_BANNER', LOAD_TEMPLATE('mailid_banner', true));
-
-                                                                       // Load template
-                                                                       LOAD_TEMPLATE('mailid_timer');
-                                                                       break;
+                                                                                       case 'confirm':
+                                                                                               if ($code > 0) {
+                                                                                                       // Export data into constants for the template
+                                                                                                       define('_CODE_VALUE', $code);
+                                                                                                       define('_UID_VALUE' , $url_uid );
+                                                                                                       define('_TYPE_VALUE', $type);
+                                                                                                       define('_DATA_VALUE', $urlId);
+                                                                                                       define('_TEMPLATE_BANNER', LOAD_TEMPLATE('mailid_banner', true));
+                                                                                                       if (getConfig('code_length') > 0) {
+                                                                                                               // Generate Code
+                                                                                                               define('_IMAGE_CODE', generateCaptchaCode($code, $type, $urlId, $url_uid));
+                                                                                                               $templ = 'mailid_enter_code';
+                                                                                                       } else {
+                                                                                                               // Disabled code
+                                                                                                               define('__GFX_CODE', $img_code);
+                                                                                                               $templ = 'mailid_confirm_buttom';
+                                                                                                       }
+
+                                                                                                       // Load template
+                                                                                                       LOAD_TEMPLATE($templ);
+                                                                                               }
+                                                                                               break;
+
+                                                                                       case '':
+                                                                                               // Ok, all data is valid and loaded. Finally let's output the timer... :-)
+                                                                                               // Export data into constants for the template
+                                                                                               define('_TIME_VALUE', $time);
+                                                                                               define('_TIM2_VALUE', strlen($time));
+                                                                                               define('_UID_VALUE' , $url_uid );
+                                                                                               define('_TYPE_VALUE', $type);
+                                                                                               define('_DATA_VALUE', $urlId);
+                                                                                               define('_RAND_VALUE', mt_rand(0, 99999));
+                                                                                               define('_TEMPLATE_BANNER', LOAD_TEMPLATE('mailid_banner', true));
+
+                                                                                               // Load template
+                                                                                               LOAD_TEMPLATE('mailid_timer');
+                                                                                               break;
                                                                } // END - switch
                                                        } else {
                                                                LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (6)</div>");
index 8b2c771373866a359b42bbbd39fd0fc8ac626fda..71a861f0cd1b0be15ef48d4a2cfc81bd0f39ef7d 100644 (file)
@@ -59,7 +59,7 @@ if (!REQUEST_ISSET_GET('module')) REQUEST_SET_GET('module', 'index');
 if (IS_MEMBER()) {
        // Is still logged in so we welcome him with his name
        $result = SQL_QUERY_ESC("SELECT surname, family FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-               array(getUserId()), __FILE__, __LINE__);
+       array(getUserId()), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Load surname and family's name and build the username
                list($s, $f) = SQL_FETCHROW($result);
@@ -107,39 +107,39 @@ if ((getConfig('maintenance') == 'Y') && (!IS_ADMIN()) && ($GLOBALS['module'] !=
        $check = checkModulePermissions($GLOBALS['module']);
        switch ($check)
        {
-       case 'admin_only':
-       case 'mem_only':
-       case 'done':
-               // Does the module exists on local file system?
-               if ((isFileReadable(constant('__MODULE'))) && (getTotalFatalErrors() == 0)) {
-                       // Module is valid, active and located on the local disc...
-                       $MOD_VALID = true;
-               } elseif (!empty($URL)) {
-                       // An URL was specified so we load the de-referrer module
-                       redirectToUrl(DEREFERER($URL));
-               } elseif (getTotalFatalErrors() == 0) {
+               case 'admin_only':
+               case 'mem_only':
+               case 'done':
+                       // Does the module exists on local file system?
+                       if ((isFileReadable(constant('__MODULE'))) && (getTotalFatalErrors() == 0)) {
+                               // Module is valid, active and located on the local disc...
+                               $MOD_VALID = true;
+                       } elseif (!empty($URL)) {
+                               // An URL was specified so we load the de-referrer module
+                               redirectToUrl(DEREFERER($URL));
+                       } elseif (getTotalFatalErrors() == 0) {
+                               addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_404'), $GLOBALS['module']));
+                       }
+                       break;
+
+               case '404':
                        addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_404'), $GLOBALS['module']));
-               }
-               break;
-
-       case '404':
-               addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_404'), $GLOBALS['module']));
-               break;
-
-       case 'locked':
-               if (!isFileReadable(constant('__MODULE'))) {
-                       // Module does addionally not exists
-                       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_404'), $GLOBALS['module']));
-               } // END - if
-
-               // Add fatal message
-               addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_LOCKED'), $GLOBALS['module']));
-               break;
-
-       default:
-               DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown status %s return from module check. Module=%s", $check, $GLOBALS['module']));
-               addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_UNKNOWN'), $check));
-               break;
+                       break;
+
+               case 'locked':
+                       if (!isFileReadable(constant('__MODULE'))) {
+                               // Module does addionally not exists
+                               addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_404'), $GLOBALS['module']));
+                       } // END - if
+
+                       // Add fatal message
+                       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_LOCKED'), $GLOBALS['module']));
+                       break;
+
+               default:
+                       DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown status %s return from module check. Module=%s", $check, $GLOBALS['module']));
+                       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_UNKNOWN'), $check));
+                       break;
        }
 } elseif (getTotalFatalErrors() == 0) {
        // MySQL problems!
diff --git a/ref.php b/ref.php
index 55e8ef358572ea0789e365c1852683d22153b563..6e639520a2dd2137663d1c5042a1ffb4554ccbfd 100644 (file)
--- a/ref.php
+++ b/ref.php
@@ -55,18 +55,18 @@ if (isInstalled()) {
        // Base URL for redirection
        switch (getConfig('refid_target'))
        {
-       case 'register':
-               $URL = 'modules.php?module=index&amp;what=register&amp;refid=';
-               break;
+               case 'register':
+                       $URL = 'modules.php?module=index&amp;what=register&amp;refid=';
+                       break;
 
-       case 'index':
-               $URL = 'index.php?refid=';
-               break;
+               case 'index':
+                       $URL = 'index.php?refid=';
+                       break;
        }
 
        // Get referal ID from ref or refid variable
        if (REQUEST_ISSET_GET(('ref')))        $ref = REQUEST_GET('ref');
-        elseif (REQUEST_ISSET_GET(('refid'))) $ref = REQUEST_GET('refid');
+       elseif (REQUEST_ISSET_GET(('refid'))) $ref = REQUEST_GET('refid');
 
        if (!empty($ref)) {
                // Test if nickname or numeric id
@@ -74,7 +74,7 @@ if (isInstalled()) {
                        if (EXT_IS_ACTIVE('nickname')) {
                                // Nickname in URL, so load the ID
                                $result = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE nickname='%s' LIMIT 1",
-                                       array($ref), __FILE__, __LINE__);
+                               array($ref), __FILE__, __LINE__);
 
                                // Load userid
                                list($ref) = SQL_FETCHROW($result);
@@ -100,7 +100,7 @@ if (isInstalled()) {
                if ($ref > 0) {
                        // Update ref counter
                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET ref_clicks=ref_clicks+1 WHERE userid=%s LIMIT 1",
-                               array(bigintval($ref)), __FILE__, __LINE__);
+                       array(bigintval($ref)), __FILE__, __LINE__);
                } // END - if
        } else {
                // No refid and we add our refid (don't forget to set $def_refid!)
index 6f2e4bffb65b77f40c473b58344c00ae9542368b..0b418e67b0b3284a8af843be31d6eb8a314d0c0a 100644 (file)
@@ -85,7 +85,7 @@ RIGHT JOIN `{!_MYSQL_PREFIX!}_bonus_turbo` AS b
 ON d.userid=b.userid
 WHERE d.`status`='CONFIRMED' AND d.userid=%s AND b.%s=%s
 LIMIT 1",
-                               array(bigintval(REQUEST_GET('uid')), $t, bigintval(REQUEST_GET('d'))), __FILE__, __LINE__);
+                       array(bigintval(REQUEST_GET('uid')), $t, bigintval(REQUEST_GET('d'))), __FILE__, __LINE__);
 
                        // Entry found?
                        if (SQL_NUMROWS($result) == 1) {
index b1cdd9b4791fa51ac8f8d0b8dcbad3671e46cf62..6550c315912e23b979a43c7384b7a7d68832747c 100644 (file)
@@ -59,7 +59,7 @@ if (isInstalled()) {
        // Get referal ID from ref or refid variable
        $ref = 0;
        if (REQUEST_ISSET_GET(('ref')))        $ref = bigintval(REQUEST_GET('ref'));
-        elseif (REQUEST_ISSET_GET(('refid'))) $ref = bigintval(REQUEST_GET('refid'));
+       elseif (REQUEST_ISSET_GET(('refid'))) $ref = bigintval(REQUEST_GET('refid'));
 
        if (!empty($ref)) {
                // We have an refid here. So we simply add it
index f6f0ca1d4bd06e8510023dde7df589e71b9b2ca5..7a328c8f202d4ccf3ac92540cce4ae11fbb2b759 100644 (file)
@@ -118,10 +118,10 @@ if (isInstalled()) {
                                'restart'   => getConfig('surfbar_restart_time'),
                                'start'     => str_repeat('X', strlen(getConfig('surfbar_restart_time'))),
                                'autostart' => (getConfig('surfbar_autostart') == 'Y') ? 'true' : 'false'
-                       );
+                               );
 
-                       // Load template for stopped surfbar
-                       LOAD_TEMPLATE('surfbar_stopped', false, $content);
+                               // Load template for stopped surfbar
+                               LOAD_TEMPLATE('surfbar_stopped', false, $content);
                }
        } elseif ((REQUEST_ISSET_GET(('check'))) && (REQUEST_ISSET_GET('id')) && (REQUEST_ISSET_GET(('salt')))) {
                // Dummy next id get
index 55b8687a3fa16f7023d8f910a6ea98f39380d551..7a41f23f21d0b5438cf23389277b40d2ce906fd9 100644 (file)
@@ -1,9 +1,9 @@
-.active_row1, .active_row2, .active_row3 {
-       text-align    : center;
-       padding-left  : 5px;
-       padding-right : 5px;
+.active_row1,.active_row2,.active_row3 {
+       text-align: center;
+       padding-left: 5px;
+       padding-right: 5px;
 }
 
 .active_row2 {
-       text-align : left;
-}
+       text-align: left;
+}
\ No newline at end of file
index 807629b63bac53c6fc48e95ec84d3d94e6b65e11..5387e1bb98a43ad4c43a916d0493dcac5b778c90 100644 (file)
@@ -6,4 +6,4 @@
        background-color: #EEEEFF;
        padding-left: 10px;
        padding-right: 10px;
-}
+}
\ No newline at end of file
index 66f7b6f2587dbea1c54813b78373d000c6621bbb..9ad71cef338eee94a1d584d647ae679b6e1b70a5 100644 (file)
@@ -1,13 +1,13 @@
 .bonus_rank_1 {
-       font-weight : bold;
-       font-size   : 22px;
+       font-weight: bold;
+       font-size: 22px;
 }
 
 .bonus_rank_2 {
-       font-weight : bold;
-       font-size   : 18px;
+       font-weight: bold;
+       font-size: 18px;
 }
 
 .bonus_rank_3 {
-       font-weight : bold;
-}
+       font-weight: bold;
+}
\ No newline at end of file
index 8d81723a1a94a369eafe272a3121d132fa264bda..66b5f6ac9f4b7211fd7b0b995d459937610c4e88 100644 (file)
@@ -1,25 +1,27 @@
 .doubler_table {
+       
 }
 
 .doubler_main {
+       
 }
 
 .doubler_error {
-       font-weight     : bold;
-       color           : #AA0000;
+       font-weight: bold;
+       color: #AA0000;
 }
 
 .doubler_big_row {
-       height          : 70px;
+       height: 70px;
 }
 
 .doubler_header {
-     text-align          : center;
-     height              : 24px;
-     background-color    : #EEEEFF;
+       text-align: center;
+       height: 24px;
+       background-color: #EEEEFF;
 }
 
 .doubler_footer {
-     height              : 24px;
-     background-color    : #EEEEFF;
-}
+       height: 24px;
+       background-color: #EEEEFF;
+}
\ No newline at end of file
index cc7d3604dff235a45d6521ea58e33a96b8da45d7..f3a0c50dac9eec7ede7c31d04805090d116bd58e 100644 (file)
 body {
-       background-color        : #FFFFFF;
-       color                           : #000000;
-       font-family                     : Verdana, Arial, Geneva, Helvetica, sans-serif;
-       font-size                       : 12px;
-       letter-spacing      : 1px;
-
-       margin                          : 0px;
-       margin-left                     : 0px;
-       margin-right            : 0px;
-       margin-top                      : 0px;
-       margin-bottom           : 0px;
+       background-color: #FFFFFF;
+       color: #000000;
+       font-family: Verdana, Arial, Geneva, Helvetica, sans-serif;
+       font-size: 12px;
+       letter-spacing: 1px;
+       margin: 0px;
+       margin-left: 0px;
+       margin-right: 0px;
+       margin-top: 0px;
+       margin-bottom: 0px;
 }
 
 table {
-       table-layout            : auto;
-       border-spacing          : 0px;
-       overflow                        : auto;
+       table-layout: auto;
+       border-spacing: 0px;
+       overflow: auto;
 }
 
 A {
-       font-style                      : normal;
-       text-decoration         : none;
+       font-style: normal;
+       text-decoration: none;
 }
 
 A:link {
-       color                           : #000000;
+       color: #000000;
 }
 
 A:visited {
-       color                           : #000000;
+       color: #000000;
 }
 
 A:active {
-       color                           : #000088;
-       background-color        : transparent;
+       color: #000088;
+       background-color: transparent;
 }
 
 A:hover {
-       background-color        : transparent;
+       background-color: transparent;
 }
 
-input, textarea, select, option {
-       color                           : #000000;
-       background-color        : #FFFFFF;
-       border                          : 1px solid #000000;
-       text-decoration         : none;
+input,textarea,select,option {
+       color: #000000;
+       background-color: #FFFFFF;
+       border: 1px solid #000000;
+       text-decoration: none;
 }
 
-ul, ol {
-       margin-top                      : 0px;
-       margin-bottom           : 0px;
+ul,ol {
+       margin-top: 0px;
+       margin-bottom: 0px;
 }
 
-.admin_reset, .guest_reset, .member_reset {
-       border-style            : groove;
-       border                          : solid 1px #000000;
-       color                           : #000000;
-       cursor                          : pointer;
+.admin_reset,.guest_reset,.member_reset {
+       border-style: groove;
+       border: solid 1px #000000;
+       color: #000000;
+       cursor: pointer;
 }
 
-.admin_submit, .guest_submit, .member_submit {
-       color                           : #000000;
-       border-color            : #000000;
-       cursor                          : pointer;
+.admin_submit,.guest_submit,.member_submit {
+       color: #000000;
+       border-color: #000000;
+       cursor: pointer;
 }
 
 .admin_submit_reject {
-       border-style            : groove;
-       color                           : #000000;
-       border-color            : #000000;
-       cursor                          : pointer;
+       border-style: groove;
+       color: #000000;
+       border-color: #000000;
+       cursor: pointer;
 }
 
-.runtime_fatal, .runtime_fatalcontent {
-       color                           : #000000;
-       background-color        : #FFFFFF;
+.runtime_fatal,.runtime_fatalcontent {
+       color: #000000;
+       background-color: #FFFFFF;
 }
 
 .runtime_fatal {
-       color                           : #000000;
+       color: #000000;
 }
 
 .runtime_fatalcontent {
-       text-align                              : left;
-       font-size                                       : 12px;
+       text-align: left;
+       font-size: 12px;
 }
 
 .admin {
-       color                           : #000000;
-       background-color                : #FFFFFF;
+       color: #000000;
+       background-color: #FFFFFF;
 }
 
 .admin_note {
-       color                           : #000000;
-       font-size                               : 12px;
+       color: #000000;
+       font-size: 12px;
 }
 
 DIV.admin_note {
-       padding-top                     : 10px;
-       padding-right                   : 10px;
-       padding-left                    : 10px;
+       padding-top: 10px;
+       padding-right: 10px;
+       padding-left: 10px;
 }
 
 .admin_fatal {
-       color                           : #000000;
-       font-size                               : 18px;
+       color: #000000;
+       font-size: 18px;
 }
 
-.admin_edit, .member_confirm {
-       background-color                : #FFFFFF;
+.admin_edit,.member_confirm {
+       background-color: #FFFFFF;
 }
 
 .member_banner {
-       background-color                : #FFFFFF;
-       width                           : 488px;
+       background-color: #FFFFFF;
+       width: 488px;
 }
 
 .admin_error {
-       background-color                : #FFFFFF;
-       color                           : #000000;
-       font-size                               : 10px;
+       background-color: #FFFFFF;
+       color: #000000;
+       font-size: 10px;
 }
 
-.admin_select, .guest_select, .member_select {
-       border                                  : solid 1px #000000;
-       background-color                : #EEEEFF;
+.admin_select,.guest_select,.member_select {
+       border: solid 1px #000000;
+       background-color: #EEEEFF;
 }
 
-.admin_register, .admin_desc_header, .admin_done, .admin_title, .member_title2, .guest_title2, .admin_message {
-       background-color                : #EEEEFF;
-       color                           : #000000;
-       text-align                      : center;
+.admin_register,.admin_desc_header,.admin_done,.admin_title,.member_title2,.guest_title2,.admin_message
+       {
+       background-color: #EEEEFF;
+       color: #000000;
+       text-align: center;
 }
 
 .admin_title2 {
-       font-weight                     : bold;
-       padding                         : 4px;
-       background-color                : #EEEEFF;
-       color                           : #000000;
-       text-align                      : center;
-       font-size                               : 14px;
+       font-weight: bold;
+       padding: 4px;
+       background-color: #EEEEFF;
+       color: #000000;
+       text-align: center;
+       font-size: 14px;
 }
 
-.member_done, .guest_done {
-       color                           : #000000;
+.member_done,.guest_done {
+       color: #000000;
 }
 
 .member_misc {
-       background-color                : #FFFFFF;
+       background-color: #FFFFFF;
 }
 
-.admin_misc, .member_misc {
-       color                           : #000000;
+.admin_misc,.member_misc {
+       color: #000000;
 }
 
 .admin_done2 {
-       color                           : #000000;
+       color: #000000;
 }
 
-.admin_green, .admin_no {
-       color                           : #000000;
+.admin_green,.admin_no {
+       color: #000000;
 }
 
 .admin_welcome {
-       background-color                : #EEEEFF;
-       color                           : #000000;
-       vertical-align                  : middle;
-       font-size                               : 18px;
-       height                          : 50px;
+       background-color: #EEEEFF;
+       color: #000000;
+       vertical-align: middle;
+       font-size: 18px;
+       height: 50px;
 }
 
 .admin_header {
-       background-color                : #EEEEFF;
+       background-color: #EEEEFF;
 }
 
 .admin_menu {
-       background-color                : #EEEEFF;
-       color                           : #000000;
-       width                           : 230px;
+       background-color: #EEEEFF;
+       color: #000000;
+       width: 230px;
 }
 
 .admin_logout {
-       background-color                : #DDDDFF;
-       color                           : #000000;
+       background-color: #DDDDFF;
+       color: #000000;
 }
 
 .admin_desc_cont {
-       text-align                      : left;
-       background-color                : #FFFFFF;
+       text-align: left;
+       background-color: #FFFFFF;
 }
 
-.admin_table, .member_table {
-       background-color                : #FFFFFF;
+.admin_table,.member_table {
+       background-color: #FFFFFF;
 }
 
 .admin_editmenu {
-       min-width                               : 500px;
-       max-width                               : 90%;
+       min-width: 500px;
+       max-width: 90%;
 }
 
 .admin_form_header {
-       text-align          : center;
-       height                          : 36px;
-       background-color        : #EEEEFF;
-       color                           : #000000;
+       text-align: center;
+       height: 36px;
+       background-color: #EEEEFF;
+       color: #000000;
 }
 
 .member_header {
-       text-align          : center;
-       height                          : 28px;
-       background-color        : #EEEEFF;
+       text-align: center;
+       height: 28px;
+       background-color: #EEEEFF;
 }
 
-.admin_failed, .guest_failed, .member_failed, .member_note {
-       color                           : #000000;
+.admin_failed,.guest_failed,.member_failed,.member_note {
+       color: #000000;
 }
 
 .member_note_bg {
-       background-color        : #FFFFFF;
+       background-color: #FFFFFF;
 }
 
 .member_data {
-       background-color        : #FFFFFF;
-       color                           : #000000;
-       height                          : 20px;
+       background-color: #FFFFFF;
+       color: #000000;
+       height: 20px;
 }
 
 .admin_header_b1 {
-       border-bottom           : 1px solid #000000;
-       background-color        : #EEEEFF;
-       height                          : 22px;
+       border-bottom: 1px solid #000000;
+       background-color: #EEEEFF;
+       height: 22px;
 }
 
 .admin_snote {
-       font-size                       : 12px;
+       font-size: 12px;
 }
 
-.admin_normal, .guest_normal, .member_normal {
-       border-style            : solid;
-       border                          : solid 1px #000000;
-       background-color        : #EEEEFF;
+.admin_normal,.guest_normal,.member_normal {
+       border-style: solid;
+       border: solid 1px #000000;
+       background-color: #EEEEFF;
 }
 
 .admin_alpha {
-       text-align                      : center;
-       height                          : 40px;
-       vertical-align          : middle;
+       text-align: center;
+       height: 40px;
+       vertical-align: middle;
 }
 
 .admin_sortlinks {
-       text-align                      : center;
-       height                          : 20px;
-       vertical-align          : middle;
+       text-align: center;
+       height: 20px;
+       vertical-align: middle;
 }
 
 .member_stats {
-       vertical-align          : top;
-       font-weight                     : bold;
-       height                          : 23px;
-       font-size                       : 16px;
-       border-style            : none;
-       border                          : 0px;
-       background          : #FFFFFF;
-       color                           : #000000;
-       margin-top                      : -4px;
-       margin-bottom           : 1px;
-       cursor                          : default;
+       vertical-align: top;
+       font-weight: bold;
+       height: 23px;
+       font-size: 16px;
+       border-style: none;
+       border: 0px;
+       background: #FFFFFF;
+       color: #000000;
+       margin-top: -4px;
+       margin-bottom: 1px;
+       cursor: default;
 }
 
 .normal {
-       border-style            : groove;
+       border-style: groove;
 }
 
 .member_main {
-       background-color        : #FFFFFF;
+       background-color: #FFFFFF;
 }
 
-.guest_title, .member_title {
-       text-align                      : center;
-       color                           : #000000;
-       vertical-align          : middle;
-       background-color        : #EEEEFF;
-       height                          : 60px;
+.guest_title,.member_title {
+       text-align: center;
+       color: #000000;
+       vertical-align: middle;
+       background-color: #EEEEFF;
+       height: 60px;
 }
 
 .guest_login_header {
-       color                           : #000000;
-       vertical-align          : middle;
-       background-color        : #EEEEFF;
+       color: #000000;
+       vertical-align: middle;
+       background-color: #EEEEFF;
 }
 
-.guest_menu, .member_menu {
-       width                           : 220px;
-       background-color        : #FFFFFF;
-       vertical-align          : top;
+.guest_menu,.member_menu {
+       width: 220px;
+       background-color: #FFFFFF;
+       vertical-align: top;
 }
 
-.guest_menu_title, .member_menu_title {
-       background-color        : #EEEEFF;
-       color                           : #000000;
-       height                          : 25px;
-       width                           : 200px;
-       border                          : 1px solid #000000;
+.guest_menu_title,.member_menu_title {
+       background-color: #EEEEFF;
+       color: #000000;
+       height: 25px;
+       width: 200px;
+       border: 1px solid #000000;
 }
 
-.guest_menu_row, .guest_menu_bottom, .member_menu_row, .member_menu_bottom {
-       border                          : 1px solid #000000;
-       border-top                      : 0px;
-       background-color        : #FFFFFF;
-       height                          : 22px;
-       text-align                      : left;
+.guest_menu_row,.guest_menu_bottom,.member_menu_row,.member_menu_bottom
+       {
+       border: 1px solid #000000;
+       border-top: 0px;
+       background-color: #FFFFFF;
+       height: 22px;
+       text-align: left;
 }
 
-.guest_menu_seperator, .member_menu_seperator {
-       height                          : 15px;
+.guest_menu_seperator,.member_menu_seperator {
+       height: 15px;
 }
 
-.guest_content, .member_content {
-       background-color        : #FFFFFF;
-       width                           : 99%;
-       padding-left            : 2px;
-       padding-right           : 2px;
-       margin-left                     : 5px;
-       margin-right            : 5px;
+.guest_content,.member_content {
+       background-color: #FFFFFF;
+       width: 99%;
+       padding-left: 2px;
+       padding-right: 2px;
+       margin-left: 5px;
+       margin-right: 5px;
 }
 
-.guest_advert, .guest_login, .member_advert, .member_login {
-       background-color        : #FFFFFF;
-       vertical-align          : top;
-       margin-top                      : 10px;
+.guest_advert,.guest_login,.member_advert,.member_login {
+       background-color: #FFFFFF;
+       vertical-align: top;
+       margin-top: 10px;
 }
 
 .guest_footer {
-       height              : 30px;
-       background-color    : #EEEEFF;
+       height: 30px;
+       background-color: #EEEEFF;
 }
 
 #master {
-       width                           : 100%;
-       height                          : 100%;
-       min-height                      : 90%;
-       max-height                      : 100%;
-       vertical-align          : top;
+       width: 100%;
+       height: 100%;
+       min-height: 90%;
+       max-height: 100%;
+       vertical-align: top;
 }
 
 .masterbox {
-       text-align                      : center;
+       text-align: center;
 }
 
 .footer_lines {
-       vertical-align          : bottom;
-       font-size                       : 10px;
-       width                           : 380px;
-       vertical-align          : middle;
-       background-color        : #FFFFFF;
-       height                          : 30px;
-       padding-top                     : 5px;
-       padding-bottom          : 5px;
+       vertical-align: bottom;
+       font-size: 10px;
+       width: 380px;
+       vertical-align: middle;
+       background-color: #FFFFFF;
+       height: 30px;
+       padding-top: 5px;
+       padding-bottom: 5px;
 }
 
 .footer_box {
-       text-align                      : center;
-       width                           : 760px;
+       text-align: center;
+       width: 760px;
 }
 
 .dashed {
-       border                          : solid 1px #000000;
+       border: solid 1px #000000;
 }
 
-.switch_sw1, .switch_mem1 {
-       background-color        : #FFFFFF;
+.switch_sw1,.switch_mem1 {
+       background-color: #FFFFFF;
 }
 
-.switch_sw2, .switch_mem2 {
-       background-color        : #FFFFFF;
+.switch_sw2,.switch_mem2 {
+       background-color: #FFFFFF;
 }
 
 .impressum {
-       font-size                       : 12px;
-       width                           : 320px;
-       vertical-align          : middle;
-       background-color        : #FFFFFF;
-       height                          : 70px;
+       font-size: 12px;
+       width: 320px;
+       vertical-align: middle;
+       background-color: #FFFFFF;
+       height: 70px;
 }
 
 .mediadata {
-       background-color        : #FFFFFF;
+       background-color: #FFFFFF;
 }
 
-.media_header, .impressum_header {
-       background-color        : #EEEEFF;
-       text-align                      : center;
-       color                           : #000000;
-       height                          : 26px;
-       font-weight                     : bold;
-       font-size                       : 20px;
+.media_header,.impressum_header {
+       background-color: #EEEEFF;
+       text-align: center;
+       color: #000000;
+       height: 26px;
+       font-weight: bold;
+       font-size: 20px;
 }
 
 .media_left {
-       font-size                       : 14px;
-       width                           : 200px;
+       font-size: 14px;
+       width: 200px;
 }
 
 .media_right {
-       color                           : #000000;
-       font-weight                     : bold;
-       font-size                       : 14px;
-       width                           : 70px;
+       color: #000000;
+       font-weight: bold;
+       font-size: 14px;
+       width: 70px;
 }
 
 .admin_sep_footer {
-       background-color        : #EEEEFF;
-       font-size           : 1px;
+       background-color: #EEEEFF;
+       font-size: 1px;
 }
 
 .admin_sep_footer2 {
-       background-color        : #EEEEFF;
-       font-size           : 1px;
+       background-color: #EEEEFF;
+       font-size: 1px;
 }
 
-.admin_footer, .member_refbanner, .member_update, .admin_del_link {
-       background-color        : #EEEEFF;
+.admin_footer,.member_refbanner,.member_update,.admin_del_link {
+       background-color: #EEEEFF;
 }
 
 .member_footer {
-       height                          : 30px;
-       background-color        : #EEEEFF;
+       height: 30px;
+       background-color: #EEEEFF;
 }
 
 .admin_footer {
-       text-align                      : center;
-       height                          : 30px
+       text-align: center;
+       height: 30px
 }
 
 .admin_task_header {
-       background-color        : #EEEEFF;
-       color                           : #000000;
-       vertical-align          : middle;
-       font-size                       : 18px;
-       height                          : 35px;
+       background-color: #EEEEFF;
+       color: #000000;
+       vertical-align: middle;
+       font-size: 18px;
+       height: 35px;
 }
 
 .seperator {
-       font-size                       : 1px
+       font-size: 1px
 }
 
 .tab1 {
-       text-align                      : center
+       text-align: center
 }
 
-.admin_delete, .admin_yes {
-       border-style            : groove;
-       border                          : solid 1px #000000;
-       background-color        : #000000;
-       color                           : #FFFFFF;
-       cursor                          : pointer;
+.admin_delete,.admin_yes {
+       border-style: groove;
+       border: solid 1px #000000;
+       background-color: #000000;
+       color: #FFFFFF;
+       cursor: pointer;
 }
 
 .guest_stats {
-       background-color        : #FFFFFF;
-       width                           : 460px;
+       background-color: #FFFFFF;
+       width: 460px;
 }
 
 .guest_stats_title {
-       color                           : #000000;
-       vertical-align          : middle;
-       background-color        : #EEEEFF;
-       height                          : 30px;
+       color: #000000;
+       vertical-align: middle;
+       background-color: #EEEEFF;
+       height: 30px;
 }
 
 .guest_stats_l {
-       width                           : 344px;
-       text-align                      : right;
+       width: 344px;
+       text-align: right;
 }
 
 .guest_stats_m {
-       width                           : 2px;
+       width: 2px;
 }
 
-.guest_stats_r, .guest_stats_lr, .guest_stats_rr {
-       color                           : #000000;
-       width                           : 28px;
-       font-weight                     : bold;
-       text-align                      : center;
+.guest_stats_r,.guest_stats_lr,.guest_stats_rr {
+       color: #000000;
+       width: 28px;
+       font-weight: bold;
+       text-align: center;
 }
 
-.guest_stats_ll, .guest_stats_rl {
-       width                   : 192px;
-       text-align              : right;
+.guest_stats_ll,.guest_stats_rl {
+       width: 192px;
+       text-align: right;
 }
 
 .guest_stats_footer {
-       color                   : #000000;
-       vertical-align          : middle;
-       background-color        : #EEEEFF;
-       height                  : 20px;
+       color: #000000;
+       vertical-align: middle;
+       background-color: #EEEEFF;
+       height: 20px;
 }
 
 .task_pre {
-       font-weight             : bold;
-       margin-left             : 0px;
-       margin-right            : 0px;
-       margin-top              : 10px;
-       margin-bottom           : 10px;
+       font-weight: bold;
+       margin-left: 0px;
+       margin-right: 0px;
+       margin-top: 10px;
+       margin-bottom: 10px;
 }
 
 .impressum_body {
-       background-color        : #FFFFFF;
+       background-color: #FFFFFF;
 }
 
-.guest_content_align, .member_content_align, .admin_content_align {
-       text-align              : center;
-       vertical-align          : top;
+.guest_content_align,.member_content_align,.admin_content_align {
+       text-align: center;
+       vertical-align: top;
 }
 
 .member_mailidtop {
-       background-color        : #FFFFFF;
-       width                   : 100%;
-       height                  : 100%;
+       background-color: #FFFFFF;
+       width: 100%;
+       height: 100%;
 }
 
-.list_categories, .admin_action_header, .admin_main, .admin_menu_main, .admin_menu_sub {
-       text-align              : left;
-       width                   : 100%;
+.list_categories,.admin_action_header,.admin_main,.admin_menu_main,.admin_menu_sub
+       {
+       text-align: left;
+       width: 100%;
 }
 
 .member_unconfirmed {
-       background-color        : #FFFFFF;
-       width                   : 100%;
-       text-align              : center;
+       background-color: #FFFFFF;
+       width: 100%;
+       text-align: center;
 }
 
 .you_are_here {
-       white-space             : nowrap;
-       font-size                       : 14px;
-       text-align              : left;
+       white-space: nowrap;
+       font-size: 14px;
+       text-align: left;
+}
+
+.tiny {
+       font-size: 12px;
+}
+
+.medium {
+       font-size: 14px;
+}
+
+.big {
+       font-size: 20px;
+}
+
+.top {
+       border-top: 1px solid #000000;
+}
+
+.bottom {
+       border-bottom: 1px solid #000000;
 }
 
-.tiny   { font-size            : 12px; }
-.medium { font-size            : 14px; }
-.big    { font-size            : 20px; }
+.left {
+       border-left: 1px solid #000000;
+}
+
+.right {
+       border-right: 1px solid #000000;
+}
 
-.top    { border-top   : 1px solid #000000; }
-.bottom { border-bottom        : 1px solid #000000; }
-.left   { border-left  : 1px solid #000000; }
-.right  { border-right : 1px solid #000000; }
+.top2 {
+       border-top: 1px solid #000000;
+}
 
-.top2    { border-top  : 1px solid #000000; }
-.bottom2 { border-bottom       : 1px solid #000000; }
-.left2   { border-left : 1px solid #000000; }
-.right2  { border-right        : 1px solid #000000; }
+.bottom2 {
+       border-bottom: 1px solid #000000;
+}
+
+.left2 {
+       border-left: 1px solid #000000;
+}
+
+.right2 {
+       border-right: 1px solid #000000;
+}
 
 .nobr {
-       white-space             : nowrap;
+       white-space: nowrap;
 }
 
 .guest_table {
-       background-color    : #FFFFFF;
+       background-color: #FFFFFF;
 }
 
 .main {
-       height                          : 99%;
-       vertical-align          : top;
+       height: 99%;
+       vertical-align: top;
 }
 
 .footer {
-       height                          : 1%;
-       vertical-align          : bottom;
+       height: 1%;
+       vertical-align: bottom;
 }
 
 .menu_blur {
-       display                         : block;
+       display: block;
 }
 
 .menu_blur:hover {
-       background-color        : #EEEEFF;
+       background-color: #EEEEFF;
 }
 
 .disabled {
-       border-style            : groove;
-       background-color        : #AAAAAA;
-       color                           : #FFFFFF;
+       border-style: groove;
+       background-color: #AAAAAA;
+       color: #FFFFFF;
 }
 
 .mini_select {
-     border              : solid 1px #000000;
-     background-color    : #EEEEFF;
-     font-size           : 10px;
+       border: solid 1px #000000;
+       background-color: #EEEEFF;
+       font-size: 10px;
 }
 
 .theme_box {
-       border              : 1px solid #000000;
-       border-top          : 0px;
-       width               : 100%;
-       height              : 70px;
-       background-color    : #FFFFFF;
+       border: 1px solid #000000;
+       border-top: 0px;
+       width: 100%;
+       height: 70px;
+       background-color: #FFFFFF;
 }
 
 .theme_note {
-       font-size           : 12px;
-       font-weight         : bold;
+       font-size: 12px;
+       font-weight: bold;
 }
 
 .theme_content {
-       color               : #000000;
+       color: #000000;
 }
 
 .guest {
-       width                   : 100%;
+       width: 100%;
 }
 
 .agb_box {
-       text-align      : left;
+       text-align: left;
 }
 
-.agb_title, .fatal_title {
-       font-size               : 16px;
-       text-align      : center;
-       height          : 40px;
-       font-weight     : bold;
+.agb_title,.fatal_title {
+       font-size: 16px;
+       text-align: center;
+       height: 40px;
+       font-weight: bold;
 }
 
 .agb_para {
-       text-indent     : 8px;
-       text-align      : left;
-       margin-left     : 5px;
-       margin-right    : 5px;
-       margin-bottom   : 12px;
+       text-indent: 8px;
+       text-align: left;
+       margin-left: 5px;
+       margin-right: 5px;
+       margin-bottom: 12px;
 }
 
 .fatal_box {
-       text-align      : center;
-       width           : 100%;
-       margin-top      : 10px;
+       text-align: center;
+       width: 100%;
+       margin-top: 10px;
 }
 
 .admin_message {
-       padding-bottom                  : 15px;
+       padding-bottom: 15px;
 }
 
 #show_timings_block {
-       float                                   : left;
-       border                                  : solid 1px #000000;
-       background-color                : #EEEEFF;
-       font-size                               : 10px;
-       vertical-align                  : middle;
-       width                                   : 465px;
-       height                                  : 20px;
+       float: left;
+       border: solid 1px #000000;
+       background-color: #EEEEFF;
+       font-size: 10px;
+       vertical-align: middle;
+       width: 465px;
+       height: 20px;
 }
 
 .show_timings_column {
-       background-color                : #FFFFFF;
-       margin-top                              : 2px;
-       width                                   : 150px;
-       border                                  : solid 1px #000000;
-       height                                  : 14px;
+       background-color: #FFFFFF;
+       margin-top: 2px;
+       width: 150px;
+       border: solid 1px #000000;
+       height: 14px;
 }
 
 .show_timings_data {
-       font-weight                             : bold;
+       font-weight: bold;
 }
 
-
 .login_failure_header {
-       text-align                              : center;
-       background-color                : #EEEEFF;
-       font-weight                             : bold;
+       text-align: center;
+       background-color: #EEEEFF;
+       font-weight: bold;
 }
 
 .login_failures {
-       text-align                              : center;
-       width                                   : 400px;
+       text-align: center;
+       width: 400px;
 }
 
-.member_skyscraper, .guest_skyscraper {
-       width                                   : 122px;
-       height                                  : 601px;
-       border                                  : 1px solid #000000;
-       margin                                  : 0px;
-       padding                                 : 0px;
-       padding-top                             : 1px;
+.member_skyscraper,.guest_skyscraper {
+       width: 122px;
+       height: 601px;
+       border: 1px solid #000000;
+       margin: 0px;
+       padding: 0px;
+       padding-top: 1px;
 }
 
-ul.admin_menu_main, ul.admin_menu_sub {
-       list-style                              : none inside;
-}
+ul.admin_menu_main,ul.admin_menu_sub {
+       list-style: none inside;
+}
\ No newline at end of file
index 41322a8c058ba9630155deb78b7388d605fbc648..a85ef5284782cd01e898ba36cb0ca27906f6c2ce 100644 (file)
@@ -1,74 +1,76 @@
 .install_fatal {
-       text-align                      : left;
-       color                           : #000000;
+       text-align: left;
+       color: #000000;
 }
 
 .install_select {
-       border                          : dashed 1px #000000;
-       background-color        : #EEEEFF;
+       border: dashed 1px #000000;
+       background-color: #EEEEFF;
 }
+
 .install_normal {
-       border-style            : solid;
-       border                          : dashed 1px #000000;
+       border-style: solid;
+       border: dashed 1px #000000;
 }
 
 .install_submit {
-       border-style            : groove;
+       border-style: groove;
 }
 
 .install {
+       
 }
 
 .install_main {
-       color                           : #000000;
-       background-color        : #FFFFFF;
-       text-decoration         : none;
+       color: #000000;
+       background-color: #FFFFFF;
+       text-decoration: none;
 }
 
 .install_header {
-       color                           : #000000;
-       background-color        : #EEEEFF;
-       font-size                       : 20px;
-       text-decoration         : underline;
-       heigth                          : 30px;
-       vertical-align          : middle;
-       padding-top                     : 5px;
-       padding-bottom          : 5px;
+       color: #000000;
+       background-color: #EEEEFF;
+       font-size: 20px;
+       text-decoration: underline;
+       heigth: 30px;
+       vertical-align: middle;
+       padding-top: 5px;
+       padding-bottom: 5px;
 }
 
 .install_fatal {
-       background-color        : #FFFFFF;
-       color                           : #000000;
+       background-color: #FFFFFF;
+       color: #000000;
 }
 
 .install_fatalcontent {
-       text-align                      : left;
-       background-color        : #FFFFFF;
+       text-align: left;
+       background-color: #FFFFFF;
 }
 
-.install_error, .install_finished {
-       font-size                       : 20px;
-       color                           : #000000;
+.install_error,.install_finished {
+       font-size: 20px;
+       color: #000000;
 }
 
-.install_security, .install_welcome, .install_text {
-       color                           : #000000;
+.install_security,.install_welcome,.install_text {
+       color: #000000;
 }
 
 .install_text {
-       padding-bottom          : 10px;
-       text-align                      : left;
-       margin-left                     : 20px;
-       margin-right            : 20px;
+       padding-bottom: 10px;
+       text-align: left;
+       margin-left: 20px;
+       margin-right: 20px;
 }
 
 .install_security {
-       width                           : 350px;
-       padding-top                     : 10px;
-       padding-bottom          : 10px;
+       width: 350px;
+       padding-top: 10px;
+       padding-bottom: 10px;
 }
 
 .install_welcome {
-       padding-top                     : 5px;
-       padding-bottom          : 10px;
-}
+       padding-top: 5px;
+       padding-bottom: 10px;
+}
\ No newline at end of file
index a999a92eefda67aa92118950a873af6e5ae0a726..d2e810e9c26b278b7dd02a2308253a4d100ba083 100644 (file)
@@ -1,86 +1,87 @@
 .register_submit {
-       border-style            : outset;
+       border-style: outset;
 }
 
 .register_reset {
-       border-style            : groove;
-       border                  : solid 1px #000000;
-       color                   : #000000;
+       border-style: groove;
+       border: solid 1px #000000;
+       color: #000000;
 }
+
 .register_submit {
-       color                   : #000000;
-       border-color            : #000000;
+       color: #000000;
+       border-color: #000000;
 }
 
 .register_select {
-       border                          : solid 1px #000000;
-       background-color        : #EEEEFF;
+       border: solid 1px #000000;
+       background-color: #EEEEFF;
 }
 
 .register_failed {
-       color                   : #000000;
+       color: #000000;
 }
 
 .register_snote {
-       font-size                       : 12px;
+       font-size: 12px;
 }
 
 .register_normal {
-       border-style            : solid;
-       border                          : solid 1px #000000;
-       padding-right           : 5px;
+       border-style: solid;
+       border: solid 1px #000000;
+       padding-right: 5px;
 }
 
 .register_main {
-       background-color        : #FFFFFF;
-       width                   : 540px;
+       background-color: #FFFFFF;
+       width: 540px;
 }
 
 .register_done2 {
-       height                  : 40px;
-       color                   : #000000;
-       background-color        : #FFFFFF;
-       width                   : 500px;
+       height: 40px;
+       color: #000000;
+       background-color: #FFFFFF;
+       width: 500px;
 }
 
 .register_title {
-       background-color        : #EEEEFF;
-       text-align              : center;
-       font-size                       : 18px;
-       padding-left            : 5px;
-       padding-right           : 5px;
+       background-color: #EEEEFF;
+       text-align: center;
+       font-size: 18px;
+       padding-left: 5px;
+       padding-right: 5px;
 }
 
 .register_seperator {
-       height                  : 7px;
-       font-size                       : 1px;
+       height: 7px;
+       font-size: 1px;
 }
 
 .register_left {
-       text-align              : right;
-       margin-right            : 2px;
-       color                   : #000000;
-       font-weight             : bold;
-       font-size                       : 14px;
-       padding-left            : 5px;
+       text-align: right;
+       margin-right: 2px;
+       color: #000000;
+       font-weight: bold;
+       font-size: 14px;
+       padding-left: 5px;
 }
 
 .register_right {
-       padding-right           : 5px;
+       padding-right: 5px;
 }
 
 .register_header {
-       text-align              : center;
-       background-color        : #EEEEFF;
-       color                   : #000000;
-       font-weight             : bold;
-       border-top              : 1px solid #000000;
-       border-bottom           : 1px solid #000000;
-       height                  : 25px;
+       text-align: center;
+       background-color: #EEEEFF;
+       color: #000000;
+       font-weight: bold;
+       border-top: 1px solid #000000;
+       border-bottom: 1px solid #000000;
+       height: 25px;
 }
 
-A:hover.register_term {
-       background-color        : #EEEEFF;
-       border-top              : 1px solid #000000;
-       border-bottom           : 1px solid #000000;
-}
+A:hover .register_term {
+       background-color: #EEEEFF;
+       border-top: 1px solid #000000;
+       border-bottom: 1px solid #000000;
+}
\ No newline at end of file
index 67a0d7de9de2ad5a6e4307a1dae71ea6f1c0bbb8..f3545e9cf7a749a0b198fda55c59143291b99d37 100644 (file)
@@ -1,16 +1,16 @@
 .sponsor_table {
-       background-color        : #FFFFFF;
+       background-color: #FFFFFF;
 }
 
 .sponsor_what {
-       height                  : 24px;
+       height: 24px;
 }
 
-.sponsor_header, .sponsor_footer {
-       background-color        : #EEEEFF;
+.sponsor_header,.sponsor_footer {
+       background-color: #EEEEFF;
 }
 
 .sponsor_action {
-       background-color        : #EEEEFF;
-       height                  : 25px;
-}
+       background-color: #EEEEFF;
+       height: 25px;
+}
\ No newline at end of file
index c8ced309f5fd6e47984d2fb3676ef21a0e91915a..a3cddba487f6b8cdf91d49ee8864149faabceb48 100644 (file)
@@ -1,21 +1,39 @@
 .surfbar_banner {
+       
 }
+
 .surfbar_table {
+       
 }
+
 .surfbar_td {
+       
 }
+
 .surfbar_points {
+       
 }
+
 #surfbar_counter {
+       
 }
+
 #surfbar_restart {
+       
 }
+
 #counter_word {
+       
 }
+
 .surfbar_reload {
+       
 }
+
 .surfbar_max {
+       
 }
+
 .surfbar_points {
-       font-weight             : bold;
+       font-weight: bold;
 }
\ No newline at end of file
index d50e0ae12b0be5c7411c05264e060db3a1cff26b..d884cc73148c83d5f008b6e13d9b407502e56714 100644 (file)
@@ -1,9 +1,9 @@
-.top10_row1, .top10_row2, .top10_row3, .top10_row4, .top10_row5 {
-       text-align : center;
-       padding-left  : 5px;
-       padding-right : 5px;
+.top10_row1,.top10_row2,.top10_row3,.top10_row4,.top10_row5 {
+       text-align: center;
+       padding-left: 5px;
+       padding-right: 5px;
 }
 
-.top10_row2, .top10_row4 {
-       text-align : left;
-}
+.top10_row2,.top10_row4 {
+       text-align: left;
+}
\ No newline at end of file
index 3707b5d21a2a545c81cfe6d2816758d919d5ff1b..5556b5da9d77b0cada5e4b5b637d5dec14edcf26 100644 (file)
@@ -1,12 +1,12 @@
-.transfer_row1, .transfer_row3 {
-       text-align  : center;
-       font-weight : bold;
+.transfer_row1,.transfer_row3 {
+       text-align: center;
+       font-weight: bold;
 }
 
 .transfer_row2 {
-       text-align  : center;
+       text-align: center;
 }
 
-.transfer_row4, .transfer_row5 {
+.transfer_row4,.transfer_row5 {
        padding-left: 2px;
-}
+}
\ No newline at end of file
index 5282519e7a1e2f903eae0982e5512c18f0157a56..5a7aed22cc8e8c25b4a7632e90a3b7073d039cd4 100644 (file)
@@ -65,11 +65,11 @@ if (empty($GLOBALS['theme_mode'])) $GLOBALS['theme_mode'] = 'load';
 
 switch ($GLOBALS['theme_mode'])
 {
-case 'test': // Do stuff while testing the theme: The admin clicked on 'Import'
-       break;
+       case 'test': // Do stuff while testing the theme: The admin clicked on 'Import'
+               break;
 
-case 'load': // Do stuff while theme is loaded normally
-       break;
+       case 'load': // Do stuff while theme is loaded normally
+               break;
 }
 //
 ?>
index 55b8687a3fa16f7023d8f910a6ea98f39380d551..7a41f23f21d0b5438cf23389277b40d2ce906fd9 100644 (file)
@@ -1,9 +1,9 @@
-.active_row1, .active_row2, .active_row3 {
-       text-align    : center;
-       padding-left  : 5px;
-       padding-right : 5px;
+.active_row1,.active_row2,.active_row3 {
+       text-align: center;
+       padding-left: 5px;
+       padding-right: 5px;
 }
 
 .active_row2 {
-       text-align : left;
-}
+       text-align: left;
+}
\ No newline at end of file
index c63f55b6ed3e74ded6e2ee6e82779a36f0f513ef..db9e67443ff28d861cb624cac12a60a622201805 100644 (file)
@@ -6,4 +6,4 @@
        background-color: #e5f6e5;
        padding-left: 10px;
        padding-right: 10px;
-}
+}
\ No newline at end of file
index 66f7b6f2587dbea1c54813b78373d000c6621bbb..9ad71cef338eee94a1d584d647ae679b6e1b70a5 100644 (file)
@@ -1,13 +1,13 @@
 .bonus_rank_1 {
-       font-weight : bold;
-       font-size   : 22px;
+       font-weight: bold;
+       font-size: 22px;
 }
 
 .bonus_rank_2 {
-       font-weight : bold;
-       font-size   : 18px;
+       font-weight: bold;
+       font-size: 18px;
 }
 
 .bonus_rank_3 {
-       font-weight : bold;
-}
+       font-weight: bold;
+}
\ No newline at end of file
index dc79c40294eca2f768c978759630183da0bf287a..ef449aee87cd50712bad116a576c9c70be1040b8 100644 (file)
@@ -1,25 +1,27 @@
 .doubler_table {
+       
 }
 
 .doubler_main {
+       
 }
 
 .doubler_error {
-       font-weight     : bold;
-       color           : #AA0000;
+       font-weight: bold;
+       color: #AA0000;
 }
 
 .doubler_big_row {
-     height         : 70px;
+       height: 70px;
 }
 
 .doubler_header {
-       background-color    : #ddeedd;
-       text-align              : center;
-       height                  : 24px;
+       background-color: #ddeedd;
+       text-align: center;
+       height: 24px;
 }
 
 .doubler_footer {
-     height              : 24px;
-     background-color    : #ddeedd;
-}
+       height: 24px;
+       background-color: #ddeedd;
+}
\ No newline at end of file
index 887944952eedd5cac3297aee6b5316d32444f732..d9a48f892c89e0886b6f3d178261b063380a1f48 100644 (file)
 body {
-       background-color        : #EEFFEE;
-       color                           : #000000;
-       font-family                     : Verdana, Arial, Geneva, Helvetica, sans-serif;
-       font-size                       : 12px;
-       letter-spacing      : 1px;
-
-       scrollbar-base-color            : #E9E4AE;
-       scrollbar-face-color            : #CDEFCD;
-       scrollbar-highlight-color       : #EEFFEE;
-       scrollbar-shadow-color          : #CDEFCD;
-       scrollbar-3dlight-color         : #DDDDDD;
-       scrollbar-arrow-color           : #000000;
-       scrollbar-track-color           : #CCEFCC;
-       scrollbar-darkshadow-color      : #999999;
-
-       margin                          : 0px;
-       margin-left                     : 0px;
-       margin-right            : 0px;
-       margin-top                      : 0px;
-       margin-bottom           : 0px;
+       background-color: #EEFFEE;
+       color: #000000;
+       font-family: Verdana, Arial, Geneva, Helvetica, sans-serif;
+       font-size: 12px;
+       letter-spacing: 1px;
+       scrollbar-base-color: #E9E4AE;
+       scrollbar-face-color: #CDEFCD;
+       scrollbar-highlight-color: #EEFFEE;
+       scrollbar-shadow-color: #CDEFCD;
+       scrollbar-3dlight-color: #DDDDDD;
+       scrollbar-arrow-color: #000000;
+       scrollbar-track-color: #CCEFCC;
+       scrollbar-darkshadow-color: #999999;
+       margin: 0px;
+       margin-left: 0px;
+       margin-right: 0px;
+       margin-top: 0px;
+       margin-bottom: 0px;
 }
 
 table {
-       table-layout            : auto;
-       border-spacing          : 0px;
-       overflow                        : auto;
+       table-layout: auto;
+       border-spacing: 0px;
+       overflow: auto;
 }
 
 A {
-       font-style                      : normal;
-       text-decoration         : none;
+       font-style: normal;
+       text-decoration: none;
 }
 
 A:link {
-       color                           : #2e51a9;
+       color: #2e51a9;
 }
 
 A:visited {
-       color                           : #AA0044;
+       color: #AA0044;
 }
 
 A:active {
-       color                           : #2e51a9;
-       background-color        : transparent;
+       color: #2e51a9;
+       background-color: transparent;
 }
 
 A:hover {
-       background-color        : transparent;
+       background-color: transparent;
 }
 
-input, textarea {
-       color                           : #009900;
-       background-color        : #EEFFEE;
-       border                          : 1px solid #AA0044;
-       text-decoration         : none;
-       border-style            : groove;
+input,textarea {
+       color: #009900;
+       background-color: #EEFFEE;
+       border: 1px solid #AA0044;
+       text-decoration: none;
+       border-style: groove;
 }
 
-select, option {
-       background-color        : #EEFFEE;
-       border                          : solid 1px #009900;
-       color                           : #AA0044;
-       text-decoration         : none;
-       border-style            : groove;
+select,option {
+       background-color: #EEFFEE;
+       border: solid 1px #009900;
+       color: #AA0044;
+       text-decoration: none;
+       border-style: groove;
 }
 
-ul, ol {
-       margin-top                      : 0px;
-       margin-bottom           : 0px;
+ul,ol {
+       margin-top: 0px;
+       margin-bottom: 0px;
 }
 
-.admin_reset, .guest_reset, .member_reset {
-       border-style            : groove;
-       border                          : solid 1px #009900;
-       color                           : #AA0044;
-       cursor                          : pointer;
+.admin_reset,.guest_reset,.member_reset {
+       border-style: groove;
+       border: solid 1px #009900;
+       color: #AA0044;
+       cursor: pointer;
 }
 
-.admin_submit, .guest_submit, .member_submit {
-       color                           : #AA0044;
-       border-color            : #009900;
-       cursor                          : pointer;
+.admin_submit,.guest_submit,.member_submit {
+       color: #AA0044;
+       border-color: #009900;
+       cursor: pointer;
 }
 
 .admin_submit_reject {
-       border-style            : groove;
-       color                           : #881111;
-       border-color            : #009900;
-       cursor                          : pointer;
+       border-style: groove;
+       color: #881111;
+       border-color: #009900;
+       cursor: pointer;
 }
 
-.runtime_fatal, .runtime_fatalcontent {
-       width                           : 700px;
-       color                           : #118811;
-       background-color        : #DDEEDD;
+.runtime_fatal,.runtime_fatalcontent {
+       width: 700px;
+       color: #118811;
+       background-color: #DDEEDD;
 }
 
 .runtime_fatal {
-       color                           : #00AA00;
+       color: #00AA00;
 }
 
 .runtime_fatalcontent {
-       text-align                      : left;
-       font-size                       : 12px;
+       text-align: left;
+       font-size: 12px;
 }
 
 .admin {
-       color                           : #118811;
-       background-color        : #DDEEDD;
+       color: #118811;
+       background-color: #DDEEDD;
 }
 
 .admin_note {
-       color                           : #FF0000;
-       font-size                       : 12px;
+       color: #FF0000;
+       font-size: 12px;
 }
 
 DIV.admin_note {
-       padding-top         : 10px;
-       padding-right       : 10px;
-       padding-left        : 10px;
+       padding-top: 10px;
+       padding-right: 10px;
+       padding-left: 10px;
 }
 
 .admin_fatal {
-       font-size                       : 18px;
-       color                           : #00AA00;
+       font-size: 18px;
+       color: #00AA00;
 }
 
-.admin_edit, .member_confirm {
-       background-color        : #eeffee;
+.admin_edit,.member_confirm {
+       background-color: #eeffee;
 }
 
 .member_banner {
-       background-color        : #eeffee;
-       width                           : 488px;
+       background-color: #eeffee;
+       width: 488px;
 }
 
 .admin_error {
-       background-color        : #eeffee;
-       color                           : #00AA00;
-       font-size                       : 10px;
+       background-color: #eeffee;
+       color: #00AA00;
+       font-size: 10px;
 }
 
-.admin_select, .guest_select, .member_select {
-       border                          : solid 1px #009900;
-       background-color        : #EEFFEE;
+.admin_select,.guest_select,.member_select {
+       border: solid 1px #009900;
+       background-color: #EEFFEE;
 }
 
-.admin_register, .admin_desc_header, .admin_done, .admin_title, .member_title2, .guest_title2, .admin_message {
-       background-color                : #ddeedd;
-       color                           : #009900;
-       text-align                      : center;
+.admin_register,.admin_desc_header,.admin_done,.admin_title,.member_title2,.guest_title2,.admin_message
+       {
+       background-color: #ddeedd;
+       color: #009900;
+       text-align: center;
 }
 
-.member_done, .guest_done {
-       color                           : #009900;
+.member_done,.guest_done {
+       color: #009900;
 }
 
 .member_misc {
-       background-color        : #DDEEDD;
+       background-color: #DDEEDD;
 }
 
-.admin_misc, .member_misc {
-       color                           : #000000;
+.admin_misc,.member_misc {
+       color: #000000;
 }
 
 .admin_done2 {
-       color                           : #AA0044;
+       color: #AA0044;
 }
 
-.admin_green, .admin_no {
-       color                           : #009900;
+.admin_green,.admin_no {
+       color: #009900;
 }
 
 .admin_welcome {
-       background-color        : #DDEEDD;
-       color                           : #009900;
-       vertical-align          : middle;
-       font-size                       : 18px;
-       height                          : 50px;
+       background-color: #DDEEDD;
+       color: #009900;
+       vertical-align: middle;
+       font-size: 18px;
+       height: 50px;
 }
 
 .admin_header {
-       background-color        : #ddeedd;
+       background-color: #ddeedd;
 }
 
 .admin_menu {
-       background-color        : #DDEEDD;
-       color                           : #000077;
-       width                           : 220px;
+       background-color: #DDEEDD;
+       color: #000077;
+       width: 220px;
 }
 
 .admin_logout {
-       background-color        : #AAFFAA;
-       color                           : #00AA00;
+       background-color: #AAFFAA;
+       color: #00AA00;
 }
 
 .admin_desc_cont {
-       text-align          : left;
-       background-color    : #eeffee;
+       text-align: left;
+       background-color: #eeffee;
 }
 
-.admin_table, .member_table {
-       background-color        : #eeffee;
+.admin_table,.member_table {
+       background-color: #eeffee;
 }
 
 .admin_editmenu {
-       min-width                       : 500px;
-       max-width                       : 90%;
+       min-width: 500px;
+       max-width: 90%;
 }
 
 .admin_form_header {
-       text-align          : center;
-       height                          : 36px;
-       background-color        : #ddeedd;
-       color                           : #009900;
+       text-align: center;
+       height: 36px;
+       background-color: #ddeedd;
+       color: #009900;
 }
 
 .member_header {
-       text-align          : center;
-       height                          : 28px;
-       background-color        : #ddeedd;
+       text-align: center;
+       height: 28px;
+       background-color: #ddeedd;
 }
 
-.admin_failed, .guest_failed, .member_failed, .member_note {
-       color                           : #00AA00;
+.admin_failed,.guest_failed,.member_failed,.member_note {
+       color: #00AA00;
 }
 
 .member_note_bg {
-       background-color        : #eeffee;
+       background-color: #eeffee;
 }
 
 .member_data {
-       background-color        : #eeffee;
-       color                           : #009900;
-       height                          : 20px;
+       background-color: #eeffee;
+       color: #009900;
+       height: 20px;
 }
 
 .admin_header_b1 {
-       border-bottom           : 1px solid #AA0044;
-       background-color        : #ddeedd;
-       height                          : 22px;
+       border-bottom: 1px solid #AA0044;
+       background-color: #ddeedd;
+       height: 22px;
 }
 
 .admin_snote {
-       font-size                       : 12px;
+       font-size: 12px;
 }
 
-.admin_normal, .guest_normal, .member_normal {
-       border-style            : solid;
-       border                          : solid 1px #009900;
+.admin_normal,.guest_normal,.member_normal {
+       border-style: solid;
+       border: solid 1px #009900;
 }
 
 .member_stats {
-       vertical-align          : top;
-       font-weight                     : bold;
-       height                          : 23px;
-       font-size                       : 16px;
-       border-style            : none;
-       border                          : 0px;
-       background          : #DDEEDD;
-       color                           : #000000;
-       margin-top                      : -4px;
-       margin-bottom           : 1px;
-       cursor                          : default;
+       vertical-align: top;
+       font-weight: bold;
+       height: 23px;
+       font-size: 16px;
+       border-style: none;
+       border: 0px;
+       background: #DDEEDD;
+       color: #000000;
+       margin-top: -4px;
+       margin-bottom: 1px;
+       cursor: default;
 }
 
 .normal {
-       border-style            : groove;
+       border-style: groove;
 }
 
 .member_main {
-       background-color        : #DDEEDD;
+       background-color: #DDEEDD;
 }
 
-.guest_title, .member_title {
-       text-align                      : center;
-       color                           : #009900;
-       vertical-align          : middle;
-       background-color        : #DDEEDD;
-       height                          : 60px;
+.guest_title,.member_title {
+       text-align: center;
+       color: #009900;
+       vertical-align: middle;
+       background-color: #DDEEDD;
+       height: 60px;
 }
 
 .guest_login_header {
-       color                           : #009900;
-       vertical-align          : middle;
-       background-color        : #DDEEDD;
+       color: #009900;
+       vertical-align: middle;
+       background-color: #DDEEDD;
 }
 
-.guest_menu, .member_menu {
-       width                           : 220px;
-       background-color        : #DDEEDD;
-       vertical-align          : top;
+.guest_menu,.member_menu {
+       width: 220px;
+       background-color: #DDEEDD;
+       vertical-align: top;
 }
 
-.guest_menu_title, .member_menu_title {
-       background-color        : #BDEFCD;
-       color                           : #009900;
-       height                          : 25px;
-       width                           : 200px;
-       border                          : 1px solid #AA0044;
+.guest_menu_title,.member_menu_title {
+       background-color: #BDEFCD;
+       color: #009900;
+       height: 25px;
+       width: 200px;
+       border: 1px solid #AA0044;
 }
 
-.guest_menu_row, .guest_menu_bottom, .member_menu_row, .member_menu_bottom {
-       border                          : 1px solid #AA0044;
-       border-top                      : 0px;
-       background-color        : #eeffbc;
-       height                          : 22px;
-       text-align                      : left;
+.guest_menu_row,.guest_menu_bottom,.member_menu_row,.member_menu_bottom
+       {
+       border: 1px solid #AA0044;
+       border-top: 0px;
+       background-color: #eeffbc;
+       height: 22px;
+       text-align: left;
 }
 
 .member_menu_whats {
-       border                          : 1px solid #AA0044;
-       border-top                      : 0px;
-       background-color        : #eeffee;
-       height                          : 20px;
+       border: 1px solid #AA0044;
+       border-top: 0px;
+       background-color: #eeffee;
+       height: 20px;
 }
 
-.guest_menu_seperator, .member_menu_seperator {
-       height                          : 15px;
+.guest_menu_seperator,.member_menu_seperator {
+       height: 15px;
 }
 
-.guest_content, .member_content {
-       background-color        : #eeffee;
-       width                           : 99%;
-       padding-left            : 2px;
-       padding-right           : 2px;
-       margin-left                     : 5px;
-       margin-right            : 5px;
+.guest_content,.member_content {
+       background-color: #eeffee;
+       width: 99%;
+       padding-left: 2px;
+       padding-right: 2px;
+       margin-left: 5px;
+       margin-right: 5px;
 }
 
-.guest_advert, .guest_login, .member_advert, .member_login {
-       background-color        : #DDEEDD;
-       vertical-align          : top;
-       margin-top                      : 10px;
+.guest_advert,.guest_login,.member_advert,.member_login {
+       background-color: #DDEEDD;
+       vertical-align: top;
+       margin-top: 10px;
 }
 
 #master {
-       width                           : 100%;
-       height                          : 100%;
-       min-height                      : 90%;
-       max-height                      : 100%;
-       text-align                      : center;
+       width: 100%;
+       height: 100%;
+       min-height: 90%;
+       max-height: 100%;
+       text-align: center;
 }
 
 .masterbox {
-       text-align                      : center;
+       text-align: center;
 }
 
 .footer {
-       text-align                      : center;
+       text-align: center;
 }
 
 .footer_lines {
-       font-size                       : 10px;
-       width                           : 380px;
-       height                          : 30px;
-       vertical-align          : middle;
-       background-color        : #E5EFE5;
-       padding-top                     : 5px;
-       padding-bottom          : 5px;
+       font-size: 10px;
+       width: 380px;
+       height: 30px;
+       vertical-align: middle;
+       background-color: #E5EFE5;
+       padding-top: 5px;
+       padding-bottom: 5px;
 }
 
 .footer_box {
-       text-align                      : center;
-       width                           : 760px;
+       text-align: center;
+       width: 760px;
 }
 
 .dashed {
-       border                          : solid 1px #AA0044;
+       border: solid 1px #AA0044;
 }
 
-.switch_sw1, .switch_mem1 {
-       background-color        : #b8efc1;
+.switch_sw1,.switch_mem1 {
+       background-color: #b8efc1;
 }
 
-.switch_sw2, .switch_mem2 {
-       background-color        : #b8fccb;
+.switch_sw2,.switch_mem2 {
+       background-color: #b8fccb;
 }
 
 .impressum {
-       font-size                       : 12px;
-       width                           : 320px;
-       vertical-align          : middle;
-       background-color        : #E5EFE5;
-       height                          : 70px;
+       font-size: 12px;
+       width: 320px;
+       vertical-align: middle;
+       background-color: #E5EFE5;
+       height: 70px;
 }
 
 .mediadata {
-       background-color        : #eeffee;
+       background-color: #eeffee;
 }
 
-.media_header, .impressum_header {
-       background-color        : #b8fccb;
-       text-align                      : center;
-       color                           : #009900;
-       height                          : 26px;
-       font-weight                     : bold;
-       font-size                       : 20px;
+.media_header,.impressum_header {
+       background-color: #b8fccb;
+       text-align: center;
+       color: #009900;
+       height: 26px;
+       font-weight: bold;
+       font-size: 20px;
 }
 
 .media_left {
-       font-size                       : 14px;
-       width                           : 200px;
+       font-size: 14px;
+       width: 200px;
 }
 
 .media_right {
-       color                           : #009900;
-       font-weight                     : bold;
-       font-size                       : 14px;
-       width                           : 70px;
+       color: #009900;
+       font-weight: bold;
+       font-size: 14px;
+       width: 70px;
 }
 
 .admin_sep_footer {
-       background-color        : #DDEEDD;
-       font-size           : 1px;
+       background-color: #DDEEDD;
+       font-size: 1px;
 }
 
 .admin_sep_footer2 {
-       background-color        : #eeffee;
-       font-size           : 1px;
+       background-color: #eeffee;
+       font-size: 1px;
 }
 
-.admin_footer, .member_refbanner, .member_update, .admin_del_link {
-       background-color        : #DDEEDD;
+.admin_footer,.member_refbanner,.member_update,.admin_del_link {
+       background-color: #DDEEDD;
 }
 
 .member_footer {
-       height                          : 30px;
-       background-color        : #DDEEDD;
+       height: 30px;
+       background-color: #DDEEDD;
 }
 
 .admin_footer {
-       text-align                      : center;
-       height                          : 30px
+       text-align: center;
+       height: 30px
 }
 
 .admin_task_header {
-       background-color        : #ddeedd;
-       color                           : #009900;
-       vertical-align          : middle;
-       font-size                       : 18px;
-       height                          : 35px;
+       background-color: #ddeedd;
+       color: #009900;
+       vertical-align: middle;
+       font-size: 18px;
+       height: 35px;
 }
 
 .seperator {
-       font-size                       : 1px
+       font-size: 1px
 }
 
 .tab1 {
-       text-align                      : center
+       text-align: center
 }
 
-.admin_delete, .admin_yes {
-       border-style            : groove;
-       border                          : solid 1px #00AA00;
-       background-color        : #AA0044;
-       color                           : #DDEEDD;
-       cursor                          : pointer;
+.admin_delete,.admin_yes {
+       border-style: groove;
+       border: solid 1px #00AA00;
+       background-color: #AA0044;
+       color: #DDEEDD;
+       cursor: pointer;
 }
 
 .guest_stats {
-       background-color        : #eeffee;
-       width                           : 460px;
+       background-color: #eeffee;
+       width: 460px;
 }
 
 .guest_stats_title {
-       color                           : #009900;
-       vertical-align          : middle;
-       background-color        : #DDEEDD;
-       height                          : 30px;
+       color: #009900;
+       vertical-align: middle;
+       background-color: #DDEEDD;
+       height: 30px;
 }
 
 .guest_stats_l {
-       width                           : 344px;
-       text-align                      : right;
+       width: 344px;
+       text-align: right;
 }
 
 .guest_stats_m {
-       width                           : 2px;
+       width: 2px;
 }
 
-.guest_stats_r, .guest_stats_lr, .guest_stats_rr {
-       color                           : #009900;
-       width                           : 28px;
-       font-weight                     : bold;
-       text-align                      : center;
+.guest_stats_r,.guest_stats_lr,.guest_stats_rr {
+       color: #009900;
+       width: 28px;
+       font-weight: bold;
+       text-align: center;
 }
 
-.guest_stats_ll, .guest_stats_rl {
-       width                           : 192px;
-       text-align                      : right;
+.guest_stats_ll,.guest_stats_rl {
+       width: 192px;
+       text-align: right;
 }
 
 .guest_stats_footer {
-       color                           : #009900;
-       vertical-align          : middle;
-       background-color        : #DDEEDD;
-       height                          : 20px;
+       color: #009900;
+       vertical-align: middle;
+       background-color: #DDEEDD;
+       height: 20px;
 }
 
 .task_pre {
-       font-weight                     : bold;
-       margin-left                     : 0px;
-       margin-right            : 0px;
-       margin-top                      : 10px;
-       margin-bottom           : 10px;
+       font-weight: bold;
+       margin-left: 0px;
+       margin-right: 0px;
+       margin-top: 10px;
+       margin-bottom: 10px;
 }
 
 .impressum_body {
-       background-color        : #DDEEDD;
+       background-color: #DDEEDD;
 }
 
-.guest_content_align, .member_content_align, .admin_content_align {
-       text-align                      : center;
-       align                           : center;
-       vertical-align          : top;
+.guest_content_align,.member_content_align,.admin_content_align {
+       text-align: center;
+       align: center;
+       vertical-align: top;
 }
 
 .member_mailidtop {
-       background-color        : #DDEEDD;
-       width                           : 100%;
-       height                          : 100%;
+       background-color: #DDEEDD;
+       width: 100%;
+       height: 100%;
 }
 
-.list_categories, .admin_action_header, .admin_main, .admin_menu_main, .admin_menu_sub {
-       text-align                      : left;
-       width                           : 100%;
+.list_categories,.admin_action_header,.admin_main,.admin_menu_main,.admin_menu_sub
+       {
+       text-align: left;
+       width: 100%;
 }
 
 .admin_alpha {
-       text-align                      : center;
-       height                          : 40px;
-       vertical-align          : middle;
+       text-align: center;
+       height: 40px;
+       vertical-align: middle;
 }
 
 .admin_sortlinks {
-       text-align                      : center;
-       height                          : 20px;
-       vertical-align          : middle;
+       text-align: center;
+       height: 20px;
+       vertical-align: middle;
 }
 
 .admin_title2 {
-       font-weight                     : bold;
-       padding                         : 4px;
-       background-color                : #ddeedd;
-       color                           : #000099;
-       text-align                      : center;
-       font-size                               : 14px;
+       font-weight: bold;
+       padding: 4px;
+       background-color: #ddeedd;
+       color: #000099;
+       text-align: center;
+       font-size: 14px;
 }
 
 .member_unconfirmed {
-       background-color        : #DDEEDD;
-       width                           : 100%;
-       text-align                      : center;
+       background-color: #DDEEDD;
+       width: 100%;
+       text-align: center;
 }
 
 .you_are_here {
-       white-space                     : nowrap;
-       font-size                       : 14px;
-       text-align                      : left;
+       white-space: nowrap;
+       font-size: 14px;
+       text-align: left;
 }
 
-.tiny   { font-size            : 12px; }
-.medium { font-size            : 14px; }
-.big    { font-size            : 20px; }
+.tiny {
+       font-size: 12px;
+}
+
+.medium {
+       font-size: 14px;
+}
+
+.big {
+       font-size: 20px;
+}
+
+.top {
+       border-top: 1px solid #4400AA;
+}
+
+.bottom {
+       border-bottom: 1px solid #4400AA;
+}
+
+.left {
+       border-left: 1px solid #4400AA;
+}
+
+.right {
+       border-right: 1px solid #4400AA;
+}
+
+.top2 {
+       border-top: 1px solid #AA0044;
+}
 
-.top    { border-top           : 1px solid #4400AA; }
-.bottom { border-bottom                : 1px solid #4400AA; }
-.left   { border-left          : 1px solid #4400AA; }
-.right  { border-right         : 1px solid #4400AA; }
+.bottom2 {
+       border-bottom: 1px solid #AA0044;
+}
 
-.top2    { border-top          : 1px solid #AA0044; }
-.bottom2 { border-bottom       : 1px solid #AA0044; }
-.left2   { border-left         : 1px solid #AA0044; }
-.right2  { border-right                : 1px solid #AA0044; }
+.left2 {
+       border-left: 1px solid #AA0044;
+}
+
+.right2 {
+       border-right: 1px solid #AA0044;
+}
 
 .nobr {
-       white-space                     : nowrap;
+       white-space: nowrap;
 }
 
 .guest_table {
-       background-color    : #eeffee;
+       background-color: #eeffee;
 }
 
 .main {
-       height                          : 99%
+       height: 99%
 }
 
 .footer {
-       height                          : 1%;
-       vertical-align          : bottom;
+       height: 1%;
+       vertical-align: bottom;
 }
 
 .menu_blur {
-       display                         : block;
+       display: block;
 }
 
 .menu_blur:hover {
-       background-color        : #deefac;
+       background-color: #deefac;
 }
 
 .guest_footer {
-       height              : 30px;
-       background-color    : #E5E5F5;
+       height: 30px;
+       background-color: #E5E5F5;
 }
 
 .disabled {
-       border-style            : groove;
-       background-color        : #AAAAAA;
-       color                           : #FF9900;
+       border-style: groove;
+       background-color: #AAAAAA;
+       color: #FF9900;
 }
 
 .mini_select {
-       border              : dotted 1px #009900;
-       background-color    : #EEFFEE;
-       font-size           : 10px;
+       border: dotted 1px #009900;
+       background-color: #EEFFEE;
+       font-size: 10px;
 }
 
 .theme_box {
-       border             : 1px dotted #AA0044;
-       border-top         : 0px;
-       width               : 100%;
-       height              : 70px;
-       background-color   : #eeffbc;
+       border: 1px dotted #AA0044;
+       border-top: 0px;
+       width: 100%;
+       height: 70px;
+       background-color: #eeffbc;
 }
 
 .theme_note {
-       font-size           : 12px;
-       font-weight         : bold;
+       font-size: 12px;
+       font-weight: bold;
 }
 
 .theme_content {
-       color               : #009900;
+       color: #009900;
 }
 
 .agb_box {
-       text-align                      : left;
+       text-align: left;
 }
 
-.agb_title, .fatal_title {
-       font-size                       : 16px;
-       text-align                      : center;
-       height                          : 40px;
-       font-weight                     : bold;
+.agb_title,.fatal_title {
+       font-size: 16px;
+       text-align: center;
+       height: 40px;
+       font-weight: bold;
 }
 
 .agb_para {
-       text-indent             : 8px;
-       text-align              : left;
-       margin-left             : 5px;
-       margin-right    : 5px;
-       margin-bottom   : 12px;
+       text-indent: 8px;
+       text-align: left;
+       margin-left: 5px;
+       margin-right: 5px;
+       margin-bottom: 12px;
 }
 
 .fatal_box {
-       text-align              : center;
-       width                   : 100%;
-       margin-top              : 10px;
+       text-align: center;
+       width: 100%;
+       margin-top: 10px;
 }
 
 .admin_message {
-       padding-top                             : 5px;
-       padding-bottom                  : 5px;
+       padding-top: 5px;
+       padding-bottom: 5px;
 }
 
 #show_timings_block {
-       float                           : left;
-       border                          : solid 1px #AA0044;
-       background-color        : #ddeedd;
-       font-size                       : 10px;
-       vertical-align          : middle;
-       width                           : 465px;
-       height                          : 20px;
+       float: left;
+       border: solid 1px #AA0044;
+       background-color: #ddeedd;
+       font-size: 10px;
+       vertical-align: middle;
+       width: 465px;
+       height: 20px;
 }
 
 .show_timings_column {
-       background-color        : #EEFFEE;
-       margin-top                      : 2px;
-       width                           : 150px;
-       border                          : solid 1px #009900;
-       height                          : 14px;
+       background-color: #EEFFEE;
+       margin-top: 2px;
+       width: 150px;
+       border: solid 1px #009900;
+       height: 14px;
 }
 
 .show_timings_data {
-       font-weight                     : bold;
+       font-weight: bold;
 }
 
 .login_failure_header {
-       text-align                      : center;
-       background-color        : #ddeedd;
-       font-weight                     : bold;
+       text-align: center;
+       background-color: #ddeedd;
+       font-weight: bold;
 }
 
 .login_failures {
-       text-align                      : center;
-       width                           : 400px;
+       text-align: center;
+       width: 400px;
 }
 
-.member_skyscraper, .guest_skyscraper {
-       width                           : 122px;
-       height                          : 602px;
-       border                          : 1px solid #AA0044;
-       margin                          : 0px;
-       padding                         : 0px;
-       padding-top                     : 1px;
+.member_skyscraper,.guest_skyscraper {
+       width: 122px;
+       height: 602px;
+       border: 1px solid #AA0044;
+       margin: 0px;
+       padding: 0px;
+       padding-top: 1px;
 }
 
-ul.admin_menu_main, ul.admin_menu_sub {
-       list-style                      : none inside;
-       padding-left            : 10px;
-}
+ul.admin_menu_main,ul.admin_menu_sub {
+       list-style: none inside;
+       padding-left: 10px;
+}
\ No newline at end of file
index 7e2a63c821e07a052901a0954b1eb0126dc17995..672d471d1c37c5b13fb7a6871905c3d60e68ed8c 100644 (file)
@@ -1,82 +1,84 @@
 .install_fatal {
-       text-align                      : left;
-       color                           : #00AA00;
+       text-align: left;
+       color: #00AA00;
 }
 
 .install_select {
-       border                          : dashed 1px #00AA00;
-       background-color        : #F0F0F5;
+       border: dashed 1px #00AA00;
+       background-color: #F0F0F5;
 }
+
 .install_normal {
-       border-style            : solid;
-       border                          : dashed 1px #00AA00;
+       border-style: solid;
+       border: dashed 1px #00AA00;
 }
 
 .install_submit {
-       border-style            : groove;
+       border-style: groove;
 }
 
 .install {
+       
 }
 
 .install_main {
-       color                           : #111188;
-       background-color        : #DDEEDD;
-       text-decoration         : none;
+       color: #111188;
+       background-color: #DDEEDD;
+       text-decoration: none;
 }
 
 .install_header {
-       color                           : #F76300;
-       background-color        : #CCDDCC;
-       font-size                       : 20px;
-       text-decoration         : underline;
-       height                          : 30px;
-       padding-top                     : 5px;
-       padding-bottom          : 5px;
+       color: #F76300;
+       background-color: #CCDDCC;
+       font-size: 20px;
+       text-decoration: underline;
+       height: 30px;
+       padding-top: 5px;
+       padding-bottom: 5px;
 }
 
 .install_fatal {
-       background-color        : #DDEEDD;
-       color                           : #AA0000;
+       background-color: #DDEEDD;
+       color: #AA0000;
 }
 
 .install_fatalcontent {
-       text-align                      : left;
-       background-color        : #DDEEDD;
+       text-align: left;
+       background-color: #DDEEDD;
 }
 
 .install_error {
-       font-size                       : 20px;
-       color                           : #AA0000;
+       font-size: 20px;
+       color: #AA0000;
 }
 
 .install_finished {
-       font-size                       : 20px;
-       color                           : #00AA00;
+       font-size: 20px;
+       color: #00AA00;
 }
 
 .install_security {
-       color                           : #AA0000;
-       width                           : 350px;
-       padding-top                     : 10px;
-       padding-bottom          : 10px;
+       color: #AA0000;
+       width: 350px;
+       padding-top: 10px;
+       padding-bottom: 10px;
 }
 
 .install_welcome {
-       color                           : #0000CC;
-       padding-top                     : 5px;
-       padding-bottom          : 10px;
-       font-size                       : 16px;
+       color: #0000CC;
+       padding-top: 5px;
+       padding-bottom: 10px;
+       font-size: 16px;
 }
 
 .install_text {
-       color                           : #000000;
-       padding-bottom          : 10px;
-       text-align                      : left;
-       margin-left                     : 20px;
-       margin-right            : 20px;
+       color: #000000;
+       padding-bottom: 10px;
+       text-align: left;
+       margin-left: 20px;
+       margin-right: 20px;
 }
 
 .install_footer {
-       padding-bottom          : 10px;
-}
+       padding-bottom: 10px;
+}
\ No newline at end of file
index 3bb9dbe9d768805cc5371b9110d92146673b4bba..abc9490084710cb64178538ff97a75cca77a6e95 100644 (file)
@@ -1,78 +1,80 @@
 .register_submit {
-       border-style            : outset;
+       border-style: outset;
 }
 
 .register_reset {
-       border-style            : groove;
-       border                          : solid 1px #009900;
-       color                           : #AA0044;
+       border-style: groove;
+       border: solid 1px #009900;
+       color: #AA0044;
 }
+
 .register_submit {
-       color                           : #AA0044;
-       border-color            : #009900;
+       color: #AA0044;
+       border-color: #009900;
 }
 
 .register_select {
-       border                          : dotted 1px #009900;
-       background-color        : #EEFFEE;
+       border: dotted 1px #009900;
+       background-color: #EEFFEE;
 }
 
 .register_failed {
-       color                           : #00AA00;
+       color: #00AA00;
 }
 
 .register_snote {
-       font-size                       : 12px;
+       font-size: 12px;
 }
 
 .register_normal {
-       border-style            : solid;
-       border                          : dotted 1px #009900;
+       border-style: solid;
+       border: dotted 1px #009900;
 }
 
 .register_main {
-       background-color        : #DDEEDD;
-       width                           : 540px;
+       background-color: #DDEEDD;
+       width: 540px;
 }
 
 .register_done2 {
-       height                          : 40px;
-       color                           : #009900;
-       background-color        : #eeffbc;
-       width                           : 500px;
+       height: 40px;
+       color: #009900;
+       background-color: #eeffbc;
+       width: 500px;
 }
 
 .register_title {
-       text-align                      : center;
-       font-size                       : 18px;
+       text-align: center;
+       font-size: 18px;
 }
 
 .register_seperator {
-       height                          : 7px;
-       font-size                       : 1px;
+       height: 7px;
+       font-size: 1px;
 }
 
 .register_left {
-       text-align                      : right;
-       margin-right            : 2px;
-       color                           : #0000AA;
-       font-weight                     : bold;
-       font-size                       : 14px;
+       text-align: right;
+       margin-right: 2px;
+       color: #0000AA;
+       font-weight: bold;
+       font-size: 14px;
 }
 
 .register_right {
+       
 }
 
 .register_header {
-       text-align                      : center;
-       background-color        : #eeffbc;
-       color                           : #0000AA;
-       font-weight                     : bold;
-       border-top                      : 1px dotted #AA0044;
-       border-bottom           : 1px dotted #AA0044;
-       height                          : 25px;
+       text-align: center;
+       background-color: #eeffbc;
+       color: #0000AA;
+       font-weight: bold;
+       border-top: 1px dotted #AA0044;
+       border-bottom: 1px dotted #AA0044;
+       height: 25px;
 }
 
 .register_term {
-       background-color        : #AA0044;
-}
+       background-color: #AA0044;
+}
\ No newline at end of file
index a693fd5be62e327e33abf2f4486589929e5804d3..c82257994c69f272d3314cbcb2b1caf1edf58fa5 100644 (file)
@@ -1,16 +1,16 @@
 .sponsor_table {
-       background-color        : #DDEEDD;
+       background-color: #DDEEDD;
 }
 
-.sponsor_header, .sponsor_footer {
-       background-color        : #CCDDCC;
+.sponsor_header,.sponsor_footer {
+       background-color: #CCDDCC;
 }
 
 .sponsor_action {
-       background-color        : #CCDDCC;
-       height                  : 25px;
+       background-color: #CCDDCC;
+       height: 25px;
 }
 
 .sponsor_what {
-       height                  : 24px;
-}
+       height: 24px;
+}
\ No newline at end of file
index 5baf67cfe6d40bcf59de0d0144ed864d1b2d9b35..95a4184b7e629290a6627d8c54a90a1ba26ed050 100644 (file)
@@ -1,21 +1,39 @@
 .surfbar_banner {
+       
 }
+
 .surfbar_table {
+       
 }
+
 .surfbar_td {
+       
 }
+
 .surfbar_points {
+       
 }
+
 #surfbar_restart {
+       
 }
+
 #surfbar_counter {
+       
 }
+
 #counter_word {
+       
 }
+
 .surfbar_reload {
+       
 }
+
 .surfbar_max {
+       
 }
+
 .surfbar_points {
-       font-weight             : bold;
-}
+       font-weight: bold;
+}
\ No newline at end of file
index 3737a9f4ea62ef7a837f5164c6842a59af8ea7bc..d884cc73148c83d5f008b6e13d9b407502e56714 100644 (file)
@@ -1,9 +1,9 @@
-.top10_row1, .top10_row2, .top10_row3, .top10_row4, .top10_row5 {
-       text-align    : center;
-       padding-left  : 5px;
-       padding-right : 5px;
+.top10_row1,.top10_row2,.top10_row3,.top10_row4,.top10_row5 {
+       text-align: center;
+       padding-left: 5px;
+       padding-right: 5px;
 }
 
-.top10_row2, .top10_row4 {
-       text-align : left;
-}
+.top10_row2,.top10_row4 {
+       text-align: left;
+}
\ No newline at end of file
index 3707b5d21a2a545c81cfe6d2816758d919d5ff1b..5556b5da9d77b0cada5e4b5b637d5dec14edcf26 100644 (file)
@@ -1,12 +1,12 @@
-.transfer_row1, .transfer_row3 {
-       text-align  : center;
-       font-weight : bold;
+.transfer_row1,.transfer_row3 {
+       text-align: center;
+       font-weight: bold;
 }
 
 .transfer_row2 {
-       text-align  : center;
+       text-align: center;
 }
 
-.transfer_row4, .transfer_row5 {
+.transfer_row4,.transfer_row5 {
        padding-left: 2px;
-}
+}
\ No newline at end of file
index 597694b31ce09250a636cdf7dabc85852d48b09e..3452e5920a2198cca7feb5fa2c82e73e938790be 100644 (file)
@@ -65,11 +65,11 @@ if (empty($GLOBALS['theme_mode'])) $GLOBALS['theme_mode'] = 'load';
 
 switch ($GLOBALS['theme_mode'])
 {
-case 'test': // Do stuff while testing the theme: The admin clicked on 'Import'
-       break;
+       case 'test': // Do stuff while testing the theme: The admin clicked on 'Import'
+               break;
 
-case 'load': // Do stuff while theme is loaded normally
-       break;
+       case 'load': // Do stuff while theme is loaded normally
+               break;
 }
 //
 ?>
index 478e711f42ec8c8289d073bce8ea8c2fbf4e8c4e..7a41f23f21d0b5438cf23389277b40d2ce906fd9 100644 (file)
@@ -1,9 +1,9 @@
-.active_row1, .active_row2, .active_row3 {
-       text-align : center;
-       padding-left  : 5px;
-       padding-right : 5px;
+.active_row1,.active_row2,.active_row3 {
+       text-align: center;
+       padding-left: 5px;
+       padding-right: 5px;
 }
 
 .active_row2 {
-       text-align : left;
-}
+       text-align: left;
+}
\ No newline at end of file
index ece151a9f9c3f8952e7c5d473f2d886fd9778fc7..c76606a314bb3eabace34a1eebd46d8f8487cf28 100644 (file)
@@ -6,4 +6,4 @@
        background-color: #DDDDAA;
        padding-left: 10px;
        padding-right: 10px;
-}
+}
\ No newline at end of file
index 66f7b6f2587dbea1c54813b78373d000c6621bbb..9ad71cef338eee94a1d584d647ae679b6e1b70a5 100644 (file)
@@ -1,13 +1,13 @@
 .bonus_rank_1 {
-       font-weight : bold;
-       font-size   : 22px;
+       font-weight: bold;
+       font-size: 22px;
 }
 
 .bonus_rank_2 {
-       font-weight : bold;
-       font-size   : 18px;
+       font-weight: bold;
+       font-size: 18px;
 }
 
 .bonus_rank_3 {
-       font-weight : bold;
-}
+       font-weight: bold;
+}
\ No newline at end of file
index 45254c6396d7c1b489dc917922cca822c43cdfb4..299f71be33c52fdf2849049525ed95ae7b12532f 100644 (file)
@@ -1,25 +1,27 @@
 .doubler_table {
+       
 }
 
 .doubler_main {
+       
 }
 
 .doubler_error {
-       font-weight     : bold;
-       color           : #AA0000;
+       font-weight: bold;
+       color: #AA0000;
 }
 
 .doubler_big_row {
-       height          : 70px;
+       height: 70px;
 }
 
 .doubler_header {
-     text-align          : center;
-     height              : 24px;
-     background-color    : #DDDDAA;
+       text-align: center;
+       height: 24px;
+       background-color: #DDDDAA;
 }
 
 .doubler_footer {
-     height              : 24px;
-     background-color    : #DDDDAA;
-}
+       height: 24px;
+       background-color: #DDDDAA;
+}
\ No newline at end of file
index 2cc02a2515ef605648b3c93377f7f54400d3f991..d7fccc21fdc53d0e4086fd401173373e9a98734f 100644 (file)
 body {
-       background-color        : #FFFFCC;
-       color                           : #880000;
-       font-family                     : Verdana, Arial, Geneva, Helvetica, sans-serif;
-       font-size                       : 12px;
-       letter-spacing      : 1px;
-
-       margin                  : 0px;
-       margin-left             : 0px;
-       margin-right            : 0px;
-       margin-top              : 0px;
-       margin-bottom           : 0px;
+       background-color: #FFFFCC;
+       color: #880000;
+       font-family: Verdana, Arial, Geneva, Helvetica, sans-serif;
+       font-size: 12px;
+       letter-spacing: 1px;
+       margin: 0px;
+       margin-left: 0px;
+       margin-right: 0px;
+       margin-top: 0px;
+       margin-bottom: 0px;
 }
 
 table {
-       table-layout            : auto;
-       border-spacing          : 0px;
-       overflow                        : auto;
+       table-layout: auto;
+       border-spacing: 0px;
+       overflow: auto;
 }
 
 A {
-       font-style              : normal;
-       text-decoration : none;
+       font-style: normal;
+       text-decoration: none;
 }
 
 A:link {
-       color                   : #880000;
+       color: #880000;
 }
 
 A:visited {
-       color                   : #880000;
+       color: #880000;
 }
 
 A:active {
-       color                   : #880000;
-       background-color        : transparent;
+       color: #880000;
+       background-color: transparent;
 }
 
 A:hover {
-       background-color        : transparent;
+       background-color: transparent;
 }
 
-input, textarea, select, option {
-       color                           : #880000;
-       background-color        : #FFFFCC;
-       border                          : 1px solid #880000;
-       text-decoration         : none;
+input,textarea,select,option {
+       color: #880000;
+       background-color: #FFFFCC;
+       border: 1px solid #880000;
+       text-decoration: none;
 }
 
-ul, ol {
-       margin-top              : 0px;
-       margin-bottom           : 0px;
+ul,ol {
+       margin-top: 0px;
+       margin-bottom: 0px;
 }
 
-.admin_reset, .guest_reset, .member_reset {
-       border-style            : groove;
-       border                          : solid 1px #880000;
-       color                           : #880000;
-       cursor                          : pointer;
+.admin_reset,.guest_reset,.member_reset {
+       border-style: groove;
+       border: solid 1px #880000;
+       color: #880000;
+       cursor: pointer;
 }
 
-.admin_submit, .guest_submit, .member_submit {
-       color                           : #880000;
-       border-color            : #880000;
-       cursor                          : pointer;
+.admin_submit,.guest_submit,.member_submit {
+       color: #880000;
+       border-color: #880000;
+       cursor: pointer;
 }
 
 .admin_submit_reject {
-       border-style            : groove;
-       color                           : #880000;
-       border-color            : #880000;
-       cursor                          : pointer;
+       border-style: groove;
+       color: #880000;
+       border-color: #880000;
+       cursor: pointer;
 }
 
-.runtime_fatal, .runtime_fatalcontent {
-       color                           : #880000;
-       background-color        : #FFFFCC;
+.runtime_fatal,.runtime_fatalcontent {
+       color: #880000;
+       background-color: #FFFFCC;
 }
 
 .runtime_fatal {
-       color                           : #880000;
+       color: #880000;
 }
 
 .runtime_fatalcontent {
-       text-align                      : left;
-       font-size                       : 12px;
+       text-align: left;
+       font-size: 12px;
 }
 
 .admin {
-       color                           : #880000;
-       background-color        : #FFFFCC;
+       color: #880000;
+       background-color: #FFFFCC;
 }
 
 .admin_note {
-       color                           : #880000;
-       font-size                       : 12px;
+       color: #880000;
+       font-size: 12px;
 }
 
 DIV.admin_note {
-       padding-top                     : 10px;
-       padding-right           : 10px;
-       padding-left            : 10px;
+       padding-top: 10px;
+       padding-right: 10px;
+       padding-left: 10px;
 }
 
 .admin_fatal {
-       color                           : #880000;
-       font-size                       : 18px;
+       color: #880000;
+       font-size: 18px;
 }
 
-.admin_edit, .member_confirm {
-       background-color        : #FFFFCC;
+.admin_edit,.member_confirm {
+       background-color: #FFFFCC;
 }
 
 .member_banner {
-       background-color        : #FFFFCC;
-       width                           : 488px;
+       background-color: #FFFFCC;
+       width: 488px;
 }
 
 .admin_error {
-       background-color        : #FFFFCC;
-       color                   : #880000;
-       font-size                       : 10px;
+       background-color: #FFFFCC;
+       color: #880000;
+       font-size: 10px;
 }
 
-.admin_select, .guest_select, .member_select {
-       border                          : solid 1px #880000;
-       background-color        : #DDDDAA;
+.admin_select,.guest_select,.member_select {
+       border: solid 1px #880000;
+       background-color: #DDDDAA;
 }
 
-.admin_register, .admin_desc_header, .admin_done, .admin_title, .member_title2, .guest_title2, .admin_message {
-       background-color        : #DDDDAA;
-       color                   : #880000;
-       text-align              : center;
+.admin_register,.admin_desc_header,.admin_done,.admin_title,.member_title2,.guest_title2,.admin_message
+       {
+       background-color: #DDDDAA;
+       color: #880000;
+       text-align: center;
 }
 
-.member_done, .guest_done {
-       color                   : #880000;
+.member_done,.guest_done {
+       color: #880000;
 }
 
 .member_misc {
-       background-color        : #FFFFCC;
+       background-color: #FFFFCC;
 }
 
-.admin_misc, .member_misc {
-       color                   : #880000;
+.admin_misc,.member_misc {
+       color: #880000;
 }
 
 .admin_done2 {
-       color                   : #880000;
+       color: #880000;
 }
 
-.admin_green, .admin_no {
-       color                   : #880000;
+.admin_green,.admin_no {
+       color: #880000;
 }
 
 .admin_welcome {
-       background-color        : #DDDDAA;
-       color                   : #880000;
-       vertical-align          : middle;
-       font-size                       : 18px;
-       height                  : 50px;
+       background-color: #DDDDAA;
+       color: #880000;
+       vertical-align: middle;
+       font-size: 18px;
+       height: 50px;
 }
 
 .admin_header {
-       background-color        : #DDDDAA;
+       background-color: #DDDDAA;
 }
 
 .admin_menu {
-       background-color        : #DDDDAA;
-       color                   : #880000;
-       width                   : 230px;
+       background-color: #DDDDAA;
+       color: #880000;
+       width: 230px;
 }
 
 .admin_logout {
-       background-color        : #CCCCAA;
-       color                   : #880000;
+       background-color: #CCCCAA;
+       color: #880000;
 }
 
 .admin_desc_cont {
-       text-align              : left;
-       background-color        : #FFFFCC;
+       text-align: left;
+       background-color: #FFFFCC;
 }
 
-.admin_table, .member_table {
-       background-color        : #FFFFCC;
+.admin_table,.member_table {
+       background-color: #FFFFCC;
 }
 
 .admin_editmenu {
-       min-width                       : 500px;
-       max-width                       : 90%;
+       min-width: 500px;
+       max-width: 90%;
 }
 
 .admin_form_header {
-       text-align          : center;
-       height                  : 36px;
-       background-color        : #DDDDAA;
-       color                   : #880000;
+       text-align: center;
+       height: 36px;
+       background-color: #DDDDAA;
+       color: #880000;
 }
 
 .member_header {
-       text-align          : center;
-       height                  : 28px;
-       background-color        : #DDDDAA;
+       text-align: center;
+       height: 28px;
+       background-color: #DDDDAA;
 }
 
-.admin_failed, .guest_failed, .member_failed, .member_note {
-       color                   : #880000;
+.admin_failed,.guest_failed,.member_failed,.member_note {
+       color: #880000;
 }
 
 .member_note_bg {
-       background-color        : #FFFFCC;
+       background-color: #FFFFCC;
 }
 
 .member_data {
-       background-color        : #FFFFCC;
-       color                   : #880000;
-       height                  : 20px;
+       background-color: #FFFFCC;
+       color: #880000;
+       height: 20px;
 }
 
 .admin_header_b1 {
-       border-bottom           : 1px solid #880000;
-       background-color        : #DDDDAA;
-       height                  : 22px;
+       border-bottom: 1px solid #880000;
+       background-color: #DDDDAA;
+       height: 22px;
 }
 
 .admin_snote {
-       font-size                       : 12px;
+       font-size: 12px;
 }
 
-.admin_normal, .guest_normal, .member_normal {
-       border-style            : solid;
-       border                          : solid 1px #880000;
-       background-color        : #DDDDAA;
+.admin_normal,.guest_normal,.member_normal {
+       border-style: solid;
+       border: solid 1px #880000;
+       background-color: #DDDDAA;
 }
 
 .member_stats {
-       vertical-align          : top;
-       font-weight             : bold;
-       height                  : 23px;
-       font-size                       : 16px;
-       border-style            : none;
-       border                  : 0px;
-       background          : #FFFFCC;
-       color                   : #880000;
-       margin-top              : -4px;
-       margin-bottom           : 1px;
-       cursor                  : default;
+       vertical-align: top;
+       font-weight: bold;
+       height: 23px;
+       font-size: 16px;
+       border-style: none;
+       border: 0px;
+       background: #FFFFCC;
+       color: #880000;
+       margin-top: -4px;
+       margin-bottom: 1px;
+       cursor: default;
 }
 
 .normal {
-       border-style            : groove;
+       border-style: groove;
 }
 
 .member_main {
-       background-color        : #FFFFCC;
+       background-color: #FFFFCC;
 }
 
-.guest_title, .member_title {
-       text-align              : center;
-       color                   : #880000;
-       vertical-align          : middle;
-       background-color        : #DDDDAA;
-       height                  : 60px;
+.guest_title,.member_title {
+       text-align: center;
+       color: #880000;
+       vertical-align: middle;
+       background-color: #DDDDAA;
+       height: 60px;
 }
 
 .guest_login_header {
-       color                   : #880000;
-       vertical-align          : middle;
-       background-color        : #DDDDAA;
+       color: #880000;
+       vertical-align: middle;
+       background-color: #DDDDAA;
 }
 
-.guest_menu, .member_menu {
-       width                   : 220px;
-       background-color        : #FFFFCC;
-       vertical-align          : top;
+.guest_menu,.member_menu {
+       width: 220px;
+       background-color: #FFFFCC;
+       vertical-align: top;
 }
 
-.guest_menu_title, .member_menu_title {
-       background-color        : #DDDDAA;
-       color                   : #880000;
-       height                  : 25px;
-       width                   : 200px;
-       border                  : 1px solid #880000;
+.guest_menu_title,.member_menu_title {
+       background-color: #DDDDAA;
+       color: #880000;
+       height: 25px;
+       width: 200px;
+       border: 1px solid #880000;
 }
 
-.guest_menu_row, .guest_menu_bottom, .member_menu_row, .member_menu_bottom {
-       border                  : 1px solid #880000;
-       border-top              : 0px;
-       background-color        : #FFFFCC;
-       height                  : 22px;
-       text-align              : left;
+.guest_menu_row,.guest_menu_bottom,.member_menu_row,.member_menu_bottom
+       {
+       border: 1px solid #880000;
+       border-top: 0px;
+       background-color: #FFFFCC;
+       height: 22px;
+       text-align: left;
 }
 
-.guest_menu_seperator, .member_menu_seperator {
-       height                  : 15px;
+.guest_menu_seperator,.member_menu_seperator {
+       height: 15px;
 }
 
-.guest_content, .member_content {
-       background-color        : #FFFFCC;
-       width                   : 99%;
-       padding-left            : 2px;
-       padding-right           : 2px;
-       margin-left             : 5px;
-       margin-right            : 5px;
+.guest_content,.member_content {
+       background-color: #FFFFCC;
+       width: 99%;
+       padding-left: 2px;
+       padding-right: 2px;
+       margin-left: 5px;
+       margin-right: 5px;
 }
 
-.guest_advert, .guest_login, .member_advert, .member_login {
-       background-color        : #FFFFCC;
-       vertical-align          : top;
-       margin-top              : 10px;
+.guest_advert,.guest_login,.member_advert,.member_login {
+       background-color: #FFFFCC;
+       vertical-align: top;
+       margin-top: 10px;
 }
 
 #master {
-       width                           : 100%;
-       height                          : 100%;
-       min-height                      : 90%;
-       max-height                      : 100%;
-       vertical-align          : top;
+       width: 100%;
+       height: 100%;
+       min-height: 90%;
+       max-height: 100%;
+       vertical-align: top;
 }
 
 .masterbox {
-       text-align                      : center;
+       text-align: center;
 }
 
 .footer_lines {
-       vertical-align          : bottom;
-       font-size                       : 10px;
-       width                           : 380px;
-       vertical-align          : middle;
-       background-color        : #FFFFCC;
-       height                          : 40px;
+       vertical-align: bottom;
+       font-size: 10px;
+       width: 380px;
+       vertical-align: middle;
+       background-color: #FFFFCC;
+       height: 40px;
 }
 
 .footer_box {
-       text-align                      : center;
-       width                           : 760px;
+       text-align: center;
+       width: 760px;
 }
 
 .dashed {
-       border                          : solid 1px #880000;
+       border: solid 1px #880000;
 }
 
-.switch_sw1, .switch_mem1 {
-       background-color        : #FFFFCC;
+.switch_sw1,.switch_mem1 {
+       background-color: #FFFFCC;
 }
 
-.switch_sw2, .switch_mem2 {
-       background-color        : #FFFFCC;
+.switch_sw2,.switch_mem2 {
+       background-color: #FFFFCC;
 }
 
 .impressum {
-       font-size                       : 12px;
-       width                           : 320px;
-       vertical-align          : middle;
-       background-color        : #FFFFCC;
-       height                          : 70px;
+       font-size: 12px;
+       width: 320px;
+       vertical-align: middle;
+       background-color: #FFFFCC;
+       height: 70px;
 }
 
 .mediadata {
-       background-color        : #FFFFCC;
+       background-color: #FFFFCC;
 }
 
-.media_header, .impressum_header {
-       background-color        : #DDDDAA;
-       text-align                      : center;
-       color                           : #880000;
-       height                          : 26px;
-       font-weight                     : bold;
-       font-size                       : 20px;
+.media_header,.impressum_header {
+       background-color: #DDDDAA;
+       text-align: center;
+       color: #880000;
+       height: 26px;
+       font-weight: bold;
+       font-size: 20px;
 }
 
 .media_left {
-       font-size                       : 14px;
-       width                           : 200px;
+       font-size: 14px;
+       width: 200px;
 }
 
 .media_right {
-       color                   : #880000;
-       font-weight             : bold;
-       font-size                       : 14px;
-       width                   : 70px;
+       color: #880000;
+       font-weight: bold;
+       font-size: 14px;
+       width: 70px;
 }
 
 .admin_sep_footer {
-       background-color        : #DDDDAA;
-       font-size           : 1px;
+       background-color: #DDDDAA;
+       font-size: 1px;
 }
 
 .admin_sep_footer2 {
-       background-color        : #DDDDAA;
-       font-size           : 1px;
+       background-color: #DDDDAA;
+       font-size: 1px;
 }
 
-.admin_footer, .member_refbanner, .member_update, .admin_del_link {
-       background-color        : #DDDDAA;
+.admin_footer,.member_refbanner,.member_update,.admin_del_link {
+       background-color: #DDDDAA;
 }
 
 .member_footer {
-       height                  : 30px;
-       background-color        : #DDDDAA;
+       height: 30px;
+       background-color: #DDDDAA;
 }
 
 .admin_footer {
-       text-align              : center;
-       height                  : 30px
+       text-align: center;
+       height: 30px
 }
 
 .admin_task_header {
-       background-color        : #DDDDAA;
-       color                   : #880000;
-       vertical-align          : middle;
-       font-size                       : 18px;
-       height                  : 35px;
+       background-color: #DDDDAA;
+       color: #880000;
+       vertical-align: middle;
+       font-size: 18px;
+       height: 35px;
 }
 
 .seperator {
-       font-size                       : 1px
+       font-size: 1px
 }
 
 .tab1 {
-       text-align              : center
+       text-align: center
 }
 
-.admin_delete, .admin_yes {
-       border-style            : groove;
-       border                          : solid 1px #880000;
-       background-color        : #880000;
-       color                           : #FFFFCC;
-       cursor                          : pointer;
+.admin_delete,.admin_yes {
+       border-style: groove;
+       border: solid 1px #880000;
+       background-color: #880000;
+       color: #FFFFCC;
+       cursor: pointer;
 }
 
 .guest_stats {
-       background-color        : #FFFFCC;
-       width                   : 460px;
+       background-color: #FFFFCC;
+       width: 460px;
 }
 
 .guest_stats_title {
-       color                   : #880000;
-       vertical-align          : middle;
-       background-color        : #DDDDAA;
-       height                  : 30px;
+       color: #880000;
+       vertical-align: middle;
+       background-color: #DDDDAA;
+       height: 30px;
 }
 
 .guest_stats_l {
-       width                   : 344px;
-       text-align              : right;
+       width: 344px;
+       text-align: right;
 }
 
 .guest_stats_m {
-       width                   : 2px;
+       width: 2px;
 }
 
-.guest_stats_r, .guest_stats_lr, .guest_stats_rr {
-       color                   : #880000;
-       width                   : 28px;
-       font-weight             : bold;
-       text-align              : center;
+.guest_stats_r,.guest_stats_lr,.guest_stats_rr {
+       color: #880000;
+       width: 28px;
+       font-weight: bold;
+       text-align: center;
 }
 
-.guest_stats_ll, .guest_stats_rl {
-       width                   : 192px;
-       text-align              : right;
+.guest_stats_ll,.guest_stats_rl {
+       width: 192px;
+       text-align: right;
 }
 
 .guest_stats_footer {
-       color                   : #880000;
-       vertical-align          : middle;
-       background-color        : #DDDDAA;
-       height                  : 20px;
+       color: #880000;
+       vertical-align: middle;
+       background-color: #DDDDAA;
+       height: 20px;
 }
 
 .task_pre {
-       font-weight             : bold;
-       margin-left             : 0px;
-       margin-right            : 0px;
-       margin-top              : 10px;
-       margin-bottom           : 10px;
+       font-weight: bold;
+       margin-left: 0px;
+       margin-right: 0px;
+       margin-top: 10px;
+       margin-bottom: 10px;
 }
 
 .impressum_body {
-       background-color        : #FFFFCC;
+       background-color: #FFFFCC;
 }
 
-.guest_content_align, .member_content_align, .admin_content_align {
-       text-align              : center;
-       vertical-align          : top;
+.guest_content_align,.member_content_align,.admin_content_align {
+       text-align: center;
+       vertical-align: top;
 }
 
 .member_mailidtop {
-       background-color        : #FFFFCC;
-       width                   : 100%;
-       height                  : 100%;
+       background-color: #FFFFCC;
+       width: 100%;
+       height: 100%;
 }
 
-.list_categories, .admin_action_header, .admin_main, .admin_menu_main, .admin_menu_sub {
-       text-align              : left;
-       width                   : 100%;
+.list_categories,.admin_action_header,.admin_main,.admin_menu_main,.admin_menu_sub
+       {
+       text-align: left;
+       width: 100%;
 }
 
 .member_unconfirmed {
-       background-color        : #FFFFCC;
-       width                   : 100%;
-       text-align              : center;
+       background-color: #FFFFCC;
+       width: 100%;
+       text-align: center;
 }
 
 .you_are_here {
-       white-space             : nowrap;
-       font-size                       : 14px;
-       text-align              : left;
+       white-space: nowrap;
+       font-size: 14px;
+       text-align: left;
+}
+
+.tiny {
+       font-size: 12px;
 }
 
-.tiny   { font-size            : 12px; }
-.medium { font-size            : 14px; }
-.big    { font-size            : 20px; }
+.medium {
+       font-size: 14px;
+}
 
-.top    { border-top   : 1px solid #880000; }
-.bottom { border-bottom        : 1px solid #880000; }
-.left   { border-left  : 1px solid #880000; }
-.right  { border-right : 1px solid #880000; }
+.big {
+       font-size: 20px;
+}
 
-.top2    { border-top  : 1px solid #880000; }
-.bottom2 { border-bottom       : 1px solid #880000; }
-.left2   { border-left : 1px solid #880000; }
-.right2  { border-right        : 1px solid #880000; }
+.top {
+       border-top: 1px solid #880000;
+}
+
+.bottom {
+       border-bottom: 1px solid #880000;
+}
+
+.left {
+       border-left: 1px solid #880000;
+}
+
+.right {
+       border-right: 1px solid #880000;
+}
+
+.top2 {
+       border-top: 1px solid #880000;
+}
+
+.bottom2 {
+       border-bottom: 1px solid #880000;
+}
+
+.left2 {
+       border-left: 1px solid #880000;
+}
+
+.right2 {
+       border-right: 1px solid #880000;
+}
 
 .nobr {
-       white-space             : nowrap;
+       white-space: nowrap;
 }
 
 .guest_table {
-       background-color    : #FFFFCC;
+       background-color: #FFFFCC;
 }
 
 .main {
-       height                  : 99%;
-       vertical-align  : top;
+       height: 99%;
+       vertical-align: top;
 }
 
 .footer {
-       height                          : 1%;
-       vertical-align          : bottom;
+       height: 1%;
+       vertical-align: bottom;
 }
 
 .menu_blur {
-       display                 : block;
+       display: block;
 }
 
 .menu_blur:hover {
-       background-color        : #DDDDAA;
+       background-color: #DDDDAA;
 }
 
 .guest_footer {
-       height              : 30px;
-       background-color    : #DDDDAA;
+       height: 30px;
+       background-color: #DDDDAA;
 }
 
 .admin_alpha {
-       text-align      : center;
-       height          : 40px;
-       vertical-align  : middle;
+       text-align: center;
+       height: 40px;
+       vertical-align: middle;
 }
 
 .admin_sortlinks {
-       text-align      : center;
-       height          : 20px;
-       vertical-align  : middle;
+       text-align: center;
+       height: 20px;
+       vertical-align: middle;
 }
 
 .disabled {
-       border-style            : groove;
-       background-color        : #AAAAAA;
-       color                           : #FFFFCC;
+       border-style: groove;
+       background-color: #AAAAAA;
+       color: #FFFFCC;
 }
 
 .mini_select {
-       border              : solid 1px #880000;
-       background-color    : #DDDDAA;
-       font-size           : 10px;
+       border: solid 1px #880000;
+       background-color: #DDDDAA;
+       font-size: 10px;
 }
 
 .theme_box {
-       border              : 1px solid #880000;
-       border-top          : 0px;
-       width               : 100%;
-       height              : 70px;
-       background-color    : #FFFFCC;
+       border: 1px solid #880000;
+       border-top: 0px;
+       width: 100%;
+       height: 70px;
+       background-color: #FFFFCC;
 }
 
 .theme_note {
-       font-size           : 12px;
-       font-weight         : bold;
+       font-size: 12px;
+       font-weight: bold;
 }
 
 .theme_content {
-       color               : #880000;
+       color: #880000;
 }
 
 .admin_title2 {
-       font-weight             : bold;
-       padding                 : 4px;
-       background-color        : #DDDDAA;
-       color                   : #880000;
-       text-align              : center;
-       font-size                       : 14px;
+       font-weight: bold;
+       padding: 4px;
+       background-color: #DDDDAA;
+       color: #880000;
+       text-align: center;
+       font-size: 14px;
 }
 
 .agb_box {
-       text-align      : left;
+       text-align: left;
 }
 
-.agb_title, .fatal_title {
-       font-size               : 16px;
-       text-align      : center;
-       height          : 40px;
-       font-weight     : bold;
+.agb_title,.fatal_title {
+       font-size: 16px;
+       text-align: center;
+       height: 40px;
+       font-weight: bold;
 }
 
-.agb_para  {
-       text-indent     : 8px;
-       text-align      : left;
-       margin-left     : 5px;
-       margin-right    : 5px;
-       margin-bottom   : 12px;
+.agb_para {
+       text-indent: 8px;
+       text-align: left;
+       margin-left: 5px;
+       margin-right: 5px;
+       margin-bottom: 12px;
 }
 
 .fatal_box {
-       text-align      : center;
-       width           : 100%;
-       margin-top      : 10px;
+       text-align: center;
+       width: 100%;
+       margin-top: 10px;
 }
 
 .admin_message {
-       margin-bottom   : 15px;
+       margin-bottom: 15px;
 }
 
 #show_timings_block {
-       float                           : left;
-       border                          : solid 1px #880000;
-       background-color        : #DDDDAA;
-       font-size                       : 10px;
-       vertical-align          : middle;
-       width                           : 465px;
-       height                          : 20px;
+       float: left;
+       border: solid 1px #880000;
+       background-color: #DDDDAA;
+       font-size: 10px;
+       vertical-align: middle;
+       width: 465px;
+       height: 20px;
 }
 
 .show_timings_column {
-       background-color        : #FFFFCC;
-       margin-top                      : 2px;
-       width                           : 150px;
-       border                          : solid 1px #880000;
-       height                          : 14px;
+       background-color: #FFFFCC;
+       margin-top: 2px;
+       width: 150px;
+       border: solid 1px #880000;
+       height: 14px;
 }
 
 .show_timings_data {
-       font-weight                     : bold;
+       font-weight: bold;
 }
 
 .login_failure_header {
-       text-align                      : center;
-       background-color        : #DDDDAA;
-       font-weight                     : bold;
+       text-align: center;
+       background-color: #DDDDAA;
+       font-weight: bold;
 }
 
 .login_failures {
-       text-align                      : center;
-       width                           : 400px;
+       text-align: center;
+       width: 400px;
 }
 
-.member_skyscraper, .guest_skyscraper {
-       width                           : 122px;
-       height                          : 602px;
-       border                          : 1px solid #880000;
-       margin                          : 0px;
-       padding                         : 0px;
-       padding-top                     : 1px;
+.member_skyscraper,.guest_skyscraper {
+       width: 122px;
+       height: 602px;
+       border: 1px solid #880000;
+       margin: 0px;
+       padding: 0px;
+       padding-top: 1px;
 }
 
-ul.admin_menu_main, ul.admin_menu_sub {
-       list-style                      : none inside;
-}
+ul.admin_menu_main,ul.admin_menu_sub {
+       list-style: none inside;
+}
\ No newline at end of file
index 08fdae09ba543d15587c0ca4d43ef9ef9fca4386..94f95083db529ad0c09a7aaa4f11dff3e2fc92fd 100644 (file)
@@ -1,12 +1,12 @@
 .help_main {
-       height                  : 100%;
+       height: 100%;
 }
 
 .help_title {
-       background-color        : #DDDDAA;
-       height                  : 100px;
+       background-color: #DDDDAA;
+       height: 100px;
 }
 
 .help_content {
-     background-color    : #DDDDAA;
-}
+       background-color: #DDDDAA;
+}
\ No newline at end of file
index acc2fd896c410cb854c42af7ae2179362458066a..882f7c370caad06cdb8d5017ae3312a57125714f 100644 (file)
@@ -1,79 +1,80 @@
 .install_table {
-       background-color        : #F5F5C5;
+       background-color: #F5F5C5;
 }
 
 .install_msg {
-       color                           : #880000;
-       background-color        : #EDEDBA;
+       color: #880000;
+       background-color: #EDEDBA;
 }
 
 .install_fatal {
-       color                           : #880000;
+       color: #880000;
 }
 
 .install_select {
-       border                          : dashed 1px #880000;
-       background-color        : #DDDDAA;
+       border: dashed 1px #880000;
+       background-color: #DDDDAA;
 }
+
 .install_normal {
-       border-style            : solid;
-       border                          : dashed 1px #880000;
+       border-style: solid;
+       border: dashed 1px #880000;
 }
 
 .install_submit {
-       border-style            : groove;
+       border-style: groove;
 }
 
 .install_main {
-       color                           : #880000;
-       background-color        : #FFFFCC;
-       text-decoration         : none;
+       color: #880000;
+       background-color: #FFFFCC;
+       text-decoration: none;
 }
 
 .install_header {
-       color                           : #880000;
-       background-color        : #DDDDAA;
-       width                           : 400px;
-       height                          : 30px;
-       font-size                       : 20px;
-       text-decoration         : underline;
-       padding-top                     : 5px;
-       padding-bottom          : 5px;
+       color: #880000;
+       background-color: #DDDDAA;
+       width: 400px;
+       height: 30px;
+       font-size: 20px;
+       text-decoration: underline;
+       padding-top: 5px;
+       padding-bottom: 5px;
 }
 
 .install_fatal {
-       background-color        : #FFFFCC;
-       color                           : #880000;
+       background-color: #FFFFCC;
+       color: #880000;
 }
 
 .install_fatalcontent {
-       text-align                      : left;
-       background-color        : #FFFFCC;
+       text-align: left;
+       background-color: #FFFFCC;
 }
 
-.install_error, .install_finished {
-       font-size                       : 20px;
-       color                           : #880000;
+.install_error,.install_finished {
+       font-size: 20px;
+       color: #880000;
 }
 
-.install_security, .install_welcome, .install_text {
-       color                           : #880000;
+.install_security,.install_welcome,.install_text {
+       color: #880000;
 }
 
 .install_text {
-       padding-bottom          : 10px;
-       text-align                      : left;
-       margin-left                     : 20px;
-       margin-right            : 20px;
+       padding-bottom: 10px;
+       text-align: left;
+       margin-left: 20px;
+       margin-right: 20px;
 }
 
 .install_security {
-       width                           : 350px;
-       padding-top                     : 10px;
-       padding-bottom          : 10px;
+       width: 350px;
+       padding-top: 10px;
+       padding-bottom: 10px;
 }
 
 .install_welcome {
-       padding-top                     : 5px;
-       padding-bottom          : 10px;
-}
+       padding-top: 5px;
+       padding-bottom: 10px;
+}
\ No newline at end of file
index da22079e07c78dc532f466ebc0f9dcb59fd250bc..72f78b83fd907d7a36af55dfedbbc0a92713c8be 100644 (file)
@@ -1,8 +1,8 @@
 .paidlinks_errors {
-       margin-left:    5px;
-       margin-right:   5px;
-       margin-top:     5px;
-       margin-bottom:  5px;
-       text-align:     left;
-       align:          left;
-}
+       margin-left: 5px;
+       margin-right: 5px;
+       margin-top: 5px;
+       margin-bottom: 5px;
+       text-align: left;
+       align: left;
+}
\ No newline at end of file
index 0c8428ab151f2bddc7cbca8ea43feb3c507aad0d..260b9d4da07beb7961e3921db950b92dea4e5170 100644 (file)
@@ -1,86 +1,87 @@
 .register_submit {
-       border-style            : outset;
+       border-style: outset;
 }
 
 .register_reset {
-       border-style            : groove;
-       border                  : solid 1px #880000;
-       color                   : #880000;
+       border-style: groove;
+       border: solid 1px #880000;
+       color: #880000;
 }
+
 .register_submit {
-       color                           : #880000;
-       border-color            : #880000;
+       color: #880000;
+       border-color: #880000;
 }
 
 .register_select {
-       border                          : solid 1px #880000;
-       background-color        : #DDDDAA;
+       border: solid 1px #880000;
+       background-color: #DDDDAA;
 }
 
 .register_failed {
-       color                   : #880000;
+       color: #880000;
 }
 
 .register_snote {
-       font-size                       : 12px;
+       font-size: 12px;
 }
 
 .register_normal {
-       border-style            : solid;
-       border                          : solid 1px #880000;
-       padding-right           : 5px;
+       border-style: solid;
+       border: solid 1px #880000;
+       padding-right: 5px;
 }
 
 .register_main {
-       background-color        : #FFFFCC;
-       width                           : 540px;
+       background-color: #FFFFCC;
+       width: 540px;
 }
 
 .register_done2 {
-       height                          : 40px;
-       color                           : #880000;
-       background-color        : #FFFFCC;
-       width                           : 500px;
+       height: 40px;
+       color: #880000;
+       background-color: #FFFFCC;
+       width: 500px;
 }
 
 .register_title {
-       background-color        : #DDDDAA;
-       text-align                      : center;
-       font-size                       : 18px;
-       padding-left            : 5px;
-       padding-right           : 5px;
+       background-color: #DDDDAA;
+       text-align: center;
+       font-size: 18px;
+       padding-left: 5px;
+       padding-right: 5px;
 }
 
 .register_seperator {
-       height                          : 7px;
-       font-size                       : 1px;
+       height: 7px;
+       font-size: 1px;
 }
 
 .register_left {
-       text-align                      : right;
-       margin-right            : 2px;
-       color                           : #880000;
-       font-weight                     : bold;
-       font-size                       : 14px;
-       padding-left            : 5px;
+       text-align: right;
+       margin-right: 2px;
+       color: #880000;
+       font-weight: bold;
+       font-size: 14px;
+       padding-left: 5px;
 }
 
 .register_right {
-       padding-right           : 5px;
+       padding-right: 5px;
 }
 
 .register_header {
-       text-align                      : center;
-       background-color        : #DDDDAA;
-       color                           : #880000;
-       font-weight                     : bold;
-       border-top                      : 1px solid #880000;
-       border-bottom           : 1px solid #880000;
-       height                          : 25px;
+       text-align: center;
+       background-color: #DDDDAA;
+       color: #880000;
+       font-weight: bold;
+       border-top: 1px solid #880000;
+       border-bottom: 1px solid #880000;
+       height: 25px;
 }
 
-A:hover.register_term {
-       background-color        : #DDDDAA;
-       border-top              : 1px solid #880000;
-       border-bottom           : 1px solid #880000;
-}
+A:hover .register_term {
+       background-color: #DDDDAA;
+       border-top: 1px solid #880000;
+       border-bottom: 1px solid #880000;
+}
\ No newline at end of file
index 085ba9c357c47afe6faddec8ecad6c70ae27f289..d7e8438a03b72466cb40b6e62c54527d2bb4ccca 100644 (file)
@@ -1,28 +1,28 @@
 .sponsor_table {
-       background-color        : #FFFFCC;
+       background-color: #FFFFCC;
 }
 
 .sponsor_action {
-       background-color        : #DDDDAA;
-       height                  : 25px;
+       background-color: #DDDDAA;
+       height: 25px;
 }
 
-.sponsor_header, .sponsor_footer {
-       background-color        : #DDDDAA;
+.sponsor_header,.sponsor_footer {
+       background-color: #DDDDAA;
 }
 
 .sponsor_what {
-       background-color        : #FFFFCC;
-       height                  : 24px;
+       background-color: #FFFFCC;
+       height: 24px;
 }
 
 TR.sponsor_row_blur:hover {
-       background-color    : #DDDDAA;
+       background-color: #DDDDAA;
 }
 
 A.sponsor_blur {
-       display                 : block;
-       height                  : 33px;
-       padding-top             : 9px;
-       padding-left            : 7px;
-}
+       display: block;
+       height: 33px;
+       padding-top: 9px;
+       padding-left: 7px;
+}
\ No newline at end of file
index 9759d973642288f5ec04b25e61e9899773e6d4b5..e0e7155d187f6d807f4b269712153213a4ecf29e 100644 (file)
@@ -1,22 +1,39 @@
 .surfbar_banner {
        background-color: #DDDDAA;
 }
+
 .surfbar_table {
+       
 }
+
 .surfbar_td {
+       
 }
+
 .surfbar_points {
+       
 }
+
 #surfbar_restart {
+       
 }
+
 #surfbar_counter {
+       
 }
+
 #counter_word {
+       
 }
+
 .surfbar_reload {
+       
 }
+
 .surfbar_max {
+       
 }
+
 .surfbar_points {
-       font-weight             : bold;
-}
+       font-weight: bold;
+}
\ No newline at end of file
index d50e0ae12b0be5c7411c05264e060db3a1cff26b..d884cc73148c83d5f008b6e13d9b407502e56714 100644 (file)
@@ -1,9 +1,9 @@
-.top10_row1, .top10_row2, .top10_row3, .top10_row4, .top10_row5 {
-       text-align : center;
-       padding-left  : 5px;
-       padding-right : 5px;
+.top10_row1,.top10_row2,.top10_row3,.top10_row4,.top10_row5 {
+       text-align: center;
+       padding-left: 5px;
+       padding-right: 5px;
 }
 
-.top10_row2, .top10_row4 {
-       text-align : left;
-}
+.top10_row2,.top10_row4 {
+       text-align: left;
+}
\ No newline at end of file
index 3707b5d21a2a545c81cfe6d2816758d919d5ff1b..5556b5da9d77b0cada5e4b5b637d5dec14edcf26 100644 (file)
@@ -1,12 +1,12 @@
-.transfer_row1, .transfer_row3 {
-       text-align  : center;
-       font-weight : bold;
+.transfer_row1,.transfer_row3 {
+       text-align: center;
+       font-weight: bold;
 }
 
 .transfer_row2 {
-       text-align  : center;
+       text-align: center;
 }
 
-.transfer_row4, .transfer_row5 {
+.transfer_row4,.transfer_row5 {
        padding-left: 2px;
-}
+}
\ No newline at end of file
index e708ffee73f120223014c18d2df02ccecdafb18b..68c89b65a8edd8de32639e2c3148f79752c1c08d 100644 (file)
@@ -65,11 +65,11 @@ if (empty($GLOBALS['theme_mode'])) $GLOBALS['theme_mode'] = 'load';
 
 switch ($GLOBALS['theme_mode'])
 {
-case 'test': // Do stuff while testing the theme: The admin clicked on 'Import'
-       break;
+       case 'test': // Do stuff while testing the theme: The admin clicked on 'Import'
+               break;
 
-case 'load': // Do stuff while theme is loaded normally
-       break;
+       case 'load': // Do stuff while theme is loaded normally
+               break;
 }
 //
 ?>
index 0834ed3adc514e1883bdc9e2a9a1d388e641475d..a4dae48a75e85c5c213c1d26af8b0e94b2fcec10 100644 (file)
--- a/view.php
+++ b/view.php
@@ -53,12 +53,12 @@ require('inc/config-global.php');
 if (((REQUEST_ISSET_GET(('user'))) || (REQUEST_ISSET_GET(('reseller')))) && (REQUEST_ISSET_GET(('banner')))) {
        // for later things... ;-)
        $result = SQL_QUERY_ESC("SELECT url FROM `{!_MYSQL_PREFIX!}_refbanner` WHERE `id`=%s LIMIT 1",
-               array(bigintval(REQUEST_GET('banner'))), __FILE__, __LINE__);
+       array(bigintval(REQUEST_GET('banner'))), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 1)  {
                list($url) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_refbanner` SET counter=counter+1 WHERE `id`=%s LIMIT 1",
-                       array(bigintval(REQUEST_GET('banner'))), __FILE__, __LINE__);
+               array(bigintval(REQUEST_GET('banner'))), __FILE__, __LINE__);
 
                $type = substr($url, -3);
                sendHeader('Content-Type: image/' . $type);