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
--- /dev/null
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 09/11/2008 *
+ * =============== Last change: 09/11/2008 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : tpl-validator.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Only validates templates for correctness *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Validiert Templates auf korrektes HTML *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
+ * For more information visit: http://www.mxchange.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
+ ************************************************************************/
+
+if ($_SERVER['argc'] < 2) {
+ echo "Usage: ".basename(__FILE__)." <template> [--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("<br>", "<br />\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);
+}
+
+?>
--- /dev/null
+#!/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
// 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;
}
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);
global $_CONFIG;
// Do some pre-checks
- if (!IS_LOGGED_IN()) {
+ if (!IS_MEMBER()) {
// Not a member
return false;
} elseif (!VALIDATE_URL($url)) {
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) {
$UIDs = array();
// Do we have a current user id?
- if (IS_LOGGED_IN()) {
+ if (IS_MEMBER()) {
// Then add this as well
$UIDs[] = $GLOBALS['userid'];
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__);
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'])) {
$GLOBALS['userid'] = bigintval($UID);
} else {
// Check for login data
- $login = IS_LOGGED_IN();
+ $login = IS_MEMBER();
}
if ($login) {
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);
} // 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
$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");
}
$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");
}
$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");
}
$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");
}
$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");
}
$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");
}
$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");
}
$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");
}
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
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");
}
$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");
}
$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");
}
$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");
}
$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");
}
$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");
}
$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");
}
$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");
}
$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");
}
$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");
}
$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");
}
$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");
}
$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");
}
$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");
}
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");
}
$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");
}
$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");
}
$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");
}
$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");
}
// 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())) {
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");
}
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())) {
$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");
}
$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");
}
$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");
}
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");
}
$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");
}
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")) {
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")) {
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");
}
$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");
}
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");
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");
$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");
}
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())) {
} 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'])) {
// 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())) {
}
}
//
-function IS_LOGGED_IN()
+function IS_MEMBER()
{
global $status, $LAST;
if (!is_array($LAST)) $LAST = array();
$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__);
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'];
$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
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__);
// 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")) {
$content[costs] {!POINTS!}
</TD>
<TD align="center" class="bottom2 right2 switch_sw$content[sw]">
- $content[views_total]
+ <a href="{!URL!}/modules.php?module=admin&what=surfbar_stats&url_id=$content[id]">$content[views_total]</a>
</TD>
<TD align="center" class="bottom2 right2 switch_sw$content[sw]">
$content[status]