From 8383fc52cd2340ea1756f9e1808fa3589e27c341 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 5 Mar 2008 21:00:24 +0000 Subject: [PATCH] redirection of invalid or deleted mail orders improved, several code conventions applied --- inc/config.php | 2 +- inc/db/lib-mysql3.php | 6 +- inc/doubler_send.php | 8 +- inc/extensions.php | 2 +- inc/extensions/ext-bonus.php | 4 +- inc/extensions/ext-other.php | 16 ++- inc/extensions/ext-sql_patches.php | 2 +- inc/footer.php | 2 +- inc/functions.php | 40 +++--- inc/gen_sql_patches.php | 2 +- inc/install-inc.php | 2 +- inc/language/de.php | 23 ++-- inc/libs/output_functions.php | 6 +- inc/libs/register_functions.php | 4 +- inc/libs/security_functions.php | 4 +- inc/modules/admin/admin-inc.php | 30 +++-- inc/modules/admin/overview-inc.php | 2 +- inc/modules/admin/what-adminedit.php | 2 +- inc/modules/admin/what-admins_contact.php | 4 +- inc/modules/admin/what-autopurge.php | 8 +- inc/modules/admin/what-config_admin.php | 4 +- inc/modules/admin/what-config_autopurge.php | 4 +- inc/modules/admin/what-config_beg.php | 28 ++--- inc/modules/admin/what-config_birthday.php | 8 +- inc/modules/admin/what-config_bonus.php | 40 +++--- inc/modules/admin/what-config_cache.php | 28 ++--- inc/modules/admin/what-config_doubler.php | 16 +-- inc/modules/admin/what-config_extensions.php | 4 +- inc/modules/admin/what-config_holiday.php | 4 +- inc/modules/admin/what-config_order.php | 4 +- inc/modules/admin/what-config_other.php | 59 +++++---- inc/modules/admin/what-config_points.php | 8 +- inc/modules/admin/what-config_rewrite.php | 4 +- inc/modules/admin/what-guestedit.php | 2 +- inc/modules/admin/what-memedit.php | 4 +- inc/modules/admin/what-repair_amenu.php | 2 +- inc/modules/admin/what-repair_amnu.php | 2 +- inc/modules/admin/what-repair_gmenu.php | 2 +- inc/modules/admin/what-repair_gmnu.php | 2 +- inc/modules/admin/what-repair_mmenu.php | 2 +- inc/modules/admin/what-repair_mmnu.php | 2 +- inc/modules/guest/what-register.php | 2 +- inc/modules/member/what-categories.php | 6 +- inc/modules/member/what-html_mail.php | 4 +- inc/modules/member/what-transfer.php | 15 +-- inc/phpmailer/class.phpmailer.php | 114 +++++++++--------- inc/phpmailer/class.pop3.php | 4 +- inc/phpmailer/examples/test1.php | 2 +- inc/phpmailer/test/phpmailer_test.php | 2 +- inc/phpmailer/test/phpunit.php | 8 +- inc/rdf.class.php | 30 ++--- inc/session.php | 2 +- mailid.php | 57 ++++----- .../de/html/admin/admin_config_other.tpl | 21 +++- templates/de/html/show_timings.tpl | 6 +- 55 files changed, 345 insertions(+), 326 deletions(-) diff --git a/inc/config.php b/inc/config.php index ace37e5d15..8c7af1fbfb 100644 --- a/inc/config.php +++ b/inc/config.php @@ -58,7 +58,7 @@ define('COPY', "© 2003 - 2008, by 0) && ($_CONFIG['doubler_sent_all'] == 'Y')) if (($user > 0) && ($user >= $points) && (!$OK) && ($_CONFIG['doubler_uid'] > 0) && ($uid != $_CONFIG['doubler_uid'])) { // Add points to used points - $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET used_points=used_points+%s WHERE userid='' LIMIT 1", + $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET used_points=used_points+%s WHERE userid='%d' LIMIT 1", array($points, $_CONFIG['doubler_uid']), __FILE__, __LINE__); // Update mediadata as well diff --git a/inc/extensions.php b/inc/extensions.php index ddb3cb813e..991742b344 100644 --- a/inc/extensions.php +++ b/inc/extensions.php @@ -65,7 +65,7 @@ function EXTENSION_REGISTER($ext_name, $id, $dry_run=false) foreach ($EXT_VER_HISTORY as $EXT_VER) { require($file); - if (((GET_EXT_VERSION("sql_patches") != "") && ($_CONFIG['verbose_sql'] == 'Y')) || (!EXT_IS_ACTIVE("sql_patches"))) + if (((GET_EXT_VERSION("sql_patches") != '') && ($_CONFIG['verbose_sql'] == 'Y')) || (!EXT_IS_ACTIVE("sql_patches"))) { if (!empty($UPDATE_NOTES)) { diff --git a/inc/extensions/ext-bonus.php b/inc/extensions/ext-bonus.php index a03d7672f4..06e52585f0 100644 --- a/inc/extensions/ext-bonus.php +++ b/inc/extensions/ext-bonus.php @@ -52,7 +52,7 @@ switch ($EXT_LOAD_MODE) case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called) // SQL commands to run $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu VALUES (NULL,'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önnen hier immer senden.')"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu VALUES (NULL,'main','bonus','Bonuspunkte',7,'Y','Y','',0)"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu VALUES (NULL,'main','bonus','Bonuspunkte',7,'Y','Y', '', 0)"; $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus"; $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_bonus ( id bigint(20) NOT NULL auto_increment, @@ -162,7 +162,7 @@ KEY userid (userid) case "0.2.3": // SQL queries for v0.2.3 $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE action='main' AND what='bonus' LIMIT 1"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu VALUES (NULL,'main','bonus','Aktiv-Rallye',7,'Y','Y','',0)"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu VALUES (NULL,'main','bonus','Aktiv-Rallye',7,'Y','Y', '', 0)"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Aktiv-Rallye mit Klick-Vergütung hinzugefügt."; diff --git a/inc/extensions/ext-other.php b/inc/extensions/ext-other.php index 019523e693..01ad655b2c 100644 --- a/inc/extensions/ext-other.php +++ b/inc/extensions/ext-other.php @@ -39,13 +39,13 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF']))) } // Version number -$EXT_VERSION = "0.1.8"; +$EXT_VERSION = "0.1.9"; // Auto-set extension version if (empty($EXT_VER)) $EXT_VER = $EXT_VERSION; // Version history array (add more with , "0.1" and so on) -$EXT_VER_HISTORY = array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8"); +$EXT_VER_HISTORY = array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9"); switch ($EXT_LOAD_MODE) { @@ -174,13 +174,21 @@ case "update": // Update an extension // Update notes (these will be set as task text!) $UPDATE_NOTES = "Die sonstigen Einstellungen lassen sich nun nur noch ändern, wenn die Erweiterung other 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 + $SQLs[] = "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!) + $UPDATE_NOTES = "Bei fehlerhafter Mail während der Bestätigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden."; + break; } break; default: // Do stuff when extension is loaded $dummy = LOAD_CONFIG(); - $_CONFIG['max_comma'] = $dummy['max_comma']; // Maximum numbers behind commata - $_CONFIG['reject_url'] = $dummy['reject_url']; // Default rejection URL + $_CONFIG['max_comma'] = $dummy['max_comma']; // Maximum numbers behind commata + $_CONFIG['reject_url'] = $dummy['reject_url']; // Default rejection URL + $_CONFIG['mailid_error_redirect'] = $dummy['mailid_error_redirect']; // Default rejection URL define('__CURRENCY', $dummy['currency']); // This is the currency for fees! They shall normally remain in real money currencies... unset($dummy); break; diff --git a/inc/extensions/ext-sql_patches.php b/inc/extensions/ext-sql_patches.php index a4b5179c53..08c7bf96d9 100644 --- a/inc/extensions/ext-sql_patches.php +++ b/inc/extensions/ext-sql_patches.php @@ -532,7 +532,7 @@ default: // Do stuff when extension is loaded $dummy = LOAD_CONFIG(); // When the sql_patches is not installed we cannot load it's configuration... *sigh* - if (GET_EXT_VERSION("sql_patches") != "") { + if (GET_EXT_VERSION("sql_patches") != '') { $_CONFIG['ext_autopurge'] = $dummy['ext_autopurge']; $_CONFIG['mails_page'] = $dummy['mails_page']; $_CONFIG['index_home'] = $dummy['index_home']; diff --git a/inc/footer.php b/inc/footer.php index 85ebb5be43..e1edeabfd9 100644 --- a/inc/footer.php +++ b/inc/footer.php @@ -53,7 +53,7 @@ if (($footer != "1") && ($footer != "2") && ($CSS != "1")) { } // Shall we display the parsing time and number of queries? - if ((isset($_CONFIG['show_timings'])) && ($_CONFIG['show_timings'] == "Y")) { + if ((isset($_CONFIG['show_timings'])) && ($_CONFIG['show_timings'] == 'Y')) { // Then display it here DISPLAY_PARSING_TIME_FOOTER(); } diff --git a/inc/functions.php b/inc/functions.php index a1495ccf0d..459c6962d5 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -71,18 +71,15 @@ function OPEN_TABLE($PERCENT = "", $CLASS = "", $ALIGN="left", $VALIGN="", $td_o // Vertical align is given if (!empty($VALIGN)) $OUT .= " valign=\"".$VALIGN."\""; - $OUT .= "> - - "; - OUTPUT_HTML($OUT); + OUTPUT_HTML($OUT); } // Close a table (you may want to add some footer stuff here) function CLOSE_TABLE($ADD="") { - OUTPUT_HTML(" -"); + OUTPUT_HTML(" \n"); if (!empty($ADD)) OUTPUT_HTML($ADD); OUTPUT_HTML(""); } @@ -140,9 +137,9 @@ function OUTPUT_HTML($HTML, $NEW_LINE = true) { } // Compile and run finished rendered HTML code - while (strpos($OUTPUT, "{!") > 0) { + while (strpos($OUTPUT, '{!') > 0) { $eval = "\$OUTPUT = \"" . COMPILE_CODE(addslashes($OUTPUT)) . "\";"; - @eval($eval); + eval($eval); } // Output code here, DO NOT REMOVE! ;-) @@ -154,9 +151,9 @@ function OUTPUT_HTML($HTML, $NEW_LINE = true) { } // Compile and run finished rendered HTML code - while (strpos($OUTPUT, "{!") > 0) { + while (strpos($OUTPUT, '{!') > 0) { $eval = "\$OUTPUT = \"" . COMPILE_CODE(addslashes($OUTPUT)) . "\";"; - @eval($eval); + eval($eval); } // Output code here, DO NOT REMOVE! ;-) @@ -179,8 +176,7 @@ function OUTPUT_RAW ($HTML) { } // Add a fatal error message to the queue array -function ADD_FATAL ($message, $extra="") -{ +function ADD_FATAL ($message, $extra="") { global $FATAL; if (empty($extra)) { // Regular text message to add to $FATAL @@ -284,12 +280,12 @@ function LOAD_TEMPLATE($template, $return=false, $content="") { $tmpl_file = implode("", file($file)); // Replace ' to our own chars to preventing them being quoted - while (strpos($tmpl_file, "\'") !== false) { $tmpl_file = str_replace("\'", "{QUOT}", $tmpl_file); } + while (strpos($tmpl_file, "\'") !== false) { $tmpl_file = str_replace("\'", '{QUOT}', $tmpl_file); } // Do we have to compile the code? if ((strpos($tmpl_file, "\$") !== false) || (strpos($tmpl_file, '{--') !== false) || (strpos($tmpl_file, '--}') > 0)) { // Okay, compile it! - $tmpl_file = "\$ret=\"".COMPILE_CODE(addslashes($tmpl_file))."\";"; + $tmpl_file = "\$ret=\"" . COMPILE_CODE(addslashes($tmpl_file)) . "\";"; eval($tmpl_file); } else { // Simply return loaded code @@ -329,7 +325,7 @@ function LOAD_TEMPLATE($template, $return=false, $content="") { // Send mail out to an email address function SEND_EMAIL($TO, $SUBJECT, $MSG, $HTML='N', $FROM="") { // Compile subject line (for POINTS constant etc.) - $eval = "\$SUBJECT = \"".COMPILE_CODE(addslashes($SUBJECT))."\";"; + $eval = "\$SUBJECT = \"" . COMPILE_CODE(addslashes($SUBJECT)) . "\";"; eval($eval); $SUBJECT = html_entity_decode($SUBJECT); @@ -951,11 +947,11 @@ function COMPILE_CODE($code, $simple = false, $constants = true, $full = true) { if ($constants) { // BEFORE 0.2.1 : Language and data constants // WITH 0.2.1+ : Only language constants - $code = str_replace("{--", '".', str_replace("--}", '."', $code)); + $code = str_replace('{--', '".', str_replace('--}', '."', $code)); // BEFORE 0.2.1 : Not used // WITH 0.2.1+ : Data constants - $code = str_replace("{!", '".', str_replace("!}", '."', $code)); + $code = str_replace('{!', '".', str_replace("!}", '."', $code)); } // Compile QUOT and other non-HTML codes @@ -965,7 +961,7 @@ function COMPILE_CODE($code, $simple = false, $constants = true, $full = true) { } // But shall I keep simple quotes for later use? - if ($simple) $code = str_replace("\'", "{QUOT}", $code); + if ($simple) $code = str_replace("\'", '{QUOT}', $code); // Find $content[bla][blub] entries @preg_match_all('/\$(content|DATA)((\[([a-zA-Z0-9-_]+)\])*)/', $code, $matches); @@ -1152,7 +1148,7 @@ function ADD_SELECTION($type, $DEFAULT, $prefix="", $id="0") $OUT .= " Bitte klicken Sie hier, um zur URL zu kommen.
-
-Danke."); +define('LOAD_URL_ERROR_2', "\">Bitte klicken Sie hier, um zur URL zu kommen.
\n
\nDanke."); define('GUEST_STATS', "Statistiken unseres {!MT_WORD2!}"); define('GUEST_STATS_MONTHLY', "Mitgliederverteilung auf Kalendermonate"); define('GUEST_STATS_CATS', "Mitgliederverteilung auf Mail-Kategorien"); @@ -827,9 +825,9 @@ define('MEMBER_ORDER_PAGE1_NOTE', "Geben Sie hier die ersten ein bis drei Stelle
Beispiele:
Oder geben Sie nichts ein, wenn Sie diese Option nicht wünschen."); @@ -1096,11 +1094,14 @@ define('CONTACT_USER', "Mitglied kontaktieren"); define('ADMIN_USER_CONTACTED', "Das Mitglied wurde per EMail kontaktiert."); define('ADMIN_CONTACT_USER_SUBJECT', "Nachricht vom {!MT_WORD!} {!MAIN_TITLE!}"); define('MEMBER_CANNOT_LOAD_PROFILE', "Fehler beim Laden des Mitgliederprofiles. Bitte Support benachrichten."); -define('FOOTER_STATS_RUNTIME', "Laufzeit:"); -define('FOOTER_STATS_SQL_QUERIES', "SQL-Abfragen:"); -define('FOOTER_STATS_NUM_TEMPLATES', "Templates:"); -define('FOOTER_STATS_SECS', "Sek."); -define('ADMIN_OPTION_FOOTER_STATS', "Skript-Statistiken im Seitenfuss einblenden (nützlich zum Debuggen)"); +define('SHOW_TIMINGS_RUNTIME', "Laufzeit:"); +define('SHOW_TIMINGS_SQL_QUERIES', "SQL-Abfragen:"); +define('SHOW_TIMINGS_NUM_TEMPLATES', "Templates:"); +define('SHOW_TIMINGS_SECS', "Sek."); +define('ADMIN_OPTION_SHOW_TIMINGS', "Skript-Statistiken im Seitenfuss einblenden (nützlich zum Debuggen)"); +define('ADMIN_OPTION_MAILID_REDIRECT', "Soll bei fehlerhafter/gelöschter Mailbuchung beim Bestätigen die Mail auf die Hauptseite oder Ablehnungsseite weitergleitet werden?"); +define('ADMIN_CONFIG_MAILID_REDIRECT_INDEX', "Auf Hauptseite weiterleiten."); +define('ADMIN_CONFIG_MAILID_REDIRECT_REJECT', "Auf Ablehnungsseite umleiten."); // ?> diff --git a/inc/libs/output_functions.php b/inc/libs/output_functions.php index 0609279667..ab24e8fb3e 100644 --- a/inc/libs/output_functions.php +++ b/inc/libs/output_functions.php @@ -57,7 +57,7 @@ function compile_html($code, $simple=false) global $SEC_CHARS; // Compile constants - $code = str_replace("{--", '".', str_replace("--}", '."', $code)); + $code = str_replace('{--', '".', str_replace('--}', '."', $code)); // Compile QUOT and other non-HTML codes foreach ($SEC_CHARS['to'] as $k=>$from) @@ -67,7 +67,7 @@ function compile_html($code, $simple=false) } // But keep simple quotes for later use - if ($simple) $code = str_replace("'", "{QUOT}", $code); + if ($simple) $code = str_replace("'", '{QUOT}', $code); // Return compiled code return $code; @@ -146,7 +146,7 @@ function get_template ($template, $return=false, $content="") { // The local file does exists so we load it. :) $tmpl_file = implode("", file($file)); - $tmpl_file = str_replace("'", "{QUOT}", $tmpl_file); + $tmpl_file = str_replace("'", '{QUOT}', $tmpl_file); // Compile and run code $ret = COMPILE_CODE(addslashes($tmpl_file), false, true); diff --git a/inc/libs/register_functions.php b/inc/libs/register_functions.php index 4e6e52f4c4..d64d8273b3 100644 --- a/inc/libs/register_functions.php +++ b/inc/libs/register_functions.php @@ -136,11 +136,11 @@ function REGISTER_ADD_CATEGORY_TABLE ($MODE, $return=false) if (($_POST['cat'][$id] == 'Y') || (($_CONFIG['register_default'] == 'Y') && (empty($_POST['cat'][$id])))) { - $content['def_y'] = " checked"; + $content['def_y'] = ' checked'; } else { - $content['def_n'] = " checked"; + $content['def_n'] = ' checked'; } // Load template and switch color diff --git a/inc/libs/security_functions.php b/inc/libs/security_functions.php index b46309ee92..190a369e5a 100644 --- a/inc/libs/security_functions.php +++ b/inc/libs/security_functions.php @@ -89,14 +89,14 @@ if (!isset($_COOKIE)) global $SEC_CHARS, $URL_CHARS; $SEC_CHARS = array( // The chars we are looking for... - 'from' => array("{", "}", "/", ".", "'", "$", "(", ")", "{--", "--}", "%", ";", "[", "]", ":", "--"), + 'from' => array("{", "}", "/", ".", "'", "$", "(", ")", '{--', '--}', "%", ";", "[", "]", ":", "--"), // ... and we will replace to. 'to' => array( "{OPEN_ANCHOR2}", "{CLOSE_ANCHOR2}", "{SLASH}", "{DOT}", - "{QUOT}", + '{QUOT}', "{DOLLAR}", "{OPEN_ANCHOR}", "{CLOSE_ANCHOR}", diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index 385f7375d9..dd93fcee63 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -334,9 +334,9 @@ function ADD_ADMIN_MENU($act, $wht,$return=false) $menuDesription[$menu] = $descr; } $OUT .= " - -  · "; - if (($menu == $act) && (empty($wht))) + +  · "; + if (($menu == $act) && (empty($wht))) { $OUT .= ""; } @@ -345,7 +345,7 @@ function ADD_ADMIN_MENU($act, $wht,$return=false) $OUT .= "[ "; } $OUT .= $title; - if (($menu == $act) && (empty($wht))) + if (($menu == $act) && (empty($wht))) { $OUT .= ""; } @@ -362,10 +362,10 @@ function ADD_ADMIN_MENU($act, $wht,$return=false) $menuDesription = array(); $menuTitle = array(); $SUB = true; $OUT .= " -   - - \n"; - while (list($wht_sub, $title_what, $desc_what) = SQL_FETCHROW($result_what)) + + + \n"; } $OUT .= "\n"; @@ -473,8 +473,7 @@ function ADD_MEMBER_SELECTION_BOX($add_all = false, $return = false, $none = fal // Remeber options in constant define('_MEMBER_SELECTION', $OUT); - if (!$return) - { + if (!$return) { // Display selection box define('__LANG_VALUE', GET_LANGUAGE()); @@ -483,8 +482,7 @@ function ADD_MEMBER_SELECTION_BOX($add_all = false, $return = false, $none = fal } } // -function ADMIN_MENU_SELECTION($MODE, $default="", $defid="") -{ +function ADMIN_MENU_SELECTION($MODE, $default="", $defid="") { $wht = "what != ''"; if ($MODE == "action") $wht = "what='' AND action !='login'"; $result = SQL_QUERY_ESC("SELECT %s, title FROM "._MYSQL_PREFIX."_admin_menu WHERE ".$wht." ORDER BY sort", @@ -495,7 +493,7 @@ function ADMIN_MENU_SELECTION($MODE, $default="", $defid="") $OUT = "
  + \n"; + while (list($wht_sub, $title_what, $desc_what) = SQL_FETCHROW($result_what)) { // Filename $INC = sprintf(PATH."inc/modules/admin/what-%s.php", $wht_sub); @@ -385,8 +385,8 @@ function ADD_ADMIN_MENU($act, $wht,$return=false) $menuTitle[$wht_sub] = $title_what; $menuDesription[$wht_sub] = $desc_what; $OUT .= " -
-  --> "; + +  --> "; if ($readable) { if ($wht == $wht_sub) @@ -426,7 +426,7 @@ function ADD_ADMIN_MENU($act, $wht,$return=false) // Free memory SQL_FREERESULT($result_what); $OUT .= "
-
\n"; $this->_output .= ''."\n"; $this->_output .= "\n"; @@ -1205,10 +1205,10 @@ class fase4_rdf { { $this->_use_proxy = true; - if ($phost != "") + if ($phost != '') $this->_phost = $phost; - if ($pport != "") + if ($pport != '') $this->_pport = $pport; } @@ -1224,10 +1224,10 @@ class fase4_rdf { { $this->_use_proxy_auth = true; - if ($pname != "") + if ($pname != '') $this->_pname = $pname; - if ($ppasswd != "") + if ($ppasswd != '') $this->_ppasswd = $ppasswd; } diff --git a/inc/session.php b/inc/session.php index 306fd1cbf7..b8143d2617 100644 --- a/inc/session.php +++ b/inc/session.php @@ -70,7 +70,7 @@ if (!empty($_POST['refid'])) { } elseif (isSessionVariableSet('refid')) { // Set session refid als global $GLOBALS['refid'] = bigintval(get_session('refid')); -} elseif (GET_EXT_VERSION("sql_patches") != "") { +} elseif (GET_EXT_VERSION("sql_patches") != '') { // Set default refid as refid in URL $GLOBALS['refid'] = bigintval($_CONFIG['def_refid']); } else { diff --git a/mailid.php b/mailid.php index 9b4c5786e6..42280ee7af 100644 --- a/mailid.php +++ b/mailid.php @@ -66,30 +66,24 @@ if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_install //* DEBUG: */ die("*".$url_uid."/".$url_bid."/".$url_mid."*
".print_r($FATAL, true)."
"); // 01 1 12 3 32 21 1 2 2 10 - if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (count($FATAL) == 0)) - { + if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (count($FATAL) == 0)) { // Maybe he wants to confirm an email? - if ($url_mid > 0) - { + if ($url_mid > 0) { // Normal-Mails $result = SQL_QUERY_ESC("SELECT link_type FROM "._MYSQL_PREFIX."_user_links WHERE stats_id=%d AND userid=%d LIMIT 1", array($url_mid, $url_uid), __FILE__, __LINE__); $type = "mailid"; $DATA = $url_mid; - } - elseif ($url_bid > 0) - { + } elseif ($url_bid > 0) { // Bonus-Mail $result = SQL_QUERY_ESC("SELECT link_type FROM "._MYSQL_PREFIX."_user_links WHERE bonus_id=%d AND userid=%d LIMIT 1", array($url_bid, $url_uid), __FILE__, __LINE__); $type = "bonusid"; $DATA = $url_bid; - } - else - { + } else { // Problem: No ID entered LOAD_URL("index.php"); } - if (SQL_NUMROWS($result) == 1) - { + + if (SQL_NUMROWS($result) == 1) { // Load the entry list($ltype) = SQL_FETCHROW($result); @@ -110,8 +104,7 @@ if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_install break; } - if (SQL_NUMROWS($result) == 1) - { + if (SQL_NUMROWS($result) == 1) { // Load data list($pool, $URL) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -119,12 +112,10 @@ if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_install // Is the user's ID unlocked? $result = SQL_QUERY_ESC("SELECT status, sex, surname, family FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1", array($url_uid), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 1) - { + if (SQL_NUMROWS($result) == 1) { list($status, $sex, $sname, $fname) = SQL_FETCHROW($result); SQL_FREERESULT($result); - if ($status == "CONFIRMED") - { + if ($status == "CONFIRMED") { // User has confirmed his account so we can procede... switch ($ltype) { @@ -158,8 +149,8 @@ if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_install break; } - if ($VALID) - { + // Was that mail a valid one? + if ($VALID) { // If time is zero seconds we have a sponsor mail. 1 Second shall be set to avoid problems if (($time == "0") && ($payment > 0)) { $URL = URL; $time = "1"; } if (($time > 0) && (($payment > 0) || ($points > 0))) { @@ -200,18 +191,28 @@ if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_install // Error code is set? if (!empty($msg)) { - LOAD_URL("modules.php?module=index&msg=".$msg); - } + switch ($_CONFIG['mailid_error_redirect']) { + case "index": // Redirect to index page + LOAD_URL("modules.php?module=index&msg=".$msg); + break; - require_once(PATH."inc/footer.php"); -} - else -{ + case "reject": // Redirect to rejection page + LOAD_URL($_CONFIG['reject_url']); + break; + } + } else { + // Include footer + require_once(PATH."inc/footer.php"); + } +} else { // You have to configure first! LOAD_URL("install.php"); } -// Really all done here... ;-) -die(); + +// Shutdown database link +if (is_resource($link)) { + SQL_CLOSE($link, __FILE__, __LINE__); +} // ?> diff --git a/templates/de/html/admin/admin_config_other.tpl b/templates/de/html/admin/admin_config_other.tpl index 3ab3598d2c..e791184883 100644 --- a/templates/de/html/admin/admin_config_other.tpl +++ b/templates/de/html/admin/admin_config_other.tpl @@ -268,11 +268,26 @@ - + + + + + + + + + + + + + diff --git a/templates/de/html/show_timings.tpl b/templates/de/html/show_timings.tpl index 4f42d4111e..8c28de7d45 100644 --- a/templates/de/html/show_timings.tpl +++ b/templates/de/html/show_timings.tpl @@ -1,13 +1,13 @@
- {--FOOTER_STATS_NUM_TEMPLATES--} $content[numTemplates] + {--SHOW_TIMINGS_NUM_TEMPLATES--} $content[numTemplates]
- {--FOOTER_STATS_RUNTIME--} $content[runtime] {--FOOTER_STATS_SECS--} + {--SHOW_TIMINGS_RUNTIME--} $content[runtime] {--SHOW_TIMINGS_SECS--}
- {--FOOTER_STATS_SQL_QUERIES--} $content[numSQLs] + {--SHOW_TIMINGS_SQL_QUERIES--} $content[numSQLs]
-- 2.39.5
".htmlspecialchars($this->_item["title"])."
 {--ADMIN_OPTION_FOOTER_STATS--}:{--ADMIN_OPTION_SHOW_TIMINGS--}:    {--YES--}
-  {--NO--} + name="mailid_error_redirect" value="Y"{--_CFG_SHOW_TIMINGS_Y--}> {--YES--}
+  {--NO--} +
 
 
 {--ADMIN_OPTION_MAILID_REDIRECT--}:   {--ADMIN_CONFIG_MAILID_REDIRECT_INDEX--}
+  {--ADMIN_CONFIG_MAILID_REDIRECT_REJECT--}