* -------------------------------------------------------------------- *
* Kurzbeschreibung : Werbebuchungen freigeben *
* -------------------------------------------------------------------- *
- * *
+ * $Revision:: $ *
+ * $Date:: $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: $ *
+ * Needs to be in all Files and every File needs "svn propset *
+ * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
// Some security stuff...
if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Define some variables
global $DATA;
// Check for mails
-$result_main = SQL_QUERY("SELECT `id`, `sender`, `subject`, `payment_id` AS `payment`, `timestamp`, `url`, `target_send`, `cat_id` AS `category`
+$result_main = SQL_QUERY("SELECT `id`,`sender`,`subject`,`payment_id` AS `payment`,`timestamp`,`url`,`target_send`,`cat_id` AS `category`
FROM `{!_MYSQL_PREFIX!}_pool`
WHERE `data_type`='ADMIN'
ORDER BY `timestamp` ASC", __FILE__, __LINE__);
-if ((SQL_NUMROWS($result_main) > 0) || (isset($_POST['lock']))) {
+if ((SQL_NUMROWS($result_main) > 0) || (REQUEST_ISSET_POST(('lock')))) {
// Count checked checkboxes
$SEL = 0;
- if (isset($_POST['sel'])) {
+ if (REQUEST_ISSET_POST('sel')) {
// Are there checked boxes?
- if (count($_POST['sel']) > 0) {
+ if (count(REQUEST_POST('sel')) > 0) {
// Count now... We use an own function for now
- $SEL = SELECTION_COUNT($_POST['sel']);
+ $SEL = SELECTION_COUNT(REQUEST_POST('sel'));
} // END - if
} // END - if
- if (isset($_POST['accept'])) {
+ if (REQUEST_ISSET_POST(('accept'))) {
if ($SEL > 0) {
// Accept mail orders
- foreach ($_POST['sel'] as $id => $value) {
+ foreach (REQUEST_POST('sel') as $id => $value) {
// Secure ID number
$id = bigintval($id);
SQL_FREERESULT($result);
// Is the surfbar installed?
- if ((EXT_IS_ACTIVE("surfbar")) && (getConfig('surfbar_migrate_order') == "Y")) {
+ if ((EXT_IS_ACTIVE('surfbar')) && (getConfig('surfbar_migrate_order') == 'Y')) {
// Then "migrate" the URL to the surfbar
SURFBAR_ADMIN_MIGRATE_URL($DATA['url'], $DATA['sender']);
} // END - if
// Check for bonus extension version >= 0.4.4 for the order bonus
- if ((GET_EXT_VERSION("bonus") >= "0.4.4") && (getConfig('bonus_active') == "Y")) {
+ if ((GET_EXT_VERSION('bonus') >= '0.4.4') && (getConfig('bonus_active') == 'Y')) {
// Add points directly
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET bonus_order=bonus_order+".getConfig('bonus_order')." WHERE userid=%s LIMIT 1",
array(bigintval($DATA['sender'])), __FILE__, __LINE__);
} // END - foreach
// Set message
- $MSG = ADMIN_MAILS_ACTIVATED;
+ $message = ADMIN_MAILS_ACTIVATED;
} else {
// Nothing checked!
- $MSG = ADMIN_MAILS_NOTHING_CHECKED;
+ $message = ADMIN_MAILS_NOTHING_CHECKED;
}
// Mails unlocked for mail delivery
- LOAD_TEMPLATE("admin_settings_saved", false, $MSG);
- } elseif (isset($_POST['reject'])) {
+ LOAD_TEMPLATE('admin_settings_saved', false, $message);
+ } elseif (REQUEST_ISSET_POST(('reject'))) {
if ($SEL > 0) {
// Reject mail orders
- $SW = 2; $OUT = "";
- foreach ($_POST['sel'] as $id => $value) {
+ $OUT = ''; $SW = 2;
+ foreach (REQUEST_POST('sel') as $id => $value) {
// Secure ID number
$id = bigintval($id);
SEND_EMAIL($DATA['sender'], MEMBER_ORDER_REJECTED, $msg_user);
// If you do not enter an URL to redirect to, your URL will be set!
- if ((empty($_POST['redirect'])) || ($_POST['redirect'] == "http://")) $_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",
- array($_POST['redirect'], $id),__FILE__, __LINE__);
+ array(REQUEST_POST('redirect'), $id),__FILE__, __LINE__);
// Prepare data for the row template
$content = array(
'sw' => $SW,
'id' => $id,
- 'url' => $_POST['url'][$id],
+ 'url' => REQUEST_POST('url', $id),
);
// Load row template and switch colors
LOAD_TEMPLATE("admin_unlock_emails_redir");
} else {
// Nothing selected
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_MAILS_NOTHING_CHECKED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_MAILS_NOTHING_CHECKED'));
}
- } elseif ((isset($_POST['lock'])) && ($SEL > 0) && (getConfig('url_blacklist') == "Y")) {
+ } elseif ((REQUEST_ISSET_POST(('lock'))) && ($SEL > 0) && (getConfig('url_blacklist') == 'Y')) {
// Lock URLs
- foreach ($_POST['sel'] as $id => $url) {
+ foreach (REQUEST_POST('sel') as $id => $url) {
// Secure id number
$id = bigintval($id);
} // END - foreach
// Output message
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_URLS_BLOCKED'));
- } elseif ((empty($_POST['lock'])) && (empty($_POST['accept'])) && (empty($_POST['reject'])) && (getConfig('url_blacklist') == "Y")) {
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_URLS_BLOCKED'));
+ } elseif ((!REQUEST_ISSET_POST(('lock'))) && (!REQUEST_ISSET_POST(('accept'))) && (!REQUEST_ISSET_POST(('reject'))) && (getConfig('url_blacklist') == 'Y')) {
// Mail orders are in pool so we can display them
- $SW = 2; $OUT = "";
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result_main)) {
// Prepare data for the template
$content = array(
// Prepare rejection URL
$REJECT = "http://";
- if (GET_EXT_VERSION("other") >= "0.1.6") $REJECT = getConfig('reject_url');
+ if (GET_EXT_VERSION('other') >= '0.1.6') $REJECT = getConfig('reject_url');
define('__REJECT_URL', $REJECT);
// Load main template
LOAD_TEMPLATE("admin_unlock_emails");
- } elseif ((isset($_POST['lock'])) && (getConfig('url_blacklist') == "N")) {
+ } elseif ((REQUEST_ISSET_POST(('lock'))) && (getConfig('url_blacklist') != 'Y')) {
// URL blacklist not activated
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_URL_BLACKLIST_DISABLED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_URL_BLACKLIST_DISABLED'));
} else {
// Wrong call!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_WRONG_CALL'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_WRONG_CALL'));
}
} else {
// No mail orders fond
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_NO_MAILS_IN_POOL'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NO_MAILS_IN_POOL'));
}
//