Surfbar continued (unfinished) and some updates:
authorRoland Häder <roland@mxchange.org>
Tue, 23 Sep 2008 03:21:59 +0000 (03:21 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 23 Sep 2008 03:21:59 +0000 (03:21 +0000)
- Surfbar extended with member actions, undelete, un-/pause and migrate
  (incomplete) from mail orders
- Several admin templates fixed where the member selection box was used
- Other misc fixes

53 files changed:
.gitattributes
inc/databases.php
inc/extensions/ext-sql_patches.php
inc/extensions/ext-surfbar.php
inc/functions.php
inc/language/cache_de.php
inc/language/surfbar_de.php
inc/libs/surfbar_functions.php
inc/modules/admin/admin-inc.php
inc/modules/admin/what-config_beg.php
inc/modules/admin/what-config_bonus.php
inc/modules/admin/what-config_doubler.php
inc/modules/admin/what-config_refid.php
inc/modules/admin/what-config_surfbar.php
inc/modules/admin/what-config_title.php
inc/modules/admin/what-list_surfbar_urls.php
inc/modules/admin/what-unlock_emails.php
inc/modules/admin/what-unlock_surfbar_urls.php
inc/modules/frametester.php
inc/modules/member/what-surfbar_book.php
inc/modules/member/what-surfbar_list.php
inc/modules/member/what-surfbar_start.php
inc/modules/order.php
inc/mysql-manager.php
inc/pool-update.php
install.php
mailid.php
modules.php
templates/de/emails/admin/admin_del_surfbar_urls.tpl
templates/de/emails/admin/admin_edit_surfbar_urls.tpl
templates/de/emails/admin/admin_lock_confirmed_surfbar_urls.tpl
templates/de/emails/admin/admin_lock_locked_surfbar_urls.tpl
templates/de/emails/admin/admin_surfbar_url_confirmed.tpl
templates/de/emails/admin/admin_surfbar_url_reg.tpl
templates/de/emails/admin/admin_surfbar_url_rejected.tpl [new file with mode: 0644]
templates/de/emails/member/member_edit_surfbar_urls.tpl
templates/de/emails/member/member_surfbar_url_rejected.tpl [new file with mode: 0644]
templates/de/html/admin/admin_config_beg.tpl
templates/de/html/admin/admin_config_bonus.tpl
templates/de/html/admin/admin_config_doubler.tpl
templates/de/html/admin/admin_config_refid.tpl
templates/de/html/admin/admin_config_reg_pro.tpl
templates/de/html/admin/admin_config_surfbar.tpl
templates/de/html/admin/admin_edit_surfbar_urls.tpl
templates/de/html/admin/admin_edit_surfbar_urls_row.tpl
templates/de/html/admin/admin_list_surfbar_urls.tpl
templates/de/html/admin/admin_list_surfbar_urls_row.tpl
templates/de/html/admin/admin_undelete_surfbar_urls.tpl [new file with mode: 0644]
templates/de/html/admin/admin_undelete_surfbar_urls_row.tpl [new file with mode: 0644]
templates/de/html/admin/admin_unlock_surfbar_urls.tpl
templates/de/html/admin/admin_unlock_surfbar_urls_row.tpl
templates/de/html/member/member_surfbar_book_dynamic.tpl
templates/de/html/member/member_surfbar_book_static.tpl

index 9d237d6..3acdc2a 100644 (file)
@@ -627,6 +627,7 @@ 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_confirmed.tpl -text
 templates/de/emails/admin/admin_surfbar_url_reg.tpl -text
+templates/de/emails/admin/admin_surfbar_url_rejected.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
@@ -695,6 +696,7 @@ 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_confirmed.tpl -text
 templates/de/emails/member/member_surfbar_url_reg.tpl -text
+templates/de/emails/member/member_surfbar_url_rejected.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
@@ -1063,6 +1065,8 @@ templates/de/html/admin/admin_theme_edit_row.tpl -text
 templates/de/html/admin/admin_theme_import.tpl -text
 templates/de/html/admin/admin_theme_installed.tpl -text
 templates/de/html/admin/admin_theme_list.tpl -text
+templates/de/html/admin/admin_undelete_surfbar_urls.tpl -text
+templates/de/html/admin/admin_undelete_surfbar_urls_row.tpl -text
 templates/de/html/admin/admin_unlock_emails.tpl -text
 templates/de/html/admin/admin_unlock_emails_redir.tpl -text
 templates/de/html/admin/admin_unlock_emails_redir_row.tpl -text
index f569ead..629140b 100644 (file)
@@ -113,7 +113,7 @@ define('USAGE_BASE', "usage");
 define('SERVER_URL', "http://www.mxchange.org");
 
 // This current patch level
-define('CURR_SVN_REVISION', "385");
+define('CURR_SVN_REVISION', "386");
 
 // Take a prime number which is long (if you know a longer one please try it out!)
 define('_PRIME', 591623);
index 08fa584..f5569d7 100644 (file)
@@ -38,13 +38,13 @@ if (!defined('__SECURITY')) {
 }
 
 // Version number
-$EXT_VERSION = "0.4.7";
+$EXT_VERSION = "0.4.8";
 
 // 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", "0.4.5", "0.4.6", "0.4.7");
+$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", "0.4.6", "0.4.7", "0.4.8");
 
 switch ($EXT_LOAD_MODE)
 {
@@ -616,6 +616,13 @@ PRIMARY KEY (id)
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Fehlgeschlagene Login-Versuche werden nun mitgez&auml;hlt und der letzte vermerkt.";
                break;
+
+       case "0.4.8": // SQL queries for v0.4.8
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system ADD INDEX (subject)";
+
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Index f&uuml;r Betreff eingef&uuml;gt.";
+               break;
        }
        break;
 
index 8505ed5..69f2dc2 100644 (file)
@@ -55,17 +55,17 @@ case "register": // Do stuff when installtion is running (modules.php?module=adm
 `id` BIGINT(20) UNSIGNED  NOT NULL AUTO_INCREMENT,
 `userid` BIGINT(20) UNSIGNED  NOT NULL DEFAULT '0',
 `url` VARCHAR(255) NOT NULL DEFAULT '',
-`last_salt` VARCHAR( 255 ) NOT NULL DEFAULT '',
-`reward` FLOAT(10,5) UNSIGNED  NOT NULL DEFAULT '0.00000',
-`costs` FLOAT(10,5) UNSIGNED  NOT NULL DEFAULT '0.00000',
+`payment_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`last_salt` VARCHAR(255) NOT NULL DEFAULT '',
 `views_total` BIGINT(20) UNSIGNED  NOT NULL DEFAULT '0',
-`status` ENUM('PENDING','CONFIRMED','LOCKED','STOPPED','REJECTED','DELETED') NOT NULL DEFAULT 'CONFIRMED',
+`status` ENUM('PENDING','ACTIVE','LOCKED','STOPPED','REJECTED','DELETED','MIGRATED') NOT NULL DEFAULT 'PENDING',
 `registered` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
 `last_locked` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
 `lock_reason` VARCHAR(255) NOT NULL DEFAULT '',
 `reject_reason` VARCHAR(255) NOT NULL DEFAULT '',
 PRIMARY KEY(`id`),
-UNIQUE KEY `userid_url` (`userid`, `url`)
+UNIQUE KEY `userid_url` (`userid`, `url`),
+INDEX (`payment_id`)
 ) TYPE=MyISAM COMMENT='Surfbar URLs'";
 
        // Reload locks
@@ -108,9 +108,9 @@ INDEX (`userid`,`url_id`)
        $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_actions`";
        $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_surfbar_actions` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-`status` ENUM('PENDING','CONFIRMED','LOCKED','STOPPED','REJECTED','DELETED') NOT NULL DEFAULT 'PENDING',
+`status` ENUM('PENDING','ACTIVE','LOCKED','STOPPED','REJECTED','DELETED','MIGRATED') NOT NULL DEFAULT 'PENDING',
 `action` ENUM('EDIT','DELETE','PAUSE','UNPAUSE','FRAMETEST','RETREAT','RESUBMIT') NULL DEFAULT NULL,
-`new_status` ENUM('PENDING','CONFIRMED','LOCKED','STOPPED','REJECTED','DELETED') NULL DEFAULT NULL,
+`new_status` ENUM('PENDING','ACTIVE','LOCKED','STOPPED','REJECTED','DELETED','MIGRATED') NULL DEFAULT NULL,
 PRIMARY KEY (`id`),
 INDEX (`status`)
 ) TYPE=MyISAM COMMENT='Surfbar Member Actions'";
@@ -118,20 +118,24 @@ INDEX (`status`)
        // Member actions
        $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('PENDING','RETREAT','DELETED')";
        $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('PENDING','FRAMETEST',NULL)";
-       $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('CONFIRMED','EDIT','PENDING')";
-       $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('CONFIRMED','DELETE','DELETED')";
-       $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('CONFIRMED','PAUSE','PAUSED')";
-       $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('CONFIRMED','FRAMETEST',NULL)";
+       $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('ACTIVE','EDIT','PENDING')";
+       $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('ACTIVE','DELETE','DELETED')";
+       $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('ACTIVE','PAUSE','PAUSED')";
+       $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('ACTIVE','FRAMETEST',NULL)";
        $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('LOCKED','DELETE','DELETED')";
        $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('LOCKED','FRAMETEST',NULL)";
        $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('LOCKED','RESUBMIT','PENDING')";
        $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('STOPPED','EDIT','PENDING')";
        $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('STOPPED','DELETE','DELETED')";
-       $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('STOPPED','UNPAUSE','CONFIRMED')";
+       $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('STOPPED','UNPAUSE','PENDING')";
        $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('REJECTED','EDIT','PENDING')";
        $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('REJECTED','DELETE','DELETED')";
        $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('REJECTED','FRAMETEST',NULL)";
        $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('REJECTED','RESUBMIT','PENDING')";
+       $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('MIGRATED','EDIT','PENDING')";
+       $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('MIGRATED','DELETE','DELETED')";
+       $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('MIGRATED','FRAMETEST',NULL)";
+       $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_surfbar_actions` (`status`,`action`,`new_status`) VALUES('MIGRATED','RESUBMIT','PENDING')";
 
        // Config entries
        $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_pay_model` ENUM('STATIC','DYNAMIC') NOT NULL DEFAULT 'STATIC'";
@@ -143,6 +147,7 @@ INDEX (`status`)
        $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_migrate_urls` 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_yester_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
@@ -150,6 +155,7 @@ INDEX (`status`)
        $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";
        $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_purge_deleted` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(ONE_DAY*7)."";
+       $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `surfbar_purge_migrated` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(ONE_DAY*3)."";
 
        // Member menus
        $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar',NULL,'Surfbar','Y','Y',4)";
index 90fc0df..a71c939 100644 (file)
@@ -837,7 +837,7 @@ function LOAD_EMAIL_TEMPLATE($template, $content="", $UID="0") {
                // Template file not found!
                $newContent = TEMPLATE_404.": ".$template."<br />
 ".TEMPLATE_CONTENT."
-<PRE>".print_r($newContent, true)."</PRE>
+<PRE>".print_r($content, true)."</PRE>
 ".TEMPLATE_DATA."
 <PRE>".print_r($DATA, true)."</PRE>
 <br /><br />";
index 20bdf2c..c66f0fc 100644 (file)
@@ -46,7 +46,7 @@ define('ADMIN_CACHE_STATS_TITLE', "Statistiken des Caching-Systems");
 define('ADMIN_CACHE_DB_HITS', "Zugriffe auf die Datenbank");
 define('ADMIN_CACHE_HITS', "Zugriffe auf den Cache");
 define('ADMIN_CACHE_PERCENTS', "Prozentual (*)");
-define('ADMIN_CACHE_NOTES', "(*): Es ist normal, dass die Prozente sp&auml;ter sehr niedrig sind, da trotz vieler eingesparter Zugriffe immer noch deutlich mehr Zugriffe auf die Datenbank gemacht werden.");
+define('ADMIN_CACHE_NOTES', "(*): Sollten bei Ihnen die Prozente unter 50&#37; liegen und Sie nicht vor September 2008 das Script *neu* installiert haben, so ist dies kein Grund zur Besorgnis. Im Normalfall sollten die Prozente seit eigenen Revisionen im September 2008 (R300+) &uuml;ber 50&#37; liegen.");
 define('ADMIN_TOTAL_HITS', "Gesamtzugriffe");
 define('CACHE_CANNOT_UNLINK_1', "Kann nicht die Cache-Datei <STRONG><U>");
 define('CACHE_CANNOT_UNLINK_2', "</U></STRONG> vom Server entfernen!");
index ed6f458..6b6d171 100644 (file)
@@ -48,11 +48,12 @@ define('ADMIN_CONFIG_SURFBAR_PAYMENT_MODEL_STATIC', "Statische Werte verwenden."
 define('ADMIN_CONFIG_SURFBAR_PAYMENT_MODEL_DYNAMIC', "Dynamische Werte errechnen.");
 define('ADMIN_CONFIG_SURFBAR_DYNAMIC_PERCENT', "Prozent auf dynamische Verg&uuml;tung/ Verweildauer/Reload-Sperre:");
 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:&nbsp;(*)");
+define('ADMIN_CONFIG_SURFBAR_RESTART_TIME', "Ruhezeit der Surfbar, wenn alle URLs in Reload-Lock sind:&nbsp;");
 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_CONFIG_SURFBAR_PURGE_DELETED', "Verweildauer gel&ouml;schter URLs in der Datenbank:");
-define('ADMIN_CONFIG_SURFBAR_NOTE', "(*): Es wird empfohlen, die Ruhezeit etwas l&auml;nger als die Reload-Sperre einzustellen.");
+define('ADMIN_CONFIG_SURFBAR_PURGE_MIGRATED', "Verweildauer migrierter URLs in der Datenbank:");
+define('ADMIN_CONFIG_SURFBAR_NOTE', "<strong>Hinweise:</strong>&nbsp;Es wird empfohlen, die Ruhezeit etwas l&auml;nger als die Reload-Sperre einzustellen. Migrierte URLs sind aus Mailbuchungen &uuml;bernommene URLs, die das Mitglied noch best&auml;tigen muss.");
 
 // General admin text
 define('ADMIN_SURFBAR_NO_REF_LEVELS_FOUND', "Zur Zeit sind keine Referal-Ebenen f&uuml;r die Surfbar eingestellt.<br />\nBitte installieren Sie die Erweiterung <strong>surfbar</strong> neu.");
@@ -66,11 +67,12 @@ define('ADMIN_SURFBAR_STATUS', "URL-Status");
 define('ADMIN_SURFBAR_REGISTERED', "URL aufgenommen");
 define('ADMIN_SURFBAR_LAST_LOCKED', "Zuletzt gesperrt");
 define('ADMIN_SURFBAR_LOCK_REASON', "Sperrgrund");
-define('ADMIN_SURFBAR_EDIT_URL', "URL &auml;ndern");
-define('ADMIN_SURFBAR_EDIT_URL_NOW', "URL jetzt &auml;ndern");
-define('ADMIN_SURFBAR_DEL_URL', "URL l&ouml;schen");
+define('ADMIN_SURFBAR_EDIT_URL', "URLs &auml;ndern");
+define('ADMIN_SURFBAR_EDIT_URL_NOW', "URLs jetzt &auml;ndern");
+define('ADMIN_SURFBAR_DEL_URL', "URLs l&ouml;schen");
 define('ADMIN_SURFBAR_DEL_URL_NOW', "URLs jetzt entfernen");
 define('ADMIN_SURFBAR_UNDELETE_URL', "L&ouml;schung zur&uuml;cknehmen");
+define('ADMIN_SURFBAR_UNDELETE_URL_NOW', "URLs jetzt wiederherstellen");
 define('ADMIN_SURFBAR_UNLOCK_URL', "URL ent-/sperren");
 define('ADMIN_SURFBAR_LOCK_URL_NOW', "URL jetzt ent-/sperren");
 define('ADMIN_SURFBAR_CONFIRM_URL', "URL(s) freigeben");
@@ -80,12 +82,14 @@ define('ADMIN_SURFBAR_UNLOCK_FAILED', "Freischaltung fehlgeschlagen. Bitte nachs
 define('ADMIN_SURFBAR_URL_ADDED', "URL wurde der Surfbar hinzugef&uuml;gt.");
 define('ADMIN_SURFBAR_URL_NOT_ADDED', "URL wurde wegen Fehler nicht hinzugef&uuml;gt. Ist die URL bereits vorhanden?");
 define('ADMIN_SURFBAR_ADD_URL', "URL hinzuf&uuml;gen");
+define('ADMIN_BUILD_STATUS_HANDLER', "Status-Handler");
 
 // Admin titles
 define('ADMIN_SURFBAR_LIST_URLS_TITLE', "Surfbar - URLs aufisten");
 define('ADMIN_SURFBAR_DELETE_URLS_TITLE', "Surfbar - URLs entfernen");
 define('ADMIN_SURFBAR_EDIT_URLS_TITLE', "Surfbar - URLs editieren");
 define('ADMIN_SURFBAR_LOCK_URLS_TITLE', "Surfbar - URLs sperren/entsperren");
+define('ADMIN_SURFBAR_UNDELETE_URLS_TITLE', "Surfbar - gel&ouml;schte URLs wiederherstellen");
 
 // Member titles
 define('MEMBER_SURFBAR_LIST_TITLE', "Ihre URLs in der Surfbar verwalten");
@@ -103,34 +107,40 @@ define('MEMBER_SURFBAR_LAST_LOCKED', "Letzte Sperre");
 define('MEMBER_SURFBAR_LOCK_REASON', "Sperrgrund");
 define('MEMBER_SURFBAR_ACTIONS', "Aktionen");
 define('MEMBER_SURFBAR_TEST_URL', "URL anzeigen");
-define('MEMBER_SURFBAR_LIST_NOTE', "Bitte beachten Sie, dass Editieren und erneutes Aktivieren von gestoppten URLs eine Freischaltung durch unsere Administratoren n&ouml;tig ist.");
-define('MEMBER_SURFBAR_ACTION_DONE', "Ausgew&aumml;hlte Aktion ausgef&uuml;hrt.");
+define('MEMBER_SURFBAR_LIST_NOTE', "Bitte beachten Sie, dass Editieren, erneutes Aktivieren von gestoppten URLs und nochmalige Anmeldung nach Ablehnung eine Freischaltung durch unsere Administratoren n&ouml;tig ist.");
+define('MEMBER_SURFBAR_ACTION_DONE', "Ausgew&auml;hlte Aktion ausgef&uuml;hrt.");
 define('MEMBER_SURFBAR_ACTION_FAILED', "Ausgew&auml;hlte Aktion konnte nicht vollst&auml;ndig ausgef&uuml;hrt werden!");
 
 // 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");
-define('ADMIN_SURFBAR_NOTIFY_URL_CONFIRMED_SUBJECT', "URL in Surfbar freigegeben");
+define('ADMIN_SURFBAR_NOTIFY_URL_UNLOCK_SUBJECT', "[Surfbar:] URL hinzugef&uuml;gt durch Admin");
+define('ADMIN_SURFBAR_NOTIFY_URL_REG_SUBJECT', "[Surfbar:] Mitgliedsbuchung einer URL");
+define('ADMIN_SURFBAR_NOTIFY_URL_ACTIVE_SUBJECT', "[Surfbar:] Freigabe einer URL");
+define('ADMIN_SURFBAR_NOTIFY_URL_DELETED_SUBJECT', "[Surfbar:] URL gel&ouml;scht");
+define('ADMIN_SURFBAR_NOTIFY_URL_REJECTED_SUBJECT', "[Surfbar:] URL abgelehnt");
+define('ADMIN_SURFBAR_NOTIFY_DEFAULT_SUBJECT', "Problem in Surfbar-Betreff");
 
 // Auto-generated admin subject lines
 define('ADMIN_DEL_SURFBAR_URLS_SUBJECT', "[Surfbar:] URL entfernt");
 define('ADMIN_EDIT_SURFBAR_URLS_SUBJECT', "[Surfbar:] URL ge&auml;ndert");
-define('ADMIN_CONFIRMED_SURFBAR_URLS_SUBJECT', "[Surfbar:] Freigabe einer URL");
+define('ADMIN_ACTIVE_SURFBAR_URLS_SUBJECT', "[Surfbar:] Freigabe einer URL");
 define('ADMIN_LOCKED_SURFBAR_URLS_SUBJECT', "[Surfbar:] Sperrung einer URL");
 
 // Subject lines for members
 define('MEMBER_SURFBAR_NOTIFY_URL_UNLOCK_SUBJECT', "Ihre URL wurde in die Surfbar aufgenommen");
 define('MEMBER_SURFBAR_NOTIFY_URL_REG_SUBJECT', "Ihre URL in der Surfbar wartet auf Freischaltung");
-define('MEMBER_SURFBAR_NOTIFY_URL_CONFIRMED_SUBJECT', "Ihre URL wurde f&uuml;r die Surfbar freigegeben");
+define('MEMBER_SURFBAR_NOTIFY_URL_ACTIVE_SUBJECT', "Ihre URL wurde f&uuml;r die Surfbar freigegeben");
+define('MEMBER_SURFBAR_NOTIFY_URL_DELETED_SUBJECT', "L&ouml;schung Ihrer URL aus der Surfbar");
+define('MEMBER_SURFBAR_NOTIFY_URL_REJECTED_SUBJECT', "Ihre URL wurde f&uuml;r die Surfbar abgelehnt!");
+define('MEMBER_SURFBAR_NOTIFY_DEFAULT_SUBJECT', "[Fehler:] Bitte leiten Sie diese Mail an uns weiter!");
 
 // Auto-generated member subject lines
 define('MEMBER_DEL_SURFBAR_URLS_SUBJECT', "Ihre URL wurde aus der Surfbar entfernt");
 define('MEMBER_EDIT_SURFBAR_URLS_SUBJECT', "&Auml;nderung Ihrer URL in der Surfbar");
 define('MEMBER_LOCKED_SURFBAR_URLS_SUBJECT', "Sperrung Ihrer URL in Surfbar, bitte AGBs beachten!");
-define('MEMBER_CONFIRMED_SURFBAR_URLS_SUBJECT', "Freigabe Ihrer URL in Surfbar");
+define('MEMBER_ACTIVE_SURFBAR_URLS_SUBJECT', "Freigabe Ihrer URL in Surfbar");
 
 // URL status
-define('SURFBAR_URL_STATUS_CONFIRMED', "Freigegeben");
+define('SURFBAR_URL_STATUS_ACTIVE', "Freigegeben");
 define('SURFBAR_URL_STATUS_LOCKED', "Gesperrt");
 define('SURFBAR_URL_STATUS_PENDING', "Wartend");
 define('SURFBAR_URL_STATUS_STOPPED', "Angehalten");
@@ -140,10 +150,16 @@ define('SURFBAR_URL_STATUS_DELETED', "Gel&ouml;scht");
 // Member actions - submit buttons
 define('MEMBER_SURFBAR_ACTION_RETREAT_SUBMIT', "Zur&uuml;cknehmen");
 define('MEMBER_SURFBAR_ACTION_FRAMETEST_SUBMIT', "Framkiller-Test");
+define('MEMBER_SURFBAR_ACTION_EDIT_SUBMIT', "&Auml;ndern");
+define('MEMBER_SURFBAR_ACTION_DELETE_SUBMIT', "L&ouml;schen");
+define('MEMBER_SURFBAR_ACTION_RESUBMIT_SUBMIT', "Nochmal anmelden");
 
 // Member actions - button titles
 define('MEMBER_SURFBAR_ACTION_RETREAT_TITLE', "Nehmen Sie hiermit Ihre Buchung wieder zur&uuml;ck, falls Sie diese doch nicht bewerben wollten.");
 define('MEMBER_SURFBAR_ACTION_FRAMETEST_TITLE', "Testen Sie die Seite auf Framekiller hin, diese sind in unserer Surfbar grunds&auml;tzlich nicht gestattet.");
+define('MEMBER_SURFBAR_ACTION_EDIT_TITLE', "&Auml;ndern Sie hier Ihre URL, wenn diese nicht stimmen sollte. Allerdings wird Ihre URL dann auf Freischaltung wartend gesetzt, damit wir sie vor Aufnahme nochmals kontrollieren k&ouml;nnen.");
+define('MEMBER_SURFBAR_ACTION_DELETE_TITLE', "L&ouml;schen Sie URLs, die in unserem System nicht mehr beworben werden sollen. Ihre URL wird dann als zu L&ouml;schen markiert und wird dann von uns entg&uuml;ltig gel&ouml;scht. Dies gilt als Vorsichtsma&szlig;nahme.");
+define('MEMBER_SURFBAR_ACTION_RESUBMIT_TITLE', "Melden Sie Ihre URL erneut an, wenn Sie diese an unsere AGBs angepasst haben, wie z.B. Framekiller oder Hardcore/Erotik entfernt. Diese sind bei uns nicht gestattet.");
 
 //
 ?>
index 9d4ebe6..dcf0902 100644 (file)
@@ -58,12 +58,8 @@ function SURFBAR_ADMIN_ADD_URL ($url) {
                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, "0", $reward, $costs, "0", "CONFIRMED", "unlock");
+       return SURFBAR_REGISTER_URL($url, "0", "0", "ACTIVE", "unlock");
 }
 // Admin function for unlocking URLs
 function SURFBAR_ADMIN_UNLOCK_URL_IDS ($IDs) {
@@ -85,7 +81,33 @@ function SURFBAR_ADMIN_UNLOCK_URL_IDS ($IDs) {
        // Update the status for all ids
        foreach ($IDs as $id => $dummy) {
                // Test all ids through (ignores failed)
-               $done = (($done) && (SURFBAR_CHANGE_STATUS($id, "PENDING", "CONFIRMED")));
+               $done = (($done) && (SURFBAR_CHANGE_STATUS($id, "PENDING", "ACTIVE")));
+       } // END - if
+
+       // Return total status
+       return $done;
+}
+// Admin function for rejecting URLs
+function SURFBAR_ADMIN_REJECT_URL_IDS ($IDs) {
+       // Is this an admin or invalid array?
+       if (!IS_ADMIN()) {
+               // Not admin or invalid IDs array
+               return false;
+       } elseif (!is_array($IDs)) {
+               // No array
+               return false;
+       } elseif (count($IDs) == 0) {
+               // Empty array
+               return false;
+       }
+
+       // Set to true to make AND expression valid if first URL got unlocked
+       $done = true;
+
+       // Update the status for all ids
+       foreach ($IDs as $id => $dummy) {
+               // Test all ids through (ignores failed)
+               $done = (($done) && (SURFBAR_CHANGE_STATUS($id, "PENDING", "REJECTED")));
        } // END - if
 
        // Return total status
@@ -115,12 +137,8 @@ function SURFBAR_MEMBER_ADD_URL ($url) {
                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);
+       return SURFBAR_REGISTER_URL($url, $GLOBALS['userid']);
 }
 // Create list of actions depending on status for the user
 function SURFBAR_MEMBER_ACTIONS ($urlId, $status) {
@@ -161,13 +179,83 @@ function SURFBAR_MEMBER_ACTIONS ($urlId, $status) {
 }
 // Do the member form request
 function SURFBAR_MEMBER_DO_FORM ($formData, $URLs) {
+       global $SURFBAR_CACHE;
+
+       // By default no action is performed
+       $performed = false;
+
        // Is this a member?
        if (!IS_MEMBER()) {
                // No member!
                return false;
+       } elseif ((!isset($formData['id'])) || (!isset($formData['action']))) {
+               // Important form elements are missing!
+               return false;
+       } elseif (!isset($URLs[$formData['id']])) {
+               // ID not found in cache
+               return false;
+       } elseif (!SURFBAR_VALIDATE_MEMBER_ACTION_STATUS($formData['action'], $URLs[$formData['id']]['status'])) {
+               // Action not allowed for current URL status
+               return false;
+       }
+
+       // Create the function name for selected action
+       $functionName = sprintf("SURFBAR_MEMBER_%s_ACTION", strtoupper(SQL_ESCAPE($formData['action'])));
+
+       // Is the function there?
+       if (function_exists($functionName)) {
+               // Add new status
+               $URLs[$formData['id']]['new_status'] = $SURFBAR_CACHE['new_status'];
+
+               // Extract URL data for call-back
+               $urlData = array($URLs[$formData['id']]);
+
+               // Action found so execute it
+               $performed = call_user_func_array($functionName, $urlData);
+       } else {
+               // Log invalid request
+               DEBUG_LOG(__FUNCTION__.": action={$formData['action']},id={$formData['id']},function={$functionName}");
+       }
+
+       // Return status
+       return $performed;
+}
+// Validate if the requested action can be performed on current URL status
+function SURFBAR_VALIDATE_MEMBER_ACTION_STATUS ($action, $status) {
+       global $SURFBAR_CACHE;
+
+       // Search for the requested action/status combination in database
+       $result = SQL_QUERY_ESC("SELECT new_status FROM "._MYSQL_PREFIX."_surfbar_actions WHERE action='%s' AND status='%s' LIMIT 1",
+               array($action, $status), __FILE__, __LINE__);
+
+       // Is the entry there?
+       $isValid = (SQL_NUMROWS($result) == 1);
+
+       // Fetch the new status if found
+       if ($isValid) {
+               list($SURFBAR_CACHE['new_status']) = SQL_FETCHROW($result);
        } // END - if
 
-       /* DEBUG: */ die("<pre>".print_r($formData, true)."</pre><pre>".print_r($URLs, true)."</pre>");
+       // Free result
+       SQL_FREERESULT($result);
+
+       // Return status
+       return $isValid;
+}
+//
+// -----------------------------------------------------------------------------
+//                               Member actions
+// -----------------------------------------------------------------------------
+//
+// Retreat an URL
+function SURFBAR_MEMBER_RETREAT_ACTION ($urlData) {
+       // Create the data array for next function call
+       $data = array(
+               $urlData['id'] => $urlData
+       );
+
+       // Simply change the status here
+       return SURFBAR_CHANGE_STATUS ($urlData['id'], $urlData['status'], $urlData['new_status'], $data);
 }
 //
 // -----------------------------------------------------------------------------
@@ -202,7 +290,7 @@ function SURFBAR_GET_URL_DATA ($searchTerm, $column="id", $order="id", $sort="AS
        } // END - if
 
        // Look up the record
-       $result = SQL_QUERY_ESC("SELECT id, userid, url, reward, costs, views_total, status, registered, last_locked, lock_reason
+       $result = SQL_QUERY_ESC("SELECT id, userid, url, views_total, status, registered, last_locked, lock_reason
 FROM "._MYSQL_PREFIX."_surfbar_urls
 WHERE %s='%s'
 ORDER BY %s %s
@@ -231,7 +319,7 @@ ORDER BY %s %s
        return $lastUrlData;
 }
 // Registers an URL with the surfbar. You should have called SURFBAR_LOOKUP_BY_URL() first!
-function SURFBAR_REGISTER_URL ($url, $uid, $reward, $costs, $paymentId=0, $status="PENDING", $addMode="reg") {
+function SURFBAR_REGISTER_URL ($url, $uid, $paymentId=0, $status="PENDING", $addMode="reg") {
        global $_CONFIG;
 
        // Make sure by the user registered URLs are always pending
@@ -242,8 +330,6 @@ function SURFBAR_REGISTER_URL ($url, $uid, $reward, $costs, $paymentId=0, $statu
                'url'         => $url,
                'frametester' => FRAMETESTER($url),
                'uid'         => $uid,
-               'reward'      => $reward,
-               'costs'       => $costs,
                'status'      => $status
        );
 
@@ -252,8 +338,6 @@ function SURFBAR_REGISTER_URL ($url, $uid, $reward, $costs, $paymentId=0, $statu
 
        // Translate status, reward and costs
        $content['status'] = SURFBAR_TRANSLATE_STATUS($content['status']);
-       $content['reward'] = TRANSLATE_COMMA($content['reward']);
-       $content['costs']  = TRANSLATE_COMMA($content['costs']);
 
        // If in reg-mode we notify admin
        if (($addMode == "reg") || ($_CONFIG['surfbar_notify_admin_unlock'] == "Y")) {
@@ -276,12 +360,10 @@ function SURFBAR_INSERT_URL_BY_ARRAY ($urlData) {
        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, status) VALUES('%s', '%s', %s, %s, '%s')",
+       SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_surfbar_urls (userid, url, status) VALUES(%s, '%s', '%s')",
                array(
                        $uid,
                        $urlData['url'],
-                       (float)$urlData['reward'],
-                       (float)$urlData['costs'],
                        $urlData['status']
                ), __FILE__, __LINE__
        );
@@ -294,11 +376,14 @@ function SURFBAR_NOTIFY_ADMIN ($messageType, $content) {
        // Prepare template name
        $templateName = sprintf("admin_surfbar_%s", $messageType);
 
+       // Set default subject if following eval() wents wrong
+       $subject = ADMIN_SURFBAR_NOTIFY_DEFAULT_SUBJECT;
+
        // Prepare subject
        $eval = sprintf("\$subject = ADMIN_SURFBAR_NOTIFY_%s_SUBJECT;",
                strtoupper($messageType)
        );
-       eval($eval);
+       @eval($eval);
 
        // Send the notification out
        return SEND_ADMIN_NOTIFICATION($subject, $templateName, $content, $content['uid']);
@@ -313,11 +398,14 @@ function SURFBAR_NOTIFY_USER ($messageType, $content) {
        // Prepare template name
        $templateName = sprintf("member_surfbar_%s", $messageType);
 
+       // Set default subject if following eval() wents wrong
+       $subject = MEMBER_SURFBAR_NOTIFY_DEFAULT_SUBJECT;
+
        // Prepare subject
        $eval = sprintf("\$subject = MEMBER_SURFBAR_NOTIFY_%s_SUBJECT;",
                strtoupper($messageType)
        );
-       eval($eval);
+       @eval($eval);
 
        // Load template
        $mailText = LOAD_EMAIL_TEMPLATE($templateName, $content);
@@ -343,7 +431,7 @@ function SURFBAR_TRANSLATE_STATUS ($status) {
        return $statusTranslated;
 }
 // Determine reward
-function SURFBAR_DETERMINE_REWARD () {
+function SURFBAR_DETERMINE_REWARD ($onlyMin=false) {
        global $_CONFIG;
 
        // Static values are default
@@ -352,23 +440,18 @@ function SURFBAR_DETERMINE_REWARD () {
        // Do we have static or dynamic?
        if ($_CONFIG['surfbar_pay_model'] == "DYNAMIC") {
                // "Calculate" dynamic reward
-               $reward += SURFBAR_CALCULATE_DYNAMIC_ADD();
+               if ($onlyMin) {
+                       $reward += SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE();
+               } else {
+                       $reward += SURFBAR_CALCULATE_DYNAMIC_ADD();
+               }
        } // END - if
 
        // Return reward
        return $reward;
 }
-// "Calculate" dynamic add
-function SURFBAR_CALCULATE_DYNAMIC_ADD () {
-       // Get min/max values
-       $min = SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE();
-       $max = SURFBAR_CALCULATE_DYNAMIC_MAX_VALUE();
-
-       // "Calculate" dynamic part and return it
-       return mt_rand($min, $max);
-}
 // Determine costs
-function SURFBAR_DETERMINE_COSTS () {
+function SURFBAR_DETERMINE_COSTS ($onlyMin=false) {
        global $_CONFIG;
 
        // Static costs is default
@@ -377,12 +460,25 @@ function SURFBAR_DETERMINE_COSTS () {
        // Do we have static or dynamic?
        if ($_CONFIG['surfbar_pay_model'] == "DYNAMIC") {
                // "Calculate" dynamic costs
-               $costs += SURFBAR_CALCULATE_DYNAMIC_ADD();
+               if ($onlyMin) {
+                       $costs += SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE();
+               } else {
+                       $costs += SURFBAR_CALCULATE_DYNAMIC_ADD();
+               }
        } // END - if
 
        // Return costs
        return $costs;
 }
+// "Calculate" dynamic add
+function SURFBAR_CALCULATE_DYNAMIC_ADD () {
+       // Get min/max values
+       $min = SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE();
+       $max = SURFBAR_CALCULATE_DYNAMIC_MAX_VALUE();
+
+       // "Calculate" dynamic part and return it
+       return mt_rand($min, $max);
+}
 // Determine right template name
 function SURFBAR_DETERMINE_TEMPLATE_NAME() {
        // Default is the frameset
@@ -446,8 +542,8 @@ LIMIT 1",
        // Return result
        return $isFull;
 }
-// Get total amount of URLs of given status for current user or of CONFIRMED URLs by default
-function SURFBAR_GET_TOTAL_URLS ($status="CONFIRMED", $excludeUserId="") {
+// Get total amount of URLs of given status for current user or of ACTIVE URLs by default
+function SURFBAR_GET_TOTAL_URLS ($status="ACTIVE", $excludeUserId="") {
        // Determine depleted user account
        $UIDs = SURFBAR_DETERMINE_DEPLETED_USERIDS();
 
@@ -694,14 +790,14 @@ 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 NOT IN (%s,0) AND status='CONFIRMED'
+WHERE userid NOT IN (%s,0) AND status='ACTIVE'
 GROUP BY userid
 ORDER BY userid ASC",
                        array($GLOBALS['userid']), __FILE__, __LINE__);
        } else {
                // Get all userid
                $result = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_surfbar_urls
-WHERE status='CONFIRMED'
+WHERE status='ACTIVE'
 GROUP BY userid
 ORDER BY userid ASC", __FILE__, __LINE__);
        }
@@ -766,9 +862,13 @@ function SURFBAR_DETERMINE_WAIT_TIME () {
        return $time;
 }
 // Changes the status of an URL from given to other
-function SURFBAR_CHANGE_STATUS ($urlId, $prevStatus, $newStatus) {
-       // Get URL data for status comparison
-       $data = SURFBAR_GET_URL_DATA($urlId);
+function SURFBAR_CHANGE_STATUS ($urlId, $prevStatus, $newStatus, $data=array()) {
+       global $_CONFIG;
+
+       // Get URL data for status comparison if missing
+       if (count($data) == 0) {
+               $data = SURFBAR_GET_URL_DATA($urlId);
+       } // END - if
 
        // Is the status like prevStatus is saying?
        if ($data[$urlId]['status'] != $prevStatus) {
@@ -776,9 +876,12 @@ function SURFBAR_CHANGE_STATUS ($urlId, $prevStatus, $newStatus) {
                return false;
        } // END - if
 
+
        // Update the status now
-       SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_surfbar_urls SET status='%s' WHERE id=%s LIMIT 1",
-               array($newStatus, bigintval($urlId)), __FILE__, __LINE__);
+       // ---------------------- Commented out for debugging member actions! -----------------------
+       //SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_surfbar_urls SET status='%s' WHERE id=%s LIMIT 1",
+       //      array($newStatus, bigintval($urlId)), __FILE__, __LINE__);
+       // ---------------------- Commented out for debugging member actions! -----------------------
 
        // Was that fine?
        if (SQL_AFFECTEDROWS() != 1) {
@@ -789,8 +892,8 @@ function SURFBAR_CHANGE_STATUS ($urlId, $prevStatus, $newStatus) {
        // Prepare content for notification routines
        $data[$urlId]['uid']         = $data[$urlId]['userid'];
        $data[$urlId]['frametester'] = FRAMETESTER($data[$urlId]['url']);
-       $data[$urlId]['reward']      = TRANSLATE_COMMA($data[$urlId]['reward']);
-       $data[$urlId]['costs']       = TRANSLATE_COMMA($data[$urlId]['costs']);
+       $data[$urlId]['reward']      = TRANSLATE_COMMA($_CONFIG['surfbar_static_reward']);
+       $data[$urlId]['costs']       = TRANSLATE_COMMA($_CONFIG['surfbar_static_costs']);
        $data[$urlId]['status']      = SURFBAR_TRANSLATE_STATUS($newStatus);
        $data[$urlId]['registered']  = MAKE_DATETIME($data[$urlId]['registered'], "2");
        $newStatus = strtolower($newStatus);
@@ -824,10 +927,10 @@ function SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE () {
        $addon += abs(log($onlineUsers / $totalUsers + 1) * $percent * $totalUsers);
 
        // Get total URLs
-       $totalUrls = SURFBAR_GET_TOTAL_URLS("CONFIRMED", "0");
+       $totalUrls = SURFBAR_GET_TOTAL_URLS("ACTIVE", "0");
 
        // Get user's total URLs
-       $userUrls = SURFBAR_GET_TOTAL_USER_URLS(0, "CONFIRMED");
+       $userUrls = SURFBAR_GET_TOTAL_USER_URLS(0, "ACTIVE");
 
        // Calculate addon
        if ($totalUrls > 0) {
@@ -859,7 +962,7 @@ function SURFBAR_CALCULATE_DYNAMIC_MAX_VALUE () {
        $addon += abs($max * $percent * $totalUsers);
 
        // Get total URLs
-       $totalUrls = SURFBAR_GET_TOTAL_URLS("CONFIRMED", "0");
+       $totalUrls = SURFBAR_GET_TOTAL_URLS("ACTIVE", "0");
 
        // Calculate addon
        $addon += abs($max * $percent * $totalUrls);
@@ -946,7 +1049,7 @@ LEFT JOIN "._MYSQL_PREFIX."_surfbar_salts AS sbs
 ON sbu.id=sbs.url_id
 LEFT JOIN "._MYSQL_PREFIX."_surfbar_locks AS l
 ON sbu.id=l.url_id
-WHERE sbu.userid NOT IN (".implode(",", $UIDs).") AND sbu.status='CONFIRMED'".$ADD."
+WHERE sbu.userid NOT IN (".implode(",", $UIDs).") AND sbu.status='ACTIVE'".$ADD."
 GROUP BY sbu.id", __FILE__, __LINE__);
 
        // Log last query
@@ -967,7 +1070,7 @@ function SURFBAR_GET_USER_URLS () {
        $URLs = array();
 
        // Begin the query
-       $result = SQL_QUERY_ESC("SELECT u.id, u.url, u.views_total, u.status, UNIX_TIMESTAMP(u.registered) AS registered, UNIX_TIMESTAMP(u.last_locked) AS last_locked, u.lock_reason AS lock_reason
+       $result = SQL_QUERY_ESC("SELECT u.id, u.userid, u.url, u.views_total, u.status, UNIX_TIMESTAMP(u.registered) AS registered, UNIX_TIMESTAMP(u.last_locked) AS last_locked, u.lock_reason AS lock_reason
 FROM "._MYSQL_PREFIX."_surfbar_urls AS u
 WHERE u.userid=%s AND u.status != 'DELETED'
 ORDER BY u.id ASC",
@@ -1059,7 +1162,7 @@ LEFT JOIN "._MYSQL_PREFIX."_surfbar_salts AS sbs
 ON sbu.id=sbs.url_id
 LEFT JOIN "._MYSQL_PREFIX."_surfbar_locks AS l
 ON sbu.id=l.url_id
-WHERE sbu.userid NOT IN (".implode(",", $UIDs).") AND sbu.status='CONFIRMED'".$ADD."
+WHERE sbu.userid NOT IN (".implode(",", $UIDs).") AND sbu.status='ACTIVE'".$ADD."
 GROUP BY sbu.id
 ORDER BY l.last_surfed ASC, sbu.id ASC
 LIMIT %s,1",
@@ -1073,7 +1176,7 @@ LEFT JOIN "._MYSQL_PREFIX."_surfbar_salts AS sbs
 ON sbu.id=sbs.url_id
 LEFT JOIN "._MYSQL_PREFIX."_surfbar_locks AS l
 ON sbu.id=l.url_id
-WHERE sbu.userid != %s AND sbu.status='CONFIRMED' AND sbu.id=%s
+WHERE sbu.userid != %s AND sbu.status='ACTIVE' AND sbu.id=%s
 LIMIT 1",
                        array($GLOBALS['userid'], bigintval($urlId)), __FILE__, __LINE__
                );
index 14f5067..2c3dffe 100644 (file)
@@ -585,7 +585,7 @@ function ADD_ADMIN_MENU($act, $wht, $return=false) {
        }
 }
 //
-function ADD_MEMBER_SELECTION_BOX ($def="0", $add_all=false, $return=false, $none=false)
+function ADD_MEMBER_SELECTION_BOX ($def="0", $add_all=false, $return=false, $none=false, $field="userid")
 {
        // Output selection form with all confirmed user accounts listed
        $result = SQL_QUERY("SELECT userid, surname, family FROM "._MYSQL_PREFIX."_user_data ORDER BY userid", __FILE__, __LINE__);
@@ -614,8 +614,8 @@ function ADD_MEMBER_SELECTION_BOX ($def="0", $add_all=false, $return=false, $non
                // Load template
                LOAD_TEMPLATE("admin_member_selection_box", false, $GLOBALS['what']);
        } else {
-               // Return content
-               return "<select name=\"userid\" size=\"1\">\n".$OUT."</select>\n";
+               // Return content in selection frame
+               return "<select class=\"admin_select\" name=\"".$field."\" size=\"1\">\n".$OUT."</select>\n";
        }
 }
 //
@@ -946,14 +946,90 @@ function ADMIN_BUILD_LIST ($listType, $IDs, $table, $columns, $filterFunctions,
        // Load master template
        LOAD_TEMPLATE("admin_".$listType."_".$table."", false, $OUT);
 }
+// Change status of "build" list
+function ADMIN_BUILD_STATUS_HANDLER ($mode, $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn, $statusArray) {
+       // All valid entries? (We hope so here!)
+       if ((is_array($IDs)) && (count($IDs) > 0) && (count($columns) == count($filterFunctions)) && (count($columns) == count($extraValues)) && (count($statusArray) > 0)) {
+               // "Walk" through all entries
+               foreach ($IDs as $id => $sel) {
+                       // Construct SQL query
+                       $SQL = "UPDATE "._MYSQL_PREFIX."_".$table." SET";
+
+                       // Load data of entry
+                       $result = SQL_QUERY_ESC("SELECT * FROM "._MYSQL_PREFIX."_%s WHERE %s=%s LIMIT 1",
+                               array($table, $idColumn, $id), __FILE__, __LINE__);
+
+                       // Fetch the data
+                       $content = SQL_FETCHARRAY($result);
+
+                       // Free the result
+                       SQL_FREERESULT($result);
+
+                       // Add all status entries (e.g. status column last_updated or so)
+                       $newStatus = "UNKNOWN";
+                       $oldStatus = "UNKNOWN";
+                       $statusColumn = "unknown";
+                       foreach ($statusArray as $column => $statusInfo) {
+                               // Does the entry exist?
+                               if ((isset($content[$column])) && (isset($statusInfo[$content[$column]]))) {
+                                       // Add these entries for update
+                                       $SQL .= sprintf(" %s='%s',", SQL_ESCAPE($column), SQL_ESCAPE($statusInfo[$content[$column]]));
+
+                                       // Remember status
+                                       if ($statusColumn == "unknown") {
+                                               // Always (!!!) change status column first!
+                                               $oldStatus = $content[$column];
+                                               $newStatus = $statusInfo[$oldStatus];
+                                               $statusColumn = $column;
+                                       } // END - if
+                               } elseif (isset($content[$column])) {
+                                       // Unfinished!
+                                       mxchange_die("{--".__FUNCTION__."--}:UNFINISHED: id={$id}/{$column}[".gettype($statusInfo)."] = {$content[$column]}");
+                               }
+                       } // END - foreach
+
+                       // Add other columns as well
+                       foreach ($_POST as $key => $entries) {
+                               // Skip id, raw userid and 'do_lock'
+                               if (!in_array($key, array($idColumn, 'uid_raw', 'do_lock'))) {
+                                       // Are there brackets () at the end?
+                                       if (substr($entries[$id], -2, 2) == "()") {
+                                               // Direct SQL command found
+                                               $SQL .= sprintf(" %s=%s,", SQL_ESCAPE($key), SQL_ESCAPE($entries[$id]));
+                                       } else {
+                                               // Add regular entry
+                                               $SQL .= sprintf(" %s='%s',", SQL_ESCAPE($key), SQL_ESCAPE($entries[$id]));
+                                       }
+                               } // END - if
+                       } // END - if
+
+                       // Finish SQL statement
+                       $SQL = substr($SQL, 0, -1) . " WHERE ".$idColumn."=".bigintval($id)." AND ".$statusColumn."='".$oldStatus."' LIMIT 1";
+
+                       // Run the SQL
+                       SQL_QUERY($SQL, __FILE__, __LINE__);
+
+                       // Do we have an URL?
+                       if (isset($content['url'])) {
+                               // Then add a framekiller test as well
+                               $content['frametester'] = FRAMETESTER($content['url']);
+                       } // END - if
+
+                       // Send "build mails" out
+                       ADMIN_SEND_BUILD_MAILS($mode, $table, $content, $id, $statusInfo[$content[$column]]);
+               } // END - foreach
+       } // END - if
+}
 // Delete rows by given ID numbers
 function ADMIN_DELETE_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunctions=array(), $extraValues=array(), $deleteNow=false, $idColumn="id", $userIdColumn="userid") {
        // All valid entries? (We hope so here!)
        if ((is_array($IDs)) && (count($IDs) > 0) && (count($columns) == count($filterFunctions)) && (count($columns) == count($extraValues))) {
                // Shall we delete here or list for deletion?
                if ($deleteNow) {
-                       // Delete them
+                       // The base SQL command:
                        $SQL = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_%s WHERE %s IN (%s)";
+
+                       // Delete them all
                        $idList = "";
                        foreach ($IDs as $id => $sel) {
                                // Is there a userid?
@@ -974,7 +1050,7 @@ function ADMIN_DELETE_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFu
 
                                // Add id number
                                $idList .= $id.",";
-                       } // END - if
+                       } // END - foreach
 
                        // Run the query
                        SQL_QUERY($SQL, array($table, $idColumn, substr($idList, 0, -1)), __FILE__, __LINE__);
@@ -1040,7 +1116,9 @@ function ADMIN_EDIT_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunc
                                                // Then add a framekiller test as well
                                                $content['frametester'] = FRAMETESTER($content[$key]);
                                        } // END - if
-                               }
+                               } // END - foreach
+
+                               // Finish SQL command
                                $SQL = substr($SQL, 0, -1) . " WHERE ".$idColumn."=".bigintval($id)." LIMIT 1";
 
                                // Run this query
@@ -1085,79 +1163,27 @@ function ADMIN_LOCK_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunc
                // Shall we un-/lock here or list for locking?
                if ($lockNow) {
                        // Un-/lock entries
-                       foreach ($IDs as $id => $sel) {
-                               // Construct SQL query
-                               $SQL = "UPDATE "._MYSQL_PREFIX."_".$table." SET";
-
-                               // Load data of entry
-                               $result = SQL_QUERY_ESC("SELECT * FROM "._MYSQL_PREFIX."_%s WHERE %s=%s LIMIT 1",
-                                       array($table, $idColumn, $id), __FILE__, __LINE__);
-
-                               // Fetch the data
-                               $content = SQL_FETCHARRAY($result);
-
-                               // Free the result
-                               SQL_FREERESULT($result);
-
-                               // Add all status entries (e.g. status column last_updated or so)
-                               $newStatus = "UNKNOWN";
-                               $oldStatus = "UNKNOWN";
-                               $statusColumn = "unknown";
-                               foreach ($statusArray as $column => $statusInfo) {
-                                       // Does the entry exist?
-                                       if ((isset($content[$column])) && (isset($statusInfo[$content[$column]]))) {
-                                               // Add these entries for update
-                                               $SQL .= sprintf(" %s='%s',", SQL_ESCAPE($column), SQL_ESCAPE($statusInfo[$content[$column]]));
-
-                                               // Remember status
-                                               if ($statusColumn == "unknown") {
-                                                       // Always (!!!) change status column first!
-                                                       $oldStatus = $content[$column];
-                                                       $newStatus = $statusInfo[$oldStatus];
-                                                       $statusColumn = $column;
-                                               } // END - if
-                                       } elseif (isset($content[$column])) {
-                                               // Unfinished!
-                                               die("UNFINISHED: {$column}[".gettype($statusInfo)."] = {$content[$column]}");
-                                       }
-                               } // END - foreach
-
-                               // Add other columns as well
-                               foreach ($_POST as $key => $entries) {
-                                       // Skip id, raw userid and 'do_lock'
-                                       if (!in_array($key, array($idColumn, 'uid_raw', 'do_lock'))) {
-                                               // Are there brackets () at the end?
-                                               if (substr($entries[$id], -2, 2) == "()") {
-                                                       // Direct SQL command found
-                                                       $SQL .= sprintf(" %s=%s,", SQL_ESCAPE($key), SQL_ESCAPE($entries[$id]));
-                                               } else {
-                                                       // Add regular entry
-                                                       $SQL .= sprintf(" %s='%s',", SQL_ESCAPE($key), SQL_ESCAPE($entries[$id]));
-                                               }
-                                       } // END - if
-                               } // END - if
-
-                               // Finish SQL statement
-                               $SQL = substr($SQL, 0, -1) . " WHERE ".$idColumn."=".bigintval($id)." AND ".$statusColumn."='".$oldStatus."' LIMIT 1";
-
-                               // Run the SQL
-                               SQL_QUERY($SQL, __FILE__, __LINE__);
-
-                               // Do we have an URL?
-                               if (isset($content['url'])) {
-                                       // Then add a framekiller test as well
-                                       $content['frametester'] = FRAMETESTER($content['url']);
-                               } // END - if
-
-                               // Send "build mails" out
-                               ADMIN_SEND_BUILD_MAILS("lock", $table, $content, $id, $statusInfo[$content[$column]]);
-                       } // END - if
+                       ADMIN_BUILD_STATUS_HANDLER("lock", $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn);
                } else {
                        // List for editing
                        ADMIN_BUILD_LIST("lock", $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn);
                }
        } // END - if
 }
+// Undelete rows by given ID numbers
+function ADMIN_UNDELETE_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunctions=array(), $extraValues=array(), $statusArray=array(), $lockNow=false, $idColumn="id", $userIdColumn="userid") {
+       // All valid entries? (We hope so here!)
+       if ((is_array($IDs)) && (count($IDs) > 0) && (count($columns) == count($filterFunctions)) && (count($columns) == count($extraValues)) && ((!$lockNow) || (count($statusArray) == 1))) {
+               // Shall we un-/lock here or list for locking?
+               if ($lockNow) {
+                       // Undelete entries
+                       ADMIN_BUILD_STATUS_HANDLER("undelete", $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn, $statusArray);
+               } else {
+                       // List for editing
+                       ADMIN_BUILD_LIST("undelete", $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn);
+               }
+       } // END - if
+}
 // Checks proxy settins by fetching check-updates3.php from www.mxchange.org
 function ADMIN_TEST_PROXY_SETTINGS ($settingsArray) {
        global $_CONFIG;
index f624247..05f9215 100644 (file)
@@ -160,7 +160,7 @@ if (isset($_POST['ok']))
        }
 
        // Add data to constant __MEMBER_SELECTION
-       ADD_MEMBER_SELECTION_BOX($_CONFIG['beg_uid'], false, true, true);
+       define('__MEMBER_SELECTION', ADD_MEMBER_SELECTION_BOX($_CONFIG['beg_uid'], false, true, true, "beg_uid"));
 
        // Load form template
        LOAD_TEMPLATE("admin_config_beg");
index 5c4b671..f979a22 100644 (file)
@@ -86,7 +86,7 @@ if (isset($_POST['ok']))
        define('__TLINES_VALUE', $_CONFIG['bonus_lines']);
 
        // Transfer options to template __MEMBER_SELECTION
-       ADD_MEMBER_SELECTION_BOX($_CONFIG['bonus_uid'], false, true, true);
+       define('__MEMBER_SELECTION', ADD_MEMBER_SELECTION_BOX($_CONFIG['bonus_uid'], false, true, true));
 
        // Initialize array for the points list
        $RANKS = explode(";", $_CONFIG['bonus_ranks']);
index c9b54dd..88110e3 100644 (file)
@@ -124,7 +124,7 @@ if (isset($_POST['ok'])) {
        }
 
        // Transfer options (!!!) to __MEMBER_SELECTION
-       ADD_MEMBER_SELECTION_BOX($_CONFIG['doubler_uid'], false, true, true);
+       define('__MEMBER_SELECTION', ADD_MEMBER_SELECTION_BOX($_CONFIG['doubler_uid'], false, true, true, "doubler_uid"));
 
        // Number of rows to display (option lines!!!)
        define('__DOUBLER_DISPLAY_NEW', ADD_OPTION_LINES("/ARRAY/", array(5,10,20,30,40,50,100), array(5,10,20,30,40,50,100), $_CONFIG['doubler_display_new']));
index 46b26de..22ca2ee 100644 (file)
@@ -45,7 +45,7 @@ if (isset($_POST['ok'])) {
        ADMIN_SAVE_SETTINGS($_POST);
 } else {
        // Prepare contants for the template
-       ADD_MEMBER_SELECTION_BOX($_CONFIG['def_refid'], false, true, true);
+       define('__MEMBER_SELECTION', ADD_MEMBER_SELECTION_BOX($_CONFIG['def_refid'], false, true, true, "def_refid"));
 
        switch ($_CONFIG['refid_target'])       {
                case "index":    define('__DEF_RT_INDEX', " selected=\"selected\""); define('__DEF_RT_REGISTER', "");          break;
index 8533ba0..409b105 100644 (file)
@@ -63,7 +63,9 @@ if (isset($_POST['ok'])) {
                // @TODO Rewrite this to tiny selection boxes
                'surfbar_stats_reload'    => $_CONFIG['surfbar_stats_reload'],
                // @TODO Rewrite this to tiny selection boxes
-               'surfbar_purge_deleted'   => $_CONFIG['surfbar_purge_deleted']
+               'surfbar_purge_deleted'   => $_CONFIG['surfbar_purge_deleted'],
+               // @TODO Rewrite this to tiny selection boxes
+               'surfbar_purge_migrated'  => $_CONFIG['surfbar_purge_migrated']
        );
 
        // Prepare payment model for template
index c4c9760..9d1c039 100644 (file)
@@ -53,7 +53,7 @@ if (isset($_POST['ok']))
        define('__CFG_TITLE_RIGHT'    , $_CONFIG['title_right']);
        define('__CFG_TITLE_DECOS'    , ADD_SELECTION("yn", $_CONFIG['enable_title_deco'], "enable_title_deco"));
        define('__CFG_TITLE_MOD_SHOW' , ADD_SELECTION("yn", $_CONFIG['enable_mod_title'] , "enable_mod_title" ));
-       define('__CFG_TITLE_WHAT_SHOW', ADD_SELECTION("yn", $_CONFIG['title_what_show']  , "enable_what_title"));
+       define('__CFG_TITLE_WHAT_SHOW', ADD_SELECTION("yn", $_CONFIG['enable_what_title'], "enable_what_title"));
 
        // Load template
        LOAD_TEMPLATE("admin_config_title");
index 9cf67c0..b1c9f5a 100644 (file)
@@ -59,9 +59,9 @@ if (isset($_POST['edit'])) {
        ADMIN_EDIT_ENTRIES_CONFIRM(
                $_POST['id'],
                "surfbar_urls",
-               array("", ""),
-               array('reward' => "REVERT_COMMA", 'costs' => "REVERT_COMMA"),
-               array('reward' => "", 'costs' => ""),
+               array(),
+               array(),
+               array(),
                true
        );
 } elseif (isset($_POST['delete'])) {
@@ -95,12 +95,12 @@ if (isset($_POST['edit'])) {
                array(),
                array(),
                array(),
-               array("status" => array("CONFIRMED" => "LOCKED", "LOCKED" => "CONFIRMED")),
+               array("status" => array("ACTIVE" => "LOCKED", "LOCKED" => "ACTIVE")),
                true
        );
 } elseif (isset($_POST['undelete'])) {
        // Undelete selected URLs. This does only work for deleted URLs... ;-)
-       ADMIN_LOCK_ENTRIES_CONFIRM(
+       ADMIN_UNDELETE_ENTRIES_CONFIRM(
                $_POST['id'],
                "surfbar_urls",
                array("id", "userid", "url", "registered", "status"),
@@ -110,13 +110,13 @@ if (isset($_POST['edit'])) {
        $show = false;
 } elseif (isset($_POST['do_undelete'])) {
        // Undelete selected URLs. This does only work for deleted URLs... ;-)
-       ADMIN_LOCK_ENTRIES_CONFIRM(
+       ADMIN_UNDELETE_ENTRIES_CONFIRM(
                $_POST['id'],
                "surfbar_urls",
                array(),
                array(),
                array(),
-               array("status" => array("DELETED" => "CONFIRMED"),
+               array("status" => array("DELETED" => "ACTIVE")),
                true
        );
 }
@@ -125,7 +125,7 @@ if (isset($_POST['edit'])) {
 if (!$show) return false;
 
 // List all URLs
-$result = SQL_QUERY("SELECT id, userid, url, reward, costs, views_total, status, UNIX_TIMESTAMP(registered) AS registered, UNIX_TIMESTAMP(last_locked) AS last_locked, lock_reason
+$result = SQL_QUERY("SELECT id, userid, url, views_total, status, UNIX_TIMESTAMP(registered) AS registered, UNIX_TIMESTAMP(last_locked) AS last_locked, lock_reason
 FROM "._MYSQL_PREFIX."_surfbar_urls
 ORDER BY id ASC", __FILE__, __LINE__);
 
@@ -138,8 +138,6 @@ if (SQL_NUMROWS($result) > 0) {
                $content['sw']          = $SW;
                $content['userid']      = ADMIN_USER_PROFILE_LINK($content['userid']);
                $content['url']         = FRAMETESTER($content['url']);
-               $content['reward']      = TRANSLATE_COMMA($content['reward']);
-               $content['costs']       = TRANSLATE_COMMA($content['costs']);
                $content['views_total'] = TRANSLATE_COMMA($content['views_total']);
                $content['status']      = SURFBAR_TRANSLATE_STATUS($content['status']);
                $content['registered']  = MAKE_DATETIME($content['registered'], 2);
index 1d68063..dd2eac0 100644 (file)
@@ -77,7 +77,7 @@ INNER JOIN "._MYSQL_PREFIX."_payments AS pay
 ON po.payment_id=pay.id
 WHERE po.id=%s
 LIMIT 1",
-                                        array($id), __FILE__, __LINE__);
+                                               array($id), __FILE__, __LINE__);
 
                                        // Load data
                                        $DATA = SQL_FETCHARRAY($result);
index 4bae745..b112215 100644 (file)
@@ -62,7 +62,7 @@ if ((isset($_POST['unlock'])) && (is_array($_POST['id'])) && (count($_POST['id']
 }
 
 // List all URLs
-$result = SQL_QUERY("SELECT id, userid, url, reward, costs, UNIX_TIMESTAMP(registered) AS registered
+$result = SQL_QUERY("SELECT id, userid, url, UNIX_TIMESTAMP(registered) AS registered
 FROM "._MYSQL_PREFIX."_surfbar_urls
 WHERE status='PENDING'
 ORDER BY id ASC", __FILE__, __LINE__);
@@ -76,8 +76,6 @@ if (SQL_NUMROWS($result) > 0) {
                $content['sw']         = $SW;
                $content['userid']     = ADMIN_USER_PROFILE_LINK($content['userid']);
                $content['url']        = FRAMETESTER($content['url']);
-               $content['costs']      = TRANSLATE_COMMA($content['costs']);
-               $content['reward']     = TRANSLATE_COMMA($content['reward']);
                $content['registered'] = MAKE_DATETIME($content['registered'], 2);
 
                // Load row template
index f605ae5..4e3f4f3 100644 (file)
@@ -54,8 +54,7 @@ if (!empty($_GET['order'])) {
                        // This fixes a white page
                        $_POST['url'] = $url;
 
-                       // Update his login data
-                       UPDATE_LOGIN_DATA();
+                       // Mode is member
                        $MODE = "member";
                } else {
                        // Matching line not found!
index 528c3d2..e2fa03b 100644 (file)
@@ -69,8 +69,8 @@ if (!SURFBAR_IF_USER_BOOK_MORE_URLS()) {
 } else {
        // Prepare some content
        $content = array(
-               'reward'     => TRANSLATE_COMMA(SURFBAR_DETERMINE_REWARD()),
-               'costs'      => TRANSLATE_COMMA(SURFBAR_DETERMINE_COSTS()),
+               'reward'     => TRANSLATE_COMMA(SURFBAR_DETERMINE_REWARD(true)),
+               'costs'      => TRANSLATE_COMMA(SURFBAR_DETERMINE_COSTS(true)),
                'max_order'  => $_CONFIG['surfbar_max_order'],
                'curr_order' => SURFBAR_GET_TOTAL_USER_URLS()
        );
index 05657ff..8879d19 100644 (file)
@@ -48,7 +48,7 @@ $URLs = SURFBAR_GET_USER_URLS();
 // Are there entries or form is submitted?
 if ((isset($_POST['ok'])) && (isset($_POST['action'])) && (isset($_POST['id']))) {
        // Process the form
-       if (SURFBAR_MEMBER_DO_FORM($_POST)) {
+       if (SURFBAR_MEMBER_DO_FORM($_POST, $URLs)) {
                // Action performed
                LOAD_TEMPLATE("admin_settings_saved", false, MEMBER_SURFBAR_ACTION_DONE);
        } else {
index a5f8103..5730b73 100644 (file)
@@ -59,7 +59,7 @@ if ($_CONFIG['surfbar_pay_model'] == "DYNAMIC") {
        // Total URLs
        $content = array(
                'surfbar_dynamic_percent' => TRANSLATE_COMMA($_CONFIG['surfbar_dynamic_percent']),
-               'surfbar_total_urls'      => SURFBAR_GET_TOTAL_URLS("CONFIRMED", "0"),
+               'surfbar_total_urls'      => SURFBAR_GET_TOTAL_URLS("ACTIVE", "0"),
                'surfbar_user_urls'       => SURFBAR_GET_TOTAL_USER_URLS(),
                'surfbar_total_online'    => SURFBAR_DETERMINE_TOTAL_ONLINE(),
                'surfbar_total_users'     => TRANSLATE_COMMA(GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true)),
index c0164a5..110ae78 100644 (file)
@@ -68,9 +68,6 @@ if (empty($URL)) {
 
        // Finally is the entry valid?
        if (SQL_AFFECTEDROWS() == 1) {
-               // Update his login data
-               UPDATE_LOGIN_DATA();
-
                // Load personal data...
                $result = SQL_QUERY_ESC("SELECT gender, surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
                 array($GLOBALS['userid']), __FILE__, __LINE__);
index 2774a3b..5433a77 100644 (file)
@@ -583,10 +583,16 @@ function WHAT_IS_VALID($act, $wht, $type="guest")
 //
 function IS_MEMBER()
 {
-       global $status, $LAST;
+       global $status, $LAST, $cacheArray;
        if (!is_array($LAST)) $LAST = array();
        $ret = false;
 
+       // is the cache entry there?
+       if (isset($cacheArray['is_member'])) {
+               // Then return it
+               return $cacheArray['is_member'];
+       } // END - if
+
        // Fix "deleted" cookies first
        FIX_DELETED_COOKIES(array('userid', 'u_hash', 'lifetime'));
 
@@ -639,29 +645,26 @@ function IS_MEMBER()
                unset($GLOBALS['userid']);
        }
 
+       // Cache status
+       $cacheArray['is_member'] = $ret;
+
        // Return status
        return $ret;
 }
 //
-function UPDATE_LOGIN_DATA ($UPDATE=true) {
+function UPDATE_LOGIN_DATA () {
        global $LAST, $_CONFIG;
        if (!is_array($LAST)) $LAST = array();
 
-       // Are the required cookies set?
-       if ((!isset($GLOBALS['userid'])) || (!isSessionVariableSet('u_hash')) || (!isSessionVariableSet('lifetime'))) {
-               // Nope, then return here to caller function
-               return false;
-       } else {
-               // Secure user ID
-               $GLOBALS['userid'] = bigintval(get_session('userid'));
-       }
+       // Recheck if logged in
+       if (!IS_MEMBER()) return false;
+
+       // Secure user ID
+       $GLOBALS['userid'] = bigintval(get_session('userid'));
 
        // Extract last online time (life) and how long is auto-login valid (time)
        $newl = time() + bigintval(get_session('lifetime'));
 
-       // Recheck if logged in
-       if (!IS_MEMBER()) return false;
-
        // Load last module and last online time
        $result = SQL_QUERY_ESC("SELECT last_module, last_online FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
index 509e04b..f5d6a9b 100644 (file)
@@ -56,7 +56,7 @@ if ($HTML_EXT) {
 }
 
 // Reset variables
-$cnt = 0; $cnt2 = 0; $LAST_SENT_ID = 0; $cnt_back = array("0"); $points_BACK = array("0");
+$cnt = 0; $cnt2 = 0; $LAST_SENT_ID = 0; $cnt_back = array("0"); $pointsBack = array("0");
 if (SQL_NUMROWS($result_main) > 0)
 {
        while ($DATA = SQL_FETCHROW($result_main))
@@ -273,7 +273,7 @@ if (SQL_NUMROWS($result_main) > 0)
                                        {
                                                if ($uid > 0)
                                                {
-                                                       // User does not exists, pay points back
+                                                       // User does exist so pay the points back
                                                        $points = GET_PAY_POINTS($DATA[5]);
                                                        $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_points SET points=points+%s WHERE userid=%s AND ref_depth=0 LIMIT 1",
                                                         array($points, bigintval($DATA[1])), __FILE__, __LINE__);
@@ -287,7 +287,7 @@ if (SQL_NUMROWS($result_main) > 0)
                                                        }
 
                                                        // Add points together and remove user
-                                                       $points_BACK[$DATA[1]] += $points;
+                                                       $pointsBack[$DATA[1]] += $points;
                                                }
                                                $cnt_back[$DATA[1]]++;
                                        }
@@ -301,8 +301,8 @@ if (SQL_NUMROWS($result_main) > 0)
                        }
                }
        }
-       if ((sizeof($points_BACK) > 0) && (!empty($points_BACK[0]))) {
-               foreach ($points_BACK as $uid => $PB) {
+       if ((sizeof($pointsBack) > 0) && (!empty($pointsBack[0]))) {
+               foreach ($pointsBack as $uid => $PB) {
                        // Add points only when we have points left to add and a valid user ID
                        if (($PB > 0) && ($uid > 0)) {
                                // Prepare content
index 3e394cc..4cad098 100644 (file)
  * Short description : Installation script. Please delete this file     *
  *           after successfully installation or ANYONE can re-setup     *
  *           your mail exchange script!!!                               *
- *                                                                      *
- *           First of all setup the base URL.                           *
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Installationsscript. Bitte loeschen Sie diese    *
  *           Datei nach der fertiggestellten Installation oder JEDER    *
  *           kann Ihr Mailtausch-Script neu einstellen!!!               *
- *                                                                      *
- *           Als erstes sollten Sie die Basis-URL einstellen.           *
  * -------------------------------------------------------------------- *
  *                                                                      *
  * -------------------------------------------------------------------- *
@@ -53,7 +49,8 @@ require ("inc/libs/security_functions.php");
 
 // Init "action" and "what"
 global $what, $action;
-$GLOBALS['what'] = ""; $GLOBALS['action'] = "";
+$GLOBALS['what']   = "";
+$GLOBALS['action'] = "";
 
 // Set module
 $GLOBALS['module'] = "install";
@@ -65,16 +62,15 @@ require ("inc/config.php");
 require (PATH."inc/header.php");
 
 // Reload page to page=welcome when it is not specified
-if (!isset($_GET['page']))
-{
+if (!isset($_GET['page'])) {
        LOAD_URL("install.php?page=welcome");
-}
+} // END - if
 
 // Already installed?
 if ((isBooleanConstantAndTrue('mxchange_installed')) && (isBooleanConstantAndTrue('admin_registered'))) {
        // Add fatal message
        ADD_FATAL(ALREADY_INSTALLED);
-}
+} // END - if
 
 // Does something goes wrong?
 if ((sizeof($FATAL == 0)) && (empty($FATAL[0]))) {
index 746217a..fcb310d 100644 (file)
@@ -111,8 +111,13 @@ if (isBooleanConstantAndTrue('mxchange_installed'))
                        if (SQL_NUMROWS($result) == 1) {
                                // Load data
                                list($pool, $URL, $EXTRA_TITLE) = SQL_FETCHROW($result);
+
+                               // Free result
                                SQL_FREERESULT($result);
 
+                               // Compile extra title
+                               $EXTRA_TITLE = COMPILE_CODE($EXTRA_TITLE);
+
                                // Is the user's ID unlocked?
                                $result = SQL_QUERY_ESC("SELECT status, gender, surname, family FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
                                 array($url_uid), __FILE__, __LINE__);
index b24aee4..72cd694 100644 (file)
@@ -67,9 +67,6 @@ if (IS_MEMBER()) {
                list($s, $f) = SQL_FETCHROW($result);
                $username = $s." ".$f;
 
-               // Update only cookies and no login data!
-               UPDATE_LOGIN_DATA(false);
-
                // Additionally admin?
                if (IS_ADMIN()) {
                        // Add it
index b27cb31..87d0352 100644 (file)
@@ -8,10 +8,6 @@ Gebuchte URL: $content[url]
 ------------------------------------------
 User-ID: $content[userid]
 ------------------------------------------
-Kosten/Aufruf: $content[costs] {!POINTS!}
-------------------------------------------
-Verg&uuml;tung/Aufruf: $content[reward] {!POINTS!}
-------------------------------------------
 Status: $content[status]
 ------------------------------------------
 Aufrufe gesamt: $content[views_total]
index f04fdcb..6474ad6 100644 (file)
@@ -13,12 +13,6 @@ $content[frametester]
 Alte User-ID: $DATA[userid]
 Neue User-ID: $content[userid]
 ------------------------------------------
-Alte Kosten/Aufruf: $DATA[costs] {!POINTS!}
-Neue Kosten/Aufruf: $content[costs] {!POINTS!}
-------------------------------------------
-Alte Verg&uuml;tung/Aufruf: $DATA[reward] {!POINTS!}
-Neue Verg&uuml;tung/Aufruf: $content[reward] {!POINTS!}
-------------------------------------------
 Angemeldet: $DATA[registered]
 ------------------------------------------
 ID in der Surfbar: $DATA[id]
index 492b03a..2d77e64 100644 (file)
@@ -11,10 +11,6 @@ $content[frametester]
 ------------------------------------------
 User-ID: $content[userid]
 ------------------------------------------
-Kosten/Aufruf: $content[costs] {!POINTS!}
-------------------------------------------
-Verg&uuml;tung/Aufruf: $content[reward] {!POINTS!}
-------------------------------------------
 Sperrgrund: $content[lock_reason]
 ------------------------------------------
 Letzte Sperrung: $content[last_locked]
index c1db519..80696d4 100644 (file)
@@ -11,10 +11,6 @@ $content[frametester]
 ------------------------------------------
 User-ID: $content[userid]
 ------------------------------------------
-Kosten/Aufruf: $content[costs] {!POINTS!}
-------------------------------------------
-Verg&uuml;tung/Aufruf: $content[reward] {!POINTS!}
-------------------------------------------
 Sperrgrund: $content[lock_reason]
 ------------------------------------------
 Letzte Sperrung: $content[last_locked]
index 0051031..0ee32fc 100644 (file)
@@ -13,10 +13,6 @@ User-ID: $content[uid]
 ------------------------------------------
 Angemeldet: $content[registered]
 ------------------------------------------
-Kosten/Aufruf: $content[costs] {!POINTS!}
-------------------------------------------
-Verg&uuml;tung/Aufruf: $content[reward] {!POINTS!}
-------------------------------------------
 Status: $content[status]
 ------------------------------------------
 ID in der Surfbar: $content[id]
index 1d86efc..eb593b2 100644 (file)
@@ -13,10 +13,6 @@ $content[frametester]
 ------------------------------------------
 User-ID: $content[uid]
 ------------------------------------------
-Kosten/Aufruf: $content[costs] {!POINTS!}
-------------------------------------------
-Verg&uuml;tung/Aufruf: $content[reward] {!POINTS!}
-------------------------------------------
 Status: $content[status]
 ------------------------------------------
 ID in der Surfbar: $content[insert_id]
diff --git a/templates/de/emails/admin/admin_surfbar_url_rejected.tpl b/templates/de/emails/admin/admin_surfbar_url_rejected.tpl
new file mode 100644 (file)
index 0000000..c380d0e
--- /dev/null
@@ -0,0 +1,24 @@
+{--HELLO_ADMIN--},
+
+Ein Administrator hat soeben folgende URL in der Surfbar abgelehnt.
+
+Hier sind alle Daten von der URL:
+------------------------------------------
+Gebuchte URL: $content[url]
+------------------------------------------
+Framekiller-Test:
+$content[frametester]
+------------------------------------------
+User-ID: $content[uid]
+------------------------------------------
+Angemeldet: $content[registered]
+------------------------------------------
+Status: $content[status]
+------------------------------------------
+ID in der Surfbar: $content[id]
+------------------------------------------
+
+{--ADMIN_THANX--}
+  {--YOUR--} {!MAIN_TITLE!} {--SCRIPT--}
+
+{!URL!}/admin.php
index 99d4881..ce9df31 100644 (file)
@@ -6,10 +6,6 @@ Hier sind alle Daten dazu:
 ------------------------------------------
 Gebuchte URL: $DATA[url]
 ------------------------------------------
-Neue Verg&uuml;tung/Aufruf: $content[reward] {!POINTS!}
-------------------------------------------
-Neue Kosten/Aufruf: $content[costs] {!POINTS!}
-------------------------------------------
 Aufrufe gesamt: $DATA[views_total]
 ------------------------------------------
 Angemeldet: $DATA[registered]
diff --git a/templates/de/emails/member/member_surfbar_url_rejected.tpl b/templates/de/emails/member/member_surfbar_url_rejected.tpl
new file mode 100644 (file)
index 0000000..8a0c19e
--- /dev/null
@@ -0,0 +1,19 @@
+{--HELLO--} Mitglied,
+
+Ihre gebuchte URL wurde von uns in unserer Surfbar abgelehnt. Bitte halten Sie sich an unsere AGBs und binden Sie keine Framekiller in Ihre Webseite ein. Diese st&ouml;ren unsere Surfbar.
+
+Hier sind alle Daten:
+------------------------------------------
+Gebuchte URL: $content[url]
+------------------------------------------
+Ihre User-ID: $content[uid]
+------------------------------------------
+Status: $content[status]
+------------------------------------------
+ID in der Surfbar: $content[id]
+------------------------------------------
+
+Mit freundlichem Gruss,
+  Ihr {!MAIN_TITLE!} Team
+
+{!URL!} ({!WEBMASTER!})
index d909842..e11767e 100644 (file)
        <TR>
                <TD align="right" height="20">{--ADMIN_BEG_USERID--}:</TD>
                <TD class="seperator" width="5">&nbsp;</TD>
-               <TD align="center"><SELECT name="beg_uid" size="1"
-                       class="admin_select">
-                       {!_MEMBER_SELECTION!}
-               </SELECT></TD>
+               <TD align="center">
+                       {!__MEMBER_SELECTION!}
+               </TD>
        </TR>
        <TR>
                <TD colspan="3" class="bottom2 seperator" height="5">&nbsp;</TD>
@@ -85,7 +84,7 @@
                </TD>
        </TR>
        <TR>
-               <TD colspan="3" class="seperator" height="5">&nbsp;</TD>
+               <TD colspan="3" class="seperator bottom2" height="5">&nbsp;</TD>
        </TR>
        <TR>
                <TD colspan="3" align="center" class="admin_title bottom2" height="30">
index db61335..fa70120 100644 (file)
                <TD class="seperator" width="5">&nbsp;</TD>
                <TD align="center"><SELECT name="bonus_uid" size="1"
                        class="admin_select">
-                       {!_MEMBER_SELECTION!}
+                       {!__MEMBER_SELECTION!}
                </SELECT></TD>
        </TR>
        <TR>
index c3cc752..3d48b98 100644 (file)
        <TR>
                <TD align="right" height="20">{--ADMIN_DOUBLER_USERID--}:</TD>
                <TD class="seperator" width="5">&nbsp;</TD>
-               <TD style="padding-left: 5px"><SELECT name="doubler_uid" size="1"
-                       class="admin_select">
-                       {!_MEMBER_SELECTION!}
-               </SELECT></TD>
+               <TD style="padding-left: 5px">
+                       {!__MEMBER_SELECTION!}
+               </TD>
        </TR>
        <TR>
                <TD colspan="3" class="seperator bottom2" height="5">&nbsp;</TD>
index d52e1f3..f79ec6a 100644 (file)
                <TD width="10" class="seperator">&nbsp;</TD>
                <TD align="right" width="200">{--ADMIN_SELECT_DEF_REFID--}:</TD>
                <TD width="10" class="seperator">&nbsp;</TD>
-               <TD colspan="2"><SELECT name="def_refid" size="1"
-                       class="admin_select">
-                       {!_MEMBER_SELECTION!}
-               </SELECT></TD>
+               <TD colspan="2">
+                       {!__MEMBER_SELECTION!}
+               </TD>
                <TD width="10" class="seperator">&nbsp;</TD>
        </TR>
        <TR>
index 328ec85..d990447 100644 (file)
@@ -52,4 +52,4 @@
                <TD width="10" class="admin_footer seperator">&nbsp;</TD>
        </TR>
 </TABLE>
-</FORM>
\ No newline at end of file
+</FORM>
index c172e6b..8af5f8e 100644 (file)
                        <INPUT type="text" name="surfbar_purge_deleted" size="6" maxlength="20" value="$content[surfbar_purge_deleted]" />
                </TD>
        </TR>
+       <TR><TD height="3" colspan="2" class="seperator">&nbsp;</TD></TR>
+       <TR>
+               <TD height="30" align="right" style="padding-right:5px">
+                       {--ADMIN_CONFIG_SURFBAR_PURGE_MIGRATED--}
+               </TD>
+               <TD>
+                       <INPUT type="text" name="surfbar_purge_migrated" size="6" maxlength="20" value="$content[surfbar_purge_migrated]" />
+               </TD>
+       </TR>
        <TR><TD height="8" colspan="2" class="seperator bottom2">&nbsp;</TD></TR>
        <TR>
                <TD align="center" colspan="2" class="admin_footer bottom2">
index e625a71..cd9e90a 100644 (file)
@@ -1,19 +1,17 @@
 <form action="{!URL!}/modules.php?module=admin&amp;what=list_surfbar_urls" method="POST">
 <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed">
 <tr>
-       <td align="center" colspan="4" class="admin_title" height="30">
+       <td align="center" colspan="2" class="admin_title" height="30">
                <strong>{--ADMIN_SURFBAR_EDIT_URLS_TITLE--}</strong>
        </td>
 </tr>
 <tr>
        <td class="admin_title bottom2 right2" align="center"><strong>{--_UID--}</strong></td>
-       <td class="admin_title bottom2 right2" align="center"><strong>{--ADMIN_TEST_URL--}</strong></td>
-       <td class="admin_title bottom2 right2" align="center"><strong>{--ADMIN_SURFBAR_REWARD--}</strong></td>
-       <td class="admin_title bottom2" align="center"><strong>{--ADMIN_SURFBAR_COSTS--}</strong></td>
+       <td class="admin_title bottom2" align="center"><strong>{--ADMIN_TEST_URL--}</strong></td>
 </tr>
 $content
 <tr>
-       <td class="admin_footer" colspan="4">
+       <td class="admin_footer" colspan="2">
                <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}">&nbsp;*
                <input type="submit" name="do_edit" class="admin_submit" value="{--ADMIN_SURFBAR_EDIT_URL_NOW--}">
        </td>
index 5864657..1c9d914 100644 (file)
@@ -7,10 +7,4 @@
        <td style="padding:2px" align="center" class="bottom2 right2 switch_sw$content[sw]">
                <input type="text" name="url[$content[id]]" size="20" maxlength="255" value="$content[url]" />
        </td>
-       <td style="padding:2px" align="center" class="bottom2 right2 switch_sw$content[sw]">
-               <input type="text" name="reward[$content[id]]" size="5" maxlength="20" value="$content[reward]" /> {!POINTS!}
-       </td>
-       <td style="padding:2px" align="center" class="bottom2 switch_sw$content[sw]">
-               <input type="text" name="costs[$content[id]]" size="5" maxlength="20" value="$content[costs]" /> {!POINTS!}
-       </td>
 </tr>
index c3de9b2..475132b 100644 (file)
@@ -1,7 +1,7 @@
 <form action="{!URL!}/modules.php?module=admin&amp;what=list_surfbar_urls" method="POST">
 <table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed">
 <tr>
-       <td align="center" colspan="10" class="admin_title" height="30">
+       <td align="center" colspan="8" class="admin_title" height="30">
                <strong>{--ADMIN_SURFBAR_LIST_URLS_TITLE--}</strong>
        </td>
 </tr>
@@ -9,8 +9,6 @@
        <td class="admin_title bottom2 right2" align="center"><strong>{--ID_SELECT--}</strong></td>
        <td class="admin_title bottom2 right2" align="center"><strong>{--_UID--}</strong></td>
        <td class="admin_title bottom2 right2" align="center"><strong>{--ADMIN_TEST_URL--}</strong></td>
-       <td class="admin_title bottom2 right2" align="center"><strong>{--ADMIN_SURFBAR_REWARD--}</strong></td>
-       <td class="admin_title bottom2 right2" align="center"><strong>{--ADMIN_SURFBAR_COSTS--}</strong></td>
        <td class="admin_title bottom2 right2" align="center"><strong>{--ADMIN_SURFBAR_VIEWS_TOTAL--}</strong></td>
        <td class="admin_title bottom2 right2" align="center"><strong>{--ADMIN_SURFBAR_STATUS--}</strong></td>
        <td class="admin_title bottom2 right2" align="center"><strong>{--ADMIN_SURFBAR_REGISTERED--}</strong></td>
@@ -19,7 +17,7 @@
 </tr>
 $content
 <tr>
-       <td class="admin_footer" colspan="10">
+       <td class="admin_footer" colspan="8">
                <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}">&nbsp;*
                <input type="submit" name="edit" class="admin_submit" value="{--ADMIN_SURFBAR_EDIT_URL--}">&nbsp;*
                <input type="submit" name="lock" class="admin_submit" value="{--ADMIN_SURFBAR_UNLOCK_URL--}">&nbsp;*
index 28937a7..4f69f78 100644 (file)
@@ -9,12 +9,6 @@
                <a href="$content[url]" target="_blank" title="{--ADMIN_TEST_URL--}">{--ADMIN_TEST_URL--}</a>
        </td>
        <td align="center" class="bottom2 right2 switch_sw$content[sw]">
-               $content[reward] {!POINTS!}
-       </td>
-       <td align="center" class="bottom2 right2 switch_sw$content[sw]">
-               $content[costs] {!POINTS!}
-       </td>
-       <td align="center" class="bottom2 right2 switch_sw$content[sw]">
                <a href="{!URL!}/modules.php?module=admin&amp;what=surfbar_stats&amp;url_id=$content[id]">$content[views_total]</a>
        </td>
        <td align="center" class="bottom2 right2 switch_sw$content[sw]">
diff --git a/templates/de/html/admin/admin_undelete_surfbar_urls.tpl b/templates/de/html/admin/admin_undelete_surfbar_urls.tpl
new file mode 100644 (file)
index 0000000..c772260
--- /dev/null
@@ -0,0 +1,22 @@
+<form action="{!URL!}/modules.php?module=admin&amp;what=list_surfbar_urls" method="POST">
+<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed">
+<tr>
+       <td align="center" colspan="4" class="admin_title" height="30">
+               <strong>{--ADMIN_SURFBAR_UNDELETE_URLS_TITLE--}</strong>
+       </td>
+</tr>
+<tr>
+       <td class="admin_title bottom2 right2" align="center"><strong>{--_UID--}</strong></td>
+       <td class="admin_title bottom2 right2" align="center"><strong>{--ADMIN_TEST_URL--}</strong></td>
+       <td class="admin_title bottom2 right2" align="center"><strong>{--ADMIN_SURFBAR_STATUS--}</strong></td>
+       <td class="admin_title bottom2" align="center"><strong>{--ADMIN_SURFBAR_REGISTERED--}</strong></td>
+</tr>
+$content
+<tr>
+       <td class="admin_footer" colspan="4">
+               <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" />&nbsp;*
+               <input type="submit" name="do_undelete" class="admin_lock" value="{--ADMIN_SURFBAR_UNDELETE_URL_NOW--}" />
+       </td>
+</tr>
+</table>
+</form>
diff --git a/templates/de/html/admin/admin_undelete_surfbar_urls_row.tpl b/templates/de/html/admin/admin_undelete_surfbar_urls_row.tpl
new file mode 100644 (file)
index 0000000..8e10a5e
--- /dev/null
@@ -0,0 +1,16 @@
+<tr>
+       <td align="center" class="bottom2 right2 switch_sw$content[sw]">
+               <input type="hidden" name="id[$content[id]]" value="1" />
+               <input type="hidden" name="uid_raw[$content[id]]" value="$content[uid]" />
+               $content[userid]
+       </td>
+       <td align="center" class="bottom2 right2 switch_sw$content[sw]">
+               <a href="$content[url]" target="_blank" title="{--ADMIN_TEST_URL--}">{--ADMIN_TEST_URL--}</a>
+       </td>
+       <td align="center" class="bottom2 right2 switch_sw$content[sw]">
+               $content[status]
+       </td>
+       <td align="center" class="bottom2 switch_sw$content[sw]">
+               $content[registered]
+       </td>
+</tr>
index 5761720..ac63551 100644 (file)
@@ -1,7 +1,7 @@
 <FORM action="{!URL!}/modules.php?module=admin&amp;what=unlock_surfbar_urls" method="POST">
 <TABLE border="0" cellspacing="0" cellpadding="0" class="admin_table dashed">
 <TR>
-       <TD align="center" colspan="6" class="admin_title" height="30">
+       <TD align="center" colspan="4" class="admin_title" height="30">
                <STRONG>{--EDIT_DEL_REFDEPTH--}</STRONG>
        </TD>
 </TR>
@@ -9,13 +9,11 @@
        <TD class="admin_title bottom2 right2" align="center"><STRONG>{--ID_SELECT--}</STRONG></TD>
        <TD class="admin_title bottom2 right2" align="center"><STRONG>{--_UID--}</STRONG></TD>
        <TD class="admin_title bottom2 right2" align="center"><STRONG>{--ADMIN_TEST_URL--}</STRONG></TD>
-       <TD class="admin_title bottom2 right2" align="center"><STRONG>{--ADMIN_SURFBAR_REWARD--}</STRONG></TD>
-       <TD class="admin_title bottom2 right2" align="center"><STRONG>{--ADMIN_SURFBAR_COSTS--}</STRONG></TD>
        <TD class="admin_title bottom2" align="center"><STRONG>{--ADMIN_SURFBAR_REGISTERED--}</STRONG></TD>
 </TR>
 $content
 <TR>
-       <TD class="admin_footer" colspan="6">
+       <TD class="admin_footer" colspan="4">
                <INPUT type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}">&nbsp;*
                <INPUT type="submit" name="reject" class="admin_submit" value="{--ADMIN_SURFBAR_REJECT_URL--}">
                <INPUT type="submit" name="unlock" class="admin_submit" value="{--ADMIN_SURFBAR_CONFIRM_URL--}">
index 40fbae4..902a835 100644 (file)
@@ -8,12 +8,6 @@
        <TD align="center" class="bottom2 right2 switch_sw$content[sw]">
                <a href="$content[url]" target="_blank" title="{--ADMIN_TEST_URL--}">{--ADMIN_TEST_URL--}</a>
        </TD>
-       <TD align="center" class="bottom2 right2 switch_sw$content[sw]">
-               $content[reward] {!POINTS!}
-       </TD>
-       <TD align="center" class="bottom2 right2 switch_sw$content[sw]">
-               $content[costs] {!POINTS!}
-       </TD>
        <TD align="center" class="bottom2 switch_sw$content[sw]">
                $content[registered]
        </TD>
index 7336c0d..3ad33da 100644 (file)
@@ -1,7 +1,7 @@
 <form action="{!URL!}/modules.php?module=login&amp;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>
+               <strong>URL in Surfbar buchen - Dynamisch:</strong>
        </div>
 
        <div class="member_input" style="padding-top:5px;padding-bottom:5px">
@@ -9,10 +9,10 @@
        </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 />
+               Jeder Seiten-Aufruf durch andere Mitglieder kostet Ihnen mindestens
+               <strong>$content[costs] {!POINTS!}</strong>. Surfen Sie mit der Surfbar
+               erhalten Sie mindestens <strong>$content[reward] {!POINTS!}</strong> 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>
 </form>
+
+<div align="center" class="member_note" style="padding:5px">
+       Die maximalen Kosten bzw. Einnahmen pro Surfbaraufruf  richten sich nach
+       verschiedenen Faktoren. Schauen Sie unter <a
+        href="{!URL!}/modules.php?module=login&amp;what=surfbar_start">Surfbar starten</a>
+       nach, wenn Sie genaueres dazu wissen m&ouml;chten.
+</div>
index 49385e1..7622733 100644 (file)
@@ -1,7 +1,7 @@
 <form action="{!URL!}/modules.php?module=login&amp;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>
+               <strong>URL in Surfbar buchen - Statisch:</strong>
        </div>
 
        <div class="member_input" style="padding-top:5px;padding-bottom:5px">