projects
/
mailer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
96144a1
)
CSS classes rewritten to ids to let JavaScript insert more values. Some wrappers...
author
Roland Häder
<roland@mxchange.org>
Wed, 29 Jul 2009 17:36:08 +0000
(17:36 +0000)
committer
Roland Häder
<roland@mxchange.org>
Wed, 29 Jul 2009 17:36:08 +0000
(17:36 +0000)
14 files changed:
inc/functions.php
patch
|
blob
|
history
inc/header.php
patch
|
blob
|
history
inc/libs/surfbar_functions.php
patch
|
blob
|
history
inc/modules/admin/what-list_links.php
patch
|
blob
|
history
inc/mysql-connect.php
patch
|
blob
|
history
surfbar.php
patch
|
blob
|
history
templates/de/html/surfbar/surfbar_frame_banner.tpl
patch
|
blob
|
history
templates/de/html/surfbar/surfbar_frame_stats.tpl
patch
|
blob
|
history
templates/de/html/surfbar/surfbar_frame_textlinks.tpl
patch
|
blob
|
history
templates/de/html/surfbar/surfbar_frame_top.tpl
patch
|
blob
|
history
templates/de/html/surfbar/surfbar_stopped.tpl
patch
|
blob
|
history
theme/business/css/surfbar.css
patch
|
blob
|
history
theme/default/css/surfbar.css
patch
|
blob
|
history
theme/desert/css/surfbar.css
patch
|
blob
|
history
diff --git
a/inc/functions.php
b/inc/functions.php
index 545a2f2eb41823b76000be5e197cb823262656a8..10b4d02d329c05dc548ad0e5d24520cf9cafd306 100644
(file)
--- a/
inc/functions.php
+++ b/
inc/functions.php
@@
-514,16
+514,16
@@
function sendRawEmail ($toEmail, $subject, $message, $from) {
}
// Generate a password in a specified length or use default password length
}
// 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
// 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
// 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 = '';
// 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
$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 () {
// 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
}
// Converts a message code to a human-readable message
diff --git
a/inc/header.php
b/inc/header.php
index 5887c2944a267c748759d166e4529ffdf38618eb..aa10f9daed701f9be923f9ea6c5b0b46976067d9 100644
(file)
--- a/
inc/header.php
+++ b/
inc/header.php
@@
-125,17
+125,13
@@
if (($GLOBALS['header_sent'] != '1') && ($GLOBALS['header_sent'] != '2')) {
// Closing HEAD tag
if (getOutputMode() != '1') OUTPUT_HTML('</head>');
// Closing HEAD tag
if (getOutputMode() != '1') OUTPUT_HTML('</head>');
- $GLOBALS['header_sent'] = 1;
+
if ($GLOBALS['header_sent'] == 0)
$GLOBALS['header_sent'] = 1;
} // END - if
} // 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
//
} // END - if
//
diff --git
a/inc/libs/surfbar_functions.php
b/inc/libs/surfbar_functions.php
index bbf56465680a37f68c9e57b727d58a3b0472e1a2..2ea4f2d5bd2a12d4c7536520cd82bdde55850ec2 100644
(file)
--- a/
inc/libs/surfbar_functions.php
+++ b/
inc/libs/surfbar_functions.php
@@
-250,7
+250,7
@@
function SURFBAR_MEMBER_DO_FORM ($formData, $URLs) {
// Is the function there?
if (function_exists($functionName)) {
// Add new status
// 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)));
// 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
// 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
} // END - if
// Free result
@@
-827,13
+827,13
@@
function SURFBAR_CHECK_RELOAD_FULL() {
$isFull = true;
// Cache static reload lock
$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
//* 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
} // END - if
// Ask the database
@@
-846,12
+846,12
@@
LIMIT 1",
);
// Fetch row
);
// Fetch row
- list($GLOBALS['
cache_array']['surfbar
']['user_locks']) = SQL_FETCHROW($result);
+ list($GLOBALS['
surfbar_cache
']['user_locks']) = SQL_FETCHROW($result);
// Is it null?
// 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!
// Then fix it to zero!
- $GLOBALS['
cache_array']['surfbar
']['user_locks'] = 0;
+ $GLOBALS['
surfbar_cache
']['user_locks'] = 0;
} // END - if
// Free result
} // 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`
// 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",
LIMIT %s",
- array($uid, getConfig('surfbar_max_order')), __FUNCTION__, __LINE__
+
array($uid, getConfig('surfbar_max_order')), __FUNCTION__, __LINE__
);
// Fetch row
);
// 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
// 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');
// 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
// 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!
//* 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);
}
//* 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) {
// 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
///* 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
// 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"
}
// 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!
// 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
} // 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
// 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) {
// 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...
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);
// 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!
// 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
} // 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__, "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
// 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?
// 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);
// 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
} // 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);
// 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
} // 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
//* 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
//* 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"
// -----------------------------------------------------------------------------
// 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);
// 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?
$data = null;
// Is the entry there?
- if (isset($GLOBALS['
cache_array']['surfbar
'][$element])) {
+ if (isset($GLOBALS['
surfbar_cache
'][$element])) {
// Then take it
// Then take it
- $data = $GLOBALS['
cache_array']['surfbar
'][$element];
+ $data = $GLOBALS['
surfbar_cache
'][$element];
} else { // END - if
print("<pre>");
} else { // END - if
print("<pre>");
- print_r($GLOBALS['
cache_array']['surfbar
']);
+ print_r($GLOBALS['
surfbar_cache
']);
print("</pre>");
debug_report_bug();
}
print("</pre>");
debug_report_bug();
}
@@
-1712,5
+1719,11
@@
function SURFBAR_GET_SURF_LOCK () {
return SURFBAR_GET_DATA('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]
?>
// [EOF]
?>
diff --git
a/inc/modules/admin/what-list_links.php
b/inc/modules/admin/what-list_links.php
index 3f5d28cbc4254dbc863de07569c064849db5818a..12058cc1027b7a5387e2c1ba72568e9a4b724f33 100644
(file)
--- a/
inc/modules/admin/what-list_links.php
+++ b/
inc/modules/admin/what-list_links.php
@@
-102,16
+102,16
@@
if (REQUEST_ISSET_GET('uid')) {
$result_data = false; // Closes Bug #58
// Load data from stats table...
$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')."&mailid=".$id."\" target=\"_blank\">".$id."</a>";
break;
$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')."&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');
$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');
diff --git
a/inc/mysql-connect.php
b/inc/mysql-connect.php
index 57ee9fc67c3d8f992e92aa5aeb949ab1514d3ddd..9e26bddaad8750409e35be027a61977e2533c613 100644
(file)
--- a/
inc/mysql-connect.php
+++ b/
inc/mysql-connect.php
@@
-67,7
+67,7
@@
initErrorHandler();
initRequest();
// Set important header_sent
initRequest();
// Set important header_sent
-$GLOBALS['header_sent'] = 0;
+
if (!isset($GLOBALS['header_sent']))
$GLOBALS['header_sent'] = 0;
// Init fatal messages
initFatalMessages();
// Init fatal messages
initFatalMessages();
diff --git
a/surfbar.php
b/surfbar.php
index f6092ad36a3d29eb08fb748ab62be17f01a169ee..306b92190cc011d885a0b4dd523a5d05ff7028e6 100644
(file)
--- a/
surfbar.php
+++ b/
surfbar.php
@@
-39,19
+39,25
@@
// Load security stuff here
require('inc/libs/security_functions.php');
// 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['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');
$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!
// 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
redirectToUrl('modules.php?module=index');
} // END - if
+// Initialize the surfbar
+SURFBAR_INIT();
+
// Handle tasks on self-maintenance
SURFBAR_HANDLE_SELF_MAINTENANCE();
// 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(),
'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(),
'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
}
// Load footer
+$GLOBALS['footer_sent'] = 3;
loadIncludeOnce('inc/footer.php');
// [EOF]
loadIncludeOnce('inc/footer.php');
// [EOF]
diff --git
a/templates/de/html/surfbar/surfbar_frame_banner.tpl
b/templates/de/html/surfbar/surfbar_frame_banner.tpl
index 985fee67a5fcfcead9d493d18f2b81290879414f..f4ce2101ed183ad9ebe4ca32043de123e7a1b6fe 100644
(file)
--- a/
templates/de/html/surfbar/surfbar_frame_banner.tpl
+++ b/
templates/de/html/surfbar/surfbar_frame_banner.tpl
@@
-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! //-->
<tr>
<td height="60">
<!-- Hier kommt Ihr Code fuer 468x60-Banner rein! //-->
diff --git
a/templates/de/html/surfbar/surfbar_frame_stats.tpl
b/templates/de/html/surfbar/surfbar_frame_stats.tpl
index 367787541afbcd7a8ef837941f288fd8233ecf79..c006fc155d38bf08ddb9165146b84dd279f921ad 100644
(file)
--- a/
templates/de/html/surfbar/surfbar_frame_stats.tpl
+++ b/
templates/de/html/surfbar/surfbar_frame_stats.tpl
@@
-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>
<tr>
- <td
class
="surfbar_td">
- »Guthaben: <span
class
="surfbar_points">$content[points] {!POINTS!}</span>« -
- »Jetzt Online: <span
class
="surfbar_counter">$content[online]</span>« -
- »Seitenaufrufe: Heute:<span
class
="surfbar_counter">$content[c_today]</span> -
- Gestern:<span
class
="surfbar_counter">$content[c_yester]</span> -
- Woche:<span
class
="surfbar_counter">$content[c_week]</span> -
- Monat:<span
class
="surfbar_counter">$content[c_month]</span> -
- Gesamt:<span
class
="surfbar_counter">$content[c_total]</span>«
+ <td
id
="surfbar_td">
+ »Guthaben: <span
id
="surfbar_points">$content[points] {!POINTS!}</span>« -
+ »Jetzt Online: <span
id
="surfbar_counter">$content[online]</span>« -
+ »Seitenaufrufe: Heute:<span
id
="surfbar_counter">$content[c_today]</span> -
+ Gestern:<span
id
="surfbar_counter">$content[c_yester]</span> -
+ Woche:<span
id
="surfbar_counter">$content[c_week]</span> -
+ Monat:<span
id
="surfbar_counter">$content[c_month]</span> -
+ Gesamt:<span
id
="surfbar_counter">$content[c_total]</span>«
</td>
</tr>
</table>
</td>
</tr>
</table>
diff --git
a/templates/de/html/surfbar/surfbar_frame_textlinks.tpl
b/templates/de/html/surfbar/surfbar_frame_textlinks.tpl
index f54d30d444a1a2bf0f10585e4ffc581ba29e65af..2e7814991db3db10782d763f7f5211487e16fe7e 100644
(file)
--- a/
templates/de/html/surfbar/surfbar_frame_textlinks.tpl
+++ b/
templates/de/html/surfbar/surfbar_frame_textlinks.tpl
@@
-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>
<tr>
- <td
class
="surfbar_td">
- »Jetzt Online: <span
class
="surfbar_counter">$content[online]</span>« - <a
+ <td
id
="surfbar_td">
+ »Jetzt Online: <span
id
="surfbar_counter">$content[online]</span>« - <a
href="{!URL!}/modules.php?module=index&what=impressum" target="_blank">Ihr Textlink
hier?</a> - <a href="{!URL!}/modules.php?module=index&what=impressum"
target="_blank">Ihr Textlink hier?</a> - <a
href="{!URL!}/modules.php?module=index&what=impressum" target="_blank">Ihr Textlink
hier?</a> - <a href="{!URL!}/modules.php?module=index&what=impressum"
target="_blank">Ihr Textlink hier?</a> - <a
diff --git
a/templates/de/html/surfbar/surfbar_frame_top.tpl
b/templates/de/html/surfbar/surfbar_frame_top.tpl
index 13377cde2efa2941ef67a86a25d13967784975b1..d5b3a99bbc76cdcefbb39dcfb15ac3ea7364ce2d 100644
(file)
--- a/
templates/de/html/surfbar/surfbar_frame_top.tpl
+++ b/
templates/de/html/surfbar/surfbar_frame_top.tpl
@@
-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>
<tr>
- <td
class
="surfbar_td">
- »<span
class="surfbar_points">$content[reward] {!POINTS!}</span>
in
+ <td
id
="surfbar_td">
+ »<span
id="surfbar_points">$content[xxx],$content[xxx]</span> {!POINTS!}
in
<span id="surfbar_counter">$content[xxx]</span> <span
<span id="surfbar_counter">$content[xxx]</span> <span
- id="counter_word">Sekunden</span>« »<span
-
class="surfbar_reload">$content[curr_reload]
</span> von <span
-
class="surfbar_max">$content[max_urls]
</span> im Reload«<br />
+ id="
surfbar_
counter_word">Sekunden</span>« »<span
+
id="surfbar_reload">X
</span> von <span
+
id="surfbar_max">X
</span> im Reload«<br />
»<a href="$content[url]" target="_blank">Aktuelle Seite in neuem
»<a href="$content[url]" target="_blank">Aktuelle Seite in neuem
- Fenster öffnen</a>« <span
class
="surfbar_navi">[<a
+ Fenster öffnen</a>« <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&what=logout">Ausloggen</a>|<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&what=logout">Ausloggen</a>|<a
@@
-23,6
+23,9
@@
var currCounter = "$content[reload]";
var maxCounter = "$content[reload]";
var counter = document.getElementById("surfbar_counter");
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 () {
var countDown = null;
function StartStopCounter () {
@@
-54,7
+57,10
@@
function ReloadThis() {
function InitCounter() {
parent.surfbar_url.location.href = "$content[url]";
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() {
}
function StartCounter() {
diff --git
a/templates/de/html/surfbar/surfbar_stopped.tpl
b/templates/de/html/surfbar/surfbar_stopped.tpl
index 41bee3adfa583350ea6afc16e7a4af16d583de44..5ba14397e266277afeb96e57ef8fee9087a36d28 100644
(file)
--- a/
templates/de/html/surfbar/surfbar_stopped.tpl
+++ b/
templates/de/html/surfbar/surfbar_stopped.tpl
@@
-1,6
+1,6
@@
<div align="center">
<div class="member_table dashed" style="width:500px;height:50px">
<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>
<strong>Surfbar angehalten!</strong>
</div>
@@
-23,7
+23,7
@@
function Restart () {
}
function ShowButton () {
}
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 () {
}
function Counter () {
diff --git
a/theme/business/css/surfbar.css
b/theme/business/css/surfbar.css
index a3cddba487f6b8cdf91d49ee8864149faabceb48..bcf9250285db4e4d140ce080da6a7a82d7a000a0 100644
(file)
--- a/
theme/business/css/surfbar.css
+++ b/
theme/business/css/surfbar.css
@@
-1,16
+1,12
@@
-
.
surfbar_banner {
+
#
surfbar_banner {
}
}
-
.
surfbar_table {
+
#
surfbar_table {
}
}
-.surfbar_td {
-
-}
-
-.surfbar_points {
+#surfbar_td {
}
}
@@
-22,18
+18,18
@@
}
}
-#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
font-weight: bold;
}
\ No newline at end of file
diff --git
a/theme/default/css/surfbar.css
b/theme/default/css/surfbar.css
index 95a4184b7e629290a6627d8c54a90a1ba26ed050..c8770a90c8b698bd82c8c49a1d0f65a6acac03d4 100644
(file)
--- a/
theme/default/css/surfbar.css
+++ b/
theme/default/css/surfbar.css
@@
-1,16
+1,12
@@
-
.
surfbar_banner {
+
#
surfbar_banner {
}
}
-
.
surfbar_table {
+
#
surfbar_table {
}
}
-.surfbar_td {
-
-}
-
-.surfbar_points {
+#surfbar_td {
}
}
@@
-22,18
+18,18
@@
}
}
-#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
font-weight: bold;
}
\ No newline at end of file
diff --git
a/theme/desert/css/surfbar.css
b/theme/desert/css/surfbar.css
index e0e7155d187f6d807f4b269712153213a4ecf29e..413f6d481b6378195cbf83a60ac59956235a62eb 100644
(file)
--- a/
theme/desert/css/surfbar.css
+++ b/
theme/desert/css/surfbar.css
@@
-1,16
+1,12
@@
-
.
surfbar_banner {
+
#
surfbar_banner {
background-color: #DDDDAA;
}
background-color: #DDDDAA;
}
-
.
surfbar_table {
+
#
surfbar_table {
}
}
-.surfbar_td {
-
-}
-
-.surfbar_points {
+#surfbar_td {
}
}
@@
-22,18
+18,18
@@
}
}
-#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
font-weight: bold;
}
\ No newline at end of file