inc/modules/admin/what-theme_import.php -text
inc/modules/admin/what-unlock_emails.php -text
inc/modules/admin/what-unlock_sponsor.php -text
+inc/modules/admin/what-unlock_surfbar_urls.php -text
inc/modules/admin/what-updates.php -text
inc/modules/admin/what-usage.php -text
inc/modules/admin/what-user_contct.php -text
inc/modules/member/what-sponsor.php -text
inc/modules/member/what-stats.php -text
inc/modules/member/what-support.php -text
+inc/modules/member/what-surfbar_book.php -text
inc/modules/member/what-surfbar_start.php -text
inc/modules/member/what-themes.php -text
inc/modules/member/what-transfer.php -text
inc/monthly/monthly_beg.php -text
inc/monthly/monthly_bonus.php -text
inc/monthly/monthly_newsletter.php -text
-inc/monthly_newsletter.php -text
+inc/monthly/monthly_surfbar.php -text
inc/mysql-connect.php -text
inc/mysql-manager.php -text
inc/patch-system.php -text
inc/reset/reset_daily.php -text
inc/reset/reset_engine.php -text
inc/reset/reset_holiday.php -text
+inc/reset/reset_surfbar.php -text
inc/security.php -text
inc/session.php -text
inc/sql_error.php -text
inc/stats_bonus.php -text
inc/stylesheet.php -text
inc/theme-manager.php -text
+inc/weekly/.htaccess -text
+inc/weekly/weekly_ -text
+inc/weekly/weekly_surfbar.php -text
/index.php -text
/install.php -text
install/menu-de.sql -text
templates/de/emails/admin/admin_support-ordr.tpl -text
templates/de/emails/admin/admin_support-reflink.tpl -text
templates/de/emails/admin/admin_support-unconfirmed.tpl -text
+templates/de/emails/admin/admin_surfbar_url_reg.tpl -text
templates/de/emails/admin/admin_surfbar_url_unlock.tpl -text
templates/de/emails/admin/admin_transfer_ap.tpl -text
templates/de/emails/admin/admin_transfer_points.tpl -text
templates/de/emails/member/member_support-ordr.tpl -text
templates/de/emails/member/member_support-reflink.tpl -text
templates/de/emails/member/member_support-unconfirmed.tpl -text
+templates/de/emails/member/member_surfbar_url_reg.tpl -text
templates/de/emails/member/member_surfbar_url_unlock.tpl -text
templates/de/emails/member/member_transfer_recipient.tpl -text
templates/de/emails/member/member_transfer_sender.tpl -text
templates/de/html/member/member_support_contacted.tpl -text
templates/de/html/member/member_support_contcted.tpl -text
templates/de/html/member/member_support_form.tpl -text
+templates/de/html/member/member_surfbar_book_dynamic.tpl -text
+templates/de/html/member/member_surfbar_book_static.tpl -text
templates/de/html/member/member_surfbar_link.tpl -text
templates/de/html/member/member_surfbar_start_static.tpl -text
templates/de/html/member/member_themes.tpl -text
templates/de/html/surfbar/.htaccess -text
templates/de/html/surfbar/surfbar_frame_banner.tpl -text
templates/de/html/surfbar/surfbar_frame_start.tpl -text
+templates/de/html/surfbar/surfbar_frame_stats.tpl -text
templates/de/html/surfbar/surfbar_frame_top.tpl -text
templates/de/html/surfbar/surfbar_frameset.tpl -text
templates/de/html/surfbar/surfbar_start_banner.tpl -text
// Add points to "total payed" including charge
$points = $_POST['points'] - $_POST['points'] * $_CONFIG['doubler_charge'];
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET doubler_points=doubler_points+%s WHERE config=0 LIMIT 1",
- array($points), __FILE__, __LINE__);
+ UPDATE_CONFIG("doubler_points", $points, "+");
$_CONFIG['doubler_points'] += $points;
- // Destroy cache
- if (GET_EXT_VERSION("cache") >= "0.1.2")
- {
- if ($cacheInstance->cache_file("config", true)) $cacheInstance->cache_destroy();
- }
-
// Add second line for the referral but only when uid != refid
if (($GLOBALS['refid'] > 0) && ($GLOBALS['refid'] != $uid))
{
}
// Update usage counter
- $result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_config SET doubler_counter=doubler_counter+1 WHERE config=0 LIMIT 1", __FILE__, __LINE__);
+ UPDATE_CONFIG("doubler_counter", 1, "+");
$_CONFIG['doubler_counter']++;
// Set constant
return $select;
}
// SQL close link
-function SQL_CLOSE($link, $F, $L) {
+function SQL_CLOSE(&$link, $F, $L) {
+ // Is there still a valid link?
+ if (!is_resource($link)) {
+ // Skip double close
+ return false;
+ } // END - if
+
global $_CONFIG, $cacheInstance, $cacheArray;
if ((GET_EXT_VERSION("cache") >= "0.0.7") && (isset($_CONFIG['db_hits'])) && (isset($_CONFIG['cache_hits'])) && (is_object($cacheInstance))) {
// Update counter for db/cache
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET db_hits=%s, cache_hits=%s WHERE config=0 LIMIT 1",
- array(bigintval($_CONFIG['db_hits']), bigintval($_CONFIG['cache_hits'])), __FILE__, __LINE__);
-
- // Update cache here
- if (GET_EXT_VERSION("cache") >= "0.1.2") {
- if ($cacheInstance->cache_file("config", true)) {
- // Replace data
- $cacheInstance->cache_replace("cache_hits", $_CONFIG['cache_hits'], "0", $cacheArray);
- $cacheInstance->cache_replace("db_hits" , $_CONFIG['db_hits'] , "0", $cacheArray);
- }
- }
- }
+ UPDATE_CONFIG(array("db_hits", "cache_hits"), array(bigintval($_CONFIG['db_hits']), bigintval($_CONFIG['cache_hits'])));
+ } // END - if
- // Close database link
+ // Close database link and forget the link
$close = @mysql_close($link) or ADD_FATAL($F." (".$L."):".mysql_error());
+ $link = null;
return $close;
}
// SQL free result
}
// Update doubler's account only when others are not updated
- if (!$OK)
- {
+ if (!$OK) {
// Add points to used doubler points
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET doubler_used=doubler_used+%s WHERE config=0 LIMIT 1",
- array($points), __FILE__, __LINE__);
-
- // Destroy cache
- if (GET_EXT_VERSION("cache") >= "0.1.2")
- {
- if ($cacheInstance->cache_file("config", true)) $cacheInstance->cache_destroy();
- }
+ UPDATE_CONFIG("douber_used", $points, "+");
}
// Update variables to prevent errors
{
// Task not created so it's a brand-new extension which we need to register and create a task for!
$result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (assigned_admin, userid, status, task_type, subject, text, task_created) VALUES ('%s', '0', 'NEW', 'EXTENSION_UPDATE', '%s', '%s', UNIX_TIMESTAMP())",
- array(GET_ADMIN_ID(SQL_ESCAPE(get_session('admin_login'))), $ext_subj, addslashes($NOTES)), __FILE__, __LINE__);
+ array(GET_ADMIN_ID(get_session('admin_login')), $ext_subj, addslashes($NOTES)), __FILE__, __LINE__);
}
// Free memory
// Return output
return $OUT;
}
-//
-function GET_EXT_NAME($id)
-{
+// Get extension name from id
+function GET_EXT_NAME ($id) {
$ret = "";
global $cacheArray, $_CONFIG;
- if (!empty($cacheArray['extensions']['ext_id'][$id]))
- {
+ if (!empty($cacheArray['extensions']['ext_name'][$id])) {
// Load from cache
- $ret = $cacheArray['extensions']['ext_id'][$id];
+ $ret = $cacheArray['extensions']['ext_name'][$id];
// Count cache hits
$_CONFIG['cache_hits']++;
- }
- else
- {
+ } elseif (!EXT_IS_ACTIVE("cache")) {
// Load from database
$result = SQL_QUERY_ESC("SELECT ext_name FROM "._MYSQL_PREFIX."_extensions WHERE id=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
}
return $ret;
}
-//
-function GET_EXT_ID($name)
-{
- $ret = "0";
+// Get extension id from name
+function GET_EXT_ID($name) {
+ $ret = 0;
global $cacheArray, $_CONFIG;
- if ((isset($cacheArray['extensions']['ext_id'])) && (is_array($cacheArray['extensions']['ext_id'])))
- {
+ if (isset($cacheArray['extensions']['ext_id'][$name])) {
// Load from cache
- $ret = array_search($name, $cacheArray['extensions']['ext_id']);
+ $ret = $cacheArray['extensions']['ext_id'][$name];
// Count cache hits
$_CONFIG['cache_hits']++;
- }
- else
- {
+ } elseif (!EXT_IS_ACTIVE("cache")) {
// Load from database
$result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_extensions WHERE ext_name='%s' LIMIT 1",
array($name), __FILE__, __LINE__);
list($ret) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
}
+
+ // Return value
return $ret;
}
//
* -------------------------------------------------------------------- *
* *
* -------------------------------------------------------------------- *
- * Copyright (c) 2003, 2004, 2005, 2006, 2007 by Roland Haeder *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
break;
case "0.1.2":
- // Get current month
- $curr = date("m", time());
- if (strlen($curr) == 1) $curr = "0".$curr;
- if ($curr == "00") $curr = "12";
-
// SQL queries for v0.1.2
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_mode ENUM('DIRECT', 'REF') NOT NULL DEFAULT 'REF'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_month CHAR(2) NOT NULL DEFAULT '".$curr."'";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_ranks TINYINT(3) NOT NULL DEFAULT '10'";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_active ENUM('Y', 'N') NOT NULL DEFAULT 'N'";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD beg_rallye ENUM('Y', 'N') NOT NULL DEFAULT 'N'";
if ($_CONFIG['beg_uid_timeout'] > $OLD) $OLD = $_CONFIG['beg_uid_timeout'];
$result_ext = SQL_QUERY("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_beg_ips WHERE timeout < ".(time() - $OLD - 60*60), __FILE__, __LINE__);
- if (isBooleanConstantAndTrue('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1))
- {
- // Daily reset was run so let's check if begging rallye is active
- if ($_CONFIG['beg_rallye'] == "Y")
- {
- // Check for our winers
- $INC_POOL[] = sprintf("%sinc/monthly/monthly_beg.php", PATH);
- }
- else
- {
- // Reset begging points
- $INC_POOL[] = sprintf("inc/reset/reset_beg.php", PATH);
- }
- }
-
// Check for beg rallye is active and send mails out
- if (($_CONFIG['beg_rallye'] == "Y") && ($_CONFIG['beg_new_mem_notify'] == "Y"))
- {
+ if (($_CONFIG['beg_rallye'] == "Y") && ($_CONFIG['beg_new_mem_notify'] == "Y")) {
// Include file for sending out mails
$INC_POOL[] = sprintf("%sinc/mails/beg_mails.php", PATH);
}
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD turbo_rates VARCHAR(255) NOT NULL DEFAULT '50;20;10'";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_ranks TINYINT(3) NOT NULL DEFAULT '10'";
// Use actual month for this update
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD last_bonus_month CHAR(2) NOT NULL DEFAULT '".date("m", time())."'";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD login_bonus DOUBLE(20,3) NOT NULL DEFAULT '0.000'";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD turbo_bonus DOUBLE(20,3) NOT NULL DEFAULT '0.000'";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_stats ADD bonus_stats ENUM('Y', 'N') NOT NULL DEFAULT 'N'";
break;
case "0.5.5": // SQL queries for v0.5.5
- // Get previous month
- $prev = date("m", time()) - 1;
- if (strlen($prev) == 1) $prev = "0".$prev;
- if ($prev == "00") $prev = "12";
-
- // Reset monthly active rallye
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_config SET last_bonus_month='".$prev."' WHERE config=0 LIMIT 1";
-
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Weitere Variablenfehler in <STRONG>inc/monthly_bonus.php</STRONG> haben dafür gesorgt, dass die monatliche Aktiv-Rallye nicht ausgeschüttet wurde. Mit diesem Update wurde die Ausschüttung initialisiert. Ihre Mitglieder bekommen voraussichtlicht nichts doppelt vergütet.";
break;
$dummy = LOAD_CONFIG();
$_CONFIG = merge_array($_CONFIG, $dummy);
unset($dummy);
-
- // Do we have a daily-reset-run?
- if (((isBooleanConstantAndTrue('__DAILY_RESET')) && ($_CONFIG['holiday_mode'] == "RESET")) || ($_CONFIG['holiday_mode'] == "DIRECT"))
- {
- // Ok, let's check for finished holidays and unlock those accounts
- $INC_POOL[] = sprintf("%sinc/reset/reset_holiday.php", PATH);
- }
break;
}
break;
case "0.1.0": // SQL queries for v0.2.1
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD nl_month CHAR(2) NOT NULL DEFAULT '".date("m", time())."'";
-
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Nur bei installierter Erweiterung <STRONG>html_mail</STRONG> können Sie auch HTML-Mails versenden.";
break;
}
// Version number
-$EXT_VERSION = "0.4.4";
+$EXT_VERSION = "0.4.5";
// Auto-set extension version
if (!isset($EXT_VER)) $EXT_VER = $EXT_VERSION;
// Version history array (add more with , "0.1" and so on)
-$EXT_VER_HISTORY = array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.7", "0.3.8", "0.3.9", "0.4.0", "0.4.1", "0.4.2", "0.4.3", "0.4.4");
+$EXT_VER_HISTORY = array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.7", "0.3.8", "0.3.9", "0.4.0", "0.4.1", "0.4.2", "0.4.3", "0.4.4", "0.4.5");
switch ($EXT_LOAD_MODE)
{
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Schlüssel in Admin-, Gast- und Mitgliedsmenü verbessert.";
break;
+
+ case "0.4.5": // SQL queries for v0.4.5
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD last_month CHAR(2) NOT NULL DEFAULT '00'";
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD last_week CHAR(2) NOT NULL DEFAULT '00'";
+
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "Täglichen/wöchentlichen/monatlichen Reset verbessert.";
+ break;
}
break;
* -------------------------------------------------------------------- *
* *
* -------------------------------------------------------------------- *
- * Copyright (c) 2003, 2004, 2005, 2006, 2007 by Roland Haeder *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
PRIMARY KEY(`id`)
) TYPE=MyISAM COMMENT='Surfbar referal levels'";
+ // Statistics
+ $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_stats`";
+ $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_surfbar_stats` (
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`url_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`count` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`last_online` TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+PRIMARY KEY (`id`),
+INDEX (`userid`,`url_id`)
+) TYPE=MyISAM COMMENT='Surfbar Statistics'";
+
// Add default referal level 0 with 100%
$SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_reflevels` (`level`, `percent`) VALUES (0, 100)";
// Config entries
$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_pay_model` ENUM('STATIC','DYNAMIC') NOT NULL DEFAULT 'STATIC'";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_static_reward` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '0.25000'";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_static_costs` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '1.00000'";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_static_time` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '60'";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_static_lock` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '".(60*5)."'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_static_reward` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.25000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_static_costs` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_static_time` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_static_lock` SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(60*5)."";
$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_notify_admin_unlock` ENUM('N','Y') NOT NULL DEFAULT 'N'";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_dynamic_percent` FLOAT(10,5) UNSIGNED NOT NULL DEFAULT '10.00000'";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_max_order` INT(7) UNSIGNED NOT NULL DEFAULT '10'";
- $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_restart_time` BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(60*6)."'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_dynamic_percent` FLOAT(10,5) UNSIGNED NOT NULL DEFAULT 10.00000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_max_order` INT(7) UNSIGNED NOT NULL DEFAULT 10";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_restart_time` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(60*6)."";
$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_autostart` ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_total_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_daily_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_weekly_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_monthly_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_stats_reload` BIGINT(20) UNSIGNED NOT NULL DEFAULT 30";
// Member menus
- $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar',NULL,'Surfbar','Y','Y',5)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar',NULL,'Surfbar','Y','Y',4)";
$SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_start','Surfbar starten','Y','Y',1)";
- $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_book','Surfbar buchen','Y','Y',2)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_book','URL buchen','Y','Y',2)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_stats','URL-Statistiken','Y','Y',3)";
// Admin menus
$SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','','Surfbar','URLs in der Surfbar verwalten, Einstellungen ändern und vieles mehr.',7)";
$SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_locks`";
$SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_reflevels`";
$SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_salts`";
+ $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_stats`";
$SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE `action`='surfbar' LIMIT 3";
$SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='surfbar' LIMIT 5";
break;
* -------------------------------------------------------------------- *
* *
* -------------------------------------------------------------------- *
- * Copyright (c) 2003, 2004, 2005, 2006, 2007 by Roland Haeder *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
return $PASS;
}
//
-function MAKE_DATETIME($time, $mode="0")
+function MAKE_DATETIME ($time, $mode="0")
{
if ($time == 0) {
// Never happend
switch (GET_LANGUAGE())
{
case "de": // German date / time format
- switch ($mode)
- {
+ switch ($mode) {
case "0": $ret = date("d.m.Y \u\m H:i \U\h\\r", $time); break;
case "1": $ret = strtolower(date("d.m.Y - H:i", $time)); break;
case "2": $ret = date("d.m.Y|H:i", $time); break;
break;
default: // Default is the US date / time format!
- switch ($mode)
- {
+ switch ($mode) {
case "0": $ret = date("r", $time); break;
case "1": $ret = date("Y-m-d - g:i A", $time); break;
case "2": $ret = date("y-m-d|H:i", $time); break;
}
// Translates the american decimal dot into a german comma
-function TRANSLATE_COMMA($dotted, $cut=true) {
+function TRANSLATE_COMMA ($dotted, $cut=true) {
global $_CONFIG;
+
// Default is 3 you can change this in admin area "Misc -> Misc Options"
if (empty($_CONFIG['max_comma'])) $_CONFIG['max_comma'] = "3";
- if (!ereg("\.", $dotted)) $dotted .= ".".str_repeat("0", $_CONFIG['max_comma']);
- if ($cut) {
- // Remove trailing zeros
- $dot = str_replace(".", "x", $dotted);
- while(substr($dot, -1, 1) == "0") {
- $dot = substr($dot, 0, -1);
- }
+ $maxComma = $_CONFIG['max_comma'];
- if (substr($dot, -1, 1) == "x") {
- // Last char is the 'x'
- $dotted = substr($dot, 0, -1);
+ // Cut zeros off?
+ if ($cut) {
+ // Test for commata if in cut-mode
+ $com = explode(".", $dotted);
+ if (count($com) > 1) {
+ // Commata found, so only zeros?
+ if ($com[1] == str_repeat("0", strlen($com[1]))) {
+ // Only zeros, so don't display them
+ $maxComma = 0;
+ } // END - if
} else {
- // Last char is a number
- $dotted = str_replace("x", ".", $dot);
+ // Don't display commatas even if there are none... ;-)
+ $maxComma = 0;
}
- }
+ } // END - if
+
+ // Debug log
+ //DEBUG_LOG(__FUNCTION__.":dotted={$dotted},maxComma={$maxComma}");
// Translate it now
switch (GET_LANGUAGE()) {
case "de":
- $pos = strpos($dotted, ".");
- if ($pos > 0) {
- if ($cut) {
- // Cut x numbers behind comma
- $dotted = str_replace(".", ",", substr($dotted, 0, ($pos + $_CONFIG['max_comma'] + 1)));
- } else {
- // Replace comma with dot
- $dotted = str_replace(".", ",", $dotted);
- }
- } elseif (!$cut) {
- if (empty($pos)) {
- $dotted = "0,".str_repeat("0", $_CONFIG['max_comma']);
- } else {
- $dotted .= ",".str_repeat("0", $_CONFIG['max_comma']);
- }
- }
+ $dotted = number_format($dotted, $maxComma, ",", ".");
break;
default:
- if (!$cut) {
- if ($pos > 0) {
- $dotted = substr($dotted, 0, ($pos + $_CONFIG['max_comma'] + 1));
- } else {
- $dotted .= ".".str_repeat("0", $_CONFIG['max_comma']);
- }
- }
+ $dotted = number_format($dotted, $maxComma, ".", ",");
break;
}
+
+ // Return translated value
return $dotted;
}
//
-function DEREFERER($URL) {
+function DEREFERER ($URL) {
$URL = URL."/modules.php?module=loader&url=".urlencode(base64_encode(gzcompress(COMPILE_CODE($URL))));
return $URL;
}
//
-function TRANSLATE_SEX($sex) {
+function TRANSLATE_SEX ($sex) {
switch ($sex)
{
case "M": $ret = SEX_M; break;
if (isSessionVariableSet('admin_login')) {
// Load Admin data
$result = SQL_QUERY_ESC("SELECT email FROM "._MYSQL_PREFIX."_admins WHERE login='%s' LIMIT 1",
- array(SQL_ESCAPE(get_session('admin_login'))), __FILE__, __LINE__);
+ array(get_session('admin_login')), __FILE__, __LINE__);
list($ADMIN) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
}
if (isSessionVariableSet($var)) {
// Then get it secured!
$value = SQL_ESCAPE($_SESSION[$var]);
- }
+ } // END - if
// Return the value
return $value;
fclose($fp);
} // END - if
}
+// Reads a directory with PHP files in and gets only files back
+function GET_DIR_AS_ARRAY ($baseDir, $prefix) {
+ $INCs = array();
+
+ // Open directory
+ $dirPointer = opendir($baseDir) or mxchange_die("Cannot read ".basename($baseDir)." path!");
+
+ // Read all entries
+ while ($baseFile = readdir($dirPointer)) {
+ // Load file only if extension is active
+ // Make full path
+ $file = $baseDir.$baseFile;
+
+ // Is this a valid reset file?
+ if ((is_file($file)) && (is_readable($file)) && (substr($baseFile, 0, strlen($prefix)) == $prefix) && (substr($baseFile, -4, 4) == ".php")) {
+ // Remove both for extension name
+ $extName = substr($baseFile, strlen($prefix), -4);
+
+ // Try to find it
+ $extId = GET_EXT_ID($extName);
+
+ // Is the extension valid and active?
+ if (($extId > 0) && (EXT_IS_ACTIVE($extName))) {
+ // Then add this file
+ $INCs[] = $file;
+ }
+ } // END - if
+ } // END - while
+
+ // Close directory
+ closedir($dirPointer);
+
+ // Return array with include files
+ return $INCs;
+}
+// Load more reset scripts
+function RESET_ADD_INCLUDES () {
+ global $_CONFIG, $INC_POOL;
+
+ // Is the reset set or old sql_patches?
+ if ((!isBooleanConstantAndTrue('__DAILY_RESET')) || (GET_EXT_VERSION("sql_patches") < "0.4.5")) {
+ // Then abort here
+ return;
+ } // END - if
+
+ // Get more daily reset scripts
+ $INC_POOL = array_merge($INC_POOL, GET_DIR_AS_ARRAY(PATH."inc/reset/", "reset_"));
+
+ // Create current week mark
+ $currWeek = date("W", time());
+
+ // Has it changed?
+ if ($_CONFIG['last_week'] != $currWeek) {
+ // Include weekly reset scripts
+ $INC_POOL = array_merge($INC_POOL, GET_DIR_AS_ARRAY(PATH."inc/weekly/", "weekly_"));
+
+ // Update config
+ UPDATE_CONFIG("last_week", $currWeek);
+ } // END - if
+
+ // Create current month mark
+ $currMonth = date("m", time());
+
+ // Has it changed?
+ if ($_CONFIG['last_month'] != $currMonth) {
+ // Include monthly reset scripts
+ $INC_POOL = array_merge($INC_POOL, GET_DIR_AS_ARRAY(PATH."inc/monthly/", "monthly_"));
+
+ // Update config
+ UPDATE_CONFIG("last_month", $currMonth);
+ } // END - if
+}
//
//////////////////////////////////////////////////
// //
$scrambleString = genScrambleString(40);
// ... and store it there for future usage
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET pass_scramble='%s' WHERE config=0 LIMIT 1",
- array($scrambleString), __FILE__, __LINE__);
+ UPDATE_CONFIG("pass_scramble", $scrambleString);
// Also remember it in config
$_CONFIG['pass_scramble'] = $scrambleString;
$masterSalt = scrambleString(substr(generateHash(GEN_PASS(rand(128, 256))), 0, -40));
// ... and store it there for future usage
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET master_salt='%s' WHERE config=0 LIMIT 1",
- array($masterSalt), __FILE__, __LINE__);
+ UPDATE_CONFIG("master_salt", $masterSalt);
// Also remember it in config
$_CONFIG['master_salt'] = $masterSalt;
//* DEBUG: */ die("Secret-Key: ".$secretKey."<br>Cookie: ".get_session('u_hash')."<br>Test: ".$test);
// Write $file_hash to database
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET file_hash='%s' WHERE config=0 LIMIT 1",
- array($file_hash), __FILE__, __LINE__);
+ UPDATE_CONFIG("file_hash", $file_hash);
// Also update configuration
$_CONFIG['secret_key'] = $secretKey;
define('ADMIN_CONFIG_SURFBAR_MAX_ORDER', "Maximal durch Mitglied in Surfbar buchbare URLs:(*)");
define('ADMIN_CONFIG_SURFBAR_RESTART_TIME', "Ruhezeit der Surfbar, wenn alle URLs in Reload-Lock sind:");
define('ADMIN_CONFIG_SURFBAR_AUTOSTART', "Surfbar soll nach Ruhezeit automatisch starten?");
+define('ADMIN_CONFIG_SURFBAR_STATS_RELOAD', "Reload-Zeit der Statistik unterhalb der beworbenen Seite:");
define('ADMIN_SURFBAR_NOTIFY_UNLOCK_YES', "Ja, Admin(s) informieren.");
define('ADMIN_SURFBAR_NOTIFY_UNLOCK_NO', "Nein, nicht informieren.");
define('ADMIN_SURFBAR_NO_REF_LEVELS_FOUND', "Zur Zeit sind keine Referal-Ebenen für die Surfbar eingestellt.<br />\nBitte installieren Sie die Erweiterung <strong>surfbar</strong> neu.");
define('ADMIN_SURFBAR_UNLOCK_URL', "URL ent-/sperren");
define('ADMIN_CONFIG_SURFBAR_NOTE', "(*): Es sind auch die Übertragungen der URLs aus der Mailbuchung einbezogen. Es wird empfohlen, die Ruhezeit etwas länger als die Reload-Sperre einzustellen.");
+// General member text
+define('MEMBER_SURFBAR_URL_ADDED', "URL hinzugefügt und wartet auf Freischaltung.");
+define('MEMBER_SURFBAR_URL_NOT_ADDED', "URL konnte nicht hinzugefügt werden, da ein Fehler vorliegt.");
+define('MEMBER_SURFBAR_ADD_URL', "URL in Surfbar buchen");
+define('MEMBER_SURFBAR_NO_MORE_ALLOWED', "Sie können leider nicht mehr URLs in der Surfbar buchen, da Sie das Maximum erreicht haben.");
+
// Subject lines for admins
define('ADMIN_SURFBAR_NOTIFY_URL_UNLOCK_SUBJECT', "URL in Surfbar gebucht");
define('ADMIN_SURFBAR_NOTIFY_URL_REG_SUBJECT', "Mitglied hat URL in Surfbar gebucht");
// Is there a .htaccess file?
if (file_exists($path.".htaccess")) {
// Update database that we have tested it
- $result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_config SET cache_tested='1' WHERE config=0 LIMIT 1", __FILE__, __LINE__);
- $this->ret="done";
+ UPDATE_CONFIG("cache_tested", 1);
// All done!
return "done";
* -------------------------------------------------------------------- *
* *
* -------------------------------------------------------------------- *
- * Copyright (c) 2003, 2004, 2005, 2006, 2007 by Roland Haeder *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
// Admin has added an URL with given user id
function SURFBAR_ADMIN_ADD_URL ($url, $uid, $reward, $costs, $paymentId) {
- // Is this really an admin?
+ // Do some pre-checks
if (!IS_ADMIN()) {
- // Then leave here
+ // Not an admin
return false;
- } // END - if
-
- // Check if that URL does not exist
- if (SURFBAR_LOOKUP_BY_URL($url, $uid)) {
- // Already found!
+ } elseif (!VALIDATE_URL($url)) {
+ // URL invalid
return false;
- } // END - if
+ } elseif (SURFBAR_LOOKUP_BY_URL($url, $uid)) {
+ // URL already found in surfbar!
+ return false;
+ } elseif (!SURFBAR_IF_USER_BOOK_MORE_URLS($uid)) {
+ // No more allowed!
+ return false;
+ }
// Register the new URL
return SURFBAR_REGISTER_URL($url, $uid, $reward, $costs, $paymentId, "CONFIRMED", "unlock");
}
+// Member has added an URL
+function SURFBAR_MEMBER_ADD_URL ($url) {
+ global $_CONFIG;
+
+ // Do some pre-checks
+ if (!IS_LOGGED_IN()) {
+ // Not a member
+ return false;
+ } elseif (!VALIDATE_URL($url)) {
+ // URL invalid
+ return false;
+ } elseif (SURFBAR_LOOKUP_BY_URL($url, $GLOBALS['userid'])) {
+ // URL already found in surfbar!
+ return false;
+ } elseif (!SURFBAR_IF_USER_BOOK_MORE_URLS()) {
+ // No more allowed!
+ return false;
+ }
+
+ // Do we have fixed or dynamic payment model?
+ $reward = SURFBAR_DETERMINE_REWARD();
+ $costs = SURFBAR_DETERMINE_COSTS();
+
+ // Register the new URL
+ return SURFBAR_REGISTER_URL($url, $GLOBALS['userid'], $reward, $costs);
+}
// Looks up by an URL
function SURFBAR_LOOKUP_BY_URL ($url) {
// Now lookup that given URL by itself
return $lastUrlData;
}
// Registers an URL with the surfbar. You should have called SURFBAR_LOOKUP_BY_URL() first!
-function SURFBAR_REGISTER_URL ($url, $uid, $reward, $paymentId, $costs, $status="PENDING", $addMode="reg") {
+function SURFBAR_REGISTER_URL ($url, $uid, $reward, $costs, $paymentId=0, $status="PENDING", $addMode="reg") {
global $_CONFIG;
// Make sure by the user registered URLs are always pending
// Inserts an url by given data array and return the insert id
function SURFBAR_INSERT_URL_BY_ARRAY ($urlData) {
// Just run the insert query for now
- SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_surfbar_urls (userid, url, reward, costs, payment_id, status) VALUES(%s, '%s', %s, %s, %s, '%s')",
+ SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_surfbar_urls (userid, url, reward, costs, payment_id, status) VALUES(%s, '%s', %s, %s, %d, '%s')",
array(
bigintval($urlData['uid']),
$urlData['url'],
// Return result
return $statusTranslated;
}
+// Determine reward
+function SURFBAR_DETERMINE_REWARD () {
+ global $_CONFIG;
+
+ // Do we have static or dynamic?
+ if ($_CONFIG['surfbar_pay_model'] == "STATIC") {
+ // Static model, so choose static values
+ $reward = $_CONFIG['surfbar_static_reward'];
+ } else {
+ // Dynamic model, so calculate values
+ die("DYNAMIC payment model not yet supported!");
+ }
+
+ // Return reward
+ return $reward;
+}
+// Determine costs
+function SURFBAR_DETERMINE_COSTS () {
+ global $_CONFIG;
+
+ // Do we have static or dynamic?
+ if ($_CONFIG['surfbar_pay_model'] == "STATIC") {
+ $costs = $_CONFIG['surfbar_static_costs'];
+ } else {
+ // Dynamic model, so calculate values
+ die("DYNAMIC payment model not yet supported!");
+ }
+
+ // Return costs
+ return $costs;
+}
// Determine right template name
function SURFBAR_DETERMINE_TEMPLATE_NAME() {
// Default is the frameset
// Return result
return $cnt;
}
+// Check wether the user is allowed to book more URLs
+function SURFBAR_IF_USER_BOOK_MORE_URLS ($uid=0) {
+ global $_CONFIG;
+
+ // Simply check it out
+ return (SURFBAR_GET_TOTAL_USER_URLS($uid) < $_CONFIG['surfbar_max_order']);
+}
+// Get total amount of URLs of given status for current user
+function SURFBAR_GET_TOTAL_USER_URLS ($uid=0) {
+ global $_CONFIG;
+
+ // Is the user 0 and user is logged in?
+ if (($uid == 0) && (IS_LOGGED_IN())) {
+ // Then use this userid
+ $uid = $GLOBALS['userid'];
+ } elseif ($uid == 0) {
+ // Error!
+ return ($_CONFIG['surfbar_max_order'] + 1);
+ }
+
+ // Get amount from database
+ $result = SQL_QUERY_ESC("SELECT COUNT(id) AS cnt
+FROM "._MYSQL_PREFIX."_surfbar_urls
+WHERE userid=%s
+LIMIT %s",
+ array($uid, $_CONFIG['surfbar_max_order']), __FILE__, __LINE__
+ );
+
+ // Fetch row
+ list($cnt) = SQL_FETCHROW($result);
+
+ // Free result
+ SQL_FREERESULT($result);
+
+ // Return result
+ return $cnt;
+}
// Generate a validation code for the given id number
function SURFBAR_GENERATE_VALIDATION_CODE ($id, $salt="") {
global $_CONFIG, $SURFBAR_CACHE;
//DEBUG_LOG(__FUNCTION__.":uid=".$GLOBALS['userid'].",reward=".SURFBAR_GET_REWARD()."");
ADD_POINTS_REFSYSTEM($GLOBALS['userid'], SURFBAR_GET_DATA('reward'));
}
-// Update the salt for validation
-function SURFBAR_UPDATE_SALT() {
+// Updates the statistics of current URL/userid
+function SURFBAR_UPDATE_INSERT_STATS_RECORD () {
+ global $_CONFIG;
+
// Update views_total
SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_surfbar_urls SET views_total=views_total+1 WHERE id=%s LIMIT 1",
array(SURFBAR_GET_ID()), __FILE__, __LINE__);
+ // Update the stats entry
+ SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_surfbar_stats SET count=count+1 WHERE userid=%s AND url_id=%s LIMIT 1",
+ array($GLOBALS['userid'], SURFBAR_GET_ID()), __FILE__, __LINE__);
+
+ // Was that update okay?
+ if (SQL_AFFECTEDROWS() == 0) {
+ // No, then insert entry
+ SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_surfbar_stats (userid,url_id,count) VALUES(%s,%s,1)",
+ array($GLOBALS['userid'], SURFBAR_GET_ID()), __FILE__, __LINE__);
+ } // END - if
+
+ // Update total/daily/weekly/monthly counter
+ $_CONFIG['surfbar_total_counter']++;
+ $_CONFIG['surfbar_daily_counter']++;
+ $_CONFIG['surfbar_weekly_counter']++;
+ $_CONFIG['surfbar_monthly_counter']++;
+
+ // Update config as well
+ UPDATE_CONFIG(array("surfbar_total_counter", "surfbar_daily_counter", "surfbar_weekly_counter", "surfbar_monthly_counter"), array(1,1,1,1), "+");
+}
+// Update the salt for validation and statistics
+function SURFBAR_UPDATE_SALT_STATS () {
+ // Update statistics record
+ SURFBAR_UPDATE_INSERT_STATS_RECORD();
+
// Simply store the salt from cache away in database...
SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_surfbar_salts SET last_salt='%s' WHERE url_id=%s AND userid=%s LIMIT 1",
array(SURFBAR_GET_SALT(), SURFBAR_GET_ID(), $GLOBALS['userid']), __FILE__, __LINE__);
// Shall we add this to ignore?
if ($points <= 0) {
// Ignore this one!
- $UIDs[] = $uid;
//DEBUG_LOG(__FUNCTION__.":uid={$uid} has depleted points amount!");
+ $UIDs[] = $uid;
} // END - if
} // END - while
// Return result
return $UIDs;
}
+// Determine how many users are Online in surfbar
+function SURFBAR_DETERMINE_TOTAL_ONLINE () {
+ global $_CONFIG;
+
+ // Count all users in surfbar modue and return the value
+ $result = SQL_QUERY_ESC("SELECT COUNT(id) FROM "._MYSQL_PREFIX."_surfbar_stats WHERE (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(last_online)) >= %s",
+ array($_CONFIG['online_timeout']), __FILE__, __LINE__);
+
+ // Fetch count
+ list($cnt) = SQL_FETCHROW($result);
+
+ // Free result
+ SQL_FREERESULT($result);
+
+ // Return result
+ return $cnt;
+}
// Determine next id for surfbar view, always call this before you call other
// getters below this function!!!
function SURFBAR_GET_NEXT_ID ($id = 0) {
$SURFBAR_CACHE['last_surfed'] = "0";
} // END - if
- // Are we in static mode?
- if ($_CONFIG['surfbar_pay_model'] == "STATIC") {
- // Then use static reward/costs!
- $SURFBAR_CACHE['reward'] = $_CONFIG['surfbar_static_reward'];
- $SURFBAR_CACHE['costs'] = $_CONFIG['surfbar_static_costs'];
- //DEBUG_LOG(__FUNCTION__.":FIXED - reward=".SURFBAR_GET_REWARD()."|costs=".SURFBAR_GET_COSTS()."");
- } else {
+ // Get base/fixed reward and costs
+ $SURFBAR_CACHE['reward'] = SURFBAR_DETERMINE_REWARD();
+ $SURFBAR_CACHE['costs'] = SURFBAR_DETERMINE_COSTS();
+ //DEBUG_LOG(__FUNCTION__.":BASE/STATIC - reward=".SURFBAR_GET_REWARD()."|costs=".SURFBAR_GET_COSTS()."");
+
+ // Only in dynamic model add the dynamic bonus!
+ if ($_CONFIG['surfbar_pay_model'] == "DYNAMIC") {
// Calculate dynamic reward/costs and add it
$SURFBAR_CACHE['reward'] += SURFBAR_CALCULATE_DYNAMIC_REWARD_ADD();
$SURFBAR_CACHE['costs'] += SURFBAR_CALCULATE_DYNAMIC_COSTS_ADD();
- //DEBUG_LOG(__FUNCTION__.":DYNAMIC - reward=".SURFBAR_GET_REWARD()."|costs=".SURFBAR_GET_COSTS()."");
- }
+ //DEBUG_LOG(__FUNCTION__.":DYNAMIC+ - reward=".SURFBAR_GET_REWARD()."|costs=".SURFBAR_GET_COSTS()."");
+ } // END - if
// Now get the id
$nextId = SURFBAR_GET_ID();
// Load language
if ($cacheMode == "load") include(PATH."inc/language/cache_".GET_LANGUAGE().".php");
} else {
+ // Cache extension not active
$cacheMode = "no";
}
// Load extension data from cache file
$EXT_DUMMY = $cacheInstance->cache_load();
+ $EXT_NAMES = array();
foreach ($EXT_DUMMY['ext_name'] as $k=>$name) {
// Load functions file
- if ($EXT_DUMMY['ext_funcs'][$k] == "Y") require_once(PATH."inc/libs/".$name."_functions.php");
+ if ($EXT_DUMMY['ext_funcs'][$k] == "Y") {
+ require_once(PATH."inc/libs/".$name."_functions.php");
+ } // END - if
// Load Language file
if ($EXT_DUMMY['ext_lang'][$k] == "Y") {
$INC = sprintf("%sinc/language/%s_%s.php", PATH, $name, GET_LANGUAGE());
if (file_exists($INC)) require_once($INC);
- }
+ } // END - if
// Load CSS file
if ($EXT_DUMMY['ext_css'][$k] == "Y") $EXT_CSS_FILES[] = "".$name.".css";
// Load extension file itself
if (($EXT_DUMMY['ext_active'][$k] == "Y") || ($EXT_DUMMY['ext_keep'][$k] == "Y") || (IS_ADMIN())) {
require_once(PATH."inc/extensions/ext-".$name.".php");
- }
+ } // END - if
- // Transfer version number and active status
+ // Version number
$EXT_DUMMY['ext_version'][$name] = $EXT_DUMMY['ext_version'][$k];
unset($EXT_DUMMY['ext_version'][$k]);
+ // Extension is active
$EXT_DUMMY['ext_active'][$name] = $EXT_DUMMY['ext_active'][$k];
unset($EXT_DUMMY['ext_active'][$k]);
+ // Ext menu
$EXT_DUMMY['ext_menu'][$name] = $EXT_DUMMY['ext_menu'][$k];
unset($EXT_DUMMY['ext_menu'][$k]);
+ // Extension id
+ $EXT_DUMMY['ext_id'][$name] = $EXT_DUMMY['ext_id'][$k];
+ $id = $EXT_DUMMY['ext_id'][$name];
+ unset($EXT_DUMMY['ext_id'][$k]);
+
+ // Add ext name
+ $EXT_NAMES[$id] = $name;
+
+ // Mark it as active extension
$cacheArray['active_extensions']['$name'] = $EXT_DUMMY['ext_keep'][$k];
unset($EXT_DUMMY['ext_keep'][$k]);
- $k2 = $EXT_DUMMY['ext_id'][$k];
- $EXT_DUMMY['ext_id'][$k2] = $name;
- if ($k2 != $k) unset($EXT_DUMMY['ext_id'][$k]);
// Remove unneccessary data from memory
unset($EXT_DUMMY['ext_lang'][$k]);
unset($EXT_DUMMY['ext_css'][$k]);
unset($EXT_DUMMY['ext_funcs'][$k]);
- }
+ } // END - foreach
+
+ // Write dummy array back
+ $EXT_DUMMY['ext_name'] = $EXT_NAMES;
+ unset($EXT_NAMES);
// Close cache file
$cacheInstance->cache_close();
$DEL = array();
// At least one found?
-if ((SQL_NUMROWS($res_ext_crt) > 0) && (($cacheMode == "init") || ($cacheMode == "no")) && ($CSS != "1") && ($CSS != "-1"))
-{
+if ((SQL_NUMROWS($res_ext_crt) > 0) && (($cacheMode == "init") || ($cacheMode == "no")) && ($CSS != "1") && ($CSS != "-1")) {
// Load theme management
require_once(PATH."inc/theme-manager.php");
if ($cacheMode == "init") $cacheInstance->cache_init("EXTENSIONS");
// Extensions are registered so we load them
- while (list($EXT_ID, $name, $lang, $css, $active, $version) = SQL_FETCHROW($res_ext_crt))
- {
+ while (list($EXT_ID, $name, $lang, $css, $active, $version) = SQL_FETCHROW($res_ext_crt)) {
// Get menu entry
- $result_menu = SQL_QUERY_ESC("SELECT has_menu FROM "._MYSQL_PREFIX."_mod_reg WHERE module='%s' LIMIT 1",
- array($name), __FILE__, __LINE__);
- list($menu) = SQL_FETCHROW($result_menu);
- //* DEBUG: */ echo "*".$name."/".$menu."*<br>";
-
- // An empty menu entry will be interpreted as N (no menu) to avoid problems
- if (empty($menu)) $menu = "N";
+ $menu = "N";
+ if (MODULE_HAS_MENU($name)) {
+ $menu = "Y";
+ } // END - if
// Load extensions
$file1 = sprintf("%sinc/extensions/ext-%s.php", PATH, $name);
// Special functions file
$file3 = sprintf("%sinc/libs/%s_functions.php", PATH, $name);
+ echo $file3."<br />\n";
// Does the extension file exists?
- if (file_exists($file1) && is_readable($file1))
- {
+ if (file_exists($file1) && is_readable($file1)) {
// If there's no language file specified we don't need to load one... ;-)
if (!empty($lang)) {
// Create language file
$file2 = sprintf("%sinc/language/%s_%s.php", PATH, $lang, GET_LANGUAGE());
}
- if (file_exists($file3) && is_readable($file3))
- {
+ if (file_exists($file3) && is_readable($file3)) {
// Special functions file
$funcs = "Y";
require_once($file3);
- }
- else
- {
+ } else {
// Don't load functions file
$funcs = "N";
}
// Do we need a language file?
- if (($file1 != $file2) && (file_exists($file2)) && (is_readable($file2)))
- {
+ if (($file1 != $file2) && (file_exists($file2)) && (is_readable($file2))) {
// Load language file
$lang = "Y";
include($file2);
- }
- else
- {
+ } else {
// Don't load language file
$lang = "N";
}
// Load extension
- if ($name != "sql_patches")
- {
+ if ($name != "sql_patches") {
// Load extension's file
include_once($file1);
- }
- else
- {
+ } else {
// KEEP sql_patches ALWAYS ACTIVE!
$EXT_ALWAYS_ACTIVE = "Y";
}
- if ($css == "Y")
- {
+ if ($css == "Y") {
$CSS_FILE = sprintf("%stheme/%s/css/%s.css", PATH, GET_CURR_THEME(), $name);
- if (file_exists($CSS_FILE))
- {
+ if (file_exists($CSS_FILE)) {
// CSS file for extension was found (use only relative path for now!)
$EXT_CSS_FILES[] = $name.".css";
- }
- else
- {
+ } else {
// Don't load CSS file
$css = "N";
}
- }
+ } // END - if
// Add cache row
- if ($cacheMode == "init")
- {
+ if ($cacheMode == "init") {
$cacheInstance->add_row(array(
'ext_id' => $EXT_ID,
'ext_name' => $name,
'ext_version' => $version,
'ext_keep' => $EXT_ALWAYS_ACTIVE,
));
- }
- elseif ($cacheMode == "no")
- {
+ } elseif ($cacheMode == "no") {
// Remember this value for later usage
$cacheArray['active_extensions'][$name] = $EXT_ALWAYS_ACTIVE;
}
- }
- elseif (!file_exists($file1))
- {
+ } elseif (!file_exists($file1)) {
// Deleted extension file so we mark it for removal from DB
$DEL[] = $name;
}
- }
+ } // END - while
- if ($cacheMode == "init")
- {
+ if ($cacheMode == "init") {
// Close cache file
$cacheInstance->cache_close();
// Load more cache files (like admins)
require_once(PATH."inc/load_cache.php");
- }
+ } // END - if
}
// Free memory
SQL_FREERESULT($res_ext_crt);
// Load include files
-if (!empty($INC_POOL[0]))
-{
- foreach ($INC_POOL as $inc)
- {
+if (!empty($INC_POOL[0])) {
+ foreach ($INC_POOL as $inc) {
require_once($inc);
- }
-}
+ } // END - foreach
+} // END - if
// Uninstall extensions that are no longer in our system
-if (!empty($DEL[0]))
-{
+if (!empty($DEL[0])) {
// Remove extensions from two tables: extension registry and tasks table
- foreach ($DEL as $name)
- {
+ foreach ($DEL as $name) {
// First remove entry from extensions table
$result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_extensions WHERE ext_name='%s' LIMIT 1",
array($name), __FILE__, __LINE__);
// Remove (maybe?) found tasks (main task and possible updates
$result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_task_system WHERE subject LIKE '[%s:] %' AND (task_type='EXTENSION' OR task_type='EXTENSION_UPDATE')",
array($name), __FILE__, __LINE__);
- }
+ } // END - foreach
// I think it's not neccessary to run the optimization function here
// because we didn't delete so much data from database. Can you aggree?
-}
+} // END - if
+
//
?>
if ($CSS == 1) return;
// Create timemark from saved month
-$mark = mktime(0, 0, 0, $_CONFIG['beg_month'], date("d", time()), date('Y', time()));
+$mark = mktime(0, 0, 0, $_CONFIG['last_month'], date("d", time()), date('Y', time()));
$SQL = ""; $MODE = "";
// Shall I sent activation or deactivation mail?
if ($CSS == 1) return;
// Create timemark from saved month
-$mark = mktime(0, 0, 0, $_CONFIG['bonus_month'], date("d", time()), date('Y', time()));
+$mark = mktime(0, 0, 0, $_CONFIG['last_month'], date("d", time()), date('Y', time()));
$SQL = ""; $MODE = "";
// Shall I sent activation or deactivation mail?
LOAD_TEMPLATE("admin_settings_saved", false, $OUT);
} elseif (!empty($_GET['hash'])) {
// Output form for hash validation
- LOAD_TEMPLATE("admin_validate_reset_hash_form", false, SQL_ESCAPE($_GET['hash']));
+ LOAD_TEMPLATE("admin_validate_reset_hash_form", false, $_GET['hash']);
} elseif ((isset($_POST['validate_hash'])) && (!empty($_POST['login'])) && (!empty($_POST['hash']))) {
// Validate the login data and hash
$valid = ADMIN_VALIDATE_RESET_LINK_HASH_LOGIN($_POST['hash'], $_POST['login']);
}
} else {
// Maybe an Admin want's to login?
- $ret = CHECK_ADMIN_COOKIES(SQL_ESCAPE(get_session('admin_login')), SQL_ESCAPE(get_session('admin_md5')));
+ $ret = CHECK_ADMIN_COOKIES(get_session('admin_login'), get_session('admin_md5'));
switch ($ret)
{
case "done":
// Cookie-Data accepted
- if ((set_session("admin_md5", SQL_ESCAPE(get_session('admin_md5')))) && (set_session("admin_login", SQL_ESCAPE(get_session('admin_login')))) && (set_session("admin_last", time())) && (set_session("admin_to", bigintval(get_session('admin_to'))))) {
+ if ((set_session("admin_md5", get_session('admin_md5'))) && (set_session("admin_login", get_session('admin_login'))) && (set_session("admin_last", time())) && (set_session("admin_to", bigintval(get_session('admin_to'))))) {
// Ok, Cookie-Update done
if ((EXT_IS_ACTIVE("admins")) && (GET_EXT_VERSION("admins") > "0.2")) {
// Check if action GET variable was set
* -------------------------------------------------------------------- *
* *
* -------------------------------------------------------------------- *
- * Copyright (c) 2003, 2004, 2005, 2006, 2007 by Roland Haeder *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
* -------------------------------------------------------------------- *
* *
* -------------------------------------------------------------------- *
- * Copyright (c) 2003, 2004, 2005, 2006, 2007 by Roland Haeder *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
$act = GET_ACTION($GLOBALS['module'], $wht);
// Define admin login name and ID number
- define('__ADMIN_LOGIN', SQL_ESCAPE(get_session('admin_login')));
+ define('__ADMIN_LOGIN', get_session('admin_login'));
define('__ADMIN_ID' , GET_ADMIN_ID(get_session('admin_login')));
// Preload templates
* -------------------------------------------------------------------- *
* *
* -------------------------------------------------------------------- *
- * Copyright (c) 2003, 2004, 2005, 2006, 2007 by Roland Haeder *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
break;
case "target": // Set which what-file will be placed in home-page (only modules.php?module=index)
- if (isset($_GET['home']))
- {
+ if (isset($_GET['home'])) {
// Set new home
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET index_home='%s' WHERE config=0 LIMIT 1", array($_GET['home']), __FILE__, __LINE__);
- $_CONFIG['index_home'] = $_GET['home'];
- }
+ UPDATE_CONFIG("index_home", $_GET['home']);
+ $_CONFIG['index_home'] = SQL_ESCAPE($_GET['home']);
+ } // END - if
// Load all what menu points
$result = SQL_QUERY("SELECT id, what, title
* -------------------------------------------------------------------- *
* *
* -------------------------------------------------------------------- *
- * Copyright (c) 2003, 2004, 2005, 2006, 2007 by Roland Haeder *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
'surfbar_restart_time' => $_CONFIG['surfbar_restart_time'],
'surfbar_static_lock' => $_CONFIG['surfbar_static_lock'],
'surfbar_dynamic_percent' => TRANSLATE_COMMA($_CONFIG['surfbar_dynamic_percent']),
- 'surfbar_max_order' => $_CONFIG['surfbar_max_order']
+ 'surfbar_max_order' => $_CONFIG['surfbar_max_order'],
+ // @TODO Rewrite this to tiny selection boxes
+ 'surfbar_stats_reload' => $_CONFIG['surfbar_stats_reload']
);
// Prepare payment model for template
// Okay, let's prepare...
$curr = date("m", time()) - 1;
if (strlen($curr) == 1) $curr = "0".$curr;
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET beg_month='%s' WHERE config=0 LIMIT 1",
- array($curr), __FILE__, __LINE__);
+ UPDATE_CONFIG("last_month", $curr);
LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_BEG_WITHDRAW_PREPARED);
OUTPUT_HTML("<br />");
}
define('__TOTAL', TRANSLATE_COMMA($total));
// Check if we need to display form or not with manuel withdraw
- if ($_CONFIG['beg_month'] == date("m", time()))
+ if ($_CONFIG['last_month'] == date("m", time()))
{
// Load form
define('__BEG_WITHDRAW_FORM', LOAD_TEMPLATE("admin_list_beg_form", true));
// Add description as navigation point
ADD_DESCR("admin", basename(__FILE__));
-if ($_CONFIG['bonus_active'] == "Y")
-{
+if ($_CONFIG['bonus_active'] == "Y") {
// Shall I withdraw now?
- if (isset($_POST['withdraw']))
- {
+ if (isset($_POST['withdraw'])) {
// Okay, let's prepare...
$curr = date("m", time()) - 1;
if (strlen($curr) == 1) $curr = "0".$curr;
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET last_bonus_month='%s' WHERE config=0 LIMIT 1",
- array($curr), __FILE__, __LINE__);
+ UPDATE_CONFIG("last_month", $curr);
LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_BONUS_WITHDRAW_PREPARED);
OUTPUT_HTML("<br />");
}
- if (GET_EXT_VERSION("bonus") >= "0.6.9")
- {
+ if (GET_EXT_VERSION("bonus") >= "0.6.9") {
// Add more bonus points here
$USE = "(0";
if ($_CONFIG['bonus_click_yn'] == "Y") $USE .= " + turbo_bonus";
if ($_CONFIG['bonus_stats_yn'] == "Y") $USE .= " + bonus_stats";
if ($_CONFIG['bonus_ref_yn'] == "Y") $USE .= " + bonus_ref";
$USE .= ")";
- }
- else
- {
+ } else {
// Old version ???
$USE = "turbo_bonus";
}
// Autopurge installed?
$LAST = "%s"; $ONLINE = "";
- if (EXT_IS_ACTIVE("autopurge"))
- {
+ if (EXT_IS_ACTIVE("autopurge")) {
// Use last online timestamp to keep inactive members away from here
$LAST = " AND last_online >= %s";
$ONLINE = bigintval(time() - $_CONFIG['ap_in_since']);
ORDER BY active_bonus DESC, last_online DESC, userid",
array($ONLINE), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) > 0)
- {
+ if (SQL_NUMROWS($result) > 0) {
// List users
$OUT = "";$SW = 2; $cnt = 1; $total = 0;
- while(list($uid, $email, $sex, $sname, $fname, $turbo, $last) = SQL_FETCHROW($result))
- {
+ while(list($uid, $email, $sex, $sname, $fname, $turbo, $last) = SQL_FETCHROW($result)) {
// Generate array fore the dynamic template
$WIN1 = ""; $WIN2 = "";
- if ($cnt <= $_CONFIG['bonus_ranks'])
- {
+ if ($cnt <= $_CONFIG['bonus_ranks']) {
// Maybe he can win his active bonus?
$WIN1 = "<STRONG>";
$WIN2 = "</STRONG>";
}
+
+ // Prepare content
$content = array(
'uid' => $uid,
'email' => CREATE_EMAIL_LINK($email, "user_data"),
define('__TOTAL', TRANSLATE_COMMA($total));
// Check if we need to display form or not with manuel withdraw
- if ($_CONFIG['bonus_month'] == date("m", time()))
+ if ($_CONFIG['last_month'] == date("m", time()))
{
// Load form
define('__BONUS_WITHDRAW_FORM', LOAD_TEMPLATE("admin_list_bonus_form", true));
* -------------------------------------------------------------------- *
* *
* -------------------------------------------------------------------- *
- * Copyright (c) 2003, 2004, 2005, 2006, 2007 by Roland Haeder *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
* -------------------------------------------------------------------- *
* *
* -------------------------------------------------------------------- *
- * Copyright (c) 2003, 2004, 2005, 2006, 2007 by Roland Haeder *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
************************************************************************/
// Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))
-{
+if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
}
// Update config
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET maintenance='%s' WHERE config=0 LIMIT 1",
- array($target_mode), __FILE__, __LINE__);
+ UPDATE_CONFIG("maintenance", $target_mode);
// Load template
LOAD_TEMPLATE("admin_settings_saved", false, $out);
-}
- else
-{
+} else {
switch ($_CONFIG['maintenance'])
{
case 'Y': // Maintenance mode is active
// Display form
LOAD_TEMPLATE("admin_maintenance_form");
}
+
//
?>
--- /dev/null
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 09/08/2008 *
+ * ================ Last change: 09/08/2008 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : what-unlock_surfbar_urls.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Unlock pending URLs for surfbar *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Wartende URLs in der Surfbar freigeben *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
+ * For more information visit: http://www.mxchange.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
+ ************************************************************************/
+
+// Some security stuff...
+if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!is_admin())) {
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ require($INC);
+}
+
+// Add description as navigation point
+ADD_DESCR("admin", basename(__FILE__));
+
+//
+?>
* -------------------------------------------------------------------- *
* *
* -------------------------------------------------------------------- *
- * Copyright (c) 2003, 2004, 2005, 2006, 2007 by Roland Haeder *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
* -------------------------------------------------------------------- *
* *
* -------------------------------------------------------------------- *
- * Copyright (c) 2003, 2004, 2005, 2006, 2007 by Roland Haeder *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
if ($_CONFIG['mad_counter'] < $total)
{
// Update counter
+ UPDATE_CONFIG(array("mad_timestamp", "mad_count"), array(time(), $total));
$_CONFIG['mad_counter'] = $total;
$_CONFIG['last_mad'] = time();
- $result_mad = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET mad_timestamp=%s, mad_count='%s' WHERE config=0 LIMIT 1",
- array($_CONFIG['last_mad'], $_CONFIG['mad_counter']), __FILE__, __LINE__);
-
- // Destroy cache
}
// Put all values in constants for the template
}
$URL = URL."/modules.php?module=index&login=".$ERROR;
LOAD_URL($URL);
-}
+} // END - if
// Recheck if he got logged out because bad cookies
-if (!IS_LOGGED_IN())
-{
+if (!IS_LOGGED_IN()) {
$URL = URL."/modules.php?module=index";
LOAD_URL($URL);
-}
+} // END - if
// Load adverstising template
define('__MEMBER_ADVERT', LOAD_TEMPLATE("member_banner", true));
* -------------------------------------------------------------------- *
* *
* -------------------------------------------------------------------- *
- * Copyright (c) 2003, 2004, 2005, 2006, 2007 by Roland Haeder *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
* -------------------------------------------------------------------- *
* *
* -------------------------------------------------------------------- *
- * Copyright (c) 2003, 2004, 2005, 2006, 2007 by Roland Haeder *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
* -------------------------------------------------------------------- *
* *
* -------------------------------------------------------------------- *
- * Copyright (c) 2003, 2004, 2005, 2006, 2007 by Roland Haeder *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
break;
case "edit": // Edit data
- if (EXT_IS_ACTIVE("country", true))
- {
+ if (EXT_IS_ACTIVE("country", true)) {
// New way 0 1 2 3 4 5 6 7 8 9 10 11 12 13
$result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country_code, zip, city, email, birth_day, birth_month, birth_year, sex, max_mails, receive_mails, last_update
FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
array(UID_VALUE), __FILE__, __LINE__);
- }
- else
- {
+ } else {
// Old way 0 1 2 3 4 5 6 7 8 9 10 11 12 13
$result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country, zip, city, email, birth_day, birth_month, birth_year, sex, max_mails, receive_mails, last_update
FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
--- /dev/null
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 09/08/2008 *
+ * ================ Last change: 09/08/2008 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : what-surfbar_book.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Members can book new URLs here *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Mitglieder koennen URLs buchen *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
+ * For more information visit: http://www.mxchange.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
+ ************************************************************************/
+
+// Some security stuff...
+if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ require($INC);
+} elseif (!IS_LOGGED_IN()) {
+ // Redirect
+ LOAD_URL(URL."/modules.php?module=index");
+} elseif (!EXT_IS_ACTIVE("surfbar")) {
+ // Extension "surfbar" is not active
+ ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "surfbar");
+ return;
+}
+
+// Add description as navigation point
+ADD_DESCR("member", basename(__FILE__));
+
+// Still allowed to book more URLs?
+if (!SURFBAR_IF_USER_BOOK_MORE_URLS()) {
+ // No more URLs allowed to book!
+ LOAD_TEMPLATE("admin_settings_saved", false, MEMBER_SURFBAR_NO_MORE_ALLOWED);
+} elseif (isset($_POST['ok'])) {
+ // Register the new URL
+ $insertId = SURFBAR_MEMBER_ADD_URL($_POST['url']);
+
+ // Was this fine?
+ if ($insertId > 0) {
+ // URL added and waiting for unlock
+ $msg = MEMBER_SURFBAR_URL_ADDED;
+ } else {
+ // Something went wrong!
+ $msg = MEMBER_SURFBAR_URL_NOT_ADDED;
+ }
+
+ // Load message template
+ LOAD_TEMPLATE("admin_settings_saved", false, $msg);
+} else {
+ // Prepare some content
+ $content = array(
+ 'reward' => TRANSLATE_COMMA(SURFBAR_DETERMINE_REWARD()),
+ 'costs' => TRANSLATE_COMMA(SURFBAR_DETERMINE_COSTS()),
+ 'max_order' => $_CONFIG['surfbar_max_order'],
+ 'curr_order' => SURFBAR_GET_TOTAL_USER_URLS()
+ );
+
+ // Load surfbar order form
+ LOAD_TEMPLATE(sprintf("member_surfbar_book_%s", strtolower($_CONFIG['surfbar_pay_model'])), false, $content);
+}
+
+//
+?>
<?php
/************************************************************************
* MXChange v0.2.1 Start: 09/05/2008 *
- * ================ Last change: 09/05/2008 *
+ * ================ Last change: 09/08/2008 *
* *
* -------------------------------------------------------------------- *
* File : what-surfbar_start.php *
* -------------------------------------------------------------------- *
* *
* -------------------------------------------------------------------- *
- * Copyright (c) 2003, 2004, 2005, 2006, 2007 by Roland Haeder *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_LOGGED_IN()) {
- LOAD_URL(URL."/modules.php?module=index");
+ // Not logged in
+ LOAD_URL("modules.php?module=index");
+} elseif (!EXT_IS_ACTIVE("surfbar")) {
+ // Extension "surfbar" is not active
+ ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "surfbar");
+ return;
}
// Add description as navigation point
'surfbar_dynamic_percent' => TRANSLATE_COMMA($_CONFIG['surfbar_dynamic_percent'])
);
-// Construct template name
-$templateName = "member_".substr(basename(__FILE__), 5, -4)."_".strtolower($_CONFIG['surfbar_pay_model']);
-
// Load the template
-LOAD_TEMPLATE($templateName, false, $content);
+LOAD_TEMPLATE("member_start_".strtolower($_CONFIG['surfbar_pay_model']), false, $content);
// Load surfbar link template
LOAD_TEMPLATE("member_surfbar_link");
* -------------------------------------------------------------------- *
* *
* -------------------------------------------------------------------- *
- * Copyright (c) 2003, 2004, 2005, 2006, 2007 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 *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
+ * For more information visit: http://www.mxchange.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
************************************************************************/
// Some security stuff...
************************************************************************/
// Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
+if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-}
- elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN()))
-{
+} elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN())) {
ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "beg");
return;
}
// Do not execute when script is in CSS mode or no daily reset
-if (($CSS == 1) || (!isBooleanConstantAndTrue('__DAILY_RESET'))) return;
+if (($CSS == 1) || (!isBooleanConstantAndTrue('__DAILY_RESET')) || ($_CONFIG['beg_rallye'] == "N")) return;
// Get current month (2 digits)
$curr = date("m", time());
// Check if month is done
-if (($curr != $_CONFIG['beg_month']) && ($_CONFIG['beg_month'] > 0) && ($_CONFIG['beg_ranks'] > 0) && ($CSS != 1))
+if (($curr != $_CONFIG['last_month']) && ($_CONFIG['last_month'] > 0) && ($_CONFIG['beg_ranks'] > 0) && ($CSS != 1))
{
// Extension "autopurge" is inactive or purging of inactive accounts is deactivated
$whereStatement1 = "";
// Free memory
SQL_FREERESULT($result_main);
-
- // Finally update database and config array
- $_CONFIG['beg_month'] = $curr;
- $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET beg_month='%s' WHERE config=0 LIMIT 1",
- array($curr), __FILE__, __LINE__);
-
- // Destroy cache
}
+
//
?>
// Get current month (2 digits)
$curr = date("m", time());
-if (($curr != $_CONFIG['bonus_month']) && ($_CONFIG['bonus_ranks'] > 0) && ($CSS != 1))
+if (($curr != $_CONFIG['last_month']) && ($_CONFIG['bonus_ranks'] > 0) && ($CSS != 1))
{
// Extension "autopurge" is inactive or purging of inactive accounts is deactivated
$whereStatement1 = "WHERE status='CONFIRMED'";
// Free memory
SQL_FREERESULT($result_main);
-
- // Finally update database and config array
- $_CONFIG['bonus_month'] = $curr;
- $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET last_bonus_month='%s' WHERE config=0 LIMIT 1",
- array($curr), __FILE__, __LINE__);
-
- // Destroy cache
}
+
//
?>
// Get current month (2 digits)
$curr = date("m", time());
-if ($_CONFIG['nl_month'] != $curr)
+if ($_CONFIG['last_month'] != $curr)
{
// Check for unsubscribed members
$result = SQL_QUERY("SELECT userid, nl_until FROM "._MYSQL_PREFIX."_user_data WHERE nl_receive='N' ORDER BY userid", __FILE__, __LINE__);
// Free memory
SQL_FREERESULT($result);
-
- // Update last month
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET nl_month='%s' WHERE config=0 LIMIT 1",
- array($curr), __FILE__, __LINE__);
-
- // Destroy cache
}
}
--- /dev/null
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 09/08/2008 *
+ * =============== Last change: 09/08/2008 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : monthly_surfbar.php *
+ * -------------------------------------------------------------------- *
+ * Short description : *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
+ * For more information visit: http://www.mxchange.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
+ ************************************************************************/
+
+// Some security stuff...
+if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ require($INC);
+} elseif ((!EXT_IS_ACTIVE("surfbar")) && (!IS_ADMIN())) {
+ ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE);
+ return;
+}
+
+// Do not execute when script is in CSS mode or no daily reset
+if (($CSS == 1) || (defined('__DAILY_RESET'))) return;
+
+// Reset surfbar counter
+UPDATE_CONFIG("surfbar_monthly_counter", "0");
+$_CONFIG['surfbar_monthly_counter'] = 0;
+
+//
+?>
+++ /dev/null
-<?php
-/************************************************************************
- * MXChange v0.2.1 Start: 03/04/2005 *
- * =============== Last change: 03/04/2005 *
- * *
- * -------------------------------------------------------------------- *
- * File : monthly_newsletter.php *
- * -------------------------------------------------------------------- *
- * Short description : Monthly check for newsletter unsubscriptions *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung : Monatlicher Test auf Newsletter-Abmeldungen *
- * -------------------------------------------------------------------- *
- * *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2008 by Roland Haeder *
- * For more information visit: http://www.mxchange.org *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the Free Software *
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
- * MA 02110-1301 USA *
- ************************************************************************/
-
-// Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
- require($INC);
-}
-
-// Check for unsubscribed members
-$result = SQL_QUERY("SELECT userid, nl_until FROM "._MYSQL_PREFIX."_user_data WHERE nl_receive='N' ORDER BY userid", __FILE__, __LINE__);
-if (SQL_NUMROWS($result) > 0)
-{
- // Some unsubscriptions are found so we reset them to receive newsletters
- while(list($uid, $until) = SQL_FETCHROW($result))
- {
- // Update account
- $result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_user_data SET nl_receive='Y', nl_until='0' WHERE userid='".$uid."' LIMIT 1", __FILE__, __LINE__);
-
- // Send email to him
- $msg = LOAD_EMAIL_TEMPLATE("member_newsletter_reset", true, $uid);
- SEND_EMAIL($uid, NL_MEMBER_RESET_SUBJECT, $msg);
-
- // Send email to admin
- SEND_ADMIN_NOTIFICATION(NL_ADMIN_SUBJECT, "admin_newsletter_reset", "", $GLOBALS['userid']);
- }
-}
-
-//
-?>
// Something went wrong
ADD_FATAL(FATAL_CANNOT_LOAD_CONFIG);
return;
- }
+ } // END - if
// Load the configuration
$_CONFIG = array_merge($_CONFIG, SQL_FETCHARRAY($result));
// Initialize include-file-pool
$INC_POOL = array();
- // Run daily reset
- if ((date("d", $_CONFIG['last_update']) != date("d", time()) || ((isBooleanConstantAndTrue('DEBUG_MODE')))) && (!isBooleanConstantAndTrue('mxchange_installing')) && (isBooleanConstantAndTrue('mxchange_installed')) && (isBooleanConstantAndTrue('admin_registered')) && (!isset($_GET['register'])) && ($CSS != 1)) {
- // Do daily things in external PHP file but only when script is completely setup
- $INC_POOL[] = sprintf("%sinc/reset/reset_daily.php", PATH);
-
- // Daily reset was run!
- define('__DAILY_RESET', "1");
- }
-
// Load "databases" aka static arrays
require_once(PATH."inc/databases.php");
// Functions which are related to themes
require_once(PATH."inc/theme-manager.php");
+ // Run daily reset
+ if ((date("d", $_CONFIG['last_update']) != date("d", time()) || ((isBooleanConstantAndTrue('DEBUG_MODE')))) && (!isBooleanConstantAndTrue('mxchange_installing')) && (isBooleanConstantAndTrue('mxchange_installed')) && (isBooleanConstantAndTrue('admin_registered')) && (!isset($_GET['register'])) && ($CSS != 1)) {
+ // Do daily things in external PHP file but only when script is completely setup
+ $INC_POOL = array();
+ $INC_POOL[] = sprintf("%sinc/reset/reset_daily.php", PATH);
+
+ // Daily reset was run!
+ define('__DAILY_RESET', true);
+
+ // Add more includes
+ RESET_ADD_INCLUDES();
+
+ // Run the full reset scripts
+ foreach ($INC_POOL as $incFile) {
+ require_once($incFile);
+ } // END - foreach
+ } // END - if
+
// Load admin include file if he is admin
if (IS_ADMIN()) {
// Administrative functions
require_once(PATH."inc/modules/admin/admin-inc.php");
- }
+ } // END - if
// Get all values
if (($CSS != 1) && ($CSS != -1)) {
// If admin login is not given take current from cookies...
if ((empty($admin)) && (isSessionVariableSet('admin_login')) && (isSessionVariableSet('admin_md5'))) {
// Get admin login and password from session/cookies
- $admin = SQL_ESCAPE(get_session('admin_login'));
- $passCookie = SQL_ESCAPE(get_session('admin_md5'));
+ $admin = get_session('admin_login');
+ $passCookie = get_session('admin_md5');
}
//* DEBUG: */ echo __LINE__."ADMIN:".$admin."/".$passCookie."<br />";
// Maybe first login time?
if (empty($mod)) $mod = "login";
- if (set_session("userid", $GLOBALS['userid'], $newl, COOKIE_PATH) && set_session("u_hash", SQL_ESCAPE(get_session('u_hash')), $newl, COOKIE_PATH) && set_session("lifetime", bigintval(get_session('lifetime')), $newl, COOKIE_PATH)) {
+ if (set_session("userid", $GLOBALS['userid'], $newl, COOKIE_PATH) && set_session("u_hash", get_session('u_hash'), $newl, COOKIE_PATH) && set_session("lifetime", bigintval(get_session('lifetime')), $newl, COOKIE_PATH)) {
// This will be displayed on welcome page! :-)
if (empty($LAST['module'])) {
$LAST['module'] = $mod; $LAST['online'] = $onl;
);
// Run SQLs
- foreach ($SQLs as $sql)
- {
+ foreach ($SQLs as $sql) {
$result = SQL_QUERY($sql, __FILE__, __LINE__);
}
- // Destroy cache
+ // @TODO Destroy cache
}
}
//
LEFT JOIN "._MYSQL_PREFIX."_user_data AS d
ON p.userid=d.userid
WHERE p.userid=%s", array(bigintval($uid)), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 1)
- {
+ if (SQL_NUMROWS($result) == 1) {
// Save his points to add them to the jackpot
list($points) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
$result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_points WHERE userid=%s", array(bigintval($uid)), __FILE__, __LINE__);
// Update mediadata as well
- if (GET_EXT_VERSION("mediadata") >= "0.0.4")
- {
+ if (GET_EXT_VERSION("mediadata") >= "0.0.4") {
// Update database
MEDIA_UPDATE_ENTRY(array("total_points"), "sub", $points);
}
array(bigintval($uid)), __FILE__, __LINE__);
// Remove from rallye if found
- if (EXT_IS_ACTIVE("rallye"))
- {
+ if (EXT_IS_ACTIVE("rallye")) {
$result = SQL_QUERY("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_rallye_users WHERE userid=%s",
array(bigintval($uid)), __FILE__, __LINE__);
}
// All is false by default
$ret = false;
- if (GET_EXT_VERSION("cache") >= "0.1.2")
- {
+ if (GET_EXT_VERSION("cache") >= "0.1.2") {
if (isset($cacheArray['modules']['has_menu'][$mod]))
{
// Check module cache and count hit
$_CONFIG['cache_hits']++;
}
}
- if ((GET_EXT_VERSION("sql_patches") >= "0.3.6") && ($ret === false))
- {
+
+ if ((GET_EXT_VERSION("sql_patches") >= "0.3.6") && ($ret === false)) {
// Check database for entry
$result = SQL_QUERY_ESC("SELECT has_menu FROM "._MYSQL_PREFIX."_mod_reg WHERE module='%s' LIMIT 1",
array($mod), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 1)
- {
+ if (SQL_NUMROWS($result) == 1) {
list($has_menu) = SQL_FETCHROW($result);
- if ($has_menu == "Y") $ret = true;
+ $ret = ($has_menu == "Y");
}
// Free memory
SQL_FREERESULT($result);
} elseif (GET_EXT_VERSION("sql_patches") == "") {
// No sql_patches installed, so maybe in admin area?
- if ((IS_ADMIN()) && ($mod == "admin")) return true; // Then there is a menu!
+ $ret = ((IS_ADMIN()) && ($mod == "admin")); // Then there is a menu!
}
// Return status
MEDIA_UPDATE_ENTRY(array("total_points"), "sub", $points);
} // END - if
}
+// Update config entries
+function UPDATE_CONFIG ($entries, $values, $updateMode="") {
+ // Do we have multiple entries?
+ if (is_array($entries)) {
+ // Walk through all
+ $all = "";
+ foreach ($entries as $idx => $entry) {
+ // Update mode set?
+ if (!empty($updateMode)) {
+ // Update entry
+ $all .= sprintf("%s=%s%s%s,", $entry, $entry, $updateMode, (float)$values[$idx]);
+ } else {
+ // Check if string or number
+ if (($values[$idx] + 0) === $values[$idx]) {
+ // Number detected
+ $all .= sprintf("%s=%s,", $entry, (float)$values[$idx]);
+ } else {
+ // String detected
+ $all .= sprintf("%s='%s',", $entry, SQL_ESCAPE($values[$idx]));
+ }
+ }
+ } // END - foreach
+ // Remove last comma
+ $entries = substr($all, 0, -1);
+ } elseif (!empty($updateMode)) {
+ // Update mode set
+ $entries .= sprintf("=%s%s%s", $entries, $updateMode, (float)$value);
+ } else {
+ // Regular entry to update
+ $entries .= sprintf("='%s'", SQL_ESCAPE($values));
+ }
+
+ // Run database update
+ //* DEBUG: */ DEBUG_LOG(__FUNCTION__.":entries={$entries}");
+ SQL_QUERY("UPDATE "._MYSQL_PREFIX."_config SET ".$entries." WHERE config=0 LIMIT 1", __FILE__, __LINE__);
+
+ // Destroy cache
+ if ((GET_EXT_VERSION("cache") >= "0.1.2") && (SQL_AFFECTEDROWS() == 1)) {
+ global $cacheInstance;
+ if ($cacheInstance->cache_file("config", true)) $cacheInstance->cache_destroy();
+ } // END - if
+}
//
?>
}
// Check for patch level differences between databases and current hard-coded
-if (CURR_PATCH_LEVEL > $_CONFIG['patch_level'])
-{
+if (CURR_PATCH_LEVEL > $_CONFIG['patch_level']) {
// Update database and CONFIG array
- $result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_config SET patch_level='".CURR_PATCH_LEVEL."', patch_ctime=UNIX_TIMESTAMP() WHERE config=0 LIMIT 1",
- __FILE__, __LINE__);
+ UPDATE_CONFIG(array("patch_level", "path_ctime"), array(CURR_PATH_LEVEL, "UNIX_TIMESTAMP()"));
$_CONFIG['patch_level'] = CURR_PATCH_LEVEL;
$_CONFIG['patch_ctime'] = time();
-
- // Destroy cache
- if (GET_EXT_VERSION("cache") >= "0.1.2")
- {
- if ($cacheInstance->cache_file("config", true))
- {
- // Replace data
- $cacheInstance->cache_replace("patch_level", $_CONFIG['patch_level'], "0", $cacheArray);
- $cacheInstance->cache_replace("patch_ctime", $_CONFIG['patch_ctime'], "0", $cacheArray);
- }
- }
-}
+} // END - if
//
?>
* -------------------------------------------------------------------- *
* *
* -------------------------------------------------------------------- *
- * Copyright (c) 2003, 2004, 2005, 2006, 2007 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 *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
+ * For more information visit: http://www.mxchange.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
************************************************************************/
// Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
+if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-}
- elseif ((!EXT_IS_ACTIVE("")) && (!IS_ADMIN()))
-{
+} elseif ((!EXT_IS_ACTIVE("")) && (!IS_ADMIN())) {
ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE);
return;
}
************************************************************************/
// Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
+if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-}
- elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN()))
-{
+} elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN())) {
ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "beg");
return;
}
// Do not execute when script is in CSS mode or no daily reset
-if (($CSS == 1) || (!isBooleanConstantAndTrue('__DAILY_RESET'))) return;
+if (($CSS == 1) || (!isBooleanConstantAndTrue('__DAILY_RESET')) || ($_CONFIG['beg_rallye'] == "Y")) return;
// Reset accounts
$result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_user_data SET beg_points=0.00000 WHERE beg_points > 0",
$_CONFIG['last_update'] = time();
// Update database
-$result_daily = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_config
-SET last_update=UNIX_TIMESTAMP()
-WHERE config=0 AND last_update != UNIX_TIMESTAMP()
-LIMIT 1", __FILE__, __LINE__);
-
-// Destroy cache
-if ((GET_EXT_VERSION("cache") >= "0.1.2") && (SQL_AFFECTEDROWS() == 1))
-{
- if ($cacheInstance->cache_file("config", true))
- {
- $cacheInstance->cache_replace("last_update", time(), "0", $cacheArray);
- }
-}
+UPDATE_CONFIG("last_update", time());
//
?>
************************************************************************/
// Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
+if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-}
- elseif ((!EXT_IS_ACTIVE("holiday")) && (!IS_ADMIN()))
-{
+} elseif ((!EXT_IS_ACTIVE("holiday")) && (!IS_ADMIN())) {
ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "holiday");
return;
}
$result_main = SQL_QUERY("SELECT userid, holiday_activated FROM "._MYSQL_PREFIX."_user_data
WHERE holiday_activated > 0 AND holiday_activated < ".time()." AND holiday_active='N'
ORDER BY holiday_activated", __FILE__, __LINE__);
-if (SQL_NUMROWS($result_main) > 0)
-{
+if (SQL_NUMROWS($result_main) > 0) {
// We have found at least one useraccount so let's check it...
- while(list($uid, $activated) = SQL_FETCHROW($result_main))
- {
+ while(list($uid, $activated) = SQL_FETCHROW($result_main)) {
// Check if his holiday can be activated
$result_holiday = SQL_QUERY_ESC("SELECT holiday_start, holiday_end FROM "._MYSQL_PREFIX."_user_holidays
WHERE userid=%s AND holiday_start <= ".time()." AND holiday_end > ".time()." LIMIT 1",
--- /dev/null
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 09/08/2008 *
+ * =============== Last change: 09/08/2008 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : reset_surfbar.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Things to be done on daily reset *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Dinge, die beim taeglichen Reset erledigt werden *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
+ * For more information visit: http://www.mxchange.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
+ ************************************************************************/
+
+// Some security stuff...
+if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ require($INC);
+} elseif ((!EXT_IS_ACTIVE("")) && (!IS_ADMIN())) {
+ ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE);
+ return;
+}
+
+// Do not execute when script is in CSS mode or no daily reset
+if (($CSS == 1) || (defined('__DAILY_RESET'))) return;
+
+// Reset surfbar counter
+UPDATE_CONFIG("surfbar_daily_counter", "0");
+$_CONFIG['surfbar_daily_counter'] = 0;
+
+//
+?>
// Always make sure the session management is initialized first
require_once(PATH."inc/session.php");
-//
+// Get current theme name
function GET_CURR_THEME() {
global $INC_POOL, $_CONFIG, $CSS;
--- /dev/null
+Deny from all
\ No newline at end of file
--- /dev/null
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 09/08/2008 *
+ * =============== Last change: 09/08/2008 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : weekly_ *
+ * -------------------------------------------------------------------- *
+ * Short description : *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
+ * For more information visit: http://www.mxchange.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
+ ************************************************************************/
+
+// Some security stuff...
+if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ require($INC);
+} elseif ((!EXT_IS_ACTIVE("")) && (!IS_ADMIN())) {
+ ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE);
+ return;
+}
+
+// Do not execute when script is in CSS mode or no daily reset
+if (($CSS == 1) || (!defined('__DAILY_RESET'))) return;
+
+//
+?>
--- /dev/null
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 09/08/2008 *
+ * =============== Last change: 09/08/2008 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : weekly_surfbar.php *
+ * -------------------------------------------------------------------- *
+ * Short description : *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
+ * For more information visit: http://www.mxchange.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
+ ************************************************************************/
+
+// Some security stuff...
+if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ require($INC);
+} elseif ((!EXT_IS_ACTIVE("surfbar")) && (!IS_ADMIN())) {
+ ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE);
+ return;
+}
+
+// Do not execute when script is in CSS mode or no daily reset
+if (($CSS == 1) || (!defined('__DAILY_RESET'))) return;
+
+// Reset the surfbar counter
+UPDATE_CONFIG("surfbar_weekly_counter", "0");
+$_CONFIG['surfbar_weekly_counter'] = 0;
+
+//
+?>
}
// Is there a check value?
- if ((SURFBAR_CHECK_RELOAD_FULL()) || ((isset($_GET['frame'])) && (($_GET['frame'] == "stop") || ($_GET['frame'] == "stop2")))) {
+ if ((SURFBAR_CHECK_RELOAD_FULL()) || ((isset($_GET['frame'])) && (in_array($_GET['frame'], array("stop", "stop2", "stats"))))) {
// Reload-lock is full, surfbar stopped so...
// Load header
require_once(PATH."inc/header.php");
// This makes the footer appear again
unset($_GET['frame']);
+ } elseif ((isset($_GET['frame'])) && ($_GET['frame'] == "stats")) {
+ // Get total points amount
+ $points = GET_TOTAL_DATA($GLOBALS['userid'], "user_points", "points") - GET_TOTAL_DATA($GLOBALS['userid'], "user_data", "used_points");
+
+ // Prepare content
+ $content = array(
+ 'points' => TRANSLATE_COMMA($points),
+ 'online' => SURFBAR_DETERMINE_TOTAL_ONLINE(),
+ 'reload' => ($_CONFIG['surfbar_stats_reload'] * 1000),
+ 'c_total' => TRANSLATE_COMMA($_CONFIG['surfbar_total_counter']),
+ 'c_today' => TRANSLATE_COMMA($_CONFIG['surfbar_daily_counter']),
+ 'c_week' => TRANSLATE_COMMA($_CONFIG['surfbar_weekly_counter']),
+ 'c_month' => TRANSLATE_COMMA($_CONFIG['surfbar_monthly_counter']),
+ );
+
+ // Load template for "stats" page
+ LOAD_TEMPLATE("surfbar_frame_stats", false, $content);
} else {
// Prepare content
$content = array(
// Is there a valid id?
if ($nextId > 0) {
- // Get total points amount
- $points = GET_TOTAL_DATA($GLOBALS['userid'], "user_points", "points") - GET_TOTAL_DATA($GLOBALS['userid'], "user_data", "used_points");
-
// Then prepare other content
$content = array(
'id' => $nextId,
'url' => SURFBAR_GET_URL($nextId),
'curr_reload' => SURFBAR_GET_USER_RELOAD_LOCK(),
'max_urls' => SURFBAR_GET_TOTAL_URLS(),
- 'reload' => SURFBAR_GET_RELOAD_TIME($nextId),
- 'points' => TRANSLATE_COMMA($points)
+ 'reload' => SURFBAR_GET_RELOAD_TIME($nextId)
);
- // Update salt (double-call lock!)
- SURFBAR_UPDATE_SALT();
+ // Update salt (double-call lock!) and statistics
+ SURFBAR_UPDATE_SALT_STATS();
} else {
// Load new URL
LOAD_URL("surfbar.php?frame=stop2");
--- /dev/null
+{--HELLO_ADMIN--},
+
+ein Mitglied hat soeben eine URL in der Surfbar gebucht.
+
+Hier sind alle dazu:
+------------------------------------------
+Gebuchte URL: $content[url]
+------------------------------------------
+Email: $DATA[email]
+------------------------------------------
+Framekiller-Test:
+$content[frametester]
+------------------------------------------
+User-ID: $content[uid]
+------------------------------------------
+Kosten/Aufruf: $content[costs] {!POINTS!}
+------------------------------------------
+Vergütung/Aufruf: $content[reward] {!POINTS!}
+------------------------------------------
+Status: $content[status]
+------------------------------------------
+ID in der Surfbar: $content[insert_id]
+------------------------------------------
+
+{--ADMIN_THANX--}
+ {--YOUR--} {!MAIN_TITLE!} {--SCRIPT--}
+
+{!URL!}/admin.php
------------------------------------------
User-ID: $content[uid]
------------------------------------------
-Vergütung: $content[reward] {!POINTS!}
+Vergütung/Aufruf: $content[reward] {!POINTS!}
------------------------------------------
Status: $content[status]
------------------------------------------
--- /dev/null
+{--HELLO--} Mitglied,
+
+Sie haben soeben eine URL in der Surfbar gebucht.
+
+Hier sind alle Daten:
+------------------------------------------
+Gebuchte URL: $content[url]
+------------------------------------------
+Ihre User-ID: $content[uid]
+------------------------------------------
+Status: $content[status]
+------------------------------------------
+ID in der Surfbar: $content[insert_id]
+------------------------------------------
+
+Mit freundlichem Gruss,
+ Ihr {!MAIN_TITLE!} Team
+
+{!URL!} ({!WEBMASTER!})
<INPUT type="text" name="surfbar_restart_time" size="6" maxlength="20" value="$content[surfbar_restart_time]" />
</TD>
</TR>
+ <TR><TD height="3" colspan="2" class="seperator"> </TD></TR>
+ <TR>
+ <TD height="30" align="right" style="padding-right:5px">
+ {--ADMIN_CONFIG_SURFBAR_STATS_RELOAD--}
+ </TD>
+ <TD>
+ <INPUT type="text" name="surfbar_stats_reload" size="6" maxlength="20" value="$content[surfbar_stats_reload]" />
+ </TD>
+ </TR>
<TR><TD height="8" colspan="2" class="seperator bottom2"> </TD></TR>
<TR>
<TD align="center" colspan="2" class="admin_footer bottom2">
--- /dev/null
+<form action="{!URL!}/modules.php?module=login&what=surfbar_book" method="post">
+<div class="member_table dashed" style="width:600px;margin-top:10px">
+ <div class="member_title2 bottom2" style="padding-top:5px;padding-bottom:5px">
+ <strong>URL in Surfbar buchen:</strong>
+ </div>
+
+ <div class="member_input" style="padding-top:5px;padding-bottom:5px">
+ URL eingeben: <input type="text" name="url" size="20" maxlength="255" value="http://" />
+ </div>
+
+ <div class="member_input" style="padding-top:5px;padding-bottom:5px">
+ Jeder Seiten-Aufruf durch andere Mitglieder kostet Ihnen mindestens <span
+ class="surfbar_points">$content[costs] {!POINTS!}</span>. Surfen Sie mit
+ der Surfbar erhalten Sie mindestens <span class="surfbar_points">$content[reward]
+ {!POINTS!}</span> auf Ihr Konto gutgeschrieben.<br />
+ <br />
+ Sie haben bereits <strong>$content[curr_order]</strong> von maximal
+ <strong>$content[max_order]</strong> erlaubten URLs gebucht.
+ </div>
+
+ <div class="member_title2 top2" style="padding-top:5px;padding-bottom:5px">
+ <input type="reset" class="member_reset" value="{--CLEAR_FORM--}" /> *
+ <input type="submit" class="member_submit" name="ok" value="{--MEMBER_SURFBAR_ADD_URL--}" />
+ </div>
+</div>
+</form>
--- /dev/null
+<form action="{!URL!}/modules.php?module=login&what=surfbar_book" method="post">
+<div class="member_table dashed" style="width:600px;margin-top:10px">
+ <div class="member_title2 bottom2" style="padding-top:5px;padding-bottom:5px">
+ <strong>URL in Surfbar buchen:</strong>
+ </div>
+
+ <div class="member_input" style="padding-top:5px;padding-bottom:5px">
+ URL eingeben: <input type="text" name="url" size="20" maxlength="255" value="http://" />
+ </div>
+
+ <div class="member_input" style="padding-top:5px;padding-bottom:5px">
+ Jeder Seiten-Aufruf durch andere Mitglieder kostet Ihnen <span
+ class="surfbar_points">$content[costs] {!POINTS!}</span>. Surfen Sie mit
+ der Surfbar erhalten Sie <span class="surfbar_points">$content[reward]
+ {!POINTS!}</span> auf Ihr Konto gutgeschrieben.<br />
+ <br />
+ Sie haben bereits <strong>$content[curr_order]</strong> von maximal
+ <strong>$content[max_order]</strong> erlaubten URLs gebucht.
+ </div>
+
+ <div class="member_title2 top2" style="padding-top:5px;padding-bottom:5px">
+ <input type="reset" class="member_reset" value="{--CLEAR_FORM--}" /> *
+ <input type="submit" class="member_submit" name="ok" value="{--MEMBER_SURFBAR_ADD_URL--}" />
+ </div>
+</div>
+</form>
--- /dev/null
+<table border="0" cellspacing="0" cellpadding="0" width="100%" class="surfbar_table">
+<tr>
+ <td class="surfbar_td">
+ »Guthaben: <span class="surfbar_points">$content[points] {!POINTS!}</span>« -
+ »Jetzt Online: <span class="surfbar_counter">$content[online]</span>« -
+ »Seitenaufrufe: Heute:<span class="surfbar_counter">$content[c_today]</span> -
+ Woche:<span class="surfbar_counter">$content[c_week]</span> -
+ Monat:<span class="surfbar_counter">$content[c_month]</span> -
+ Gesamt:<span class="surfbar_counter">$content[c_total]</span>«
+ </td>
+</tr>
+</table>
+<script language="JavaScript" type="text/javascript">
+<!--
+function Reload() {
+ this.location.reload();
+}
+
+window.setTimeout("Reload()", $content[reload]);
+//-->
+</script>
\ No newline at end of file
<span id="surfbar_counter">X</span> <span
id="counter_word">Sekunden</span>« »<span
class="surfbar_reload">$content[curr_reload]</span> von <span
- class="surfbar_max">$content[max_urls]</span> im Reload« »Guthaben:
- <span class="surfbar_points">$content[points] {!POINTS!}</span>«<br />
+ class="surfbar_max">$content[max_urls]</span> im Reload«<br />
»<a href="$content[url]" target="_blank">Aktuelle Seite in neuem
- Fenster öffnen</a>« [<a target="_parent"
- href="{!URL!}/login.php">Loginbereich</a>|<a target="_parent"
- href="{!URL!}/modules.php?module=login&what=logout">Ausloggen</a>|<a
- href="javascript:window.close()">Schliessen</a>]<br />
+ Fenster öffnen</a>« <span class="surfbar_navi">[<a
+ target="_parent" href="{!URL!}/login.php">Loginbereich</a>|<a
+ target="_parent" href="{!URL!}/modules.php?module=login&what=logout">Ausloggen</a>|<a
+ href="javascript:window.close()">Schliessen</a>]</span><br />
»{!MAIN_TITLE!} ist für den Inhalt nicht verantwortlich!«
</td>
}
//-->
</script>
-<frameset rows="62,*" frameborder="no" border="0" framespacing="0">
+<frameset rows="62,*,18" frameborder="no" border="0" framespacing="0">
<frameset cols="*,469" frameborder="no" border="0" framespacing="0">
<frame name="surfbar_top" src="{!URL!}/surfbar.php?frame=top" frameborder="no" scrolling="no" noresize>
<frame name="surfbar_banner" src="{!URL!}/surfbar.php?frame=banner" frameborder="no" scrolling="no" noresize>
</frameset>
<frame name="surfbar_url" src="{!URL!}/surfbar.php?frame=start" frameborder="no" scrolling="no" noresize>
+ <frame name="surfbar_stats" src="{!URL!}/surfbar.php?frame=stats" frameborder="no" scrolling="no" noresize>
</frameset>
<noframes>
Ihr Browser unterstützt keine Frames!
}
function ShowButton () {
- buttonDiv.innerHTML = "<form action='{!URL!}/surfbar.php' target='_parent' method='GET'><input type='submit' class='member_submit' value='Surfbar erneut starten' /></form>";
+ buttonDiv.innerHTML = "<form action='{!URL!}/surfbar.php' target='_self' method='GET'><input type='hidden' name='frame' value='top' /><input type='submit' class='member_submit' value='Surfbar erneut starten' /></form>";
}
function Counter () {