$errorCode = generateErrorCodeFromUserStatus($status);
} elseif (($userid == '0') || ($status == 'failed')) {
// Inalid or locked account, so let's find out
- $result = SQL_QUERY_ESC("SELECT userid FROM `{?_MYSQL_PREFIX?}_user_data` WHERE nickname='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE nickname='%s' LIMIT 1",
array(getRequestElement('userid')), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Locked account
$GLOBALS['footer_sent'] = '-1';
// This is a CSS file loader!
-$GLOBALS['output_mode'] = '1';
+$GLOBALS['output_mode'] = 1;
$GLOBALS['module'] = 'css';
// Load the required file(s)
// Check if path exists
if (isDirectory(getConfig('CACHE_PATH'))) {
- // Make FQFN for dummy file
- $FQFN = getConfig('CACHE_PATH') . 'dummy.tmp';
-
- // Check if we can create a file inside the path
- touch($FQFN, 'w');
-
- // Is the file there?
- if (isFileReadable($FQFN)) {
- // Yes, we can do. So let's remove it
- removeFile($FQFN);
-
- // Is there a .htaccess file?
- if (isFileReadable(getConfig('CACHE_PATH') . '.htaccess')) {
- // All done!
- $this->ret = $this->statusDone;
- } else {
- // Stop! Set a .htaccess file first
- $this->ret = 'htaccess';
- }
- } // END - if
+ // Is there a .htaccess file?
+ if (isFileReadable(getConfig('CACHE_PATH') . '.htaccess')) {
+ // All done!
+ $this->ret = $this->statusDone;
+ } else {
+ // Stop! Set a .htaccess file first
+ $this->ret = 'htaccess';
+ }
} // END - if
}
$querytimeBefore = array_sum(explode(' ', microtime()));
// Run SQL command
- //* DEBUG: */ outputHtml($sqlString."<br />");
+ //* DEBUG: */ print($sqlString . '<br />');
$result = mysql_query($sqlString, SQL_GET_LINK())
or addFatalMessage(__FUNCTION__, __LINE__, $F . ' (' . $L . '):' . mysql_error() . '<br />
Query string:<br />
} // END - if
// Shall we display the parsing time and number of queries?
- if ((((isExtensionInstalledAndNewer('sql_patches', '0.4.1')) && (getConfig('show_timings') == 'Y') && (!isGetRequestElementSet('frame'))) || (isInstallationPhase())) && ($GLOBALS['header_sent'] == '2')) {
+ if ((((isExtensionInstalledAndNewer('sql_patches', '0.4.1')) && (getConfig('show_timings') == 'Y') && (!isGetRequestElementSet('frame'))) || (isInstallationPhase())) && (getOutputMode() != 0) && ($GLOBALS['header_sent'] == '2')) {
// Then display it here
displayParsingTime();
} // END - if
// Is the header already sent?
if (($GLOBALS['header_sent'] != '1') && ($GLOBALS['header_sent'] != '2')) {
// If not in CSS mode generate the header
- if (getOutputMode() != '1') {
+ if (getOutputMode() != 1) {
// Config and database connection valid?
if ((isConfigLocalLoaded()) && (isConfigLoaded()) && (SQL_IS_LINK_UP()) && (isExtensionActive('sql_patches'))) {
// Init title
} // END - if
// Add BODY tag or not?
-if ((getOutputMode() != 1) && ($GLOBALS['header_sent'] == 1) && ((getModule() != 'frametester') || (isGetRequestElementSet('frame')))) {
+if ((getOutputMode() != 1) && (getOutputMode() != -1) && ($GLOBALS['header_sent'] == 1) && ((getModule() != 'frametester') || (isGetRequestElementSet('frame')))) {
loadTemplate('page_body');
$GLOBALS['header_sent'] = 2;
} // END - if
'BONUS_SHOW_HEADER_LINE_2' => "für die Mail",
'BONUS_SHOW_HEADER_LINE_3' => "erhalten hat",
'BONUS_SHOW_YOU_HAVE_CONFIRMED' => "Sie haben diese Mail am",
- 'BONUS_SHOW_CONFIRMED_BONUS_IS' => "Stelle bestätigt. Ihre Gutschrift für diese eMail",
+ 'BONUS_SHOW_CONFIRMED_BONUS_IS' => "Stelle bestätigt. Ihre Zusatz-Gutschrift für diese Mail",
'BONUS_TOTAL' => "Gesamtbonus",
'BONUS_RALLYE_NO_ONE_JOINED' => "Niemand nimmt an unserer Aktiv-Rallye dran teil. :-(",
'BONUS_RALLYE_NOTE' => "Bitte beachten Sie, dass Ihr Login-Bonus hier nicht mit angezeigt wird. Bei der monatlichen Auswertung wird er Ihnen jedoch gutgeschrieben.",
} // END - if
// Check for entry
- $rank = countSumTotalData($userid, 'bonus_turbo', 'id', 'userid', true, sprintf(" AND `%s`=%s", $column, $mid)) + 1;
+ $rank = countSumTotalData($mid, 'bonus_turbo', 'id', $column, true) + 1;
// Which rank?
if ($rank == 1) {
$GLOBALS['ranking_content']['yr_tmark'] = generateDateTime($GLOBALS['ranking_content']['timemark'], '1');
// Load template
- $GLOBALS['ranking_content']['rankings'] = loadTemplate('show_bonus_yr', true, $GLOBALS['ranking_content']);
+ $GLOBALS['ranking_content']['own'] = loadTemplate('show_bonus_yr', true, $GLOBALS['ranking_content']);
} // END - if
// Load rankings
// Output all ranks (levels)
for ($rank = 1; $rank <= $max; $rank++) {
// Load data
- $result_users = SQL_QUERY_ESC("SELECT `userid`, `points`, `timemark` FROM `{?_MYSQL_PREFIX?}_bonus_turbo` WHERE `%s`=%s AND level=%s LIMIT 1",
+ $result_users = SQL_QUERY_ESC("SELECT
+ `userid`, `points`
+FROM
+ `{?_MYSQL_PREFIX?}_bonus_turbo`
+WHERE
+ `%s`=%s AND
+ `level`=%s
+LIMIT 1",
array($type, $data, $rank), __FUNCTION__, __LINE__);
// Nothing found by default
- $GLOBALS['ranking_content']['userid'] = '---';
- $GLOBALS['ranking_content']['points'] = '---';
+ $rows['userid'] = '---';
+ $rows['points'] = '---';
// Are you one of them?
if (SQL_NUMROWS($result_users) == 1) {
// Load data
- $GLOBALS['ranking_content'] = merge_array($GLOBALS['ranking_content'], SQL_FETCHARRAY($result_users));
+ $rows = merge_array($rows, SQL_FETCHARRAY($result_users));
// Translate comma
- $GLOBALS['ranking_content']['points'] = translateComma($GLOBALS['ranking_content']['points']);
+ $rows['points'] = translateComma($rows['points']);
} // END - if
+ // Free result
+ SQL_FREERESULT($result_users);
+
// Add more
- $GLOBALS['ranking_content']['rank'] = $rank;
- $GLOBALS['ranking_content']['sw'] = $SW;
+ $rows['rank'] = $rank;
+ $rows['sw'] = $SW;
// Output row
$OUT .= "<tr>
- <td class=\"bonus_rank_".$GLOBALS['ranking_content']['rank']." bottom2 switch_sw".$GLOBALS['ranking_content']['sw']."\"> ".$GLOBALS['ranking_content']['rank'].".</td>
- <td class=\"bonus_rank_".$GLOBALS['ranking_content']['rank']." bottom2 switch_sw".$GLOBALS['ranking_content']['sw']."\" align=\"center\">".$GLOBALS['ranking_content']['userid']."</td>
- <td class=\"bonus_rank_".$GLOBALS['ranking_content']['rank']." bottom2 switch_sw".$GLOBALS['ranking_content']['sw']."\" align=\"center\">".$GLOBALS['ranking_content']['points']."</td>
+ <td class=\"bonus_rank_".$rows['rank']." bottom2 switch_sw".$rows['sw']."\"> ".$rows['rank'].".</td>
+ <td class=\"bonus_rank_".$rows['rank']." bottom2 switch_sw".$rows['sw']."\" align=\"center\">".$rows['userid']."</td>
+ <td class=\"bonus_rank_".$rows['rank']." bottom2 switch_sw".$rows['sw']."\" align=\"center\">".$rows['points']."</td>
</tr>\n";
// Switch color
loadIncludeOnce('inc/db/lib.php');
// Set missing module
- if (!isModuleSet()) setModule(getRequestElement('module'));
+ if ((!isModuleSet()) && (isGetRequestElementSet('module'))) setModule(getRequestElement('module'));
if (!isModuleSet()) setModule('index');
// Load configuration file(s) here
// Checks if an element in $_POST exists
function isPostRequestElementSet ($element, $subElement=null) {
if (is_null($subElement)) {
- return ((isset($GLOBALS['raw_request']['post'][$element])) && (!empty($GLOBALS['raw_request']['post'][$element])));
+ return ((isset($GLOBALS['raw_request']['post'][$element])) && (isset($GLOBALS['raw_request']['post'][$element])));
} else {
return ((isset($GLOBALS['raw_request']['post'][$element][$subElement])) && (isset($GLOBALS['raw_request']['post'][$element][$subElement])));
}
$GLOBALS['module'] = 'index';
// Set 'CSS-Mode'
-$GLOBALS['output_mode'] = '0';
+$GLOBALS['output_mode'] = 0;
// Load config.php
require('inc/config-global.php');
// pattern is given...
//
// But mxchange 0.3.0 will show that in better way! :D :D :D
-$GLOBALS['output_mode'] = '1';
+$GLOBALS['output_mode'] = 1;
$GLOBALS['module'] = 'js';
// Load the required file(s)
$GLOBALS['module'] = 'lead-confirm';
// Set "CSS-Mode"
-$GLOBALS['output_mode'] = '0';
+$GLOBALS['output_mode'] = 0;
// Load config.php
require('inc/config-global.php');
$GLOBALS['module'] = 'login';
// Set 'CSS-Mode'
-$GLOBALS['output_mode'] = '0';
+$GLOBALS['output_mode'] = 0;
// Load the required file(s)
require('inc/config-global.php');
// Tell everyone we are in this module
$GLOBALS['module'] = 'mailid';
-$GLOBALS['output_mode'] = 1;
+$GLOBALS['output_mode'] = -1;
$errorCode = '';
// Load the required file(s)
case 'NORMAL':
// Is the stats ID valid?
$result = SQL_QUERY_ESC("SELECT pool_id, url, subject FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `id`=%s LIMIT 1",
- array($url_mid), __FILE__, __LINE__);
+ array($url_mid), __FILE__, __LINE__);
break;
case 'BONUS':
// Bonus-Mails
$result = SQL_QUERY_ESC("SELECT id, url, subject FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1",
- array($url_bid), __FILE__, __LINE__);
+ array($url_bid), __FILE__, __LINE__);
break;
default: // Invalid mail type
if ($status == 'CONFIRMED') {
// User has confirmed his account so we can procede...
// @TODO Rewrite this to a filter
- switch ($ltype)
- {
+ switch ($ltype) {
case 'NORMAL':
$result = SQL_QUERY_ESC("SELECT payment_id FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `pool_id`=%s LIMIT 1",
array(bigintval($pool)), __FILE__, __LINE__);
$errorCode = getCode('POSSIBLE_INVALID');
}
} else {
- $errorCode = getCode('ACCOUNT_LOCKED');
+ $errorCode = getCode('ACCOUNT_' . $status);
}
} else {
SQL_FREERESULT($result);
SQL_FREERESULT($result);
if ($status == 'CONFIRMED') {
- // Update last activity
- SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `last_online`=UNIX_TIMESTAMP(), `last_module`='mailid_top' WHERE `userid`=%s LIMIT 1",
- array($url_userid), __FILE__, __LINE__);
-
// User has confirmed his account so we can procede...
// @TODO Rewrite this to a filter
- switch ($ltype)
- {
+ switch ($ltype) {
case 'NORMAL':
$result = SQL_QUERY_ESC("SELECT `payment_id` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `pool_id`=%s LIMIT 1",
array(bigintval($pool)), __FILE__, __LINE__);
$GLOBALS['module'] = 'sponsor_confirm';
// Set 'CSS-Mode'
-$GLOBALS['output_mode'] = '0';
+$GLOBALS['output_mode'] = 0;
// Load the required file(s)
require('inc/config-global.php');
$GLOBALS['module'] = 'sponsor_ref';
// Set 'CSS-Mode'
-$GLOBALS['output_mode'] = '0';
+$GLOBALS['output_mode'] = 0;
// Load the required file(s)
require('inc/config-global.php');
<tr>
<td width="10" class="seperator"> </td>
- <td align="right">{--ADMIN_OPTION?mt_word?-}:</td>
+ <td align="right">{--ADMIN_OPTION_MT_WORD--}:</td>
<td width="10" class="seperator"> </td>
<td>
<input type="text" name="mt_word" class="admin_normal" size="15" maxlength="255" value="{?mt_word?}" />
<tr>
<td width="10" class="seperator"> </td>
- <td align="right">{--ADMIN_OPTION?mt_word?--}:</td>
+ <td align="right">{--ADMIN_OPTION_MT_WORD2--}:</td>
<td width="10" class="seperator"> </td>
<td>
<input type="text" name="mt_word2" class="admin_normal" size="15" maxlength="255" value="{?mt_word2?}" />
<tr>
<td width="10" class="seperator"> </td>
- <td align="right">{--ADMIN_OPTION?mt_word?--}:</td>
+ <td align="right">{--ADMIN_OPTION_MT_WORD3--}:</td>
<td width="10" class="seperator"> </td>
<td>
<input type="text" name="mt_word3" class="admin_normal" size="15" maxlength="255" value="{?mt_word3?}" />
</tr>
$content[rows]
<tr>
- <td colspan="3" class="member_footer" align="center"><div class="tiny member_note"> </div></td>
+ <td colspan="3" class="member_footer" align="center">
+ <div class="tiny">$content[own]</div>
+ </td>
</tr>
</table>
$content[rankings]
</div>
-<div class="member_note">
+<div style="padding-top:5px;padding-bottom:5px" class="member_note">
Wir wünschen allen Gewinnern viel Glück bei der monatlichen Aktiv-Rallye!<br />
Es können nur die ersten <u>{?bonus_ranks?}</u> die Aktiv-Rallye gewinnen. Der Rechtsweg ist ausgeschlossen.
</div>