Complete refacture for previously discovered inconsistency
authorRoland Häder <roland@mxchange.org>
Wed, 31 Mar 2010 19:36:03 +0000 (19:36 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 31 Mar 2010 19:36:03 +0000 (19:36 +0000)
68 files changed:
inc/extensions/ext-surfbar.php
inc/language/de.php
inc/libs/surfbar_functions.php
inc/libs/task_functions.php
inc/modules/admin/what-list_surfbar_actions.php
inc/modules/admin/what-list_surfbar_urls.php
inc/modules/admin/what-surfbar_stats.php
inc/modules/admin/what-unlock_surfbar_urls.php
surfbar.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_active_surfbar_urls.tpl
templates/de/emails/admin/admin_lock_locked_surfbar_urls.tpl
templates/de/emails/admin/admin_surfbar_url_active_deleted.tpl
templates/de/emails/admin/admin_surfbar_url_active_pending.tpl
templates/de/emails/admin/admin_surfbar_url_active_stopped.tpl
templates/de/emails/admin/admin_surfbar_url_confirmed.tpl
templates/de/emails/admin/admin_surfbar_url_depleted.tpl
templates/de/emails/admin/admin_surfbar_url_locked_deleted.tpl
templates/de/emails/admin/admin_surfbar_url_locked_pending.tpl
templates/de/emails/admin/admin_surfbar_url_migrated_deleted.tpl
templates/de/emails/admin/admin_surfbar_url_migrated_migrated.tpl
templates/de/emails/admin/admin_surfbar_url_migrated_pending.tpl
templates/de/emails/admin/admin_surfbar_url_pending.tpl
templates/de/emails/admin/admin_surfbar_url_pending_active.tpl
templates/de/emails/admin/admin_surfbar_url_pending_deleted.tpl
templates/de/emails/admin/admin_surfbar_url_pending_rejected.tpl
templates/de/emails/admin/admin_surfbar_url_rejected.tpl
templates/de/emails/admin/admin_surfbar_url_stopped_continued.tpl
templates/de/emails/admin/admin_surfbar_url_stopped_deleted.tpl
templates/de/emails/admin/admin_surfbar_url_stopped_pending.tpl
templates/de/emails/admin/admin_undelete_active_surfbar_urls.tpl
templates/de/emails/member/member_del_surfbar_urls.tpl
templates/de/emails/member/member_edit_surfbar_urls.tpl
templates/de/emails/member/member_lock_active_surfbar_urls.tpl
templates/de/emails/member/member_lock_locked_surfbar_urls.tpl
templates/de/emails/member/member_surfbar_url_active_deleted.tpl
templates/de/emails/member/member_surfbar_url_active_pending.tpl
templates/de/emails/member/member_surfbar_url_active_stopped.tpl
templates/de/emails/member/member_surfbar_url_confirmed.tpl
templates/de/emails/member/member_surfbar_url_depleted.tpl
templates/de/emails/member/member_surfbar_url_locked_deleted.tpl
templates/de/emails/member/member_surfbar_url_locked_pending.tpl
templates/de/emails/member/member_surfbar_url_migrated_deleted.tpl
templates/de/emails/member/member_surfbar_url_migrated_migrated.tpl
templates/de/emails/member/member_surfbar_url_migrated_pending.tpl
templates/de/emails/member/member_surfbar_url_pending.tpl
templates/de/emails/member/member_surfbar_url_pending_active.tpl
templates/de/emails/member/member_surfbar_url_pending_deleted.tpl
templates/de/emails/member/member_surfbar_url_pending_rejected.tpl
templates/de/emails/member/member_surfbar_url_rejected.tpl
templates/de/emails/member/member_surfbar_url_stopped_continued.tpl
templates/de/emails/member/member_surfbar_url_stopped_deleted.tpl
templates/de/emails/member/member_surfbar_url_stopped_pending.tpl
templates/de/emails/member/member_undelete_active_surfbar_urls.tpl
templates/de/html/admin/admin_del_surfbar_urls_row.tpl
templates/de/html/admin/admin_edit_surfbar_urls_row.tpl
templates/de/html/admin/admin_list_surfbar_actions_row.tpl
templates/de/html/admin/admin_list_surfbar_urls_row.tpl
templates/de/html/admin/admin_lock_surfbar_urls_row.tpl
templates/de/html/admin/admin_surfbar_stats_row.tpl
templates/de/html/admin/admin_surfbar_url_stats_row.tpl
templates/de/html/admin/admin_undelete_surfbar_urls_row.tpl
templates/de/html/admin/admin_unlock_surfbar_urls_row.tpl
templates/de/html/member/member_surfbar_delete_action_form.tpl
templates/de/html/member/member_surfbar_edit_action_form.tpl
templates/de/html/member/member_surfbar_list_form.tpl
templates/de/html/surfbar/surfbar_frame_top.tpl

index 61e92bc..8b2fb94 100644 (file)
@@ -56,96 +56,96 @@ switch (getExtensionMode()) {
                // SQL commands to run (surfbar URLs)
                addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_urls`");
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_surfbar_urls` (
-`id` BIGINT(20) UNSIGNED  NOT NULL AUTO_INCREMENT,
-`userid` BIGINT(20) UNSIGNED  NOT NULL DEFAULT 0,
+`url_id` BIGINT(20) UNSIGNED  NOT NULL AUTO_INCREMENT,
+`url_userid` BIGINT(20) UNSIGNED  NOT NULL DEFAULT 0,
 `url` VARCHAR(255) NOT NULL DEFAULT '',
-`last_salt` VARCHAR(255) NOT NULL DEFAULT '',
-`views_total` BIGINT(20) UNSIGNED  NOT NULL DEFAULT 0,
-`views_max` BIGINT(20) UNSIGNED  NOT NULL DEFAULT 0,
-`views_allowed` BIGINT(20) UNSIGNED  NOT NULL DEFAULT 0,
-`status` ENUM('PENDING','ACTIVE','LOCKED','STOPPED','REJECTED','DELETED','MIGRATED','DEPLETED') 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 '',
-`fixed_reload` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-PRIMARY KEY (`id`),
-UNIQUE KEY `userid_url` (`userid`,`url`),
-INDEX `status_userid` (`status`,`userid`)
+`url_last_salt` VARCHAR(255) NOT NULL DEFAULT '',
+`url_views_total` BIGINT(20) UNSIGNED  NOT NULL DEFAULT 0,
+`url_views_max` BIGINT(20) UNSIGNED  NOT NULL DEFAULT 0,
+`url_views_allowed` BIGINT(20) UNSIGNED  NOT NULL DEFAULT 0,
+`url_status` ENUM('PENDING','ACTIVE','LOCKED','STOPPED','REJECTED','DELETED','MIGRATED','DEPLETED') NOT NULL DEFAULT 'PENDING',
+`url_registered` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+`url_last_locked` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
+`url_lock_reason` VARCHAR(255) NOT NULL DEFAULT '',
+`url_reject_reason` VARCHAR(255) NOT NULL DEFAULT '',
+`url_fixed_reload` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+PRIMARY KEY (`url_id`),
+UNIQUE KEY `userid_url` (`url_userid`,`url`),
+INDEX `status_userid` (`url_status`,`url_userid`)
 ) TYPE={?_TABLE_TYPE?} COMMENT='Surfbar URLs'");
 
                // Reload locks
                addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_locks`");
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_surfbar_locks` (
-`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-`userid` BIGINT(20) UNSIGNED  NOT NULL DEFAULT 0,
-`url_id` BIGINT(20) UNSIGNED  NOT NULL DEFAULT 0,
-`last_surfed` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
-PRIMARY KEY (`id`),
-UNIQUE KEY `userid_url` (`userid`,`url_id`),
-INDEX (`url_id`)
+`locks_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`locks_userid` BIGINT(20) UNSIGNED  NOT NULL DEFAULT 0,
+`locks_url_id` BIGINT(20) UNSIGNED  NOT NULL DEFAULT 0,
+`locks_last_surfed` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+PRIMARY KEY (`locks_id`),
+UNIQUE KEY `userid_url` (`locks_userid`,`locks_url_id`),
+INDEX (`locks_url_id`)
 ) TYPE={?_TABLE_TYPE?} COMMENT='Surfbar reload locks'");
 
                // Surfbar salts
                addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_salts`");
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_surfbar_salts` (
-`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-`userid` BIGINT(20) UNSIGNED  NOT NULL DEFAULT 0,
-`url_id` BIGINT(20) UNSIGNED  NOT NULL DEFAULT 0,
-`last_salt` VARCHAR(255) NOT NULL DEFAULT '',
-PRIMARY KEY (`id`),
-UNIQUE KEY `userid_url` (`userid`,`url_id`),
-INDEX (`url_id`)
+`salts_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`salts_userid` BIGINT(20) UNSIGNED  NOT NULL DEFAULT 0,
+`salts_url_id` BIGINT(20) UNSIGNED  NOT NULL DEFAULT 0,
+`salts_last_salt` VARCHAR(255) NOT NULL DEFAULT '',
+PRIMARY KEY (`salts_id`),
+UNIQUE KEY `salts_userid_url` (`salts_userid`,`salts_url_id`),
+INDEX (`salts_url_id`)
 ) TYPE={?_TABLE_TYPE?} COMMENT='Surfbar last used salts'");
 
                // Statistics
                addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_stats`");
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_surfbar_stats` (
-`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-`url_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-`count` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-`last_surfed` TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
-PRIMARY KEY (`id`),
-UNIQUE KEY `userid_url` (`userid`,`url_id`),
-INDEX (`url_id`)
+`stats_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`stats_userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`stats_url_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`stats_count` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`stats_last_surfed` TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+PRIMARY KEY (`stats_id`),
+UNIQUE KEY `userid_url` (`stats_userid`,`stats_url_id`),
+INDEX (`stats_url_id`)
 ) TYPE={?_TABLE_TYPE?} COMMENT='Surfbar Statistics'");
 
                // Member actions pending on status
                addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_actions`");
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_surfbar_actions` (
-`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-`status` ENUM('PENDING','ACTIVE','LOCKED','STOPPED','REJECTED','DELETED','MIGRATED','DEPLETED') NULL DEFAULT NULL,
-`action` ENUM('EDIT','DELETE','PAUSE','UNPAUSE','FRAMETEST','RETREAT','RESUBMIT','BOOKNOW') NULL DEFAULT NULL,
-`new_status` ENUM('PENDING','ACTIVE','LOCKED','STOPPED','REJECTED','DELETED','MIGRATED','DEPLETED') NULL DEFAULT NULL,
-PRIMARY KEY (`id`),
-UNIQUE KEY `status_action` (`status`,`action`)
+`actions_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`actions_status` ENUM('PENDING','ACTIVE','LOCKED','STOPPED','REJECTED','DELETED','MIGRATED','DEPLETED') NULL DEFAULT NULL,
+`actions_action` ENUM('EDIT','DELETE','PAUSE','UNPAUSE','FRAMETEST','RETREAT','RESUBMIT','BOOKNOW') NULL DEFAULT NULL,
+`actions_new_status` ENUM('PENDING','ACTIVE','LOCKED','STOPPED','REJECTED','DELETED','MIGRATED','DEPLETED') NULL DEFAULT NULL,
+PRIMARY KEY (`actions_id`),
+UNIQUE KEY `status_action` (`actions_status`,`actions_action`)
 ) TYPE={?_TABLE_TYPE?} COMMENT='Surfbar Member Actions'");
 
                // Member actions
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','RETREAT','DELETED')");
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','FRAMETEST',NULL)");
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','EDIT',NULL)");
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','EDIT','PENDING')");
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','DELETE','DELETED')");
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','PAUSE','STOPPED')");
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','FRAMETEST',NULL)");
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','DELETE','DELETED')");
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','FRAMETEST',NULL)");
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','RESUBMIT','PENDING')");
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','EDIT','PENDING')");
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','DELETE','DELETED')");
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','UNPAUSE','PENDING')");
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('DEPLETED','EDIT','PENDING')");
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('DEPLETED','DELETE','DELETED')");
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','EDIT','PENDING')");
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','DELETE','DELETED')");
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','FRAMETEST',NULL)");
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','RESUBMIT','PENDING')");
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','EDIT','MIGRATED')");
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','DELETE','DELETED')");
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','FRAMETEST',NULL)");
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','BOOKNOW','PENDING')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`actions_status`,`actions_action`,`actions_new_status`) VALUES ('PENDING','RETREAT','DELETED')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`actions_status`,`actions_action`,`actions_new_status`) VALUES ('PENDING','FRAMETEST',NULL)");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`actions_status`,`actions_action`,`actions_new_status`) VALUES ('PENDING','EDIT',NULL)");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`actions_status`,`actions_action`,`actions_new_status`) VALUES ('ACTIVE','EDIT','PENDING')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`actions_status`,`actions_action`,`actions_new_status`) VALUES ('ACTIVE','DELETE','DELETED')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`actions_status`,`actions_action`,`actions_new_status`) VALUES ('ACTIVE','PAUSE','STOPPED')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`actions_status`,`actions_action`,`actions_new_status`) VALUES ('ACTIVE','FRAMETEST',NULL)");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`actions_status`,`actions_action`,`actions_new_status`) VALUES ('LOCKED','DELETE','DELETED')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`actions_status`,`actions_action`,`actions_new_status`) VALUES ('LOCKED','FRAMETEST',NULL)");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`actions_status`,`actions_action`,`actions_new_status`) VALUES ('LOCKED','RESUBMIT','PENDING')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`actions_status`,`actions_action`,`actions_new_status`) VALUES ('STOPPED','EDIT','PENDING')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`actions_status`,`actions_action`,`actions_new_status`) VALUES ('STOPPED','DELETE','DELETED')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`actions_status`,`actions_action`,`actions_new_status`) VALUES ('STOPPED','UNPAUSE','PENDING')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`actions_status`,`actions_action`,`actions_new_status`) VALUES ('DEPLETED','EDIT','PENDING')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`actions_status`,`actions_action`,`actions_new_status`) VALUES ('DEPLETED','DELETE','DELETED')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`actions_status`,`actions_action`,`actions_new_status`) VALUES ('REJECTED','EDIT','PENDING')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`actions_status`,`actions_action`,`actions_new_status`) VALUES ('REJECTED','DELETE','DELETED')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`actions_status`,`actions_action`,`actions_new_status`) VALUES ('REJECTED','FRAMETEST',NULL)");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`actions_status`,`actions_action`,`actions_new_status`) VALUES ('REJECTED','RESUBMIT','PENDING')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`actions_status`,`actions_action`,`actions_new_status`) VALUES ('MIGRATED','EDIT','MIGRATED')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`actions_status`,`actions_action`,`actions_new_status`) VALUES ('MIGRATED','DELETE','DELETED')");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`actions_status`,`actions_action`,`actions_new_status`) VALUES ('MIGRATED','FRAMETEST',NULL)");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`actions_status`,`actions_action`,`actions_new_status`) VALUES ('MIGRATED','BOOKNOW','PENDING')");
 
                // Config entries
                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_pay_model` ENUM('STATIC','DYNAMIC') NOT NULL DEFAULT 'STATIC'");
index 1221044..6e6be64 100644 (file)
@@ -1045,7 +1045,7 @@ addMessages(array(
        'ADMIN_NO_POINTS_REPAYED' => "Die Mailbuchung hatte keine {?POINTS?} zum zur&uuml;ckbuchen.",
        'ADMIN_POINTS_SHREDDED' => "Es wurden <span class=\"data\">%s&nbsp; {?POINTS?}</span> geschrettert.",
        'EXTENSION_PROBLEM_EXT_INACTIVE' => "Kann nicht fortfahren! Fehler: Erweiterung <span class=\"data\">%s</span> deaktiviert.",
-       'ADMIN_EXTENSION_PROBLEM_EXT_INACTIVE' => "Die Erweiterung <span class=\"data\">%s</span> ist derzeit deaktiviert. <a href=\"{%url=modules.php?module=admin&amp;what=extensions%}\">Hier</a> k&ouml;nnen Sie diese aktivieren.",
+       'ADMIN_EXTENSION_PROBLEM_EXT_INACTIVE' => "Die Erweiterung <span class=\"data\">%s</span> ist derzeit deaktiviert. <a href=\"{%%url=modules.php?module=admin&amp;what=extensions%%}\">Hier</a> k&ouml;nnen Sie diese aktivieren.",
        'EXTENSION_PROBLEM_EXT_NOT_INSTALLED' => "Kann nicht fortfahren! Fehler: Erweiterung <span class=\"data\">%s</span> nicht installiert.",
        'ADMIN_EXTENSION_PROBLEM_EXT_NOT_INSTALLED' => "Die Erweiterung <span class=\"data\">%s</span> ist derzeit nicht installiert. <a href=\"{%%url=modules.php?module=admin&amp;what=extensions%%}\">Hier</a> k&ouml;nnen Sie diese aktivieren.",
        'EXTENSION_PROBLEM_NOT_INSTALLED' => "Erweiterung <span class=\"data\">%s</span> nicht installiert.",
index 8736fae..01173c9 100644 (file)
@@ -350,7 +350,7 @@ function SURFBAR_MEMBER_UNPAUSE_ACTION ($urlData) {
        // Fix missing entry for template
        $urlData['edit'] = $urlData['unpause'];
        $urlData['edit']['url'] = $urlData['url'];
-       $urlData['edit']['limit'] = $urlData['views_max'];
+       $urlData['edit']['limit'] = SURFBAR_GET_VIEWS_MAX();
 
        // Return status change
        return SURFBAR_CHANGE_STATUS($urlData['id'], $urlData['url_status'], $urlData['new_status'], array($urlData['id'] => $urlData));
@@ -363,12 +363,8 @@ function SURFBAR_MEMBER_RESUBMIT_ACTION ($urlData) {
 
 // Display selected "action form"
 function SURFBAR_MEMBER_DISPLAY_ACTION_FORM ($action, $urlData) {
-       // Translate some data
-       $urlData['url_registered']  = generateDateTime($urlData['url_registered'], 2);
-       $urlData['views_total']     = translateComma($urlData['views_total']);
-       $urlData['views_max']       = translateComma($urlData['views_max']);
-       $urlData['views_allowed']   = translateComma($urlData['views_allowed']);
-       $urlData['url_last_locked'] = generateDateTime($urlData['url_last_locked'], 2);
+       // Translate some data if present
+       $content = SURFBAR_PREPARE_CONTENT_FOR_TEMPLATE($content);
 
        // Is the lock reason empty?
        if (empty($urlData['lock_reason'])) {
@@ -384,7 +380,7 @@ function SURFBAR_MEMBER_DISPLAY_ACTION_FORM ($action, $urlData) {
                $urlData['limited']   = 'false';
 
                // Is this URL limited?
-               if ($urlData['views_max'] > 0) {
+               if (SURFBAR_GET_VIEWS_MAX() > 0) {
                        // Then rewrite form data
                        $urlData['limited_y'] = ' checked="checked"';
                        $urlData['limited_n'] = '';
@@ -413,12 +409,6 @@ function SURFBAR_MEMBER_EXECUTE_ACTION ($action, $urlData) {
        // Construct function name
        $functionName = sprintf("SURFBAR_MEMBER_EXECUTE_%s_ACTION", strtoupper($action));
 
-       // Is 'userid' set and not 'userid' ?
-       if ((!isset($urlData['userid'])) && (isset($urlData['userid']))) {
-               // Auto-fix this
-               $urlData['userid'] = $urlData['userid'];
-       } // END - if
-
        // Is that function there?
        if (function_exists($functionName)) {
                // Execute the function
@@ -441,9 +431,9 @@ function SURFBAR_MEMBER_EXECUTE_EDIT_ACTION ($urlData) {
 
        // Has the URL or limit changed?
        if (true) {
-               //if (($urlData['views_allowed'] != $urlData['edit']['limit']) || ($url1 != $url2)) {
+               //if (($urlData['url_views_allowed'] != $urlData['edit']['limit']) || ($url1 != $url2)) {
                // Run the query
-               SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_surfbar_urls` SET url='%s', views_allowed=%s, views_max=%s WHERE `id`=%s AND `status`='%s' LIMIT 1",
+               SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_surfbar_urls` SET `url`='%s', `url_views_allowed`=%s, `url_views_max`=%s WHERE `url_id`=%s AND `status`='%s' LIMIT 1",
                        array($urlData['url'], $urlData['edit']['limit'], $urlData['edit']['limit'], $urlData['id'], $urlData['url_status']), __FUNCTION__, __LINE__);
 
                // All fine
@@ -474,7 +464,7 @@ function SURFBAR_HANDLE_SELF_MAINTENANCE () {
 // Handle URLs which limit has depleted
 function SURFBAR_HANDLE_DEPLETED_VIEWS () {
        // Get all URLs
-       $urlArray = SURFBAR_GET_URL_DATA(0, 'views_max', 'id', 'ASC', 'id', " AND views_allowed>0 AND `status`='ACTIVE'");
+       $urlArray = SURFBAR_GET_URL_DATA(0, 'url_views_max', 'url_id', 'ASC', 'url_id', " AND `url_views_allowed` > 0 AND `url_status`='ACTIVE'");
 
        // Do we have some entries?
        if (count($urlArray) > 0) {
@@ -514,8 +504,8 @@ function SURFBAR_HANDLE_LOW_POINTS () {
                        SURFBAR_NOTIFY_USER('low_points', $content);
 
                        // Update last notified
-                       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET surfbar_low_notified=NOW() WHERE `userid`=%s LIMIT 1",
-                       array($userid), __FUNCTION__, __LINE__);
+                       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `surfbar_low_notified`=NOW() WHERE `userid`=%s LIMIT 1",
+                               array($userid), __FUNCTION__, __LINE__);
                } // END - if
        } // END - foreach
 }
@@ -529,19 +519,19 @@ function SURFBAR_HANDLE_LOW_POINTS () {
 // Looks up by an URL
 function SURFBAR_LOOKUP_BY_URL ($url, $userid) {
        // Now lookup that given URL by itself
-       $urlArray = SURFBAR_GET_URL_DATA($url, 'url', 'id', 'ASC', 'id', sprintf(" AND `userid`=%s", bigintval($userid)));
+       $urlArray = SURFBAR_GET_URL_DATA($url, 'url', 'url_id', 'ASC', 'url_id', sprintf(" AND `url_userid`=%s", bigintval($userid)));
 
        // Was it found?
        return (count($urlArray) > 0);
 }
 
 // Load URL data by given search term and column
-function SURFBAR_GET_URL_DATA ($searchTerm, $column = 'id', $order = 'id', $sort = 'ASC', $group = 'id', $add = '') {
+function SURFBAR_GET_URL_DATA ($searchTerm, $column = 'url_id', $order = 'url_id', $sort = 'ASC', $group = 'url_id', $add = '') {
        // By default nothing is found
        $GLOBALS['last_url_data'] = array();
 
        // Is the column an id number?
-       if (($column == 'id') || ($column == 'userid')) {
+       if (($column == 'url_id') || ($column == 'url_userid')) {
                // Extra secure input
                $searchTerm = bigintval($searchTerm);
        } // END - if
@@ -554,10 +544,19 @@ function SURFBAR_GET_URL_DATA ($searchTerm, $column = 'id', $order = 'id', $sort
 
        // Look up the record
        $result = SQL_QUERY_ESC("SELECT
-       `id`, `userid`, `url`,
-       `views_total`, `views_max`, `views_allowed`, `status` AS `url_status`,
-       UNIX_TIMESTAMP(`registered`) AS `url_registered`, UNIX_TIMESTAMP(`last_locked`) AS `url_last_locked`, `lock_reason`,
-       `views_max`, `views_allowed`, `fixed_reload`
+       `url_id`,
+       `url_userid`,
+       `url`,
+       `url_views_total`,
+       `url_views_max`,
+       `url_views_allowed`,
+       `url_status`,
+       UNIX_TIMESTAMP(`url_registered`) AS `url_registered`,
+       UNIX_TIMESTAMP(`url_last_locked`) AS `url_last_locked`,
+       `url_lock_reason`,
+       `url_views_max`,
+       `url_views_allowed`,
+       `url_fixed_reload`
 FROM
        `{?_MYSQL_PREFIX?}_surfbar_urls`
 WHERE
@@ -578,12 +577,12 @@ ORDER BY
                // Then load all!
                while ($dataRow = SQL_FETCHARRAY($result)) {
                        // Shall we group these results?
-                       if ($group == 'id') {
+                       if ($group == 'url_id') {
                                // Add the row by id as index
-                               $GLOBALS['last_url_data'][$dataRow['id']] = $dataRow;
+                               $GLOBALS['last_url_data'][$dataRow['url_id']] = $dataRow;
                        } else {
                                // Group entries
-                               $GLOBALS['last_url_data'][$dataRow[$group]][$dataRow['id']] = $dataRow;
+                               $GLOBALS['last_url_data'][$dataRow[$group]][$dataRow['url_id']] = $dataRow;
                        }
                } // END - while
        } // END - if
@@ -606,7 +605,7 @@ function SURFBAR_REGISTER_URL ($url, $userid, $status = 'PENDING', $addMode = 'r
        $content = merge_array($extraFields, array(
                'url'         => $url,
                'frametester' => generateFrametesterUrl($url),
-               'userid'      => $userid,
+               'url_userid'  => $userid,
                'url_status'  => $status,
        ));
 
@@ -633,11 +632,11 @@ function SURFBAR_REGISTER_URL ($url, $userid, $status = 'PENDING', $addMode = 'r
        // If in reg-mode we notify admin
        if (($addMode == 'reg') || (getConfig('surfbar_notify_admin_unlock') == 'Y')) {
                // Notify admin even when he as unlocked an email
-               SURFBAR_NOTIFY_ADMIN("url_{$addMode}", $content);
+               SURFBAR_NOTIFY_ADMIN('url_' . $addMode, $content);
        } // END - if
 
        // Send mail to user
-       SURFBAR_NOTIFY_USER("url_{$addMode}", $content);
+       SURFBAR_NOTIFY_USER('url_' . $addMode, $content);
 
        // Return the insert id
        return $content['insert_id'];
@@ -646,13 +645,13 @@ function SURFBAR_REGISTER_URL ($url, $userid, $status = 'PENDING', $addMode = 'r
 // Inserts an url by given data array and return the insert id
 function SURFBAR_INSERT_URL_BY_ARRAY ($urlData) {
        // Get userid
-       $userid = bigintval($urlData['userid']);
+       $userid = bigintval($urlData['url_userid']);
 
        // Is the id set?
        if (empty($userid)) $userid = '0';
 
        // Just run the insert query for now
-       SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_urls` (userid,url,status,views_max,views_allowed,fixed_reload) VALUES (%s,'%s','%s',%s,%s,%s)",
+       SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_urls` (`url_userid`,`url`,`url_status`,`url_views_max`,`url_views_allowed`,`url_fixed_reload`) VALUES (%s,'%s','%s',%s,%s,%s)",
                array(
                        $userid,
                        $urlData['url'],
@@ -684,12 +683,7 @@ function SURFBAR_NOTIFY_ADMIN ($messageType, $content) {
        } // END - if
 
        // Translate some data if present
-       if (isset($content['url_status']))      $content['url_status']      = translateSurfbarUrlStatus($content['url_status']);
-       if (isset($content['url_registered']))  $content['url_registered']  = generateDateTime($content['url_registered'], 2);
-       if (isset($content['url_last_locked'])) $content['url_last_locked'] = generateDateTime($content['url_last_locked'], 2);
-       if (isset($content['views_total']))     $content['views_total']     = translateComma($content['views_total']);
-       if (isset($content['views_allowed']))   $content['views_allowed']   = translateComma($content['views_allowed']);
-       if (isset($content['views_max']))       $content['views_max']       = translateComma($content['views_max']);
+       $content = SURFBAR_PREPARE_CONTENT_FOR_TEMPLATE($content);
 
        // Send the notification out
        return sendAdminNotification($subject, $templateName, $content, $content['userid']);
@@ -707,7 +701,7 @@ function SURFBAR_NOTIFY_USER ($messageType, $content) {
 
        // Prepare subject
        $subject = getMessage(sprintf("MEMBER_SURFBAR_NOTIFY_%s_SUBJECT",
-       strtoupper($messageType)
+               strtoupper($messageType)
        ));
 
        // Is the subject line there?
@@ -717,12 +711,7 @@ function SURFBAR_NOTIFY_USER ($messageType, $content) {
        } // END - if
 
        // Translate some data if present
-       if (isset($content['url_status']))      $content['url_status']      = translateSurfbarUrlStatus($content['url_status']);
-       if (isset($content['url_registered']))  $content['url_registered']  = generateDateTime($content['url_registered'], 2);
-       if (isset($content['url_last_locked'])) $content['url_last_locked'] = generateDateTime($content['url_last_locked'], 2);
-       if (isset($content['views_total']))     $content['views_total']     = translateComma($content['views_total']);
-       if (isset($content['views_allowed']))   $content['views_allowed']   = translateComma($content['views_allowed']);
-       if (isset($content['views_max']))       $content['views_max']       = translateComma($content['views_max']);
+       $content = SURFBAR_PREPARE_CONTENT_FOR_TEMPLATE($content);
 
        // Load template
        $mailText = loadEmailTemplate($templateName, $content, $content['userid']);
@@ -731,6 +720,21 @@ function SURFBAR_NOTIFY_USER ($messageType, $content) {
        return sendEmail($content['userid'], $subject, $mailText);
 }
 
+// Translates some data for template usage
+// @TODO Can't we use our new expression language instead of this ugly code?
+function SURFBAR_PREPARE_CONTENT_FOR_TEMPLATE ($content) {
+       // Prepare some code
+       if (isset($content['url_status']))      $content['url_status']      = translateSurfbarUrlStatus($content['url_status']);
+       if (isset($content['url_registered']))  $content['url_registered']  = generateDateTime($content['url_registered'], 2);
+       if (isset($content['url_last_locked'])) $content['url_last_locked'] = generateDateTime($content['url_last_locked'], 2);
+       if (isset($content['url_views_total'])) $content['url_views_total'] = translateComma($content['url_views_total']);
+       if (isset($content['url_views_allowed']))   $content['url_views_allowed']   = translateComma($content['url_views_allowed']);
+       if (isset($content['views_max']))       $content['views_max']       = translateComma($content['views_max']);
+
+       // Return translated content
+       return $content;
+}
+
 // Translates the limit
 function translateSurfbarLimit ($limit) {
        // Is this zero?
@@ -841,19 +845,19 @@ function SURFBAR_CHECK_RELOAD_FULL() {
 
        // Ask the database
        $result = SQL_QUERY_ESC("SELECT
-       COUNT(l.id) AS cnt
+       COUNT(l.locks_id) AS cnt
 FROM
        `{?_MYSQL_PREFIX?}_surfbar_locks` AS l
 INNER JOIN
        `{?_MYSQL_PREFIX?}_surfbar_urls` AS u
 ON
-       u.id=l.url_id
+       u.url_id=l.locks_url_id
 WHERE
-       l.userid=%s AND
-       (UNIX_TIMESTAMP() - ".SURFBAR_GET_SURF_LOCK().") < UNIX_TIMESTAMP(l.last_surfed) AND
+       l.locks_userid=%s AND
+       (UNIX_TIMESTAMP() - ".SURFBAR_GET_SURF_LOCK().") < UNIX_TIMESTAMP(l.locks_last_surfed) AND
        (
-               ((UNIX_TIMESTAMP(l.last_surfed) - u.fixed_reload) < 0 AND u.fixed_reload > 0) OR
-               u.fixed_reload = '0'
+               ((UNIX_TIMESTAMP(l.locks_last_surfed) - u.url_fixed_reload) < 0 AND u.url_fixed_reload > 0) OR
+               u.url_fixed_reload = '0'
        )
 LIMIT 1",
                array(getMemberId()), __FUNCTION__, __LINE__
@@ -900,9 +904,14 @@ function SURFBAR_GET_TOTAL_URLS ($status = 'ACTIVE', $excludeUserId = '0') {
        } // END - if
 
        // Get amount from database
-       $result = SQL_QUERY_ESC("SELECT COUNT(`id`) AS cnt
-FROM `{?_MYSQL_PREFIX?}_surfbar_urls`
-WHERE `userid` NOT IN (".implode(', ', $userids['userid']).") AND `status`='%s'",
+       $result = SQL_QUERY_ESC("SELECT
+       COUNT(`url_id`) AS cnt
+FROM
+       `{?_MYSQL_PREFIX?}_surfbar_urls`
+WHERE
+       `url_userid` NOT IN (".implode(', ', $userids['userid']).") AND
+       `url_status`='%s'
+LIMIT 1",
                array($status), __FUNCTION__, __LINE__
        );
 
@@ -923,7 +932,7 @@ function SURFBAR_IF_USER_BOOK_MORE_URLS ($userid = '0') {
 }
 
 // Get total amount of URLs of given status for current user
-function SURFBAR_GET_TOTAL_USER_URLS ($userid = '0', $status = '',$exclude = '') {
+function SURFBAR_GET_TOTAL_USER_URLS ($userid = '0', $status = '', $exclude = '') {
        // Is the user 0 and user is logged in?
        if (($userid == '0') && (isMember())) {
                // Then use this userid
@@ -939,20 +948,20 @@ function SURFBAR_GET_TOTAL_USER_URLS ($userid = '0', $status = '',$exclude = '')
        // Is the status set?
        if (is_array($status)) {
                // Only URLs with these status
-               $add = sprintf(" AND `status` IN('%s')", implode("','", $status));
+               $add = sprintf(" AND `url_status` IN('%s')", implode("','", $status));
        } elseif (!empty($status)) {
                // Only URLs with this status
-               $add = sprintf(" AND `status`='%s'", $status);
+               $add = sprintf(" AND `url_status`='%s'", $status);
        } elseif (is_array($exclude)) {
                // Exclude URLs with these status
-               $add = sprintf(" AND `status` NOT IN('%s')", implode("','", $exclude));
+               $add = sprintf(" AND `url_status` NOT IN('%s')", implode("','", $exclude));
        } elseif (!empty($exclude)) {
                // Exclude URLs with this status
-               $add = sprintf(" AND `status` != '%s'", $exclude);
+               $add = sprintf(" AND `url_status` != '%s'", $exclude);
        }
 
        // Get amount from database
-       $cnt = countSumTotalData($userid, 'surfbar_urls', 'id', 'userid', true, $add);
+       $cnt = countSumTotalData($userid, 'surfbar_urls', 'url_id', 'url_userid', true, $add);
 
        // Return result
        return $cnt;
@@ -1009,8 +1018,8 @@ function SURFBAR_CHECK_VALIDATION_CODE ($urlId, $check, $salt) {
 
        // Return result of checking hashes and salts
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, '---'.$code.'|'.$check.'---', false);
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, '+++'.$salt.'|'.SURFBAR_GET_DATA('last_salt').'+++', false);
-       return (($code == $check) && ($salt == SURFBAR_GET_DATA('last_salt')));
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, '+++'.$salt.'|'.SURFBAR_GET_DATA('salts_last_salt').'+++', false);
+       return (($code == $check) && ($salt == SURFBAR_GET_DATA('salts_last_salt')));
 }
 
 // Lockdown the userid/id combination (reload lock)
@@ -1018,11 +1027,11 @@ function SURFBAR_LOCKDOWN_ID ($urlId) {
        //* DEBUG: */ outputHtml('LOCK!');
        ///* DEBUG: */ return;
        // Just add it to the database
-       SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_locks` (`userid`, `url_id`) VALUES (%s, %s)",
+       SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_locks` (`locks_userid`, `locks_url_id`) VALUES (%s, %s)",
                array(getMemberId(), bigintval($urlId)), __FUNCTION__, __LINE__);
 
        // Remove the salt from database
-       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_surfbar_salts` WHERE `url_id`=%s AND `userid`=%s LIMIT 1",
+       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_surfbar_salts` WHERE `salts_url_id`=%s AND `salts_userid`=%s LIMIT 1",
                array(bigintval($urlId), getMemberId()), __FUNCTION__, __LINE__);
 }
 
@@ -1054,18 +1063,24 @@ function SURFBAR_UPDATE_INSERT_STATS_RECORD () {
        } // END - if
 
        // Update URL stats
-       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_surfbar_urls` SET `views_total`=`views_total`+1".$add." WHERE `id`=%s LIMIT 1",
+       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_surfbar_urls` SET `url_views_total`=`url_views_total`+1".$add." WHERE `url_id`=%s LIMIT 1",
                array(SURFBAR_GET_ID()), __FUNCTION__, __LINE__);
 
        // Update the stats entry
-       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_surfbar_stats` SET `count`=`count`+1 WHERE `userid`=%s AND `url_id`=%s LIMIT 1",
-               array(getMemberId(), SURFBAR_GET_ID()), __FUNCTION__, __LINE__);
+       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_surfbar_stats` SET `stats_count`=`stats_count`+1 WHERE `stats_userid`=%s AND `stats_url_id`=%s LIMIT 1",
+               array(
+                       getMemberId(),
+                       SURFBAR_GET_ID()
+               ), __FUNCTION__, __LINE__);
 
        // Was that update okay?
        if (SQL_AFFECTEDROWS() < 1) {
                // No, then insert entry
-               SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_stats` (userid,url_id,count) VALUES (%s,%s,1)",
-               array(getMemberId(), SURFBAR_GET_ID()), __FUNCTION__, __LINE__);
+               SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_stats` (`stats_userid`, `stats_url_id`, `stats_count`) VALUES (%s,%s,1)",
+                       array(
+                               getMemberId(),
+                               SURFBAR_GET_ID()
+                       ), __FUNCTION__, __LINE__);
        } // END - if
 
        // Update total/daily/weekly/monthly counter
@@ -1084,8 +1099,12 @@ function SURFBAR_UPDATE_SALT_STATS () {
        SURFBAR_UPDATE_INSERT_STATS_RECORD();
 
        // Simply store the salt from cache away in database...
-       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_surfbar_salts` SET `last_salt`='%s' WHERE `url_id`=%s AND `userid`=%s LIMIT 1",
-               array(SURFBAR_GET_SALT(), SURFBAR_GET_ID(), getMemberId()), __FUNCTION__, __LINE__);
+       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_surfbar_salts` SET `salts_last_salt`='%s' WHERE `salts_url_id`=%s AND `salts_userid`=%s LIMIT 1",
+               array(
+                       SURFBAR_GET_SALT(),
+                       SURFBAR_GET_ID(),
+                       getMemberId()
+               ), __FUNCTION__, __LINE__);
 
        // Debug message
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'salt='.SURFBAR_GET_SALT().',id='.SURFBAR_GET_ID().',userid='.getMemberId().'', false);
@@ -1093,7 +1112,7 @@ function SURFBAR_UPDATE_SALT_STATS () {
        // Was that okay?
        if (SQL_AFFECTEDROWS() < 1) {
                // Insert missing entry!
-               SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_salts` (`url_id`, `userid`, `last_salt`) VALUES (%s, %s, '%s')",
+               SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_salts` (`salts_url_id`, `salts_userid`, `salts_last_salt`) VALUES (%s, %s, '%s')",
                        array(SURFBAR_GET_ID(), getMemberId(), SURFBAR_GET_SALT()), __FUNCTION__, __LINE__);
        } // END - if
 
@@ -1108,13 +1127,15 @@ function SURFBAR_UPDATE_SALT_STATS () {
 function SURFBAR_CHECK_RELOAD_LOCK ($urlId) {
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'id=' . $urlId . '', false);
        // Ask the database
-       $result = SQL_QUERY_ESC("SELECT COUNT(`id`) AS cnt
+       $result = SQL_QUERY_ESC("SELECT COUNT(`locks_id`) AS cnt
 FROM
        `{?_MYSQL_PREFIX?}_surfbar_locks`
 WHERE
-       `userid`=%s AND `url_id`=%s AND (UNIX_TIMESTAMP() - ".SURFBAR_GET_SURF_LOCK().") < UNIX_TIMESTAMP(`last_surfed`)
+       `locks_userid`=%s AND
+       `locks_url_id`=%s AND
+       (UNIX_TIMESTAMP() - ".SURFBAR_GET_SURF_LOCK().") < UNIX_TIMESTAMP(`locks_last_surfed`)
 ORDER BY
-       `last_surfed` ASC
+       `locks_last_surfed` ASC
 LIMIT 1",
                array(getMemberId(), bigintval($urlId)), __FUNCTION__, __LINE__
        );
@@ -1148,36 +1169,36 @@ function SURFBAR_DETERMINE_DEPLETED_USERIDS ($limit=0) {
 
                // Get all userid except logged in one
                $result = SQL_QUERY_ESC("SELECT
-       u.userid, UNIX_TIMESTAMP(d.surfbar_low_notified) AS notified
+       u.url_userid, UNIX_TIMESTAMP(d.surfbar_low_notified) AS notified
 FROM
        `{?_MYSQL_PREFIX?}_surfbar_urls` AS u
 INNER JOIN
        `{?_MYSQL_PREFIX?}_user_data` AS d
 ON
-       u.userid=d.userid
+       u.url_userid=d.userid
 WHERE
-       u.userid NOT IN (%s,0) AND u.`status`='ACTIVE'
+       u.url_userid NOT IN (%s,0) AND u.url_status='ACTIVE'
 GROUP BY
-       u.userid
+       u.url_userid
 ORDER BY
-       u.userid ASC",
+       u.url_userid ASC",
                        array(getMemberId()), __FUNCTION__, __LINE__);
        } else {
                // Get all userid
                $result = SQL_QUERY("SELECT
-       u.userid, UNIX_TIMESTAMP(d.surfbar_low_notified) AS notified
+       u.url_userid, UNIX_TIMESTAMP(d.surfbar_low_notified) AS notified
 FROM
        `{?_MYSQL_PREFIX?}_surfbar_urls` AS u
 INNER JOIN
        `{?_MYSQL_PREFIX?}_user_data` AS d
 ON
-       u.userid=d.userid
+       u.url_userid=d.userid
 WHERE
-       u.`status`='ACTIVE'
+       u.url_status='ACTIVE'
 GROUP BY
-       u.userid
+       u.url_userid
 ORDER BY
-       u.userid ASC", __FUNCTION__, __LINE__);
+       u.url_userid ASC", __FUNCTION__, __LINE__);
        }
 
        // Load all userid
@@ -1210,13 +1231,13 @@ ORDER BY
 function SURFBAR_DETERMINE_TOTAL_ONLINE () {
        // Count all users in surfbar modue and return the value
        $result = SQL_QUERY("SELECT
-       `id`
+       `stats_id`
 FROM
        `{?_MYSQL_PREFIX?}_surfbar_stats`
 WHERE
-       (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(`last_surfed`)) <= {?online_timeout?}
+       (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(`stats_last_surfed`)) <= {?online_timeout?}
 GROUP BY
-       `userid` ASC", __FUNCTION__, __LINE__);
+       `stats_userid` ASC", __FUNCTION__, __LINE__);
 
        // Fetch count
        $cnt = SQL_NUMROWS($result);
@@ -1396,13 +1417,13 @@ function SURFBAR_GET_LOCK_IDS () {
        $ignored = array();
 
        // Get all id from locks within the timestamp
-       $result = SQL_QUERY_ESC("SELECT `id`, `url_id`, UNIX_TIMESTAMP(`last_surfed`) AS last_surfed
+       $result = SQL_QUERY_ESC("SELECT `locks_id`, `locks_url_id`, UNIX_TIMESTAMP(`locks_last_surfed`) AS last_surfed
 FROM
        `{?_MYSQL_PREFIX?}_surfbar_locks`
 WHERE
-       `userid`=%s
+       `locks_userid`=%s
 ORDER BY
-       `id` ASC", array(getMemberId()),
+       `locks_id` ASC", array(getMemberId()),
        __FUNCTION__, __LINE__);
 
        // Load all entries
@@ -1446,24 +1467,24 @@ ORDER BY
 function SURFBAR_GET_MAX_RANDOM ($userids, $add) {
        // Count max availabe entries
        $result = SQL_QUERY("SELECT
-       sbu.id AS cnt
+       sbu.url_id AS cnt
 FROM
        `{?_MYSQL_PREFIX?}_surfbar_urls` AS sbu
 LEFT JOIN
        `{?_MYSQL_PREFIX?}_surfbar_salts` AS sbs
 ON
-       sbu.id=sbs.url_id
+       sbu.url_id=sbs.salts_url_id
 LEFT JOIN
        `{?_MYSQL_PREFIX?}_surfbar_locks` AS l
 ON
-       sbu.id=l.url_id
+       sbu.url_id=l.locks_url_id
 WHERE
-       sbu.userid NOT IN (".implode(',', $userids).") AND
-       (sbu.views_allowed=0 OR (sbu.views_allowed > 0 AND sbu.views_max > 0)) AND
-       sbu.`status`='ACTIVE'
+       sbu.url_userid NOT IN (".implode(',', $userids).") AND
+       (sbu.url_views_allowed=0 OR (sbu.url_views_allowed > 0 AND sbu.url_views_max > 0)) AND
+       sbu.url_status='ACTIVE'
        ".$add."
 GROUP BY
-       sbu.id ASC", __FUNCTION__, __LINE__);
+       sbu.url_id ASC", __FUNCTION__, __LINE__);
 
        // Log last query
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'lastQuery='.getConfig('db_last_query').'|numRows='.SQL_NUMROWS($result).'|Affected='.SQL_AFFECTEDROWS().'', false);
@@ -1485,18 +1506,23 @@ function SURFBAR_GET_USER_URLS () {
 
        // Begin the query
        $result = SQL_QUERY_ESC("SELECT
-       u.id, u.userid, u.url, u.status,
-       u.views_total, u.views_max, u.views_allowed,
-       UNIX_TIMESTAMP(u.registered) AS url_registered,
-       UNIX_TIMESTAMP(u.last_locked) AS url_last_locked,
-       u.lock_reason AS lock_reason
+       u.url_id,
+       u.url_userid,
+       u.url,
+       u.url_status,
+       u.url_views_total,
+       u.url_views_max,
+       u.url_views_allowed,
+       UNIX_TIMESTAMP(u.url_registered) AS `url_registered`,
+       UNIX_TIMESTAMP(u.url_last_locked) AS `url_last_locked`,
+       u.url_lock_reason
 FROM
        `{?_MYSQL_PREFIX?}_surfbar_urls` AS u
 WHERE
-       u.userid=%s AND
-       u.status != 'DELETED'
+       u.url_userid=%s AND
+       u.url_status != 'DELETED'
 ORDER BY
-       u.id ASC",
+       u.url_id ASC",
        array(getMemberId()), __FUNCTION__, __LINE__);
 
        // Are there entries?
@@ -1521,7 +1547,7 @@ function SURFBAR_GET_ARRAY_FROM_STATUS ($status) {
        $returnArray = array();
 
        // Get all assigned actions
-       $result = SQL_QUERY_ESC("SELECT `action` FROM `{?_MYSQL_PREFIX?}_surfbar_actions` WHERE `status`='%s' ORDER BY `id` ASC",
+       $result = SQL_QUERY_ESC("SELECT `action` FROM `{?_MYSQL_PREFIX?}_surfbar_actions` WHERE `actions_status`='%s' ORDER BY `actions_id` ASC",
                array($status), __FUNCTION__, __LINE__);
 
        // Some entries there?
@@ -1568,7 +1594,7 @@ function SURFBAR_DETERMINE_NEXT_ID ($urlId = '0') {
                $add = '';
                if (count($USE) > 0) {
                        // Ignore some!
-                       $add = " AND sbu.id NOT IN (";
+                       $add = " AND sbu.url_id NOT IN (";
                        foreach ($USE as $url_id => $lid) {
                                // Add URL id
                                $add .= $url_id.',';
@@ -1592,27 +1618,66 @@ function SURFBAR_DETERMINE_NEXT_ID ($urlId = '0') {
 
                // And query the database
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'randNum='.$randNum.',maxRand='.$maxRand.',surfLock='.SURFBAR_GET_SURF_LOCK().'', false);
-               $result = SQL_QUERY_ESC("SELECT sbu.id, sbu.userid, sbu.url, sbs.last_salt, sbu.views_total, sbu.views_max, sbu.views_allowed, UNIX_TIMESTAMP(l.last_surfed) AS last_surfed, sbu.fixed_reload
-FROM `{?_MYSQL_PREFIX?}_surfbar_urls` AS sbu
-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(',', $userids['userid']).") AND sbu.`status`='ACTIVE' AND (sbu.views_allowed=0 OR (sbu.views_allowed > 0 AND sbu.views_max > 0))".$add."
-GROUP BY sbu.id
-ORDER BY l.last_surfed ASC, sbu.id ASC
+               $result = SQL_QUERY_ESC("SELECT
+       sbu.url_id,
+       sbu.url_userid,
+       sbu.url,
+       sbs.salts_last_salt,
+       sbu.url_views_total,
+       sbu.url_views_max,
+       sbu.url_views_allowed,
+       UNIX_TIMESTAMP(l.locks_last_surfed) AS last_surfed,
+       sbu.url_fixed_reload
+FROM
+       `{?_MYSQL_PREFIX?}_surfbar_urls` AS sbu
+LEFT JOIN
+       `{?_MYSQL_PREFIX?}_surfbar_salts` AS sbs
+ON
+       sbu.url_id=sbs.salts_url_id
+LEFT JOIN
+       `{?_MYSQL_PREFIX?}_surfbar_locks` AS l
+ON
+       sbu.url_id=l.locks_url_id
+WHERE
+       sbu.url_userid NOT IN (".implode(',', $userids['userid']).") AND
+       sbu.url_status='ACTIVE' AND
+       (sbu.url_views_allowed=0 OR (sbu.url_views_allowed > 0 AND sbu.url_views_max > 0))
+       ".$add."
+GROUP BY
+       sbu.url_id
+ORDER BY
+       l.locks_last_surfed ASC,
+       sbu.url_id ASC
 LIMIT %s,1",
                        array($randNum), __FUNCTION__, __LINE__
                );
        } else {
                // Get data from specified id number
-               $result = SQL_QUERY_ESC("SELECT sbu.id, sbu.userid, sbu.url, sbs.last_salt, sbu.views_total, sbu.views_max, sbu.views_allowed, UNIX_TIMESTAMP(l.last_surfed) AS last_surfed, sbu.fixed_reload
-FROM `{?_MYSQL_PREFIX?}_surfbar_urls` AS sbu
-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`='ACTIVE' AND sbu.id=%s AND (sbu.views_allowed=0 OR (sbu.views_allowed > 0 AND sbu.views_max > 0))
+               $result = SQL_QUERY_ESC("SELECT
+       sbu.url_id,
+       sbu.url_userid,
+       sbu.url,
+       sbs.salts_last_salt,
+       sbu.url_views_total,
+       sbu.url_views_max,
+       sbu.url_views_allowed,
+       UNIX_TIMESTAMP(l.locks_last_surfed) AS last_surfed,
+       sbu.url_fixed_reload
+FROM
+       `{?_MYSQL_PREFIX?}_surfbar_urls` AS sbu
+LEFT JOIN
+       `{?_MYSQL_PREFIX?}_surfbar_salts` AS sbs
+ON
+       sbu.url_id=sbs.salts_url_id
+LEFT JOIN
+       `{?_MYSQL_PREFIX?}_surfbar_locks` AS l
+ON
+       sbu.url_id=l.locks_url_id
+WHERE
+       sbu.url_userid != %s AND
+       sbu.url_status='ACTIVE' AND
+       sbu.url_id=%s AND
+       (sbu.url_views_allowed=0 OR (sbu.url_views_allowed > 0 AND sbu.url_views_max > 0))
 LIMIT 1",
                        array(getMemberId(), bigintval($urlId)), __FUNCTION__, __LINE__
                );
@@ -1630,10 +1695,10 @@ LIMIT 1",
                $GLOBALS['surfbar_cache']['time'] = SURFBAR_DETERMINE_WAIT_TIME();
 
                // Is the last salt there?
-               if (is_null($GLOBALS['surfbar_cache']['last_salt'])) {
+               if (is_null($GLOBALS['surfbar_cache']['salts_last_salt'])) {
                        // Then repair it wit the static!
                        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'last_salt - FIXED!', false);
-                       $GLOBALS['surfbar_cache']['last_salt'] = '';
+                       $GLOBALS['surfbar_cache']['salts_last_salt'] = '';
                } // END - if
 
                // Fix missing last_surfed
@@ -1729,13 +1794,13 @@ function SURFBAR_GET_SALT () {
 // Getter for id from cache
 function SURFBAR_GET_ID () {
        // Get data element and return its contents
-       return SURFBAR_GET_DATA('id');
+       return SURFBAR_GET_DATA('url_id');
 }
 
 // Getter for userid from cache
 function SURFBAR_GET_USERID () {
        // Get data element and return its contents
-       return SURFBAR_GET_DATA('userid');
+       return SURFBAR_GET_DATA('url_userid');
 }
 
 // Getter for user reload locks
@@ -1753,13 +1818,19 @@ function SURFBAR_GET_RELOAD_TIME () {
 // Getter for allowed views
 function SURFBAR_GET_VIEWS_ALLOWED () {
        // Get data element and return its contents
-       return SURFBAR_GET_DATA('views_allowed');
+       return SURFBAR_GET_DATA('url_views_allowed');
+}
+
+// Getter for maximum views
+function SURFBAR_GET_VIEWS_MAX () {
+       // Get data element and return its contents
+       return SURFBAR_GET_DATA('url_views_max');
 }
 
 // Getter for fixed reload
 function SURFBAR_GET_FIXED_RELOAD () {
        // Get data element and return its contents
-       return SURFBAR_GET_DATA('fixed_reload');
+       return SURFBAR_GET_DATA('url_fixed_reload');
 }
 
 // Getter for surf lock
index cf56f78..c6c61aa 100644 (file)
@@ -524,13 +524,13 @@ ORDER BY
 
        if (isExtensionActive('surfbar')) {
                // List all URLs in surfbar
-               addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_surfbar_urls` ORDER BY `id` ASC");
+               addSql("SELECT `url_id` FROM `{?_MYSQL_PREFIX?}_surfbar_urls` ORDER BY `url_id` ASC");
                $WHATs[]  = 'list_surfbar_urls';
                $DESCRs[] = getMessage('ADMIN_TASK_LIST_SURFBAR_URLS_ALL');
                $TITLEs[] = getMessage('ADMIN_TASK_LIST_SURFBAR_URLS_ALL_TITLE');
 
                // List all pending URLs in surfbar
-               addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_surfbar_urls` WHERE `status`='PENDING' ORDER BY `id` ASC");
+               addSql("SELECT `url_id` FROM `{?_MYSQL_PREFIX?}_surfbar_urls` WHERE `url_status`='PENDING' ORDER BY `url_id` ASC");
                $WHATs[]  = 'unlock_surfbar_urls';
                $DESCRs[] = getMessage('ADMIN_TASK_LIST_SURFBAR_URLS_PENDING');
                $TITLEs[] = getMessage('ADMIN_TASK_LIST_SURFBAR_URLS_PENDING_TITLE');
index 4a358ca..4d36b16 100644 (file)
@@ -47,12 +47,15 @@ addMenuDescription('admin', __FILE__);
 
 // Load all actions
 $result = SQL_QUERY("SELECT
-       `id`, `status`, `action`, `new_status`
+       `actions_id`,
+       `actions_status`,
+       `actions_action`,
+       `actions_new_status`
 FROM
        `{?_MYSQL_PREFIX?}_surfbar_actions`
 ORDER BY
-       `status` ASC,
-       `action` ASC", __FILE__, __LINE__);
+       `actions_status` ASC,
+       `actions_action` ASC", __FILE__, __LINE__);
 
 // Entries found?
 if (SQL_NUMROWS($result) > 0) {
@@ -60,16 +63,16 @@ if (SQL_NUMROWS($result) > 0) {
        $OUT = ''; $SW = 2;
        while ($content = SQL_FETCHARRAY($result)) {
                // "Translate" some data
-               $content['status']     = translateSurfbarUrlStatus($content['status']);
-               $content['action']     = getMessage(sprintf("MEMBER_SURFBAR_ACTION_%s_SUBMIT", $content['action']));
+               $content['actions_status'] = translateSurfbarUrlStatus($content['actions_status']);
+               $content['actions_action'] = getMessage(sprintf("MEMBER_SURFBAR_ACTION_%s_SUBMIT", $content['actions_action']));
 
                // New status set?
-               if (!is_null($content['new_status'])) {
+               if (!is_null($content['actions_new_status'])) {
                        // Translate it
-                       $content['new_status'] = translateSurfbarUrlStatus($content['new_status']);
+                       $content['actions_new_status'] = translateSurfbarUrlStatus($content['actions_new_status']);
                } else {
                        // "Do nothing" status
-                       $content['new_status'] = getMessage('SURFBAR_URL_STATUS_NONE');
+                       $content['actions_new_status'] = getMessage('SURFBAR_URL_STATUS_NONE');
                }
 
                // Add color
index e9964c1..9afddf7 100644 (file)
@@ -140,14 +140,14 @@ if ($show === false) return false;
 
 // List all URLs
 $result = SQL_QUERY("SELECT
-       `id`, `userid`, `url`, `views_total`, `status` AS `url_status`,
-       UNIX_TIMESTAMP(`registered`) AS url_registered,
-       UNIX_TIMESTAMP(`last_locked`) AS url_last_locked,
-       `lock_reason`
+       `url_id`, `url_userid`, `url`, `url_views_total`, `url_status`,
+       UNIX_TIMESTAMP(`url_registered`) AS `url_registered`,
+       UNIX_TIMESTAMP(`url_last_locked`) AS `url_last_locked`,
+       `url_lock_reason`
 FROM
        `{?_MYSQL_PREFIX?}_surfbar_urls`
 ORDER BY
-       `id` ASC", __FILE__, __LINE__);
+       `url_id` ASC", __FILE__, __LINE__);
 
 // Do we have some URLs left?
 if (SQL_NUMROWS($result) > 0) {
@@ -156,9 +156,9 @@ if (SQL_NUMROWS($result) > 0) {
        while ($content = SQL_FETCHARRAY($result)) {
                // "Translate"/add content
                $content['sw']              = $SW;
-               $content['userid']          = generateUserProfileLink($content['userid']);
+               $content['url_userid']      = generateUserProfileLink($content['url_userid']);
                $content['url']             = generateFrametesterUrl($content['url']);
-               $content['views_total']     = translateComma($content['views_total']);
+               $content['views_total']     = translateComma($content['url_views_total']);
                $content['url_status']      = translateSurfbarUrlStatus($content['url_status']);
                $content['url_registered']  = generateDateTime($content['url_registered'], 2);
                $content['url_last_locked'] = generateDateTime($content['url_last_locked'], 2);
index 58fabb9..54ff5df 100644 (file)
@@ -48,11 +48,17 @@ addMenuDescription('admin', __FILE__);
 // Is the 'url_id' set?
 if (isGetRequestParameterSet(('url_id'))) {
        // Generate general statistics
-       $result = SQL_QUERY_ESC("SELECT `userid`,`count` AS `total_visits`, UNIX_TIMESTAMP(`last_surfed`) AS `last_surfed`
-FROM `{?_MYSQL_PREFIX?}_surfbar_stats`
-WHERE `url_id`=%s
-ORDER BY `userid` ASC",
-       array(bigintval(getRequestParameter('url_id'))), __FILE__, __LINE__);
+       $result = SQL_QUERY_ESC("SELECT
+       `stats_userid`,
+       `stats_count` AS `total_visits`,
+       UNIX_TIMESTAMP(`stats_last_surfed`) AS `last_surfed`
+FROM
+       `{?_MYSQL_PREFIX?}_surfbar_stats`
+WHERE
+       `stats_url_id`=%s
+ORDER BY
+       `stats_userid` ASC",
+               array(bigintval(getRequestParameter('url_id'))), __FILE__, __LINE__);
 
        // Entries found?
        if (SQL_NUMROWS($result) > 0) {
@@ -63,7 +69,7 @@ ORDER BY `userid` ASC",
                        $visits += $content['total_visits'];
 
                        // "Translate" some data
-                       $content['userid']       = generateUserProfileLink($content['userid']);
+                       $content['stats_userid'] = generateUserProfileLink($content['stats_userid']);
                        $content['total_visits'] = translateComma($content['total_visits']);
                        $content['last_surfed']  = generateDateTime($content['last_surfed'], 2);
                        $content['sw']           = $SW;
@@ -90,13 +96,15 @@ ORDER BY `userid` ASC",
 } else {
        // Generate general statistics
        $result = SQL_QUERY("SELECT
-       `userid`, COUNT(`url_id`) AS `visited_urls`, SUM(`count`) AS `total_visits`
+       `stats_userid`,
+       COUNT(`stats_url_id`) AS `visited_urls`,
+       SUM(`stats_count`) AS `total_visits`
 FROM
        `{?_MYSQL_PREFIX?}_surfbar_stats`
 GROUP BY
-       `userid`
+       `stats_userid`
 ORDER BY
-       `userid` ASC", __FILE__, __LINE__);
+       `stats_userid` ASC", __FILE__, __LINE__);
 
        // Entries found?
        if (SQL_NUMROWS($result) > 0) {
@@ -108,7 +116,8 @@ ORDER BY
                        $visits += $content['total_visits'];
 
                        // "Translate" some data
-                       $content['userid']       = generateUserProfileLink($content['userid']);
+                       // @TODO Can't all these translation blocks moved into templates? This code looks ugly.
+                       $content['stats_userid'] = generateUserProfileLink($content['stats_userid']);
                        $content['visited_urls'] = translateComma($content['visited_urls']);
                        $content['total_visits'] = translateComma($content['total_visits']);
                        $content['sw']           = $SW;
index 32a6624..dbde6a5 100644 (file)
@@ -68,13 +68,16 @@ if ((isPostRequestParameterSet('unlock')) && (is_array(postRequestParameter('id'
 
 // List all URLs
 $result = SQL_QUERY("SELECT
-       `id`, `userid`, `url`, UNIX_TIMESTAMP(`registered`) AS url_registered
+       `url_id`,
+       `url_userid`,
+       `url`,
+       UNIX_TIMESTAMP(`url_registered`) AS `url_registered`
 FROM
        `{?_MYSQL_PREFIX?}_surfbar_urls`
 WHERE
-       `status`='PENDING'
+       `url_status`='PENDING'
 ORDER BY
-       `id` ASC", __FILE__, __LINE__);
+       `url_id` ASC", __FILE__, __LINE__);
 
 // Do we have some URLs left?
 if (SQL_NUMROWS($result) > 0) {
index 69a3e24..fb6a5dd 100644 (file)
@@ -201,7 +201,7 @@ if ((SURFBAR_CHECK_RELOAD_FULL()) || ((isGetRequestParameterSet('frame')) && (in
                if ($nextId > 0) {
                        // Then prepare other content
                        $content = array(
-                               'id'          => $nextId,
+                               'url_id'      => $nextId,
                                'check'       => SURFBAR_GENERATE_VALIDATION_CODE($nextId),
                                'salt'        => SURFBAR_GET_SALT(),
                                'reward'      => translateComma(SURFBAR_GET_REWARD($nextId)),
index b4736c8..98ddba1 100644 (file)
@@ -18,7 +18,7 @@ Zuletzt gesperrt: $content[url_last_locked]
 ------------------------------------------
 Sperrgrund: $content[lock_reason]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 
 Mit freundlichen Gr&uuml;&szlig;en,
index 674cf65..0555c8e 100644 (file)
@@ -15,7 +15,7 @@ Neue Mitglieder-Id: $content[userid]
 ------------------------------------------
 Angemeldet: $content[url_registered]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 
 Mit freundlichen Gr&uuml;&szlig;en,
index e49b3ad..4224fed 100644 (file)
@@ -17,7 +17,7 @@ Letzte Sperrung: $content[url_last_locked]
 ------------------------------------------
 Angemeldet: $content[url_registered]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 
 Mit freundlichen Gr&uuml;&szlig;en,
index 8fdbb11..2415c6e 100644 (file)
@@ -17,7 +17,7 @@ Letzte Sperrung: $content[url_last_locked]
 ------------------------------------------
 Angemeldet: $content[url_registered]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 
 Mit freundlichen Gr&uuml;&szlig;en,
index bbea0ce..c45d95b 100644 (file)
@@ -12,7 +12,7 @@ Name: {%user,surname=$userid%} {%user,family=$userid%}
 ------------------------------------------
 Gebuchte URL: $content[url]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 URL angemeldet: $content[url_registered]
 ------------------------------------------
@@ -29,8 +29,6 @@ Verg&uuml;tung/Aufruf: $content[reward] {?POINTS?}
 ------------------------------------------
 Kosten/Aufruf: $content[costs] {?POINTS?}
 ------------------------------------------
-ID in der Surfbar: $content[id]
-------------------------------------------
 
 Mit freundlichen Gr&uuml;&szlig;en,
   Ihr {?MAIN_TITLE?} Script
index 1755637..fd1e121 100644 (file)
@@ -12,7 +12,7 @@ Name: {%user,surname=$userid%} {%user,family=$userid%}
 ------------------------------------------
 Gebuchte URL: $content[url] (Neu: $content[edit][url])
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 URL angemeldet: $content[url_registered]
 ------------------------------------------
index f1df374..c6ffff7 100644 (file)
@@ -12,7 +12,7 @@ Name: {%user,surname=$userid%} {%user,family=$userid%}
 ------------------------------------------
 Gebuchte URL: $content[url]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 URL angemeldet: $content[url_registered]
 ------------------------------------------
index 67063eb..d42f7a7 100644 (file)
@@ -15,7 +15,7 @@ Angemeldet: $content[url_registered]
 ------------------------------------------
 Status: $content[url_status]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 
 Mit freundlichen Gr&uuml;&szlig;en,
index 7ffda23..48aefe3 100644 (file)
@@ -25,7 +25,7 @@ Verg&uuml;tung/Aufruf: $content[reward] {?POINTS?}
 ------------------------------------------
 Kosten/Aufruf: $content[costs] {?POINTS?}
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 
 Mit freundlichen Gr&uuml;&szlig;en,
index 84f4274..c9b8ead 100644 (file)
@@ -12,7 +12,7 @@ Name: {%user,surname=$userid%} {%user,family=$userid%}
 ------------------------------------------
 Gebuchte URL: $content[url]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 URL angemeldet: $content[url_registered]
 ------------------------------------------
@@ -33,8 +33,6 @@ Verg&uuml;tung/Aufruf: $content[reward] {?POINTS?}
 ------------------------------------------
 Kosten/Aufruf: $content[costs] {?POINTS?}
 ------------------------------------------
-ID in der Surfbar: $content[id]
-------------------------------------------
 
 Mit freundlichen Gr&uuml;&szlig;en,
   Ihr {?MAIN_TITLE?} Script
index e1a5294..fe91558 100644 (file)
@@ -12,7 +12,7 @@ Name: {%user,surname=$userid%} {%user,family=$userid%}
 ------------------------------------------
 Gebuchte URL: $content[url]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 URL angemeldet: $content[url_registered]
 ------------------------------------------
index a3e5bb7..ce03b4d 100644 (file)
@@ -12,7 +12,7 @@ Name: {%user,surname=$userid%} {%user,family=$userid%}
 ------------------------------------------
 Gebuchte URL: $content[url]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 URL angemeldet: $content[url_registered]
 ------------------------------------------
index d64635c..1d26684 100644 (file)
@@ -12,7 +12,7 @@ Name: {%user,surname=$userid%} {%user,family=$userid%}
 ------------------------------------------
 Gebuchte URL: $content[url] (Neu: $content[edit][url])
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 URL angemeldet: $content[url_registered]
 ------------------------------------------
index c92846f..2eab142 100644 (file)
@@ -12,7 +12,7 @@ Name: {%user,surname=$userid%} {%user,family=$userid%}
 ------------------------------------------
 Gebuchte URL: $content[url]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 URL angemeldet: $content[url_registered]
 ------------------------------------------
index b12b435..289be22 100644 (file)
@@ -21,7 +21,7 @@ Verg&uuml;tung/Aufruf: $content[reward] {?POINTS?}
 ------------------------------------------
 Kosten/Aufruf: $content[costs] {?POINTS?}
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 
 Mit freundlichen Gr&uuml;&szlig;en,
index a58344f..bdc1d94 100644 (file)
@@ -12,7 +12,7 @@ Name: {%user,surname=$userid%} {%user,family=$userid%}
 ------------------------------------------
 Gebuchte URL: $content[url]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 URL angemeldet: $content[url_registered]
 ------------------------------------------
@@ -29,8 +29,6 @@ Verg&uuml;tung/Aufruf: $content[reward] {?POINTS?}
 ------------------------------------------
 Kosten/Aufruf: $content[costs] {?POINTS?}
 ------------------------------------------
-ID in der Surfbar: $content[id]
-------------------------------------------
 
 Mit freundlichen Gr&uuml;&szlig;en,
   Ihr {?MAIN_TITLE?} Script
index ffe2c5d..c34989b 100644 (file)
@@ -12,7 +12,7 @@ Name: {%user,surname=$userid%} {%user,family=$userid%}
 ------------------------------------------
 Gebuchte URL: $content[url]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 URL angemeldet: $content[url_registered]
 ------------------------------------------
@@ -29,8 +29,6 @@ Verg&uuml;tung/Aufruf: $content[reward] {?POINTS?}
 ------------------------------------------
 Kosten/Aufruf: $content[costs] {?POINTS?}
 ------------------------------------------
-ID in der Surfbar: $content[id]
-------------------------------------------
 
 Mit freundlichen Gr&uuml;&szlig;en,
   Ihr {?MAIN_TITLE?} Script
index 90b5c1f..f760cea 100644 (file)
@@ -12,7 +12,7 @@ Name: {%user,surname=$userid%} {%user,family=$userid%}
 ------------------------------------------
 Gebuchte URL: $content[url]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 URL angemeldet: $content[url_registered]
 ------------------------------------------
@@ -29,8 +29,6 @@ Verg&uuml;tung/Aufruf: $content[reward] {?POINTS?}
 ------------------------------------------
 Kosten/Aufruf: $content[costs] {?POINTS?}
 ------------------------------------------
-ID in der Surfbar: $content[id]
-------------------------------------------
 
 Mit freundlichen Gr&uuml;&szlig;en,
   Ihr {?MAIN_TITLE?} Script
index ed6cf86..69be42d 100644 (file)
@@ -15,7 +15,7 @@ Angemeldet: $content[url_registered]
 ------------------------------------------
 Status: $content[url_status]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 
 Mit freundlichen Gr&uuml;&szlig;en,
index b4ffaa0..74f6dd8 100644 (file)
@@ -12,7 +12,7 @@ Name: {%user,surname=$userid%} {%user,family=$userid%}
 ------------------------------------------
 Gebuchte URL: $content[url]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 URL angemeldet: $content[url_registered]
 ------------------------------------------
index d0df013..f6ab6fc 100644 (file)
@@ -12,7 +12,7 @@ Name: {%user,surname=$userid%} {%user,family=$userid%}
 ------------------------------------------
 Gebuchte URL: $content[url]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 URL angemeldet: $content[url_registered]
 ------------------------------------------
@@ -29,8 +29,6 @@ Verg&uuml;tung/Aufruf: $content[reward] {?POINTS?}
 ------------------------------------------
 Kosten/Aufruf: $content[costs] {?POINTS?}
 ------------------------------------------
-ID in der Surfbar: $content[id]
-------------------------------------------
 
 Mit freundlichen Gr&uuml;&szlig;en,
   Ihr {?MAIN_TITLE?} Script
index 6a2c192..f149f0e 100644 (file)
@@ -12,7 +12,7 @@ Name: {%user,surname=$userid%} {%user,family=$userid%}
 ------------------------------------------
 Gebuchte URL: $content[url] (Neu: $content[edit][url])
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 URL angemeldet: $content[url_registered]
 ------------------------------------------
index 8e064ce..476da80 100644 (file)
@@ -17,7 +17,7 @@ Letzte Sperrung: $content[url_last_locked]
 ------------------------------------------
 Angemeldet: $content[url_registered]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 
 Mit freundlichen Gr&uuml;&szlig;en,
index 95dc885..f33c843 100644 (file)
@@ -12,7 +12,7 @@ Aufrufe gesamt: $content[views_total]
 ------------------------------------------
 Angemeldet: $content[url_registered]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 
 Mit freundlichen Gr&uuml;&szlig;en,
index 553d56a..557b500 100644 (file)
@@ -12,7 +12,7 @@ Angemeldet: $content[url_registered]
 ------------------------------------------
 Ihre Mitglieder-Id: $content[userid]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 
 Mit freundlichen Gr&uuml;&szlig;en,
index 7247429..ef2ecea 100644 (file)
@@ -10,7 +10,7 @@ Angemeldet: $content[url_registered]
 ------------------------------------------
 Ihre Mitglieder-Id: $content[userid]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 
 Mit freundlichen Gr&uuml;&szlig;en,
index d8b47a0..331522d 100644 (file)
@@ -12,7 +12,7 @@ Angemeldet: $content[url_registered]
 ------------------------------------------
 Ihre Mitglieder-Id: $content[userid]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 
 Mit freundlichen Gr&uuml;&szlig;en,
index e71a90e..a1a6e6e 100644 (file)
@@ -8,7 +8,7 @@ Mitglieder-Id: $content[userid]
 ------------------------------------------
 Gebuchte URL: $content[url]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 URL angemeldet: $content[url_registered]
 ------------------------------------------
index 8102f79..f3ed2bd 100644 (file)
@@ -8,7 +8,7 @@ Mitglieder-Id: $content[userid]
 ------------------------------------------
 Gebuchte URL: $content[url] (Neu: $content[edit][url])
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 URL angemeldet: $content[url_registered]
 ------------------------------------------
index 36adbbc..54f8bec 100644 (file)
@@ -8,7 +8,7 @@ Mitglieder-Id: $content[userid]
 ------------------------------------------
 Gebuchte URL: $content[url]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 URL angemeldet: $content[url_registered]
 ------------------------------------------
index 1b74263..1af3c4f 100644 (file)
@@ -10,7 +10,7 @@ Ihre Mitglieder-Id: $content[userid]
 ------------------------------------------
 Status: $content[url_status]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 
 Mit freundlichen Gr&uuml;&szlig;en,
index 18eeeff..243c4bf 100644 (file)
@@ -20,7 +20,7 @@ Davon &uuml;brig: $content[views_max]
 ------------------------------------------
 Kosten/Aufruf: $content[costs] {?POINTS?}
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 
 Wenn Sie die URL dennoch weiterlaufen wollen, so loggen Sie sich bitte im Mitgliedsbereich ein und stellen Sie erneut Einblendungen oder auf unendlich ein.
index fdbde64..74d2830 100644 (file)
@@ -8,7 +8,7 @@ Mitglieder-Id: $content[userid]
 ------------------------------------------
 Gebuchte URL: $content[url]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 URL angemeldet: $content[url_registered]
 ------------------------------------------
index a595e77..f019423 100644 (file)
@@ -8,7 +8,7 @@ Mitglieder-Id: $content[userid]
 ------------------------------------------
 Gebuchte URL: $content[url]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 URL angemeldet: $content[url_registered]
 ------------------------------------------
index 94836f7..065f81b 100644 (file)
@@ -8,7 +8,7 @@ Mitglieder-Id: $content[userid]
 ------------------------------------------
 Gebuchte URL: $content[url]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 URL angemeldet: $content[url_registered]
 ------------------------------------------
index a26ea58..6aefb5e 100644 (file)
@@ -8,7 +8,7 @@ Mitglieder-Id: $content[userid]
 ------------------------------------------
 Gebuchte URL: $content[url] (Neu: $content[edit][url])
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 URL angemeldet: $content[url_registered]
 ------------------------------------------
index fec218e..5f04940 100644 (file)
@@ -8,7 +8,7 @@ Mitglieder-Id: $content[userid]
 ------------------------------------------
 Gebuchte URL: $content[url]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 URL angemeldet: $content[url_registered]
 ------------------------------------------
index 464592d..558ad5b 100644 (file)
@@ -14,7 +14,7 @@ Datum der Buchung: $content[url_registered]
 ------------------------------------------
 Kosten/Aufruf: $content[costs] {?POINTS?}
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 
 Wir werden Ihre URL bald kontrollieren und dann freigeben.
index 1b765ee..ae1d5da 100644 (file)
@@ -8,7 +8,7 @@ Mitglieder-Id: $content[userid]
 ------------------------------------------
 Gebuchte URL: $content[url]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 URL angemeldet: $content[url_registered]
 ------------------------------------------
index 2eecc79..852359e 100644 (file)
@@ -8,7 +8,7 @@ Mitglieder-Id: $content[userid]
 ------------------------------------------
 Gebuchte URL: $content[url]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 URL angemeldet: $content[url_registered]
 ------------------------------------------
index fca1f23..83e054d 100644 (file)
@@ -8,7 +8,7 @@ Mitglieder-Id: $content[userid]
 ------------------------------------------
 Gebuchte URL: $content[url]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 URL angemeldet: $content[url_registered]
 ------------------------------------------
index 205c0d1..c6d58f5 100644 (file)
@@ -10,7 +10,7 @@ Ihre Mitglieder-Id: $content[userid]
 ------------------------------------------
 Status: $content[url_status]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 
 Mit freundlichen Gr&uuml;&szlig;en,
index 12cc884..b00ce37 100644 (file)
@@ -8,7 +8,7 @@ Mitglieder-Id: $content[userid]
 ------------------------------------------
 Gebuchte URL: $content[url] (Neu: $content[edit][url])
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 URL angemeldet: $content[url_registered]
 ------------------------------------------
index 6fc0ebd..ce8ad48 100644 (file)
@@ -8,7 +8,7 @@ Mitglieder-Id: $content[userid]
 ------------------------------------------
 Gebuchte URL: $content[url]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 URL angemeldet: $content[url_registered]
 ------------------------------------------
index 63a3eb5..a8ce779 100644 (file)
@@ -8,7 +8,7 @@ Mitglieder-Id: $content[userid]
 ------------------------------------------
 Gebuchte URL: $content[url] (Neu: $content[edit][url])
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 URL angemeldet: $content[url_registered]
 ------------------------------------------
index 1f86d6c..5e36fc9 100644 (file)
@@ -12,7 +12,7 @@ Angemeldet: $content[url_registered]
 ------------------------------------------
 Ihre Mitglieder-Id: $content[userid]
 ------------------------------------------
-ID in der Surfbar: $content[id]
+ID in der Surfbar: $content[url_id]
 ------------------------------------------
 
 Mit freundlichen Gr&uuml;&szlig;en,
index 0c73084..4e21088 100644 (file)
@@ -1,8 +1,8 @@
 <tr>
        <td align="center" class="bottom right switch_sw$content[sw]">
-               <input type="hidden" name="id[$content[id]]" value="1" />
-               <input type="hidden" name="userid_raw[$content[id]]" value="$content[userid_raw]" />
-               $content[userid]
+               <input type="hidden" name="id[$content[url_id]]" value="1" />
+               <input type="hidden" name="userid_raw[$content[url_id]]" value="$content[userid_raw]" />
+               $content[url_userid]
        </td>
        <td align="center" class="bottom right switch_sw$content[sw]">
                <a href="$content[url]" target="_blank" title="{--ADMIN_TEST_URL--}">{--ADMIN_TEST_URL--}</a>
index 41b5ff8..c105ae3 100644 (file)
@@ -1,10 +1,10 @@
 <tr>
        <td align="center" class="bottom right switch_sw$content[sw]">
-               <input type="hidden" name="id[$content[id]]" value="1" />
-               <input type="hidden" name="userid_raw[$content[id]]" value="$content[userid_raw]" />
-               $content[userid]
+               <input type="hidden" name="id[$content[url_id]]" value="1" />
+               <input type="hidden" name="userid_raw[$content[url_id]]" value="$content[userid_raw]" />
+               $content[url_userid]
        </td>
        <td align="center" class="bottom right switch_sw$content[sw]">
-               <input type="text" name="url[$content[id]]" size="20" maxlength="255" value="$content[url]" />
+               <input type="text" name="url[$content[url_id]]" size="20" maxlength="255" value="$content[url]" />
        </td>
 </tr>
index c84c9d5..afdb904 100644 (file)
@@ -1,14 +1,14 @@
 <tr>
        <td align="center" class="bottom right switch_sw$content[sw]">
-               <input type="checkbox" class="admin_normal" title="{--ID_SELECT--} $content[id]" name="id[$content[id]]" value="1" />
+               <input type="checkbox" class="admin_normal" title="{--ID_SELECT--} $content[actions_id]" name="id[$content[actions_id]]" value="1" />
        </td>
        <td align="center" class="bottom right switch_sw$content[sw]">
-               $content[status]
+               $content[actions_status]
        </td>
        <td align="center" class="bottom right switch_sw$content[sw]">
-               $content[action]
+               $content[actions_action]
        </td>
        <td align="center" class="bottom switch_sw$content[sw]">
-               $content[new_status]
+               $content[actions_new_status]
        </td>
 </tr>
index 36471a6..25bed4a 100644 (file)
@@ -1,15 +1,15 @@
 <tr>
        <td align="center" class="bottom right switch_sw$content[sw]">
-               <input type="checkbox" class="admin_normal" title="{--ID_SELECT--} $content[id]" name="id[$content[id]]" value="1" />
+               <input type="checkbox" class="admin_normal" title="{--ID_SELECT--} $content[url_id]" name="id[$content[url_id]]" value="1" />
        </td>
        <td align="center" class="bottom right switch_sw$content[sw]">
-               $content[userid]
+               $content[url_userid]
        </td>
        <td align="center" class="bottom right switch_sw$content[sw]">
                <a href="$content[url]" target="_blank" title="{--ADMIN_TEST_URL--}">{--ADMIN_TEST_URL--}</a>
        </td>
        <td align="center" class="bottom right switch_sw$content[sw]">
-               <a href="{%url=modules.php?module=admin&amp;what=surfbar_stats&amp;url_id=$content[id]%}">$content[views_total]</a>
+               <a href="{%url=modules.php?module=admin&amp;what=surfbar_stats&amp;url_id=$content[url_id]%}">$content[views_total]</a>
        </td>
        <td align="center" class="bottom right switch_sw$content[sw]">
                $content[url_status]
index 5e1afc1..c9df9ba 100644 (file)
@@ -1,21 +1,21 @@
 <tr>
        <td align="center" class="bottom right switch_sw$content[sw]">
-               <input type="hidden" name="id[$content[id]]" value="1" />
-               <input type="hidden" name="userid_raw[$content[id]]" value="$content[userid_raw]" />
-               <input type="hidden" name="last_locked[$content[id]]" value="NOW()" />
-               $content[userid]
+               <input type="hidden" name="id[$content[url_id]]" value="1" />
+               <input type="hidden" name="userid_raw[$content[url_id]]" value="$content[url_userid_raw]" />
+               <input type="hidden" name="last_locked[$content[url_id]]" value="NOW()" />
+               $content[url_userid]
        </td>
        <td align="center" class="bottom right switch_sw$content[sw]">
                <a href="$content[url]" target="_blank" title="{--ADMIN_TEST_URL--}">{--ADMIN_TEST_URL--}</a>
        </td>
        <td align="center" class="bottom right switch_sw$content[sw]">
-               $content[status]
+               $content[url_status]
        </td>
        <td align="center" class="bottom right switch_sw$content[sw]">
-               $content[registered]
+               $content[url_registered]
        </td>
        <td align="center" class="bottom switch_sw$content[sw]">
                Bitte angeben:<br />
-               <textarea name="lock_reason[$content[id]]" rows="2" cols="15"></textarea>
+               <textarea name="lock_reason[$content[url_id]]" rows="2" cols="15"></textarea>
        </td>
 </tr>
index fd2bfae..6f92d20 100644 (file)
@@ -1,5 +1,5 @@
 <tr>
-       <td align="center" class="switch_$content[sw] bottom right">[<strong>$content[userid]</strong>]</td>
+       <td align="center" class="switch_$content[sw] bottom right">$content[stats_userid]</td>
        <td align="center" class="switch_$content[sw] bottom right">$content[visited_urls]</td>
        <td align="center" class="switch_$content[sw] bottom">$content[total_visits]</td>
 </tr>
index b2b82a8..51a4d81 100644 (file)
@@ -1,5 +1,5 @@
 <tr>
-       <td align="center" class="switch_$content[sw] bottom right">[<strong>$content[userid]</strong>]</td>
+       <td align="center" class="switch_$content[sw] bottom right">[<strong>$content[url_userid]</strong>]</td>
        <td align="center" class="switch_$content[sw] bottom right">$content[total_visits]</td>
        <td align="center" class="switch_$content[sw] bottom">$content[last_surfed]</td>
 </tr>
index 1770775..901ed2e 100644 (file)
@@ -1,16 +1,16 @@
 <tr>
        <td align="center" class="bottom right switch_sw$content[sw]">
-               <input type="hidden" name="id[$content[id]]" value="1" />
-               <input type="hidden" name="userid_raw[$content[id]]" value="$content[userid_raw]" />
-               $content[userid]
+               <input type="hidden" name="id[$content[url_id]]" value="1" />
+               <input type="hidden" name="userid_raw[$content[url_id]]" value="$content[url_userid_raw]" />
+               $content[url_userid]
        </td>
        <td align="center" class="bottom right switch_sw$content[sw]">
                <a href="$content[url]" target="_blank" title="{--ADMIN_TEST_URL--}">{--ADMIN_TEST_URL--}</a>
        </td>
        <td align="center" class="bottom right switch_sw$content[sw]">
-               $content[status]
+               $content[url_status]
        </td>
        <td align="center" class="bottom switch_sw$content[sw]">
-               $content[registered]
+               $content[url_registered]
        </td>
 </tr>
index 4d797f2..477c08d 100644 (file)
@@ -1,9 +1,9 @@
 <tr>
        <td align="center" class="bottom right switch_sw$content[sw]">
-               <input type="checkbox" class="admin_normal" title="{--ID_SELECT--} $content[id]" name="id[$content[id]]" value="1" />
+               <input type="checkbox" class="admin_normal" title="{--ID_SELECT--} $content[url_id]" name="id[$content[url_id]]" value="1" />
        </td>
        <td align="center" class="bottom right switch_sw$content[sw]">
-               $content[userid]
+               $content[url_userid]
        </td>
        <td align="center" class="bottom right switch_sw$content[sw]">
                $content[url]
index a4bb250..32f7ec8 100644 (file)
@@ -22,7 +22,7 @@
 
        <div class="member_title top" style="padding-top:5px;padding-bottom:5px">
                <input type="reset" class="member_reset" value="{--CLEAR_FORM--}" />
-               <input type="hidden" name="id" value="$content[id]" />
+               <input type="hidden" name="id" value="$content[url_id]" />
                <input type="hidden" name="action" value="delete" />
                <input type="hidden" name="execute" value="1" />
                <input type="submit" class="member_submit" name="ok" value="{--MEMBER_SURFBAR_ACTION_DELETE_NOW_SUBMIT--}" />
index 63cebdb..68cc5f9 100644 (file)
@@ -21,7 +21,7 @@
 
        <div class="member_title top" style="padding-top:5px;padding-bottom:5px">
                <input type="reset" class="member_reset" value="{--CLEAR_FORM--}" />
-               <input type="hidden" name="id" value="$content[id]" />
+               <input type="hidden" name="id" value="$content[url_id]" />
                <input type="hidden" name="action" value="edit" />
                <input type="hidden" name="execute" value="1" />
                <input type="submit" class="member_submit" name="ok" value="{--MEMBER_SURFBAR_ACTION_EDIT_NOW_SUBMIT--}" />
index 1641276..0b9dc16 100644 (file)
@@ -1,6 +1,6 @@
 <td align="center" width="$content[width]%%">
        <form accept-charset="utf-8" action="{%url=modules.php?module=login&amp;what=surfbar_list%}" method="post">
-               <input type="hidden" name="id" value="$content[id]" />
+               <input type="hidden" name="id" value="$content[url_id]" />
                <input type="hidden" name="action" value="$content[action]" />
                <input type="submit" class="member_submit" name="ok" title="$content[title]" value="$content[submit]" />
        </form>
index 5dccbdc..5b693f8 100644 (file)
@@ -48,7 +48,7 @@ function Init() {
 }
 
 function Confirm() {
-       parent.surfbar_url.location="{%url=surfbar.php?id=$content[id]&check=$content[check]&salt=$content[salt]%}";
+       parent.surfbar_url.location="{%url=surfbar.php?id=$content[url_id]&check=$content[check]&salt=$content[salt]%}";
 }
 
 function ReloadThis() {