-// 0 1 2 3 4 5 6 7 8 9 10
-$SQL = "SELECT id, sender, subject, text, receivers, payment_id, data_type, timestamp, url, target_send, cat_id
- FROM "._MYSQL_PREFIX."_pool
- WHERE data_type IN('ADMIN', 'TEMP', 'NEW', 'ACTIVE')
- ORDER BY timestamp DESC";
-$WHO = _ALL;
-$SQL2 = "";
-
-if (!empty($_GET['mid']))
-{
+$sql = "SELECT
+ `id`,
+ `sender`,
+ `subject`,
+ `text`,
+ `receivers`,
+ `payment_id`,
+ `data_type`,
+ `timestamp`,
+ `url`,
+ `target_send`,
+ `mails_sent`,
+ `cat_id`
+FROM
+ `{?_MYSQL_PREFIX?}_pool`
+WHERE
+ `data_type` IN('ADMIN','TEMP','NEW','ACTIVE')
+ORDER BY
+ `timestamp` DESC";
+
+$WHO = '';
+$SQL2 = '';
+
+if ((isPostRequestElementSet('id')) && (isGetRequestElementSet('type')) && (postRequestElement('type') == 'normal')) {