X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=inline;f=inc%2Fmodules%2Fadmin%2Fwhat-list_links.php;h=fcf1a4ec92d875eaf6fd8c379b5a5ddfb80fdc3e;hb=4e828541f3977c085ef54d3490b3e0069eb09a06;hp=18848922d90c9bc32a64f4bc639ae786b32ca2a9;hpb=d431370caad4274608b2bf90acdb81fbc8e750aa;p=mailer.git
diff --git a/inc/modules/admin/what-list_links.php b/inc/modules/admin/what-list_links.php
index 18848922d9..fcf1a4ec92 100644
--- a/inc/modules/admin/what-list_links.php
+++ b/inc/modules/admin/what-list_links.php
@@ -36,7 +36,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!EXT_IS_ACTIVE("mailid")) {
- ADD_FATAL(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "mailid"));
+ addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "mailid");
return;
}
@@ -47,8 +47,8 @@ if (empty($_GET['del'])) $_GET['del'] = "";
if (!empty($_GET['u_id'])) {
// Check if the user already exists
- $result = SQL_QUERY_ESC("SELECT surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
- array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
+ array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
// Is there an entry?
if (SQL_NUMROWS($result) == 1) {
@@ -59,12 +59,12 @@ if (!empty($_GET['u_id'])) {
// Grab user's all unconfirmed mails
if (EXT_IS_ACTIVE("bonus")) {
// Load bonus ID
- $result = SQL_QUERY_ESC("SELECT stats_id, bonus_id, link_type FROM "._MYSQL_PREFIX."_user_links WHERE userid=%s ORDER BY id",
- array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT stats_id, bonus_id, link_type FROM `{!_MYSQL_PREFIX!}_user_links` WHERE userid=%s ORDER BY `id`",
+ array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
} else {
// Load stats ID (2nd will be ignored later! But it is needed for the same fetchrow command)
- $result = SQL_QUERY_ESC("SELECT stats_id, stats_id, link_type FROM "._MYSQL_PREFIX."_user_links WHERE userid=%s ORDER BY id",
- array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT stats_id, stats_id, link_type FROM `{!_MYSQL_PREFIX!}_user_links` WHERE userid=%s ORDER BY `id`",
+ array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
}
// Get number of rows from the query
@@ -74,15 +74,15 @@ if (!empty($_GET['u_id'])) {
// Some unconfirmed mails left
if ($_GET['del'] == "all") {
// Delete all unconfirmed mails by this user
- SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_links WHERE userid=%s LIMIT %s",
+ SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_links` WHERE userid=%s LIMIT %s",
array(bigintval($_GET['u_id']), $nums), __FILE__, __LINE__);
// Prepare mail and send it away
$msg = LOAD_EMAIL_TEMPLATE("admin-del_links", $nums, bigintval($_GET['u_id']));
- SEND_EMAIL($email, ADMIN_DEL_LINK_SUBJ, $msg);
+ SEND_EMAIL($email, getMessage('ADMIN_DEL_LINK_SUBJ'), $msg);
// Display message
- LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_LINKS_DELETED);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_LINKS_DELETED'));
} else {
// List all unconfirmed mails
$SW = 2; $OUT = "";
@@ -97,17 +97,17 @@ if (!empty($_GET['u_id'])) {
switch ($type)
{
case "NORMAL":
- $result_data = SQL_QUERY_ESC("SELECT subject, timestamp_ordered, cat_id FROM "._MYSQL_PREFIX."_user_stats WHERE id=%s LIMIT 1",
+ $result_data = SQL_QUERY_ESC("SELECT subject, timestamp_ordered, cat_id FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE id=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
- $type = "mailid"; $DATA = $id; $PROBLEM = NORMAL_MAIL_PROBLEM;
- $LINK = "".$id."";
+ $type = "mailid"; $DATA = $id; $PROBLEM = getMessage('NORMAL_MAIL_PROBLEM');
+ $LINK = "".$id."";
break;
case "BONUS":
- $result_data = SQL_QUERY_ESC("SELECT subject, timestamp, cat_id FROM "._MYSQL_PREFIX."_bonus WHERE id=%s LIMIT 1",
+ $result_data = SQL_QUERY_ESC("SELECT subject, timestamp, cat_id FROM `{!_MYSQL_PREFIX!}_bonus` WHERE id=%s LIMIT 1",
array(bigintval($id2)), __FILE__, __LINE__);
- $type = "bonusid"; $DATA = $id2; $PROBLEM = BONUS_MAIL_PROBLEM;
- $LINK = "".$id2."";
+ $type = "bonusid"; $DATA = $id2; $PROBLEM = getMessage('BONUS_MAIL_PROBLEM');
+ $LINK = "".$id2."";
break;
default: // Problem in application detected!
@@ -120,7 +120,7 @@ if (!empty($_GET['u_id'])) {
// Mail was found!
list($subject, $timestamp, $cat) = SQL_FETCHROW($result_data);
SQL_FREERESULT($result_data);
- if (empty($subject)) $subject = DEFAULT_SUBJECT_LINE;
+ if (empty($subject)) $subject = getMessage('DEFAULT_SUBJECT_LINE');
// Prepare data for the row template
$content = array(
@@ -152,7 +152,7 @@ if (!empty($_GET['u_id'])) {
// Remember list in constant for the template
define('__SNAME_VALUE', $sname);
define('__FNAME_VALUE', $fname);
- define('__EMAIL_VALUE', "".$email."");
+ define('__EMAIL_VALUE', "".$email."");
define('__EMAIL_LIST' , $OUT);
define('__NUMS_VALUE' , $nums);
define('__UID' , bigintval($_GET['u_id']));