************************************************************************/
// 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__));
// Set offset an current page to default values
if (empty($_GET['page'])) $_GET['page'] = "1";
-if (empty($_GET['offset'])) $_GET['offset'] = $CONFIG['mails_page'];
+if (empty($_GET['offset'])) $_GET['offset'] = $_CONFIG['mails_page'];
// Add limitation to SQL string
$SQL .= " LIMIT ".($_GET['offset'] * $_GET['page'] - $_GET['offset']).", ".$_GET['offset'];
$result = SQL_QUERY($SQL, __FILE__, __LINE__);
// Calculate pages
-$PAGES = round(SQL_NUMROWS($result_normal) / $CONFIG['mails_page'] + 0.5);
+$PAGES = round(SQL_NUMROWS($result_normal) / $_CONFIG['mails_page'] + 0.5);
SQL_FREERESULT($result_normal);
if (SQL_NUMROWS($result) > 0)
// Add navigation table rows
if ($PAGES > 1)
{
- define('__TOP_EMAIL_NAV' , ADD_EMAIL_NAV($PAGES, $CONFIG['mails_page'], true , "3", true));
- define('__BOTTOM_EMAIL_NAV', ADD_EMAIL_NAV($PAGES, $CONFIG['mails_page'], false, "3", true));
+ define('__TOP_EMAIL_NAV' , ADD_EMAIL_NAV($PAGES, $_CONFIG['mails_page'], true , "3", true));
+ define('__BOTTOM_EMAIL_NAV', ADD_EMAIL_NAV($PAGES, $_CONFIG['mails_page'], false, "3", true));
}
else
{
while ($pool = SQL_FETCHROW($result))
{
// Check sent mails and clicks
- $result_mails = SQL_QUERY_ESC("SELECT max_rec, clicks FROM "._MYSQL_PREFIX."_user_stats WHERE pool_id=%d LIMIT 1",
+ $result_mails = SQL_QUERY_ESC("SELECT max_rec, clicks FROM "._MYSQL_PREFIX."_user_stats WHERE pool_id=%s LIMIT 1",
array(bigintval($pool[0])), __FILE__, __LINE__);
list($sent, $clicks) = SQL_FETCHROW($result_mails);
SQL_FREERESULT($result_mails);
'sent' => $sent,
'ruids' => str_replace(";", ", ", $pool[4]),
'unconfirmed' => $unconfirmed,
- 'type' => GET_POOL_TYPE($pool[6]),
+ 'type' => TRANSLATE_POOL_TYPE($pool[6]),
'tsend' => $pool[9],
'url' => FRAMETESTER($pool[8]),
'stamp' => MAKE_DATETIME($pool[7], "0"),
else
{
// No mail orders fond
- OUTPUT_HTML ("<SPAN class=\"admin_failed\">".ADMIN_NO_MAILS_IN_POOL."</SPAN>");
+ OUTPUT_HTML("<SPAN class=\"admin_failed\">".ADMIN_NO_MAILS_IN_POOL."</SPAN>");
}
//
?>