From e87430f959a8b240d516ef830e6494165bc933b2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 18 May 2008 14:56:42 +0000 Subject: [PATCH] More other options moved out (to config_order) --- inc/extensions.php | 2 +- inc/extensions/ext-order.php | 15 ++- inc/language/de.php | 2 + inc/language/order_de.php | 2 +- inc/libs/order_functions.php | 11 +- inc/modules/admin/what-config_email.php | 51 +++------ inc/modules/admin/what-config_order.php | 28 +++++ inc/modules/admin/what-config_other.php | 106 +++++------------- inc/modules/admin/what-del_email.php | 45 +++++--- .../de/html/admin/admin_config_order.tpl | 97 ++++++++++++++-- .../de/html/admin/admin_config_other.tpl | 73 ------------ 11 files changed, 213 insertions(+), 219 deletions(-) diff --git a/inc/extensions.php b/inc/extensions.php index 991742b344..2111344061 100644 --- a/inc/extensions.php +++ b/inc/extensions.php @@ -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) diff --git a/inc/extensions/ext-order.php b/inc/extensions/ext-order.php index 3244efa020..873f7fd74b 100644 --- a/inc/extensions/ext-order.php +++ b/inc/extensions/ext-order.php @@ -32,20 +32,19 @@ ************************************************************************/ // 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üpunkt "Mailbuchungsseite" nach "Mailbuchung" umbenannt und weitere Einstellungen aus Sonstige Einstellungen verschoben."; + break; + } break; diff --git a/inc/language/de.php b/inc/language/de.php index 29d0037634..650db038c2 100644 --- a/inc/language/de.php +++ b/inc/language/de.php @@ -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 sql_patches installiert haben und dabei das Passort-Hashing geändert/verbessert wurde. Bitte erneut einloggen!"); +define('ADMIN_POINTS_REPAYED', "Es wurden dem Mitglied %s {!POINTS!} zurückgeschrieben."); +define('ADMIN_NO_POINTS_REPAYED', "Die Mailbuchung hatte keine {!POINTS!} zum zurückbuchen!"); // ?> diff --git a/inc/language/order_de.php b/inc/language/order_de.php index 648214f344..6663f4b432 100644 --- a/inc/language/order_de.php +++ b/inc/language/order_de.php @@ -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önnen?"); define('ORDER_MIN_RECEIVER_PER_ORDER', "Minimale Empfänger pro Mailbuchung"); diff --git a/inc/libs/order_functions.php b/inc/libs/order_functions.php index a05f2f345a..92e10a574e 100644 --- a/inc/libs/order_functions.php +++ b/inc/libs/order_functions.php @@ -32,23 +32,22 @@ ************************************************************************/ // 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 .= "\n"; } + + // Return the output return $OUT; } diff --git a/inc/modules/admin/what-config_email.php b/inc/modules/admin/what-config_email.php index 23ac9fe670..176e5f991b 100644 --- a/inc/modules/admin/what-config_email.php +++ b/inc/modules/admin/what-config_email.php @@ -32,30 +32,27 @@ ************************************************************************/ // 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 = "".MAX_VALUE_SAVED.""; - } - 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(); + // ?> diff --git a/inc/modules/admin/what-config_order.php b/inc/modules/admin/what-config_order.php index 25e67a9ed5..73fc2f7232 100644 --- a/inc/modules/admin/what-config_order.php +++ b/inc/modules/admin/what-config_order.php @@ -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'])); diff --git a/inc/modules/admin/what-config_other.php b/inc/modules/admin/what-config_other.php index 15427baa3b..ad5dc9e0c3 100644 --- a/inc/modules/admin/what-config_other.php +++ b/inc/modules/admin/what-config_other.php @@ -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', " (".SECS.")"); define('_CFG_URL_TLOCK' , " (".SECS.")"); @@ -112,86 +99,46 @@ if (isset($_POST['ok'])) define('_CFG_PROF_REUPDATE' , " (".SECS.")"); } - 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(); + // ?> diff --git a/inc/modules/admin/what-del_email.php b/inc/modules/admin/what-del_email.php index c8ba9bb594..d573eb6b2c 100644 --- a/inc/modules/admin/what-del_email.php +++ b/inc/modules/admin/what-del_email.php @@ -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."
\n"; - if ($totalPoints > 0) { - // Pay back points - //* DEBUG: */ echo "PAYBACK:".$sender."
\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."
\n"; + if ($totalPoints > 0) { + // Pay back points + //* DEBUG: */ echo "PAYBACK:".$sender."
\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 diff --git a/templates/de/html/admin/admin_config_order.tpl b/templates/de/html/admin/admin_config_order.tpl index 645dbe2378..b0f988e8e6 100644 --- a/templates/de/html/admin/admin_config_order.tpl +++ b/templates/de/html/admin/admin_config_order.tpl @@ -1,28 +1,33 @@ -
- + +
- + + + {--ORDER_MAX_ORDER_SELECT--} + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/de/html/admin/admin_config_other.tpl b/templates/de/html/admin/admin_config_other.tpl index e791184883..117a0d0d59 100644 --- a/templates/de/html/admin/admin_config_other.tpl +++ b/templates/de/html/admin/admin_config_other.tpl @@ -20,34 +20,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -62,51 +34,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 {--ORDER_ADMIN_SETTINGS--}: + + {--ORDER_ADMIN_SETTINGS--}:  
 
  - {--ORDER_MAX_ORDER_SELECT--}  
  
 
  {--ORDER_ADMIN_MAX--}:   
 
 
  + {--ADMIN_OPTION_MAX_UNCONFIRMED_MAILS--}:  
 
 {--ADMIN_OPTION_MAX_TEXT_LENGTH--}:  
 
 {--ADMIN_OPTION_CHECK_EMAIL_TEXT--}:  {--YES--}:   + {--NO--}:  +  
 
 {--ADMIN_OPTION_CHECK_EMAIL_SUBJ--}:  {--YES--}:   + {--NO--}:  +  
 
 {--ADMIN_OPTION_URL_BLACKLIST--}:  {--YES--}:   + {--NO--}:  +  
 
 
  - {--ADMIN_OPTION_MAX_UNCONFIRMED_MAILS--}:  
 
 {--ADMIN_OPTION_MAX_TEXT_LENGTH--}:  
 
  {--ADMIN_OPTION_CODE_LENGTH--}: 
 {--ADMIN_OPTION_CHECK_EMAIL_TEXT--}:  {--YES--}:   - {--NO--}:  -  
 
 {--ADMIN_OPTION_CHECK_EMAIL_SUBJ--}:  {--YES--}:   - {--NO--}:  -  
 
 {--ADMIN_OPTION_URL_BLACKLIST--}:  {--YES--}:   - {--NO--}:  -  
 
  -- 2.39.5