]> git.mxchange.org Git - mailer.git/commitdiff
More other options moved out (to config_order)
authorRoland Häder <roland@mxchange.org>
Sun, 18 May 2008 14:56:42 +0000 (14:56 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 18 May 2008 14:56:42 +0000 (14:56 +0000)
inc/extensions.php
inc/extensions/ext-order.php
inc/language/de.php
inc/language/order_de.php
inc/libs/order_functions.php
inc/modules/admin/what-config_email.php
inc/modules/admin/what-config_order.php
inc/modules/admin/what-config_other.php
inc/modules/admin/what-del_email.php
templates/de/html/admin/admin_config_order.tpl
templates/de/html/admin/admin_config_other.tpl

index 991742b34425e96c7ca0c2b7b3b30b3eb3ab34e0..21113440614d7ec8ac88cd55cf838b82c0e7d78d 100644 (file)
@@ -38,7 +38,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
        require($INC);
 }
 //
-function EXTENSION_REGISTER($ext_name, $id, $dry_run=false)
+function EXTENSION_REGISTER ($ext_name, $id, $dry_run=false)
 {
        global $NOTES, $_CONFIG, $INC_POOL;
        // We want to register an extension and registration status is by default "failed" (= false)
index 3244efa020b7786a0b1ef7ebd99f343a286a537a..873f7fd74b120a4d5e0400464b1efa5e966788ad 100644 (file)
  ************************************************************************/
 
 // Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])))
-{
+if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF']))) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 }
 
 // Version number
-$EXT_VERSION = "0.4.7";
+$EXT_VERSION = "0.4.8";
 
 // 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.1", "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", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.7", "0.3.8", "0.3.9", "0.4.0", "0.4.1", "0.4.2", "0.4.3", "0.4.4", "0.4.5", "0.4.6", "0.4.7");
+$EXT_VER_HISTORY = array("0.0", "0.1", "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", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.7", "0.3.8", "0.3.9", "0.4.0", "0.4.1", "0.4.2", "0.4.3", "0.4.4", "0.4.5", "0.4.6", "0.4.7", "0.4.8");
 
 switch ($EXT_LOAD_MODE)
 {
@@ -285,6 +284,14 @@ nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der Us
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert.";
                break;
+
+       case "0.4.8": // SQL queries for v0.4.8
+               $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='Mailbuchung' WHERE action='setup' AND what='config_order' LIMIT 1";
+
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Men&uuml;punkt &quot;Mailbuchungsseite&quot; nach &quot;Mailbuchung&quot; umbenannt und weitere Einstellungen aus Sonstige Einstellungen verschoben.";
+               break;
+
        }
        break;
 
index 29d0037634628317f822b3f6bd9baf7d612430f3..650db038c24ee9506874d6fc387ba424eae56b74 100644 (file)
@@ -1105,6 +1105,8 @@ define('ADMIN_CONFIG_MAILID_REDIRECT_REJECT', "Auf Ablehnungsseite umleiten.");
 define('REASON_DIRECT_PAYMENT', "Direkte Gutschrift (siehe evtl. vorangegangene Mail)");
 define('SUBJECT_DIRECT_PAYMENT', "Direkte {!POINTS!}-Gutschrift durch das System");
 define('ADMIN_LOGOUT_SQL_PATCHES_DONE', "Sie wurden automatisch ausgeloggt, da Sie die Erweiterung <strong>sql_patches</strong> installiert haben und dabei das Passort-Hashing ge&auml;ndert/verbessert wurde. Bitte erneut einloggen!");
+define('ADMIN_POINTS_REPAYED', "Es wurden dem Mitglied <u>%s</u> {!POINTS!} zur&uuml;ckgeschrieben.");
+define('ADMIN_NO_POINTS_REPAYED', "Die Mailbuchung hatte keine {!POINTS!} zum zur&uuml;ckbuchen!");
 
 //
 ?>
index 648214f3442ec2fd26c29decaced37b39c00e31c..6663f4b4327aa5f7459079a7e40ccea72a893ffb 100644 (file)
@@ -39,7 +39,7 @@ if (basename($_SERVER['PHP_SELF']) == basename(__FILE__))
 }
 
 // Language definitions
-define('ORDER_ADMIN_SETTINGS', "Einstellungen - Mailbuchungsseite");
+define('ORDER_ADMIN_SETTINGS', "Einstellungen - Mailbuchung");
 define('ORDER_ADMIN_MISC_SETTINGS', "Weitere Einstellungen");
 define('ORDER_MAX_ORDER_SELECT', "Wie viele Mailbuchungen sollen die Mitglieder maximal versenden k&ouml;nnen?");
 define('ORDER_MIN_RECEIVER_PER_ORDER', "Minimale Empf&auml;nger pro Mailbuchung");
index a05f2f345a20affb81d6ce6cf9d3bab38391f4ec..92e10a574e3cfb7f1629919dbdb1e21fbb9a4a89 100644 (file)
  ************************************************************************/
 
 // Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
+if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 }
 
-function ORDER_SELECT_OPTION_LIST($default)
-{
+function ORDER_SELECT_OPTION_LIST($default) {
        // Currenty the list is hardcoded...
        $LIST = array("userid", "zip", "country", "email", "birth_year", "last_online", "ref_clicks", "total_logins", "mail_orders");
        $OUT = "";
-       foreach ($LIST as $item)
-       {
+       foreach ($LIST as $item) {
                $selected = "";
                if ($item == $default) $selected = " selected=\"selected\"";
                $OUT .= "<OPTION value=\"".$item."\"".$selected.">{--ORDER_SELECT_COLUMN_".strtoupper($item)."--}</OPTION>\n";
        }
+
+       // Return the output
        return $OUT;
 }
 
index 23ac9fe670b2811891d12c9017006ae24e07032c..176e5f991b89ffde313dfcb268f17b9479745af1 100644 (file)
  ************************************************************************/
 
 // Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))
-{
+if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 }
+
 // Add description as navigation point
 ADD_DESCR("admin", basename(__FILE__));
 
-OPEN_TABLE("100%", "admin_content admin_content_align", "");
+// Remove empty array index
 if (empty($_POST['max'])) unset($_POST['add_max']);
-if (isset($_POST['add_max']))
-{
+
+if (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($_POST['max'])), __FILE__, __LINE__);
-       if (SQL_NUMROWS($result) == 0)
-       {
+       if (SQL_NUMROWS($result) == 0) {
                // Add this value (including comment)
                $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_max_receive (value, comment) VALUES ('%s', '%s')",
                 array(bigintval($_POST['max']), $_POST['comment']),__FILE__, __LINE__);
                $content = "<SPAN class=\"admin_done\">".MAX_VALUE_SAVED."</SPAN>";
-       }
-        else
-       {
+       } else {
                // Free memory
                SQL_FREERESULT($result);
 
@@ -65,13 +62,10 @@ if (isset($_POST['add_max']))
 
        // Display message
        LOAD_TEMPLATE("admin_settings_saved", false, $content);
-}
- elseif ((isset($_POST['ok'])) && (isset($_GET['do'])))
-{
+} elseif ((isset($_POST['ok'])) && (isset($_GET['do']))) {
        // Change or delete entries...
        $TEXT = "";
-       foreach ($_POST['id'] as $id=>$value)
-       {
+       foreach ($_POST['id'] as $id=>$value) {
                // Secure ID
                $id = bigintval($id);
 
@@ -90,14 +84,12 @@ if (isset($_POST['add_max']))
                        break;
                }
        }
-       if (isset($TEXT))
-       {
+
+       if (isset($TEXT)) {
                // Display message
                LOAD_TEMPLATE("admin_settings_saved", false, $TEXT);
        }
-}
- elseif ((isset($_POST['del'])) && ((SELECTION_COUNT($_POST['sel']) > 0) || (isset($_POST['sel'][0]))))
-{
+} elseif ((isset($_POST['del'])) && ((SELECTION_COUNT($_POST['sel']) > 0) || (isset($_POST['sel'][0])))) {
        // Delete entries
        $SW = 2; $OUT = "";
        foreach ($_POST['sel'] as $id=>$value)
@@ -124,13 +116,10 @@ if (isset($_POST['add_max']))
 
        // Load main template
        LOAD_TEMPLATE("admin_config_email_del");
-}
- elseif ((isset($_POST['edit'])) && ((SELECTION_COUNT($_POST['sel']) > 0) || (isset($_POST['sel'][0]))))
-{
+} elseif ((isset($_POST['edit'])) && ((SELECTION_COUNT($_POST['sel']) > 0) || (isset($_POST['sel'][0])))) {
        // Edit entries
        $SW = 2; $OUT = "";
-       foreach ($_POST['sel'] as $id=>$value)
-       {
+       foreach ($_POST['sel'] as $id=>$value) {
                // Load data
                $result = SQL_QUERY_ESC("SELECT value, comment FROM "._MYSQL_PREFIX."_max_receive WHERE id=%d LIMIT 1",
                 array(bigintval($id)), __FILE__, __LINE__);
@@ -153,16 +142,12 @@ if (isset($_POST['add_max']))
 
        // Load main template
        LOAD_TEMPLATE("admin_config_email_edit");
-}
- else
-{
+} else {
        $result = SQL_QUERY("SELECT id, value, comment FROM "._MYSQL_PREFIX."_max_receive ORDER BY value", __FILE__, __LINE__);
-       if (SQL_NUMROWS($result) > 0)
-       {
+       if (SQL_NUMROWS($result) > 0) {
                // List already existing entries for editing
                $SW = 2; $OUT = "";
-               while (list($id, $value, $comment) = SQL_FETCHROW($result))
-               {
+               while (list($id, $value, $comment) = SQL_FETCHROW($result)) {
                        // Prepare data for the row template
                        $content = array(
                                'sw'      => $SW,
@@ -187,6 +172,6 @@ if (isset($_POST['add_max']))
        // Display form
        LOAD_TEMPLATE("admin_add_max");
 }
-CLOSE_TABLE();
+
 //
 ?>
index 25e67a9ed585124b093d40e1751efb7cc46bd413..73fc2f7232e0e2392dd01be4f133cbab1a2d1ef1 100644 (file)
@@ -78,6 +78,34 @@ if (isset($_POST['ok']))
                break;
        }
 
+       // Transfer other config data into constants for the template (DO NOT set $_CONFIG as global in LOAD_TEMPLATE!!!)
+       define('_CFG_UNCONFIRMED'   , $_CONFIG['unconfirmed']);
+       define('_CFG_MAX_TLENGTH'   , $_CONFIG['max_tlength']);
+
+       if ($_CONFIG['test_text'] == 'N') {
+               define('_CFG_TEST_TEXT_N', ' checked');
+               define('_CFG_TEST_TEXT_Y', "");
+       } else {
+               define('_CFG_TEST_TEXT_N', "");
+               define('_CFG_TEST_TEXT_Y', ' checked');
+       }
+
+       if ($_CONFIG['test_subj'] == 'N') {
+               define('_CFG_TEST_SUBJ_N', ' checked');
+               define('_CFG_TEST_SUBJ_Y', "");
+       } else {
+               define('_CFG_TEST_SUBJ_N', "");
+               define('_CFG_TEST_SUBJ_Y', ' checked');
+       }
+
+       if ($_CONFIG['url_blacklist'] == 'N') {
+               define('_CFG_URL_BLIST_N', ' checked');
+               define('_CFG_URL_BLIST_Y', "");
+       } else {
+               define('_CFG_URL_BLIST_N', "");
+               define('_CFG_URL_BLIST_Y', ' checked');
+       }
+
        // Selection list
        define('__ORDER_SELECT', ORDER_SELECT_OPTION_LIST($_CONFIG['order_select']));
 
index 15427baa3b2382ecf99c4ab295aee602fa8fa4a4..ad5dc9e0c32973fb7e90487406b2373d80b962b7 100644 (file)
@@ -32,8 +32,7 @@
  ************************************************************************/
 
 // Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))
-{
+if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 } elseif ((!EXT_IS_ACTIVE("other")) || (GET_EXT_VERSION("other") == "")) {
@@ -41,16 +40,13 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))
        ADD_FATAL(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "other"));
        return;
 }
-global $link;
 
 // Add description as navigation point
 ADD_DESCR("admin", basename(__FILE__));
 
 // Stop saving data if one input field is !isset
-if (isset($_POST['ok']))
-{
-       if (function_exists('CREATE_TIME_SELECTIONS'))
-       {
+if (isset($_POST['ok'])) {
+       if (function_exists('CREATE_TIME_SELECTIONS')) {
                // Calculate stamps and set calculated stamps
                $_POST['online_timeout']        = CREATE_TIMESTAMP_FROM_SELECTIONS("ip_timeout"           , $_POST);
                $_POST['url_tlock']             = CREATE_TIMESTAMP_FROM_SELECTIONS("url_tlock"            , $_POST);
@@ -76,34 +72,25 @@ if (isset($_POST['ok']))
        if (!isset($_POST['reject_url']))            { unset($_POST['ok']); }
 }
 
-OPEN_TABLE("100%", "admin_content admin_content_align", "");
-if (isset($_POST['ok']))
-{
+if (isset($_POST['ok'])) {
        // Update stamps directly
        ADMIN_SAVE_SETTINGS($_POST);
-}
- else
-{
+} else {
        // Transfer config data into constants for the template (DO NOT set $_CONFIG as global in LOAD_TEMPLATE!!!)
-       define('_CFG_UNCONFIRMED'   , $_CONFIG['unconfirmed']);
-       define('_CFG_MAX_TLENGTH'   , $_CONFIG['max_tlength']);
        define('_CFG_CODE_LENGTH'   , $_CONFIG['code_length']);
        define('_CFG_ACT_SYSTEM'    , $_CONFIG['activate_xchange']);
        define('_CFG_MAX_SEND'      , $_CONFIG['max_send']);
        define('_CFG_REJECT_URL'    , $_CONFIG['reject_url']);
 
        // Is there the pro-version function avaiable to create selection boxes instead of input boxes?
-       if (function_exists('CREATE_TIME_SELECTIONS'))
-       {
+       if (function_exists('CREATE_TIME_SELECTIONS')) {
                // Only pro versions: time selection boxes
                define('_CFG_ONLINE_TIMEOUT', CREATE_TIME_SELECTIONS($_CONFIG['online_timeout'], "ip_timeout"           , "ms"));
                define('_CFG_URL_TLOCK'     , CREATE_TIME_SELECTIONS($_CONFIG['url_tlock']     , "url_tlock"            , "WDh"));
                define('_CFG_PROFILE_LOCK'  , CREATE_TIME_SELECTIONS($_CONFIG['profile_lock']  , "profile_lock"         , "WDh"));
                define('_CFG_PROFILE_UPDATE', CREATE_TIME_SELECTIONS($_CONFIG['profile_update'], "profile_update"       , "YM"));
                define('_CFG_PROF_REUPDATE' , CREATE_TIME_SELECTIONS($_CONFIG['resend_profile_update'] , "resend_profile_update", "MWD"));
-       }
-        else
-       {
+       } else {
                // Normal input boxes
                define('_CFG_ONLINE_TIMEOUT', "<INPUT type=\"text\" name=\"online_timeout\" class=\"admin_normal\" size=\"6\"  maxlength=\"255\" value=\"".$_CONFIG['online_timeout']."\"> <FONT class=\"tiny\">(".SECS.")</FONT>");
                define('_CFG_URL_TLOCK'     , "<INPUT type=\"text\" name=\"url_tlock\" class=\"admin_normal\" size=\"6\"  maxlength=\"255\" value=\"".$_CONFIG['url_tlock']     ."\"> <FONT class=\"tiny\">(".SECS.")</FONT>");
@@ -112,86 +99,46 @@ if (isset($_POST['ok']))
                define('_CFG_PROF_REUPDATE' , "<INPUT type=\"text\" name=\"resend_profile_update\" class=\"admin_normal\" size=\"6\"  maxlength=\"255\" value=\"".$_CONFIG['resend_profile_update'] ."\"> <FONT class=\"tiny\">(".SECS.")</FONT>");
        }
 
-       if ($_CONFIG['test_text'] == 'N')
-       {
-               define('_CFG_TEST_TEXT_N', ' checked');
-               define('_CFG_TEST_TEXT_Y', "");
-       }
-        else
-       {
-               define('_CFG_TEST_TEXT_N', "");
-               define('_CFG_TEST_TEXT_Y', ' checked');
-       }
-       if ($_CONFIG['test_subj'] == 'N')
-       {
-               define('_CFG_TEST_SUBJ_N', ' checked');
-               define('_CFG_TEST_SUBJ_Y', "");
-       }
-        else
-       {
-               define('_CFG_TEST_SUBJ_N', "");
-               define('_CFG_TEST_SUBJ_Y', ' checked');
-       }
-       if ($_CONFIG['url_blacklist'] == 'N')
-       {
-               define('_CFG_URL_BLIST_N', ' checked');
-               define('_CFG_URL_BLIST_Y', "");
-       }
-        else
-       {
-               define('_CFG_URL_BLIST_N', "");
-               define('_CFG_URL_BLIST_Y', ' checked');
-       }
-       if ($_CONFIG['order_multi_page'] == 'N')
-       {
+       if ($_CONFIG['order_multi_page'] == 'N') {
                define('_CFG_ORDER_MULTI_N', ' checked');
                define('_CFG_ORDER_MULTI_Y', "");
-       }
-        else
-       {
+       } else {
                define('_CFG_ORDER_MULTI_N', "");
                define('_CFG_ORDER_MULTI_Y', ' checked');
        }
-       if ($_CONFIG['autosend_active'] == 'N')
-       {
+
+       if ($_CONFIG['autosend_active'] == 'N') {
                define('_CFG_AUTOSEND_ACTIVE_N', ' checked');
                define('_CFG_AUTOSEND_ACTIVE_Y', "");
-       }
-        else
-       {
+       } else {
                define('_CFG_AUTOSEND_ACTIVE_N', "");
                define('_CFG_AUTOSEND_ACTIVE_Y', ' checked');
        }
-       if ($_CONFIG['send_prof_update'] == 'N')
-       {
+
+       if ($_CONFIG['send_prof_update'] == 'N') {
                define('_CFG_SEND_UPDATE_N', ' checked');
                define('_CFG_SEND_UPDATE_Y', "");
-       }
-        else
-       {
+       } else {
                define('_CFG_SEND_UPDATE_N', "");
                define('_CFG_SEND_UPDATE_Y', ' checked');
        }
-       if ($_CONFIG['admin_notify'] == 'N')
-       {
+
+       if ($_CONFIG['admin_notify'] == 'N') {
                define('_CFG_ADMIN_NOTIFY_N', ' checked');
                define('_CFG_ADMIN_NOTIFY_Y', "");
-       }
-        else
-       {
+       } else {
                define('_CFG_ADMIN_NOTIFY_N', "");
                define('_CFG_ADMIN_NOTIFY_Y', ' checked');
        }
-       if ($_CONFIG['css_php'] == "DIRECT")
-       {
+
+       if ($_CONFIG['css_php'] == "DIRECT") {
                define('_CFG_CSS_PHP_DIRECT', ' checked');
                define('_CFG_CSS_PHP_FILE', "");
-       }
-        else
-       {
+       } else {
                define('_CFG_CSS_PHP_DIRECT', "");
                define('_CFG_CSS_PHP_FILE', ' checked');
        }
+
        if ($_CONFIG['guest_menu'] == 'Y') {
                define('_CFG_GUEST_MENU_ACTIVE', ' checked');
                define('_CFG_GUEST_MENU_INACTIVE', "");
@@ -199,6 +146,7 @@ if (isset($_POST['ok']))
                define('_CFG_GUEST_MENU_ACTIVE', "");
                define('_CFG_GUEST_MENU_INACTIVE', ' checked');
        }
+
        if ($_CONFIG['member_menu'] == 'Y') {
                define('_CFG_MEMBER_MENU_ACTIVE', ' checked');
                define('_CFG_MEMBER_MENU_INACTIVE', "");
@@ -206,6 +154,7 @@ if (isset($_POST['ok']))
                define('_CFG_MEMBER_MENU_ACTIVE', "");
                define('_CFG_MEMBER_MENU_INACTIVE', ' checked');
        }
+
        if ($_CONFIG['youre_here'] == 'Y') {
                define('_CFG_YOURE_HERE_ACTIVE', ' checked');
                define('_CFG_YOURE_HERE_INACTIVE', "");
@@ -213,6 +162,7 @@ if (isset($_POST['ok']))
                define('_CFG_YOURE_HERE_ACTIVE', "");
                define('_CFG_YOURE_HERE_INACTIVE', ' checked');
        }
+
        if ($_CONFIG['show_timings'] == 'Y') {
                define('_CFG_SHOW_TIMINGS_Y', ' checked');
                define('_CFG_SHOW_TIMINGS_N', "");
@@ -220,6 +170,7 @@ if (isset($_POST['ok']))
                define('_CFG_SHOW_TIMINGS_Y', "");
                define('_CFG_SHOW_TIMINGS_N', ' checked');
        }
+
        if ($_CONFIG['mailid_error_redirect'] == 'index') {
                define('_CFG_MAILID_REDIRECT_INDEX', ' checked');
                define('_CFG_MAILID_REDIRECT_REJECT', "");
@@ -228,8 +179,7 @@ if (isset($_POST['ok']))
                define('_CFG_MAILID_REDIRECT_REJECT', ' checked');
        }
 
-       for ($i = 0; $i <= 5; $i++)
-       {
+       for ($i = 0; $i <= 5; $i++) {
                $eval = "define('_COMMA_DEF_".$i."', \"\");";
                if ($_CONFIG['max_comma'] == $i) $eval = "define('_COMMA_DEF_".$i."', \" selected\");";
                eval($eval);
@@ -238,6 +188,6 @@ if (isset($_POST['ok']))
        // Load template
        LOAD_TEMPLATE("admin_config_other");
 }
-CLOSE_TABLE();
+
 //
 ?>
index c8ba9bb594d96a0a2562a1101a0ed90f432ec8f8..d573eb6b2c9dfbdfc6932965be8cd19e5b208696 100644 (file)
@@ -87,25 +87,38 @@ WHERE s.pool_id=%d LIMIT 1",
                if (SQL_NUMROWS($result) == 1) {
                        // Fetch stats id
                        list($stats_id) = SQL_FETCHROW($result);
-                       SQL_FREERESULT($result);
-
-                       // Get all user links
-                       $result = SQL_QUERY_ESC("SELECT COUNT(id) AS 'cnt' FROM "._MYSQL_PREFIX."_user_links WHERE stats_id=%d",
-                               array(bigintval($stats_id)), __FILE__, __LINE__);
-
-                       // Get unconfirmed links for calculation of total points
-                       list($links) = SQL_FETCHROW($result);
 
-                       // Free result
+                       // Free the result
                        SQL_FREERESULT($result);
 
-                       // Calc total points and pay them back
-                       $totalPoints = $links * $price;
-                       //* DEBUG: */ echo $stats_id.":".$totalPoints."/".$links."/".$price."<br />\n";
-                       if ($totalPoints > 0) {
-                               // Pay back points
-                               //* DEBUG: */ echo "PAYBACK:".$sender."<br />\n";
-                               ADD_POINTS_REFSYSTEM($sender, $totalPoints, true, "0", false,"direct");
+                       // Shall we pay the points back to the user?
+                       if ($_CONFIG['repay_deleted_mails'] == "Y") {
+                               // Get all user links
+                               $result = SQL_QUERY_ESC("SELECT COUNT(id) AS 'cnt' FROM "._MYSQL_PREFIX."_user_links WHERE stats_id=%d",
+                                       array(bigintval($stats_id)), __FILE__, __LINE__);
+
+                               // Get unconfirmed links for calculation of total points
+                               list($links) = SQL_FETCHROW($result);
+
+                               // Free result
+                               SQL_FREERESULT($result);
+
+                               // Calc total points and pay them back
+                               $totalPoints = $links * $price;
+                               //* DEBUG: */ echo $stats_id.":".$totalPoints."/".$links."/".$price."<br />\n";
+                               if ($totalPoints > 0) {
+                                       // Pay back points
+                                       //* DEBUG: */ echo "PAYBACK:".$sender."<br />\n";
+                                       ADD_POINTS_REFSYSTEM($sender, $totalPoints, true, "0", false,"direct");
+
+                                       // Output message
+                                       LOAD_TEMPLATE("admin_settings_saved", false, sprintf(ADMIN_POINTS_REPAYED,
+                                               number_format($totalPoints, 0, ",", ".")
+                                       ));
+                               } else {
+                                       // No points repayed!
+                                       LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_NO_POINTS_REPAYED);
+                               }
                        }
 
                        // Remove links from DB
index 645dbe23780fdb42a99e1b180408713e3f6d47bd..b0f988e8e6dcf697665e8f808176a16d8246238c 100644 (file)
@@ -1,28 +1,33 @@
-<FORM action="{!URL!}/modules.php?module=admin&amp;what=config_order"
-       method="POST">
-<TABLE border="0" cellspacing="0" cellpadding="0" align="center"
-       class="admin_table dashed" width="580">
+<FORM action="{!URL!}/modules.php?module=admin&amp;what=config_order" method="POST">
+<TABLE border="0" cellspacing="0" cellpadding="0" align="center" class="admin_table dashed" width="580">
        <TR>
                <TD class="admin_title bottom2 seperator" height="30" width="10">&nbsp;</TD>
-               <TD class="admin_title bottom2" colspan="3" align="center"><STRONG>{--ORDER_ADMIN_SETTINGS--}:</STRONG>
+               <TD class="admin_title bottom2" colspan="3" align="center">
+                       <STRONG>{--ORDER_ADMIN_SETTINGS--}:</STRONG>
                </TD>
                <TD class="admin_title bottom2 seperator" width="10">&nbsp;</TD>
        </TR>
+
        <TR>
                <TD colspan="5" height="7" class="seperator">&nbsp;</TD>
        </TR>
+
        <TR>
                <TD width="10" class="seperator">&nbsp;</TD>
                <TD align="center" width="275" colspan="3">
-               {--ORDER_MAX_ORDER_SELECT--}</TD>
+                       {--ORDER_MAX_ORDER_SELECT--}
+               </TD>
                <TD width="10" class="seperator">&nbsp;</TD>
        </TR>
+
        <TR>
-               <TD colspan="5" height="7" class="seperator bottom2">&nbsp;</TD>
+               <TD colspan="5" height="7" class="seperator bottom">&nbsp;</TD>
        </TR>
+
        <TR>
                <TD colspan="5" height="7" class="seperator">&nbsp;</TD>
        </TR>
+
        <TR>
                <TD width="10" class="seperator">&nbsp;</TD>
                <TD align="center" width="275">{--ORDER_ADMIN_MAX--}:&nbsp;<INPUT
                </TD>
                <TD width="10" class="seperator">&nbsp;</TD>
        </TR>
+
+       <TR>
+               <TD colspan="5" height="7" class="seperator bottom2">&nbsp;</TD>
+       </TR>
+
+       <TR>
+               <TD colspan="5" height="7" class="seperator">&nbsp;</TD>
+       </TR>
+
+       <TR>
+               <TD width="10" class="seperator">&nbsp;</TD>
+               <TD align="right" width="340">
+               {--ADMIN_OPTION_MAX_UNCONFIRMED_MAILS--}:</TD>
+               <TD width="10" class="seperator">&nbsp;</TD>
+               <TD width="160"><INPUT type="text" name="unconfirmed"
+                       class="admin_normal" size="10" maxlength="10"
+                       value="{--_CFG_UNCONFIRMED--}"></TD>
+               <TD width="10" class="seperator">&nbsp;</TD>
+       </TR>
+
+       <TR>
+               <TD colspan="5" height="7" class="seperator">&nbsp;</TD>
+       </TR>
+
+       <TR>
+               <TD width="10" class="seperator">&nbsp;</TD>
+               <TD align="right">{--ADMIN_OPTION_MAX_TEXT_LENGTH--}:</TD>
+               <TD width="10" class="seperator">&nbsp;</TD>
+               <TD><INPUT type="text" name="max_tlength" class="admin_normal"
+                       size="10" maxlength="100" value="{--_CFG_MAX_TLENGTH--}"></TD>
+               <TD width="10" class="seperator">&nbsp;</TD>
+       </TR>
+
+       <TR>
+               <TD colspan="5" height="7" class="seperator">&nbsp;</TD>
+       </TR>
+
+       <TR>
+               <TD width="10" class="seperator">&nbsp;</TD>
+               <TD align="right">{--ADMIN_OPTION_CHECK_EMAIL_TEXT--}:</TD>
+               <TD width="10" class="seperator">&nbsp;</TD>
+               <TD><SPAN class="nobr"> {--YES--}:&nbsp;<INPUT
+                       type="radio" name="test_text" value="N"{--_CFG_TEST_TEXT_N--}>&nbsp;
+               {--NO--}:&nbsp;<INPUT type="radio" name="test_text" value="Y"{--_CFG_TEST_TEXT_Y--}>
+               </SPAN></TD>
+               <TD width="10" class="seperator">&nbsp;</TD>
+       </TR>
+
+       <TR>
+               <TD colspan="5" height="7" class="seperator">&nbsp;</TD>
+       </TR>
+
+       <TR>
+               <TD width="10" class="seperator">&nbsp;</TD>
+               <TD align="right">{--ADMIN_OPTION_CHECK_EMAIL_SUBJ--}:</TD>
+               <TD width="10" class="seperator">&nbsp;</TD>
+               <TD><SPAN class="nobr"> {--YES--}:&nbsp;<INPUT
+                       type="radio" name="test_subj" value="N"{--_CFG_TEST_SUBJ_N--}>&nbsp;
+               {--NO--}:&nbsp;<INPUT type="radio" name="test_subj" value="Y"{--_CFG_TEST_SUBJ_Y--}>
+               </SPAN></TD>
+               <TD width="10" class="seperator">&nbsp;</TD>
+       </TR>
+
+       <TR>
+               <TD colspan="5" height="7" class="seperator">&nbsp;</TD>
+       </TR>
+
+       <TR>
+               <TD width="10" class="seperator">&nbsp;</TD>
+               <TD align="right">{--ADMIN_OPTION_URL_BLACKLIST--}:</TD>
+               <TD width="10" class="seperator">&nbsp;</TD>
+               <TD><SPAN class="nobr"> {--YES--}:&nbsp;<INPUT
+                       type="radio" name="url_blacklist" value="Y"{--_CFG_URL_BLIST_Y--}>&nbsp;
+               {--NO--}:&nbsp;<INPUT type="radio" name="url_blacklist" value="N"{--_CFG_URL_BLIST_N--}>
+               </SPAN></TD>
+               <TD width="10" class="seperator">&nbsp;</TD>
+       </TR>
+
        <TR>
                <TD colspan="5" height="7" class="seperator bottom2">&nbsp;</TD>
        </TR>
index e7911848830d1e227fad77dd53d77b95e1f73738..117a0d0d597d38aefad0463bc05ba21864df71ec 100644 (file)
                <TD colspan="5" height="7" class="seperator">&nbsp;</TD>
        </TR>
 
-       <TR>
-               <TD width="10" class="seperator">&nbsp;</TD>
-               <TD align="right" width="340">
-               {--ADMIN_OPTION_MAX_UNCONFIRMED_MAILS--}:</TD>
-               <TD width="10" class="seperator">&nbsp;</TD>
-               <TD width="160"><INPUT type="text" name="unconfirmed"
-                       class="admin_normal" size="10" maxlength="10"
-                       value="{--_CFG_UNCONFIRMED--}"></TD>
-               <TD width="10" class="seperator">&nbsp;</TD>
-       </TR>
-
-       <TR>
-               <TD colspan="5" height="7" class="seperator">&nbsp;</TD>
-       </TR>
-
-       <TR>
-               <TD width="10" class="seperator">&nbsp;</TD>
-               <TD align="right">{--ADMIN_OPTION_MAX_TEXT_LENGTH--}:</TD>
-               <TD width="10" class="seperator">&nbsp;</TD>
-               <TD><INPUT type="text" name="max_tlength" class="admin_normal"
-                       size="10" maxlength="100" value="{--_CFG_MAX_TLENGTH--}"></TD>
-               <TD width="10" class="seperator">&nbsp;</TD>
-       </TR>
-
-       <TR>
-               <TD colspan="5" height="7" class="seperator">&nbsp;</TD>
-       </TR>
-
        <TR>
                <TD width="10" class="seperator">&nbsp;</TD>
                <TD align="right">{--ADMIN_OPTION_CODE_LENGTH--}:</TD>
                <TD colspan="5" height="7" class="seperator">&nbsp;</TD>
        </TR>
 
-       <TR>
-               <TD width="10" class="seperator">&nbsp;</TD>
-               <TD align="right">{--ADMIN_OPTION_CHECK_EMAIL_TEXT--}:</TD>
-               <TD width="10" class="seperator">&nbsp;</TD>
-               <TD><SPAN class="nobr"> {--YES--}:&nbsp;<INPUT
-                       type="radio" name="test_text" value="N"{--_CFG_TEST_TEXT_N--}>&nbsp;
-               {--NO--}:&nbsp;<INPUT type="radio" name="test_text" value="Y"{--_CFG_TEST_TEXT_Y--}>
-               </SPAN></TD>
-               <TD width="10" class="seperator">&nbsp;</TD>
-       </TR>
-
-       <TR>
-               <TD colspan="5" height="7" class="seperator">&nbsp;</TD>
-       </TR>
-
-       <TR>
-               <TD width="10" class="seperator">&nbsp;</TD>
-               <TD align="right">{--ADMIN_OPTION_CHECK_EMAIL_SUBJ--}:</TD>
-               <TD width="10" class="seperator">&nbsp;</TD>
-               <TD><SPAN class="nobr"> {--YES--}:&nbsp;<INPUT
-                       type="radio" name="test_subj" value="N"{--_CFG_TEST_SUBJ_N--}>&nbsp;
-               {--NO--}:&nbsp;<INPUT type="radio" name="test_subj" value="Y"{--_CFG_TEST_SUBJ_Y--}>
-               </SPAN></TD>
-               <TD width="10" class="seperator">&nbsp;</TD>
-       </TR>
-
-       <TR>
-               <TD colspan="5" height="7" class="seperator">&nbsp;</TD>
-       </TR>
-
-       <TR>
-               <TD width="10" class="seperator">&nbsp;</TD>
-               <TD align="right">{--ADMIN_OPTION_URL_BLACKLIST--}:</TD>
-               <TD width="10" class="seperator">&nbsp;</TD>
-               <TD><SPAN class="nobr"> {--YES--}:&nbsp;<INPUT
-                       type="radio" name="url_blacklist" value="Y"{--_CFG_URL_BLIST_Y--}>&nbsp;
-               {--NO--}:&nbsp;<INPUT type="radio" name="url_blacklist" value="N"{--_CFG_URL_BLIST_N--}>
-               </SPAN></TD>
-               <TD width="10" class="seperator">&nbsp;</TD>
-       </TR>
-
-       <TR>
-               <TD colspan="5" height="7" class="seperator">&nbsp;</TD>
-       </TR>
-
        <TR>
                <TD width="10" class="seperator">&nbsp;</TD>
                <TD align="right" width="340">