inc/libs/nickname_functions.php -text
inc/libs/optimize_functions.php -text
inc/libs/order_functions.php -text
-inc/libs/output_functions.php -text
inc/libs/payout_functions.php -text
inc/libs/primera_functions.php -text
inc/libs/rallye_functions.php -text
templates/de/emails/admin/admin_autopurge_turbo.tpl -text
templates/de/emails/admin/admin_autopurge_unconfirmed.tpl -text
templates/de/emails/admin/admin_del_surfbar_urls.tpl -text
+templates/de/emails/admin/admin_edit_surfbar_urls.tpl -text
templates/de/emails/admin/admin_holiday_deactivated.tpl -text
templates/de/emails/admin/admin_holiday_request.tpl -text
templates/de/emails/admin/admin_holiday_unlock.tpl -text
templates/de/emails/member/member_contct.tpl -text
templates/de/emails/member/member_del_surfbar_urls.tpl -text
templates/de/emails/member/member_doubler.tpl -text
+templates/de/emails/member/member_edit_surfbar_urls.tpl -text
templates/de/emails/member/member_holiday_activated.tpl -text
templates/de/emails/member/member_holiday_removed.tpl -text
templates/de/emails/member/member_holiday_request.tpl -text
templates/de/html/admin/admin_edit_sponsor_add_points.tpl -text
templates/de/html/admin/admin_edit_sponsor_edit.tpl -text
templates/de/html/admin/admin_edit_sponsor_sub_points.tpl -text
+templates/de/html/admin/admin_edit_surfbar_urls.tpl -text
+templates/de/html/admin/admin_edit_surfbar_urls_row.tpl -text
templates/de/html/admin/admin_edit_user.tpl -text
templates/de/html/admin/admin_email_archiv.tpl -text
templates/de/html/admin/admin_email_archiv_row.tpl -text
define('SERVER_URL', "http://www.mxchange.org");
// This current patch level
-define('CURR_SVN_REVISION', "302");
+define('CURR_SVN_REVISION', "303");
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
if (isBooleanConstantAndTrue('mxchange_installing')) {
// While we are installing ouput other header than while it is installed... :-)
$OUT = "";
- foreach ($FATAL as $key=>$value) {
+ foreach ($FATAL as $key => $value) {
// Prepare content for the template
$content = array(
'key' => ($key + 1),
} elseif (isBooleanConstantAndTrue('mxchange_installed')) {
// Display all runtime fatal errors
$OUT = "";
- foreach ($FATAL as $key=>$value) {
+ foreach ($FATAL as $key => $value) {
// Prepare content for the template
$content = array(
'key' => ($key + 1),
$DATA[10] = $UID;
// Replace variables
- foreach ($REPLACER as $key=>$value)
+ foreach ($REPLACER as $key => $value)
{
if (isset($DATA[$key])) $content = str_replace($value, $DATA[$key], $content);
}
$MAILID = $DATA[11];
// Replace variables
- foreach ($REPLACER as $key=>$value)
+ foreach ($REPLACER as $key => $value)
{
if (isset($DATA[$key])) $content = str_replace($value, $DATA[$key], $content);
}
$tmpl_file = @implode("", @file($file));
$tmpl_file = addslashes($tmpl_file);
- // Compile code
- $tmpl_file = COMPILE_CODE($tmpl_file);
-
// Run code
- $tmpl_file = "\$content=\"".$tmpl_file."\";";
+ $tmpl_file = "\$newContent=\"".COMPILE_CODE($tmpl_file)."\";";
eval($tmpl_file);
- // Replace HTML confirm chars
- $content = html_entity_decode($content);
+ // Replace HTML conform chars
+ $newContent = html_entity_decode($newContent);
} elseif (!empty($template)) {
// Template file not found!
- $content = TEMPLATE_404.": ".$template."<br />
+ $newContent = TEMPLATE_404.": ".$template."<br />
".TEMPLATE_CONTENT."
-<PRE>".print_r($content, true)."</PRE>
+<PRE>".print_r($newContent, true)."</PRE>
".TEMPLATE_DATA."
<PRE>".print_r($DATA, true)."</PRE>
<br /><br />";
// Debug mode not active? Then remove the HTML tags
- if (!DEBUG_MODE) $content = strip_tags($content);
+ if (!DEBUG_MODE) $newContent = strip_tags($newContent);
} else {
// No template name supplied!
- $content = NO_TEMPLATE_SUPPLIED;
+ $newContent = NO_TEMPLATE_SUPPLIED;
}
// Return compiled content
- return COMPILE_CODE($content);
+ return COMPILE_CODE($newContent);
}
//
function MAKE_TIME($H, $M, $S, $stamp) {
if ((count($matches) > 0) && (count($matches[0]) > 0)) {
// Replace all matches
$matchesFound = array();
- foreach ($matches[0] as $key=>$match) {
+ foreach ($matches[0] as $key => $match) {
// Avoid replacing matches multiple times
if (!isset($matchesFound[$match])) {
// Not yet replaced!
$code = str_replace($match, "\".".$match.".\"", $code);
$matchesFound[$match] = 1;
- }
+ } // END - if
// Take all string elements
if (("".bigintval($matches[4][$key])."" != $matches[4][$key]) && (!isset($matchesFound[$key."_".$matches[4][$key]]))) {
// Replace it in the code
- $code = str_replace("[".$matches[4][$key]."]", "['".$matches[4][$key]."']", $code);
+ $newMatch = str_replace("[".$matches[4][$key]."]", "['".$matches[4][$key]."']", $match);
+ $code = str_replace($match, $newMatch, $code);
$matchesFound[$key."_".$matches[4][$key]] = 1;
- }
+ } // END - if
}
}
$dummy = $array;
while ($primary_key < count($a_sort))
{
- foreach ($dummy[$a_sort[$primary_key]] as $key=>$value)
+ foreach ($dummy[$a_sort[$primary_key]] as $key => $value)
{
- foreach ($dummy[$a_sort[$primary_key]] as $key2=>$value2)
+ foreach ($dummy[$a_sort[$primary_key]] as $key2 => $value2)
{
$match = false;
if (!$nums)
if ($match)
{
// We have found two different values, so let's sort whole array
- foreach ($dummy as $sort_key=>$sort_val)
+ foreach ($dummy as $sort_key => $sort_val)
{
$t = $dummy[$sort_key][$key];
$dummy[$sort_key][$key] = $dummy[$sort_key][$key2];
break;
case "month": // Month
- foreach ($MONTH_DESCR as $month=>$descr)
+ foreach ($MONTH_DESCR as $month => $descr)
{
$OUT .= " <OPTION value=\"".$month."\"";
if ($DEFAULT == $month) $OUT .= " selected=\"selected\"";
// Get data array with years/months/weeks/days/...
$data = CREATE_TIME_SELECTIONS($stamp, "", "", "", true);
$ret = "";
- foreach($data as $k=>$v) {
+ foreach($data as $k => $v) {
if ($v > 0) {
// Value is greater than 0 "eval" data to return string
$eval = "\$ret .= \", \".\$v.\" \"._".strtoupper($k).";";
// Do we have a special filter function?
if (!empty($filterFunction)) {
- // Do we have extra parameters here?
- if (!empty($extraValue)) {
- // Put both parameters in one new array by default
- $args = array($value, $extraValue);
-
- // If we have an array simply use it and pre-extend it with our value
- if (is_array($extraValue)) {
- // Make the new args array
- $args = array_merge(array($value), $extraValue);
- } // END - if
-
- // Call the multi-parameter call-back
- $ret = call_user_func_array($filterFunction, $args);
- } else {
- // One parameter call
- $ret = call_user_func($filterFunction, $value);
- }
+ // Does the filter function exist?
+ if (function_exists($filterFunction)) {
+ // Do we have extra parameters here?
+ if (!empty($extraValue)) {
+ // Put both parameters in one new array by default
+ $args = array($value, $extraValue);
+
+ // If we have an array simply use it and pre-extend it with our value
+ if (is_array($extraValue)) {
+ // Make the new args array
+ $args = array_merge(array($value), $extraValue);
+ } // END - if
+
+ // Call the multi-parameter call-back
+ $ret = call_user_func_array($filterFunction, $args);
+ } else {
+ // One parameter call
+ $ret = call_user_func($filterFunction, $value);
+ }
+ } // END - if
} // END - if
// Return the value
$skip = false; $TEST2 = "";
}
}
+// Reverts the german decimal comma into Computer decimal dot
+function REVERT_COMMA ($str) {
+ $float = (float)str_replace(",", ".", $str);
+ return $float;
+}
//
//////////////////////////////////////////////////
// //
if (empty($mysql['prefix'])) $mysql['prefix'] = "mxchange_";
if ((sizeof($FATAL) > 0) || (!empty($FATAL[0]))) {
OUTPUT_HTML("<SPAN class=\"install_fatal\">");
- foreach ($FATAL as $key=>$err) {
+ foreach ($FATAL as $key => $err) {
OUTPUT_HTML(" <STRONG>·</STRONG> ".FATAL_NO.($key + 1).": ".$err."<br />");
}
OUTPUT_HTML("</SPAN><br />");
<TR><TD colspan=\"2\" height=\"21\" class=\"seperator\"> </TD></TR>
<TR>
<TD colspan=\"2\" align=\"center\">");
- foreach ($mysql as $key=>$value) {
+ foreach ($mysql as $key => $value) {
OUTPUT_HTML(" <INPUT type=\"hidden\" name=\"mysql[".$key."]\" value=\"".$value."\">");
}
OUTPUT_HTML(" <INPUT type=\"hidden\" name=\"spath\" value=\"".__SPATH_VALUE."\">
}
define('__FATAL_ERROR_LI', $OUT);
$OUT = "";
- foreach ($mysql as $key=>$value)
+ foreach ($mysql as $key => $value)
{
$OUT .= " <INPUT type=\"hidden\" name=\"mysql[".$key."]\" value=\"".$value."\">\n";
}
define('ADMIN_REFERAL_LEVEL_ZERO_NOTICE', "Die Referal-Ebene 0 ist das Mitglied selber und sollte daher auf 100% stehen. Sie sollte auch nicht geändert oder gelöscht werden! Dann erhalten Ihre Mitglieder keine {!POINTS!} gutgeschrieben.");
define('ADMIN_ALL_ENTRIES_REMOVED', "Alle ausgewählten Einträge sind gelöscht.");
define('ADMIN_SOME_ENTRIES_NOT_DELETED', "Es wurden <u>%s</u> von <u>%s</u> ausgewählten Einträge gelöscht.");
+define('ADMIN_ALL_ENTRIES_EDITED', "Alle ausgewählten Einträge sind geändert.");
+define('ADMIN_SOME_ENTRIES_NOT_EDITED', "Es wurden <u>%s</u> von <u>%s</u> ausgewählten Einträge geändert.");
//
?>
define('ADMIN_SURFBAR_LAST_LOCKED', "Zuletzt gesperrt");
define('ADMIN_SURFBAR_LOCK_REASON', "Sperrgrund");
define('ADMIN_SURFBAR_EDIT_URL', "URL ändern");
+define('ADMIN_SURFBAR_EDIT_URL_NOW', "URL jetzt ändern");
define('ADMIN_SURFBAR_DEL_URL', "URL löschen");
+define('ADMIN_SURFBAR_DEL_URL_NOW', "URLs jetzt entfernen");
define('ADMIN_SURFBAR_UNLOCK_URL', "URL ent-/sperren");
define('ADMIN_SURFBAR_CONFIRM_URL', "URL(s) freigeben");
define('ADMIN_SURFBAR_UNLOCK_DONE', "Freischaltung ausgewählter URL(s) vollständig. :-)");
define('ADMIN_SURFBAR_URL_ADDED', "URL wurde der Surfbar hinzugefügt.");
define('ADMIN_SURFBAR_URL_NOT_ADDED', "URL wurde wegen Fehler nicht hinzugefügt. Ist die URL bereits vorhanden?");
define('ADMIN_SURFBAR_ADD_URL', "URL hinzufügen");
-define('ADMIN_SURFBAR_DEL_URL_NOW', "URLs jetzt entfernen");
// Admin titles
define('ADMIN_SURFBAR_LIST_URLS_TITLE', "URLs in Surfbar aufisten");
define('ADMIN_SURFBAR_DELETE_URLS_TITLE', "URLs aus Surfbar entfernen");
+define('ADMIN_SURFBAR_EDIT_URLS_TITLE', "URLs editieren");
// General member text
define('MEMBER_SURFBAR_URL_ADDED', "URL hinzugefügt und wartet auf Freischaltung.");
// Auto-generated admin subject lines
define('ADMIN_DEL_SURFBAR_URLS_SUBJECT', "URL aus Surfbar entfernt");
+define('ADMIN_EDIT_SURFBAR_URLS_SUBJECT', "URL in Surfbar geändert");
// Subject lines for members
define('MEMBER_SURFBAR_NOTIFY_URL_UNLOCK_SUBJECT', "Ihre URL wurde in die Surfbar aufgenommen");
// Auto-generated member subject lines
define('MEMBER_DEL_SURFBAR_URLS_SUBJECT', "Ihre URL wurde aus der Surfbar entfernt");
+define('MEMBER_EDIT_SURFBAR_URLS_SUBJECT', "Änderung Ihrer URL in der Surfbar");
// URL status
define('SURFBAR_URL_STATUS_CONFIRMED', "Freigegeben");
// Load only from array when there are lines!
if ((isset($cacheArray['admin_acls'])) && (is_array($cacheArray['admin_acls'])) && (count($cacheArray['admin_acls']) > 0)) {
// Load ACL from array
- foreach ($cacheArray['admin_acls']['admin_id'] as $id=>$aid_acls) {
+ foreach ($cacheArray['admin_acls']['admin_id'] as $id => $aid_acls) {
if ($aid == $aid_acls) {
// Okay, one line was found!
if ((!empty($act)) && ($cacheArray['admin_acls']['action_menu'][$id] == $act)) {
// Begin the update
$cacheInstance_UPDATE = "0";
- foreach ($POST['login'] as $id=>$login) {
+ foreach ($POST['login'] as $id => $login) {
// Secure ID number
$id = bigintval($id);
function ADMINS_EDIT_ADMIN_ACCOUNTS ($POST) {
// Begin the edit loop
$SW = 2; $OUT = "";
- foreach ($POST['sel'] as $id=>$sel) {
+ foreach ($POST['sel'] as $id => $sel) {
// Secure ID number
$id = bigintval($id);
if ($accounts > 1) {
// Delete accounts
$SW = 2; $OUT = "";
- foreach ($POST['sel'] as $id=>$sel) {
+ foreach ($POST['sel'] as $id => $sel) {
// Secure ID number
$id = bigintval($id);
function ADMINS_REMOVE_ADMIN_ACCOUNTS ($POST) {
// Begin removal
$cacheInstance_UPDATE = "0";
- foreach ($POST['sel'] as $id=>$del) {
+ foreach ($POST['sel'] as $id => $del) {
// Secure ID number
$id = bigintval($id);
// Flush array to cache file
$fp = fopen($this->cache_inc, 'w');
fwrite($fp, "\$ARRAY = \"".$ARRAY."\";\n");
- foreach ($dummy as $k=>$v)
+ foreach ($dummy as $k => $v)
{
if (is_array($v))
{
// Multi line(s) found
$LINE = "";
- foreach($v as $k2=>$v2)
+ foreach($v as $k2 => $v2)
{
// Put every array element in a row...
$LINE .= "\$data['".$k."'][] = \"".$v2."\";\n";
{
$key = $search_key;
// Key (hopefully) found?
- foreach ($dummy as $a=>$v)
+ foreach ($dummy as $a => $v)
{
// So we can update all entries
if ($a == $search)
// Flush array to cache file
$fp = fopen($this->cache_inc, 'w');
fwrite($fp, "\$dummy = \"".$ARRAY."\";\n");
- foreach ($dummy as $k=>$v)
+ foreach ($dummy as $k => $v)
{
if (is_array($v))
{
// Multi line(s) found
$LINE = "";
- foreach($v as $k2=>$v2)
+ foreach($v as $k2 => $v2)
{
// Put every array element in a row...
$LINE .= "\$data['".$k."'][] = \"".$v2."\";\n";
+++ /dev/null
-<?php
-/************************************************************************
- * MXChange v0.2.1 Start: 01/26/2005 *
- * =============== Last change: 01/26/2005 *
- * *
- * -------------------------------------------------------------------- *
- * File : output_functions.php *
- * -------------------------------------------------------------------- *
- * Short description : Class containing the HTML sub-system *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung : Klasse fuer das HTML-Subsystem *
- * -------------------------------------------------------------------- *
- * *
- * -------------------------------------------------------------------- *
- * 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 *
- ************************************************************************/
-
-// Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
- require($INC);
-}
-// Add HTML to the output stream
-class HTMLParser {
-
-// Initializer
-function HTMLParser() {
-}
-
-// Add HTML-Code to buffer
-function add_html ($HTML, $NEW_LINE = true) {
- global $OUTPUT;
-}
-
-// Compiles HTML code
-function compile_html($code, $simple=false) {
- global $SEC_CHARS;
-
- // Compile constants
- $code = str_replace('{--', '".', str_replace('--}', '."', $code));
-
- // Compile QUOT and other non-HTML codes
- foreach ($SEC_CHARS['to'] as $k=>$from) {
- // Do the reversed thing as in inc/libs/security_functions.php
- $code = str_replace($from, $SEC_CHARS['from'][$k], $code);
- }
-
- // But keep simple quotes for later use
- if ($simple) $code = str_replace("'", '{QUOT}', $code);
-
- // Return compiled code
- return $code;
-}
-
-// Load a template file and return it's content (only it's name; do not use ' or ")
-function get_template ($template, $return=false, $content="")
-{
- // Add more variables which you want to use in your template files
- global $DATA, $ACTION, $WHAT;
- $REFID = bigintval(get_session('refid'));
-
- if ($template == "member_support_form") {
- // Support request of a member
- $result = SQL_QUERY_ESC("SELECT sex, surname, family FROM "._MYSQL_PREFIX."_user_data WHERE userid='%s' LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__);
- list($sex, $surname, $family) = SQL_FETCHROW($result);
- SQL_FREERESULT($result);
- $salut = TRANSLATE_SEX($sex);
- }
-
- // Base directory
- $BASE = sprintf("%stemplates/%s/html/", PATH, GET_LANGUAGE());
- $MODE = "";
-
- // Check for admin/guest/member templates
- if (strpos($template, "admin_") > -1) {
- // Admin template found
- $MODE = "admin/";
- } elseif (strpos($template, "guest_") > -1) {
- // Guest template found
- $MODE = "guest/";
- } elseif (strpos($template, "member_") > -1) {
- // Member template found
- $MODE = "member/";
- } elseif (strpos($template, "install_") > -1) {
- // Installation template found
- $MODE = "install/";
- } elseif (strpos($template, "mailid_") > -1) {
- // Mail confirmation template found
- $MODE = "mailid/";
- }
-
- // Generate file name
- $file = $BASE.$MODE.$template.".tpl";
- if ((!empty($_GET['what'])) && ((strpos($template, "_header") > 0) || (strpos($template, "_footer") > 0)) && (($MODE == "guest/") || ($MODE == "member/") || ($MODE == "admin/"))) {
- // Select what depended header/footer template file for admin/guest/member area
- $file2 = sprintf("%s%s%s_%s.tpl", $BASE, $MODE, $template, SQL_ESCAPE($_GET['what']));
-
- // Probe for it...
- if (FILE_READABLE($file2)) $file = $file2;
-
- // Remove variable from memory
- unset($file2);
- } // END - if
-
- // Does the special template exists?
- if (!FILE_READABLE($file)) {
- // Reset to default template
- $file = sprintf("%stemplates/%s/html/%s.tpl", PATH, GET_LANGUAGE(), $template);
- } // END - if
-
- // Now does the final template exists?
- if (FILE_READABLE($file)) {
- // The local file does exists so we load it. :)
- $tmpl_file = implode("", file($file));
- $tmpl_file = str_replace("'", '{QUOT}', $tmpl_file);
-
- // Compile and run code
- $ret = COMPILE_CODE(addslashes($tmpl_file), false, true);
- $ret = "<!-- Template ".$template." - Start -->\n".$ret."<!-- Template ".$template." - End -->\n";
- } elseif (IS_ADMIN()) {
- // Only admins shall see this warning
- $ret = "<br /><SPAN class=\"guest_failed\">".TEMPLATE_404."</SPAN><br />
-(".basename($file).")
-<br /><br />";
- }
-
- if ($return) {
- // Return the HTML code
- return $ret;
- } else {
- // Output directly
- $this->add_html ($ret);
- }
-}
-
- // END OF CLASS
-}
-
-//
-?>
// Just count...
$TOTAL = 0;
- foreach($prices['uid'] as $key=>$uid)
+ foreach($prices['uid'] as $key => $uid)
{
// Check status
// active = 1: account is still confirmed
array(bigintval($id)), __FILE__, __LINE__);
// Run array through (by uid is the most important 2nd-level-array)
- foreach($prices['uid'] as $key=>$uid)
+ foreach($prices['uid'] as $key => $uid)
{
// Allow valid and active users with at least one ref to get points
if (($uid > 0) && ($prices['ref'][$key] > 0) && ($prices['active'][$key] == 1) && ($prices['cpoints'][$key] > 0))
$prices = RALLYE_LOAD_PRICES_ARRAY($rallye);
// Merge users into prices
- foreach ($prices['level'] as $k=>$lvl)
+ foreach ($prices['level'] as $k => $lvl)
{
$prices['uid'][$k] = $users['uid'][$k];
if (empty($prices['uid'][$k])) $prices['uid'][$k] = "---";
{
// Get refs from cache
$cnt = 0;
- foreach ($cacheArray['ref_system']['userid'] as $id=>$u_id)
+ foreach ($cacheArray['ref_system']['userid'] as $id => $u_id)
{
if (($u_id == $uid) && ($cacheArray['ref_system']['level'][$id] == 0))
{
function REGISTER_CHECK_REQUIRED_FIELDS(&$array)
{
$ret = false;
- foreach ($array as $key=>$value)
+ foreach ($array as $key => $value)
{
$result = SQL_QUERY("SELECT field_required FROM "._MYSQL_PREFIX."_must_register WHERE field_name='".$key."' LIMIT 1", __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1)
}
// Replace all array elements through
- foreach ($REPLACE['search'] as $k=>$v)
+ foreach ($REPLACE['search'] as $k => $v)
{
if (eregi("$v=", $test))
{
// Overworked security part:
if (is_array($_GET)) {
- foreach ($_GET as $seckey=>$secvalue) {
+ foreach ($_GET as $seckey => $secvalue) {
if (is_array($secvalue)) {
// Throw arrays away...
unset($_GET[$seckey]);
} else {
// Only variables are allowed (non-array) but we secure them all!
- foreach ($SEC_CHARS['from'] as $key=>$char) {
+ foreach ($SEC_CHARS['from'] as $key => $char) {
// Pass all through
$_GET[$seckey] = str_replace($char , $SEC_CHARS['to'][$key], $_GET[$seckey]);
}
if (basename($_SERVER['PHP_SELF']) != "install.php") {
// And POST data
- foreach ($_POST as $seckey=>$secvalue) {
+ foreach ($_POST as $seckey => $secvalue) {
if (!is_array($secvalue)) {
// Only variables are allowed (non-array) to be secured...
- foreach ($SEC_CHARS['from'] as $key=>$char) {
+ foreach ($SEC_CHARS['from'] as $key => $char) {
// Pass all through
$_POST[$seckey] = str_replace($char , $SEC_CHARS['to'][$key], $_POST[$seckey]);
}
}
// ... and finally cookies
- foreach ($_COOKIE as $seckey=>$secvalue) {
+ foreach ($_COOKIE as $seckey => $secvalue) {
if (is_array($secvalue)) {
// Throw arrays away...
unset($_COOKIE[$seckey]);
} else {
// Only variables are allowed (non-array) but we secure them all!
- foreach ($SEC_CHARS['from'] as $key=>$char) {
+ foreach ($SEC_CHARS['from'] as $key => $char) {
// Pass all through
$_COOKIE[$seckey] = str_replace($char , $SEC_CHARS['to'][$key], $_COOKIE[$seckey]);
}
);
// Check if sponsor already exists
- foreach ($POST as $k=>$v)
+ foreach ($POST as $k => $v)
{
if (!(array_search($k, $SKIPPED) > -1))
{
{
// Update his data
$SQL = "UPDATE "._MYSQL_PREFIX."_sponsor_data SET ";
- foreach ($DATA['keys'] as $k=>$v)
+ foreach ($DATA['keys'] as $k => $v)
{
$SQL .= $v."='%s', ";
}
{
// Add all data as hidden data
$OUT = "";
- foreach ($POST as $k=>$v)
+ foreach ($POST as $k => $v)
{
// Do not add 'force' !
if ($k != "force")
$MSG = SPONSOR_ACCOUNT_DATA_NOT_SAVED;
// Check for submitted passwords
- if ((!empty($HTTP_POST_VARS['pass1'])) && (!empty($HTTP_POST_VARS['pass2'])))
+ if ((!empty($_POST['pass1'])) && (!empty($_POST['pass2'])))
{
// Are both passwords the same?
- if ($HTTP_POST_VARS['pass1'] == $HTTP_POST_VARS['pass2'])
+ if ($_POST['pass1'] == $_POST['pass2'])
{
// Okay, then set password and remove pass1 and pass2
- $HTTP_POST_VARS['password'] = md5($HTTP_POST_VARS['pass1']);
+ $_POST['password'] = md5($_POST['pass1']);
}
}
// Prepare SQL string
$SQL = "UPDATE "._MYSQL_PREFIX."_sponsor_data SET";
- foreach ($POST as $key=>$value)
+ foreach ($POST as $key => $value)
{
// Mmmmm, too less security here???
$SQL .= " ".strip_tags($key)."='%s',";
function TASK_CREATE_EXTRA_ROWS($SQLs, $WHATs, $DESCRs, $TITLEs){
// Init
$OUT = ""; $SW = 2; $MAX = sizeof($SQLs) - 1;
- foreach ($SQLs as $key=>$sql) {
+ foreach ($SQLs as $key => $sql) {
// Run SQL command, get line numbers and free memory
$result = SQL_QUERY($sql, __FILE__, __LINE__);
$value = SQL_NUMROWS($result);
$list['nickname'] = NICKNAME;
}
- foreach ($list as $sort=>$title) {
+ foreach ($list as $sort => $title) {
if ($sortby == $sort) {
$OUT .= "<STRONG>".$title."</STRONG> | ";
} else {
//* DEBUG: */ print_r($cacheArray['admins']);
// The cache file seems to be fine
- foreach ($cacheArray['admins']['login'] as $k=>$login) {
+ foreach ($cacheArray['admins']['login'] as $k => $login) {
// Rewrite default_acl
$cacheArray['admins']['aid'][$login] = $cacheArray['admins']['aid'][$k];
$cacheArray['admins']['password'][$login] = $cacheArray['admins']['password'][$k];
//* DEBUG: */ print_r($cacheArray['admins']);
// Rewrite Login
- foreach ($cacheArray['admins']['login'] as $k=>$login) {
+ foreach ($cacheArray['admins']['login'] as $k => $login) {
$cacheArray['admins']['login'][$cacheArray['admins']['aid'][$login]] = $login;
if (!in_array($k, $cacheArray['admins']['aid'])) {
unset($cacheArray['admins']['login'][$k]);
// Valid cache file
$CNT = 0;
- foreach ($cacheArray['admin_acls'] as $k=>$array) {
+ foreach ($cacheArray['admin_acls'] as $k => $array) {
$CNT += count($array);
}
// Valid cache file
$CNT = 0; $newCache = array();
- foreach ($cacheArrayConfig as $key=>$array) {
- foreach ($array as $key2=>$value) {
+ foreach ($cacheArrayConfig as $key => $array) {
+ foreach ($array as $key2 => $value) {
$newCache[$key2][$key] = $value;
}
$CNT += count($array);
// Valid cache file
$CNT = 0;
- foreach ($cacheArray['modules'] as $k=>$array) {
+ foreach ($cacheArray['modules'] as $k => $array) {
$CNT += count($array);
}
} else {
// Rewrite module cache
$modArray = $cacheArray['modules'];
- foreach ($modArray['module'] as $key=>$mod) {
+ foreach ($modArray['module'] as $key => $mod) {
$cacheArray['modules']['id'][$mod] = $modArray['id'][$key];
unset($cacheArray['modules']['id'][$key]);
$cacheArray['modules']['title'][$mod] = $modArray['title'][$key];
// Valid cache file
$CNT = 0;
- foreach ($cacheArray['ref_depths'] as $k=>$array) {
+ foreach ($cacheArray['ref_depths'] as $k => $array) {
$CNT += count($array);
}
// Valid cache file
$CNT = 0;
- foreach ($cacheArray['admin_acls'] as $k=>$array) {
+ foreach ($cacheArray['admin_acls'] as $k => $array) {
$CNT += count($array);
}
// Valid cache file
$CNT = 0;
- foreach ($cacheArray['ref_system'] as $k=>$array) {
+ foreach ($cacheArray['ref_system'] as $k => $array) {
$CNT += count($array);
}
// Load extension data from cache file
$EXT_DUMMY = $cacheInstance->cache_load();
$EXT_NAMES = array();
- foreach ($EXT_DUMMY['ext_name'] as $k=>$name) {
+ foreach ($EXT_DUMMY['ext_name'] as $k => $name) {
// Load functions file
if ($EXT_DUMMY['ext_funcs'][$k] == "Y") {
require_once(PATH."inc/libs/".$name."_functions.php");
$cnt = 0; $newStatus = "Y";
if ((is_array($IDs)) && (count($IDs) > 0)) {
// "Walk" all through and count them
- foreach ($IDs as $id=>$selected) {
+ foreach ($IDs as $id => $selected) {
// Secure the ID number
$id = bigintval($id);
if ((is_array($IDs)) && (count($IDs) > 0) && (count($columns) == count($filterFunctions)) && (count($columns) == count($extraValues))) {
// Shall we change here or list for editing?
if ($editNow) {
- // Change them
- die("EDIT!");
+ // Change them all
+ $affected = 0;
+ foreach ($IDs as $id => $sel) {
+ // Prepare content array (new values)
+ $content = array();
+
+ // Prepare SQL for this row
+ $SQL = "UPDATE "._MYSQL_PREFIX."_".$table." SET";
+ foreach ($_POST as $key => $entries) {
+ // Skip raw userid which is always invalid
+ if ($key == "uid_raw") {
+ // Continue with next field
+ continue;
+ } // END - if
+
+ // Is entries an array?
+ if (($key != $idColumn) && (is_array($entries)) && (isset($entries[$id]))) {
+ // Add this entry to content
+ $content[$key] = $entries[$id];
+
+ // Send data through the filter function if found
+ if ((isset($filterFunctions[$key])) && (isset($extraValues[$key]))) {
+ // Filter function set!
+ $entries[$id] = HANDLE_EXTRA_VALUES($filterFunctions[$key], $entries[$id], $extraValues[$key]);
+ } // END - if
+
+ // Then add this value
+ $SQL .= sprintf(" %s='%s',",
+ SQL_ESCAPE($key),
+ SQL_ESCAPE($entries[$id])
+ );
+ } elseif (($key != $idColumn) && (!is_array($entries))) {
+ // Add normal entries as well!
+ $content[$key] = $entries;
+ }
+
+ // Do we have an URL?
+ if ($key == "url") {
+ // Then add a framekiller test as well
+ $content['frametester'] = FRAMETESTER($content[$key]);
+ } // END - if
+ }
+ $SQL = substr($SQL, 0, -1) . " WHERE ".$idColumn."=".$id." LIMIT 1";
+
+ // Run this query
+ SQL_QUERY($SQL, __FILE__, __LINE__);
+
+ // Add affected rows
+ $affected += SQL_AFFECTEDROWS();
+
+ // Load all data from that id
+ $result = SQL_QUERY_ESC("SELECT * FROM "._MYSQL_PREFIX."_%s WHERE %s=%s LIMIT 1",
+ array($table, $idColumn, $id), __FILE__, __LINE__);
+
+ // Fetch the data
+ global $DATA;
+ $DATA = SQL_FETCHARRAY($result);
+
+ // Free the result
+ SQL_FREERESULT($result);
+
+ // Is a raw user id set?
+ if ((isset($_POST['uid_raw'][$id])) && ($_POST['uid_raw'][$id] > 0)) {
+ // Generate subject
+ $eval = "\$subject = MEMBER_EDIT_".strtoupper($table)."_SUBJECT;";
+ eval($eval);
+
+ // Load email template
+ $mail = LOAD_EMAIL_TEMPLATE("member_edit_".$table, $content);
+
+ // Send email out
+ SEND_EMAIL($_POST['uid_raw'][$id], $subject, $mail);
+ } // END - if
+
+ // Generate subject
+ $eval = "\$subject = ADMIN_EDIT_".strtoupper($table)."_SUBJECT;";
+ eval($eval);
+
+ // Send admin notification out
+ SEND_ADMIN_NOTIFICATION($subject, "admin_edit_".$table, $content, $_POST['uid_raw'][$id]);
+ } // END - foreach
+
+ // Was this fine?
+ if ($affected == count($IDs)) {
+ // All deleted
+ LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_ALL_ENTRIES_EDITED);
+ } else {
+ // Some are still there :(
+ LOAD_TEMPLATE("admin_settings_saved", false, sprintf(ADMIN_SOME_ENTRIES_NOT_EDITED, $affected, count($IDs)));
+ }
} else {
// List for editing
ADMIN_BUILD_LIST("edit", $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn);
if ((isset($_POST['assign'])) && (count($_POST['task']) > 0)) {
// Assign / do tasks
$OUT = ""; $SW = 2;
- foreach ($_POST['task'] as $id=>$sel) {
+ foreach ($_POST['task'] as $id => $sel) {
$result_task = SQL_QUERY_ESC("SELECT id, userid, task_type, subject, text, task_created, status, assigned_admin FROM "._MYSQL_PREFIX."_task_system WHERE id=%s AND (assigned_admin='%s' OR (assigned_admin='0' AND status='NEW')) LIMIT 1",
array(bigintval($id), GET_ADMIN_ID(get_session('admin_login'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result_task) == 1) {
if (!empty($_POST['unassign']))
{
// Unassign from tasks
- foreach ($_POST['task'] as $id=>$sel)
+ foreach ($_POST['task'] as $id => $sel)
{
$result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_task_system SET assigned_admin=0 WHERE id=%s AND assigned_admin=%s LIMIT 1",
array(bigintval($id), GET_ADMIN_ID(get_session('admin_login'))), __FILE__, __LINE__);
elseif (isset($_POST['del']))
{
// Delete tasks
- foreach ($_POST['task'] as $id=>$sel)
+ foreach ($_POST['task'] as $id => $sel)
{
$result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_task_system WHERE id=%s AND assigned_admin IN (%s,0) LIMIT 1",
array(bigintval($id), GET_ADMIN_ID(get_session('admin_login'))), __FILE__, __LINE__);
// Remove double eintries
$prev = ""; $dmy = $menus; $dmy2 = $titles; $dmy3 = $below;
- foreach ($menus as $key=>$value)
+ foreach ($menus as $key => $value)
{
if ($value == $prev)
{
}
$menus = $dmy; $titles = $dmy2; $below = $dmy3;
// Load sub menus :)
- foreach ($menus as $key_main=>$value_main)
+ foreach ($menus as $key_main => $value_main)
{
$result = SQL_QUERY_ESC("SELECT what, title, sort FROM "._MYSQL_PREFIX."_admin_menu WHERE action='%s' AND what != '' ORDER BY sort",
array($value_main), __FILE__, __LINE__);
// Remove double eintries
$prev = ""; $dmy = $menus[$value_main]; $dmy2 = $titles[$value_main]; $dmy3 = $below[$value_main];
- foreach ($menus[$value_main] as $key=>$value)
+ foreach ($menus[$value_main] as $key => $value)
{
if ($value == $prev)
{
}
$OUT = " <SELECT class=\"admin_select\" name=\"sort\" size=\"1\">
<OPTION value=\"0\">".IS_FIRST_MENU."</OPTION>\n";
- foreach ($below as $key=>$m)
+ foreach ($below as $key => $m)
{
if (is_array($m))
{
- foreach ($m as $key2=>$m2)
+ foreach ($m as $key2 => $m2)
{
$OUT .= " <OPTION value=\"".$m2."\">".$titles[$key][$key2];
- foreach ($menus as $k=>$v)
+ foreach ($menus as $k => $v)
{
if (($v == $key) && (!is_array($v)))
{
define('__SUB_VALUE', $SUB);
define('__CHK_VALUE', $chk);
$cnt = 0; $SW = 2;
- foreach ($_POST['sel'] as $sel=>$confirm)
+ foreach ($_POST['sel'] as $sel => $confirm)
{
if ($confirm == 1)
{
define('__CHK_VALUE', $chk);
// Del menu entries with or without confirmation
$SW = 2; $cnt = 0; $OUT = "";
- foreach ($_POST['sel'] as $sel=>$confirm)
+ foreach ($_POST['sel'] as $sel => $confirm)
{
if ($confirm == 1)
{
switch ($_POST['ok'])
{
case "edit": // Edit menu
- foreach ($_POST['sel'] as $sel=>$menu)
+ foreach ($_POST['sel'] as $sel => $menu)
{
// Secure ID
$sel = bigintval($sel);
break;
case "del": // Delete menu
- foreach ($_POST['sel'] as $sel=>$menu)
+ foreach ($_POST['sel'] as $sel => $menu)
{
$result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE ".$AND." AND id=%s LIMIT 1",
array(bigintval($sel)), __FILE__, __LINE__);
// Add option for userlog
$cacheArray['admins'] = ADD_OPTION_LINES("admins", "id", "login", "", "email");
$SW = 2; $rowNameS = "";
- foreach ($_POST['sel'] as $template=>$sel)
+ foreach ($_POST['sel'] as $template => $sel)
{
// First of all load data from DB
$result = SQL_QUERY_ESC("SELECT admin_id, id FROM "._MYSQL_PREFIX."_admins_mails WHERE mail_template='%s' ORDER BY id",
if (isset($_POST['change']))
{
// Ok, update database
- foreach ($_POST['admin_id'] as $id=>$aid)
+ foreach ($_POST['admin_id'] as $id => $aid)
{
// Secure IDs
$id = bigintval($id);
{
// Edit ACLs
$SW = 2; $OUT = "";
- foreach ($_POST['sel'] as $id=>$sel)
+ foreach ($_POST['sel'] as $id => $sel)
{
// Load data for the ID
$result = SQL_QUERY_ESC("SELECT admin_id, action_menu, what_menu, access_mode FROM "._MYSQL_PREFIX."_admins_acls WHERE id=%s LIMIT 1",
elseif ((isset($_POST['change'])) && ($SEL > 0))
{
// Change entries
- foreach ($_POST['sel'] as $id=>$sel)
+ foreach ($_POST['sel'] as $id => $sel)
{
// Secure ID
$id = bigintval($id);
{
// Delete ACLs
$SW = 2; $OUT = "";
- foreach ($_POST['sel'] as $id=>$sel)
+ foreach ($_POST['sel'] as $id => $sel)
{
// Load data for the ID
$result = SQL_QUERY_ESC("SELECT admin_id, action_menu, what_menu, access_mode FROM "._MYSQL_PREFIX."_admins_acls WHERE id=%s LIMIT 1",
elseif ((isset($_POST['remove'])) && ($SEL > 0))
{
// Remove entries
- foreach ($_POST['sel'] as $id=>$sel)
+ foreach ($_POST['sel'] as $id => $sel)
{
$result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admins_acls WHERE id=%s LIMIT 1",
array(bigintval($id)),__FILE__, __LINE__);
// Generate list
$OUT = "<OL start=\"2\">\n";
- foreach ($RANKS as $k=>$rate) {
+ foreach ($RANKS as $k => $rate) {
if (!empty($rate)) {
// Print only when something is in
$OUT .= " <LI><INPUT type=\"text\" name=\"rate[".($k + 2)."]\" class=\"admin_normal\" size=\"4\" maxlength=\"7\" value=\"".$rate."\"> <FONT class=\"admin_notes\">(".POINTS.")</FONT?</LI>\n";
} elseif ((isset($_POST['ok'])) && (isset($_POST['id'])) && (is_array($_POST['id']))) {
// Change or delete categories...
$TEXT = "";
- foreach ($_POST['id'] as $id=>$cat) {
+ foreach ($_POST['id'] as $id => $cat) {
// Secure ID
$id = bigintval($id);
{
// Delete categories
$SW = 2; $OUT = "";
- foreach ($_POST['sel'] as $id=>$value)
+ foreach ($_POST['sel'] as $id => $value)
{
// Load data of category
$result = SQL_QUERY_ESC("SELECT cat FROM "._MYSQL_PREFIX."_cats WHERE id=%s LIMIT 1",
} elseif ((isset($_POST['edit'])) && ((SELECTION_COUNT($_POST['sel']) > 0) || (isset($_POST['sel'][0])))) {
// Edit categories
$SW = 2; $OUT = "";
- foreach ($_POST['sel'] as $id=>$value)
+ foreach ($_POST['sel'] as $id => $value)
{
// Load data from the category
$result = SQL_QUERY_ESC("SELECT cat, visible, sort FROM "._MYSQL_PREFIX."_cats WHERE id=%s LIMIT 1",
} elseif ((isset($_POST['ok'])) && (isset($_GET['do']))) {
// Change or delete entries...
$TEXT = "";
- foreach ($_POST['id'] as $id=>$value) {
+ foreach ($_POST['id'] as $id => $value) {
// Secure ID
$id = bigintval($id);
} elseif ((isset($_POST['del'])) && ((SELECTION_COUNT($_POST['sel']) > 0) || (isset($_POST['sel'][0])))) {
// Delete entries
$SW = 2; $OUT = "";
- foreach ($_POST['sel'] as $id=>$value)
+ foreach ($_POST['sel'] as $id => $value)
{
// Load data
$result = SQL_QUERY_ESC("SELECT value, comment FROM "._MYSQL_PREFIX."_max_receive WHERE id=%s LIMIT 1",
} elseif ((isset($_POST['edit'])) && ((SELECTION_COUNT($_POST['sel']) > 0) || (isset($_POST['sel'][0])))) {
// Edit entries
$SW = 2; $OUT = "";
- foreach ($_POST['sel'] as $id=>$value) {
+ foreach ($_POST['sel'] as $id => $value) {
// Load data
$result = SQL_QUERY_ESC("SELECT value, comment FROM "._MYSQL_PREFIX."_max_receive WHERE id=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
$OUT = ""; $SW = 2;
// Edit selected modules
- foreach ($_POST['sel'] as $id=>$sel)
+ foreach ($_POST['sel'] as $id => $sel)
{
// Load module data
$result = SQL_QUERY_ESC("SELECT module, title, locked, hidden, admin_only, mem_only FROM "._MYSQL_PREFIX."_mod_reg WHERE id=%s LIMIT 1",
elseif (isset($_POST['change']))
{
// Change modules
- foreach ($_POST['sel'] as $id=>$sel)
+ foreach ($_POST['sel'] as $id => $sel)
{
// Secure ID number
$id = bigintval($id);
if ((isset($_GET['ok'])) && ($_GET['ok'] == "ok"))
{
// Edit entries
- foreach ($_POST['sel'] as $id=>$sel)
+ foreach ($_POST['sel'] as $id => $sel)
{
// Secure ID
$id = bigintval($id);
{
$display = false; //Suppress any other outputs
$SW = 2; $OUT = "";
- foreach ($_POST['sel'] as $id=>$sel)
+ foreach ($_POST['sel'] as $id => $sel)
{
// Load data
$result = SQL_QUERY_ESC("SELECT type, rate, min_points, allow_url FROM "._MYSQL_PREFIX."_payout_types WHERE id=%s LIMIT 1",
if ($_GET['ok'] == "ok")
{
// Delete entries
- foreach ($_POST['sel'] as $id=>$sel)
+ foreach ($_POST['sel'] as $id => $sel)
{
$result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_payout_types WHERE id=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
{
$display = false; //Suppress any other outputs
$SW = 2; $OUT = "";
- foreach ($_POST['sel'] as $id=>$sel)
+ foreach ($_POST['sel'] as $id => $sel)
{
// Secure ID number
$id = bigintval($id);
break;
case "edit": // Change entries
- foreach ($_POST['lvl'] as $id=>$value)
+ foreach ($_POST['lvl'] as $id => $value)
{
// Secure ID
$id = bigintval($id);
break;
case "del":
- foreach ($_POST['id'] as $id=>$value)
+ foreach ($_POST['id'] as $id => $value)
{
$result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_refdepths WHERE id=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
{
// Delete entries
$SW = 2; $OUT = "";
- foreach ($_POST['sel'] as $id=>$value)
+ foreach ($_POST['sel'] as $id => $value)
{
$result = SQL_QUERY_ESC("SELECT level, percents FROM "._MYSQL_PREFIX."_refdepths WHERE id=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
{
// Edit entries
$SW = 2; $OUT = "";
- foreach ($_POST['sel'] as $id=>$value)
+ foreach ($_POST['sel'] as $id => $value)
{
$result = SQL_QUERY_ESC("SELECT level, percents FROM "._MYSQL_PREFIX."_refdepths WHERE id=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
if ($SEL > 0)
{
// Delete selected entries
- foreach ($_POST['sel'] as $id=>$sel)
+ foreach ($_POST['sel'] as $id => $sel)
{
$result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_prices WHERE id=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
elseif (isset($_POST['change']))
{
// Change entries
- foreach ($_POST['level'] as $id=>$level)
+ foreach ($_POST['level'] as $id => $level)
{
// Secure ID
$id = bigintval($id);
{
// Make selected editable
$SW = 2; $OUT = "";
- foreach ($_POST['sel'] as $id=>$sel)
+ foreach ($_POST['sel'] as $id => $sel)
{
// Load data to selected rallye
$result = SQL_QUERY_ESC("SELECT rallye_id, price_level, points, info FROM "._MYSQL_PREFIX."_rallye_prices WHERE id=%s LIMIT 1",
{
// List all prices
$SW = 2; $OUT = "";
- foreach ($_POST['sel'] as $id=>$sel)
+ foreach ($_POST['sel'] as $id => $sel)
{
// Load data to selected rallye
$result = SQL_QUERY_ESC("SELECT rallye_id, price_level, points, info FROM "._MYSQL_PREFIX."_rallye_prices WHERE id=%s LIMIT 1",
// Do we want to save changes?
if (isset($_POST['ok']))
{
- foreach ($_POST['sel'] as $id=>$value)
+ foreach ($_POST['sel'] as $id => $value)
{
$result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_must_register SET field_required='%s' WHERE id=%s AND field_required != '%s' LIMIT 1",
array($value, bigintval($id), $value),__FILE__, __LINE__);
{
// Generate string
$MODs = array();
- foreach ($_POST['mod'] as $mod=>$sel)
+ foreach ($_POST['mod'] as $mod => $sel)
{
// Now you can never deselect the admin module, bah!!! ;-)
if (($sel == "Y") || ($mod == "admin"))
{
// Delete multiple holiday requests (for list_holiday)
$cnt = 0;
- foreach ($_POST['sel'] as $id=>$sel)
+ foreach ($_POST['sel'] as $id => $sel)
{
// Get the userid
$result = SQL_QUERY_ESC("SELECT userid, holiday_start, holiday_end
if ($SEL > 0)
{
// Delete entries...
- foreach ($_POST['sel'] as $id=>$sel)
+ foreach ($_POST['sel'] as $id => $sel)
{
$result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_transfers_in WHERE trans_id=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
// The ID comes from task management and it is - of course - *not* the extension's name!
} elseif ((isset($_POST['change'])) && ($SEL > 0) && (!IS_DEMO())) {
// De-/activate extensions
- foreach ($_POST['sel'] as $id=>$active) {
+ foreach ($_POST['sel'] as $id => $active) {
// Shall we keep the extension always active?
if ((isset($cacheArray['active_extensions'][GET_EXT_NAME($id)])) && ($cacheArray['active_extensions'][GET_EXT_NAME($id)] == "Y") && ($active == "N")) {
// Keep this extension active!
if (isset($_POST['modify'])) {
// Change entries
$cacheInstance_UPDATE = "0";
- foreach ($_POST['sel'] as $id=>$sel) {
+ foreach ($_POST['sel'] as $id => $sel) {
// Secure ID
$id = bigintval($id);
} else {
// Edit selected entries
$SW = "2"; $OUT = "";
- foreach ($_POST['sel'] as $id=>$sel) {
+ foreach ($_POST['sel'] as $id => $sel) {
// Edit this extension?
if (($sel == "Y") || ($sel == "N")) {
// Load required data
} elseif ((isset($_POST['delete'])) && ($SEL > 0) && (!IS_DEMO())) {
// List extensions and when verbose is enabled SQL statements which will be executed
$SW = 2; $OUT = "";
- foreach ($_POST['sel'] as $id=>$sel) {
+ foreach ($_POST['sel'] as $id => $sel) {
// Init variables
$VERBOSE_OUT = ""; $SQLs = array();
} elseif ((isset($_POST['remove'])) && ($SEL > 0) && (!IS_DEMO())) {
// Remove extensions from DB (you have to delete all files manually!)
$cacheInstance_UPDATE = "0";
- foreach ($_POST['sel'] as $id=>$active) {
+ foreach ($_POST['sel'] as $id => $active) {
// Secure ID number
$id = bigintval($id);
// Get count of extensions for validation
$count = trim($response[sizeof($response) - 2]);
- foreach ($response as $id=>$value)
+ foreach ($response as $id => $value)
{
$value = str_replace("\n", "", $value); $ver = "";
// Leave loop when data is invalid or EOF?
$INFO = ADMIN_EXT_NO_INFO_FOUND;
// Trim every data line
- foreach ($LANG_DUMMY as $k=>$v)
+ foreach ($LANG_DUMMY as $k => $v)
{
$v = trim($v);
if (substr($v, 3) == "") $v = "---";
// Extensions where found which are not downloaded and installed
$SW = 2; $OUT = ""; $TSIZE = 0;
- foreach ($EXT_SEARCH['fname'] as $id=>$name)
+ foreach ($EXT_SEARCH['fname'] as $id => $name)
{
// Generate download link
$LINK = SERVER_URL."/extensions/ext-".$name.".zip";
// Remove double eintries
$prev = ""; $dmy = $menus; $dmy2 = $titles; $dmy3 = $below;
- foreach ($menus as $key=>$value)
+ foreach ($menus as $key => $value)
{
if ($value == $prev)
{
}
$menus = $dmy; $titles = $dmy2; $below = $dmy3;
// Load sub menus :)
- foreach ($menus as $key_main=>$value_main)
+ foreach ($menus as $key_main => $value_main)
{
$result = SQL_QUERY_ESC("SELECT what, title, sort
FROM "._MYSQL_PREFIX."_guest_menu
// Remove double eintries
$prev = ""; $dmy = $menus[$value_main]; $dmy2 = $titles[$value_main]; $dmy3 = $below[$value_main];
- foreach ($menus[$value_main] as $key=>$value)
+ foreach ($menus[$value_main] as $key => $value)
{
if ($value == $prev)
{
$OUT = " <SELECT class=\"admin_select\" name=\"sort\" size=\"1\">
<OPTION value=\"0\">".IS_FIRST_MENU."</OPTION>";
- foreach ($below as $key=>$m)
+ foreach ($below as $key => $m)
{
if (is_array($m))
{
- foreach ($m as $key2=>$m2)
+ foreach ($m as $key2 => $m2)
{
$OUT .= " <OPTION value=\"".$m2."\">".$titles[$key][$key2];
- foreach ($menus as $k=>$v)
+ foreach ($menus as $k => $v)
{
if (($v == $key) && (!is_array($v)))
{
define('__CHK_VALUE', $chk);
$cnt = 0; $SW = 2; $OUT = "";
- foreach ($_POST['sel'] as $sel=>$confirm)
+ foreach ($_POST['sel'] as $sel => $confirm)
{
if ($confirm == 1)
{
define('__CHK_VALUE', $chk);
$cnt = 0; $OUT = ""; $SW = 2;
- foreach ($_POST['sel'] as $sel=>$confirm)
+ foreach ($_POST['sel'] as $sel => $confirm)
{
if ($confirm == 1)
{
switch ($_POST['ok'])
{
case "edit": // Edit menu
- foreach ($_POST['sel'] as $sel=>$menu)
+ foreach ($_POST['sel'] as $sel => $menu)
{
// Secure selector
$sel = bigintval($sel);
break;
case "del": // Delete menu
- foreach ($_POST['sel'] as $sel=>$menu)
+ foreach ($_POST['sel'] as $sel => $menu)
{
// Delete enty
$query = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_guest_menu WHERE ".$AND." AND id=%s LIMIT 1",
break;
case "status": // Change access levels
- foreach ($_POST['sel'] as $sel=>$menu)
+ foreach ($_POST['sel'] as $sel => $menu)
{
// Secure selector
$sel = bigintval($sel);
// Load template
$SW = 2; $cnt = 0; $OUT = "";
- foreach ($_POST['sel'] as $sel=>$confirm)
+ foreach ($_POST['sel'] as $sel => $confirm)
{
if ($confirm == 1)
{
// Edit all selected country codes
$OUT = ""; $SW = 2;
- foreach ($_POST['id'] as $id=>$status)
+ foreach ($_POST['id'] as $id => $status)
{
// Load data from DB
$result = SQL_QUERY_ESC("SELECT code, descr FROM "._MYSQL_PREFIX."_countries WHERE id=%s LIMIT 1",
if ((isset($_POST['modify'])) && (!empty($_POST['id'])))
{
// Modify
- foreach ($_POST['id'] as $id=>$sel)
+ foreach ($_POST['id'] as $id => $sel)
{
$SQLs[] = "UPDATE "._MYSQL_PREFIX."_countries SET code='".$_POST['code'][$id]."', descr='".$_POST['descr'][$id]."', is_active='".$_POST['is_active'][$id]."' WHERE id='".$id."' LIMIT 1";
}
if ($SEL > 0)
{
// Delete selected rallyes and all it's data
- foreach ($_POST['sel'] as $id=>$sel)
+ foreach ($_POST['sel'] as $id => $sel)
{
// Remove selected rallye entirely...
$result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_data WHERE id=%s LIMIT 1",
if ($SEL > 0)
{
// Change selected rallyes and all it's data
- foreach ($_POST['title'] as $id=>$title)
+ foreach ($_POST['title'] as $id => $title)
{
// Secure ID number
$id = bigintval($id);
{
// Make all selected and deactivated rallyes editable
$SW = 2; $OUT = "";
- foreach ($_POST['sel'] as $id=>$sel)
+ foreach ($_POST['sel'] as $id => $sel)
{
// Load rallye basic data
$result = SQL_QUERY_ESC("SELECT title, descr, template, start_time, end_time, min_users, min_prices FROM "._MYSQL_PREFIX."_rallye_data WHERE id=%s LIMIT 1",
SQL_FREERESULT($result);
// Check if an entry is empty
- foreach ($DATA as $k=>$v) {
+ foreach ($DATA as $k => $v) {
if (empty($v)) $DATA[$k] = "---";
}
unset($_POST['remove']);
} elseif (isset($_POST['change'])) {
// Change entries here...
- foreach ($_POST['id'] as $id=>$sel) {
+ foreach ($_POST['id'] as $id => $sel) {
// Secure ID
$id = bigintval($id);
$MSG = SPONSOR_PAY_ENTRIES_CHANGED;
} elseif (isset($_POST['remove'])) {
// Remove entries here...
- foreach ($_POST['id'] as $id=>$sel) {
+ foreach ($_POST['id'] as $id => $sel) {
// Remove entry
$result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_sponsor_paytypes WHERE id='%s' LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
} elseif ((isset($_POST['edit'])) || (isset($_POST['del']))) {
// Load all data
$OUT = ""; $SW = 2;
- foreach ($_POST['id'] as $id=>$sel) {
+ foreach ($_POST['id'] as $id => $sel) {
// Load entry
$result = SQL_QUERY_ESC("SELECT pay_name, pay_rate, pay_min_count, pay_currency FROM "._MYSQL_PREFIX."_sponsor_paytypes WHERE id='%s' LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
$_POST['id'],
"surfbar_urls",
array("id", "userid", "url", "reward", "costs"),
- array("bigintval", "ADD_MEMBER_SELECTION_BOX", "FRAMETESTER", "TRANSLATE_COMMA", "TRANSLATE_COMMA"),
- array("", array(false, true), "", "", "")
+ array("bigintval", "ADD_MEMBER_SELECTION_BOX", "", "TRANSLATE_COMMA", "TRANSLATE_COMMA"),
+ array("", array(false, true, true), "", "", "")
);
$show = false;
} elseif (isset($_POST['do_edit'])) {
// Delete entries (with confirmation)
- ADMIN_EDIT_ENTRIES_CONFIRM($_POST['id'], "surfbar_urls", array(), array(), array(), true);
+ ADMIN_EDIT_ENTRIES_CONFIRM(
+ $_POST['id'],
+ "surfbar_urls",
+ array("", ""),
+ array('reward' => "REVERT_COMMA", 'costs' => "REVERT_COMMA"),
+ array('reward' => "", 'costs' => ""),
+ true
+ );
} elseif (isset($_POST['delete'])) {
// Delete entries (with confirmation)
ADMIN_DELETE_ENTRIES_CONFIRM($_POST['id'], "surfbar_urls", array("id", "userid", "url", "registered"), array("bigintval", "ADMIN_USER_PROFILE_LINK", "FRAMETESTER", "MAKE_DATETIME"), array("", "", "", "2"));
// Remove double eintries
$prev = ""; $dmy = $menus; $dmy2 = $titles; $dmy3 = $below;
- foreach ($menus as $key=>$value)
+ foreach ($menus as $key => $value)
{
if ($value == $prev)
{
}
$menus = $dmy; $titles = $dmy2; $below = $dmy3;
// Load sub menus :)
- foreach ($menus as $key_main=>$value_main)
+ foreach ($menus as $key_main => $value_main)
{
$result = SQL_QUERY_ESC("SELECT what, title, sort FROM "._MYSQL_PREFIX."_member_menu WHERE action='%s' AND what != '' ORDER BY sort",
array($value_main), __FILE__, __LINE__);
// Remove double eintries
$prev = ""; $dmy = $menus[$value_main]; $dmy2 = $titles[$value_main]; $dmy3 = $below[$value_main];
- foreach ($menus[$value_main] as $key=>$value)
+ foreach ($menus[$value_main] as $key => $value)
{
if ($value == $prev)
{
$OUT = "<SELECT class=\"admin_select\" name=\"sort\" size=\"1\">
<OPTION value=\"\">".IS_FIRST_MENU."</OPTION>";
- foreach ($below as $key=>$m)
+ foreach ($below as $key => $m)
{
if (is_array($m))
{
- foreach ($m as $key2=>$m2)
+ foreach ($m as $key2 => $m2)
{
$OUT .= " <OPTION value=\"".$m2."\">".$titles[$key][$key2];
- foreach ($menus as $k=>$v)
+ foreach ($menus as $k => $v)
{
if (($v == $key) && (!is_array($v)))
{
define('__SUB_VALUE', $SUB);
define('__CHK_VALUE', $chk);
$SW = 2; $cnt = 0; $OUT = "";
- foreach ($_POST['sel'] as $sel=>$confirm)
+ foreach ($_POST['sel'] as $sel => $confirm)
{
if ($confirm == 1)
{
define('__SUB_VALUE', $SUB);
define('__CHK_VALUE', $chk);
$SW = 2; $cnt = 0; $OUT = "";
- foreach ($_POST['sel'] as $sel=>$confirm)
+ foreach ($_POST['sel'] as $sel => $confirm)
{
if ($confirm == 1)
{
define('__SUB_VALUE', $SUB);
define('__CHK_VALUE', $chk);
$SW = 2; $cnt = 0; $OUT = "";
- foreach ($_POST['sel'] as $sel=>$confirm)
+ foreach ($_POST['sel'] as $sel => $confirm)
{
if ($confirm == 1)
{
elseif ((isset($_POST['ok'])) && (!IS_DEMO()))
{
// An act is done...
- foreach ($_POST['sel'] as $sel=>$menu)
+ foreach ($_POST['sel'] as $sel => $menu)
{
$AND = "what = ''";
$sel = bigintval($sel);
global $menuDesription, $FATAL;
if ((is_array($menuDesription)) && (sizeof($menuDesription) > 0)) {
$OUT = "";
- foreach ($menuDesription as $key=>$value)
+ foreach ($menuDesription as $key => $value)
{
// Prepare content
$content = array(
break;
case "edit":
- foreach ($_POST['time'] as $id=>$value)
+ foreach ($_POST['time'] as $id => $value)
{
$SQL[] = "UPDATE "._MYSQL_PREFIX."_payments SET time='".$value."', payment='".$_POST['pay'][$id]."', price='".$_POST['price'][$id]."', mail_title='".$_POST['title'][$id]."' WHERE id='".$id."' LIMIT 1";
}
break;
case "del":
- foreach ($_POST['id'] as $id=>$value)
+ foreach ($_POST['id'] as $id => $value)
{
$SQL[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_payments WHERE id='".$id."' LIMIT 1";
}
{
// Delete entries here
$SW = 2; $OUT = "";
- foreach ($_POST['sel'] as $id=>$value)
+ foreach ($_POST['sel'] as $id => $value)
{
$result = SQL_QUERY_ESC("SELECT time, mail_title FROM "._MYSQL_PREFIX."_payments WHERE id=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
{
// Edit entries
$SW = 2; $OUT = "";
- foreach ($_POST['sel'] as $id=>$value)
+ foreach ($_POST['sel'] as $id => $value)
{
$result = SQL_QUERY_ESC("SELECT time, payment, mail_title, price FROM "._MYSQL_PREFIX."_payments WHERE id=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
break;
case "edit": // Update banner
- foreach ($_POST['sel'] as $id=>$sel)
+ foreach ($_POST['sel'] as $id => $sel)
{
// Secure ID
$id = bigintval($id);
{
// Edit banner
$SW = ""; $OUT = "";
- foreach ($_POST['sel'] as $id=>$sel)
+ foreach ($_POST['sel'] as $id => $sel)
{
// Load data
$result = SQL_QUERY_ESC("SELECT url, alternate, visible FROM "._MYSQL_PREFIX."_refbanner WHERE id=%s LIMIT 1",
if (($SEL > 0) && (isset($_POST['del'])))
{
// Delete banner
- foreach ($_POST['sel'] as $id=>$sel)
+ foreach ($_POST['sel'] as $id => $sel)
{
$result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_refbanner WHERE id=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
// Generate options
$OUT = "";
- foreach ($CATS['id'] as $key=>$value)
+ foreach ($CATS['id'] as $key => $value)
{
if (strlen($CATS['name'][$key]) > 20) $CATS['name'][$key] = substr($CATS['name'][$key], 0, 17)."...";
$OUT .= " <OPTION value=\"".$value."\">".$CATS['name'][$key]." (".$CATS['uids'][$key]." ".USER_IN_CAT.")</OPTION>\n";
// Get count of theme_check for validation
$count = trim($response[sizeof($response) - 2]);
- foreach ($response as $idx=>$value)
+ foreach ($response as $idx => $value)
{
$value = str_replace("\n", "", $value); $ver = "";
$INFO = ADMIN_EXT_NO_INFO_FOUND;
// Trim every data line
- foreach ($LANG_DUMMY as $k=>$v) {
+ foreach ($LANG_DUMMY as $k => $v) {
$v = trim($v);
if (substr($v, 3) == "") $v = "---";
$LANG_DUMMY[$k] = $v;
// Extensions where found which are not downloaded and installed
$SW = 2; $OUT = ""; $TSIZE = 0;
- foreach ($THEMES['fname'] as $idx=>$name) {
+ foreach ($THEMES['fname'] as $idx => $name) {
// Generate download link
$LINK = SERVER_URL."/themes/theme-".$name.".zip";
$OUT .= "<TR>
if (!empty($_POST['sel'])) $SEL = SELECTION_COUNT($_POST['sel']);
if ($SEL > 0) {
$OUT = "";
- foreach ($_POST['sel'] as $id=>$sel) {
+ foreach ($_POST['sel'] as $id => $sel) {
$SQL = "";
// Shall I de-/activate or delete themes?
if (isset($_POST['status'])) {
if ($SEL > 0) {
// Reject mail orders
$SW = 2; $OUT = "";
- foreach ($_POST['sel'] as $id=>$value) {
+ foreach ($_POST['sel'] as $id => $value) {
// Secure ID number
$id = bigintval($id);
} elseif ((isset($_POST['lock'])) || ($SEL > 0)) {
if ($SEL > 0) {
// Lock URLs
- foreach ($_POST['sel'] as $id=>$url) {
+ foreach ($_POST['sel'] as $id => $url) {
// Lookup in blacklist
$result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_url_blist WHERE url='%s' LIMIT 1",
array($url), __FILE__, __LINE__);
// Does he have selected at least one sponsor?
if (SELECTION_COUNT($_POST['id']) > 0) {
// At least one entry selected
- foreach ($_POST['id'] as $id=>$sel) {
+ foreach ($_POST['id'] as $id => $sel) {
// Secure ID number
$id = bigintval($id);
if (!IS_ADMIN())
{
// Do this check only when no admin is logged in
- foreach ($_POST['cat'] as $id=>$answer)
+ foreach ($_POST['cat'] as $id => $answer)
{
if ($answer == "Y") $cats++;
}
// Write catgories
if ((is_array($_POST['cat'])) && (count($_POST['cat']))) {
- foreach ($_POST['cat'] as $cat=>$joined) {
+ foreach ($_POST['cat'] as $cat => $joined) {
if ($joined == "Y") {
// Insert category entry
$result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_cats (userid, cat_id) VALUES (%s, %s)",
elseif ($MODE == "activate")
{
// Send activation link again
- if (isset($HTTP_POST_VARS['ok']))
+ if (isset($_POST['ok']))
{
// Check submitted data
- if (empty($HTTP_POST_VARS['email'])) unset($HTTP_POST_VARS['ok']);
+ if (empty($_POST['email'])) unset($_POST['ok']);
}
- if (isset($HTTP_POST_VARS['ok']))
+ if (isset($_POST['ok']))
{
// Check email
$result = SQL_QUERY_ESC("SELECT id, hash, status, remote_addr, salut, surname, family, sponsor_created
FROM "._MYSQL_PREFIX."_sponsor_data
WHERE email='%s' AND (status='UNCONFIRMED' OR status='EMAIL') LIMIT 1",
- array($HTTP_POST_VARS['email']), __FILE__, __LINE__);
+ array($_POST['email']), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1)
{
// Unconfirmed sponsor account found so let's load the requested data
// Confirmed email address
$msg_sponsor = LOAD_EMAIL_TEMPLATE("sponsor_email", $SPONSOR);
}
- SEND_EMAIL($HTTP_POST_VARS['email'], SPONSOR_ACTIVATION_LINK_SUBJ, $msg_sponsor);
+ SEND_EMAIL($_POST['email'], SPONSOR_ACTIVATION_LINK_SUBJ, $msg_sponsor);
// Output message
LOAD_TEMPLATE("admin_settings_saved", false, SPONSOR_ACTIVATION_LINK_SENT);
elseif ($MODE == "lost_pass")
{
// Send new password
- if (isset($HTTP_POST_VARS['ok']))
+ if (isset($_POST['ok']))
{
// Check submitted data
- if (empty($HTTP_POST_VARS['email'])) unset($HTTP_POST_VARS['ok']);
+ if (empty($_POST['email'])) unset($_POST['ok']);
}
- if (isset($HTTP_POST_VARS['ok']))
+ if (isset($_POST['ok']))
{
// Check email
$result = SQL_QUERY_ESC("SELECT id, hash, remote_addr, salut, surname, family, sponsor_created
FROM "._MYSQL_PREFIX."_sponsor_data
WHERE email='%s' AND id='%s' AND status='CONFIRMED' LIMIT 1",
- array($HTTP_POST_VARS['email'], bigintval($HTTP_POST_VARS['id'])), __FILE__, __LINE__);
+ array($_POST['email'], bigintval($_POST['id'])), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1)
{
// Unconfirmed sponsor account found so let's load the requested data
// Prepare email and send it to the sponsor
$msg_sponsor = LOAD_EMAIL_TEMPLATE("sponsor_lost", $SPONSOR);
- SEND_EMAIL($HTTP_POST_VARS['email'], SPONSOR_LOST_PASSWORD_SUBJ, $msg_sponsor);
+ SEND_EMAIL($_POST['email'], SPONSOR_LOST_PASSWORD_SUBJ, $msg_sponsor);
// Update password
$result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_sponsor_data SET password='%s'
LOAD_TEMPLATE("guest_sponsor_lost");
}
}
- elseif (isset($HTTP_POST_VARS['ok']))
+ elseif (isset($_POST['ok']))
{
// Check status and login data ...
$result = SQL_QUERY_ESC("SELECT status FROM "._MYSQL_PREFIX."_sponsor_data
WHERE id='%s' AND password='%s' LIMIT 1",
- array(bigintval($HTTP_POST_VARS['sponsorid']), md5($HTTP_POST_VARS['pass'])), __FILE__, __LINE__);
+ array(bigintval($_POST['sponsorid']), md5($_POST['pass'])), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1)
{
// Okay, first login data check passed, now has he/she an approved (CONFIRMED) account?
$life = (time() + $CONFIG['online_timeout']);
// Is confirmed so both is fine and we can continue with login procedure
- $login = ((setcookie("sponsorid" , bigintval($HTTP_POST_VARS['sponsorid']), $life, COOKIE_PATH)) &&
- (setcookie("sponsorpass", md5($HTTP_POST_VARS['pass']) , $life, COOKIE_PATH)));
+ $login = ((setcookie("sponsorid" , bigintval($_POST['sponsorid']), $life, COOKIE_PATH)) &&
+ (setcookie("sponsorpass", md5($_POST['pass']) , $life, COOKIE_PATH)));
if ($login)
{
}
// Now we have all categories loaded, count members
- foreach ($cats as $id=>$dummy)
+ foreach ($cats as $id => $dummy)
{
// We only need id and nothing more to count...
$cat_cnt[$id] = SQL_NUMROWS(SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_cats WHERE cat_id=%s",
// Generate monthly stats
$SW = 2; $r2 = " right2"; $l = "ll"; $r = "lr"; $OUT = "";
- foreach ($months as $month=>$cnt)
+ foreach ($months as $month => $cnt)
{
if ($SW == 2) $OUT .= "<TR>\n";
// Generate category stats
$SW = 2; $OUT = "";
- foreach ($cat_cnt as $id=>$cnt)
+ foreach ($cat_cnt as $id => $cnt)
{
// Prepare data for the template
$content = array(
if (isset($_POST['ok']))
{
$cnt = 0;
- foreach ($_POST['cat'] as $cat=>$joined)
+ foreach ($_POST['cat'] as $cat => $joined)
{
if ($joined == "N") $cnt++;
}
}
if (isset($_POST['ok']))
{
- foreach ($_POST['cat'] as $cat=>$joined)
+ foreach ($_POST['cat'] as $cat => $joined)
{
switch ($joined)
{
else
{
// Secure every submitted variable
- foreach ($_POST as $key=>$value)
+ foreach ($_POST as $key => $value)
{
$_POST[$key] = addslashes($value);
}
if (is_admin()) $whereStatement = "";
// Add slashes to every value
-foreach($_POST as $key=>$value)
+foreach($_POST as $key => $value)
{
// Skip submit buttons
if (($key != "data") && ($key != "frametester")) $_POST[$key] = addslashes($value);
{
// Pre-output categories
$CAT = "";
- foreach ($CATS['id'] as $key=>$value)
+ foreach ($CATS['id'] as $key => $value)
{
$CAT .= " <OPTION value=\"".$value."\"";
if (($OLD_ORDER) && ($cat == $value)) $CAT .= " selected=\"selected\"";
}
// Mail type
$type = "";
- foreach ($typeS as $key=>$value)
+ foreach ($typeS as $key => $value)
{
$P = TRANSLATE_COMMA($typeS[$key][1]);
if (is_array($value))
// Generate output lines for the template
$OUT = ""; $SW = 2;
-foreach ($THEMES['theme_unix'] as $key=>$unix)
+foreach ($THEMES['theme_unix'] as $key => $unix)
{
$default = "";
if (get_session('mxchange_theme') == $unix) $default = " checked selected";
// Selection from array
if (is_array($id) && is_array($name) && sizeof($id) == sizeof($name)) {
// Both are arrays
- foreach ($id as $idx=>$value) {
+ foreach ($id as $idx => $value) {
$ret .= "<OPTION value=\"".$value."\"";
if ($default == $value) $ret .= " selected checked";
$ret .= ">".$name[$idx]."</OPTION>\n";
if ((is_array($cacheArray)) && (isset($cacheArray['config'][$no])) && (is_array($cacheArray['config'][$no]))) {
// Load config from cache
//* DEBUG: */ echo gettype($cacheArray['config'][$no])."<br />\n";
- foreach ($cacheArray['config'][$no] as $key=>$value) {
+ foreach ($cacheArray['config'][$no] as $key => $value) {
$CFG_DUMMY[$key] = $value;
} // END - foreach
// Now, if we are good little boys and girls Santa left us some user-ids.
// We can now send mails to them...
- foreach ($RECEIVERS as $key=>$uid)
+ foreach ($RECEIVERS as $key => $uid)
{
// Lookup user ID
$result_user = SQL_QUERY_ESC("SELECT sex, surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
}
if ((sizeof($points_BACK) > 0) && (!empty($points_BACK[0])))
{
- foreach ($points_BACK as $uid=>$PB)
+ foreach ($points_BACK as $uid => $PB)
{
// Add points only when we have points left to add and a valid user ID
if (($PB > 0) && ($uid > 0))
// Now, if we are good little boys and girls Santa left us some user-ids.
// We can now send mails to them...
- foreach ($RECEIVERS as $key=>$uid)
+ foreach ($RECEIVERS as $key => $uid)
{
// Load personal data
//* DEBUG: */ echo "*L:".__LINE__."/".$uid."*<br />";
{--HELLO_ADMIN--},
-Es wurde eine URL aus der Surfbar geloescht.
+Es wurde eine URL aus der Surfbar gelöscht.
Hier sind alle dazu:
------------------------------------------
--- /dev/null
+{--HELLO_ADMIN--},
+
+Es wurde eine URL aus der Surfbar geändert.
+
+Hier sind alle dazu:
+------------------------------------------
+Gebuchte URL: $DATA[url]
+Neue URL: $content[url]
+------------------------------------------
+Framekiller-Test:
+$content[frametester]
+------------------------------------------
+Alte User-ID: $DATA[userid]
+Neue User-ID: $content[userid]
+------------------------------------------
+Alte Kosten/Aufruf: $DATA[costs] {!POINTS!}
+Neue Kosten/Aufruf: $content[costs] {!POINTS!}
+------------------------------------------
+Alte Vergütung/Aufruf: $DATA[reward] {!POINTS!}
+Neue Vergütung/Aufruf: $content[reward] {!POINTS!}
+------------------------------------------
+Angemeldet: $DATA[registered]
+------------------------------------------
+ID in der Surfbar: $DATA[id]
+------------------------------------------
+
+{--ADMIN_THANX--}
+ {--YOUR--} {!MAIN_TITLE!} {--SCRIPT--}
+
+{!URL!}/admin.php
--- /dev/null
+Hallo Mitglied,
+
+wir haben soeben Ihre in unserer Surfbar gebuchte URL geändert.
+
+Hier sind alle Daten dazu:
+------------------------------------------
+Gebuchte URL: $DATA[url]
+------------------------------------------
+Neue Vergütung/Aufruf: $content[reward] {!POINTS!}
+------------------------------------------
+Neue Kosten/Aufruf: $content[costs] {!POINTS!}
+------------------------------------------
+Aufrufe gesamt: $DATA[views_total]
+------------------------------------------
+Angemeldet: $DATA[registered]
+------------------------------------------
+Ihre User-ID: $DATA[userid]
+------------------------------------------
+ID in der Surfbar: $DATA[id]
+------------------------------------------
+
+Mit freundlichem Gruss,
+ Ihr {!MAIN_TITLE!} Team
+
+{!URL!} ({!WEBMASTER!})
--- /dev/null
+<form action="{!URL!}/modules.php?module=admin&what=list_surfbar_urls" method="POST">
+<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed">
+<tr>
+ <td align="center" colspan="4" class="admin_title" height="30">
+ <strong>{--ADMIN_SURFBAR_EDIT_URLS_TITLE--}</strong>
+ </td>
+</tr>
+<tr>
+ <td class="admin_title bottom2 right2" align="center"><strong>{--_UID--}</strong></td>
+ <td class="admin_title bottom2 right2" align="center"><strong>{--ADMIN_TEST_URL--}</strong></td>
+ <td class="admin_title bottom2 right2" align="center"><strong>{--ADMIN_SURFBAR_REWARD--}</strong></td>
+ <td class="admin_title bottom2" align="center"><strong>{--ADMIN_SURFBAR_COSTS--}</strong></td>
+</tr>
+$content
+<tr>
+ <td class="admin_footer" colspan="4">
+ <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}"> *
+ <input type="submit" name="do_edit" class="admin_submit" value="{--ADMIN_SURFBAR_EDIT_URL_NOW--}">
+ </td>
+</tr>
+</table>
+</form>
--- /dev/null
+<tr>
+ <td style="padding:2px" align="center" class="bottom2 right2 switch_sw$content[sw]">
+ <input type="hidden" name="id[$content[id]]" value="1" />
+ <input type="hidden" name="uid_raw[$content[id]]" value="$content[uid]" />
+ $content[userid]
+ </td>
+ <td style="padding:2px" align="center" class="bottom2 right2 switch_sw$content[sw]">
+ <input type="text" name="url[$content[id]]" size="20" maxlength="255" value="$content[url]" />
+ </td>
+ <td style="padding:2px" align="center" class="bottom2 right2 switch_sw$content[sw]">
+ <input type="text" name="reward[$content[id]]" size="5" maxlength="20" value="$content[reward]" /> {!POINTS!}
+ </td>
+ <td style="padding:2px" align="center" class="bottom2 switch_sw$content[sw]">
+ <input type="text" name="costs[$content[id]]" size="5" maxlength="20" value="$content[costs]" /> {!POINTS!}
+ </td>
+</tr>