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
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
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
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
}
// 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",
$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__);
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();
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();
}
+
//
?>
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);
// 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__);
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;
}
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` (
$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)."";
// 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. <strong>Vorsicht!</strong> 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?
// 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;
$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);
list($TO) = SQL_FETCHROW($result_email);
SQL_FREERESULT($result_email);
}
+ } elseif ($TO == 0) {
+ // Is the webmaster!
+ $TO = WEBMASTER;
}
// Not in PHPMailer-Mode
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:");
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.<br />\nBitte installieren Sie die Erweiterung <strong>surfbar</strong> 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.");
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.");
// -----------------------------------------------------------------------------
// 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
} 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) {
'uid' => $uid,
'reward' => $reward,
'costs' => $costs,
- 'payment_id' => $paymentId,
'status' => $status
);
}
// 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__
);
}
// 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__);
}
// 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()."");
// 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__);
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);
// 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
// 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
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
);
} 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
$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'])) {
// 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)) {
}
// Load extension
- if ($name != "sql_patches") {
+ if ($name != "sql_patches") {
// Load extension's file
include_once($file1);
} else {
************************************************************************/
// 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__));
--- /dev/null
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 09/09/2008 *
+ * ================ Last change: 09/09/2008 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : what-add_surfbar_url.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Admin may add own URLs to the surfbar *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Admin kann eigene URLs der Surfbar hinzufuegen *
+ * -------------------------------------------------------------------- *
+ * *
+ * -------------------------------------------------------------------- *
+ * 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__));
+
+// Was an URL added?
+if ((isset($_POST['add'])) && (!empty($_POST['url']))) {
+ // Then add this URL
+ if (SURFBAR_ADMIN_ADD_URL($_POST['url'])) {
+ // URL was added
+ LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_SURFBAR_URL_ADDED);
+ } else {
+ // Not added
+ LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_SURFBAR_URL_NOT_ADDED);
+ }
+} // END - if
+
+// Load template
+LOAD_TEMPLATE("admin_add_surfbar_url");
+
+//
+?>
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
+++ /dev/null
-<?php
-/************************************************************************
- * MXChange v0.2.1 Start: 09/01/2008 *
- * ================ Last change: 09/01/2008 *
- * *
- * -------------------------------------------------------------------- *
- * File : what-list_surfbar_reflvl.php *
- * -------------------------------------------------------------------- *
- * Short description : List referal levels for surfbar *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung : Referalebenen der Surfbar auflisten *
- * -------------------------------------------------------------------- *
- * *
- * -------------------------------------------------------------------- *
- * 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);
-} // END - if
-
-// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
-
-// Add a level?
-if ((isset($_POST['add'])) && (!empty($_POST['lvl'])) && (!empty($_POST['perc']))) {
- // Rewrite percentage and level
- $percent = (float) str_replace(",", ".", $_POST['perc']);
- $level = bigintval($_POST['lvl']);
-
- // Add the referal level
- ADMIN_SPONSOR_ADD_REFERAL_LEVEL($levl, $percent);
-} // END - if
-
-// Load all referal levels
-$result = SQL_QUERY("SELECT id, level, percent FROM "._MYSQL_PREFIX."_surfbar_reflevels ORDER BY level ASC", __FILE__, __LINE__);
-
-// Some levels found?
-if (SQL_NUMROWS($result) > 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("<br />");
-
-// Output form for adding new level
-LOAD_TEMPLATE("admin_add_surfbar_reflvl");
-
-//
-?>
// 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;
);
// 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");
{
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
// 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."+<br />\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."<br />\n";
- if (SQL_NUMROWS($result) == 1) {
- list($per) = SQL_FETCHROW($result);
- SQL_FREERESULT($result);
- $P = $points * $per / 100;
- //* DEBUG */ echo "ADD:".$P."<br />\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);
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)
}
// 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
------------------------------------------
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]
+++ /dev/null
-<FORM action="{!URL!}/modules.php?module=admin&what=list_surfbar_reflvl" method="POST" style="margin-bottom: 0px">
-<TABLE border="0" cellspacing="0" cellpadding="0" align="center" class="admin_table dashed">
- <TR>
- <TD class="admin_title bottom2" width="10" height="30"> </TD>
- <TD class="admin_title bottom2" colspan="3" align="center">
- <STRONG>{--ADMIN_SURFBAR_ADD_NEW_REFDEPTH--}</STRONG>
- </TD>
- <TD class="admin_title bottom2" width="10"> </TD>
- </TR>
- <TR>
- <TD class="seperator" colspan="5" height="7"> </TD>
- </TR>
- <TR>
- <TD class="seperator" width="10"> </TD>
- <TD align="right" width="200">{--ENTER_REF_LVL--}:</TD>
- <TD class="seperator" width="10"> </TD>
- <TD><INPUT type="text" name="lvl" class="admin_normal" size="3" maxlength="3" /></TD>
- <TD class="seperator" width="10"> </TD>
- </TR>
- <TR>
- <TD class="seperator" colspan="5" height="7"> </TD>
- </TR>
- <TR>
- <TD class="seperator" width="10"> </TD>
- <TD align="right" width="200">{--ENTER_REF_PERCENTS--}:</TD>
- <TD class="seperator" width="10"> </TD>
- <TD><INPUT type="text" name="perc" class="admin_normal" size="3" maxlength="3" />%</TD>
- <TD class="seperator" width="10"> </TD>
- </TR>
- <TR>
- <TD class="seperator bottom2" colspan="5" height="7"> </TD>
- </TR>
- <TR>
- <TD class="admin_footer seperator" width="10"> </TD>
- <TD class="admin_footer" colspan="3" align="center">
- <INPUT type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> *
- <INPUT type="submit" name="add" class="admin_submit" value="{--ADD_DEPTH--}">
- </TD>
- <TD class="admin_footer seperator" width="10"> </TD>
- </TR>
-</TABLE>
-</FORM>
\ No newline at end of file
--- /dev/null
+<form action="{!URL!}/modules.php?module=admin&what=add_surfbar_url" method="post">
+<div class="admin_table dashed" style="width:600px;margin-top:10px">
+ <div class="admin_title bottom2" style="padding-top:5px;padding-bottom:5px">
+ <strong>URL in Surfbar hinzufügen:</strong>
+ </div>
+
+ <div class="admin_input" style="padding-top:5px;padding-bottom:5px" align="center">
+ URL eingeben: <input type="text" name="url" size="20" maxlength="255" value="http://" />
+ </div>
+
+ <div class="admin_title top2" style="padding-top:3px;padding-bottom:3px">
+ <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" /> *
+ <input type="submit" class="admin_submit" name="add" value="{--ADMIN_SURFBAR_ADD_URL--}" />
+ </div>
+</div>
+</form>
</TD>
</TR>
<TR>
- <TD align="center" style="padding-right:5px">
+ <TD height="30" align="right" style="padding-right:5px">
{--ADMIN_CONFIG_SURFBAR_PAYMENT_MODEL_DYNAMIC--}
</TD>
<TD>
<INPUT type="radio" name="surfbar_pay_model" value="DYNAMIC"{--__CONFIG_SURFBAR_PAY_MODEL_DYNAMIC--} />
</TD>
</TR>
- <TR><TD height="8" colspan="2" class="seperator"> </TD></TR>
- <TR><TD height="3" colspan="2" class="seperator bottom2"> </TD></TR>
- <TR>
- <TD height="30" align="center" colspan="2" class="admin_footer bottom2">
- {--ADMIN_CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK--}
- </TD>
- </TR>
- <TR><TD height="8" colspan="2" class="seperator"> </TD></TR>
- <TR>
- <TD align="center" colspan="2">
- <INPUT type="radio" name="surfbar_notify_admin_unlock" value="Y"{--__CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK_Y--} /> {--ADMIN_SURFBAR_NOTIFY_UNLOCK_YES--}<BR />
- <INPUT type="radio" name="surfbar_notify_admin_unlock" value="N"{--__CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK_N--} /> {--ADMIN_SURFBAR_NOTIFY_UNLOCK_NO--}
- </TD>
- </TR>
- <TR><TD height="8" colspan="2" class="seperator"> </TD></TR>
<TR><TD height="3" colspan="2" class="seperator bottom2"> </TD></TR>
<TR>
<TD height="30" align="center" colspan="2" class="admin_footer bottom2">
+++ /dev/null
-<FORM action="{!URL!}/modules.php?module=admin&what=list_surfbar_reflvl" method="POST">
-<TABLE border="0" cellspacing="0" cellpadding="0" class="admin_table dashed">
- <TR>
- <TD align="center" colspan="3" class="admin_title" height="30"><STRONG>{--EDIT_DEL_REFDEPTH--}</STRONG>
- </TD>
- </TR>
- <TR>
- <TD class="admin_title bottom2 right2" width="30" align="center"><STRONG>{--ID_SELECT--}</STRONG></TD>
- <TD class="admin_title bottom2 right2" width="275" align="center"><STRONG>{--REF_LEVEL--}:</STRONG></TD>
- <TD class="admin_title bottom2" width="275" align="center"><STRONG>{--REF_PERCENT--}:</STRONG></TD>
- </TR>
- $content
- <TR>
- <TD class="admin_footer" colspan="3">
- <INPUT type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}"> *
- <INPUT type="submit" name="edit" class="admin_submit" value="{--EDIT_LVL--}"> *
- <INPUT type="submit" name="del" class="admin_delete" value="{--DEL_LVL--}">
- </TD>
- </TR>
-</TABLE>
-</FORM>
-
-<DIV class="admin_note">
- {--ADMIN_REFERAL_LEVEL_ZERO_NOTICE--}
-</DIV>
+++ /dev/null
-<TR>
- <TD align="center" class="bottom2 right2 switch_sw$content[sw]">
- <INPUT type="checkbox" name="id[$content[id]]" value="1" class="admin_normal" />
- </TD>
- <TD align="center" class="bottom2 right2 switch_sw$content[sw]">
- $content[level]
- </TD>
- <TD align="center" class="bottom2 switch_sw$content[sw]">
- $content[percent]%
- </TD>
-</TR>
</TR>
</TABLE>
</FORM>
-
-<P></P>
-
-<FORM action="{!URL!}/modules.php?module=admin&what=list_surfbar_urls" method="post">
-<DIV class="admin_table dashed" style="width:500px">
- <DIV class="admin_title bottom2">
- <STRONG>{--ADMIN_SURFBAR_SYNC_TITLE--}</STRONG>
- </DIV>
-
- <DIV class="admin_footer">
- <INPUT type="submit" class="admin_submit" name="sync" value="{--ADMIN_SURFBAR_SYNC_BUTTON--}" />
- </DIV>
-</DIV>
-</FORM>
}
function ReloadThis() {
+ parent.surfbar_stats.location.reload();
this.location.reload();
}