$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;
+}
//
//////////////////////////////////////////////////
// //