CSS classes rewritten to ids to let JavaScript insert more values. Some wrappers...
authorRoland Häder <roland@mxchange.org>
Wed, 29 Jul 2009 17:36:08 +0000 (17:36 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 29 Jul 2009 17:36:08 +0000 (17:36 +0000)
14 files changed:
inc/functions.php
inc/header.php
inc/libs/surfbar_functions.php
inc/modules/admin/what-list_links.php
inc/mysql-connect.php
surfbar.php
templates/de/html/surfbar/surfbar_frame_banner.tpl
templates/de/html/surfbar/surfbar_frame_stats.tpl
templates/de/html/surfbar/surfbar_frame_textlinks.tpl
templates/de/html/surfbar/surfbar_frame_top.tpl
templates/de/html/surfbar/surfbar_stopped.tpl
theme/business/css/surfbar.css
theme/default/css/surfbar.css
theme/desert/css/surfbar.css

index 545a2f2..10b4d02 100644 (file)
@@ -514,16 +514,16 @@ function sendRawEmail ($toEmail, $subject, $message, $from) {
 }
 
 // Generate a password in a specified length or use default password length
-function generatePassword ($LEN = 0) {
+function generatePassword ($length = 0) {
        // Auto-fix invalid length of zero
-       if ($LEN == 0) $LEN = getConfig('pass_len');
+       if ($length == 0) $length = getConfig('pass_len');
 
        // Initialize array with all allowed chars
-       $ABC = explode(',', 'a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,0,1,2,3,4,5,6,7,8,9,-,+,_,/');
+       $ABC = explode(',', 'a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,0,1,2,3,4,5,6,7,8,9,-,+,_,/,.');
 
        // Start creating password
        $PASS = '';
-       for ($i = 0; $i < $LEN; $i++) {
+       for ($i = 0; $i < $length; $i++) {
                $PASS .= $ABC[mt_rand(0, count($ABC) -1)];
        } // END - for
 
@@ -2655,8 +2655,9 @@ function debug_report_bug ($message = '') {
 
 // Generates a ***weak*** seed (taken from de.php.net/mt_srand)
 function generateSeed () {
-       list($usec, $sec) = explode(" ", microtime());
-       return ((float)$sec + (float)$usec);
+       list($usec, $sec) = explode(' ', microtime());
+       $microTime = (((float)$sec + (float)$usec)) * 100000;
+       return $microTime;
 }
 
 // Converts a message code to a human-readable message
index 5887c29..aa10f9d 100644 (file)
@@ -125,17 +125,13 @@ if (($GLOBALS['header_sent'] != '1') && ($GLOBALS['header_sent'] != '2')) {
 
        // Closing HEAD tag
        if (getOutputMode() != '1') OUTPUT_HTML('</head>');
-       $GLOBALS['header_sent'] = 1;
+       if ($GLOBALS['header_sent'] == 0) $GLOBALS['header_sent'] = 1;
 } // END - if
 
-// Load body or not
-if ((getModule() != 'frametester') || ((getModule() == 'frametester') && (REQUEST_ISSET_GET('frame'))) || (($GLOBALS['header_sent'] == '1') && (REQUEST_ISSET_GET('frame'))) && (getOutputMode() != '1')) {
-       // Is the header sent and the script is not the mail confirmation script and not a CSS?
-       if (($GLOBALS['header_sent'] == '1') && (basename($_SERVER['PHP_SELF']) != 'mailid.php') && (getOutputMode() != '1')) {
-               // Add BODY tag
-               LOAD_TEMPLATE('page_body');
-               $GLOBALS['header_sent'] = 2;
-       } // END - if
+// Add BODY tag or not?
+if ((getOutputMode() != '1') && ($GLOBALS['header_sent'] == 1)) {
+       LOAD_TEMPLATE('page_body');
+       $GLOBALS['header_sent'] = 2;
 } // END - if
 
 //
index bbf5646..2ea4f2d 100644 (file)
@@ -250,7 +250,7 @@ function SURFBAR_MEMBER_DO_FORM ($formData, $URLs) {
        // Is the function there?
        if (function_exists($functionName)) {
                // Add new status
-               $URLs[$formData['id']]['new_status'] = $GLOBALS['cache_array']['surfbar']['new_status'];
+               $URLs[$formData['id']]['new_status'] = SURFBAR_GET_NEW_STATUS('new_status');
 
                // Extract URL data for call-back
                $urlData = array(merge_array($URLs[$formData['id']], array($action => $formData)));
@@ -279,7 +279,7 @@ function SURFBAR_VALIDATE_MEMBER_ACTION_STATUS ($action, $status) {
        // Fetch the new status if found
        if ($isValid) {
                // Load new status
-               list($GLOBALS['cache_array']['surfbar']['new_status']) = SQL_FETCHROW($result);
+               list($GLOBALS['surfbar_cache']['new_status']) = SQL_FETCHROW($result);
        } // END - if
 
        // Free result
@@ -827,13 +827,13 @@ function SURFBAR_CHECK_RELOAD_FULL() {
        $isFull = true;
 
        // Cache static reload lock
-       $GLOBALS['cache_array']['surfbar']['surf_lock'] = getConfig('surfbar_static_lock');
+       $GLOBALS['surfbar_cache']['surf_lock'] = getConfig('surfbar_static_lock');
        //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "Fixed surf lock is ".getConfig('surfbar_static_lock')."", false);
 
        // Do we have dynamic model?
        if (getConfig('surfbar_pay_model') == 'DYNAMIC') {
                // "Calculate" dynamic lock
-               $GLOBALS['cache_array']['surfbar']['surf_lock'] += SURFBAR_CALCULATE_DYNAMIC_ADD();
+               $GLOBALS['surfbar_cache']['surf_lock'] += SURFBAR_CALCULATE_DYNAMIC_ADD();
        } // END - if
 
        // Ask the database
@@ -846,12 +846,12 @@ LIMIT 1",
        );
 
        // Fetch row
-       list($GLOBALS['cache_array']['surfbar']['user_locks']) = SQL_FETCHROW($result);
+       list($GLOBALS['surfbar_cache']['user_locks']) = SQL_FETCHROW($result);
 
        // Is it null?
-       if (is_null($GLOBALS['cache_array']['surfbar']['user_locks'])) {
+       if (is_null($GLOBALS['surfbar_cache']['user_locks'])) {
                // Then fix it to zero!
-               $GLOBALS['cache_array']['surfbar']['user_locks'] = 0;
+               $GLOBALS['surfbar_cache']['user_locks'] = 0;
        } // END - if
 
        // Free result
@@ -934,9 +934,9 @@ function SURFBAR_GET_TOTAL_USER_URLS ($uid=0, $status = '',$exclude = '') {
        // Get amount from database
        $result = SQL_QUERY_ESC("SELECT COUNT(id) AS cnt
 FROM `{!_MYSQL_PREFIX!}_surfbar_urls`
-WHERE userid=%s".$add."
+WHERE `userid`=%s".$add."
 LIMIT %s",
-       array($uid, getConfig('surfbar_max_order')), __FUNCTION__, __LINE__
+               array($uid, getConfig('surfbar_max_order')), __FUNCTION__, __LINE__
        );
 
        // Fetch row
@@ -952,7 +952,7 @@ LIMIT %s",
 // Generate a validation code for the given id number
 function SURFBAR_GENERATE_VALIDATION_CODE ($urlId, $salt = '') {
        // @TODO Invalid salt should be refused
-       $GLOBALS['cache_array']['surfbar']['salt'] = "INVALID";
+       $GLOBALS['surfbar_cache']['salt'] = 'INVALID';
 
        // Get code length from config
        $length = getConfig('code_length');
@@ -966,11 +966,11 @@ function SURFBAR_GENERATE_VALIDATION_CODE ($urlId, $salt = '') {
                // Is the salt set?
                if (empty($salt)) {
                        // Generate random hashed string
-                       $GLOBALS['cache_array']['surfbar']['salt'] = sha1(generatePassword(255));
+                       $GLOBALS['surfbar_cache']['salt'] = sha1(generatePassword(mt_rand(200, 255)));
                        //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "newSalt=".SURFBAR_GET_SALT()."", false);
                } else {
                        // Use this as salt!
-                       $GLOBALS['cache_array']['surfbar']['salt'] = $salt;
+                       $GLOBALS['surfbar_cache']['salt'] = $salt;
                        //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "oldSalt=".SURFBAR_GET_SALT()."", false);
                }
 
@@ -1006,15 +1006,15 @@ function SURFBAR_CHECK_VALIDATION_CODE ($urlId, $check, $salt) {
 
 // Lockdown the userid/id combination (reload lock)
 function SURFBAR_LOCKDOWN_ID ($urlId) {
-       //* DEBUG: */ print "LOCK!");
+       //* DEBUG: */ print "LOCK!";
        ///* DEBUG: */ return;
        // Just add it to the database
-       SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_locks` (userid, url_id) VALUES (%s, %s)",
-       array(getUserId(), bigintval($urlId)), __FUNCTION__, __LINE__);
+       SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_locks` (`userid`, `url_id`) VALUES (%s, %s)",
+               array(getUserId(), 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",
-       array(bigintval($urlId), getUserId()), __FUNCTION__, __LINE__);
+       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_surfbar_salts` WHERE `url_id`=%s AND `userid`=%s LIMIT 1",
+               array(bigintval($urlId), getUserId()), __FUNCTION__, __LINE__);
 }
 
 // Pay points to the user and remove it from the sender if userid is given else it is a "sponsored surf"
@@ -1041,16 +1041,16 @@ function SURFBAR_UPDATE_INSERT_STATS_RECORD () {
        // Do we have a limit?
        if ($allowed > 0) {
                // Then count views_max down!
-               $add .= ",views_max=views_max-1";
+               $add .= ", `views_max`=`views_max`-1";
        } // 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",
-       array(SURFBAR_GET_ID()), __FUNCTION__, __LINE__);
+       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_surfbar_urls` SET `views_total`=`views_total`+1".$add." WHERE `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(getUserId(), SURFBAR_GET_ID()), __FUNCTION__, __LINE__);
+       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_surfbar_stats` SET `count`=`count`+1 WHERE `userid`=%s AND `url_id`=%s LIMIT 1",
+               array(getUserId(), SURFBAR_GET_ID()), __FUNCTION__, __LINE__);
 
        // Was that update okay?
        if (SQL_AFFECTEDROWS() < 1) {
@@ -1075,8 +1075,8 @@ 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(), getUserId()), __FUNCTION__, __LINE__);
+       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(), getUserId()), __FUNCTION__, __LINE__);
 
        // Debug message
        //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "salt=".SURFBAR_GET_SALT().",id=".SURFBAR_GET_ID().",uid=".getUserId()."", false);
@@ -1084,8 +1084,8 @@ 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')",
-               array(SURFBAR_GET_ID(), getUserId(), SURFBAR_GET_SALT()), __FUNCTION__, __LINE__);
+               SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_salts` (`url_id`, `userid`, `last_salt`) VALUES (%s, %s, '%s')",
+                       array(SURFBAR_GET_ID(), getUserId(), SURFBAR_GET_SALT()), __FUNCTION__, __LINE__);
        } // END - if
 
        // Debug message
@@ -1573,37 +1573,37 @@ LIMIT 1",
        //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "lastQuery=".getConfig('db_last_query')."|numRows=".SQL_NUMROWS($result)."|Affected=".SQL_AFFECTEDROWS()."", false);
        if (SQL_NUMROWS($result) == 1) {
                // Load/cache data
-               //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "count(".count($GLOBALS['cache_array']['surfbar']).") - BEFORE", false);
-               $GLOBALS['cache_array']['surfbar'] = merge_array($GLOBALS['cache_array']['surfbar'], SQL_FETCHARRAY($result));
-               //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "count(".count($GLOBALS['cache_array']['surfbar']).") - AFTER", false);
+               //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "count(".count($GLOBALS['surfbar_cache']).") - BEFORE", false);
+               $GLOBALS['surfbar_cache'] = merge_array($GLOBALS['surfbar_cache'], SQL_FETCHARRAY($result));
+               //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "count(".count($GLOBALS['surfbar_cache']).") - AFTER", false);
 
                // Determine waiting time
-               $GLOBALS['cache_array']['surfbar']['time'] = SURFBAR_DETERMINE_WAIT_TIME();
+               $GLOBALS['surfbar_cache']['time'] = SURFBAR_DETERMINE_WAIT_TIME();
 
                // Is the last salt there?
-               if (is_null($GLOBALS['cache_array']['surfbar']['last_salt'])) {
+               if (is_null($GLOBALS['surfbar_cache']['last_salt'])) {
                        // Then repair it wit the static!
                        //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "last_salt - FIXED!", false);
-                       $GLOBALS['cache_array']['surfbar']['last_salt'] = '';
+                       $GLOBALS['surfbar_cache']['last_salt'] = '';
                } // END - if
 
                // Fix missing last_surfed
-               if ((!isset($GLOBALS['cache_array']['surfbar']['last_surfed'])) || (is_null($GLOBALS['cache_array']['surfbar']['last_surfed']))) {
+               if ((!isset($GLOBALS['surfbar_cache']['last_surfed'])) || (is_null($GLOBALS['surfbar_cache']['last_surfed']))) {
                        // Fix it here
                        //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "last_surfed - FIXED!", false);
-                       $GLOBALS['cache_array']['surfbar']['last_surfed'] = 0;
+                       $GLOBALS['surfbar_cache']['last_surfed'] = 0;
                } // END - if
 
                // Get base/fixed reward and costs
-               $GLOBALS['cache_array']['surfbar']['reward'] = SURFBAR_DETERMINE_REWARD();
-               $GLOBALS['cache_array']['surfbar']['costs']  = SURFBAR_DETERMINE_COSTS();
+               $GLOBALS['surfbar_cache']['reward'] = SURFBAR_DETERMINE_REWARD();
+               $GLOBALS['surfbar_cache']['costs']  = SURFBAR_DETERMINE_COSTS();
                //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "BASE/STATIC - reward=".SURFBAR_GET_REWARD()."|costs=".SURFBAR_GET_COSTS()."", false);
 
                // Only in dynamic model add the dynamic bonus!
                if (getConfig('surfbar_pay_model') == 'DYNAMIC') {
                        // Calculate dynamic reward/costs and add it
-                       $GLOBALS['cache_array']['surfbar']['reward'] += SURFBAR_CALCULATE_DYNAMIC_ADD();
-                       $GLOBALS['cache_array']['surfbar']['costs']  += SURFBAR_CALCULATE_DYNAMIC_ADD();
+                       $GLOBALS['surfbar_cache']['reward'] += SURFBAR_CALCULATE_DYNAMIC_ADD();
+                       $GLOBALS['surfbar_cache']['costs']  += SURFBAR_CALCULATE_DYNAMIC_ADD();
                        //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "DYNAMIC+ - reward=".SURFBAR_GET_REWARD()."|costs=".SURFBAR_GET_COSTS()."", false);
                } // END - if
 
@@ -1621,8 +1621,15 @@ LIMIT 1",
 
 // -----------------------------------------------------------------------------
 // PLEASE DO NOT ADD ANY OTHER FUNCTIONS BELOW THIS LINE IF THEY DON'T "WRAP"
-// THE $GLOBALS['cache_array']['surfbar'] ARRAY!
+// THE $GLOBALS['surfbar_cache'] ARRAY!
 // -----------------------------------------------------------------------------
+
+// Initializes the surfbar
+function SURFBAR_INIT () {
+       // Init cache array
+       $GLOBALS['surfbar_cache'] = array();
+}
+
 // Private getter for data elements
 function SURFBAR_GET_DATA ($element) {
        //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "element={$element}", false);
@@ -1631,12 +1638,12 @@ function SURFBAR_GET_DATA ($element) {
        $data = null;
 
        // Is the entry there?
-       if (isset($GLOBALS['cache_array']['surfbar'][$element])) {
+       if (isset($GLOBALS['surfbar_cache'][$element])) {
                // Then take it
-               $data = $GLOBALS['cache_array']['surfbar'][$element];
+               $data = $GLOBALS['surfbar_cache'][$element];
        } else { // END - if
                print("<pre>");
-               print_r($GLOBALS['cache_array']['surfbar']);
+               print_r($GLOBALS['surfbar_cache']);
                print("</pre>");
                debug_report_bug();
        }
@@ -1712,5 +1719,11 @@ function SURFBAR_GET_SURF_LOCK () {
        return SURFBAR_GET_DATA('surf_lock');
 }
 
+// Getter for new status
+function SURFBAR_GET_NEW_STATUS () {
+       // Get data element and return its contents
+       return SURFBAR_GET_DATA('new_status');
+}
+
 // [EOF]
 ?>
index 3f5d28c..12058cc 100644 (file)
@@ -102,16 +102,16 @@ if (REQUEST_ISSET_GET('uid')) {
                                        $result_data = false; // Closes Bug #58
 
                                        // Load data from stats table...
-                                       switch ($type)
-                                       {
-                                               case "NORMAL":
+                                       // @TODO Rewrite this to includes/filter
+                                       switch ($type) {
+                                               case 'NORMAL':
                                                        $result_data = SQL_QUERY_ESC("SELECT subject, timestamp_ordered, cat_id FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE `id`=%s LIMIT 1",
                                                        array(bigintval($id)), __FILE__, __LINE__);
                                                        $type = 'mailid'; $DATA = $id; $PROBLEM = getMessage('NORMAL_MAIL_PROBLEM');
                                                        $LINK = "<a href=\"{!URL!}/mailid.php?uid=".REQUEST_GET('uid')."&amp;mailid=".$id."\" target=\"_blank\">".$id."</a>";
                                                        break;
 
-                                               case "BONUS":
+                                               case 'BONUS':
                                                        $result_data = SQL_QUERY_ESC("SELECT subject, timestamp, cat_id FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
                                                        array(bigintval($id2)), __FILE__, __LINE__);
                                                        $type = 'bonusid'; $DATA = $id2; $PROBLEM = getMessage('BONUS_MAIL_PROBLEM');
index 57ee9fc..9e26bdd 100644 (file)
@@ -67,7 +67,7 @@ initErrorHandler();
 initRequest();
 
 // Set important header_sent
-$GLOBALS['header_sent'] = 0;
+if (!isset($GLOBALS['header_sent'])) $GLOBALS['header_sent'] = 0;
 
 // Init fatal messages
 initFatalMessages();
index f6092ad..306b921 100644 (file)
 // Load security stuff here
 require('inc/libs/security_functions.php');
 
-// Init surfbar cache and start time
-$GLOBALS['cache_array']['surfbar'] = array();
+// Init start time
 $GLOBALS['startTime'] = microtime(true);
 
 // Set module
 $GLOBALS['module'] = 'surfbar';
 $GLOBALS['refid']  = 0;
 $GLOBALS['output_mode'] = 0;
+$GLOBALS['header_sent'] = 3;
 $msg = null;
 
 // Load the required file(s)
 require('inc/config-global.php');
 
+// Is a frame active?
+if (REQUEST_ISSET_GET('frame')) {
+       // Then we need to set header_sent to 0
+       $GLOBALS['header_sent'] = 0;
+} // END - if
+
 // Is the script installed?
 if (!isInstalled()) {
        // You have to install first!
@@ -68,6 +74,9 @@ if (!IS_MEMBER()) {
        redirectToUrl('modules.php?module=index');
 } // END - if
 
+// Initialize the surfbar
+SURFBAR_INIT();
+
 // Handle tasks on self-maintenance
 SURFBAR_HANDLE_SELF_MAINTENANCE();
 
@@ -168,7 +177,7 @@ if ((SURFBAR_CHECK_RELOAD_FULL()) || ((REQUEST_ISSET_GET('frame')) && (in_array(
                                'id'          => $nextId,
                                'check'       => SURFBAR_GENERATE_VALIDATION_CODE($nextId),
                                'salt'        => SURFBAR_GET_SALT(),
-                               'reward'      => translateComma(SURFBAR_GET_REWARD($nextId)),
+                               'points'      => translateComma(SURFBAR_GET_REWARD($nextId)),
                                'url'         => SURFBAR_GET_URL($nextId),
                                'curr_reload' => SURFBAR_GET_USER_LOCKS(),
                                'max_urls'    => SURFBAR_GET_TOTAL_URLS(),
@@ -199,6 +208,7 @@ if ((SURFBAR_CHECK_RELOAD_FULL()) || ((REQUEST_ISSET_GET('frame')) && (in_array(
 }
 
 // Load footer
+$GLOBALS['footer_sent'] = 3;
 loadIncludeOnce('inc/footer.php');
 
 // [EOF]
index 985fee6..f4ce210 100644 (file)
@@ -1,4 +1,4 @@
-<table border="0" cellspacing="0" cellpadding="0" class="surfbar_banner dashed" width="468" align="center">
+<table border="0" cellspacing="0" cellpadding="0" id="surfbar_banner" class="dashed" width="468" align="center">
 <tr>
        <td height="60">
                <!-- Hier kommt Ihr Code fuer 468x60-Banner rein! //-->
index 3677875..c006fc1 100644 (file)
@@ -1,13 +1,13 @@
-<table border="0" cellspacing="0" cellpadding="0" width="100%" class="surfbar_table">
+<table border="0" cellspacing="0" cellpadding="0" width="100%" id="surfbar_table">
 <tr>
-       <td class="surfbar_td">
-               &raquo;Guthaben: <span class="surfbar_points">$content[points]&nbsp;{!POINTS!}</span>&laquo;&nbsp;-
-               &raquo;Jetzt Online: <span class="surfbar_counter">$content[online]</span>&laquo;&nbsp;-
-               &raquo;Seitenaufrufe: Heute:<span class="surfbar_counter">$content[c_today]</span>&nbsp;-
-               Gestern:<span class="surfbar_counter">$content[c_yester]</span>&nbsp;-
-               Woche:<span class="surfbar_counter">$content[c_week]</span>&nbsp;-
-               Monat:<span class="surfbar_counter">$content[c_month]</span>&nbsp;-
-               Gesamt:<span class="surfbar_counter">$content[c_total]</span>&laquo;
+       <td id="surfbar_td">
+               &raquo;Guthaben: <span id="surfbar_points">$content[points]&nbsp;{!POINTS!}</span>&laquo;&nbsp;-
+               &raquo;Jetzt Online: <span id="surfbar_counter">$content[online]</span>&laquo;&nbsp;-
+               &raquo;Seitenaufrufe: Heute:<span id="surfbar_counter">$content[c_today]</span>&nbsp;-
+               Gestern:<span id="surfbar_counter">$content[c_yester]</span>&nbsp;-
+               Woche:<span id="surfbar_counter">$content[c_week]</span>&nbsp;-
+               Monat:<span id="surfbar_counter">$content[c_month]</span>&nbsp;-
+               Gesamt:<span id="surfbar_counter">$content[c_total]</span>&laquo;
        </td>
 </tr>
 </table>
index f54d30d..2e78149 100644 (file)
@@ -1,7 +1,7 @@
-<table border="0" cellspacing="0" cellpadding="0" width="100%" class="surfbar_table">
+<table border="0" cellspacing="0" cellpadding="0" width="100%" id="surfbar_table">
 <tr>
-       <td class="surfbar_td">
-               &raquo;Jetzt Online: <span class="surfbar_counter">$content[online]</span>&laquo;&nbsp;-&nbsp;<a
+       <td id="surfbar_td">
+               &raquo;Jetzt Online: <span id="surfbar_counter">$content[online]</span>&laquo;&nbsp;-&nbsp;<a
                 href="{!URL!}/modules.php?module=index&amp;what=impressum" target="_blank">Ihr Textlink
                 hier?</a>&nbsp;-&nbsp;<a href="{!URL!}/modules.php?module=index&amp;what=impressum"
                 target="_blank">Ihr Textlink hier?</a>&nbsp;-&nbsp;<a
index 13377cd..d5b3a99 100644 (file)
@@ -1,14 +1,14 @@
-<table border="0" cellspacing="0" cellpadding="0" width="100%" class="surfbar_table">
+<table border="0" cellspacing="0" cellpadding="0" width="100%" id="surfbar_table">
 <tr>
-       <td class="surfbar_td">
-               &raquo;<span class="surfbar_points">$content[reward] {!POINTS!}</span> in
+       <td id="surfbar_td">
+               &raquo;<span id="surfbar_points">$content[xxx],$content[xxx]</span> {!POINTS!} in
                <span id="surfbar_counter">$content[xxx]</span>&nbsp;<span
-                id="counter_word">Sekunden</span>&laquo;&nbsp;&raquo;<span
-                class="surfbar_reload">$content[curr_reload]</span> von <span
-                class="surfbar_max">$content[max_urls]</span> im Reload&laquo;<br />
+                id="surfbar_counter_word">Sekunden</span>&laquo;&nbsp;&raquo;<span
+                id="surfbar_reload">X</span> von <span
+                id="surfbar_max">X</span> im Reload&laquo;<br />
 
                &raquo;<a href="$content[url]" target="_blank">Aktuelle Seite in neuem
-               Fenster &ouml;ffnen</a>&laquo;&nbsp;<span class="surfbar_navi">[<a
+               Fenster &ouml;ffnen</a>&laquo;&nbsp;<span id="surfbar_navi">[<a
                 href="#" onclick="return StartStopCounter();" id="start">Anhalten</a>|<a
                 target="_parent" href="{!URL!}/login.php">Loginbereich</a>|<a
                 target="_parent" href="{!URL!}/modules.php?module=login&amp;what=logout">Ausloggen</a>|<a
@@ -23,6 +23,9 @@
 var currCounter = "$content[reload]";
 var maxCounter = "$content[reload]";
 var counter = document.getElementById("surfbar_counter");
+var points = document.getElementById("surfbar_points");
+var reload = document.getElementById("surfbar_reload");
+var max = document.getElementById("surfbar_max");
 var countDown = null;
 
 function StartStopCounter () {
@@ -54,7 +57,10 @@ function ReloadThis() {
 
 function InitCounter() {
        parent.surfbar_url.location.href = "$content[url]";
-       counter.innerHTML = $content[reload];
+       counter.innerHTML = '$content[reload]';
+       points.innerHTML  = '$content[points]';
+       reload.innerHTML  = '$content[curr_reload]';
+       max.innerHTML     = '$content[max_urls]';
 }
 
 function StartCounter() {
index 41bee3a..5ba1439 100644 (file)
@@ -1,6 +1,6 @@
 <div align="center">
        <div class="member_table dashed" style="width:500px;height:50px">
-               <div class="member_title2 bottom2">
+               <div id="member_title2 bottom2">
                        <strong>Surfbar angehalten!</strong>
                </div>
 
@@ -23,7 +23,7 @@ function Restart () {
 }
 
 function ShowButton () {
-       buttonDiv.innerHTML = "<form action='{!URL!}/surfbar.php' target='_self' method='GET'><input type='hidden' name='frame' value='top' /><input type='submit' class='member_submit' value='Surfbar erneut starten' /></form>";
+       buttonDiv.innerHTML = "<form action='{!URL!}/surfbar.php' target='_self' method='GET'><input type='hidden' name='frame' value='top' /><input type='submit' id='member_submit' value='Surfbar erneut starten' /></form>";
 }
 
 function Counter () {
index a3cddba..bcf9250 100644 (file)
@@ -1,16 +1,12 @@
-.surfbar_banner {
+#surfbar_banner {
        
 }
 
-.surfbar_table {
+#surfbar_table {
        
 }
 
-.surfbar_td {
-       
-}
-
-.surfbar_points {
+#surfbar_td {
        
 }
 
        
 }
 
-#counter_word {
+#surfbar_counter_word {
        
 }
 
-.surfbar_reload {
-       
+#surfbar_reload {
+       font-weight: bold;
 }
 
-.surfbar_max {
-       
+#surfbar_max {
+       font-weight: bold;
 }
 
-.surfbar_points {
+#surfbar_points {
        font-weight: bold;
 }
\ No newline at end of file
index 95a4184..c8770a9 100644 (file)
@@ -1,16 +1,12 @@
-.surfbar_banner {
+#surfbar_banner {
        
 }
 
-.surfbar_table {
+#surfbar_table {
        
 }
 
-.surfbar_td {
-       
-}
-
-.surfbar_points {
+#surfbar_td {
        
 }
 
        
 }
 
-#counter_word {
+#surfbar_counter_word {
        
 }
 
-.surfbar_reload {
-       
+#surfbar_reload {
+       font-weight: bold;
 }
 
-.surfbar_max {
-       
+#surfbar_max {
+       font-weight: bold;
 }
 
-.surfbar_points {
+#surfbar_points {
        font-weight: bold;
 }
\ No newline at end of file
index e0e7155..413f6d4 100644 (file)
@@ -1,16 +1,12 @@
-.surfbar_banner {
+#surfbar_banner {
        background-color: #DDDDAA;
 }
 
-.surfbar_table {
+#surfbar_table {
        
 }
 
-.surfbar_td {
-       
-}
-
-.surfbar_points {
+#surfbar_td {
        
 }
 
        
 }
 
-#counter_word {
+#surfar_counter_word {
        
 }
 
-.surfbar_reload {
-       
+#surfbar_reload {
+       font-weight: bold;
 }
 
-.surfbar_max {
-       
+#surfbar_max {
+       font-weight: bold;
 }
 
-.surfbar_points {
+#surfbar_points {
        font-weight: bold;
 }
\ No newline at end of file