./inc/filter/bonus_filter.php:56: // @TODO This query isn't right, it will only update if the user was for a longer time away!
./inc/filter/cache_filter.php:94: // @TODO This should be rewritten not to load the cache file for just checking if it is there for save removal.
./inc/filter/forced_filter.php:73: // @TODO This part is unfinished
+./inc/filters.php:1292: // @TODO No banner found, output some default banner
./inc/functions.php:1090: // @TODO Move this SQL code into a function, let's say 'getTimestampFromPoolId($id) ?
./inc/functions.php:1176: // @TODO Are these convertions still required?
./inc/functions.php:1197:// @TODO Rewrite this function to use readFromFile() and writeToFile()
./inc/gen_sql_patches.php:95:// @TODO Rewrite this to a filter
./inc/header.php:66:// @TODO Find a way to not use direct module comparison
./inc/install-functions.php:91: // @TODO DEACTIVATED: changeDataInLocalConfigurationFile('OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestElement('omode'), 0);
-./inc/language/de.php:1122: // @TODO Rewrite these two constants
-./inc/language/de.php:1138: // @TODO Rewrite these three constants
+./inc/language/de.php:1123: // @TODO Rewrite these two constants
+./inc/language/de.php:1139: // @TODO Rewrite these three constants
./inc/language/de.php:46: // @TODO Please sort these language elements
-./inc/language/de.php:751:// @TODO Are these constants longer used?
+./inc/language/de.php:752:// @TODO Are these constants longer used?
./inc/language-functions.php:255: // @TODO These are all valid languages, again hard-coded
./inc/language-functions.php:44:// @TODO Rewrite all language constants to this function.
./inc/language/install_de.php:137: // @TODO Move this to e.g. ext-smtp
./inc/libs/rallye_functions.php:983: // Load count @TODO Can't we rewrite this to our API?
./inc/libs/sponsor_functions.php:163: // @TODO Rewrite this to API function
./inc/libs/sponsor_functions.php:436: // @TODO Rewrite this to API function
-./inc/libs/surfbar_functions.php:1672: // @TODO This can be somehow rewritten
-./inc/libs/surfbar_functions.php:776:// @TODO Can't we use our new expression language instead of this ugly code?
+./inc/libs/surfbar_functions.php:1676: // @TODO This can be somehow rewritten
+./inc/libs/surfbar_functions.php:780:// @TODO Can't we use our new expression language instead of this ugly code?
./inc/libs/task_functions.php:253: // @TODO These can be rewritten to filter
./inc/libs/task_functions.php:51:// @TODO Move all extension-dependent queries into filters
./inc/libs/theme_functions.php:94: // @TODO Can't this be rewritten to an API function?
./inc/mysql-manager.php:1461: // @TODO Rewrite this to a filter
./inc/mysql-manager.php:1767: // @TODO Rewrite this to a filter
./inc/mysql-manager.php:1964: // @TODO If we can rewrite the EL sub-system to support more than one parameter, this call_user_func_array() can be avoided
-./inc/mysql-manager.php:2077: // @TODO Used generic 'userid' here
+./inc/mysql-manager.php:2098: // @TODO Used generic 'userid' here
./inc/mysql-manager.php:398: // @TODO Try to rewrite this to one or more functions
./inc/mysql-manager.php:44:// @TODO Can we cache this?
./inc/purge/purge-inact.php:55: // @TODO Rewrite these if() blocks to a filter
./inc/template-functions.php:1137: // @TODO Deprecate this thing
./inc/template-functions.php:1244: // @TODO This can be easily moved out after the merge from EL branch to this is complete
./inc/template-functions.php:1293: // @TODO Add a little more infos here
-./inc/template-functions.php:1667:// @TODO Lame description for this function
-./inc/template-functions.php:1689: // @TODO Move this in a filter
+./inc/template-functions.php:1668:// @TODO Lame description for this function
+./inc/template-functions.php:1690: // @TODO Move this in a filter
./inc/template-functions.php:197: * @TODO On some pages this is buggy
-./inc/template-functions.php:2292: // @TODO Is this needed for e.g. $GLOBALS['template_content'] ? $this->setRawTemplateData($compactedContent);
+./inc/template-functions.php:2293: // @TODO Is this needed for e.g. $GLOBALS['template_content'] ? $this->setRawTemplateData($compactedContent);
./inc/template-functions.php:285: // @TODO Remove these sanity checks if all is fine
./inc/template-functions.php:617:// @TODO $simple/$constants are deprecated
./inc/template-functions.php:715: // @TODO $userid is deprecated and should be removed from loadEmailTemplate() and replaced with $content[userid] in all templates
-./inc/wrapper-functions.php:3010: // @TODO Find a way to not use direct module comparison
+./inc/wrapper-functions.php:3017: // @TODO Find a way to not use direct module comparison
./inc/wrapper-functions.php:494:// @TODO Do some more sanity check here
-./inc/xml-functions.php:221: // @TODO Handle characters
+./inc/xml-functions.php:239: // @TODO Handle characters
./mailid.php:102: // @TODO Rewrite this to a filter
./mailid.php:145: // @TODO Rewrite this to a filter
./mailid_top.php:112: // @TODO Rewrite this to a filter/function
./mailid_top.php:149: // @TODO Rewrite this to a filter
./mailid_top.php:18: * @TODO Merge this script with mailid.php *
-./mailid_top.php:196: // @TODO Rewrite this to a filter
-./mailid_top.php:203: // @TODO Rewrite this to a filter
-./mailid_top.php:238: // @TODO Rewrite these blocks to filter
-./view.php:71: // @TODO No banner found, output some default banner
+./mailid_top.php:199: // @TODO Rewrite this to a filter
+./mailid_top.php:206: // @TODO Rewrite this to a filter
+./mailid_top.php:241: // @TODO Rewrite these blocks to filter
./templates/de/html/admin/admin_add_country.tpl:23: <!-- @TODO Rewrite this selection box to our generic functions //-->
./templates/de/html/admin/admin_config_other.tpl:79: <!-- @TODO Rewrite this selection to one of our functions //-->
./templates/de/html/admin/admin_config_rewrite.tpl:4: <!-- @TODO No title here? //-->
./templates/de/html/requirements.tpl:1:<!-- @DEPRECATED //-->
./templates/de/html/rettet_das_internet.tpl:1:<!-- @DEPRECATED //-->
./templates/de/html/roadmap.tpl:1:<!-- @DEPRECATED //-->
+./templates/de/html/select/select_surfbar_actions_action_box.tpl:1:<!-- @DEPRECATED //-->
+./templates/de/html/select/select_surfbar_actions_action_option.tpl:1:<!-- @DEPRECATED //-->
+./templates/de/html/select/select_surfbar_actions_new_status_box.tpl:1:<!-- @DEPRECATED //-->
+./templates/de/html/select/select_surfbar_actions_new_status_option.tpl:1:<!-- @DEPRECATED //-->
+./templates/de/html/select/select_surfbar_actions_status_box.tpl:1:<!-- @DEPRECATED //-->
+./templates/de/html/select/select_surfbar_actions_status_option.tpl:1:<!-- @DEPRECATED //-->
./templates/de/html/stats.tpl:1:<!-- @DEPRECATED //-->
./templates/de/html/svn.tpl:1:<!-- @DEPRECATED //-->
./templates/de/html/why_reg.tpl:1:<!-- @DEPRECATED //-->
function SQL_ESCAPE ($str, $secureString = TRUE, $strip = TRUE) {
// Is there cache?
if (!isset($GLOBALS['sql_escapes']['' . $str . ''])) {
+ // Debug message
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'str=' . $str . ' - BEFORE!');
+
// Prepare the string here
$str = SQL_PREPARE_SQL_STRING($str);
+ // Debug message
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'str=' . $str . ' - AFTER!');
+
// Secure string first? (which is the default behaviour!)
if ($secureString === TRUE) {
+ // Debug message
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'str=' . $str . ',strip=' . intval($strip) . ' - BEFORE!');
+
// Then do it here
$str = secureString($str, $strip);
+
+ // Debug message
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'str=' . $str . ',strip=' . intval($strip) . ' - AFTER!');
} // END - if
+ // Init (invalid) value
+ $ret = '!INVALID!';
+
if (!SQL_IS_LINK_UP()) {
// Fall-back to escapeQuotes() when there is no link
$ret = escapeQuotes($str);
} elseif (function_exists('mysql_real_escape_string')) {
+ // Debug message
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'str=' . $str);
+
// The new and improved version
$ret = mysql_real_escape_string($str, SQL_GET_LINK());
+
+ // Debug message
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'str=' . $str . ',ret=' . $ret);
} elseif (function_exists('mysql_escape_string')) {
// The obsolete function
$ret = mysql_escape_string($str, SQL_GET_LINK());
$ret = escapeQuotes($str);
}
+ // Log message
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'str=' . $str . ',ret=' . $ret);
+
// Cache result
$GLOBALS['sql_escapes']['' . $str . ''] = $ret;
} // END - if
+ // Log message
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'str=' . $str . ',sql_escapes=' . $GLOBALS['sql_escapes']['' . $str . '']);
+
// Return it
return $GLOBALS['sql_escapes']['' . $str . ''];
}
// Private function to prepare the SQL query string
function SQL_PREPARE_SQL_STRING ($sqlString, $enableCodes = TRUE) {
+ // Debug message
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'sqlString=' . $sqlString . ',enableCodes=' . intval($enableCodes) . ' - ENTERED!');
+
// Is it already cached?
- if (!isset($GLOBALS['sql_strings'][$sqlString])) {
+ if (!isset($GLOBALS['sql_strings']['' . $sqlString . ''])) {
// Compile URI codes+config+expression code
$sqlString2 = FILTER_COMPILE_EXPRESSION_CODE(FILTER_COMPILE_CONFIG(compileUriCode($sqlString)));
+ // Debug message
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'sqlString2=' . $sqlString2);
+
// Do final compilation
- $GLOBALS['sql_strings'][$sqlString] = doFinalCompilation($sqlString2, FALSE, $enableCodes);
- } // END - if
+ $GLOBALS['sql_strings']['' . $sqlString . ''] = doFinalCompilation($sqlString2, FALSE, $enableCodes);
+ } else {
+ // Log message
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'sqlString=' . $sqlString . ' - CACHE!');
+ }
+
+ // Debug message
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'sqlString=' . $sqlString . ',enableCodes=' . intval($enableCodes) . ',sql_strings=' . $GLOBALS['sql_strings']['' . $sqlString . ''] . ' - EXIT!');
// Return it
- return $GLOBALS['sql_strings'][$sqlString];
+ return $GLOBALS['sql_strings']['' . $sqlString . ''];
}
// Creates a MySQL TIMESTAMP compatible string from given Uni* timestamp
// Points accounts
'POINTS_ACCOUNT_TYPE_ORDER_POINTS' => "Werbeguthaben",
+ 'POINTS_ACCOUNT_TYPE_LOCKED_ORDER_POINTS' => "Gesperrtes Werbeguthaben",
));
// [EOF]
// Determine reward
function determineSurfbarReward ($onlyMin = FALSE) {
// Static values are default
- $reward = getConfig('surfbar_static_reward');
+ $reward = getSurfbarStaticReward();
// Is there static or dynamic?
if (getSurfbarPaymentModel() == 'DYNAMIC') {
return $GLOBALS[__FUNCTION__];
}
+// "Getter" for surfbar_restart_time
+function getSurfbarRestartTime () {
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = getConfig('surfbar_restart_time');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
+// "Getter" for surfbar_auto_start
+function getSurfbarAutoStart () {
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = getConfig('surfbar_auto_start');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
+// Checks whether auto-start is enabled
+function isSurfbarAutoStartEnabled () {
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = (getSurfbarAutoStart() == 'Y');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
+// "Getter" for surfbar_daily_counter
+function getSurfbarDailyCounter () {
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = getConfig('surfbar_daily_counter');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
+// "Getter" for surfbar_yester_counter
+function getSurfbarYesterCounter () {
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = getConfig('surfbar_yester_counter');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
+// "Getter" for surfbar_weekly_counter
+function getSurfbarWeeklyCounter () {
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = getConfig('surfbar_weekly_counter');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
+// "Getter" for surfbar_monthly_counter
+function getSurfbarMonthlyCounter () {
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = getConfig('surfbar_monthly_counter');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
+// "Getter" for surfbar_total_counter
+function getSurfbarTotalCounter () {
+ // Is there cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = getConfig('surfbar_total_counter');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
//------------------------------------------------------------------------------
// Template helper functions
//------------------------------------------------------------------------------
// Private getter for data elements
function getSurfbarData ($element) {
+ // Debug message
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ' - ENTERED!');
// Default is null
$data = NULL;
// Is the entry there?
- if (!isset($GLOBALS['surfbar_cache'][$element])) {
- print('surfbar_cache=<pre>');
- print_r($GLOBALS['surfbar_cache']);
- print('</pre>');
- reportBug(__FUNCTION__, __LINE__, 'Element ' . $element . ' not found.');
+ if (isset($GLOBALS['surfbar_cache'][$element])) {
+ // Then take it
+ $data = $GLOBALS['surfbar_cache'][$element];
} // END - if
- // Then take it
- $data = $GLOBALS['surfbar_cache'][$element];
-
// Return result
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element[' . $element . ']=[' . gettype($data) . ']' . $data . ' - EXIT!');
return $data;
$skip = FALSE;
// Now, walk through all entries and prepare them for saving
+ //* BUG: */ reportBug(__FUNCTION__, __LINE__, '<pre>'.print_r(postRequestArray(),true).'</pre>');
foreach ($postData as $id => $val) {
// Process only formular field but not submit buttons ;)
if ($id == 'ok') {
$val = convertCommaToDot($val);
} // END - if
- // Shall we add numbers or strings?
+ // Test value on float
$test = (float) $val;
+
+ // Debug message
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'test=' . $test . ',val=' . $val . ',id=' . $id);
+
+ // Shall we add numbers or strings?
if ('' . $val . '' == '' . $test . '') {
// Add numbers
array_push($tableData, sprintf("`%s`=%s", $id, $test));
// Add both in one line
$keys = implode('`, `', $keys);
- $values = implode(', ' , $values);
+ $values = implode(', ' , $values);
// Generate SQL string
$sql = sprintf("INSERT INTO `{?_MYSQL_PREFIX?}%s` (%s) VALUES (%s)",
rebuildCache('config', 'config');
// Settings saved, so display message?
- if ($displayMessage === TRUE) displayMessage('{--SETTINGS_SAVED--}');
+ if ($displayMessage === TRUE) {
+ // Display a message
+ displayMessage('{--SETTINGS_SAVED--}');
+ } // END - if
// Return affected rows
return $affected;
// Value is an array so set it directly
$GLOBALS['raw_request']['post'][$element] = $value;
} else {
+ // Debug message
+ /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',value=' . $value . ' - BEFORE!');
+
// Escape both
$element = SQL_ESCAPE($element);
$value = SQL_ESCAPE($value);
+ // Debug message
+ /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',value=' . $value . ' - AFTER!');
+
// Set regular entry
$GLOBALS['raw_request']['post'][$element] = $value;
}
// Update cache
- $GLOBALS['cache_request']['post'][$element][null] = $value;
+ $GLOBALS['cache_request']['post'][$element][NULL] = $value;
}
// Checks whether a form was sent. If so, the $_POST['ok'] element must be set
// Read and convert given entry
$postValue = convertCommaToDot(postRequestElement($postEntry));
+ // Log message
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'postEntry=' . $postEntry . ',postValue=' . $postValue);
+
// ... and set it again
setPostRequestElement($postEntry, $postValue);
}
// Prepare content
$content = array(
'start' => str_repeat('X', strlen(getSurfbarRestartTime())),
- 'autostart' => (isSurfbarAutoStartEnbaled()) ? 'true' : 'false'
+ 'autostart' => (isSurfbarAutoStartEnabled()) ? 'true' : 'false'
);
// Load template for stopped surfbar