X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-edit_emails.php;h=907ceb22533a9ba3f78b8fea58de5b6e0b4e0fda;hb=2142149f3f72f1a2476f95a87937c044d63bbaf2;hp=431c51881925f55357fa7742604b125cab03919d;hpb=ecb21c096e7b509e35f9215d030e4141307ea28c;p=mailer.git
diff --git a/inc/modules/admin/what-edit_emails.php b/inc/modules/admin/what-edit_emails.php
index 431c518819..907ceb2253 100644
--- a/inc/modules/admin/what-edit_emails.php
+++ b/inc/modules/admin/what-edit_emails.php
@@ -32,19 +32,15 @@
************************************************************************/
// Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))
-{
+if ((!defined('__SECURITY')) || (!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", "");
-global $link;
+// Add description as navigation point
+ADD_DESCR("admin", __FILE__);
-if ((isset($_POST['ok'])) && (empty($_POST['id'])))
-{
+if ((isset($_POST['ok'])) && (empty($_POST['id']))) {
unset($_POST['ok']);
}
@@ -54,7 +50,7 @@ if (SQL_NUMROWS($result) > 0)
if (isset($_POST['ok']))
{
// Make mail editable...
- $result = SQL_QUERY_ESC("SELECT subject, text, url FROM "._MYSQL_PREFIX."_pool WHERE id=%d LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT subject, text, url FROM "._MYSQL_PREFIX."_pool WHERE id=%s LIMIT 1",
array(bigintval($_POST['id'])), __FILE__, __LINE__);
list($subj, $text, $url) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
@@ -75,14 +71,14 @@ if (SQL_NUMROWS($result) > 0)
subject='%s',
text='%s',
url='%s'
-WHERE id=%d LIMIT 1",
+WHERE id=%s LIMIT 1",
array(
addslashes($_POST['subj']),
addslashes($_POST['text']),
addslashes($_POST['url']),
bigintval($_POST['id']),
), __FILE__, __LINE__);
- if (SQL_AFFECTEDROWS($link, __FILE__, __LINE__) == 1)
+ if (SQL_AFFECTEDROWS() == 1)
{
$content = "".SETTINGS_SAVED."";
}
@@ -127,12 +123,10 @@ WHERE id=%d LIMIT 1",
// Load email template
LOAD_TEMPLATE("admin_edit_email_select");
}
-}
- else
-{
+} else {
// No mail orders left in pool
OUTPUT_HTML("".ADMIN_NO_MAILS_IN_POOL."");
}
-CLOSE_TABLE();
+
//
?>