X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fmember%2Fwhat-reflinks.php;h=51d31adf799dc8c40e492dc1208c3443d46a5604;hb=524c58a61b0a074fed8d7c9dc2f9ddab7f653595;hp=d79060ef56eba88b6fba2087b5e0d4a459c2ddfa;hpb=8a9324b2d931f54f54f4319fd7234910af77012c;p=mailer.git
diff --git a/inc/modules/member/what-reflinks.php b/inc/modules/member/what-reflinks.php
index d79060ef56..51d31adf79 100644
--- a/inc/modules/member/what-reflinks.php
+++ b/inc/modules/member/what-reflinks.php
@@ -6,9 +6,9 @@
* -------------------------------------------------------------------- *
* File : what-reflinks.php *
* -------------------------------------------------------------------- *
- * Short description : Referral links *
+ * Short description : Referal links *
* -------------------------------------------------------------------- *
- * Kurzbeschreibung : Referral-Links *
+ * Kurzbeschreibung : Referal-Links *
* -------------------------------------------------------------------- *
* *
* -------------------------------------------------------------------- *
@@ -32,30 +32,25 @@
************************************************************************/
// Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
+if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-}
- elseif (!IS_LOGGED_IN())
-{
- LOAD_URL(URL."/modules.php?module=index");
+} elseif (!IS_MEMBER()) {
+ LOAD_URL("modules.php?module=index");
}
// Add description as navigation point
ADD_DESCR("member", basename(__FILE__));
-OPEN_TABLE("90%", "member_table member_content_align", "");
-
-// Load current referral clicks
-$result = SQL_QUERY_ESC("SELECT ref_clicks FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1",
+// Load current referal clicks
+$result = SQL_QUERY_ESC("SELECT ref_clicks FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
array($GLOBALS['userid']), __FILE__, __LINE__);
list($c) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
OUTPUT_HTML("".YOUR_PERSONAL_REFLINK.":
-".URL."/ref.php?ref=".$GLOBALS['userid']."
+".URL."/ref.php?ref=".$GLOBALS['userid']."
");
if (EXT_IS_ACTIVE("nickname"))
@@ -80,8 +75,8 @@ if (EXT_IS_ACTIVE("nickname"))
// Clicks on your reflink
OUTPUT_HTML(YOUR_REFCLICKS.": ".$c." ".CLICKS."
");
-$WHERE = " WHERE visible='Y'";
-if (IS_ADMIN()) $WHERE = "";
+$whereStatement = " WHERE visible='Y'";
+if (IS_ADMIN()) $whereStatement = "";
$result = SQL_QUERY("SELECT id, url, alternate, counter, clicks FROM "._MYSQL_PREFIX."_refbanner", __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0)
@@ -105,9 +100,7 @@ if (SQL_NUMROWS($result) > 0)
}
}
$size = strlen($file);
- }
- elseif (file_exists($test))
- {
+ } elseif (FILE_READABLE($test)) {
$size = filesize($test);
}
if ($size > 0) $alt .= " (".TRANSLATE_COMMA(round($size/102.4)/10)." ".KBYTES.")";
@@ -139,6 +132,5 @@ if (SQL_NUMROWS($result) > 0)
// Free result
SQL_FREERESULT($result);
-CLOSE_TABLE();
//
?>