From: Roland Häder Date: Mon, 8 Jun 2009 17:32:34 +0000 (+0000) Subject: Fix for fatal error and naming convention applied X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3afdce4fe00b4af570122ce7b8158ced44aec7d3;p=mailer.git Fix for fatal error and naming convention applied --- diff --git a/doubler.php b/doubler.php index 2492b995d6..783bf99288 100644 --- a/doubler.php +++ b/doubler.php @@ -94,7 +94,7 @@ if (isInstalled()) { } // END - if // Begin with doubler script... - if (IS_FORM_SENT()) { + if (isFormSent()) { // Secure points (so only integer/double values are allowed REQUEST_SET_POST('points', bigintval(REQUEST_POST('points'))); diff --git a/inc/functions.php b/inc/functions.php index 637412fc66..66614abbb7 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1715,7 +1715,7 @@ function extractHostnameFromUrl (&$script) { $url = constant('SERVER_URL'); // Is this URL valid? - if (substr($script, 0, 7) == "http://") { + if (substr($script, 0, 7) == 'http://') { // Use the hostname from script URL as new hostname $url = substr($script, 7); $extract = explode('/', $url); @@ -1724,12 +1724,12 @@ function extractHostnameFromUrl (&$script) { } // END - if // Extract host name - $host = str_replace("http://", '', $url); + $host = str_replace('http://', '', $url); if (ereg('/', $host)) $host = substr($host, 0, strpos($host, '/')); // Generate relative URL //* DEBUG: */ print("SCRIPT=".$script."
\n"); - if (substr(strtolower($script), 0, 7) == "http://") { + if (substr(strtolower($script), 0, 7) == 'http://') { // But only if http:// is in front! $script = substr($script, (strlen($url) + 7)); } elseif (substr(strtolower($script), 0, 8) == "https://") { @@ -1827,9 +1827,11 @@ function sendRawRequest ($host, $request) { // Open connection //* DEBUG: */ die("SCRIPT=".$script."
\n"); - if ($useProxy) { - $fp = @fsockopen(COMPILE_CODE(getConfig('proxy_host')), getConfig('proxy_port'), $errno, $errdesc, 30); + if ($useProxy === true) { + // Connect to host through proxy connection + $fp = @fsockopen(COMPILE_CODE(getConfig('proxy_host')), bigintval(getConfig('proxy_port')), $errno, $errdesc, 30); } else { + // Connect to host directly $fp = @fsockopen($host, 80, $errno, $errdesc, 30); } @@ -1840,7 +1842,7 @@ function sendRawRequest ($host, $request) { } // END - if // Do we use proxy? - if ($useProxy) { + if ($useProxy === true) { // Generate CONNECT request header $proxyTunnel = "CONNECT " . $host . ":80 HTTP/1.1" . getConfig('HTTP_EOL'); $proxyTunnel .= "Host: " . $host . getConfig('HTTP_EOL'); @@ -1848,7 +1850,7 @@ function sendRawRequest ($host, $request) { // Use login data to proxy? (username at least!) if (getConfig('proxy_username') != '') { // Add it as well - $encodedAuth = base64_encode(COMPILE_CODE(getConfig('proxy_username')).getConfig('ENCRYPT_SEPERATOR').COMPILE_CODE(getConfig('proxy_password'))); + $encodedAuth = base64_encode(COMPILE_CODE(getConfig('proxy_username')) . getConfig('ENCRYPT_SEPERATOR') . COMPILE_CODE(getConfig('proxy_password'))); $proxyTunnel .= "Proxy-Authorization: Basic " . $encodedAuth . getConfig('HTTP_EOL'); } // END - if @@ -1904,7 +1906,7 @@ function sendRawRequest ($host, $request) { //* DEBUG: */ print("Response:
".print_r($response, true)."
"); // Proxy agent found? - if ((substr(strtolower($response[0]), 0, 11) == 'proxy-agent') && ($useProxy)) { + if ((substr(strtolower($response[0]), 0, 11) == 'proxy-agent') && ($useProxy === true)) { // Proxy header detected, so remove two lines array_shift($response); array_shift($response); diff --git a/inc/libs/html_mail_functions.php b/inc/libs/html_mail_functions.php index 491afda732..7071a163a4 100644 --- a/inc/libs/html_mail_functions.php +++ b/inc/libs/html_mail_functions.php @@ -72,22 +72,20 @@ function HTML_INSERT_URLS ($text) { $test = $text; // First replace URLs... - while (ereg("http://", $test)) - { - $check = substr($test, strpos($test, "http://")); $check2 = $check; + while (ereg('http://', $test)) { + $check = substr($test, strpos($test, 'http://')); $check2 = $check; // See ext-html.php if you want to add more URL ends... - foreach ($GLOBALS['url_ends'] as $end) - { + foreach ($GLOBALS['url_ends'] as $end) { if (ereg($end, $check)) $check = substr($check, 0, strpos($check, $end)); - } + } // END - foreach // Now replace the URL against anchor container and pray... $text = substr($text, 0, strpos($text, $check2))."".$check."".substr($text, strpos($text, $check2) + strlen($check)); // Finally remove the url from testing string (or we have a loop and maybe server overload!) $test = substr($test, strpos($test, $check) + strlen($check)); - } + } // END - while // Now do the (nearly) same thing with email addresses // but now we have the problem that email addresses didn't have diff --git a/inc/libs/newsletter_functions.php b/inc/libs/newsletter_functions.php index 40a38a8311..16a28db280 100644 --- a/inc/libs/newsletter_functions.php +++ b/inc/libs/newsletter_functions.php @@ -74,20 +74,20 @@ function NL_INSERT_URLS ($text) { $test = $text; // First replace URLs... - while (ereg("http://", $test)) { - $check = substr($test, strpos($test, "http://")); $check2 = $check; + while (ereg('http://', $test)) { + $check = substr($test, strpos($test, 'http://')); $check2 = $check; // See ext-html.php if you want to add more URL ends... foreach ($GLOBALS['url_ends'] as $end) { if (ereg($end, $check)) $check = substr($check, 0, strpos($check, $end)); - } + } // END - foreach // Now replace the URL against anchor container and pray... $text = substr($text, 0, strpos($text, $check2)) . DEREFERER($check) . substr($text, strpos($text, $check2) + strlen($check)); // Finally remove the url from testing string (or we have a loop and maybe server overload!) $test = substr($test, strpos($test, $check) + strlen($check)); - } + } // END - while // Now do the (nearly) same thing with email addresses // but now we have the problem that email addresses didn't have diff --git a/inc/modules/admin.php b/inc/modules/admin.php index c347fa817d..986c37892f 100644 --- a/inc/modules/admin.php +++ b/inc/modules/admin.php @@ -54,11 +54,11 @@ $ret = 'init'; // Is no admin registered? if (!isAdminRegistered()) { // Admin is not registered so we have to inform the user - if ((IS_FORM_SENT()) && ((!REQUEST_ISSET_POST(('login'))) || (!REQUEST_ISSET_POST(('pass'))) || (strlen(REQUEST_POST('pass')) < 4))) { + if ((isFormSent()) && ((!REQUEST_ISSET_POST(('login'))) || (!REQUEST_ISSET_POST(('pass'))) || (strlen(REQUEST_POST('pass')) < 4))) { REQUEST_SET_POST('ok', '***'); } - if ((IS_FORM_SENT()) && (REQUEST_POST('ok') != '***')) { + if ((isFormSent()) && (REQUEST_POST('ok') != '***')) { // Hash the password with the old function because we are here in install mode $hashedPass = md5(REQUEST_POST('pass')); @@ -117,7 +117,7 @@ if (!isAdminRegistered()) { } // Yet-another notice-fix - if ((IS_FORM_SENT()) && (REQUEST_POST('ok') == '***')) { + if ((isFormSent()) && (REQUEST_POST('ok') == '***')) { // No login entered? if (!REQUEST_ISSET_POST(('login'))) $loginMessage = getMessage('ADMIN_NO_LOGIN'); @@ -206,11 +206,11 @@ if (!isAdminRegistered()) { } // END - if // Check if the admin has submitted data or not - if ((IS_FORM_SENT()) && ((!REQUEST_ISSET_POST(('login'))) || (!REQUEST_ISSET_POST(('pass'))) || (strlen(REQUEST_POST('pass')) < 4))) { + if ((isFormSent()) && ((!REQUEST_ISSET_POST(('login'))) || (!REQUEST_ISSET_POST(('pass'))) || (strlen(REQUEST_POST('pass')) < 4))) { REQUEST_SET_POST('ok', '***'); } // END - if - if ((IS_FORM_SENT()) && (REQUEST_POST('ok') != '***')) { + if ((isFormSent()) && (REQUEST_POST('ok') != '***')) { // All required data was entered so we check his account $ret = CHECK_ADMIN_LOGIN(REQUEST_POST('login'), REQUEST_POST('pass')); @@ -262,7 +262,7 @@ if (!isAdminRegistered()) { define('__LOGIN_VALUE', ''); } - if (IS_FORM_SENT()) { + if (isFormSent()) { // Set messages to zero $loginMessage = ''; $passwdMessage = ''; diff --git a/inc/modules/admin/what-add_bank_package.php b/inc/modules/admin/what-add_bank_package.php index e6851277c0..7eebf556a9 100644 --- a/inc/modules/admin/what-add_bank_package.php +++ b/inc/modules/admin/what-add_bank_package.php @@ -46,7 +46,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { ADD_DESCR('admin', __FILE__); // Is the formular sent? -if (IS_FORM_SENT()) { +if (isFormSent()) { // Save the row to the database ADMIN_SAVE_SETTINGS(REQUEST_POST_ARRAY(), "_bank_packages", '', array("account_fee", "interest_plus", "interest_minus", "first_payment"), true); } else { diff --git a/inc/modules/admin/what-add_guestnl_cat.php b/inc/modules/admin/what-add_guestnl_cat.php index 3f30a405bd..efdd811f68 100644 --- a/inc/modules/admin/what-add_guestnl_cat.php +++ b/inc/modules/admin/what-add_guestnl_cat.php @@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { // Check if category does already exist } else { // Display form diff --git a/inc/modules/admin/what-add_points.php b/inc/modules/admin/what-add_points.php index 442720021a..1329e0ec52 100644 --- a/inc/modules/admin/what-add_points.php +++ b/inc/modules/admin/what-add_points.php @@ -50,7 +50,7 @@ if (!REQUEST_ISSET_GET('uid')) REQUEST_SET_GET('uid', ''); if (REQUEST_GET('uid') == "all") { // Add points to all accounts - if ((IS_FORM_SENT()) && (REQUEST_POST('points') > 0)) { + if ((isFormSent()) && (REQUEST_POST('points') > 0)) { // @TODO Rewrite this constant define('__POINTS_VALUE', REQUEST_POST('points')); @@ -95,7 +95,7 @@ if (REQUEST_GET('uid') == "all") { list($sname, $fname, $email) = SQL_FETCHROW($result); SQL_FREERESULT($result); - if ((IS_FORM_SENT()) && (REQUEST_ISSET_POST(('points')))) { + if ((isFormSent()) && (REQUEST_ISSET_POST(('points')))) { // Remove depth to prevent booking errors. This is a bad coding // practice, thats also why we need to write this project from // scratch... diff --git a/inc/modules/admin/what-add_rallye.php b/inc/modules/admin/what-add_rallye.php index 5d8ef99f76..4ad03f5172 100644 --- a/inc/modules/admin/what-add_rallye.php +++ b/inc/modules/admin/what-add_rallye.php @@ -45,30 +45,30 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { // Generate timestamps $START = mktime(REQUEST_POST('start_hour'), REQUEST_POST('start_min'), REQUEST_POST('start_sec'), REQUEST_POST('start_month'), REQUEST_POST('start_day'), REQUEST_POST('start_year')); $END = mktime(REQUEST_POST('end_hour') , REQUEST_POST('end_min') , REQUEST_POST('end_sec') , REQUEST_POST('end_month') , REQUEST_POST('end_day') , REQUEST_POST('end_year') ); // 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", diff --git a/inc/modules/admin/what-add_sponsor.php b/inc/modules/admin/what-add_sponsor.php index df69c723aa..4254a691b9 100644 --- a/inc/modules/admin/what-add_sponsor.php +++ b/inc/modules/admin/what-add_sponsor.php @@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { // Save sponsor in database SPONSOR_HANDLE_SPONSOR(REQUEST_POST_ARRAY()); } else { diff --git a/inc/modules/admin/what-admin_add.php b/inc/modules/admin/what-admin_add.php index 3bb45b511f..18a9dcfdee 100644 --- a/inc/modules/admin/what-admin_add.php +++ b/inc/modules/admin/what-admin_add.php @@ -46,11 +46,11 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { ADD_DESCR('admin', __FILE__); // Check if the admin has entered title and what-php file name... -if (((!REQUEST_ISSET_POST(('title'))) || (!REQUEST_ISSET_POST(('menu'))) || (!REQUEST_ISSET_POST(('descr')))) && (IS_FORM_SENT())) { +if (((!REQUEST_ISSET_POST(('title'))) || (!REQUEST_ISSET_POST(('menu'))) || (!REQUEST_ISSET_POST(('descr')))) && (isFormSent())) { REQUEST_UNSET_POST('ok'); } -if (!IS_FORM_SENT()) +if (!isFormSent()) { // Create arrays $menus = array(); $titles = array(); $below = array(); diff --git a/inc/modules/admin/what-adminedit.php b/inc/modules/admin/what-adminedit.php index 19af03ec6d..f5743113d5 100644 --- a/inc/modules/admin/what-adminedit.php +++ b/inc/modules/admin/what-adminedit.php @@ -151,7 +151,7 @@ elseif ((REQUEST_ISSET_POST('del')) && (!IS_DEMO())) // Load template LOAD_TEMPLATE("admin_amenu_delete"); -} elseif ((IS_FORM_SENT()) && (!IS_DEMO())) { +} elseif ((isFormSent()) && (!IS_DEMO())) { // An action is done... switch (REQUEST_POST('ok')) { diff --git a/inc/modules/admin/what-admins_contct.php b/inc/modules/admin/what-admins_contct.php index 5b99c28e67..654481c992 100644 --- a/inc/modules/admin/what-admins_contct.php +++ b/inc/modules/admin/what-admins_contct.php @@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if ((IS_FORM_SENT()) && (REQUEST_ISSET_GET('admin'))) { +if ((isFormSent()) && (REQUEST_ISSET_GET('admin'))) { // Send mail or message if ((EXT_IS_ACTIVE("msg")) && (REQUEST_POST('type') == "msg")) { // Add message diff --git a/inc/modules/admin/what-config_active.php b/inc/modules/admin/what-config_active.php index e6dffcbeb3..326f91f7b0 100644 --- a/inc/modules/admin/what-config_active.php +++ b/inc/modules/admin/what-config_active.php @@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { // Save data ADMIN_SAVE_SETTINGS_POST(); } else { diff --git a/inc/modules/admin/what-config_admin.php b/inc/modules/admin/what-config_admin.php index 4d78ddb8c6..9c7eb830f1 100644 --- a/inc/modules/admin/what-config_admin.php +++ b/inc/modules/admin/what-config_admin.php @@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { // Save configuration ADMIN_SAVE_SETTINGS_POST(); } else { diff --git a/inc/modules/admin/what-config_autopurge.php b/inc/modules/admin/what-config_autopurge.php index 77ae1fa39e..f0f27c0435 100644 --- a/inc/modules/admin/what-config_autopurge.php +++ b/inc/modules/admin/what-config_autopurge.php @@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { // Data was submitted so we store it ADMIN_SAVE_SETTINGS_POST(); } else { diff --git a/inc/modules/admin/what-config_beg.php b/inc/modules/admin/what-config_beg.php index 516538aaaf..7148c1bae4 100644 --- a/inc/modules/admin/what-config_beg.php +++ b/inc/modules/admin/what-config_beg.php @@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { // Translate german decimal commas to computer decimal dots REQUEST_SET_POST('beg_points' , convertCommaToDot(REQUEST_POST('beg_points') )); REQUEST_SET_POST('beg_points_max' , convertCommaToDot(REQUEST_POST('beg_points_max') )); diff --git a/inc/modules/admin/what-config_birthday.php b/inc/modules/admin/what-config_birthday.php index f614f54e10..257106d884 100644 --- a/inc/modules/admin/what-config_birthday.php +++ b/inc/modules/admin/what-config_birthday.php @@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { // Save configuration ADMIN_SAVE_SETTINGS_POST(); } else { diff --git a/inc/modules/admin/what-config_bonus.php b/inc/modules/admin/what-config_bonus.php index d5d8a09f1d..84912169d5 100644 --- a/inc/modules/admin/what-config_bonus.php +++ b/inc/modules/admin/what-config_bonus.php @@ -45,12 +45,12 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { // Replace german decimal commas to computer decimal dots - REQUEST_POST('login_bonus') = convertCommaToDot(REQUEST_POST('login_bonus') ); - REQUEST_POST('turbo_bonus') = convertCommaToDot(REQUEST_POST('turbo_bonus') ); - REQUEST_POST('bonus_ref') = convertCommaToDot(REQUEST_POST('bonus_ref') ); - REQUEST_POST('bonus_order') = convertCommaToDot(REQUEST_POST('bonus_order') ); + REQUEST_SET_POST('login_bonus', convertCommaToDot(REQUEST_POST('login_bonus'))); + REQUEST_SET_POST('turbo_bonus', convertCommaToDot(REQUEST_POST('turbo_bonus'))); + REQUEST_SET_POST('bonus_ref', convertCommaToDot(REQUEST_POST('bonus_ref'))); + REQUEST_SET_POST('bonus_order', convertCommaToDot(REQUEST_POST('bonus_order'))); REQUEST_SET_POST('bonus_notify_points', convertCommaToDot(REQUEST_POST('bonus_notify_points'))); // Generate string for saving ranks diff --git a/inc/modules/admin/what-config_cache.php b/inc/modules/admin/what-config_cache.php index 86d588a7d4..59a6723c89 100644 --- a/inc/modules/admin/what-config_cache.php +++ b/inc/modules/admin/what-config_cache.php @@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { // Cache path has been not changed by default so don't test it again REQUEST_SET_POST('cache_tested', 'N'); diff --git a/inc/modules/admin/what-config_cats.php b/inc/modules/admin/what-config_cats.php index 7132bfe239..42e35ff3d0 100644 --- a/inc/modules/admin/what-config_cats.php +++ b/inc/modules/admin/what-config_cats.php @@ -68,7 +68,7 @@ if (REQUEST_ISSET_POST(('add'))) { // Display message LOAD_TEMPLATE('admin_settings_saved', false, $content); -} elseif ((IS_FORM_SENT()) && (REQUEST_ISSET_POST('id')) && (is_array(REQUEST_POST('id')))) { +} elseif ((isFormSent()) && (REQUEST_ISSET_POST('id')) && (is_array(REQUEST_POST('id')))) { // Change or delete categories... $TEXT = ''; foreach (REQUEST_POST('id') as $id => $cat) { diff --git a/inc/modules/admin/what-config_doubler.php b/inc/modules/admin/what-config_doubler.php index db841a13ea..bd1bb4c49c 100644 --- a/inc/modules/admin/what-config_doubler.php +++ b/inc/modules/admin/what-config_doubler.php @@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { // Replace commata with decimal dot REQUEST_SET_POST('doubler_charge', convertCommaToDot((REQUEST_POST('doubler_charge') / 100))); REQUEST_SET_POST('doubler_ref' , convertCommaToDot((REQUEST_POST('doubler_ref') / 100))); diff --git a/inc/modules/admin/what-config_email.php b/inc/modules/admin/what-config_email.php index 1771aa54df..5d7c6094ba 100644 --- a/inc/modules/admin/what-config_email.php +++ b/inc/modules/admin/what-config_email.php @@ -67,7 +67,7 @@ if (REQUEST_ISSET_POST(('add_max'))) { // Display message LOAD_TEMPLATE('admin_settings_saved', false, $content); -} elseif ((IS_FORM_SENT()) && (REQUEST_ISSET_GET('do'))) { +} elseif ((isFormSent()) && (REQUEST_ISSET_GET('do'))) { // Change or delete entries... $TEXT = ''; foreach (REQUEST_POST('id') as $id => $value) { diff --git a/inc/modules/admin/what-config_extensions.php b/inc/modules/admin/what-config_extensions.php index bd1d4e2605..cc3ba11687 100644 --- a/inc/modules/admin/what-config_extensions.php +++ b/inc/modules/admin/what-config_extensions.php @@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { // Save configuration ADMIN_SAVE_SETTINGS_POST(); } else { diff --git a/inc/modules/admin/what-config_holiday.php b/inc/modules/admin/what-config_holiday.php index 07ac413f57..21d9a2798f 100644 --- a/inc/modules/admin/what-config_holiday.php +++ b/inc/modules/admin/what-config_holiday.php @@ -45,13 +45,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) -{ +if (isFormSent()) { // 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")); @@ -71,5 +68,6 @@ else // Load form template LOAD_TEMPLATE("admin_config_holiday"); } + // ?> diff --git a/inc/modules/admin/what-config_home.php b/inc/modules/admin/what-config_home.php index 294d0ffff0..ff50839192 100644 --- a/inc/modules/admin/what-config_home.php +++ b/inc/modules/admin/what-config_home.php @@ -52,7 +52,7 @@ if (REQUEST_ISSET_GET('sub')) $sub = REQUEST_GET('sub'); switch ($sub) { case "settings": // Settings related to the index page - if (IS_FORM_SENT()) { + if (isFormSent()) { // Save settings ADMIN_SAVE_SETTINGS_POST(); OUTPUT_HTML("{--ADMIN_CONTINUE_TO_CONFIG--}"); diff --git a/inc/modules/admin/what-config_mediadata.php b/inc/modules/admin/what-config_mediadata.php index 05c1482eea..7b1ce5e2ef 100644 --- a/inc/modules/admin/what-config_mediadata.php +++ b/inc/modules/admin/what-config_mediadata.php @@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { // Test timestamp $STAMP = mktime(0, 0, 0, bigintval(REQUEST_POST('month')), bigintval(REQUEST_POST('day')), bigintval(REQUEST_POST('year'))); if ($STAMP > time()) { @@ -69,7 +69,7 @@ if (IS_FORM_SENT()) { } } -if (IS_FORM_SENT()) { +if (isFormSent()) { // Save data ADMIN_SAVE_SETTINGS_POST(); } else { diff --git a/inc/modules/admin/what-config_newsletter.php b/inc/modules/admin/what-config_newsletter.php index 54d47057d4..ed72a5e667 100644 --- a/inc/modules/admin/what-config_newsletter.php +++ b/inc/modules/admin/what-config_newsletter.php @@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { // Save data REQUEST_SET_POST('nl_charge', convertCommaToDot(REQUEST_POST('nl_charge'))); diff --git a/inc/modules/admin/what-config_nickname.php b/inc/modules/admin/what-config_nickname.php index 6b7393056a..35e56fcc1b 100644 --- a/inc/modules/admin/what-config_nickname.php +++ b/inc/modules/admin/what-config_nickname.php @@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { // Save data ADMIN_SAVE_SETTINGS_POST(); } else { diff --git a/inc/modules/admin/what-config_order.php b/inc/modules/admin/what-config_order.php index 3bf7eed247..03a1d0dad0 100644 --- a/inc/modules/admin/what-config_order.php +++ b/inc/modules/admin/what-config_order.php @@ -45,13 +45,12 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { // Save data ADMIN_SAVE_SETTINGS_POST(); } else { // Prepare constants for the template - switch (getConfig('order_max_full')) - { + switch (getConfig('order_max_full')) { case 'ORDER': define('__ORDER_DEFAULT', ' checked="checked"'); define('__MAX_DEFAULT' , ''); @@ -67,8 +66,7 @@ if (IS_FORM_SENT()) { define('__MIN_VALUE', getConfig('order_min')); // Sorting mode (ascending / descending) - switch (getConfig('order_mode')) - { + switch (getConfig('order_mode')) { case "ASC": define('__ASC_DEFAULT' , ' selected="selected"'); define('__DESC_DEFAULT', ''); @@ -134,5 +132,6 @@ if (IS_FORM_SENT()) { // Load template LOAD_TEMPLATE("admin_config_order"); } + // ?> diff --git a/inc/modules/admin/what-config_other.php b/inc/modules/admin/what-config_other.php index b333ac5b51..2074ae4828 100644 --- a/inc/modules/admin/what-config_other.php +++ b/inc/modules/admin/what-config_other.php @@ -50,7 +50,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { ADD_DESCR('admin', __FILE__); // Stop saving data if one input field is !isset -if (IS_FORM_SENT()) { +if (isFormSent()) { // Calculate stamps and set calculated stamps REQUEST_POST('online_timeout') = createTimestampFromSelections('ip_timeout' , REQUEST_POST_ARRAY()); REQUEST_POST('url_tlock') = createTimestampFromSelections('url_tlock' , REQUEST_POST_ARRAY()); @@ -73,7 +73,7 @@ if (IS_FORM_SENT()) { if (!REQUEST_ISSET_POST(('reject_url'))) { REQUEST_UNSET_POST('ok'); } } -if (IS_FORM_SENT()) { +if (isFormSent()) { // Update stamps directly ADMIN_SAVE_SETTINGS_POST(); } else { diff --git a/inc/modules/admin/what-config_points.php b/inc/modules/admin/what-config_points.php index 3b714a963f..6cfa96aa66 100644 --- a/inc/modules/admin/what-config_points.php +++ b/inc/modules/admin/what-config_points.php @@ -72,7 +72,7 @@ if (REQUEST_ISSET_GET('sub')) { REQUEST_SET_GET('sub', "overview"); } -if (IS_FORM_SENT()) { +if (isFormSent()) { INIT_SQLS(); switch (REQUEST_GET('sub')) { diff --git a/inc/modules/admin/what-config_primera.php b/inc/modules/admin/what-config_primera.php index 1c02776ae8..d4af5be2db 100644 --- a/inc/modules/admin/what-config_primera.php +++ b/inc/modules/admin/what-config_primera.php @@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { // First merge temporarily the new API data into the current config mergeConfig(REQUEST_POST_ARRAY()); diff --git a/inc/modules/admin/what-config_proxy.php b/inc/modules/admin/what-config_proxy.php index 3a690de5c9..369d543fae 100644 --- a/inc/modules/admin/what-config_proxy.php +++ b/inc/modules/admin/what-config_proxy.php @@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { // Test proxy settings if (ADMIN_TEST_PROXY_SETTINGS(REQUEST_POST_ARRAY())) { // Save configuration diff --git a/inc/modules/admin/what-config_refback.php b/inc/modules/admin/what-config_refback.php index 9432f69482..7d568d1e5e 100644 --- a/inc/modules/admin/what-config_refback.php +++ b/inc/modules/admin/what-config_refback.php @@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { // Save configuration ADMIN_SAVE_SETTINGS_POST(); } else { diff --git a/inc/modules/admin/what-config_refid.php b/inc/modules/admin/what-config_refid.php index cef646c306..e0c7373048 100644 --- a/inc/modules/admin/what-config_refid.php +++ b/inc/modules/admin/what-config_refid.php @@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { // Save data ADMIN_SAVE_SETTINGS_POST(); } else { diff --git a/inc/modules/admin/what-config_register.php b/inc/modules/admin/what-config_register.php index f1d578d871..f7c4016c45 100644 --- a/inc/modules/admin/what-config_register.php +++ b/inc/modules/admin/what-config_register.php @@ -46,7 +46,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { ADD_DESCR('admin', __FILE__); // Do we want to save changes? -if (IS_FORM_SENT()) { +if (isFormSent()) { 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__); diff --git a/inc/modules/admin/what-config_register2.php b/inc/modules/admin/what-config_register2.php index e5650dc474..bf40ec0467 100644 --- a/inc/modules/admin/what-config_register2.php +++ b/inc/modules/admin/what-config_register2.php @@ -40,7 +40,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { // Calculate timestamp from selections... REQUEST_SET_POST('ip_timeout', createTimestampFromSelections('ip_timeout', REQUEST_POST_ARRAY())); REQUEST_SET_POST('least_cats', round(REQUEST_POST('least_cats'))); diff --git a/inc/modules/admin/what-config_removeip.php b/inc/modules/admin/what-config_removeip.php index 8967f1ef59..3ae85a89cd 100644 --- a/inc/modules/admin/what-config_removeip.php +++ b/inc/modules/admin/what-config_removeip.php @@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { // Save configuration ADMIN_SAVE_SETTINGS_POST(); } else { diff --git a/inc/modules/admin/what-config_rewrite.php b/inc/modules/admin/what-config_rewrite.php index 8c36ce73ff..4a74404081 100644 --- a/inc/modules/admin/what-config_rewrite.php +++ b/inc/modules/admin/what-config_rewrite.php @@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { // Generate string $MODs = array(); foreach (REQUEST_POST('mod') as $mod => $sel) { diff --git a/inc/modules/admin/what-config_secure.php b/inc/modules/admin/what-config_secure.php index b6d4f6425c..ab2a1234e0 100644 --- a/inc/modules/admin/what-config_secure.php +++ b/inc/modules/admin/what-config_secure.php @@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { // If salt length is empty or null then we shall generate new passwords if (!REQUEST_ISSET_POST(('salt_length')) || (REQUEST_POST('salt_length') == '0')) { // Generate new passwords for all! diff --git a/inc/modules/admin/what-config_session.php b/inc/modules/admin/what-config_session.php index 4ee5e525a6..3d987ab922 100644 --- a/inc/modules/admin/what-config_session.php +++ b/inc/modules/admin/what-config_session.php @@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { // Test Path if ((!REQUEST_ISSET_POST(('session_save_path'))) || ((isDirectory(REQUEST_POST('session_save_path'))) && (is_writeable(REQUEST_POST('session_save_path'))))) { // Save configuration diff --git a/inc/modules/admin/what-config_sponsor.php b/inc/modules/admin/what-config_sponsor.php index 656165484e..f834d2e8e9 100644 --- a/inc/modules/admin/what-config_sponsor.php +++ b/inc/modules/admin/what-config_sponsor.php @@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { // Allow only direct points (non-floating) REQUEST_SET_POST('sponsor_min_points', bigintval(REQUEST_POST('sponsor_min_points'))); REQUEST_SET_POST('sponsor_ref_points', bigintval(REQUEST_POST('sponsor_ref_points'))); diff --git a/inc/modules/admin/what-config_stats.php b/inc/modules/admin/what-config_stats.php index 0118f7e7c2..8f2b6284e9 100644 --- a/inc/modules/admin/what-config_stats.php +++ b/inc/modules/admin/what-config_stats.php @@ -46,7 +46,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { ADD_DESCR('admin', __FILE__); // Was the form submitted? -if (IS_FORM_SENT()) { +if (isFormSent()) { // Save settings ADMIN_SAVE_SETTINGS_POST(); } else { diff --git a/inc/modules/admin/what-config_surfbar.php b/inc/modules/admin/what-config_surfbar.php index f1b04536c2..8d15d73c6d 100644 --- a/inc/modules/admin/what-config_surfbar.php +++ b/inc/modules/admin/what-config_surfbar.php @@ -46,7 +46,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { ADD_DESCR('admin', __FILE__); // Was the form submitted? -if (IS_FORM_SENT()) { +if (isFormSent()) { // Replace german decimal comma with computer decimal dot if (REQUEST_ISSET_POST(('surfbar_static_reward'))) REQUEST_SET_POST('surfbar_static_reward' , convertCommaToDot(REQUEST_POST('surfbar_static_reward'))); if (REQUEST_ISSET_POST(('surfbar_static_costs'))) REQUEST_SET_POST('surfbar_static_costs' , convertCommaToDot(REQUEST_POST('surfbar_static_costs'))); diff --git a/inc/modules/admin/what-config_title.php b/inc/modules/admin/what-config_title.php index f1da62aea6..b490c12b34 100644 --- a/inc/modules/admin/what-config_title.php +++ b/inc/modules/admin/what-config_title.php @@ -45,13 +45,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) -{ +if (isFormSent()) { // Save settings ADMIN_SAVE_SETTINGS_POST(); -} -else -{ +} else { // Remember config data in constants for the template define('__CFG_TITLE_LEFT' , getConfig('title_left')); define('__CFG_TITLE_MIDDLE' , getConfig('title_middle')); @@ -63,5 +60,6 @@ else // Load template LOAD_TEMPLATE("admin_config_title"); } + // ?> diff --git a/inc/modules/admin/what-config_top10.php b/inc/modules/admin/what-config_top10.php index 25ddd963a3..b6876e5525 100644 --- a/inc/modules/admin/what-config_top10.php +++ b/inc/modules/admin/what-config_top10.php @@ -45,18 +45,16 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) -{ +if (isFormSent()) { // Save settings ADMIN_SAVE_SETTINGS_POST(); -} -else -{ +} else { // Prepare constants for the template define('__MAX_VALUE', getConfig('top10_max')); // Load form template LOAD_TEMPLATE("admin_config_top10"); } + // ?> diff --git a/inc/modules/admin/what-config_transfer.php b/inc/modules/admin/what-config_transfer.php index 08969d6d12..7557e6b45a 100644 --- a/inc/modules/admin/what-config_transfer.php +++ b/inc/modules/admin/what-config_transfer.php @@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { // Save settings... ADMIN_SAVE_SETTINGS_POST(); } diff --git a/inc/modules/admin/what-config_user.php b/inc/modules/admin/what-config_user.php index 6abf5b6c76..8b5a2e7f93 100644 --- a/inc/modules/admin/what-config_user.php +++ b/inc/modules/admin/what-config_user.php @@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { // Save settings ADMIN_SAVE_SETTINGS_POST(); } else { diff --git a/inc/modules/admin/what-config_wernis.php b/inc/modules/admin/what-config_wernis.php index 51016bf817..d112c9565b 100644 --- a/inc/modules/admin/what-config_wernis.php +++ b/inc/modules/admin/what-config_wernis.php @@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { // First merge temporarily the new API data into the current config mergeConfig(REQUEST_POST_ARRAY()); diff --git a/inc/modules/admin/what-config_yoomedia.php b/inc/modules/admin/what-config_yoomedia.php index 506ff3b308..80cf4ba27f 100644 --- a/inc/modules/admin/what-config_yoomedia.php +++ b/inc/modules/admin/what-config_yoomedia.php @@ -49,7 +49,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { ADD_DESCR('admin', __FILE__); // Was the form submitted? -if (IS_FORM_SENT()) { +if (isFormSent()) { // Test Yoo!Media config if (YOOMEDIA_TEST_CONFIG(REQUEST_POST_ARRAY())) { // Save settings diff --git a/inc/modules/admin/what-del_sponsor.php b/inc/modules/admin/what-del_sponsor.php index 9291a2a39f..bacc1857af 100644 --- a/inc/modules/admin/what-del_sponsor.php +++ b/inc/modules/admin/what-del_sponsor.php @@ -51,7 +51,7 @@ if (REQUEST_ISSET_GET('id')) { array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Remove sponsor - if (IS_FORM_SENT()) { + if (isFormSent()) { // Load data and remember it in constants list($email, $gender, $surname, $family) = SQL_FETCHROW($result); diff --git a/inc/modules/admin/what-del_user.php b/inc/modules/admin/what-del_user.php index 400a7292b3..9c18169179 100644 --- a/inc/modules/admin/what-del_user.php +++ b/inc/modules/admin/what-del_user.php @@ -46,7 +46,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { ADD_DESCR('admin', __FILE__); // User exists.. -if ((IS_FORM_SENT()) || ((REQUEST_ISSET_POST('del')) && (REQUEST_ISSET_POST(('reason'))))) { +if ((isFormSent()) || ((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__); diff --git a/inc/modules/admin/what-edit_emails.php b/inc/modules/admin/what-edit_emails.php index 72308c7e01..c36da87535 100644 --- a/inc/modules/admin/what-edit_emails.php +++ b/inc/modules/admin/what-edit_emails.php @@ -45,13 +45,13 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if ((IS_FORM_SENT()) && (!REQUEST_ISSET_POST('id'))) { +if ((isFormSent()) && (!REQUEST_ISSET_POST('id'))) { REQUEST_UNSET_POST('ok'); } $result = SQL_QUERY("SELECT id, sender, subject, payment_id, cat_id FROM `{!_MYSQL_PREFIX!}_pool` ORDER BY timestamp", __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { - if (IS_FORM_SENT()) { + if (isFormSent()) { // 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__); diff --git a/inc/modules/admin/what-edit_sponsor.php b/inc/modules/admin/what-edit_sponsor.php index 64b052ff66..cc1f7295d9 100644 --- a/inc/modules/admin/what-edit_sponsor.php +++ b/inc/modules/admin/what-edit_sponsor.php @@ -104,7 +104,7 @@ if ((REQUEST_ISSET_GET('id')) && (REQUEST_ISSET_GET(('mode')))) { INIT_SQLS(); // Sponsor was found - if ((IS_FORM_SENT()) || (REQUEST_ISSET_POST('edit'))) { + if ((isFormSent()) || (REQUEST_ISSET_POST('edit'))) { // Perform action on mode switch (REQUEST_GET('mode')) { diff --git a/inc/modules/admin/what-guest_add.php b/inc/modules/admin/what-guest_add.php index fbee30723a..650e4ed667 100644 --- a/inc/modules/admin/what-guest_add.php +++ b/inc/modules/admin/what-guest_add.php @@ -46,12 +46,12 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { ADD_DESCR('admin', __FILE__); // Check if the admin has entered title and what-php file name... -if (((!REQUEST_ISSET_POST(('title'))) || (!REQUEST_ISSET_POST(('menu')))) && (IS_FORM_SENT())) { +if (((!REQUEST_ISSET_POST(('title'))) || (!REQUEST_ISSET_POST(('menu')))) && (isFormSent())) { // Abort adding the menu entry REQUEST_UNSET_POST('ok'); } -if (!IS_FORM_SENT()) { +if (!isFormSent()) { // Create arrays $menus = array(); $titles = array(); $below = array(); diff --git a/inc/modules/admin/what-guestedit.php b/inc/modules/admin/what-guestedit.php index fdab16c8b6..f36e508510 100644 --- a/inc/modules/admin/what-guestedit.php +++ b/inc/modules/admin/what-guestedit.php @@ -142,7 +142,7 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO())) // Load template LOAD_TEMPLATE("admin_gmenu_delete"); -} elseif ((IS_FORM_SENT()) && (!IS_DEMO())) { +} elseif ((isFormSent()) && (!IS_DEMO())) { // An action is done... switch (REQUEST_POST('ok')) { diff --git a/inc/modules/admin/what-list_payouts.php b/inc/modules/admin/what-list_payouts.php index 921c40e795..13e6812f98 100644 --- a/inc/modules/admin/what-list_payouts.php +++ b/inc/modules/admin/what-list_payouts.php @@ -80,7 +80,7 @@ if (REQUEST_ISSET_GET(('pid'))) { if ((REQUEST_GET('do') == "accept") && (!empty($email))) { // Ok, now we can output the form or execute accepting - if (IS_FORM_SENT()) { + if (isFormSent()) { // 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__); @@ -169,7 +169,7 @@ if (REQUEST_ISSET_GET(('pid'))) { } } elseif ((REQUEST_GET('do') == "reject") && (!empty($email))) { // Ok, now we can output the form or execute rejecting - if (IS_FORM_SENT()) { + if (isFormSent()) { if ($task > 0) { // Clear task runFilterChain('solve_task', $task); diff --git a/inc/modules/admin/what-list_yoomedia_tm.php b/inc/modules/admin/what-list_yoomedia_tm.php index 4ff7c5ac79..b8fcf915a4 100644 --- a/inc/modules/admin/what-list_yoomedia_tm.php +++ b/inc/modules/admin/what-list_yoomedia_tm.php @@ -51,7 +51,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { ADD_DESCR('admin', __FILE__); // Do actions here -if (IS_FORM_SENT()) { +if (isFormSent()) { // Prepare mail for delivery YOOMEDIA_PREPARE_MAIL_DELIVERY(REQUEST_POST_ARRAY()); return; diff --git a/inc/modules/admin/what-lock_sponsor.php b/inc/modules/admin/what-lock_sponsor.php index 7acd09d1c2..54973551c5 100644 --- a/inc/modules/admin/what-lock_sponsor.php +++ b/inc/modules/admin/what-lock_sponsor.php @@ -62,7 +62,7 @@ if (REQUEST_ISSET_GET('id')) { define('__FAMILY' , $fname); define('__ID' , bigintval(REQUEST_GET('id'))); - if (IS_FORM_SENT()) { + if (isFormSent()) { // Create messages if ($status == 'CONFIRMED') { // Message when sponsor's account got lock diff --git a/inc/modules/admin/what-maintenance.php b/inc/modules/admin/what-maintenance.php index 100c998567..56794823c5 100644 --- a/inc/modules/admin/what-maintenance.php +++ b/inc/modules/admin/what-maintenance.php @@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { // De- or activate maintenance mode switch (getConfig('maintenance')) { diff --git a/inc/modules/admin/what-mem_add.php b/inc/modules/admin/what-mem_add.php index 8a445316b1..3269df0ff7 100644 --- a/inc/modules/admin/what-mem_add.php +++ b/inc/modules/admin/what-mem_add.php @@ -47,11 +47,11 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { ADD_DESCR('admin', __FILE__); // Check if the admin has entered title and what-php file name... -if ((!REQUEST_ISSET_POST(('title'))) && (IS_FORM_SENT())) { +if ((!REQUEST_ISSET_POST(('title'))) && (isFormSent())) { REQUEST_UNSET_POST('ok'); } // END - if -if (!IS_FORM_SENT()) { +if (!isFormSent()) { // Create arrays $menus = array(); $titles = array(); $below = array(); diff --git a/inc/modules/admin/what-memedit.php b/inc/modules/admin/what-memedit.php index bcb3844f31..a9d1e0dae4 100644 --- a/inc/modules/admin/what-memedit.php +++ b/inc/modules/admin/what-memedit.php @@ -175,7 +175,7 @@ if ((REQUEST_ISSET_POST('edit')) && ($chk > 0) && (!IS_DEMO())) { define('__CNT_VALUE', $cnt); // LOAD_TEMPLATE("admin_mmenu_status"); -} elseif ((IS_FORM_SENT()) && (!IS_DEMO())) { +} elseif ((isFormSent()) && (!IS_DEMO())) { // An act is done... foreach (REQUEST_POST('sel') as $sel => $menu) { $AND = "(`what` = '' OR `what` IS NULL)"; diff --git a/inc/modules/admin/what-payments.php b/inc/modules/admin/what-payments.php index a296935eab..a0422882c2 100644 --- a/inc/modules/admin/what-payments.php +++ b/inc/modules/admin/what-payments.php @@ -49,7 +49,7 @@ if (((!REQUEST_ISSET_POST(('t_wait'))) || (!REQUEST_ISSET_POST(('payment')))) && REQUEST_UNSET_POST('ok'); } -if (IS_FORM_SENT()) { +if (isFormSent()) { 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')."')"); diff --git a/inc/modules/admin/what-refbanner.php b/inc/modules/admin/what-refbanner.php index 8be4f99466..21b8a84e9c 100644 --- a/inc/modules/admin/what-refbanner.php +++ b/inc/modules/admin/what-refbanner.php @@ -56,7 +56,7 @@ if ((!REQUEST_ISSET_POST('url')) || (!REQUEST_ISSET_POST(('alternate')))) { // Check selection count if (REQUEST_ISSET_POST('sel')) $SEL = countPostSelection(); -if (IS_FORM_SENT()) { +if (isFormSent()) { // Fix older calls from add-new-banner-form if (!REQUEST_ISSET_GET(('mode'))) REQUEST_SET_GET('mode', 'add'); $sql = ''; diff --git a/inc/modules/admin/what-send_bonus.php b/inc/modules/admin/what-send_bonus.php index ed6591d16c..0e5d9f95f3 100644 --- a/inc/modules/admin/what-send_bonus.php +++ b/inc/modules/admin/what-send_bonus.php @@ -51,7 +51,7 @@ ADD_DESCR('admin', __FILE__); // Set empty mode to "select" if (!REQUEST_ISSET_GET('mode')) REQUEST_SET_GET('mode', "select"); -if (IS_FORM_SENT()) { +if (isFormSent()) { // Deliver bonus mail addNewBonusMail(REQUEST_POST_ARRAY(), REQUEST_GET('mode')); } else { diff --git a/inc/modules/admin/what-send_newsletter.php b/inc/modules/admin/what-send_newsletter.php index c96e883df0..9cdac1d2a6 100644 --- a/inc/modules/admin/what-send_newsletter.php +++ b/inc/modules/admin/what-send_newsletter.php @@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { // Add description as navigation point ADD_DESCR('admin', __FILE__); -if (IS_FORM_SENT()) { +if (isFormSent()) { $result = SQL_QUERY("SELECT userid, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `status`='CONFIRMED' AND nl_receive='Y' diff --git a/inc/modules/admin/what-sub_points.php b/inc/modules/admin/what-sub_points.php index 804e29413f..94f4f9ded8 100644 --- a/inc/modules/admin/what-sub_points.php +++ b/inc/modules/admin/what-sub_points.php @@ -54,7 +54,7 @@ if (REQUEST_GET('uid') == "all") { define('__POINTS_VALUE', REQUEST_POST('points')); // Is the form sent? - if ((IS_FORM_SENT()) && (REQUEST_POST('points') > 0)) { + if ((isFormSent()) && (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__); while ($content = SQL_FETCHARRAY($result_main)) { @@ -87,7 +87,7 @@ if (REQUEST_GET('uid') == "all") { // Selected user does exist $content = SQL_FETCHARRAY($result); - if ((IS_FORM_SENT()) && (REQUEST_ISSET_POST(('points')))) { + if ((isFormSent()) && (REQUEST_ISSET_POST(('points')))) { // Ok, add to used points and send an email to him... SUB_POINTS("admin_single", bigintval(REQUEST_GET('uid')), REQUEST_POST('points')); diff --git a/inc/modules/admin/what-unlock_emails.php b/inc/modules/admin/what-unlock_emails.php index 36a3e66ed4..09af56904d 100644 --- a/inc/modules/admin/what-unlock_emails.php +++ b/inc/modules/admin/what-unlock_emails.php @@ -149,7 +149,7 @@ LIMIT 1", sendEmail($DATA['sender'], getMessage('MEMBER_ORDER_REJECTED'), $msg_user); // If you do not enter an URL to redirect to, your URL will be set! - if ((!REQUEST_ISSET_POST(('redirect'))) || (REQUEST_POST('redirect') == "http://")) REQUEST_SET_POST('redirect', constant('URL')); + if ((!REQUEST_ISSET_POST(('redirect'))) || (REQUEST_POST('redirect') == 'http://')) REQUEST_SET_POST('redirect', constant('URL')); // Redirect URL SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET url='%s', data_type='NEW' WHERE `id`=%s LIMIT 1", @@ -226,7 +226,7 @@ LIMIT 1", define('__UNLOCK_ROWS', $OUT); // Prepare rejection URL - $REJECT = "http://"; + $REJECT = 'http://'; if (GET_EXT_VERSION('other') >= '0.1.6') $REJECT = getConfig('reject_url'); define('__REJECT_URL', $REJECT); diff --git a/inc/modules/admin/what-unlock_sponsor.php b/inc/modules/admin/what-unlock_sponsor.php index 58a59baed3..4571d749fd 100644 --- a/inc/modules/admin/what-unlock_sponsor.php +++ b/inc/modules/admin/what-unlock_sponsor.php @@ -46,7 +46,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) { ADD_DESCR('admin', __FILE__); // Check if admin has submitted form -if (IS_FORM_SENT()) { +if (isFormSent()) { // Does he have selected at least one sponsor? if (countSelection(REQUEST_POST('id')) > 0) { // At least one entry selected diff --git a/inc/modules/admin/what-usage.php b/inc/modules/admin/what-usage.php index 0f77c2730c..c776c2c248 100644 --- a/inc/modules/admin/what-usage.php +++ b/inc/modules/admin/what-usage.php @@ -100,7 +100,7 @@ if ((!empty($FQFN)) && (isFileReadable($FQFN))) { $content = str_replace("usage_", "{!URL!}/modules.php?module=admin&what=".$GLOBALS['what']."&usage=", str_replace(".html", '', $content)); // Disabled due to too much trouble - //$content = str_replace("HREF=\"http://", "href=\"{!URL!}/modules.php?module=loader&url=http://", $content); + //$content = str_replace("HREF=\'http://', "href=\"{!URL!}/modules.php?module=loader&url=http://", $content); $test = strtolower($content); // Do we need to strip out above and including plus trailing tag? diff --git a/inc/modules/admin/what-user_contct.php b/inc/modules/admin/what-user_contct.php index 002bccaa9f..7e8a56f70d 100644 --- a/inc/modules/admin/what-user_contct.php +++ b/inc/modules/admin/what-user_contct.php @@ -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) { @@ -60,7 +60,7 @@ if ((REQUEST_ISSET_GET('uid')) && (bigintval(REQUEST_GET('uid')) > 0)) { $content['uid'] = bigintval(REQUEST_GET('uid')); // Shall we send the email? - if (IS_FORM_SENT()) { + if (isFormSent()) { // Insert text $content['text'] = trim(strip_tags(REQUEST_POST('text'))); diff --git a/inc/modules/guest/what-confirm.php b/inc/modules/guest/what-confirm.php index 31a55f147f..71ac9cca91 100644 --- a/inc/modules/guest/what-confirm.php +++ b/inc/modules/guest/what-confirm.php @@ -137,7 +137,7 @@ if (REQUEST_ISSET_GET(('hash'))) { define('__UID', '0'); LOAD_TEMPLATE('guest_confirm_table'); } -} elseif ((IS_FORM_SENT()) && (REQUEST_ISSET_POST('email'))) { +} elseif ((isFormSent()) && (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__); diff --git a/inc/modules/guest/what-login.php b/inc/modules/guest/what-login.php index 36a113f829..654c29f3cd 100644 --- a/inc/modules/guest/what-login.php +++ b/inc/modules/guest/what-login.php @@ -63,7 +63,7 @@ $add = ''; if ((isUserIdSet()) && (isSessionVariableSet('u_hash'))) { // Maybe, then continue with it $uid = getUserId(); -} elseif ((REQUEST_ISSET_POST('id')) && (REQUEST_ISSET_POST(('password'))) && (IS_FORM_SENT())) { +} elseif ((REQUEST_ISSET_POST('id')) && (REQUEST_ISSET_POST(('password'))) && (isFormSent())) { // Set userid and crypt password when login data was submitted if ((EXT_IS_ACTIVE('nickname')) && (NICKNAME_PROBE_ON_USERID(REQUEST_POST('id')))) { // Nickname entered @@ -88,10 +88,10 @@ if (!REQUEST_ISSET_GET(('login'))) REQUEST_SET_GET('login' , ''); if (IS_MEMBER()) { // Login immidiately... $URL = 'modules.php?module=login'; -} elseif ((IS_FORM_SENT()) && (''.$uid.'' != ''.REQUEST_POST('id') . '')) { +} elseif ((isFormSent()) && (''.$uid.'' != ''.REQUEST_POST('id') . '')) { // Invalid input (no nickname extension installed but nickname entered) $errorCode = getCode('EXTENSION_PROBLEM'); -} elseif (IS_FORM_SENT()) { +} elseif (isFormSent()) { // Try the login (see inc/libs/user_functions.php) $URL = USER_DO_LOGIN(REQUEST_POST('id'), REQUEST_POST('password')); } elseif ((REQUEST_ISSET_POST(('new_pass'))) && (isset($uid))) { diff --git a/inc/modules/guest/what-register.php b/inc/modules/guest/what-register.php index d1fcfb1cd2..34b985cf99 100644 --- a/inc/modules/guest/what-register.php +++ b/inc/modules/guest/what-register.php @@ -53,7 +53,7 @@ global $DATA; // Initialize variables $isFailed = false; $SHORT_PASS = false; $cats = 0; $IP_TIMEOUT = false; -if (!IS_FORM_SENT()) REQUEST_UNSET_POST('ok'); +if (!isFormSent()) REQUEST_UNSET_POST('ok'); if (!REQUEST_ISSET_POST(('agree'))) REQUEST_SET_POST('agree' , ''); if (!REQUEST_ISSET_POST(('addy'))) REQUEST_SET_POST('addy' , ''); @@ -90,7 +90,7 @@ if ($GLOBALS['refid'] > 0) { } } // END - if -if (IS_FORM_SENT()) { +if (isFormSent()) { // First we only check the submitted data then we continue... :) // // Did he agree to our Terms Of Usage? @@ -176,7 +176,7 @@ if (IS_FORM_SENT()) { SQL_FREERESULT($result); } -if ((IS_FORM_SENT()) && (($isFailed === false) || (IS_ADMIN()))) { +if ((isFormSent()) && (($isFailed === false) || (IS_ADMIN()))) { // Prepapre month and day of birth if (strlen(REQUEST_POST('day')) == 1) REQUEST_SET_POST('day' , '0'.REQUEST_POST('day')); if (strlen(REQUEST_POST('month')) == 1) REQUEST_SET_POST('month', '0'.REQUEST_POST('month')); diff --git a/inc/modules/guest/what-sponsor_login.php b/inc/modules/guest/what-sponsor_login.php index 40ecd01c95..9f447ef678 100644 --- a/inc/modules/guest/what-sponsor_login.php +++ b/inc/modules/guest/what-sponsor_login.php @@ -125,12 +125,12 @@ WHERE `id`='%s' AND hash='%s' AND `status`='EMAIL' LIMIT 1", SQL_FREERESULT($result); } elseif ($mode == 'activate') { // Send activation link again - if (IS_FORM_SENT()) { + if (isFormSent()) { // Check submitted data if (!REQUEST_ISSET_POST('email')) REQUEST_UNSET_POST('ok'); } - if (IS_FORM_SENT()) { + if (isFormSent()) { // Check email $result = SQL_QUERY_ESC("SELECT id, hash, status, remote_addr, gender, surname, family, sponsor_created FROM `{!_MYSQL_PREFIX!}_sponsor_data` @@ -171,12 +171,12 @@ WHERE email='%s' AND (`status`='UNCONFIRMED' OR `status`='EMAIL') LIMIT 1", } } elseif ($mode == 'lost_pass') { // Send new password - if (IS_FORM_SENT()) { + if (isFormSent()) { // Check submitted data if (!REQUEST_ISSET_POST('email')) REQUEST_UNSET_POST('ok'); } // END - if - if (IS_FORM_SENT()) { + if (isFormSent()) { // Check email $result = SQL_QUERY_ESC("SELECT id, hash, remote_addr, gender, surname, family, sponsor_created FROM `{!_MYSQL_PREFIX!}_sponsor_data` @@ -217,7 +217,7 @@ WHERE `id`='%s' LIMIT 1", // Load form LOAD_TEMPLATE('guest_sponsor_lost'); } -} elseif (IS_FORM_SENT()) { +} elseif (isFormSent()) { // Check status and login data ... $result = SQL_QUERY_ESC("SELECT status FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE `id`='%s' AND password='%s' LIMIT 1", diff --git a/inc/modules/guest/what-sponsor_reg.php b/inc/modules/guest/what-sponsor_reg.php index d44d67cfd7..5284c5b1c4 100644 --- a/inc/modules/guest/what-sponsor_reg.php +++ b/inc/modules/guest/what-sponsor_reg.php @@ -50,7 +50,7 @@ ADD_DESCR('guest', __FILE__); // Create array for form errors (= missing data) $FORM_ERRORS = array(); -if (IS_FORM_SENT()) { +if (isFormSent()) { // // Check submitted form data // @@ -196,7 +196,7 @@ if (IS_FORM_SENT()) { if (count($FORM_ERRORS) > 0) REQUEST_UNSET_POST('ok'); } -if ((IS_FORM_SENT()) && (count($FORM_ERRORS) == 0)) { +if ((isFormSent()) && (count($FORM_ERRORS) == 0)) { // Generate message array $messageArray = array( 'failed' => getMessage('SPONSOR_REGISTRATION_FAILED'), diff --git a/inc/modules/member/what-categories.php b/inc/modules/member/what-categories.php index 20b9853d6d..c74bf25aa4 100644 --- a/inc/modules/member/what-categories.php +++ b/inc/modules/member/what-categories.php @@ -56,7 +56,7 @@ $cats = SQL_NUMROWS($result); if ($cats > 0) { $LEAST = false; - if (IS_FORM_SENT()) { + if (isFormSent()) { $cnt = 0; foreach (REQUEST_POST('cat') as $cat => $joined) { if ($joined == 'N') $cnt++; @@ -68,7 +68,7 @@ if ($cats > 0) { } } - if (IS_FORM_SENT()) { + if (isFormSent()) { foreach (REQUEST_POST('cat') as $cat => $joined) { switch ($joined) { case 'Y': diff --git a/inc/modules/member/what-holiday.php b/inc/modules/member/what-holiday.php index ec15bd331b..f4d4dcca5f 100644 --- a/inc/modules/member/what-holiday.php +++ b/inc/modules/member/what-holiday.php @@ -88,7 +88,7 @@ if ((SQL_NUMROWS($result1) == 1) || (SQL_NUMROWS($result2) == 1)) { SQL_FREERESULT($result1); SQL_FREERESULT($result2); -if (IS_FORM_SENT()) { +if (isFormSent()) { // Check holiday request... $START = mktime(0, 0, 0, REQUEST_POST('start_month'), REQUEST_POST('start_day'), REQUEST_POST('start_year')); $END = mktime(0, 0, 0, REQUEST_POST('end_month') , REQUEST_POST('end_day') , REQUEST_POST('end_year') ); @@ -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 ((!isFormSent()) && (!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__); diff --git a/inc/modules/member/what-html_mail.php b/inc/modules/member/what-html_mail.php index 0695f2a3b7..0e19e054a6 100644 --- a/inc/modules/member/what-html_mail.php +++ b/inc/modules/member/what-html_mail.php @@ -51,7 +51,7 @@ if (!defined('__SECURITY')) { ADD_DESCR('member', __FILE__); // Class was found and loaded -if (IS_FORM_SENT()) { +if (isFormSent()) { // 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__); diff --git a/inc/modules/member/what-newsletter.php b/inc/modules/member/what-newsletter.php index cc14a7c177..eb7ef02f8c 100644 --- a/inc/modules/member/what-newsletter.php +++ b/inc/modules/member/what-newsletter.php @@ -59,7 +59,7 @@ SQL_FREERESULT($result); // Remember charge value define('__CHARGE_VALUE', translateComma(getConfig('nl_charge'))); -if ((IS_FORM_SENT()) && ($status == 'Y') && ($span == '0')) { +if ((isFormSent()) && ($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__); diff --git a/inc/modules/member/what-nickname.php b/inc/modules/member/what-nickname.php index d8b505d535..b0ed554e8b 100644 --- a/inc/modules/member/what-nickname.php +++ b/inc/modules/member/what-nickname.php @@ -51,7 +51,7 @@ if (!defined('__SECURITY')) { ADD_DESCR('member', __FILE__); $isValid = false; -if (IS_FORM_SENT()) { +if (isFormSent()) { // Nickname was submitted so let's check if it is not already in use if (REQUEST_ISSET_POST(('nickname'))) { // Check if nickname is valid diff --git a/inc/modules/member/what-order.php b/inc/modules/member/what-order.php index 84aee47079..f0dc82a361 100644 --- a/inc/modules/member/what-order.php +++ b/inc/modules/member/what-order.php @@ -116,7 +116,7 @@ WHERE sender=%s AND url='%s' AND timestamp > (UNIX_TIMESTAMP() - %s) LIMIT 1", $URL = ''; if (getConfig('test_text') == 'Y') { // Test submitted text against some filters (length, URLs in text etc.) - if ((strpos(strtolower(REQUEST_POST('text')), "https://") > -1) || (strpos(strtolower(REQUEST_POST('text')), "http://") > -1) || (strpos(strtolower(REQUEST_POST('text')), "www") > -1)) { + if ((strpos(strtolower(REQUEST_POST('text')), "https://") > -1) || (strpos(strtolower(REQUEST_POST('text')), 'http://') > -1) || (strpos(strtolower(REQUEST_POST('text')), "www") > -1)) { // URL found! $URL = 'modules.php?module=login&what=order&msg=' . getCode('URL_FOUND'); } // END - if @@ -135,7 +135,7 @@ WHERE sender=%s AND url='%s' AND timestamp > (UNIX_TIMESTAMP() - %s) LIMIT 1", if (getConfig('test_subj') == 'Y') { // Check the subject line for issues REQUEST_SET_POST('subject', str_replace("\\", "[nl]", substr(REQUEST_POST('subject'), 0, 200))); - if ((strpos(strtolower(REQUEST_POST('subject')), "http://") > -1) || (strpos(strtolower(REQUEST_POST('subject')), "www") > -1)) { + if ((strpos(strtolower(REQUEST_POST('subject')), 'http://') > -1) || (strpos(strtolower(REQUEST_POST('subject')), "www") > -1)) { // URL in subject found $URL = 'modules.php?module=login&what=order&msg=' . getCode('SUBJ_URL'); } // END - if @@ -616,7 +616,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); $OLD_ORDER = true; } else { // Default output for that your members don't forget it... - $url = "http://"; + $url = 'http://'; } // Free result diff --git a/inc/modules/member/what-payout.php b/inc/modules/member/what-payout.php index 5c6e5e2c9e..81a601c79d 100644 --- a/inc/modules/member/what-payout.php +++ b/inc/modules/member/what-payout.php @@ -185,7 +185,7 @@ ORDER BY p.payout_timestamp DESC", if (convertCommaToDot($TPTS) >= $content['min_points']) { // Ok, he can get be paid - if ((IS_FORM_SENT()) && ($PAYOUT <= $PAY_MAX) && ($PAYOUT >= $content['min_points'])) { + if ((isFormSent()) && ($PAYOUT <= $PAY_MAX) && ($PAYOUT >= $content['min_points'])) { // Calculate exact value // @TODO Rewrite this constant define('PAYOUT_POINTS_VALUE', $PAYOUT); diff --git a/inc/modules/member/what-primera.php b/inc/modules/member/what-primera.php index 9642d44c6e..d66b0fca25 100644 --- a/inc/modules/member/what-primera.php +++ b/inc/modules/member/what-primera.php @@ -156,7 +156,7 @@ if (REQUEST_GET('mode') == "pay") { } // Is the formular sent? -if ((IS_FORM_SENT()) && (REQUEST_ISSET_GET(('mode')))) { +if ((isFormSent()) && (REQUEST_ISSET_GET(('mode')))) { // Check input data depending on the mode and execute the requested mode switch (REQUEST_GET('mode')) { case "pay": // Payout this exchange -> Primus diff --git a/inc/modules/member/what-support.php b/inc/modules/member/what-support.php index b16ca6ba8a..2bbdfbc2db 100644 --- a/inc/modules/member/what-support.php +++ b/inc/modules/member/what-support.php @@ -50,7 +50,7 @@ if (!defined('__SECURITY')) { // Add description as navigation point ADD_DESCR('member', __FILE__); -if ((!IS_FORM_SENT()) || (!REQUEST_ISSET_POST(('qsummary')))) { +if ((!isFormSent()) || (!REQUEST_ISSET_POST(('qsummary')))) { // Output form LOAD_TEMPLATE("member_support_form"); } else { diff --git a/inc/modules/member/what-surfbar_book.php b/inc/modules/member/what-surfbar_book.php index 5b2515bf2a..794e1d6b25 100644 --- a/inc/modules/member/what-surfbar_book.php +++ b/inc/modules/member/what-surfbar_book.php @@ -55,7 +55,7 @@ ADD_DESCR('member', __FILE__); if (!SURFBAR_IF_USER_BOOK_MORE_URLS()) { // No more URLs allowed to book! LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_SURFBAR_NO_MORE_ALLOWED')); -} elseif ((IS_FORM_SENT()) && (REQUEST_ISSET_POST(('limited')))) { +} elseif ((isFormSent()) && (REQUEST_ISSET_POST(('limited')))) { // Is limitation "no" and "limit" is > 0? if ((REQUEST_POST('limited') == 'N') && ((REQUEST_ISSET_POST(('limit'))) && (REQUEST_POST('limit') > 0)) || (!REQUEST_ISSET_POST(('limit')))) { // Set it to unlimited diff --git a/inc/modules/member/what-surfbar_list.php b/inc/modules/member/what-surfbar_list.php index 6de11b2e39..7ad3917915 100644 --- a/inc/modules/member/what-surfbar_list.php +++ b/inc/modules/member/what-surfbar_list.php @@ -54,7 +54,7 @@ ADD_DESCR('member', __FILE__); $URLs = SURFBAR_GET_USER_URLS(); // Are there entries or form is submitted? -if ((IS_FORM_SENT()) && (REQUEST_ISSET_POST(('action'))) && (REQUEST_ISSET_POST('id'))) { +if ((isFormSent()) && (REQUEST_ISSET_POST(('action'))) && (REQUEST_ISSET_POST('id'))) { // Process the form if (SURFBAR_MEMBER_DO_FORM(REQUEST_POST_ARRAY(), $URLs)) { // Action performed but shall we display it? diff --git a/inc/modules/member/what-transfer.php b/inc/modules/member/what-transfer.php index 86a69e9b07..5ce05ad567 100644 --- a/inc/modules/member/what-transfer.php +++ b/inc/modules/member/what-transfer.php @@ -73,7 +73,7 @@ switch ($mode) // Remember maximum value for template define('__TRANSFER_MAX_VALUE', round($total - getConfig('transfer_balance') - 0.5)); - if (IS_FORM_SENT()) { + if (isFormSent()) { // Add new transfer if (getConfig('transfer_code') > 0) { // Check for code @@ -228,7 +228,7 @@ switch ($mode) } } - if (!IS_FORM_SENT()) { + if (!isFormSent()) { // Load member list if (EXT_IS_ACTIVE('nickname')) { // Load userid and nickname @@ -502,7 +502,7 @@ KEY(party_uid) define('__TRANSFER_ALL_LINK', $total); } - if (IS_FORM_SENT()) { + if (isFormSent()) { // 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__); diff --git a/inc/modules/member/what-wernis.php b/inc/modules/member/what-wernis.php index b704421a6a..c74520066a 100644 --- a/inc/modules/member/what-wernis.php +++ b/inc/modules/member/what-wernis.php @@ -201,7 +201,7 @@ if ((!REQUEST_ISSET_GET(('mode'))) || (REQUEST_GET('mode') == "choose")) { } // Is the formular sent? -if ((IS_FORM_SENT()) && (REQUEST_ISSET_GET(('mode')))) { +if ((isFormSent()) && (REQUEST_ISSET_GET(('mode')))) { // Is the user ID and password set? if (!REQUEST_ISSET_POST(('wds66_id'))) { // Nothing entered in WDS66 user ID diff --git a/inc/modules/sponsor/account.php b/inc/modules/sponsor/account.php index 52db53f8fe..4c01863351 100644 --- a/inc/modules/sponsor/account.php +++ b/inc/modules/sponsor/account.php @@ -63,7 +63,7 @@ if (SQL_NUMROWS($result) == 1) { $content = SQL_FETCHARRAY($result); if ($content['status'] == 'CONFIRMED') { // Check if form was submitted or not - if (IS_FORM_SENT()) { + if (isFormSent()) { // Check passwords if (!REQUEST_ISSET_POST(('pass_old'))) { // No current password entered diff --git a/inc/modules/sponsor/settings.php b/inc/modules/sponsor/settings.php index 2aa04e5342..495128ee8d 100644 --- a/inc/modules/sponsor/settings.php +++ b/inc/modules/sponsor/settings.php @@ -58,7 +58,7 @@ if (SQL_NUMROWS($result) == 1) { $content = SQL_FETCHARRAY($result); if ($content['status'] == 'CONFIRMED') { // Check if form was submitted or not - if (IS_FORM_SENT()) { + if (isFormSent()) { // Check passwords if (!REQUEST_ISSET_POST(('password'))) { // No current password entered diff --git a/inc/request-functions.php b/inc/request-functions.php index e88d7c9860..b720ffc2d3 100644 --- a/inc/request-functions.php +++ b/inc/request-functions.php @@ -185,7 +185,7 @@ function REQUEST_SET_POST ($element, $value) { } // Checks wether a form was sent. If so, the $_POST['ok'] element must be set -function IS_FORM_SENT () { +function isFormSent () { // Simply wrap it! return REQUEST_ISSET_POST('ok'); }