From: Roland Häder Date: Tue, 9 Sep 2008 16:14:21 +0000 (+0000) Subject: More fixes for points booking and surfbar X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=08bcd047b40c7bbb2093fa7ee82f8681f19d960b;p=mailer.git More fixes for points booking and surfbar --- diff --git a/.gitattributes b/.gitattributes index e812e23223..0eca02c90b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -252,6 +252,7 @@ inc/modules/admin/what-add_guestnl_cat.php -text inc/modules/admin/what-add_points.php -text inc/modules/admin/what-add_rallye.php -text inc/modules/admin/what-add_sponsor.php -text +inc/modules/admin/what-add_surfbar_url.php -text inc/modules/admin/what-admin_add.php -text inc/modules/admin/what-adminedit.php -text inc/modules/admin/what-admins_add.php -text @@ -335,7 +336,6 @@ inc/modules/admin/what-list_refs.php -text inc/modules/admin/what-list_sponsor.php -text inc/modules/admin/what-list_sponsor_pay.php -text inc/modules/admin/what-list_sponsor_pays.php -text -inc/modules/admin/what-list_surfbar_reflvl.php -text inc/modules/admin/what-list_surfbar_urls.php -text inc/modules/admin/what-list_task.php -text inc/modules/admin/what-list_transfer.php -text @@ -728,7 +728,7 @@ templates/de/html/admin/admin_add_reflvl.tpl -text templates/de/html/admin/admin_add_sponsor.tpl -text templates/de/html/admin/admin_add_sponsor_already.tpl -text templates/de/html/admin/admin_add_sponsor_paytype.tpl -text -templates/de/html/admin/admin_add_surfbar_reflvl.tpl -text +templates/de/html/admin/admin_add_surfbar_url.tpl -text templates/de/html/admin/admin_admin_add.tpl -text templates/de/html/admin/admin_admins_add.tpl -text templates/de/html/admin/admin_admins_add_acl.tpl -text @@ -922,8 +922,6 @@ templates/de/html/admin/admin_list_sponsor_pay_edit.tpl -text templates/de/html/admin/admin_list_sponsor_pay_edit_row.tpl -text templates/de/html/admin/admin_list_sponsor_pay_row.tpl -text templates/de/html/admin/admin_list_sponsor_row.tpl -text -templates/de/html/admin/admin_list_surfbar_reflvl.tpl -text -templates/de/html/admin/admin_list_surfbar_reflvl_row.tpl -text templates/de/html/admin/admin_list_surfbar_urls.tpl -text templates/de/html/admin/admin_list_surfbar_urls_row.tpl -text templates/de/html/admin/admin_list_task_rows.tpl -text diff --git a/inc/autopurge.php b/inc/autopurge.php index 0871b6ce80..6873a1542a 100644 --- a/inc/autopurge.php +++ b/inc/autopurge.php @@ -311,8 +311,7 @@ if ((GET_EXT_VERSION("task") > "0.0") && ($_CONFIG['ap_tasks'] == "Y")) } // Search for mails from deleted members? -if ($_CONFIG['ap_del_mails']) -{ +if ($_CONFIG['ap_del_mails']) { // Okay, let's check for them... $since = bigintval(time() - $_CONFIG['ap_dm_timeout']); $result_mails = SQL_QUERY_ESC("SELECT sender FROM "._MYSQL_PREFIX."_pool WHERE data_type='DELETED' AND timestamp <= %s ORDER BY sender", @@ -322,15 +321,12 @@ if ($_CONFIG['ap_del_mails']) $DELETED = 0; // Do we have "purged" mails? - if (SQL_NUMROWS($result_mails) > 0) - { + if (SQL_NUMROWS($result_mails) > 0) { // Okay, check for their sender's - while(list($sender) = SQL_FETCHROW($result_mails)) - { + while(list($sender) = SQL_FETCHROW($result_mails)) { // Check now... $fount = SQL_NUMROWS(SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1", array(bigintval($sender)), __FILE__, __LINE__)); - if ($found == 0) - { + if ($found == 0) { // Okay we found some mails! $result_remove = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_pool WHERE sender=%s", array(bigintval($sender)), __FILE__, __LINE__); @@ -353,15 +349,12 @@ if ($_CONFIG['ap_del_mails']) array($since), __FILE__, __LINE__); // Do we have "purged" mails? - if (SQL_NUMROWS($result_mails) > 0) - { + if (SQL_NUMROWS($result_mails) > 0) { // Okay, check for their sender's - while(list($sender) = SQL_FETCHROW($result_mails)) - { + while(list($sender) = SQL_FETCHROW($result_mails)) { // Check now... $found = SQL_NUMROWS(SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1", array(bigintval($sender)), __FILE__, __LINE__)); - if ($found == 0) - { + if ($found == 0) { // Okay we found some mails! $result_remove = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_stats WHERE sender=%s", array(bigintval($sender)), __FILE__, __LINE__); $DELETED += SQL_AFFECTEDROWS(); @@ -378,25 +371,23 @@ if ($_CONFIG['ap_del_mails']) SQL_FREERESULT($result_mails); // Do we have deleted mails and the admin want's to receive a notification - if (($DELETED > 0) && ($_CONFIG['ap_dm_notify'] == "Y")) - { + if (($DELETED > 0) && ($_CONFIG['ap_dm_notify'] == "Y")) { // Send out email to admin SEND_ADMIN_NOTIFICATION(AUTOPURGE_ADMIN_DEL_MAILS_SUBJECT, "admin_autopurge_del_mails", $DELETED, ""); } } -if (EXT_IS_ACTIVE("rallye")) -{ +if (EXT_IS_ACTIVE("rallye")) { // Check expired rallyes (hard-coded 3 days limit for displaying expired rallyes!) require_once(PATH."inc/libs/rallye_functions.php"); RALLYE_DELETE_EXPIRED_RALLYES(); } -// -if (EXT_IS_ACTIVE("bonus")) -{ + +if (EXT_IS_ACTIVE("bonus")) { // Check for expired turbo bonus lines require_once(PATH."inc/libs/bonus_functions.php"); BONUS_PURGE_EXPIRED_TURBO_BONUS(); } + // ?> diff --git a/inc/databases.php b/inc/databases.php index 518bc0e745..b310ae1e07 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -114,7 +114,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // This current patch level -define('CURR_SVN_REVISION', "281"); +define('CURR_SVN_REVISION', "282"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/extensions.php b/inc/extensions.php index 5c15cdf857..f566d1dfc8 100644 --- a/inc/extensions.php +++ b/inc/extensions.php @@ -467,8 +467,7 @@ function EXTENSION_UPDATE($file, $ext, $EXT_VER, $dry_run=false) // Create task $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE subject='%s' LIMIT 1", array($ext_subj), __FILE__, __LINE__); - if (SQL_NUMROWS($result) == 0) - { + if (SQL_NUMROWS($result) == 0) { // 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(get_session('admin_login')), $ext_subj, addslashes($NOTES)), __FILE__, __LINE__); @@ -482,18 +481,15 @@ function EXTENSION_UPDATE($file, $ext, $EXT_VER, $dry_run=false) array($EXT_VERSION, $ext), __FILE__, __LINE__); // Update cache - if (EXT_IS_ACTIVE("cache")) - { + if (EXT_IS_ACTIVE("cache")) { if ($cacheInstance->cache_file("extensions", true) == true) $cacheInstance->cache_destroy(); if ($cacheInstance->cache_file("config", true) == true) $cacheInstance->cache_destroy(); if ($cacheInstance->cache_file("mod_reg", true) == true) $cacheInstance->cache_destroy(); - } + } // END - if // Remove array unset($SQLs); - } - else - { + } else { // In "dry-run" mode return array with SQL commands return $SQLs; } diff --git a/inc/extensions/ext-surfbar.php b/inc/extensions/ext-surfbar.php index f77381e276..9d823808fc 100644 --- a/inc/extensions/ext-surfbar.php +++ b/inc/extensions/ext-surfbar.php @@ -92,15 +92,6 @@ INDEX (`userid`), INDEX (`url_id`) ) TYPE=MyISAM COMMENT='Surfbar last used salts'"; - // Reload locks - $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_reflevels`"; - $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_surfbar_reflevels` ( -`id` BIGINT(20) NOT NULL AUTO_INCREMENT, -`level` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', -`percent` FLOAT(10,5) UNSIGNED NOT NULL DEFAULT '0.00000', -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` ( @@ -122,7 +113,6 @@ INDEX (`userid`,`url_id`) $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).""; @@ -142,9 +132,9 @@ INDEX (`userid`,`url_id`) // 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[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','list_surfbar_urls','URLs verwalten','Verwalten Sie hier alle in der Surfbar befindlichen URLs mit nur wenigen Klicks.',1)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','unlock_surfbar_urls','Wartende URLs freigeben','Geben Sie hier nur direkt in der Surfbar gebuchte URLs frei.',2)"; - $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','list_surfbar_reflvl','Referal-Ebenen einstellen','Stellen Sie hier die prozentuale Vergütung für Refs ein. Es wird nur die Basisvergütung zur Rechengrundlage der Referalvergütung verwendet.',3)"; + $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','add_surfbar_url','URL hinzufügen','Fügen Sie URLs z.B. von Werbenetzwerken hinzu, oder Ihre eigenen Projekte. Vorsicht! Ihnen muss es auch gestattet sein, URLs aus dem Werbenetzwerk in die Surfbar einzufügen.',1)"; + $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','list_surfbar_urls','URLs verwalten','Verwalten Sie hier alle in der Surfbar befindlichen URLs mit nur wenigen Klicks.',2)"; + $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','unlock_surfbar_urls','Wartende URLs freigeben','Geben Sie hier nur direkt in der Surfbar gebuchte URLs frei.',3)"; $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','config_surfbar','Einstellungen','Einstellungen an der Surfbar ändern, wie Festvergütung, prozentuale Ref-Vergütung und vieles mehr.',4)"; // Load CSS? @@ -155,10 +145,9 @@ case "remove": // Do stuff when removing extension // SQL commands to run $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_urls`"; $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."_member_menu` WHERE `action`='surfbar' LIMIT 4"; $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='surfbar' LIMIT 5"; break; diff --git a/inc/functions.php b/inc/functions.php index 29421f3922..f4fa1f7e6a 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -341,7 +341,7 @@ function SEND_EMAIL($TO, $SUBJECT, $MSG, $HTML='N', $FROM="") { $SUBJECT = html_entity_decode($SUBJECT); // Set from header - if (!eregi("@", $TO)) { + if ((!eregi("@", $TO)) && ($TO > 0)) { // Value detected, load email from database if (EXT_IS_ACTIVE("msg")) { ADD_MESSAGE_TO_BOX($TO, $SUBJECT, $MSG, $HTML); @@ -351,6 +351,9 @@ function SEND_EMAIL($TO, $SUBJECT, $MSG, $HTML='N', $FROM="") { list($TO) = SQL_FETCHROW($result_email); SQL_FREERESULT($result_email); } + } elseif ($TO == 0) { + // Is the webmaster! + $TO = WEBMASTER; } // Not in PHPMailer-Mode diff --git a/inc/language/surfbar_de.php b/inc/language/surfbar_de.php index bcdf6592eb..f787136d95 100644 --- a/inc/language/surfbar_de.php +++ b/inc/language/surfbar_de.php @@ -46,7 +46,6 @@ define('ADMIN_CONFIG_SURFBAR_STATIC_LOCK', "Statische Reload-Sperre (oberes Fram define('ADMIN_CONFIG_SURFBAR_PAYMENT_MODEL', "Vergütungsmodel auswählen:"); define('ADMIN_CONFIG_SURFBAR_PAYMENT_MODEL_STATIC', "Statische Werte verwenden."); define('ADMIN_CONFIG_SURFBAR_PAYMENT_MODEL_DYNAMIC', "Dynamische Werte errechnen."); -define('ADMIN_CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK', "Admin bei Freigabe von Mailbuchungen informieren, dass die URL in die Surfbar aufgenommen wurde?"); define('ADMIN_CONFIG_SURFBAR_DYNAMIC_PERCENT', "Prozent auf dynamische Vergütung:"); 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:"); @@ -55,8 +54,6 @@ define('ADMIN_CONFIG_SURFBAR_STATS_RELOAD', "Reload-Zeit der Statistik unterhalb 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 admin text -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.
\nBitte installieren Sie die Erweiterung surfbar neu."); define('ADMIN_SURFBAR_ADD_NEW_REFDEPTH', "Neue Referal-Ebene zur Surfbar hinzufügen"); define('ADMIN_SURFBAR_NO_URLS_FOUND', "Es konnten keine URLs in der Surfbar gefunden werden."); @@ -75,8 +72,9 @@ define('ADMIN_SURFBAR_CONFIRM_URL', "URL(s) freigeben"); define('ADMIN_SURFBAR_UNLOCK_DONE', "Freischaltung ausgewählter URL(s) vollständig. :-)"); define('ADMIN_SURFBAR_UNLOCK_FAILED', "Freischaltung fehlgeschlagen. Bitte nachschauen, welche URLs nicht freigegeben wurden."); define('ADMIN_SURFBAR_LIST_URLS_TITLE', "URLs in Surfbar aufisten"); -define('ADMIN_SURFBAR_SYNC_TITLE', "Surfbar URL-Tabelle mit Mailbuchungstabelle abgleichen"); -define('ADMIN_SURFBAR_SYNC_BUTTON', "Alle URLs aus Mailbuchungstabele synchronisieren"); +define('ADMIN_SURFBAR_URL_ADDED', "URL wurde der Surfbar hinzugefügt."); +define('ADMIN_SURFBAR_URL_NOT_ADDED', "URL wurde wegen Fehler nicht hinzugefügt. Ist die URL bereits vorhanden?"); +define('ADMIN_SURFBAR_ADD_URL', "URL hinzufügen"); // General member text define('MEMBER_SURFBAR_URL_ADDED', "URL hinzugefügt und wartet auf Freischaltung."); diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index 3e0a103c8a..2104068759 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -42,7 +42,7 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { // ----------------------------------------------------------------------------- // Admin has added an URL with given user id and so on -function SURFBAR_ADMIN_ADD_URL ($url, $uid, $reward, $costs, $paymentId) { +function SURFBAR_ADMIN_ADD_URL ($url) { // Do some pre-checks if (!IS_ADMIN()) { // Not an admin @@ -50,16 +50,20 @@ function SURFBAR_ADMIN_ADD_URL ($url, $uid, $reward, $costs, $paymentId) { } elseif (!VALIDATE_URL($url)) { // URL invalid return false; - } elseif (SURFBAR_LOOKUP_BY_URL($url, $uid)) { + } elseif (SURFBAR_LOOKUP_BY_URL($url, "0")) { // URL already found in surfbar! return false; - } elseif (!SURFBAR_IF_USER_BOOK_MORE_URLS($uid)) { + } elseif (!SURFBAR_IF_USER_BOOK_MORE_URLS("0")) { // 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, $uid, $reward, $costs, $paymentId, "CONFIRMED", "unlock"); + return SURFBAR_REGISTER_URL($url, "0", $reward, $costs, "0", "CONFIRMED", "unlock"); } // Admin function for unlocking URLs function SURFBAR_ADMIN_UNLOCK_URL_IDS ($IDs) { @@ -192,7 +196,6 @@ function SURFBAR_REGISTER_URL ($url, $uid, $reward, $costs, $paymentId=0, $statu 'uid' => $uid, 'reward' => $reward, 'costs' => $costs, - 'payment_id' => $paymentId, 'status' => $status ); @@ -218,14 +221,19 @@ function SURFBAR_REGISTER_URL ($url, $uid, $reward, $costs, $paymentId=0, $statu } // Inserts an url by given data array and return the insert id function SURFBAR_INSERT_URL_BY_ARRAY ($urlData) { + // Get userid + $uid = bigintval($urlData['uid']); + + // Is the id set? + if (empty($uid)) $uid = "0"; + // 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, %d, '%s')", + SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_surfbar_urls (userid, url, reward, costs, status) VALUES('%s', '%s', %s, %s, '%s')", array( - bigintval($urlData['uid']), + $uid, $urlData['url'], (float)$urlData['reward'], (float)$urlData['costs'], - bigintval($urlData['payment_id']), $urlData['status'] ), __FILE__, __LINE__ ); @@ -481,8 +489,8 @@ function SURFBAR_CHECK_VALIDATION_CODE ($id, $check, $salt) { } // Lockdown the userid/id combination (reload lock) function SURFBAR_LOCKDOWN_ID ($id) { - //* DEBUG: */ print "LOCK!"); - ///* DEBUG: */ return; + //* //DEBUG: */ print "LOCK!"); + ///* //DEBUG: */ return; // Just add it to the database SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_surfbar_locks (userid, url_id) VALUES(%s, %s)", array($GLOBALS['userid'], bigintval($id)), __FILE__, __LINE__); @@ -493,15 +501,11 @@ function SURFBAR_LOCKDOWN_ID ($id) { } // Pay points to the user and remove it from the sender function SURFBAR_PAY_POINTS ($id) { - global $SURFBAR_CACHE, $_CONFIG; - - // Re-configure ref-system to surfbar levels - $_CONFIG['db_percents'] = "percent"; - $_CONFIG['db_table'] = "surfbar_reflevels"; - // Remove it from the URL owner //DEBUG_LOG(__FUNCTION__.":uid=".SURFBAR_GET_USERID().",costs=".SURFBAR_GET_COSTS().""); - SUB_POINTS(SURFBAR_GET_USERID(), SURFBAR_GET_COSTS()); + if (SURFBAR_GET_USERID() > 0) { + SUB_POINTS(SURFBAR_GET_USERID(), SURFBAR_GET_COSTS()); + } // END - if // Book it to the user //DEBUG_LOG(__FUNCTION__.":uid=".$GLOBALS['userid'].",reward=".SURFBAR_GET_REWARD().""); @@ -594,7 +598,7 @@ function SURFBAR_DETERMINE_DEPLETED_USERIDS() { // Get all userid except logged in one $result = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_surfbar_urls -WHERE userid != %s AND status='CONFIRMED' +WHERE userid NOT IN (%s,0) AND status='CONFIRMED' GROUP BY userid ORDER BY userid ASC", array($GLOBALS['userid']), __FILE__, __LINE__); @@ -634,11 +638,14 @@ 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", + $result = SQL_QUERY_ESC("SELECT id +FROM "._MYSQL_PREFIX."_surfbar_stats +WHERE (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(last_online)) <= %s +GROUP BY userid", array($_CONFIG['online_timeout']), __FILE__, __LINE__); // Fetch count - list($cnt) = SQL_FETCHROW($result); + $cnt = SQL_NUMROWS($result); // Free result SQL_FREERESULT($result); @@ -646,6 +653,25 @@ function SURFBAR_DETERMINE_TOTAL_ONLINE () { // Return result return $cnt; } +// Determine waiting time for one URL +function SURFBAR_DETERMINE_WAIT_TIME () { + global $_CONFIG; + + // Init time + $time = 0; + + // Which payment model do we have? + if ($_CONFIG['surfbar_pay_model'] == "STATIC") { + // Static model + $time = $_CONFIG['surfbar_static_time']; + } else { + // Dynamic + die("DYNAMIC payment model not yet finished!"); + } + + // Return value + return $time; +} // Changes the status of an URL from given to other function SURFBAR_CHANGE_STATUS ($id, $prevStatus, $newStatus) { // Get URL data for status comparison @@ -685,70 +711,65 @@ function SURFBAR_CHANGE_STATUS ($id, $prevStatus, $newStatus) { // All done! return true; } -// Determine next id for surfbar or get data for given id, always call this before you call other -// getters below this function!!! -function SURFBAR_DETERMINE_NEXT_ID ($id = 0) { - global $SURFBAR_CACHE, $_CONFIG; - - // Default is no id! - $nextId = 0; $randNum = 0; - - // Is the ID set? - if ($id == 0) { - // Prepare some arrays - $IDs = array(); - $USE = array(); - $ignored = array(); +// "Getter" for lock ids array +function SURFBAR_GET_LOCK_IDS () { + // Prepare some arrays + $IDs = array(); + $USE = array(); + $ignored = array(); - // Get all id from locks within the timestamp - $result = SQL_QUERY_ESC("SELECT id, url_id, UNIX_TIMESTAMP(last_surfed) + // Get all id from locks within the timestamp + $result = SQL_QUERY_ESC("SELECT id, url_id, UNIX_TIMESTAMP(last_surfed) AS last FROM "._MYSQL_PREFIX."_surfbar_locks WHERE userid=%s ORDER BY id ASC", array($GLOBALS['userid']), - __FILE__, __LINE__); - - // Load all entries - while (list($id, $url, $last) = SQL_FETCHROW($result)) { - //DEBUG_LOG(__FUNCTION__.":next - id={$id},url={$url},last={$last}"); - // Skip entries that are too old - if (($last < (time() - SURFBAR_GET_DATA('surf_lock'))) && (!in_array($url, $ignored))) { - //DEBUG_LOG(__FUNCTION__.":okay - id={$id},url={$url},last={$last}"); - // Add only if missing or bigger - if ((!isset($IDs[$url])) || ($IDs[$url] <= $last)) { - // Add this ID - //DEBUG_LOG(__FUNCTION__.":ADD - id={$id},url={$url},last={$last}"); - $IDs[$url] = $last; - $USE[$url] = $id; - } // END - if - } else { - // Ignore these old entries! - //DEBUG_LOG(__FUNCTION__.":ignore - id={$id},url={$url},last={$last}"); - $ignored[] = $url; - unset($IDs[$url]); - unset($USE[$url]); - } - } // END - while - - // Free result - SQL_FREERESULT($result); + __FILE__, __LINE__); + + // Load all entries + while (list($lid, $url, $last) = SQL_FETCHROW($result)) { + // Debug message + //DEBUG_LOG(__FUNCTION__.":next - lid={$lid},url={$url},rest=".(time() - $last)."/".SURFBAR_GET_DATA('surf_lock').""); + + // Skip entries that are too old + if (($last > (time() - SURFBAR_GET_DATA('surf_lock'))) && (!in_array($url, $ignored))) { + // Debug message + //DEBUG_LOG(__FUNCTION__.":okay - lid={$lid},url={$url},last={$last}"); + + // Add only if missing or bigger + if ((!isset($IDs[$url])) || ($IDs[$url] > $last)) { + // Debug message + //DEBUG_LOG(__FUNCTION__.":ADD - lid={$lid},url={$url},last={$last}"); + + // Add this ID + $IDs[$url] = $last; + $USE[$url] = $lid; + } // END - if + } else { + // Debug message + //DEBUG_LOG(__FUNCTION__.":ignore - lid={$lid},url={$url},last={$last}"); - // Shall we add some ids? - $ADD = ""; - if (count($USE) > 0) { - $ADD = " AND l.id IN (".implode(",", $USE).")"; - } // END - if + // Ignore these old entries! + $ignored[] = $url; + unset($IDs[$url]); + unset($USE[$url]); + } + } // END - while - // Determine depleted user account - $UIDs = SURFBAR_DETERMINE_DEPLETED_USERIDS(); + // Free result + SQL_FREERESULT($result); - // Count max availabe entries - $result = SQL_QUERY("SELECT sbu.id AS cnt + // Return array + return $USE; +} +// "Getter" for maximum random number +function SURFBAR_GET_MAX_RANDOM ($UIDs, $ADD) { + global $_CONFIG; + // Count max availabe entries + $result = SQL_QUERY("SELECT sbu.id AS cnt FROM "._MYSQL_PREFIX."_surfbar_urls AS sbu -LEFT JOIN "._MYSQL_PREFIX."_payments AS p -ON sbu.payment_id=p.id LEFT JOIN "._MYSQL_PREFIX."_surfbar_salts AS sbs ON sbu.id=sbs.url_id LEFT JOIN "._MYSQL_PREFIX."_surfbar_locks AS l @@ -756,27 +777,62 @@ ON sbu.id=l.url_id WHERE sbu.userid NOT IN (".implode(",", $UIDs).") AND sbu.status='CONFIRMED'".$ADD." GROUP BY sbu.id", __FILE__, __LINE__); - // Log last query - //DEBUG_LOG(__FUNCTION__.":lastQuery=".$_CONFIG['db_last_query']."|numRows=".SQL_NUMROWS($result)."|Affected=".SQL_AFFECTEDROWS($result).""); + // Log last query + //DEBUG_LOG(__FUNCTION__.":lastQuery=".$_CONFIG['db_last_query']."|numRows=".SQL_NUMROWS($result)."|Affected=".SQL_AFFECTEDROWS($result).""); - // Fetch max rand - $maxRand = SQL_NUMROWS($result); + // Fetch max rand + $maxRand = SQL_NUMROWS($result); - // Free result - SQL_FREERESULT($result); + // Free result + SQL_FREERESULT($result); + + // Return value + return $maxRand; +} +// Determine next id for surfbar or get data for given id, always call this before you call other +// getters below this function!!! +function SURFBAR_DETERMINE_NEXT_ID ($id = 0) { + global $SURFBAR_CACHE, $_CONFIG; + + // Default is no id and no random number + $nextId = 0; + $randNum = 0; + + // Is the ID set? + if ($id == 0) { + // Get array with lock ids + $USE = SURFBAR_GET_LOCK_IDS(); + + // Shall we add some URL ids to ignore? + $ADD = ""; + if (count($USE) > 0) { + // Ignore some! + $ADD = " AND sbu.id NOT IN ("; + foreach ($USE as $url_id => $lid) { + // Add URL id + $ADD .= $url_id.","; + } // END - foreach + + // Add closing bracket + $ADD = substr($ADD, 0, -1) . ")"; + } // END - if + + // Determine depleted user account + $UIDs = SURFBAR_DETERMINE_DEPLETED_USERIDS(); + + // Get maximum randomness factor + $maxRand = SURFBAR_GET_MAX_RANDOM($UIDs, $ADD); // If more than one URL can be called generate the random number! if ($maxRand > 1) { // Generate random number - $randNum = mt_rand(0, $maxRand); + $randNum = mt_rand(0, ($maxRand - 1)); } // END - if // And query the database //DEBUG_LOG(__FUNCTION__.":randNum={$randNum},maxRand={$maxRand},surfLock=".SURFBAR_GET_DATA('surf_lock').""); - $result = SQL_QUERY_ESC("SELECT sbu.id, sbu.userid, sbu.url, sbs.last_salt, sbu.reward, sbu.costs, sbu.views_total, p.time, UNIX_TIMESTAMP(l.last_surfed) AS last_surfed + $result = SQL_QUERY_ESC("SELECT sbu.id, sbu.userid, sbu.url, sbs.last_salt, sbu.reward, sbu.costs, sbu.views_total, UNIX_TIMESTAMP(l.last_surfed) AS last_surfed FROM "._MYSQL_PREFIX."_surfbar_urls AS sbu -LEFT JOIN "._MYSQL_PREFIX."_payments AS p -ON sbu.payment_id=p.id LEFT JOIN "._MYSQL_PREFIX."_surfbar_salts AS sbs ON sbu.id=sbs.url_id LEFT JOIN "._MYSQL_PREFIX."_surfbar_locks AS l @@ -789,10 +845,8 @@ LIMIT %s,1", ); } else { // Get data from specified id number - $result = SQL_QUERY_ESC("SELECT sbu.id, sbu.userid, sbu.url, sbs.last_salt, sbu.reward, sbu.costs, sbu.views_total, p.time, UNIX_TIMESTAMP(l.last_surfed) AS last_surfed + $result = SQL_QUERY_ESC("SELECT sbu.id, sbu.userid, sbu.url, sbs.last_salt, sbu.reward, sbu.costs, sbu.views_total, UNIX_TIMESTAMP(l.last_surfed) AS last_surfed FROM "._MYSQL_PREFIX."_surfbar_urls AS sbu -LEFT JOIN "._MYSQL_PREFIX."_payments AS p -ON sbu.payment_id=p.id LEFT JOIN "._MYSQL_PREFIX."_surfbar_salts AS sbs ON sbu.id=sbs.url_id LEFT JOIN "._MYSQL_PREFIX."_surfbar_locks AS l @@ -811,12 +865,8 @@ LIMIT 1", $SURFBAR_CACHE = merge_array($SURFBAR_CACHE, SQL_FETCHARRAY($result)); //DEBUG_LOG(__FUNCTION__.":count(".count($SURFBAR_CACHE).") - AFTER"); - // Is the time there? - if (is_null($SURFBAR_CACHE['time'])) { - // Then repair it wit the static! - //DEBUG_LOG(__FUNCTION__.":time - STATIC!"); - $SURFBAR_CACHE['time'] = $_CONFIG['surfbar_static_time']; - } // END - if + // Determine waiting time + $SURFBAR_CACHE['time'] = SURFBAR_DETERMINE_WAIT_TIME(); // Is the last salt there? if (is_null($SURFBAR_CACHE['last_salt'])) { diff --git a/inc/load_extensions.php b/inc/load_extensions.php index c66ba0da31..88e4a469f2 100644 --- a/inc/load_extensions.php +++ b/inc/load_extensions.php @@ -196,7 +196,6 @@ if ((SQL_NUMROWS($res_ext_crt) > 0) && (($cacheMode == "init") || ($cacheMode == // Special functions file $file3 = sprintf("%sinc/libs/%s_functions.php", PATH, $name); - echo $file3."
\n"; // Does the extension file exists? if (file_exists($file1) && is_readable($file1)) { @@ -226,7 +225,7 @@ if ((SQL_NUMROWS($res_ext_crt) > 0) && (($cacheMode == "init") || ($cacheMode == } // Load extension - if ($name != "sql_patches") { + if ($name != "sql_patches") { // Load extension's file include_once($file1); } else { diff --git a/inc/modules/admin/what- b/inc/modules/admin/what- index 209036a08c..f02615ef84 100644 --- a/inc/modules/admin/what- +++ b/inc/modules/admin/what- @@ -32,11 +32,11 @@ ************************************************************************/ // 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); } + // Add description as navigation point ADD_DESCR("admin", basename(__FILE__)); diff --git a/inc/modules/admin/what-add_surfbar_url.php b/inc/modules/admin/what-add_surfbar_url.php new file mode 100644 index 0000000000..2aef15f398 --- /dev/null +++ b/inc/modules/admin/what-add_surfbar_url.php @@ -0,0 +1,59 @@ + diff --git a/inc/modules/admin/what-config_surfbar.php b/inc/modules/admin/what-config_surfbar.php index 1cd75f1270..e4a40f8023 100644 --- a/inc/modules/admin/what-config_surfbar.php +++ b/inc/modules/admin/what-config_surfbar.php @@ -75,17 +75,6 @@ if (isset($_POST['ok'])) { define('__CONFIG_SURFBAR_PAY_MODEL_DYNAMIC', " checked=\"checked\""); } - // Prepare admin notify - if ($_CONFIG['surfbar_notify_admin_unlock'] == "Y") { - // Yes selected - define('__CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK_Y' , " checked=\"checked\""); - define('__CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK_N', ""); - } else { - // No selected - define('__CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK_Y' , ""); - define('__CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK_N', " checked=\"checked\""); - } - // Prepare auto-sart if ($_CONFIG['surfbar_autostart'] == "Y") { // Yes selected diff --git a/inc/modules/admin/what-list_surfbar_reflvl.php b/inc/modules/admin/what-list_surfbar_reflvl.php deleted file mode 100644 index 839bce00b9..0000000000 --- a/inc/modules/admin/what-list_surfbar_reflvl.php +++ /dev/null @@ -1,89 +0,0 @@ - 0) { - // List all levels - $OUT = ""; $SW = 2; - while ($content = SQL_FETCHARRAY($result)) { - // Prepare content - $content['percent'] = TRANSLATE_COMMA($content['percent']); - $content['sw'] = $SW; - - // Load row template - $OUT .= LOAD_TEMPLATE("admin_list_surfbar_reflvl_row", true, $content); - - // Switch color - $SW = 3 - $SW; - } // END - while - - // Load main template - LOAD_TEMPLATE("admin_list_surfbar_reflvl", false, $OUT); -} else { - // No level setup so far - LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_SURFBAR_NO_REF_LEVELS_FOUND); -} - -// Free result -SQL_FREERESULT($result); - -// Add space -OUTPUT_HTML("
"); - -// Output form for adding new level -LOAD_TEMPLATE("admin_add_surfbar_reflvl"); - -// -?> diff --git a/inc/modules/admin/what-unlock_emails.php b/inc/modules/admin/what-unlock_emails.php index 89da1f3e73..0131dd295b 100644 --- a/inc/modules/admin/what-unlock_emails.php +++ b/inc/modules/admin/what-unlock_emails.php @@ -94,25 +94,15 @@ LIMIT 1", // Subtract bonus points from system BONUS_POINTS_HANDLER($_CONFIG['bonus_order']); - } + } // END - if - // Check for surfbar extension - $msg_user = "MISSING"; - if (EXT_IS_ACTIVE("surfbar")) { - // Add the url - $insertId = SURFBAR_ADMIN_ADD_URL($DATA['url'], $DATA['sender'], $DATA['payment'], $DATA['payment_id']); - - // Load email template - $msg_user = LOAD_EMAIL_TEMPLATE("order_accept_sb", $insertId, $DATA['sender']); - } else { - // Load email template - $msg_user = LOAD_EMAIL_TEMPLATE("order-accept", "", $DATA['sender']); - } + // Load email template + $msg_user = LOAD_EMAIL_TEMPLATE("order-accept", "", $DATA['sender']); // Send email SEND_EMAIL($DATA['sender'], MEMBER_ORDER_ACCEPTED, $msg_user); - } - } + } // END - if + } // END - foreach // Set message $MSG = ADMIN_MAILS_ACTIVATED; diff --git a/inc/modules/member/what-surfbar_start.php b/inc/modules/member/what-surfbar_start.php index 65dddf0dc4..acb470a3a7 100644 --- a/inc/modules/member/what-surfbar_start.php +++ b/inc/modules/member/what-surfbar_start.php @@ -56,7 +56,7 @@ $content = array( ); // Load the template -LOAD_TEMPLATE("member_start_".strtolower($_CONFIG['surfbar_pay_model']), false, $content); +LOAD_TEMPLATE("member_surfbar_start_".strtolower($_CONFIG['surfbar_pay_model']), false, $content); // Load surfbar link template LOAD_TEMPLATE("member_surfbar_link"); diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 61a98d58c7..ade9cabcd6 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -1044,6 +1044,9 @@ function ADD_POINTS_REFSYSTEM($uid, $points, $send_notify=false, $rid="0", $lock { global $DEPTH, $_CONFIG, $DATA, $link; + // Debug message + //DEBUG_LOG(__FUNCTION__.": uid={$uid},points={$points}"); + // When $uid = 0 add points to jackpot if ($uid == "0") { // Add points to jackpot @@ -1067,48 +1070,65 @@ function ADD_POINTS_REFSYSTEM($uid, $points, $send_notify=false, $rid="0", $lock // Which points, locked or normal? $data = "points"; if ($locked) $data = "locked_points"; + // Check user account $result_user = SQL_QUERY_ESC("SELECT refid, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s AND status='CONFIRMED' LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__); + //* DEBUG */ echo "+".SQL_NUMROWS($result_user).":".$points."+
\n"; if (SQL_NUMROWS($result_user) == 1) { // This is the user and his ref list ($ref, $email) = SQL_FETCHROW($result_user); - SQL_FREERESULT($result_user); - $result = SQL_QUERY_ESC("SELECT %s FROM "._MYSQL_PREFIX."_%s WHERE level='%s' LIMIT 1", + // Debug message + //DEBUG_LOG(__FUNCTION__.": ref={$ref},email={$email},DEPTH={$DEPTH}"); + + // Get referal data + $result_lvl = SQL_QUERY_ESC("SELECT %s FROM "._MYSQL_PREFIX."_%s WHERE level='%s' LIMIT 1", array($percents, $table, bigintval($DEPTH)), __FILE__, __LINE__); //* DEBUG */ echo "DEPTH:".$DEPTH."
\n"; - if (SQL_NUMROWS($result) == 1) { - list($per) = SQL_FETCHROW($result); - SQL_FREERESULT($result); - $P = $points * $per / 100; - //* DEBUG */ echo "ADD:".$P."
\n"; + if (SQL_NUMROWS($result_lvl) == 1) { + // Get percents + list($per) = SQL_FETCHROW($result_lvl); + + // Calculate new points + $ref_points = $points * $per / 100; + + // Debug message + //DEBUG_LOG(__FUNCTION__.": percent={$per},ref_points={$ref_points}"); // Update points... - $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_points SET %s=%s+%s WHERE userid=%s AND ref_depth=%s LIMIT 1", - array($data, $data, $P, bigintval($uid), bigintval($DEPTH)), __FILE__, __LINE__); - if (SQL_AFFECTEDROWS($link, __FILE__, __LINE__) == 0) { + SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_points SET %s=%s+%s WHERE userid=%s AND ref_depth=%d LIMIT 1", + array($data, $data, $ref_points, bigintval($uid), bigintval($DEPTH)), __FILE__, __LINE__); + + // Debug log + //DEBUG_LOG(__FUNCTION__.": affectedRows=".SQL_AFFECTEDROWS().",DEPTH={$DEPTH}"); + + // No entry updated? + if (SQL_AFFECTEDROWS() == 0) { // First ref in this level! :-) - $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_points (userid, ref_depth, %s) VALUES (%s, %s, %s)", - array($data, bigintval($uid), bigintval($DEPTH), $P), __FILE__, __LINE__); - } + $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_points (userid, ref_depth, %s) VALUES (%s, %d, %s)", + array($data, bigintval($uid), bigintval($DEPTH), $ref_points), __FILE__, __LINE__); + + // Debug log + //DEBUG_LOG(__FUNCTION__.": insertedRows=".SQL_AFFECTEDROWS().""); + } // END - if // Update mediadata as well if (GET_EXT_VERSION("mediadata") >= "0.0.4") { // Update database - MEDIA_UPDATE_ENTRY(array("total_points"), "add", $P); - } + MEDIA_UPDATE_ENTRY(array("total_points"), "add", $ref_points); + } // END - if // Points updated, maybe I shall send him an email? if (($send_notify) && ($ref > 0) && (!$locked)) { // 0 1 2 3 - $DATA = array($per, bigintval($DEPTH), $P, bigintval($ref)); + $DATA = array($per, bigintval($DEPTH), $ref_points, bigintval($ref)); $msg = LOAD_EMAIL_TEMPLATE("confirm-referral", "", bigintval($uid)); SEND_EMAIL($email, THANX_REFERRAL_ONE, $msg); } elseif (($send_notify) && ($ref == 0) && (!$locked) && ($add_mode == "direct") && (!defined('__POINTS_VALUE'))) { // Direct payment shall be notified about - define('__POINTS_VALUE', $P); + define('__POINTS_VALUE', $ref_points); // Load message $msg = LOAD_EMAIL_TEMPLATE("add-points", REASON_DIRECT_PAYMENT, $uid); @@ -1124,7 +1144,13 @@ function ADD_POINTS_REFSYSTEM($uid, $points, $send_notify=false, $rid="0", $lock ADD_POINTS_REFSYSTEM($ref, $points, $send_notify, $ref, $locked); } } + + // Free result + SQL_FREERESULT($result_lvl); } + + // Free result + SQL_FREERESULT($result_user); } // function UPDATE_REF_COUNTER($uid) @@ -1635,7 +1661,7 @@ function UPDATE_CONFIG ($entries, $values, $updateMode="") { } // Run database update - //* DEBUG: */ DEBUG_LOG(__FUNCTION__.":entries={$entries}"); + //DEBUG_LOG(__FUNCTION__.":entries={$entries}"); SQL_QUERY("UPDATE "._MYSQL_PREFIX."_config SET ".$entries." WHERE config=0 LIMIT 1", __FILE__, __LINE__); // Destroy cache diff --git a/templates/de/emails/admin/admin_surfbar_url_unlock.tpl b/templates/de/emails/admin/admin_surfbar_url_unlock.tpl index d02553d28c..ed38b6744a 100644 --- a/templates/de/emails/admin/admin_surfbar_url_unlock.tpl +++ b/templates/de/emails/admin/admin_surfbar_url_unlock.tpl @@ -6,17 +6,9 @@ Hier sind alle Daten aus der Mail: ------------------------------------------ Gebuchte URL: $content[url] ------------------------------------------ -Betreff: $DATA[subject] ------------------------------------------- -Email: $DATA[email] ------------------------------------------- Framekiller-Test: $content[frametester] ------------------------------------------ -User-ID: $content[uid] ------------------------------------------- -Vergütung/Aufruf: $content[reward] {!POINTS!} ------------------------------------------- Status: $content[status] ------------------------------------------ ID in der Surfbar: $content[insert_id] diff --git a/templates/de/html/admin/admin_add_surfbar_reflvl.tpl b/templates/de/html/admin/admin_add_surfbar_reflvl.tpl deleted file mode 100644 index 6d13d3ecc8..0000000000 --- a/templates/de/html/admin/admin_add_surfbar_reflvl.tpl +++ /dev/null @@ -1,42 +0,0 @@ -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  - {--ADMIN_SURFBAR_ADD_NEW_REFDEPTH--} -  
 
 {--ENTER_REF_LVL--}:  
 
 {--ENTER_REF_PERCENTS--}: % 
 
-
\ No newline at end of file diff --git a/templates/de/html/admin/admin_add_surfbar_url.tpl b/templates/de/html/admin/admin_add_surfbar_url.tpl new file mode 100644 index 0000000000..16a26063f5 --- /dev/null +++ b/templates/de/html/admin/admin_add_surfbar_url.tpl @@ -0,0 +1,16 @@ +
+
+
+ URL in Surfbar hinzufügen: +
+ +
+ URL eingeben: +
+ +
+  * + +
+
+
diff --git a/templates/de/html/admin/admin_config_surfbar.tpl b/templates/de/html/admin/admin_config_surfbar.tpl index 0228fd1685..47a9711d7d 100644 --- a/templates/de/html/admin/admin_config_surfbar.tpl +++ b/templates/de/html/admin/admin_config_surfbar.tpl @@ -92,28 +92,13 @@ - + {--ADMIN_CONFIG_SURFBAR_PAYMENT_MODEL_DYNAMIC--} -   -   - - - {--ADMIN_CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK--} - - -   - - - {--ADMIN_SURFBAR_NOTIFY_UNLOCK_YES--}
- {--ADMIN_SURFBAR_NOTIFY_UNLOCK_NO--} - - -     diff --git a/templates/de/html/admin/admin_list_surfbar_reflvl.tpl b/templates/de/html/admin/admin_list_surfbar_reflvl.tpl deleted file mode 100644 index bd5b74ccbf..0000000000 --- a/templates/de/html/admin/admin_list_surfbar_reflvl.tpl +++ /dev/null @@ -1,25 +0,0 @@ -
- - - - - - - - - - $content - - - -
{--EDIT_DEL_REFDEPTH--} -
{--ID_SELECT--}{--REF_LEVEL--}:{--REF_PERCENT--}:
-
- -
- {--ADMIN_REFERAL_LEVEL_ZERO_NOTICE--} -
diff --git a/templates/de/html/admin/admin_list_surfbar_reflvl_row.tpl b/templates/de/html/admin/admin_list_surfbar_reflvl_row.tpl deleted file mode 100644 index 7a5b96d2a2..0000000000 --- a/templates/de/html/admin/admin_list_surfbar_reflvl_row.tpl +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - $content[level] - - - $content[percent]% - - diff --git a/templates/de/html/admin/admin_list_surfbar_urls.tpl b/templates/de/html/admin/admin_list_surfbar_urls.tpl index 94d78173a0..b95ed3735f 100644 --- a/templates/de/html/admin/admin_list_surfbar_urls.tpl +++ b/templates/de/html/admin/admin_list_surfbar_urls.tpl @@ -28,17 +28,3 @@ $content - -

- -
-
-
- {--ADMIN_SURFBAR_SYNC_TITLE--} -
- - -
-
diff --git a/templates/de/html/surfbar/surfbar_frame_top.tpl b/templates/de/html/surfbar/surfbar_frame_top.tpl index 957f122c18..7c6f3abbc3 100644 --- a/templates/de/html/surfbar/surfbar_frame_top.tpl +++ b/templates/de/html/surfbar/surfbar_frame_top.tpl @@ -34,6 +34,7 @@ function Confirm() { } function ReloadThis() { + parent.surfbar_stats.location.reload(); this.location.reload(); }