ADD_DESCR("admin", basename(__FILE__));
// Define some variables
-global $DATA, $link;
+global $DATA;
// Check for mails
$result_main = SQL_QUERY("SELECT id, sender, subject, payment_id, timestamp, url, target_send, cat_id FROM "._MYSQL_PREFIX."_pool WHERE data_type='ADMIN' ORDER BY timestamp", __FILE__, __LINE__);
-OPEN_TABLE("100%", "admin_content admin_content_align", "");
if ((SQL_NUMROWS($result_main) > 0) || (isset($_POST['lock']))) {
// Count checked checkboxes
$SEL = 0;
array($id), __FILE__, __LINE__);
// Update wents fine?
- if (SQL_AFFECTEDROWS($link, __FILE__, __LINE__) == 1) {
+ if (SQL_AFFECTEDROWS() == 1) {
// Order placed in queue... 0 1 2 3 4
$result = SQL_QUERY_ESC("SELECT po.url, po.subject, po.sender, pay.payment, po.payment_id
FROM "._MYSQL_PREFIX."_pool AS po
// Subtract bonus points from system
BONUS_POINTS_HANDLER($_CONFIG['bonus_order']);
- }
+ } // END - if
- // Check for surfbar extension
- $msg_user = "MISSING";
- if (EXT_IS_ACTIVE("surfbar")) {
- // Add the url
- $insertId = SURFBAR_ADMIN_ADD_URL($DATA['url'], $DATA['sender'], $DATA['payment'], $DATA['payment_id']);
-
- // Load email template
- $msg_user = LOAD_EMAIL_TEMPLATE("order_accept_sb", $insertId, $DATA['sender']);
- } else {
- // Load email template
- $msg_user = LOAD_EMAIL_TEMPLATE("order-accept", "", $DATA['sender']);
- }
+ // Load email template
+ $msg_user = LOAD_EMAIL_TEMPLATE("order-accept", "", $DATA['sender']);
// Send email
SEND_EMAIL($DATA['sender'], MEMBER_ORDER_ACCEPTED, $msg_user);
- }
- }
+ } // END - if
+ } // END - foreach
// Set message
$MSG = ADMIN_MAILS_ACTIVATED;
if ($SEL > 0) {
// Reject mail orders
$SW = 2; $OUT = "";
- foreach ($_POST['sel'] as $id=>$value) {
+ foreach ($_POST['sel'] as $id => $value) {
// Secure ID number
$id = bigintval($id);
} elseif ((isset($_POST['lock'])) || ($SEL > 0)) {
if ($SEL > 0) {
// Lock URLs
- foreach ($_POST['sel'] as $id=>$url) {
+ foreach ($_POST['sel'] as $id => $url) {
// Lookup in blacklist
$result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_url_blist WHERE url='%s' LIMIT 1",
array($url), __FILE__, __LINE__);
LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_NO_MAILS_IN_POOL);
}
-CLOSE_TABLE();
//
?>