X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fmodules%2Fmember%2Fwhat-order.php;h=752a31630442fe2543e00f56d321f606ed440181;hb=d449b23b1735c2e9a455d3f12168300a52f5c4dc;hp=fd306af3fbc3accf0924319a71af17b5a650a44e;hpb=dbd1bc95c8f89024118791dc3fb3633a90afa9cf;p=mailer.git
diff --git a/inc/modules/member/what-order.php b/inc/modules/member/what-order.php
index fd306af3fb..752a316304 100644
--- a/inc/modules/member/what-order.php
+++ b/inc/modules/member/what-order.php
@@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
}
elseif (!IS_LOGGED_IN())
{
- LOAD_URL(URL."/modules.php?module=index");
+ LOAD_URL("modules.php?module=index");
}
elseif ((!EXT_IS_ACTIVE("order")) && (!IS_ADMIN()))
{
@@ -51,14 +51,14 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
ADD_DESCR("member", basename(__FILE__));
$URL = ""; $id = 0;
-$WHERE = " WHERE visible='Y'";
+$whereStatement = " WHERE visible='Y'";
// Set undefined array elements
if (empty($_GET['msg'])) $_GET['msg'] = "";
if (empty($_POST['zip'])) $_POST['zip'] = "";
if (empty($_POST['html'])) $_POST['html'] = "";
if (empty($_POST['receiver'])) $_POST['receiver'] = "";
-if (is_admin()) $WHERE = "";
+if (is_admin()) $whereStatement = "";
// Add slashes to every value
foreach($_POST as $key=>$value)
@@ -68,7 +68,7 @@ foreach($_POST as $key=>$value)
}
// Minimum mails / order
-define('__MIN_VALUE', $CONFIG['order_min']);
+define('__MIN_VALUE', $_CONFIG['order_min']);
// Count unconfirmed mails
$result_links = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_links WHERE userid=%d",
@@ -95,7 +95,7 @@ SQL_FREERESULT($result_mmails);
if ($HOLIDAY == $DMY) $HOLIDAY='N';
$ALLOWED = $MAXI - $ORDERS;
-if ($CONFIG['order_max'] == "MAX") $ALLOWED = $MAXI;
+if ($_CONFIG['order_max'] == "MAX") $ALLOWED = $MAXI;
// Check HTML extension
$HTML_EXT = EXT_IS_ACTIVE("html_mail");
@@ -135,7 +135,7 @@ if (($HOLIDAY == 'Y') && (GET_EXT_VERSION("holiday") >= "0.1.3"))
//
// First we would like to store the data and get it's pool position back...
$result = SQL_QUERY_ESC("SELECT id, data_type FROM "._MYSQL_PREFIX."_pool WHERE sender=%d AND url='%s' AND timestamp > %d LIMIT 1",
- array($GLOBALS['userid'], $_POST['url'], bigintval(time() - $CONFIG['url_tlock'])), __FILE__, __LINE__);
+ array($GLOBALS['userid'], $_POST['url'], bigintval(time() - $_CONFIG['url_tlock'])), __FILE__, __LINE__);
$type = "TEMP"; $id = "0";
if (SQL_NUMROWS($result) == 1)
@@ -148,7 +148,7 @@ if (($HOLIDAY == 'Y') && (GET_EXT_VERSION("holiday") >= "0.1.3"))
// No entry found, so we need to check out the stats table as well... :)
// We have to add that suff here, now we continue WITHOUT checking and check the text and subject against some filters
$URL = "";
- if ($CONFIG['test_text'] == 'Y')
+ if ($_CONFIG['test_text'] == 'Y')
{
// Test submitted text against some filters (length, URLs in text etc.)
if ((strpos(strtolower($_POST['text']), "https://") > -1) || (strpos(strtolower($_POST['text']), "http://") > -1) || (strpos(strtolower($_POST['text']), "www") > -1))
@@ -157,14 +157,14 @@ if (($HOLIDAY == 'Y') && (GET_EXT_VERSION("holiday") >= "0.1.3"))
$URL = URL."/modules.php?module=login&what=order&msg=".CODE_URL_FOUND;
}
$TEST = str_replace("\n", "", str_replace("\r", "", addslashes($_POST['text'])));
- if (strlen($TEST) > $CONFIG['max_tlength'])
+ if (strlen($TEST) > $_CONFIG['max_tlength'])
{
// Text is too long!
$URL = URL."/modules.php?module=login&what=order&msg=".CODE_OVERLENGTH;
}
}
// Shall I test the subject line against URLs?
- if ($CONFIG['test_subj'] == 'Y')
+ if ($_CONFIG['test_subj'] == 'Y')
{
// Check the subject line for issues
$_POST['subject'] = str_replace("\\", "[nl]", substr($_POST['subject'], 0, 200));
@@ -175,7 +175,7 @@ if (($HOLIDAY == 'Y') && (GET_EXT_VERSION("holiday") >= "0.1.3"))
}
}
// And shall I check that his URL is not in the black list?
- if ($CONFIG['url_blacklist'] == 'Y')
+ if ($_CONFIG['url_blacklist'] == 'Y')
{
// Ok, I do that for you know...
$result = SQL_QUERY_ESC("SELECT timestamp FROM "._MYSQL_PREFIX."_url_blist WHERE url='%s' LIMIT 1",
@@ -189,7 +189,7 @@ if (($HOLIDAY == 'Y') && (GET_EXT_VERSION("holiday") >= "0.1.3"))
$URL = URL."/modules.php?module=login&what=order&msg=".CODE_BLIST_URL."&blist=".$blist;
}
}
- if (($_POST['receiver'] < $CONFIG['order_min']) && (!IS_ADMIN()))
+ if (($_POST['receiver'] < $_CONFIG['order_min']) && (!IS_ADMIN()))
{
// Less than allowed receivers entered!
$URL = URL."/modules.php?module=login&what=order&msg=".CODE_MORE_RECEIVERS3;
@@ -229,7 +229,7 @@ if (($HOLIDAY == 'Y') && (GET_EXT_VERSION("holiday") >= "0.1.3"))
{
// Check if category and number of receivers is okay
$ADD = "";
- if (($CONFIG['order_multi_page'] == 'Y') && (!empty($_POST['zip']))) $ADD = "AND d.zip LIKE '".bigintval($_POST['zip'])."{PER}'";
+ if (($_CONFIG['order_multi_page'] == 'Y') && (!empty($_POST['zip']))) $ADD = "AND d.zip LIKE '".bigintval($_POST['zip'])."{PER}'";
// Check for userids
$result = SQL_QUERY_ESC("SELECT DISTINCT c.userid FROM "._MYSQL_PREFIX."_user_cats AS c
@@ -241,8 +241,8 @@ ORDER BY d.%s %s",
array(
bigintval($_POST['cat']),
$GLOBALS['userid'],
- $CONFIG['order_select'],
- $CONFIG['order_mode'],
+ $_CONFIG['order_select'],
+ $_CONFIG['order_mode'],
), __FILE__, __LINE__);
// Do we enougth receivers left?
@@ -446,15 +446,15 @@ array(
// Not enougth receivers selected
$URL = URL."/modules.php?module=login&what=order&msg=".CODE_MORE_RECEIVERS1;
}
- elseif (($ALLOWED == 0) && ($CONFIG['order_max'] == "ORDER"))
+ elseif (($ALLOWED == 0) && ($_CONFIG['order_max'] == "ORDER"))
{
// No more mail orders allowed
LOAD_TEMPLATE("admin_settings_saved", false, MEMBER_ORDER_ALLOWED_EXHAUSTED);
}
- elseif (($links < $CONFIG['unconfirmed']) && ($mmails == "1"))
+ elseif (($links < $_CONFIG['unconfirmed']) && ($mmails == "1"))
{
// Display order form
- $result_cats = SQL_QUERY("SELECT id, cat FROM "._MYSQL_PREFIX."_cats".$WHERE." ORDER BY sort", __FILE__, __LINE__);
+ $result_cats = SQL_QUERY("SELECT id, cat FROM "._MYSQL_PREFIX."_cats".$whereStatement." ORDER BY sort", __FILE__, __LINE__);
if (SQL_NUMROWS($result_cats) > 0)
{
if ($TOTAL > 0)
@@ -515,7 +515,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__);
$result_ver = SQL_QUERY_ESC("SELECT zip FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d".$HTML." AND receive_mails > 0 AND status='CONFIRMED' LIMIT 1",
array(bigintval($ucat)), __FILE__, __LINE__);
- if ((SQL_NUMROWS($result_ver) == 1) && (!empty($_POST['zip'])) && ($CONFIG['order_multi_page'] == 'Y'))
+ if ((SQL_NUMROWS($result_ver) == 1) && (!empty($_POST['zip'])) && ($_CONFIG['order_multi_page'] == 'Y'))
{
list($zip) = SQL_FETCHROW($result_ver);
SQL_FREERESULT($result_ver);
@@ -563,17 +563,17 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__);
SQL_FREERESULT($result);
// Calculate hours...
- $STD = round($CONFIG['url_tlock'] / 60 / 60);
+ $STD = round($_CONFIG['url_tlock'] / 60 / 60);
// Minutes...
- $MIN = round(($CONFIG['url_tlock'] - $STD * 60 * 60) / 60);
+ $MIN = round(($_CONFIG['url_tlock'] - $STD * 60 * 60) / 60);
// And seconds
- $SEC = $CONFIG['url_tlock'] - $STD * 60 * 60 - $MIN * 60;
+ $SEC = $_CONFIG['url_tlock'] - $STD * 60 * 60 - $MIN * 60;
// Finally contruct the message
- $MSG = MEMBER_URL_TIME_LOCK."
".CONFIG_URL_TLOCK." ".$STD." ".
- HOURS.", ".$MIN." ".MINS." "._AND." ".$SEC." ".SECS."
".
+ $MSG = MEMBER_URL_TIME_LOCK."
".CONFIG_URL_TLOCK." ".$STD." ".
+ HOURS.", ".$MIN." ".MINS." "._AND." ".$SEC." ".SECS."
".
MEMBER_LAST_TLOCK.": ".$LORDER;
break;
@@ -590,7 +590,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__);
break;
case CODE_BLIST_URL:
- $MSG = MEMBER_URL_BLACK_LISTED."
+ $MSG = MEMBER_URL_BLACK_LISTED."
".MEMBER_BLIST_TIME.": ".MAKE_DATETIME($_GET['blist'], "0");
break;
@@ -615,7 +615,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__);
break;
case CODE_MORE_RECEIVERS3:
- $MSG = MEMBER_ENTER_MORE_MIN_RECEIVERS_1.$CONFIG['order_min'].MEMBER_ENTER_MORE_MIN_RECEIVERS_2;
+ $MSG = MEMBER_ENTER_MORE_MIN_RECEIVERS_1.$_CONFIG['order_min'].MEMBER_ENTER_MORE_MIN_RECEIVERS_2;
break;
case CODE_INVALID_URL:
@@ -648,7 +648,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__);
$TOTAL = TRANSLATE_COMMA($TOTAL);
// Check how many mail orders he has placed today and how many he's allowed to send
- switch ($CONFIG['order_max'])
+ switch ($_CONFIG['order_max'])
{
case "MAX": // He is allowed to send as much as possible
define('ORDER_MAX_VALUE', ORDER_ALLOED_MAX);
@@ -688,7 +688,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__);
}
// 01 2 21 12 2 23 443 3 3210
- if ((!empty($_POST['data'])) || (($CONFIG['order_multi_page'] == 'N') && ((!IS_ADMIN()) && (!$HTML_EXT))))
+ if ((!empty($_POST['data'])) || (($_CONFIG['order_multi_page'] == 'N') && ((!IS_ADMIN()) && (!$HTML_EXT))))
{
// Pre-output categories
$CAT = "";
@@ -751,7 +751,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__);
if ($HTML_EXT)
{
// Add some content when html extension is active
- if (($CONFIG['order_multi_page'] == 'Y') || (IS_ADMIN())) $ADD = "