From: Roland Häder Date: Thu, 11 Sep 2008 00:22:43 +0000 (+0000) Subject: IS_LOGGED_IN() renamed to IS_MEMBER(), some HTML fixes X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ae80e170b5d25a4782af90a7c3d81fbb176fa293;p=mailer.git IS_LOGGED_IN() renamed to IS_MEMBER(), some HTML fixes --- diff --git a/.gitattributes b/.gitattributes index 4efde83e25..d014e9ac1e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -64,6 +64,8 @@ DOCS/en/rewrite/README.txt -text DOCS/en/rewrite/README_htaccess.de -text DOCS/en/task/README.txt -text DOCS/en/themes/README.txt -text +DOCS/tpl-validator.php -text +DOCS/validator.sh -text /admin.php -text /agb.php -text /beg.php -text diff --git a/DOCS/tpl-validator.php b/DOCS/tpl-validator.php new file mode 100644 index 0000000000..5576f66e07 --- /dev/null +++ b/DOCS/tpl-validator.php @@ -0,0 +1,64 @@ + [--write]\n\n"; + echo "Validates a template against the DOM model. Use --write with caution!\n"; + exit; +} + +$doc = new DOMDocument(); +$doc->formatOutput = true; +$doc->preserveWhiteSpace = false; +$doc->encoding = "utf-8"; +$doc->xmlVersion = "1.1"; +$doc->loadHTMLFile($_SERVER['argv'][1]); + +$data = $doc->saveHTML(); +$data = str_replace("
", "
\n", $data); +$data = str_replace("\n\n", "\n", $data); + +$array = explode("\n", $data); +array_shift($array); +array_shift($array); +unset($array[count($array) - 1]); +unset($array[count($array) - 1]); + +$data = implode("\n", $array)."\n"; + +if (strtolower($_SERVER['arv'][2]) == "--write") { + echo "Writing document...\n"; + file_put_contents($_SERVER['argv'][1], $data); +} + +?> diff --git a/DOCS/validator.sh b/DOCS/validator.sh new file mode 100644 index 0000000000..95539002a0 --- /dev/null +++ b/DOCS/validator.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +find templates/de/html/ -type f -name *.tpl -exec php DOCS/tpl-validator.php {} \; | grep Warning | cut -d "/" -f 1-5 | grep -v "error parsing attribute name">warnings.log diff --git a/beg.php b/beg.php index e402809626..a7e4e82aef 100644 --- a/beg.php +++ b/beg.php @@ -75,7 +75,7 @@ if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_install // Check if locked in so don't pay points $login = false; $status = "failed"; - if (IS_LOGGED_IN()) { + if (IS_MEMBER()) { // Logged in user detected! $login = true; } diff --git a/inc/databases.php b/inc/databases.php index 341f8e4caf..8ad6fa18e8 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -114,7 +114,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // This current patch level -define('CURR_SVN_REVISION', "295"); +define('CURR_SVN_REVISION', "296"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index e64400c5d4..a715e81486 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -101,7 +101,7 @@ function SURFBAR_MEMBER_ADD_URL ($url) { global $_CONFIG; // Do some pre-checks - if (!IS_LOGGED_IN()) { + if (!IS_MEMBER()) { // Not a member return false; } elseif (!VALIDATE_URL($url)) { @@ -421,7 +421,7 @@ function SURFBAR_GET_TOTAL_USER_URLS ($uid=0) { global $_CONFIG; // Is the user 0 and user is logged in? - if (($uid == 0) && (IS_LOGGED_IN())) { + if (($uid == 0) && (IS_MEMBER())) { // Then use this userid $uid = $GLOBALS['userid']; } elseif ($uid == 0) { @@ -597,7 +597,7 @@ function SURFBAR_DETERMINE_DEPLETED_USERIDS() { $UIDs = array(); // Do we have a current user id? - if (IS_LOGGED_IN()) { + if (IS_MEMBER()) { // Then add this as well $UIDs[] = $GLOBALS['userid']; diff --git a/inc/modules/frametester.php b/inc/modules/frametester.php index 49b06b359e..c73bec9636 100644 --- a/inc/modules/frametester.php +++ b/inc/modules/frametester.php @@ -41,7 +41,7 @@ $MODE = "guest"; if (!empty($_GET['order'])) { // Order number placed, is he also logged in? - if(IS_LOGGED_IN()) { + if(IS_MEMBER()) { // Ok, test passed... :) $result = SQL_QUERY_ESC("SELECT subject, url FROM "._MYSQL_PREFIX."_pool WHERE id=%s AND sender=%s AND data_type='TEMP' LIMIT 1", array(bigintval($_GET['order']), $GLOBALS['userid']), __FILE__, __LINE__); diff --git a/inc/modules/guest/what-login.php b/inc/modules/guest/what-login.php index 70652bf981..4029789a49 100644 --- a/inc/modules/guest/what-login.php +++ b/inc/modules/guest/what-login.php @@ -78,7 +78,7 @@ $URL = ""; $ADD = ""; if (empty($_POST['new_pass'])) $_POST['new_pass'] = ""; if (empty($_GET['login'])) $_GET['login'] = ""; -if (IS_LOGGED_IN()) { +if (IS_MEMBER()) { // Login immidiately... $URL = URL."/modules.php?module=login"; } elseif (isset($_POST['ok'])) { @@ -160,7 +160,7 @@ if (IS_LOGGED_IN()) { $GLOBALS['userid'] = bigintval($UID); } else { // Check for login data - $login = IS_LOGGED_IN(); + $login = IS_MEMBER(); } if ($login) { diff --git a/inc/modules/login.php b/inc/modules/login.php index 63871f1ecd..f9589cd586 100644 --- a/inc/modules/login.php +++ b/inc/modules/login.php @@ -35,7 +35,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif (!IS_LOGGED_IN()) { +} elseif (!IS_MEMBER()) { $URL = URL."/modules.php?module=index"; if ($check == "mem_only") $URL .= "&msg=".urlencode(LANG_MEM_ONLY_1.$GLOBALS['module'].LANG_MEM_ONLY_2); LOAD_URL($URL); @@ -62,7 +62,7 @@ if ($status != "CONFIRMED") { } // END - if // Recheck if he got logged out because bad cookies -if (!IS_LOGGED_IN()) { +if (!IS_MEMBER()) { $URL = URL."/modules.php?module=index"; LOAD_URL($URL); } // END - if diff --git a/inc/modules/member/action-account.php b/inc/modules/member/action-account.php index 4fca9d942d..020d647461 100644 --- a/inc/modules/member/action-account.php +++ b/inc/modules/member/action-account.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } - elseif (!IS_LOGGED_IN()) + elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } diff --git a/inc/modules/member/action-bank.php b/inc/modules/member/action-bank.php index b2a8a63509..73d7587ba5 100644 --- a/inc/modules/member/action-bank.php +++ b/inc/modules/member/action-bank.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } - elseif (!IS_LOGGED_IN()) + elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } diff --git a/inc/modules/member/action-extras.php b/inc/modules/member/action-extras.php index 4c5e8d6e4f..a410af8add 100644 --- a/inc/modules/member/action-extras.php +++ b/inc/modules/member/action-extras.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } - elseif (!IS_LOGGED_IN()) + elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } diff --git a/inc/modules/member/action-logout.php b/inc/modules/member/action-logout.php index af6da02380..bd6a3a157b 100644 --- a/inc/modules/member/action-logout.php +++ b/inc/modules/member/action-logout.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } - elseif (!IS_LOGGED_IN()) + elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } diff --git a/inc/modules/member/action-main.php b/inc/modules/member/action-main.php index 816cac49c5..0bee4c93d7 100644 --- a/inc/modules/member/action-main.php +++ b/inc/modules/member/action-main.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } - elseif (!IS_LOGGED_IN()) + elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } diff --git a/inc/modules/member/action-order.php b/inc/modules/member/action-order.php index b2524b4ba6..5276096f42 100644 --- a/inc/modules/member/action-order.php +++ b/inc/modules/member/action-order.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } - elseif (!IS_LOGGED_IN()) + elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } diff --git a/inc/modules/member/action-rals.php b/inc/modules/member/action-rals.php index 4f9ffd18b1..5c92acf49a 100644 --- a/inc/modules/member/action-rals.php +++ b/inc/modules/member/action-rals.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } - elseif (!IS_LOGGED_IN()) + elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } diff --git a/inc/modules/member/action-stats.php b/inc/modules/member/action-stats.php index 8d731faf70..4c53e79aad 100644 --- a/inc/modules/member/action-stats.php +++ b/inc/modules/member/action-stats.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } - elseif (!IS_LOGGED_IN()) + elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } diff --git a/inc/modules/member/action-surfbar.php b/inc/modules/member/action-surfbar.php index 3a8201d950..b957dd273e 100644 --- a/inc/modules/member/action-surfbar.php +++ b/inc/modules/member/action-surfbar.php @@ -35,7 +35,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif (!IS_LOGGED_IN()) { +} elseif (!IS_MEMBER()) { LOAD_URL(URL."/modules.php?module=index"); } elseif ($BLOCK_MODE) { // Block mode detected diff --git a/inc/modules/member/action-themes.php b/inc/modules/member/action-themes.php index af8452c529..908fe65098 100644 --- a/inc/modules/member/action-themes.php +++ b/inc/modules/member/action-themes.php @@ -35,7 +35,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif (!IS_LOGGED_IN()) { +} elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } diff --git a/inc/modules/member/what-bank_create.php b/inc/modules/member/what-bank_create.php index fda9652096..2d17b4601c 100644 --- a/inc/modules/member/what-bank_create.php +++ b/inc/modules/member/what-bank_create.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } - elseif (!IS_LOGGED_IN()) + elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } diff --git a/inc/modules/member/what-bank_deposit.php b/inc/modules/member/what-bank_deposit.php index fda9652096..2d17b4601c 100644 --- a/inc/modules/member/what-bank_deposit.php +++ b/inc/modules/member/what-bank_deposit.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } - elseif (!IS_LOGGED_IN()) + elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } diff --git a/inc/modules/member/what-bank_infos.php b/inc/modules/member/what-bank_infos.php index fda9652096..2d17b4601c 100644 --- a/inc/modules/member/what-bank_infos.php +++ b/inc/modules/member/what-bank_infos.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } - elseif (!IS_LOGGED_IN()) + elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } diff --git a/inc/modules/member/what-bank_output.php b/inc/modules/member/what-bank_output.php index fda9652096..2d17b4601c 100644 --- a/inc/modules/member/what-bank_output.php +++ b/inc/modules/member/what-bank_output.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } - elseif (!IS_LOGGED_IN()) + elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } diff --git a/inc/modules/member/what-bank_withdraw.php b/inc/modules/member/what-bank_withdraw.php index fda9652096..2d17b4601c 100644 --- a/inc/modules/member/what-bank_withdraw.php +++ b/inc/modules/member/what-bank_withdraw.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } - elseif (!IS_LOGGED_IN()) + elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } diff --git a/inc/modules/member/what-beg.php b/inc/modules/member/what-beg.php index eb9c6aa125..361f86c093 100644 --- a/inc/modules/member/what-beg.php +++ b/inc/modules/member/what-beg.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } - elseif (!IS_LOGGED_IN()) + elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } diff --git a/inc/modules/member/what-beg2.php b/inc/modules/member/what-beg2.php index 07534dab6e..3c61941be4 100644 --- a/inc/modules/member/what-beg2.php +++ b/inc/modules/member/what-beg2.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } - elseif (!IS_LOGGED_IN()) + elseif (!IS_MEMBER()) { LOAD_URL("modules.php[5~?module=index"); } diff --git a/inc/modules/member/what-bonus.php b/inc/modules/member/what-bonus.php index 8ddf806a42..67ffb33bce 100644 --- a/inc/modules/member/what-bonus.php +++ b/inc/modules/member/what-bonus.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } - elseif (!IS_LOGGED_IN()) + elseif (!IS_MEMBER()) { LOAD_URL("modules.php[5~?module=index"); } diff --git a/inc/modules/member/what-categories.php b/inc/modules/member/what-categories.php index 4f2a8ae238..a415828007 100644 --- a/inc/modules/member/what-categories.php +++ b/inc/modules/member/what-categories.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } - elseif (!IS_LOGGED_IN()) + elseif (!IS_MEMBER()) { LOAD_URL("modules.php[13~?module=index"); } diff --git a/inc/modules/member/what-doubler.php b/inc/modules/member/what-doubler.php index 62f3359a79..b4bb3fbd02 100644 --- a/inc/modules/member/what-doubler.php +++ b/inc/modules/member/what-doubler.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } - elseif (!IS_LOGGED_IN()) + elseif (!IS_MEMBER()) { LOAD_URL("modules.php[5~?module=index"); } diff --git a/inc/modules/member/what-guest.php b/inc/modules/member/what-guest.php index dd688be9bf..7d77e2d4ba 100644 --- a/inc/modules/member/what-guest.php +++ b/inc/modules/member/what-guest.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } - elseif (!IS_LOGGED_IN()) + elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } diff --git a/inc/modules/member/what-holiday.php b/inc/modules/member/what-holiday.php index 2df58e320c..42144cd8d9 100644 --- a/inc/modules/member/what-holiday.php +++ b/inc/modules/member/what-holiday.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } - elseif (!IS_LOGGED_IN()) + elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } diff --git a/inc/modules/member/what-html_mail.php b/inc/modules/member/what-html_mail.php index 2ce7fd81dc..ad798d6fe6 100644 --- a/inc/modules/member/what-html_mail.php +++ b/inc/modules/member/what-html_mail.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } - elseif (!IS_LOGGED_IN()) + elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } diff --git a/inc/modules/member/what-logout.php b/inc/modules/member/what-logout.php index d2f8e71bbd..45bd0a01de 100644 --- a/inc/modules/member/what-logout.php +++ b/inc/modules/member/what-logout.php @@ -35,7 +35,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif (!IS_LOGGED_IN()) { +} elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } diff --git a/inc/modules/member/what-mydata.php b/inc/modules/member/what-mydata.php index 646a0a8b1c..a24907380f 100644 --- a/inc/modules/member/what-mydata.php +++ b/inc/modules/member/what-mydata.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } - elseif (!IS_LOGGED_IN()) + elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } diff --git a/inc/modules/member/what-newsletter.php b/inc/modules/member/what-newsletter.php index eac7c3265f..9ffe320c87 100644 --- a/inc/modules/member/what-newsletter.php +++ b/inc/modules/member/what-newsletter.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } - elseif (!IS_LOGGED_IN()) + elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } diff --git a/inc/modules/member/what-nickname.php b/inc/modules/member/what-nickname.php index f6802001b7..899305c097 100644 --- a/inc/modules/member/what-nickname.php +++ b/inc/modules/member/what-nickname.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } - elseif (!IS_LOGGED_IN()) + elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } diff --git a/inc/modules/member/what-order.php b/inc/modules/member/what-order.php index 62aec111c7..b3e19cf892 100644 --- a/inc/modules/member/what-order.php +++ b/inc/modules/member/what-order.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } - elseif (!IS_LOGGED_IN()) + elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } diff --git a/inc/modules/member/what-payout.php b/inc/modules/member/what-payout.php index 48bd9617d2..1a828cdb9c 100644 --- a/inc/modules/member/what-payout.php +++ b/inc/modules/member/what-payout.php @@ -36,7 +36,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { // Don't call this directly! $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif (!IS_LOGGED_IN()) { +} elseif (!IS_MEMBER()) { // Not logged in LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("payout")) && (!IS_ADMIN())) { diff --git a/inc/modules/member/what-points.php b/inc/modules/member/what-points.php index 88f026fd61..6293845d81 100644 --- a/inc/modules/member/what-points.php +++ b/inc/modules/member/what-points.php @@ -35,7 +35,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif (!IS_LOGGED_IN()) { +} elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } diff --git a/inc/modules/member/what-primera.php b/inc/modules/member/what-primera.php index 6ba131bf95..5035bbb89a 100644 --- a/inc/modules/member/what-primera.php +++ b/inc/modules/member/what-primera.php @@ -35,7 +35,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif (!IS_LOGGED_IN()) { +} elseif (!IS_MEMBER()) { // User is not logged in LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("primera")) && (!IS_ADMIN())) { diff --git a/inc/modules/member/what-rallyes.php b/inc/modules/member/what-rallyes.php index 6185904b43..97f28f85dd 100644 --- a/inc/modules/member/what-rallyes.php +++ b/inc/modules/member/what-rallyes.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } - elseif (!IS_LOGGED_IN()) + elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } diff --git a/inc/modules/member/what-reflinks.php b/inc/modules/member/what-reflinks.php index e9dcc54c19..b5c6a37f28 100644 --- a/inc/modules/member/what-reflinks.php +++ b/inc/modules/member/what-reflinks.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } - elseif (!IS_LOGGED_IN()) + elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } diff --git a/inc/modules/member/what-sponsor.php b/inc/modules/member/what-sponsor.php index 6fecc2371a..5c0ad0f5a5 100644 --- a/inc/modules/member/what-sponsor.php +++ b/inc/modules/member/what-sponsor.php @@ -36,7 +36,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php"; require($INC); } - elseif (!IS_LOGGED_IN()) + elseif (!IS_MEMBER()) { LOAD_URL(URL."/modules.php?module=index"); } diff --git a/inc/modules/member/what-stats.php b/inc/modules/member/what-stats.php index 2e22897621..bed7ab0792 100644 --- a/inc/modules/member/what-stats.php +++ b/inc/modules/member/what-stats.php @@ -35,7 +35,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif (!IS_LOGGED_IN()) { +} elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } diff --git a/inc/modules/member/what-support.php b/inc/modules/member/what-support.php index d98a7808ee..9d01670d98 100644 --- a/inc/modules/member/what-support.php +++ b/inc/modules/member/what-support.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } - elseif (!IS_LOGGED_IN()) + elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } diff --git a/inc/modules/member/what-surfbar_book.php b/inc/modules/member/what-surfbar_book.php index 13c765104d..d9dda0fb03 100644 --- a/inc/modules/member/what-surfbar_book.php +++ b/inc/modules/member/what-surfbar_book.php @@ -35,7 +35,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif (!IS_LOGGED_IN()) { +} elseif (!IS_MEMBER()) { // Redirect LOAD_URL(URL."/modules.php?module=index"); } elseif (!EXT_IS_ACTIVE("surfbar")) { diff --git a/inc/modules/member/what-surfbar_start.php b/inc/modules/member/what-surfbar_start.php index acb470a3a7..73ac3af9c8 100644 --- a/inc/modules/member/what-surfbar_start.php +++ b/inc/modules/member/what-surfbar_start.php @@ -35,7 +35,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif (!IS_LOGGED_IN()) { +} elseif (!IS_MEMBER()) { // Not logged in LOAD_URL("modules.php?module=index"); } elseif (!EXT_IS_ACTIVE("surfbar")) { diff --git a/inc/modules/member/what-surfbar_stats.php b/inc/modules/member/what-surfbar_stats.php index 0b6800a36d..515aadbc6c 100644 --- a/inc/modules/member/what-surfbar_stats.php +++ b/inc/modules/member/what-surfbar_stats.php @@ -35,7 +35,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif (!IS_LOGGED_IN()) { +} elseif (!IS_MEMBER()) { LOAD_URL(URL."/modules.php?module=index"); } diff --git a/inc/modules/member/what-themes.php b/inc/modules/member/what-themes.php index 9731f71f5d..d58dd5bbb7 100644 --- a/inc/modules/member/what-themes.php +++ b/inc/modules/member/what-themes.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } - elseif (!IS_LOGGED_IN()) + elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } diff --git a/inc/modules/member/what-transfer.php b/inc/modules/member/what-transfer.php index b521ba218f..0e9c148ae8 100644 --- a/inc/modules/member/what-transfer.php +++ b/inc/modules/member/what-transfer.php @@ -35,7 +35,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif (!IS_LOGGED_IN()) { +} elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("transfer")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "transfer"); diff --git a/inc/modules/member/what-unconfirmed.php b/inc/modules/member/what-unconfirmed.php index d831b00e96..114276f7ab 100644 --- a/inc/modules/member/what-unconfirmed.php +++ b/inc/modules/member/what-unconfirmed.php @@ -35,7 +35,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif (!IS_LOGGED_IN()) { +} elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } elseif (!EXT_IS_ACTIVE("mailid")) { LOAD_URL("modules.php?module=login"); diff --git a/inc/modules/member/what-welcome.php b/inc/modules/member/what-welcome.php index 46dd492a4d..8ce43420ff 100644 --- a/inc/modules/member/what-welcome.php +++ b/inc/modules/member/what-welcome.php @@ -37,7 +37,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } - elseif (!IS_LOGGED_IN()) + elseif (!IS_MEMBER()) { LOAD_URL("modules.php?module=index"); } diff --git a/inc/modules/member/what-wernis.php b/inc/modules/member/what-wernis.php index 181603bab5..202c754d2c 100644 --- a/inc/modules/member/what-wernis.php +++ b/inc/modules/member/what-wernis.php @@ -35,7 +35,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); -} elseif (!IS_LOGGED_IN()) { +} elseif (!IS_MEMBER()) { // User is not logged in LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("wernis")) && (!IS_ADMIN())) { diff --git a/inc/modules/order.php b/inc/modules/order.php index 01f89fabcf..b0c26bc7af 100644 --- a/inc/modules/order.php +++ b/inc/modules/order.php @@ -39,7 +39,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { } elseif ((!EXT_IS_ACTIVE("order")) && (!IS_ADMIN())) { ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "order"); return; -} elseif (!IS_LOGGED_IN()) { +} elseif (!IS_MEMBER()) { // Sorry, no guest access! $URL = URL."/modules.php?module=index"; } elseif (empty($_GET['order'])) { diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index e7d9adecca..6710c1c6f6 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -132,13 +132,13 @@ function CHECK_MODULE($mod) { // Check returned values against current access permissions // // Admin access ----- Guest access ----- --- Guest or member? --- - if ((IS_ADMIN()) || (($locked == "N") && ($admin == "N") && (($mem == "N") || (IS_LOGGED_IN())))) { + if ((IS_ADMIN()) || (($locked == "N") && ($admin == "N") && (($mem == "N") || (IS_MEMBER())))) { // If you are admin you are welcome for everything! $ret = "done"; } elseif ($locked == "Y") { // Module is locked $ret = "locked"; - } elseif (($mem == "Y") && (!IS_LOGGED_IN())) { + } elseif (($mem == "Y") && (!IS_MEMBER())) { // You have to login first! $ret = "mem_only"; } elseif (($admin == "Y") && (!IS_ADMIN())) { @@ -538,7 +538,7 @@ function WHAT_IS_VALID($act, $wht, $type="guest") } } // -function IS_LOGGED_IN() +function IS_MEMBER() { global $status, $LAST; if (!is_array($LAST)) $LAST = array(); @@ -617,7 +617,7 @@ function UPDATE_LOGIN_DATA ($UPDATE=true) { $newl = time() + bigintval(get_session('lifetime')); // Recheck if logged in - if (!IS_LOGGED_IN()) return false; + if (!IS_MEMBER()) return false; // Load last module and last online time $result = SQL_QUERY_ESC("SELECT last_module, last_online FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); @@ -1204,7 +1204,7 @@ function UPDATE_ONLINE_LIST($SID, $mod, $act, $wht) if (!empty($GLOBALS['userid'])) { // Update member status only when userid is valid - if (($GLOBALS['userid'] > 0) && (IS_LOGGED_IN())) + if (($GLOBALS['userid'] > 0) && (IS_MEMBER())) { // Is valid user $uid = $GLOBALS['userid']; diff --git a/inc/session.php b/inc/session.php index af8eb7c050..7710e9bf65 100644 --- a/inc/session.php +++ b/inc/session.php @@ -91,7 +91,7 @@ if (isset($_SESSION['userid'])) { $GLOBALS['userid'] = bigintval($_SESSION['userid']); // Is it valid? - if (!IS_LOGGED_IN()) { + if (!IS_MEMBER()) { // Then destroy the user id destroy_user_session(); } // END - if diff --git a/modules.php b/modules.php index f4e8cbacfb..8368d269c1 100644 --- a/modules.php +++ b/modules.php @@ -55,7 +55,7 @@ $GLOBALS['module'] = htmlentities(strip_tags($_GET['module']), ENT_QUOTES); require ("inc/config.php"); // Check if logged in -if (IS_LOGGED_IN()) { +if (IS_MEMBER()) { // Is still logged in so we welcome him with his name $result = SQL_QUERY_ESC("SELECT surname, family FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); diff --git a/surfbar.php b/surfbar.php index 43da016f13..f0d1dab1e6 100644 --- a/surfbar.php +++ b/surfbar.php @@ -52,7 +52,7 @@ require ("inc/config.php"); // Is the script installed? if (defined('mxchange_installed') && (isBooleanConstantAndTrue('mxchange_installed'))) { // Only logged in users may use this surfbar! - if (!IS_LOGGED_IN()) { + if (!IS_MEMBER()) { // Redirect LOAD_URL(URL."/modules.php?module=index"); } elseif (!EXT_IS_ACTIVE("surfbar")) { diff --git a/templates/de/html/admin/admin_list_surfbar_urls_row.tpl b/templates/de/html/admin/admin_list_surfbar_urls_row.tpl index 105442ddbc..4ef9670913 100644 --- a/templates/de/html/admin/admin_list_surfbar_urls_row.tpl +++ b/templates/de/html/admin/admin_list_surfbar_urls_row.tpl @@ -15,7 +15,7 @@ $content[costs] {!POINTS!} - $content[views_total] + $content[views_total] $content[status]