return $code;
} // END - if
+ // Start couting
+ $startCompile = explode(' ', microtime());
+
// Init replacement-array with full security characters
$secChars = $GLOBALS['security_chars'];
} // END - foreach
} // END - if
+ // Get timing
+ $compiled = explode(' ', microtime());
+
+ // Add timing
+ $code .= '<!-- Compilation time: ' . ((($compiled[1] + $compiled[0]) - ($startCompile[1] + $startCompile[0])) * 1000). 'ms //-->';
+
// Return compiled code
return $code;
}
return array('', '', '');
} // END - if
- // Compile the script name
- $script = compileCode($script);
-
// Extract host name from script
$host = extractHostnameFromUrl($script);
// Taken from www.php.net eregi() user comments
function isEmailValid ($email) {
- // Compile email
- $email = compileCode($email);
-
// Check first part of email address
$first = '[-a-z0-9!#$%&\'*+/=?^_<{|}~]+(\.[-a-zA-Z0-9!#$%&\'*+/=?^_<{|}~]+)*';
'ADMIN_LOGOUT_DONE' => "Ausloggen aus dem Admin-Bereich abgeschlossen.",
'ADMIN_LOGOUT_FAILED' => "Konnte nicht aus dem Admin-Bereich ausloggen! :-(",
'ADMIN_RELOGIN_LINK' => "Klicken Sie hier, um sich erneut einzuloggen.",
- 'ADMIN_ACTION_404' => "Das aufgerufe Admin-Modul <span class=\"data\">%s</span> ist zwar gültig, konnte aber nicht auf dem Server gefunden werden.",
+ 'ADMIN_ACTION_404' => "Das aufgerufe Admin-Hauptmenü <span class=\"data\">%s</span> ist zwar gültig, konnte aber nicht auf dem Server gefunden werden.",
+ 'ADMIN_WHAT_404' => "Das aufgerufe Admin-Untermenü <span class=\"data\">%s</span> ist zwar gültig, konnte aber nicht auf dem Server gefunden werden.",
'ALREADY_INSTALLED' => "Dieses Script ist bereits auf diesem Server installiert worden Bitte löschen Sie install.php inc/install-inc.php und install.sql von Ihrem Server! (Keine Sorge, Sie können es tun...)",
'ADMIN_MAIN_TITLE' => "Willkommen zum Administrationsbereich",
'YOU_ARE_HERE' => "Sie sind hier:",
if (SQL_NUMROWS($result) > 0) {
// Now let's check
while ($content = SQL_FETCHARRAY($result)) {
- // Compile the type
- $content['type'] = compileCode($content['type']);
-
// Are these points enougth?
if ($points >= $content['min_points']) {
// Prepare content for template
// Default is nothing done
$status = false;
- // Translate URLs for testing
- $url1 = compileCode($urlData['url']);
- $url2 = compileCode($urlData['edit']['url']);
-
// Has the URL or limit changed?
if (true) {
//if (($urlData['views_allowed'] != $urlData['edit']['limit']) || ($url1 != $url2)) {
// Run the query
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_surfbar_urls` SET url='%s', views_allowed=%s, views_max=%s WHERE `id`=%s AND `status`='%s' LIMIT 1",
- array($urlData['url'], $urlData['edit']['limit'], $urlData['edit']['limit'], $urlData['id'], $urlData['status']), __FUNCTION__, __LINE__);
+ array($urlData['url'], $urlData['edit']['limit'], $urlData['edit']['limit'], $urlData['id'], $urlData['status']), __FUNCTION__, __LINE__);
// All fine
$status = true;
- }
+ } // END - if
// Return status
return $status;
// Ok, we finally load the admin action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
+ addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_WHAT_404'), getWhat());
}
// [EOF]
// Ok, we finally load the admin action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
+ addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_WHAT_404'), getWhat());
}
// [EOF]
// Ok, we finally load the admin action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
+ addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_WHAT_404'), getWhat());
}
// [EOF]
loadInclude($inc);
} else {
// "what file" not found
- addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
+ addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_WHAT_404'), getWhat());
}
// [EOF]
// Ok, we finally load the admin action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
+ addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_WHAT_404'), getWhat());
}
// [EOF]
// Ok, we finally load the admin action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
+ addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_WHAT_404'), getWhat());
}
// [EOF]
// Ok, we finally load the admin action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
+ addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_WHAT_404'), getWhat());
}
// [EOF]
// Ok, we finally load the admin action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
+ addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_WHAT_404'), getWhat());
}
// [EOF]
// Ok, we finally load the admin action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
+ addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_WHAT_404'), getWhat());
}
//
// Ok, we finally load the admin action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
+ addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_WHAT_404'), getWhat());
}
// [EOF]
// Ok, we finally load the admin action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
+ addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_WHAT_404'), getWhat());
}
// [EOF]
// Ok, we finally load the admin action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
+ addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_WHAT_404'), getWhat());
}
// [EOF]
// Ok, we finally load the admin action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
+ addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_WHAT_404'), getWhat());
}
// [EOF]
// Ok, we finally load the admin action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
+ addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_WHAT_404'), getWhat());
}
// [EOF]
// Ok, we finally load the admin action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
+ addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_WHAT_404'), getWhat());
}
// [EOF]
// Ok, we finally load the admin action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
+ addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_WHAT_404'), getWhat());
}
// [EOF]
// Ok, we finally load the admin action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
+ addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_WHAT_404'), getWhat());
}
// [EOF]
// Ok, we finally load the admin action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
+ addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_WHAT_404'), getWhat());
}
// [EOF]
// Ok, we finally load the admin action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
+ addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_WHAT_404'), getWhat());
}
// [EOF]
// Ok, we finally load the admin action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
+ addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_WHAT_404'), getWhat());
}
// [EOF]
// Ok, we finally load the admin action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
+ addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_WHAT_404'), getWhat());
}
// [EOF]
// Ok, we finally load the admin action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
+ addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_WHAT_404'), getWhat());
}
// [EOF]
// Ok, we finally load the admin action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
+ addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_WHAT_404'), getWhat());
}
// [EOF]
// Ok, we finally load the admin action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_ACTION_404'), getWhat());
+ addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_WHAT_404'), getWhat());
}
//
// Default admin action is the overview page
$what = 'overview';
} else {
- // Compile out some chars
- $what = compileCode($what, false, false, false);
+ // Secure it
+ $what = secureString($what);
}
// Get action value
// Shall we process this id? It muss not be empty, of course
if (($skip === false) && (!empty($id)) && (!isset($GLOBALS['skip_config'][$id]))) {
- // Save this entry
- $val = compileCode($val);
-
// Translate the value? (comma to dot!)
if ((is_array($translateComma)) && (in_array($id, $translateComma))) {
// Then do it here... :)
// Init output
$OUT = '';
- // Compile out security characters (must be for looking up!)
- $email = compileCode($email);
-
// Look up administator login
$result = SQL_QUERY_ESC("SELECT `id`, `login`, `password` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `email`='%s' LIMIT 1",
array($email), __FUNCTION__, __LINE__);
// By default nothing validates... ;)
$valid = false;
- // Compile the login for lookup
- $login = compileCode($login);
-
// Then try to find that user
$result = SQL_QUERY_ESC("SELECT `id`, `password`, `email` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `login`='%s' LIMIT 1",
- array($login), __FUNCTION__, __LINE__);
+ array($login), __FUNCTION__, __LINE__);
// Is an account here?
if (SQL_NUMROWS($result) == 1) {
$content = SQL_FETCHARRAY($result);
// Generate hash again
- $hashFromData = generateHash(getConfig('URL').':'.$content['id'].':'.$login.':'.$content['password'], substr($content['password'], 10));
+ $hashFromData = generateHash(getConfig('URL') . ':' . $content['id'] . ':' . $login . ':' . $content['password'], substr($content['password'], 10));
// Does both match?
$valid = ($hash == $hashFromData);
if (!empty($eurl)) {
// Ok, run URL...
- $eurl = compileCode($eurl);
switch ($eenc) {
case 'md5':
$fpass = md5($fpass);
// Run SQL command
$result = SQL_QUERY($sql, __FUNCTION__, __LINE__);
+
+ // Should we look for affected rows (only update) or found rows?
if ($updateEntry === true) {
// Check updated/affected rows
$ret = (SQL_AFFECTEDROWS() == 1);