inc/language/wernis_de.php -text
inc/language/yoomedia_de.php -text
inc/libs/.htaccess -text
+inc/libs/_functions.php -text
inc/libs/active_functions.php -text
inc/libs/admins_functions.php -text
inc/libs/autopurge_functions.php -text
inc/libs/html_mail_functions.php -text
inc/libs/jackpot_functions.php -text
inc/libs/mediadata_functions.php -text
+inc/libs/network_functions.php -text
inc/libs/newsletter_functions.php -text
inc/libs/nickname_functions.php -text
inc/libs/online_functions.php -text
templates/de/emails/admins/.htaccess -text
templates/de/emails/admins/admins_mail_contct_admin.tpl -text
templates/de/emails/admins/admins_msg_contct_admin.tpl -text
-templates/de/emails/admins_mail_contct_admin.tpl -text
-templates/de/emails/admins_msg_contct_admin.tpl -text
templates/de/emails/back-admin.tpl -text
templates/de/emails/back-member.tpl -text
templates/de/emails/beg/.htaccess -text
templates/de/html/admin/admin_add_cat.tpl -text
templates/de/html/admin/admin_add_country.tpl -text
templates/de/html/admin/admin_add_max.tpl -text
+templates/de/html/admin/admin_add_network.tpl -text
templates/de/html/admin/admin_add_payment.tpl -text
templates/de/html/admin/admin_add_points.tpl -text
templates/de/html/admin/admin_add_points_all.tpl -text
templates/de/html/admin/admin_edit_email.tpl -text
templates/de/html/admin/admin_edit_email_row.tpl -text
templates/de/html/admin/admin_edit_email_select.tpl -text
+templates/de/html/admin/admin_edit_networks_row.tpl -text
templates/de/html/admin/admin_edit_payments.tpl -text
templates/de/html/admin/admin_edit_payments_row.tpl -text
templates/de/html/admin/admin_edit_rallyes.tpl -text
templates/de/html/admin/admin_list_links_row.tpl -text
templates/de/html/admin/admin_list_mods.tpl -text
templates/de/html/admin/admin_list_mods_row.tpl -text
+templates/de/html/admin/admin_list_networks.tpl -text
+templates/de/html/admin/admin_list_networks_row.tpl -text
templates/de/html/admin/admin_list_notify_emails.tpl -text
templates/de/html/admin/admin_list_notify_emails_row.tpl -text
templates/de/html/admin/admin_list_online.tpl -text
templates/de/html/admin/admin_mods_stats2.tpl -text
templates/de/html/admin/admin_mods_stats2_row.tpl -text
templates/de/html/admin/admin_mods_stats_row.tpl -text
+templates/de/html/admin/admin_network_added.tpl -text
templates/de/html/admin/admin_newsletter.tpl -text
templates/de/html/admin/admin_newsletter_nohtml.tpl -text
templates/de/html/admin/admin_next_link.tpl -text
./inc/extensions/ext-html_mail.php:137: // @TODO Move these arrays into config
./inc/extensions/ext-network.php:71: // @TODO network_type_name is an internal name and needs documentation
./inc/extensions/ext-newsletter.php:215: // @TODO Move these into configuration
-./inc/extensions/ext-rallye.php:329: // @TODO Move this code into rallye_functions.php
+./inc/extensions/ext-rallye.php:330: // @TODO Move this code into rallye_functions.php
+./inc/extensions/ext-rallye.php:93: // @TODO Fix config_rallye_prices to list_rallye_prices
./inc/extensions/ext-sql_patches.php:741: // @TODO Rewrite this to a filter
./inc/extensions/ext-sql_patches.php:94: /* @TODO SQL_ALTER_TABLE() should work now properly
./inc/extensions/ext-yoomedia.php:122: // @TODO Can this be moved into a database table?
./inc/extensions/ext-yoomedia.php:55:// @TODO Only deprecated when 'network' is ready! setExtensionDeprecated('Y');
./inc/extensions-functions.php:376:// @TODO Change from ext_id to ext_name (not just even the variable! ;-) )
./inc/extensions-functions.php:489: // @TODO Extension is loaded, what next?
-./inc/functions.php:1308: // @TODO Remove this if() block if all is working fine
-./inc/functions.php:222: // @TODO Remove this sanity-check if all is fine
-./inc/functions.php:225: // @TODO Try to rewrite all $DATA to $content
-./inc/functions.php:2328:// @TODO Try to move this to inc/libs/theme_functions.php
-./inc/functions.php:2499:// @TODO Please describe this function
-./inc/functions.php:2517: searchDirsRecursive($next_dir, $last_changed); // @TODO small change to API to $last_changed = searchDirsRecursive($next_dir, $time);
-./inc/functions.php:2613: // @TODO Add a little more infos here
-./inc/functions.php:2624: // @TODO This cannot be rewritten to app_die(), try to find a solution for this.
-./inc/functions.php:2706: // @TODO Rewrite this old lost code to a template
-./inc/functions.php:2825: // @TODO Are these convertions still required?
-./inc/functions.php:2843:// @TODO Rewrite this function to use readFromFile() and writeToFile()
+./inc/functions.php:225: // @TODO Remove this sanity-check if all is fine
+./inc/functions.php:228: // @TODO Try to rewrite all $DATA to $content
+./inc/functions.php:2352:// @TODO Try to move this to inc/libs/theme_functions.php
+./inc/functions.php:2523:// @TODO Please describe this function
+./inc/functions.php:2541: searchDirsRecursive($next_dir, $last_changed); // @TODO small change to API to $last_changed = searchDirsRecursive($next_dir, $time);
+./inc/functions.php:2637: // @TODO Add a little more infos here
+./inc/functions.php:2648: // @TODO This cannot be rewritten to app_die(), try to find a solution for this.
+./inc/functions.php:2730: // @TODO Rewrite this old lost code to a template
+./inc/functions.php:2819: // @TODO Are these convertions still required?
+./inc/functions.php:2837:// @TODO Rewrite this function to use readFromFile() and writeToFile()
./inc/functions.php:546: // @TODO Extension 'msg' does not exist
./inc/functions.php:615:// @TODO Rewrite this to an extension 'smtp'
./inc/install-functions.php:62: // @TODO DEACTIVATED: changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestElement('omode'), 0);
-./inc/language/de.php:1140:// @TODO Rewrite these two constants
-./inc/language/de.php:1156:// @TODO Rewrite these five constants
-./inc/language/de.php:735:// @TODO The template 'admin_extensions_installed' is using this. But the template is no longer used.
-./inc/language/de.php:843:// @TODO Are these constants longer used?
+./inc/language/de.php:1141:// @TODO Rewrite these two constants
+./inc/language/de.php:1157:// @TODO Rewrite these five constants
+./inc/language/de.php:736:// @TODO The template 'admin_extensions_installed' is using this. But the template is no longer used.
+./inc/language/de.php:844:// @TODO Are these constants longer used?
./inc/language-functions.php:45:// @TODO Rewrite all language constants to this function.
./inc/language/holiday_de.php:49:// @TODO Rewrite these two constants to one
-./inc/language/rallye_de.php:110:// @TODO Rewrite following two lines to one
+./inc/language/rallye_de.php:113:// @TODO Rewrite following two lines to one
+./inc/language/rallye_de.php:13: * @TODO Naming convention not applied for language strings *
./inc/language/refback_de.php:45:// @TODO Rewrite these constants to one
./inc/language/sponsor_de.php:118:// @TODO Rewrite these four constants to one and use sprintf()
./inc/libs/admins_functions.php:418: // @TODO This can be, somehow, rewritten
./inc/libs/rallye_functions.php:699: $EXPIRE = 3; // @TODO The hard-coded value...
./inc/libs/rallye_functions.php:763: // @TODO Rewrite this to our API function
./inc/libs/refback_functions.php:60: // @TODO Try to rewrite the following unset()
-./inc/libs/surfbar_functions.php:1501: // @TODO This can be somehow rewritten
-./inc/libs/surfbar_functions.php:954: // @TODO Invalid salt should be refused
+./inc/libs/surfbar_functions.php:1497: // @TODO This can be somehow rewritten
+./inc/libs/surfbar_functions.php:950: // @TODO Invalid salt should be refused
./inc/libs/task_functions.php:244: // @TODO These can be rewritten to filter
./inc/libs/task_functions.php:52:// @TODO Move all extension-dependent queries into filters
./inc/libs/theme_functions.php:218:// @TODO Move this code block into a filter and register it with 'init'
./inc/libs/yoomedia_functions.php:64: $response = YOOMEDIA_QUERY_API('out_textmail.php', true); // @TODO Ask Yoo!Media for test script
./inc/load_config.php:76: // @TODO Rewrite them to avoid this else block
./inc/loader/load_cache-extension.php:13: * @TODO Rewrite this whole file to load_cache-extensions.php *
-./inc/modules/admin/admin-inc.php:349: // @TODO Rewrite this to $content = SQL_FETCHARRAY()
-./inc/modules/admin/admin-inc.php:354: // @TODO ACL is 'allow'... hmmm
-./inc/modules/admin/admin-inc.php:406: // @TODO Rewrite this to $content = SQL_FETCHARRAY()
-./inc/modules/admin/admin-inc.php:412: // @TODO ACL is 'allow'... hmmm
-./inc/modules/admin/admin-inc.php:514:// @TODO Try to rewrite this to adminAddMenuSelectionBox()
-./inc/modules/admin/admin-inc.php:527: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY(). Please look some lines above for the dynamic query
+./inc/modules/admin/admin-inc.php:351: // @TODO Rewrite this to $content = SQL_FETCHARRAY()
+./inc/modules/admin/admin-inc.php:356: // @TODO ACL is 'allow'... hmmm
+./inc/modules/admin/admin-inc.php:422: // @TODO Rewrite this to $content = SQL_FETCHARRAY()
+./inc/modules/admin/admin-inc.php:428: // @TODO ACL is 'allow'... hmmm
+./inc/modules/admin/admin-inc.php:530:// @TODO Try to rewrite this to adminAddMenuSelectionBox()
+./inc/modules/admin/admin-inc.php:543: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY(). Please look some lines above for the dynamic query
./inc/modules/admin/overview-inc.php:160: // @TODO Rewrite this to a filter
./inc/modules/admin/overview-inc.php:274: // @TODO Rewrite this to something with include files
./inc/modules/admin/overview-inc.php:312: // @TODO This may also be rewritten to include files
./inc/modules/admin/what-chk_regs.php:65: // @TODO Rewritings: surname->surname,family->family,ip->REMOTE_ADDR,ref->refid,hash->user_hash in template
./inc/modules/admin/what-config_admins.php:148: // @TODO Rewrite this to filter 'run_sqls'
./inc/modules/admin/what-config_mods.php:137: // @TODO Rewritings: mod->module in template
-./inc/modules/admin/what-config_rallye_prices.php:202: // @TODO Rewritings: level->price_level, infos->info in template
-./inc/modules/admin/what-config_rallye_prices.php:219: // @TODO Rewrite these two constants
+./inc/modules/admin/what-config_rallye_prices.php:211: // @TODO Rewritings: level->price_level, infos->info in template
+./inc/modules/admin/what-config_rallye_prices.php:228: // @TODO Rewrite these two constants
./inc/modules/admin/what-config_register.php:67: // @TODO Move this HTML code into a template
./inc/modules/admin/what-edit_user.php:20: * @TODO Add support for ext-country *
./inc/modules/admin/what-email_archiv.php:91: // @TODO Rewrite to SQL_FETCHARRAY()
./inc/modules/admin/what-list_links.php:56: // @TODO Try to rewrite this to a filter
./inc/modules/admin/what-list_links.php:88: // @TODO Find a way to rewrite this. See some lines above for different queries
./inc/modules/admin/what-list_links.php:97: // @TODO Rewrite this to includes/filter
-./inc/modules/admin/what-list_payouts.php:118: // @TODO Do we need this time-consuming eval() here?
-./inc/modules/admin/what-list_rallyes.php:250: // @TODO Rewritings: userid->userid,opoints->curr_points,old->refs in template
-./inc/modules/admin/what-list_rallyes.php:303: // @TODO Rewritings: admin_id->admin_id in template
+./inc/modules/admin/what-list_payouts.php:117: // @TODO Do we need this time-consuming eval() here?
+./inc/modules/admin/what-list_rallyes.php:266: // @TODO Rewritings: userid->userid,opoints->curr_points,old->refs in template
./inc/modules/admin/what-list_sponsor.php:148: // @TODO Rewritings: surname->surname,family->family,ip->remote_addr in template
./inc/modules/admin/what-list_task.php:148: // @TODO Rewrite these templates to one and add $OUT
./inc/modules/admin/what-list_task.php:182: // @TODO Rewritings: admin->assigned_admin,userid->userid,type->task_type_msg in template
./inc/modules/member/what-unconfirmed.php:144: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
./inc/modules/order.php:75: // @TODO Unused: 2,4
./inc/monthly/monthly_bonus.php:68: // @TODO Rewrite this to a filter
-./inc/mysql-manager.php:1655: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
-./inc/mysql-manager.php:1876: // @TODO Rewrite this to $content = SQL_FETCHARRAY()
-./inc/mysql-manager.php:2196: // @TODO This can be somehow rewritten
+./inc/mysql-manager.php:1667: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
+./inc/mysql-manager.php:1888: // @TODO Rewrite this to $content = SQL_FETCHARRAY()
+./inc/mysql-manager.php:2208: // @TODO This can be somehow rewritten
./inc/mysql-manager.php:220: // @TODO Nothing helped???
+./inc/mysql-manager.php:2231:// @TODO Fix inconsistency between last_module and getWhat()
./inc/mysql-manager.php:255: // @TODO Rewrite this to a filter
./inc/mysql-manager.php:576: // @TODO Try to rewrite this to one or more functions
-./inc/mysql-manager.php:891:// @TODO Lame description for this function
+./inc/mysql-manager.php:903:// @TODO Lame description for this function
./inc/mysql-manager.php:93:// @TODO Can we cache this?
./inc/reset/reset_birthday.php:92: // @TODO 4 is hard-coded here, should we move it out in config?
./inc/wrapper-functions.php:127:// @TODO Implement $compress
./inc/wrapper-functions.php:134:// @TODO Implement $decompress
./inc/wrapper-functions.php:402:// @TODO Do some more sanity check here
-./mailid.php:131: // @TODO Rewrite this to a filter
-./mailid.php:211: // @TODO Rewrite this to a dynamic include or so
+./mailid.php:134: // @TODO Rewrite this to a filter
+./mailid.php:214: // @TODO Rewrite this to a dynamic include or so
./mailid.php:94: // @TODO Rewrite this to a filter
./mailid_top.php:135: // @TODO Rewrite this to a filter
./mailid_top.php:182: // @TODO Rewrite this to a filter
./mailid_top.php:99: // @TODO Rewrite this to a filter
./view.php:72: // @TODO No banner found, output some default banner
### ### DEPRECATION FOLLOWS: ### ###
-./inc/modules/admin/admin-inc.php:515:// @DEPRECATED
+./inc/modules/admin/admin-inc.php:531:// @DEPRECATED
./templates/de/emails/admins_mail_contct_admin.tpl:1:@DEPRECATED
./templates/de/emails/admins_msg_contct_admin.tpl:1:@DEPRECATED
### ### template-warnings.log follows: ### ###
// Check for userid
if (isGetRequestElementSet('userid')) {
// Init variables
- $points = 0;
+ $points = '0';
// Don't pay is the default...
$pay = false;
array(getUserData('userid'), detectRemoteAddr(), session_id()), __FILE__, __LINE__);
// Entry not found, points set and not logged in?
- if (((SQL_NUMROWS($result) == 0) || (isAdmin())) && ($points > 0) && (!isMember()) && (getConfig('beg_pay_mode') == 'NONE')) {
+ if (((SQL_NUMROWS($result) == '0') || (isAdmin())) && ($points > 0) && (!isMember()) && (getConfig('beg_pay_mode') == 'NONE')) {
// Admin is testing?
if (!isAdmin()) {
} elseif ((getUserData('status') != 'CONFIRMED') && (getUserData('status') != 'failed')) {
// Maybe locked/unconfirmed account?
$errorCode = generateErrorCodeFromUserStatus();
- } elseif ((getUserData('userid') == 0) || (getUserData('status') == 'failed')) {
+ } elseif ((getUserData('userid') == '0') || (getUserData('status') == 'failed')) {
// Inalid or locked account, so let's find out
if (fetchUserData(getRequestElement('userid'), 'nickname')) {
// Locked account
require('inc/config-global.php');
// Redirect only to registration page when this script is installed
-if ((isExtensionActive('debug')) && (getTotalFatalErrors() == 0)) {
+if ((isExtensionActive('debug')) && (getTotalFatalErrors() == '0')) {
// Is the request parameter set?
if (isPostRequestElementSet('request')) {
// Handle the request
// Set module
$GLOBALS['module'] = 'doubler';
-$GLOBALS['output_mode'] = 0;
+$GLOBALS['output_mode'] = '0';
// Load the required file(s)
require('inc/config-global.php');
// Is the 'doubler' extension active?
redirectOnUninstalledExtension('doubler');
-// Only check this if refid is provided. This will do the rest for us
-determineReferalId();
-
// Init content array
$content = array(
'message' => '',
$PURGE = getConfig('auto_purge');
// Init variables
- $admin_points = 0;
+ $admin_points = '0';
// Then check for outdated mail order. We don't delete them just the confirmation links will be deleted.
$result = SQL_QUERY_ESC("SELECT
array(bigintval($PURGE)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Start deleting procedure
- $userid = 0; $points = 0;
+ $userid = '0'; $points = '0';
while ($content = SQL_FETCHARRAY($result)) {
// Check if confirmation links are purged or not
$result_links = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `stats_id`=%s LIMIT 1",
if (($userid != $content['userid']) && ($userid > 0) && ($points > 0)) {
// Directly add points back to senders account
addPointsAutoPurge($userid, $points);
- $points = 0;
+ $points = '0';
} // END - if
// Add points
array(bigintval($PURGE)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Start deleting procedure
- $points = 0;
+ $points = '0';
while ($content = SQL_FETCHARRAY($result)) {
// Check if confirmation links are purged or not
$result_links = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s",
`sender` ASC", __FILE__, __LINE__);
// Reset counter...
-$DELETED = 0;
+$DELETED = '0';
// Do we have "purged" mails?
if (SQL_NUMROWS($result_mails) > 0) {
* @access private
* @var integer
*/
- var $_word_wrap = 0;
+ var $_word_wrap = '0';
/**
* Wether to recode \n -> <br /> or not in description
* @access private
* @var int
*/
- var $_item_count = 0;
+ var $_item_count = '0';
/**
* No of max <item>s
$this->out .= $this->cache();
$this->out .= "</table>";
$this->_output = '';
- $this->_item_count = 0;
+ $this->_item_count = '0';
return true;
}
}
if( !isset( $this->_depth[$this->get_parser_id($parser)] ) ) {
- $this->_depth[$this->get_parser_id($parser)] = 0;
+ $this->_depth[$this->get_parser_id($parser)] = '0';
}
$this->_depth[$this->get_parser_id($parser)]++;
array_push($this->_tags, $name);
if( !isset( $this->_cdepth[$this->get_parser_id($parser)] ) ) {
- $this->_cdepth[$this->get_parser_id($parser)] = 0;
+ $this->_cdepth[$this->get_parser_id($parser)] = '0';
}
$this->_cdepth[$this->get_parser_id($parser)]++;
array_push($this->_ctags, $name);
// Wrap with <br />\n
$this->_item['description'] = wordwrap($this->_item['description'], $this->_word_wrap, "*<br>\n");
}
- elseif (($this->_word_wrap == 0) && (!$this->_use_nl2br))
+ elseif (($this->_word_wrap == '0') && (!$this->_use_nl2br))
{
// Strip tags out instead when word-wrap is disabled
$this->_item['description'] = strip_tags($this->_item['description'], '<a>, <img>');
*/
function get_parser_id ($parser) {
// Default is zero
- $id = 0;
+ $id = '0';
// Is it a resource?
if (is_resource($parser)) {
$_cache_f = $this->_cache_dir.$this->_cached_file;
- if ( (!file_exists($_cache_f)) || (filemtime($_cache_f) < $this->_refresh) || (filesize($_cache_f) == 0)) {
+ if ( (!file_exists($_cache_f)) || (filemtime($_cache_f) < $this->_refresh) || (filesize($_cache_f) == '0')) {
// We have to parse the remote file
$this->_use_cached_file = false;
// --> we want to provide proper Information for Use in
if($arr[0]=='') {
$path = '/';
}
- for($i = 0;$i<$c;$i++)
+ for($i = '0';$i<$c;$i++)
{
if($arr[$i]!='') {
$path .= $arr[$i].'/';
}
- for ( $i = 0; !feof ($fp) ; $i++)
+ for ( $i = '0'; !feof ($fp) ; $i++)
{
$usable_data[$i] = "";
$usable_data[$i] = fgets($fp,4096);
}
$i++;
}
- if ((count($dummy) > 0) && (count($reply) == 0) && (!$isContent)) {
+ if ((count($dummy) > 0) && (count($reply) == '0') && (!$isContent)) {
// Transfer content from dummy
$reply = $content;
}
}
// Update config entries
-function updateConfiguration ($entries, $values, $updateMode='') {
+function updateConfiguration ($entries, $values, $updateMode='', $config = '0') {
// Do not update config in CSS mode
if ((getOutputMode() == 1) || (getOutputMode() == -1) || (isInstallationPhase())) {
return;
// Run database update
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "entries={$entries}");
- SQL_QUERY("UPDATE `{?_MYSQL_PREFIX?}_config` SET ".$entries." WHERE `config`=0 LIMIT 1", __FUNCTION__, __LINE__);
+ SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_config` SET ".$entries." WHERE `config`=%s LIMIT 1",
+ array(bigintval($config)), __FUNCTION__, __LINE__);
//* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):entries={$entries},affectedRows={$affectedRows}<br />");
// Rebuild cache
}
// Filter for loading configuration
-function FILTER_LOAD_CONFIGURATION ($no = 0) {
+function FILTER_LOAD_CONFIGURATION ($no = '0') {
// Check for cache extension, cache-array and if the requested configuration is in cache
if ((isset($GLOBALS['cache_array']['config'][$no])) && (is_array($GLOBALS['cache_array']['config'][$no]))) {
// Load config from cache
$lines = mysql_num_rows($result);
// Is the result empty? Then we have an error!
- if (empty($lines)) $lines = 0;
+ if (empty($lines)) $lines = '0';
} elseif (SQL_IS_LINK_UP()) {
// No resource given, no lines found!
- $lines = 0;
+ $lines = '0';
}
// Return lines
if ($remove_numerical) {
// So let's remove all numerical elements to save memory!
$max = count($row);
- for ($idx = 0; $idx < ($max / 2); $idx++) {
+ for ($idx = '0'; $idx < ($max / 2); $idx++) {
// Remove entry
unset($row[$idx]);
} // END - for
}
// SQL result
-function SQL_RESULT ($res, $row, $field = 0) {
+function SQL_RESULT ($res, $row, $field = '0') {
// Is $res valid?
if ((!is_resource($res)) || (!SQL_IS_LINK_UP())) return false;
// Do we have no entry on ADD or an entry on DROP?
// 123 4 4 3 3 4 4 32 23 4 4 3 3 4 4 321
- if (((SQL_NUMROWS($result) == 0) && (strpos($sql, 'ADD') !== false)) || ((SQL_NUMROWS($result) == 1) && (strpos($sql, 'DROP') !== false))) {
+ if (((SQL_NUMROWS($result) == '0') && (strpos($sql, 'ADD') !== false)) || ((SQL_NUMROWS($result) == 1) && (strpos($sql, 'DROP') !== false))) {
// Do the query
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Executing: ' . $sql);
$result = SQL_QUERY($sql, $F, $L, false);
// Skip further attempt(s)
break;
- } elseif ((((SQL_NUMROWS($result) == 1) && (strpos($sql, 'ADD') !== false)) || ((SQL_NUMROWS($result) == 0) && (strpos($sql, 'DROP') !== false))) && ($columnName != 'KEY')) {
+ } elseif ((((SQL_NUMROWS($result) == 1) && (strpos($sql, 'ADD') !== false)) || ((SQL_NUMROWS($result) == '0') && (strpos($sql, 'DROP') !== false))) && ($columnName != 'KEY')) {
// Abort here because it is alreay there
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Skipped: ' . $sql);
break;
// Download functions file
loadIncludeOnce($funcsInclude);
} // END - if
- } elseif ((!isset($GLOBALS['cache_array']['extension']['ext_func'][$ext_name])) && (isDebugModeEnabled()) && (getOutputMode() == 0) && ($ext_name != 'sql_patches') && (substr($ext_name, 0, 10) != 'admintheme') && (getExtensionMode() == 'test')) {
+ } elseif ((!isset($GLOBALS['cache_array']['extension']['ext_func'][$ext_name])) && (isDebugModeEnabled()) && (getOutputMode() == '0') && ($ext_name != 'sql_patches') && (substr($ext_name, 0, 10) != 'admintheme') && (getExtensionMode() == 'test')) {
// No functions file is not so good...
logDebugMessage(__FUNCTION__, __LINE__, sprintf("NOTICE: Extension %s has no own functions file or we cannot read from it. mode=%s",
$ext_name,
initExtensionUpdateDependencies();
// Is the task id zero? Then we need to auto-fix it here
- if ($task_id == 0) {
+ if ($task_id == '0') {
// Try to find the task
$task_id = determineExtensionTaskId(getCurrentExtensionName());
// Still zero and not in dry-run?
- if (($task_id == 0) && (!getExtensionDryRun())) {
+ if (($task_id == '0') && (!getExtensionDryRun())) {
// Then request a bug report
debug_report_bug(sprintf("%s: task_id is still zero after determineExtensionTaskId(%s)",
__FUNCTION__,
} // END - for
// Is there no update?
- if (countExtensionUpdateDependencies(getCurrentExtensionName()) == 0) {
+ if (countExtensionUpdateDependencies(getCurrentExtensionName()) == '0') {
// Then test is passed!
$test = true;
} // END - if
// Get extension id from name
function getExtensionId ($ext_name) {
// Init id number
- $ret = 0;
+ $ret = '0';
// Do we have cache?
if (isset($GLOBALS['cache_array']['extension']['ext_id'][$ext_name])) {
// Is the extension there?
if (isExtensionInstalled($ext_name)) {
// Check if task is not there
- if (determineTaskIdBySubject($subject) == 0) {
+ if (determineTaskIdBySubject($subject) == '0') {
// Create extension update-task
createNewTask($subject, $notes, 'EXTENSION_UPDATE', 0, $adminId);
} // END - if
// Creates a new task for newly installed extension
function createNewExtensionTask ($adminId, $subject, $ext) {
// Not installed and do we have created a task for the admin?
- if ((determineTaskIdBySubject($subject) == 0) && (!isExtensionInstalled($ext))) {
+ if ((determineTaskIdBySubject($subject) == '0') && (!isExtensionInstalled($ext))) {
// Set default message if ext-foo is missing
$message = sprintf(getMessage('ADMIN_EXT_TEXT_FILE_MISSING'), $ext);
$subject = sprintf("[%s:] %s", $ext, getMessage('TASK_SUBJ_EXTENSION_DEACTIVATED'));
// Not installed and do we have created a task for the admin?
- if ((determineTaskIdBySubject($subject) == 0) && (getExtensionVersion($ext) != '')) {
+ if ((determineTaskIdBySubject($subject) == '0') && (getExtensionVersion($ext) != '')) {
// Task not created so add it
createNewTask($subject, SQL_ESCAPE(loadTemplate('task_ext_deactivated', true, $ext)), 'EXTENSION_DEACTIVATION');
} // END - if
// Determines the task id for given extension
function determineExtensionTaskId ($ext_name) {
// Default is not found
- $task_id = 0;
+ $task_id = '0';
// Search for extension task's id
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `task_type`='EXTENSION' AND `subject`='[%s:]' LIMIT 1",
// Determines the task id for given subject
function determineTaskIdBySubject ($subject) {
// Default is not found
- $task_id = 0;
+ $task_id = '0';
// Search for task id
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `subject` LIKE '%s%%' LIMIT 1",
// Init iterator for update depencies
function initExtensionUpdateIterator () {
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName());
- $GLOBALS['ext_depend_iterator'][getCurrentExtensionName()] = 0;
+ $GLOBALS['ext_depend_iterator'][getCurrentExtensionName()] = '0';
}
// Getter for depency iterator
case '0.5.6': // SQL queries for v0.5.6
// Get current month
$curr = date('m', time());
- if (strlen($curr) == 1) $curr = 0 . $curr;
+ if (strlen($curr) == 1) $curr = '0' . $curr;
if ($curr == "00") $curr = "12";
// Generate timemark...
// - Request parameters incomplete
addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_codes` (`network_code`) VALUES ('REQUEST_PARAMS_INCOMPLETE')");
+ // Sponsor networks
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_data` (`network_short_name`, `network_title`, `network_reflink`, `network_data_seperator`, `network_row_seperator`, `network_request_type`, `network_charset`) VALUES ('yoomedia', 'Yoo!Media Solutions', 'http://www.yoomedia.de?ref=1715', '|', '|', 'GET', 'WINDOWS-1252')");
+
// Admin menu entries
addAdminMenuSql('network',NULL,'Werbenetzwerke','Verwalten Sie hier Werbenetzwerke (API-Anbindung), versenden Sie deren Mails, oder übernehmen Sie deren Textlinks und vieles mehr. <strong>VORSICHT:</strong> Das Einrichten von weiteren Werbenetzwerken ist nicht leicht, dafür aber sehr flexibel! Sollte ein Netzwerk fehlen, so melden Sie dies bitte <a href="http://forum.mxchange.org/topic-462.html" target="_blank" title="Direktlink zum Forum">im Forum</a>!',4);
addAdminMenuSql('network','config_networks','API-Daten','Stellen Sie Ihre Affiliate- Webseiten-Id und API-Passwort ein. Diese erhalten Sie zu über 99% aus dem jeweiligen Zugangsbereich des Anbieters. Sollten Sie bei einem Netzwerk noch nicht angemeldet sein, verwenden Sie bitte meinen Referal-Link.',1);
addAdminMenuSql('network','config_network','Einstellungen','Stellen Sie generelle Einstellungen ein, die für alle Werbenetzwerke gelten, wie z.B. Cache-Erneuerungsinterval. Generell sind aber die Einstellungen in Ordnung, da z.B. sonst Ihre freien Abfragen beim Werbenetzwerk sich zu schnell abbauen.',4);
addAdminMenuSql('network','list_network_reloads','Reload-Sperren','Listen oder löschen Sie hier Reload-Sperren. <strong>Vorsicht:</strong> Die hier gespeicherten Reload-Sperren sind vom jeweiligen Werbenetzwerk übernommen. Eventuell verdienen Sie nichts, wenn Sie z.B. eine Mail innerhalb der Reload-Sperre erneut versenden.',5);
addAdminMenuSql('network','list_networks','Auflisten/Verwalten','<strong>Experten-Einstellungen!</strong> Hier ändern Sie die Einstellungen an den Grunddaten (Stammdaten) des jeweiligen Werbenetzwerks ab. Sie sollten hier generell nichts einstellen und <a href="http://forum.mxchange.org/forum-43.html" target="_blank" title="Direktlink zum Forum">im Forum</a> um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten möchten.',6);
- addAdminMenuSql('network','list_network_types','Werbearten verwalten','<strong>Experten-Einstellungen!</strong> Hier ändern Sie die Einstellungen zu den Werbearten pro Werbenetzwerken. Sie sollten hier generell nichts einstellen und <a href="http://forum.mxchange.org/forum-43.html" target="_blank" title="Direktlink zum Forum">im Forum</a> um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten möchten.',7);
+ addAdminMenuSql('network','list_network_types','Werbearten','<strong>Experten-Einstellungen!</strong> Hier ändern Sie die Einstellungen zu den Werbearten pro Werbenetzwerken. Sie sollten hier generell nichts einstellen und <a href="http://forum.mxchange.org/forum-43.html" target="_blank" title="Direktlink zum Forum">im Forum</a> um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten möchten.',7);
addAdminMenuSql('network','list_network_params','Abfrageparameter','<strong>Experten-Einstellungen!</strong> Hier stellen Sie die Abfrageparameter (wie sie genannt werden müssen, um das API-Script korrekt aufrufen zu können) ein, pro Werbenetzwerk. Sie sollten hier generell nichts einstellen und <a href="http://forum.mxchange.org/forum-43.html" target="_blank" title="Direktlink zum Forum">im Forum</a> um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten möchten.',8);
addAdminMenuSql('network','list_network_code_types','Rückgabewerte','<strong>Experten-Einstellungen!</strong> Hier stellen Sie die Rückgabewerte ein, die im Falle eines Fehlers pro API-Script kommen können. Sie sollten hier generell nichts einstellen und <a href="http://forum.mxchange.org/forum-43.html" target="_blank" title="Direktlink zum Forum">im Forum</a> um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten möchten.',9);
- addAdminMenuSql('network','list_network_codes','Fehlercodes einstellen','<strong>Experten-Einstellungen!</strong> Hier stellen Sie die Namen von Fehlercodes ein, die Scripte zurückliefern können. <strong>Dies sind INTERNE Daten und sollten nur vom MXChange-Entwicklerteam angepasst werden.</strong> Stellen Sie an diesen Einstellungen bitte nichts um. Sie sollten hier generell nichts einstellen und <a href="http://forum.mxchange.org/forum-43.html" target="_blank" title="Direktlink zum Forum">im Forum</a> um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten möchten.',10);
+ addAdminMenuSql('network','list_network_codes','Fehlercodes','<strong>Experten-Einstellungen!</strong> Hier stellen Sie die Namen von Fehlercodes ein, die Scripte zurückliefern können. <strong>Dies sind INTERNE Daten und sollten nur vom MXChange-Entwicklerteam angepasst werden.</strong> Stellen Sie an diesen Einstellungen bitte nichts um. Sie sollten hier generell nichts einstellen und <a href="http://forum.mxchange.org/forum-43.html" target="_blank" title="Direktlink zum Forum">im Forum</a> um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten möchten.',10);
// Configuration entries
addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `network_cache_refresh` BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (60 * 15) . '');
// Admin menu
addAdminMenuSql('rallye', NULL, 'Rallye-Management','Richten Sie neue Ref-Rallyes ein, die zeitgesteuert anfangen und aufhöhren. Dabei wird alles weitere automatisch geregelt.',9);
addAdminMenuSql('rallye','add_rallye','Neue Rallye hinzufügen','Neue Ref-Rallye hinzufügen.',1);
+ // @TODO Fix config_rallye_prices to list_rallye_prices
addAdminMenuSql('rallye','config_rallye_prices','Preise einrichten','Richten Sie Preise zu den Rallyes ein.',2);
addAdminMenuSql('rallye','list_rallyes','Rallyes verwalten','Alle bestehenden Ref-Rallyes auflisten, bearbeiten, stoppen, löschen usw.',3);
$filterFunction = $filterArray['filter_function'];
// Set counter to default
- $GLOBALS['cache_array']['filter']['counter'][$filterName][$filterFunction] = 0;
+ $GLOBALS['cache_array']['filter']['counter'][$filterName][$filterFunction] = '0';
// Mark this filter as loaded (from database)
$GLOBALS['cache_array']['filter']['loaded'][$filterName][$filterFunction] = true;
// Simply add it to the array
//* DEBUG: */ print __FUNCTION__.': filterName='.$filterName.',filterFunction='.$filterFunction.'<br />';
$GLOBALS['cache_array']['filter']['chains'][$filterName][$filterFunction] = 'A';
- $GLOBALS['cache_array']['filter']['counter'][$filterName][$filterFunction] = 0;
+ $GLOBALS['cache_array']['filter']['counter'][$filterName][$filterFunction] = '0';
} // END - if
}
} // END - if
// Nothing is added/remove by default
- $inserted = 0;
- $removed = 0;
+ $inserted = '0';
+ $removed = '0';
// Prepare SQL queries
$insertSQL = "INSERT INTO `{?_MYSQL_PREFIX?}_filters` (`filter_name`,`filter_function`,`filter_active`) VALUES";
// Load more reset scripts
function FILTER_RUN_RESET_INCLUDES () {
// Is the reset set or old sql_patches?
- if (((!isResetModeEnabled()) || (!isExtensionInstalled('sql_patches'))) && (getOutputMode() == 0)) {
+ if (((!isResetModeEnabled()) || (!isExtensionInstalled('sql_patches'))) && (getOutputMode() == '0')) {
// Then abort here
logDebugMessage(__FUNCTION__, __LINE__, 'Cannot run reset! Please report this bug. Thanks');
} // END - if
} // END - if
// Init counter
- $GLOBALS['pool_cnt'] = 0;
+ $GLOBALS['pool_cnt'] = '0';
// Init & set the include pool
initIncludePool('pool');
// Handles fatal errors
function FILTER_HANDLE_FATAL_ERRORS () {
// Do we have errors to handle and right output mode?
- if ((getTotalFatalErrors() == 0) || (getOutputMode() != 0)) {
+ if ((getTotalFatalErrors() == '0') || (getOutputMode() != 0)) {
// Abort executing here
return false;
} // END - if
function FILTER_DISPLAY_PARSING_TIME () {
// Shall we display the parsing time and number of queries?
// 1234 5 54 4 5 5 4 4 5 543 3 4432 2 33 2 2 21
- if ((((isExtensionInstalledAndNewer('sql_patches', '0.4.1')) && (getConfig('show_timings') == 'Y') && (!isGetRequestElementSet('frame'))) || (isInstallationPhase())) && (getOutputMode() == 0) && ($GLOBALS['header_sent'] == 2)) {
+ if ((((isExtensionInstalledAndNewer('sql_patches', '0.4.1')) && (getConfig('show_timings') == 'Y') && (!isGetRequestElementSet('frame'))) || (isInstallationPhase())) && (getOutputMode() == '0') && ($GLOBALS['header_sent'] == 2)) {
// Then display it here
displayParsingTime();
} // END - if
} // END - if
// Init counter
- $cnt = 0;
+ $cnt = '0';
// Compile and run finished rendered HTML code
while (((strpos($GLOBALS['output'], '{--') > 0) || (strpos($GLOBALS['output'], '{!') > 0) || (strpos($GLOBALS['output'], '{?') > 0)) && ($cnt < 3)) {
// Getter for total fatal message count
function getTotalFatalErrors () {
// Init coun
- $count = 0;
+ $count = '0';
// Do we have at least the first entry?
if (!empty($GLOBALS['fatal_messages'][0])) {
// Init some data
$ret = '';
- if (empty($GLOBALS['refid'])) $GLOBALS['refid'] = 0;
+ if (empty($GLOBALS['refid'])) $GLOBALS['refid'] = '0';
// Base directory
$basePath = sprintf("%stemplates/%s/html/", getConfig('PATH'), getLanguage());
$ret = '';
if ((strpos($GLOBALS['tpl_content'], '$') !== false) || (strpos($GLOBALS['tpl_content'], '{--') !== false) || (strpos($GLOBALS['tpl_content'], '{!') !== false) || (strpos($GLOBALS['tpl_content'], '{?') !== false)) {
// Normal HTML output?
- if (getOutputMode() == 0) {
+ if (getOutputMode() == '0') {
// Add surrounding HTML comments to help finding bugs faster
$ret = "<!-- Template " . $template . " - Start -->\n" . $GLOBALS['tpl_content'] . "<!-- Template " . $template . " - End -->\n";
}
// Loads an email template and compiles it
-function loadEmailTemplate ($template, $content = array(), $UID = 0) {
+function loadEmailTemplate ($template, $content = array(), $UID = '0') {
global $DATA;
// Make sure all template names are lowercase!
// Expiration in a nice output format
// NOTE: Use $content[expiration] in your templates instead of $EXPIRATION
- if (getConfig('auto_purge') == 0) {
+ if (getConfig('auto_purge') == '0') {
// Will never expire!
$EXPIRATION = getMessage('MAIL_WILL_NEVER_EXPIRE');
} else {
}
// Generate a password in a specified length or use default password length
-function generatePassword ($length = 0) {
+function generatePassword ($length = '0') {
// Auto-fix invalid length of zero
- if ($length == 0) $length = getConfig('pass_len');
+ if ($length == '0') $length = getConfig('pass_len');
// Initialize array with all allowed chars
$ABC = explode(',', 'a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,0,1,2,3,4,5,6,7,8,9,-,+,_,/,.');
// Start creating password
$PASS = '';
- for ($i = 0; $i < $length; $i++) {
+ for ($i = '0'; $i < $length; $i++) {
$PASS .= $ABC[mt_rand(0, count($ABC) -1)];
} // END - for
}
// Generates a human-readable timestamp from the Uni* stamp
-function generateDateTime ($time, $mode = 0) {
+function generateDateTime ($time, $mode = '0') {
// Filter out numbers
$time = bigintval($time);
// If the stamp is zero it mostly didn't "happen"
- if ($time == 0) {
+ if ($time == '0') {
// Never happend
return getMessage('NEVER_HAPPENED');
} // END - if
}
// Translates the american decimal dot into a german comma
-function translateComma ($dotted, $cut = true, $max = 0) {
+function translateComma ($dotted, $cut = true, $max = '0') {
// Default is 3 you can change this in admin area "Misc -> Misc Options"
if (!isConfigEntrySet('max_comma')) setConfigEntry('max_comma', 3);
if ($max > 0) $maxComma = $max;
// Cut zeros off?
- if (($cut === true) && ($max == 0)) {
+ if (($cut === true) && ($max == '0')) {
// Test for commata if in cut-mode
$com = explode('.', $dotted);
if (count($com) < 2) {
// Don't display commatas even if there are none... ;-)
- $maxComma = 0;
+ $maxComma = '0';
}
} // END - if
} // END - if
// Init count
- $ret = 0;
+ $ret = '0';
// Count all entries
foreach ($array as $key => $selected) {
* Sie, dass es doch nicht so schwer ist! :-) *
* *
************************************************************************/
-function array_pk_sort (&$array, $a_sort, $primary_key = 0, $order = -1, $nums = false) {
+function array_pk_sort (&$array, $a_sort, $primary_key = '0', $order = -1, $nums = false) {
$dummy = $array;
while ($primary_key < count($a_sort)) {
foreach ($dummy[$a_sort[$primary_key]] as $key => $value) {
}
//
-function addSelectionBox ($type, $default, $prefix = '', $id = 0, $class = 'register_select') {
+function addSelectionBox ($type, $default, $prefix = '', $id = '0', $class = 'register_select') {
$OUT = '';
if ($type == 'yn') {
case 'sec':
case 'min':
- for ($idx = 0; $idx < 60; $idx+=5) {
- if (strlen($idx) == 1) $idx = 0 . $idx;
+ for ($idx = '0'; $idx < 60; $idx+=5) {
+ if (strlen($idx) == 1) $idx = '0' . $idx;
$OUT .= "<option value=\"" . $idx."\"";
if ($default == $idx) $OUT .= ' selected="selected"';
$OUT .= ">" . $idx."</option>\n";
break;
case 'hour':
- for ($idx = 0; $idx < 24; $idx++) {
- if (strlen($idx) == 1) $idx = 0 . $idx;
+ for ($idx = '0'; $idx < 24; $idx++) {
+ if (strlen($idx) == 1) $idx = '0' . $idx;
$OUT .= "<option value=\"" . $idx."\"";
if ($default == $idx) $OUT .= ' selected="selected"';
$OUT .= ">" . $idx."</option>\n";
// At least 10 numbers shall be secure enought!
$len = getConfig('code_length');
- if ($len == 0) $len = $length;
- if ($len == 0) $len = 10;
+ if ($len == '0') $len = $length;
+ if ($len == '0') $len = 10;
// Cut off requested counts of number
$return = substr(str_replace('.', '', $rcode), 0, $len);
if ($castValue === true) $ret = (double)$ret;
// Has the whole value changed?
- // @TODO Remove this if() block if all is working fine
if ('' . $ret . '' != '' . $num . '') {
// Log the values
debug_report_bug('Problem with number found. ret=' . $ret . ', num='. $num);
// Insert the code in $img_code into jpeg or PNG image
function generateImageOrCode ($img_code, $headerSent = true) {
// Is the code size oversized or shouldn't we display it?
- if ((strlen($img_code) > 6) || (empty($img_code)) || (getConfig('code_length') == 0)) {
+ if ((strlen($img_code) > 6) || (empty($img_code)) || (getConfig('code_length') == '0')) {
// Stop execution of function here because of over-sized code length
debug_report_bug('img_code ' . $img_code .' has invalid length. img_code()=' . strlen($img_code) . ' code_length=' . getConfig('code_length'));
} elseif ($headerSent === false) {
//* DEBUG: */ print("*" . $stamp.'/' . $timestamp."*<br />");
// Do we have a leap year?
- $SWITCH = 0;
+ $SWITCH = '0';
$TEST = date('Y', time()) / 4;
$M1 = date('m', time());
$M2 = date('m', (time() + $timestamp));
//* DEBUG: */ print("s={$s}<br />");
// Is seconds zero and time is < 60 seconds?
- if (($s == 0) && ($timestamp < 60)) {
+ if (($s == '0') && ($timestamp < 60)) {
// Fix seconds
$s = round($timestamp);
} // END - if
if (ereg('Y', $display) || (empty($display))) {
// Generate year selection
$OUT .= " <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix."_ye\" size=\"1\">\n";
- for ($idx = 0; $idx <= 10; $idx++) {
+ for ($idx = '0'; $idx <= 10; $idx++) {
$OUT .= " <option class=\"mini_select\" value=\"" . $idx."\"";
if ($idx == $Y) $OUT .= ' selected="selected"';
$OUT .= ">" . $idx."</option>\n";
if (ereg('M', $display) || (empty($display))) {
// Generate month selection
$OUT .= " <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix."_mo\" size=\"1\">\n";
- for ($idx = 0; $idx <= 11; $idx++)
+ for ($idx = '0'; $idx <= 11; $idx++)
{
$OUT .= " <option class=\"mini_select\" value=\"" . $idx."\"";
if ($idx == $M) $OUT .= ' selected="selected"';
if (ereg("W", $display) || (empty($display))) {
// Generate week selection
$OUT .= " <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix."_we\" size=\"1\">\n";
- for ($idx = 0; $idx <= 4; $idx++) {
+ for ($idx = '0'; $idx <= 4; $idx++) {
$OUT .= " <option class=\"mini_select\" value=\"" . $idx."\"";
if ($idx == $W) $OUT .= ' selected="selected"';
$OUT .= ">" . $idx."</option>\n";
if (ereg("D", $display) || (empty($display))) {
// Generate day selection
$OUT .= " <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix."_da\" size=\"1\">\n";
- for ($idx = 0; $idx <= 31; $idx++) {
+ for ($idx = '0'; $idx <= 31; $idx++) {
$OUT .= " <option class=\"mini_select\" value=\"" . $idx."\"";
if ($idx == $D) $OUT .= ' selected="selected"';
$OUT .= ">" . $idx."</option>\n";
if (ereg("h", $display) || (empty($display))) {
// Generate hour selection
$OUT .= " <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix."_ho\" size=\"1\">\n";
- for ($idx = 0; $idx <= 23; $idx++) {
+ for ($idx = '0'; $idx <= 23; $idx++) {
$OUT .= " <option class=\"mini_select\" value=\"" . $idx."\"";
if ($idx == $h) $OUT .= ' selected="selected"';
$OUT .= ">" . $idx."</option>\n";
if (ereg('m', $display) || (empty($display))) {
// Generate minute selection
$OUT .= " <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix."_mi\" size=\"1\">\n";
- for ($idx = 0; $idx <= 59; $idx++) {
+ for ($idx = '0'; $idx <= 59; $idx++) {
$OUT .= " <option class=\"mini_select\" value=\"" . $idx."\"";
if ($idx == $m) $OUT .= ' selected="selected"';
$OUT .= ">" . $idx."</option>\n";
if (ereg("s", $display) || (empty($display))) {
// Generate second selection
$OUT .= " <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix."_se\" size=\"1\">\n";
- for ($idx = 0; $idx <= 59; $idx++) {
+ for ($idx = '0'; $idx <= 59; $idx++) {
$OUT .= " <option class=\"mini_select\" value=\"" . $idx."\"";
if ($idx == $s) $OUT .= ' selected="selected"';
$OUT .= ">" . $idx."</option>\n";
//
function createTimestampFromSelections ($prefix, $postData) {
// Initial return value
- $ret = 0;
+ $ret = '0';
// Do we have a leap year?
- $SWITCH = 0;
+ $SWITCH = '0';
$TEST = date('Y', time()) / 4;
$M1 = date('m', time());
// If so and if current time is before 02/29 and estimated time is after 02/29 then add 86400 seconds (one day)
// Sends a raw request to another host
function sendRawRequest ($host, $request) {
// Init errno and errdesc with 'all fine' values
- $errno = 0; $errdesc = '';
+ $errno = '0'; $errdesc = '';
// Initialize array
$response = array('', '', '');
// Scramble string here
//* DEBUG: */ outputHtml("***Original=" . $str."***<br />");
- for ($idx = 0; $idx < strlen($str); $idx++) {
+ for ($idx = '0'; $idx < strlen($str); $idx++) {
// Get char on scrambled position
$char = substr($str, $scrambleNums[$idx], 1);
// Begin descrambling
$orig = str_repeat(' ', 40);
//* DEBUG: */ outputHtml("+++Scrambled=" . $str."+++<br />");
- for ($idx = 0; $idx < 40; $idx++) {
+ for ($idx = '0'; $idx < 40; $idx++) {
$char = substr($str, $idx, 1);
$orig = substr_replace($orig, $char, $scrambleNums[$idx], 1);
} // END - for
$scrambleNumbers = array();
// First we need to setup randomized numbers from 0 to 31
- for ($idx = 0; $idx < $len; $idx++) {
+ for ($idx = '0'; $idx < $len; $idx++) {
// Generate number
$rand = mt_rand(0, ($len -1));
if ((isExtensionInstalled('sql_patches')) && (isExtensionInstalledAndNewer('other', '0.2.5')) && (isConfigEntrySet('_PRIME')) && (isConfigEntrySet('secret_key')) && (isConfigEntrySet('master_salt'))) {
// Only calculate when the secret key is generated
$newHash = ''; $start = 9;
- for ($idx = 0; $idx < 10; $idx++) {
+ for ($idx = '0'; $idx < 10; $idx++) {
$part1 = hexdec(substr($passHash, $start, 4));
$part2 = hexdec(substr(getConfig('secret_key'), $start, 4));
$mod = dechex($idx);
$start = explode(' ', $GLOBALS['startTime']);
$end = explode(' ', $endTime);
$runTime = $end[0] - $start[0];
- if ($runTime < 0) $runTime = 0;
+ if ($runTime < 0) $runTime = '0';
// Prepare output
$content = array(
$ret = getSession('mxchange_theme');
// Is it valid?
- if (getThemeId($ret) == 0) {
+ if (getThemeId($ret) == '0') {
// Fix it to default
$ret = 'default';
} // END - if
} // END - if
// Default id
- $id = 0;
+ $id = '0';
// Is the cache entry there?
if (isset($GLOBALS['cache_array']['themes']['id'][$name])) {
$akt_vers = array();
// Init value for counting the founded keywords
- $res = 0;
+ $res = '0';
// Searches all Files and there date of the last modifikation and puts the newest File in $last_changed.
searchDirsRecursive($next_dir, $last_changed); // @TODO small change to API to $last_changed = searchDirsRecursive($next_dir, $time);
// Read from source file
$line = fgets ($fp, 1024);
- if (strpos($line, $search) > -1) { $next = 0; $found = true; }
+ if (strpos($line, $search) > -1) { $next = '0'; $found = true; }
if ($next > -1) {
if ($next === $seek) {
return false;
}
// Send notification to admin
-function sendAdminNotification ($subject, $templateName, $content=array(), $userid = 0) {
+function sendAdminNotification ($subject, $templateName, $content=array(), $userid = '0') {
if (isExtensionInstalledAndNewer('admins', '0.4.1')) {
// Send new way
sendAdminsEmails($subject, $templateName, $content, $userid);
$GLOBALS['refid'] = getConfig('def_refid');
} else {
// No default id when sql_patches is not installed or none set
- $GLOBALS['refid'] = 0;
+ $GLOBALS['refid'] = '0';
}
// Set cookie when default refid > 0
- if (!isSessionVariableSet('refid') || (!empty($GLOBALS['refid'])) || ((getSession('refid') == 0) && (isConfigEntrySet('def_refid')) && (getConfig('def_refid') > 0))) {
+ if (!isSessionVariableSet('refid') || (!empty($GLOBALS['refid'])) || ((getSession('refid') == '0') && (isConfigEntrySet('def_refid')) && (getConfig('def_refid') > 0))) {
// Default is not found
$found = false;
// Init member id
function initMemberId () {
- $GLOBALS['member_id'] = 0;
+ $GLOBALS['member_id'] = '0';
}
// Setter for member id
function setMemberId ($memberid) {
// We should not set member id to zero
- if ($memberid == 0) debug_report_bug('Userid should not be set zero.');
+ if ($memberid == '0') debug_report_bug('Userid should not be set zero.');
// Set it secured
$GLOBALS['member_id'] = bigintval($memberid);
// Getter for member id or returns zero
function getMemberId () {
// Default member id
- $memberid = 0;
+ $memberid = '0';
// Is the member id set?
if (isMemberIdSet()) {
}
// Init variables
-$bsent = 0; $bclicks = 0; $bcount = 0;
+$bsent = '0'; $bclicks = '0'; $bcount = '0';
// Check for normal mails
$result_media = SQL_QUERY('SELECT SUM(max_rec) AS max_rec, SUM(clicks) AS clicks
FROM `{?_MYSQL_PREFIX?}_user_stats`', __FILE__, __LINE__);
list($nsent, $nclicks) = SQL_FETCHROW($result_media);
-if (empty($nsent)) $nsent = 0;
-if (empty($nclicks)) $nclicks = 0;
+if (empty($nsent)) $nsent = '0';
+if (empty($nclicks)) $nclicks = '0';
// Free memory
SQL_FREERESULT($result_media);
$result_media = SQL_QUERY('SELECT SUM(mails_sent) AS bonus_sent, SUM(clicks) AS bonus_clicks
FROM `{?_MYSQL_PREFIX?}_bonus`', __FILE__, __LINE__);
list($bsent, $bclicks) = SQL_FETCHROW($result_media);
- if (empty($bsent)) $bsent = 0;
- if (empty($bclicks)) $bclicks = 0;
+ if (empty($bsent)) $bsent = '0';
+ if (empty($bclicks)) $bclicks = '0';
} // END - if
// Load (maybe) missing file
// Closing HEAD tag
if (getOutputMode() != 1) outputHtml('</head>');
- if ($GLOBALS['header_sent'] == 0) $GLOBALS['header_sent'] = 1;
+ if ($GLOBALS['header_sent'] == '0') $GLOBALS['header_sent'] = 1;
} // END - if
// Add BODY tag or not?
addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_MISSING_DUMPS'));
} // END - if
- if (getTotalFatalErrors() == 0) {
+ if (getTotalFatalErrors() == '0') {
// Set type and prefix from POST data
setConfigEntry('_TABLE_TYPE' , postRequestElement('mysql', 'type'));
setConfigEntry('_MYSQL_PREFIX', postRequestElement('mysql', 'prefix'));
//* DEBUG: */ die('<pre>'.print_r(getSqls(), true).'</pre>');
// Are some SQLs found?
- if (countSqls() == 0) {
+ if (countSqls() == '0') {
// Abort here
addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_SQL_IMPORT_FAILED'));
return;
if (isLanguageIncludeReadable($ext_name)) {
// Load language file
loadLanguageInclude($ext_name);
- } elseif ((isDebugModeEnabled()) && (getOutputMode() == 0) && ($ext_name != 'sql_patches') && (substr($ext_name, 0, 10) != 'admintheme')) {
+ } elseif ((isDebugModeEnabled()) && (getOutputMode() == '0') && ($ext_name != 'sql_patches') && (substr($ext_name, 0, 10) != 'admintheme')) {
// No language file is not so good...
logDebugMessage(__FUNCTION__, __LINE__, sprintf("NOTICE: Extension %s has no language file or we cannot read from it. lang=%s, mode=%s",
$ext_name,
--- /dev/null
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 11/04/2009 *
+ * =============== Last change: 11/04/2009 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : _functions.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Functions for ext- *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Funktionen fuer ext- *
+ * -------------------------------------------------------------------- *
+ * $Revision:: 1194 $ *
+ * $Date:: 2009-10-27 18:24:18 +0100 (Tue, 27 Oct 2009) $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: quix0r $ *
+ * Needs to be in all Files and every File needs "svn propset *
+ * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 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 (!defined('__SECURITY')) {
+ die();
+} // END - if
+
+// [EOF]
+?>
// Change a lot admin account
function adminsChangeAdminAccount ($postData) {
// Begin the update
- $cache_update = 0;
+ $cache_update = '0';
foreach ($postData['login'] as $id => $login) {
// Secure id number
$id = bigintval($id);
// Remove the given accounts
function adminsRemoveAdminAccount ($postData) {
// Begin removal
- $cache_update = 0;
+ $cache_update = '0';
foreach ($postData['sel'] as $id => $del) {
// Secure id number
$id = bigintval($id);
// Check which admin shall receive this mail
$result = SQL_QUERY_ESC("SELECT `admin_id` FROM `{?_MYSQL_PREFIX?}_admins_mails` WHERE `mail_template`='%s' ORDER BY `admin_id` ASC",
array($template), __FUNCTION__, __LINE__);
- if (SQL_NUMROWS($result) == 0) {
+ if (SQL_NUMROWS($result) == '0') {
// Create new entry (to all admins)
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admins_mails` (`admin_id`, `mail_template`) VALUES (0, '%s')",
array($template), __FUNCTION__, __LINE__);
$UID
));
}
- } elseif ($adminId == 0) {
+ } elseif ($adminId == '0') {
// Select all email adresses
$result = SQL_QUERY("SELECT `email` FROM `{?_MYSQL_PREFIX?}_admins` ORDER BY `id` ASC",
__FUNCTION__, __LINE__);
if (getConfig('bonus_active') != 'Y') return false;
// Init variables
- $sql = ''; $bonus = 0; $mail = 0; $column = '';
+ $sql = ''; $bonus = '0'; $mail = '0'; $column = '';
// Select SQL command
switch ($type) {
if (getConfig('bonus_active') != 'Y') return;
// Switch to jackpot-mode when no UID is supplied but userid-mode is selected
- if ((getConfig('bonus_mode') == 'UID') && (getConfig('bonus_userid') == 0) && (isExtensionActive('jackpot'))) {
+ if ((getConfig('bonus_mode') == 'UID') && (getConfig('bonus_userid') == '0') && (isExtensionActive('jackpot'))) {
// Update database & config
updateConfiguration('bonus_mode', 'JACKPOT');
} // END - if
// Generates a HTML table based on given data
// @TODO Lame description
-function generateDoublerTable ($userid = 0, $done = 'N', $ref = 'N', $sort = 'ASC') {
- if (empty($cnt)) $cnt = 0;
- $add = ''; $DT_MODE = 0;
+function generateDoublerTable ($userid = '0', $done = 'N', $ref = 'N', $sort = 'ASC') {
+ if (empty($cnt)) $cnt = '0';
+ $add = ''; $DT_MODE = '0';
if ($userid > 0) {
// Load entries only from a single user
$add = sprintf(" AND `userid`=%s", bigintval($userid));
//
function DOUBLER_GET_TOTAL_POINTS_LEFT() {
// Initialize variables
- $points = 0;
+ $points = '0';
if (getConfig('doubler_own') == 'Y') {
// Take points from doubler's own account
} // END - if
// And now go forward...
- $idx = 0;
+ $idx = '0';
while ($idx < strlen($test)) {
$check = substr($test, $idx, 1);
if ((!in_array($check, $GLOBALS['valid_email_chars'])) && ($check != '@')) {
$result = SQL_QUERY("SELECT `points` FROM `{?_MYSQL_PREFIX?}_jackpot` WHERE `ok`='ok' LIMIT 1", __FUNCTION__, __LINE__);
// Do we have an entry?
- if (SQL_NUMROWS($result) == 0) {
+ if (SQL_NUMROWS($result) == '0') {
// No, so create line
SQL_QUERY("INSERT INTO `{?_MYSQL_PREFIX?}_jackpot` (`ok`, `points`) VALUES ('ok','0.00000')", __FUNCTION__, __LINE__);
} else {
// First check if it does exist
$result_media = SQL_QUERY_ESC("SELECT media_key FROM `{?_MYSQL_PREFIX?}_mediadata`
WHERE media_key = '%s' LIMIT 1", array($key), __FUNCTION__, __LINE__);
- if (SQL_NUMROWS($result_media) == 0) {
+ if (SQL_NUMROWS($result_media) == '0') {
// Not found so we create it (mode will be ignored here!)
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_mediadata` (media_key, media_value) VALUES ('%s', '%s')",
array($key, $value), __FUNCTION__, __LINE__);
--- /dev/null
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 11/04/2009 *
+ * =============== Last change: 11/04/2009 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : network_functions.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Functions for ext-network *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Funktionen fuer ext-network *
+ * -------------------------------------------------------------------- *
+ * $Revision:: 1194 $ *
+ * $Date:: 2009-10-27 18:24:18 +0100 (Tue, 27 Oct 2009) $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: quix0r $ *
+ * Needs to be in all Files and every File needs "svn propset *
+ * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 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 (!defined('__SECURITY')) {
+ die();
+} // END - if
+
+// Processes an admin form
+function doAdminNetworkProcessForm () {
+ // Form really sent?
+ if ((!isFormSent()) && (!isPostRequestElementSet('edit')) && (!isPostRequestElementSet('del'))) {
+ // Abort here
+ loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NETWORK_FORM_NOT_SENT'));
+ return;
+ } elseif (!isGetRequestElementSet('do')) {
+ // No 'do' found
+ loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NETWORK_DO_404'));
+ return;
+ }
+
+ // Create function name
+ $functionName = sprintf("doAdminNetworkProcess%sForm", ucfirst(strtolower(getRequestElement('do'))));
+
+ // Is the function valid?
+ if (!function_exists($functionName)) {
+ // Invalid function name
+ debug_report_bug('Invalid do ' . getRequestElement('do') . ', function ' . $functionName .' does not exist.');
+ } // END - if
+
+ // Call-back the method handling our request
+ call_user_func($functionName);
+}
+
+// Checks wether the (short) network name is already used (valid)
+function isNetworkNameValid ($name) {
+ // Query for it
+ $result = SQL_QUERY_ESC("SELECT `network_id` FROM `{?_MYSQL_PREFIX?}_network_data` WHERE `network_short_name`='%s' LIMIT 1",
+ array($name), __FUNCTION__, __LINE__);
+
+ // Does it exist?
+ $isValid = (SQL_NUMROWS($result) == 1);
+
+ // Free result
+ SQL_FREERESULT($result);
+
+ // Return result
+ return $isValid;
+}
+
+// "Getter" for a network's data by provided id number
+function getNetworkDataById ($id) {
+ // Ids lower one are not accepted
+ if ($id < 1) {
+ // Not good, should be fixed
+ debug_report_bug('Network id ' . $id . ' is smaller than 1.');
+ } // END - if
+
+ // By default we have no data
+ $networkData = array();
+
+ // Query for the network data
+ $result = SQL_QUERY_ESC("SELECT
+ `network_id`, `network_short_name`, `network_title`, `network_reflink`, `network_data_seperator`, `network_row_seperator`, `network_request_type`, `network_charset`
+FROM
+ `{?_MYSQL_PREFIX?}_network_data`
+WHERE
+ `network_id`=%s
+LIMIT 1",
+ array(bigintval($id)), __FUNCTION__, __LINE__);
+
+ // Do we have an entry?
+ if (SQL_NUMROWS($result) == 1) {
+ // Then get it
+ $networkData = SQL_FETCHARRAY($result);
+ } // END - if
+
+ // Free result
+ SQL_FREERESULT($result);
+
+ // Return result
+ return $networkData;
+}
+
+//------------------------------------------------------------------------------
+// Call-back functions
+//------------------------------------------------------------------------------
+
+// Callback function to add new network
+function doAdminNetworkProcessAddnetworkForm () {
+ // We can say here, the form is sent, so check if the network is already added
+ if (isNetworkNameValid(postRequestElement('network_short_name'))) {
+ // Already there
+ loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_NETWORK_ALREADY_ADDED'), postRequestElement('network_short_name')));
+ return;
+ } // END - if
+
+ // Remove the 'ok' part
+ unsetPostRequestElement('ok');
+
+ // Add the whole request to database
+ SQL_QUERY("INSERT INTO
+ `{?_MYSQL_PREFIX?}_network_data`
+(
+ `" . implode('`,`', array_keys(postRequestArray())) . "`
+) VALUES (
+ '" . implode("','", array_values(postRequestArray())) . "'
+)", __FUNCTION__, __LINE__);
+
+ // Add the id for output only
+ setRequestPostElement('network_id', SQL_INSERTID());
+
+ // Output message
+ if (SQL_AFFECTEDROWS() == 1) {
+ // Successfully added
+ loadTemplate('admin_network_added', false, postRequestArray());
+ } else {
+ // Not added
+ loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_NETWORK_DATA_NOT_ADDED'), postRequestElement('network_short_name')));
+ }
+}
+
+// Displays selected networks for editing
+function doAdminNetworkProcessHandlenetworkForm () {
+ // Do we have selections?
+ if (countPostSelection() > 0) {
+ // Something has been selected, so start displaying one by one
+ $SW = 2; $OUT = '';
+ foreach (postRequestElement('sel') as $id=>$sel) {
+ // Is this selected?
+ if ($sel == 1) {
+ // Load this network's data
+ $networkData = getNetworkDataById($id);
+
+ // Do we have found the network?
+ if (count($networkData) > 0) {
+ // Add color
+ $networkData['sw'] = $SW;
+
+ // Make selection box for network_request_type
+ $networkData['network_request_type'] = addSelectionBox('network_request_type', $networkData['network_request_type'], '', 0, 'admin_select');
+
+ // Add row template and switch color
+ $OUT .= loadTemplate('admin_edit_networks_row', true, $networkData);
+ $SW = 3 - $SW;
+ } // END - if
+ } // END - if
+ } // END - foreach
+
+ // If we have no rows, we don't need to display the edit form
+ if (!empty($OUT)) {
+ // Output main template
+ loadTemplate('admin_edit_networks', false, $OUT);
+
+ // Don't display the list/add new form
+ $GLOBALS['network_display'] = false;
+ } else {
+ // Nothing selected/found
+ loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NETWORK_NOTHING_FOUND'));
+ }
+ } // END - if
+}
+
+// [EOF]
+?>
}
// And now go forward...
- $idx = 0;
+ $idx = '0';
while ($idx < strlen($test)) {
$check = substr($test, $idx, 1);
if ((!in_array($check, $GLOBALS['valid_email_chars'])) && ($check != '@')) {
} // END - if
// Initialize variables
- $userid = 0;
+ $userid = '0';
$MEM = 'N';
$ADMIN = 'N';
// Part taken from admin optimize module of PHPNuke (http://www.phpnuke.org)
function repairOptimizeDatabase () {
$ret = array();
- $tot_data = 0; $tabs = 0; $opts = 0;
- $tot_idx = 0; $total_gain = 0;
- $tot_all = 0;
+ $tot_data = '0'; $tabs = '0'; $opts = '0';
+ $tot_idx = '0'; $total_gain = '0';
+ $tot_all = '0';
$result = SQL_QUERY("SHOW TABLE STATUS FROM `{?__DB_NAME?}`", __FUNCTION__, __LINE__);
$tabs = SQL_NUMROWS($result);
- $ret['total_size'] = 0;
+ $ret['total_size'] = '0';
$ret['total_tabs'] = $tabs;
$ret['tables'] = array();
if ($tabs > 0) {
var $host = "http://www.primusportal.de";
var $path = "/transfer.interface.2.0.php";
- var $errno = 0;
+ var $errno = '0';
var $err = '';
var $seperator = ':';
// Get refs by userid
$cnt = getReferalRallyeRefsCount($content['userid']);
- if (empty($cnt)) $cnt = 0; // Added prevent some unknown troubles... :-?
+ if (empty($cnt)) $cnt = '0'; // Added prevent some unknown troubles... :-?
// Check if line is already included...
$result_ref = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_rallye_users` WHERE rallye_id=%s AND `userid`=%s LIMIT 1",
array(bigintval($id), bigintval($content['userid'])), __FUNCTION__, __LINE__);
- if (SQL_NUMROWS($result_ref) == 0) {
+ if (SQL_NUMROWS($result_ref) == '0') {
// Free memory
SQL_FREERESULT($result_ref);
// Free result
SQL_FREERESULT($result_ref);
- if (empty($refpoints)) $refpoints = 0;
+ if (empty($refpoints)) $refpoints = '0';
// Init userid for list
$_userid = '---';
// Generate table
$OUT = loadTemplate('guest_rallye_header', true);
$SW = 2;
- for ($idx = 0; $idx < $prices; $idx++) {
+ for ($idx = '0'; $idx < $prices; $idx++) {
if (empty($DATA['userid'][$idx])) $DATA['userid'][$idx] = '---';
if (empty($DATA['ref'][$idx])) $DATA['ref'][$idx] = '---';
// Add row
LIMIT 1", __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Init variables
- $min_users = 0; $min_prices = 0;
+ $min_users = '0'; $min_prices = '0';
// Load data
if (getExtensionVersion('rallye') >= '0.2.0') {
list($id, $title, $start, $end, $notify, $min_users, $min_prices) = SQL_FETCHROW($result);
array(bigintval($id), bigintval($userid)), __FUNCTION__, __LINE__);
// Is this user added?
- if (SQL_NUMROWS($result) == 0) {
+ if (SQL_NUMROWS($result) == '0') {
// Add userid and his ref count to table
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_rallye_users` (`rallye_id`, `userid`, `refs`)
VALUES ('%s','%s',0)",
$DATA['now_t'] = generateDateTime(time(), 2);
$DATA['title'] = $title;
$DATA['id'] = $id; // id for the rallye details link
- $DATA['ref'] = 0;
+ $DATA['ref'] = '0';
$DATA['refs'] = countSumTotalData($userid, 'user_data', 'userid', "refid", true);
// Load prices
$prices = getArrayFromReferalRallyeUsers($id);
// Init array
- $DATA = array(); $cnt = 0;
+ $DATA = array(); $cnt = '0';
$users = array();
$DATA['title'] = $title;
$DATA['start'] = generateDateTime($start, 1);
$DATA['now_t'] = generateDateTime(time(), 1);
// Just count...
- $total = 0;
+ $total = '0';
foreach($prices['userid'] as $key => $userid) {
// Check status
// active = 1: account is still confirmed
- // active = 0: account is deleted or locked
+ // active = '0': account is deleted or locked
$result = SQL_QUERY_ESC("SELECT
COUNT(`userid`) AS active
FROM
} // END - if
} // END - foreach
- if (($total < $min_prices) || ($total == 0)) {
+ if (($total < $min_prices) || ($total == '0')) {
// Do not end this rallye!
unset($DATA);
return;
//
function getArrayFromReferalRallyeUsers ($rallye) {
// Fix zero points to 0.00000
- if (getConfig('ref_payout') == 0) setConfigEntry('ref_payout', '0.00000');
+ if (getConfig('ref_payout') == '0') setConfigEntry('ref_payout', '0.00000');
// Init multi array
$users = array(
SQL_FREERESULT($result_ref);
// Fix empty refpoints
- if (empty($refpoints)) $refpoints = 0;
+ if (empty($refpoints)) $refpoints = '0';
// Store calculated new refs to array
$users['userid'][] = $content['userid'];
// Generate table
$OUT = loadTemplate('guest_rallye_expired_header', true);
$SW = 2;
- for ($idx = 0; $idx < $prices; $idx++) {
+ for ($idx = '0'; $idx < $prices; $idx++) {
// Check status
// active = 1: account is still confirmed
- // active = 0: account is deleted or locked
+ // active = '0': account is deleted or locked
$active = countSumTotalData($DATA['userid'][$idx], 'user_data', 'userid', 'userid', true, " AND `status`='CONFIRMED'");
if (empty($DATA['userid'][$idx])) $DATA['userid'][$idx] = '---';
- if ((empty($DATA['ref'][$idx])) || ($DATA['ref'][$idx] == 0) || ($active == 0) || ("".round($DATA['cpoints'][$idx])."" == 0) || (empty($DATA['cpoints'][$idx]))) {
+ if ((empty($DATA['ref'][$idx])) || ($DATA['ref'][$idx] == '0') || ($active == '0') || ("".round($DATA['cpoints'][$idx])."" == '0') || (empty($DATA['cpoints'][$idx]))) {
// Allow valid and active users with at least one ref to get points
$DATA['ref'][$idx] = '---';
$DATA['userid'][$idx] = '---';
}
//
-function getReferalRallyeRefsCount ($userid, $old = 0) {
+function getReferalRallyeRefsCount ($userid, $old = '0') {
// Check current refs
if (getExtensionVersion('cache') >= '0.1.2') {
// Get refs from cache
- $cnt = 0;
+ $cnt = '0';
foreach ($GLOBALS['cache_array']['refsystem']['userid'] as $id => $userid) {
// Do we have a ref for this user?
//* DEBUG: */ print("id={$id},userid={$userid},userid={$userid},old={$old},level={$GLOBALS['cache_array']['refsystem']['level'][$id]}<br />");
list($cnt) = SQL_FETCHROW($result_ref);
SQL_FREERESULT($result_ref);
if (empty($cnt)) {
- $cnt = 0;
+ $cnt = '0';
} else {
$cnt -= $old;
}
if ($userid == $ref) return 0;
// Default is zero
- $percents = 0;
+ $percents = '0';
// Get percents from database
$result = SQL_QUERY_ESC("SELECT refback FROM `{?_MYSQL_PREFIX?}_user_refs` WHERE `userid`=%s AND `refid`=%s LIMIT 1",
//* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},level={$GLOBALS['refback_level']}<br />");
// Init refid
- $GLOBALS['refback_refid'][$GLOBALS['refback_level']] = 0;
- $old = 0; $minus = 0;
+ $GLOBALS['refback_refid'][$GLOBALS['refback_level']] = '0';
+ $old = '0'; $minus = '0';
// Check for his referal
$result_refid = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `refid`=%s ORDER BY `userid` ASC",
// Do we have no entry?
//* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},level={$GLOBALS['refback_level']},ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]},minus={$minus},numRows=".SQL_NUMROWS($result)." - FOUND!<br />");
- if (SQL_NUMROWS($result) == 0) {
+ if (SQL_NUMROWS($result) == '0') {
// Insert this level
//* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},level={$GLOBALS['refback_level']},ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]} - ADD!<br />");
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_refs` (`userid`,`level`,`refid`) VALUES (%s,%s,%s)",
// Do we have no entry?
//* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},level=".($GLOBALS['refback_level']-$minus).",ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]},numRows=".SQL_NUMROWS($result)." - BACK!<br />");
- if (SQL_NUMROWS($result) == 0) {
+ if (SQL_NUMROWS($result) == '0') {
// Insert this level
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_refs` (`userid`,`level`,`refid`) VALUES (%s,%s,%s)",
array(bigintval($userid), ($GLOBALS['refback_level']-$minus), bigintval($GLOBALS['refback_refid'][$GLOBALS['refback_level']])), __FUNCTION__, __LINE__);
} // END - if
// When he has a referal...
- if ((($GLOBALS['refback_refid'][$GLOBALS['refback_level']] == $userid) || ($GLOBALS['refback_refid'][$GLOBALS['refback_level']] == 0)) && (isExtensionInstalledAndNewer('cache', '0.1.2')) && (!isset($GLOBALS['refback_cached']))) {
+ if ((($GLOBALS['refback_refid'][$GLOBALS['refback_level']] == $userid) || ($GLOBALS['refback_refid'][$GLOBALS['refback_level']] == '0')) && (isExtensionInstalledAndNewer('cache', '0.1.2')) && (!isset($GLOBALS['refback_cached']))) {
// Remove cache here
//* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]} - CACHE!<br />");
if ($GLOBALS['cache_instance']->loadCacheFile('refback')) $GLOBALS['cache_instance']->removeCacheFile();
//* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},level={$GLOBALS['refback_level']} - LEVEL!<br />");
// Fix empty refid
- if (!isset($GLOBALS['refback_refid'][$GLOBALS['refback_level']-1])) $GLOBALS['refback_refid'][$GLOBALS['refback_level']-1] = 0;
+ if (!isset($GLOBALS['refback_refid'][$GLOBALS['refback_level']-1])) $GLOBALS['refback_refid'][$GLOBALS['refback_level']-1] = '0';
//* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},level={$GLOBALS['refback_level']},ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']-1]} - BACK!<br />");
//* DEBUG: */ print("</li></ul>----------------------- <font color=\"#aa0000\">".__FUNCTION__." - EXIT</font> ------------------------<br />");
}
$dummy = getArrayFromUserRefbackData($id);
// Is this valid?
- if (count($dummy) == 0) {
+ if (count($dummy) == '0') {
// id does not belong to user!
$status['message'] = getMessage('MEMBER_REFBACK_ERROR_ID_MISMATCH');
return $status;
// Adds informations about anonymity/privacy to the menu
function addAnonymityLevel () {
// "Base-privacy" is by default low (we add more later)
- $anonymity = 0;
+ $anonymity = '0';
// Is some data anonymized?
if (getConfig('removeip_anon_ip') == 'Y') $anonymity++;
// Save sponsor?
if ($SAVE === true) {
// Default is no force even when a guest want to abuse this force switch
- if ((empty($postData['force'])) || (!isAdmin())) $postData['force'] = 0;
+ if ((empty($postData['force'])) || (!isAdmin())) $postData['force'] = '0';
// SQL and message string is empty by default
$sql = ''; $message = '';
} elseif (!is_array($IDs)) {
// No array
return false;
- } elseif (count($IDs) == 0) {
+ } elseif (count($IDs) == '0') {
// Empty array
return false;
}
} elseif (!is_array($IDs)) {
// No array
return false;
- } elseif (count($IDs) == 0) {
+ } elseif (count($IDs) == '0') {
// Empty array
return false;
}
// Is limitation "no" and "limit" is > 0?
if ((isset($urlData[$action]['limited'])) && ($urlData[$action]['limited'] != 'Y') && ((isset($urlData[$action]['limit'])) && ($urlData[$action]['limit'] > 0)) || (!isset($urlData[$action]['limit']))) {
// Set it to unlimited
- $urlData[$action]['limit'] = 0;
+ $urlData[$action]['limit'] = '0';
} // END - if
// Construct function name
// Is limit/reload set?
if (!isset($config['limit'])) {
- $content['limit'] = 0;
+ $content['limit'] = '0';
} // END - if
if (!isset($config['reload'])) {
- $content['reload'] = 0;
+ $content['reload'] = '0';
} // END - if
// Insert the URL into database
$content['insert_id'] = SURFBAR_INSERT_URL_BY_ARRAY($content);
// Is this id valid?
- if ($content['insert_id'] == 0) {
+ if ($content['insert_id'] == '0') {
// INSERT did not insert any data!
return false;
} // END - if
$userid = bigintval($urlData['userid']);
// Is the id set?
- if (empty($userid)) $userid = 0;
+ if (empty($userid)) $userid = '0';
// Just run the insert query for now
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_urls` (userid,url,status,views_max,views_allowed,fixed_reload) VALUES (%s,'%s','%s',%s,%s,%s)",
// Notify the user about the performed action
function SURFBAR_NOTIFY_USER ($messageType, $content) {
// Skip notification if userid is zero
- if ($content['userid'] == 0) {
+ if ($content['userid'] == '0') {
return false;
} // END - if
// Translates the limit
function translateSurfbarLimit ($limit) {
// Is this zero?
- if ($limit == 0) {
+ if ($limit == '0') {
// Unlimited!
$return = getMessage('MEMBER_SURFBAR_UNLIMITED_VIEWS');
} else {
ON
u.id=l.url_id
WHERE
- l.userid=%s AND (UNIX_TIMESTAMP() - ".SURFBAR_GET_SURF_LOCK().") < UNIX_TIMESTAMP(l.last_surfed) AND (((UNIX_TIMESTAMP(l.last_surfed) - u.fixed_reload) < 0 AND u.fixed_reload > 0) OR u.fixed_reload = 0)
+ l.userid=%s AND (UNIX_TIMESTAMP() - ".SURFBAR_GET_SURF_LOCK().") < UNIX_TIMESTAMP(l.last_surfed) AND (((UNIX_TIMESTAMP(l.last_surfed) - u.fixed_reload) < 0 AND u.fixed_reload > 0) OR u.fixed_reload = '0')
LIMIT 1",
array(getMemberId()), __FUNCTION__, __LINE__
);
// Is it null?
if (is_null($GLOBALS['surfbar_cache']['user_locks'])) {
// Then fix it to zero!
- $GLOBALS['surfbar_cache']['user_locks'] = 0;
+ $GLOBALS['surfbar_cache']['user_locks'] = '0';
} // END - if
// Free result
}
// Get total amount of URLs of given status for current user or of ACTIVE URLs by default
-function SURFBAR_GET_TOTAL_URLS ($status = 'ACTIVE', $excludeUserId = 0) {
+function SURFBAR_GET_TOTAL_URLS ($status = 'ACTIVE', $excludeUserId = '0') {
// Determine depleted user account
$UIDs = SURFBAR_DETERMINE_DEPLETED_USERIDS();
// If we dont get any user ids back, there are no URLs
- if (count($UIDs['userid']) == 0) {
+ if (count($UIDs['userid']) == '0') {
// No user ids found, no URLs!
return 0;
} // END - if
}
// Check wether the user is allowed to book more URLs
-function SURFBAR_IF_USER_BOOK_MORE_URLS ($userid = 0) {
+function SURFBAR_IF_USER_BOOK_MORE_URLS ($userid = '0') {
// Is this admin and userid is zero or does the user has some URLs left to book?
- return ((($userid == 0) && (isAdmin())) || (SURFBAR_GET_TOTAL_USER_URLS($userid, '', array("REJECTED")) < getConfig('surfbar_max_order')));
+ return ((($userid == '0') && (isAdmin())) || (SURFBAR_GET_TOTAL_USER_URLS($userid, '', array("REJECTED")) < getConfig('surfbar_max_order')));
}
// Get total amount of URLs of given status for current user
-function SURFBAR_GET_TOTAL_USER_URLS ($userid = 0, $status = '',$exclude = '') {
+function SURFBAR_GET_TOTAL_USER_URLS ($userid = '0', $status = '',$exclude = '') {
// Is the user 0 and user is logged in?
- if (($userid == 0) && (isMember())) {
+ if (($userid == '0') && (isMember())) {
// Then use this userid
$userid = getMemberId();
- } elseif ($userid == 0) {
+ } elseif ($userid == '0') {
// Error!
return (getConfig('surfbar_max_order') + 1);
}
$length = getConfig('code_length');
// Fix length to 10
- if ($length == 0) $length = 10;
+ if ($length == '0') $length = 10;
// Generate a code until the length matches
$valCode = '';
);
// Do we have a current user id?
- if ((isMember()) && ($limit == 0)) {
+ if ((isMember()) && ($limit == '0')) {
// Then add this as well
$UIDs['userid'][getMemberId()] = getMemberId();
$UIDs['points'][getMemberId()] = countSumTotalData(getMemberId(), 'user_points', 'points') - countSumTotalData(getMemberId(), 'user_data', 'used_points');
- $UIDs['notified'][getMemberId()] = 0;
+ $UIDs['notified'][getMemberId()] = '0';
// Get all userid except logged in one
$result = SQL_QUERY_ESC("SELECT
$newStatus = strtolower($newStatus);
// Get URL data for status comparison if missing
- if ((!is_array($data)) || (count($data) == 0)) {
+ if ((!is_array($data)) || (count($data) == '0')) {
// Fetch missing URL data
$data = SURFBAR_GET_URL_DATA($urlId);
} // END - if
// Calculate minimum value for dynamic payment model
function SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE () {
// Addon is zero by default
- $addon = 0;
+ $addon = '0';
// Percentage part
$percent = abs(log(getConfig('surfbar_dynamic_percent') / 100 + 1));
// Calculate maximum value for dynamic payment model
function SURFBAR_CALCULATE_DYNAMIC_MAX_VALUE () {
// Addon is zero by default
- $addon = 0;
+ $addon = '0';
// Maximum value
$max = log(2);
// Determine next id for surfbar or get data for given id, always call this before you call other
// getters below this function!!!
-function SURFBAR_DETERMINE_NEXT_ID ($urlId = 0) {
+function SURFBAR_DETERMINE_NEXT_ID ($urlId = '0') {
// Default is no id and no random number
- $nextId = 0;
- $randNum = 0;
+ $nextId = '0';
+ $randNum = '0';
// Is the id set?
- if ($urlId == 0) {
+ if ($urlId == '0') {
// Get array with lock ids
$USE = SURFBAR_GET_LOCK_IDS();
if ((!isset($GLOBALS['surfbar_cache']['last_surfed'])) || (is_null($GLOBALS['surfbar_cache']['last_surfed']))) {
// Fix it here
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'last_surfed - FIXED!', false);
- $GLOBALS['surfbar_cache']['last_surfed'] = 0;
+ $GLOBALS['surfbar_cache']['last_surfed'] = '0';
} // END - if
// Get base/fixed reward and costs
'purged_mails','purged_bonus_mails'
) as $entry) {
// Set it to zero
- $content[$entry] = 0;
+ $content[$entry] = '0';
} // END - foreach
// Extension updates found
if (empty($TITLEs[$key])) $TITLEs[$key] = getMessage('ADMIN_TASK_UNKNOWN_LIST_TITLE');
$content['row_link'] = "<a href=\"{?URL?}/modules.php?module=admin&what=".$WHATs[$key]."\" title=\"".$TITLEs[$key]."\">".$value."</a>";
} else {
- $content['row_link'] = 0;
+ $content['row_link'] = '0';
}
// And insert the final string into extras template
// Selects a random user id as the new referal id if they have at least X confirmed mails in this run
function determineRandomReferalId () {
// Default is zero refid
- $refid = 0;
+ $refid = '0';
// Is the extension version fine?
if (getExtensionVersion('user') >= '0.3.4') {
// Init variables
$dmy = '';
$add = '';
- $errorCode = 0;
+ $errorCode = '0';
// Add last_login if available
$lastOnline = '';
$errorCode = YOOMEDIA_GET_ERRORCODE_FROM_RESULT($response);
// Log the response if failed
- if (count($response) == 0) {
+ if (count($response) == '0') {
// Queries depleted (as we count here!)
logDebugMessage(__FUNCTION__, __LINE__, 'Requested depleted. Maxmimum was: ' . getConfig('yoomedia_requests_total'));
$errorCode = -1;
$errorCode = -1;
} else {
// This is fine, because the result array is okay and the response code on element 8 is fine
- $errorCode = 0;
+ $errorCode = '0';
}
// Do we have some data there?
- return ($errorCode == 0);
+ return ($errorCode == '0');
}
// Queries the given Yoo!Media API 2.0 script
$dataArray = explode('|', $responseLine);
// Now make the result array with two dimensions
- $cnt = 0; $entry = 0;
+ $cnt = '0'; $entry = '0';
foreach ($dataArray as $line) {
// Add the line
$result[$entry][yoomediaTranslateIndex($type, $cnt)] = $line;
if ($cnt == 6) {
// Then advance to next entry and reset counter
$entry++;
- $cnt = 0;
+ $cnt = '0';
} else {
// Count up
$cnt++;
}
// Add dummy receiver to avoid notice
- $data['receiver'] = 0;
+ $data['receiver'] = '0';
// HTML or normal? (normal is default...)
$type = 't';
if (getOutputMode() != 0) return;
// Initialize variables
-$jackpot = 0; $user = 0;
+$jackpot = '0'; $user = '0';
if (isExtensionActive('jackpot')) $jackpot = getJackpotPoints();
// Get total points of the doubler itself
$DOUBLER_POINTS = DOUBLER_GET_TOTAL_POINTS_LEFT();
-if ($DOUBLER_POINTS == 0) {
+if ($DOUBLER_POINTS == '0') {
// Exit here to prevent some SQL errors (SQL_QUERY_ESC doen't insert zeros! We need to fix this...)
return;
} // END - if
unsetGetRequestElement('DOUBLER_UID');
unsetPostRequestElement('DOUBLER_UID');
setSession('DOUBLER_UID', '');
-if (empty($GLOBALS['doubler_userid'])) $GLOBALS['doubler_userid'] = 0;
+if (empty($GLOBALS['doubler_userid'])) $GLOBALS['doubler_userid'] = '0';
// Check for doubles which we can pay out
$result_total = SQL_QUERY_ESC("SELECT d.id, d.userid, d.points, d.remote_ip, d.timemark
$ref = countSumTotalData($content['userid'], 'doubler', 'points', 'refid', false, " AND `completed`='N' AND `is_ref`='Y'");
// Zero refid when empty (might be helpful!)
- if (empty($ref)) $ref = 0;
+ if (empty($ref)) $ref = '0';
if (($ref > 0) && ($GLOBALS['doubler_userid'] == $content['userid']) && (!empty($ref))) {
// Referal points found so add them and set line(s) to completed='Y'
array(bigintval($content['userid'])), __FILE__, __LINE__);
} else {
// No referal points found
- $ref = 0;
+ $ref = '0';
}
// Exclude webmaster from doubling...
array($user), __FUNCTION__, __LINE__);
// Is the entry there?
- if (SQL_NUMROWS($result) == 0) {
+ if (SQL_NUMROWS($result) == '0') {
// Ok, let's create the admin login
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admins` (`login`, `password`, `email`) VALUES ('%s', '%s', '%s')",
array(
if (SQL_NUMROWS($result) > 0) {
// Load menu as selection
$OUT = "<select name=\"".$mode."_menu";
- if ((!empty($defid)) || ($defid == 0)) $OUT .= "[".$defid."]";
+ if ((!empty($defid)) || ($defid == '0')) $OUT .= "[".$defid."]";
$OUT .= "\" size=\"1\" class=\"admin_select\">
<option value=\"\">{--SELECT_NONE--}</option>\n";
// @TODO Try to rewrite this to $content = SQL_FETCHARRAY(). Please look some lines above for the dynamic query
$title = $userid;
} // END - if
- if (($title == 0) && ($what == 'list_refs')) {
+ if (($title == '0') && ($what == 'list_refs')) {
// Return title again
return $title;
} elseif (isExtensionActive('nickname')) {
// Change activation status
function adminChangeActivationStatus ($IDs, $table, $row, $idRow = 'id') {
- $cnt = 0; $newStatus = 'Y';
+ $cnt = '0'; $newStatus = 'Y';
if ((is_array($IDs)) && (count($IDs) > 0)) {
// "Walk" all through and count them
foreach ($IDs as $id => $selected) {
// Shall we change here or list for editing?
if ($editNow === true) {
// Change them all
- $affected = 0;
+ $affected = '0';
foreach ($IDs as $id => $sel) {
// Prepare content array (new values)
$content = array();
array($email), __FUNCTION__, __LINE__);
// Is there an account?
- if (SQL_NUMROWS($result) == 0) {
+ if (SQL_NUMROWS($result) == '0') {
// No account found!
return getMessage('ADMIN_NO_LOGIN_WITH_EMAIL');
} // END - if
// Task is valid...
list($tid, $userid, $type, $subj, $text, $created, $status, $adminId) = SQL_FETCHROW($result_task);
- if ($adminId == 0) {
+ if ($adminId == '0') {
// Assgin current admin to unassgigned task
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `assigned_admin`=%s WHERE `id`=%s LIMIT 1",
array(getCurrentAdminId(), bigintval($tid)), __FILE__, __LINE__);
} else {
// Invalid userid, so log and zero it
logDebugMessage(__FUNCTION__, __LINE__, 'Invalid userid=' . $userid . ' -> not found!');
- $userid = 0;
+ $userid = '0';
}
} // END - if
array($ext_name), __FILE__, __LINE__);
$lines = SQL_NUMROWS($result_lines);
SQL_FREERESULT($result_lines);
- if ($lines == 0) {
+ if ($lines == '0') {
// New extension found
$OUT .= loadTemplate('admin_ext_reg_form', true, array(
'id' => bigintval($id),
$result = SQL_QUERY_ESC("SELECT id, admin_id FROM `{?_MYSQL_PREFIX?}_rallye_data` WHERE (start_time <= %s AND end_time >= %s) OR (start_time >= %s AND start_time <= %s) LIMIT 1",
array($START, $START, $START, $END), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 0) {
+ if (SQL_NUMROWS($result) == '0') {
// Ok, start and end time did not overlap
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_rallye_data` (admin_id, title, descr, template, start_time, end_time, auto_add_new_user, is_active, send_notify)
VALUES ('%s','%s','%s','%s','%s','%s','%s','%s','%s')",
} // END - if
// Get count of (maybe) selected menu points
-$chk = 0;
+$chk = '0';
if (isPostRequestElementSet('sel')) $chk = countPostSelection();
// List all menu points and make them editable
// @TODO Kill all constants in this file
$content['sub'] = $SUB;
$content['chk'] = $chk;
- $cnt = 0; $SW = 2;
+ $cnt = '0'; $SW = 2;
foreach (postRequestElement('sel') as $sel => $confirm) {
if ($confirm == 1) {
$cnt++;
$content['chk'] = $chk;
// Del menu entries with or without confirmation
- $SW = 2; $cnt = 0; $OUT = '';
+ $SW = 2; $cnt = '0'; $OUT = '';
foreach (postRequestElement('sel') as $sel => $confirm) {
if ($confirm == 1) {
$cnt++;
$content['sub'] = $SUB;
// Init variables
- $OUT = ''; $SW = 2; $cnt = 0;
+ $OUT = ''; $SW = 2; $cnt = '0';
// Process all entries
while ($data = SQL_FETCHARRAY($result)) {
// Init navigation variable
$data['navi'] = '';
- if (($data['sort'] == 0) || (($data['sort'] == 1) && (!empty($SUB)))) {
+ if (($data['sort'] == '0') || (($data['sort'] == 1) && (!empty($SUB)))) {
// Is highest position
$data['navi'] = "<a href=\"{?URL?}/modules.php?module=admin&what=adminedit&sub=".$content['sub']."&act=".$data['action']."&w=".$data['what']."&tid=".($data['sort']+1)."&fid=".$data['sort']."\">{--LOWER--}</a>";
} elseif ($cnt == $max) {
// 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` ASC",
array($template), __FILE__, __LINE__);
- $OUT = ''; $adminId2 = 0;
+ $OUT = ''; $adminId2 = '0';
while ($content = SQL_FETCHARRAY($result)) {
// @TODO Can this be rewritten???
$OUT .= "<select name=\"admin_id[".$content['id']."]\" size=\"1\" class=\"admin_select\">
<option value=\"0\"";
- if ($content['admin_id'] == 0) $OUT .= ' selected="selected"';
+ if ($content['admin_id'] == '0') $OUT .= ' selected="selected"';
$OUT .=">{--ADMINS_ALL_ADMINS--}</option>\n";
if (isExtensionActive('events')) {
$OUT .= "<option value=\"-1\"";
// Add description as navigation point
addMenuDescription('admin', __FILE__);
-$SEL = 0;
+$SEL = '0';
if (isPostRequestElementSet('sel')) $SEL = countPostSelection();
if ((isPostRequestElementSet('edit')) && ($SEL > 0)) {
// Main or sub menu selected
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_admins_acls` WHERE admin_id=%s AND action_menu='%s' AND what_menu='%s' LIMIT 1",
array(bigintval(postRequestElement('admin_id')), postRequestElement('action_menu'), postRequestElement('what_menu')), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 0) {
+ if (SQL_NUMROWS($result) == '0') {
// Finally add the new ACL
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admins_acls` (admin_id, action_menu, what_menu, access_mode)
VALUES ('%s','%s','%s','%s')",
// Generate list
$OUT = "<ol start=\"2\">\n";
- $cnt = 0;
+ $cnt = '0';
foreach ($RANKS as $k => $rate) {
if (!empty($rate)) {
// Print only when something is in
// Add a new category
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_cats` WHERE cat='%s' LIMIT 1",
array(postRequestElement('catname')), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 0) {
+ if (SQL_NUMROWS($result) == '0') {
// Category does not exists, we simply add it...
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_cats` (cat, visible, sort) VALUES ('%s','%s','%s')",
array(postRequestElement('catname'), postRequestElement('visible'), bigintval(postRequestElement('parent') + 1)), __FILE__, __LINE__);
// Save all settings
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE value='%s' LIMIT 1",
array(bigintval(postRequestElement('max'))), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 0) {
+ if (SQL_NUMROWS($result) == '0') {
// Add this value (including comment)
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` (value, comment) VALUES ('%s','%s')",
array(bigintval(postRequestElement('max')), postRequestElement('comment')),__FILE__, __LINE__);
// Add description as navigation point
addMenuDescription('admin', __FILE__);
-$SEL = 0;
+$SEL = '0';
if (isPostRequestElementSet('edit')) {
// Check if at least one module is selected
$SEL = countPostSelection();
loadTemplate('admin_settings_saved', false, getMessage('MODS_CHANGED'));
}
-if ($SEL == 0) {
+if ($SEL == '0') {
// Load module data (We do not need to check if there's at least one...)
$result = SQL_QUERY('SELECT id, module, locked, hidden, admin_only, title, mem_only
FROM `{?_MYSQL_PREFIX?}_mod_reg`
$content[$entry . '_' . strtolower(getConfig($entry))] = ' checked="checked"';
} // END - foreach
- for ($i = 0; $i <= 5; $i++) {
+ for ($i = '0'; $i <= 5; $i++) {
$content['comma_def_' . $i] = '';
} // END - for
// Add new payout type
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_payout_types` WHERE type='%s' LIMIT 1",
array(postRequestElement('title')), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 0) {
+ if (SQL_NUMROWS($result) == '0') {
// Add now
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_payout_types`
(type, rate, min_points, from_account, from_pass, engine_url, engine_ret_ok, engine_ret_failed, pass_enc, allow_url)
array('allow_direct_pay', 'reg_points_mode', 'ref_payout'),
array(postRequestElement('allow_direct_pay'), postRequestElement('reg_points_mode'), $REF)
);
- if ((getConfig('ref_payout') == 0) && (postRequestElement('ref_payout') > 0)) {
+ if ((getConfig('ref_payout') == '0') && (postRequestElement('ref_payout') > 0)) {
// Update account's ref_payout for "must-confirm"
addSql(sprintf("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ref_payout`=(%s - `mails_confirmed`)
WHERE `mails_confirmed` < %s", $REF, $REF));
- } elseif ((getConfig('ref_payout') > 0) && (postRequestElement('ref_payout') == 0)) {
+ } elseif ((getConfig('ref_payout') > 0) && (postRequestElement('ref_payout') == '0')) {
// Update account's ref_payout for "not-must-confirm"
addSql("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ref_payout`=0 WHERE `ref_payout` > 0");
addSql("UPDATE `{?_MYSQL_PREFIX?}_user_points` SET `points`=`points`+`locked_points` WHERE `locked_points` > 0");
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `rallye_id`=%s AND `price_level`='%s' LIMIT 1",
array(bigintval(getRequestElement('rallye')), bigintval(postRequestElement('level'))), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 0) {
+ if (SQL_NUMROWS($result) == '0') {
// Ok, new price level entered!
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_rallye_prices` (rallye_id, price_level, points, info)
VALUES ('%s','%s','%s','%s')",
if (isFormSent()) {
// If salt length is empty or null then we shall generate new passwords
- if (!isPostRequestElementSet(('salt_length')) || (postRequestElement('salt_length') == 0)) {
+ if (!isPostRequestElementSet(('salt_length')) || (postRequestElement('salt_length') == '0')) {
// Generate new passwords for all!
loadInclude('inc/gen_sql_patches.php');
}
} else {
// Erotic selection
- for ($idx = 0; $idx <= 2; $idx++) {
+ for ($idx = '0'; $idx <= 2; $idx++) {
$content['yoomedia_erotic_allowed_' . $idx] = '';
} // END - for
addMenuDescription('admin', __FILE__);
// Init counter for deleted mails
-$cnt = 0;
+$cnt = '0';
if (isGetRequestElementSet('mid')) {
// Load email data
// Shall we payback to user or jackpot?
if (getConfig('repay_deleted_mails') == 'JACKPOT') {
// Set jackpot
- $sender = 0;
+ $sender = '0';
} // END - if
// Pay back points
reduceRecipientReceivedMails('bonus_id', getRequestElement('bid'), $sent);
// Init counter for deleted mails
- $cnt = 0;
+ $cnt = '0';
// Delete bonus mail entirely from database
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
list ($id, $subject, $url, $timestamp) = SQL_FETCHROW($result);
// Init counter for deleted mails
- $cnt = 0;
+ $cnt = '0';
// Delete bonus mail entirely from database
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
addMenuDescription('admin', __FILE__);
// Check for selected holidays
-$SUM = 0;
+$SUM = '0';
if (isPostRequestElementSet('sel')) $SUM = countPostSelection();
// Shall I delete selected holidays???
if ($SUM > 0) {
// Delete multiple holiday requests (for list_holiday)
- $cnt = 0;
+ $cnt = '0';
foreach (postRequestElement('sel') as $id => $sel) {
// Get the userid
$result = SQL_QUERY_ESC("SELECT
// We only need outgoing transfers
$result = SQL_QUERY("SELECT userid, to_userid, trans_id, points, reason, time_trans FROM `{?_MYSQL_PREFIX?}_user_transfers_out` ORDER BY trans_id", __FILE__, __LINE__);
-$total = 0;
+$total = '0';
if (SQL_NUMROWS($result) > 0) {
// Output rows
$OUT = ''; $SW = 2;
if ((!empty($SQL2)) && ($WHO == getMessage('_ALL'))) $result_bonus = SQL_QUERY($SQL2, __FILE__, __LINE__);
// Calculate pages
-$PAGES = 0;
+$PAGES = '0';
if (isConfigEntrySet('mails_page')) {
$PAGES = round(SQL_NUMROWS($result_normal) / getConfig('mails_page') + 0.3);
} // END - if
$pool['unconfirmed'] = "<strong><a href=\"{?URL?}/modules.php?module=admin&what=list_unconfirmed&mid=".$pool['id']."\">".$pool['unconfirmed']."</a></strong>";
} elseif ($pool['unconfirmed'] < 0) {
// Sometimes rarely displayed minus values will be "fixed" to zero
- $pool['unconfirmed'] = 0;
+ $pool['unconfirmed'] = '0';
}
// Prepare content
// Normally we want the overview of all registered extensions
$do = 'overview';
-$SEL = 0;
+$SEL = '0';
// Are some extensions submitted?
if (isPostRequestElementSet('sel')) {
// Change settings like CSS file load
if (isPostRequestElementSet(('modify'))) {
// Change entries
- $cache_update = 0;
+ $cache_update = '0';
foreach (postRequestElement('sel') as $ext_id => $sel) {
// Secure id
$ext_id = bigintval($ext_id);
$do = 'delete';
} elseif ((isPostRequestElementSet('remove')) && ($SEL > 0) && (!isDemoModeActive())) {
// Remove extensions from DB (you have to delete all files manually!)
- $cache_update = 0;
+ $cache_update = '0';
foreach (postRequestElement('sel') as $ext_id => $active) {
// Secure id number
$ext_id = bigintval($ext_id);
SQL_FREERESULT($result);
// Disable cache update by default
- $cache_update = 0;
+ $cache_update = '0';
if (!empty($subj)) {
// Extract extension's name from subject...
$ext_name = trim(substr($subj, 1, strpos($subj, ':') - 1));
// ... so we can finally register and load it in registration mode
if (registerExtension($ext_name, $ext_id)) {
// Errors?
- if (getTotalFatalErrors() == 0) {
+ if (getTotalFatalErrors() == '0') {
// Extension was found and successfully registered
loadTemplate('admin_settings_saved', false, sprintf(getMessage('ADMIN_EXTENSION_REGISTERED'), $ext_name));
// Extension was not found in task management
loadTemplate('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_ID_404'));
}
- } elseif ($task_found == 0) {
+ } elseif ($task_found == '0') {
// No longer assigned or old task
loadTemplate('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_ASSIGED'));
} else {
} // END - if
// Get count of (maybe) selected menu points
-$chk = 0;
+$chk = '0';
if (isPostRequestElementSet('sel')) $chk = countPostSelection();
// List all menu points and make them editable
$content['sub'] = $SUB;
$content['chk'] = $chk;
- $cnt = 0; $OUT = ''; $SW = 2;
+ $cnt = '0'; $OUT = ''; $SW = 2;
foreach (postRequestElement('sel') as $sel => $confirm) {
if ($confirm == 1) {
$cnt++;
$content['sub'] = $SUB;
$content['chk'] = $chk;
- $cnt = 0;
+ $cnt = '0';
$OUT = '';
$SW = 2;
$content['chk'] = $chk;
// Load template
- $SW = 2; $cnt = 0; $OUT = '';
+ $SW = 2; $cnt = '0'; $OUT = '';
foreach (postRequestElement('sel') as $sel => $confirm) {
if ($confirm == 1) {
$cnt++;
// Init variables
$SW = 2;
- $cnt = 0;
+ $cnt = '0';
$OUT = '';
// Process all menu entries
while ($data = SQL_FETCHARRAY($result)) {
$cnt++;
- if (($data['sort'] == 0) || (($data['sort'] == 1) && (!empty($SUB)))) {
+ if (($data['sort'] == '0') || (($data['sort'] == 1) && (!empty($SUB)))) {
// Is highest position
$NAVI = "<a href=\"{?URL?}/modules.php?module=admin&what=guestedit&sub=".$content['sub']."&act=".$data['action']."&w=".$data['what']."&tid=".($data['sort']+1)."&fid=".$data['sort']."\">{--LOWER--}</a>";
} elseif ($cnt == $max) {
if (isPostRequestElementSet(('withdraw'))) {
// Okay, let's prepare...
$curr = date('m', time()) - 1;
- if (strlen($curr) == 1) $curr = 0 . $curr;
+ if (strlen($curr) == 1) $curr = '0' . $curr;
updateConfiguration('last_month', $curr);
loadTemplate('admin_settings_saved', false, getMessage('ADMIN_BEG_WITHDRAW_PREPARED'));
} // END - if
if (SQL_NUMROWS($result) > 0) {
// List users
- $OUT = '';$SW = 2; $cnt = 1; $total = 0;
+ $OUT = '';$SW = 2; $cnt = 1; $total = '0';
while ($content = SQL_FETCHARRAY($result)) {
// Init variables
$WIN1 = ''; $WIN2 = '';
if (isPostRequestElementSet(('withdraw'))) {
// Okay, let's prepare...
$curr = date('m', time()) - 1;
- if (strlen($curr) == 1) $curr = 0 . $curr;
+ if (strlen($curr) == 1) $curr = '0' . $curr;
updateConfiguration('last_month', $curr);
loadTemplate('admin_settings_saved', false, getMessage('ADMIN_BONUS_WITHDRAW_PREPARED'));
} // END - if
if (SQL_NUMROWS($result) > 0) {
// List users
- $OUT = '';$SW = 2; $cnt = 1; $total = 0;
+ $OUT = '';$SW = 2; $cnt = 1; $total = '0';
while ($content = SQL_FETCHARRAY($result)) {
// Add total points
$total += $content['points'];
// Check if country code does already exist
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_countries` WHERE code='%s' LIMIT 1",
array(strtoupper(postRequestElement('code'))), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 0) {
+ if (SQL_NUMROWS($result) == '0') {
// Save entry
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_countries` (code, descr, is_active) VALUES ('%s','%s','%s')",
array(
case 'overview': // General overview page
// Prepare links
foreach (array('already_direct','already_ref','waiting_direct','waiting_ref') as $entry) {
- $content[$entry . '_link'] = 0;
+ $content[$entry . '_link'] = '0';
} // END - switch
// Init sums
- $sumAlready = 0; $sumWaiting = 0;
+ $sumAlready = '0'; $sumWaiting = '0';
// Number of direct already payouts and referal
$cnt = countSumTotalData('Y','doubler','id','completed',true, " AND `is_ref`='N'");
array(bigintval($userid)), __FILE__, __LINE__);
list($task) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
- if (empty($task)) $task = 0;
- } elseif ((empty($userid)) || ($userid == 0)) {
+ if (empty($task)) $task = '0';
+ } elseif ((empty($userid)) || ($userid == '0')) {
// Cannot obtain member id!
loadTemplate('admin_settings_saved', false, getMessage('PAYOUT_FAILED_OBTAIN_USERID'));
} else {
// Cannot load user data
loadTemplate('admin_settings_saved', false, getMessage('PAYOUT_FAILED_OBTAIN_USERDATA'));
}
- } elseif ((empty($task)) || ($task == 0)) {
+ } elseif ((empty($task)) || ($task == '0')) {
// Failed loading task id
loadTemplate('admin_settings_saved', false, getMessage('PAYOUT_FAILED_OBTAIN_TASK_ID'));
}
// Rallye is active so do not edit it!
$row['select'] = "<div class=\"big\">".$row['id']."</div>";
$row['active_title'] = getMessage('RALLYE_DEACTIVATE_NOW');
- $row['active'] = 0;
+ $row['active'] = '0';
break;
case 'N':
switch ($data['send_notify']) {
case 'Y':
$row['notify_title'] = getMessage('RALLYE_STOP_NOTIFY_NOW');
- $row['notify'] = 0;
+ $row['notify'] = '0';
break;
case 'N':
switch ($data['auto_add_new_user']) {
case 'Y':
$row['auto_title'] = getMessage('RALLYE_STOP_AUTO_ADD_NOW');
- $row['auto'] = 0;
+ $row['auto'] = '0';
break;
case 'N':
array(bigintval(getRequestElement('id'))), __FILE__, __LINE__);
list($orders) = SQL_FETCHROW($result_orders);
SQL_FREERESULT($result_orders);
- if (empty($orders)) $orders = 0;
+ if (empty($orders)) $orders = '0';
// Prepare all data for the template
// Sponsor's id
if (isPostRequestElementSet('add')) {
// Check input variables
if (!isPostRequestElementSet('pay_name')) unsetPostRequestElement('add');
- if ((round(postRequestElement('pay_rate')) == 0) || (!isPostRequestElementSet('pay_rate'))) unsetPostRequestElement('add');
+ if ((round(postRequestElement('pay_rate')) == '0') || (!isPostRequestElementSet('pay_rate'))) unsetPostRequestElement('add');
setRequestPostElement('pay_min_count', bigintval(postRequestElement('pay_min_count')));
- if ((postRequestElement('pay_min_count') == 0) || (!isPostRequestElementSet('pay_min_count'))) unsetPostRequestElement('add');
+ if ((postRequestElement('pay_min_count') == '0') || (!isPostRequestElementSet('pay_min_count'))) unsetPostRequestElement('add');
if (!isPostRequestElementSet('pay_currency')) unsetPostRequestElement('add');
} elseif ((isPostRequestElementSet('edit')) || (isPostRequestElementSet('del')) || (isPostRequestElementSet('change')) || (isPostRequestElementSet('remove'))) {
// Check if entry with same name does exists
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` WHERE `pay_name`='%s' LIMIT 1",
array(postRequestElement('pay_name')), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 0) {
+ if (SQL_NUMROWS($result) == '0') {
// No entry found so add this line
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_paytypes` (`pay_name`, `pay_rate`, `pay_min_count`, `pay_currency`) VALUES ('%s','%s','%s','%s')",
array(
$show = true;
// Check for 'id' element
-if ((countRequestPost() > 0) && ((!isPostRequestElementSet('id')) || (!is_array(postRequestElement('id'))) || (count(postRequestElement('id')) == 0))) {
+if ((countRequestPost() > 0) && ((!isPostRequestElementSet('id')) || (!is_array(postRequestElement('id'))) || (count(postRequestElement('id')) == '0'))) {
// Not found so output message
loadTemplate('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_NO_SELECTIONS'));
}
if (!empty($whereStatement)) {
- $SEL = 0;
+ $SEL = '0';
if (isPostRequestElementSet(('task'))) $SEL = countSelection(postRequestElement('task'));
if ((isPostRequestElementSet(('assign'))) && ($SEL > 0)) {
// We only need outgoing transfers
$result = SQL_QUERY("SELECT userid, to_userid, trans_id, points, reason, time_trans FROM `{?_MYSQL_PREFIX?}_user_transfers_out` ORDER BY trans_id", __FILE__, __LINE__);
-$total = 0;
+$total = '0';
if (SQL_NUMROWS($result) > 0) {
// Output rows
$OUT = ''; $SW = 2;
// Transfer data to constants for the template
if (($stats_id > 0) && ($ID == '-1')) $ID = $stats_id;
- if ($col == 'bonus_id') $sender = 0;
+ if ($col == 'bonus_id') $sender = '0';
// Load unconfirmed mail links. Hmmm, this select query is pretty cool
// but it does only show unconfirmed mail links from existing user
} // END - if
// Clickrate
- $content['click_rate'] = 0;
+ $content['click_rate'] = '0';
if ($content['emails_received'] > 0) {
$content['click_rate'] = translateComma($content['mails_confirmed'] / $content['emails_received'] * 100);
} // END - if
if (isExtensionActive('country')) {
// Then overwrite country information
$content['country'] = generateCountryInfo($content['country_code']);
- } elseif ($content['country'] == 0) {
+ } elseif ($content['country'] == '0') {
// Zero id???
$content['country'] = '???';
}
$result_master = SQL_QUERY($sql, __FILE__, __LINE__);
// Calculate page count (0.5 fixes a bug with page count)
- if (getConfig('user_limit') == 0) {
+ if (getConfig('user_limit') == '0') {
setConfigEntry('user_limit', 100);
loadTemplate('admin_settings_saved', false, getMessage('EXTENSION_WARNING_USER_LIMIT'));
} // END - if
$pointsTotal = countSumTotalData($content['userid'], 'user_points', 'points') - countSumTotalData($content['userid'], 'user_data', 'used_points');
// Clickrate
- $clickRate = 0;
+ $clickRate = '0';
if ($content['emails_received'] > 0) {
$clickRate = $content['mails_confirmed'] / $content['emails_received'] * 100;
} // END - if
}
// Enougth queries left?
-if (getConfig('yoomedia_requests_remain') == 0) {
+if (getConfig('yoomedia_requests_remain') == '0') {
// Output message
loadTemplate('admin_settings_saved', false, getMessage('ADMIN_YOOMEDIA_REQUESTS_DEPLETED'));
$result = YOOMEDIA_GET_PARSED_RESULT_TEXTMAILS();
// Sanity-check on result array
-if ((!is_array($result)) || (count($result) == 0) || (!isset($result[0]['id']))) {
+if ((!is_array($result)) || (count($result) == '0') || (!isset($result[0]['id']))) {
// Invalid result
loadTemplate('admin_settings_saved', false, getMessage('ADMIN_YOOMEDIA_INVALID_RESULT'));
return false;
// Is this mail already sent?
if ($reload !== false) {
// Init countdown
- $countdown = 0;
+ $countdown = '0';
// Not manually locked?
if ($reload > 0) {
} // END - if
// Get count of (maybe) selected menu points
-$chk = 0;
+$chk = '0';
if (isPostRequestElementSet('sel')) $chk = countPostSelection();
// List all menu points and make them editable
// Edit menu entries
$content['sub'] = $SUB;
$content['chk'] = $chk;
- $SW = 2; $cnt = 0; $OUT = '';
+ $SW = 2; $cnt = '0'; $OUT = '';
foreach (postRequestElement('sel') as $sel => $confirm) {
if ($confirm == 1) {
$cnt++;
// Del menu entries with or without confirmation
$content['sub'] = $SUB;
$content['chk'] = $chk;
- $SW = 2; $cnt = 0; $OUT = '';
+ $SW = 2; $cnt = '0'; $OUT = '';
foreach (postRequestElement('sel') as $sel => $confirm) {
if ($confirm == 1) {
$cnt++;
// Change status (visible / locked)
$content['sub'] = $SUB;
$content['chk'] = $chk;
- $SW = 2; $cnt = 0; $OUT = '';
+ $SW = 2; $cnt = '0'; $OUT = '';
foreach (postRequestElement('sel') as $sel => $confirm) {
if ($confirm == 1) {
$cnt++;
// Set sub value
$content['sub'] = $SUB;
- $SW = 2; $cnt = 0; $OUT = '';
+ $SW = 2; $cnt = '0'; $OUT = '';
while ($data = SQL_FETCHARRAY($result)) {
// Init navigation
$data['navi'] = '';
$cnt++;
- if (($data['sort'] == 0) || (($data['sort'] == 1) && (!empty($SUB)))) {
+ if (($data['sort'] == '0') || (($data['sort'] == 1) && (!empty($SUB)))) {
// Is highest position
$data['navi'] = "<a href=\"{?URL?}/modules.php?module=admin&what=memedit&sub=".$content['sub']."&act=".$data['action']."&w=".$data['what']."&tid=".($data['sort']+1)."&fid=".$data['sort']."\">{--LOWER--}</a>";
} elseif ($cnt == $max) {
$DATA = repairOptimizeDatabase();
// Output rows
-$SW = 2; $gain_tabs = 0; $OUT = '';
+$SW = 2; $gain_tabs = '0'; $OUT = '';
foreach ($DATA['tables'] as $row_array) {
// Init variables
$B1 = ''; $B2 = '';
$OPT = getMessage('OPTIMIZE_STATUS_OPTIMIZED');
$B1 = '<strong>'; $B2 = '<strong>';
$gain_tabs++;
- } elseif (count(explode(' ', $row_array[2])) == 0) {
+ } elseif (count(explode(' ', $row_array[2])) == '0') {
$OPT = getMessage('OPTIMIZE_STATUS_' . strtoupper($row_array[2]).'');
}
addMenuDescription('admin', __FILE__);
// Init variable
-$SEL = 0;
+$SEL = '0';
// Some sanity-check
if ((!isPostRequestElementSet('url')) || (!isPostRequestElementSet(('alternate')))) {
// Check if banner is already added
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_refbanner` WHERE url='%s' LIMIT 1",
array(postRequestElement('url')), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 0) {
+ if (SQL_NUMROWS($result) == '0') {
// Add banner
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_refbanner` (url, alternate, visible)
VALUES ('%s','%s','%s')",
// First fix all main menus (what = '')...
$result_fix = SQL_QUERY("SELECT id, action FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE (`what`='' OR `what` IS NULL) AND action != 'logout' ORDER BY `sort` ASC", __FILE__, __LINE__);
-$cnt = 0; $REP = 0;
+$cnt = '0'; $REP = '0';
while ($content = SQL_FETCHARRAY($result_fix)) {
// Store act value for later usage in sorting sub menus
$ACTIONS[] = $content['action'];
$result = SQL_QUERY("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_cats` GROUP BY `userid` ORDER BY `userid` ASC", __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Nothing is removed for now... ;-)
- $REMOVED = 0;
+ $REMOVED = '0';
// Check if found userid is also found in user_data table
while ($content = SQL_FETCHARRAY($result)) {
$ACTIONS = array();
// First fix all main menus (what = '')...
$result_fix = SQL_QUERY("SELECT id, action FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE (`what`='' OR `what` IS NULL) AND action != 'logout' ORDER BY `sort` ASC", __FILE__, __LINE__);
-$cnt = 0; $REP = 0;
+$cnt = '0'; $REP = '0';
while ($content = SQL_FETCHARRAY($result_fix)) {
// Store act value for later usage in sorting sub menus
$ACTIONS[] = $content['action'];
// First fix all main menus (what = '')...
$result_fix = SQL_QUERY("SELECT id, action FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE (`what`='' OR `what` IS NULL) AND action != 'logout' ORDER BY `sort` ASC", __FILE__, __LINE__);
-$cnt = 0; $REP = 0;
+$cnt = '0'; $REP = '0';
while ($content = SQL_FETCHARRAY($result_fix)) {
// Store action value for later usage in sorting sub menus
$ACTIONS[] = $content['action'];
// Entries found?
if (SQL_NUMROWS($result) > 0) {
// Get all rows
- $OUT = ''; $SW = 2; $cnt = 0; $visits = 0;
+ $OUT = ''; $SW = 2; $cnt = '0'; $visits = '0';
while ($content = SQL_FETCHARRAY($result)) {
// Count totals
$visits += $content['total_visits'];
// Entries found?
if (SQL_NUMROWS($result) > 0) {
// Get all rows
- $OUT = ''; $SW = 2; $urls = 0; $visits = 0;
+ $OUT = ''; $SW = 2; $urls = '0'; $visits = '0';
while ($content = SQL_FETCHARRAY($result)) {
// Count totals
$urls += $content['visited_urls'];
// Normally we want the overview of all registered theme_check
$mode = 'overview';
-$SEL = 0;
+$SEL = '0';
// Get response from our server
$response = sendGetRequest('check-themes.php');
array_pk_sort($themes, array('cver', 'fname'), 0, 1);
// Extensions where found which are not downloaded and installed
- $OUT = ''; $SW = 2; $totalSize = 0;
+ $OUT = ''; $SW = 2; $totalSize = '0';
foreach ($themes['fname'] as $idx => $name) {
// Prepare data
$content = array(
} // END - if
// Check for selected themes
-$SEL = 0;
+$SEL = '0';
if (isPostRequestElementSet('sel')) $SEL = countPostSelection();
if ($SEL > 0) {
$OUT = '';
if ((SQL_NUMROWS($result_main) > 0) || (isPostRequestElementSet('lock'))) {
// Count checked checkboxes
- $SEL = 0;
+ $SEL = '0';
if (isPostRequestElementSet('sel')) {
// Are there checked boxes?
if (count(postRequestElement('sel')) > 0) {
// Lookup in blacklist
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_url_blacklist` WHERE `url`='%s' LIMIT 1",
array($url), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 0) {
+ if (SQL_NUMROWS($result) == '0') {
// Did not find a record so we can add it... :)
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_url_blacklist` (`url`,`pool_id`) VALUES ('%s',%s)",
array($url, $id), __FILE__, __LINE__);
// Analyse header for response code
if (eregi('200 OK', $response[0])) {
// Found, kill header
- $pos = 0;
+ $pos = '0';
foreach($response as $k => $v) {
$v = trim($v);
if (empty($v)) {
if ($num_themes > 1) {
// If more than 1 is installed output selection box
$OUT = generateThemeSelectionBox();
-} elseif (($num_themes == 1) || ((!isAdmin()) && ($num_themes == 0))) {
+} elseif (($num_themes == 1) || ((!isAdmin()) && ($num_themes == '0'))) {
// If there's only one just output it's name
$OUT = loadTemplate('theme_one', true, getCurrentThemeName());
} elseif (isAdmin()) {
if (isGetRequestElementSet('hash')) {
// Initialize the user id
- $userid = 0;
+ $userid = '0';
// Search for an unconfirmed or confirmed account
$result = SQL_QUERY_ESC("SELECT `userid`, `email`, `refid`,`gender` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `user_hash`='%s' AND (`status`='UNCONFIRMED' OR `status`='CONFIRMED') LIMIT 1",
updateReferalCounter($rid);
// Shall I 'pay' the referal points imidiately?
- if (getConfig('ref_payout') == 0) {
+ if (getConfig('ref_payout') == '0') {
// Yes, 'pay' it now
$locked = false;
} else {
} // END - if
// Initialize variables
-$errorCode = 0;
+$errorCode = '0';
$userid = false;
$hash = '';
$URL = '';
}
} elseif (isPostRequestElementSet('new_pass')) {
// New password requested
- $userid = 0;
+ $userid = '0';
if (isPostRequestElementSet('id')) $userid = bigintval(postRequestElement('id'));
} else {
// Not logged in
- $userid = 0; $hash = '';
+ $userid = '0'; $hash = '';
}
if (isMember()) {
$content['mt_start'] = generateDateTime(getConfig('mt_start'), 3);
// Project timestamp when number of members are reached
-$PROJECTED = 0;
+$PROJECTED = '0';
if ($content['user_count'] > 0) {
// @TODO Find a better formular than this one
$PROJECTED = round((time() - getConfig('mt_start')) / $content['user_count'] * getConfig('mt_stage') + getConfig('mt_start'));
$content['rec'] = countSumTotalData('CONFIRMED', 'user_data', 'receive_mails', 'status', false, " AND `receive_mails` > 0");
// Initial lots of variables
-$bmails = 0; $sent = 0; $max = 0; $rec = 0; $clicks = 0;
+$bmails = '0'; $sent = '0'; $max = '0'; $rec = '0'; $clicks = '0';
// Mail orders (only current)
$nmails = getMediadataEntry('normal_orders');
-if (empty($nmails)) $nmails = 0;
+if (empty($nmails)) $nmails = '0';
// Mails sent so far
$clicks = getMediadataEntry('normal_clicks');
$sent = getMediadataEntry('normal_send');
-if (empty($sent)) $sent = 0;
-if (empty($clicks)) $clicks = 0;
+if (empty($sent)) $sent = '0';
+if (empty($clicks)) $clicks = '0';
// Bonus mails
if (isExtensionActive('bonus')) {
$bmails = getMediadataEntry('bonus_orders');
- if (empty($bmails)) $bmails = 0;
+ if (empty($bmails)) $bmails = '0';
// Count bonus mails clicks / sent mails
$dmy = getMediadataEntry('bonus_clicks');
$dmy2 = getMediadataEntry('bonus_send');
- if (empty($dmy)) $dmy = 0;
- if (empty($dmy2)) $dmy2 = 0;
+ if (empty($dmy)) $dmy = '0';
+ if (empty($dmy2)) $dmy2 = '0';
$sent += $dmy2; $clicks += $dmy;
} // END - if
$content['_clr'] = translateComma($clr) . '%';
// Load jackpot
-$jackpot = 0;
+$jackpot = '0';
if (isExtensionActive('jackpot')) $jackpot = getJackpotPoints();
-if (empty($jackpot)) $jackpot = 0;
+if (empty($jackpot)) $jackpot = '0';
$content['jackpot'] = translateComma($jackpot);
// Total referal link clicks, total logins
// Get total points
$points = getMediadataEntry('total_points');
-if (empty($points)) $points = 0;
-if (empty($ref)) $ref = 0;
-if (empty($logins)) $logins = 0;
+if (empty($points)) $points = '0';
+if (empty($ref)) $ref = '0';
+if (empty($logins)) $logins = '0';
$content['total_points'] = translateComma($points);
$content['total_refclicks'] = $ref;
list($views, $clicks) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
-if (empty($total)) $total = 0;
-if (empty($views)) $views = 0;
-if (empty($clicks)) $clicks = 0;
+if (empty($total)) $total = '0';
+if (empty($views)) $views = '0';
+if (empty($clicks)) $clicks = '0';
$content['ref_total'] = $total;
$content['ref_views'] = $views;
__FILE__, __LINE__);
list($holiday) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
- if (empty($holiday)) $holiday = 0;
+ if (empty($holiday)) $holiday = '0';
$data = array(
'lang' => getMessage('MEDIA_HOLIDAY_COUNT'),
'value' => $holiday
__FILE__, __LINE__);
list($count_in, $points_in) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
- if (empty($count_in)) $count_in = 0;
- if (empty($points_in)) $points_in = 0;
+ if (empty($count_in)) $count_in = '0';
+ if (empty($points_in)) $points_in = '0';
$result = SQL_QUERY("SELECT COUNT(t.id), SUM(t.points)
FROM `{?_MYSQL_PREFIX?}_user_transfers_out` AS t
__FILE__, __LINE__);
list($count_out, $points_out) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
- if (empty($count_out)) $count_out = 0;
- if (empty($points_out)) $points_out = 0;
+ if (empty($count_out)) $count_out = '0';
+ if (empty($points_out)) $points_out = '0';
// Add header
$OUT_SPECIAL .= loadTemplate('mediadata_extra_hrow', true, getMessage('MEDIA_TRANSFER_HEADER'));
// Initialize variables
$isOkay = true;
$shortPass = false;
-$cats = 0;
+$cats = '0';
$ipTimedOut = false;
// Default refid is zero
$userid = SQL_INSERTID();
// Did this work?
- if ($userid == 0) {
+ if ($userid == '0') {
// Something bad happened!
loadTemplate('admin_settings_saved', false, getMessage('USER_NOT_REGISTERED'));
return;
// Write his welcome-points
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `userid`=%s AND `ref_depth`=0 LIMIT 1",
array(bigintval($userid)), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 0) {
+ if (SQL_NUMROWS($result) == '0') {
// Add only when the line was not found (maybe some more secure?)
$locked = 'points';
$gender = translateGender(postRequestElement('gender'));
// ... rewrite a zero referal id to the main title
- if (postRequestElement('refid') == 0) setRequestPostElement('refid', getConfig('MAIN_TITLE'));
+ if (postRequestElement('refid') == '0') setRequestPostElement('refid', getConfig('MAIN_TITLE'));
// Is ZIP code set?
if (isPostRequestElementSet('zip')) {
if (count($FORM_ERRORS) > 0) unsetPostRequestElement('ok');
}
-if ((isFormSent()) && (count($FORM_ERRORS) == 0)) {
+if ((isFormSent()) && (count($FORM_ERRORS) == '0')) {
// Generate message array
$messageArray = array(
'failed' => getMessage('SPONSOR_REGISTRATION_FAILED'),
$month = $idx;
// Append leading zero
- if ($idx < 10) $month = 0 . $idx;
+ if ($idx < 10) $month = '0' . $idx;
// Count months
$months[$month] = countSumTotalData(bigintval($month), 'user_data', 'userid', 'birth_month', true, " AND `status`='CONFIRMED'");
// Ok, we finally load the member action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, getMessage('MEMBER_404_ACTION'), getWhat());
+ addFatalMessage(__FILE__, __LINE__, getMessage('MEMBER_404_WHAT'), getWhat());
}
// [EOF]
// Ok, we finally load the member action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat()));
+ addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_WHAT'), getWhat()));
}
// [EOF]
// Ok, we finally load the member action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat()));
+ addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_WHAT'), getWhat()));
}
// [EOF]
// Ok, we finally load the member action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat()));
+ addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_WHAT'), getWhat()));
}
// [EOF]
// Ok, we finally load the member action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat()));
+ addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_WHAT'), getWhat()));
}
// [EOF]
// Ok, we finally load the member action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat()));
+ addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_WHAT'), getWhat()));
}
// [EOF]
// Ok, we finally load the member action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat()));
+ addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_WHAT'), getWhat()));
}
// [EOF]
// Ok, we finally load the member action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat()));
+ addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_WHAT'), getWhat()));
}
// [EOF]
// Ok, we finally load the member action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat()));
+ addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_WHAT'), getWhat()));
}
// [EOF]
// Ok, we finally load the member action module
loadInclude($inc);
} else {
- addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_ACTION'), getWhat()));
+ addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('MEMBER_404_WHAT'), getWhat()));
}
// [EOF]
if ($num_themes > 1) {
// If more than 1 is installed output selection box
$OUT = generateThemeSelectionBox();
-} elseif (($num_themes == 1) || ((!isAdmin()) && ($num_themes == 0))) {
+} elseif (($num_themes == 1) || ((!isAdmin()) && ($num_themes == '0'))) {
// If there's only one just output it's name
$OUT = loadTemplate('theme_one', true, getCurrentThemeName());
} elseif (isAdmin()) {
if ($cats > 0) {
$LEAST = false;
if (isFormSent()) {
- $cnt = 0;
+ $cnt = '0';
foreach (postRequestElement('cat') as $cat => $joined) {
if ($joined != 'Y') $cnt++;
} // END - foreach
// Is the form sent?
if (isFormSent()) {
// Start counting all
- $cnt = 0;
+ $cnt = '0';
// Go through all entries
foreach (postRequestElement('cat') as $cat => $joined) {
$result_user = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `userid`=%s AND `cat_id`=%s LIMIT 1",
array($UID, bigintval($cat)), __FILE__, __LINE__);
- if (SQL_NUMROWS($result_user) == 0) {
+ if (SQL_NUMROWS($result_user) == '0') {
$sql = "INSERT INTO `{?_MYSQL_PREFIX?}_user_cats` (userid, cat_id) VALUES ('%s','%s')";
} // END - if
$content = merge_array($content, SQL_FETCHARRAY($result2));
// Fix missing entries
- if (empty($content['timestamp'])) $content['timestamp'] = 0;
- if (empty($content['timestamp_ordered'])) $content['timestamp_ordered'] = 0;
+ if (empty($content['timestamp'])) $content['timestamp'] = '0';
+ if (empty($content['timestamp_ordered'])) $content['timestamp_ordered'] = '0';
if ((($content['timestamp'] + getConfig('holiday_lock')) > time()) || (($content['timestamp_ordered'] + getConfig('holiday_lock')) > time())) {
// Mail order is to close away!
$content['change'] = loadTemplate('member_mydata_button', true);
}
- if (strlen($content['birth_day']) == 1) $content['birth_day'] = 0 . $content['birth_day'];
- if (strlen($content['birth_month']) == 1) $content['birth_month'] = 0 . $content['birth_month'];
+ if (strlen($content['birth_day']) == 1) $content['birth_day'] = '0' . $content['birth_day'];
+ if (strlen($content['birth_month']) == 1) $content['birth_month'] = '0' . $content['birth_month'];
switch (getLanguage()) {
case 'de': $content['dob'] = $content['birth_day'] . '.' . $content['birth_month'] . '.' . $content['birth_year']; break;
// Look for nickname in database (we only need just one entry so don't worry about the "LIMIT 1" !)
$result = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `nickname`='%s' AND `userid` != '%s' LIMIT 1",
array(postRequestElement('nickname'), getMemberId()), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 0) {
+ if (SQL_NUMROWS($result) == '0') {
// Nickname not in use, so set it now
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `nickname`='%s' WHERE `userid`=%s LIMIT 1",
array(postRequestElement('nickname'), getMemberId()), __FILE__, __LINE__);
return;
} // END - if
-$URL = ''; $id = 0;
+$URL = ''; $id = '0';
$whereStatement = " WHERE `visible`='Y'";
// Set undefined array elements
getConfig('url_tlock')
), __FILE__, __LINE__);
- $type = 'TEMP'; $id = 0;
+ $type = 'TEMP'; $id = '0';
if (SQL_NUMROWS($result) == 1) {
// Load id and mail type
list($id, $type) = SQL_FETCHROW($result);
} // END - if
// Load receivers from database
- $TEST = array(); $cnt = 0;
+ $TEST = array(); $cnt = '0';
while ($holidayContent = SQL_FETCHARRAY($result)) {
if ($HOLIDAY) {
// Check for his holiday status
`userid`=%s AND `holiday_start` < UNIX_TIMESTAMP() AND `holiday_end` > UNIX_TIMESTAMP()
LIMIT 1",
array($holidayContent['userid']), __FILE__, __LINE__);
- if (SQL_NUMROWS($result_holiday) == 1) $holidayContent['userid'] = 0; // Exclude user who are in holiday
+ if (SQL_NUMROWS($result_holiday) == 1) $holidayContent['userid'] = '0'; // Exclude user who are in holiday
// Free memory
SQL_FREERESULT($result_holiday);
// Check if he has enougth points for this order and selected more than 0 receivers
if (($USED > 0) && ($USED <= $total) && ($content['target_send'] > 0)) {
// Gettings points is okay, so we can add $USED later from
- if (($id == 0) || ($type != 'TEMP')) {
+ if (($id == '0') || ($type != 'TEMP')) {
// New order
- $id = 0;
+ $id = '0';
if (isExtensionActive('html_mail')) {
// HTML extension is active
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_pool` (`sender`, `subject`, `text`, `receivers`, `payment_id`, `data_type`, `timestamp`, `url`, `cat_id`, `target_send`, `zip`, `html_msg`)
}
// Do we need to get the id number?
- if ($id == 0) {
+ if ($id == '0') {
// Order is placed as temporary. We need to get it's id for the frametester
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_pool` WHERE `sender`=%s AND `subject`='%s' AND `payment_id`=%s AND `data_type`='TEMP' AND `timestamp`=UNIX_TIMESTAMP() LIMIT 1",
array(
// id is received so we can redirect the user, used points will be added when he send's out the mail
$URL = 'modules.php?module=frametester&order=' . $id;
- } elseif ($content['target_send'] == 0) {
+ } elseif ($content['target_send'] == '0') {
// Not enougth receivers found which can receive mails
$URL = 'modules.php?module=login&what=order&code=' . getCode('MORE_RECEIVERS2');
} else {
} elseif (postRequestElement('receiver') == '0') {
// Not enougth receivers selected
$URL = 'modules.php?module=login&what=order&code=' . getCode('MORE_RECEIVERS1');
-} elseif (($ALLOWED == 0) && (getConfig('order_max_full') == 'ORDER')) {
+} elseif (($ALLOWED == '0') && (getConfig('order_max_full') == 'ORDER')) {
// No more mail orders allowed
loadTemplate('admin_settings_saved', false, getMessage('MEMBER_ORDER_ALLOWED_EXHAUSTED'));
} elseif (($links < getConfig('unconfirmed')) && ($mmails == 1)) {
$result_userids = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `cat_id`=%s AND `userid` != '%s' ORDER BY `userid` ASC",
array(bigintval($categoriesContent['id']), getMemberId()), __FILE__, __LINE__);
- $userid_cnt = 0;
+ $userid_cnt = '0';
while (list($ucat) = SQL_FETCHROW($result_userids)) {
// Check for holiday system
$HOL_ACTIVE = false;
// No cateogries are defined yet
loadTemplate('admin_settings_saved', false, "<span class=\"member_failed\">{--MEMBER_NO_CATS--}</span>");
}
-} elseif ($mmails == 0) {
+} elseif ($mmails == '0') {
// Please set more than 0 mails per day
loadTemplate('admin_settings_saved', false, getMessage('MEMBER_HAS_ZERO_MMAILS'));
} else {
} // END - if
$result_depths = SQL_QUERY("SELECT `level`, `percents` FROM `{?_MYSQL_PREFIX?}_refdepths` ORDER BY level", __FILE__, __LINE__);
-$totalPoints = 0;
+$totalPoints = '0';
while ($content = SQL_FETCHARRAY($result_depths)) {
// Load referal points
$result_points = SQL_QUERY_ESC("SELECT `points` FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `userid`=%s AND `ref_depth`='%s' LIMIT 1",
// Calculate maximum value
$max = round($totalPoints * $content['rate'] - 0.5);
- $PAY_MAX = 0;
+ $PAY_MAX = '0';
// Calulcate points from submitted amount
- $points = 0;
+ $points = '0';
if (isPostRequestElementSet('payout')) {
$points = bigintval(postRequestElement('payout')) / $content['rate'];
$PAY_MAX = $max / $content['rate'];
$content['rowspan'] = ($depths*2+15);
// Init some vars...
-$totalPoints = 0; $TREF = 0; $TLOCK = 0; $OUT = '';
+$totalPoints = '0'; $TREF = '0'; $TLOCK = '0'; $OUT = '';
// Load ref levels
while ($data = SQL_FETCHARRAY($result_depths)) {
$content = merge_array($content, $data);
// Initialize ref-count
- $REFS = 0;
+ $REFS = '0';
// Load referal points
$result_points = SQL_QUERY_ESC("SELECT `points`, `locked_points` FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `userid`=%s AND `ref_depth`='%s' LIMIT 1", array(getMemberId(), bigintval($content['level'])), __FILE__, __LINE__);
list($REFS) = SQL_FETCHROW($result_refs);
$TREF += $REFS;
} else {
- $REFS = 0;
+ $REFS = '0';
}
// Free result
}
// If TLOCK is 0 add 3 zeros for floating
-if ($TLOCK == 0) $TLOCK = '0.00000';
+if ($TLOCK == '0') $TLOCK = '0.00000';
// Remember several values in constants
$content['used'] = translateComma(getUserData('used_points'));
$locked = true;
// Shall I 'pay' the referal points imidiately?
- if (getConfig('ref_payout') == 0) {
+ if (getConfig('ref_payout') == '0') {
// Yes, 'pay' it now
$locked = false;
} // END - if
$percents = convertCommaToDot(postRequestElement('percents'));
// Validate percents
- if ((($percents >= getConfig('refback_min_perc')) || (round($percents) == 0)) && ($percents <= getConfig('refback_max_perc'))) {
+ if ((($percents >= getConfig('refback_min_perc')) || (round($percents) == '0')) && ($percents <= getConfig('refback_max_perc'))) {
// Change ref-back for this direct id
$status = updateMemberRefbackPercents(postRequestElement('id'), postRequestElement('percents'));
while ($content = SQL_FETCHARRAY($result)) {
// Init variables
$rows = '';
- $counter = 0;
+ $counter = '0';
$SW = 2;
// Check for users ref in this level
// List available ref banners
$OUT = ''; $SW = 2;
while ($row = SQL_FETCHARRAY($result)) {
- $test = str_replace(getConfig('URL'), getConfig('PATH'), $row['url']); $size = 0;
+ $test = str_replace(getConfig('URL'), getConfig('PATH'), $row['url']); $size = '0';
if ($test == $row['url']) {
// Download banner (I hope you keep the banner on same server???)
$fp = sendGetRequest($row['url']); $bannerContent = '';
while ($content = SQL_FETCHARRAY($result)) {
// Init variables
$rows = '';
- $counter = 0;
+ $counter = '0';
$SW = 2;
// Check for users ref in this level
} // END - switch
// Run the SQL command and set total points to zero
- $totalPoints = 0;
+ $totalPoints = '0';
$result = SQL_QUERY_ESC($sql, array(getMemberId()), __FILE__, __LINE__);
// Do we have entries?
// Free memory
SQL_FREERESULT($result);
- $total = 0;
+ $total = '0';
if (SQL_NUMROWS($result) > 0) {
// Search for entries
$result = SQL_QUERY("SELECT `party_userid`, `trans_id`, `points`, `reason`, `time_trans`, `trans_type` FROM `{?_MYSQL_PREFIX?}_transfers_tmp` ORDER BY `time_trans` DESC",
// Mails left for confirmation?
if (SQL_NUMROWS($result) > 0) {
// Please confirm these mails!
- $sum = 0; $OUT = ''; $SW = 2;
+ $sum = '0'; $OUT = ''; $SW = 2;
// Init content
$content = array();
if ((!isGetRequestElementSet('mode')) || (getRequestElement('mode') == 'choose')) {
// Let the user choose what he wants to do
$content['refid'] = getConfig(('wernis_refid'));
- $content['wernis_userid'] = 0;
+ $content['wernis_userid'] = '0';
// Are there some entries?
if (fetchUserData(getMemberId())) {
initMemberId();
// Set important header_sent
-if (!isset($GLOBALS['header_sent'])) $GLOBALS['header_sent'] = 0;
+if (!isset($GLOBALS['header_sent'])) $GLOBALS['header_sent'] = '0';
// Init fatal messages
initFatalMessages();
if (empty($title)) {
// No name found
$title = sprintf("%s (%s)", getMessage('LANG_UNKNOWN_MODULE'), $mod);
- if (SQL_NUMROWS($result) == 0) {
+ if (SQL_NUMROWS($result) == '0') {
// Add module to database
$dummy = checkModulePermissions($mod);
} // END - if
// Destroy cache here
// @TODO Rewrite this to a filter
- if ((getOutputMode() == 0) || (getOutputMode() == -1)) rebuildCacheFile('modules', 'modules');
+ if ((getOutputMode() == '0') || (getOutputMode() == -1)) rebuildCacheFile('modules', 'modules');
// And reload data
unset($GLOBALS['module_status'][$mod]);
// Module not found we don't add it to the database
$ret = '404';
}
- } elseif (($ret == 'cache_miss') && (getOutputMode() == 0)) {
+ } elseif (($ret == 'cache_miss') && (getOutputMode() == '0')) {
// Rebuild the cache files
rebuildCacheFile('modules', 'modules');
} elseif ($found === false) {
// Begin the navigation line
if ((!isset($GLOBALS['nav_depth'])) && ($return === false)) {
- $GLOBALS['nav_depth'] = 0;
+ $GLOBALS['nav_depth'] = '0';
$prefix = "<div class=\"you_are_here\">{--YOU_ARE_HERE--} <strong><a class=\"you_are_here\" href=\"{?URL?}/modules.php?module=".getModule().$LINK_ADD."\">Home</a></strong>";
} else {
if ($return === false) $GLOBALS['nav_depth']++;
//* DEBUG: */ print(__LINE__.'+'.$type."+<br />");
// Add closing div and br-tag
$OUT .= "</div><br />\n";
- $GLOBALS['nav_depth'] = 0;
+ $GLOBALS['nav_depth'] = '0';
// Run the filter chain
$ret = runFilterChain('post_youhere_line', array('access_level' => $accessLevel, 'type' => $type, 'content' => ""));
// Adds a menu (mode = guest/member/admin/sponsor) to output
function addMenu ($mode, $action, $what) {
// Init some variables
- $main_cnt = 0;
+ $main_cnt = '0';
$AND = '';
// is the menu action valid?
// Do we have some entries?
if ($totalWhats > 0) {
// Init counter
- $cnt = 0;
+ $cnt = '0';
// Load all sub menus
while ($content2 = SQL_FETCHARRAY($result_sub)) {
if (isset($GLOBALS['is_member'])) {
// Then return it
return $GLOBALS['is_member'];
- } elseif (getMemberId() == 0) {
+ } elseif (getMemberId() == '0') {
// No member
return false;
} else {
if (isset($GLOBALS['user_data'][getCurrentUserId()]['last_failure'])) {
// Backup the raw one and zero it
$GLOBALS['user_data'][getCurrentUserId()]['last_failure_raw'] = $GLOBALS['user_data'][getCurrentUserId()]['last_failure'];
- $GLOBALS['user_data'][getCurrentUserId()]['last_failure'] = 0;
+ $GLOBALS['user_data'][getCurrentUserId()]['last_failure'] = '0';
// Is it not zero?
if ($GLOBALS['user_data'][getCurrentUserId()]['last_failure_raw'] != '0000-00-00 00:00:00') {
$ret = getMessage('_CATEGORY_404');
// Is the category id set?
- if ($cid == 0) {
+ if ($cid == '0') {
// No category
$ret = getMessage('_CATEGORY_NONE');
} elseif ($cid > 0) {
array($rowName, $stats_id, bigintval($userid), $type), __FUNCTION__, __LINE__);
// Was it *not* found?
- if (SQL_NUMROWS($result) == 0) {
+ if (SQL_NUMROWS($result) == '0') {
// So we add one!
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_links` (`%s`, `userid`, `link_type`) VALUES ('%s','%s','%s')",
array($rowName, $stats_id, bigintval($userid), $type), __FUNCTION__, __LINE__);
// Calculate sum (default) or count records of given criteria
function countSumTotalData ($search, $tableName, $lookFor = 'id', $whereStatement = 'userid', $countRows = false, $add = '') {
- $ret = 0;
+ $ret = '0';
//* DEBUG: */ print($search.'/'.$tableName.'/'.$lookFor.'/'.$whereStatement.'/'.$add.'<br />');
if ((empty($search)) && ($search != '0')) {
// Count or sum whole table?
$ret = '0.00000';
} elseif (''.$ret.'' == '') {
// Fix empty result
- $ret = 0;
+ $ret = '0';
}
// Return value
// Getter fro ref level percents
function getReferalLevelPercents ($level) {
// Default is zero
- $per = 0;
+ $per = '0';
// Do we have cache?
if ((isset($GLOBALS['cache_array']['refdepths']['level'])) && (isExtensionActive('cache'))) {
* add_mode = Add points only to $userid or also refs? (WARNING! Changing 'ref' to 'direct'
* for default value will cause no referal will get points ever!!!)
*/
-function addPointsThroughReferalSystem ($subject, $userid, $points, $sendNotify = false, $rid = 0, $locked = false, $add_mode = 'ref') {
+function addPointsThroughReferalSystem ($subject, $userid, $points, $sendNotify = false, $rid = '0', $locked = false, $add_mode = 'ref') {
//* DEBUG: */ print("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n");
// Convert mode to lower-case
$add_mode = strtolower($add_mode);
- // When $userid = 0 add points to jackpot
- if (($userid == 0) && (isExtensionActive('jackpot'))) {
+ // When $userid = '0' add points to jackpot
+ if (($userid == '0') && (isExtensionActive('jackpot'))) {
// Add points to jackpot
addPointsToJackpot($points);
return;
if (!isset($GLOBALS['ref_level'])) {
// Initialialize referal system
//* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): Referal system initialized!<br />");
- $GLOBALS['ref_level'] = 0;
+ $GLOBALS['ref_level'] = '0';
} else {
// Increase referal level
$GLOBALS['ref_level']++;
$message = loadEmailTemplate('confirm-referal', $content, bigintval($userid));
sendEmail(getUserData('email'), THANX_REFERAL_ONE, $message);
- } elseif (($sendNotify) && (getUserData('refid') == 0) && ($locked === false) && ($add_mode == 'direct')) {
+ } elseif (($sendNotify) && (getUserData('refid') == '0') && ($locked === false) && ($add_mode == 'direct')) {
// Prepare content
$content = array(
'text' => getMessage('REASON_DIRECT_PAYMENT'),
} // END - if
// Init referal id
- $ref = 0;
+ $ref = '0';
// Check for his referal
if (fetchUserData($userid)) {
//* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):ref={$ref} - ADVANCE!<br />");
$GLOBALS['cache_array']['ref_level'][$userid]++;
updateReferalCounter($ref);
- } elseif ((($ref == $userid) || ($ref == 0)) && (isExtensionInstalledAndNewer('cache', '0.1.2'))) {
+ } elseif ((($ref == $userid) || ($ref == '0')) && (isExtensionInstalledAndNewer('cache', '0.1.2'))) {
// Remove cache here
//* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):ref={$ref} - CACHE!<br />");
rebuildCacheFile('refsystem', 'refsystem');
// Activate exchange
function FILTER_ACTIVATE_EXCHANGE () {
// Is the extension 'user' there?
- if ((!isExtensionActive('user')) || (getConfig('activate_xchange') == 0)) {
+ if ((!isExtensionActive('user')) || (getConfig('activate_xchange') == '0')) {
// Silently abort here
return false;
} // END - if
// Deletes a user account with given reason
function deleteUserAccount ($userid, $reason) {
- $points = 0;
+ $points = '0';
$result = SQL_QUERY_ESC("SELECT
(SUM(p.points) - d.used_points) AS points
FROM
array(bigintval($content['id'])), __FUNCTION__, __LINE__);
// Start adding all
- $userid_cnt = 0;
+ $userid_cnt = '0';
// @TODO Rewrite this to $content = SQL_FETCHARRAY()
while (list($ucat) = SQL_FETCHROW($result_userids)) {
$result_ver = SQL_QUERY_ESC("SELECT
$target = countSelection(explode(';', $receiverList));
// Receiver is zero?
- if ($receiver == 0) {
+ if ($receiver == '0') {
// Then auto-fix it
$receiver = $target;
} // END - if
$receiver = bigintval($receiver);
// Is the receiver zero and mode set?
- if (($receiver == 0) && (!empty($mode))) {
+ if (($receiver == '0') && (!empty($mode))) {
// Auto-fix receiver maximum
$receiver = getTotalReceivers($mode);
} // END - if
}
// Get timestamp for given stats type and data
-function getTimestampFromUserStats ($type, $data, $userid = 0) {
+function getTimestampFromUserStats ($type, $data, $userid = '0') {
// Default timestamp is zero
- $stamp = 0;
+ $stamp = '0';
// User id set?
- if ((isMemberIdSet()) && ($userid == 0)) {
+ if ((isMemberIdSet()) && ($userid == '0')) {
$userid = getMemberId();
} // END - if
$row['unconfirmed'] = countSumTotalData($row['refid'], 'user_links', 'id', 'userid', true);
// Init clickrate with zero
- $row['clickrate'] = 0;
+ $row['clickrate'] = '0';
// Is at least one mail received?
if ($row['emails_received'] > 0) {
}
// Creates a new task
-function createNewTask ($subject, $notes, $taskType, $userid = 0, $adminId = 0, $strip = true) {
+function createNewTask ($subject, $notes, $taskType, $userid = '0', $adminId = '0', $strip = true) {
// Insert the task data into the database
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_task_system` (`assigned_admin`, `userid`, `status`, `task_type`, `subject`, `text`, `task_created`) VALUES (%s,%s,'NEW','%s','%s','%s', UNIX_TIMESTAMP())",
array($adminId, $userid, $taskType, $subject, smartAddSlashes($notes)), __FUNCTION__, __LINE__, true, $strip);
* characters.
* @var int
*/
- var $WordWrap = 0;
+ var $WordWrap = '0';
/**
* Method to send mail: ("mail", "sendmail", or "smtp").
var $message_type = '';
var $boundary = array();
var $language = array();
- var $error_count = 0;
+ var $error_count = '0';
var $LE = "\r\n";
var $sign_cert_file = "";
var $sign_key_file = "";
$this->ContentType = 'multipart/alternative';
}
- $this->error_count = 0; // reset errors
+ $this->error_count = '0'; // reset errors
$this->SetMessageType();
$header .= $this->CreateHeader();
$body = $this->CreateBody();
function MailSend($header, $body) {
$to = '';
- for($i = 0; $i < count($this->to); $i++) {
+ for($i = '0'; $i < count($this->to); $i++) {
if($i != 0) { $to .= ', '; }
$to .= $this->AddrFormat($this->to[$i]);
}
}
/* Attempt to send attach all recipients */
- for($i = 0; $i < count($this->to); $i++) {
+ for($i = '0'; $i < count($this->to); $i++) {
if(!$this->smtp->Recipient($this->to[$i][0])) {
$bad_rcpt[] = $this->to[$i][0];
}
}
- for($i = 0; $i < count($this->cc); $i++) {
+ for($i = '0'; $i < count($this->cc); $i++) {
if(!$this->smtp->Recipient($this->cc[$i][0])) {
$bad_rcpt[] = $this->cc[$i][0];
}
}
- for($i = 0; $i < count($this->bcc); $i++) {
+ for($i = '0'; $i < count($this->bcc); $i++) {
if(!$this->smtp->Recipient($this->bcc[$i][0])) {
$bad_rcpt[] = $this->bcc[$i][0];
}
}
if(count($bad_rcpt) > 0) { // Create error message
- for($i = 0; $i < count($bad_rcpt); $i++) {
+ for($i = '0'; $i < count($bad_rcpt); $i++) {
if($i != 0) {
$error .= ', ';
}
$this->smtp->do_debug = $this->SMTPDebug;
$hosts = explode(';', $this->Host);
- $index = 0;
+ $index = '0';
$connection = ($this->smtp->Connected());
/* Retry while there is no connection */
for ($i=0 ;$i < count($line); $i++) {
$line_part = explode(' ', $line[$i]);
$buf = '';
- for ($e = 0; $e<count($line_part); $e++) {
+ for ($e = '0'; $e<count($line_part); $e++) {
$word = $line_part[$e];
if ($qp_mode and (strlen($word) > $length)) {
$space_left = $length - strlen($buf) - 1;
}
} else {
$buf_o = $buf;
- $buf .= ($e == 0) ? $word : (' ' . $word);
+ $buf .= ($e == '0') ? $word : (' ' . $word);
if (strlen($buf) > $length and $buf_o != '') {
$message .= $buf_o . $soft_break;
if ($dec < 128) { // Single byte character.
// If the encoded char was found at pos 0, it will fit
// otherwise reduce maxLength to start of the encoded char
- $maxLength = ($encodedCharPos == 0) ? $maxLength :
+ $maxLength = ($encodedCharPos == '0') ? $maxLength :
$maxLength - ($lookBack - $encodedCharPos);
$foundSplitPos = true;
} elseif ($dec >= 192) { // First byte of a multi byte character
if($this->Mailer != 'mail') {
if(count($this->to) > 0) {
$result .= $this->AddrAppend('To', $this->to);
- } elseif (count($this->cc) == 0) {
+ } elseif (count($this->cc) == '0') {
$result .= $this->HeaderLine('To', 'undisclosed-recipients:;');
}
}
}
// Add custom headers
- for($index = 0; $index < count($this->CustomHeader); $index++) {
+ for($index = '0'; $index < count($this->CustomHeader); $index++) {
$result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]), $this->EncodeHeader(trim($this->CustomHeader[$index][1])));
}
if (!$this->sign_key_file) {
$this->attachment[$cur][4] = $type;
$this->attachment[$cur][5] = false; // isStringAttachment
$this->attachment[$cur][6] = 'attachment';
- $this->attachment[$cur][7] = 0;
+ $this->attachment[$cur][7] = '0';
return true;
}
$mime = array();
/* Add all attachments */
- for($i = 0; $i < count($this->attachment); $i++) {
+ for($i = '0'; $i < count($this->attachment); $i++) {
/* Check for string attachment */
$bString = $this->attachment[$i][5];
if ($bString) {
* @return string
*/
function EncodeHeader ($str, $position = 'text') {
- $x = 0;
+ $x = '0';
switch (strtolower($position)) {
case 'phrase':
break;
}
- if ($x == 0) {
+ if ($x == '0') {
return ($str);
}
// Base64 has a 4:3 ratio
$offset = $avgLength = floor($length * $ratio * .75);
- for ($i = 0; $i < $mb_length; $i += $offset) {
- $lookBack = 0;
+ for ($i = '0'; $i < $mb_length; $i += $offset) {
+ $lookBack = '0';
do {
$offset = $avgLength - $lookBack;
while( list(, $line) = each($lines) ) {
$linlen = strlen($line);
$newline = '';
- for($i = 0; $i < $linlen; $i++) {
+ for($i = '0'; $i < $linlen; $i++) {
$c = substr( $line, $i, 1 );
$dec = ord( $c );
- if ( ( $i == 0 ) && ( $dec == 46 ) ) { // convert first point in the line into =2E
+ if ( ( $i == '0' ) && ( $dec == 46 ) ) { // convert first point in the line into =2E
$c = '=2E';
}
if ( $dec == 32 ) {
$this->attachment[$cur][4] = $type;
$this->attachment[$cur][5] = true; // isString
$this->attachment[$cur][6] = 'attachment';
- $this->attachment[$cur][7] = 0;
+ $this->attachment[$cur][7] = '0';
}
/**
*/
function InlineImageExists() {
$result = false;
- for($i = 0; $i < count($this->attachment); $i++) {
+ for($i = '0'; $i < count($this->attachment); $i++) {
if($this->attachment[$i][6] == 'inline') {
$result = true;
break;
*/
function POP3 ()
{
- $this->pop_conn = 0;
+ $this->pop_conn = '0';
$this->connected = false;
$this->error = null;
}
* @param string $username
* @param string $password
*/
- function Authorise ($host, $port = false, $tval = false, $username, $password, $debug_level = 0)
+ function Authorise ($host, $port = false, $tval = false, $username, $password, $debug_level = '0')
{
$this->host = $host;
* @return void
*/
function SMTP() {
- $this->smtp_conn = 0;
+ $this->smtp_conn = '0';
$this->error = null;
$this->helo_rply = null;
- $this->do_debug = 0;
+ $this->do_debug = '0';
}
/*************************************************************
if(!empty($this->smtp_conn)) {
# close the connection and cleanup
fclose($this->smtp_conn);
- $this->smtp_conn = 0;
+ $this->smtp_conn = '0';
}
}
$this->Mail->Subject = "Unit Test";\r
$this->Mail->Body = "";\r
$this->Mail->AltBody = "";\r
- $this->Mail->WordWrap = 0;\r
+ $this->Mail->WordWrap = '0';\r
$this->Mail->Host = $global_vars["mail_host"];\r
$this->Mail->Port = 25;\r
$this->Mail->Helo = "localhost.localdomain";\r
{\r
$ReportBody .= "Attachments:" . $eol;\r
$ReportBody .= $bullet_start;\r
- for($i = 0; $i < count($this->Mail->attachment); $i++)\r
+ for($i = '0'; $i < count($this->Mail->attachment); $i++)\r
{\r
$ReportBody .= $bullet . "Name: " . $this->Mail->attachment[$i][1] . ", ";\r
$ReportBody .= "Encoding: " . $this->Mail->attachment[$i][3] . ", ";\r
$ReportBody .= "-------" . $eol;\r
\r
$ReportBody .= $bullet_start;\r
- for($i = 0; $i < count($this->ChangeLog); $i++)\r
+ for($i = '0'; $i < count($this->ChangeLog); $i++)\r
{\r
$ReportBody .= $bullet . $this->ChangeLog[$i][0] . " was changed to [" . \r
$this->ChangeLog[$i][1] . "]" . $eol;\r
$ReportBody .= "-----" . $eol;\r
\r
$ReportBody .= $bullet_start;\r
- for($i = 0; $i < count($this->NoteLog); $i++)\r
+ for($i = '0'; $i < count($this->NoteLog); $i++)\r
{\r
$ReportBody .= $bullet . $this->NoteLog[$i] . $eol;\r
}\r
$testResult = $this->_createResult();\r
$this->fResult = $testResult;\r
$testResult->run(&$this);\r
- $this->fResult = 0;\r
+ $this->fResult = '0';\r
return $testResult;\r
}\r
\r
function countTestCases() {\r
/* Number of TestCases comprising this TestSuite (including those\r
in any constituent TestSuites) */\r
- $count = 0;\r
+ $count = '0';\r
reset($fTests);\r
while (list($na, $test_case) = each($this->fTests)) {\r
$count += $test_case->countTestCases();\r
class TestResult {\r
/* Collect the results of running a set of TestCases. */\r
var $fFailures = array();\r
- var $fRunTests = 0;\r
+ var $fRunTests = '0';\r
var $fStop = false;\r
\r
function TestResult() { }\r
$nFailures = $this->countFailures();\r
printf("<p>%s test%s run<br>", $nRun, ($nRun == 1) ? '' : 's');\r
printf("%s failure%s.<br>\n", $nFailures, ($nFailures == 1) ? '' : 's');\r
- if ($nFailures == 0)\r
+ if ($nFailures == '0')\r
return;\r
\r
print("<ol>\n");\r
} // END - if
// Do we have send maximum mails?
- if (($GLOBALS['pool_cnt'] >= getConfig('max_send')) || (countSelection($dummy) == 0)) {
+ if (($GLOBALS['pool_cnt'] >= getConfig('max_send')) || (countSelection($dummy) == '0')) {
// Yes, we have
//* DEBUG: */ print("*EXIT/L:".__LINE__."<br />");
break;
// Close sending system
//* DEBUG: */ print("-L:".__LINE__.'/'.countSelection($dummy)."-<br />");
- if (countSelection($dummy) == 0) {
+ if (countSelection($dummy) == '0') {
// Queue reached!
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_bonus` SET `data_type`='SEND', `target_send`=0, `receivers`='' WHERE `id`=%s LIMIT 1",
array(bigintval($DATA['id'])), __FILE__, __LINE__);
}
// Reset variables
-$cnt2 = 0; $lastSentId = 0; $cnt_back = array(0); $pointsBack = array(0);
+$cnt2 = '0'; $lastSentId = '0'; $cnt_back = array(0); $pointsBack = array(0);
if (SQL_NUMROWS($result_main) > 0) {
// Parse all mails
while ($DATA = SQL_FETCHARRAY($result_main, 0, false)) {
// If there's no stats entry add it!
//* DEBUG: */ outputHtml("!L:".__LINE__.'/'.SQL_NUMROWS($result_stats)."!<br />");
- if (SQL_NUMROWS($result_stats) == 0) {
+ if (SQL_NUMROWS($result_stats) == '0') {
// No entry was found, so we add him!
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_stats` (`pool_id` , `userid`, `cat_id`, `payment_id`, `subject`, `url` , `max_rec` , `timestamp_ordered`, `timestamp_sstart`) VALUES ('%s','%s','%s','%s','%s','%s','%s','%s' , UNIX_TIMESTAMP())",
array(bigintval($DATA['id']), bigintval($DATA['sender']), bigintval($DATA['cat_id']), bigintval($DATA['payment_id']), $DATA['subject'], $DATA['url'], $DATA['target_send'], bigintval($DATA['timestamp'])), __FILE__, __LINE__);
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_stats` SET `timestamp_send`=UNIX_TIMESTAMP() WHERE `pool_id`=%s LIMIT 1",
array(bigintval($DATA['id'])), __FILE__, __LINE__);
- $lastSentId = $DATA['id']; $GLOBALS['pool_cnt'] = 0;
+ $lastSentId = $DATA['id']; $GLOBALS['pool_cnt'] = '0';
$cnt2 += $GLOBALS['pool_cnt'];
// Update mediadata if version is 0.0.4 or higher
SQL_FREERESULT($result_stats);
} else {
// User does not exists so we have add the sender's points back to sender's account
- if (($RECEIVERS['id'] == 0) || (empty($RECEIVERS['id']))) {
+ if (($RECEIVERS['id'] == '0') || (empty($RECEIVERS['id']))) {
// List was empty
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_pool` SET `data_type`='SEND' WHERE `id`=%s LIMIT 1",
array(bigintval($DATA['id'])), __FILE__, __LINE__);
$content['check'] = '';
// @TODO 4 is hard-coded here, should we move it out in config?
- for ($idx = 0; $idx < 4; $idx++) {
+ for ($idx = '0'; $idx < 4; $idx++) {
$content['check'] .= generateRandomCode("8", mt_rand(0, $month.$day), $content['userid'], ($age * ($idx + 1)));
} // END - for
WHERE
(`last_update` < (UNIX_TIMESTAMP() - %s) AND `last_update` != 0 AND `last_profile_sent` < (UNIX_TIMESTAMP() - %s))
OR
- (`last_update` = 0 AND `last_profile_sent` = 0 AND `joined` < (UNIX_TIMESTAMP() - %s))
+ (`last_update` = '0' AND `last_profile_sent` = '0' AND `joined` < (UNIX_TIMESTAMP() - %s))
ORDER BY
`userid` ASC",
array(
// Translate timestamp
$content['joined'] = generateDateTime($content['joined'], 0);
- if (round($content['last_update']) == 0) {
+ if (round($content['last_update']) == '0') {
// Has never changed his accont
$content['last_update'] = getMessage('PROFILE_NEVER_CHANGED');
} else {
// Counter for SQLs array
function countSqls () {
// Default is false
- $count = 0;
+ $count = '0';
// Is the array there?
if (isSqlsInitialized()) {
// Getter for stats
function getStatsEntry ($entry) {
// Default is zero
- $stats = 0;
+ $stats = '0';
// Is it there?
if (isStatsEntrySet($entry)) {
} // END - switch
} // END - if
} // END - foreach
-} elseif ((getOutputMode() == 0) || (getConfig('css_php') == 'INLINE')) {
+} elseif ((getOutputMode() == '0') || (getConfig('css_php') == 'INLINE')) {
// Load CSS files
$STYLES = merge_array($STYLES, getExtensionCssFiles());
// Init user data array
function initUserData () {
// User id should not be zero
- if (getCurrentUserId() == 0) debug_report_bug('User id is zero.');
+ if (getCurrentUserId() == '0') debug_report_bug('User id is zero.');
// Init the user
$GLOBALS['user_data'][getCurrentUserId()]['status'] = 'GUEST';
// Getter for user data
function getUserData ($column) {
// User id should not be zero
- if (getCurrentUserId() == 0) debug_report_bug('User id is zero.');
+ if (getCurrentUserId() == '0') debug_report_bug('User id is zero.');
// Return the value
return $GLOBALS['user_data'][getCurrentUserId()][$column];
// Geter for whole user data array
function getUserDataArray () {
// User id should not be zero
- if (getCurrentUserId() == 0) debug_report_bug('User id is zero.');
+ if (getCurrentUserId() == '0') debug_report_bug('User id is zero.');
// Get the whole array
return $GLOBALS['user_data'][getCurrentUserId()];
// in, but you should use isMember() if you want to find that out.
function isUserDataValid () {
// User id should not be zero
- if (getCurrentUserId() == 0) debug_report_bug('User id is zero.');
+ if (getCurrentUserId() == '0') debug_report_bug('User id is zero.');
// Is the array there and filled?
return ((isset($GLOBALS['user_data'][getCurrentUserId()])) && (count($GLOBALS['user_data'][getCurrentUserId()]) > 1));
$GLOBALS['module'] = 'index';
// Set 'CSS-Mode'
-$GLOBALS['output_mode'] = 0;
+$GLOBALS['output_mode'] = '0';
// Load config.php
require('inc/config-global.php');
if (!isConfigEntrySet('index_cookie')) setConfigEntry('index_cookie', 0);
// Check for cookies
-if ((isSessionVariableSet('visited')) || (getConfig('index_delay') == 0)) {
+if ((isSessionVariableSet('visited')) || (getConfig('index_delay') == '0')) {
// Is the index page configured for redirect pr not?
if (getConfig('index_cookie') > 0) {
// Set cookie and remeber it for specified time
$GLOBALS['mxchange_installing'] = true;
// Set CSS variable for "normal mode"
-$GLOBALS['output_mode'] = 0;
+$GLOBALS['output_mode'] = '0';
// Set module
$GLOBALS['module'] = 'install';
$GLOBALS['module'] = 'lead-confirm';
// Set "CSS-Mode"
-$GLOBALS['output_mode'] = 0;
+$GLOBALS['output_mode'] = '0';
// Load config.php
require('inc/config-global.php');
$content['lead_email'] = getUserData('email');
} else {
// Not found!
- $content['lead_userid'] = 0;
+ $content['lead_userid'] = '0';
}
} else {
// Maybe spider?
redirectOnUninstalledExtension('mailid');
// Init
-$url_userid = 0;
-$url_bid = 0;
-$url_mid = 0;
+$url_userid = '0';
+$url_bid = '0';
+$url_mid = '0';
// Secure all data
if (isGetRequestElementSet('userid')) $url_userid = bigintval(getRequestElement('userid'));
if (isGetRequestElementSet('bonusid')) $url_bid = bigintval(getRequestElement('bonusid'));
// 01 1 12 2 2 21 1 22 10
-if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == 0)) {
+if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == '0')) {
// Init result
$result_link = false;
if (fetchUserData($url_userid)) {
// Status must be CONFIRMED
if (getUserData('status') == 'CONFIRMED') {
- // Update last activity
+ // Update last activity if not admin
updateLastActivity($url_userid);
// User has confirmed his account so we can procede...
// Was that mail a valid one?
if ($isValid === true) {
// If time is zero seconds we have a sponsor mail. 1 Second shall be set to avoid problems
- if (($time == 0) && ($payment > 0)) { $URL = getConfig('URL'); $time = 1; }
+ if (($time == '0') && ($payment > 0)) { $URL = getConfig('URL'); $time = 1; }
if (($time > 0) && (($payment > 0) || ($points > 0))) {
// Export data into constants for the template
$content = array(
redirectOnUninstalledExtension('other');
// Init variables
-$url_userid = 0;
-$url_bid = 0;
-$url_mid = 0;
-$code = 0;
+$url_userid = '0';
+$url_bid = '0';
+$url_mid = '0';
+$code = '0';
$mode = '';
// Secure all data
if (isGetRequestElementSet('mode')) $mode = getRequestElement('mode');
// 01 1 12 2 2 21 1 22 10
-if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == 0)) {
+if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == '0')) {
// No image? Then output header
if ($mode != 'img') loadIncludeOnce('inc/header.php');
SQL_FREERESULT($result_mailid);
// Set sender to 0 when we have a bonus mail
- if ($ltype == 'BONUS') $sender = 0;
+ if ($ltype == 'BONUS') $sender = '0';
// Is the user id valid?
if (fetchUserData($url_userid) === true) {
// Is this entry valid?
if ($isValid === true) {
- if (($time == 0) && ($payment > 0)) $time = 1;
+ if (($time == '0') && ($payment > 0)) $time = 1;
if (($time > 0) && ($payment > 0)) {
- $img_code = 0;
+ $img_code = '0';
if (!empty($code)) {
// Generate code
$img_code = generateRandomCode(getConfig('code_length'), $code, $url_userid, $urlId);
switch ($mode) {
case 'add':
// Init stats data
- $stats_data = 0;
+ $stats_data = '0';
// Count clicks
// @TODO Rewrite this to a filter
$GLOBALS['startTime'] = microtime(true);
// Init output mode and module
-$GLOBALS['output_mode'] = 0;
+$GLOBALS['output_mode'] = '0';
$GLOBALS['module'] = '';
// Needed include files
if ((isExtensionActive('maintenance')) && (getConfig('maintenance') == 'Y') && (!isAdmin()) && (getModule() != 'admin')) {
// Maintain mode is active and you are no admin
addFatalMessage(__FILE__, __LINE__, getMessage('LANG_DOWN_MAINTAINCE'));
-} elseif ((SQL_IS_LINK_UP()) && (getTotalFatalErrors() == 0)) {
+} elseif ((SQL_IS_LINK_UP()) && (getTotalFatalErrors() == '0')) {
// Construct module name
$GLOBALS['module_inc'] = sprintf("inc/modules/%s.php", getModule());
case 'mem_only': // Member-only access
case 'done': // All fine!
// Does the module exists on local file system?
- if ((isIncludeReadable($GLOBALS['module_inc'])) && (getTotalFatalErrors() == 0)) {
+ if ((isIncludeReadable($GLOBALS['module_inc'])) && (getTotalFatalErrors() == '0')) {
// Module is valid, active and located on the local disc...
$isModuleValid = true;
- } elseif (getTotalFatalErrors() == 0) {
+ } elseif (getTotalFatalErrors() == '0') {
// Module not found!
addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_404'), getModule()));
}
addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_UNKNOWN'), $check));
break;
} // END - switch
-} elseif (getTotalFatalErrors() == 0) {
+} elseif (getTotalFatalErrors() == '0') {
// MySQL problems!
addFatalMessage(__FILE__, __LINE__, getMessage('MYSQL_ERRORS'));
}
// Set this because we have no module in URI
$GLOBALS['module'] = 'show_bonus';
-$GLOBALS['output_mode'] = 0;
+$GLOBALS['output_mode'] = '0';
// Load the required file(s)
require('inc/config-global.php');
// Set module
$GLOBALS['module'] = 'surfbar';
-$GLOBALS['output_mode'] = 0;
+$GLOBALS['output_mode'] = '0';
$GLOBALS['header_sent'] = 3;
// Load the required file(s)
// Is a frame active?
if (isGetRequestElementSet('frame')) {
// Then we need to set header_sent to 0
- $GLOBALS['header_sent'] = 0;
+ $GLOBALS['header_sent'] = '0';
} // END - if
// Only logged in users may use this surfbar!
+++ /dev/null
-@DEPRECATED
+++ /dev/null
-@DEPRECATED
--- /dev/null
+<div align="center">
+<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_networks&do=addnetwork" method="post" style="margin-bottom: 0px">
+<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed">
+ <tr>
+ <td class="admin_title bottom2" colspan="2" align="center" height="30">
+ <strong>{--ADMIN_NETWORK_ADD_TITLE--}</strong>
+ </td>
+ </tr>
+ <tr>
+ <td class="seperator" colspan="2" height="7"> </td>
+ </tr>
+ <tr>
+ <td align="right" width="200">{--ADMIN_NETWORK_SHORT_NAME--}:</td>
+ <td>
+ <input type="text" name="network_short_name" class="admin_normal" size="10" maxlength="50" />
+ </td>
+ </tr>
+ <tr>
+ <td class="seperator" colspan="2" height="7"> </td>
+ </tr>
+ <tr>
+ <td align="right" width="200">{--ADMIN_NETWORK_TITLE--}:</td>
+ <td>
+ <input type="text" name="network_title" class="admin_normal" size="20" maxlength="255" />
+ </td>
+ </tr>
+ <tr>
+ <td class="seperator" colspan="2" height="7"> </td>
+ </tr>
+ <tr>
+ <td align="right" width="200">{--ADMIN_NETWORK_REFLINK--}:</td>
+ <td>
+ <input type="text" name="network_reflink" class="admin_normal" size="30" maxlength="255" />
+ </td>
+ </tr>
+ <tr>
+ <td class="seperator" colspan="2" height="7"> </td>
+ </tr>
+ <tr>
+ <td align="right" width="200">{--ADMIN_NETWORK_DATA_SEPERATOR--}:</td>
+ <td>
+ <input type="text" name="network_data_seperator" class="admin_normal" size="4" maxlength="4" />
+ </td>
+ </tr>
+ <tr>
+ <td class="seperator" colspan="2" height="7"> </td>
+ </tr>
+ <tr>
+ <td align="right" width="200">{--ADMIN_NETWORK_ROW_SEPERATOR--}:</td>
+ <td>
+ <input type="text" name="network_row_seperator" class="admin_normal" size="4" maxlength="4" />
+ </td>
+ </tr>
+ <tr>
+ <td class="seperator" colspan="2" height="7"> </td>
+ </tr>
+ <tr>
+ <td align="right" width="200">{--ADMIN_NETWORK_REQUEST_TYPE--}:</td>
+ <td>
+ <select class="admin_select" name="network_request_type" size="1">
+ <option value="GET">{--ADMIN_NETWORK_REQUEST_TYPE_GET--}</option>
+ <option value="POST">{--ADMIN_NETWORK_REQUEST_TYPE_POST--}</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class="seperator" colspan="2" height="7"> </td>
+ </tr>
+ <tr>
+ <td align="right" width="200">{--ADMIN_NETWORK_CHARSET--}:</td>
+ <td>
+ <input type="text" name="network_charset" class="admin_normal" size="15" maxlength="20" />
+ </td>
+ </tr>
+ <tr>
+ <td class="seperator bottom2" colspan="2" height="7"> </td>
+ </tr>
+ <tr>
+ <td class="admin_footer" colspan="2" align="center">
+ <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" />
+ <input type="submit" name="ok" class="admin_submit" value="{--ADMIN_NETWORK_ADD--}" />
+ </td>
+ </tr>
+</table>
+</form>
+</div>
+
+<div class="admin_note">
+ {--ADMIN_NETWORK_ADD_NOTE--}
+</div>
</td>
<td class="seperator" width="5"> </td>
<td align="center">
- <select name="beg_pay_mode" size="1">
+ <select class="admin_select" name="beg_pay_mode" size="1">
<option value="IMG"$content[pay_mode_img]>{--ADMIN_BEG_PAY_MODE_IMG--}</option>
<option value="JS"$content[pay_mode_js]>{--ADMIN_BEG_PAY_MODE_JS--}</option>
<option value="BOTH"$content[pay_mode_both]>{--ADMIN_BEG_PAY_MODE_BOTH--}</option>
--- /dev/null
+<tr>
+ <td class="$content[sw]">{--ADMIN_NETWORK_SHORT_NAME--}:</td>
+ <td class="$content[sw]">
+ <input type="text" name="network_short_name[$content[network_id]]" class="admin_normal" size="10" maxlength="50" value="$content[network_short_name]" />
+ </td>
+ <td class="$content[sw]">{--ADMIN_NETWORK_TITLE--}:</td>
+ <td class="$content[sw]">
+ <input type="text" name="network_title[$content[network_id]]" class="admin_normal" size="20" maxlength="255" value="$content[network_title]" />
+ </td>
+</tr>
+<tr>
+ <td class="$content[sw]">{--ADMIN_NETWORK_REFLINK--}:</td>
+ <td class="$content[sw]">
+ <input type="text" name="network_reflink[$content[network_id]]" class="admin_normal" size="30" maxlength="255" value="$content[network_reflink]" />
+ </td>
+ <td class="$content[sw]">{--ADMIN_NETWORK_DATA_SEPERATOR--}:</td>
+ <td class="$content[sw]">
+ <input type="text" name="network_data_seperator[$content[network_id]]" class="admin_normal" size="4" maxlength="4" value="$content[network_data_seperator]" />
+ </td>
+</tr>
+<tr>
+ <td class="$content[sw]">{--ADMIN_NETWORK_ROW_SEPERATOR--}:</td>
+ <td class="$content[sw]">
+ <input type="text" name="network_row_seperator[$content[network_id]]" class="admin_normal" size="4" maxlength="4" value="$content[network_row_seperator]" />
+ </td>
+ <td class="$content[sw]">{--ADMIN_NETWORK_REQUEST_TYPE--}:</td>
+ <td class="$content[sw]">
+ $content[network_request_type]
+ </td>
+</tr>
+<tr>
+ <td class="$content[sw]">{--ADMIN_NETWORK_CHARSET--}:</td>
+ <td class="$content[sw]">
+ <input type="text" name="network_charset[$content[network_id]]" class="admin_normal" size="15" maxlength="20" value="$content[network_charset]" />
+ </td>
+ <td class="$content[sw] seperator" colspan="2"> </td>
+</tr>
--- /dev/null
+<div align="center">
+<form accept-charset="utf-8" action="{?URL?}/modules.php?module=admin&what=list_networks&do=handlenetwork" method="post">
+<table border="0" cellspacing="0" cellpadding="0" width="680" class="admin_table dashed">
+ <tr>
+ <td height="25" colspan="3" class="admin_title bottom2 right2 seperator"> </td>
+ <td colspan="2" class="admin_title bottom2 right2" align="center">
+ <strong>{--ADMIN_NETWORK_SEPERATOR--}</strong>
+ </td>
+ <td colspan="2" class="admin_title bottom2 seperator"> </td>
+ </tr>
+ <tr>
+ <td align="center" class="admin_title bottom2 right2" height="25"><strong>{--ID_SELECT--}</strong></td>
+ <td align="center" class="admin_title bottom2 right2"><strong>{--ADMIN_NETWORK_SHORT_NAME--}</strong></td>
+ <td align="center" class="admin_title bottom2 right2"><strong>{--ADMIN_NETWORK_REFLINK--}</strong></td>
+ <td align="center" class="admin_title bottom2 right2"><strong>{--ADMIN_NETWORK_DATA_SEPERATOR2--}</strong></td>
+ <td align="center" class="admin_title bottom2 right2"><strong>{--ADMIN_NETWORK_ROW_SEPERATOR2--}</strong></td>
+ <td align="center" class="admin_title bottom2 right2"><strong>{--ADMIN_NETWORK_REQUEST_TYPE--}</strong></td>
+ <td align="center" class="admin_title bottom2"><strong>{--ADMIN_NETWORK_CHARSET--}</strong></td>
+ </tr>
+ $content
+ <tr>
+ <td colspan="7" class="admin_footer">
+ <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" />
+ <input type="submit" name="edit" class="admin_submit" value="{--ADMIN_NETWORK_EDIT--}" />
+ <input type="submit" name="del" class="admin_delete" value="{--ADMIN_NETWORK_DELETE--}" />
+ </td>
+ </tr>
+</table>
+</form>
+
+<div class="admin_note">
+ {--ADMIN_NETWORK_LIST_NOTE--}
+</div>
+</div>
--- /dev/null
+<tr>
+ <td class="switch_sw$content[sw] bottom2 right2" align="center">
+ <input type="checkbox" title="{--ID_SELECT--} $content[network_id]" class="admin_normal" name="sel[$content[network_id]]" value="1" />
+ </td>
+ <td class="switch_sw$content[sw] bottom2 right2" align="center">
+ $content[network_short_name]:
+ [<a
+ href="{?URL?}/modules.php?module=admin&what=list_network_types&network=$content[network_id]" title="{--ADMIN_NETWORK_LIST_TYPES_LINK_TITLE--}">T</a>|<a
+ href="{?URL?}/modules.php?module=admin&what=list_network_params&network=$content[network_id]" title="{--ADMIN_NETWORK_LIST_PARAMS_LINK_TITLE--}">P</a>|<a
+ href="{?URL?}/modules.php?module=admin&what=list_network_code_types&network=$content[network_id]" title="{--ADMIN_NETWORK_LIST_CODE_TYPES_LINK_TITLE--}">CT</a>|<a
+ href="{?URL?}/modules.php?module=admin&what=list_network_codes&network=$content[network_id]" title="{--ADMIN_NETWORK_LIST_CODES_LINK_TITLE--}">C</a>]
+ </td>
+ <td class="switch_sw$content[sw] bottom2 right2" align="center">
+ [<a href="$content[network_reflink]" target="_blank" title="$content[network_title]">$content[network_title]</a>]
+ </td>
+ <td class="switch_sw$content[sw] bottom2 right2" align="center">
+ $content[network_data_seperator]
+ </td>
+ <td class="switch_sw$content[sw] bottom2 right2" align="center">
+ $content[network_row_seperator]
+ </td>
+ <td class="switch_sw$content[sw] bottom2 right2" align="center">
+ $content[network_request_type]
+ </td>
+ <td class="switch_sw$content[sw] bottom2" align="center">
+ $content[network_charset]
+ </td>
+</tr>
--- /dev/null
+<div align="center" style="margin-top:10px;margin-bottom:10px">
+
+<div style="width:550px" class="admin_table dashed">
+ <div class="admin_title2 bottom2">
+ {--ADMIN_NETWORK_ADDED_TITLE--}
+ </div>
+ <div class="admin_message">
+ Das Werbenetzwerk $content[network_title] wurde soeben hinzugefügt.
+ Sie sollten nun als nächstes die <a href="{?URL?}/modules.php?module=admin&what=list_network_types&network=$content[network_id]">Werbearten hinzufügen</a>.
+ </div>
+</div>
+
+</div>
}
A:visited {
- color: #AA0044;
+ color: #ae3139;
}
A:active {
input,textarea {
color: #009900;
background-color: #EEFFEE;
- border: 1px solid #AA0044;
+ border: 1px solid #00aa44;
text-decoration: none;
border-style: groove;
}
select,option {
background-color: #EEFFEE;
border: solid 1px #009900;
- color: #AA0044;
+ color: #00aa44;
text-decoration: none;
border-style: groove;
}
.admin_reset, .guest_reset, .member_reset {
border-style: groove;
border: solid 1px #009900;
- color: #AA0044;
+ color: #00aa44;
cursor: pointer;
}
.admin_submit, .guest_submit, .member_submit {
- color: #AA0044;
+ color: #00aa44;
border-color: #009900;
cursor: pointer;
}
}
.admin_done2 {
- color: #AA0044;
+ color: #00aa44;
}
.admin_green, .admin_no {
}
.admin_header_b1 {
- border-bottom: 1px solid #AA0044;
+ border-bottom: 1px solid #00aa44;
background-color: #ddeedd;
height: 22px;
}
color: #009900;
height: 25px;
width: 200px;
- border: 1px solid #AA0044;
+ border: 1px solid #00aa44;
}
.guest_menu_row, .guest_menu_bottom, .member_menu_row, .member_menu_bottom
{
- border: 1px solid #AA0044;
+ border: 1px solid #00aa44;
border-top: 0px;
background-color: #eeffbc;
height: 22px;
}
.member_menu_whats {
- border: 1px solid #AA0044;
+ border: 1px solid #00aa44;
border-top: 0px;
background-color: #eeffee;
height: 20px;
}
.dashed {
- border: solid 1px #AA0044;
+ border: solid 1px #00aa44;
}
.switch_sw1, .switch_mem1 {
.admin_delete, .admin_yes {
border-style: groove;
border: solid 1px #00AA00;
- background-color: #AA0044;
+ background-color: #aa0044;
color: #DDEEDD;
cursor: pointer;
}
}
.top2 {
- border-top: 1px solid #AA0044;
+ border-top: 1px solid #00aa44;
}
.bottom2 {
- border-bottom: 1px solid #AA0044;
+ border-bottom: 1px solid #00aa44;
}
.left2 {
- border-left: 1px solid #AA0044;
+ border-left: 1px solid #00aa44;
}
.right2 {
- border-right: 1px solid #AA0044;
+ border-right: 1px solid #00aa44;
}
.nobr {
}
.theme_box {
- border: 1px dotted #AA0044;
+ border: 1px dotted #00aa44;
border-top: 0px;
width: 100%;
height: 70px;
}
ul.show_timings_block {
- border: solid 1px #AA0044;
+ border: solid 1px #00aa44;
background-color: #ddeedd;
width: 565px;
height: 20px;
.member_skyscraper, .guest_skyscraper {
width: 122px;
height: 602px;
- border: 1px solid #AA0044;
+ border: 1px solid #00aa44;
margin: 0px;
padding: 0px;
padding-top: 1px;
.register_reset {
border-style: groove;
border: solid 1px #009900;
- color: #AA0044;
+ color: #00aa44;
}
.register_submit {
- color: #AA0044;
+ color: #00aa44;
border-color: #009900;
}
background-color: #eeffbc;
color: #0000AA;
font-weight: bold;
- border-top: 1px dotted #AA0044;
- border-bottom: 1px dotted #AA0044;
+ border-top: 1px dotted #00aa44;
+ border-bottom: 1px dotted #00aa44;
height: 25px;
}
.register_term {
- background-color: #AA0044;
+ background-color: #00aa44;
}