* -------------------------------------------------------------------- *
* File : what-refbanner.php *
* -------------------------------------------------------------------- *
- * Short description : Manage all referral banner *
+ * Short description : Manage all referal banner *
* -------------------------------------------------------------------- *
* Kurzbeschreibung : Alle Banner fuer die Ref-Links verwalten *
* -------------------------------------------------------------------- *
************************************************************************/
// 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__));
+ADD_DESCR("admin", __FILE__);
$SEL = 0;
if ((empty($_POST['url'])) || (empty($_POST['alternate'])))
{
// Add banner
$result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_refbanner (url, alternate, visible)
-VALUES ('%s', '%s', '%s')",
+VALUES ('%s','%s','%s')",
array($_POST['url'], $_POST['alternate'], $_POST['visible']), __FILE__, __LINE__);
}
else
}
}
- // Referral levels
+ // Referal levels
$result = SQL_QUERY("SELECT id, url, alternate, visible, counter, clicks FROM "._MYSQL_PREFIX."_refbanner ORDER BY url", __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0)
{
- // Make referral banner editable and deletable
+ // Make referal banner editable and deletable
$SW = 2; $OUT = "";
while (list($id, $url, $alt, $vis, $cntr, $clks) = SQL_FETCHROW($result))
{
LOAD_TEMPLATE("admin_refbanner");
}
- // Form for adding new referral levels
+ // Form for adding new referal levels
LOAD_TEMPLATE("admin_add_banner");
}