Login form for guests in surfbar added, some trigger_error() added, misc rewrites
authorRoland Häder <roland@mxchange.org>
Wed, 7 Oct 2009 19:59:56 +0000 (19:59 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 7 Oct 2009 19:59:56 +0000 (19:59 +0000)
25 files changed:
.gitattributes
beg.php
confirm.php
css.php
debug.php
inc/config-functions.php
inc/databases.php
inc/extensions.php
inc/extensions/ext-surfbar.php
inc/functions.php
inc/handler.php
inc/language-functions.php
inc/language/surfbar_de.php
inc/libs/surfbar_functions.php
inc/libs/user_functions.php
inc/modules/admin/what-config_surfbar.php
inc/mysql-connect.php
inc/wrapper-functions.php
install.php
js.php
modules.php
surfbar.php
templates/de/html/admin/admin_config_surfbar.tpl
templates/de/html/surfbar/surfbar_login_form.tpl [new file with mode: 0644]
view.php

index 1b24abb..28ddfde 100644 (file)
@@ -1542,6 +1542,7 @@ templates/de/html/surfbar/surfbar_frame_stats.tpl -text
 templates/de/html/surfbar/surfbar_frame_textlinks.tpl -text
 templates/de/html/surfbar/surfbar_frame_top.tpl -text
 templates/de/html/surfbar/surfbar_frameset.tpl -text
+templates/de/html/surfbar/surfbar_login_form.tpl -text
 templates/de/html/surfbar/surfbar_start_banner.tpl -text
 templates/de/html/surfbar/surfbar_stopped.tpl -text
 templates/de/html/task/.htaccess -text
diff --git a/beg.php b/beg.php
index 27bb97d..29ed819 100644 (file)
--- a/beg.php
+++ b/beg.php
@@ -237,5 +237,5 @@ if (REQUEST_ISSET_GET('uid')) {
 // Really all done here... ;-)
 shutdown();
 
-//
+// [EOF]
 ?>
index 41ca856..53446c5 100644 (file)
@@ -68,5 +68,5 @@ if ((isInstalled()) && (isAdminRegistered())) {
 // Really all done here... ;-)
 shutdown();
 
-//
+// [EOF]
 ?>
diff --git a/css.php b/css.php
index 4a9c8ed..608c11e 100644 (file)
--- a/css.php
+++ b/css.php
@@ -61,5 +61,5 @@ loadInclude('inc/stylesheet.php');
 // Load footer
 loadIncludeOnce('inc/footer.php');
 
-//
+// [EOF]
 ?>
index f7e28dc..4bf0774 100644 (file)
--- a/debug.php
+++ b/debug.php
@@ -88,5 +88,5 @@ if ((isInstalled()) && (getTotalFatalErrors() == 0)) {
 // Really all done here... ;-)
 shutdown();
 
-//
+// [EOF]
 ?>
index c70857e..fe1e3d7 100644 (file)
@@ -42,9 +42,24 @@ if (!defined('__SECURITY')) {
        require($INC);
 }
 
-// Merges $GLOBALS['config'] with data in given array
-function mergeConfig ($newConfig) {
-       $GLOBALS['config'] = merge_array(getConfigArray(), $newConfig);
+// Init the config array
+function initConfig () {
+       // Init not if already found
+       if ((isset($GLOBALS['config'])) && (count($GLOBALS['config']) >= 3)) {
+               // Already initialized
+               trigger_error(sprintf("[%s:%s] Configuration is already initialized.", __FUNCTION__, __LINE__));
+       } // END - if
+
+       // Set a minimum dummy configuration
+       $GLOBALS['config'] = array(
+               'code_length'   => 0,
+               'patch_level'   => 0,
+               'last_update'   => time(),
+               'DEBUG_MODE'    => 'N',
+               'sql_count'     => 0,
+               'num_templates' => 0,
+               'default_theme' => 'default',
+       );
 }
 
 // Getter for $GLOBALS['config'] entries
@@ -53,13 +68,13 @@ function getConfig ($configEntry) {
        $value = null;
 
        // Is the entry there?
-       if (isConfigEntrySet($configEntry)) {
-               // Then use it
-               $value = $GLOBALS['config'][$configEntry];
+       if (!isConfigEntrySet($configEntry)) {
+               // Raise an error of missing entries
+               trigger_error(sprintf("[%s:%s] Configuration entry <em>%s</em> is missing.", __FUNCTION__, __LINE__, $configEntry));
        } // END - if
 
        // Return it
-       return $value;
+       return $GLOBALS['config'][$configEntry];
 }
 
 // Setter for $GLOBALS['config'] entries
@@ -82,6 +97,11 @@ function isConfigEntrySet ($configEntry) {
        return (isset($GLOBALS['config'][$configEntry]));
 }
 
+// Merges $GLOBALS['config'] with data in given array
+function mergeConfig ($newConfig) {
+       $GLOBALS['config'] = merge_array(getConfigArray(), $newConfig);
+}
+
 // Increment or init with given value or 1 as default the given config entry
 function incrementConfigEntry ($configEntry, $value=1) {
        // Increment it if set or init it with 1
@@ -98,16 +118,6 @@ function isConfigLoaded () {
        return ((isset($GLOBALS['config'])) && (is_array($GLOBALS['config'])) && (count($GLOBALS['config']) > 0));
 }
 
-// Init the config array
-function initConfig () {
-       // Set a minimum dummy configuration
-       $GLOBALS['config'] = array(
-               'code_length' => 0,
-               'patch_level' => 0,
-               'last_update' => time()
-       );
-}
-
 // Load configuration and return it as an arry
 function loadConfiguration ($no = '0') {
        // Check for cache extension, cache-array and if the requested configuration is in cache
index ff3555e..f4cf158 100644 (file)
@@ -93,7 +93,6 @@ $GLOBALS['replacer'] = array(
 // One day
 setConfigEntry('one_day', (60*60*24));
 
-//
 // Timestamp for yesterday, today ... all at 00:00 am
 setConfigEntry('START_YDAY', makeTime(0, 0, 0, time() - getConfig('one_day')));
 setConfigEntry('START_TDAY', makeTime(0, 0, 0, time()));
index 1b17f11..d50ff70 100644 (file)
@@ -93,7 +93,7 @@ function LOAD_EXTENSION ($ext_name, $EXT_LOAD_MODE = '', $EXT_VER = '', $dry_run
                loadIncludeOnce($funcsInclude);
        } elseif ((isDebugModeEnabled()) && ($ext_name != 'sql_patches') && (substr($ext_name, 0, 10) != 'admintheme')) {
                // No functions file is not so good...
-               DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("WARNING: Extension %s has no own functions file or we cannot read from it.",
+               DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("NOTICE: Extension %s has no own functions file or we cannot read from it.",
                        $ext_name
                ));
        } // END - if
index 78bac49..9a1845f 100644 (file)
@@ -172,6 +172,7 @@ UNIQUE KEY `status_action` (`status`,`action`)
                ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_low_interval` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".getConfig('one_day')."");
                ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_migrate_order` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
                ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_notification_mode` ENUM('INSTANT','RESET') NOT NULL DEFAULT 'INSTANT'");
+               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_guest_login_form` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
 
                // Extend user data
                ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `surfbar_low_notified` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'");
index 5081127..fa2b69e 100644 (file)
@@ -2654,7 +2654,7 @@ function debug_report_bug ($message = '') {
        if (!empty($message)) {
                // Use and log it
                $debug = sprintf("Note: %s<br />\n",
-               $message
+                       $message
                );
 
                // @TODO Add a little more infos here
index 344b88a..1c28ca8 100644 (file)
@@ -52,17 +52,8 @@ function __errorHandler ($errno, $errstr, $errfile, $errline) {
                $errline
        );
 
-       // Write debug log message
-       DEBUG_LOG($errfile, $errline, $message, true);
-
        // Output message to user and die
-       if (EXT_IS_ACTIVE('debug')) {
-               // Debug extension found! So Output a small message
-               app_die($errfile, $errline, "Error message written to debug.log. Please try to call <a href=\"{!URL!}\">the main page</a> to continue.");
-       } elseif ($GLOBALS['error_handler']['exit_on_error'] === true) {
-               // No debug extension found, so regular output
-               debug_report_bug($message);
-       }
+       debug_report_bug($message);
 }
 
 // Init error handler
index c2cde5f..693fed1 100644 (file)
@@ -146,7 +146,7 @@ function loadLanguageFile ($ext_name = '') {
                loadIncludeOnce($languageInclude);
        } elseif ((isDebugModeEnabled()) && ($ext_name != 'sql_patches') && (substr($ext_name, 0, 10) != 'admintheme')) {
                // No language file is not so good...
-               DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("WARNING: Extension %s has no language file or we cannot read from it. lang=%s",
+               DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("NOTICE: Extension %s has no language file or we cannot read from it. lang=%s",
                        $ext_name, getLanguage()
                ));
        }
index 9aec4dd..31404c6 100644 (file)
@@ -71,6 +71,9 @@ define('ADMIN_CONFIG_SURFBAR_LOW_INTERVAL', "Wiederholungsinterval f&uuml;r Nach
 define('ADMIN_CONFIG_SURFBAR_NOTIFICATION_MODE', "Benachrichtigungen sofort oder beim t&auml;glichen Reset aussenden? (&quot;Sofort&quot; kann zu Verz&ouml;gerungen und/oder Belastung des Servers f&uuml;hren!");
 define('ADMIN_CONFIG_SURFBAR_NOTIFICATION_MODE_INSTANT', "Sofort aussenden");
 define('ADMIN_CONFIG_SURFBAR_NOTIFICATION_MODE_RESET', "Beim t&auml;glichen Reset");
+define('ADMIN_CONFIG_SURFBAR_GUEST_LOGIN_FORM', "Soll bei Aufruf der Surfbar durch einen Gast ein Loginformular angezeigt oder zur Startseite weitergeleitet werden?");
+define('ADMIN_CONFIG_SURFBAR_GUEST_LOGIN_FORM_Y', "Loginformular angzeigen.");
+define('ADMIN_CONFIG_SURFBAR_GUEST_LOGIN_FORM_N', "Zur Startseite weiterleiten.");
 
 // Admin non-config titles
 define('ADMIN_SURFBAR_STATS_TITLE', "Mitglieder-Statistik der Surfbar");
@@ -244,5 +247,7 @@ define('MEMBER_SURFBAR_EXECUTE_ACTION_404', "Auszuf&uuml;hrende Funktion <span c
 define('ADMIN_SURFBAR_NOTIFY_SUBJECT_404', "Admin-Betreffzeile %s nicht gefunden.");
 define('MEMBER_SURFBAR_NOTIFY_SUBJECT_404', "Mitglieder-Betreffzeile %s nicht gefunden.");
 
+// Guest texts
+define('GUEST_SURFBAR_LOGIN_HEADER', "Login zur Surfbar:");
 //
 ?>
index 08b2bd1..10a2ba6 100644 (file)
@@ -879,6 +879,12 @@ function SURFBAR_GET_TOTAL_URLS ($status = 'ACTIVE', $excludeUserId = 0) {
        // Determine depleted user account
        $UIDs = SURFBAR_DETERMINE_DEPLETED_USERIDS();
 
+       // If we dont get any user ids back, there are no URLs
+       if (count($UIDs['uid']) == 0) {
+               // No user ids found, no URLs!
+               return 0;
+       } // END - if
+
        // Is the exlude userid set?
        if ($excludeUserId > 0) {
                // Then add it
@@ -886,10 +892,10 @@ function SURFBAR_GET_TOTAL_URLS ($status = 'ACTIVE', $excludeUserId = 0) {
        } // END - if
 
        // Get amount from database
-       $result = SQL_QUERY_ESC("SELECT COUNT(id) AS cnt
+       $result = SQL_QUERY_ESC("SELECT COUNT(`id`) AS cnt
 FROM `{!_MYSQL_PREFIX!}_surfbar_urls`
-WHERE userid NOT IN (".implode(',', $UIDs['uid']).") AND `status`='%s'",
-       array($status), __FUNCTION__, __LINE__
+WHERE `userid` NOT IN (".implode(', ', $UIDs['uid']).") AND `status`='%s'",
+               array($status), __FUNCTION__, __LINE__
        );
 
        // Fetch row
index 4519800..cfb5265 100644 (file)
@@ -258,14 +258,14 @@ function determineRandomReferalId () {
 }
 
 // Do the user login
-function USER_DO_LOGIN ($uid, $passwd) {
+function USER_DO_LOGIN ($uid, $passwd, $successUrl = '') {
        // Init variables
-       $dmy = '';
+       $dmy = ''; $add = '';
 
        // Add last_login if available
        $lastOnline = '';
        if (GET_EXT_VERSION('sql_patches') >= '0.2.8') {
-               $lastOnline = ', last_login';
+               $lastOnline = ', `last_login`';
        } // END - if
 
        // Init array
@@ -346,13 +346,19 @@ function USER_DO_LOGIN ($uid, $passwd) {
                                        SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `total_logins`=`total_logins`+1" . $add . " WHERE `userid`=%s LIMIT 1",
                                                array($uid), __FUNCTION__, __LINE__);
                                        if (SQL_AFFECTEDROWS() == 1) {
-                                               // Procedure to checking for login data
-                                               if (($GLOBALS['bonus_payed']) && (EXT_IS_ACTIVE('bonus'))) {
-                                                       // Bonus added (just displaying!)
-                                                       $URL = 'modules.php?module=chk_login&amp;mode=bonus';
+                                               // Is a success URL set?
+                                               if (empty($successUrl)) {
+                                                       // Procedure to checking for login data
+                                                       if (($GLOBALS['bonus_payed']) && (EXT_IS_ACTIVE('bonus'))) {
+                                                               // Bonus added (just displaying!)
+                                                               $URL = 'modules.php?module=chk_login&amp;mode=bonus';
+                                                       } else {
+                                                               // Bonus not added
+                                                               $URL = 'modules.php?module=chk_login&amp;mode=login';
+                                                       }
                                                } else {
-                                                       // Bonus not added
-                                                       $URL = 'modules.php?module=chk_login&amp;mode=login';
+                                                       // Use this URL
+                                                       $URL = $successUrl;
                                                }
                                        } else {
                                                // Cannot update counter!
index 8d15d73..84b4e89 100644 (file)
@@ -127,6 +127,17 @@ if (isFormSent()) {
                define('__CONFIG_SURFBAR_MIGRATE_ORDER_N', ' checked="checked"');
        }
 
+       // Prepare order migration
+       if (getConfig('surfbar_guest_login_form') == 'Y') {
+               // Yes selected
+               define('__CONFIG_SURFBAR_GUEST_LOGIN_FORM_Y', ' checked="checked"');
+               define('__CONFIG_SURFBAR_GUEST_LOGIN_FORM_N', '');
+       } else {
+               // No selected
+               define('__CONFIG_SURFBAR_GUEST_LOGIN_FORM_Y', '');
+               define('__CONFIG_SURFBAR_GUEST_LOGIN_FORM_N', ' checked="checked"');
+       }
+
        // Pause URL mode
        if (getConfig('surfbar_pause_mode') == 'INTERNAL') {
                // Internal pause page
index ba583c1..697ad84 100644 (file)
@@ -49,11 +49,14 @@ require('inc/functions.php');
 require('inc/wrapper-functions.php');
 
 // Load more function libraries or includes
-foreach (array('request-functions', 'session-functions', 'config-functions', 'code-functions', 'inc-functions', 'language-functions', 'filters', 'mysql-manager', 'extensions', 'db/lib', 'handler', 'hooks') as $lib) {
+foreach (array('request-functions', 'session-functions', 'config-functions', 'code-functions', 'inc-functions', 'language-functions', 'filters', 'mysql-manager', 'extensions', 'handler', 'hooks') as $lib) {
        // Load special functions
        loadIncludeOnce('inc/' . $lib . '.php');
 } // END - foreach
 
+// Initialize the configuration
+initConfig();
+
 // Set error handler
 set_error_handler('__errorHandler');
 
@@ -80,6 +83,9 @@ if ((!isInstalling()) && (isInstalled())) {
        // Load configuration file(s) here
        loadIncludeOnce('inc/load_config.php');
 
+       // Load database layer here
+       loadIncludeOnce('inc/db/lib.php');
+
        // Check for write-permission for config.php and inc directory
        if (!isModuleSet()) setModule(REQUEST_GET('module'));
        if (!isModuleSet()) setModule('index');
index 738b5b6..05f5a05 100644 (file)
@@ -285,10 +285,10 @@ function isInstalled () {
        return (
        (
                // New config file found and loaded
-               getConfig('MXCHANGE_INSTALLED') == 'Y'
+               isIncludeReadable('inc/cache/config-local.php')
        ) || (
-               // Fall-back!
-               isIncludeReadable('inc/config.php')
+               // Fall-back to config
+               getConfig('MXCHANGE_INSTALLED') == 'Y'
        ) || (
                (
                        // New config file found, but not yet read
index 9e28d9c..99c1f76 100644 (file)
@@ -96,5 +96,5 @@ LOAD_TEMPLATE('install_footer');
 // Footer
 loadIncludeOnce('inc/footer.php');
 
-//
+// [EOF]
 ?>
diff --git a/js.php b/js.php
index cf93e39..c991ed3 100644 (file)
--- a/js.php
+++ b/js.php
@@ -78,5 +78,5 @@ if ((isInstalled()) && (REQUEST_ISSET_GET('tag'))) {
 // Shutdown
 shutdown();
 
-//
+// [EOF]
 ?>
index ade1260..2eb272b 100644 (file)
@@ -62,7 +62,7 @@ loadIncludeOnce('inc/header.php');
 $isModuleValid = false; $check = 'failed';
 
 // Is the maintenance mode active or goes all well?
-if ((getConfig('maintenance') == 'Y') && (!IS_ADMIN()) && (getModule() != 'admin')) {
+if ((EXT_IS_ACTIVE('maintenance')) && (getConfig('maintenance') == 'Y') && (!IS_ADMIN()) && (getModule() != 'admin')) {
        // Maintain mode is active and you are no admin
        addFatalMessage(__FILE__, __LINE__, getMessage('LANG_DOWN_MAINTAINCE'));
 } elseif ((SQL_IS_LINK_UP()) && (getTotalFatalErrors() == 0)) {
index 2da2cea..ec7ce0e 100644 (file)
@@ -68,9 +68,32 @@ redirectOnUninstalledExtension('surfbar');
 
 // No member?
 if (!IS_MEMBER()) {
-       // Redirect
-       // @TODO Display quick login form here or redirect as configured
-       redirectToUrl('modules.php?module=index');
+       // Should we display login window or redirect to main page?
+       if ((getConfig('surfbar_guest_login_form') == 'Y') && (EXT_IS_ACTIVE('user'))) {
+               // Is the form sent?
+               if ((isFormSent()) && (REQUEST_ISSET_POST('id')) && (REQUEST_ISSET_POST('password'))) {
+                       // Do the login procedure
+                       $URL = USER_DO_LOGIN(REQUEST_POST('id'), REQUEST_POST('password'), basename(__FILE__));
+
+                       // And redirect to the URL
+                       redirectToUrl($URL);
+               } else {
+                       // Load header
+                       loadIncludeOnce('inc/header.php');
+
+                       // Display login form
+                       LOAD_TEMPLATE('surfbar_login_form');
+
+                       // Allow footer here
+                       $GLOBALS['header_sent'] = 2;
+
+                       // Load footer
+                       loadIncludeOnce('inc/footer.php');
+               }
+       } else {
+               // Redirect
+               redirectToUrl('index.php');
+       }
 } // END - if
 
 // Initialize the surfbar
index 04206b8..4482ff3 100644 (file)
@@ -7,10 +7,10 @@
        </tr>
        <tr><td height="3" colspan="2" class="seperator">&nbsp;</td></tr>
        <tr>
-               <td width="65%" height="30" align="right" style="padding-right:5px">
+               <td width="60%" height="30" align="right" style="padding-right:5px">
                        {--ADMIN_CONFIG_SURFBAR_STATIC_REWARD--}
                </td>
-               <td width="35%">
+               <td width="40%">
                        <input type="text" name="surfbar_static_reward" size="6" maxlength="20" value="$content[surfbar_static_reward]" /> {!POINTS!}
                </td>
        </tr>
@@ -19,7 +19,7 @@
                <td height="30" align="right" style="padding-right:5px">
                        {--ADMIN_CONFIG_SURFBAR_STATIC_COSTS--}
                </td>
-               <td>
+               <td style="padding-left:5px">
                        <input type="text" name="surfbar_static_costs" size="6" maxlength="20" value="$content[surfbar_static_costs]" /> {!POINTS!}
                </td>
        </tr>
@@ -28,7 +28,7 @@
                <td height="30" align="right" style="padding-right:5px">
                        {--ADMIN_CONFIG_SURFBAR_STATIC_TIME--}
                </td>
-               <td>
+               <td style="padding-left:5px">
                        $content[surfbar_static_time]
                </td>
        </tr>
@@ -37,7 +37,7 @@
                <td height="30" align="right" style="padding-right:5px">
                        {--ADMIN_CONFIG_SURFBAR_STATIC_LOCK--}
                </td>
-               <td>
+               <td style="padding-left:5px">
                        $content[surfbar_static_lock]
                </td>
        </tr>
@@ -46,7 +46,7 @@
                <td height="30" align="right" style="padding-right:5px">
                        {--ADMIN_CONFIG_SURFBAR_DYNAMIC_PERCENT--}
                </td>
-               <td>
+               <td style="padding-left:5px">
                        <input type="text" name="surfbar_dynamic_percent" size="6" maxlength="20" value="$content[surfbar_dynamic_percent]" />%
                </td>
        </tr>
@@ -55,7 +55,7 @@
                <td height="30" align="right" style="padding-right:5px">
                        {--ADMIN_CONFIG_SURFBAR_MAX_ORDER--}
                </td>
-               <td>
+               <td style="padding-left:5px">
                        <input type="text" name="surfbar_max_order" size="6" maxlength="20" value="$content[surfbar_max_order]" />
                </td>
        </tr>
@@ -64,7 +64,7 @@
                <td height="30" align="right" style="padding-right:5px">
                        {--ADMIN_CONFIG_SURFBAR_RESTART_TIME--}
                </td>
-               <td>
+               <td style="padding-left:5px">
                        $content[surfbar_restart_time]
                </td>
        </tr>
@@ -73,7 +73,7 @@
                <td height="30" align="right" style="padding-right:5px">
                        {--ADMIN_CONFIG_SURFBAR_STATS_RELOAD--}
                </td>
-               <td>
+               <td style="padding-left:5px">
                        $content[surfbar_stats_reload]
                </td>
        </tr>
@@ -82,7 +82,7 @@
                <td height="30" align="right" style="padding-right:5px">
                        {--ADMIN_CONFIG_SURFBAR_PURGE_DELETED--}
                </td>
-               <td>
+               <td style="padding-left:5px">
                        $content[surfbar_purge_deleted]
                </td>
        </tr>
@@ -91,7 +91,7 @@
                <td height="30" align="right" style="padding-right:5px">
                        {--ADMIN_CONFIG_SURFBAR_PURGE_MIGRATED--}
                </td>
-               <td>
+               <td style="padding-left:5px">
                        $content[surfbar_purge_migrated]
                </td>
        </tr>
                <td height="30" align="right" style="padding-right:5px">
                        {--ADMIN_CONFIG_SURFBAR_PAYMENT_MODEL_STATIC--}
                </td>
-               <td>
+               <td style="padding-left:5px">
                        <input type="radio" name="surfbar_pay_model" value="STATIC"{!__CONFIG_SURFBAR_PAY_MODEL_STATIC!} />
                </td>
        </tr>
                <td height="30" align="right" style="padding-right:5px">
                        {--ADMIN_CONFIG_SURFBAR_PAYMENT_MODEL_DYNAMIC--}
                </td>
-               <td>
+               <td style="padding-left:5px">
                        <input type="radio" name="surfbar_pay_model" value="DYNAMIC"{!__CONFIG_SURFBAR_PAY_MODEL_DYNAMIC!} />
                </td>
        </tr>
                <td height="30" align="right" style="padding-right:5px">
                        {--ADMIN_CONFIG_SURFBAR_PAUSE_MODE_INTERNAL--}
                </td>
-               <td>
+               <td style="padding-left:5px">
                        <input type="radio" name="surfbar_pause_mode" value="INTERNAL"{!__CONFIG_SURFBAR_PAUSE_MODE_INTERNAL!} />
                </td>
        </tr>
                <td height="30" align="right" style="padding-right:5px">
                        {--ADMIN_CONFIG_SURFBAR_PAUSE_MODE_EXTERNAL--}
                </td>
-               <td>
+               <td style="padding-left:5px">
                        <input type="radio" name="surfbar_pause_mode" value="EXTERNAL"{!__CONFIG_SURFBAR_PAUSE_MODE_EXTERNAL!} />
                </td>
        </tr>
                <td height="30" align="right" style="padding-right:5px">
                        {--ADMIN_CONFIG_SURFBAR_PAUSE_URL--}
                </td>
-               <td>
+               <td style="padding-left:5px">
                        <input type="text" name="surfbar_pause_url" size="15" maxlength="255" value="$content[surfbar_pause_url]" />
                </td>
        </tr>
                <td height="30" align="right" style="padding-right:5px">
                        {--ADMIN_CONFIG_SURFBAR_WARN_LOW_POINTS--}
                </td>
-               <td>
+               <td style="padding-left:5px">
                        <input type="text" name="surfbar_warn_low_points" size="5" maxlength="20" value="$content[surfbar_warn_low_points]" /> {!POINTS!}
                </td>
        </tr>
                <td height="30" align="right" style="padding-right:5px">
                        {--ADMIN_CONFIG_SURFBAR_LOW_INTERVAL--}
                </td>
-               <td>
+               <td style="padding-left:5px">
                        $content[surfbar_low_interval]
                </td>
        </tr>
                </td>
        </tr>
        <tr><td height="3" colspan="2" class="seperator bottom2">&nbsp;</td></tr>
+       <tr><td height="3" colspan="2" class="seperator">&nbsp;</td></tr>
+       <tr>
+               <td height="30" align="center">
+                       {--ADMIN_CONFIG_SURFBAR_GUEST_LOGIN_FORM--}
+               </td>
+               <td align="left" style="padding-left: 5px">
+                       <input type="radio" name="surfbar_guest_login_form" value="Y"{!__CONFIG_SURFBAR_GUEST_LOGIN_FORM_Y!} />&nbsp;{--ADMIN_CONFIG_SURFBAR_GUEST_LOGIN_FORM_Y--}<br />
+                       <input type="radio" name="surfbar_guest_login_form" value="N"{!__CONFIG_SURFBAR_GUEST_LOGIN_FORM_N!} />&nbsp;{--ADMIN_CONFIG_SURFBAR_GUEST_LOGIN_FORM_N--}
+               </td>
+       </tr>
+       <tr><td height="3" colspan="2" class="seperator bottom2">&nbsp;</td></tr>
        <tr>
                <td colspan="2" class="admin_footer">
                        <input type="reset" class="admin_reset" value="{--CLEAR_FORM--}" />
diff --git a/templates/de/html/surfbar/surfbar_login_form.tpl b/templates/de/html/surfbar/surfbar_login_form.tpl
new file mode 100644 (file)
index 0000000..42ff90b
--- /dev/null
@@ -0,0 +1,48 @@
+<div align="center" style="margin-bottom: 10px">
+<form action="{!URL!}/surfbar.php" method="post" style="margin-bottom: 0px">
+<table border="0" cellspacing="0" cellpadding="0" class="guest_login dashed" width="480">
+       <tr>
+               <td colspan="9" height="3" class="seperator">&nbsp;</td>
+       </tr>
+       <tr>
+               <td width="10" class="seperator">&nbsp;</td>
+               <td colspan="7" align="center" class="guest_login_header">
+                       <strong>{--GUEST_SURFBAR_LOGIN_HEADER--}</strong>
+               </td>
+               <td width="10" class="seperator">&nbsp;</td>
+       </tr>
+       <tr>
+               <td colspan="9" height="3" class="seperator">&nbsp;</td>
+       </tr>
+       <tr>
+               <td width="10" class="seperator">&nbsp;</td>
+               <td width="80" align="right">{--GUEST_ENTER_LOGIN--}:</td>
+               <td width="10" class="seperator">&nbsp;</td>
+               <td>
+                       <input type="text" name="id" class="guest_normal" size="4" maxlength="9" />
+               </td>
+               <td width="10" class="seperator">&nbsp;</td>
+               <td width="80" align="right">{--GUEST_ENTER_PASSWORD--}:</td>
+               <td width="10" class="seperator">&nbsp;</td>
+               <td>
+                       <input type="password" name="password" class="guest_normal" size="10" maxlength="255" />
+               </td>
+               <td width="10" class="seperator">&nbsp;</td>
+       </tr>
+       <tr>
+               <td colspan="9" height="3" class="seperator">&nbsp;</td>
+       </tr>
+       <tr>
+               <td width="10" class="seperator">&nbsp;</td>
+               <td colspan="7" align="center">
+                       <input type="reset" class="guest_reset" value="{--CLEAR_FORM--}" />
+                       <input type="submit" name="ok" class="guest_submit" value="{--LOGIN_SUBMIT--}" />
+               </td>
+               <td width="10" class="seperator">&nbsp;</td>
+       </tr>
+       <tr>
+               <td colspan="9" height="3" class="seperator">&nbsp;</td>
+       </tr>
+</table>
+</form>
+</div>
index cf6207e..ce508be 100644 (file)
--- a/view.php
+++ b/view.php
@@ -71,5 +71,5 @@ if (((REQUEST_ISSET_GET('user')) || (REQUEST_ISSET_GET('reseller'))) && (REQUEST
 // Shutdown
 shutdown();
 
-//
+// [EOF]
 ?>