inc/img/.htaccess -text
inc/install-inc.php -text
inc/js/.htaccess -text
+inc/language-functions.php -text
inc/language.php -text
inc/language/.htaccess -text
inc/language/_de.php -text
if (EXT_IS_ACTIVE('nickname')) {
// Maybe we have found a nickname?
$result = SQL_QUERY_ESC("SELECT userid, beg_clicks, ref_payout, status, last_online FROM `{!_MYSQL_PREFIX!}_user_data` WHERE nickname='%s' LIMIT 1",
- array(REQUEST_GET('uid')), __FILE__, __LINE__);
+ array(REQUEST_GET('uid')), __FILE__, __LINE__);
} else {
// Nickname entered but nickname is not active
$msg = getCode('EXTENSION_PROBLEM');
} else {
// Direct userid
$result = SQL_QUERY_ESC("SELECT userid, beg_clicks, ref_payout, status, last_online FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
}
// Check if locked in so don't pay points
if (($uid > 0) && (getConfig('beg_uid') != $uid)) {
// Update counter
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET beg_clicks=beg_clicks+1 WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
- array($uid), __FILE__, __LINE__);
+ array($uid), __FILE__, __LINE__);
// Check for last entry for userid w/o IP number
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_beg_ips` WHERE (timeout > (UNIX_TIMESTAMP() - ".getConfig('beg_timeout').") OR (timeout > (UNIX_TIMESTAMP() - ".getConfig('beg_uid_timeout').") AND `userid`=%s)) AND (remote_ip='%s' OR sid='%s') LIMIT 1",
- array($uid, detectRemoteAddr(), session_id()), __FILE__, __LINE__);
+ array($uid, detectRemoteAddr(), session_id()), __FILE__, __LINE__);
// Entry not found, points set and not logged in?
if (((SQL_NUMROWS($result) == 0) || (IS_ADMIN())) && ($points > 0) && (!IS_MEMBER()) && (getConfig('beg_pay_mode') == 'NONE')) {
// but only when there is no admin begging.
// Admins shall be able to test it!
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_beg_ips` (userid, remote_ip,sid, timeout) VALUES ('%s','%s','%s', UNIX_TIMESTAMP())",
- array($uid, detectRemoteAddr(), session_id()), __FILE__, __LINE__);
+ array($uid, detectRemoteAddr(), session_id()), __FILE__, __LINE__);
// Was is successfull?
$pay (SQL_AFFECTEDROWS() == 1);
// Add points to user or begging rallye account
if (BEG_ADD_POINTS($uid, $points)) {
// Set 'done' message
- $content['msg'] = LOAD_TEMPLATE('beg_done', true));
+ $content['msg'] = LOAD_TEMPLATE('beg_done', true);
} else {
// Error!
- $content['msg'] = LOAD_TEMPLATE('beg_failed', true));
+ $content['msg'] = LOAD_TEMPLATE('beg_failed', true);
}
} else {
// Error!
- $content['msg'] = LOAD_TEMPLATE('beg_failed', true));
+ $content['msg'] = LOAD_TEMPLATE('beg_failed', true);
}
} elseif (IS_MEMBER()) {
// Logged in user found!
- $content['msg'] = LOAD_TEMPLATE('beg_login', true));
+ $content['msg'] = LOAD_TEMPLATE('beg_login', true);
} elseif (getConfig('beg_pay_mode') != 'NONE') { // Other pay-mode active!
// Prepare content for template
$content = array(
);
// Load message template depending on pay-mode
- $content['msg'] = LOAD_TEMPLATE('beg_pay_mode_'.strtolower(getConfig('beg_pay_mode')), true, $content));
+ $content['msg'] = LOAD_TEMPLATE('beg_pay_mode_'.strtolower(getConfig('beg_pay_mode')), true, $content);
$pay = true;
} else {
// Clicked received while reload lock is active
- $content['msg'] = LOAD_TEMPLATE('beg_failed', true));
+ $content['msg'] = LOAD_TEMPLATE('beg_failed', true);
}
// Free memory
LOAD_TEMPLATE('beg_pay_code_'.strtolower(getConfig('beg_pay_mode')), false, $content);
} elseif ((!$pay) && (!isset($content['msg']))) {
// Cannot pay! :-(
- $content['msg'] = LOAD_TEMPLATE('beg_failed', true));
+ $content['msg'] = LOAD_TEMPLATE('beg_failed', true);
}
// Include footer
} elseif (($uid == '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",
- array(REQUEST_GET('uid')), __FILE__, __LINE__);
+ array(REQUEST_GET('uid')), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Locked account
$msg = getCode('ACCOUNT_LOCKED');
INNER JOIN `{!_MYSQL_PREFIX!}_user_data` AS d
ON b.userid=d.userid
WHERE b.userid=%s AND b.chk_value='%s' LIMIT 1",
- array($uid, $chk), __FILE__, __LINE__);
+ array($uid, $chk), __FILE__, __LINE__);
//* DEBUG: */ echo "uid=".$uid.",chk=".$chk." (".strlen($chk).'/'.strlen(REQUEST_GET('check')).'/'.SQL_NUMROWS($result).")<br />\n";
// Prepare content
// Remove entry from table
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_birthday` WHERE userid=%s AND chk_value='%s' LIMIT 1",
- array($uid, $chk), __FILE__, __LINE__);
+ array($uid, $chk), __FILE__, __LINE__);
// "Translate" some data
$data['gender'] = translateGender($data['gender']);
if (DEBUG_HANDLE_REQUEST(REQUEST_POST('request'))) {
// Construct FQFN for the module
$INC = sprintf("inc/debug/%s/request_%s",
- getConfig('debug_mode'),
- SQL_ESCAPE(REQUEST_POST('request'))
+ getConfig('debug_mode'),
+ SQL_ESCAPE(REQUEST_POST('request'))
);
// Is the module there? Else we log it!
$probe_nickname = ((EXT_IS_ACTIVE('nickname')) && ((''.round($GLOBALS['refid']).'') != $GLOBALS['refid']));
// Do we have nickname or userid set?
- if ($probe_nickname) {
+ if ($probe_nickname === true) {
// Nickname in URL, so load the ID
$result = SQL_QUERY_ESC("SELECT userid, status FROM `{!_MYSQL_PREFIX!}_user_data` WHERE nickname='%s' LIMIT 1",
- array(bigintval($GLOBALS['refid'])), __FILE__, __LINE__);
+ array(bigintval($GLOBALS['refid'])), __FILE__, __LINE__);
} else {
// Direct userid entered
$result = SQL_QUERY_ESC("SELECT userid, status FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(bigintval($GLOBALS['refid'])), __FILE__, __LINE__);
+ array(bigintval($GLOBALS['refid'])), __FILE__, __LINE__);
}
// Load data
if ($probe_nickname) {
// Nickname in URL, so load the ID
$result = SQL_QUERY_ESC("SELECT userid, status, password FROM `{!_MYSQL_PREFIX!}_user_data` WHERE nickname='%s' LIMIT 1",
- array(REQUEST_POST('userid')), __FILE__, __LINE__);
+ array(REQUEST_POST('userid')), __FILE__, __LINE__);
} else {
// Direct userid entered
$result = SQL_QUERY_ESC("SELECT userid, status, password FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(bigintval(REQUEST_POST('userid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_POST('userid'))), __FILE__, __LINE__);
}
// Load data
$points = GET_TOTAL_DATA($uid, 'user_points', 'points') - GET_TOTAL_DATA($uid, 'user_data', 'used_points');
// So let's continue with probing his points amount
- if (($points - getConfig('doubler_left') - REQUEST_POST('points') * getConfig('doubler_charge')) >= 0)
- // Enough points are left so let's continue with the doubling process
- // Create doubling "account" width *DOUBLED* points
- SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_doubler` (userid, refid, points, remote_ip, timemark, completed, is_ref) VALUES ('%s','%s','%s','".detectRemoteAddr()."', UNIX_TIMESTAMP(), 'N','N')",
- array($uid, bigintval($GLOBALS['refid']), bigintval(REQUEST_POST('points') * 2)), __FILE__, __LINE__);
-
- // Subtract entered points
- SUB_POINTS('doubler', $uid, REQUEST_POST('points'));
-
- // Add points to "total payed" including charge
- $points = REQUEST_POST('points') - REQUEST_POST('points') * getConfig('doubler_charge');
- updateConfiguration('doubler_points', $points, '+');
- incrementConfigEntry('doubler_points', $points);
-
- // Add second line for the referal but only when uid != refid
- if (($GLOBALS['refid'] > 0) && ($GLOBALS['refid'] != $uid)) {
- // Okay add a refid line and apply refid percents
- SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_doubler` (userid, refid, points, remote_ip, timemark, completed, is_ref) VALUES ('%s',0,'%s','".detectRemoteAddr()."',UNIX_TIMESTAMP(),'N','Y')",
- array(
- bigintval($GLOBALS['refid']),
- bigintval(REQUEST_POST('points') * 2 * getConfig('doubler_ref'))
- ), __FILE__, __LINE__);
-
- // And that's why we don't want to you more than one referal level of doubler-points. ^^^
- } // END - if
-
- // Update usage counter
- updateConfiguration('doubler_counter', 1, '+');
-
- // Set constant
- define('__DOUBLER_MSG', LOAD_TEMPLATE('doubler_reflink', true, REQUEST_POST('userid')));
- } else {
- // Not enougth points left
- define('__ERROR_MSG', getMessage('DOUBLER_FORM_NO_POINTS_LEFT'));
- }
- } elseif ($status == 'CONFIRMED') {
- // Account is unconfirmed!
- define('__ERROR_MSG', getMessage('DOUBLER_FORM_WRONG_PASS'));
- } elseif ($status == 'UNCONFIRMED') {
- // Account is unconfirmed!
- define('__ERROR_MSG', getMessage('DOUBLER_FORM_STATUS_UNCONFIRMED'));
- } elseif ($status == 'LOCKED') {
- // Account is locked by admin / holiday!
- define('__ERROR_MSG', getMessage('DOUBLER_FORM_STATUS_LOCKED'));
- } elseif (REQUEST_POST('points') < getConfig('doubler_min')) {
- // Not enougth points entered
- define('__ERROR_MSG', getMessage('DOUBLER_FORM_POINTS_MIN'));
- } elseif (REQUEST_POST('points') > getConfig('doubler_max')) {
- // Too much points entered
- define('__ERROR_MSG', getMessage('DOUBLER_FORM_POINTS_MAX'));
- } elseif ($probe_nickname) {
- // Cannot resolv nickname -> userid
- define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_NICKNAME'));
+ if (($points - getConfig('doubler_left') - REQUEST_POST('points') * getConfig('doubler_charge')) >= 0)
+ // Enough points are left so let's continue with the doubling process
+ // Create doubling "account" width *DOUBLED* points
+ SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_doubler` (userid, refid, points, remote_ip, timemark, completed, is_ref) VALUES ('%s','%s','%s','".detectRemoteAddr()."', UNIX_TIMESTAMP(), 'N','N')",
+ array($uid, bigintval($GLOBALS['refid']), bigintval(REQUEST_POST('points') * 2)), __FILE__, __LINE__);
+
+ // Subtract entered points
+ SUB_POINTS('doubler', $uid, REQUEST_POST('points'));
+
+ // Add points to "total payed" including charge
+ $points = REQUEST_POST('points') - REQUEST_POST('points') * getConfig('doubler_charge');
+ updateConfiguration('doubler_points', $points, '+');
+ incrementConfigEntry('doubler_points', $points);
+
+ // Add second line for the referal but only when uid != refid
+ if (($GLOBALS['refid'] > 0) && ($GLOBALS['refid'] != $uid)) {
+ // Okay add a refid line and apply refid percents
+ SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_doubler` (userid, refid, points, remote_ip, timemark, completed, is_ref) VALUES ('%s',0,'%s','".detectRemoteAddr()."',UNIX_TIMESTAMP(),'N','Y')",
+ array(
+ bigintval($GLOBALS['refid']),
+ bigintval(REQUEST_POST('points') * 2 * getConfig('doubler_ref'))
+ ), __FILE__, __LINE__);
+
+ // And that's why we don't want to you more than one referal level of doubler-points. ^^^
+ } // END - if
+
+ // Update usage counter
+ updateConfiguration('doubler_counter', 1, '+');
+
+ // Set constant
+ define('__DOUBLER_MSG', LOAD_TEMPLATE('doubler_reflink', true, REQUEST_POST('userid')));
} else {
- // Wrong password or account not found
- define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_MEMBER'));
+ // Not enougth points left
+ define('__ERROR_MSG', getMessage('DOUBLER_FORM_NO_POINTS_LEFT'));
}
- } elseif (!REQUEST_ISSET_POST(('userid'))) {
- // Login not entered
- define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_LOGIN'));
- } elseif (!REQUEST_ISSET_POST(('pass'))) {
- // Password not entered
- define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_PASSWORD'));
- } elseif (!REQUEST_ISSET_POST(('points'))) {
- // points not entered
- define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_POINTS'));
+ } elseif ($status == 'CONFIRMED') {
+ // Account is unconfirmed!
+ define('__ERROR_MSG', getMessage('DOUBLER_FORM_WRONG_PASS'));
+ } elseif ($status == 'UNCONFIRMED') {
+ // Account is unconfirmed!
+ define('__ERROR_MSG', getMessage('DOUBLER_FORM_STATUS_UNCONFIRMED'));
+ } elseif ($status == 'LOCKED') {
+ // Account is locked by admin / holiday!
+ define('__ERROR_MSG', getMessage('DOUBLER_FORM_STATUS_LOCKED'));
+ } elseif (REQUEST_POST('points') < getConfig('doubler_min')) {
+ // Not enougth points entered
+ define('__ERROR_MSG', getMessage('DOUBLER_FORM_POINTS_MIN'));
+ } elseif (REQUEST_POST('points') > getConfig('doubler_max')) {
+ // Too much points entered
+ define('__ERROR_MSG', getMessage('DOUBLER_FORM_POINTS_MAX'));
+ } elseif ($probe_nickname) {
+ // Cannot resolv nickname -> userid
+ define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_NICKNAME'));
+ } else {
+ // Wrong password or account not found
+ define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_MEMBER'));
}
+ } elseif (!REQUEST_ISSET_POST(('userid'))) {
+ // Login not entered
+ define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_LOGIN'));
+ } elseif (!REQUEST_ISSET_POST(('pass'))) {
+ // Password not entered
+ define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_PASSWORD'));
+ } elseif (!REQUEST_ISSET_POST(('points'))) {
+ // points not entered
+ define('__ERROR_MSG', getMessage('DOUBLER_FORM_404_POINTS'));
}
+}
- // Set messages to nothing
- if (!defined('__DOUBLER_MSG')) define('__DOUBLER_MSG', '');
- if (!defined('__ERROR_MSG')) define('__ERROR_MSG' , '');
+// Set messages to nothing
+if (!defined('__DOUBLER_MSG')) define('__DOUBLER_MSG', '');
+if (!defined('__ERROR_MSG')) define('__ERROR_MSG' , '');
- // Shall I check for points immediately?
- if (getConfig('doubler_send_mode') == 'DIRECT') loadInclude('inc/doubler_send.php');
+// Shall I check for points immediately?
+if (getConfig('doubler_send_mode') == 'DIRECT') loadInclude('inc/doubler_send.php');
- // Output header
- loadIncludeOnce('inc/header.php');
+// Output header
+loadIncludeOnce('inc/header.php');
- // Banner in text
- define('__DOUBLER_BANNER', LOAD_TEMPLATE('doubler_banner', true));
+// Banner in text
+define('__DOUBLER_BANNER', LOAD_TEMPLATE('doubler_banner', true));
- // Load header/footer templates
- define('__DOUBLER_HEADER', LOAD_TEMPLATE('doubler_header', true));
- define('__DOUBLER_FOOTER', LOAD_TEMPLATE('doubler_footer', true));
+// Load header/footer templates
+define('__DOUBLER_HEADER', LOAD_TEMPLATE('doubler_header', true));
+define('__DOUBLER_FOOTER', LOAD_TEMPLATE('doubler_footer', true));
- if (!empty($uid)) {
- // Transfer userid/nickname to constant
- define('__REFID', $uid);
- } else {
- // Transfer userid/nickname to constant
- define('__REFID', $GLOBALS['refid']);
- }
+if (!empty($uid)) {
+ // Transfer userid/nickname to constant
+ define('__REFID', $uid);
+} else {
+ // Transfer userid/nickname to constant
+ define('__REFID', $GLOBALS['refid']);
+}
- // Percent values etc.
- define('__CHARGE_VALUE', translateComma(getConfig('doubler_charge') * 100));
- define('__REF_VALUE' , translateComma(getConfig('doubler_ref') * 100));
- define('__TOTAL_VALUE' , translateComma(getConfig('doubler_points')));
- define('__MIN_VALUE' , translateComma(getConfig('doubler_min')));
- define('__MAX_VALUE' , translateComma(getConfig('doubler_max')));
-
- // Text "Enter login"
- if (EXT_IS_ACTIVE('nickname')) {
- // Choose login/nickname
- define('DOUBLER_ENTER_LOGIN', getMessage('GUEST_ENTER_LOGIN_NICKNAME'));
- } else {
- // Simple login ID
- define('DOUBLER_ENTER_LOGIN', getMessage('GUEST_ENTER_LOGIN'));
- }
+// Percent values etc.
+define('__CHARGE_VALUE', translateComma(getConfig('doubler_charge') * 100));
+define('__REF_VALUE' , translateComma(getConfig('doubler_ref') * 100));
+define('__TOTAL_VALUE' , translateComma(getConfig('doubler_points')));
+define('__MIN_VALUE' , translateComma(getConfig('doubler_min')));
+define('__MAX_VALUE' , translateComma(getConfig('doubler_max')));
+
+// Text "Enter login"
+if (EXT_IS_ACTIVE('nickname')) {
+ // Choose login/nickname
+ define('DOUBLER_ENTER_LOGIN', getMessage('GUEST_ENTER_LOGIN_NICKNAME'));
+} else {
+ // Simple login ID
+ define('DOUBLER_ENTER_LOGIN', getMessage('GUEST_ENTER_LOGIN'));
+}
- // Which mail-send-mode did the admin setup?
- switch (getConfig('doubler_send_mode'))
- {
+// Which mail-send-mode did the admin setup?
+switch (getConfig('doubler_send_mode')) {
case 'DIRECT':
define('DOUBLER_PAYOUT_TIME', getMessage('DOUBLER_PAYOUT_TIME_DIRECT'));
break;
case 'RESET':
define('DOUBLER_PAYOUT_TIME', getMessage('DOUBLER_PAYOUT_TIME_RESET'));
break;
- }
+}
- // Generate table with already payed out doubles
- define('__DOUBLER_PAYOUT_HISTORY', DOUBLER_GENERATE_TABLE('0', 'Y', 'N', 'DESC'));
+// Generate table with already payed out doubles
+define('__DOUBLER_PAYOUT_HISTORY', DOUBLER_GENERATE_TABLE('0', 'Y', 'N', 'DESC'));
- // Generate timemark
- define('__TIMEOUT_MARK', createFancyTime(getConfig('doubler_timeout')));
+// Generate timemark
+define('__TIMEOUT_MARK', createFancyTime(getConfig('doubler_timeout')));
- // Usage counter
- define('__DOUBLER_COUNTER', getConfig('doubler_counter'));
+// Usage counter
+define('__DOUBLER_COUNTER', getConfig('doubler_counter'));
- // Points left to doubler
- define('__LEFT_VALUE', translateComma(DOUBLER_GET_TOTAL_POINTS_LEFT()));
+// Points left to doubler
+define('__LEFT_VALUE', translateComma(DOUBLER_GET_TOTAL_POINTS_LEFT()));
- // Output neccessary form for this
- LOAD_TEMPLATE('doubler_index');
+// Output neccessary form for this
+LOAD_TEMPLATE('doubler_index');
- // Output footer
- loadIncludeOnce('inc/footer.php');
+// Output footer
+loadIncludeOnce('inc/footer.php');
} else {
// You have to install first!
redirectToUrl('install.php');
} elseif (REQUEST_ISSET_GET('tag')) {
// Tag set so create the IFN (Include-FileName)
$INC = sprintf("inc/img/tag-%s.php",
- REQUEST_GET('tag')
+ REQUEST_GET('tag')
);
// Include is readable?
LEFT JOIN `{!_MYSQL_PREFIX!}_payments` AS t
ON s.payment_id=t.id
WHERE s.timestamp_ordered <= (UNIX_TIMESTAMP() - %s) ORDER BY s.userid",
- array(bigintval($PURGE)), __FILE__, __LINE__);
+ array(bigintval($PURGE)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Start deleting procedure
$uid = 0; $points = 0;
while ($content = SQL_FETCHARRAY($result)) {
// Check if confirmation links are purged or not
$result_links = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_links` WHERE stats_id=%s LIMIT 1",
- array(bigintval($content['id'])), __FILE__, __LINE__);
+ array(bigintval($content['id'])), __FILE__, __LINE__);
if (SQL_NUMROWS($result_links) == 1) {
// Free memory
SQL_FREERESULT($result_links);
// Remove confirmation links from queue
ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_links` WHERE stats_id=%s",
- array(bigintval($content['id'])), __FILE__, __LINE__, false));
+ array(bigintval($content['id'])), __FILE__, __LINE__, false));
// Update status of order
ADD_SQL(SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET data_type='DELETED' WHERE `id`=%s LIMIT 1",
- array(bigintval($content['pool_id'])), __FILE__, __LINE__, false));
+ array(bigintval($content['pool_id'])), __FILE__, __LINE__, false));
} // END - if
} // END - while
if (EXT_IS_ACTIVE('bonus', true)) {
// Check for bonus campaigns
$result = SQL_QUERY_ESC("SELECT id, points FROM `{!_MYSQL_PREFIX!}_bonus` WHERE data_type='SEND' AND timestamp <= %s ORDER BY `id`",
- array(bigintval($PURGE)), __FILE__, __LINE__);
+ array(bigintval($PURGE)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Start deleting procedure
$points = 0;
while ($content = SQL_FETCHARRAY($result)) {
// Check if confirmation links are purged or not
$result_links = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_links` WHERE bonus_id=%s",
- array(bigintval($content['id'])), __FILE__, __LINE__);
+ array(bigintval($content['id'])), __FILE__, __LINE__);
if (SQL_NUMROWS($result_links) > 0) {
// At least one link was found, enougth to pay back the points
$points += $content['points'] * SQL_NUMROWS($result_links);
// Remove confirmation links from queue
ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_links` WHERE bonus_id=%s",
- array(bigintval($content['id'])), __FILE__, __LINE__, false));
+ array(bigintval($content['id'])), __FILE__, __LINE__, false));
// Update status of order
ADD_SQL(SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET data_type='DELETED' WHERE `id`=%s LIMIT 1",
- array(bigintval($content['id'])), __FILE__, __LINE__, false));
+ array(bigintval($content['id'])), __FILE__, __LINE__, false));
} // END - if
} // END - while
// Update this account
ADD_SQL(SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET ap_notified=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1",
- array(bigintval($content['userid'])), __FILE__, __LINE__, false));
+ array(bigintval($content['userid'])), __FILE__, __LINE__, false));
} // END - while
// Remove last comma
WHERE `status`='CONFIRMED' AND joined < (UNIX_TIMESTAMP() - %s) AND `last_online` < (UNIX_TIMESTAMP() - %s) AND ap_notified < (UNIX_TIMESTAMP() - %s)
".$EXCLUDE_LIST."
ORDER BY `userid` ASC",
- array($since, $since, $time), __FILE__, __LINE__);
+ array($since, $since, $time), __FILE__, __LINE__);
if (SQL_NUMROWS($result_inactive) > 0) {
// Prepare variable...
$UIDs = '';
FROM `{!_MYSQL_PREFIX!}_pool`
WHERE data_type='DELETED' AND timestamp <= (UNIX_TIMESTAMP() - %s)
ORDER BY sender ASC",
- array($since), __FILE__, __LINE__);
+ array($since), __FILE__, __LINE__);
// Reset counter...
$DELETED = 0;
while ($content = SQL_FETCHARRAY($result_mails)) {
// Check now...
$fount = SQL_NUMROWS(SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(bigintval($content['sender'])), __FILE__, __LINE__));
+ array(bigintval($content['sender'])), __FILE__, __LINE__));
if ($found == 0) {
// Okay we found some mails!
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_pool` WHERE sender=%s",
- array(bigintval($content['sender'])), __FILE__, __LINE__);
+ array(bigintval($content['sender'])), __FILE__, __LINE__);
$DELETED += SQL_AFFECTEDROWS();
// Reset query (to prevent possible errors) ...
FROM `{!_MYSQL_PREFIX!}_pool`
WHERE data_type='DELETED' AND timestamp <= (UNIX_TIMESTAMP() - %s)
ORDER BY sender ASC",
- array($since), __FILE__, __LINE__);
+ array($since), __FILE__, __LINE__);
}
}
}
FROM `{!_MYSQL_PREFIX!}_user_stats`
WHERE data_type='DELETED' AND timestamp_send <= (UNIX_TIMESTAMP() - %s)
ORDER BY sender ASC",
- array($since), __FILE__, __LINE__);
+ array($since), __FILE__, __LINE__);
// Do we have "purged" mails?
if (SQL_NUMROWS($result_mails) > 0) {
FROM `{!_MYSQL_PREFIX!}_user_stats`
WHERE data_type='DELETED' AND timestamp_send <= (UNIX_TIMESTAMP() - %s)
ORDER BY sender ASC",
- array($since), __FILE__, __LINE__);
+ array($since), __FILE__, __LINE__);
}
}
}
SQL_QUERY_ESC("DELETE LOW_PRIORITY
FROM `{!_MYSQL_PREFIX!}_task_system`
WHERE `status`='DELETED' AND task_created <= (UNIX_TIMESTAMP() - %s)",
- array($since), __FILE__, __LINE__);
+ array($since), __FILE__, __LINE__);
// Get deleted rows
$DELETED = SQL_AFFECTEDROWS();
FROM `{!_MYSQL_PREFIX!}_user_data`
WHERE `status`='UNCONFIRMED' AND joined < (UNIX_TIMESTAMP() - %s)
ORDER BY userid ASC",
- array($time), __FILE__, __LINE__);
+ array($time), __FILE__, __LINE__);
if (SQL_NUMROWS($result_uncon) > 0) {
// Prepare variable...
$UIDs = '';
if (!isCodeSet($key)) {
// Abort here
trigger_error(sprintf("%s[%s:] Code %s is not set.",
- __FUNCTION__,
- __LINE__,
- $key
+ __FUNCTION__,
+ __LINE__,
+ $key
));
} // END - if
// Merges $_CONFIG with data in given array
function mergeConfig ($newConfig) {
global $_CONFIG;
- $_CONFIG = merge_array($_CONFIG, $newConfig);
+ $_CONFIG = merge_array(getConfigArray(), $newConfig);
}
// Getter for $_CONFIG entries
$configEntry = smartAddSlashes($configEntry);
}
+ // If config array isn't set, set it
+ if (!isConfigLoaded()) {
+ // Init configuration array
+ initConfig();
+ } // END - if
+
// And set it
$_CONFIG[$configEntry] = $value;
}
// Init the config array
function initConfig () {
global $_CONFIG;
- debug_report_bug('Reached!');
// Set a minimum dummy configuration
$_CONFIG = array(
return $return;
}
+// Updates an old inc/config.php to a inc/cache/config-local.php file
+function updateOldConfigFile () {
+ // Watch out for these lines and execute them as single command
+ // @TODO Make this all better... :-/
+ $watchLines = array(
+ "define('SITE_KEY'," => 'SITE_KEY',
+ "define('DEFAULT_LANG'," => 'DEFAULT_LANG',
+ "define('warn_no_pass'," => 'WARN_NO_PASS',
+ "define('WRITE_FOOTER'," => 'WRITE_FOOTER',
+ "define('OUTPUT_MODE'," => 'OUTPUT_MODE',
+ "define('MAIN_TITLE'," => 'MAIN_TITLE',
+ "define('SLOGAN'," => 'SLOGAN',
+ "define('WEBMASTER'," => 'WEBMASTER',
+ "define('mxchange_installed'," => 'MXCHANGE_INSTALLED',
+ "define('admin_registered'," => 'ADMIN_REGISTERED',
+ "define('_MYSQL_PREFIX'," => '_MYSQL_PREFIX',
+ "define('_TABLE_TYPE'," => '_TABLE_TYPE',
+ "define('_DB_TYPE'," => '_DB_TYPE',
+ "define('SMTP_HOSTNAME'," => 'SMTP_HOSTNAME',
+ "define('SMTP_USER'" => 'SMTP_USER',
+ "define('SMTP_PASSWORD'," => 'SMTP_PASSWORD',
+ "define('ENABLE_BACKLINK'," => 'ENABLE_BACKLINK',
+ );
+
+ // Make these lower-case! (damn stupid code...)
+ $lowerCase = array('WARN_NO_PASS', 'MXCHANGE_INSTALLED', 'ADMIN_REGISTERED');
+
+ // These are still constants...
+ // @TODO Rewrite these all to config entries, if somehow possible
+ $constants = array('MAIN_TITLE', 'SLOGAN', 'WEBMASTER');
+
+ // Special comments...
+ $comments = array(
+ 'WARN_NO_PASS' => 'NULLPASS-WARNING',
+ 'MXCHANGE_INSTALLED' => 'INSTALLED',
+ 'ADMIN_REGISTERED' => 'ADMIN-SETUP',
+ '_MYSQL_PREFIX' => 'MYSQL-PREFIX',
+ '_TABLE_TYPE' => 'TABLE-TYPE',
+ '_DB_TYPE' => 'DATABASE-TYPE',
+ 'ENABLE_BACKLINK' => 'BACKLINK',
+ 'host' => 'MYSQL-HOST',
+ 'dbase' => 'MYSQL-DBASE',
+ 'login' => 'MYSQL-LOGIN',
+ 'password' => 'MYSQL-PASSWORD'
+ );
+
+ // Copy template to new file destionation
+ copyFileVerified(constant('PATH') . 'inc/config-local.php.dist', constant('PATH') . 'inc/cache/config-local.php', 0644);
+
+ // First of all, load the old one!
+ $oldConfig = explode("\n", readFromFile(constant('PATH') . 'inc/config.php'));
+
+ // Now, analyze every entry
+ $done = array();
+ foreach ($oldConfig as $line) {
+ // Check all watch lines
+ foreach ($watchLines as $old => $new) {
+ // Is the line found?
+ if ((substr($line, 0, strlen($old)) == $old) && (!isset($done[$old]))) {
+ // Entry found!
+ //* DEBUG: */ print htmlentities($line) . " - FOUND!<br />\n";
+
+ // Eval the line...
+ eval($line);
+
+ // Setting config entry is new default behaviour!
+ $function = 'setConfigEntry';
+
+ // Still some old constants left?
+ if (in_array($new, $constants)) {
+ // Then switch over...
+ $function = 'define';
+ } // END - if
+
+ // Default comment
+ $comment = str_replace('_', '-', $new);
+
+ // Do we have a special comment?
+ if (isset($comments[$new])) {
+ // Then use it
+ $comment = $comments[$new];
+ } // END - if
+
+ // Do we need to make $new lowercase?
+ $oldNew = $new;
+ if (in_array($new, $lowerCase)) {
+ // Then do so... :)
+ $new = strtolower($new);
+ } // END - if
+
+ /// ... and write it to the new config
+ //* DEBUG: */ print 'function=' . $function . ',new=' . $new . ',comment=' . $comment . "<br />\n";
+ changeDataInFile(constant('PATH') . 'inc/cache/config-local.php', $comment, $function . "('" . $oldNew . "', \"", "\");", constant($new), 0);
+ //* DEBUG: */ print "CHANGED!<br />\n";
+
+ // Mark it as done
+ $done[$old] = 1;
+ } // END - if
+ } // END - foreach
+ } // END - foreach
+
+ // By default the old array $MySQL was not found
+ $found = false;
+
+ // Analyze every entry again for the MySQL configuration
+ foreach ($oldConfig as $line) {
+ // Trim spaces
+ $line = trim($line);
+
+ // Is the $MySQL found?
+ if (substr($line, 0, 6) == "\$MySQL") {
+ // Okay found!
+ $found = true;
+ } elseif ($found === true) {
+ // Now check this row
+ if (substr($line, 0, 2) == ');') {
+ // MySQL array is closed so stop looking for it
+ break;
+ } elseif (substr($line, 0, 2) == '//') {
+ // Skip this line
+ continue;
+ }
+
+ // Debug output only
+ //* DEBUG: */ print htmlentities($line) . " - MySQL!<br />\n";
+
+ // Split parts so we can check them and prepare them
+ $parts = explode('=>', $line);
+ $key = substr(trim($parts[0]), 1, -1); $value = substr(trim($parts[1]), 1, -2);
+
+ // We can now save the right part in new config file
+ changeDataInFile(constant('PATH') . 'inc/cache/config-local.php', $comments[$key], " '".$key."' => \"", "\",", $value, 0);
+ }
+ } // END - foreach
+
+ // Finally remove old config file
+ removeFile(constant('PATH') . 'inc/config.php');
+
+ // Redirect to same URL to reload our new config
+ redirectToUrl($_SERVER['REQUEST_URI']);
+}
+
// [EOF]
?>
// CFG: ADMIN-SETUP
setConfigEntry('ADMIN_REGISTERED', "N");
-// CFG: MYSQL-PREIFX
+// CFG: MYSQL-PREFIX
setConfigEntry('_MYSQL_PREFIX', "mxchange");
// CFG: TABLE-TYPE
// Run SQL command
//* DEBUG: */ echo $sql_string."<br />\n";
$result = mysql_query($sql_string, SQL_GET_LINK())
- or addFatalMessage(__FUNCTION__, __LINE__, $F." (".$L."):".mysql_error()."<br />
+ or addFatalMessage(__FUNCTION__, __LINE__, $F." (".$L."):".mysql_error()."<br />
Query string:<br />
".$sql_string);
$fp = fopen(constant('PATH') . 'inc/cache/mysql.log', 'a') or app_die(__FILE__, __LINE__, "Cannot write mysql.log!");
if (!isset($GLOBALS['sql_first_entry'])) {
// Write first entry
- fwrite($fp, "Module=".$GLOBALS['module']."\n");
+ fwrite($fp, 'Module=' . $GLOBALS['module'] . "\n");
$GLOBALS['sql_first_entry'] = true;
} // END - if
- fwrite($fp, $F."(LINE=".$L."|NUM=".SQL_NUMROWS($result)."|AFFECTED=".SQL_AFFECTEDROWS()."|QUERYTIME:".$queryTime."): ".str_replace('\r', '', str_replace('\n', " ", $sql_string))."\n");
+ fwrite($fp, $F."(LINE=".$L."|NUM=".SQL_NUMROWS($result)."|AFFECTED=".SQL_AFFECTEDROWS()."|QUERYTIME:".$queryTime."): ".str_replace("\r", '', str_replace("\n", " ", $sql_string))."\n");
fclose($fp);
} // END - if
if (is_array($row)) {
// Shall we remove numerical data here automatically?
if ($remove_numerical) {
- // So let's remove all numerical elements to save memory!
+ // So let's remove all numerical elements to save memory!
$max = count($row);
for ($idx = 0; $idx < ($max / 2); $idx++) {
// Remove entry
// Return the result
return SQL_QUERY_ESC($sql,
- array(
- bigintval($id),
- $table,
- $idRow
- ), $F, $L);
+ array(
+ bigintval($id),
+ $table,
+ $idRow
+ ), $F, $L);
}
// ALTER TABLE wrapper function
// Determine index/fulltext/unique word
$noIndex = (
- (
- strpos($sql, 'INDEX') === false
- ) && (
- strpos($sql, 'FULLTEXT') === false
- ) && (
- strpos($sql, 'UNIQUE') === false
- )
+ (
+ strpos($sql, 'INDEX') === false
+ ) && (
+ strpos($sql, 'FULLTEXT') === false
+ ) && (
+ strpos($sql, 'UNIQUE') === false
+ )
);
// Extract table name
// Get column information
$result = SQL_QUERY_ESC("SHOW COLUMNS FROM %s LIKE '%s'",
- array($tableName, $columnName), __FILE__, __LINE__);
+ array($tableName, $columnName), __FILE__, __LINE__);
// Do we have no entry on ADD or an entry on DROP?
// 123 4 4 3 3 4 4 32 23 4 4 3 3 4 4 321
// Show indexes
$result = SQL_QUERY_ESC("SHOW INDEX FROM `%s`",
- array($tableName), __FILE__, __LINE__);
+ array($tableName), __FILE__, __LINE__);
// Walk through all
$skip = false;
// Referal points found so add them and set line(s) to completed='Y'
$content['points'] += $ref;
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_doubler` SET completed='Y' WHERE refid=%s AND completed='N' AND is_ref='Y'",
- array(bigintval($content['userid'])), __FILE__, __LINE__);
+ array(bigintval($content['userid'])), __FILE__, __LINE__);
} else {
// No referal points found
$ref = 0;
// Set entry as "payed"
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_doubler` SET completed='Y' WHERE `id`=%s LIMIT 1",
- array(bigintval($content['id'])), __FILE__, __LINE__);
+ array(bigintval($content['id'])), __FILE__, __LINE__);
$okay = false;
// Check for jackpot inclusion in doubling process
// Prepare array
$content = array(
- // Doubler transmission ID
+ // Doubler transmission ID
'id' => $content['id'],
- // Doubled points
+ // Doubled points
'points' => translateComma($content['points']),
- // Timemark
+ // Timemark
'when' => generateDateTime($content['timemark'], '2'),
- // IP number when the member submitted the doubling form
+ // IP number when the member submitted the doubling form
'ip' => $content['remote_ip'],
);
EXT_SET_ALWAYS_ACTIVE('N');
// Extension update notes
- EXT_SET_UPDATE_NOTES("");
+ EXT_SET_UPDATE_NOTES('');
// Include the extension file
//* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "Extension loaded.");
if (($task_id == 0) && (!$dry_run)) {
// Then request a bug report
debug_report_bug(sprintf("%s: task_id is still zero after DETERMINE_EXTENSION_TASK_ID(%s)",
- __FUNCTION__,
- EXT_GET_CURR_NAME()
+ __FUNCTION__,
+ EXT_GET_CURR_NAME()
));
} // END - if
} // END - if
// Register extension
//* DEBUG: */ print __FUNCTION__."[".__LINE__."]:insert=".EXT_GET_CURR_NAME().'/'.EXT_GET_VERSION()." - INSERT!<br />\n";
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_extensions` (ext_name, ext_active, ext_version) VALUES ('%s','%s','%s')",
- array(EXT_GET_CURR_NAME(), EXT_GET_ALWAYS_ACTIVE(), EXT_GET_VERSION()), __FUNCTION__, __LINE__);
+ array(EXT_GET_CURR_NAME(), EXT_GET_ALWAYS_ACTIVE(), EXT_GET_VERSION()), __FUNCTION__, __LINE__);
// Remove cache file(s) if extension is active
runFilterChain('post_extension_installed', array('ext_name' => EXT_GET_CURR_NAME(), 'task_id' => $task_id));
//* DEBUG: */ print __FUNCTION__."[".__LINE__."]:currName=".EXT_GET_CURR_NAME()."<br />\n";
// Remove task from system when id and extension's name is valid
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_task_system` WHERE `id`=%s AND `status`='NEW' LIMIT 1",
- array(bigintval($task_id)), __FUNCTION__, __LINE__);
+ array(bigintval($task_id)), __FUNCTION__, __LINE__);
}
// Is this the sql_patches?
if ($load_mode == 'remove') {
// Delete this extension (remember to remove it from your server *before* you click on welcome!
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_extensions` WHERE `ext_name`='%s' LIMIT 1",
- array(EXT_GET_CURR_NAME()), __FUNCTION__, __LINE__);
+ array(EXT_GET_CURR_NAME()), __FUNCTION__, __LINE__);
} // END - if
} // END - if
//* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "DB! ext_name={$ext_name}");
// Load from database
$result = SQL_QUERY_ESC("SELECT ext_active FROM `{!_MYSQL_PREFIX!}_extensions` WHERE `ext_name`='%s' LIMIT 1",
- array($ext_name), __FUNCTION__, __LINE__);
+ array($ext_name), __FUNCTION__, __LINE__);
// Entry found?
if (SQL_NUMROWS($result) == 1) {
} elseif (!isCacheInstanceValid()) {
// Load from database
$result = SQL_QUERY_ESC("SELECT ext_version FROM `{!_MYSQL_PREFIX!}_extensions` WHERE `ext_name`='%s' LIMIT 1",
- array($ext_name), __FUNCTION__, __LINE__);
+ array($ext_name), __FUNCTION__, __LINE__);
//* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ": DB - ".SQL_NUMROWS($result)."");
// Is the extension there?
// Update extension's version
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_version='%s' WHERE `ext_name`='%s' LIMIT 1",
- array($GLOBALS['cache_array']['update_ver'][EXT_GET_CURR_NAME()], EXT_GET_CURR_NAME()), __FUNCTION__, __LINE__);
+ array($GLOBALS['cache_array']['update_ver'][EXT_GET_CURR_NAME()], EXT_GET_CURR_NAME()), __FUNCTION__, __LINE__);
// Remove arrays
UNSET_SQLS();
} elseif (!EXT_IS_ACTIVE('cache')) {
// Load from database
$result = SQL_QUERY_ESC("SELECT ext_name FROM `{!_MYSQL_PREFIX!}_extensions` WHERE `id`=%s LIMIT 1",
- array(bigintval($ext_id)), __FUNCTION__, __LINE__);
+ array(bigintval($ext_id)), __FUNCTION__, __LINE__);
list($ret) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
}
} elseif (!EXT_IS_ACTIVE('cache')) {
// Load from database
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_extensions` WHERE `ext_name`='%s' LIMIT 1",
- array($ext_name), __FUNCTION__, __LINE__);
+ array($ext_name), __FUNCTION__, __LINE__);
list($ret) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
}
function ACTIVATE_EXTENSION ($ext_name) {
// Activate the extension
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET `ext_active`='Y' WHERE `ext_name`='%s' LIMIT 1",
- array($ext_name), __FUNCTION__, __LINE__);
+ array($ext_name), __FUNCTION__, __LINE__);
// Extension has been activated?
if (SQL_AFFECTEDROWS() == 1) {
function DEACTIVATE_EXTENSION($ext_name) {
// Activate the extension
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET `ext_active`='N' WHERE `ext_name`='%s' LIMIT 1",
- array($ext_name), __FUNCTION__, __LINE__);
+ array($ext_name), __FUNCTION__, __LINE__);
// Extension has been activated?
if (SQL_AFFECTEDROWS() == 1) {
// Notify the admin
sendAdminNotification(
- getMessage('ADMIN_SUBJECT_EXTENSION_DEACTIVATED'),
+ getMessage('ADMIN_SUBJECT_EXTENSION_DEACTIVATED'),
'admin_ext_deactivated',
- array('ext_name' => $ext_name)
+ array('ext_name' => $ext_name)
);
} // END - if
}
if (DETERMINE_TASK_ID_BY_SUBJECT($subject) == 0) {
// Task not created so it's a brand-new extension which we need to register and create a task for!
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_task_system` (assigned_admin, userid, status, task_type, subject, text, task_created) VALUES ('%s','0','NEW','EXTENSION_UPDATE','%s','%s', UNIX_TIMESTAMP())",
- array($admin_id, $subject, $notes), __FUNCTION__, __LINE__);
+ array($admin_id, $subject, $notes), __FUNCTION__, __LINE__);
} // END - if
} // END - if
}
if ((DETERMINE_TASK_ID_BY_SUBJECT($subject) == 0) && (GET_EXT_VERSION($ext) == '')) {
// Template file
$tpl = sprintf("%stemplates/%s/html/ext/ext_%s.tpl",
- constant('PATH'),
- getLanguage(),
- $ext
+ constant('PATH'),
+ getLanguage(),
+ $ext
);
// Set default message if ext-foo is missing
// Task not created so it's a brand-new extension which we need to register and create a task for!
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_task_system` (assigned_admin, userid, status, task_type, subject, text, task_created)
VALUES (%s, 0, 'NEW', 'EXTENSION', '%s', '%s', UNIX_TIMESTAMP())",
- array(
- $admin_id,
- $subject,
- smartAddSlashes($msg),
- ), __FUNCTION__, __LINE__, true, false, false
+ array(
+ $admin_id,
+ $subject,
+ smartAddSlashes($msg),
+ ), __FUNCTION__, __LINE__, true, false, false
);
} // END - if
}
// Task not created so add it
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_task_system` (assigned_admin, userid, status, task_type, subject, text, task_created)
VALUES (0, 0, 'NEW', 'EXTENSION_DEACTIVATION', '%s', '%s', UNIX_TIMESTAMP())",
- array(
- $subject,
- SQL_ESCAPE(LOAD_TEMPLATE('task_ext_deactivated', true, $ext)),
- ), __FUNCTION__, __LINE__, true, false
+ array(
+ $subject,
+ SQL_ESCAPE(LOAD_TEMPLATE('task_ext_deactivated', true, $ext)),
+ ), __FUNCTION__, __LINE__, true, false
);
} // END - if
}
} elseif ((GET_EXT_VERSION('sql_patches') >= '0.3.6') && ((!EXT_IS_ACTIVE('cache')) || ($forceDb === true))) {
// Check database for entry
$result = SQL_QUERY_ESC("SELECT has_menu FROM `{!_MYSQL_PREFIX!}_mod_reg` WHERE `module`='%s' LIMIT 1",
- array($mod), __FUNCTION__, __LINE__);
+ array($mod), __FUNCTION__, __LINE__);
// Entry found?
if (SQL_NUMROWS($result) == 1) {
// Search for extension task's id
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_task_system` WHERE task_type='EXTENSION' AND subject='[%s:]' LIMIT 1",
- array($ext_name), __FUNCTION__, __LINE__);
+ array($ext_name), __FUNCTION__, __LINE__);
// Entry found?
if (SQL_NUMROWS($result) == 1) {
// Search for task id
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_task_system` WHERE subject LIKE '%s%%' LIMIT 1",
- array($subject), __FUNCTION__, __LINE__);
+ array($subject), __FUNCTION__, __LINE__);
// Entry found?
if (SQL_NUMROWS($result) == 1) {
);
// Reset them
- EXT_SET_UPDATE_NOTES("");
+ EXT_SET_UPDATE_NOTES('');
} elseif (($ver == '0.0') || ($ver == '0.0.0')) {
// Initial release
$content = array(
if (!isset($GLOBALS['ext_sqls'][EXT_GET_CURR_NAME()])) {
// Not found, should not happen
debug_report_bug(sprintf("ext_sqls is empty, current extension: %s",
- EXT_GET_CURR_NAME()
+ EXT_GET_CURR_NAME()
));
} // END - if
switch ($EXT_VER)
{
case '0.0.1': // SQL queries for v0.0.1
- ADD_EXT_SQL("");
+ ADD_EXT_SQL('');
// Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("");
+ EXT_SET_UPDATE_NOTES('');
break;
}
break;
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','active','Heute Online', 10, 'N','Y')");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='active'");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_active'");
-
- // Unregister filter
- UNREGISTER_FILTER('online_extra_links', 'ADD_LINK_ACTIVE_LIST', true, $dry_run);
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='N' WHERE `what`='active' LIMIT 1");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='active' LIMIT 1");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert.");
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','active','Heute Online', 10, 'N','Y')");
break;
- case '0.0.2': // SQL queries for v0.0.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
- break;
-
- case '0.0.3': // SQL queries for v0.0.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut.");
- break;
-
- case '0.0.4': // SQL queries for v0.0.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
- break;
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='active'");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_active'");
- case '0.0.5': // SQL queries for v0.0.5
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD active_limit BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_active','Aktiv-Liste','Einstellungen an der Aktiv-Liste (<strong>Heute Online</strong> im Gastbereich) vornehmen.', 8)");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Aktiven-Liste im Gastbereich ist nun einschränkbar.");
- break;
-
- case '0.0.6': // SQL queries for v0.0.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt.");
+ // Unregister filter
+ UNREGISTER_FILTER('online_extra_links', 'ADD_LINK_ACTIVE_LIST', true, $dry_run);
break;
- case '0.0.7': // SQL queries for v0.0.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='N' WHERE `what`='active' LIMIT 1");
break;
- case '0.0.8': // SQL queries for v0.0.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='active' LIMIT 1");
break;
- case '0.0.9': // SQL queries for v0.0.9
- // Make update depending on 'online'
- EXT_ADD_UPDATE_DEPENDS('online');
-
- // Register filter
- REGISTER_FILTER('online_extra_links', 'ADD_LINK_ACTIVE_LIST', false, true, $dry_run);
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Filter für den "Wer ist Online" Block hinzugefügt und ist von <strong>online</strong> abhängig.");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert.");
+ break;
+
+ case '0.0.2': // SQL queries for v0.0.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+ break;
+
+ case '0.0.3': // SQL queries for v0.0.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut.");
+ break;
+
+ case '0.0.4': // SQL queries for v0.0.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ break;
+
+ case '0.0.5': // SQL queries for v0.0.5
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD active_limit BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_active','Aktiv-Liste','Einstellungen an der Aktiv-Liste (<strong>Heute Online</strong> im Gastbereich) vornehmen.', 8)");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Aktiven-Liste im Gastbereich ist nun einschränkbar.");
+ break;
+
+ case '0.0.6': // SQL queries for v0.0.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt.");
+ break;
+
+ case '0.0.7': // SQL queries for v0.0.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ break;
+
+ case '0.0.8': // SQL queries for v0.0.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+ break;
+
+ case '0.0.9': // SQL queries for v0.0.9
+ // Make update depending on 'online'
+ EXT_ADD_UPDATE_DEPENDS('online');
+
+ // Register filter
+ REGISTER_FILTER('online_extra_links', 'ADD_LINK_ACTIVE_LIST', false, true, $dry_run);
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Filter für den "Wer ist Online" Block hinzugefügt und ist von <strong>online</strong> abhängig.");
+ break;
+ }
break;
- }
- break;
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins', NULL, 'Admin-Management','Administratoren anlegen, löschen oder Passwort/E-Mail Adresse ändern.','1')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_add','Admin hinzufügen','Neuen Admin-Account anlegen','0')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_edit','Admin-Account ändern','Bestehende Admin-Accounts bearbeiten: E-Mail-Adresse, Passwort und/oder Login-Name ändern.','1')");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='admins'");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_acls`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_mails`");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP default_acl");
-
- // Remove filters
- UNREGISTER_FILTER('sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', true, $dry_run);
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.2.0': // SQL queries for v0.2
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_contact','Admin kontaktieren','Kontaktiert einen Admin per Mail oder Nachricht (nur wenn messaging-Erweiterung installiert ist).','2')");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fügt den Menüpunkt "Admin kontaktieren" hinzu.");
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins', NULL, 'Admin-Management','Administratoren anlegen, löschen oder Passwort/E-Mail Adresse ändern.','1')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_add','Admin hinzufügen','Neuen Admin-Account anlegen','0')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_edit','Admin-Account ändern','Bestehende Admin-Accounts bearbeiten: E-Mail-Adresse, Passwort und/oder Login-Name ändern.','1')");
break;
- case '0.3.0': // SQL queries for v0.3
- // Add admin menu
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','config_admins','ACL einstellen','Richten Sie Zugriffskontrollzeilen für jeden Admin individuell ein, um ihm nur bestimmte Bereiche des Admin-Bereiches zugänglich zu machen oder zu sperren.','4')");
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='admins'");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_acls`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_mails`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP default_acl");
- // Which is the default setting when you create a new admin login?
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD admins_default_acl ENUM('deny','allow') NOT NULL DEFAULT 'deny'");
+ // Remove filters
+ UNREGISTER_FILTER('sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', true, $dry_run);
+ break;
- // Default is deny everything
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD default_acl ENUM('deny','allow') NOT NULL DEFAULT 'deny'");
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
+ break;
- // But allow current admin everything (THIS SHALL BE YOU!)
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admins` SET default_acl='allow' WHERE login='".getSession('admin_login')."' LIMIT 1");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_acls`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admins_acls` (
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
+ break;
+
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.2.0': // SQL queries for v0.2
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_contact','Admin kontaktieren','Kontaktiert einen Admin per Mail oder Nachricht (nur wenn messaging-Erweiterung installiert ist).','2')");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fügt den Menüpunkt "Admin kontaktieren" hinzu.");
+ break;
+
+ case '0.3.0': // SQL queries for v0.3
+ // Add admin menu
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','config_admins','ACL einstellen','Richten Sie Zugriffskontrollzeilen für jeden Admin individuell ein, um ihm nur bestimmte Bereiche des Admin-Bereiches zugänglich zu machen oder zu sperren.','4')");
+
+ // Which is the default setting when you create a new admin login?
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD admins_default_acl ENUM('deny','allow') NOT NULL DEFAULT 'deny'");
+
+ // Default is deny everything
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD default_acl ENUM('deny','allow') NOT NULL DEFAULT 'deny'");
+
+ // But allow current admin everything (THIS SHALL BE YOU!)
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admins` SET default_acl='allow' WHERE login='".getSession('admin_login')."' LIMIT 1");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_acls`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admins_acls` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
admin_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
action_menu VARCHAR(255) NOT NULL DEFAULT '',
PRIMARY KEY (id)
) TYPE={!_TABLE_TYPE!}");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sogn. ACLs werden hinzugefügt: <strong>A</strong>ccess <strong>C</strong>ontrol <strong>L</strong>ines sind zu deutsch Zugriffkontrollzeilen, mit denen Sie einstellen können, was welcher Admin machen darf oder nicht.");
- break;
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sogn. ACLs werden hinzugefügt: <strong>A</strong>ccess <strong>C</strong>ontrol <strong>L</strong>ines sind zu deutsch Zugriffkontrollzeilen, mit denen Sie einstellen können, was welcher Admin machen darf oder nicht.");
+ break;
- case '0.3.1': // SQL queries for v0.3.1
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins_acls` MODIFY id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT");
- break;
+ case '0.3.1': // SQL queries for v0.3.1
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins_acls` MODIFY id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT");
+ break;
- case '0.4.0': // SQL queries for v0.4.0
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_mails`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admins_mails` (
+ case '0.4.0': // SQL queries for v0.4.0
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_mails`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admins_mails` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
admin_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
mail_template VARCHAR(255) NOT NULL,
KEY (admin_id),
PRIMARY KEY (id)
) TYPE={!_TABLE_TYPE!}");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_mails','Admin-Mails','Stellen Sie hier ein, welcher Admin welche Mail erhalten soll. Sie können dies (derzeit) jedoch erst, wenn einmal die Mail versendet wurde!','5')");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Kontrollieren Sie, welche Mails welcher Admin oder alle (admin_id=0) bekommen soll oder im UserLog (admin_id=-1) verzeichnet werden soll. Standartmässig wird weiter an alle versendet.");
- break;
-
- case '0.4.1': // SQL queries for v0.4.1
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admins_mails` WHERE mail_template LIKE '% %'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Admins-Mails-Tabelle geleert.");
-
- case '0.4.4': // SQL queries for v0.4.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("&admin= in &amp;admin= umgewandelt.");
- break;
-
- case '0.4.5': // SQL queries for v0.4.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Vorbereitet auf Cache-System");
- break;
-
- case '0.4.6': // SQL queries for v0.4.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Problem mit cache-Erweiterung gefixt. Der Admin-Bereich war permanent gesperrt.");
- break;
-
- case '0.4.7': // SQL queries for v0.4.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Es wurde die Zeitmarke der Cache-Datei admins.cache mit berücksichtigt.");
- break;
-
- case '0.4.8': // SQL queries for v0.4.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
- break;
-
- case '0.4.9': // SQL queries for v0.4.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
- break;
-
- case '0.5.0': // SQL queries for v0.5.0
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
- break;
-
- case '0.5.1': // SQL queries for v0.5.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Cache wird endlich gelöscht, wenn Admin entfernt wird.");
- break;
-
- case '0.5.2': // SQL queries for v0.5.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Löschen von Admin-Accounts repariert und HTML-Code ausgelagert in Templates.");
- break;
-
- case '0.5.3': // SQL queries for v0.5.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
- break;
-
- case '0.5.4': // SQL queries for v0.5.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt.");
- break;
-
- case '0.5.5': // SQL queries for v0.5.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Menüpunkt Admin-Mails korregiert: SQL-Anweisung war fehlerhaft; und HTML-Code in Templates ausgelagert.");
- break;
-
- case '0.5.6': // SQL queries for v0.5.6
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='admins_contct' WHERE `what`='admins_contact' LIMIT 1");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Namenskonflikt zwischen den Erweiterungen <strong>admins</strong> und (kommender) <strong>contact</strong>.");
- break;
-
- case '0.5.7': // SQL queries for v0.5.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Links wegen <strong>what=admins_contct</strong> geändert.");
- break;
-
- case '0.5.8': // SQL queries for v0.5.8
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='admins_contct' WHERE `what`='admins_contact' LIMIT 1");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Ein Punkt in der Versionsnummernliste verhinderte das 0.5.6-Update.");
- break;
-
- case '0.5.9': // SQL queries for v0.5.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt.");
- break;
-
- case '0.6.0': // SQL queries for v0.6.0
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Link in "ACL Einstellen" zum Admin-Kontaktformular korregiert.");
- break;
-
- case '0.6.1': // SQL queries for v0.6.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Speichern von Admin-Accounts klappt wieder.");
- break;
-
- case '0.6.2': // SQL queries for v0.6.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Bitte verschieben Sie die admins-Templates (Ordner: {!PATH!}/templates/de/emails/) in den neuen Order admins!");
- break;
-
- case '0.6.3': // SQL queries for v0.6.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
- break;
-
- case '0.6.4': // SQL queries for v0.6.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Problem mit der Rechtevererbung beseitigt: Geben Sie nun ein Hauptmenü frei (Allow), dann kann der Admin auch die Untermenüs erreichen. Zudem können Sie gezielte Untermenüs im freigegeben Hauptmenü dennoch sperren.");
- break;
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_mails','Admin-Mails','Stellen Sie hier ein, welcher Admin welche Mail erhalten soll. Sie können dies (derzeit) jedoch erst, wenn einmal die Mail versendet wurde!','5')");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Kontrollieren Sie, welche Mails welcher Admin oder alle (admin_id=0) bekommen soll oder im UserLog (admin_id=-1) verzeichnet werden soll. Standartmässig wird weiter an alle versendet.");
+ break;
+
+ case '0.4.1': // SQL queries for v0.4.1
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admins_mails` WHERE mail_template LIKE '% %'");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Admins-Mails-Tabelle geleert.");
+
+ case '0.4.4': // SQL queries for v0.4.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("&admin= in &amp;admin= umgewandelt.");
+ break;
+
+ case '0.4.5': // SQL queries for v0.4.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Vorbereitet auf Cache-System");
+ break;
+
+ case '0.4.6': // SQL queries for v0.4.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Problem mit cache-Erweiterung gefixt. Der Admin-Bereich war permanent gesperrt.");
+ break;
+
+ case '0.4.7': // SQL queries for v0.4.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Es wurde die Zeitmarke der Cache-Datei admins.cache mit berücksichtigt.");
+ break;
+
+ case '0.4.8': // SQL queries for v0.4.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.4.9': // SQL queries for v0.4.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.5.0': // SQL queries for v0.5.0
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.5.1': // SQL queries for v0.5.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Cache wird endlich gelöscht, wenn Admin entfernt wird.");
+ break;
+
+ case '0.5.2': // SQL queries for v0.5.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Löschen von Admin-Accounts repariert und HTML-Code ausgelagert in Templates.");
+ break;
+
+ case '0.5.3': // SQL queries for v0.5.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ break;
+
+ case '0.5.4': // SQL queries for v0.5.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt.");
+ break;
+
+ case '0.5.5': // SQL queries for v0.5.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Menüpunkt Admin-Mails korregiert: SQL-Anweisung war fehlerhaft; und HTML-Code in Templates ausgelagert.");
+ break;
+
+ case '0.5.6': // SQL queries for v0.5.6
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='admins_contct' WHERE `what`='admins_contact' LIMIT 1");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Namenskonflikt zwischen den Erweiterungen <strong>admins</strong> und (kommender) <strong>contact</strong>.");
+ break;
+
+ case '0.5.7': // SQL queries for v0.5.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Links wegen <strong>what=admins_contct</strong> geändert.");
+ break;
+
+ case '0.5.8': // SQL queries for v0.5.8
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='admins_contct' WHERE `what`='admins_contact' LIMIT 1");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Ein Punkt in der Versionsnummernliste verhinderte das 0.5.6-Update.");
+ break;
+
+ case '0.5.9': // SQL queries for v0.5.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt.");
+ break;
+
+ case '0.6.0': // SQL queries for v0.6.0
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Link in "ACL Einstellen" zum Admin-Kontaktformular korregiert.");
+ break;
+
+ case '0.6.1': // SQL queries for v0.6.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Speichern von Admin-Accounts klappt wieder.");
+ break;
+
+ case '0.6.2': // SQL queries for v0.6.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Bitte verschieben Sie die admins-Templates (Ordner: {!PATH!}/templates/de/emails/) in den neuen Order admins!");
+ break;
+
+ case '0.6.3': // SQL queries for v0.6.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ break;
+
+ case '0.6.4': // SQL queries for v0.6.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Problem mit der Rechtevererbung beseitigt: Geben Sie nun ein Hauptmenü frei (Allow), dann kann der Admin auch die Untermenüs erreichen. Zudem können Sie gezielte Untermenüs im freigegeben Hauptmenü dennoch sperren.");
+ break;
+
+ case '0.6.5': // SQL queries for v0.6.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle.");
+ break;
+
+ case '0.6.6': // SQL queries for v0.5.6
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='admins_contct' WHERE `what`='admins_contact' LIMIT 1");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Namenskonflikt zwischen den Erweiterungen <strong>admins</strong> und (kommender) <strong>contact</strong>.");
+ break;
+
+ case '0.6.7': // SQL queries for v0.6.7
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD la_mode ENUM('global','OLD','NEW') NOT NULL DEFAULT 'global'");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Namenskonflikt zwischen den Erweiterungen <strong>admins</strong> und (kommender) <strong>contact</strong>. Beseitigung eines Fehlers <strong>HTTP_POSR_VARS</strong> beim Ändern von Administratoren.");
+ break;
+
+ case '0.6.8': // SQL queries for v0.6.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("<strong>setSession()</strong> mit @-Zeichen gegen ungewollte Ausgaben abgesichert.");
+ break;
+
+ case '0.6.9': // SQL queries for v0.6.9
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Admin-Management' WHERE action = 'admins' AND (`what`='' OR `what` IS NULL) LIMIT 1");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Verwaltung nach Management umbenannt.");
+ break;
+
+ case '0.7.0': // SQL queries for v0.7.0
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Veraltetes Update.");
+ break;
+
+ case '0.7.1': // SQL queries for v0.7.1
+ // Update depends on sql_patches
+ EXT_ADD_UPDATE_DEPENDS('sql_patches');
+
+ // Add filters
+ REGISTER_FILTER('sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', false, true, $dry_run);
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Filter hinzugefügt und ist von <strong>sql_patches</strong> abhängig.");
+ break;
+
+ case '0.7.2': // SQL queries for v0.7.2
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP login_failtures");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP last_failture");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD login_failures BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD last_failure TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'");
- case '0.6.5': // SQL queries for v0.6.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle.");
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Schreibweise korregiert.");
+ break;
+ }
break;
- case '0.6.6': // SQL queries for v0.5.6
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='admins_contct' WHERE `what`='admins_contact' LIMIT 1");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Namenskonflikt zwischen den Erweiterungen <strong>admins</strong> und (kommender) <strong>contact</strong>.");
- break;
-
- case '0.6.7': // SQL queries for v0.6.7
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD la_mode ENUM('global','OLD','NEW') NOT NULL DEFAULT 'global'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Namenskonflikt zwischen den Erweiterungen <strong>admins</strong> und (kommender) <strong>contact</strong>. Beseitigung eines Fehlers <strong>HTTP_POSR_VARS</strong> beim Ändern von Administratoren.");
- break;
-
- case '0.6.8': // SQL queries for v0.6.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("<strong>setSession()</strong> mit @-Zeichen gegen ungewollte Ausgaben abgesichert.");
- break;
-
- case '0.6.9': // SQL queries for v0.6.9
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Admin-Management' WHERE action = 'admins' AND (`what`='' OR `what` IS NULL) LIMIT 1");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Verwaltung nach Management umbenannt.");
- break;
-
- case '0.7.0': // SQL queries for v0.7.0
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Veraltetes Update.");
- break;
-
- case '0.7.1': // SQL queries for v0.7.1
- // Update depends on sql_patches
- EXT_ADD_UPDATE_DEPENDS('sql_patches');
-
- // Add filters
- REGISTER_FILTER('sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', false, true, $dry_run);
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Filter hinzugefügt und ist von <strong>sql_patches</strong> abhängig.");
- break;
-
- case '0.7.2': // SQL queries for v0.7.2
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP login_failtures");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP last_failture");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD login_failures BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD last_failure TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Schreibweise korregiert.");
- break;
- }
- break;
-
-case 'modify': // When the extension got modified
- break;
-
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'modify': // When the extension got modified
+ break;
+
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
// Keep this extension always active!
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // Remove all other themes
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_extensions` WHERE ext_name LIKE 'admintheme%'");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='stats' WHERE `what`='usr_online'");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='stats' WHERE `what`='email_stats'");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='misc' WHERE `what`='maintenance'");
- break;
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // Remove all other themes
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_extensions` WHERE ext_name LIKE 'admintheme%'");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='stats' WHERE `what`='usr_online'");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='stats' WHERE `what`='email_stats'");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='misc' WHERE `what`='maintenance'");
+ break;
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
+ break;
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
+ break;
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
+ break;
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES('');
+ break;
+ }
break;
- }
- break;
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // Remove all other menu themes
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_extensions` WHERE ext_name LIKE 'admintheme%'");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='misc' WHERE `what`='usr_online' LIMIT 1");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='stats' WHERE `what`='email' LIMIT 1");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='setup' WHERE `what`='maintenance' LIMIT 1");
- break;
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // Remove all other menu themes
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_extensions` WHERE ext_name LIKE 'admintheme%'");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='misc' WHERE `what`='usr_online' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='stats' WHERE `what`='email' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='setup' WHERE `what`='maintenance' LIMIT 1");
+ break;
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
+ break;
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
+ break;
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
+ break;
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES('');
+ break;
+ }
break;
- }
- break;
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` MODIFY data_type ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE','DELETED') NOT NULL DEFAULT 'TEMP'");
- if (EXT_IS_ACTIVE('bonus')) {
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` MODIFY data_type ENUM('NEW','QUEUE','SEND','DELETED') NOT NULL DEFAULT 'NEW'");
- }
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` MODIFY data_type ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE') NOT NULL DEFAULT 'TEMP'");
- if (EXT_IS_ACTIVE('bonus')) {
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` MODIFY data_type ENUM('NEW','QUEUE','SEND') NOT NULL DEFAULT 'NEW'");
- }
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN('config_autopurge','list_autopurge')");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP ap_notified");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.1.0': // SQL queries for v0.1
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD autopurge_inactive ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD autopurge_unconfirmed ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_inactive_since BIGINT(20) UNSIGNED NOT NULL DEFAULT '2592000'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_inactive_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '25200'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_unconfirmed_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '432000'");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_autopurge','Auto-Löschung','Automatisch inaktive oder nicht bestätigte Accounts löschen.','12')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_autopurge','Inaktive finden','Lassen Sie sich vor dem täglichen Reset anzeigen, welche Mitglieder als inaktiv erkannt werden und welche gelöscht werden.','10')");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD ap_notified BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Automatisches Lö:schen von inaktiven bzw. nicht bestätigten Accounts hinzugefügt.");
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` MODIFY data_type ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE','DELETED') NOT NULL DEFAULT 'TEMP'");
+ if (EXT_IS_ACTIVE('bonus')) {
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` MODIFY data_type ENUM('NEW','QUEUE','SEND','DELETED') NOT NULL DEFAULT 'NEW'");
+ }
break;
- case '0.1.2': // SQL queries for v0.1.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Automatisches Löschen von als zu löschen markierte Tasks hinzugefügt.");
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` MODIFY data_type ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE') NOT NULL DEFAULT 'TEMP'");
+ if (EXT_IS_ACTIVE('bonus')) {
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` MODIFY data_type ENUM('NEW','QUEUE','SEND') NOT NULL DEFAULT 'NEW'");
+ }
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN('config_autopurge','list_autopurge')");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP ap_notified");
break;
- case '0.1.4': // SQL queries for v0.1.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler <div class=\"admin_failed\">Warning: Missing argument 2 for create_timestamp_from_selections() in {!PATH!}inc/libs/pro_functions.php on line 227</div> behoben.");
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.1.5': // SQL queries for v0.1.5
- // Update notes (these will be set as task text!)
-
- EXT_SET_UPDATE_NOTES("Anstelle von <strong>ref_depth</strong> wurde <strong>level</strong> programmiert.");
- break;
-
- case '0.1.6': // SQL queries for v0.1.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.1.7': // SQL queries for v0.1.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.1.0': // SQL queries for v0.1
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD autopurge_inactive ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD autopurge_unconfirmed ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_inactive_since BIGINT(20) UNSIGNED NOT NULL DEFAULT '2592000'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_inactive_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '25200'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_unconfirmed_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '432000'");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_autopurge','Auto-Löschung','Automatisch inaktive oder nicht bestätigte Accounts löschen.','12')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_autopurge','Inaktive finden','Lassen Sie sich vor dem täglichen Reset anzeigen, welche Mitglieder als inaktiv erkannt werden und welche gelöscht werden.','10')");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD ap_notified BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Automatisches Lö:schen von inaktiven bzw. nicht bestätigten Accounts hinzugefügt.");
+ break;
+
+ case '0.1.2': // SQL queries for v0.1.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Automatisches Löschen von als zu löschen markierte Tasks hinzugefügt.");
+ break;
+
+ case '0.1.4': // SQL queries for v0.1.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler <div class=\"admin_failed\">Warning: Missing argument 2 for create_timestamp_from_selections() in {!PATH!}inc/libs/pro_functions.php on line 227</div> behoben.");
+ break;
+
+ case '0.1.5': // SQL queries for v0.1.5
+ // Update notes (these will be set as task text!)
+
+ EXT_SET_UPDATE_NOTES("Anstelle von <strong>ref_depth</strong> wurde <strong>level</strong> programmiert.");
+ break;
+
+ case '0.1.6': // SQL queries for v0.1.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.1.7': // SQL queries for v0.1.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.1.8': // SQL queries for v0.1.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
+ break;
+
+ case '0.1.9': // SQL queries for v0.1.9
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD autopurge_tasks ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_tasks_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('one_day')*7)."'");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Bereinigung von zu löschenden Aufgaben klappt wieder. Zeitlimit für genanntes kann eingestellt werden (Default = 7 Tage).<br /><br /><u>Bitte aktualisieren Sie auch die Admin-Templates!</u>");
+ break;
+
+ case '0.2.0': // SQL queries for v0.2.0
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_in_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_un_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_tasks_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Mail wird bei Löschung von Aufgaben ausgesendet.<br /><br /><u>Bitte aktualisieren Sie auch die Admin-Templates!</u>");
+ break;
+
+ case '0.2.1': // SQL queries for v0.2.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Diverse angebundene Erweiterungen gefixt.");
+ break;
+
+ case '0.2.2': // SQL queries for v0.2.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Betreffzeile für gelöschte Aufgaben korregiert.");
+ break;
+
+ case '0.2.3': // SQL queries for v0.2.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
+ break;
+
+ case '0.2.4': // SQL queries for v0.2.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Auto-Löschung von Bestätigungslinks kann unter "Sonstige Einstellungen" abgeschaltet werden (0 setzen!)");
+ break;
+
+ case '0.2.5': // SQL queries for v0.2.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ break;
+
+ case '0.2.6': // SQL queries for v0.2.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Problem mit Jackpot beseitigt ({!POINTS!} wurden nicht gutgeschrieben.)");
+ break;
+
+ case '0.2.7': // SQL queries for v0.2.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
+ break;
+
+ case '0.2.8': // SQL queries for v0.2.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
+ break;
+
+ case '0.2.9': // SQL queries for v0.2.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Mailbetreffs korregiert.");
+ break;
+
+ case '0.3.0': // SQL queries for v0.3.0
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Template <u>admin_config_autopurge_pro.tpl</u> ist überflüssig geworden. Bitte löschen Sie dies!");
+ break;
+
+ case '0.3.1': // SQL queries for v0.3.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausführlich.");
+ break;
+
+ case '0.3.2': // SQL queries for v0.3.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+ break;
+
+ case '0.3.3': // SQL queries for v0.3.3
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_del_mails ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_dm_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_dm_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '86400'");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Von bereits gelöschten Mitgliedern die Mails löschen integriert.");
+ break;
+
+ case '0.3.4': // SQL queries for v0.3.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler mit <strong>timestamp_send</strong> (Zeile 308) beseitigt.");
+ break;
+
+ case '0.3.5': // SQL queries for v0.3.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler mit <strong>ap_del_emails</strong> (Einstellungen im Admin-Bereich) beseitigt.");
+ break;
+
+ case '0.3.6': // SQL queries for v0.3.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Die Accounts der Standart-Referal-ID, der Bonus-ID, Bettellink-ID und der Verdoppler-ID werden nun nicht mehr gelöscht und tauchen auch unterhalb der Inaktiven-Liste nicht mehr auf.");
+ break;
+
+ case '0.3.7': // SQL queries for v0.3.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ break;
+
+ case '0.3.8': // SQL queries for v0.3.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
+ break;
+
+ case '0.3.9': // SQL queries for v0.3.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt. Unter <strong>Auto-Löschung</strong> finden Sie nun auch die Einstellungen zu Mailbestätigungs wieder. Zudem werden keine Urlauber (neue Urlaubsschaltung beachtet) mehr als inaktiv erkannt.");
+ break;
+
+ case '0.4.0': // SQL queries for v0.4.0
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Template-Problem beseitigt. Dies verhinderte das Abspeichern der Einstellungen.");
+ break;
+ }
break;
- case '0.1.8': // SQL queries for v0.1.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
- break;
-
- case '0.1.9': // SQL queries for v0.1.9
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD autopurge_tasks ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_tasks_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('one_day')*7)."'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Bereinigung von zu löschenden Aufgaben klappt wieder. Zeitlimit für genanntes kann eingestellt werden (Default = 7 Tage).<br /><br /><u>Bitte aktualisieren Sie auch die Admin-Templates!</u>");
- break;
+ case 'modify': // When the extension got modified
+ break;
- case '0.2.0': // SQL queries for v0.2.0
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_in_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_un_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_tasks_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Mail wird bei Löschung von Aufgaben ausgesendet.<br /><br /><u>Bitte aktualisieren Sie auch die Admin-Templates!</u>");
- break;
-
- case '0.2.1': // SQL queries for v0.2.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Diverse angebundene Erweiterungen gefixt.");
- break;
-
- case '0.2.2': // SQL queries for v0.2.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Betreffzeile für gelöschte Aufgaben korregiert.");
- break;
-
- case '0.2.3': // SQL queries for v0.2.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
- break;
-
- case '0.2.4': // SQL queries for v0.2.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Auto-Löschung von Bestätigungslinks kann unter "Sonstige Einstellungen" abgeschaltet werden (0 setzen!)");
- break;
-
- case '0.2.5': // SQL queries for v0.2.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
- break;
-
- case '0.2.6': // SQL queries for v0.2.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Problem mit Jackpot beseitigt ({!POINTS!} wurden nicht gutgeschrieben.)");
- break;
-
- case '0.2.7': // SQL queries for v0.2.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
- break;
-
- case '0.2.8': // SQL queries for v0.2.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
- case '0.2.9': // SQL queries for v0.2.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Mailbetreffs korregiert.");
- break;
-
- case '0.3.0': // SQL queries for v0.3.0
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Template <u>admin_config_autopurge_pro.tpl</u> ist überflüssig geworden. Bitte löschen Sie dies!");
- break;
-
- case '0.3.1': // SQL queries for v0.3.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausführlich.");
- break;
-
- case '0.3.2': // SQL queries for v0.3.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
- break;
-
- case '0.3.3': // SQL queries for v0.3.3
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_del_mails ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_dm_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_dm_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '86400'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Von bereits gelöschten Mitgliedern die Mails löschen integriert.");
- break;
-
- case '0.3.4': // SQL queries for v0.3.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler mit <strong>timestamp_send</strong> (Zeile 308) beseitigt.");
- break;
-
- case '0.3.5': // SQL queries for v0.3.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler mit <strong>ap_del_emails</strong> (Einstellungen im Admin-Bereich) beseitigt.");
- break;
-
- case '0.3.6': // SQL queries for v0.3.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Die Accounts der Standart-Referal-ID, der Bonus-ID, Bettellink-ID und der Verdoppler-ID werden nun nicht mehr gelöscht und tauchen auch unterhalb der Inaktiven-Liste nicht mehr auf.");
- break;
-
- case '0.3.7': // SQL queries for v0.3.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
- break;
-
- case '0.3.8': // SQL queries for v0.3.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
- break;
-
- case '0.3.9': // SQL queries for v0.3.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt. Unter <strong>Auto-Löschung</strong> finden Sie nun auch die Einstellungen zu Mailbestätigungs wieder. Zudem werden keine Urlauber (neue Urlaubsschaltung beachtet) mehr als inaktiv erkannt.");
- break;
-
- case '0.4.0': // SQL queries for v0.4.0
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Template-Problem beseitigt. Dies verhinderte das Abspeichern der Einstellungen.");
- break;
- }
- break;
-
-case 'modify': // When the extension got modified
- break;
-
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
-
-default: // Do stuff when extension is loaded
- // Do we have a daily-reset-run?
- if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) {
- // Yes, we have. So let's auto-purge some campaigns, inactive users and unconfirmed accounts
- ADD_INC_TO_POOL(sprintf("%sinc/autopurge.php", constant('PATH')));
- }
- break;
+ default: // Do stuff when extension is loaded
+ // Do we have a daily-reset-run?
+ if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) {
+ // Yes, we have. So let's auto-purge some campaigns, inactive users and unconfirmed accounts
+ ADD_INC_TO_POOL(sprintf("%sinc/autopurge.php", constant('PATH')));
+ }
+ break;
}
// Keep this extension always active!
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_accounts`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_accounts` (
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_accounts`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_accounts` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
account_created BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
INDEX (account_locked),
INDEX (last_tan_stamp)
) TYPE={!_TABLE_TYPE!}");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_transfers`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_transfers` (
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_transfers`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_transfers` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
to_account_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
from_account_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
INDEX (to_account_id, from_account_id),
INDEX (day_bookkeeping, day_available)
) TYPE={!_TABLE_TYPE!}");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_packages`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_packages` (
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_packages`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_packages` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
title VARCHAR(255) NOT NULL DEFAULT '',
description TINYTEXT,
tan_lock TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (id)
) TYPE={!_TABLE_TYPE!}");
- // free_account_stuff will be a list of columns of the table _bank_packages
- // what the member shall get for the specified income. output_system_mode
- // must be extended with the mode you get for free: output_system_mode:LOGIN
- // should be fine. More than one entry and not DISABLED ;) are not supported.
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_tanlist`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_tanlist` (
+ // free_account_stuff will be a list of columns of the table _bank_packages
+ // what the member shall get for the specified income. output_system_mode
+ // must be extended with the mode you get for free: output_system_mode:LOGIN
+ // should be fine. More than one entry and not DISABLED ;) are not supported.
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_tanlist`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_tanlist` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
idx TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
account_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
UNIQUE (account_id, tan)
) TYPE={!_TABLE_TYPE!}");
- // Admin menu queries
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank', NULL, 'Bank-Accounts','Verwalten Sie hier alle Bank-Accounts Ihrer Mitglieder, sowie Angebotspakete und Überweisungen.', 6)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','add_bank_package','Angebotspaket hinzufügen','Neues Angebotspaket erstellen.', 1)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_package','Angebotspakete auflisten','Listet alle erstellten Angebotspakete auf.', 2)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','edit_bank_package','Angebotspaket ändern','Nach Auswahl eines Angebotspaketes können Sie dieses hier verändern. Bitte beachten Sie, dass Ihre Mitglieder keine Mail dabei erhalten!', 3)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_package','Angebotspaket ent-/sperren','Nehmen Sie Angebotspakete zur temporären Überarbeitung zuvor heraus, dann können Sie in Ruhe drüber nachdenken und Berechnungen anstellen. Freigabe ist hier auch möglich.', 4)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','del_bank_package','Angebotspaket löschen','Nach Auswahl eines Angebotspaketes können Sie mit abschliessender Bestätigung Angebotspakete ganz löschen. Bitte beachten Sie, dass dies nur möglich ist, wenn auch alle Accounts dieses nicht mehr nutzen!', 5)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','add_bank_account','Konto anlegen','Legen Sie hier Konten für die Mitglieder an (falls Ihre Mitglieder nicht zurecht kommen).', 6)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_account','Konten auflisten','Auflistung aller Konto oder eines auswählbaren Mitglieds.', 7)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','edit_bank_account','Konto ändern','Ändern Sie hier bestehende Konten, z.B. den Dispositionskredit usw. PINs und TANs sind hier nicht änderbar! Bestätigungsmails sind optional versendbar.', 8)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_account','Konto ent-/sperren','Sperren Sie hier Konten bei Bedarf. Auch das Freischalten ist hier möglich. Eine Benachrichtigung per Mail wird dann an das Mitglied ausgesendet.', 9)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','del_bank_account','Konto löschen','Löschen von Konten mit Bestätigungsmail. Wenn Sie ein Mitglieder-Account löschen, so müssen Sie derzeit seine angelegten Konten auch löschen!', 10)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','send_bank_tanlist','TAN-Liste aussenden','Listet zuerst Anfragen von Mitgliedern auf, die eine neue (i)TAN-Liste benötigen, anschliessend kann die Liste dann ausgesendet werden.', 11)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_tanlist','TAN-Liste ent-/sperren','Bestehende TAN-Listen können auf Kundenwunsch hin gesperrt und wieder entsperrt werden. Dies passiert auch, wenn der Kunde x-mal (siehe Angebotspakete) eine verkehrte TAN eingegeben hat. Einzelne TANs sind nicht ent-/sperrbar.', 12)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_trans','Überweisungen auflisten','Nach Auswahl eines Mitgliedes und einem Konto (benötgt JavaScript!) können Sie seitenweise die Überweisungen durchschauen.', 13)");
+ // Admin menu queries
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank', NULL, 'Bank-Accounts','Verwalten Sie hier alle Bank-Accounts Ihrer Mitglieder, sowie Angebotspakete und Überweisungen.', 6)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','add_bank_package','Angebotspaket hinzufügen','Neues Angebotspaket erstellen.', 1)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_package','Angebotspakete auflisten','Listet alle erstellten Angebotspakete auf.', 2)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','edit_bank_package','Angebotspaket ändern','Nach Auswahl eines Angebotspaketes können Sie dieses hier verändern. Bitte beachten Sie, dass Ihre Mitglieder keine Mail dabei erhalten!', 3)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_package','Angebotspaket ent-/sperren','Nehmen Sie Angebotspakete zur temporären Überarbeitung zuvor heraus, dann können Sie in Ruhe drüber nachdenken und Berechnungen anstellen. Freigabe ist hier auch möglich.', 4)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','del_bank_package','Angebotspaket löschen','Nach Auswahl eines Angebotspaketes können Sie mit abschliessender Bestätigung Angebotspakete ganz löschen. Bitte beachten Sie, dass dies nur möglich ist, wenn auch alle Accounts dieses nicht mehr nutzen!', 5)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','add_bank_account','Konto anlegen','Legen Sie hier Konten für die Mitglieder an (falls Ihre Mitglieder nicht zurecht kommen).', 6)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_account','Konten auflisten','Auflistung aller Konto oder eines auswählbaren Mitglieds.', 7)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','edit_bank_account','Konto ändern','Ändern Sie hier bestehende Konten, z.B. den Dispositionskredit usw. PINs und TANs sind hier nicht änderbar! Bestätigungsmails sind optional versendbar.', 8)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_account','Konto ent-/sperren','Sperren Sie hier Konten bei Bedarf. Auch das Freischalten ist hier möglich. Eine Benachrichtigung per Mail wird dann an das Mitglied ausgesendet.', 9)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','del_bank_account','Konto löschen','Löschen von Konten mit Bestätigungsmail. Wenn Sie ein Mitglieder-Account löschen, so müssen Sie derzeit seine angelegten Konten auch löschen!', 10)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','send_bank_tanlist','TAN-Liste aussenden','Listet zuerst Anfragen von Mitgliedern auf, die eine neue (i)TAN-Liste benötigen, anschliessend kann die Liste dann ausgesendet werden.', 11)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_tanlist','TAN-Liste ent-/sperren','Bestehende TAN-Listen können auf Kundenwunsch hin gesperrt und wieder entsperrt werden. Dies passiert auch, wenn der Kunde x-mal (siehe Angebotspakete) eine verkehrte TAN eingegeben hat. Einzelne TANs sind nicht ent-/sperrbar.', 12)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_trans','Überweisungen auflisten','Nach Auswahl eines Mitgliedes und einem Konto (benötgt JavaScript!) können Sie seitenweise die Überweisungen durchschauen.', 13)");
- // Member menu
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank', NULL, 'Bank-Account','N','Y', 3)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_infos','Angebotspakete','N','Y', 1)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_create','Konto anlegen','N','Y', 2)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_deposit','Auf Konto einzahlen','N','Y', 3)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_withdraw','Vom Konto abheben','N','Y', 4)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_output','Kontoauszug','N','Y', 5)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_change','Paket wechseln','N','Y', 6)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_remove','Konto Kündigen','N','Y', 7)");
- break;
+ // Member menu
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank', NULL, 'Bank-Account','N','Y', 3)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_infos','Angebotspakete','N','Y', 1)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_create','Konto anlegen','N','Y', 2)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_deposit','Auf Konto einzahlen','N','Y', 3)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_withdraw','Vom Konto abheben','N','Y', 4)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_output','Kontoauszug','N','Y', 5)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_change','Paket wechseln','N','Y', 6)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_remove','Konto Kündigen','N','Y', 7)");
+ break;
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_accounts`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_transfers`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_packages`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_tanlist`");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='bank'");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='bank'");
- break;
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_accounts`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_transfers`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_packages`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_tanlist`");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='bank'");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='bank'");
+ break;
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `action`='bank' LIMIT 8");
- break;
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `action`='bank' LIMIT 8");
+ break;
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `action`='bank' LIMIT 8");
- break;
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `action`='bank' LIMIT 8");
+ break;
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- ADD_EXT_SQL("");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ ADD_EXT_SQL('');
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("");
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES('');
+ break;
+ }
break;
- }
- break;
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_beg','Bettel-Link','IP-Sperre, {!POINTS!}-Vergütung usw. können Sie hier einstellen.', 10)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','beg','{!POINTS!} erbetteln!',4,'Y','Y')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','beg','Ihr Bettel-Link',6,'Y','Y')");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '600'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_uid_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00100");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_beg_ips`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_beg_ips` (
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_beg','Bettel-Link','IP-Sperre, {!POINTS!}-Vergütung usw. können Sie hier einstellen.', 10)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','beg','{!POINTS!} erbetteln!',4,'Y','Y')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','beg','Ihr Bettel-Link',6,'Y','Y')");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '600'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_uid_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00100");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_beg_ips`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_beg_ips` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
remote_ip VARCHAR(15) NOT NULL DEFAULT '0.0.0.0',
KEY (userid),
PRIMARY KEY(id)
) TYPE={!_TABLE_TYPE!}");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_beg' OR `what`='list_beg'");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='beg'");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='beg' OR `what`='beg2'");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_beg_ips`");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='beg' LIMIT 1");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='beg' LIMIT 1");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='beg' LIMIT 1");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='beg' LIMIT 1");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what IN('beg','beg2') LIMIT 2");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE `module`='beg' LIMIT 1");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut.");
break;
- case '0.0.2': // SQL queries for v0.0.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_beg' OR `what`='list_beg'");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='beg'");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='beg' OR `what`='beg2'");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_beg_ips`");
break;
- case '0.0.3': // SQL queries for v0.0.3
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_points_max FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '0.10000'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Maximale Obergrenze an {!POINTS!} einstellbar (Standart: 0,1 {!POINTS!})");
- break;
-
- case '0.0.4': // SQL queries for v0.0.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Überlange Kommastellen bei Punktangaben aus Bettellink und Gastbereich entfernt und Admin-Templates repariert ("Unbekannte Spalte <u>beg_points_ma</u>").");
- break;
-
- case '0.0.5': // SQL queries for v0.0.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Im Mitgliedsmenü wurde die Beschreibung aus dem Gastmenü verwendet.");
- break;
-
- case '0.0.6': // SQL queries for v0.0.6
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Ein Mitgliedsaccount (empfehlenswert ist Ihr eigenes!) kann zum Abbuchen der {!POINTS!} verwendet werden. Template <u>admin_config_beg.tpl</u> (und pro!) nicht vergessen, zu aktualisieren.");
- break;
-
- case '0.0.8': // SQL queries for v0.0.8
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_ip_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Zeitsperre gegen die selbe IP-Nummer hinzugefügt.");
- break;
-
- case '0.0.9': // SQL queries for v0.0.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Bitte verschieben Sie die beg-Templates (Ordner: {!PATH!}/templates/".getLanguage()."/html/) in den neuen Order beg!");
- break;
-
- case '0.1.0': // SQL queries for v0.2.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
- break;
-
- case '0.1.1': // SQL queries for v0.1.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
- break;
-
- case '0.1.2':
- // SQL queries for v0.1.2
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_mode ENUM('DIRECT','REF') NOT NULL DEFAULT 'REF'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_active ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_rallye ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_points FLOAT(21,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-
- $VIS = 'N'; $LOCKED = 'Y';
- if (EXT_IS_ACTIVE('beg')) { $VIS = 'Y'; $LOCKED = 'N'; }
-
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','beg2','Bettel-Rallye','".$VIS."','".$LOCKED."','7')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_beg','Bettel-Rallye','Listet alle Teilnehmer der monatlichen Bettel-Rallye auf.','12')");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Optionale Bettel-Rallye möglich. Und die erbettelten {!POINTS!} können entweder nur dem bettelndem Mitglied direkt oder auch seinem Werber gutgeschrieben werden können.");
- break;
-
- case '0.1.3': // SQL queries for v0.1.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Erbettelte {!POINTS!} werden nach Deaktivierung der Bettel-Rallye gelöscht.");
- break;
-
- case '0.1.4': // SQL queries for v0.1.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Rechtlichen Hinweis im Mitgliedsbereich vergessen (<strong>member_list_beg.tpl</strong>); Template <strong>member_beg_404.tpl</strong> fehlte!");
- break;
-
- case '0.1.5': // SQL queries for v0.1.5
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Bettellink/-rallye', descr='IP-Sperre, {!POINTS!}-Vergütung und auch die Bettel-Rallye können Sie hier einstellen.' WHERE `what`='config_beg' LIMIT 1");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlendes Template im Admin-Bereich hinzugefügt. Im Admin-Bereich Hinweis hinzugefügt, wenn Bettel-Rallye inaktiv ist. Bitte Script inc/monthly_beg.php löschen!");
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='beg' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='beg' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='beg' LIMIT 1");
break;
- case '0.1.6': // SQL queries for v0.1.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Es wurden immer dem ersten bettelndem Mitglied die {!POINTS!} gutgeschrieben.");
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='beg' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what IN('beg','beg2') LIMIT 2");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE `module`='beg' LIMIT 1");
break;
- case '0.1.7': // SQL queries for v0.1.7
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_ral_en_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_ral_di_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_new_mem_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_notify_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Die Mitglieder können nun optional automatisch über eine aktivierte und/oder deaktivierte Bettel-Rallye informiert werden. Beide Benachrichtigungen können Sie unter <strong>Einstellungen --> Bettel-Link/-rallye</strong> seperat ein- und ausschalten! Zudem ist eine Sperre gegen eingeloggte Mitglieder eingebaut, die das Klicken auf den eigenen Bettel-Link etwas erschweren soll.");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut.");
+ break;
+
+ case '0.0.2': // SQL queries for v0.0.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ break;
+
+ case '0.0.3': // SQL queries for v0.0.3
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_points_max FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '0.10000'");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Maximale Obergrenze an {!POINTS!} einstellbar (Standart: 0,1 {!POINTS!})");
+ break;
+
+ case '0.0.4': // SQL queries for v0.0.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Überlange Kommastellen bei Punktangaben aus Bettellink und Gastbereich entfernt und Admin-Templates repariert ("Unbekannte Spalte <u>beg_points_ma</u>").");
+ break;
+
+ case '0.0.5': // SQL queries for v0.0.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Im Mitgliedsmenü wurde die Beschreibung aus dem Gastmenü verwendet.");
+ break;
+
+ case '0.0.6': // SQL queries for v0.0.6
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Ein Mitgliedsaccount (empfehlenswert ist Ihr eigenes!) kann zum Abbuchen der {!POINTS!} verwendet werden. Template <u>admin_config_beg.tpl</u> (und pro!) nicht vergessen, zu aktualisieren.");
+ break;
+
+ case '0.0.8': // SQL queries for v0.0.8
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_ip_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Zeitsperre gegen die selbe IP-Nummer hinzugefügt.");
+ break;
+
+ case '0.0.9': // SQL queries for v0.0.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Bitte verschieben Sie die beg-Templates (Ordner: {!PATH!}/templates/".getLanguage()."/html/) in den neuen Order beg!");
+ break;
+
+ case '0.1.0': // SQL queries for v0.2.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ break;
+
+ case '0.1.1': // SQL queries for v0.1.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
+ break;
+
+ case '0.1.2':
+ // SQL queries for v0.1.2
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_mode ENUM('DIRECT','REF') NOT NULL DEFAULT 'REF'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_active ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_rallye ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_points FLOAT(21,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+
+ $VIS = 'N'; $LOCKED = 'Y';
+ if (EXT_IS_ACTIVE('beg')) { $VIS = 'Y'; $LOCKED = 'N'; }
+
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','beg2','Bettel-Rallye','".$VIS."','".$LOCKED."','7')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_beg','Bettel-Rallye','Listet alle Teilnehmer der monatlichen Bettel-Rallye auf.','12')");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Optionale Bettel-Rallye möglich. Und die erbettelten {!POINTS!} können entweder nur dem bettelndem Mitglied direkt oder auch seinem Werber gutgeschrieben werden können.");
+ break;
+
+ case '0.1.3': // SQL queries for v0.1.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Erbettelte {!POINTS!} werden nach Deaktivierung der Bettel-Rallye gelöscht.");
+ break;
+
+ case '0.1.4': // SQL queries for v0.1.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Rechtlichen Hinweis im Mitgliedsbereich vergessen (<strong>member_list_beg.tpl</strong>); Template <strong>member_beg_404.tpl</strong> fehlte!");
+ break;
+
+ case '0.1.5': // SQL queries for v0.1.5
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Bettellink/-rallye', descr='IP-Sperre, {!POINTS!}-Vergütung und auch die Bettel-Rallye können Sie hier einstellen.' WHERE `what`='config_beg' LIMIT 1");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlendes Template im Admin-Bereich hinzugefügt. Im Admin-Bereich Hinweis hinzugefügt, wenn Bettel-Rallye inaktiv ist. Bitte Script inc/monthly_beg.php löschen!");
+ break;
+
+ case '0.1.6': // SQL queries for v0.1.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Es wurden immer dem ersten bettelndem Mitglied die {!POINTS!} gutgeschrieben.");
+ break;
+
+ case '0.1.7': // SQL queries for v0.1.7
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_ral_en_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_ral_di_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_new_mem_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_notify_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD beg_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Die Mitglieder können nun optional automatisch über eine aktivierte und/oder deaktivierte Bettel-Rallye informiert werden. Beide Benachrichtigungen können Sie unter <strong>Einstellungen --> Bettel-Link/-rallye</strong> seperat ein- und ausschalten! Zudem ist eine Sperre gegen eingeloggte Mitglieder eingebaut, die das Klicken auf den eigenen Bettel-Link etwas erschweren soll.");
+ break;
+
+ case '0.1.8': // SQL queries for v0.1.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler im täglichen Reset beseitigt.");
+ break;
+
+ case '0.1.9': // SQL queries for v0.1.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden.");
+ break;
+
+ case '0.2.0': // SQL queries for v0.2.0
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Bei {!POINTS!}-Gleichstand wird als nächstes nach wer als letztes Online war umsortiert.");
+ break;
+
+ case '0.2.1': // SQL queries for v0.2.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler <strong>unknown column 'uid'</strong> beseitigt.");
+ break;
+
+ case '0.2.2': // SQL queries for v0.2.2
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_include_own ENUM('Y','N') NOT NULL DEFAULT 'N'");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Eigene User-ID von Bettel-Rallye ausschliessbar.");
+ break;
+
+ case '0.2.3': // SQL queries for v0.2.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abfrage des Account-Status eingebaut. Es können nur bestätigte Accounts betteln.");
+ break;
+
+ case '0.2.4': // SQL queries for v0.2.4
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='1' WHERE `what`='beg' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='rals', `sort`='3', `title`='Bettel-Rallye' WHERE `what`='beg2' LIMIT 1");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut.");
+ break;
+
+ case '0.2.5': // SQL queries for v0.2.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+ break;
+
+ case '0.2.6': // SQL queries for v0.2.6
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_beg_ips` ADD sid VARCHAR(255) NOT NULL DEFAULT ''");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `beg_pay_mode` ENUM('IMG','JS','BOTH','NONE') DEFAULT 'NONE' NOT NULL ;");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("IP-Lock mit Session-ID erweitert. Tracker-Script eingefügt, dass das Einbinden des Bettel-Links als Bild/Script/CSS verhindern soll.");
+ break;
+ }
break;
- case '0.1.8': // SQL queries for v0.1.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler im täglichen Reset beseitigt.");
- break;
-
- case '0.1.9': // SQL queries for v0.1.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden.");
- break;
+ case 'modify': // When the extension got modified
+ break;
- case '0.2.0': // SQL queries for v0.2.0
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Bei {!POINTS!}-Gleichstand wird als nächstes nach wer als letztes Online war umsortiert.");
- break;
-
- case '0.2.1': // SQL queries for v0.2.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler <strong>unknown column 'uid'</strong> beseitigt.");
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
- case '0.2.2': // SQL queries for v0.2.2
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD beg_include_own ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ default: // Do stuff when extension is loaded
+ // Remove old entries
+ $OLD = getConfig('beg_timeout');
+ if (getConfig('beg_uid_timeout') > $OLD) $OLD = getConfig('beg_uid_timeout');
+ $result_ext = SQL_QUERY("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_beg_ips` WHERE timeout < (UNIX_TIMESTAMP() -".($OLD + 60*60).")", __FILE__, __LINE__);
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Eigene User-ID von Bettel-Rallye ausschliessbar.");
- break;
-
- case '0.2.3': // SQL queries for v0.2.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abfrage des Account-Status eingebaut. Es können nur bestätigte Accounts betteln.");
- break;
-
- case '0.2.4': // SQL queries for v0.2.4
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='1' WHERE `what`='beg' LIMIT 1");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='rals', `sort`='3', `title`='Bettel-Rallye' WHERE `what`='beg2' LIMIT 1");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut.");
- break;
-
- case '0.2.5': // SQL queries for v0.2.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
- break;
-
- case '0.2.6': // SQL queries for v0.2.6
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_beg_ips` ADD sid VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `beg_pay_mode` ENUM('IMG','JS','BOTH','NONE') DEFAULT 'NONE' NOT NULL ;");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("IP-Lock mit Session-ID erweitert. Tracker-Script eingefügt, dass das Einbinden des Bettel-Links als Bild/Script/CSS verhindern soll.");
- break;
- }
- break;
-
-case 'modify': // When the extension got modified
- break;
-
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
-
-default: // Do stuff when extension is loaded
- // Remove old entries
- $OLD = getConfig('beg_timeout');
- if (getConfig('beg_uid_timeout') > $OLD) $OLD = getConfig('beg_uid_timeout');
- $result_ext = SQL_QUERY("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_beg_ips` WHERE timeout < (UNIX_TIMESTAMP() -".($OLD + 60*60).")", __FILE__, __LINE__);
-
- // Check for beg rallye is active and send mails out
- if ((getConfig('beg_rallye') == 'Y') && (getConfig('beg_new_mem_notify') == 'Y')) {
- // Include file for sending out mails
- ADD_INC_TO_POOL(sprintf("%sinc/mails/beg_mails.php", constant('PATH')));
- } // END - if
- break;
+ // Check for beg rallye is active and send mails out
+ if ((getConfig('beg_rallye') == 'Y') && (getConfig('beg_new_mem_notify') == 'Y')) {
+ // Include file for sending out mails
+ ADD_INC_TO_POOL(sprintf("%sinc/mails/beg_mails.php", constant('PATH')));
+ } // END - if
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD birthday_sent VARCHAR(10) NOT NULL DEFAULT 0");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP birthday_sent");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_birthday`");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_birthday'");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.1.0': // SQL queries for v0.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Wenn täglicher Reset war, wird eine benötigte Include-Datei nicht mehr von daily-reset.php eingebunden, sondern von der Erweiterungsdatei selber.");
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD birthday_sent VARCHAR(10) NOT NULL DEFAULT 0");
break;
- case '0.2.0': // SQL queries for v0.2
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD birthday_points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP birthday_sent");
ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_birthday`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_birthday` (
-id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-chk_value VARCHAR(255) NOT NULL DEFAULT '',
-KEY(userid),
-PRIMARY KEY(id)
-) Type={!_TABLE_TYPE!}");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_birthday','Geburtstagsmails','Stellen Sie hier ein, ob die Mitglieder {!POINTS!} (nicht automatisch) gutgeschrieben kommen sollen oder nicht.', 9)");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Es kann nun eine Gutschrift an die Geburtstagmail angehängt werden. Diese wird erst beim Klick auf einen Bestätigungslink gutgeschrieben.");
- break;
-
- case '0.2.1': // SQL queries for v0.2.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abstand zwischen ausgesendeter Geburtstagsmails auf 364 Tage erhöht.");
- break;
-
- case '0.2.4': // SQL queries for v0.2.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Laden der birthday_mails.php "intelligenter" per Datenfeld und Lade-Schleife in load_extensions.php realisiert.");
- break;
-
- case '0.2.5': // SQL queries for v0.2.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
- break;
-
- case '0.2.6': // SQL queries for v0.2.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
- break;
-
- case '0.2.7': // SQL queries for v0.2.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sicherheitsupdate am Script <u>birtday_confirm.php</u> durchgeführt.");
- break;
-
- case '0.2.8': // SQL queries for v0.2.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Vergessenes <strong>_OB_CACHING</strong> gesetzt.");
- break;
-
- case '0.2.9': // SQL queries for v0.2.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_birthday'");
break;
- case '0.3.0': // SQL queries for v0.3.0
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Ausgabe des generierten HTML-Codes nach <u>inc/footer.php</u> verlagert.");
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.3.1': // SQL queries for v0.3.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Wort <strong>Punkte</strong> dynamisiert.");
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.3.2': // SQL queries for v0.3.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt.");
- break;
-
- case '0.3.3': // SQL queries for v0.3.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Bitte verschieben Sie die birthday-Templates (Ordner: {!PATH!}/templates/".getLanguage()."/html/) in den neuen Order birthday!");
- break;
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.1.0': // SQL queries for v0.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Wenn täglicher Reset war, wird eine benötigte Include-Datei nicht mehr von daily-reset.php eingebunden, sondern von der Erweiterungsdatei selber.");
+ break;
- case '0.3.4': // SQL queries for v0.3.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
- break;
-
- case '0.3.5': // SQL queries for v0.3.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
- break;
-
- case '0.3.6': // SQL queries for v0.3.6
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD birthday_mode ENUM('DIRECT','REF') NOT NULL DEFAULT 'DIRECT'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD birthday_active ENUM('Y','N') NOT NULL DEFAULT 'N'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Vergütungsmodus des Geburtstagsbonus einstellbar.");
- break;
+ case '0.2.0': // SQL queries for v0.2
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD birthday_points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_birthday`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_birthday` (
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+chk_value VARCHAR(255) NOT NULL DEFAULT '',
+KEY(userid),
+PRIMARY KEY(id)
+) Type={!_TABLE_TYPE!}");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_birthday','Geburtstagsmails','Stellen Sie hier ein, ob die Mitglieder {!POINTS!} (nicht automatisch) gutgeschrieben kommen sollen oder nicht.', 9)");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Es kann nun eine Gutschrift an die Geburtstagmail angehängt werden. Diese wird erst beim Klick auf einen Bestätigungslink gutgeschrieben.");
+ break;
+
+ case '0.2.1': // SQL queries for v0.2.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abstand zwischen ausgesendeter Geburtstagsmails auf 364 Tage erhöht.");
+ break;
+
+ case '0.2.4': // SQL queries for v0.2.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Laden der birthday_mails.php "intelligenter" per Datenfeld und Lade-Schleife in load_extensions.php realisiert.");
+ break;
+
+ case '0.2.5': // SQL queries for v0.2.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.2.6': // SQL queries for v0.2.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
+ break;
+
+ case '0.2.7': // SQL queries for v0.2.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sicherheitsupdate am Script <u>birtday_confirm.php</u> durchgeführt.");
+ break;
+
+ case '0.2.8': // SQL queries for v0.2.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Vergessenes <strong>_OB_CACHING</strong> gesetzt.");
+ break;
+
+ case '0.2.9': // SQL queries for v0.2.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ break;
+
+ case '0.3.0': // SQL queries for v0.3.0
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Ausgabe des generierten HTML-Codes nach <u>inc/footer.php</u> verlagert.");
+ break;
+
+ case '0.3.1': // SQL queries for v0.3.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Wort <strong>Punkte</strong> dynamisiert.");
+ break;
+
+ case '0.3.2': // SQL queries for v0.3.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt.");
+ break;
+
+ case '0.3.3': // SQL queries for v0.3.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Bitte verschieben Sie die birthday-Templates (Ordner: {!PATH!}/templates/".getLanguage()."/html/) in den neuen Order birthday!");
+ break;
+
+ case '0.3.4': // SQL queries for v0.3.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ break;
+
+ case '0.3.5': // SQL queries for v0.3.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
+ break;
+
+ case '0.3.6': // SQL queries for v0.3.6
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD birthday_mode ENUM('DIRECT','REF') NOT NULL DEFAULT 'DIRECT'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD birthday_active ENUM('Y','N') NOT NULL DEFAULT 'N'");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Vergütungsmodus des Geburtstagsbonus einstellbar.");
+ break;
+
+ case '0.3.7': // SQL queries for v0.3.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Im Script <strong>inc/birthday_mails.php</strong> hat sich ein Zeichen mit dem Code 160 eingeschlichen, welches einen <strong>Parser Error</strong> verursachte, aber wie eine gewöhnliche Leerstelle aussah.");
+ break;
+
+ case '0.3.8': // SQL queries for v0.3.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.");
+ break;
+
+ case '0.3.9': // SQL queries for v0.3.9
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE `birth_day` `birth_day` SMALLINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT '01',
+CHANGE `birth_month` `birth_month` SMALLINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT '01',
+CHANGE `birth_year` `birth_year` SMALLINT(4) UNSIGNED ZEROFILL NOT NULL DEFAULT 1970");
- case '0.3.7': // SQL queries for v0.3.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Im Script <strong>inc/birthday_mails.php</strong> hat sich ein Zeichen mit dem Code 160 eingeschlichen, welches einen <strong>Parser Error</strong> verursachte, aber wie eine gewöhnliche Leerstelle aussah.");
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Datenbankspalten umgestellt auf SMALLINT() UNSIGNED ZEROFILL.");
+ break;
+ }
break;
- case '0.3.8': // SQL queries for v0.3.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.");
- break;
+ case 'modify': // When the extension got modified
+ break;
- case '0.3.9': // SQL queries for v0.3.9
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE `birth_day` `birth_day` SMALLINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT '01',
-CHANGE `birth_month` `birth_month` SMALLINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT '01',
-CHANGE `birth_year` `birth_year` SMALLINT(4) UNSIGNED ZEROFILL NOT NULL DEFAULT 1970");
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Datenbankspalten umgestellt auf SMALLINT() UNSIGNED ZEROFILL.");
- break;
- }
- break;
-
-case 'modify': // When the extension got modified
- break;
-
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
-
-default: // Do stuff when extension is loaded
- if ((isResetModeEnabled()) && (getConfig('birthday_points') > 0)) {
- // Daily reset was run and we shall pay points so we start checking for members who
- // has a birthday for today
- ADD_INC_TO_POOL(sprintf("%sinc/mails/birthday_mails.php", constant('PATH')));
- }
- break;
+ default: // Do stuff when extension is loaded
+ if ((isResetModeEnabled()) && (getConfig('birthday_points') > 0)) {
+ // Daily reset was run and we shall pay points so we start checking for members who
+ // has a birthday for today
+ ADD_INC_TO_POOL(sprintf("%sinc/mails/birthday_mails.php", constant('PATH')));
+ }
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('email','send_bonus','Bonusmail senden',5,'Versenden Sie hier Bonus-Mails an alle Mitglieder oder nur an alle aus einer Kategorie. Es spielt keine Rolle, wie viele Mails bereits versendet worden, Sie können hier immer senden.')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`,`counter`) VALUES ('main','bonus','Bonuspunkte',7,'Y','Y', 0)");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bonus` (
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('email','send_bonus','Bonusmail senden',5,'Versenden Sie hier Bonus-Mails an alle Mitglieder oder nur an alle aus einer Kategorie. Es spielt keine Rolle, wie viele Mails bereits versendet worden, Sie können hier immer senden.')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`,`counter`) VALUES ('main','bonus','Bonuspunkte',7,'Y','Y', 0)");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bonus` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
cat_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
subject VARCHAR(255) NOT NULL DEFAULT '',
KEY(cat_id),
PRIMARY KEY (id)
)TYPE={!_TABLE_TYPE!}");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` MODIFY link_type ENUM('NORMAL','BONUS') NOT NULL DEFAULT 'NORMAL'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` ADD bonus_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` ADD INDEX (bonus_id)");
-
- // Run this SQL when html or html_mail extension is installed
- if (EXT_IS_ACTIVE('html_mail')) ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` add html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN ('bonus','config_bonus','send_bonus','list_bonus','list_notifications')");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='bonus'");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='bonus'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` MODIFY link_type ENUM('NORMAL') NOT NULL DEFAULT 'NORMAL'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` DROP bonus_id");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_urls`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_customer`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_turbo`");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='bonus' LIMIT 1");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='bonus' LIMIT 1");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='show_bonus' LIMIT 1");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='bonus' LIMIT 1");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='bonus' LIMIT 1");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE `module`='show_bonus' LIMIT 1");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.1.6': // SQL queries for v0.1.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Paid-Links wurden verschoben in die Erweiterung <strong>paidlinks</strong>.");
- break;
-
- case '0.2.0': // SQL queries for v0.2.0
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET target_send=mails_sent WHERE target_send='0' AND mails_sent>0 AND receivers != ''");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Behebt ein Versand-Problem mit den Bonus-Mails. Es wurde die Spalte target_send nicht beim Einfügen der Buchung gessetzt. Bitte laden Sie sich dazu - wenn nicht bereits geschehen - alle Patches bis mindestens Patch 240 unter <a href=\"{!URL!}/modules.php?module=admin&what=updates\">Updates prüfen</a> herunter.");
- break;
-
- case '0.2.1': // SQL queries for v0.2.1
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_bonus' LIMIT 1");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('setup','config_bonus','Bonus-{!POINTS!}',8,'Richten Sie Bonus-{!POINTS!} ein, die beim x'ten Klick auf die Mail verbucht werden sollen. Beispiele: Der 1. Klick sollte mehr {!POINTS!} zusätzlich bekommen, als der 10. Klick.')");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 10.000");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 100.000");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD login_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".getConfig('one_day')."");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD turbo_rates VARCHAR(255) NOT NULL DEFAULT '50;20;10'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
- // Use actual month for this update
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE `ext_name`='bonus' AND ext_has_css='N' LIMIT 1");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Login-Bonus und Turbo-Klick-Bonus intergriert.");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` MODIFY link_type ENUM('NORMAL','BONUS') NOT NULL DEFAULT 'NORMAL'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` ADD bonus_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` ADD INDEX (bonus_id)");
+
+ // Run this SQL when html or html_mail extension is installed
+ if (EXT_IS_ACTIVE('html_mail')) ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` add html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ break;
+
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN ('bonus','config_bonus','send_bonus','list_bonus','list_notifications')");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='bonus'");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='bonus'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` MODIFY link_type ENUM('NORMAL') NOT NULL DEFAULT 'NORMAL'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` DROP bonus_id");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_urls`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_customer`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_turbo`");
break;
- case '0.2.2': // SQL queries for v0.2.2
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_turbo`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bonus_turbo` (
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='bonus' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='bonus' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='show_bonus' LIMIT 1");
+ break;
+
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='bonus' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='bonus' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE `module`='show_bonus' LIMIT 1");
+ break;
+
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.1.6': // SQL queries for v0.1.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Paid-Links wurden verschoben in die Erweiterung <strong>paidlinks</strong>.");
+ break;
+
+ case '0.2.0': // SQL queries for v0.2.0
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET target_send=mails_sent WHERE target_send='0' AND mails_sent>0 AND receivers != ''");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Behebt ein Versand-Problem mit den Bonus-Mails. Es wurde die Spalte target_send nicht beim Einfügen der Buchung gessetzt. Bitte laden Sie sich dazu - wenn nicht bereits geschehen - alle Patches bis mindestens Patch 240 unter <a href=\"{!URL!}/modules.php?module=admin&what=updates\">Updates prüfen</a> herunter.");
+ break;
+
+ case '0.2.1': // SQL queries for v0.2.1
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_bonus' LIMIT 1");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('setup','config_bonus','Bonus-{!POINTS!}',8,'Richten Sie Bonus-{!POINTS!} ein, die beim x'ten Klick auf die Mail verbucht werden sollen. Beispiele: Der 1. Klick sollte mehr {!POINTS!} zusätzlich bekommen, als der 10. Klick.')");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 10.000");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 100.000");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD login_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".getConfig('one_day')."");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD turbo_rates VARCHAR(255) NOT NULL DEFAULT '50;20;10'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
+ // Use actual month for this update
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE `ext_name`='bonus' AND ext_has_css='N' LIMIT 1");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Login-Bonus und Turbo-Klick-Bonus intergriert.");
+ break;
+
+ case '0.2.2': // SQL queries for v0.2.2
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_turbo`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bonus_turbo` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
mail_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
KEY userid (userid)
) TYPE={!_TABLE_TYPE!}");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Turbo-Bonus wird in Tabelle gezählt für Anzeige, wer alles bereits geklickt hat und welchen Platz er gemacht hat.");
- break;
-
- case '0.2.3': // SQL queries for v0.2.3
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='bonus' LIMIT 1");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`,`counter`) VALUES ('main','bonus','Aktiv-Rallye',7,'Y','Y', 0)");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Aktiv-Rallye mit Klick-Vergütung hinzugefügt.");
- break;
-
- case '0.2.4': // SQL queries for v0.2.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert.");
- break;
-
- case '0.2.5': // SQL queries for v0.2.5
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_urls`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_customer`");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Tabellen <u>{!MYSQL_PREFIX!}_bonus_urls</u> und <u>{!MYSQL_PREFIX!}_bonus_customer</u> entfernt, da dies bald von der Erweiterung <u>paidlinks</u> erledigt wird.");
- break;
-
- case '0.2.6': // SQL queries for v0.2.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
- break;
-
- case '0.2.7': // SQL queries for v0.2.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Turbo-Bonus klappt wieder (dies sind {!POINTS!} die an die schnellsten Klicker vergütet werden!)");
- break;
-
- case '0.2.8': // SQL queries for v0.2.8
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET timestamp='0' WHERE timestamp='0000000000'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus_turbo` CHANGE points points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert");
- break;
-
- case '0.2.9': // SQL queries for v0.2.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
- break;
-
- case '0.3.0': // SQL queries for v0.3.0
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
- break;
-
- case '0.3.1': // SQL queries for v0.3.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sicherheitsupdate am Script <u>show_bonus.php</u> durchgeführt.");
- break;
-
- case '0.3.2': // SQL queries for v0.3.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut.");
- break;
-
- case '0.3.3': // SQL queries for v0.3.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
- break;
-
- case '0.3.4': // SQL queries for v0.3.4
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_bonus','Aktiv-Rallye-Teilnehmer','Listet alle Mitglieder auf, die einen Aktiv-Bonus haben und zeigt die derzeit möglichen Gewinner an.', 10)");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Link <u>Aktiv-Rallye-Teilnehmer</u> hinzugefügt, inklusive manuelle Vorbereitung der Vergütung.");
- break;
-
- case '0.3.5': // SQL queries for v0.3.5
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_mode ENUM('UID','JACKPOT','ADD') NOT NULL DEFAULT 'ADD'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Der Login-Bonus Aktiv-Bonus (= Klick-Bonus) können nun zuerst von einem Mitgliederaccount (das sollte Ihres sein!), vom Jackpot abgezogen oder einfach dazuadiert werden.");
- break;
-
- case '0.3.6': // SQL queries for v0.3.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("In der Admin-Liste werden nur aktive Mitglieder gelistet und zudem die späteste Zeitmarke für die Auswertung angezeigt.");
- break;
-
- case '0.3.7': // SQL queries for v0.3.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Mitglieder-Account auwählbar, von dem die {!POINTS!} für den Aktiv- und Login-Bonus abgebucht werden.");
- break;
-
- case '0.3.8': // SQL queries for v0.3.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Ausgabe des generierten HTML-Codes nach <u>inc/footer.php</u> verlagert.");
- break;
-
- case '0.3.9': // SQL queries for v0.3.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlende Variablen gefixt.");
- break;
-
- case '0.4.0': // SQL queries for v0.4.0
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*7)."");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_lines BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Automatisches Löschen von Turbo-Bonus-Zeilen ({!MYSQL_PREFIX!}_bonus_turbo) und begrenzte Anzahl von Einträgen hinzugefügt.");
- break;
-
- case '0.4.1': // SQL queries for v0.4.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Vergütung des Aktiv-Bonus repariert.");
- break;
-
- case '0.4.2': // SQL queries for v0.4.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Admin-Bereich / Aktiv-Teilnehmer auflisten: Problem mit Konstante __AUTOPURGE_TIMEOUT und das Template <u>admin_list_bonus.tpl</u> korregiert.");
- break;
-
- case '0.4.3': // SQL queries for v0.4.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Verbesserung des Versandes von HTML-Bonus-Mails.");
- break;
-
- case '0.4.4': // SQL queries for v0.4.4
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 15.00000");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_stats FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '5.00000'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_active ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_stats FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Bonus-{!POINTS!} für: Mailbestellung, Referal-Werbung (bei Best. der EMail-Adresse) und wenn 100% Klickrate jeder Mailbuchung erreicht wurde.<br />Template <u>admin_config_bonus_pro.tpl</u> ist überflüssig geworden. Bitte löschen Sie dies!<br />Eingestellte Bonus-{!POINTS!} für Rank 2 war um eins verschoben.");
- break;
-
- case '0.4.5': // SQL queries for v0.4.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abzug vom Bonus-Account integriert.");
- break;
-
- case '0.4.6': // SQL queries for v0.4.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Rank 2 bekommt nun auch seine {!POINTS!} gutgeschrieben.");
- break;
-
- case '0.4.7': // SQL queries for v0.4.7
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET login_bonus=0, turbo_bonus=0,bonus_ref=0,bonus_order=0,bonus_stats=0");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Die Aktiv-Rallye wurde nicht auf 0 {!POINTS!} gesetzt. Dieser Fehler ist nun behoben. Allerdings ist mit diesem Update auch die Aktiv-Rallye zurückgesetzt worden.");
- break;
-
- case '0.4.8': // SQL queries for v0.4.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("In <u>inc/monthly_bonus.php</u> fehlte ein Punkt; Fehler besseitigt.");
- break;
-
- case '0.4.9': // SQL queries for v0.4.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Login-Bonus wird mit angezeigt.");
- break;
-
- case '0.5.0': // SQL queries for v0.5.0
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Problem mit <strong>is_hundred</strong> beim täglichen Reset beseitigt.");
- break;
-
- case '0.5.1': // SQL queries for v0.5.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Problem mit <strong>bonus_stats / Zeile 31</strong> beim täglichen Reset beseitigt.");
- break;
-
- case '0.5.2': // SQL queries for v0.5.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
- break;
-
- case '0.5.3': // SQL queries for v0.5.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Speichern der Aktiv-{!POINTS!} für Platz 2 bis <strong>x</strong> korregiert.");
- break;
-
- case '0.5.4': // SQL queries for v0.5.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Variablenfehler in <strong>inc/monthly_bonus.php</strong> behoben.");
- break;
-
- case '0.5.5': // SQL queries for v0.5.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Weitere Variablenfehler in <strong>inc/monthly_bonus.php</strong> haben dafür gesorgt, dass die monatliche Aktiv-Rallye nicht ausgeschüttet wurde. Mit diesem Update wurde die Ausschüttung initialisiert. Ihre Mitglieder bekommen voraussichtlicht nichts doppelt vergütet.");
- break;
-
- case '0.5.6': // SQL queries for v0.5.6
- // Get current month
- $curr = date('m', time());
- if (strlen($curr) == 1) $curr = '0'.$curr;
- if ($curr == "00") $curr = "12";
-
- // Generate timemark...
- $mark = mktime(0, 0, 0, $curr, 1, date('Y', time()));
-
- // Update accounts which are not active last months
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_data`
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Turbo-Bonus wird in Tabelle gezählt für Anzeige, wer alles bereits geklickt hat und welchen Platz er gemacht hat.");
+ break;
+
+ case '0.2.3': // SQL queries for v0.2.3
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='bonus' LIMIT 1");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`,`counter`) VALUES ('main','bonus','Aktiv-Rallye',7,'Y','Y', 0)");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Aktiv-Rallye mit Klick-Vergütung hinzugefügt.");
+ break;
+
+ case '0.2.4': // SQL queries for v0.2.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert.");
+ break;
+
+ case '0.2.5': // SQL queries for v0.2.5
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_urls`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_customer`");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Tabellen <u>{!MYSQL_PREFIX!}_bonus_urls</u> und <u>{!MYSQL_PREFIX!}_bonus_customer</u> entfernt, da dies bald von der Erweiterung <u>paidlinks</u> erledigt wird.");
+ break;
+
+ case '0.2.6': // SQL queries for v0.2.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.2.7': // SQL queries for v0.2.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Turbo-Bonus klappt wieder (dies sind {!POINTS!} die an die schnellsten Klicker vergütet werden!)");
+ break;
+
+ case '0.2.8': // SQL queries for v0.2.8
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET timestamp='0' WHERE timestamp='0000000000'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus_turbo` CHANGE points points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert");
+ break;
+
+ case '0.2.9': // SQL queries for v0.2.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
+ break;
+
+ case '0.3.0': // SQL queries for v0.3.0
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+ break;
+
+ case '0.3.1': // SQL queries for v0.3.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sicherheitsupdate am Script <u>show_bonus.php</u> durchgeführt.");
+ break;
+
+ case '0.3.2': // SQL queries for v0.3.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut.");
+ break;
+
+ case '0.3.3': // SQL queries for v0.3.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ break;
+
+ case '0.3.4': // SQL queries for v0.3.4
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_bonus','Aktiv-Rallye-Teilnehmer','Listet alle Mitglieder auf, die einen Aktiv-Bonus haben und zeigt die derzeit möglichen Gewinner an.', 10)");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Link <u>Aktiv-Rallye-Teilnehmer</u> hinzugefügt, inklusive manuelle Vorbereitung der Vergütung.");
+ break;
+
+ case '0.3.5': // SQL queries for v0.3.5
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_mode ENUM('UID','JACKPOT','ADD') NOT NULL DEFAULT 'ADD'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Der Login-Bonus Aktiv-Bonus (= Klick-Bonus) können nun zuerst von einem Mitgliederaccount (das sollte Ihres sein!), vom Jackpot abgezogen oder einfach dazuadiert werden.");
+ break;
+
+ case '0.3.6': // SQL queries for v0.3.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("In der Admin-Liste werden nur aktive Mitglieder gelistet und zudem die späteste Zeitmarke für die Auswertung angezeigt.");
+ break;
+
+ case '0.3.7': // SQL queries for v0.3.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Mitglieder-Account auwählbar, von dem die {!POINTS!} für den Aktiv- und Login-Bonus abgebucht werden.");
+ break;
+
+ case '0.3.8': // SQL queries for v0.3.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Ausgabe des generierten HTML-Codes nach <u>inc/footer.php</u> verlagert.");
+ break;
+
+ case '0.3.9': // SQL queries for v0.3.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlende Variablen gefixt.");
+ break;
+
+ case '0.4.0': // SQL queries for v0.4.0
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*7)."");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_lines BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Automatisches Löschen von Turbo-Bonus-Zeilen ({!MYSQL_PREFIX!}_bonus_turbo) und begrenzte Anzahl von Einträgen hinzugefügt.");
+ break;
+
+ case '0.4.1': // SQL queries for v0.4.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Vergütung des Aktiv-Bonus repariert.");
+ break;
+
+ case '0.4.2': // SQL queries for v0.4.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Admin-Bereich / Aktiv-Teilnehmer auflisten: Problem mit Konstante __AUTOPURGE_TIMEOUT und das Template <u>admin_list_bonus.tpl</u> korregiert.");
+ break;
+
+ case '0.4.3': // SQL queries for v0.4.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Verbesserung des Versandes von HTML-Bonus-Mails.");
+ break;
+
+ case '0.4.4': // SQL queries for v0.4.4
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 15.00000");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_stats FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '5.00000'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_active ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_stats FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Bonus-{!POINTS!} für: Mailbestellung, Referal-Werbung (bei Best. der EMail-Adresse) und wenn 100% Klickrate jeder Mailbuchung erreicht wurde.<br />Template <u>admin_config_bonus_pro.tpl</u> ist überflüssig geworden. Bitte löschen Sie dies!<br />Eingestellte Bonus-{!POINTS!} für Rank 2 war um eins verschoben.");
+ break;
+
+ case '0.4.5': // SQL queries for v0.4.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abzug vom Bonus-Account integriert.");
+ break;
+
+ case '0.4.6': // SQL queries for v0.4.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Rank 2 bekommt nun auch seine {!POINTS!} gutgeschrieben.");
+ break;
+
+ case '0.4.7': // SQL queries for v0.4.7
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET login_bonus=0, turbo_bonus=0,bonus_ref=0,bonus_order=0,bonus_stats=0");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Die Aktiv-Rallye wurde nicht auf 0 {!POINTS!} gesetzt. Dieser Fehler ist nun behoben. Allerdings ist mit diesem Update auch die Aktiv-Rallye zurückgesetzt worden.");
+ break;
+
+ case '0.4.8': // SQL queries for v0.4.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("In <u>inc/monthly_bonus.php</u> fehlte ein Punkt; Fehler besseitigt.");
+ break;
+
+ case '0.4.9': // SQL queries for v0.4.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Login-Bonus wird mit angezeigt.");
+ break;
+
+ case '0.5.0': // SQL queries for v0.5.0
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Problem mit <strong>is_hundred</strong> beim täglichen Reset beseitigt.");
+ break;
+
+ case '0.5.1': // SQL queries for v0.5.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Problem mit <strong>bonus_stats / Zeile 31</strong> beim täglichen Reset beseitigt.");
+ break;
+
+ case '0.5.2': // SQL queries for v0.5.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+ break;
+
+ case '0.5.3': // SQL queries for v0.5.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Speichern der Aktiv-{!POINTS!} für Platz 2 bis <strong>x</strong> korregiert.");
+ break;
+
+ case '0.5.4': // SQL queries for v0.5.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Variablenfehler in <strong>inc/monthly_bonus.php</strong> behoben.");
+ break;
+
+ case '0.5.5': // SQL queries for v0.5.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Weitere Variablenfehler in <strong>inc/monthly_bonus.php</strong> haben dafür gesorgt, dass die monatliche Aktiv-Rallye nicht ausgeschüttet wurde. Mit diesem Update wurde die Ausschüttung initialisiert. Ihre Mitglieder bekommen voraussichtlicht nichts doppelt vergütet.");
+ break;
+
+ case '0.5.6': // SQL queries for v0.5.6
+ // Get current month
+ $curr = date('m', time());
+ if (strlen($curr) == 1) $curr = '0'.$curr;
+ if ($curr == "00") $curr = "12";
+
+ // Generate timemark...
+ $mark = mktime(0, 0, 0, $curr, 1, date('Y', time()));
+
+ // Update accounts which are not active last months
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_data`
SET `turbo_bonus`=0, `login_bonus`=0, `bonus_order`=0, `bonus_stats`=0, `bonus_ref`=0
WHERE `last_online` < ".$mark." ORDER BY `userid` ASC");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Ein weiterer Scriptfehler hat nur die Gewinner aus der Aktiv-Rallye genommen. Die anderen Mitglieder sind somit "nach oben gerutsch".");
- break;
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Ein weiterer Scriptfehler hat nur die Gewinner aus der Aktiv-Rallye genommen. Die anderen Mitglieder sind somit "nach oben gerutsch".");
+ break;
- case '0.5.7': // SQL queries for v0.5.7
- break;
-
- case '0.5.8': // SQL queries for v0.5.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Problem mit <strong>is_hundred</strong> beim täglichen Reset endlich beseitigt.");
- break;
+ case '0.5.7': // SQL queries for v0.5.7
+ break;
+
+ case '0.5.8': // SQL queries for v0.5.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Problem mit <strong>is_hundred</strong> beim täglichen Reset endlich beseitigt.");
+ break;
+
+ case '0.5.9': // SQL queries for v0.5.9
+ EXT_SET_UPDATE_NOTES("Fehlermeldung <strong>/home/verzeichnis/html/inc/stats_bonus.php (42):You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' WHERE userid='59' LIMIT 1' at line 1</strong> beseitigt.");
+ break;
+
+ case '0.6.0': // SQL queries for v0.6.0
+ EXT_SET_UPDATE_NOTES("SQL-Fehlermeldung in <strong>inc/monthly_bonus.php</strong> beseitigt.");
+ break;
+
+ case '0.6.1': // SQL queries for v0.6.1
+ EXT_SET_UPDATE_NOTES("Versand von Bonus-Mails repariert.");
+ break;
+
+ case '0.6.2': // SQL queries for v0.6.2
+ EXT_SET_UPDATE_NOTES("Löschen von bereits gelöschten Mails wird nun abgelehnt.");
+ break;
+
+ case '0.6.3': // SQL queries for v0.6.3
+ EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ break;
+
+ case '0.6.4': // SQL queries for v0.6.4
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Aktiv-Rallye' WHERE `what`='config_bonus' LIMIT 1");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Der Menüpunkt "Bonus-{!POINTS!}" unter Einstellungen wird nach "Aktiv-Rallye umbenannt. Und die Aktiv-Rallye konnte aufgrund eines Template-Fehlers nicht gespeichert werden.");
+ break;
+
+ case '0.6.5': // SQL queries for v0.6.5
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_stats` ADD bonus_stats ENUM('Y','N') NOT NULL DEFAULT 'N'");
- case '0.5.9': // SQL queries for v0.5.9
- EXT_SET_UPDATE_NOTES("Fehlermeldung <strong>/home/verzeichnis/html/inc/stats_bonus.php (42):You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' WHERE userid='59' LIMIT 1' at line 1</strong> beseitigt.");
- break;
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler mit bonus_stats beseitigt.");
+ break;
- case '0.6.0': // SQL queries for v0.6.0
- EXT_SET_UPDATE_NOTES("SQL-Fehlermeldung in <strong>inc/monthly_bonus.php</strong> beseitigt.");
- break;
+ case '0.6.6': // SQL queries for v0.6.6
+ EXT_SET_UPDATE_NOTES("Template-Fehler beseitigt im Admin-Bereich.");
+ break;
- case '0.6.1': // SQL queries for v0.6.1
- EXT_SET_UPDATE_NOTES("Versand von Bonus-Mails repariert.");
- break;
+ case '0.6.7': // SQL queries for v0.6.7
+ EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
+ break;
- case '0.6.2': // SQL queries for v0.6.2
- EXT_SET_UPDATE_NOTES("Löschen von bereits gelöschten Mails wird nun abgelehnt.");
- break;
+ case '0.6.8': // SQL queries for v0.6.8
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET data_type='SEND' WHERE data_type != 'SEND' AND data_type != 'DELETED' AND receivers='' AND target_send='0'");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Eingegebene Anzahl auszusendener Bonus-Mails wurde bei der Empfänderauswahl nicht berücksichtigt. Zudem wird jetzt das eingestellte Auswahlverfahren mitberücksichtigt.");
+ break;
- case '0.6.3': // SQL queries for v0.6.3
- EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
- break;
+ case '0.6.9': // SQL queries for v0.6.9
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_order_yn ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_ref_yn ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_stats_yn ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_login_yn ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_click_yn ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- case '0.6.4': // SQL queries for v0.6.4
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Aktiv-Rallye' WHERE `what`='config_bonus' LIMIT 1");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Der Menüpunkt "Bonus-{!POINTS!}" unter Einstellungen wird nach "Aktiv-Rallye umbenannt. Und die Aktiv-Rallye konnte aufgrund eines Template-Fehlers nicht gespeichert werden.");
- break;
-
- case '0.6.5': // SQL queries for v0.6.5
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_stats` ADD bonus_stats ENUM('Y','N') NOT NULL DEFAULT 'N'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler mit bonus_stats beseitigt.");
- break;
-
- case '0.6.6': // SQL queries for v0.6.6
- EXT_SET_UPDATE_NOTES("Template-Fehler beseitigt im Admin-Bereich.");
- break;
-
- case '0.6.7': // SQL queries for v0.6.7
- EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
- break;
-
- case '0.6.8': // SQL queries for v0.6.8
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET data_type='SEND' WHERE data_type != 'SEND' AND data_type != 'DELETED' AND receivers='' AND target_send='0'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Eingegebene Anzahl auszusendener Bonus-Mails wurde bei der Empfänderauswahl nicht berücksichtigt. Zudem wird jetzt das eingestellte Auswahlverfahren mitberücksichtigt.");
- break;
-
- case '0.6.9': // SQL queries for v0.6.9
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_order_yn ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_ref_yn ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_stats_yn ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_login_yn ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_click_yn ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Es können nun auch die folgenden Vergütungen bei der Auswertung der monatlichen Aktiv-Rallye mit berücksichtigt werden: Mailbestätigung (war vorher schon), Login-, Mailbuchung, Referal und Statistik-Bonus (100% Klickrate erreicht).");
- break;
-
- case '0.7.0': // SQL queries for v0.7.0
- EXT_SET_UPDATE_NOTES("Zuschaltung von weiteren Bonis wird jetzt auch bei der Auflistung der mitmachenden Mitglieder im Mitgliedsbereich beachtet.");
- break;
-
- case '0.7.1': // SQL queries for v0.7.1
- EXT_SET_UPDATE_NOTES("Im Adminbereich wird nun ebenfalls die Zuschaltung von weiteren Bonis berücksichtigt. Zudem wird der Gesamtbonus an alle Mitglieder errechnet und auch angezeigt.");
- break;
-
- case '0.7.2': // SQL queries for v0.7.2
- EXT_SET_UPDATE_NOTES("Die Vergütung der erreichten 100%-Klickrate war noch wegen Programmierungen am Script auskommentiert. Sorry!");
- break;
-
- case '0.7.3': // SQL queries for v0.7.3
- EXT_SET_UPDATE_NOTES("Gutgeschriebene Bonus-{!POINTS!} werden nach Deaktivierung der Aktiv-Rallye gelöscht.");
- break;
-
- case '0.7.4': // SQL queries for v0.7.4
- EXT_SET_UPDATE_NOTES("Rechtlichen Hinweis im Mitgliedsbereich vergessen. (<strong>member_bonus.tpl</strong>)");
- break;
-
- case '0.7.5': // SQL queries for v0.7.5
- EXT_SET_UPDATE_NOTES("Im Admin-Bereich Hinweis hinzugefügt, wenn Aktiv-Rallye inaktiv ist. Bitte Script inc/monthly_bonus.php löschen!");
- break;
-
- case '0.7.6': // SQL queries for v0.7.6
- EXT_SET_UPDATE_NOTES("Auswahlmechanismus der Gewinner repariert. Trotz Hinzuschalten von weiteren zu berücksichtigen Boni wurden diese bei der Sortierung der User-IDs nicht berücksichtig.");
- break;
-
- case '0.7.7': // SQL queries for v0.7.7
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_en_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_di_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_new_mem_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_notify_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Optionale automatische Benachrichtigung über aktivierte und/oder deaktivierte Aktiv-Rallye einstellbar.");
- break;
-
- case '0.7.8': // SQL queries for v0.7.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler im täglichen Reset beseitigt.");
- break;
-
- case '0.7.9': // SQL queries for v0.7.9
- EXT_SET_UPDATE_NOTES("Dollarzeichen fehlte in <strong>inc/reset/reset_bonus.php</strong>, Zeile 39");
- break;
-
- case '0.8.0': // SQL queries for v0.8.0
- EXT_SET_UPDATE_NOTES("De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden.");
- break;
-
- case '0.8.1': // SQL queries for v0.8.1
- EXT_SET_UPDATE_NOTES("Bei {!POINTS!}-Gleichstand wird als nächstes nach wer als letztes Online war umsortiert.");
- break;
-
- case '0.8.2': // SQL queries for v0.8.2
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_include_own ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` ADD is_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Eigene User-ID von Aktiv-Rallye ausschliessbar. Benachrichtigungsmails sind von Aktiv-Rallye ausgeschlossen.");
- break;
-
- case '0.8.3': // SQL queries for v0.8.3
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='rals', `sort`='2', `title`='Aktiv-Rallye' WHERE `what`='bonus' LIMIT 1");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut.");
- break;
-
- case '0.8.4': // SQL queries for v0.8.4
- EXT_SET_UPDATE_NOTES("Ladeproblem bei nicht installierter Erweiterung <strong>cache</strong> gefixt.");
- break;
-
- case '0.8.5': // SQL queries for v0.8.5
- EXT_SET_UPDATE_NOTES("CSS-Klassenname gefixt in Templates.");
- break;
-
- case '0.8.6': // SQL queries for v0.8.6
- EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
- break;
-
- case '0.8.7': // SQL queries for v0.8.7
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','list_notifications','Benachrichtigungen','Listet alle an die Mitglieder ausgesandten Benachrichtigungen auf.', 10)");
-
- // Update notes
- EXT_SET_UPDATE_NOTES("Benachrichtigungsmails für z.B. Bettel- oder Aktiv-Rallye werden nun angezeigt.");
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Es können nun auch die folgenden Vergütungen bei der Auswertung der monatlichen Aktiv-Rallye mit berücksichtigt werden: Mailbestätigung (war vorher schon), Login-, Mailbuchung, Referal und Statistik-Bonus (100% Klickrate erreicht).");
+ break;
+
+ case '0.7.0': // SQL queries for v0.7.0
+ EXT_SET_UPDATE_NOTES("Zuschaltung von weiteren Bonis wird jetzt auch bei der Auflistung der mitmachenden Mitglieder im Mitgliedsbereich beachtet.");
+ break;
+
+ case '0.7.1': // SQL queries for v0.7.1
+ EXT_SET_UPDATE_NOTES("Im Adminbereich wird nun ebenfalls die Zuschaltung von weiteren Bonis berücksichtigt. Zudem wird der Gesamtbonus an alle Mitglieder errechnet und auch angezeigt.");
+ break;
+
+ case '0.7.2': // SQL queries for v0.7.2
+ EXT_SET_UPDATE_NOTES("Die Vergütung der erreichten 100%-Klickrate war noch wegen Programmierungen am Script auskommentiert. Sorry!");
+ break;
+
+ case '0.7.3': // SQL queries for v0.7.3
+ EXT_SET_UPDATE_NOTES("Gutgeschriebene Bonus-{!POINTS!} werden nach Deaktivierung der Aktiv-Rallye gelöscht.");
+ break;
+
+ case '0.7.4': // SQL queries for v0.7.4
+ EXT_SET_UPDATE_NOTES("Rechtlichen Hinweis im Mitgliedsbereich vergessen. (<strong>member_bonus.tpl</strong>)");
+ break;
+
+ case '0.7.5': // SQL queries for v0.7.5
+ EXT_SET_UPDATE_NOTES("Im Admin-Bereich Hinweis hinzugefügt, wenn Aktiv-Rallye inaktiv ist. Bitte Script inc/monthly_bonus.php löschen!");
+ break;
+
+ case '0.7.6': // SQL queries for v0.7.6
+ EXT_SET_UPDATE_NOTES("Auswahlmechanismus der Gewinner repariert. Trotz Hinzuschalten von weiteren zu berücksichtigen Boni wurden diese bei der Sortierung der User-IDs nicht berücksichtig.");
+ break;
+
+ case '0.7.7': // SQL queries for v0.7.7
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_en_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_di_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_new_mem_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_notify_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD bonus_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Optionale automatische Benachrichtigung über aktivierte und/oder deaktivierte Aktiv-Rallye einstellbar.");
+ break;
+
+ case '0.7.8': // SQL queries for v0.7.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler im täglichen Reset beseitigt.");
+ break;
+
+ case '0.7.9': // SQL queries for v0.7.9
+ EXT_SET_UPDATE_NOTES("Dollarzeichen fehlte in <strong>inc/reset/reset_bonus.php</strong>, Zeile 39");
+ break;
+
+ case '0.8.0': // SQL queries for v0.8.0
+ EXT_SET_UPDATE_NOTES("De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden.");
+ break;
+
+ case '0.8.1': // SQL queries for v0.8.1
+ EXT_SET_UPDATE_NOTES("Bei {!POINTS!}-Gleichstand wird als nächstes nach wer als letztes Online war umsortiert.");
+ break;
+
+ case '0.8.2': // SQL queries for v0.8.2
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD bonus_include_own ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` ADD is_notify ENUM('Y','N') NOT NULL DEFAULT 'N'");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Eigene User-ID von Aktiv-Rallye ausschliessbar. Benachrichtigungsmails sind von Aktiv-Rallye ausgeschlossen.");
+ break;
+
+ case '0.8.3': // SQL queries for v0.8.3
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='rals', `sort`='2', `title`='Aktiv-Rallye' WHERE `what`='bonus' LIMIT 1");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut.");
+ break;
+
+ case '0.8.4': // SQL queries for v0.8.4
+ EXT_SET_UPDATE_NOTES("Ladeproblem bei nicht installierter Erweiterung <strong>cache</strong> gefixt.");
+ break;
+
+ case '0.8.5': // SQL queries for v0.8.5
+ EXT_SET_UPDATE_NOTES("CSS-Klassenname gefixt in Templates.");
+ break;
+
+ case '0.8.6': // SQL queries for v0.8.6
+ EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+ break;
+
+ case '0.8.7': // SQL queries for v0.8.7
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','list_notifications','Benachrichtigungen','Listet alle an die Mitglieder ausgesandten Benachrichtigungen auf.', 10)");
+
+ // Update notes
+ EXT_SET_UPDATE_NOTES("Benachrichtigungsmails für z.B. Bettel- oder Aktiv-Rallye werden nun angezeigt.");
+ break;
+
+ case '0.8.8': // SQL queries for v0.8.8
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_stats` ADD bonus_stats_active ENUM('Y','N') NOT NULL DEFAULT 'N'");
+
+ // Update notes
+ EXT_SET_UPDATE_NOTES("Benachrichtigungsmails für z.B. Bettel- oder Aktiv-Rallye werden nun angezeigt.");
+ break;
+ }
break;
- case '0.8.8': // SQL queries for v0.8.8
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_stats` ADD bonus_stats_active ENUM('Y','N') NOT NULL DEFAULT 'N'");
-
- // Update notes
- EXT_SET_UPDATE_NOTES("Benachrichtigungsmails für z.B. Bettel- oder Aktiv-Rallye werden nun angezeigt.");
- break;
- }
- break;
-
-case 'modify': // When the extension got modified
- break;
-
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
-
-default: // Do stuff when extension is loaded
- if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) {
- // Daily reset was run so let's check if active rallye is activated
- if (getConfig('bonus_active') == 'Y') {
- // Run active rallye
- if (getConfig('bonus_stats') > 0) ADD_INC_TO_POOL(sprintf("%sinc/stats_bonus.php", constant('PATH')));
- ADD_INC_TO_POOL(sprintf("%sinc/monthly/monthly_bonus.php", constant('PATH')));
- } else {
- // Reset points
- ADD_INC_TO_POOL(sprintf("%sinc/reset/reset_bonus.php", constant('PATH')));
- }
- }
-
- // Check for bonus rallye is active and send mails out
- if ((getConfig('bonus_active') == 'Y') && (getConfig('bonus_new_mem_notify') == 'Y')) {
- // Include file for sending out mails
- ADD_INC_TO_POOL(sprintf("%sinc/mails/bonus_mails.php", constant('PATH')));
- }
- break;
+ case 'modify': // When the extension got modified
+ break;
+
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
+
+ default: // Do stuff when extension is loaded
+ if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) {
+ // Daily reset was run so let's check if active rallye is activated
+ if (getConfig('bonus_active') == 'Y') {
+ // Run active rallye
+ if (getConfig('bonus_stats') > 0) ADD_INC_TO_POOL(sprintf("%sinc/stats_bonus.php", constant('PATH')));
+ ADD_INC_TO_POOL(sprintf("%sinc/monthly/monthly_bonus.php", constant('PATH')));
+ } else {
+ // Reset points
+ ADD_INC_TO_POOL(sprintf("%sinc/reset/reset_bonus.php", constant('PATH')));
+ }
+ }
+
+ // Check for bonus rallye is active and send mails out
+ if ((getConfig('bonus_active') == 'Y') && (getConfig('bonus_new_mem_notify') == 'Y')) {
+ // Include file for sending out mails
+ ADD_INC_TO_POOL(sprintf("%sinc/mails/bonus_mails.php", constant('PATH')));
+ }
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // Configuration entries
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `booking_per_page` TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `booking_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 3)."");
-
- // Drop/create table for user bookings
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_book`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_book`(
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // Configuration entries
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `booking_per_page` TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `booking_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 3)."");
+
+ // Drop/create table for user bookings
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_book`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_book`(
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`subject` VARCHAR(255) NOT NULL DEFAULT 'missing',
PRIMARY KEY(`id`)
) TYPE={!_TABLE_TYPE!} COMMENT='Member points booking table'");
- // Admin menu
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_booking','Kontoauszug','Einstellungen am Kontoauszug für Mitglieder vornehmen.', 14)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_booking','Kontoauszug','Kontoauszüge aller Ihrer Mitglieder oder eines einzelnen Mitgliedes anzeigen.',10)");
-
- // Member menu
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','booking','{!POINTS!}-Kontoauszug',5,'Y','Y')");
- break;
-
-case 'remove': // Do stuff when removing extension
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_book`");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what` IN ('config_booking','list_booking')");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='booking'");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='booking' LIMIT 1");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='booking' LIMIT 1");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- ADD_EXT_SQL("");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("");
+ // Admin menu
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_booking','Kontoauszug','Einstellungen am Kontoauszug für Mitglieder vornehmen.', 14)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_booking','Kontoauszug','Kontoauszüge aller Ihrer Mitglieder oder eines einzelnen Mitgliedes anzeigen.',10)");
+
+ // Member menu
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','booking','{!POINTS!}-Kontoauszug',5,'Y','Y')");
+ break;
+
+ case 'remove': // Do stuff when removing extension
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_book`");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what` IN ('config_booking','list_booking')");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='booking'");
+ break;
+
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='booking' LIMIT 1");
break;
- }
-case 'modify': // When the extension got modified
- break;
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='booking' LIMIT 1");
+ break;
+
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ ADD_EXT_SQL('');
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES('');
+ break;
+ }
+
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_update BIGINT(20) UNSIGNED NOT NULL DEFAULT 3600");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_path VARCHAR(255) NOT NULL DEFAULT 'cache/'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_tested TINYINT(1) UNSIGNED NOT NULL DEFAULT 0");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_cache','Cache-Einstellungen','Update-Interval des Caches usw. können Sie hier ändern.', 9)");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what` IN('config_cache','cache_stats')");
-
- // Unregister all filters
- UNREGISTER_FILTER('extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', true, $dry_run);
- UNREGISTER_FILTER('post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', true, $dry_run);
- UNREGISTER_FILTER('post_extension_installed', 'CACHE_PURGE_ADMIN_MENU', true, $dry_run);
- UNREGISTER_FILTER('post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', true, $dry_run);
- UNREGISTER_FILTER('post_extension_run_sql', 'CACHE_PURGE_ADMIN_MENU', true, $dry_run);
- UNREGISTER_FILTER('post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, $dry_run);
- UNREGISTER_FILTER('post_admin_edited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, $dry_run);
- UNREGISTER_FILTER('post_admin_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, $dry_run);
- UNREGISTER_FILTER('post_admin_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, $dry_run);
- UNREGISTER_FILTER('extension_remove', 'CACHE_DESTROY_ALL', true, $dry_run);
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Es wurde die Zeitmarke der Cache-Datei extensions.cache mit berücksichtigt. Dies hatte die Folge, dass wenn bei einem Gast die Datei aktualisiert wurde, nur aktivierte und nicht die deaktivierten mit geladen wurden. Folglich fiehlen einfach ein paar Erweiterungen aus.");
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_update BIGINT(20) UNSIGNED NOT NULL DEFAULT 3600");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_path VARCHAR(255) NOT NULL DEFAULT 'cache/'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_tested TINYINT(1) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_cache','Cache-Einstellungen','Update-Interval des Caches usw. können Sie hier ändern.', 9)");
break;
- case '0.0.2': // SQL queries for v0.0.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what` IN('config_cache','cache_stats')");
+
+ // Unregister all filters
+ UNREGISTER_FILTER('extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', true, $dry_run);
+ UNREGISTER_FILTER('post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', true, $dry_run);
+ UNREGISTER_FILTER('post_extension_installed', 'CACHE_PURGE_ADMIN_MENU', true, $dry_run);
+ UNREGISTER_FILTER('post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', true, $dry_run);
+ UNREGISTER_FILTER('post_extension_run_sql', 'CACHE_PURGE_ADMIN_MENU', true, $dry_run);
+ UNREGISTER_FILTER('post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, $dry_run);
+ UNREGISTER_FILTER('post_admin_edited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, $dry_run);
+ UNREGISTER_FILTER('post_admin_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, $dry_run);
+ UNREGISTER_FILTER('post_admin_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, $dry_run);
+ UNREGISTER_FILTER('extension_remove', 'CACHE_DESTROY_ALL', true, $dry_run);
break;
- case '0.0.3': // SQL queries for v0.0.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Cache-Update repariert.");
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.0.4': // SQL queries for v0.0.4
- // Is the cache extension itself there?
- if (EXT_IS_ACTIVE('cache')) {
- // Check for cache when extension is already installed
- if ($GLOBALS['cache_instance']->loadCacheFile("extensions", true)) $GLOBALS['cache_instance']->destroyCacheFile();
- } // END - if
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Spalte "keep_active" ist hinzugefügt. Cache wurde reinitialisiert.");
- break;
-
- case '0.0.5': // SQL queries for v0.0.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Registrierung der Cache-Erweiterung repariert");
- break;
-
- case '0.0.6': // SQL queries for v0.0.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Validierung der Cache-Datei admins.cache integriert.");
- break;
-
- case '0.0.7': // SQL queries for v0.0.7
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD db_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats','cache_stats','DB-Cache','Auf Cache und gesamte Datenbank registrierte Anfragen anzeigen.', 4)");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Hits auf den Cache werden gezählt.");
- break;
-
- case '0.0.8': // SQL queries for v0.0.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Das Umschreiben der Cache-Daten hat eine Fehlermeldung <strong>Falsches Passwort!</strong> im Admin-Bereich verursacht.");
- break;
-
- case '0.0.9': // SQL queries for v0.0.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Interne Datenfeld-Management korregiert und Cache-Statistiken korregiert.");
- break;
-
- case '0.1.0': // SQL queries for v0.2.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Problem mit fehlender admins-Erweiterung beseitigt.");
- break;
-
- case '0.1.1': // SQL queries for v0.1.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler <strong>Division durch 0</strong> repariert in den DB-Cache Statistiken.");
- break;
-
- case '0.1.2': // SQL queries for v0.1.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Die Tabelen <strong>{!_MYSQL_PREFIX!}_config</strong>, <strong>{!_MYSQL_PREFIX!}_refsystem</strong>, <strong>{!_MYSQL_PREFIX!}_refdepths</strong> und <strong>{!_MYSQL_PREFIX!}_mod_reg</strong> werden nun auch ausgelagert.");
- break;
-
- case '0.1.3': // SQL queries for v0.1.3
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_admins ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_acls ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_exts ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_config ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_modreg ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_refdepth ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_refsys ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Alle cache-baren Tabellen sind nun einzelnt ein- bzw. ausschaltbar. Falls die eine oder andere ausgelagerte Tabelle also Fehler verursachen sollte, so können Sie diese hier abschalten. Beachten Sie aber bitte, dass dann mehr Abfragen an die Datenbank gestellt wird und dies bedeutend mehr Zeit braucht, als nur die Daten aus einem Datenfeld zu laden, das sich im Speicher aufhält.");
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.1.4': // SQL queries for v0.1.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler <strong>Division durch 0</strong> repariert in <strong>inc/load_cache.php</strong>.");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Es wurde die Zeitmarke der Cache-Datei extensions.cache mit berücksichtigt. Dies hatte die Folge, dass wenn bei einem Gast die Datei aktualisiert wurde, nur aktivierte und nicht die deaktivierten mit geladen wurden. Folglich fiehlen einfach ein paar Erweiterungen aus.");
+ break;
+
+ case '0.0.2': // SQL queries for v0.0.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.0.3': // SQL queries for v0.0.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Cache-Update repariert.");
+ break;
+
+ case '0.0.4': // SQL queries for v0.0.4
+ // Is the cache extension itself there?
+ if (EXT_IS_ACTIVE('cache')) {
+ // Check for cache when extension is already installed
+ if ($GLOBALS['cache_instance']->loadCacheFile("extensions", true)) $GLOBALS['cache_instance']->destroyCacheFile();
+ } // END - if
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Spalte "keep_active" ist hinzugefügt. Cache wurde reinitialisiert.");
+ break;
+
+ case '0.0.5': // SQL queries for v0.0.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Registrierung der Cache-Erweiterung repariert");
+ break;
+
+ case '0.0.6': // SQL queries for v0.0.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Validierung der Cache-Datei admins.cache integriert.");
+ break;
+
+ case '0.0.7': // SQL queries for v0.0.7
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD db_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats','cache_stats','DB-Cache','Auf Cache und gesamte Datenbank registrierte Anfragen anzeigen.', 4)");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Hits auf den Cache werden gezählt.");
+ break;
+
+ case '0.0.8': // SQL queries for v0.0.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Das Umschreiben der Cache-Daten hat eine Fehlermeldung <strong>Falsches Passwort!</strong> im Admin-Bereich verursacht.");
+ break;
+
+ case '0.0.9': // SQL queries for v0.0.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Interne Datenfeld-Management korregiert und Cache-Statistiken korregiert.");
+ break;
+
+ case '0.1.0': // SQL queries for v0.2.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Problem mit fehlender admins-Erweiterung beseitigt.");
+ break;
+
+ case '0.1.1': // SQL queries for v0.1.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler <strong>Division durch 0</strong> repariert in den DB-Cache Statistiken.");
+ break;
+
+ case '0.1.2': // SQL queries for v0.1.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Die Tabelen <strong>{!_MYSQL_PREFIX!}_config</strong>, <strong>{!_MYSQL_PREFIX!}_refsystem</strong>, <strong>{!_MYSQL_PREFIX!}_refdepths</strong> und <strong>{!_MYSQL_PREFIX!}_mod_reg</strong> werden nun auch ausgelagert.");
+ break;
+
+ case '0.1.3': // SQL queries for v0.1.3
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_admins ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_acls ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_exts ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_config ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_modreg ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_refdepth ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_refsys ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Alle cache-baren Tabellen sind nun einzelnt ein- bzw. ausschaltbar. Falls die eine oder andere ausgelagerte Tabelle also Fehler verursachen sollte, so können Sie diese hier abschalten. Beachten Sie aber bitte, dass dann mehr Abfragen an die Datenbank gestellt wird und dies bedeutend mehr Zeit braucht, als nur die Daten aus einem Datenfeld zu laden, das sich im Speicher aufhält.");
+ break;
+
+ case '0.1.4': // SQL queries for v0.1.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler <strong>Division durch 0</strong> repariert in <strong>inc/load_cache.php</strong>.");
+ break;
+
+ case '0.1.5': // SQL queries for v0.1.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Weitere Fehler im System beseitigt.");
+ break;
+
+ case '0.1.6': // SQL queries for v0.1.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Probleme während des Installationsvorganges beseitigt.");
+ break;
+
+ case '0.1.7': // SQL queries for v0.1.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("CSS-Klassenname gefixt in Templates.");
+ break;
+
+ case '0.1.8': // SQL queries for v0.1.8
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_themes ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Daten von installierten Themes werden nun gecacht.");
+ break;
+
+ case '0.1.9': // SQL queries for v0.1.9
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_admin_menu ENUM('Y','N') NOT NULL DEFAULT 'N'");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Administratormenü experimentell gecacht.");
+ break;
+
+ case '0.2.0': // SQL queries for v0.2.0
+ // This update depends on sql_patches
+ EXT_ADD_UPDATE_DEPENDS('sql_patches');
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Die Erweiterung hängt nun von der <strong>sql_patches</strong> ab.");
+ break;
+
+ case '0.2.1': // SQL queries for v0.2.1
+ // Register the new filter
+ REGISTER_FILTER('extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, $dry_run);
+ REGISTER_FILTER('post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, $dry_run);
+ REGISTER_FILTER('post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, $dry_run);
+ REGISTER_FILTER('post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, $dry_run);
+ REGISTER_FILTER('post_admin_edited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, $dry_run);
+ REGISTER_FILTER('post_admin_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, $dry_run);
+ REGISTER_FILTER('post_admin_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, $dry_run);
+ REGISTER_FILTER('extension_remove', 'CACHE_DESTROY_ALL', false, true, $dry_run);
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Filter für Erweiterungsmanagement hinzugefügt.");
+ break;
+
+ case '0.2.2': // SQL queries for v0.2.2
+ // Register the new filter
+ REGISTER_FILTER('post_extension_installed', 'CACHE_PURGE_ADMIN_MENU', false, true, $dry_run);
+ REGISTER_FILTER('post_extension_run_sql', 'CACHE_PURGE_ADMIN_MENU', false, true, $dry_run);
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Weitere Filter hinzugefügt.");
+ break;
+ }
break;
- case '0.1.5': // SQL queries for v0.1.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Weitere Fehler im System beseitigt.");
- break;
-
- case '0.1.6': // SQL queries for v0.1.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Probleme während des Installationsvorganges beseitigt.");
- break;
-
- case '0.1.7': // SQL queries for v0.1.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("CSS-Klassenname gefixt in Templates.");
- break;
-
- case '0.1.8': // SQL queries for v0.1.8
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_themes ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Daten von installierten Themes werden nun gecacht.");
- break;
-
- case '0.1.9': // SQL queries for v0.1.9
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD cache_admin_menu ENUM('Y','N') NOT NULL DEFAULT 'N'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Administratormenü experimentell gecacht.");
- break;
-
- case '0.2.0': // SQL queries for v0.2.0
- // This update depends on sql_patches
- EXT_ADD_UPDATE_DEPENDS('sql_patches');
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Die Erweiterung hängt nun von der <strong>sql_patches</strong> ab.");
- break;
-
- case '0.2.1': // SQL queries for v0.2.1
- // Register the new filter
- REGISTER_FILTER('extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, $dry_run);
- REGISTER_FILTER('post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, $dry_run);
- REGISTER_FILTER('post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, $dry_run);
- REGISTER_FILTER('post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, $dry_run);
- REGISTER_FILTER('post_admin_edited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, $dry_run);
- REGISTER_FILTER('post_admin_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, $dry_run);
- REGISTER_FILTER('post_admin_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, $dry_run);
- REGISTER_FILTER('extension_remove', 'CACHE_DESTROY_ALL', false, true, $dry_run);
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Filter für Erweiterungsmanagement hinzugefügt.");
- break;
-
- case '0.2.2': // SQL queries for v0.2.2
- // Register the new filter
- REGISTER_FILTER('post_extension_installed', 'CACHE_PURGE_ADMIN_MENU', false, true, $dry_run);
- REGISTER_FILTER('post_extension_run_sql', 'CACHE_PURGE_ADMIN_MENU', false, true, $dry_run);
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Weitere Filter hinzugefügt.");
- break;
- }
- break;
-
-case 'modify': // When the extension got modified
- break;
-
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
-
-default: // Do stuff when extension is loaded
- // Create instance on class
- if ($GLOBALS['cache_mode'] != 'init') {
- // Initialize cache system only when it's needed
- $GLOBALS['cache_instance'] = new CacheSystem(getConfig('cache_update'), "inc/".getConfig('cache_path'), getConfig('cache_tested'));
- if ($GLOBALS['cache_instance']->getStatus() != 'done') {
- // Failed to initialize cache sustem
- addFatalMessage(__FILE__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_CANNOT_INITIALIZE'));
- } // END - if
- } // END - if
- break;
+ case 'modify': // When the extension got modified
+ break;
+
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
+
+ default: // Do stuff when extension is loaded
+ // Create instance on class
+ if ($GLOBALS['cache_mode'] != 'init') {
+ // Initialize cache system only when it's needed
+ $GLOBALS['cache_instance'] = new CacheSystem(getConfig('cache_update'), "inc/".getConfig('cache_path'), getConfig('cache_tested'));
+ if ($GLOBALS['cache_instance']->getStatus() != 'done') {
+ // Failed to initialize cache sustem
+ addFatalMessage(__FILE__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_CANNOT_INITIALIZE'));
+ } // END - if
+ } // END - if
+ break;
}
// Keep this extension always active!
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_countries`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_countries` (
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_countries`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_countries` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
code CHAR(2) NOT NULL DEFAULT 'DE',
descr VARCHAR(255) NOT NULL DEFAULT 'Deutschland',
KEY(code),
PRIMARY KEY(id)
) TYPE={!_TABLE_TYPE!}");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_countries` (code, descr, is_active) VALUES ('DE','Deutschland','Y')");
-
- // Admin menu
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('country', NULL, 'Ländercodes verwalten','Stellen Sie hier Ländercodes ein, damit auch internationale Mitglieder sich zu Ihrem {!MT_WORD!} anmelden können.', 8)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('country','list_country','Verwalten','Hinzufügen, Ändern und Löschen von Ländercodes.', 1)");
-
- // Add entry to user table
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD country_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 1");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_countries`");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='country'");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("SQL-Dateien hinzugefügt, die Sie mit z.B. phpMyAdmin einspielen können. (DOCS/country/README.de lesen!)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_countries` (code, descr, is_active) VALUES ('DE','Deutschland','Y')");
+
+ // Admin menu
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('country', NULL, 'Ländercodes verwalten','Stellen Sie hier Ländercodes ein, damit auch internationale Mitglieder sich zu Ihrem {!MT_WORD!} anmelden können.', 8)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('country','list_country','Verwalten','Hinzufügen, Ändern und Löschen von Ländercodes.', 1)");
+
+ // Add entry to user table
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD country_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 1");
+ break;
+
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_countries`");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='country'");
break;
- case '0.0.2': // SQL queries for v0.0.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt.");
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.0.3': // SQL queries for v0.0.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.0.4': // SQL queries for v0.0.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle.");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("SQL-Dateien hinzugefügt, die Sie mit z.B. phpMyAdmin einspielen können. (DOCS/country/README.de lesen!)");
+ break;
+
+ case '0.0.2': // SQL queries for v0.0.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt.");
+ break;
+
+ case '0.0.3': // SQL queries for v0.0.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ break;
+
+ case '0.0.4': // SQL queries for v0.0.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle.");
+ break;
+ }
break;
- }
- break;
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
// Keep this extension always active!
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // Table for debug log entries
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_debug_log` (
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // Table for debug log entries
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_debug_log` (
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`sender_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00',
PRIMARY KEY (`id`)
) TYPE={!_TABLE_TYPE!} COMMENT='Debug log data'");
- // Table against debug log abuse
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log_abuse`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_debug_log_abuse` (
+ // Table against debug log abuse
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log_abuse`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_debug_log_abuse` (
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`client_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00',
PRIMARY KEY (`id`)
) TYPE={!_TABLE_TYPE!} COMMENT='Debug log abuse'");
- // Table on relay/server for client exchanges
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_debug_client` (
+ // Table on relay/server for client exchanges
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_debug_client` (
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`key` VARCHAR(255) NOT NULL DEFAULT 'SELF',
`url` VARCHAR(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) TYPE={!_TABLE_TYPE!} COMMENT='Debug clients'");
- // Add this exchange as first client
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_debug_client` (`url`,`title`,`webmaster`,`status`) VALUES ('{!URL!}','{!MAIN_TITLE!}','{!WEBMASTER!}','ACTIVE')");
+ // Add this exchange as first client
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_debug_client` (`url`,`title`,`webmaster`,`status`) VALUES ('{!URL!}','{!MAIN_TITLE!}','{!WEBMASTER!}','ACTIVE')");
- // Table for debug log <-> client connection
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client_log`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_debug_client_log` (
+ // Table for debug log <-> client connection
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client_log`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_debug_client_log` (
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`client_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 1,
`log_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`id`)
) TYPE={!_TABLE_TYPE!} COMMENT='Debug client <-> log connection'");
- // Guest menus
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug',NULL,'Debug-System','Y','Y',2)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_info','Informationen','Y','Y',1)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_reg','Anmeldung','Y','Y',2)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_unreg','Abmeldung','Y','Y',3)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_pilory','Spam-Pranger','Y','Y',4)");
-
- // Admin menu
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug',NULL,'Debug-System','Verwalten Sie hier komfortabel das debug.log, welches sich im Verzeichnis <strong>inc/cache/</strong> befindet.',10)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','import_debug','debug.log importieren','Importieren Sie hier manuell die debug.log, damit neue Einträge mit bestehenden abgeglichen werden können und dann evtl. hinzugefügt werden. Die <em>debug.log</em> wird nach dem Import automatisch vom Server entfernt. Dieser Vorgang wird für Sie nachts automatisch erledigt!',1)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','list_debug','Einträge anzeigen','Listet alle bereits importierten Einträge auf. Von hier aus versenden Sie noch nicht gemeldete Fehler an das Relay-Netzwerk, damt diese vom MXChange-Team geprüft werden können.',2)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','reg_debug','Am Server anmelden','Sie müssen zuerst Ihren Debug-Client (Ihr {!MT_WORD!} ist dies) oder Relay am Server von MXChange.org anmelden. Dies geschieht für Sie nicht automatisch, da Sie Ihre Daten zuvor überprüfen müssen, wie z.B. URL, eMail-Adresse und {!MT_WORD!}-Titel.',3)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','unreg_debug','Vom Server abmelden','Melden Sie bitte Ihren {!MT_WORD!} wieder vom MXChange-Server ab, damit das Team von MXChange.org weiss, welche Keys nicht mehr genutzt werden.',4)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','config_debug','Einstellungen','Ändern Sie hier alle Einstellungen, wie auch den Debug-Modus - ob Client, Hub oder selber Server sein. Lesen Sie dazu die Anleitung unter DOCs/de/debug/README.txt durch! Oder kommen Sie in's Forum. Das Team von MXChange.org hilft Ihnen gerne weiter.',5)");
-
- // Config entries
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_key` VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_mode` ENUM('CLIENT','RELAY','SERVER') NOT NULL DEFAULT 'CLIENT'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_new_log` ENUM('ACCEPT','FIRST','REG') NOT NULL DEFAULT 'FIRST'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_new_client` ENUM('ACTIVE','NEW','REG') NOT NULL DEFAULT 'NEW'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_reject_log` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 30)."");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_master_url` VARCHAR(255) NOT NULL DEFAULT '{!SERVER_URL!}'");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client_log`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log_abuse`");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='debug'");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='debug'");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y',`locked`='N' WHERE `action`='debug' LIMIT 5");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `locked`='Y' WHERE `action`='debug' LIMIT 5");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- ADD_EXT_SQL("");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("");
+ // Guest menus
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug',NULL,'Debug-System','Y','Y',2)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_info','Informationen','Y','Y',1)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_reg','Anmeldung','Y','Y',2)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_unreg','Abmeldung','Y','Y',3)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_pilory','Spam-Pranger','Y','Y',4)");
+
+ // Admin menu
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug',NULL,'Debug-System','Verwalten Sie hier komfortabel das debug.log, welches sich im Verzeichnis <strong>inc/cache/</strong> befindet.',10)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','import_debug','debug.log importieren','Importieren Sie hier manuell die debug.log, damit neue Einträge mit bestehenden abgeglichen werden können und dann evtl. hinzugefügt werden. Die <em>debug.log</em> wird nach dem Import automatisch vom Server entfernt. Dieser Vorgang wird für Sie nachts automatisch erledigt!',1)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','list_debug','Einträge anzeigen','Listet alle bereits importierten Einträge auf. Von hier aus versenden Sie noch nicht gemeldete Fehler an das Relay-Netzwerk, damt diese vom MXChange-Team geprüft werden können.',2)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','reg_debug','Am Server anmelden','Sie müssen zuerst Ihren Debug-Client (Ihr {!MT_WORD!} ist dies) oder Relay am Server von MXChange.org anmelden. Dies geschieht für Sie nicht automatisch, da Sie Ihre Daten zuvor überprüfen müssen, wie z.B. URL, eMail-Adresse und {!MT_WORD!}-Titel.',3)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','unreg_debug','Vom Server abmelden','Melden Sie bitte Ihren {!MT_WORD!} wieder vom MXChange-Server ab, damit das Team von MXChange.org weiss, welche Keys nicht mehr genutzt werden.',4)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','config_debug','Einstellungen','Ändern Sie hier alle Einstellungen, wie auch den Debug-Modus - ob Client, Hub oder selber Server sein. Lesen Sie dazu die Anleitung unter DOCs/de/debug/README.txt durch! Oder kommen Sie in's Forum. Das Team von MXChange.org hilft Ihnen gerne weiter.',5)");
+
+ // Config entries
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_key` VARCHAR(255) NOT NULL DEFAULT ''");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_mode` ENUM('CLIENT','RELAY','SERVER') NOT NULL DEFAULT 'CLIENT'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_new_log` ENUM('ACCEPT','FIRST','REG') NOT NULL DEFAULT 'FIRST'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_new_client` ENUM('ACTIVE','NEW','REG') NOT NULL DEFAULT 'NEW'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_reject_log` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 30)."");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_master_url` VARCHAR(255) NOT NULL DEFAULT '{!SERVER_URL!}'");
break;
- }
- break;
-case 'modify': // When the extension got modified
- break;
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client_log`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log_abuse`");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='debug'");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='debug'");
+ break;
+
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y',`locked`='N' WHERE `action`='debug' LIMIT 5");
+ break;
+
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `locked`='Y' WHERE `action`='debug' LIMIT 5");
+ break;
+
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ ADD_EXT_SQL('');
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES('');
+ break;
+ }
+ break;
+
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
// Keep this extension always active!
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL('');
+ break;
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
+ break;
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
+ break;
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
+ break;
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+ break;
+ }
break;
- }
- break;
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // Doubler table
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_doubler`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_doubler` (
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // Doubler table
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_doubler`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_doubler` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
refid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY(id)
)TYPE=MYISAM");
- //
- // --- SETTINGS ---
- //
- // Minimum points to double
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_min FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000");
- // Maximum points to double
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_max FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 10000.00000");
- // Points left on users account after doubling
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_left BIGINT(20) UNSIGNED NOT NULL DEFAULT 1000");
- // Charge for doubling points which goes to the webmaster (shreddered in fact!)
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_charge FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.03000");
- // Referal percents
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_ref FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.02000");
- // Shall I use the jackpot to take points from? (Y/N, default=Y)
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_jackpot ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- // A user account to take points from (default: 0->none)
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- // Total payed out points from your doublers
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- // Sending mode of mails (immediately/daily reset)
- // --> This also means who fast the doubled points will be payed out!
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_send_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'DIRECT'");
- // Timeout for entries to be purged (default: one week)
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*7)."");
- // Number of newest entries to display
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_display_new TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
- // Number of entries which will be payed out soon
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_display_pay TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
- // Number of entries which are already payed out
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_display_old TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
- // Points used by every member
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD doubler_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- // Counter for usage of the doubler
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_counter BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-
- //
- // --- MENU SYSTEMS ---
- //
- // Admin menu
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler', NULL, '{!POINTS!}-Verdoppler','Einstellungen und Einträge auflisten.', 4)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler','list_doubler','Auflisten','Einträge aus der Verdiensttabelle auflisten', 1)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler','config_doubler','Einstellungen','Prozentuale Gebühr usw. einstellen.', 2)");
-
- // Guest menu (informations / default doubler link)
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','doubler','Verdoppeln!',3,'Y','Y')");
-
- // Member menu
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','doubler','Verdoppeln!','Y','Y',7)");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_doubler`");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='doubler'");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='doubler'");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='doubler'");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='doubler' LIMIT 1");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='doubler' LIMIT 1");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='doubler' LIMIT 1");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='doubler' LIMIT 1");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='doubler' LIMIT 1");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE `module`='doubler' LIMIT 1");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Problem mit User-ID behoben!");
- break;
-
- case '0.0.2': // SQL queries for v0.0.2
- // Total used points
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_used FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Gebühr wird vom Verdoppler-Pott abgezogen.");
- break;
-
- case '0.0.3': // SQL queries for v0.0.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Drei SQL-Fehler beseitigt.");
- break;
-
- case '0.0.4': // SQL queries for v0.0.4
- // Shall I use the doubler's account to take points from? (Y/N, default=Y)
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_own ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES(POINTS."-Guthaben des Verdopplers kann optional nicht mit einbezogen werden.");
- break;
-
- case '0.0.5': // SQL queries for v0.0.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Counter-Stand und noch zum Verdoppeln übrige {!POINTS!} in Templates eingebunden. Auflistung in Admin-Bereich komplettiert.");
- break;
-
- case '0.0.6': // SQL queries for v0.0.6
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_max_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT 1");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_group_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT 1");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_sent_all ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Gebührenabzug wird beim Einzahlen abgezogen (wurde von Auszahlung abgezogen) und maximal bei Auszahlung zu kontrollierende Accounts einstellbar.<br />Template <u>admin_config_doubler_pro.tpl</u> ist überflüssig geworden. Bitte löschen Sie dies!");
- break;
-
- case '0.0.7': // SQL queries for v0.0.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.<br /><br />Minus-Guthaben des Verdoppler-Accounts repariert und Mitgliedsmail erweitert mit Transaktionsummer und IP-Nummer.");
- break;
-
- case '0.0.8': // SQL queries for v0.0.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Bitte verschieben Sie die doubler-Templates (Ordner: {!PATH!}/templates/".getLanguage()."/html/) in den neuen Order doubler!");
- break;
-
- case '0.0.9': // SQL queries for v0.0.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
- break;
-
- case '0.1.0': // SQL queries for v0.2.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
- break;
-
- case '0.1.1': // SQL queries for v0.1.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Zwei SQL-Fehler in <strong>inc/doubler_send.php</strong> beseitigt.");
- break;
-
- case '0.1.2': // SQL queries for v0.1.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle.");
- break;
-
- case '0.1.3': // SQL queries for v0.1.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden.");
- break;
-
- case '0.1.4': // SQL queries for v0.1.4
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='4' WHERE `what`='doubler' LIMIT 1");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut.");
- break;
-
- case '0.1.5': // SQL queries for v0.1.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.");
- break;
-
- case '0.1.6': // SQL queries for v0.1.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
- break;
- }
- break;
-
-case 'modify': // When the extension got modified
- break;
-
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
-
-default: // Do stuff when extension is loaded
- if ((isResetModeEnabled()) && (getConfig('doubler_send_mode') == "RESET")) {
- // So let's check for points
- ADD_INC_TO_POOL(sprintf("%sinc/doubler_send.php", constant('PATH')));
- }
- break;
+ //
+ // --- SETTINGS ---
+ //
+ // Minimum points to double
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_min FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000");
+ // Maximum points to double
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_max FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 10000.00000");
+ // Points left on users account after doubling
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_left BIGINT(20) UNSIGNED NOT NULL DEFAULT 1000");
+ // Charge for doubling points which goes to the webmaster (shreddered in fact!)
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_charge FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.03000");
+ // Referal percents
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_ref FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.02000");
+ // Shall I use the jackpot to take points from? (Y/N, default=Y)
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_jackpot ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ // A user account to take points from (default: 0->none)
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ // Total payed out points from your doublers
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ // Sending mode of mails (immediately/daily reset)
+ // --> This also means who fast the doubled points will be payed out!
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_send_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'DIRECT'");
+ // Timeout for entries to be purged (default: one week)
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*7)."");
+ // Number of newest entries to display
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_display_new TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
+ // Number of entries which will be payed out soon
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_display_pay TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
+ // Number of entries which are already payed out
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_display_old TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
+ // Points used by every member
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD doubler_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ // Counter for usage of the doubler
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_counter BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+
+ //
+ // --- MENU SYSTEMS ---
+ //
+ // Admin menu
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler', NULL, '{!POINTS!}-Verdoppler','Einstellungen und Einträge auflisten.', 4)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler','list_doubler','Auflisten','Einträge aus der Verdiensttabelle auflisten', 1)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler','config_doubler','Einstellungen','Prozentuale Gebühr usw. einstellen.', 2)");
+
+ // Guest menu (informations / default doubler link)
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','doubler','Verdoppeln!',3,'Y','Y')");
+
+ // Member menu
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','doubler','Verdoppeln!','Y','Y',7)");
+ break;
+
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_doubler`");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='doubler'");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='doubler'");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='doubler'");
+ break;
+
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='doubler' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='doubler' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='doubler' LIMIT 1");
+ break;
+
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='doubler' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='doubler' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE `module`='doubler' LIMIT 1");
+ break;
+
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Problem mit User-ID behoben!");
+ break;
+
+ case '0.0.2': // SQL queries for v0.0.2
+ // Total used points
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_used FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Gebühr wird vom Verdoppler-Pott abgezogen.");
+ break;
+
+ case '0.0.3': // SQL queries for v0.0.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Drei SQL-Fehler beseitigt.");
+ break;
+
+ case '0.0.4': // SQL queries for v0.0.4
+ // Shall I use the doubler's account to take points from? (Y/N, default=Y)
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_own ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES(POINTS."-Guthaben des Verdopplers kann optional nicht mit einbezogen werden.");
+ break;
+
+ case '0.0.5': // SQL queries for v0.0.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Counter-Stand und noch zum Verdoppeln übrige {!POINTS!} in Templates eingebunden. Auflistung in Admin-Bereich komplettiert.");
+ break;
+
+ case '0.0.6': // SQL queries for v0.0.6
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_max_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT 1");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_group_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT 1");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD doubler_sent_all ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Gebührenabzug wird beim Einzahlen abgezogen (wurde von Auszahlung abgezogen) und maximal bei Auszahlung zu kontrollierende Accounts einstellbar.<br />Template <u>admin_config_doubler_pro.tpl</u> ist überflüssig geworden. Bitte löschen Sie dies!");
+ break;
+
+ case '0.0.7': // SQL queries for v0.0.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.<br /><br />Minus-Guthaben des Verdoppler-Accounts repariert und Mitgliedsmail erweitert mit Transaktionsummer und IP-Nummer.");
+ break;
+
+ case '0.0.8': // SQL queries for v0.0.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Bitte verschieben Sie die doubler-Templates (Ordner: {!PATH!}/templates/".getLanguage()."/html/) in den neuen Order doubler!");
+ break;
+
+ case '0.0.9': // SQL queries for v0.0.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ break;
+
+ case '0.1.0': // SQL queries for v0.2.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
+ break;
+
+ case '0.1.1': // SQL queries for v0.1.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Zwei SQL-Fehler in <strong>inc/doubler_send.php</strong> beseitigt.");
+ break;
+
+ case '0.1.2': // SQL queries for v0.1.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle.");
+ break;
+
+ case '0.1.3': // SQL queries for v0.1.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden.");
+ break;
+
+ case '0.1.4': // SQL queries for v0.1.4
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='4' WHERE `what`='doubler' LIMIT 1");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut.");
+ break;
+
+ case '0.1.5': // SQL queries for v0.1.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.");
+ break;
+
+ case '0.1.6': // SQL queries for v0.1.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+ break;
+ }
+ break;
+
+ case 'modify': // When the extension got modified
+ break;
+
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
+
+ default: // Do stuff when extension is loaded
+ if ((isResetModeEnabled()) && (getConfig('doubler_send_mode') == "RESET")) {
+ // So let's check for points
+ ADD_INC_TO_POOL(sprintf("%sinc/doubler_send.php", constant('PATH')));
+ }
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- break;
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ break;
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- break;
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ break;
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- break;
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ break;
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- break;
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ break;
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- ADD_EXT_SQL("");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ ADD_EXT_SQL('');
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("");
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES('');
+ break;
+ }
break;
- }
- break;
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // Create database
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_holidays`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_holidays` (
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // Create database
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_holidays`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_holidays` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
holiday_start VARCHAR(10) NOT NULL DEFAULT 0,
PRIMARY KEY(id)
) TYPE={!_TABLE_TYPE!}");
- // Add default values to config
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'");
-
- // Add member menu
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','holiday','Urlaubsschaltung','4','Y','Y')");
-
- // Add admin menus
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('holiday', NULL, 'Urlaubsmanagement','4','Hier können Sie Urlaubsschaltungen Ihrer Mitglieder auflisten oder auch wieder aufheben.')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('holiday','list_holiday','Auflisten','1','Alle Urlaubsschaltungen auflisten.')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('holiday','del_holiday','Urlaub beenden','2','Urlaubsschaltungen aufheben. Geben Sie bitte mehr als nur "Verstoss gegen unsere AGBs" ein!')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('holiday','config_holiday','Einstellungen','3','Maximale Tage für Urlaub usw. einstellen.')");
-
- // Remove 0 max mails per day
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value='0' LIMIT 1");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_holidays`");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='holiday' LIMIT 1");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='holiday' LIMIT 4");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value='0' LIMIT 1");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_max_receive` (value, comment) VALUES ('0','Urlaub')");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='holiday' LIMIT 1");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='holiday' LIMIT 1");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.2': // SQL queries for v0.0.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
- break;
+ // Add default values to config
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'");
- case '0.0.3': // SQL queries for v0.0.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
- break;
+ // Add member menu
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','holiday','Urlaubsschaltung','4','Y','Y')");
- case '0.0.4': // SQL queries for v0.0.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
- break;
-
- case '0.0.5': // SQL queries for v0.0.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
- break;
+ // Add admin menus
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('holiday', NULL, 'Urlaubsmanagement','4','Hier können Sie Urlaubsschaltungen Ihrer Mitglieder auflisten oder auch wieder aufheben.')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('holiday','list_holiday','Auflisten','1','Alle Urlaubsschaltungen auflisten.')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('holiday','del_holiday','Urlaub beenden','2','Urlaubsschaltungen aufheben. Geben Sie bitte mehr als nur "Verstoss gegen unsere AGBs" ein!')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('holiday','config_holiday','Einstellungen','3','Maximale Tage für Urlaub usw. einstellen.')");
- case '0.0.6': // SQL queries for v0.0.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ // Remove 0 max mails per day
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value='0' LIMIT 1");
break;
- case '0.0.7': // SQL queries for v0.0.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt.");
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_holidays`");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='holiday' LIMIT 1");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='holiday' LIMIT 4");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value='0' LIMIT 1");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_max_receive` (value, comment) VALUES ('0','Urlaub')");
break;
- case '0.0.8': // SQL queries for v0.0.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='holiday' LIMIT 1");
break;
- case '0.0.9': // SQL queries for v0.0.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
- break;
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='holiday' LIMIT 1");
+ break;
+
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.2': // SQL queries for v0.0.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
+ break;
+
+ case '0.0.3': // SQL queries for v0.0.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
- case '0.1.0': // SQL queries for v0.2.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt.");
- break;
+ case '0.0.4': // SQL queries for v0.0.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
+ break;
- case '0.1.1': // SQL queries for v0.1.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
- break;
+ case '0.0.5': // SQL queries for v0.0.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+ break;
+
+ case '0.0.6': // SQL queries for v0.0.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ break;
- case '0.1.2': // SQL queries for v0.1.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abspeichern der Urlaubsanfrage korregiert.");
- break;
+ case '0.0.7': // SQL queries for v0.0.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt.");
+ break;
- case '0.1.3': // SQL queries for v0.1.3
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD holiday_active ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value='0' LIMIT 1");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_lock BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('one_day')*2)."'");
+ case '0.0.8': // SQL queries for v0.0.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
+ break;
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Die Mitglieder-Accounts werden nicht mehr gesperrt, sondern nur auf <strong>Urlaub</strong> geschaltet. Lassen Sie sich nicht davon verwirren, dass sie "freigegeben" sind!");
- break;
+ case '0.0.9': // SQL queries for v0.0.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+ break;
- case '0.1.4': // SQL queries for v0.1.4
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'");
+ case '0.1.0': // SQL queries for v0.2.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt.");
+ break;
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Urlaubsschaltung wird erst Abends um 00:00 Uhr aktiv und nicht durch die Beantragung. Dies kann nun auch auf direkte Umstellung eingestellt werden.");
- break;
+ case '0.1.1': // SQL queries for v0.1.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ break;
- case '0.1.5': // SQL queries for v0.1.5
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'");
+ case '0.1.2': // SQL queries for v0.1.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abspeichern der Urlaubsanfrage korregiert.");
+ break;
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle.");
- break;
+ case '0.1.3': // SQL queries for v0.1.3
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD holiday_active ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value='0' LIMIT 1");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_lock BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('one_day')*2)."'");
- case '0.1.6': // SQL queries for v0.1.6
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD holiday_activated BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Die Mitglieder-Accounts werden nicht mehr gesperrt, sondern nur auf <strong>Urlaub</strong> geschaltet. Lassen Sie sich nicht davon verwirren, dass sie "freigegeben" sind!");
+ break;
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlende Tabellenspalte hinzugefügt.");
- break;
+ case '0.1.4': // SQL queries for v0.1.4
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'");
- case '0.1.7': // SQL queries for v0.1.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt.");
- break;
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Urlaubsschaltung wird erst Abends um 00:00 Uhr aktiv und nicht durch die Beantragung. Dies kann nun auch auf direkte Umstellung eingestellt werden.");
+ break;
- case '0.1.8': // SQL queries for v0.1.8
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'list_holiday')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'del_holiday')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('config', '', 'config_holiday')");
+ case '0.1.5': // SQL queries for v0.1.5
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD holiday_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'");
- // Depends on sql_patches (or you have to execute these both SQL statements by phpMyAdmin
- EXT_ADD_UPDATE_DEPENDS('sql_patches');
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle.");
+ break;
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Erweiterung in's neue Menüsystem integriert.");
- break;
+ case '0.1.6': // SQL queries for v0.1.6
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD holiday_activated BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- case '0.1.9': // SQL queries for v0.1.9
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='account', `sort`='2', `title`='In Urlaub' WHERE `what`='holiday' LIMIT 1");
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlende Tabellenspalte hinzugefügt.");
+ break;
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut.");
- break;
+ case '0.1.7': // SQL queries for v0.1.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt.");
+ break;
- case '0.2.0': // SQL queries for v0.2.0
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Urlaubsmanagement' WHERE action = 'holiday' AND (`what`='' OR `what` IS NULL) LIMIT 1");
+ case '0.1.8': // SQL queries for v0.1.8
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'list_holiday')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'del_holiday')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('config', '', 'config_holiday')");
+
+ // Depends on sql_patches (or you have to execute these both SQL statements by phpMyAdmin
+ EXT_ADD_UPDATE_DEPENDS('sql_patches');
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Erweiterung in's neue Menüsystem integriert.");
+ break;
+
+ case '0.1.9': // SQL queries for v0.1.9
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='account', `sort`='2', `title`='In Urlaub' WHERE `what`='holiday' LIMIT 1");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut.");
- break;
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut.");
+ break;
- case '0.2.1': // SQL queries for v0.2.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+ case '0.2.0': // SQL queries for v0.2.0
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Urlaubsmanagement' WHERE action = 'holiday' AND (`what`='' OR `what` IS NULL) LIMIT 1");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut.");
+ break;
+
+ case '0.2.1': // SQL queries for v0.2.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+ break;
+ }
break;
- }
- break;
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD html ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` ADD html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` ADD html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','html_mail','HTML-Empfang','3','Y','Y')");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP html");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` DROP html_msg");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` DROP html_msg");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='html_mail'");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='html_mail' LIMIT 1");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='html_mail' LIMIT 1");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.6': // SQL queries for v0.0.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Der erstellte HTML-Code wird noch kompiliert (eigene HTML-Codes umgewandelt).");
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD html ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` ADD html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` ADD html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','html_mail','HTML-Empfang','3','Y','Y')");
break;
- case '0.0.8': // SQL queries for v0.0.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP html");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` DROP html_msg");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` DROP html_msg");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='html_mail'");
break;
- case '0.0.9': // SQL queries for v0.0.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='html_mail' LIMIT 1");
break;
- case '0.1.0': // SQL queries for v0.2.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='html_mail' LIMIT 1");
break;
- case '0.1.1': // SQL queries for v0.1.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.6': // SQL queries for v0.0.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Der erstellte HTML-Code wird noch kompiliert (eigene HTML-Codes umgewandelt).");
+ break;
+
+ case '0.0.8': // SQL queries for v0.0.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
+ break;
+
+ case '0.0.9': // SQL queries for v0.0.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.1.0': // SQL queries for v0.2.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+ break;
+
+ case '0.1.1': // SQL queries for v0.1.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ break;
+
+ case '0.1.2': // SQL queries for v0.1.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+ break;
+
+ case '0.1.3': // SQL queries for v0.1.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt.");
+ break;
+
+ case '0.1.4': // SQL queries for v0.1.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ break;
+
+ case '0.1.5': // SQL queries for v0.1.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+ break;
+
+ case '0.1.6':
+ // Dependency is needed for ext-registration!! (want to alter a non existent Table)
+ EXT_ADD_UPDATE_DEPENDS('bonus');
+ EXT_SET_UPDATE_NOTES("Abhänigkeit von der Erweiterung <strong>bonus</strong> hinzugefügt.");
+ break;
+ }
break;
- case '0.1.2': // SQL queries for v0.1.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
- break;
-
- case '0.1.3': // SQL queries for v0.1.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt.");
- break;
+ case 'modify': // When the extension got modified
+ break;
- case '0.1.4': // SQL queries for v0.1.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
- break;
-
- case '0.1.5': // SQL queries for v0.1.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
- case '0.1.6':
- // Dependency is needed for ext-registration!! (want to alter a non existent Table)
- EXT_ADD_UPDATE_DEPENDS('bonus');
- EXT_SET_UPDATE_NOTES("Abhänigkeit von der Erweiterung <strong>bonus</strong> hinzugefügt.");
- break;
- }
- break;
-
-case 'modify': // When the extension got modified
- break;
-
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
-
-default: // Do stuff when extension is loaded
- // Valid HTML tags (only simple and no attributes!)
- $GLOBALS['html_tags'] = array(
+ default: // Do stuff when extension is loaded
+ // Valid HTML tags (only simple and no attributes!)
+ $GLOBALS['html_tags'] = array(
'b',
'i',
'u',
'left',
'right',
'br',
- );
+ );
- // URL ends which are used to indentify the end of an URL or email link
- // Don't use these chars in links... ;-)
- //
- $GLOBALS['url_ends'] = array(
+ // URL ends which are used to indentify the end of an URL or email link
+ // Don't use these chars in links... ;-)
+ //
+ $GLOBALS['url_ends'] = array(
' ',
"\n",
"\r",
')',
- );
+ );
- // Valid email chars (without @, or do you want to have another @ inside your email addy?)
- $GLOBALS['valid_email_chars'] = array(
+ // Valid email chars (without @, or do you want to have another @ inside your email addy?)
+ $GLOBALS['valid_email_chars'] = array(
'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'
- );
- break;
+ );
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL('');
+ break;
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DELETE FROM `{!_MYSQL_PREFIX!}_countries` WHERE provider = 'ext-iso3166';");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_countries` DROP `provider`;");
- break;
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DELETE FROM `{!_MYSQL_PREFIX!}_countries` WHERE provider = 'ext-iso3166';");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_countries` DROP `provider`;");
+ break;
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_countries` SET is_active = 'Y' WHERE provider = 'ext-iso3166';");
- break;
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_countries` SET is_active = 'Y' WHERE provider = 'ext-iso3166';");
+ break;
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_countries` SET is_active='N' WHERE provider = 'ext-iso3166';");
- break;
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_countries` SET is_active='N' WHERE provider = 'ext-iso3166';");
+ break;
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.2
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_countries` ADD `provider` ENUM( 'user', 'ext-iso3166' ) NOT NULL DEFAULT 'user';");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_countries` (`code`,`descr`,`provider`)
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.2
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_countries` ADD `provider` ENUM( 'user', 'ext-iso3166' ) NOT NULL DEFAULT 'user';");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_countries` (`code`,`descr`,`provider`)
VALUES ('AD', 'Andorra', 'ext-iso3166'),
('AE', 'Vereinigte Arabische Emirate', 'ext-iso3166'),
('AF', 'Afghanistan', 'ext-iso3166'),
('ZM', 'Sambia', 'ext-iso3166'),
('ZW', 'Zimbabwe', 'ext-iso3166');");
- // This extension depends on the country extension
- EXT_ADD_UPDATE_DEPENDS('country');
+ // This extension depends on the country extension
+ EXT_ADD_UPDATE_DEPENDS('country');
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Erste Liste von 243 Ländercodes nach ISO 3166. (Quelle: Selfhtml)<br />Alle Länder sind zuerst deaktiviert. Achtung DE könnte doppelt vorkommen.<br />Ein Aktivieren/Deaktivieren lässt alle Länder beim Registrieren anzeigen oder nicht Anzeigen.");
- break;
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Erste Liste von 243 Ländercodes nach ISO 3166. (Quelle: Selfhtml)<br />Alle Länder sind zuerst deaktiviert. Achtung DE könnte doppelt vorkommen.<br />Ein Aktivieren/Deaktivieren lässt alle Länder beim Registrieren anzeigen oder nicht Anzeigen.");
+ break;
- }
- break;
+ }
+ break;
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
// [EOF]
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- break;
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ break;
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- break;
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ break;
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- break;
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ break;
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- break;
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ break;
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- ADD_EXT_SQL("");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ ADD_EXT_SQL('');
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("");
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES('');
+ break;
+ }
break;
- }
- break;
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats','logs','Aufruflogbücher','Verwalten Sie Ihre Aufruflogbücher mit diesem Admin-Bereich! (Derzeit nur Download!)',8)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `logs_base` VARCHAR(255) NOT NULL DEFAULT 'logs'");
- break;
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats','logs','Aufruflogbücher','Verwalten Sie Ihre Aufruflogbücher mit diesem Admin-Bereich! (Derzeit nur Download!)',8)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `logs_base` VARCHAR(255) NOT NULL DEFAULT 'logs'");
+ break;
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='logs'");
- break;
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='logs'");
+ break;
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- break;
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ break;
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- break;
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ break;
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- ADD_EXT_SQL("");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ ADD_EXT_SQL('');
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("");
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES('');
+ break;
+ }
break;
- }
- break;
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='mailid' LIMIT 1");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE `module`='mailid' LIMIT 1");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Veraltetes Update.");
- break;
-
- case '0.0.2': // SQL queries for v0.0.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Turbo-Bonus interegiert, nur wenn bonus-Erweiterung v0.2.2 oder höher ist.");
- break;
-
- case '0.0.4': // SQL queries for v0.0.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Absicherung der Variablen <em>uid</em>, <em>mailid</em> und <em>bonusid</em> durch die eigene Funktion <em>bigintval()</em> in den beiden Dateien <em>mailid.php</em> und <em>mailid_top.php</em>.");
- break;
-
- case '0.0.5': // SQL queries for v0.0.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Weisse Seite im Mozilla bzw. <em>Seite nicht gefunden</em> unter dem IE behoben.");
- break;
-
- case '0.0.6': // SQL queries for v0.0.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("register_globals-Problem behoben");
- break;
-
- case '0.0.7': // SQL queries for v0.0.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
- break;
-
- case '0.0.8': // SQL queries for v0.0.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
- break;
-
- case '0.0.9': // SQL queries for v0.0.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Mailbestätigung klappt wieder.");
- break;
-
- case '0.1.0': // SQL queries for v0.2.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert");
- break;
-
- case '0.1.1': // SQL queries for v0.1.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
- break;
-
- case '0.1.2': // SQL queries for v0.1.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Probe-Fix wegen falschen Bestätigungcodes bei Druck auf Return-Taste. Bitte aktualisieren Sie auch das Template <u>mailid_confirm_buttom.tpl</u>, damit die Bestätigung ohne Code auch klappt!");
- break;
-
- case '0.1.3': // SQL queries for v0.1.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
- break;
-
- case '0.1.4': // SQL queries for v0.1.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sicherheitsupdate an den Scripten <u>mailid.php</u> und <strong>mailid_top.php</strong> durchgeführt.");
- break;
-
- case '0.1.5': // SQL queries for v0.1.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sende-Pool wird nicht mehr benötigt, um die Bestätigung durchzuführen.");
- break;
-
- case '0.1.6': // SQL queries for v0.1.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Template <u>mailid_frameset.tpl</u> nach <u>mailid_frames.tpl</u> umbenannt.");
- break;
-
- case '0.1.7': // SQL queries for v0.1.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Ausgabe des generierten HTML-Codes nach <u>inc/footer.php</u> verlagert.");
- break;
-
- case '0.1.8': // SQL queries for v0.1.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlende Variablen gefixt.");
- break;
-
- case '0.1.9': // SQL queries for v0.1.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Gesamt-{!POINTS!} werden nun nach Bestätigung angezeigt. Bitte aktualisieren Sie die Templates <u>mailid_points_done.tpl</u>, <u>mailid_points_done2.tpl</u> und <u>mailid_frames.tpl</u> !");
- break;
-
- case '0.2.0': // SQL queries for v0.2.0
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Variablen abgesichert (Diverse Warnhinweise des Webservers sind damit unterbunden).");
- break;
-
- case '0.2.1': // SQL queries for v0.2.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Parser-Fehler beseitigt.");
- break;
-
- case '0.2.2': // SQL queries for v0.2.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler wegen fehlende Datenfeldelementen behoben.");
- break;
-
- case '0.2.3': // SQL queries for v0.2.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Modul <strong>mailid</strong> war nicht gesetzt. Dadurch wurden die URLs (loader z.B.) umgeschrieben und führten somit zu Fehlern.");
- break;
-
- case '0.2.4': // SQL queries for v0.2.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
- break;
-
- case '0.2.5': // SQL queries for v0.2.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Den Punkte in der Gesamt-{!POINTS!}-Anzahl in ein Komma umgewandelt.");
- break;
-
- case '0.2.6': // SQL queries for v0.2.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden.");
- break;
-
- case '0.2.7': // SQL queries for v0.2.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Wenn die {!POINTS!} dem <strong>noch auf Auszahlung wartendem Guthaben</strong> aufaddiert wird, wird eine entsprechende Nachricht ausgegeben (neue Templates <strong>mailid_points_locked</strong> und <strong>mailid_points_locked2</strong> sind hinzugekommen!)");
- break;
-
- case '0.2.8': // SQL queries for v0.2.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Bonus- und Standart-Referal-ID ausblendbar aus Aktiv-Rallye und bekommt kein Aktiv-Guthaben.");
- break;
-
- case '0.2.9': // SQL queries for v0.2.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("<strong>Code wiederholen</strong> nach <strong>Code eingeben</strong> hin geändert.");
- break;
-
- case '0.3.0': // SQL queries for v0.3.0
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlende Templates hinzugefügt.");
- break;
-
- case '0.3.1': // SQL queries for v0.3.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("mailid.php und mailid_top.php können erst bei aktivierter Erweiterung <strong>mailid</strong> benutzt werden. Solange gibt es fatale Fehlermeldungen.");
- break;
-
- case '0.3.2': // SQL queries for v0.3.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Bitte das Template <em><strong>{!PATH!}/templates/de/html/mailid/mailid_points_lcoked2.tpl</strong></em> löschen. Noices fixed.");
- break;
-
- case '0.3.3': // SQL queries for v0.3.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Variablen-Handling skriptglobal geändert.");
- break;
- }
- break;
-
-case 'modify': // When the extension got modified
- break;
-
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
-
-default: // Do stuff when extension is loaded
- break;
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL('');
+ break;
+
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
+ break;
+
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='mailid' LIMIT 1");
+ break;
+
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE `module`='mailid' LIMIT 1");
+ break;
+
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Veraltetes Update.");
+ break;
+
+ case '0.0.2': // SQL queries for v0.0.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Turbo-Bonus interegiert, nur wenn bonus-Erweiterung v0.2.2 oder höher ist.");
+ break;
+
+ case '0.0.4': // SQL queries for v0.0.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Absicherung der Variablen <em>uid</em>, <em>mailid</em> und <em>bonusid</em> durch die eigene Funktion <em>bigintval()</em> in den beiden Dateien <em>mailid.php</em> und <em>mailid_top.php</em>.");
+ break;
+
+ case '0.0.5': // SQL queries for v0.0.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Weisse Seite im Mozilla bzw. <em>Seite nicht gefunden</em> unter dem IE behoben.");
+ break;
+
+ case '0.0.6': // SQL queries for v0.0.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("register_globals-Problem behoben");
+ break;
+
+ case '0.0.7': // SQL queries for v0.0.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.0.8': // SQL queries for v0.0.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.0.9': // SQL queries for v0.0.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Mailbestätigung klappt wieder.");
+ break;
+
+ case '0.1.0': // SQL queries for v0.2.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert");
+ break;
+
+ case '0.1.1': // SQL queries for v0.1.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.1.2': // SQL queries for v0.1.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Probe-Fix wegen falschen Bestätigungcodes bei Druck auf Return-Taste. Bitte aktualisieren Sie auch das Template <u>mailid_confirm_buttom.tpl</u>, damit die Bestätigung ohne Code auch klappt!");
+ break;
+
+ case '0.1.3': // SQL queries for v0.1.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+ break;
+
+ case '0.1.4': // SQL queries for v0.1.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sicherheitsupdate an den Scripten <u>mailid.php</u> und <strong>mailid_top.php</strong> durchgeführt.");
+ break;
+
+ case '0.1.5': // SQL queries for v0.1.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sende-Pool wird nicht mehr benötigt, um die Bestätigung durchzuführen.");
+ break;
+
+ case '0.1.6': // SQL queries for v0.1.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Template <u>mailid_frameset.tpl</u> nach <u>mailid_frames.tpl</u> umbenannt.");
+ break;
+
+ case '0.1.7': // SQL queries for v0.1.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Ausgabe des generierten HTML-Codes nach <u>inc/footer.php</u> verlagert.");
+ break;
+
+ case '0.1.8': // SQL queries for v0.1.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlende Variablen gefixt.");
+ break;
+
+ case '0.1.9': // SQL queries for v0.1.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Gesamt-{!POINTS!} werden nun nach Bestätigung angezeigt. Bitte aktualisieren Sie die Templates <u>mailid_points_done.tpl</u>, <u>mailid_points_done2.tpl</u> und <u>mailid_frames.tpl</u> !");
+ break;
+
+ case '0.2.0': // SQL queries for v0.2.0
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Variablen abgesichert (Diverse Warnhinweise des Webservers sind damit unterbunden).");
+ break;
+
+ case '0.2.1': // SQL queries for v0.2.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Parser-Fehler beseitigt.");
+ break;
+
+ case '0.2.2': // SQL queries for v0.2.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler wegen fehlende Datenfeldelementen behoben.");
+ break;
+
+ case '0.2.3': // SQL queries for v0.2.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Modul <strong>mailid</strong> war nicht gesetzt. Dadurch wurden die URLs (loader z.B.) umgeschrieben und führten somit zu Fehlern.");
+ break;
+
+ case '0.2.4': // SQL queries for v0.2.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
+ break;
+
+ case '0.2.5': // SQL queries for v0.2.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Den Punkte in der Gesamt-{!POINTS!}-Anzahl in ein Komma umgewandelt.");
+ break;
+
+ case '0.2.6': // SQL queries for v0.2.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden.");
+ break;
+
+ case '0.2.7': // SQL queries for v0.2.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Wenn die {!POINTS!} dem <strong>noch auf Auszahlung wartendem Guthaben</strong> aufaddiert wird, wird eine entsprechende Nachricht ausgegeben (neue Templates <strong>mailid_points_locked</strong> und <strong>mailid_points_locked2</strong> sind hinzugekommen!)");
+ break;
+
+ case '0.2.8': // SQL queries for v0.2.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Bonus- und Standart-Referal-ID ausblendbar aus Aktiv-Rallye und bekommt kein Aktiv-Guthaben.");
+ break;
+
+ case '0.2.9': // SQL queries for v0.2.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("<strong>Code wiederholen</strong> nach <strong>Code eingeben</strong> hin geändert.");
+ break;
+
+ case '0.3.0': // SQL queries for v0.3.0
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlende Templates hinzugefügt.");
+ break;
+
+ case '0.3.1': // SQL queries for v0.3.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("mailid.php und mailid_top.php können erst bei aktivierter Erweiterung <strong>mailid</strong> benutzt werden. Solange gibt es fatale Fehlermeldungen.");
+ break;
+
+ case '0.3.2': // SQL queries for v0.3.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Bitte das Template <em><strong>{!PATH!}/templates/de/html/mailid/mailid_points_lcoked2.tpl</strong></em> löschen. Noices fixed.");
+ break;
+
+ case '0.3.3': // SQL queries for v0.3.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Variablen-Handling skriptglobal geändert.");
+ break;
+ }
+ break;
+
+ case 'modify': // When the extension got modified
+ break;
+
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
+
+ default: // Do stuff when extension is loaded
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD maintenance ENUM('Y','N') NOT NULL DEFAULT 'N';");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','maintenance','Wartungsmodus','Schalten Sie den Wartungsmodus ein, nur wenn sehr schwerwiegende Fehler vorliegen, die Sie oder mxchange.org nicht schenll genug beheben können.','10')");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='maintenance'");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD maintenance ENUM('Y','N') NOT NULL DEFAULT 'N';");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','maintenance','Wartungsmodus','Schalten Sie den Wartungsmodus ein, nur wenn sehr schwerwiegende Fehler vorliegen, die Sie oder mxchange.org nicht schenll genug beheben können.','10')");
break;
- case '0.0.2': // SQL queries for v0.0.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='maintenance'");
break;
- case '0.0.3': // SQL queries for v0.0.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.0.4': // SQL queries for v0.0.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.0.5': // SQL queries for v0.0.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt.");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.0.2': // SQL queries for v0.0.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
+ break;
+
+ case '0.0.3': // SQL queries for v0.0.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
+ break;
+
+ case '0.0.4': // SQL queries for v0.0.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ break;
+
+ case '0.0.5': // SQL queries for v0.0.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt.");
+ break;
+
+ case '0.0.6': // SQL queries for v0.0.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ break;
+ }
break;
- case '0.0.6': // SQL queries for v0.0.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
- break;
- }
- break;
-
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
// Keep this extension always active!
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_mediadata`");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_mediadata'");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='mediadata'");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Berechnung der Gesamt-{!POINTS!} korregiert.");
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.0.2': // SQL queries for v0.0.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Daten des Scriptes mit eingebunden.");
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_mediadata`");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_mediadata'");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='mediadata'");
break;
- case '0.0.3': // SQL queries for v0.0.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt.");
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.0.4': // SQL queries for v0.0.4
+ case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_mediadata`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_mediadata` (
+ ADD_EXT_SQL('');
+ break;
+
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Berechnung der Gesamt-{!POINTS!} korregiert.");
+ break;
+
+ case '0.0.2': // SQL queries for v0.0.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Daten des Scriptes mit eingebunden.");
+ break;
+
+ case '0.0.3': // SQL queries for v0.0.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt.");
+ break;
+
+ case '0.0.4': // SQL queries for v0.0.4
+ // SQL commands to run
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_mediadata`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_mediadata` (
media_key VARCHAR(255) NOT NULL DEFAULT '',
media_value VARCHAR(255) NOT NULL DEFAULT '',
PRIMARY KEY(media_key)
) TYPE={!_TABLE_TYPE!}");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Teile der Mediendaten werden in seperater Tabelle gesichert. Bitte beachten Sie, dass dieses Update nur Daten des <strong>aktuellen</strong> Zustandes berücksichtigen kann und <strong>nicht</strong> bereits gelöschter Mitglieder.");
- break;
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Teile der Mediendaten werden in seperater Tabelle gesichert. Bitte beachten Sie, dass dieses Update nur Daten des <strong>aktuellen</strong> Zustandes berücksichtigen kann und <strong>nicht</strong> bereits gelöschter Mitglieder.");
+ break;
- case '0.0.5': // SQL queries for v0.0.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt.");
- break;
+ case '0.0.5': // SQL queries for v0.0.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt.");
+ break;
- case '0.0.6': // SQL queries for v0.0.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Mediendaten mussten komplett regeneriert werden.");
- break;
+ case '0.0.6': // SQL queries for v0.0.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Mediendaten mussten komplett regeneriert werden.");
+ break;
- case '0.0.7': // SQL queries for v0.0.7
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_start BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_stage BIGINT(20) UNSIGNED NOT NULL DEFAULT '500'");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_mediadata','Mediendaten','Stellen Sie allgemeine Einstellungen zu den Mediendaten ein.', 10)");
+ case '0.0.7': // SQL queries for v0.0.7
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_start BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_stage BIGINT(20) UNSIGNED NOT NULL DEFAULT '500'");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_mediadata','Mediendaten','Stellen Sie allgemeine Einstellungen zu den Mediendaten ein.', 10)");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Start des {!MT_WORD2!} und Anzahl Anmeldungen aufgenommen. (Task #13)<br />
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Start des {!MT_WORD2!} und Anzahl Anmeldungen aufgenommen. (Task #13)<br />
Bitte stellen Sie diesen derzeit manuell unter <a href=\"{!URL!}/modules.php?module=admin&what=config_mediadata\">Einstellungen-Medidata</a> selber einstellen.");
- break;
+ break;
- case '0.0.8': // SQL queries for v0.0.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
- break;
+ case '0.0.8': // SQL queries for v0.0.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+ break;
- case '0.0.9': // SQL queries for v0.0.9
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','mediadata','Mediendaten',3,'Y','N')");
+ case '0.0.9': // SQL queries for v0.0.9
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','mediadata','Mediendaten',3,'Y','N')");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Menüpunkt wird durch diese Erweiterung generiert.");
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Menüpunkt wird durch diese Erweiterung generiert.");
+ break;
+ }
break;
- }
- break;
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
if ((isset($dry_run)) && (isset($EXT_LOAD_MODE))) {
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu',NULL,'Menü-System','Alle drei Menü-System bearbeiten (Admin-, Mitglied- und Gast-Menü)',1)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','adminedit','Vom Admin editieren','Das Administrationsmenü mit neuen Menüs erweitern, bestehende ändern oder löschen. <strong>Vorsicht!</strong> Löschen Sie nicht das Login-Menü!',2)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','admin_add','Admin-Menü hinzufügen','Weiteren Menüpunkt zum Admin-Bereich hinzufügen',3)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','guest_add','Gäste-Menü hinzufügen','Fügen Sie weitere Menüpunkte dem Gäste-Menü hinzu.',5)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','memedit','Mitgliedsmenü editieren','Mitgliedsmenü editieren oder löschen',6)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','guestedit','Gäste-Menü editieren','Gäste-Menü editieren, löschen',4)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','mem_add','Mitgliedsmenü hinzufügen','Weiteren Menüpunkt zum Mitgliedsmenü hinzufügen',7)");
- break;
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu',NULL,'Menü-System','Alle drei Menü-System bearbeiten (Admin-, Mitglied- und Gast-Menü)',1)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','adminedit','Vom Admin editieren','Das Administrationsmenü mit neuen Menüs erweitern, bestehende ändern oder löschen. <strong>Vorsicht!</strong> Löschen Sie nicht das Login-Menü!',2)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','admin_add','Admin-Menü hinzufügen','Weiteren Menüpunkt zum Admin-Bereich hinzufügen',3)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','guest_add','Gäste-Menü hinzufügen','Fügen Sie weitere Menüpunkte dem Gäste-Menü hinzu.',5)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','memedit','Mitgliedsmenü editieren','Mitgliedsmenü editieren oder löschen',6)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','guestedit','Gäste-Menü editieren','Gäste-Menü editieren, löschen',4)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','mem_add','Mitgliedsmenü hinzufügen','Weiteren Menüpunkt zum Mitgliedsmenü hinzufügen',7)");
+ break;
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='menu'");
- break;
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='menu'");
+ break;
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- break;
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ break;
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- break;
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ break;
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- ADD_EXT_SQL("");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ ADD_EXT_SQL('');
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("");
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES('');
+ break;
+ }
break;
- }
- break;
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('mods', NULL, 'Modul-Management','Verwalten Sie die Basis-Module index, login, admin usw.', 4)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('mods','config_mods','Module ändern','Ändern Sie hier die Zugtiffsrechte auf die Module. Was dennoch nicht geht: Mitglied- oder Gastzugriffsrtechte auf Admin-Module bzw. Gastzugriffsrechte auf Mitglieder-Module. Diese sind extra abgesichert.', 1)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('mods','stats_mods','Modul-Statistiken','Sehen Sie sich hier die Statistiken der Module und die damit verknüpften action- und what-Dateien an. Bei einigen Modulen gibt es allerdings keine verknüpften Dateien und somit keine Extra-Statistik.', 2)");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='mods'");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.2': // SQL queries for v0.0.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('mods', NULL, 'Modul-Management','Verwalten Sie die Basis-Module index, login, admin usw.', 4)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('mods','config_mods','Module ändern','Ändern Sie hier die Zugtiffsrechte auf die Module. Was dennoch nicht geht: Mitglied- oder Gastzugriffsrtechte auf Admin-Module bzw. Gastzugriffsrechte auf Mitglieder-Module. Diese sind extra abgesichert.', 1)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('mods','stats_mods','Modul-Statistiken','Sehen Sie sich hier die Statistiken der Module und die damit verknüpften action- und what-Dateien an. Bei einigen Modulen gibt es allerdings keine verknüpften Dateien und somit keine Extra-Statistik.', 2)");
break;
- case '0.0.3': // SQL queries for v0.0.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Dummy-Release im Internet???");
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='mods'");
break;
- case '0.0.4': // SQL queries for v0.0.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.0.5': // SQL queries for v0.0.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.0.6': // SQL queries for v0.0.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.2': // SQL queries for v0.0.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.0.3': // SQL queries for v0.0.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Dummy-Release im Internet???");
+ break;
+
+ case '0.0.4': // SQL queries for v0.0.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ break;
+
+ case '0.0.5': // SQL queries for v0.0.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+ break;
+
+ case '0.0.6': // SQL queries for v0.0.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ break;
+
+ case '0.0.7': // SQL queries for v0.0.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle.");
+ break;
+
+ case '0.0.8': // SQL queries for v0.0.8
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Modul-Management' WHERE action = 'mods' AND (`what`='' OR `what` IS NULL) LIMIT 1");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Verwaltung auf Management umgestellt.");
+ break;
+ }
break;
- case '0.0.7': // SQL queries for v0.0.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle.");
- break;
-
- case '0.0.8': // SQL queries for v0.0.8
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Modul-Management' WHERE action = 'mods' AND (`what`='' OR `what` IS NULL) LIMIT 1");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Verwaltung auf Management umgestellt.");
- break;
- }
- break;
-
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.2': // SQL queries for v0.0.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
- break;
-
- case '0.0.3': // SQL queries for v0.0.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
- break;
-
- case '0.0.4': // SQL queries for v0.0.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
- break;
-
- case '0.0.5': // SQL queries for v0.0.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
- break;
-
- case '0.0.6': // SQL queries for v0.0.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
- break;
-
- case '0.0.7': // SQL queries for v0.0.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sperrung des Mitgliederprofiles nach Änderung kann unter "Sonstige Einstellungen" abgeschaltet werden (0 setzen!)");
- break;
-
- case '0.0.8': // SQL queries for v0.0.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
- break;
-
- case '0.0.9': // SQL queries for v0.0.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Anrede "Firma" hinzugefügt.");
- break;
-
- case '0.1.0': // SQL queries for v0.2.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausführlich.");
- break;
-
- case '0.1.1': // SQL queries for v0.1.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Email-Adresse wird vor dem Speichern auf G¨tigkeit hin getestet.");
- break;
-
- case '0.1.2': // SQL queries for v0.1.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Einbindung der Erweiterung <strong>country</strong>, die Sie sich noch optional von <a href=\"{!URL!}/modules.php?module=admin&what=extensions&do=search\">meiner Seite herunterladen</a> müssen.<br />
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL('');
+ break;
+
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
+ break;
+
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
+ break;
+
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
+ break;
+
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.2': // SQL queries for v0.0.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
+ break;
+
+ case '0.0.3': // SQL queries for v0.0.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.0.4': // SQL queries for v0.0.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.0.5': // SQL queries for v0.0.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.0.6': // SQL queries for v0.0.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+ break;
+
+ case '0.0.7': // SQL queries for v0.0.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sperrung des Mitgliederprofiles nach Änderung kann unter "Sonstige Einstellungen" abgeschaltet werden (0 setzen!)");
+ break;
+
+ case '0.0.8': // SQL queries for v0.0.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ break;
+
+ case '0.0.9': // SQL queries for v0.0.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Anrede "Firma" hinzugefügt.");
+ break;
+
+ case '0.1.0': // SQL queries for v0.2.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausführlich.");
+ break;
+
+ case '0.1.1': // SQL queries for v0.1.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Email-Adresse wird vor dem Speichern auf G¨tigkeit hin getestet.");
+ break;
+
+ case '0.1.2': // SQL queries for v0.1.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Einbindung der Erweiterung <strong>country</strong>, die Sie sich noch optional von <a href=\"{!URL!}/modules.php?module=admin&what=extensions&do=search\">meiner Seite herunterladen</a> müssen.<br />
<br />
<strong>Wichtig: Laden Sie noch die Template member_mydata_overview und member_mydata_edit (beide zu finden unter templates/".getLanguage()."/html/member/ !) mit hoch!</strong>");
- // Depends on 'country'!
- EXT_ADD_UPDATE_DEPENDS('country');
- break;
+ // Depends on 'country'!
+ EXT_ADD_UPDATE_DEPENDS('country');
+ break;
- case '0.1.3': // SQL queries for v0.1.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Es werden dem Mitglied nur aktivierte Ländercodes zur Auswahl angeboten.");
- break;
+ case '0.1.3': // SQL queries for v0.1.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Es werden dem Mitglied nur aktivierte Ländercodes zur Auswahl angeboten.");
+ break;
- case '0.1.4': // SQL queries for v0.1.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("SQL-Anweisungen mit SQL_QUERY_ESC() abgesichert.");
- break;
+ case '0.1.4': // SQL queries for v0.1.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("SQL-Anweisungen mit SQL_QUERY_ESC() abgesichert.");
+ break;
- case '0.1.5': // SQL queries for v0.1.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
- break;
+ case '0.1.5': // SQL queries for v0.1.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ break;
- case '0.1.6': // SQL queries for v0.1.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Die Einstellungen können nun auch ohne der Erweiterung <strong>country</strong> abgespeichert werden.");
- break;
+ case '0.1.6': // SQL queries for v0.1.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Die Einstellungen können nun auch ohne der Erweiterung <strong>country</strong> abgespeichert werden.");
+ break;
- case '0.1.7': // SQL queries for v0.1.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.");
- break;
+ case '0.1.7': // SQL queries for v0.1.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.");
+ break;
- case '0.1.8': // SQL queries for v0.1.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+ case '0.1.8': // SQL queries for v0.1.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+ break;
+ }
break;
- }
- break;
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- break;
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ break;
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- break;
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ break;
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- break;
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ break;
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- break;
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ break;
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- ADD_EXT_SQL("");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ ADD_EXT_SQL('');
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("");
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES('');
+ break;
+ }
break;
- }
- break;
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='newsletter' AND what != 'send_newsletter'");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='newsletter'");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `locked`='N', `visible`='Y' WHERE `what`='newsletter' LIMIT 1");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `locked`='Y', `visible`='N' WHERE `what`='newsletter' LIMIT 1");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter', NULL, 'Newsletter','Einstellungen am Newsletter, Newsletter versenden, Abbestellungen auflisten usw.', 3)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter','list_newsletter','Abbestellungen','Alle Abbestellungen auflisten und bearbeiten.', 2)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter','config_newsletter','Einstellungen','Gebühr zum Abbestellen des Newsletters usw. sind hier einstellbar.', 3)");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='newsletter', `what`='send_newsletter', `title`='Versenden', `sort`='1' WHERE `what`='newsletter' LIMIT 1");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','newsletter','Newsletter-Empfang','N','Y', 10)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD nl_charge FLOAT(10,2) UNSIGNED NOT NULL DEFAULT '5.00'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nl_receive ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nl_until VARCHAR(10) NOT NULL DEFAULT 0");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nl_timespan VARCHAR(10) NOT NULL DEFAULT 0");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Vor der eigentlichen Freigabe dieser Erweiterungen habe ich sie versehendlich im Archiv mit auf den Server hochgeladen. Diese Version fügt die bereits angekündigte Funktionalitäten, wie zum Beispiel das Einstellen der Abschaltgebühr.");
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.0.2': // SQL queries for v0.0.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("URL im Versendeformular und Option <em>Immer aktiv</em> für diese Erweiterung deaktiviert.");
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='newsletter' AND what != 'send_newsletter'");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='newsletter'");
break;
- case '0.0.3': // SQL queries for v0.0.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `locked`='N', `visible`='Y' WHERE `what`='newsletter' LIMIT 1");
break;
- case '0.0.4': // SQL queries for v0.0.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `locked`='Y', `visible`='N' WHERE `what`='newsletter' LIMIT 1");
break;
- case '0.0.5': // SQL queries for v0.0.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter', NULL, 'Newsletter','Einstellungen am Newsletter, Newsletter versenden, Abbestellungen auflisten usw.', 3)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter','list_newsletter','Abbestellungen','Alle Abbestellungen auflisten und bearbeiten.', 2)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter','config_newsletter','Einstellungen','Gebühr zum Abbestellen des Newsletters usw. sind hier einstellbar.', 3)");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='newsletter', `what`='send_newsletter', `title`='Versenden', `sort`='1' WHERE `what`='newsletter' LIMIT 1");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','newsletter','Newsletter-Empfang','N','Y', 10)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD nl_charge FLOAT(10,2) UNSIGNED NOT NULL DEFAULT '5.00'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nl_receive ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nl_until VARCHAR(10) NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nl_timespan VARCHAR(10) NOT NULL DEFAULT 0");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Vor der eigentlichen Freigabe dieser Erweiterungen habe ich sie versehendlich im Archiv mit auf den Server hochgeladen. Diese Version fügt die bereits angekündigte Funktionalitäten, wie zum Beispiel das Einstellen der Abschaltgebühr.");
+ break;
+
+ case '0.0.2': // SQL queries for v0.0.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("URL im Versendeformular und Option <em>Immer aktiv</em> für diese Erweiterung deaktiviert.");
+ break;
+
+ case '0.0.3': // SQL queries for v0.0.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+ break;
+
+ case '0.0.4': // SQL queries for v0.0.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+ break;
+
+ case '0.0.5': // SQL queries for v0.0.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ break;
+
+ case '0.0.6': // SQL queries for v0.0.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Bitte Script inc/monthly_newsletter.php löschen!");
+ break;
+
+ case '0.0.7': // SQL queries for v0.0.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Script <strong>inc/monthly/monthly_newsletter.php</strong> wird nicht mehr ausgeführt, wenn die Erweiterung nicht aktiviert ist.");
+ break;
+
+ case '0.0.8': // SQL queries for v0.0.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle.");
+ break;
+
+ case '0.0.9': // SQL queries for v0.0.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Nur bei installierter Erweiterung <strong>html_mail</strong> können Sie auch HTML-Mails versenden.");
+ break;
+
+ case '0.1.0': // SQL queries for v0.2.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Nur bei installierter Erweiterung <strong>html_mail</strong> können Sie auch HTML-Mails versenden.");
+ break;
+
+ case '0.1.1': // SQL queries for v0.1.1
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Währung auf die Erweiterung <a href=\"#\"><strong>ext-other.zip</strong></a> verlagert. Bitte auch diese aktualisieren.");
+ break;
+
+ case '0.1.2': // SQL queries for v0.1.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+ break;
+ }
break;
- case '0.0.6': // SQL queries for v0.0.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Bitte Script inc/monthly_newsletter.php löschen!");
- break;
-
- case '0.0.7': // SQL queries for v0.0.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Script <strong>inc/monthly/monthly_newsletter.php</strong> wird nicht mehr ausgeführt, wenn die Erweiterung nicht aktiviert ist.");
- break;
-
- case '0.0.8': // SQL queries for v0.0.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle.");
- break;
-
- case '0.0.9': // SQL queries for v0.0.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Nur bei installierter Erweiterung <strong>html_mail</strong> können Sie auch HTML-Mails versenden.");
- break;
-
- case '0.1.0': // SQL queries for v0.2.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Nur bei installierter Erweiterung <strong>html_mail</strong> können Sie auch HTML-Mails versenden.");
- break;
-
- case '0.1.1': // SQL queries for v0.1.1
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Währung auf die Erweiterung <a href=\"#\"><strong>ext-other.zip</strong></a> verlagert. Bitte auch diese aktualisieren.");
- break;
+ case 'modify': // When the extension got modified
+ break;
- case '0.1.2': // SQL queries for v0.1.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
- break;
- }
- break;
-
-case 'modify': // When the extension got modified
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
-
-default: // Do stuff when extension is loaded
- // URL ends which are used to indentify the end of an URL or email link
- // Don't use these chars in links... ;-)
- //
- $GLOBALS['url_ends'] = array(
+ default: // Do stuff when extension is loaded
+ // URL ends which are used to indentify the end of an URL or email link
+ // Don't use these chars in links... ;-)
+ //
+ $GLOBALS['url_ends'] = array(
' ',
"\n",
"\r",
')',
- );
+ );
- // Valid email chars (without @, or do you want to have another @ inside your email addy?)
- $GLOBALS['valid_email_chars'] = array(
+ // Valid email chars (without @, or do you want to have another @ inside your email addy?)
+ $GLOBALS['valid_email_chars'] = array(
'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'
- );
+ );
- if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) {
- // Daily reset was run so let's check out for expired newsletter orders
- ADD_INC_TO_POOL(sprintf("%sinc/monthly/monthly_newsletter.php", constant('PATH')));
- }
- break;
+ if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) {
+ // Daily reset was run so let's check out for expired newsletter orders
+ ADD_INC_TO_POOL(sprintf("%sinc/monthly/monthly_newsletter.php", constant('PATH')));
+ }
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nickname VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nick_uid ENUM ('nick','uid') NOT NULL DEFAULT 'uid'");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','nickname','Nicknamen','5','Y','Y')");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='nickname'");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN ('config_nickname','list_nickname')");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_nickname_history`");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='nickname' LIMIT 1");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='nickname' LIMIT 1");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE `ext_name`='nickname' AND ext_has_css='N' LIMIT 1");
-
- // This update depends on sql_patches update!
- EXT_ADD_UPDATE_DEPENDS('sql_patches');
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("CSS-Datei kann per Adminbereich ein- und ausgeschaltet werden.");
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nickname VARCHAR(255) NOT NULL DEFAULT ''");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nick_uid ENUM ('nick','uid') NOT NULL DEFAULT 'uid'");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','nickname','Nicknamen','5','Y','Y')");
break;
- case '0.0.3': // SQL queries for v0.0.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
- break;
-
- case '0.0.4': // SQL queries for v0.0.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert.");
- break;
-
- case '0.0.5': // SQL queries for v0.0.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
- break;
-
- case '0.0.6': // SQL queries for v0.0.6
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD nickname_len TINYINT(3) UNSIGNED NOT NULL DEFAULT '5'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD nickname_pattern VARCHAR(255) NOT NULL DEFAULT 'a-zA-Z0-9_'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD nickname_chars VARCHAR(255) NOT NULL DEFAULT 'a-z, A-Z, 0-9, _'");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_nickname','Nicknamen','Stellen Sie minimale Nicknamenlänge, sowie erlaubte Zeichen hier ein.', 12)");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Minimale Länge, sowie erlaubte Zeichen sind per Adminbereich änderbar. Setzen Sie als erlaubte Zeichen nur URL-konforme Zeichen ein!");
- break;
-
- case '0.0.7': // SQL queries for v0.0.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
- break;
-
- case '0.0.8': // SQL queries for v0.0.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
- break;
-
- case '0.0.9': // SQL queries for v0.0.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut.");
- break;
-
- case '0.1.0': // SQL queries for v0.2.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
- break;
-
- case '0.1.1': // SQL queries for v0.1.1
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP nick_uid");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Auswahlfür Mitglied ob mit Nickname oder User-ID einloggen entfernt.");
- break;
-
- case '0.1.2': // SQL queries for v0.1.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Zum Zusenden eines neuen Passwortes kann jetzt entweder der Nickname / User-ID <u>ODER</u> die angemeldete EMail-Adresse eingegeben werden.");
- break;
-
- case '0.1.3': // SQL queries for v0.1.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("CSS-Datei in general.css verschmolzen (Patch 435!)");
- break;
-
- case '0.1.4': // SQL queries for v0.1.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
- break;
-
- case '0.1.5': // SQL queries for v0.1.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
- break;
-
- case '0.1.6': // SQL queries for v0.1.6
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='2' WHERE `what`='nickname' LIMIT 1");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut.");
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='nickname'");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN ('config_nickname','list_nickname')");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_nickname_history`");
break;
- case '0.1.7': // SQL queries for v0.1.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Mitglieder ohne Nickname sollten kein <strong>*failed*</strong> mehr sehen.");
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='nickname' LIMIT 1");
break;
- case '0.1.8': // SQL queries for v0.1.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='nickname' LIMIT 1");
break;
-
- case '0.1.9': // SQL queries for v0.1.9
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_nickname','Nickname-Historie','Listet alle verwendeten Nicknames der Mitglieder auf.', 12)");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_nickname_history`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_nickname_history` (
+
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE `ext_name`='nickname' AND ext_has_css='N' LIMIT 1");
+
+ // This update depends on sql_patches update!
+ EXT_ADD_UPDATE_DEPENDS('sql_patches');
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("CSS-Datei kann per Adminbereich ein- und ausgeschaltet werden.");
+ break;
+
+ case '0.0.3': // SQL queries for v0.0.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
+ break;
+
+ case '0.0.4': // SQL queries for v0.0.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert.");
+ break;
+
+ case '0.0.5': // SQL queries for v0.0.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.0.6': // SQL queries for v0.0.6
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD nickname_len TINYINT(3) UNSIGNED NOT NULL DEFAULT '5'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD nickname_pattern VARCHAR(255) NOT NULL DEFAULT 'a-zA-Z0-9_'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD nickname_chars VARCHAR(255) NOT NULL DEFAULT 'a-z, A-Z, 0-9, _'");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_nickname','Nicknamen','Stellen Sie minimale Nicknamenlänge, sowie erlaubte Zeichen hier ein.', 12)");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Minimale Länge, sowie erlaubte Zeichen sind per Adminbereich änderbar. Setzen Sie als erlaubte Zeichen nur URL-konforme Zeichen ein!");
+ break;
+
+ case '0.0.7': // SQL queries for v0.0.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
+ break;
+
+ case '0.0.8': // SQL queries for v0.0.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+ break;
+
+ case '0.0.9': // SQL queries for v0.0.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut.");
+ break;
+
+ case '0.1.0': // SQL queries for v0.2.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ break;
+
+ case '0.1.1': // SQL queries for v0.1.1
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP nick_uid");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Auswahlfür Mitglied ob mit Nickname oder User-ID einloggen entfernt.");
+ break;
+
+ case '0.1.2': // SQL queries for v0.1.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Zum Zusenden eines neuen Passwortes kann jetzt entweder der Nickname / User-ID <u>ODER</u> die angemeldete EMail-Adresse eingegeben werden.");
+ break;
+
+ case '0.1.3': // SQL queries for v0.1.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("CSS-Datei in general.css verschmolzen (Patch 435!)");
+ break;
+
+ case '0.1.4': // SQL queries for v0.1.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+ break;
+
+ case '0.1.5': // SQL queries for v0.1.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ break;
+
+ case '0.1.6': // SQL queries for v0.1.6
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='2' WHERE `what`='nickname' LIMIT 1");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut.");
+ break;
+
+ case '0.1.7': // SQL queries for v0.1.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Mitglieder ohne Nickname sollten kein <strong>*failed*</strong> mehr sehen.");
+ break;
+
+ case '0.1.8': // SQL queries for v0.1.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+ break;
+
+ case '0.1.9': // SQL queries for v0.1.9
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_nickname','Nickname-Historie','Listet alle verwendeten Nicknames der Mitglieder auf.', 12)");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_nickname_history`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_nickname_history` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
nickname VARCHAR(255) NOT NULL DEFAULT '',
PRIMARY KEY(id)
) TYPE={!_TABLE_TYPE!} COMMENT='History of used nicknames'");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Historie eingegebener Nicknames hinzugefügt. Mitglied kann auf bereits verwendeter zurückgreifen und Liste selbst löschen.");
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Historie eingegebener Nicknames hinzugefügt. Mitglied kann auf bereits verwendeter zurückgreifen und Liste selbst löschen.");
+ break;
+ }
break;
- }
- break;
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_online`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_online` (
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_online`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_online` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
sid VARCHAR(32) NOT NULL DEFAULT '',
ip VARCHAR(15) NOT NULL DEFAULT '',
KEY(refid),
KEY `admin_member` (`is_admin`,`is_member`)
) TYPE={!_TABLE_TYPE!}");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','usr_online','Online-Statistik','Eine Liste von derzeit "Online" Usern. Doppelte Einträge könnte auf mangelnden Cookie-Support des Browsers oder auf einen Spider hindeuten.', 1)");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_online`");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='usr_online'");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='online'");
-
- // Unregister filter
- UNREGISTER_FILTER('init', 'UPDATE_ONLINE_LIST', true, $dry_run);
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='online' LIMIT 1");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='online' LIMIT 1");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler <u>Unknown column 'visibled' in 'field list'</u> behoben.");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','usr_online','Online-Statistik','Eine Liste von derzeit "Online" Usern. Doppelte Einträge könnte auf mangelnden Cookie-Support des Browsers oder auf einen Spider hindeuten.', 1)");
break;
- case '0.0.2': // SQL queries for v0.0.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
- break;
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_online`");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='usr_online'");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='online'");
- case '0.0.3': // SQL queries for v0.0.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+ // Unregister filter
+ UNREGISTER_FILTER('init', 'UPDATE_ONLINE_LIST', true, $dry_run);
break;
- case '0.0.4': // SQL queries for v0.0.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Erstellung der Datenbanktabelle `{!_MYSQL_PREFIX!}_online` in diese Erweiterung ausgelagert.");
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='online' LIMIT 1");
break;
- case '0.0.5': // SQL queries for v0.0.5
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('online',NULL,'Jetzt Online','2','Y','N')");
-
- // Register filter
- REGISTER_FILTER('init', 'UPDATE_ONLINE_LIST', false, true, $dry_run);
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='online' LIMIT 1");
+ break;
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Hinzufügen des Menüpunktes "Jetzt Online" wird nun von dieser Erweiterung erledigt. Filter hinzugefügt.");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler <u>Unknown column 'visibled' in 'field list'</u> behoben.");
+ break;
+
+ case '0.0.2': // SQL queries for v0.0.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ break;
+
+ case '0.0.3': // SQL queries for v0.0.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+ break;
+
+ case '0.0.4': // SQL queries for v0.0.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Erstellung der Datenbanktabelle `{!_MYSQL_PREFIX!}_online` in diese Erweiterung ausgelagert.");
+ break;
+
+ case '0.0.5': // SQL queries for v0.0.5
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('online',NULL,'Jetzt Online','2','Y','N')");
+
+ // Register filter
+ REGISTER_FILTER('init', 'UPDATE_ONLINE_LIST', false, true, $dry_run);
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Hinzufügen des Menüpunktes "Jetzt Online" wird nun von dieser Erweiterung erledigt. Filter hinzugefügt.");
+ break;
+ }
break;
- }
- break;
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_optimize_gain`(
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_optimize_gain`(
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
gain decimal(10,3) NOT NULL DEFAULT '0.000',
PRIMARY KEY(id)
) TYPE={!_TABLE_TYPE!}");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','optimize','DB optimieren','Führen Sie dies ab und an aus, damit überflüssige Daten aus der Datenbank entfernt werden.','5')");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_optimize_gain`");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='optimize'");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','optimize','DB optimieren','Führen Sie dies ab und an aus, damit überflüssige Daten aus der Datenbank entfernt werden.','5')");
break;
- case '0.0.2': // SQL queries for v0.0.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_optimize_gain`");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='optimize'");
break;
- case '0.0.3': // SQL queries for v0.0.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.0.4': // SQL queries for v0.0.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.0.5': // SQL queries for v0.0.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.0.2': // SQL queries for v0.0.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.0.3': // SQL queries for v0.0.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
+ break;
+
+ case '0.0.4': // SQL queries for v0.0.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ break;
+
+ case '0.0.5': // SQL queries for v0.0.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.0.6': // SQL queries for v0.0.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates.");
+ break;
+ }
break;
- case '0.0.6': // SQL queries for v0.0.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates.");
- break;
- }
- break;
-
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
// Keep this extension always active!
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_order'");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='order' LIMIT 1");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='Y' WHERE `module`='order' LIMIT 1");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='order' LIMIT 1");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `visible`='N', `locked`='Y' WHERE `module`='order' LIMIT 1");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.1.0': // SQL queries for v0.1
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD order_max_full ENUM('ORDER','MAX') NOT NULL DEFAULT 'MAX'");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('setup','config_order','Mailbuchungsseite','7','Einstellungen am Mailbuchungsformular.')");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Maximale Mailbuchungen sind nun vom maximalen Empfang abhägig.");
- break;
-
- case '0.1.1': // SQL queries for v0.1.1
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_order' LIMIT 1");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('setup','config_order','Mailbuchungsseite','7','Einstellungen am Mailbuchungsformular.')");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD mail_orders BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Maximale Mailbuchung vervollständigt (Admin-Bereich und im Buchungsformular selber).");
- break;
-
- case '0.1.3': // SQL queries for v0.1.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Maximale Mailbuchungen repariert (werden nun hochgezählt und bei täglichem Reset auf 0 gesetzt).");
- break;
-
- case '0.1.4': // SQL queries for v0.1.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Dummy-Datenfeld wird wieder gelöscht, um Probleme zu vermeiden. Fehlende Spalte <em>mail_order</em> korregiert auf <em>mail_orders</em>.");
- break;
-
- case '0.1.5': // SQL queries for v0.1.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
- break;
-
- case '0.1.6': // SQL queries for v0.1.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
- break;
-
- case '0.1.7': // SQL queries for v0.1.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
- break;
-
- case '0.1.8': // SQL queries for v0.1.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
- break;
-
- case '0.1.9': // SQL queries for v0.1.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
- break;
-
- case '0.2.0': // SQL queries for v0.2.0
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
- break;
-
- case '0.2.1': // SQL queries for v0.2.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Templates <u>member_frameset-back.tpl</u> und <u>member_frameset-send.tpl</u> nach <u>member_order_back.tpl</u> und <u>member_order_send.tpl</u> umbenannt.");
- break;
-
- case '0.2.2': // SQL queries for v0.2.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Es wird nun überprüft ob auch genügend Empfänger eingegeben worden sind und ob auch genügend empfangsbereit sind.");
- break;
-
- case '0.2.3': // SQL queries for v0.2.3
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD order_min BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Minimum an Empfänger pro Mailbuchung einstellbar. Standart: 10 Empfänger");
- break;
-
- case '0.2.4': // SQL queries for v0.2.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Anzahl mindestens einszustellende Empfänger wird nun auch angezeigt.");
- break;
-
- case '0.2.5': // SQL queries for v0.2.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Speicherung der Einstellungen klappt.");
- break;
-
- case '0.2.6': // SQL queries for v0.2.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler in Mailbuchung behoben: Es wurde beim Ermitteln der nötigen {!POINTS!} die maximale Anzahl von Usern in der Kategorie gewählt und
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL('');
+ break;
+
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_order'");
+ break;
+
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='order' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='Y' WHERE `module`='order' LIMIT 1");
+ break;
+
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='order' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `visible`='N', `locked`='Y' WHERE `module`='order' LIMIT 1");
+ break;
+
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.1.0': // SQL queries for v0.1
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD order_max_full ENUM('ORDER','MAX') NOT NULL DEFAULT 'MAX'");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('setup','config_order','Mailbuchungsseite','7','Einstellungen am Mailbuchungsformular.')");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Maximale Mailbuchungen sind nun vom maximalen Empfang abhägig.");
+ break;
+
+ case '0.1.1': // SQL queries for v0.1.1
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_order' LIMIT 1");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('setup','config_order','Mailbuchungsseite','7','Einstellungen am Mailbuchungsformular.')");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD mail_orders BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Maximale Mailbuchung vervollständigt (Admin-Bereich und im Buchungsformular selber).");
+ break;
+
+ case '0.1.3': // SQL queries for v0.1.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Maximale Mailbuchungen repariert (werden nun hochgezählt und bei täglichem Reset auf 0 gesetzt).");
+ break;
+
+ case '0.1.4': // SQL queries for v0.1.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Dummy-Datenfeld wird wieder gelöscht, um Probleme zu vermeiden. Fehlende Spalte <em>mail_order</em> korregiert auf <em>mail_orders</em>.");
+ break;
+
+ case '0.1.5': // SQL queries for v0.1.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.1.6': // SQL queries for v0.1.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.1.7': // SQL queries for v0.1.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.1.8': // SQL queries for v0.1.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
+ break;
+
+ case '0.1.9': // SQL queries for v0.1.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+ break;
+
+ case '0.2.0': // SQL queries for v0.2.0
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ break;
+
+ case '0.2.1': // SQL queries for v0.2.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Templates <u>member_frameset-back.tpl</u> und <u>member_frameset-send.tpl</u> nach <u>member_order_back.tpl</u> und <u>member_order_send.tpl</u> umbenannt.");
+ break;
+
+ case '0.2.2': // SQL queries for v0.2.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Es wird nun überprüft ob auch genügend Empfänger eingegeben worden sind und ob auch genügend empfangsbereit sind.");
+ break;
+
+ case '0.2.3': // SQL queries for v0.2.3
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD order_min BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Minimum an Empfänger pro Mailbuchung einstellbar. Standart: 10 Empfänger");
+ break;
+
+ case '0.2.4': // SQL queries for v0.2.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Anzahl mindestens einszustellende Empfänger wird nun auch angezeigt.");
+ break;
+
+ case '0.2.5': // SQL queries for v0.2.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Speicherung der Einstellungen klappt.");
+ break;
+
+ case '0.2.6': // SQL queries for v0.2.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler in Mailbuchung behoben: Es wurde beim Ermitteln der nötigen {!POINTS!} die maximale Anzahl von Usern in der Kategorie gewählt und
nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der User hätte nicht genügend {!POINTS!} auf dem Konto. Ein Rechenbeispiel:
<ol>
<li>Das Mitglied wählt eine Kategorie XYZ mit maximal 15 Empfängern aus.</li>
<li>Hatte es aber, wie hier im Beispiel 31 {!POINTS!}, konnte es nicht mehr buchen.</li>
<li>Jetzt ist der Fehler endlich weg! Machen Sie dies bitte Ihren Mitgliedern bekannt.</li>
</ol>");
- break;
-
- case '0.2.7': // SQL queries for v0.2.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler mit <u>__MIN_VALUE</u> behoben.");
- break;
-
- case '0.2.8': // SQL queries for v0.2.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Konstantenproblem beseitigt.");
- break;
-
- case '0.2.9': // SQL queries for v0.2.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Problem mit nicht funktionierenden Mailbuchungen beseitigt.");
- break;
-
- case '0.3.0': // SQL queries for v0.3.0
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Basis-Modul <strong>order.php</strong> abgesichert, wenn Erweiterung nicht aktiviert ist.");
- break;
-
- case '0.3.1': // SQL queries for v0.3.1
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD order_select VARCHAR(255) NOT NULL DEFAULT 'userid'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD order_mode ENUM('ASC','DESC') NOT NULL DEFAULT 'DESC'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Beworbene URL wird nun getestet.");
- break;
-
- case '0.3.2': // SQL queries for v0.3.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausführlich.");
- break;
-
- case '0.3.3': // SQL queries for v0.3.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Unter <strong>Einstellungen - Mailbuchungsseite</strong> war immer die Tabellenspalte <strong>Mitgliedsnummer</strong> ausgewählt.");
- break;
-
- case '0.3.4': // SQL queries for v0.3.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Dateiamenskonflikt zwischen den Erweiterungen <strong>support</strong> und <strong>order</strong> behoben.");
- break;
-
- case '0.3.5': // SQL queries for v0.3.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Das Mitglied konnte geziehlt die Anzahl Mailbuchungen durch Abspeichern seines Profiles beeinflussen. Der Fehler war eine falsche Tabellenspalte. Dies war <strong>max_mails</strong>, die durch das Mitglieder veränderbar ist und zur Festellung der Maximalen Mailbuchungen herangezogen wurde.");
- break;
-
- case '0.3.6': // SQL queries for v0.3.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Im Modul order (<strong>inc/modules/order.php</strong>) wurde fehlerhafterweise die Erweiterung <strong>beg</strong> getestet.");
- break;
-
- case '0.3.7': // SQL queries for v0.3.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("SQL-Anweisungen mit SQL_QUERY_ESC() abgesichert.");
- break;
-
- case '0.3.8': // SQL queries for v0.3.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Mailbuchungsseite korregiert.");
- break;
-
- case '0.3.9': // SQL queries for v0.3.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Erneuten Fehler in Mailbuchungsseite behoben.");
- break;
-
- case '0.4.0': // SQL queries for v0.4.0
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES(POINTS."-Abzug klappt wieder. Danke an Andreman!");
- break;
-
- case '0.4.1': // SQL queries for v0.4.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
- break;
-
- case '0.4.2': // SQL queries for v0.4.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
- break;
-
- case '0.4.3': // SQL queries for v0.4.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Neue Urlaubsschaltung mit integriert.");
- break;
-
- case '0.4.4': // SQL queries for v0.4.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Ein <strong>WHERE `ext_active`='Y'</strong> tauchte bei einigen Betreibern auf und ist mit dieser Version beseitigt.");
- break;
-
- case '0.4.5': // SQL queries for v0.4.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden.");
- break;
-
- case '0.4.6': // SQL queries for v0.4.6
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('order',NULL,'Mailbuchungen',3,'Y','N')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('order','order2','Framekiller-Mails',2,'Y','N')");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='order', `sort`='1', `title`='Klick-Mails' WHERE `what`='order' LIMIT 1");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut.");
- break;
-
- case '0.4.7': // SQL queries for v0.4.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
- break;
-
- case '0.4.8': // SQL queries for v0.4.8
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Mailbuchung' WHERE `what`='config_order' LIMIT 1");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Menüpunkt "Mailbuchungsseite" nach "Mailbuchung" umbenannt und weitere Einstellungen aus Sonstige Einstellungen verschoben.");
- break;
-
- case '0.4.9': // SQL queries for v0.4.9
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD repay_deleted_mails ENUM('REPAY','JACKPOT','SHRED') NOT NULL DEFAULT 'REPAY'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Bei Löschung von Mailbuchungen kann nun global entschieden werden (Einstellungen also), ob die verbliebenen {!POINTS!} wieder gutgeschrieben werden sollen oder in den Jackpot landen.");
- break;
-
- case '0.5.0': // SQL queries for v0.5.0
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_url_blacklist`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_url_blacklist` (
+ break;
+
+ case '0.2.7': // SQL queries for v0.2.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler mit <u>__MIN_VALUE</u> behoben.");
+ break;
+
+ case '0.2.8': // SQL queries for v0.2.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Konstantenproblem beseitigt.");
+ break;
+
+ case '0.2.9': // SQL queries for v0.2.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Problem mit nicht funktionierenden Mailbuchungen beseitigt.");
+ break;
+
+ case '0.3.0': // SQL queries for v0.3.0
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Basis-Modul <strong>order.php</strong> abgesichert, wenn Erweiterung nicht aktiviert ist.");
+ break;
+
+ case '0.3.1': // SQL queries for v0.3.1
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD order_select VARCHAR(255) NOT NULL DEFAULT 'userid'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD order_mode ENUM('ASC','DESC') NOT NULL DEFAULT 'DESC'");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Beworbene URL wird nun getestet.");
+ break;
+
+ case '0.3.2': // SQL queries for v0.3.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausführlich.");
+ break;
+
+ case '0.3.3': // SQL queries for v0.3.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Unter <strong>Einstellungen - Mailbuchungsseite</strong> war immer die Tabellenspalte <strong>Mitgliedsnummer</strong> ausgewählt.");
+ break;
+
+ case '0.3.4': // SQL queries for v0.3.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Dateiamenskonflikt zwischen den Erweiterungen <strong>support</strong> und <strong>order</strong> behoben.");
+ break;
+
+ case '0.3.5': // SQL queries for v0.3.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Das Mitglied konnte geziehlt die Anzahl Mailbuchungen durch Abspeichern seines Profiles beeinflussen. Der Fehler war eine falsche Tabellenspalte. Dies war <strong>max_mails</strong>, die durch das Mitglieder veränderbar ist und zur Festellung der Maximalen Mailbuchungen herangezogen wurde.");
+ break;
+
+ case '0.3.6': // SQL queries for v0.3.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Im Modul order (<strong>inc/modules/order.php</strong>) wurde fehlerhafterweise die Erweiterung <strong>beg</strong> getestet.");
+ break;
+
+ case '0.3.7': // SQL queries for v0.3.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("SQL-Anweisungen mit SQL_QUERY_ESC() abgesichert.");
+ break;
+
+ case '0.3.8': // SQL queries for v0.3.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Mailbuchungsseite korregiert.");
+ break;
+
+ case '0.3.9': // SQL queries for v0.3.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Erneuten Fehler in Mailbuchungsseite behoben.");
+ break;
+
+ case '0.4.0': // SQL queries for v0.4.0
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES(POINTS."-Abzug klappt wieder. Danke an Andreman!");
+ break;
+
+ case '0.4.1': // SQL queries for v0.4.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ break;
+
+ case '0.4.2': // SQL queries for v0.4.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
+ break;
+
+ case '0.4.3': // SQL queries for v0.4.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Neue Urlaubsschaltung mit integriert.");
+ break;
+
+ case '0.4.4': // SQL queries for v0.4.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Ein <strong>WHERE `ext_active`='Y'</strong> tauchte bei einigen Betreibern auf und ist mit dieser Version beseitigt.");
+ break;
+
+ case '0.4.5': // SQL queries for v0.4.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden.");
+ break;
+
+ case '0.4.6': // SQL queries for v0.4.6
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('order',NULL,'Mailbuchungen',3,'Y','N')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('order','order2','Framekiller-Mails',2,'Y','N')");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='order', `sort`='1', `title`='Klick-Mails' WHERE `what`='order' LIMIT 1");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut.");
+ break;
+
+ case '0.4.7': // SQL queries for v0.4.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+ break;
+
+ case '0.4.8': // SQL queries for v0.4.8
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Mailbuchung' WHERE `what`='config_order' LIMIT 1");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Menüpunkt "Mailbuchungsseite" nach "Mailbuchung" umbenannt und weitere Einstellungen aus Sonstige Einstellungen verschoben.");
+ break;
+
+ case '0.4.9': // SQL queries for v0.4.9
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD repay_deleted_mails ENUM('REPAY','JACKPOT','SHRED') NOT NULL DEFAULT 'REPAY'");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Bei Löschung von Mailbuchungen kann nun global entschieden werden (Einstellungen also), ob die verbliebenen {!POINTS!} wieder gutgeschrieben werden sollen oder in den Jackpot landen.");
+ break;
+
+ case '0.5.0': // SQL queries for v0.5.0
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_url_blacklist`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_url_blacklist` (
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`url` VARCHAR(255) NOT NULL DEFAULT '',
`pool_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
INDEX (`pool_id`)
) TYPE=MYISAM COMMENT='URL blacklist'");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Tabelle für URL-Sperrliste angelegt.");
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Tabelle für URL-Sperrliste angelegt.");
+ break;
+ }
break;
- }
- break;
-
-case 'modify': // When the extension got modified
- break;
-
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
-
-default: // Do stuff when extension is loaded
- // Do daily reset only when installed and extension version is at least 0.1.1
- if ((isResetModeEnabled()) && (isInstalled()) && (isAdminRegistered()) && (GET_EXT_VERSION('order') >= '0.1.1')) {
- // Reset mail order values
- $result_ext = SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET mail_orders=0 WHERE mail_orders > 0", __FILE__, __LINE__);
- } // END - if
- break;
+
+ case 'modify': // When the extension got modified
+ break;
+
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
+
+ default: // Do stuff when extension is loaded
+ // Do daily reset only when installed and extension version is at least 0.1.1
+ if ((isResetModeEnabled()) && (isInstalled()) && (isAdminRegistered()) && (GET_EXT_VERSION('order') >= '0.1.1')) {
+ // Reset mail order values
+ $result_ext = SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET mail_orders=0 WHERE mail_orders > 0", __FILE__, __LINE__);
+ } // END - if
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_other','Sonstige Einstellungen','Sonstige Einstellungen an Ihrem Mailtausch.',13)");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_other'");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler <div class=\"admin_failed\">Warning: Missing argument 2 for create_timestamp_from_selections() in {!PATH!}inc/libs/pro_functions.php on line 227</div> behoben.");
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_other','Sonstige Einstellungen','Sonstige Einstellungen an Ihrem Mailtausch.',13)");
break;
- case '0.0.2': // SQL queries for v0.0.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Speichern der Einstellungen vereinfacht. Es wird dazu die Funktion ADMIN_SAVE_SETTINGS() verwendet.");
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_other'");
break;
- case '0.0.3': // SQL queries for v0.0.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.0.4': // SQL queries for v0.0.4
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD max_comma TINYINT(3) UNSIGNED NOT NULL DEFAULT '3'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Angezeigte Kommastellen können zwischen 0 und 5 eingestellt werden.");
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.0.5': // SQL queries for v0.0.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
- break;
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler <div class=\"admin_failed\">Warning: Missing argument 2 for create_timestamp_from_selections() in {!PATH!}inc/libs/pro_functions.php on line 227</div> behoben.");
+ break;
- case '0.0.6': // SQL queries for v0.0.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen endlich beseitigt.");
- break;
+ case '0.0.2': // SQL queries for v0.0.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Speichern der Einstellungen vereinfacht. Es wird dazu die Funktion ADMIN_SAVE_SETTINGS() verwendet.");
+ break;
- case '0.0.7': // SQL queries for v0.0.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Ausgabemodus der CSS-Dateien hinzugefügt. Bitte auch das Admin-Template aktualisieren!");
- break;
+ case '0.0.3': // SQL queries for v0.0.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
- case '0.0.8': // SQL queries for v0.0.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
- break;
+ case '0.0.4': // SQL queries for v0.0.4
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD max_comma TINYINT(3) UNSIGNED NOT NULL DEFAULT '3'");
- case '0.0.9': // SQL queries for v0.0.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abspeichern der Einstellungen repariert.");
- break;
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Angezeigte Kommastellen können zwischen 0 und 5 eingestellt werden.");
+ break;
+
+ case '0.0.5': // SQL queries for v0.0.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
+ break;
+
+ case '0.0.6': // SQL queries for v0.0.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen endlich beseitigt.");
+ break;
+
+ case '0.0.7': // SQL queries for v0.0.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Ausgabemodus der CSS-Dateien hinzugefügt. Bitte auch das Admin-Template aktualisieren!");
+ break;
+
+ case '0.0.8': // SQL queries for v0.0.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
+ break;
+
+ case '0.0.9': // SQL queries for v0.0.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abspeichern der Einstellungen repariert.");
+ break;
- case '0.1.0': // SQL queries for v0.2.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Folgende Einstellungen können auf 0 gesetzt werden:
+ case '0.1.0': // SQL queries for v0.2.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Folgende Einstellungen können auf 0 gesetzt werden:
<ol>
<li>Selbe beworbene URL nicht mehr bewerbar (0 = URL kann sofort wieder gebucht werden)</li>
<li>Gütigkeitsdauer der Bestätigungslinks (0 = Bestätigungslinks laufen nie ab)</li>
<li>Profilaktualisierungsinterval (0 = Es wird keine Mail zum Profilaktualisierunng durch das Mitglied ausgesendet(</li>
<li>Erneute Aussendung der Mail (0 = Siehe oben)</li>
</ol>");
- break;
+ break;
- case '0.1.1': // SQL queries for v0.1.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Gast- und Mitgliedsmenüs lassen sich voneinander getrentt ein- und auschalten.");
- break;
+ case '0.1.1': // SQL queries for v0.1.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Gast- und Mitgliedsmenüs lassen sich voneinander getrentt ein- und auschalten.");
+ break;
- case '0.1.2': // SQL queries for v0.1.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
- break;
+ case '0.1.2': // SQL queries for v0.1.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+ break;
- case '0.1.3': // SQL queries for v0.1.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Wort "Baustelle" vom Auto-Versand entfernt, da dieser nun klappt.");
- break;
+ case '0.1.3': // SQL queries for v0.1.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Wort "Baustelle" vom Auto-Versand entfernt, da dieser nun klappt.");
+ break;
- case '0.1.4': // SQL queries for v0.1.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
- break;
+ case '0.1.4': // SQL queries for v0.1.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ break;
- case '0.1.5': // SQL queries for v0.1.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
- break;
+ case '0.1.5': // SQL queries for v0.1.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ break;
- case '0.1.6': // SQL queries for v0.1.6
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD reject_url VARCHAR(255) NOT NULL DEFAULT '{!URL!}'");
+ case '0.1.6': // SQL queries for v0.1.6
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD reject_url VARCHAR(255) NOT NULL DEFAULT '{!URL!}'");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Bei Ablehnung der URL wird jetzt endlich eine Standart-URL eingesetzt, die konfigurierbar ist. Fehler beim Laden der Konfiguration gefunden.");
- break;
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Bei Ablehnung der URL wird jetzt endlich eine Standart-URL eingesetzt, die konfigurierbar ist. Fehler beim Laden der Konfiguration gefunden.");
+ break;
- case '0.1.7': // SQL queries for v0.1.7
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD currency VARCHAR(255) NOT NULL DEFAULT '€'");
+ case '0.1.7': // SQL queries for v0.1.7
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD currency VARCHAR(255) NOT NULL DEFAULT '€'");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Standart-Währung der Gebühren für alle Erweiterungen geltend hinzugefügt.");
- break;
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Standart-Währung der Gebühren für alle Erweiterungen geltend hinzugefügt.");
+ break;
- case '0.1.8': // SQL queries for v0.1.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Die sonstigen Einstellungen lassen sich nun nur noch ändern, wenn die Erweiterung <strong>other</strong> auch installiert ist. Anderfalls gibt es einen SQL-Fehler beim Speichern und GROSS_GESCHRIEBENE Worte im Formular.");
- break;
+ case '0.1.8': // SQL queries for v0.1.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Die sonstigen Einstellungen lassen sich nun nur noch ändern, wenn die Erweiterung <strong>other</strong> auch installiert ist. Anderfalls gibt es einen SQL-Fehler beim Speichern und GROSS_GESCHRIEBENE Worte im Formular.");
+ break;
- case '0.1.9': // SQL queries for v0.1.9
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mailid_error_redirect ENUM('index','reject') NOT NULL DEFAULT 'index'");
+ case '0.1.9': // SQL queries for v0.1.9
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mailid_error_redirect ENUM('index','reject') NOT NULL DEFAULT 'index'");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Bei fehlerhafter Mail während der Bestätigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden.");
- break;
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Bei fehlerhafter Mail während der Bestätigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden.");
+ break;
- case '0.2.0': // SQL queries for v0.2.0
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE `mailid_error_redirect` `mailid_error_redirect` ENUM('INDEX','REJECT') NOT NULL DEFAULT 'INDEX'");
+ case '0.2.0': // SQL queries for v0.2.0
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE `mailid_error_redirect` `mailid_error_redirect` ENUM('INDEX','REJECT') NOT NULL DEFAULT 'INDEX'");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Bei fehlerhafter Mail während der Bestätigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden.");
- break;
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Bei fehlerhafter Mail während der Bestätigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden.");
+ break;
- case '0.2.1': // SQL queries for v0.2.1
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `min_age` TINYINT(3) UNSIGNED NOT NULL DEFAULT 16");
+ case '0.2.1': // SQL queries for v0.2.1
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `min_age` TINYINT(3) UNSIGNED NOT NULL DEFAULT 16");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Minimumalter ist nun konfigurierbar.");
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Minimumalter ist nun konfigurierbar.");
+ break;
+ }
break;
- }
- break;
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
// Keep this extension always active!
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_payouts`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_payouts` (
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_payouts`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_payouts` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
payout_total FLOAT(22,3) UNSIGNED NOT NULL DEFAULT '0.000',
KEY(payout_id),
PRIMARY KEY(id)
) TYPE={!_TABLE_TYPE!}");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_payout_types`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_payout_types` (
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_payout_types`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_payout_types` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
type VARCHAR(255) NOT NULL DEFAULT '',
rate FLOAT(22,3) UNSIGNED NOT NULL DEFAULT '0.000',
min_points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY(id)
) TYPE={!_TABLE_TYPE!}");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_payouts','Auszahlungen','Auszahlungsarten einstellen, neu anlegen oder löschen.','15')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('payouts','list_payouts','Anfragen auflisten','Listet alle Auszahlungsanfragen Ihrer Mitglieder auf.','16')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','payout','Auszahlungen','N','N','11')");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_payouts`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_payout_types`");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='payouts'");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='payout'");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='payout' LIMIT 1");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='payout' LIMIT 1");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.1.2': // SQL queries for v0.1.2
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('payouts', NULL, 'Auszahlungsmanagement','Management der Auszahlungsarten.','8')");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='payouts', `title`='Einstellungen' WHERE `action`='setup' AND `what`='config_payouts' LIMIT 1");
- break;
-
- case '0.1.3': // SQL queries for v0.1.3
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD from_account VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD from_pass VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD engine_url VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD engine_ret_ok VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD engine_ret_failed VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD pass_enc ENUM('md5','base64','none') NOT NULL DEFAULT 'md5'");
- break;
-
- case '0.1.4': // SQL queries for v0.1.4
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD password VARCHAR(255) NOT NULL DEFAULT ''");
- break;
-
- case '0.1.5': // SQL queries for v0.1.5
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD target_url LONGTEXT NOT NULL");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD banner_url LONGTEXT NOT NULL");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD link_text VARCHAR(30) NOT NULL DEFAULT ''");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD allow_url ENUM('Y','N') NOT NULL DEFAULT 'N'");
- break;
-
- case '0.1.6': // SQL queries for v0.1.6
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` CHANGE pass_enc pass_enc ENUM('md5','base64','xxx') NOT NULL DEFAULT 'xxx'");
- break;
-
- case '0.1.8': // SQL queries for v0.1.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Auflistung der Auszahlungen ausgelagert in Template <em>member_payout.tpl</em>.");
- break;
-
- case '0.1.9': // SQL queries for v0.1.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
- break;
-
- case '0.2.0': // SQL queries for v0.2.0
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert.");
- break;
-
- case '0.2.1': // SQL queries for v0.2.1
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` CHANGE payout_total payout_total FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` CHANGE rate rate FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
-
- case '0.2.2': // SQL queries for v0.2.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Buttons aus Aufgabenauflisten ausgelagert");
- break;
-
- case '0.2.3': // SQL queries for v0.2.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
- break;
-
- case '0.2.4': // SQL queries for v0.2.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Ausgabe der Auszahlungsmöglichkeiten im Mitgliedsbereich repariert.");
- break;
-
- case '0.2.5': // SQL queries for v0.2.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
- break;
-
- case '0.2.6': // SQL queries for v0.2.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt.");
- break;
-
- case '0.2.7': // SQL queries for v0.2.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
- break;
-
- case '0.2.8': // SQL queries for v0.2.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Work-Arount-Lösung zu temporären Problemen mit der Task-ID eingebaut.");
- break;
-
- case '0.2.9': // SQL queries for v0.2.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Nachricht an Admin bei Auszahlungsanfrage wird endlich versendet.");
- break;
-
- case '0.3.0': // SQL queries for v0.3.0
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
- break;
-
- case '0.3.1': // SQL queries for v0.3.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler in Auszahlungsfunktion beseitigt, wenn Umrechnungsrate ungleich 1 eingestellt ist.");
- break;
-
- case '0.3.2': // SQL queries for v0.3.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
- break;
-
- case '0.3.3': // SQL queries for v0.3.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
- break;
-
- case '0.3.4': // SQL queries for v0.3.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Anzahl zu überweisende {!POINTS!} müssen immer grösser 0 sein, ansonsten bricht das Script mit einer Fehlermeldung an das Mitglied ab.");
- break;
-
- case '0.3.5': // SQL queries for v0.3.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle.");
- break;
-
- case '0.3.6': // SQL queries for v0.3.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.");
- break;
-
- case '0.3.7': // SQL queries for v0.3.7
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Auszahlungsmanagement' WHERE action = 'payouts' AND (`what`='' OR `what` IS NULL) LIMIT 1");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Verwaltung nach Management umgestellt.");
- break;
-
- case '0.3.8': // SQL queries for v0.3.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
- break;
- }
- break;
-
-case 'modify': // When the extension got modified
- break;
-
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
-
-default: // Do stuff when extension is loaded
- break;
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_payouts','Auszahlungen','Auszahlungsarten einstellen, neu anlegen oder löschen.','15')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('payouts','list_payouts','Anfragen auflisten','Listet alle Auszahlungsanfragen Ihrer Mitglieder auf.','16')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','payout','Auszahlungen','N','N','11')");
+ break;
+
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_payouts`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_payout_types`");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='payouts'");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='payout'");
+ break;
+
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='payout' LIMIT 1");
+ break;
+
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='payout' LIMIT 1");
+ break;
+
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.1.2': // SQL queries for v0.1.2
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('payouts', NULL, 'Auszahlungsmanagement','Management der Auszahlungsarten.','8')");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='payouts', `title`='Einstellungen' WHERE `action`='setup' AND `what`='config_payouts' LIMIT 1");
+ break;
+
+ case '0.1.3': // SQL queries for v0.1.3
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD from_account VARCHAR(255) NOT NULL DEFAULT ''");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD from_pass VARCHAR(255) NOT NULL DEFAULT ''");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD engine_url VARCHAR(255) NOT NULL DEFAULT ''");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD engine_ret_ok VARCHAR(255) NOT NULL DEFAULT ''");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD engine_ret_failed VARCHAR(255) NOT NULL DEFAULT ''");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD pass_enc ENUM('md5','base64','none') NOT NULL DEFAULT 'md5'");
+ break;
+
+ case '0.1.4': // SQL queries for v0.1.4
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD password VARCHAR(255) NOT NULL DEFAULT ''");
+ break;
+
+ case '0.1.5': // SQL queries for v0.1.5
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD target_url LONGTEXT NOT NULL");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD banner_url LONGTEXT NOT NULL");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD link_text VARCHAR(30) NOT NULL DEFAULT ''");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD allow_url ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ break;
+
+ case '0.1.6': // SQL queries for v0.1.6
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` CHANGE pass_enc pass_enc ENUM('md5','base64','xxx') NOT NULL DEFAULT 'xxx'");
+ break;
+
+ case '0.1.8': // SQL queries for v0.1.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Auflistung der Auszahlungen ausgelagert in Template <em>member_payout.tpl</em>.");
+ break;
+
+ case '0.1.9': // SQL queries for v0.1.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.2.0': // SQL queries for v0.2.0
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert.");
+ break;
+
+ case '0.2.1': // SQL queries for v0.2.1
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` CHANGE payout_total payout_total FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` CHANGE rate rate FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
+
+ case '0.2.2': // SQL queries for v0.2.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Buttons aus Aufgabenauflisten ausgelagert");
+ break;
+
+ case '0.2.3': // SQL queries for v0.2.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+ break;
+
+ case '0.2.4': // SQL queries for v0.2.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Ausgabe der Auszahlungsmöglichkeiten im Mitgliedsbereich repariert.");
+ break;
+
+ case '0.2.5': // SQL queries for v0.2.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ break;
+
+ case '0.2.6': // SQL queries for v0.2.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt.");
+ break;
+
+ case '0.2.7': // SQL queries for v0.2.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
+ break;
+
+ case '0.2.8': // SQL queries for v0.2.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Work-Arount-Lösung zu temporären Problemen mit der Task-ID eingebaut.");
+ break;
+
+ case '0.2.9': // SQL queries for v0.2.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Nachricht an Admin bei Auszahlungsanfrage wird endlich versendet.");
+ break;
+
+ case '0.3.0': // SQL queries for v0.3.0
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+ break;
+
+ case '0.3.1': // SQL queries for v0.3.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler in Auszahlungsfunktion beseitigt, wenn Umrechnungsrate ungleich 1 eingestellt ist.");
+ break;
+
+ case '0.3.2': // SQL queries for v0.3.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ break;
+
+ case '0.3.3': // SQL queries for v0.3.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
+ break;
+
+ case '0.3.4': // SQL queries for v0.3.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Anzahl zu überweisende {!POINTS!} müssen immer grösser 0 sein, ansonsten bricht das Script mit einer Fehlermeldung an das Mitglied ab.");
+ break;
+
+ case '0.3.5': // SQL queries for v0.3.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle.");
+ break;
+
+ case '0.3.6': // SQL queries for v0.3.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.");
+ break;
+
+ case '0.3.7': // SQL queries for v0.3.7
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Auszahlungsmanagement' WHERE action = 'payouts' AND (`what`='' OR `what` IS NULL) LIMIT 1");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Verwaltung nach Management umgestellt.");
+ break;
+
+ case '0.3.8': // SQL queries for v0.3.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+ break;
+ }
+ break;
+
+ case 'modify': // When the extension got modified
+ break;
+
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
+
+ default: // Do stuff when extension is loaded
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_primera`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_primera` (
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_primera`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_primera` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
primera_account VARCHAR(255) NOT NULL DEFAULT '',
PRIMARY KEY(id)
) TYPE={!_TABLE_TYPE!}");
- // Confiuration
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT 40000");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT 5000");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_api_name VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_api_md5 VARCHAR(32) NOT NULL DEFAULT ''");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_refid VARCHAR(255) NOT NULL DEFAULT ''");
-
- // User data
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD primera_userid VARCHAR(255) NOT NULL DEFAULT ''");
-
- // Admin menu
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('primera', NULL, 'Primera-Management','Konfiguration zur Primera-API einstellen, Auszahlungen auflisten usw..', 15)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('primera','config_primera','Primera-API-Einstellungen','Konfiguration zur Primera-API einstellen.', 1)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('primera','list_primera','Primera-Anfragen auflisten','Listet alle Primera-Auszahlungsanfragen Ihrer Mitglieder auf.', 2)");
-
- // Member menu
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','primera','Primera-Ein-/Auszahlungen','N','N','11')");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_primera`");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='primera'");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='primera'");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='primera' LIMIT 1");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='primera' LIMIT 1");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("");
+ // Confiuration
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT 40000");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT 5000");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_api_name VARCHAR(255) NOT NULL DEFAULT ''");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_api_md5 VARCHAR(32) NOT NULL DEFAULT ''");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD primera_refid VARCHAR(255) NOT NULL DEFAULT ''");
+
+ // User data
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD primera_userid VARCHAR(255) NOT NULL DEFAULT ''");
+
+ // Admin menu
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('primera', NULL, 'Primera-Management','Konfiguration zur Primera-API einstellen, Auszahlungen auflisten usw..', 15)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('primera','config_primera','Primera-API-Einstellungen','Konfiguration zur Primera-API einstellen.', 1)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('primera','list_primera','Primera-Anfragen auflisten','Listet alle Primera-Auszahlungsanfragen Ihrer Mitglieder auf.', 2)");
+
+ // Member menu
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','primera','Primera-Ein-/Auszahlungen','N','N','11')");
+ break;
+
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_primera`");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='primera'");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='primera'");
+ break;
+
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='primera' LIMIT 1");
+ break;
+
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='primera' LIMIT 1");
+ break;
+
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES('');
+ break;
+ }
break;
- }
- break;
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Benachrichtungsmails werden nur beim tägichen Reset ausgesendet");
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.0.2': // SQL queries for v0.0.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.0.3': // SQL queries for v0.0.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert");
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.0.4': // SQL queries for v0.0.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Dummy-Release im Intranet??? Hmmm...");
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.0.5': // SQL queries for v0.0.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Profilaktualisierungsmails werden nur dann ausgesendet, wenn <u>profile_update</u> und <u>prof_reupdate</u> > 0 sind.");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Benachrichtungsmails werden nur beim tägichen Reset ausgesendet");
+ break;
+
+ case '0.0.2': // SQL queries for v0.0.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.0.3': // SQL queries for v0.0.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert");
+ break;
+
+ case '0.0.4': // SQL queries for v0.0.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Dummy-Release im Intranet??? Hmmm...");
+ break;
+
+ case '0.0.5': // SQL queries for v0.0.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Profilaktualisierungsmails werden nur dann ausgesendet, wenn <u>profile_update</u> und <u>prof_reupdate</u> > 0 sind.");
+ break;
+
+ case '0.0.6': // SQL queries for v0.0.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausführlich.");
+ break;
+
+ case '0.0.7': // SQL queries for v0.0.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+ break;
+
+ case '0.0.8': // SQL queries for v0.0.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Namenskonflikt gelösst mit Erweiterung <strong>update</strong> (kommt noch raus!)");
+ break;
+
+ case '0.0.9': // SQL queries for v0.0.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+ break;
+ }
break;
- case '0.0.6': // SQL queries for v0.0.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausführlich.");
- break;
+ case 'modify': // When the extension got modified
+ break;
- case '0.0.7': // SQL queries for v0.0.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
- case '0.0.8': // SQL queries for v0.0.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Namenskonflikt gelösst mit Erweiterung <strong>update</strong> (kommt noch raus!)");
- break;
-
- case '0.0.9': // SQL queries for v0.0.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
- break;
- }
- break;
-
-case 'modify': // When the extension got modified
- break;
-
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
-
-default: // Do stuff when extension is loaded
- // Do we have a daily-reset-run?
- if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) {
- // So let's check for profiles which needs an update
- ADD_INC_TO_POOL(sprintf("%sinc/profile-updte.php", constant('PATH')));
- }
- break;
+ default: // Do stuff when extension is loaded
+ // Do we have a daily-reset-run?
+ if (isResetModeEnabled() && (!isDebugModeEnabled()) && ($GLOBALS['output_mode'] != 1)) {
+ // So let's check for profiles which needs an update
+ ADD_INC_TO_POOL(sprintf("%sinc/profile-updte.php", constant('PATH')));
+ }
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_data`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_prices`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_users`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_rallye_data` (
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_data`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_prices`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_users`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_rallye_data` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
admin_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
title VARCHAR(255) NOT NULL DEFAULT '',
KEY (admin_id),
PRIMARY KEY (id)
) TYPE={!_TABLE_TYPE!}");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_rallye_prices` (
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_rallye_prices` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
rallye_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
price_level BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
KEY (rallye_id),
PRIMARY KEY(id)
) TYPE={!_TABLE_TYPE!}");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_rallye_users` (
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_rallye_users` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
rallye_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY(id)
) TYPE={!_TABLE_TYPE!}");
- // Admin menu
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye', NULL, 'Rallye-Management','Richten Sie neue Ref-Rallyes ein, die zeitgesteuert anfangen und aufhöhren. Dabei wird alles weitere automatisch geregelt.','9')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','add_rallye','Neue Rallye hinzufügen','Neue Ref-Rallye hinzufügen.','1')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','config_rallye_prices','Preise einrichten','Richten Sie Preise zu den Rallyes ein.','2')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','list_rallyes','Rallyes verwalten','Alle bestehenden Ref-Rallyes auflisten, bearbeiten, stoppen, löschen usw.','3')");
-
- // Guest menu
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','rallyes','Ref-Rallyes','Y','Y','9')");
-
- // Member menu
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','rallyes','Ref-Rallyes','Y','Y','9')");
- break;
-
-case 'remove': // Do stuff when removing extension
- // Drop tables
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_data`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_prices`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_users`");
-
- // Remove menus
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='rallye'");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='rallyes'");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='rallyes'");
-
- // Unregister filter
- UNREGISTER_FILTER('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', true, $dry_run);
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='rallyes' LIMIT 1");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='rallyes' LIMIT 1");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='rallyes' LIMIT 1");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='rallyes' LIMIT 1");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_data` ADD expired ENUM('Y','N') NOT NULL DEFAULT 'N'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Ablaufen der Rallyes intergriert.");
- break;
-
- case '0.0.2': // SQL queries for v0.0.2
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_users` ADD curr_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Aktueller {!POINTS!}-Stand wird beachtet.");
- break;
-
- case '0.0.6': // SQL queries for v0.0.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler <em>Unknown column 'd.useid' in 'on clause'</em> behoben.");
- break;
-
- case '0.0.7': // SQL queries for v0.0.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
- break;
+ // Admin menu
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye', NULL, 'Rallye-Management','Richten Sie neue Ref-Rallyes ein, die zeitgesteuert anfangen und aufhöhren. Dabei wird alles weitere automatisch geregelt.','9')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','add_rallye','Neue Rallye hinzufügen','Neue Ref-Rallye hinzufügen.','1')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','config_rallye_prices','Preise einrichten','Richten Sie Preise zu den Rallyes ein.','2')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','list_rallyes','Rallyes verwalten','Alle bestehenden Ref-Rallyes auflisten, bearbeiten, stoppen, löschen usw.','3')");
- case '0.0.8': // SQL queries for v0.0.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler <u>Template nicht gefunden</u> behoben und Admin-Formulare ausgelagert");
- break;
-
- case '0.0.9': // SQL queries for v0.0.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist. Und der vorherige Fehler <u>Template nicht gefunden</u> ist endlich beseitigt.");
- break;
-
- case '0.1.0': // SQL queries for v0.2.1
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_users` CHANGE curr_points curr_points FLOAT(23,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ // Guest menu
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','rallyes','Ref-Rallyes','Y','Y','9')");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert.");
+ // Member menu
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','rallyes','Ref-Rallyes','Y','Y','9')");
break;
- case '0.1.1': // SQL queries for v0.1.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
- break;
+ case 'remove': // Do stuff when removing extension
+ // Drop tables
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_data`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_prices`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_users`");
- case '0.1.2': // SQL queries for v0.1.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
- break;
+ // Remove menus
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='rallye'");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='rallyes'");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='rallyes'");
- case '0.1.3': // SQL queries for v0.1.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Anzeigefehler im Gast-/Mitgliedsbereich behoben.");
+ // Unregister filter
+ UNREGISTER_FILTER('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', true, $dry_run);
+ break;
+
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='rallyes' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='rallyes' LIMIT 1");
break;
- case '0.1.4': // SQL queries for v0.1.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Admin-Mails korregiert.");
- break;
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='rallyes' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='rallyes' LIMIT 1");
+ break;
+
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_data` ADD expired ENUM('Y','N') NOT NULL DEFAULT 'N'");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Ablaufen der Rallyes intergriert.");
+ break;
+
+ case '0.0.2': // SQL queries for v0.0.2
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_users` ADD curr_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Aktueller {!POINTS!}-Stand wird beachtet.");
+ break;
+
+ case '0.0.6': // SQL queries for v0.0.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler <em>Unknown column 'd.useid' in 'on clause'</em> behoben.");
+ break;
+
+ case '0.0.7': // SQL queries for v0.0.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
+ break;
+
+ case '0.0.8': // SQL queries for v0.0.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler <u>Template nicht gefunden</u> behoben und Admin-Formulare ausgelagert");
+ break;
+
+ case '0.0.9': // SQL queries for v0.0.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist. Und der vorherige Fehler <u>Template nicht gefunden</u> ist endlich beseitigt.");
+ break;
+
+ case '0.1.0': // SQL queries for v0.2.1
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_users` CHANGE curr_points curr_points FLOAT(23,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert.");
+ break;
+
+ case '0.1.1': // SQL queries for v0.1.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.1.2': // SQL queries for v0.1.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
+ break;
+
+ case '0.1.3': // SQL queries for v0.1.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Anzeigefehler im Gast-/Mitgliedsbereich behoben.");
+ break;
+
+ case '0.1.4': // SQL queries for v0.1.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Admin-Mails korregiert.");
+ break;
+
+ case '0.1.5': // SQL queries for v0.1.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+ break;
- case '0.1.5': // SQL queries for v0.1.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
- break;
-
- case '0.1.6': // SQL queries for v0.1.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
- break;
-
- case '0.1.7': // SQL queries for v0.1.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Aktivierte bzw. abgelaufene Rallyes werden nur ausserhalb des CSS-Modus geladen (wenn also nicht css.php aufgerufen wurde)");
- break;
-
- case '0.1.8': // SQL queries for v0.1.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Weitere Templates vom Admin-Bereich ausgelagert und Referal-Anazahl in der Mail zur Rallye-Ankündigung repariert.");
- break;
-
- case '0.1.9': // SQL queries for v0.1.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Funktion <u>generateUserProfileLink()</u> mit Verlinkung auf Referal-Liste implementiert.");
- break;
-
- case '0.2.0': // SQL queries for v0.2.0
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_data` ADD min_users BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_data` ADD min_prices BIGINT(20) UNSIGNED NOT NULL DEFAULT '3'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Ablaufen der Rallyes intergriert. Bauen Sie in Ihr Template <strong>templates/de/emails/member/member_rallye_notify.tpl</strong> folgende zwei Zeilen ein:<br />
+ case '0.1.6': // SQL queries for v0.1.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ break;
+
+ case '0.1.7': // SQL queries for v0.1.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Aktivierte bzw. abgelaufene Rallyes werden nur ausserhalb des CSS-Modus geladen (wenn also nicht css.php aufgerufen wurde)");
+ break;
+
+ case '0.1.8': // SQL queries for v0.1.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Weitere Templates vom Admin-Bereich ausgelagert und Referal-Anazahl in der Mail zur Rallye-Ankündigung repariert.");
+ break;
+
+ case '0.1.9': // SQL queries for v0.1.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Funktion <u>generateUserProfileLink()</u> mit Verlinkung auf Referal-Liste implementiert.");
+ break;
+
+ case '0.2.0': // SQL queries for v0.2.0
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_data` ADD min_users BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_rallye_data` ADD min_prices BIGINT(20) UNSIGNED NOT NULL DEFAULT '3'");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Ablaufen der Rallyes intergriert. Bauen Sie in Ihr Template <strong>templates/de/emails/member/member_rallye_notify.tpl</strong> folgende zwei Zeilen ein:<br />
<ul>
<li>$DATA[min_users]</li>
<li>$DATA[min_prices]</li>
<li><strong>guest_rallye_footer.tpl</strong></li>
<li><strong>guest_rallye_header.tpl</strong></li>
</ul>");
- break;
-
- case '0.2.1': // SQL queries for v0.2.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
- break;
-
- case '0.2.2': // SQL queries for v0.2.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Links wegen <strong>what=admins_contct</strong> geändert.");
- break;
-
- case '0.2.3': // SQL queries for v0.2.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
- break;
-
- case '0.2.4': // SQL queries for v0.2.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
- break;
-
- case '0.2.5': // SQL queries for v0.2.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Menüpunkt "Rallyes verwalten" repariert.");
- break;
-
- case '0.2.6': // SQL queries for v0.2.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Automatisches Starten von Referal-Rallyes repariert.");
- break;
-
- case '0.2.7': // SQL queries for v0.2.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fatalen Fehler beseitigt.");
- break;
-
- case '0.2.8': // SQL queries for v0.2.8
- // Update notes (these will be set as task text!)
-
- EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
- break;
-
- case '0.2.9': // SQL queries for v0.2.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle.");
- break;
-
- case '0.3.0': // SQL queries for v0.3.0
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt.");
- break;
-
- case '0.3.1': // SQL queries for v0.3.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Erweiterung für automatisch generierte Admin-Kontaktlinks geändert.");
- break;
-
- case '0.3.2': // SQL queries for v0.3.2
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='rals', `sort`='1', `title`='Referal-Rallye' WHERE `what`='rallyes' LIMIT 1");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut.");
- break;
-
- case '0.3.3': // SQL queries for v0.3.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Rallyes werden nun nur dann automatisch beseitigt, wenn die Erweiterung <strong>autopurge</strong> installiert und aktiviert ist.");
- break;
-
- case '0.3.4': // SQL queries for v0.3.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
- break;
-
- case '0.3.5': // SQL queries for 0.3.5
- // This update depends on sql_patches
- EXT_ADD_UPDATE_DEPENDS('sql_patches');
-
- // Register filter
- REGISTER_FILTER('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', false, true, $dry_run);
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Filter hinzugefügt und ist von <strong>sql_patches</strong> abhängig.");
- break;
- }
- break;
-
-case 'modify': // When the extension got modified
- break;
-
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
-
-default: // Do stuff when extension is loaded
- // Do stuff only when not in CSS mode
- if (($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != '-1') && ($GLOBALS['cache_mode'] != 'init')) {
- // Get total member count
- $total = GET_TOTAL_DATA('CONFIRMED', 'user_data', 'userid', 'status', true);
-
- // Add more data on higher versions
- $ADD1 = ''; $ADD2 = ''; $OR = '';
- if (GET_EXT_VERSION('rallye') >= '0.2.0') {
- $ADD1 = ", min_users, min_prices";
- $ADD2 = ", d.min_users, d.min_prices";
- $OR = " OR (d.min_users <= ".$total." AND d.min_users > 0)";
- } // END - if
-
- // Check for new started but not notified rallyes
- $result = SQL_QUERY("SELECT SQL_SMALL_RESULT id, title, start_time, end_time, send_notify".$ADD1."
+ break;
+
+ case '0.2.1': // SQL queries for v0.2.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+ break;
+
+ case '0.2.2': // SQL queries for v0.2.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Links wegen <strong>what=admins_contct</strong> geändert.");
+ break;
+
+ case '0.2.3': // SQL queries for v0.2.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+ break;
+
+ case '0.2.4': // SQL queries for v0.2.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ break;
+
+ case '0.2.5': // SQL queries for v0.2.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Menüpunkt "Rallyes verwalten" repariert.");
+ break;
+
+ case '0.2.6': // SQL queries for v0.2.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Automatisches Starten von Referal-Rallyes repariert.");
+ break;
+
+ case '0.2.7': // SQL queries for v0.2.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fatalen Fehler beseitigt.");
+ break;
+
+ case '0.2.8': // SQL queries for v0.2.8
+ // Update notes (these will be set as task text!)
+
+ EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
+ break;
+
+ case '0.2.9': // SQL queries for v0.2.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle.");
+ break;
+
+ case '0.3.0': // SQL queries for v0.3.0
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt.");
+ break;
+
+ case '0.3.1': // SQL queries for v0.3.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Erweiterung für automatisch generierte Admin-Kontaktlinks geändert.");
+ break;
+
+ case '0.3.2': // SQL queries for v0.3.2
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='rals', `sort`='1', `title`='Referal-Rallye' WHERE `what`='rallyes' LIMIT 1");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut.");
+ break;
+
+ case '0.3.3': // SQL queries for v0.3.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Rallyes werden nun nur dann automatisch beseitigt, wenn die Erweiterung <strong>autopurge</strong> installiert und aktiviert ist.");
+ break;
+
+ case '0.3.4': // SQL queries for v0.3.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+ break;
+
+ case '0.3.5': // SQL queries for 0.3.5
+ // This update depends on sql_patches
+ EXT_ADD_UPDATE_DEPENDS('sql_patches');
+
+ // Register filter
+ REGISTER_FILTER('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', false, true, $dry_run);
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Filter hinzugefügt und ist von <strong>sql_patches</strong> abhängig.");
+ break;
+ }
+ break;
+
+ case 'modify': // When the extension got modified
+ break;
+
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
+
+ default: // Do stuff when extension is loaded
+ // Do stuff only when not in CSS mode
+ if (($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != '-1') && ($GLOBALS['cache_mode'] != 'init')) {
+ // Get total member count
+ $total = GET_TOTAL_DATA('CONFIRMED', 'user_data', 'userid', 'status', true);
+
+ // Add more data on higher versions
+ $ADD1 = ''; $ADD2 = ''; $OR = '';
+ if (GET_EXT_VERSION('rallye') >= '0.2.0') {
+ $ADD1 = ", min_users, min_prices";
+ $ADD2 = ", d.min_users, d.min_prices";
+ $OR = " OR (d.min_users <= ".$total." AND d.min_users > 0)";
+ } // END - if
+
+ // Check for new started but not notified rallyes
+ $result = SQL_QUERY("SELECT SQL_SMALL_RESULT id, title, start_time, end_time, send_notify".$ADD1."
FROM `{!_MYSQL_PREFIX!}_rallye_data`
WHERE is_active='Y' AND notified='N' AND expired='N' AND start_time <= UNIX_TIMESTAMP() AND end_time > UNIX_TIMESTAMP()
LIMIT 1", __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 1) {
- // Start rallye
- RALLYE_AUTOSTART_RALLYES($result);
- } // END - if
+ if (SQL_NUMROWS($result) == 1) {
+ // Start rallye
+ RALLYE_AUTOSTART_RALLYES($result);
+ } // END - if
- // Free memory
- SQL_FREERESULT($result);
+ // Free memory
+ SQL_FREERESULT($result);
- // Check for expired rallyes
- $result = SQL_QUERY("SELECT SQL_SMALL_RESULT d.id, d.title, d.start_time, d.end_time, d.send_notify".$ADD2."
+ // Check for expired rallyes
+ $result = SQL_QUERY("SELECT SQL_SMALL_RESULT d.id, d.title, d.start_time, d.end_time, d.send_notify".$ADD2."
FROM `{!_MYSQL_PREFIX!}_rallye_data` AS d
WHERE d.is_active='Y' AND d.notified='Y' AND d.expired='N' AND (d.end_time <= UNIX_TIMESTAMP()".$OR.")
LIMIT 1", __FILE__, __LINE__);
- if ((SQL_NUMROWS($result) == 1) && (EXT_IS_ACTIVE('autopurge'))) {
- // End rallye here...
- RALLYE_EXPIRE_RALLYES($result);
- } // END - if
-
- // Free memory
- SQL_FREERESULT($result);
- } // END - if
- break;
+ if ((SQL_NUMROWS($result) == 1) && (EXT_IS_ACTIVE('autopurge'))) {
+ // End rallye here...
+ RALLYE_EXPIRE_RALLYES($result);
+ } // END - if
+
+ // Free memory
+ SQL_FREERESULT($result);
+ } // END - if
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_refs`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_refs` (
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_refs`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_refs` (
`id` BIGINT(20) UNSIGNED NOT NULL auto_increment,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`level` smallINT(6) UNSIGNED NOT NULL DEFAULT 0,
KEY (`level`),
KEY (`refid`)
) ENGINE={!_TABLE_TYPE!} COMMENT='User Referals With Refback'");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','refback','Ref-Back einstellen',4,'N','N')");
- break;
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','refback','Ref-Back einstellen',4,'N','N')");
+ break;
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_refs`");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='refback'");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN('config_refback','list_refback')");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_refsystem` SET level=level-1");
- break;
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_refs`");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='refback'");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN('config_refback','list_refback')");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_refsystem` SET level=level-1");
+ break;
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='refback' LIMIT 1");
- break;
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='refback' LIMIT 1");
+ break;
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='refback' LIMIT 1");
- break;
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='refback' LIMIT 1");
+ break;
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD refback_enabled ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD refback_min_perc TINYINT(3) NOT NULL DEFAULT 0");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD refback_max_perc TINYINT(3) NOT NULL DEFAULT 100");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_refback','Refback','Ändern Sie Einstellungen zum Refback, wie z.B. Minium- und Maximum-Prozente, was die Mitglieder einstellen dürfen.',15)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_refback','Refback auflisten','Refback aller Mitglieder auflisten.',15)");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD refback_enabled ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD refback_min_perc TINYINT(3) NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD refback_max_perc TINYINT(3) NOT NULL DEFAULT 100");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_refback','Refback','Ändern Sie Einstellungen zum Refback, wie z.B. Minium- und Maximum-Prozente, was die Mitglieder einstellen dürfen.',15)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_refback','Refback auflisten','Refback aller Mitglieder auflisten.',15)");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Refback-System ist nun ein-/ausschaltbar und minimale/maximale Refback-Prozente sind festlegbar.");
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Refback-System ist nun ein-/ausschaltbar und minimale/maximale Refback-Prozente sind festlegbar.");
+ break;
+ }
break;
- }
- break;
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- // When the refback is not installed we cannot load it's configuration... *sigh*
- break;
+ default: // Do stuff when extension is loaded
+ // When the refback is not installed we cannot load it's configuration... *sigh*
+ break;
}
// Shall we include special files?
if ($EXT_LOAD_MODE == 'register') {
// Execute this special file on this update
ADD_INC_TO_POOL(sprintf("%sinc/gen_refback.php",
- constant('PATH')
+ constant('PATH')
));
} // END - if
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_register'");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.1.0': // SQL queries for v0.1
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_must_register`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_must_register` (
-id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-field_name VARCHAR(255) NOT NULL DEFAULT '',
-field_required ENUM('Y','N') NOT NULL DEFAULT 'Y',
-PRIMARY KEY(id)
-) TYPE={!_TABLE_TYPE!}");
-
- // Add all entries as required (DO NOT DELETE THEM FROM DATABASE!)
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('surname','Y')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('family_name','Y')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('street_nr','Y')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('cntry','Y')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('zip','Y')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('city','Y')");
-
- // Add admin menu
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_register','Pflichtfelder','Stellen Sie hier die Pflichtfelder sowohl im Anmeldeformular, als auch im Mitgliedsbereich unter <strong>Profildaten ändern</strong> ein.', 12)");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Einstellbare Pflichtfelder hinzugefügt.");
- break;
-
- case '0.1.1': // SQL queries for v0.1.1
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE `ext_name`='register' AND ext_has_css='N' LIMIT 1");
-
- // This update depends on sql_patches update!
- EXT_ADD_UPDATE_DEPENDS('sql_patches');
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("CSS-Datei kann per Admin-Bereich ein- und ausgeschaltet werden.");
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.1.3': // SQL queries for v0.1.3
- // This update depends on sql_patches update!
- EXT_ADD_UPDATE_DEPENDS('sql_patches');
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Standart Referal-ID kann per Admin-Bereich eingestellt werden (war vorher nur in modules.php und index.php direkt eingebbar.)");
- break;
-
- case '0.1.4': // SQL queries for v0.1.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert.");
- break;
-
- case '0.1.5': // SQL queries for v0.1.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Konfiguration der Pflichtangaben ausgelagert in Template");
- break;
-
- case '0.1.6': // SQL queries for v0.1.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
- break;
-
- case '0.1.7': // SQL queries for v0.1.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_register'");
break;
- case '0.1.8': // SQL queries for v0.1.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.1.9': // SQL queries for v0.1.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Pflichtfelder wieder eingebaut (waren irgentwie ausgebaut???)");
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.2.0': // SQL queries for v0.2.0
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
- break;
-
- case '0.2.1': // SQL queries for v0.2.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
- break;
-
- case '0.2.2': // SQL queries for v0.2.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sämtliche Sperren bei eingeloggten Admin deaktiviert.");
- break;
-
- case '0.2.3': // SQL queries for v0.2.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Cookie <u>refid</u> aus Anmeldeformular entfernt.");
- break;
-
- case '0.2.4': // SQL queries for v0.2.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut.");
- break;
-
- case '0.2.5': // SQL queries for v0.2.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
- break;
-
- case '0.2.6': // SQL queries for v0.2.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt.");
- break;
-
- case '0.2.7': // SQL queries for v0.2.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Referal-ID wird endlich korrekt gesetzt.");
- break;
-
- case '0.2.8': // SQL queries for v0.2.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Parse error in <u>what-register.php</u> beseitigt.");
- break;
-
- case '0.2.9': // SQL queries for v0.2.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Anrede "Firma" hinzugefügt.");
- break;
-
- case '0.3.0': // SQL queries for v0.3.0
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
- break;
-
- case '0.3.1': // SQL queries for v0.3.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Email-Adresse wird vor dem Speichern auf G¨tigkeit hin getestet.");
- break;
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.1.0': // SQL queries for v0.1
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_must_register`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_must_register` (
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+field_name VARCHAR(255) NOT NULL DEFAULT '',
+field_required ENUM('Y','N') NOT NULL DEFAULT 'Y',
+PRIMARY KEY(id)
+) TYPE={!_TABLE_TYPE!}");
- case '0.3.2': // SQL queries for v0.3.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Einbindung der Erweiterung <strong>country</strong>, die Sie sich noch optional von <a href=\"{!URL!}/modules.php?module=admin&what=extensions&do=search\">meiner Seite herunterladen</a> müssen.<br />
+ // Add all entries as required (DO NOT DELETE THEM FROM DATABASE!)
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('surname','Y')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('family_name','Y')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('street_nr','Y')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('cntry','Y')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('zip','Y')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_must_register` (field_name, field_required) VALUES ('city','Y')");
+
+ // Add admin menu
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_register','Pflichtfelder','Stellen Sie hier die Pflichtfelder sowohl im Anmeldeformular, als auch im Mitgliedsbereich unter <strong>Profildaten ändern</strong> ein.', 12)");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Einstellbare Pflichtfelder hinzugefügt.");
+ break;
+
+ case '0.1.1': // SQL queries for v0.1.1
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE `ext_name`='register' AND ext_has_css='N' LIMIT 1");
+
+ // This update depends on sql_patches update!
+ EXT_ADD_UPDATE_DEPENDS('sql_patches');
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("CSS-Datei kann per Admin-Bereich ein- und ausgeschaltet werden.");
+ break;
+
+ case '0.1.3': // SQL queries for v0.1.3
+ // This update depends on sql_patches update!
+ EXT_ADD_UPDATE_DEPENDS('sql_patches');
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Standart Referal-ID kann per Admin-Bereich eingestellt werden (war vorher nur in modules.php und index.php direkt eingebbar.)");
+ break;
+
+ case '0.1.4': // SQL queries for v0.1.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert.");
+ break;
+
+ case '0.1.5': // SQL queries for v0.1.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Konfiguration der Pflichtangaben ausgelagert in Template");
+ break;
+
+ case '0.1.6': // SQL queries for v0.1.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.1.7': // SQL queries for v0.1.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.1.8': // SQL queries for v0.1.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.1.9': // SQL queries for v0.1.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Pflichtfelder wieder eingebaut (waren irgentwie ausgebaut???)");
+ break;
+
+ case '0.2.0': // SQL queries for v0.2.0
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
+ break;
+
+ case '0.2.1': // SQL queries for v0.2.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+ break;
+
+ case '0.2.2': // SQL queries for v0.2.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sämtliche Sperren bei eingeloggten Admin deaktiviert.");
+ break;
+
+ case '0.2.3': // SQL queries for v0.2.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Cookie <u>refid</u> aus Anmeldeformular entfernt.");
+ break;
+
+ case '0.2.4': // SQL queries for v0.2.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut.");
+ break;
+
+ case '0.2.5': // SQL queries for v0.2.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ break;
+
+ case '0.2.6': // SQL queries for v0.2.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt.");
+ break;
+
+ case '0.2.7': // SQL queries for v0.2.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Referal-ID wird endlich korrekt gesetzt.");
+ break;
+
+ case '0.2.8': // SQL queries for v0.2.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Parse error in <u>what-register.php</u> beseitigt.");
+ break;
+
+ case '0.2.9': // SQL queries for v0.2.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Anrede "Firma" hinzugefügt.");
+ break;
+
+ case '0.3.0': // SQL queries for v0.3.0
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+ break;
+
+ case '0.3.1': // SQL queries for v0.3.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Email-Adresse wird vor dem Speichern auf G¨tigkeit hin getestet.");
+ break;
+
+ case '0.3.2': // SQL queries for v0.3.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Einbindung der Erweiterung <strong>country</strong>, die Sie sich noch optional von <a href=\"{!URL!}/modules.php?module=admin&what=extensions&do=search\">meiner Seite herunterladen</a> müssen.<br />
<br />
<strong>Wichtig: Laden Sie noch das Template <strong>guest_register.tpl</strong> mit hoch, welches unter templates/".getLanguage()."/html/guest/ zu finden ist!</strong>");
- // Depends on 'country'
- EXT_ADD_UPDATE_DEPENDS('country');
- break;
-
- case '0.3.3': // SQL queries for v0.3.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Es werden dem Mitglied nur aktivierte Ländercodes zur Auswahl angeboten.");
- break;
-
- case '0.3.4': // SQL queries for v0.3.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Auf Grund der Integration der neue Erweiterung <strong>country</strong> in die Anmeldephase klappte die Anmeldung nicht. Die dazu nütige Verknüpfung ist nun eingebaut und die Anmeldung klappt wieder. Vielen Dank nochmals an den Bug-Reporter (Fehlermelder)!");
- break;
-
- case '0.3.5': // SQL queries for v0.3.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Design wird nach Anmeldung auch endlich im Mitgliedsmenü übernommen.");
- break;
-
- case '0.3.6': // SQL queries for v0.3.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlermeldung <strong>Fatal error: Call to undefined function: get_theme() in /../../guest/what-register.php on line 190</strong> beseitigt.");
- break;
-
- case '0.3.7': // SQL queries for v0.3.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlermeldung <strong>Fatal error: Call to undefined function: get_curr_theme<u>e</u>() in /../../guest/what-register.php on line 190</strong> beseitigt.");
- break;
-
- case '0.3.8': // SQL queries for v0.3.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Weitere SQL-Befehle abgesichert.");
- break;
-
- case '0.3.9': // SQL queries for v0.3.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
- break;
-
- case '0.4.0': // SQL queries for v0.4.0
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
- break;
-
- case '0.4.1': // SQL queries for v0.4.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
- break;
-
- case '0.4.2': // SQL queries for v0.4.2
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD register_default ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='config_register2' WHERE `what`='config_reg' LIMIT 1");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Bei der Anmeldung kann die Standart-Auswahl zwischen Ja/Nein umgeschaltet werden. Das Ändern des Templates <strong>templates/".getLanguage()."/html/guest/guest_register.tpl</strong> ist nicht mehr nötig.");
- break;
-
- case '0.4.3': // SQL queries for v0.4.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Parser-Error in <strong>inc/modules/guest/what-register.php</strong> beseitigt.");
- break;
-
- case '0.4.4': // SQL queries for v0.4.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Anmeldefehler (EMail-Adresse war immer ein Ausrufezeichen) beseitigt.");
- break;
-
- case '0.4.5': // SQL queries for v0.4.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt.");
- break;
-
- case '0.4.6': // SQL queries for v0.4.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Einstellung nach {!POINTS!}-Einstellungen verlagert.");
- break;
-
- case '0.4.7': // SQL queries for v0.4.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("<strong>setSession()</strong> mit @-Zeichen gegen ungewollte Ausgaben abgesichert.");
- break;
-
- case '0.4.8': // SQL queries for v0.4.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.");
- break;
-
- case '0.4.9': // SQL queries for v0.4.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Problem mit nicht anzeigbaren Kategorien in der Anmeldung beseitigt.");
- break;
-
- case '0.5.0': // SQL queries for v0.5.0
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlermeldung <em><strong>Fatal error:</strong> Call to undefined function registerGenerateCategoryTable() in <strong>{!PATH!}/inc/modules/guest/what-register.php</strong> on line <strong>434</strong></em> beseitigt.");
- break;
-
- case '0.5.1': // SQL queries for v0.5.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Mail-Template <strong>register-member.tpl</strong> gefixt. Danke an <a href=\"http://forum.mxchange.org/profile-59.html\" target=\"_blank\" title=\"Mitgliedsprofil aufrufen\">wliepe</a> für die Fehlerfindung!");
- break;
-
- case '0.5.2': // SQL queries for v0.5.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
- break;
- }
- break;
-
-case 'modify': // When the extension got modified
- break;
-
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
-
-default: // Do stuff when extension is loaded
- break;
+ // Depends on 'country'
+ EXT_ADD_UPDATE_DEPENDS('country');
+ break;
+
+ case '0.3.3': // SQL queries for v0.3.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Es werden dem Mitglied nur aktivierte Ländercodes zur Auswahl angeboten.");
+ break;
+
+ case '0.3.4': // SQL queries for v0.3.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Auf Grund der Integration der neue Erweiterung <strong>country</strong> in die Anmeldephase klappte die Anmeldung nicht. Die dazu nütige Verknüpfung ist nun eingebaut und die Anmeldung klappt wieder. Vielen Dank nochmals an den Bug-Reporter (Fehlermelder)!");
+ break;
+
+ case '0.3.5': // SQL queries for v0.3.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Design wird nach Anmeldung auch endlich im Mitgliedsmenü übernommen.");
+ break;
+
+ case '0.3.6': // SQL queries for v0.3.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlermeldung <strong>Fatal error: Call to undefined function: get_theme() in /../../guest/what-register.php on line 190</strong> beseitigt.");
+ break;
+
+ case '0.3.7': // SQL queries for v0.3.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlermeldung <strong>Fatal error: Call to undefined function: get_curr_theme<u>e</u>() in /../../guest/what-register.php on line 190</strong> beseitigt.");
+ break;
+
+ case '0.3.8': // SQL queries for v0.3.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Weitere SQL-Befehle abgesichert.");
+ break;
+
+ case '0.3.9': // SQL queries for v0.3.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ break;
+
+ case '0.4.0': // SQL queries for v0.4.0
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ break;
+
+ case '0.4.1': // SQL queries for v0.4.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Vorbereitung auf die neue Mediendaten v0.0.4.");
+ break;
+
+ case '0.4.2': // SQL queries for v0.4.2
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD register_default ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='config_register2' WHERE `what`='config_reg' LIMIT 1");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Bei der Anmeldung kann die Standart-Auswahl zwischen Ja/Nein umgeschaltet werden. Das Ändern des Templates <strong>templates/".getLanguage()."/html/guest/guest_register.tpl</strong> ist nicht mehr nötig.");
+ break;
+
+ case '0.4.3': // SQL queries for v0.4.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Parser-Error in <strong>inc/modules/guest/what-register.php</strong> beseitigt.");
+ break;
+
+ case '0.4.4': // SQL queries for v0.4.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Anmeldefehler (EMail-Adresse war immer ein Ausrufezeichen) beseitigt.");
+ break;
+
+ case '0.4.5': // SQL queries for v0.4.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt.");
+ break;
+
+ case '0.4.6': // SQL queries for v0.4.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Einstellung nach {!POINTS!}-Einstellungen verlagert.");
+ break;
+
+ case '0.4.7': // SQL queries for v0.4.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("<strong>setSession()</strong> mit @-Zeichen gegen ungewollte Ausgaben abgesichert.");
+ break;
+
+ case '0.4.8': // SQL queries for v0.4.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.");
+ break;
+
+ case '0.4.9': // SQL queries for v0.4.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Problem mit nicht anzeigbaren Kategorien in der Anmeldung beseitigt.");
+ break;
+
+ case '0.5.0': // SQL queries for v0.5.0
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlermeldung <em><strong>Fatal error:</strong> Call to undefined function registerGenerateCategoryTable() in <strong>{!PATH!}/inc/modules/guest/what-register.php</strong> on line <strong>434</strong></em> beseitigt.");
+ break;
+
+ case '0.5.1': // SQL queries for v0.5.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Mail-Template <strong>register-member.tpl</strong> gefixt. Danke an <a href=\"http://forum.mxchange.org/profile-59.html\" target=\"_blank\" title=\"Mitgliedsprofil aufrufen\">wliepe</a> für die Fehlerfindung!");
+ break;
+
+ case '0.5.2': // SQL queries for v0.5.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+ break;
+ }
+ break;
+
+ case 'modify': // When the extension got modified
+ break;
+
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
+
+ default: // Do stuff when extension is loaded
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_anon_ip` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_anon_host` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_anon_ua` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_anon_ref` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_admin_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_guest_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_member_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_sponsor_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `anonymous_ip` ENUM('127.0.0.1','0.0.0.0','RANDOM') NOT NULL DEFAULT '127.0.0.1'");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_removeip','Anonymität/Privatsphähre','Stellen Sie hier ein, ob die IP-Nummer, User-Agent und/oder Referer-Adresse anonymisiert im gesamten Script verwendet werden soll.',15)");
- break;
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_anon_ip` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_anon_host` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_anon_ua` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_anon_ref` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_admin_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_guest_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_member_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `removeip_sponsor_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `anonymous_ip` ENUM('127.0.0.1','0.0.0.0','RANDOM') NOT NULL DEFAULT '127.0.0.1'");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_removeip','Anonymität/Privatsphähre','Stellen Sie hier ein, ob die IP-Nummer, User-Agent und/oder Referer-Adresse anonymisiert im gesamten Script verwendet werden soll.',15)");
+ break;
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_removeip'");
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_removeip'");
- // Remove filters
- UNREGISTER_FILTER('post_youhere_line', 'ADD_ANONYMITY_NOTICE', true, $dry_run);
- break;
+ // Remove filters
+ UNREGISTER_FILTER('post_youhere_line', 'ADD_ANONYMITY_NOTICE', true, $dry_run);
+ break;
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- break;
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ break;
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- break;
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ break;
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- // Update depends on sql_patches
- EXT_ADD_UPDATE_DEPENDS('sql_patches');
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ // Update depends on sql_patches
+ EXT_ADD_UPDATE_DEPENDS('sql_patches');
- // Add filters
- REGISTER_FILTER('post_youhere_line', 'ADD_ANONYMITY_NOTICE', false, true, $dry_run);
+ // Add filters
+ REGISTER_FILTER('post_youhere_line', 'ADD_ANONYMITY_NOTICE', false, true, $dry_run);
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Filter hinzugefügt und ist von <strong>sql_patches</strong> abhängig.");
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Filter hinzugefügt und ist von <strong>sql_patches</strong> abhängig.");
+ break;
+ }
break;
- }
- break;
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair', NULL, 'Reperaturen','7','Repariert u.a. die Kategorie-Auswahlen der Mitglieder usw.')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_cats','Kategorieauswahlen','1','Repariert die Kategorieauswahlen Ihrer Mitglieder.')");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='repair'");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.1.0': // SQL queries for v0.1
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_amnu','Admin-Menü', 2, 'Repariert die Gewichtung des Admin-Menü-Systems')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_gmnu','Gast-Menü', 3, 'Repariert die Gewichtung des Gäste-Menü-Systems')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_mmnu','Mitglied-Menü', 4, 'Repariert die Gewichtung des Mitglieder-Menü-Systems')");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fügt ein Menüpunkt zur Reperatur der Gewichtung des Admin-Menüs hinzu.");
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair', NULL, 'Reperaturen','7','Repariert u.a. die Kategorie-Auswahlen der Mitglieder usw.')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_cats','Kategorieauswahlen','1','Repariert die Kategorieauswahlen Ihrer Mitglieder.')");
break;
- case '0.1.1': // SQL queries for v0.1.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Dummy-Release im Intranet??? Hmmmm....");
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='repair'");
break;
- case '0.1.2': // SQL queries for v0.1.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.1.3': // SQL queries for v0.1.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Ungütiges Update nach neuster Konvention (Erweiterung <strong>menu</strong> ist ung&uum;ltig).");
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.1.4': // SQL queries for v0.1.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.1.0': // SQL queries for v0.1
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_amnu','Admin-Menü', 2, 'Repariert die Gewichtung des Admin-Menü-Systems')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_gmnu','Gast-Menü', 3, 'Repariert die Gewichtung des Gäste-Menü-Systems')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('repair','repair_mmnu','Mitglied-Menü', 4, 'Repariert die Gewichtung des Mitglieder-Menü-Systems')");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fügt ein Menüpunkt zur Reperatur der Gewichtung des Admin-Menüs hinzu.");
+ break;
+
+ case '0.1.1': // SQL queries for v0.1.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Dummy-Release im Intranet??? Hmmmm....");
+ break;
+
+ case '0.1.2': // SQL queries for v0.1.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ break;
+
+ case '0.1.3': // SQL queries for v0.1.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Ungütiges Update nach neuster Konvention (Erweiterung <strong>menu</strong> ist ung&uum;ltig).");
+ break;
+
+ case '0.1.4': // SQL queries for v0.1.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+ break;
+
+ case '0.1.5': // SQL queries for v0.1.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle.");
+ break;
+
+ case '0.1.6': // SQL queries for v0.1.6
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='repair_amnu' WHERE `what`='repair_amenu' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='repair_gmnu' WHERE `what`='repair_gmenu' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='repair_mmnu' WHERE `what`='repair_mmenu' LIMIT 1");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Scripte umbenannt, damit diese nicht mit <u>ext-menu</u> konfliktieren");
+ break;
+ }
break;
- case '0.1.5': // SQL queries for v0.1.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle.");
- break;
-
- case '0.1.6': // SQL queries for v0.1.6
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='repair_amnu' WHERE `what`='repair_amenu' LIMIT 1");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='repair_gmnu' WHERE `what`='repair_gmenu' LIMIT 1");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='repair_mmnu' WHERE `what`='repair_mmenu' LIMIT 1");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Scripte umbenannt, damit diese nicht mit <u>ext-menu</u> konfliktieren");
- break;
- }
- break;
-
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // Check if mod_rewrite is loadeded
- if (!isApacheModuleLoaded('mod_rewrite')){
- EXT_SET_REPORTS_FAILURE(true);
- addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR'));
- } // END - if
-
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_rewrite'");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // Check if mod_rewrite is loadeded
- if (!isApacheModuleLoaded('mod_rewrite')) {
- SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET `ext_active`='N' WHERE `ext_name`='rewrite' LIMIT 1", __FILE__, __LINE__);
- EXT_SET_REPORTS_FAILURE(true);
- addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR'));
- } // END - if
-
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Folgende Linkvariablen werden nun auch ausgetauscht: bid, mid, url, page, offset");
- break;
-
- case '0.0.2': // SQL queries for v0.0.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Folgende Linkvariablen werden nun auch ausgetauscht: type, do=search");
-
- case '0.0.3': // SQL queries for v0.0.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("URLs zu MXChange.org ({!SERVER_URL!}) sind nun auch wieder gültig.");
- break;
-
- case '0.0.4': // SQL queries for v0.0.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Folgende Linkvariablen werden nun auch ausgetausch: sub, home");
- break;
-
- case '0.0.5': // SQL queries for v0.0.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Links im Admin- und Mitgliedsbereich werden nicht mehr umgeschrieben. Entsprechend fällt die neue .htaccess-Datei kleiner aus. Bitte anpassen!");
-
- case '0.0.6': // SQL queries for v0.0.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Links im Frametester-Modul werden nicht mehr umgeschrieben.");
- break;
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // Check if mod_rewrite is loadeded
+ if (!isApacheModuleLoaded('mod_rewrite')){
+ EXT_SET_REPORTS_FAILURE(true);
+ addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR'));
+ } // END - if
- case '0.0.7': // SQL queries for v0.0.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.0.8': // SQL queries for v0.0.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_rewrite'");
break;
- case '0.0.9': // SQL queries for v0.0.9
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD rewrite_skip VARCHAR(255) NOT NULL DEFAULT 'login:admin:frametester:mailid'");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_rewrite','Rewrite-Engine','Stellen Sie hier ein, welche Module übersprungen werden sollen, in denen also kein Umschreiben des HTML-Codes stattfinden soll.', 8)");
+ case 'activate': // Do stuff when admin activates this extension
+ // Check if mod_rewrite is loadeded
+ if (!isApacheModuleLoaded('mod_rewrite')) {
+ SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET `ext_active`='N' WHERE `ext_name`='rewrite' LIMIT 1", __FILE__, __LINE__);
+ EXT_SET_REPORTS_FAILURE(true);
+ addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR'));
+ } // END - if
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Zu überspringende Module können per Admin-Bereich eingestellt werden.");
- break;
+ // SQL commands to run
+ ADD_EXT_SQL('');
+ break;
- case '0.1.0': // SQL queries for v0.2.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.1.1': // SQL queries for v0.1.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Folgende Linkvariablen werden nun auch ausgetauscht: bid, mid, url, page, offset");
+ break;
+
+ case '0.0.2': // SQL queries for v0.0.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Folgende Linkvariablen werden nun auch ausgetauscht: type, do=search");
+
+ case '0.0.3': // SQL queries for v0.0.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("URLs zu MXChange.org ({!SERVER_URL!}) sind nun auch wieder gültig.");
+ break;
+
+ case '0.0.4': // SQL queries for v0.0.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Folgende Linkvariablen werden nun auch ausgetausch: sub, home");
+ break;
+
+ case '0.0.5': // SQL queries for v0.0.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Links im Admin- und Mitgliedsbereich werden nicht mehr umgeschrieben. Entsprechend fällt die neue .htaccess-Datei kleiner aus. Bitte anpassen!");
+
+ case '0.0.6': // SQL queries for v0.0.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Links im Frametester-Modul werden nicht mehr umgeschrieben.");
+ break;
+
+ case '0.0.7': // SQL queries for v0.0.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.0.8': // SQL queries for v0.0.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.0.9': // SQL queries for v0.0.9
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD rewrite_skip VARCHAR(255) NOT NULL DEFAULT 'login:admin:frametester:mailid'");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_rewrite','Rewrite-Engine','Stellen Sie hier ein, welche Module übersprungen werden sollen, in denen also kein Umschreiben des HTML-Codes stattfinden soll.', 8)");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Zu überspringende Module können per Admin-Bereich eingestellt werden.");
+ break;
+
+ case '0.1.0': // SQL queries for v0.2.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+ break;
+
+ case '0.1.1': // SQL queries for v0.1.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+ break;
+
+ case '0.1.2': // SQL queries for v0.1.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ break;
+ case '0.1.3':
+ // Check if mod_rewrite is loadeded
+ if (!isApacheModuleLoaded('mod_rewrite')){
+ EXT_SET_REPORTS_FAILURE(true);
+ //addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR'));
+ } // END - if
+ EXT_SET_UPDATE_NOTES("Es wird beim Registrieren und aktivieren geprüft, ob im Apache das Modul mod_rewrite geladen wurde. Wenn mod_rewrite nicht gefunden werden konnte, wird abgebrochen.");
+ break;
+ }
break;
- case '0.1.2': // SQL queries for v0.1.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
- break;
- case '0.1.3':
- // Check if mod_rewrite is loadeded
- if (!isApacheModuleLoaded('mod_rewrite')){
- EXT_SET_REPORTS_FAILURE(true);
- //addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR'));
- } // END - if
- EXT_SET_UPDATE_NOTES("Es wird beim Registrieren und aktivieren geprüft, ob im Apache das Modul mod_rewrite geladen wurde. Wenn mod_rewrite nicht gefunden werden konnte, wird abgebrochen.");
- break;
- }
- break;
-
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- // Check if mod_rewrite is loadeded
- if (!isApacheModuleLoaded('mod_rewrite')){
- EXT_SET_REPORTS_FAILURE(true);
- SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET `ext_active`='N' WHERE `ext_name`='rewrite' LIMIT 1", __FILE__, __LINE__);
- if (!IS_ADMIN()) addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR'));
- } // END - if
- break;
+ default: // Do stuff when extension is loaded
+ // Check if mod_rewrite is loadeded
+ if (!isApacheModuleLoaded('mod_rewrite')){
+ EXT_SET_REPORTS_FAILURE(true);
+ SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET `ext_active`='N' WHERE `ext_name`='rewrite' LIMIT 1", __FILE__, __LINE__);
+ if (!IS_ADMIN()) addFatalMessage(__FILE__, __LINE__, getMessage('MOD_REWRITE_ERROR'));
+ } // END - if
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- break;
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ break;
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- break;
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ break;
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- break;
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ break;
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- break;
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ break;
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- ADD_EXT_SQL("");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ ADD_EXT_SQL('');
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("");
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES('');
+ break;
+ }
break;
- }
- break;
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- //
- // SQL commands to run
- //
- // Try to make it depend on repair
- EXT_ADD_UPDATE_DEPENDS('repair');
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ //
+ // SQL commands to run
+ //
+ // Try to make it depend on repair
+ EXT_ADD_UPDATE_DEPENDS('repair');
- //
- // Sponsor data
- //
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_data`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_data` (
+ //
+ // Sponsor data
+ //
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_data`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_data` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
company VARCHAR(255) NOT NULL DEFAULT '',
position VARCHAR(255) NOT NULL DEFAULT '',
KEY(email),
PRIMARY KEY(id)
)TYPE={!_TABLE_TYPE!}");
- //
- // Sponsor orders
- //
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_orders`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_orders` (
+ //
+ // Sponsor orders
+ //
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_orders`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_orders` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
aid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
KEY (sponsorid),
PRIMARY KEY(id)
)TYPE={!_TABLE_TYPE!}");
- //
- // Pay-types
- //
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_paytypes`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_paytypes` (
+ //
+ // Pay-types
+ //
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_paytypes`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_paytypes` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
pay_name VARCHAR(255) NOT NULL DEFAULT '',
pay_rate FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
pay_currency VARCHAR(255) NOT NULL DEFAULT '€',
PRIMARY KEY(id)
)TYPE={!_TABLE_TYPE!}");
- //
- // Points-to-action converting
- //
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_action_convert`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_action_convert` (
+ //
+ // Points-to-action converting
+ //
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_action_convert`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_action_convert` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
ext_name VARCHAR(255) NOT NULL DEFAULT 'sponsor',
conv_rate BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
KEY (ext_name),
PRIMARY KEY(id)
)TYPE={!_TABLE_TYPE!}");
- //
- // Sponsor menu system (default)
- //
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_menu`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_menu` (
+ //
+ // Sponsor menu system (default)
+ //
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_menu`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_menu` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
action VARCHAR(255) NOT NULL DEFAULT '',
what VARCHAR(255) NULL DEFAULT NULL,
UNIQUE KEY (what),
PRIMARY KEY(id)
)TYPE={!_TABLE_TYPE!}");
- //
- // Registry for performable actions by your sponsors
- //
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_registry`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_registry` (
+ //
+ // Registry for performable actions by your sponsors
+ //
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_registry`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_registry` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
aid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
ext_name VARCHAR(255) NOT NULL DEFAULT 'sponsor',
KEY(aid),
PRIMARY KEY(id)
)TYPE={!_TABLE_TYPE!}");
- //
- // URLs from the sponsors
- //
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_urls`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_urls` (
+ //
+ // URLs from the sponsors
+ //
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_urls`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_urls` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
url VARCHAR(255) NOT NULL DEFAULT 'http://',
KEY(sponsorid),
PRIMARY KEY(id)
)TYPE={!_TABLE_TYPE!}");
- //
- // Banners of any size from the sponsors
- //
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_banner`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_banner` (
+ //
+ // Banners of any size from the sponsors
+ //
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_banner`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_banner` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
url VARCHAR(255) NOT NULL DEFAULT 'http://',
KEY(sponsorid),
PRIMARY KEY(id)
)TYPE={!_TABLE_TYPE!}");
- //
- // Campaigns
- //
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaigns`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_campaigns` (
+ //
+ // Campaigns
+ //
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaigns`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_campaigns` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
aid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
KEY(sponsorid),
PRIMARY KEY(id)
)TYPE={!_TABLE_TYPE!}");
- //
- // Campaigns + URLs + Banner
- //
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaign_assigns`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_campaign_assigns` (
+ //
+ // Campaigns + URLs + Banner
+ //
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaign_assigns`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_campaign_assigns` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
campaignid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
urlid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
KEY(campaignid),
PRIMARY KEY(id)
)TYPE={!_TABLE_TYPE!}");
- //
- // Allowed data to display (administrative)
- //
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_admin_data`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_admin_data` (
+ //
+ // Allowed data to display (administrative)
+ //
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_admin_data`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_admin_data` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
data_row VARCHAR(255) NOT NULL DEFAULT '',
display ENUM('Y','N') NOT NULL DEFAULT 'N',
PRIMARY KEY(id)
)TYPE={!_TABLE_TYPE!}");
- //
- // Allowed data to display (sponsor-side)
- //
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_display_data`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_display_data` (
+ //
+ // Allowed data to display (sponsor-side)
+ //
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_display_data`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_sponsor_display_data` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
sponsorid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
data_row VARCHAR(255) NOT NULL DEFAULT '',
KEY(sponsorid),
PRIMARY KEY(id)
)TYPE={!_TABLE_TYPE!}");
- //
- // Default allowed data to display
- //
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('id','N')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('company','Y')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('position','N')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('tax_ident','N')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('gender','N')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('surname','N')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('family','N')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('street_nr1','Y')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('street_nr2','Y')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('zip','Y')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('city','Y')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('country','Y')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('phone','Y')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('fax','Y')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('email','Y')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('url','N')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('password','N')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('remote_addr','N')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('sponsor_created','N')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_online','N')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_change','N')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('status','N')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('receive_warnings','N')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('warning_interval','N')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('points_amount','N')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('points_used','N')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('refid','N')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('ref_count','N')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('hash','N')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_pay','N')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_curr','N')");
- //
- // Add default entries
- //
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_registry` (ext_name, is_active, aid, stamp_added) VALUES ('sponsor','N',".getCurrentAdminId().",UNIX_TIMESTAMP())");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_action_convert` (ext_name, conv_rate, conv_name) VALUES ('sponsor','10','Mails')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Standart-Paket', 5, 1000.00000, '€')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Spar-Paket', 1, 200.00000, '€')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Power-Paket', 10, 2000.00000, '€')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Sponsor-Paket', 20, 4000.00000, '€')");
- //
- // Admin menu
- //
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor', NULL, 'Sponsorenbereich','Den Sponsorenbereich verwalten. Hier können Sie auch Sonderaktionen seperat deakvieren oder wieder aktivieren, Sponsorenaccounts verwalten usw.', 7)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','add_sponsor','Neuer Sponsor','Neues Sponsorenaccount hinzufügen.', 1)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','unlock_sponsor','Sponsor freischalten','Sponsorenaccounts freigeben / sperren.', 2)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor','Sponsoren auflisten','Listet alle verfügbaren Sponsorenaccounts auf.', 3)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','edit_sponsor','Sponsor ändern','Sponsorenaccount ändern (Grundaten, nicht Freigabe!).', 4)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','lock_sponsor','Sponsor ent-/sperren','Sponsorenaccount sperren und entsperren.', 5)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','del_sponsor','Sponsor löschen','Sponsorenaccount löschen.', 6)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','allow_sponsor_data','Datenverwaltung','Stellen Sie hier ein, welche Daten der Sponsor im Mitgliedsbereich über sicht anzeigen darf und welche nicht.', 7)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_pays','Bestellungen...','Bestellungen der Sponsoren auflisten / bearbeiten.', 8)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_menu','Sponsorenmenü','Das Sponsorenmenü kann hier geändert werden.', 9)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_campaigns','Kampagnen...','Verwaltung aller von Ihren Sponsoren eingerichteten Kampagnen.', 10)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_urls','URL-Verwaltung','Verwaltung (freischalten, sperren, löschen, testen, bearbeiten usw.) von gebuchten URLs.', 11)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_banner','Banner-Verwaltung','Verwaltung (freischalten, sperren, löschen, testen, bearbeiten usw.) von gebuchten Bannern.', 12)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_reg','Sponsor-Aktionen','Alle Sponsor-Aktionen auflisten und verwalten.', 13)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_pay','Buchungspakete','Die Sponsoren können sich {!POINTS!}-Pakete kaufen. Hier können Sie diese verwalten.', 14)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_conv','{!POINTS!} umwandeln...','Mit den vom Sponsor gekauften {!POINTS!} kann er Aktionen buchen. Hier stellen Sie die Umrechnungsrate von {!POINTS!} nach Sponsoraktionen um. Beispiel: 1 {!POINTS!} = 10 Mails.', 15)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','config_sponsor','Einstellungen','Allgemeine Einstellungen am Sponsoring-System.', 16)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('repair','repr_sponsor','Sponsormenü','Gewichtung des Sponsormenüs reparieren.', 5)");
- //
- // Menu system (still admin menu)
- //
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','sponsor_medit','Sponsor-Menü editieren','Hier können Sie das Sponsorenmenü verändern: Positionen verändern, Menütitel ändern usw.', 7)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','sponsor_madd','Sponsor-Menü hinzufügen','Hier können Sie einen neuen Menüpunkt hinzufügen (falls Sie z.B. eigene Sponsoraktionen entwickelt haben oder welche versehendlich gelöscht haben.', 8)");
- //
- // Guest menu
- //
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor', NULL, 'Sponsoren', 2)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_reg','Anmeldung', 1)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_login','Einloggen', 2)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_infos','Infos/Preise', 3)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_agb','AGBs', 4)");
- //
- // Member menu
- //
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`) VALUES ('main','sponsor','Unsere Sponsoren', 8)");
- //
- // Add default menus to sponsor menu
- //
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main', NULL, 'Hauptauswahl','N', 1)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','welcome','Willkommen','N', 1)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','account','Ihr Account','N', 2)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','campaigns','Kampagnen','N', 3)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','list_urls','URL-Verwaltung','N', 4)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','list_banner','Banner-Verwaltung','N', 5)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','settings','Einstellungen','N', 6)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','fillup','Konto auffüllen','N', 7)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','stats','Statistiken','N', 8)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','inquiry','Kontaktanfrage','N', 9)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','refid','Referal-Link','N', 10)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions', NULL, 'Sponsorenaktionen','N', 2)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions','mail','Sponsor-Mail','N', 1)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions','banner','Banner buchen','N', 2)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions','text','Textlink buchen','N', 3)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('logout', NULL, 'Ausloggen','N', 3)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('logout','logout','Ausloggen','N', 1)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('logout','guest','Zum Gastbereich','N', 2)");
- //
- // General configuration stuff
- //
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD sponsor_ref_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD sponsor_min_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1000.00000");
- break;
+ //
+ // Default allowed data to display
+ //
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('id','N')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('company','Y')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('position','N')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('tax_ident','N')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('gender','N')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('surname','N')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('family','N')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('street_nr1','Y')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('street_nr2','Y')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('zip','Y')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('city','Y')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('country','Y')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('phone','Y')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('fax','Y')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('email','Y')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('url','N')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('password','N')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('remote_addr','N')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('sponsor_created','N')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_online','N')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_change','N')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('status','N')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('receive_warnings','N')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('warning_interval','N')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('points_amount','N')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('points_used','N')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('refid','N')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('ref_count','N')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('hash','N')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_pay','N')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_admin_data` (data_row, display) VALUES ('last_curr','N')");
+ //
+ // Add default entries
+ //
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_registry` (ext_name, is_active, aid, stamp_added) VALUES ('sponsor','N',".getCurrentAdminId().",UNIX_TIMESTAMP())");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_action_convert` (ext_name, conv_rate, conv_name) VALUES ('sponsor','10','Mails')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Standart-Paket', 5, 1000.00000, '€')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Spar-Paket', 1, 200.00000, '€')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Power-Paket', 10, 2000.00000, '€')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_min_count, pay_rate, pay_currency) VALUES ('Sponsor-Paket', 20, 4000.00000, '€')");
+ //
+ // Admin menu
+ //
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor', NULL, 'Sponsorenbereich','Den Sponsorenbereich verwalten. Hier können Sie auch Sonderaktionen seperat deakvieren oder wieder aktivieren, Sponsorenaccounts verwalten usw.', 7)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','add_sponsor','Neuer Sponsor','Neues Sponsorenaccount hinzufügen.', 1)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','unlock_sponsor','Sponsor freischalten','Sponsorenaccounts freigeben / sperren.', 2)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor','Sponsoren auflisten','Listet alle verfügbaren Sponsorenaccounts auf.', 3)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','edit_sponsor','Sponsor ändern','Sponsorenaccount ändern (Grundaten, nicht Freigabe!).', 4)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','lock_sponsor','Sponsor ent-/sperren','Sponsorenaccount sperren und entsperren.', 5)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','del_sponsor','Sponsor löschen','Sponsorenaccount löschen.', 6)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','allow_sponsor_data','Datenverwaltung','Stellen Sie hier ein, welche Daten der Sponsor im Mitgliedsbereich über sicht anzeigen darf und welche nicht.', 7)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_pays','Bestellungen...','Bestellungen der Sponsoren auflisten / bearbeiten.', 8)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_menu','Sponsorenmenü','Das Sponsorenmenü kann hier geändert werden.', 9)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_campaigns','Kampagnen...','Verwaltung aller von Ihren Sponsoren eingerichteten Kampagnen.', 10)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_urls','URL-Verwaltung','Verwaltung (freischalten, sperren, löschen, testen, bearbeiten usw.) von gebuchten URLs.', 11)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_banner','Banner-Verwaltung','Verwaltung (freischalten, sperren, löschen, testen, bearbeiten usw.) von gebuchten Bannern.', 12)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_reg','Sponsor-Aktionen','Alle Sponsor-Aktionen auflisten und verwalten.', 13)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_pay','Buchungspakete','Die Sponsoren können sich {!POINTS!}-Pakete kaufen. Hier können Sie diese verwalten.', 14)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_conv','{!POINTS!} umwandeln...','Mit den vom Sponsor gekauften {!POINTS!} kann er Aktionen buchen. Hier stellen Sie die Umrechnungsrate von {!POINTS!} nach Sponsoraktionen um. Beispiel: 1 {!POINTS!} = 10 Mails.', 15)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','config_sponsor','Einstellungen','Allgemeine Einstellungen am Sponsoring-System.', 16)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('repair','repr_sponsor','Sponsormenü','Gewichtung des Sponsormenüs reparieren.', 5)");
+ //
+ // Menu system (still admin menu)
+ //
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','sponsor_medit','Sponsor-Menü editieren','Hier können Sie das Sponsorenmenü verändern: Positionen verändern, Menütitel ändern usw.', 7)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','sponsor_madd','Sponsor-Menü hinzufügen','Hier können Sie einen neuen Menüpunkt hinzufügen (falls Sie z.B. eigene Sponsoraktionen entwickelt haben oder welche versehendlich gelöscht haben.', 8)");
+ //
+ // Guest menu
+ //
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor', NULL, 'Sponsoren', 2)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_reg','Anmeldung', 1)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_login','Einloggen', 2)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_infos','Infos/Preise', 3)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`) VALUES ('sponsor','sponsor_agb','AGBs', 4)");
+ //
+ // Member menu
+ //
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`) VALUES ('main','sponsor','Unsere Sponsoren', 8)");
+ //
+ // Add default menus to sponsor menu
+ //
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main', NULL, 'Hauptauswahl','N', 1)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','welcome','Willkommen','N', 1)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','account','Ihr Account','N', 2)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','campaigns','Kampagnen','N', 3)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','list_urls','URL-Verwaltung','N', 4)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','list_banner','Banner-Verwaltung','N', 5)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','settings','Einstellungen','N', 6)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','fillup','Konto auffüllen','N', 7)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','stats','Statistiken','N', 8)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','inquiry','Kontaktanfrage','N', 9)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('main','refid','Referal-Link','N', 10)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions', NULL, 'Sponsorenaktionen','N', 2)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions','mail','Sponsor-Mail','N', 1)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions','banner','Banner buchen','N', 2)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('actions','text','Textlink buchen','N', 3)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('logout', NULL, 'Ausloggen','N', 3)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('logout','logout','Ausloggen','N', 1)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_menu` (`action`,`what`,`title`,`active`,`sort`) VALUES ('logout','guest','Zum Gastbereich','N', 2)");
+ //
+ // General configuration stuff
+ //
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD sponsor_ref_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD sponsor_min_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1000.00000");
+ break;
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_data`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_orders`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_action_convert`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_paytypes`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_menu`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_registry`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_urls`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_banner`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaigns`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaign_assigns`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_admin_data`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_display_data`");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='sponsor' OR what IN('repr_sponsor','sponsor_medit','sponsor_madd')");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='sponsor'");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='sponsor'");
- break;
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_data`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_orders`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_action_convert`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_paytypes`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_menu`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_registry`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_urls`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_banner`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaigns`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaign_assigns`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_admin_data`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_display_data`");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='sponsor' OR what IN('repr_sponsor','sponsor_medit','sponsor_madd')");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='sponsor'");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='sponsor'");
+ break;
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='sponsor' LIMIT 4");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='sponsor' LIMIT 1");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_menu` SET active='Y' WHERE active='N'");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_registry` SET is_active='Y' WHERE is_active='N'");
- break;
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='sponsor' LIMIT 4");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='sponsor' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_menu` SET active='Y' WHERE active='N'");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_registry` SET is_active='Y' WHERE is_active='N'");
+ break;
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='sponsor' LIMIT 4");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='sponsor' LIMIT 1");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_menu` SET active='N' WHERE active='Y'");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_registry` SET is_active='N' WHERE is_active='Y'");
- break;
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='sponsor' LIMIT 4");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='sponsor' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_menu` SET active='N' WHERE active='Y'");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_sponsor_registry` SET is_active='N' WHERE is_active='Y'");
+ break;
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- ADD_EXT_SQL("");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ ADD_EXT_SQL('');
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("");
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES('');
+ break;
+ }
break;
- }
- break;
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'remove': // Do stuff when removing extension
- // Drop tables
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_las`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_las_data`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_stats`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_filters`");
-
- // Delete admin menu entries
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL('');
+ break;
+
+ case 'remove': // Do stuff when removing extension
+ // Drop tables
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_las`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_las_data`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_stats`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_filters`");
+
+ // Delete admin menu entries
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE
`what`='config_extensions' OR
`what`='config_home' OR
`what`='list_unconfirmed' OR
`what`='config_session' OR
`what`='list_filter'");
- // Delete/update member menu entries
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE
+ // Delete/update member menu entries
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE
`what`='stats2' OR
`what`='reflist' OR
(`action`='stats' AND (`what`='' OR `what` IS NULL)) OR
(`action`='extras' AND (`what`='' OR `what` IS NULL)) OR
(`action`='rals' AND (`what`='' OR `what` IS NULL)) OR
(`action`='account' AND (`what`='' OR `what` IS NULL))");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='main' WHERE
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='main' WHERE
`action`='stats' OR
`action`='extras' OR
`action`='rals' OR
`action`='account'");
- // Drop indexes
- /* @TODO SQL_ALTER_TABLE() should work now properly
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP UNIQUE KEY `ext_name`");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP UNIQUE KEY `login`");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refbanner` DROP INDEX `visible`");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refdepths` DROP UNIQUE KEY `level`");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` DROP INDEX `level`");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` DROP INDEX `data_type`");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_mod_reg` DROP UNIQUE KEY `module`");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` DROP INDEX `action`");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` DROP INDEX `what`");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `task_type`");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `status`");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `task_created`");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP FULLTEXT `subject`");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `subject`");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP INDEX `ext_active`");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `action`");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `what`");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `sort`");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `visible`");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `locked`");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `what`");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `sort`");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `visible`");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `locked`");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` DROP INDEX `visible`");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` DROP INDEX `sort`");
- */
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ext_autopurge ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_extensions','Erweitungsmanagement','Alle Einstellungen am Erweiterungsmanagement.', 10)");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Es kann nun bestimmt werden, ob vom Server gelöschte ext-xxx.php erkannt werden sollen und die verknüpften Daten auch aus der Datenbank entfernt werden sollen.");
- break;
-
- case '0.0.2': // SQL queries for v0.0.2
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE auto_purge auto_purge BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*14)."");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("In der Tabelle <strong>{!_MYSQL_PREFIX!}_config</strong> musste die Spalte <strong>auto_purge</strong> (autom. Löschen von Bestätigungsmails angepasst werden (war auf dem Testsystem auf TINYINT(4) gesetzt.)");
- break;
-
- case '0.0.3': // SQL queries for v0.0.3
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD points_word VARCHAR(255) NOT NULL DEFAULT 'Punkte'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Das Wort "Punkte" kann nun per Datenbank geändert werden. Damit können Sie anstelle des Wortes Punkte auch Klammlose oder € schreiben.");
+ // Drop indexes
+ /* @TODO SQL_ALTER_TABLE() should work now properly
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP UNIQUE KEY `ext_name`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP UNIQUE KEY `login`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refbanner` DROP INDEX `visible`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refdepths` DROP UNIQUE KEY `level`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` DROP INDEX `level`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` DROP INDEX `data_type`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_mod_reg` DROP UNIQUE KEY `module`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` DROP INDEX `action`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` DROP INDEX `what`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `task_type`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `status`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `task_created`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP FULLTEXT `subject`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` DROP INDEX `subject`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP INDEX `ext_active`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `action`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `what`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `sort`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `visible`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `locked`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `what`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `sort`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `visible`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `locked`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` DROP INDEX `visible`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` DROP INDEX `sort`");
+ */
break;
- case '0.0.4': // SQL queries for v0.0.4
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mails_page BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Anzahl Mails pro Seite in <strong>EMail-Details ansehen</strong> und <strong>EMail-Archiv</strong> hinzugefügt.");
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.0.5': // SQL queries for v0.0.5
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD index_home VARCHAR(255) NOT NULL DEFAULT 'welcome'");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_home','Home-Seite festlegen','Stellen Sie hier ein, welcher Menüpunkt (what-welcome ist Standart) als Einstiegspunkt in das Menüsystem genutzt werden soll.', 5)");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Die what-welcome.php ist derzeit die "Home"-Seite (Eingangsseite). Dies kann nun per Datenbank geändert werden.");
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.0.6': // SQL queries for v0.0.6
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` ADD ext_has_css ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ext_autopurge ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_extensions','Erweitungsmanagement','Alle Einstellungen am Erweiterungsmanagement.', 10)");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Es können nun SQL-Updates von einander abhängig gemacht werden und die CSS-Datei kann per Admin-Bereich (wegen Debuggings) ein- bzw. ausgeschaltet werden.");
- break;
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Es kann nun bestimmt werden, ob vom Server gelöschte ext-xxx.php erkannt werden sollen und die verknüpften Daten auch aus der Datenbank entfernt werden sollen.");
+ break;
- case '0.0.7': // SQL queries for v0.0.7
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD verbose_sql ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ case '0.0.2': // SQL queries for v0.0.2
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE auto_purge auto_purge BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*14)."");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Die SQL-Anweisungen werden bei eingeschalteter Verbose-Funktion detailiert angezeigt.");
- break;
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("In der Tabelle <strong>{!_MYSQL_PREFIX!}_config</strong> musste die Spalte <strong>auto_purge</strong> (autom. Löschen von Bestätigungsmails angepasst werden (war auf dem Testsystem auf TINYINT(4) gesetzt.)");
+ break;
- case '0.0.8': // SQL queries for v0.0.8
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD menu_blur_spacer VARCHAR(255) NOT NULL DEFAULT ' <strong><big>·</big></strong> '");
+ case '0.0.3': // SQL queries for v0.0.3
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD points_word VARCHAR(255) NOT NULL DEFAULT 'Punkte'");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Nette Mouse-Hover-Effekte eingebaut (Anleitung <strong>MENUE_HOVER.txt</strong> zum Patchen der general.css bitte lesen!)");
- break;
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Das Wort "Punkte" kann nun per Datenbank geändert werden. Damit können Sie anstelle des Wortes Punkte auch Klammlose oder € schreiben.");
+ break;
- case '0.0.9': // SQL queries for v0.0.9
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','list_unconfirmed','Unbest. Mails auflisten','Schauen Sie sich hier unbestätigte Maillinks an. Bitte diesen Link nur über dem EMail-Archiv oder EMail-Details aufrufen, direkt aufgerufen bekommen Sie eine Fehlermeldung.', 8)");
+ case '0.0.4': // SQL queries for v0.0.4
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mails_page BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Unbestätigte Maillinks können unter Email-Management -> Unbest. Mails auflisten aufgelistet werden.");
- break;
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Anzahl Mails pro Seite in <strong>EMail-Details ansehen</strong> und <strong>EMail-Archiv</strong> hinzugefügt.");
+ break;
- case '0.1.0': // SQL queries for v0.2.1
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD reg_points_mode ENUM('ref','direct') NOT NULL DEFAULT 'ref'");
+ case '0.0.5': // SQL queries for v0.0.5
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD index_home VARCHAR(255) NOT NULL DEFAULT 'welcome'");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_home','Home-Seite festlegen','Stellen Sie hier ein, welcher Menüpunkt (what-welcome ist Standart) als Einstiegspunkt in das Menüsystem genutzt werden soll.', 5)");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Soll der einmalige Ref-Bonus über das Referal-System (also alle oberen Refs bekommen auch etwas davon ab) oder direkt dem Werber aufgebucht werden?");
- break;
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Die what-welcome.php ist derzeit die "Home"-Seite (Eingangsseite). Dies kann nun per Datenbank geändert werden.");
+ break;
- case '0.1.1': // SQL queries for v0.1.1
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Home-/Eingangsseite', descr='Stellen Sie hier ein, welcher Menüpunkt (what-welcome ist Standart) als Einstiegspunkt in das Menüsystem genutzt werden soll und wie die automatische Weiterleitung in der Eingangsseite funktionieren soll.' WHERE `what`='config_home' LIMIT 1");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD index_delay TINYINT(3) UNSIGNED NOT NULL DEFAULT 0");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD index_cookie BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*365)."");
+ case '0.0.6': // SQL queries for v0.0.6
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` ADD ext_has_css ENUM('Y','N') NOT NULL DEFAULT 'N'");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sie können nun <a href=\"{!URL!}/modules.php?module=admin&`what`=config_home\">hier</a> die Verzögerungszeit in der <a href=\"{!URL!}/index.php\">Eingangsseite</a> einstellen.");
- break;
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Es können nun SQL-Updates von einander abhängig gemacht werden und die CSS-Datei kann per Admin-Bereich (wegen Debuggings) ein- bzw. ausgeschaltet werden.");
+ break;
- case '0.1.2': // SQL queries for v0.1.2
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_refid','Standart-Ref-ID','Stellen Sie hier die User-ID ein, die genommen werden soll, wenn der Gast n icht per Referal-Link Ihren Mailtausch aufgerufen hat.', 7)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD def_refid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ case '0.0.7': // SQL queries for v0.0.7
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD verbose_sql ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Standart Referal-ID kann per Admin-Bereich eingestellt werden (war vorher nur in modules.php und index.php direkt eingebbar.)");
- break;
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Die SQL-Anweisungen werden bei eingeschalteter Verbose-Funktion detailiert angezeigt.");
+ break;
- case '0.1.3': // SQL queries for v0.1.3
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD refid_target ENUM('register','index') NOT NULL DEFAULT 'register'");
+ case '0.0.8': // SQL queries for v0.0.8
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD menu_blur_spacer VARCHAR(255) NOT NULL DEFAULT ' <strong><big>·</big></strong> '");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Auf welche Seite soll der Ref-Link zeigen? Eingangsseite oder Anmeldeformular?");
- break;
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Nette Mouse-Hover-Effekte eingebaut (Anleitung <strong>MENUE_HOVER.txt</strong> zum Patchen der general.css bitte lesen!)");
+ break;
- case '0.1.4': // SQL queries for v0.1.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Ungültiges Update (nach ext-theme.php verschoben!).");
- break;
+ case '0.0.9': // SQL queries for v0.0.9
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','list_unconfirmed','Unbest. Mails auflisten','Schauen Sie sich hier unbestätigte Maillinks an. Bitte diesen Link nur über dem EMail-Archiv oder EMail-Details aufrufen, direkt aufgerufen bekommen Sie eine Fehlermeldung.', 8)");
- case '0.1.5': // SQL queries for v0.1.5
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP ext_has_admin");
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Unbestätigte Maillinks können unter Email-Management -> Unbest. Mails auflisten aufgelistet werden.");
+ break;
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Spalte <u>ext_has_admin</u> aus der Tabelle <u>{!_MYSQL_PREFIX!}_extensions</u> entfernt, da sie keinen Sinn mehr macht.");
- break;
+ case '0.1.0': // SQL queries for v0.2.1
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD reg_points_mode ENUM('ref','direct') NOT NULL DEFAULT 'ref'");
- case '0.1.6': // SQL queries for v0.1.6
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD enable_title_deco ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD title_left VARCHAR(10) NOT NULL DEFAULT '[--'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD title_middle VARCHAR(10) NOT NULL DEFAULT '-'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD title_right VARCHAR(10) NOT NULL DEFAULT '--]'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD enable_mod_title ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD enable_what_title ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_title','Seitentitel ändern','De-/aktivieren Sie hier die Dekorationen, sowie Modul-Titel und what-Titel im Seitentitel.', 8)");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Dekorationen des Seitentiteles lassen sich ein- und ausschalten und selber definieren; Modul-Titel und Titel der <strong>what</strong>-Dateien kann hinzugefügt werden.");
- break;
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Soll der einmalige Ref-Bonus über das Referal-System (also alle oberen Refs bekommen auch etwas davon ab) oder direkt dem Werber aufgebucht werden?");
+ break;
- case '0.1.7': // SQL queries for v0.1.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
- break;
+ case '0.1.1': // SQL queries for v0.1.1
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Home-/Eingangsseite', descr='Stellen Sie hier ein, welcher Menüpunkt (what-welcome ist Standart) als Einstiegspunkt in das Menüsystem genutzt werden soll und wie die automatische Weiterleitung in der Eingangsseite funktionieren soll.' WHERE `what`='config_home' LIMIT 1");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD index_delay TINYINT(3) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD index_cookie BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*365)."");
- case '0.1.8': // SQL queries for v0.1.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("mad_count und last_mad werden nun aus der Datenbank geladen");
- break;
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sie können nun <a href=\"{!URL!}/modules.php?module=admin&`what`=config_home\">hier</a> die Verzögerungszeit in der <a href=\"{!URL!}/index.php\">Eingangsseite</a> einstellen.");
+ break;
- case '0.1.9': // SQL queries for v0.1.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
- break;
+ case '0.1.2': // SQL queries for v0.1.2
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_refid','Standart-Ref-ID','Stellen Sie hier die User-ID ein, die genommen werden soll, wenn der Gast n icht per Referal-Link Ihren Mailtausch aufgerufen hat.', 7)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD def_refid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- case '0.2.0': // SQL queries for v0.2.0
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_jackpot` CHANGE points points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Standart Referal-ID kann per Admin-Bereich eingestellt werden (war vorher nur in modules.php und index.php direkt eingebbar.)");
+ break;
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payments` CHANGE payment payment FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payments` CHANGE price price FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ case '0.1.3': // SQL queries for v0.1.3
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD refid_target ENUM('register','index') NOT NULL DEFAULT 'register'");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert");
- break;
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Auf welche Seite soll der Ref-Link zeigen? Eingangsseite oder Anmeldeformular?");
+ break;
- case '0.2.1': // SQL queries for v0.2.1
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD css_php ENUM('DIRECT','FILE') NOT NULL DEFAULT 'FILE'");
+ case '0.1.4': // SQL queries for v0.1.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Ungültiges Update (nach ext-theme.php verschoben!).");
+ break;
+
+ case '0.1.5': // SQL queries for v0.1.5
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP ext_has_admin");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Ausgabe der CSS-Dateien entweder per css.php oder sie sind direkt eingebunden.");
- break;
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Spalte <u>ext_has_admin</u> aus der Tabelle <u>{!_MYSQL_PREFIX!}_extensions</u> entfernt, da sie keinen Sinn mehr macht.");
+ break;
- case '0.2.2': // SQL queries for v0.2.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
- break;
-
- case '0.2.3': // SQL queries for v0.2.3
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD guest_menu ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD member_menu ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD youre_here ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Gast- und Mitgliedsmenüs lassen sich getrennt voneinander abschalten.");
- break;
-
- case '0.2.4': // SQL queries for v0.2.4
- $auto_type = 'png'; // PNG image is the default
- if ((isIncludeReadable('theme/'.getCurrentTheme().'/images/code_bg.jpg')) && function_exists('imagecreatefromjpeg')) {
- // Switch to JPEG format
- $auto_type = 'jpg';
- }
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD img_type ENUM('jpg','png') NOT NULL DEFAULT '".$auto_type."'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Generierung des Mailbestätigungscodes hängt davon ab, ob die PHP-Funktion <u>imagecreatefromjpeg()</u> und das JPEG-Bild vorhanden sind oder nicht.");
- break;
-
- case '0.2.5': // SQL queries for v0.2.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Spalten <u>max_mails</u> und <u>receive_mails</u> auf BIGINT(20) gesetzt.");
- break;
-
- case '0.2.6': // SQL queries for v0.2.6
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','sub_points','{!POINTS!} abziehen','Allen oder einem Mitglied {!POINTS!} abziehen.', 8)");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abzug von {!POINTS!} nun möglich.");
- break;
-
- case '0.2.7': // SQL queries for v0.2.7
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD stats_limit BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='config_stats' WHERE `what`='stats' LIMIT 1");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("<ol>
+ case '0.1.6': // SQL queries for v0.1.6
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD enable_title_deco ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD title_left VARCHAR(10) NOT NULL DEFAULT '[--'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD title_middle VARCHAR(10) NOT NULL DEFAULT '-'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD title_right VARCHAR(10) NOT NULL DEFAULT '--]'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD enable_mod_title ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD enable_what_title ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_title','Seitentitel ändern','De-/aktivieren Sie hier die Dekorationen, sowie Modul-Titel und what-Titel im Seitentitel.', 8)");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Dekorationen des Seitentiteles lassen sich ein- und ausschalten und selber definieren; Modul-Titel und Titel der <strong>what</strong>-Dateien kann hinzugefügt werden.");
+ break;
+
+ case '0.1.7': // SQL queries for v0.1.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.1.8': // SQL queries for v0.1.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("mad_count und last_mad werden nun aus der Datenbank geladen");
+ break;
+
+ case '0.1.9': // SQL queries for v0.1.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.2.0': // SQL queries for v0.2.0
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_jackpot` CHANGE points points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payments` CHANGE payment payment FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payments` CHANGE price price FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert");
+ break;
+
+ case '0.2.1': // SQL queries for v0.2.1
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD css_php ENUM('DIRECT','FILE') NOT NULL DEFAULT 'FILE'");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Ausgabe der CSS-Dateien entweder per css.php oder sie sind direkt eingebunden.");
+ break;
+
+ case '0.2.2': // SQL queries for v0.2.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
+ break;
+
+ case '0.2.3': // SQL queries for v0.2.3
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD guest_menu ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD member_menu ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD youre_here ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Gast- und Mitgliedsmenüs lassen sich getrennt voneinander abschalten.");
+ break;
+
+ case '0.2.4': // SQL queries for v0.2.4
+ $auto_type = 'png'; // PNG image is the default
+ if ((isIncludeReadable('theme/'.getCurrentTheme().'/images/code_bg.jpg')) && function_exists('imagecreatefromjpeg')) {
+ // Switch to JPEG format
+ $auto_type = 'jpg';
+ }
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD img_type ENUM('jpg','png') NOT NULL DEFAULT '".$auto_type."'");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Generierung des Mailbestätigungscodes hängt davon ab, ob die PHP-Funktion <u>imagecreatefromjpeg()</u> und das JPEG-Bild vorhanden sind oder nicht.");
+ break;
+
+ case '0.2.5': // SQL queries for v0.2.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Spalten <u>max_mails</u> und <u>receive_mails</u> auf BIGINT(20) gesetzt.");
+ break;
+
+ case '0.2.6': // SQL queries for v0.2.6
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','sub_points','{!POINTS!} abziehen','Allen oder einem Mitglied {!POINTS!} abziehen.', 8)");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abzug von {!POINTS!} nun möglich.");
+ break;
+
+ case '0.2.7': // SQL queries for v0.2.7
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD stats_limit BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='config_stats' WHERE `what`='stats' LIMIT 1");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("<ol>
<li>Das Mitglied kann das derzeitige Design in sein Profil abspeichern.</li>
<li>Mitgliederstatistik mit Seitennavigation.</li>
</ol>");
- break;
-
- case '0.2.8': // SQL queries for v0.2.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Nicht mehr gültiges Update.");
- break;
-
- case '0.2.9': // SQL queries for v0.2.9
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_word VARCHAR(255) NOT NULL DEFAULT 'Mailtausch'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_word2 VARCHAR(255) NOT NULL DEFAULT 'Mailtausches'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_word3 VARCHAR(255) NOT NULL DEFAULT 'Mailtauscher'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
- break;
-
- case '0.3.0': // SQL queries for v0.3.0
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='{!POINTS!}/Referal-Ebenen' WHERE `what`='config_points' LIMIT 1");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Mailvergütungen...' WHERE `what`='payments' LIMIT 1");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Zwei Menüpunkte umbenannt.");
- break;
-
- case '0.3.1': // SQL queries for v0.3.1
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` ADD UNIQUE KEY (ext_name)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD UNIQUE KEY (login)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refbanner` ADD INDEX (visible)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refdepths` ADD UNIQUE KEY (level)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` ADD INDEX (level)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` ADD INDEX (data_type)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_mod_reg` ADD UNIQUE KEY (module)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` ADD INDEX (action)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` ADD INDEX (what)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (task_type)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (status)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (task_created)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD FULLTEXT (subject)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (subject)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` ADD INDEX (ext_active)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (action)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (what)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (sort)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (visible)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (locked)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (what)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (sort)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (visible)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (locked)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` ADD INDEX (visible)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` ADD INDEX (sort)");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Eindeutige Schlüssel (UNIQUE KEY) und normale Schlüssel (INDEX) gesetzt.");
- break;
-
- case '0.3.2': // SQL queries for v0.3.2
- // Connection table between the menu system and the "logical area" system
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_las`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admin_menu_las` (
+ break;
+
+ case '0.2.8': // SQL queries for v0.2.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Nicht mehr gültiges Update.");
+ break;
+
+ case '0.2.9': // SQL queries for v0.2.9
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_word VARCHAR(255) NOT NULL DEFAULT 'Mailtausch'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_word2 VARCHAR(255) NOT NULL DEFAULT 'Mailtausches'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_word3 VARCHAR(255) NOT NULL DEFAULT 'Mailtauscher'");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+ break;
+
+ case '0.3.0': // SQL queries for v0.3.0
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='{!POINTS!}/Referal-Ebenen' WHERE `what`='config_points' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Mailvergütungen...' WHERE `what`='payments' LIMIT 1");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Zwei Menüpunkte umbenannt.");
+ break;
+
+ case '0.3.1': // SQL queries for v0.3.1
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` ADD UNIQUE KEY (ext_name)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` ADD UNIQUE KEY (login)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refbanner` ADD INDEX (visible)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refdepths` ADD UNIQUE KEY (level)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` ADD INDEX (level)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` ADD INDEX (data_type)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_mod_reg` ADD UNIQUE KEY (module)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` ADD INDEX (action)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` ADD INDEX (what)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (task_type)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (status)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (task_created)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD FULLTEXT (subject)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (subject)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` ADD INDEX (ext_active)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (action)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (what)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (sort)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (visible)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD INDEX (locked)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (what)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (sort)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (visible)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX (locked)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` ADD INDEX (visible)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_cats` ADD INDEX (sort)");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Eindeutige Schlüssel (UNIQUE KEY) und normale Schlüssel (INDEX) gesetzt.");
+ break;
+
+ case '0.3.2': // SQL queries for v0.3.2
+ // Connection table between the menu system and the "logical area" system
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_las`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admin_menu_las` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
la_id VARCHAR(255) NOT NULL DEFAULT '',
la_action VARCHAR(255) NOT NULL DEFAULT '',
INDEX (la_what),
PRIMARY KEY(id)
) TYPE={!_TABLE_TYPE!}");
- // All "logical areas" together
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_las_data`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admin_menu_las_data` (
+ // All "logical areas" together
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_las_data`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admin_menu_las_data` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
la_id VARCHAR(255) NOT NULL DEFAULT '',
la_title VARCHAR(255) NOT NULL DEFAULT '',
INDEX (la_posy),
PRIMARY KEY(id)
) TYPE={!_TABLE_TYPE!}");
- // Which menu do you like?
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD admin_menu ENUM('NEW','OLD') NOT NULL DEFAULT 'OLD'");
+ // Which menu do you like?
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD admin_menu ENUM('NEW','OLD') NOT NULL DEFAULT 'OLD'");
- // Insert menus
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_admin','Adminmenü','Diverse Einstellungen am Adminmenü vornehmen.', 9)");
+ // Insert menus
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_admin','Adminmenü','Diverse Einstellungen am Adminmenü vornehmen.', 9)");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Logische Bereiche (Logical Areas = LAs) eingeführt. Dadurch wird das immer stärker anwachsende Admin-Menü in grosse Hauptgruppen unterteilt, wodurch ein Auffinden von Menüpunkten verbessert wird.");
- break;
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Logische Bereiche (Logical Areas = LAs) eingeführt. Dadurch wird das immer stärker anwachsende Admin-Menü in grosse Hauptgruppen unterteilt, wodurch ein Auffinden von Menüpunkten verbessert wird.");
+ break;
- case '0.3.3': // SQL queries for v0.3.3
- // Switch of the "intelligent menu sorter" when you want to have a fixed menu structure...
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD admin_menu_sorter ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ case '0.3.3': // SQL queries for v0.3.3
+ // Switch of the "intelligent menu sorter" when you want to have a fixed menu structure...
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD admin_menu_sorter ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- // The statistics table
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_stats`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admin_menu_stats` (
+ // The statistics table
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admin_menu_stats`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_admin_menu_stats` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
aid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
type ENUM('la','action','what') NOT NULL DEFAULT 'what',
PRIMARY KEY (id)
) TYPE={!_TABLE_TYPE!}");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Admin-abhängig werden nun Klicks im Admin-Menü gezählt, die zur automatischen Anpassung des Menüs in den logischen Bereichen diennen. Dieses "intelligente Unbauen" können Sie auch ganz abschalten.");
- break;
-
- case '0.3.4': // SQL queries for v0.3.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Veraltetes Update (what=list_user&mode=noref)");
- break;
-
- case '0.3.5': // SQL queries for v0.3.5
- // List accounts with no referal
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('stats',NULL,'Statistiken',4,'Y','N')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('stats','stats2','Framekiller-Mails',2,'Y','N')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('extras',NULL,'Extras',5,'Y','N')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('rals',NULL,'Rallyes',6,'Y','N')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('account',NULL,'Ihr Account',7,'Y','N')");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='stats', `sort`='1', `title`='Klick-Mails' WHERE `what`='stats' LIMIT 1");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='3' WHERE `what`='reflinks' LIMIT 1");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut.");
- break;
-
- case '0.3.6': // SQL queries for v0.3.6
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD salt_length TINYINT(3) UNSIGNED NOT NULL DEFAULT '9'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD pass_scramble VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` MODIFY password VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD rand_no BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD file_hash VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD master_salt VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_config` SET rand_no=(ROUND(RAND() * 99999) + 100000) WHERE config=0 LIMIT 1");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_mod_reg` ADD has_menu ENUM('Y','N') NOT NULL DEFAULT 'N'");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET has_menu='Y' WHERE `module`='admin' OR `module`='index' OR `module`='login' LIMIT 3");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Passwort-System mit Zufallshash erweitert (Schutzt gegen Dictionary-Attacks!)");
- break;
-
- case '0.3.7': // SQL queries for v0.3.7
- EXT_SET_UPDATE_NOTES("Problem während des Installationsvorganges behoben.");
- break;
-
- case '0.3.8': // SQL queries for v0.3.8
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` CHANGE descr descr MEDIUMTEXT NULL");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` CHANGE `text` `text` LONGTEXT NOT NULL");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Beschreibungstexte für Admin-Menüs können länger sein. Diverse Fixes.");
- break;
-
- case '0.3.9': // SQL queries for v0.3.9
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET descr = REPLACE(descr, '--POINTS--','!POINTS!') WHERE descr LIKE '%--POINTS--%'");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Beschreibungstexte für Admin-Menüs können länger sein. Diverse Fixes.");
- break;
-
- case '0.4.0': // SQL queries for v0.4.0
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Email-Management' WHERE action = 'email' AND (`what`='' OR `what` IS NULL) LIMIT 1");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Email-Verwaltung nach Email-Management umbenannt.");
- break;
-
- case '0.4.1': // SQL queries for v0.4.1
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `show_timings` ENUM ('Y','N') NOT NULL DEFAULT 'Y'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Tabellen-Schlüssel neu gesetzt und Parsing-Zeit im Footer eingeblendet.");
- break;
-
- case '0.4.2': // SQL queries for v0.4.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Nicht mehr gültiges Update.");
- break;
-
- case '0.4.3': // SQL queries for v0.4.3
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `proxy_host` VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `proxy_port` INT(5) UNSIGNED NOT NULL DEFAULT 0");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `proxy_username` VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `proxy_password` VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_proxy','Proxy-Einstellungen','Sollte Ihr Webserver sich hinter einem Proxy befinden, so können Sie hier MXChange so konfigurieren, dass es Updates durch diesen hindurch sucht!', 15)");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Proxy-Einstellungen hinzugefügt.");
- break;
-
- case '0.4.4': // SQL queries for v0.4.4
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`=NULL WHERE `what`=''");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `what`=NULL WHERE `what`=''");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `what`=NULL WHERE `what`=''");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` DROP INDEX `what`");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` ADD UNIQUE (`what`)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `what`");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD UNIQUE (`what`)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX `action` (`action`)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `what`");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD UNIQUE (`what`)");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Schlüssel in Admin-, Gast- und Mitgliedsmenü verbessert.");
- break;
-
- case '0.4.5': // SQL queries for v0.4.5
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD last_month CHAR(2) NOT NULL DEFAULT '00'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD last_week CHAR(2) NOT NULL DEFAULT '00'");
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Admin-abhängig werden nun Klicks im Admin-Menü gezählt, die zur automatischen Anpassung des Menüs in den logischen Bereichen diennen. Dieses "intelligente Unbauen" können Sie auch ganz abschalten.");
+ break;
+
+ case '0.3.4': // SQL queries for v0.3.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Veraltetes Update (what=list_user&mode=noref)");
+ break;
+
+ case '0.3.5': // SQL queries for v0.3.5
+ // List accounts with no referal
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('stats',NULL,'Statistiken',4,'Y','N')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('stats','stats2','Framekiller-Mails',2,'Y','N')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('extras',NULL,'Extras',5,'Y','N')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('rals',NULL,'Rallyes',6,'Y','N')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('account',NULL,'Ihr Account',7,'Y','N')");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='stats', `sort`='1', `title`='Klick-Mails' WHERE `what`='stats' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='3' WHERE `what`='reflinks' LIMIT 1");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut.");
+ break;
+
+ case '0.3.6': // SQL queries for v0.3.6
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD salt_length TINYINT(3) UNSIGNED NOT NULL DEFAULT '9'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD pass_scramble VARCHAR(255) NOT NULL DEFAULT ''");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admins` MODIFY password VARCHAR(255) NOT NULL DEFAULT ''");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD rand_no BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD file_hash VARCHAR(255) NOT NULL DEFAULT ''");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD master_salt VARCHAR(255) NOT NULL DEFAULT ''");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_config` SET rand_no=(ROUND(RAND() * 99999) + 100000) WHERE config=0 LIMIT 1");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_mod_reg` ADD has_menu ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET has_menu='Y' WHERE `module`='admin' OR `module`='index' OR `module`='login' LIMIT 3");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Passwort-System mit Zufallshash erweitert (Schutzt gegen Dictionary-Attacks!)");
+ break;
+
+ case '0.3.7': // SQL queries for v0.3.7
+ EXT_SET_UPDATE_NOTES("Problem während des Installationsvorganges behoben.");
+ break;
+
+ case '0.3.8': // SQL queries for v0.3.8
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` CHANGE descr descr MEDIUMTEXT NULL");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_pool` CHANGE `text` `text` LONGTEXT NOT NULL");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Beschreibungstexte für Admin-Menüs können länger sein. Diverse Fixes.");
+ break;
+
+ case '0.3.9': // SQL queries for v0.3.9
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET descr = REPLACE(descr, '--POINTS--','!POINTS!') WHERE descr LIKE '%--POINTS--%'");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Beschreibungstexte für Admin-Menüs können länger sein. Diverse Fixes.");
+ break;
+
+ case '0.4.0': // SQL queries for v0.4.0
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title = 'Email-Management' WHERE action = 'email' AND (`what`='' OR `what` IS NULL) LIMIT 1");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Email-Verwaltung nach Email-Management umbenannt.");
+ break;
+
+ case '0.4.1': // SQL queries for v0.4.1
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `show_timings` ENUM ('Y','N') NOT NULL DEFAULT 'Y'");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Tabellen-Schlüssel neu gesetzt und Parsing-Zeit im Footer eingeblendet.");
+ break;
+
+ case '0.4.2': // SQL queries for v0.4.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Nicht mehr gültiges Update.");
+ break;
+
+ case '0.4.3': // SQL queries for v0.4.3
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `proxy_host` VARCHAR(255) NOT NULL DEFAULT ''");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `proxy_port` INT(5) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `proxy_username` VARCHAR(255) NOT NULL DEFAULT ''");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `proxy_password` VARCHAR(255) NOT NULL DEFAULT ''");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_proxy','Proxy-Einstellungen','Sollte Ihr Webserver sich hinter einem Proxy befinden, so können Sie hier MXChange so konfigurieren, dass es Updates durch diesen hindurch sucht!', 15)");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Proxy-Einstellungen hinzugefügt.");
+ break;
+
+ case '0.4.4': // SQL queries for v0.4.4
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`=NULL WHERE `what`=''");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `what`=NULL WHERE `what`=''");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `what`=NULL WHERE `what`=''");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` DROP INDEX `what`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_admin_menu` ADD UNIQUE (`what`)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` DROP INDEX `what`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_guest_menu` ADD UNIQUE (`what`)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD INDEX `action` (`action`)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP INDEX `what`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` ADD UNIQUE (`what`)");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Schlüssel in Admin-, Gast- und Mitgliedsmenü verbessert.");
+ break;
+
+ case '0.4.5': // SQL queries for v0.4.5
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD last_month CHAR(2) NOT NULL DEFAULT '00'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD last_week CHAR(2) NOT NULL DEFAULT '00'");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Täglichen/wöchentlichen/monatlichen Reset verbessert.");
+ break;
+
+ case '0.4.6': // SQL queries for v0.4.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Nicht mehr gültiges Update.");
+ break;
+
+ case '0.4.7': // SQL queries for v0.4.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Veraltetes Update.");
+ break;
+
+ case '0.4.8': // SQL queries for v0.4.8
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (subject)");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Index für Betreff eingefügt.");
+ break;
+
+ case '0.4.9': // SQL queries for v0.4.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Nicht mehr gültiges Update.");
+ break;
+
+ case '0.5.0': // SQL queries for v0.5.0
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` DROP INDEX `level`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` DROP INDEX `userid`");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` ADD UNIQUE `userid_level` (`userid`,`level`)");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Referal-System unterstützt nun detailierte Referal-Übersicht und vieles mehr.");
+ break;
+
+ case '0.5.1': // SQL queries for v0.5.1
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP `descr`");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Beschreibungsspalte von Mitgliedsmenü entfernt, welche ohnehin nicht genutzt wird.");
+ break;
+
+ case '0.5.2': // SQL queries for v0.5.2
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refdepths` CHANGE `percents` `percents` FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Prozents&aum;tze können nun fünf Stelle hinter dem Komma sein.");
+ break;
+
+ case '0.5.3': // SQL queries for v0.5.3
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD session_save_path VARCHAR(255) NOT NULL DEFAULT ''");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_session','Session-Einstellungen','Ändern Sie hier den Speicherpfad für Sessiondateien (Sitzungsdateien) ab, falls die Standart-Einstellung bei Ihrem Hoster zu Problem führen sollte.', 16)");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Session-Speicherpfad konfigurierbar. Beispielsweise ist dies bei all-inkl.com nötig.");
+ break;
+
+ case '0.5.4': // SQL queries for v0.5.4
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','reflist','Ref-Übersicht',5,'Y','N')");
+
+ // Depends on refback extension
+ EXT_ADD_UPDATE_DEPENDS('refback');
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Ref-Übersicht eingebaut. Diese hängt von der Erweiterung <strong>refback</strong> ab.");
+ break;
+
+ case '0.5.5': // SQL queries for v0.5.5
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD show_points_unconfirmed ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Anzeige der {!POINTS!} unter den unbestätigten Mails kann nun optional abgeschaltet werden.");
+ break;
+
+ case '0.5.6': // SQL queries for v0.5.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Nicht mehr gültiges Update.");
+ break;
+
+ case '0.5.7': // SQL queries for v0.5.7
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='list_norefs' LIMIT 1");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Auflistung der Mitglieder ohne Werber nach what=list_user&mode=norefs verschoben.");
+ break;
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Täglichen/wöchentlichen/monatlichen Reset verbessert.");
- break;
+ case '0.5.8': // SQL queries for v0.5.8
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP `ext_lang_file`");
- case '0.4.6': // SQL queries for v0.4.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Nicht mehr gültiges Update.");
- break;
-
- case '0.4.7': // SQL queries for v0.4.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Veraltetes Update.");
- break;
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sprachdateinamen werden nicht mehr in der Datenbank behalten.");
+ break;
- case '0.4.8': // SQL queries for v0.4.8
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_task_system` ADD INDEX (subject)");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Index für Betreff eingefügt.");
- break;
-
- case '0.4.9': // SQL queries for v0.4.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Nicht mehr gültiges Update.");
- break;
-
- case '0.5.0': // SQL queries for v0.5.0
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` DROP INDEX `level`");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` DROP INDEX `userid`");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` ADD UNIQUE `userid_level` (`userid`,`level`)");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Referal-System unterstützt nun detailierte Referal-Übersicht und vieles mehr.");
- break;
-
- case '0.5.1': // SQL queries for v0.5.1
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_member_menu` DROP `descr`");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Beschreibungsspalte von Mitgliedsmenü entfernt, welche ohnehin nicht genutzt wird.");
- break;
-
- case '0.5.2': // SQL queries for v0.5.2
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_refdepths` CHANGE `percents` `percents` FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Prozents&aum;tze können nun fünf Stelle hinter dem Komma sein.");
- break;
-
- case '0.5.3': // SQL queries for v0.5.3
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD session_save_path VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_session','Session-Einstellungen','Ändern Sie hier den Speicherpfad für Sessiondateien (Sitzungsdateien) ab, falls die Standart-Einstellung bei Ihrem Hoster zu Problem führen sollte.', 16)");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Session-Speicherpfad konfigurierbar. Beispielsweise ist dies bei all-inkl.com nötig.");
- break;
-
- case '0.5.4': // SQL queries for v0.5.4
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','reflist','Ref-Übersicht',5,'Y','N')");
-
- // Depends on refback extension
- EXT_ADD_UPDATE_DEPENDS('refback');
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Ref-Übersicht eingebaut. Diese hängt von der Erweiterung <strong>refback</strong> ab.");
- break;
-
- case '0.5.5': // SQL queries for v0.5.5
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD show_points_unconfirmed ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Anzeige der {!POINTS!} unter den unbestätigten Mails kann nun optional abgeschaltet werden.");
- break;
-
- case '0.5.6': // SQL queries for v0.5.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Nicht mehr gültiges Update.");
- break;
-
- case '0.5.7': // SQL queries for v0.5.7
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='list_norefs' LIMIT 1");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Auflistung der Mitglieder ohne Werber nach what=list_user&mode=norefs verschoben.");
- break;
-
- case '0.5.8': // SQL queries for v0.5.8
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP `ext_lang_file`");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sprachdateinamen werden nicht mehr in der Datenbank behalten.");
- break;
-
- case '0.5.9': // SQL queries for v0.5.9
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_filters`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_filters` (
+ case '0.5.9': // SQL queries for v0.5.9
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_filters`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_filters` (
`filter_id` BIGINT(20) UNSIGNED AUTO_INCREMENT,
`filter_name` VARCHAR(255) NOT NULL DEFAULT '',
`filter_function` VARCHAR(255) NOT NULL DEFAULT '',
`filter_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`filter_id`)
) TYPE={!_TABLE_TYPE!} COMMENT='Filter system'");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','list_filter','Filter-Management', 'Zeigt alle im System registrierten Filter an und lässt diese de- bzw. wieder aktivieren.', 17)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','list_filter','Filter-Management', 'Zeigt alle im System registrierten Filter an und lässt diese de- bzw. wieder aktivieren.', 17)");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Tabellen für Filter-System hinzugefügt.");
- break;
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Tabellen für Filter-System hinzugefügt.");
+ break;
- case '0.6.0': // SQL queries for v0.6.0
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `update_filter_usage` ENUM('N','Y') NOT NULL DEFAULT 'N'");
+ case '0.6.0': // SQL queries for v0.6.0
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `update_filter_usage` ENUM('N','Y') NOT NULL DEFAULT 'N'");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Benutzungsstatistik eingebaut. Das Zählen der Filterverwendungen sollte <strong>ausschliesslich</strong> zu Debugging-Zwecken eingesetzt werden.");
- break;
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Benutzungsstatistik eingebaut. Das Zählen der Filterverwendungen sollte <strong>ausschliesslich</strong> zu Debugging-Zwecken eingesetzt werden.");
+ break;
- case '0.6.1': // SQL queries for v0.6.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Nicht mehr gültiges Update.");
- break;
+ case '0.6.1': // SQL queries for v0.6.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Nicht mehr gültiges Update.");
+ break;
- case '0.6.2': // SQL queries for v0.6.2
- // Depends on refback extension
- EXT_ADD_UPDATE_DEPENDS('user');
+ case '0.6.2': // SQL queries for v0.6.2
+ // Depends on refback extension
+ EXT_ADD_UPDATE_DEPENDS('user');
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abhängigkeit von <u>ext-user</u> gesetzt.");
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abhängigkeit von <u>ext-user</u> gesetzt.");
+ break;
+ }
break;
- }
- break;
-
-case 'modify': // When the extension got modified
- break;
-
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
-
-default: // Do stuff when extension is loaded
- // When the sql_patches is not installed we cannot load it's configuration... *sigh*
- if (GET_EXT_VERSION('sql_patches') != '') {
- // Init key
- setConfigEntry('secret_key', '');
-
- // Read key from secret file
- if ((getConfig('file_hash') == '') || (getConfig('master_salt') == '') || (getConfig('pass_scramble') == '')) {
- // Cache instance
- // Maybe need setup of secret key!
- loadIncludeOnce('inc/gen_sql_patches.php');
-
- // @TODO Rewrite this to a filter!
- if ((GET_EXT_VERSION('cache') >= '0.1.2') && (isCacheInstanceValid())) {
- // Remove extensions and mod_reg cache file
- loadIncludeOnce('inc/libs/cache_functions.php');
- require(sprintf("%sinc/extensions/ext-cache.php", constant('PATH')));
- if ($GLOBALS['cache_instance']->loadCacheFile("extensions", true)) $GLOBALS['cache_instance']->destroyCacheFile();
- if ($GLOBALS['cache_instance']->loadCacheFile("modreg")) $GLOBALS['cache_instance']->destroyCacheFile();
- } // END - if
- } // END - if
-
- // Test again
- if ((getConfig('file_hash') != '') && (getConfig('master_salt') != '') && (getConfig('pass_scramble') != '')) {
- // File hash fas generated so we can also file the secret file... hopefully.
- $hashFile = sprintf("%sinc/.secret/.%s", constant('PATH'), getConfig('file_hash'));
- if (isFileReadable($hashFile)) {
- // Read file
- setConfigEntry('secret_key', readFromFile($hashFile));
- } else {
- // Remove it from database
- updateConfiguration('file_hash', '');
-
- // Cannot read secret file!
- app_die(__FILE__, __LINE__, "Cannot read secret file! Please try to reload");
- }
- } // END - if
-
- // Transfer words/numbers to constants
- define('POINTS' , getConfig('points_word'));
- define('MT_WORD' , getConfig('mt_word'));
- define('MT_WORD2', getConfig('mt_word2'));
- define('MT_WORD3', getConfig('mt_word3'));
- define('_MAX' , getConfig('rand_no'));
- } else {
- // Set some lame ( ;-) ) default settings
- setConfigEntry('def_refid' , 0);
- setConfigEntry('enable_title_deco', 'N');
- setConfigEntry('title_mod_show' , 'Y');
- setConfigEntry('title_middle' , '-');
- // @TODO Can we remove this? setConfigEntry('verbose_sql' , 'N');
- define('MT_WORD' , getMessage('DEFAULT_MT_WORD'));
- define('MT_WORD2', getMessage('DEFAULT_MT_WORD2'));
- define('MT_WORD3', getMessage('DEFAULT_MT_WORD3'));
- define('POINTS' , getMessage('DEFAULT_POINTS'));
- }
- break;
+
+ case 'modify': // When the extension got modified
+ break;
+
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
+
+ default: // Do stuff when extension is loaded
+ // When the sql_patches is not installed we cannot load it's configuration... *sigh*
+ if (GET_EXT_VERSION('sql_patches') != '') {
+ // Init key
+ setConfigEntry('secret_key', '');
+
+ // Read key from secret file
+ if ((getConfig('file_hash') == '') || (getConfig('master_salt') == '') || (getConfig('pass_scramble') == '')) {
+ // Cache instance
+ // Maybe need setup of secret key!
+ loadIncludeOnce('inc/gen_sql_patches.php');
+
+ // @TODO Rewrite this to a filter!
+ if ((GET_EXT_VERSION('cache') >= '0.1.2') && (isCacheInstanceValid())) {
+ // Remove extensions and mod_reg cache file
+ loadIncludeOnce('inc/libs/cache_functions.php');
+ require(sprintf("%sinc/extensions/ext-cache.php", constant('PATH')));
+ if ($GLOBALS['cache_instance']->loadCacheFile("extensions", true)) $GLOBALS['cache_instance']->destroyCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile("modreg")) $GLOBALS['cache_instance']->destroyCacheFile();
+ } // END - if
+ } // END - if
+
+ // Test again
+ if ((getConfig('file_hash') != '') && (getConfig('master_salt') != '') && (getConfig('pass_scramble') != '')) {
+ // File hash fas generated so we can also file the secret file... hopefully.
+ $hashFile = sprintf("%sinc/.secret/.%s", constant('PATH'), getConfig('file_hash'));
+ if (isFileReadable($hashFile)) {
+ // Read file
+ setConfigEntry('secret_key', readFromFile($hashFile));
+ } else {
+ // Remove it from database
+ updateConfiguration('file_hash', '');
+
+ // Cannot read secret file!
+ app_die(__FILE__, __LINE__, "Cannot read secret file! Please try to reload");
+ }
+ } // END - if
+
+ // Transfer words/numbers to constants
+ define('POINTS' , getConfig('points_word'));
+ define('MT_WORD' , getConfig('mt_word'));
+ define('MT_WORD2', getConfig('mt_word2'));
+ define('MT_WORD3', getConfig('mt_word3'));
+ define('_MAX' , getConfig('rand_no'));
+ } else {
+ // Set some lame ( ;-) ) default settings
+ setConfigEntry('def_refid' , 0);
+ setConfigEntry('enable_title_deco', 'N');
+ setConfigEntry('title_mod_show' , 'Y');
+ setConfigEntry('title_middle' , '-');
+ // @TODO Can we remove this? setConfigEntry('verbose_sql' , 'N');
+ define('MT_WORD' , getMessage('DEFAULT_MT_WORD'));
+ define('MT_WORD2', getMessage('DEFAULT_MT_WORD2'));
+ define('MT_WORD3', getMessage('DEFAULT_MT_WORD3'));
+ define('POINTS' , getMessage('DEFAULT_POINTS'));
+ }
+ break;
}
// Keep this extension always active!
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.2': // SQL queries for v0.0.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.0.3': // SQL queries for v0.0.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.0.4': // SQL queries for v0.0.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.0.5': // SQL queries for v0.0.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.0.6': // SQL queries for v0.0.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.2': // SQL queries for v0.0.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
+ break;
+
+ case '0.0.3': // SQL queries for v0.0.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.0.4': // SQL queries for v0.0.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.0.5': // SQL queries for v0.0.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+ break;
+
+ case '0.0.6': // SQL queries for v0.0.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ break;
+
+ case '0.0.7': // SQL queries for v0.0.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt.");
+ break;
+
+ case '0.0.8': // SQL queries for v0.0.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+ break;
+
+ case '0.0.9': // SQL queries for v0.0.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Dateiamenskonflikt zwischen den Erweiterungen <strong>support</strong> und <strong>order</strong> behoben.");
+ break;
+
+ case '0.1.0': // SQL queries for v0.2.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sicherheitsupdate vom 27.08.2005.");
+ break;
+
+ case '0.1.1': // SQL queries for v0.1.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abspeichern der Support-Anfrage repariert und Mail wird an Mitglied wieder versendet.");
+ break;
+
+ case '0.1.2': // SQL queries for v0.1.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+ break;
+ }
break;
- case '0.0.7': // SQL queries for v0.0.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt.");
- break;
-
- case '0.0.8': // SQL queries for v0.0.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
- break;
-
- case '0.0.9': // SQL queries for v0.0.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Dateiamenskonflikt zwischen den Erweiterungen <strong>support</strong> und <strong>order</strong> behoben.");
- break;
-
- case '0.1.0': // SQL queries for v0.2.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sicherheitsupdate vom 27.08.2005.");
- break;
-
- case '0.1.1': // SQL queries for v0.1.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abspeichern der Support-Anfrage repariert und Mail wird an Mitglied wieder versendet.");
- break;
-
- case '0.1.2': // SQL queries for v0.1.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
- break;
- }
- break;
-
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run (surfbar URLs)
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_urls`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_urls` (
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run (surfbar URLs)
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_urls`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_urls` (
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`url` VARCHAR(255) NOT NULL DEFAULT '',
INDEX `status_userid` (`status`,`userid`)
) TYPE={!_TABLE_TYPE!} COMMENT='Surfbar URLs'");
- // Reload locks
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_locks`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_locks` (
+ // Reload locks
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_locks`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_locks` (
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`url_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
INDEX (`url_id`)
) TYPE={!_TABLE_TYPE!} COMMENT='Surfbar reload locks'");
- // Surfbar salts
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_salts`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_salts` (
+ // Surfbar salts
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_salts`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_salts` (
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`url_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
INDEX (`url_id`)
) TYPE={!_TABLE_TYPE!} COMMENT='Surfbar last used salts'");
- // Statistics
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_stats`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_stats` (
+ // Statistics
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_stats`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_stats` (
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`url_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
INDEX (`url_id`)
) TYPE={!_TABLE_TYPE!} COMMENT='Surfbar Statistics'");
- // Member actions pending on status
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_actions`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_actions` (
+ // Member actions pending on status
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_actions`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_surfbar_actions` (
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`status` ENUM('PENDING','ACTIVE','LOCKED','STOPPED','REJECTED','DELETED','MIGRATED','DEPLETED') NULL DEFAULT NULL,
`action` ENUM('EDIT','DELETE','PAUSE','UNPAUSE','FRAMETEST','RETREAT','RESUBMIT','BOOKNOW') NULL DEFAULT NULL,
UNIQUE KEY `status_action` (`status`,`action`)
) TYPE={!_TABLE_TYPE!} COMMENT='Surfbar Member Actions'");
- // Member actions
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','RETREAT','DELETED')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','FRAMETEST',NULL)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','EDIT',NULL)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','EDIT','PENDING')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','DELETE','DELETED')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','PAUSE','STOPPED')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','FRAMETEST',NULL)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','DELETE','DELETED')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','FRAMETEST',NULL)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','RESUBMIT','PENDING')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','EDIT','PENDING')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','DELETE','DELETED')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','UNPAUSE','PENDING')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('DEPLETED','EDIT','PENDING')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('DEPLETED','DELETE','DELETED')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','EDIT','PENDING')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','DELETE','DELETED')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','FRAMETEST',NULL)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','RESUBMIT','PENDING')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','EDIT','MIGRATED')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','DELETE','DELETED')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','FRAMETEST',NULL)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','BOOKNOW','PENDING')");
-
- // Config entries
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_pay_model` ENUM('STATIC','DYNAMIC') NOT NULL DEFAULT 'STATIC'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_reward` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.25000");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_costs` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_time` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_lock` SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(60*5)."");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_dynamic_percent` FLOAT(10,5) UNSIGNED NOT NULL DEFAULT 10.00000");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_max_order` INT(7) UNSIGNED NOT NULL DEFAULT 10");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_restart_time` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(60*6)."");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_autostart` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_migrate_urls` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_total_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_daily_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_yester_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_weekly_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_monthly_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_stats_reload` BIGINT(20) UNSIGNED NOT NULL DEFAULT 30");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_purge_deleted` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*7)."");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_purge_migrated` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*3)."");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_pause_mode` ENUM('INTERNAL','EXERNAL') NOT NULL DEFAULT 'INTERNAL'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_pause_url` VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_notify_limits` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_notify_admin_unlock` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_warn_low_points` BIGINT(20) UNSIGNED NOT NULL DEFAULT 100");
- 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'");
-
- // 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'");
-
- // Member menus
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar',NULL,'Surfbar','Y','Y',4)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_start','Surfbar starten','Y','Y',1)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_book','URL buchen','Y','Y',2)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_list','URL-Verwaltung','Y','Y',3)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_stats','URL-Statistiken','Y','Y',4)");
-
- // Admin menus
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar',NULL,'Surfbar','URLs in der Surfbar verwalten, Einstellungen ändern und vieles mehr.',7)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','add_surfbar_url','URL hinzufügen','Fügen Sie URLs z.B. von Werbenetzwerken hinzu, oder Ihre eigenen Projekte. <strong>Vorsicht!</strong> Ihnen muss es auch gestattet sein, URLs aus dem Werbenetzwerk in die Surfbar einzufügen.',1)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','list_surfbar_urls','URLs verwalten','Verwalten Sie hier alle in der Surfbar befindlichen URLs mit nur wenigen Klicks.',2)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','unlock_surfbar_urls','Wartende URLs freigeben','Geben Sie hier nur direkt in der Surfbar gebuchte URLs frei.',3)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','config_surfbar','Einstellungen','Einstellungen an der Surfbar ändern, wie Festvergütung, prozentuale Ref-Vergütung und vieles mehr.',4)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','surfbar_stats','Statistiken','Detailierte Statistiken zu einer ausgewählten URL anzeigen.',5)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','list_surfbar_actions','Mitgliederaktionen','Listet alle Mitgliederaktionen auf.',6)");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_actions`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_locks`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_salts`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_stats`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_urls`");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='surfbar'");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='surfbar'");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `action`='surfbar' LIMIT 5");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='Y' WHERE `module`='surfbar' LIMIT 1");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `action` = 'surfbar' LIMIT 5");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE `module`='surfbar' LIMIT 1");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER) {
- case '0.0.1': // SQL queries for v0.0.1
- ADD_EXT_SQL("");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("");
+ // Member actions
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','RETREAT','DELETED')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','FRAMETEST',NULL)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('PENDING','EDIT',NULL)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','EDIT','PENDING')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','DELETE','DELETED')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','PAUSE','STOPPED')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('ACTIVE','FRAMETEST',NULL)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','DELETE','DELETED')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','FRAMETEST',NULL)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('LOCKED','RESUBMIT','PENDING')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','EDIT','PENDING')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','DELETE','DELETED')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('STOPPED','UNPAUSE','PENDING')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('DEPLETED','EDIT','PENDING')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('DEPLETED','DELETE','DELETED')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','EDIT','PENDING')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','DELETE','DELETED')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','FRAMETEST',NULL)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('REJECTED','RESUBMIT','PENDING')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','EDIT','MIGRATED')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','DELETE','DELETED')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','FRAMETEST',NULL)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_actions` (`status`,`action`,`new_status`) VALUES ('MIGRATED','BOOKNOW','PENDING')");
+
+ // Config entries
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_pay_model` ENUM('STATIC','DYNAMIC') NOT NULL DEFAULT 'STATIC'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_reward` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.25000");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_costs` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_time` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_static_lock` SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(60*5)."");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_dynamic_percent` FLOAT(10,5) UNSIGNED NOT NULL DEFAULT 10.00000");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_max_order` INT(7) UNSIGNED NOT NULL DEFAULT 10");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_restart_time` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(60*6)."");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_autostart` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_migrate_urls` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_total_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_daily_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_yester_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_weekly_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_monthly_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_stats_reload` BIGINT(20) UNSIGNED NOT NULL DEFAULT 30");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_purge_deleted` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*7)."");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_purge_migrated` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*3)."");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_pause_mode` ENUM('INTERNAL','EXERNAL') NOT NULL DEFAULT 'INTERNAL'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_pause_url` VARCHAR(255) NOT NULL DEFAULT ''");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_notify_limits` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_notify_admin_unlock` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `surfbar_warn_low_points` BIGINT(20) UNSIGNED NOT NULL DEFAULT 100");
+ 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'");
+
+ // 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'");
+
+ // Member menus
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar',NULL,'Surfbar','Y','Y',4)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_start','Surfbar starten','Y','Y',1)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_book','URL buchen','Y','Y',2)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_list','URL-Verwaltung','Y','Y',3)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('surfbar','surfbar_stats','URL-Statistiken','Y','Y',4)");
+
+ // Admin menus
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar',NULL,'Surfbar','URLs in der Surfbar verwalten, Einstellungen ändern und vieles mehr.',7)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','add_surfbar_url','URL hinzufügen','Fügen Sie URLs z.B. von Werbenetzwerken hinzu, oder Ihre eigenen Projekte. <strong>Vorsicht!</strong> Ihnen muss es auch gestattet sein, URLs aus dem Werbenetzwerk in die Surfbar einzufügen.',1)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','list_surfbar_urls','URLs verwalten','Verwalten Sie hier alle in der Surfbar befindlichen URLs mit nur wenigen Klicks.',2)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','unlock_surfbar_urls','Wartende URLs freigeben','Geben Sie hier nur direkt in der Surfbar gebuchte URLs frei.',3)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','config_surfbar','Einstellungen','Einstellungen an der Surfbar ändern, wie Festvergütung, prozentuale Ref-Vergütung und vieles mehr.',4)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','surfbar_stats','Statistiken','Detailierte Statistiken zu einer ausgewählten URL anzeigen.',5)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('surfbar','list_surfbar_actions','Mitgliederaktionen','Listet alle Mitgliederaktionen auf.',6)");
break;
- }
- break;
-case 'modify': // When the extension got modified
- break;
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_actions`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_locks`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_salts`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_stats`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_surfbar_urls`");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='surfbar'");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='surfbar'");
+ break;
+
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `action`='surfbar' LIMIT 5");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='Y' WHERE `module`='surfbar' LIMIT 1");
+ break;
+
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `action` = 'surfbar' LIMIT 5");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE `module`='surfbar' LIMIT 1");
+ break;
+
+ case 'update': // Update an extension
+ switch ($EXT_VER) {
+ case '0.0.1': // SQL queries for v0.0.1
+ ADD_EXT_SQL('');
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES('');
+ break;
+ }
+ break;
+
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- // @TODO Set some constants we need???
- define('edit', 'edit');
- break;
+ default: // Do stuff when extension is loaded
+ // @TODO Set some constants we need???
+ define('edit', 'edit');
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('task', NULL, 'Aufgaben-Management','1','Erweitertes Aufgaben-Management zur leichten verwaltung der vom System erzeugten Aufgaben.')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('task','list_task','Aufgaben auflisten','1','Alle Ihnen zugewiesenen Aufgaben auflisten (keine Updates).')");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_task_system` SET `status`='SOLVED' WHERE `status`='CLOSED'");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='task'");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE `ext_name`='task' AND ext_has_css='N' LIMIT 1");
-
- // This update depends on sql_patches update!
- EXT_ADD_UPDATE_DEPENDS('sql_patches');
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("CSS-Datei kann per Admin-Bereich ein- und ausgeschaltet werden.");
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('task', NULL, 'Aufgaben-Management','1','Erweitertes Aufgaben-Management zur leichten verwaltung der vom System erzeugten Aufgaben.')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('task','list_task','Aufgaben auflisten','1','Alle Ihnen zugewiesenen Aufgaben auflisten (keine Updates).')");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_task_system` SET `status`='SOLVED' WHERE `status`='CLOSED'");
break;
- case '0.0.1': // SQL queries for v0.0.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Unnötige Script-Teile aus what-list_tasks.php herausgelöscht; beim Anzeigen einer Extension-Update, oder -Register Aufgabe werden bei eingeschaltetem Verbose-Modus alle SQL-Anweisungen aufgelistet.");
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='task'");
break;
- case '0.0.4': // SQL queries for v0.0.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler <div class=\"admin_failed\">Warning: Missing argument 2 for create_timestamp_from_selections() in {!PATH!}inc/libs/pro_functions.php on line 227</div> behoben.");
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.0.5': // SQL queries for v0.0.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("&admin= in &amp;admin= umgewandelt.");
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.0.6': // SQL queries for v0.0.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert.");
- break;
-
- case '0.0.7': // SQL queries for v0.0.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Erstellung der Extra-Übersichten verbessert.");
- break;
-
- case '0.0.8': // SQL queries for v0.0.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
- break;
-
- case '0.0.9': // SQL queries for v0.0.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler bei Abfrage der payout-Erweiterung beseitigt.");
- break;
-
- case '0.1.0': // SQL queries for v0.2.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Task-Liste ausgelagert als Template");
- break;
-
- case '0.1.1': // SQL queries for v0.1.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut.");
- break;
-
- case '0.1.2': // SQL queries for v0.1.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
- break;
-
- case '0.1.3': // SQL queries for v0.1.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
- break;
-
- case '0.1.4': // SQL queries for v0.1.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
- break;
-
- case '0.1.5': // SQL queries for v0.1.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Links wegen <strong>what=admins_contct</strong> geändert.");
- break;
-
- case '0.1.6': // SQL queries for v0.1.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Weitere Direkt-Links eingebaut:<br />
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='Y' WHERE `ext_name`='task' AND ext_has_css='N' LIMIT 1");
+
+ // This update depends on sql_patches update!
+ EXT_ADD_UPDATE_DEPENDS('sql_patches');
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("CSS-Datei kann per Admin-Bereich ein- und ausgeschaltet werden.");
+ break;
+
+ case '0.0.1': // SQL queries for v0.0.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Unnötige Script-Teile aus what-list_tasks.php herausgelöscht; beim Anzeigen einer Extension-Update, oder -Register Aufgabe werden bei eingeschaltetem Verbose-Modus alle SQL-Anweisungen aufgelistet.");
+ break;
+
+ case '0.0.4': // SQL queries for v0.0.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler <div class=\"admin_failed\">Warning: Missing argument 2 for create_timestamp_from_selections() in {!PATH!}inc/libs/pro_functions.php on line 227</div> behoben.");
+ break;
+
+ case '0.0.5': // SQL queries for v0.0.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("&admin= in &amp;admin= umgewandelt.");
+ break;
+
+ case '0.0.6': // SQL queries for v0.0.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert.");
+ break;
+
+ case '0.0.7': // SQL queries for v0.0.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Erstellung der Extra-Übersichten verbessert.");
+ break;
+
+ case '0.0.8': // SQL queries for v0.0.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.0.9': // SQL queries for v0.0.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler bei Abfrage der payout-Erweiterung beseitigt.");
+ break;
+
+ case '0.1.0': // SQL queries for v0.2.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Task-Liste ausgelagert als Template");
+ break;
+
+ case '0.1.1': // SQL queries for v0.1.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut.");
+ break;
+
+ case '0.1.2': // SQL queries for v0.1.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ break;
+
+ case '0.1.3': // SQL queries for v0.1.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
+ break;
+
+ case '0.1.4': // SQL queries for v0.1.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+ break;
+
+ case '0.1.5': // SQL queries for v0.1.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Links wegen <strong>what=admins_contct</strong> geändert.");
+ break;
+
+ case '0.1.6': // SQL queries for v0.1.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Weitere Direkt-Links eingebaut:<br />
<ul>
<li>Ländercodes</li>
<li>Wartende Verdopplungen</li>
<li>Teilnehmer an der Aktiv-Rallye</li>
<li>Nett hinweisende Linktitel hinzugefügt. :-)</li>
</ul>");
+ break;
+
+ case '0.1.7': // SQL queries for v0.1.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Direkt Links zum Sponsorenbereich vorbereitend eingebaut.");
+ break;
+
+ case '0.1.8': // SQL queries for v0.1.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Es werden alle installierten und aktivierten Themes angezeigt und verlinkt.");
+ break;
+
+ case '0.1.9': // SQL queries for v0.1.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("CSS-Datei in general.css verschmolzen (Patch 435!)");
+ break;
+
+ case '0.2.0': // SQL queries for v0.2.0
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Alle Administratoren, Referal-Banner und aktivierte Referal-Banner werden nun eingeblendet.");
+ break;
+
+ case '0.2.1': // SQL queries for v0.2.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Problem mit überlanger Textbreite beseitigt.");
+ break;
+
+ case '0.2.2': // SQL queries for v0.2.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Link zum Freischalten von Sponoren-Accounts korregiert.");
+ break;
+
+ case '0.2.3': // SQL queries for v0.2.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sortierungsreihenfolge grundlegend geändert: Es wird jetzt nach Mitglieder-ID, Aufgabenbereich, Infos und nach dem Erstellunsdatum sortiert.");
+ break;
+
+ case '0.2.4': // SQL queries for v0.2.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ break;
+
+ case '0.2.5': // SQL queries for v0.2.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("<strong>Nur mit bonus v0.6.9 oder höher:</strong> Zuschaltbare Bonis werden auch bei der Ermittlung Anzahl teilnehmender Mitglieder mit ber&uumk;cksichtigt.");
+ break;
+
+ case '0.2.6': // SQL queries for v0.2.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Teilnehmer der Bettel-Rallye werden angezeigt.");
+ break;
+
+ case '0.2.7': // SQL queries for v0.2.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Link zum direkten Aufheben einer Urlaubsschaltung eines Mitgliedes korregiert.");
+ break;
+
+ case '0.2.8': // SQL queries for v0.2.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle.");
+ break;
+
+ case '0.2.9': // SQL queries for v0.2.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt. Update-Aufgaben werden nach "Bearbeitung" nicht mehr als <strong>Erledigt</strong> gesetzt. Dies hatte sonst den Anschein, die Update-Aufgaben müssten erledigt werden, um die Erweiterungs-Updates einzuspielen, was aber automatisch geschieht.");
+ break;
+
+ case '0.3.0': // SQL queries for v0.3.0
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Export-Accounts werden in Task-Übersicht aufgelistet.");
+ break;
+
+ case '0.3.1': // SQL queries for v0.3.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Diverse Fixes an den Templates (Notice-Hinweise vom PHP-Interpreter entfernt).");
+ break;
+
+ case '0.3.2': // SQL queries for v0.3.2
+ // This update depends on user update
+ EXT_ADD_UPDATE_DEPENDS('sql_patches');
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Hängt nun von <u>ext-user</u> ab.");
+ break;
+ }
break;
- case '0.1.7': // SQL queries for v0.1.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Direkt Links zum Sponsorenbereich vorbereitend eingebaut.");
- break;
-
- case '0.1.8': // SQL queries for v0.1.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Es werden alle installierten und aktivierten Themes angezeigt und verlinkt.");
- break;
-
- case '0.1.9': // SQL queries for v0.1.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("CSS-Datei in general.css verschmolzen (Patch 435!)");
- break;
-
- case '0.2.0': // SQL queries for v0.2.0
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Alle Administratoren, Referal-Banner und aktivierte Referal-Banner werden nun eingeblendet.");
- break;
-
- case '0.2.1': // SQL queries for v0.2.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Problem mit überlanger Textbreite beseitigt.");
- break;
-
- case '0.2.2': // SQL queries for v0.2.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Link zum Freischalten von Sponoren-Accounts korregiert.");
- break;
-
- case '0.2.3': // SQL queries for v0.2.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sortierungsreihenfolge grundlegend geändert: Es wird jetzt nach Mitglieder-ID, Aufgabenbereich, Infos und nach dem Erstellunsdatum sortiert.");
- break;
-
- case '0.2.4': // SQL queries for v0.2.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
- break;
-
- case '0.2.5': // SQL queries for v0.2.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("<strong>Nur mit bonus v0.6.9 oder höher:</strong> Zuschaltbare Bonis werden auch bei der Ermittlung Anzahl teilnehmender Mitglieder mit ber&uumk;cksichtigt.");
- break;
-
- case '0.2.6': // SQL queries for v0.2.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Teilnehmer der Bettel-Rallye werden angezeigt.");
- break;
-
- case '0.2.7': // SQL queries for v0.2.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Link zum direkten Aufheben einer Urlaubsschaltung eines Mitgliedes korregiert.");
- break;
-
- case '0.2.8': // SQL queries for v0.2.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle.");
- break;
-
- case '0.2.9': // SQL queries for v0.2.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt. Update-Aufgaben werden nach "Bearbeitung" nicht mehr als <strong>Erledigt</strong> gesetzt. Dies hatte sonst den Anschein, die Update-Aufgaben müssten erledigt werden, um die Erweiterungs-Updates einzuspielen, was aber automatisch geschieht.");
- break;
-
- case '0.3.0': // SQL queries for v0.3.0
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Export-Accounts werden in Task-Übersicht aufgelistet.");
- break;
-
- case '0.3.1': // SQL queries for v0.3.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Diverse Fixes an den Templates (Notice-Hinweise vom PHP-Interpreter entfernt).");
- break;
-
- case '0.3.2': // SQL queries for v0.3.2
- // This update depends on user update
- EXT_ADD_UPDATE_DEPENDS('sql_patches');
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Hängt nun von <u>ext-user</u> ab.");
- break;
- }
- break;
-
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
// Keep this extension always active!
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- break;
-
-case 'remove': // Do stuff when removing extension
- // Drop theme table
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_themes`");
-
- // Delete admin menu
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='theme'");
-
- // Delete guest menu entries
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='themes'");
-
- // Delete member menu entries
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='themes' OR `what`='themes'");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("HTML-Code für ein Zeilen-Template ausgelagert.");
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
break;
- case '0.0.2': // SQL queries for v0.0.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
- break;
+ case 'remove': // Do stuff when removing extension
+ // Drop theme table
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_themes`");
- case '0.0.3': // SQL queries for v0.0.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Im Menüpunkt "Prüfen" wurden die bereits installierten und auch aktuellen Themes nicht ausgeblendet.");
- break;
+ // Delete admin menu
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='theme'");
- case '0.0.4': // SQL queries for v0.0.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle.");
- break;
+ // Delete guest menu entries
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='themes'");
- case '0.0.5': // SQL queries for v0.0.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("<strong>setSession()</strong> mit @-Zeichen gegen ungewollte Ausgaben abgesichert.");
+ // Delete member menu entries
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='themes' OR `what`='themes'");
break;
- case '0.0.6': // SQL queries for v0.0.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Variablen-Handling skriptglobal geändert.");
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.0.7': // SQL queries for v0.0.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Ungültiges Update.");
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.0.8': // SQL queries for v0.0.8
- // Theme table
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_themes`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_themes` (
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("HTML-Code für ein Zeilen-Template ausgelagert.");
+ break;
+
+ case '0.0.2': // SQL queries for v0.0.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ break;
+
+ case '0.0.3': // SQL queries for v0.0.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Im Menüpunkt "Prüfen" wurden die bereits installierten und auch aktuellen Themes nicht ausgeblendet.");
+ break;
+
+ case '0.0.4': // SQL queries for v0.0.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle.");
+ break;
+
+ case '0.0.5': // SQL queries for v0.0.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("<strong>setSession()</strong> mit @-Zeichen gegen ungewollte Ausgaben abgesichert.");
+ break;
+
+ case '0.0.6': // SQL queries for v0.0.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Variablen-Handling skriptglobal geändert.");
+ break;
+
+ case '0.0.7': // SQL queries for v0.0.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Ungültiges Update.");
+ break;
+
+ case '0.0.8': // SQL queries for v0.0.8
+ // Theme table
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_themes`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_themes` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
theme_path VARCHAR(255) NOT NULL DEFAULT '',
theme_name VARCHAR(255) NOT NULL DEFAULT '',
INDEX (`theme_active`)
) TYPE={!_TABLE_TYPE!} COMMENT='Themes'");
- // Admin menu
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme', NULL, 'Themes','Verwalten Sie hier alle Designs (Themes) Ihres Mailtausch-Scriptes.', 8)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_import','Importieren','Es wird das Verzeichnis "theme" nach neuen Ordnern durchsucht und anschliessend in die Datenbank gesperrt aufgenommen.', 1)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_edit','Modifizieren','Ändern Sie Titel, Freigaben usw. an den Themes. Sie können bis auf das Standart-Theme "default" auch Themes aus der Datenbank entfernen. Vorher sollten Sie es jedoch vom Server löschen, damit es niht erneut importiert werden kann.', 2)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_check','Prüfen','Nach neuen Themes suchen bzw. nach Updates zu den Themes suchen.', 3)");
+ // Admin menu
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme', NULL, 'Themes','Verwalten Sie hier alle Designs (Themes) Ihres Mailtausch-Scriptes.', 8)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_import','Importieren','Es wird das Verzeichnis "theme" nach neuen Ordnern durchsucht und anschliessend in die Datenbank gesperrt aufgenommen.', 1)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_edit','Modifizieren','Ändern Sie Titel, Freigaben usw. an den Themes. Sie können bis auf das Standart-Theme "default" auch Themes aus der Datenbank entfernen. Vorher sollten Sie es jedoch vom Server löschen, damit es niht erneut importiert werden kann.', 2)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_check','Prüfen','Nach neuen Themes suchen bzw. nach Updates zu den Themes suchen.', 3)");
- // Guest menu
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',4,'Y','N')");
+ // Guest menu
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',4,'Y','N')");
- // Memember menu
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',3,'Y','N')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','themes','Designs', 6,'Y','N')");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `sort`='8' WHERE `action`='themes' LIMIT 1");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='account', `sort`='1', `title`='Designs' WHERE `what`='themes' LIMIT 1");
+ // Memember menu
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',3,'Y','N')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','themes','Designs', 6,'Y','N')");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `sort`='8' WHERE `action`='themes' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='account', `sort`='1', `title`='Designs' WHERE `what`='themes' LIMIT 1");
- // User data
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD curr_theme VARCHAR(255) NOT NULL DEFAULT 'default'");
+ // User data
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD curr_theme VARCHAR(255) NOT NULL DEFAULT 'default'");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Update von <u>sql_patches</u> übertragen. (Kann Fehlermeldungen verursacht haben!)");
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Update von <u>sql_patches</u> übertragen. (Kann Fehlermeldungen verursacht haben!)");
+ break;
+ }
break;
- }
- break;
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','top10','TOP-10','Y','Y', 7)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_top10','TOP-10 Listen','Stellen Sie hier ein, wie lang die TOP-Listen sein sollen, also wie viele Plätze angezeigt werden sollen.', 8)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD top10_max TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='top10'");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_top10'");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='top10' LIMIT 1");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='top10' LIMIT 1");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler <em>Column: 'userid' in group statement is ambiguous</em> im Gastbereich beseitigt.");
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','top10','TOP-10','Y','Y', 7)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_top10','TOP-10 Listen','Stellen Sie hier ein, wie lang die TOP-Listen sein sollen, also wie viele Plätze angezeigt werden sollen.', 8)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD top10_max TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
break;
- case '0.0.2': // SQL queries for v0.0.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert.");
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='top10'");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_top10'");
break;
- case '0.0.3': // SQL queries for v0.0.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='top10' LIMIT 1");
break;
- case '0.0.4': // SQL queries for v0.0.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='top10' LIMIT 1");
break;
- case '0.0.5': // SQL queries for v0.0.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler <em>Column: 'userid' in group statement is ambiguous</em> im Gastbereich beseitigt.");
+ break;
+
+ case '0.0.2': // SQL queries for v0.0.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert.");
+ break;
+
+ case '0.0.3': // SQL queries for v0.0.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.0.4': // SQL queries for v0.0.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
+ break;
+
+ case '0.0.5': // SQL queries for v0.0.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+ break;
+
+ case '0.0.6': // SQL queries for v0.0.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Im Gastbereich konnte als Nicht-Admin die Seite nicht geöffnet werden.");
+ break;
+
+ case '0.0.7': // SQL queries for v0.0.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut.");
+ break;
+
+ case '0.0.8': // SQL queries for v0.0.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ break;
+
+ case '0.0.9': // SQL queries for v0.0.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Rechtschreibefehler beseitigt.");
+ break;
+
+ case '0.1.0': // SQL queries for v0.2.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+ break;
+
+ case '0.1.1': // SQL queries for v0.1.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ break;
+
+ case '0.1.2': // SQL queries for v0.1.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+ break;
+ }
break;
- case '0.0.6': // SQL queries for v0.0.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Im Gastbereich konnte als Nicht-Admin die Seite nicht geöffnet werden.");
- break;
-
- case '0.0.7': // SQL queries for v0.0.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut.");
- break;
-
- case '0.0.8': // SQL queries for v0.0.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
- break;
-
- case '0.0.9': // SQL queries for v0.0.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Rechtschreibefehler beseitigt.");
- break;
-
- case '0.1.0': // SQL queries for v0.2.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
- break;
-
- case '0.1.1': // SQL queries for v0.1.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
- break;
-
- case '0.1.2': // SQL queries for v0.1.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
- break;
- }
- break;
-
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running
- // SQL commands to run
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_in`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_out`");
+ case 'register': // Do stuff when installation is running
+ // SQL commands to run
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_in`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_out`");
- // Transfer from a member
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_transfers_in` (
+ // Transfer from a member
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_transfers_in` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
from_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY(id)
) Type={!_TABLE_TYPE!}");
- // Transfers to a member
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_transfers_out` (
+ // Transfers to a member
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_transfers_out` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
to_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY(id)
) Type={!_TABLE_TYPE!}");
- // Admin menu
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer', NULL, '{!POINTS!}-Transfer','Verwalten Sie hier die {!POINTS!}-Transaktionen zwischen Ihren Mitgliedern.', 7)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','list_transfer','Auflisten','Hier bekommen Sie alle ein- und ausgehende Transaktionen aufgelistet.', 1)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','config_transfer','Einstellungen','Stellen Sie ein, wie viele Transaktionen aufgelistet werden sollen und wie alt diese werden dürfen. Die evtl. installierte autopurge-Erweiterung kann dann automatisch die veralteten Transktionen löschen.', 2)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','del_transfer','Manuell löschen','Hier können Sie - abgesehen von der automatischen Löschung - Transaktionen selber löschen. Bitte beachten Sie, dass immer aus- und eingehende Transaktionen gleichzeitig gelöscht werden.', 3)");
-
- // Member menu
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','transfer','{!POINTS!}-Transfer','Y','Y', 5)");
-
- // Add config values
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '50'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_age BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('one_day')*28)."'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '".getConfig('one_day')."'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_balance BIGINT(20) UNSIGNED NOT NULL DEFAULT 100");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 5");
-
- // Add row(s) to user's data
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD opt_in ENUM('Y','N') NOT NULL DEFAULT 'N'");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_in`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_out`");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='transfer'");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='transfer'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP `opt_in`");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='transfer' LIMIT 1");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='transfer' LIMIT 1");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.2': // SQL queries for v0.0.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler <div class=\"admin_failed\">Warning: Missing argument 2 for create_timestamp_from_selections() in {!PATH!}inc/libs/pro_functions.php on line 227</div> behoben.");
- break;
-
- case '0.0.3': // SQL queries for v0.0.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Überflüssige unset()-Anweisungen aus der what-config_transfer.php entfernt. Dies wird bereits von der eigenen Funktion ADMIN_SAVE_SETTINGS() erledigt.");
- break;
-
- case '0.0.3': // SQL queries for v0.0.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
- break;
-
- case '0.0.5': // SQL queries for v0.0.5
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_transfer ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Link <em>Auflisten</em> im Admin-Bereich hatte das eingeloggte Mitglied und nicht den eingeloggten Admin abgefragt. Automatisches Löschen von veraltete Einträgen kann unabhängig von der autopurge-Erweiterung de-/aktiviert werden. Bitte aktualisieren Sie auch die beiden Admin-Templates!");
- break;
-
- case '0.0.6': // SQL queries for v0.0.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert.");
- break;
-
- case '0.0.7': // SQL queries for v0.0.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
- break;
-
- case '0.0.8': // SQL queries for v0.0.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Problem mit E in Transaktionsnummer beseitigt.");
- break;
-
- case '0.0.9': // SQL queries for v0.0.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
- break;
-
- case '0.1.0': // SQL queries for v0.2.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
- break;
-
- case '0.1.1': // SQL queries for v0.1.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut.");
- break;
-
- case '0.1.2': // SQL queries for v0.1.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
- break;
-
- case '0.1.3': // SQL queries for v0.1.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt.");
- break;
+ // Admin menu
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer', NULL, '{!POINTS!}-Transfer','Verwalten Sie hier die {!POINTS!}-Transaktionen zwischen Ihren Mitgliedern.', 7)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','list_transfer','Auflisten','Hier bekommen Sie alle ein- und ausgehende Transaktionen aufgelistet.', 1)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','config_transfer','Einstellungen','Stellen Sie ein, wie viele Transaktionen aufgelistet werden sollen und wie alt diese werden dürfen. Die evtl. installierte autopurge-Erweiterung kann dann automatisch die veralteten Transktionen löschen.', 2)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','del_transfer','Manuell löschen','Hier können Sie - abgesehen von der automatischen Löschung - Transaktionen selber löschen. Bitte beachten Sie, dass immer aus- und eingehende Transaktionen gleichzeitig gelöscht werden.', 3)");
- case '0.1.4': // SQL queries for v0.1.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
- break;
-
- case '0.1.5': // SQL queries for v0.1.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Template <u>admin_config_transfer_pro.tpl</u> ist überflüssig geworden. Bitte löschen Sie dies!");
- break;
-
- case '0.1.6': // SQL queries for v0.1.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
- break;
-
- case '0.1.7': // SQL queries for v0.1.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Wort <strong>Punkte</strong> dynamisiert.");
- break;
-
- case '0.1.8': // SQL queries for v0.1.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
- break;
-
- case '0.1.9': // SQL queries for v0.1.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Parser-Error im Mitgliedsbereich beseitigt.");
- break;
-
- case '0.2.0': // SQL queries for v0.2.0
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
- break;
-
- case '0.2.1': // SQL queries for v0.2.1
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Durchführung des Transfers korregiert.");
- break;
-
- case '0.2.2': // SQL queries for v0.2.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle.");
- break;
-
- case '0.2.3': // SQL queries for v0.2.3
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'list_transfer')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'del_transfer')");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('config', '', 'config_transfer')");
-
- // Depends on sql_patches (or you have to execute these both SQL statements by phpMyAdmin
- EXT_ADD_UPDATE_DEPENDS('sql_patches');
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Erweiterung in's neue Menüsystem integriert.");
- break;
-
- case '0.2.4': // SQL queries for v0.2.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("<strong>Touring-Code wiederholen</strong> nach <strong>Touring-Code eingeben</strong> hin geändert.");
- break;
+ // Member menu
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','transfer','{!POINTS!}-Transfer','Y','Y', 5)");
- case '0.2.5': // SQL queries for v0.2.5
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='5' WHERE `what`='transfer' LIMIT 1");
+ // Add config values
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '50'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_age BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('one_day')*28)."'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '".getConfig('one_day')."'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_balance BIGINT(20) UNSIGNED NOT NULL DEFAULT 100");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 5");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett geändert.");
+ // Add row(s) to user's data
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD opt_in ENUM('Y','N') NOT NULL DEFAULT 'N'");
break;
- case '0.2.6': // SQL queries for v0.2.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.");
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_in`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_out`");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='transfer'");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='transfer'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP `opt_in`");
break;
- case '0.2.7': // SQL queries for v0.2.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Die {!POINTS!} können nun wieder wie gewohnt transferiert werden. Der Grund für <em>{--TRANSFER_INVALID_PASSWORD--}</em> war, dass der Cookie-Hash ein anderer ist, als der in der Datenbank... :-/");
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='transfer' LIMIT 1");
break;
- case '0.2.8': // SQL queries for v0.2.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlermeldung <em>Notice: Undefined index: to_uid in {!PATH!}/inc/modules/member/what-transfer.php on line 301</em> gefixt. Danke an <a href=\"http://forum.mxchange.org/profile-8.html\" target=\"_blank\" title=\"Forumprofil von Piter01\">Piter01</a>.");
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='transfer' LIMIT 1");
break;
- case '0.2.9': // SQL queries for v0.2.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.2': // SQL queries for v0.0.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler <div class=\"admin_failed\">Warning: Missing argument 2 for create_timestamp_from_selections() in {!PATH!}inc/libs/pro_functions.php on line 227</div> behoben.");
+ break;
+
+ case '0.0.3': // SQL queries for v0.0.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Überflüssige unset()-Anweisungen aus der what-config_transfer.php entfernt. Dies wird bereits von der eigenen Funktion ADMIN_SAVE_SETTINGS() erledigt.");
+ break;
+
+ case '0.0.3': // SQL queries for v0.0.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.");
+ break;
+
+ case '0.0.5': // SQL queries for v0.0.5
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_transfer ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Link <em>Auflisten</em> im Admin-Bereich hatte das eingeloggte Mitglied und nicht den eingeloggten Admin abgefragt. Automatisches Löschen von veraltete Einträgen kann unabhängig von der autopurge-Erweiterung de-/aktiviert werden. Bitte aktualisieren Sie auch die beiden Admin-Templates!");
+ break;
+
+ case '0.0.6': // SQL queries for v0.0.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert.");
+ break;
+
+ case '0.0.7': // SQL queries for v0.0.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.0.8': // SQL queries for v0.0.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Problem mit E in Transaktionsnummer beseitigt.");
+ break;
+
+ case '0.0.9': // SQL queries for v0.0.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt.");
+ break;
+
+ case '0.1.0': // SQL queries for v0.2.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.");
+ break;
+
+ case '0.1.1': // SQL queries for v0.1.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut.");
+ break;
+
+ case '0.1.2': // SQL queries for v0.1.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ break;
+
+ case '0.1.3': // SQL queries for v0.1.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt.");
+ break;
+
+ case '0.1.4': // SQL queries for v0.1.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
+ break;
+
+ case '0.1.5': // SQL queries for v0.1.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Template <u>admin_config_transfer_pro.tpl</u> ist überflüssig geworden. Bitte löschen Sie dies!");
+ break;
+
+ case '0.1.6': // SQL queries for v0.1.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+ break;
+
+ case '0.1.7': // SQL queries for v0.1.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Wort <strong>Punkte</strong> dynamisiert.");
+ break;
+
+ case '0.1.8': // SQL queries for v0.1.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.");
+ break;
+
+ case '0.1.9': // SQL queries for v0.1.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Parser-Error im Mitgliedsbereich beseitigt.");
+ break;
+
+ case '0.2.0': // SQL queries for v0.2.0
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ break;
+
+ case '0.2.1': // SQL queries for v0.2.1
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Durchführung des Transfers korregiert.");
+ break;
+
+ case '0.2.2': // SQL queries for v0.2.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle.");
+ break;
+
+ case '0.2.3': // SQL queries for v0.2.3
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'list_transfer')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'del_transfer')");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('config', '', 'config_transfer')");
+
+ // Depends on sql_patches (or you have to execute these both SQL statements by phpMyAdmin
+ EXT_ADD_UPDATE_DEPENDS('sql_patches');
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Erweiterung in's neue Menüsystem integriert.");
+ break;
+
+ case '0.2.4': // SQL queries for v0.2.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("<strong>Touring-Code wiederholen</strong> nach <strong>Touring-Code eingeben</strong> hin geändert.");
+ break;
+
+ case '0.2.5': // SQL queries for v0.2.5
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='5' WHERE `what`='transfer' LIMIT 1");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett geändert.");
+ break;
+
+ case '0.2.6': // SQL queries for v0.2.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.");
+ break;
+
+ case '0.2.7': // SQL queries for v0.2.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Die {!POINTS!} können nun wieder wie gewohnt transferiert werden. Der Grund für <em>{--TRANSFER_INVALID_PASSWORD--}</em> war, dass der Cookie-Hash ein anderer ist, als der in der Datenbank... :-/");
+ break;
+
+ case '0.2.8': // SQL queries for v0.2.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlermeldung <em>Notice: Undefined index: to_uid in {!PATH!}/inc/modules/member/what-transfer.php on line 301</em> gefixt. Danke an <a href=\"http://forum.mxchange.org/profile-8.html\" target=\"_blank\" title=\"Forumprofil von Piter01\">Piter01</a>.");
+ break;
+
+ case '0.2.9': // SQL queries for v0.2.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+ break;
+ }
break;
- }
- break;
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- if ((isResetModeEnabled()) && (getConfig('ap_transfer') == 'Y')) {
- // Automatically remove outdated or not displayed transactions
- TRANSFER_AUTPPURGE(getConfig('transfer_max'), getConfig('transfer_age'));
- }
- break;
+ default: // Do stuff when extension is loaded
+ if ((isResetModeEnabled()) && (getConfig('ap_transfer') == 'Y')) {
+ // Automatically remove outdated or not displayed transactions
+ TRANSFER_AUTPPURGE(getConfig('transfer_max'), getConfig('transfer_age'));
+ }
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats','usage','Aufrufstatistik','Erkennt automatisch Ihre Aufrufstatisiken und bindet diese in das Admin-Interface ein. (Derzeit nur Webalizer!)',9)");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `usage_base` VARCHAR(255) NOT NULL DEFAULT 'usage'");
- break;
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats','usage','Aufrufstatistik','Erkennt automatisch Ihre Aufrufstatisiken und bindet diese in das Admin-Interface ein. (Derzeit nur Webalizer!)',9)");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `usage_base` VARCHAR(255) NOT NULL DEFAULT 'usage'");
+ break;
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='usage'");
- break;
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='usage'");
+ break;
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- break;
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ break;
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- break;
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ break;
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- ADD_EXT_SQL("");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ ADD_EXT_SQL('');
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("");
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES('');
+ break;
+ }
break;
- }
- break;
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_cats`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_cats` (
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_cats`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_cats` (
`id` BIGINT(22) NOT NULL AUTO_INCREMENT,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`cat_id` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
INDEX (`cat_id`)
) TYPE={!_TABLE_TYPE!}");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_data`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_data` (
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_data`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_data` (
`userid` BIGINT(22) NOT NULL AUTO_INCREMENT,
`surname` VARCHAR(255) NOT NULL DEFAULT '',
`family` VARCHAR(255) NOT NULL DEFAULT '',
INDEX `status_mails` (`status`,`max_mails`)
) TYPE={!_TABLE_TYPE!}");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_points`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_points` (
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_points`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_points` (
`id` BIGINT(22) NOT NULL AUTO_INCREMENT,
`userid` BIGINT(22) NOT NULL DEFAULT 0,
`ref_depth` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
INDEX (`userid`)
) TYPE={!_TABLE_TYPE!}");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_links`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_links` (
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_links`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_links` (
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`stats_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
INDEX (`stats_id`)
) TYPE={!_TABLE_TYPE!}");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_stats` (
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_stats` (
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`cat_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
INDEX (`pool_id`)
) TYPE={!_TABLE_TYPE!}");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats_data`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_stats_data` (
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats_data`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_stats_data` (
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`stats_type` VARCHAR(255) NOT NULL DEFAULT 'unknown',
INDEX (`stats_type`)
) TYPE={!_TABLE_TYPE!} COMMENT='Member statistics data'");
- // Admin menu
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user',NULL,'Mitglieder-Management','Mitglieder freischalten, sperren, Accounts editieren, Neuanmeldungen verwalten, {!POINTS!} gutschreiben und abziehen und und und...',3)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','del_user','Mitglied löschen','Löschen Sie hier Mitglied, die gegen die AGBs mehrmals verstossen haben. Bitte seien Sie nett zu Ihren Mitgliedern und löschen Sie nicht gleich.',1)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','chk_regs','Anmeldungen prüfen','Prüfen Sie hier neue Anmeldungen zu Ihrem System. Hier können Sie im Falle einer Fehler-Mail den Mitglied gleich wieder löschen!',2)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','lock_user','Mitglied sperren / entsperren','Sperren Sie Mitglied, die zu viele unbestätigte Mails haben oder gegen Ihre AGBs verstossen haben über diesen Menüpunkt.',3)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_user','Mitglied auflisten','Listen Sie alle Mitglied oder eingeschränkt nach Suchkritieren Ihre Userdatenbank auf. Sie könen per Klick auf die Usernummer sich Details zum Mitglied ansehen.',4)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','add_points','{!POINTS!} gutschreiben','Buchen Sie einem Mitglied direkt {!POINTS!} auf. Sie können dazu auch einen Kommentar mitsenden.',5)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','edit_user','Account editieren','Daten eines Mitglieder-Accountes ändern.',6)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_refs','Referals anzeigen','Mit diesem Menüpunkt können Sie die generierten Referals eines Mitgliedes auflisten.',7)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_links','Unbestätigte Mails','Mit diesem Menüpunkt können Sie die vom Mitglied nicht bestätigten Mails anzeigen.',8)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_cats','Kategorien anzeigen','Listet die ausgewählten Kategorien eines Mitgliedes auf.',9)");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what` IN('config_user','user_contct','list_user_del') OR `action`='user'");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_del`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_cats`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_data`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_points`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_links`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats_data`");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.1.0': // SQL queries for v0.1
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_limit` INT(7) UNSIGNED NOT NULL DEFAULT 20");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Seitenweises Anzeigen der User-Liste ist nun möglich.");
+ // Admin menu
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user',NULL,'Mitglieder-Management','Mitglieder freischalten, sperren, Accounts editieren, Neuanmeldungen verwalten, {!POINTS!} gutschreiben und abziehen und und und...',3)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','del_user','Mitglied löschen','Löschen Sie hier Mitglied, die gegen die AGBs mehrmals verstossen haben. Bitte seien Sie nett zu Ihren Mitgliedern und löschen Sie nicht gleich.',1)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','chk_regs','Anmeldungen prüfen','Prüfen Sie hier neue Anmeldungen zu Ihrem System. Hier können Sie im Falle einer Fehler-Mail den Mitglied gleich wieder löschen!',2)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','lock_user','Mitglied sperren / entsperren','Sperren Sie Mitglied, die zu viele unbestätigte Mails haben oder gegen Ihre AGBs verstossen haben über diesen Menüpunkt.',3)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_user','Mitglied auflisten','Listen Sie alle Mitglied oder eingeschränkt nach Suchkritieren Ihre Userdatenbank auf. Sie könen per Klick auf die Usernummer sich Details zum Mitglied ansehen.',4)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','add_points','{!POINTS!} gutschreiben','Buchen Sie einem Mitglied direkt {!POINTS!} auf. Sie können dazu auch einen Kommentar mitsenden.',5)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','edit_user','Account editieren','Daten eines Mitglieder-Accountes ändern.',6)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_refs','Referals anzeigen','Mit diesem Menüpunkt können Sie die generierten Referals eines Mitgliedes auflisten.',7)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_links','Unbestätigte Mails','Mit diesem Menüpunkt können Sie die vom Mitglied nicht bestätigten Mails anzeigen.',8)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_cats','Kategorien anzeigen','Listet die ausgewählten Kategorien eines Mitgliedes auf.',9)");
break;
- case '0.1.1': // SQL queries for v0.1.1
- // This update depends on sql_patches update!
- EXT_ADD_UPDATE_DEPENDS('sql_patches');
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Ungültiges Update.");
- break;
-
- case '0.1.2': // SQL queries for v0.1.2
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `mails_confirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Dem Mitglied wird nun angezeigt, wie viele Mails er bestätigt hat. Alle vor dieser Version best. Mails werden leider nicht mehr berücksichtigt! Bitte teilen Sie dies Ihren Mitgliedern mit.");
- break;
-
- case '0.1.3': // SQL queries for v0.1.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Den Pfad <em>Sie sind hier</em> im Menüpunkt <u>Online-Liste</u> erweitert.");
- break;
-
- case '0.1.4': // SQL queries for v0.1.4
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `emails_received` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Anzahl empfangener Mails wird angezeigt. <big>Diese Anzeige kann fehlerhaft sein, wenn Sie bereits Mitglieder in Ihrem {!MT_WORD!} haben sollen!</big>");
- break;
-
- case '0.1.5': // SQL queries for v0.1.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
- break;
-
- case '0.1.6': // SQL queries for v0.1.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
- break;
-
- case '0.1.7': // SQL queries for v0.1.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
- break;
-
- case '0.1.8': // SQL queries for v0.1.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
- break;
-
- case '0.1.9': // SQL queries for v0.1.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
- break;
-
- case '0.2.0': // SQL queries for v0.2.0
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("User-Liste ausgelagert in Templates und überbreite Zeile in 2er-Zeile umgewandelt.");
- break;
-
- case '0.2.1': // SQL queries for v0.2.1
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_alpha` TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_user','Mitgliederliste','Anzahl Mitglieder pro Seite, Anzahl Buchstaben pro Zeile usw.', 8)");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("User-Liste ist konfigurierbar: Anzahl Mitglieder pro Seite und Anzahl Buchstaben pro Zeile; Template-Fehler beseitigt.");
- break;
-
- case '0.2.2': // SQL queries for v0.2.2
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE `gender` `gender` ENUM('M','F','C') NOT NULL DEFAULT 'M'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Anrede "Firma" hinzugefügt.");
- break;
-
- case '0.2.3': // SQL queries for v0.2.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausführlich.");
- break;
-
- case '0.2.4': // SQL queries for v0.2.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
- break;
-
- case '0.2.5': // SQL queries for v0.2.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("SQL-Anweisungen abgesichert.");
- break;
-
- case '0.2.6': // SQL queries for v0.2.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
- break;
-
- case '0.2.7': // SQL queries for v0.2.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle.");
- break;
-
- case '0.2.8': // SQL queries for v0.2.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt.");
- break;
-
- case '0.2.9': // SQL queries for v0.2.9
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','user_contct','Mitglied kontaktieren','Kontaktieren Sie hier Ihre Mitglieder ganz direkt über ein Webformular. Sie brauchen somit kein EMail-Programm mehr starten!', 8)");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Admin-Kontaktformular hinzugefügt.");
- break;
-
- case '0.3.0': // SQL queries for v0.3.0
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.<br />Diverse Fixes für <em>0.2.1-Beta1</em> Release.");
- break;
-
- case '0.3.1': // SQL queries for v0.3.1
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title` = 'Mitglieder-Management' WHERE `action`='user' AND (`what`='' OR `what` IS NULL) LIMIT 1");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Verwaltung auf Management umgestellt");
- break;
-
- case '0.3.2': // SQL queries for v0.3.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("PHP-Hinweis in Userauflistung gefixt (trat bei fehlender nickname-Erweiterung auf) und Darstellungsfehler von <strong>0.00000</strong> unbestätigten Mails gefixt.");
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what` IN('config_user','user_contct','list_user_del') OR `action`='user'");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_del`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_cats`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_data`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_points`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_links`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats`");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_stats_data`");
break;
- case '0.3.3': // SQL queries for v0.3.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Mitglieder sind nun per Formular kontaktierbar (es wird eine EMail versendet), gesperrte und bestätigte Mitglieder-Accounts sind seperat oder gemeinsam auflistbar (seperat nur mit der Erweiterung <em>task</em>!)");
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.3.4': // SQL queries for v0.3.4
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `select_user_zero_refid` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_min_confirmed` SMALLINT(5) UNSIGNED NOT NULL DEFAULT 10");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `rand_confirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Mitglieder werden per Zufall als Referal-ID ausgewählt, die eine Mindestanzahl an bestätigten Mails haben, wenn die Ref-Id 0 ist.");
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL('');
break;
- case '0.3.5': // SQL queries for v0.3.5
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `lock_reason` TINYTEXT");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `lock_timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_delete_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 30)."");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_user_del','Löschungen auflisten','Listet die Löschungen von Usern auf.', 9)");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_del`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_del` (
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.1.0': // SQL queries for v0.1
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_limit` INT(7) UNSIGNED NOT NULL DEFAULT 20");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Seitenweises Anzeigen der User-Liste ist nun möglich.");
+ break;
+
+ case '0.1.1': // SQL queries for v0.1.1
+ // This update depends on sql_patches update!
+ EXT_ADD_UPDATE_DEPENDS('sql_patches');
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Ungültiges Update.");
+ break;
+
+ case '0.1.2': // SQL queries for v0.1.2
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `mails_confirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Dem Mitglied wird nun angezeigt, wie viele Mails er bestätigt hat. Alle vor dieser Version best. Mails werden leider nicht mehr berücksichtigt! Bitte teilen Sie dies Ihren Mitgliedern mit.");
+ break;
+
+ case '0.1.3': // SQL queries for v0.1.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Den Pfad <em>Sie sind hier</em> im Menüpunkt <u>Online-Liste</u> erweitert.");
+ break;
+
+ case '0.1.4': // SQL queries for v0.1.4
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `emails_received` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Anzahl empfangener Mails wird angezeigt. <big>Diese Anzeige kann fehlerhaft sein, wenn Sie bereits Mitglieder in Ihrem {!MT_WORD!} haben sollen!</big>");
+ break;
+
+ case '0.1.5': // SQL queries for v0.1.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.1.6': // SQL queries for v0.1.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.1.7': // SQL queries for v0.1.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
+ break;
+
+ case '0.1.8': // SQL queries for v0.1.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> überflüssige HTML-Tags entfernt.");
+ break;
+
+ case '0.1.9': // SQL queries for v0.1.9
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
+ break;
+
+ case '0.2.0': // SQL queries for v0.2.0
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("User-Liste ausgelagert in Templates und überbreite Zeile in 2er-Zeile umgewandelt.");
+ break;
+
+ case '0.2.1': // SQL queries for v0.2.1
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_alpha` TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_user','Mitgliederliste','Anzahl Mitglieder pro Seite, Anzahl Buchstaben pro Zeile usw.', 8)");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("User-Liste ist konfigurierbar: Anzahl Mitglieder pro Seite und Anzahl Buchstaben pro Zeile; Template-Fehler beseitigt.");
+ break;
+
+ case '0.2.2': // SQL queries for v0.2.2
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE `gender` `gender` ENUM('M','F','C') NOT NULL DEFAULT 'M'");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Anrede "Firma" hinzugefügt.");
+ break;
+
+ case '0.2.3': // SQL queries for v0.2.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausführlich.");
+ break;
+
+ case '0.2.4': // SQL queries for v0.2.4
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Wörter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+ break;
+
+ case '0.2.5': // SQL queries for v0.2.5
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("SQL-Anweisungen abgesichert.");
+ break;
+
+ case '0.2.6': // SQL queries for v0.2.6
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
+ break;
+
+ case '0.2.7': // SQL queries for v0.2.7
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle.");
+ break;
+
+ case '0.2.8': // SQL queries for v0.2.8
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt.");
+ break;
+
+ case '0.2.9': // SQL queries for v0.2.9
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','user_contct','Mitglied kontaktieren','Kontaktieren Sie hier Ihre Mitglieder ganz direkt über ein Webformular. Sie brauchen somit kein EMail-Programm mehr starten!', 8)");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Admin-Kontaktformular hinzugefügt.");
+ break;
+
+ case '0.3.0': // SQL queries for v0.3.0
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.<br />Diverse Fixes für <em>0.2.1-Beta1</em> Release.");
+ break;
+
+ case '0.3.1': // SQL queries for v0.3.1
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title` = 'Mitglieder-Management' WHERE `action`='user' AND (`what`='' OR `what` IS NULL) LIMIT 1");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Verwaltung auf Management umgestellt");
+ break;
+
+ case '0.3.2': // SQL queries for v0.3.2
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("PHP-Hinweis in Userauflistung gefixt (trat bei fehlender nickname-Erweiterung auf) und Darstellungsfehler von <strong>0.00000</strong> unbestätigten Mails gefixt.");
+ break;
+
+ case '0.3.3': // SQL queries for v0.3.3
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Mitglieder sind nun per Formular kontaktierbar (es wird eine EMail versendet), gesperrte und bestätigte Mitglieder-Accounts sind seperat oder gemeinsam auflistbar (seperat nur mit der Erweiterung <em>task</em>!)");
+ break;
+
+ case '0.3.4': // SQL queries for v0.3.4
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `select_user_zero_refid` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_min_confirmed` SMALLINT(5) UNSIGNED NOT NULL DEFAULT 10");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `rand_confirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Mitglieder werden per Zufall als Referal-ID ausgewählt, die eine Mindestanzahl an bestätigten Mails haben, wenn die Ref-Id 0 ist.");
+ break;
+
+ case '0.3.5': // SQL queries for v0.3.5
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `lock_reason` TINYTEXT");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `lock_timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_delete_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 30)."");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_user_del','Löschungen auflisten','Listet die Löschungen von Usern auf.', 9)");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_del`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_del` (
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`email` VARCHAR(255) NOT NULL DEFAULT '',
PRIMARY KEY(`id`)
) TYPE={!_TABLE_TYPE!} COMMENT='List of deleted users'");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Der Sperrgrund wird nun mit abgespeichert und beim Löschen des Users mit ausgesendet.");
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Der Sperrgrund wird nun mit abgespeichert und beim Löschen des Users mit ausgesendet.");
+ break;
+ }
break;
- }
- break;
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- break;
+ default: // Do stuff when extension is loaded
+ break;
}
// Keep this extension always active!
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_wernis`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_wernis` (
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_wernis`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_wernis` (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
wernis_account VARCHAR(255) NOT NULL DEFAULT '',
PRIMARY KEY(id)
) TYPE={!_TABLE_TYPE!}");
- // Confiuration
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT '40000'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT '5000'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_api_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_api_md5 VARCHAR(32) NOT NULL DEFAULT ''");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_api_url VARCHAR(255) NOT NULL DEFAULT 'http://www.wds66.com/api/'");
-
- // User data
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD wernis_userid VARCHAR(6) NOT NULL DEFAULT ''");
-
- // Admin menu
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis', NULL, 'Wernis-Management','Konfiguration zur WDS66-API einstellen, Auszahlungen auflisten usw..', 15)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis','config_wernis','WDS66-API-Einstellungen','Konfiguration zur WDS66-API einstellen.', 1)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis','list_wernis','Wernis-Anfragen auflisten','Listet alle Wernis-Auszahlungsanfragen Ihrer Mitglieder auf.', 2)");
-
- // Member menu
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','wernis','Wernis-Ein-/Auszahlungen','N','N', 11)");
-
- // Guest menu
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','wernis_portal','WDS66-News','N','N', 7)");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_wernis`");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='wernis'");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='wernis'");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='wernis_portal'");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='wernis_portal' LIMIT 1");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='wernis' LIMIT 1");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='wernis_portal' LIMIT 1");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='wernis' LIMIT 1");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_factor FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_factor FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_fee_fix BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_fee_fix BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Ein-/Auszahlungsfunktion getrennt ein- und ausschaltbar, sowie mit Umrechungsfaktoren {!POINTS!}->Wernis versehen. Prozentualer Abzug als "Betreibergebühr hinzugefügt, was z.B. für Wechselstuben interessant ist.");
- break;
+ // Confiuration
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT '40000'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT '5000'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_api_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_api_md5 VARCHAR(32) NOT NULL DEFAULT ''");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_api_url VARCHAR(255) NOT NULL DEFAULT 'http://www.wds66.com/api/'");
+
+ // User data
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD wernis_userid VARCHAR(6) NOT NULL DEFAULT ''");
+
+ // Admin menu
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis', NULL, 'Wernis-Management','Konfiguration zur WDS66-API einstellen, Auszahlungen auflisten usw..', 15)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis','config_wernis','WDS66-API-Einstellungen','Konfiguration zur WDS66-API einstellen.', 1)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis','list_wernis','Wernis-Anfragen auflisten','Listet alle Wernis-Auszahlungsanfragen Ihrer Mitglieder auf.', 2)");
- case '0.0.2': // SQL queries for v0.0.2
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_pass_md5 VARCHAR(32) NOT NULL DEFAULT ''");
+ // Member menu
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','wernis','Wernis-Ein-/Auszahlungen','N','N', 11)");
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Auszahlunsfunktion an die neue API 0.2-BETA angepasst. Demnach muss Ihr Wernis-Passwort beim Auszahlen benutzt werden und in Ihrem {!MT_WORD!} als MD5-Hash gespeichert werden.");
+ // Guest menu
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','wernis_portal','WDS66-News','N','N', 7)");
break;
- case '0.0.3': // SQL queries for v0.0.3
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE `wernis_refid` `wernis_refid` INT(5) UNSIGNED ZEROFILL NOT NULL DEFAULT '00000'");
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_wernis`");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='wernis'");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='wernis'");
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='wernis_portal'");
+ break;
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Spaltentyp von VARCHAR(6) auf BIGINT(5) geändert.");
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='wernis_portal' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='wernis' LIMIT 1");
break;
- case '0.0.4': // SQL queries for v0.0.4
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `wernis_refid` INT(5) UNSIGNED ZEROFILL NOT NULL DEFAULT '00000'");
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='wernis_portal' LIMIT 1");
+ ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='wernis' LIMIT 1");
+ break;
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehlende Ref-Id hinzugetan.");
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_factor FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_factor FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_fee_fix BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_fee_fix BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Ein-/Auszahlungsfunktion getrennt ein- und ausschaltbar, sowie mit Umrechungsfaktoren {!POINTS!}->Wernis versehen. Prozentualer Abzug als "Betreibergebühr hinzugefügt, was z.B. für Wechselstuben interessant ist.");
+ break;
+
+ case '0.0.2': // SQL queries for v0.0.2
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_pass_md5 VARCHAR(32) NOT NULL DEFAULT ''");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Auszahlunsfunktion an die neue API 0.2-BETA angepasst. Demnach muss Ihr Wernis-Passwort beim Auszahlen benutzt werden und in Ihrem {!MT_WORD!} als MD5-Hash gespeichert werden.");
+ break;
+
+ case '0.0.3': // SQL queries for v0.0.3
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE `wernis_refid` `wernis_refid` INT(5) UNSIGNED ZEROFILL NOT NULL DEFAULT '00000'");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Spaltentyp von VARCHAR(6) auf BIGINT(5) geändert.");
+ break;
+
+ case '0.0.4': // SQL queries for v0.0.4
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `wernis_refid` INT(5) UNSIGNED ZEROFILL NOT NULL DEFAULT '00000'");
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES("Fehlende Ref-Id hinzugetan.");
+ break;
+ }
break;
- }
- break;
-case 'modify': // When the extension got modified
- break;
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- // Init array
- $GLOBALS['wernis_data'] = array();
- break;
+ default: // Do stuff when extension is loaded
+ // Init array
+ $GLOBALS['wernis_data'] = array();
+ break;
}
//
switch ($EXT_LOAD_MODE)
{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_sid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_passwd` VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_erotic_allowed` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_max_reload` SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(24 * 8)."");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_min_wait` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_clicks_remain` INT(7) UNSIGNED NOT NULL DEFAULT 1000");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_min_pay` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_requests_total` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_requests_remain` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200");
-
- // Admin menu
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_yoomedia','Yoo!Media Interface 2.0','Einstellungen zum Yoo!Media Interface 2.0, wie User-ID, Interface-Passwort und vieles mehr.',17)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','list_yoomedia_tm','Yoo!Media Textmails','Listet Textmail-Buchungen über das Interface 2.0 von Yoo!Media nach Ihren eingestellten Kriterien auf. <strong>Vorsicht:</strong> Jede Aktualisierung dieser Liste kostet Ihnen eine Abfrage!',10)");
-
- // Reload lock table
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_yoomedia_reload`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_yoomedia_reload` (
+ case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+ // SQL commands to run
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_sid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_passwd` VARCHAR(255) NOT NULL DEFAULT ''");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_erotic_allowed` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_max_reload` SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(24 * 8)."");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_min_wait` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_clicks_remain` INT(7) UNSIGNED NOT NULL DEFAULT 1000");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_tm_min_pay` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_requests_total` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200");
+ ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `yoomedia_requests_remain` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200");
+
+ // Admin menu
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_yoomedia','Yoo!Media Interface 2.0','Einstellungen zum Yoo!Media Interface 2.0, wie User-ID, Interface-Passwort und vieles mehr.',17)");
+ ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','list_yoomedia_tm','Yoo!Media Textmails','Listet Textmail-Buchungen über das Interface 2.0 von Yoo!Media nach Ihren eingestellten Kriterien auf. <strong>Vorsicht:</strong> Jede Aktualisierung dieser Liste kostet Ihnen eine Abfrage!',10)");
+
+ // Reload lock table
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_yoomedia_reload`");
+ ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_yoomedia_reload` (
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`type` VARCHAR(255) NOT NULL DEFAULT 'general',
`y_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE `y_type` (`type`,`y_id`)
) TYPE={!_TABLE_TYPE!} COMMENT='Reload lock reminder for Yoo!Media campaigns'");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what` IN('config_yoomedia','list_yoomedia_tm')");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_yoomedia_reload`");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- ADD_EXT_SQL("");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("");
break;
- }
- break;
-case 'modify': // When the extension got modified
- break;
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what` IN('config_yoomedia','list_yoomedia_tm')");
+ ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_yoomedia_reload`");
+ break;
+
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ break;
+
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ break;
+
+ case 'update': // Update an extension
+ switch ($EXT_VER)
+ {
+ case '0.0.1': // SQL queries for v0.0.1
+ ADD_EXT_SQL('');
+
+ // Update notes (these will be set as task text!)
+ EXT_SET_UPDATE_NOTES('');
+ break;
+ }
+ break;
+
+ case 'modify': // When the extension got modified
+ break;
-case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
- break;
+ case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ break;
-default: // Do stuff when extension is loaded
- // The translation table
- $GLOBALS['translation_tables']['yoomedia'] = array(
- // Error messages
+ default: // Do stuff when extension is loaded
+ // The translation table
+ $GLOBALS['translation_tables']['yoomedia'] = array(
+ // Error messages
'error_codes' => array(
- 1 => 'wrong_pass',
- 2 => 'wrong_sid',
- 3 => 'website_locked',
- 4 => 'api_data_error',
- 5 => 'requests_depleted',
- 6 => 'zero_result',
- 10 => 'incomplete_request'
- ),
- // For text mails
+ 1 => 'wrong_pass',
+ 2 => 'wrong_sid',
+ 3 => 'website_locked',
+ 4 => 'api_data_error',
+ 5 => 'requests_depleted',
+ 6 => 'zero_result',
+ 10 => 'incomplete_request'
+ ),
+ // For text mails
'textmail' => array(
- 0 => 'id',
- 1 => 'name',
- 2 => 'reload',
- 3 => 'wait',
- 4 => 'remain',
- 5 => 'pay',
- 6 => 'text'
- )
- );
- break;
+ 0 => 'id',
+ 1 => 'name',
+ 2 => 'reload',
+ 3 => 'wait',
+ 4 => 'remain',
+ 5 => 'pay',
+ 6 => 'text'
+ )
+ );
+ break;
}
// Keep this extension always active!
// Init the filter system (just some ideas)
$GLOBALS['filters']['chains'] = array(
- // Filters for pre-init phase
+ // Filters for pre-init phase
'preinit' => array(),
- // Filters for post-init phase
+ // Filters for post-init phase
'postinit' => array(),
- // Filters for shutdown phase
+ // Filters for shutdown phase
'shutdown' => array()
);
} // END - if
} // END - while
} // END - if
-
+
// Free result
SQL_FREERESULT($result);
} // END - if
foreach ($filterArray as $filterFunction => $cnt) {
// Construct and add the query
ADD_SQL(sprintf("UPDATE `{!_MYSQL_PREFIX!}_filters` SET `filter_counter`=%s WHERE `filter_name`='%s' AND `filter_function`='%s' LIMIT 1",
- bigintval($cnt),
- $filterName,
- $filterFunction
+ bigintval($cnt),
+ $filterName,
+ $filterFunction
));
} // END - foreach
} // END - foreach
// Load last module and last online time
$result = SQL_QUERY_ESC("SELECT last_module, last_online FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(getUserId()), __FUNCTION__, __LINE__);
+ array(getUserId()), __FUNCTION__, __LINE__);
// Entry found?
if (SQL_NUMROWS($result) == 1) {
// "what" not set?
if (empty($GLOBALS['what'])) {
// Fix it to default
- $GLOBALS['what'] = "welcome";
- if (getConfig('index_home') != '') $GLOBALS['what'] = getConfig('index_home');
+ $GLOBALS['what'] = "welcome";
+ if (getConfig('index_home') != '') $GLOBALS['what'] = getConfig('index_home');
} // END - if
// Update last module / online time
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `last_module`='%s', last_online=UNIX_TIMESTAMP(), REMOTE_ADDR='%s' WHERE userid=%s LIMIT 1",
- array($GLOBALS['what'], detectRemoteAddr(), getUserId()), __FUNCTION__, __LINE__);
+ array($GLOBALS['what'], detectRemoteAddr(), getUserId()), __FUNCTION__, __LINE__);
} else {
// Destroy session, we cannot update!
destroyUserSession();
// Output the generated HTML code or do nothing in direct-mode
if (getTotalFatalErrors() > 0) {
// Output fatal error messages
- loadIncludeOnce("inc/fatal_errors.php");
+ loadIncludeOnce('inc/fatal_errors.php');
} // END - if
// Shall we display the copyright notice?
- if ((!REQUEST_ISSET_GET(('frame'))) && (basename($_SERVER['PHP_SELF']) != "mailid_top.php") && (getConfig('WRITE_FOOTER') == 'Y') && ($GLOBALS['header_sent'] == '2')) {
+ if ((!REQUEST_ISSET_GET(('frame'))) && (basename($_SERVER['PHP_SELF']) != 'mailid_top.php') && (getConfig('WRITE_FOOTER') == 'Y') && ($GLOBALS['header_sent'] == '2')) {
// Backlink enabled?
if ((getConfig('ENABLE_BACKLINK') == 'Y') || (isInstalling())) {
// Copyright with backlink, thanks! :-)
- LOAD_TEMPLATE("copyright_backlink");
+ LOAD_TEMPLATE('copyright_backlink');
} else {
// No backlink in Copyright note
- LOAD_TEMPLATE("copyright");
+ LOAD_TEMPLATE('copyright');
}
} // END - if
} // END - if
// Load page footer
- LOAD_TEMPLATE("page_footer");
+ LOAD_TEMPLATE('page_footer');
// And the last closing HTML tag
- OUTPUT_HTML("</html>");
+ OUTPUT_HTML('</html>');
} // END - if
// Footer has been reached
$GLOBALS['footer_sent'] = 1;
// Output HTML code
-OUTPUT_HTML("");
+OUTPUT_HTML('');
// Shutdown
shutdown();
// Yes, so we handle it as you have configured
switch (getConfig('OUTPUT_MODE'))
{
- case 'render':
- // That's why you don't need any \n at the end of your HTML code... :-)
- if (constant('_OB_CACHING') == 'on') {
- // Output into PHP's internal buffer
- outputRawCode($HTML);
-
+ case 'render':
// That's why you don't need any \n at the end of your HTML code... :-)
- if ($newLine) echo "\n";
- } else {
- // Render mode for old or lame servers...
- $OUTPUT .= $HTML;
+ if (constant('_OB_CACHING') == 'on') {
+ // Output into PHP's internal buffer
+ outputRawCode($HTML);
- // That's why you don't need any \n at the end of your HTML code... :-)
- if ($newLine) $OUTPUT .= "\n";
- }
- break;
+ // That's why you don't need any \n at the end of your HTML code... :-)
+ if ($newLine) echo "\n";
+ } else {
+ // Render mode for old or lame servers...
+ $OUTPUT .= $HTML;
- case 'direct':
- // If we are switching from render to direct output rendered code
- if ((!empty($OUTPUT)) && (constant('_OB_CACHING') != 'on')) { outputRawCode($OUTPUT); $OUTPUT = ''; }
+ // That's why you don't need any \n at the end of your HTML code... :-)
+ if ($newLine) $OUTPUT .= "\n";
+ }
+ break;
- // The same as above... ^
- outputRawCode($HTML);
- if ($newLine) echo "\n";
- break;
+ case 'direct':
+ // If we are switching from render to direct output rendered code
+ if ((!empty($OUTPUT)) && (constant('_OB_CACHING') != 'on')) { outputRawCode($OUTPUT); $OUTPUT = ''; }
- default:
- // Huh, something goes wrong or maybe you have edited config.php ???
- app_die(__FUNCTION__, __LINE__, "<strong>{--FATAL_ERROR--}:</strong> {--LANG_NO_RENDER_DIRECT--}");
- break;
+ // The same as above... ^
+ outputRawCode($HTML);
+ if ($newLine) echo "\n";
+ break;
+
+ default:
+ // Huh, something goes wrong or maybe you have edited config.php ???
+ app_die(__FUNCTION__, __LINE__, "<strong>{--FATAL_ERROR--}:</strong> {--LANG_NO_RENDER_DIRECT--}");
+ break;
}
} elseif ((constant('_OB_CACHING') == 'on') && (isset($GLOBALS['footer_sent'])) && ($GLOBALS['footer_sent'] == 1)) {
// Headers already sent?
if ($template == "member_support_form") {
// Support request of a member
$result = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(getUserId()), __FUNCTION__, __LINE__);
+ array(getUserId()), __FUNCTION__, __LINE__);
// Is content an array?
if (is_array($content)) {
if ((!empty($GLOBALS['what'])) && ((strpos($template, "_header") > 0) || (strpos($template, "_footer") > 0)) && (($mode == "guest/") || ($mode == "member/") || ($mode == "admin/"))) {
// Select what depended header/footer template file for admin/guest/member area
$file2 = sprintf("%s%s%s_%s.tpl",
- $basePath,
- $mode,
- $template,
- SQL_ESCAPE($GLOBALS['what'])
+ $basePath,
+ $mode,
+ $template,
+ SQL_ESCAPE($GLOBALS['what'])
);
// Probe for it...
switch (getLanguage())
{
- case 'de': // German date / time format
- switch ($mode) {
- case '0': $ret = date("d.m.Y \u\m H:i \U\h\\r", $time); break;
- case '1': $ret = strtolower(date("d.m.Y - H:i", $time)); break;
- case '2': $ret = date("d.m.Y|H:i", $time); break;
- case '3': $ret = date("d.m.Y", $time); break;
- default:
- DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Invalid date mode %s detected.", $mode));
- break;
- }
- break;
-
- default: // Default is the US date / time format!
- switch ($mode) {
- case '0': $ret = date("r", $time); break;
- case '1': $ret = date("Y-m-d - g:i A", $time); break;
- case '2': $ret = date("y-m-d|H:i", $time); break;
- case '3': $ret = date("y-m-d", $time); break;
- default:
- DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Invalid date mode %s detected.", $mode));
- break;
- }
+ case 'de': // German date / time format
+ switch ($mode) {
+ case '0': $ret = date("d.m.Y \u\m H:i \U\h\\r", $time); break;
+ case '1': $ret = strtolower(date("d.m.Y - H:i", $time)); break;
+ case '2': $ret = date("d.m.Y|H:i", $time); break;
+ case '3': $ret = date("d.m.Y", $time); break;
+ default:
+ DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Invalid date mode %s detected.", $mode));
+ break;
+ }
+ break;
+
+ default: // Default is the US date / time format!
+ switch ($mode) {
+ case '0': $ret = date("r", $time); break;
+ case '1': $ret = date("Y-m-d - g:i A", $time); break;
+ case '2': $ret = date("y-m-d|H:i", $time); break;
+ case '3': $ret = date("y-m-d", $time); break;
+ default:
+ DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Invalid date mode %s detected.", $mode));
+ break;
+ }
}
return $ret;
}
// Translate it now
switch (getLanguage()) {
- case 'de':
- $dotted = number_format($dotted, $maxComma, ',', '.');
- break;
+ case 'de':
+ $dotted = number_format($dotted, $maxComma, ',', '.');
+ break;
- default:
- $dotted = number_format($dotted, $maxComma, '.', ',');
- break;
+ default:
+ $dotted = number_format($dotted, $maxComma, '.', ',');
+ break;
}
// Return translated value
function translateUserStatus ($status) {
switch ($status)
{
- case 'UNCONFIRMED':
- case 'CONFIRMED':
- case 'LOCKED':
- $ret = getMessage(sprintf("ACCOUNT_%s", $status));
- break;
-
- case '':
- case null:
- $ret = getMessage('ACCOUNT_DELETED');
- break;
-
- default:
- DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown status %s detected.", $status));
- $ret = sprintf(getMessage('UNKNOWN_STATUS'), $status);
- break;
+ case 'UNCONFIRMED':
+ case 'CONFIRMED':
+ case 'LOCKED':
+ $ret = getMessage(sprintf("ACCOUNT_%s", $status));
+ break;
+
+ case '':
+ case null:
+ $ret = getMessage('ACCOUNT_DELETED');
+ break;
+
+ default:
+ DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown status %s detected.", $status));
+ $ret = sprintf(getMessage('UNKNOWN_STATUS'), $status);
+ break;
}
// Return it
function FRAMETESTER ($URL) {
// Prepare frametester URL
$frametesterUrl = sprintf("{!URL!}/modules.php?module=frametester&url=%s",
- encodeString(compileUriCode($URL))
+ encodeString(compileUriCode($URL))
);
return $frametesterUrl;
}
return '<IMG border="0" alt="Code" src="{!URL!}/mailid_top.php?uid=' . $uid . '&' . $type . '=' . $DATA . '&mode=img&code=' . $code . '" />';
}
-// "Getter" for language
-function getLanguage () {
- // Set default return value to default language from config
- $ret = getConfig('DEFAULT_LANG');
-
- // Init variable
- $lang = '';
-
- // Is the variable set
- if (REQUEST_ISSET_GET('mx_lang')) {
- // Accept only first 2 chars
- $lang = substr(REQUEST_GET('mx_lang'), 0, 2);
- } elseif (isset($GLOBALS['cache_array']['language'])) {
- // Use cached
- $ret = $GLOBALS['cache_array']['language'];
- } elseif (!empty($lang)) {
- // Check if main language file does exist
- if (isFileReadable(constant('PATH') . 'inc/language/'.$lang.'.php')) {
- // Okay found, so let's update cookies
- setLanguage($lang);
- } // END - if
- } elseif (isSessionVariableSet('mx_lang')) {
- // Return stored value from cookie
- $ret = getSession('mx_lang');
-
- // Fixes a warning before the session has the mx_lang constant
- if (empty($ret)) $ret = getConfig('DEFAULT_LANG');
- }
-
- // Cache entry
- $GLOBALS['cache_array']['language'] = $ret;
-
- // Return value
- return $ret;
-}
-
-// "Setter" for language
-function setLanguage ($lang) {
- // Accept only first 2 chars!
- $lang = substr(SQL_ESCAPE(strip_tags($lang)), 0, 2);
-
- // Set cookie
- setSession('mx_lang', $lang);
-}
-
// Loads an email template and compiles it
function LOAD_EMAIL_TEMPLATE ($template, $content = array(), $UID = '0') {
global $DATA, $_CONFIG;
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):NICKNAME!<br />\n";
// Load nickname
$result = SQL_QUERY_ESC("SELECT surname, family, gender, email, nickname FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(bigintval($UID)), __FUNCTION__, __LINE__);
+ array(bigintval($UID)), __FUNCTION__, __LINE__);
} else {
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):NO-NICK!<br />\n";
/// Load normal data
$result = SQL_QUERY_ESC("SELECT surname, family, gender, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(bigintval($UID)), __FUNCTION__, __LINE__);
+ array(bigintval($UID)), __FUNCTION__, __LINE__);
}
// Fetch and merge data
} // END - if
// Three different debug ways...
- //* DEBUG: */ debug_report_bug(sprintf("%s[%s:] URL=%s", __FUNCTION__, __LINE__, $URL));
+ /* DEBUG: */ debug_report_bug(sprintf("%s[%s:] URL=%s", __FUNCTION__, __LINE__, $URL));
//* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, $URL);
//* DEBUG: */ die($URL);
}
switch ($type) {
- case "day": // Day
- for ($idx = 1; $idx < 32; $idx++) {
- $OUT .= "<option value=\"".$idx."\"";
- if ($default == $idx) $OUT .= ' selected="selected"';
- $OUT .= ">".$idx."</option>\n";
- } // END - for
- break;
+ case "day": // Day
+ for ($idx = 1; $idx < 32; $idx++) {
+ $OUT .= "<option value=\"".$idx."\"";
+ if ($default == $idx) $OUT .= ' selected="selected"';
+ $OUT .= ">".$idx."</option>\n";
+ } // END - for
+ break;
- case "month": // Month
- foreach ($GLOBALS['month_descr'] as $month => $descr) {
- $OUT .= "<option value=\"".$month."\"";
- if ($default == $month) $OUT .= ' selected="selected"';
- $OUT .= ">".$descr."</option>\n";
- } // END - for
- break;
+ case "month": // Month
+ foreach ($GLOBALS['month_descr'] as $month => $descr) {
+ $OUT .= "<option value=\"".$month."\"";
+ if ($default == $month) $OUT .= ' selected="selected"';
+ $OUT .= ">".$descr."</option>\n";
+ } // END - for
+ break;
- case "year": // Year
- // Get current year
- $year = date('Y', time());
+ case "year": // Year
+ // Get current year
+ $year = date('Y', time());
- // Use configured min age or fixed?
- if (GET_EXT_VERSION('other') >= '0.2.1') {
- // Configured
- $startYear = $year - getConfig('min_age');
- } else {
- // Fixed 16 years
- $startYear = $year - 16;
- }
+ // Use configured min age or fixed?
+ if (GET_EXT_VERSION('other') >= '0.2.1') {
+ // Configured
+ $startYear = $year - getConfig('min_age');
+ } else {
+ // Fixed 16 years
+ $startYear = $year - 16;
+ }
- // Calculate earliest year (100 years old people can still enter Internet???)
- $minYear = $year - 100;
+ // Calculate earliest year (100 years old people can still enter Internet???)
+ $minYear = $year - 100;
+
+ // Check if the default value is larger than minimum and bigger than actual year
+ if (($default > $minYear) && ($default >= $year)) {
+ for ($idx = $year; $idx < ($year + 11); $idx++) {
+ $OUT .= "<option value=\"".$idx."\"";
+ if ($default == $idx) $OUT .= ' selected="selected"';
+ $OUT .= ">".$idx."</option>\n";
+ } // END - for
+ } elseif ($default == -1) {
+ // Current year minus 1
+ for ($idx = $startYear; $idx <= ($year + 1); $idx++)
+ {
+ $OUT .= "<option value=\"".$idx."\">".$idx."</option>\n";
+ }
+ } else {
+ // Get current year and subtract the configured minimum age
+ $OUT .= "<option value=\"".($minYear - 1)."\"><".$minYear."</option>\n";
+ // Calculate earliest year depending on extension version
+ if (GET_EXT_VERSION('other') >= '0.2.1') {
+ // Use configured minimum age
+ $year = date('Y', time()) - getConfig('min_age');
+ } else {
+ // Use fixed 16 years age
+ $year = date('Y', time()) - 16;
+ }
- // Check if the default value is larger than minimum and bigger than actual year
- if (($default > $minYear) && ($default >= $year)) {
- for ($idx = $year; $idx < ($year + 11); $idx++) {
+ // Construct year selection list
+ for ($idx = $minYear; $idx <= $year; $idx++) {
+ $OUT .= "<option value=\"".$idx."\"";
+ if ($default == $idx) $OUT .= ' selected="selected"';
+ $OUT .= ">".$idx."</option>\n";
+ } // END - for
+ }
+ break;
+
+ case "sec":
+ case "min":
+ for ($idx = 0; $idx < 60; $idx+=5) {
+ if (strlen($idx) == 1) $idx = '0'.$idx;
$OUT .= "<option value=\"".$idx."\"";
if ($default == $idx) $OUT .= ' selected="selected"';
$OUT .= ">".$idx."</option>\n";
} // END - for
- } elseif ($default == -1) {
- // Current year minus 1
- for ($idx = $startYear; $idx <= ($year + 1); $idx++)
- {
- $OUT .= "<option value=\"".$idx."\">".$idx."</option>\n";
- }
- } else {
- // Get current year and subtract the configured minimum age
- $OUT .= "<option value=\"".($minYear - 1)."\"><".$minYear."</option>\n";
- // Calculate earliest year depending on extension version
- if (GET_EXT_VERSION('other') >= '0.2.1') {
- // Use configured minimum age
- $year = date('Y', time()) - getConfig('min_age');
- } else {
- // Use fixed 16 years age
- $year = date('Y', time()) - 16;
- }
+ break;
- // Construct year selection list
- for ($idx = $minYear; $idx <= $year; $idx++) {
+ case "hour":
+ for ($idx = 0; $idx < 24; $idx++) {
+ if (strlen($idx) == 1) $idx = '0'.$idx;
$OUT .= "<option value=\"".$idx."\"";
if ($default == $idx) $OUT .= ' selected="selected"';
$OUT .= ">".$idx."</option>\n";
} // END - for
- }
- break;
-
- case "sec":
- case "min":
- for ($idx = 0; $idx < 60; $idx+=5) {
- if (strlen($idx) == 1) $idx = '0'.$idx;
- $OUT .= "<option value=\"".$idx."\"";
- if ($default == $idx) $OUT .= ' selected="selected"';
- $OUT .= ">".$idx."</option>\n";
- } // END - for
- break;
-
- case "hour":
- for ($idx = 0; $idx < 24; $idx++) {
- if (strlen($idx) == 1) $idx = '0'.$idx;
- $OUT .= "<option value=\"".$idx."\"";
- if ($default == $idx) $OUT .= ' selected="selected"';
- $OUT .= ">".$idx."</option>\n";
- } // END - for
- break;
-
- case 'yn':
- $OUT .= "<option value=\"Y\"";
- if ($default == 'Y') $OUT .= ' selected="selected"';
- $OUT .= ">{--YES--}</option>\n<option value=\"N\"";
- if ($default == 'N') $OUT .= ' selected="selected"';
- $OUT .= ">{--NO--}</option>\n";
- break;
+ break;
+
+ case 'yn':
+ $OUT .= "<option value=\"Y\"";
+ if ($default == 'Y') $OUT .= ' selected="selected"';
+ $OUT .= ">{--YES--}</option>\n<option value=\"N\"";
+ if ($default == 'N') $OUT .= ' selected="selected"';
+ $OUT .= ">{--NO--}</option>\n";
+ break;
}
$OUT .= " </select>\n";
return $OUT;
// Switch image type
switch (getConfig('img_type'))
{
- case 'jpg':
- // Okay, load image and hide all errors
- $image = @imagecreatefromjpeg($img);
- break;
+ case 'jpg':
+ // Okay, load image and hide all errors
+ $image = @imagecreatefromjpeg($img);
+ break;
- case 'png':
- // Okay, load image and hide all errors
- $image = @imagecreatefrompng($img);
- break;
+ case 'png':
+ // Okay, load image and hide all errors
+ $image = @imagecreatefrompng($img);
+ break;
}
} else {
// Exit function here
$OUT .= " <td align=\"center\"><select class=\"mini_select\" name=\"".$prefix."_mo\" size=\"1\">\n";
for ($idx = 0; $idx <= 11; $idx++)
{
- $OUT .= " <option class=\"mini_select\" value=\"".$idx."\"";
+ $OUT .= " <option class=\"mini_select\" value=\"".$idx."\"";
if ($idx == $M) $OUT .= ' selected="selected"';
$OUT .= ">".$idx."</option>\n";
}
// Check which admin shall receive this mail
$result = SQL_QUERY_ESC("SELECT DISTINCT admin_id FROM `{!_MYSQL_PREFIX!}_admins_mails` WHERE mail_template='%s' ORDER BY admin_id",
- array($template), __FUNCTION__, __LINE__);
+ array($template), __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result) == 0) {
// Create new entry (to all admins)
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_admins_mails` (admin_id, mail_template) VALUES (0, '%s')",
- array($template), __FUNCTION__, __LINE__);
+ array($template), __FUNCTION__, __LINE__);
} else {
// Load admin IDs...
// @TODO This can be, somehow, rewritten
} else {
// Log error for debug
DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Extension 'events' missing: tpl=%s,subj=%s,UID=%s",
- $template,
- $subj,
- $UID
+ $template,
+ $subj,
+ $UID
));
}
} elseif ($aid == '0') {
// Select all email adresses
$result = SQL_QUERY("SELECT email FROM `{!_MYSQL_PREFIX!}_admins` ORDER BY `id`",
- __FUNCTION__, __LINE__);
+ __FUNCTION__, __LINE__);
} else {
// If Admin-ID is not "to-all" select
$result = SQL_QUERY_ESC("SELECT email FROM `{!_MYSQL_PREFIX!}_admins` WHERE id IN (%s) ORDER BY `id`",
- array($aid), __FUNCTION__, __LINE__);
+ array($aid), __FUNCTION__, __LINE__);
}
}
if ((EXT_IS_ACTIVE('admins')) && ($table == 'admins')) {
// Create email link for contacting admin in guest area
$EMAIL = adminsCreateEmailLink($email);
- } elseif ((EXT_IS_ACTIVE('user')) && (GET_EXT_VERSION('user') >= '0.3.3') && ($table == 'user_data')) {
+ } elseif ((EXT_IS_ACTIVE('user')) && (GET_EXT_VERSION('user') >= '0.3.3') && ($table == 'user_data')) {
// Create email link for contacting a member within admin area (or later in other areas, too?)
$EMAIL = USER_generateMemberEmailLink($email);
} elseif ((EXT_IS_ACTIVE('sponsor')) && ($table == 'sponsor_data')) {
// Load footer
loadIncludeOnce('inc/footer.php');
-
- // Exit explicitly
- shutdown();
} else {
// Script tried to kill itself twice
debug_report_bug('Script wanted to kill itself more than once! Raw message=' . $msg . ', file/function=' . $F . ', line=' . $L);
return (((function_exists('apache_get_modules')) && (in_array($apacheModule, apache_get_modules()))) || (!function_exists('apache_get_modules')));
}
-// "Getter" for language strings
-// @TODO Rewrite all language constants to this function.
-function getMessage ($messageId) {
- // Default is not found!
- $return = '!'.$messageId.'!';
-
- // Is the language string found?
- if (isset($GLOBALS['msg'][strtolower($messageId)])) {
- // Language array element found in small_letters
- $return = $GLOBALS['msg'][$messageId];
- } elseif (isset($GLOBALS['msg'][strtoupper($messageId)])) {
- // @DEPRECATED Language array element found in BIG_LETTERS
- $return = $GLOBALS['msg'][$messageId];
- } elseif (defined($messageId)) {
- // @DEPRECATED Deprecated constant found
- $return = constant($messageId);
- } else {
- // Missing language constant
- DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Missing message string %s detected.", $messageId));
- }
-
- // Return the string
- return $return;
-}
-
// Get current theme name
function getCurrentTheme() {
// The default theme is 'default'... ;-)
} elseif (GET_EXT_VERSION('cache') != '0.1.8') {
// Check if current theme is already imported or not
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_themes` WHERE theme_path='%s' LIMIT 1",
- array($name), __FUNCTION__, __LINE__);
+ array($name), __FUNCTION__, __LINE__);
// Entry found?
if (SQL_NUMROWS($result) == 1) {
// Get dir as array
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):dir=".$dir."<br />\n";
// Does it match what we are looking for? (We skip a lot files already!)
- // RegexPattern to exclude ., .., .revision, .svn, debug.log or .cache in the filenames
+ // RegexPattern to exclude ., .., .revision, .svn, debug.log or .cache in the filenames
$excludePattern = '@(\.|\.\.|\.revision|\.svn|debug\.log|\.cache|config\.php)$@';
$ds = getArrayFromDirectory($dir, '', true, false, $excludePattern);
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):ds[]=".count($ds)."<br />\n";
// Is it a file and readable?
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):FQFN={$FQFN}<br />\n";
if (isDirectory($FQFN)) {
- // $FQFN is a directory so also crawl into this directory
+ // $FQFN is a directory so also crawl into this directory
$newDir = $d;
if (!empty($dir)) $newDir = $dir . '/'. $d;
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):DESCENT: ".$newDir."<br />\n";
// Check if REQUEST_GET('check_revision_data') is setted (switch for manually rewrite the .revision-File)
if (REQUEST_ISSET_GET('check_revision_data') && REQUEST_GET('check_revision_data') == 'yes') $new = true;
if (!isset($GLOBALS['cache_array']['revision'][$type])
- || count($GLOBALS['cache_array']['revision']) < 3
- || !$GLOBALS['cache_instance']->loadCacheFile('revision')) $new = true;
+ || count($GLOBALS['cache_array']['revision']) < 3
+ || !$GLOBALS['cache_instance']->loadCacheFile('revision')) $new = true;
// Is the cache file outdated/invalid?
if ($new === true){
// at least 3 keyword-Tags are needed for propper values
if ($res && $res >= 3
- && isset($akt_vers['Revision']) && $akt_vers['Revision'] != ''
- && isset($akt_vers['Date']) && $akt_vers['Date'] != ''
- && isset($akt_vers['Tag']) && $akt_vers['Tag'] != '') {
+ && isset($akt_vers['Revision']) && $akt_vers['Revision'] != ''
+ && isset($akt_vers['Date']) && $akt_vers['Date'] != ''
+ && isset($akt_vers['Tag']) && $akt_vers['Tag'] != '') {
// Prepare content witch need special treadment
// Prepare timestamp for date
if (!empty($message)) {
// Use and log it
$debug = sprintf("Note: %s<br />\n",
- $message
+ $message
);
// @TODO Add a little more infos here
// Compile QUOT and other non-HTML codes
$code = str_replace('{DOT}', '.',
- str_replace('{SLASH}', '/',
- str_replace('{QUOT}', "'",
- str_replace('{DOLLAR}', '$',
- str_replace('{OPEN_ANCHOR}', '(',
- str_replace('{CLOSE_ANCHOR}', ')',
- str_replace('{OPEN_SQR}', '[',
- str_replace('{CLOSE_SQR}', ']',
- str_replace('{PER}', '%',
- $code
+ str_replace('{SLASH}', '/',
+ str_replace('{QUOT}', "'",
+ str_replace('{DOLLAR}', '$',
+ str_replace('{OPEN_ANCHOR}', '(',
+ str_replace('{CLOSE_ANCHOR}', ')',
+ str_replace('{OPEN_SQR}', '[',
+ str_replace('{CLOSE_SQR}', ']',
+ str_replace('{PER}', '%',
+ $code
)))))))));
// Return compiled code
// Is the file there and read-/write-able?
if ((isFileReadable($FQFN)) && (is_writeable($FQFN))) {
- $search = "CFG: ".$comment;
- $tmp = $FQFN.".tmp";
+ $search = 'CFG: ' . $comment;
+ $tmp = $FQFN . '.tmp';
// Open the source file
- $fp = fopen($FQFN, 'r') or OUTPUT_HTML("<strong>READ:</strong> ".$FQFN."<br />");
+ $fp = fopen($FQFN, 'r') or OUTPUT_HTML('<strong>READ:</strong> ' . $FQFN . "<br />\n");
// Is the resource valid?
if (is_resource($fp)) {
// Open temporary file
- $fp_tmp = fopen($tmp, 'w') or OUTPUT_HTML("<strong>WRITE:</strong> ".$tmp."<br />");
+ $fp_tmp = fopen($tmp, 'w') or OUTPUT_HTML('<strong>WRITE:</strong> ' . $tmp . "<br />\n");
// Is the resource again valid?
if (is_resource($fp_tmp)) {
if ($next > -1) {
if ($next === $seek) {
$next = -1;
- $line = $prefix . $DATA . $suffix."\n";
+ $line = $prefix . $DATA . $suffix . "\n";
} else {
$next++;
}
// Write to temp file
fputs($fp_tmp, $line);
- }
+ } // END - while
// Close temp file
fclose($fp_tmp);
// Finished writing tmp file
$done = true;
- }
+ } // END - if
// Close source file
fclose($fp);
- if (($done) && ($found)) {
+ if (($done === true) && ($found === true)) {
// Copy back tmp file and delete tmp :-)
- copy($tmp, $FQFN);
- return unlink($tmp);
- } elseif (!$found) {
- OUTPUT_HTML("<strong>CHANGE:</strong> 404!");
+ copyFileVerified($tmp, $FQFN, 0644);
+ return removeFile($tmp);
+ } elseif ($found === false) {
+ OUTPUT_HTML('<strong>CHANGE:</strong> 404!');
} else {
- OUTPUT_HTML("<strong>TMP:</strong> UNDONE!");
+ OUTPUT_HTML('<strong>TMP:</strong> UNDONE!');
}
}
} else {
// File not found, not readable or writeable
- OUTPUT_HTML("<strong>404:</strong> ".$FQFN."<br />");
+ OUTPUT_HTML('<strong>404:</strong> ' . $FQFN . '<br />');
}
// An error was detected!
if (!empty($RECEIVER)) {
// Add bonus mail to queue
addBonusMailToQueue(
- $data['subject'],
- $data['text'],
- $RECEIVER,
- $data['points'],
- $data['seconds'],
- $data['url'],
- $data['cat'],
- $mode,
- $data['receiver']
+ $data['subject'],
+ $data['text'],
+ $RECEIVER,
+ $data['points'],
+ $data['seconds'],
+ $data['url'],
+ $data['cat'],
+ $mode,
+ $data['receiver']
);
// Mail inserted into bonus pool
// ... and store it there for future usage
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_config` SET pass_scramble='%s' WHERE config=0 LIMIT 1",
- array($scrambleString), __FILE__, __LINE__);
+ array($scrambleString), __FILE__, __LINE__);
// Also remember it in config
setConfigEntry('pass_scramble', $scrambleString);
// ... and store it there for future usage
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_config` SET master_salt='%s' WHERE config=0 LIMIT 1",
- array($masterSalt), __FILE__, __LINE__);
+ array($masterSalt), __FILE__, __LINE__);
// Also remember it in config
setConfigEntry('master_salt', $masterSalt);
// Create filename from hashed random string
$fileHash = sha1(generatePassword(mt_rand(128, 256)));
$FQFN = sprintf("%sinc/.secret/.%s",
- constant('PATH'),
- $fileHash
+ constant('PATH'),
+ $fileHash
);
// Count of chars to be taken from back of the string
// Is the file there?
if (isFileReadable($FQFN)) {
- //* DEBUG: */ unlink($FQFN);
+ //* DEBUG: */ removeFile($FQFN);
//* DEBUG: */ $test = hexdec(getSession('u_hash')) / hexdec($secretKey);
//* DEBUG: */ $test = generateHash(str_replace('.', '', $test));
//* DEBUG: */ die("Secret-Key: ".$secretKey."<br />Cookie: ".getSession('u_hash')."<br />Test: ".$test);
// Write $fileHash to database
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_config` SET file_hash='%s' WHERE config=0 LIMIT 1",
- array($fileHash), __FILE__, __LINE__);
+ array($fileHash), __FILE__, __LINE__);
// Generate FQFN for .htaccess file
$FQFN = sprintf("%sinc/.secret/.htaccess",
- constant('PATH')
+ constant('PATH')
);
// Is the .htaccess file there?
function __errorHandler ($errno, $errstr, $errfile, $errline) {
// Construct message
$msg = sprintf("errno=%s,errstr=%s,errfile=%s,errline=%s",
- $errno,
- $errstr,
- basename($errfile),
- $errline
+ $errno,
+ $errstr,
+ basename($errfile),
+ $errline
);
// Write debug log message
// Add title from what file
$mode = '';
if ($GLOBALS['module'] == "login") $mode = 'member';
- elseif ($GLOBALS['module'] == 'index') $mode = 'guest';
+ elseif ($GLOBALS['module'] == 'index') $mode = 'guest';
if ((!empty($mode)) && (getConfig('enable_what_title') == 'Y')) $TITLE .= " ".trim(getConfig('title_middle'))." ".getModuleDescription($mode, $GLOBALS['what']);
// Add title decorations? (right)
// Steps over this returned $baseFile-Name, when it matches the $excludePattern
if (preg_match($excludePattern, $baseFile, $match)) {
// These Lines are only for debugging!!
- //$INC = $baseDir . '/' . $baseFile;
+ //$INC = $baseDir . '/' . $baseFile;
//$FQFN = constant('PATH') . $INC;
//echo '<pre>$baseDir:'.print_r($baseDir, true).'</pre>';
//echo '<pre>$baseDir:'.print_r(constant('PATH') . $baseDir, true).'</pre>';
// Output page for entered value
switch (REQUEST_GET('page'))
{
- case 'welcome': // Welcome to the installation!
- LOAD_TEMPLATE('install_welcome');
- break;
-
- case '1': // Server path, base URL
- // @Profi-Concept: Hab meine Meinung doch geaendert! :-)
- // Load template
- LOAD_TEMPLATE('install_page1');
- break;
-
- case '2': // MySQL data (alone!)
- if (empty($mysql['dbase'])) $mysql['dbase'] = 'your_database';
- if (empty($mysql['login'])) $mysql['login'] = 'your_login';
- if (empty($mysql['host'])) $mysql['host'] = 'localhost';
- if (empty($mysql['prefix'])) $mysql['prefix'] = 'mxchange';
- if (empty($mysql['type'])) $mysql['type'] = 'MyISAM';
- if (getTotalFatalErrors() > 0) {
- OUTPUT_HTML("<span class=\"install_fatal\">");
- foreach (getFatalArray() as $key => $err) {
- OUTPUT_HTML(" <strong>·</strong> {--FATAL_NO--}".($key + 1).": ".$err."<br />");
+ case 'welcome': // Welcome to the installation!
+ LOAD_TEMPLATE('install_welcome');
+ break;
+
+ case '1': // Server path, base URL
+ // @Profi-Concept: Hab meine Meinung doch geaendert! :-)
+ // Load template
+ LOAD_TEMPLATE('install_page1');
+ break;
+
+ case '2': // MySQL data (alone!)
+ if (empty($mysql['dbase'])) $mysql['dbase'] = 'your_database';
+ if (empty($mysql['login'])) $mysql['login'] = 'your_login';
+ if (empty($mysql['host'])) $mysql['host'] = 'localhost';
+ if (empty($mysql['prefix'])) $mysql['prefix'] = 'mxchange';
+ if (empty($mysql['type'])) $mysql['type'] = 'MyISAM';
+ if (getTotalFatalErrors() > 0) {
+ OUTPUT_HTML("<span class=\"install_fatal\">");
+ foreach (getFatalArray() as $key => $err) {
+ OUTPUT_HTML(" <strong>·</strong> {--FATAL_NO--}".($key + 1).": ".$err."<br />");
+ }
+ OUTPUT_HTML("</span><br />");
}
- OUTPUT_HTML("</span><br />");
- }
- define('__MYSQL_HOST' , $mysql['host']);
- define('__MYSQL_DBASE' , $mysql['dbase']);
- define('__MYSQL_PREFIX', $mysql['prefix']);
- define('__TABLE_TYPE' , $mysql['type']);
- define('__MYSQL_LOGIN' , $mysql['login']);
- define('__SPATH_VALUE' , REQUEST_POST('spath'));
- define('__BURL_VALUE' , REQUEST_POST('burl'));
- define('__TITLE_VALUE' , REQUEST_POST('title'));
- define('__SLOGAN_VALUE', REQUEST_POST('slogan'));
- define('__EMAIL_VALUE' , REQUEST_POST('email'));
-
- // Load template
- LOAD_TEMPLATE('install_page2');
- break;
-
- case '3':
- // Set more values
- define('__SPATH_VALUE' , REQUEST_POST('spath'));
- define('__BURL_VALUE' , REQUEST_POST('burl'));
- define('__TITLE_VALUE' , REQUEST_POST('title'));
- define('__SLOGAN_VALUE', REQUEST_POST('slogan'));
- define('__EMAIL_VALUE' , REQUEST_POST('email'));
-
- // Use default SMTP data
- $smtpHost = getConfig('SMTP_HOSTNAME');
- $smtpUser = getConfig('SMTP_USER');
- $smtpPass1 = getConfig('SMTP_PASSWORD');
- $smtpPass2 = getConfig('SMTP_PASSWORD');
-
- // Overwrite it with the data from sent (failed) form
- if (REQUEST_ISSET_POST(('smtp_host'))) $smtpHost = REQUEST_POST('smtp_host');
- if (REQUEST_ISSET_POST(('smtp_user'))) $smtpUser = REQUEST_POST('smtp_user');
- if (REQUEST_ISSET_POST(('smtp_pass'))) {
- $smtpPass1 = REQUEST_POST('smtp_pass');
- $smtpPass2 = REQUEST_POST('smtp_pass');
- } // END - if
-
- // MySQL settings
- define('__MYSQL_HOST' , $mysql['host']);
- define('__MYSQL_DBASE' , $mysql['dbase']);
- define('__MYSQL_PREFIX', $mysql['prefix']);
- define('__TABLE_TYPE' , $mysql['type']);
- define('__MYSQL_LOGIN' , $mysql['login']);
- define('__MYSQL_PASS1' , $mysql['pass1']);
- define('__MYSQL_PASS2' , $mysql['pass2']);
-
- // Set constants for SMTP data
- define('__SMTP_HOST' , $smtpHost);
- define('__SMTP_USER' , $smtpUser);
- define('__SMTP_PASS1', $smtpPass1);
- define('__SMTP_PASS2', $smtpPass2);
-
- // Load template
- LOAD_TEMPLATE('install_page3');
- break;
-
- case '5': // Misc settings
- // General settings
- define('__SPATH_VALUE' , REQUEST_POST('spath'));
- define('__BURL_VALUE' , REQUEST_POST('burl'));
- define('__TITLE_VALUE' , REQUEST_POST('title'));
- define('__SLOGAN_VALUE', REQUEST_POST('slogan'));
- define('__EMAIL_VALUE' , REQUEST_POST('email'));
-
- // MySQL settings
- define('__MYSQL_HOST' , $mysql['host']);
- define('__MYSQL_DBASE' , $mysql['dbase']);
- define('__MYSQL_PREFIX', $mysql['prefix']);
- define('__TABLE_TYPE' , $mysql['type']);
- define('__MYSQL_LOGIN' , $mysql['login']);
-
- // SMTP settings
- define('__SMTP_HOST', REQUEST_POST('smtp_host'));
- define('__SMTP_USER', REQUEST_POST('smtp_user'));
- define('__SMTP_PASS', REQUEST_POST('smtp_pass1'));
- OUTPUT_HTML("<form action=\"{!__BURL_ACTION!}/install.php?page=finalize\" method=\"POST\" target=\"_self\">
+ define('__MYSQL_HOST' , $mysql['host']);
+ define('__MYSQL_DBASE' , $mysql['dbase']);
+ define('__MYSQL_PREFIX', $mysql['prefix']);
+ define('__TABLE_TYPE' , $mysql['type']);
+ define('__MYSQL_LOGIN' , $mysql['login']);
+ define('__SPATH_VALUE' , REQUEST_POST('spath'));
+ define('__BURL_VALUE' , REQUEST_POST('burl'));
+ define('__TITLE_VALUE' , REQUEST_POST('title'));
+ define('__SLOGAN_VALUE', REQUEST_POST('slogan'));
+ define('__EMAIL_VALUE' , REQUEST_POST('email'));
+
+ // Load template
+ LOAD_TEMPLATE('install_page2');
+ break;
+
+ case '3':
+ // Set more values
+ define('__SPATH_VALUE' , REQUEST_POST('spath'));
+ define('__BURL_VALUE' , REQUEST_POST('burl'));
+ define('__TITLE_VALUE' , REQUEST_POST('title'));
+ define('__SLOGAN_VALUE', REQUEST_POST('slogan'));
+ define('__EMAIL_VALUE' , REQUEST_POST('email'));
+
+ // Use default SMTP data
+ $smtpHost = getConfig('SMTP_HOSTNAME');
+ $smtpUser = getConfig('SMTP_USER');
+ $smtpPass1 = getConfig('SMTP_PASSWORD');
+ $smtpPass2 = getConfig('SMTP_PASSWORD');
+
+ // Overwrite it with the data from sent (failed) form
+ if (REQUEST_ISSET_POST(('smtp_host'))) $smtpHost = REQUEST_POST('smtp_host');
+ if (REQUEST_ISSET_POST(('smtp_user'))) $smtpUser = REQUEST_POST('smtp_user');
+ if (REQUEST_ISSET_POST(('smtp_pass'))) {
+ $smtpPass1 = REQUEST_POST('smtp_pass');
+ $smtpPass2 = REQUEST_POST('smtp_pass');
+ } // END - if
+
+ // MySQL settings
+ define('__MYSQL_HOST' , $mysql['host']);
+ define('__MYSQL_DBASE' , $mysql['dbase']);
+ define('__MYSQL_PREFIX', $mysql['prefix']);
+ define('__TABLE_TYPE' , $mysql['type']);
+ define('__MYSQL_LOGIN' , $mysql['login']);
+ define('__MYSQL_PASS1' , $mysql['pass1']);
+ define('__MYSQL_PASS2' , $mysql['pass2']);
+
+ // Set constants for SMTP data
+ define('__SMTP_HOST' , $smtpHost);
+ define('__SMTP_USER' , $smtpUser);
+ define('__SMTP_PASS1', $smtpPass1);
+ define('__SMTP_PASS2', $smtpPass2);
+
+ // Load template
+ LOAD_TEMPLATE('install_page3');
+ break;
+
+ case '5': // Misc settings
+ // General settings
+ define('__SPATH_VALUE' , REQUEST_POST('spath'));
+ define('__BURL_VALUE' , REQUEST_POST('burl'));
+ define('__TITLE_VALUE' , REQUEST_POST('title'));
+ define('__SLOGAN_VALUE', REQUEST_POST('slogan'));
+ define('__EMAIL_VALUE' , REQUEST_POST('email'));
+
+ // MySQL settings
+ define('__MYSQL_HOST' , $mysql['host']);
+ define('__MYSQL_DBASE' , $mysql['dbase']);
+ define('__MYSQL_PREFIX', $mysql['prefix']);
+ define('__TABLE_TYPE' , $mysql['type']);
+ define('__MYSQL_LOGIN' , $mysql['login']);
+
+ // SMTP settings
+ define('__SMTP_HOST', REQUEST_POST('smtp_host'));
+ define('__SMTP_USER', REQUEST_POST('smtp_user'));
+ define('__SMTP_PASS', REQUEST_POST('smtp_pass1'));
+ OUTPUT_HTML("<form action=\"{!__BURL_ACTION!}/install.php?page=finalize\" method=\"POST\" target=\"_self\">
<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"install_main\">
<tr>
<td colspan=\"2\" align=\"center\">
<tr><td colspan=\"2\" height=\"21\" class=\"seperator\"> </td></tr>
<tr>
<td colspan=\"2\" align=\"center\">");
- foreach ($mysql as $key => $value) {
- OUTPUT_HTML(" <input type=\"hidden\" name=\"mysql[".$key."]\" value=\"".$value."\" />");
- }
- OUTPUT_HTML(" <input type=\"hidden\" name=\"spath\" value=\"{!__SPATH_VALUE!}\" />
+ foreach ($mysql as $key => $value) {
+ OUTPUT_HTML(" <input type=\"hidden\" name=\"mysql[".$key."]\" value=\"".$value."\" />");
+ }
+ OUTPUT_HTML(" <input type=\"hidden\" name=\"spath\" value=\"{!__SPATH_VALUE!}\" />
<input type=\"hidden\" name=\"burl\" value=\"{!__BURL_VALUE!}\" />
<input type=\"hidden\" name=\"title\" value=\"{!__TITLE_VALUE!}\" />
<input type=\"hidden\" name=\"slogan\" value=\"{!__SLOGAN_VALUE!}\" />
<tr><td colspan=\"2\" height=\"21\" class=\"seperator\"> </td></tr>
</table>
</form>");
- break;
-
- case 'finalize': // Write captured data to files
- if ((REQUEST_ISSET_POST(('finalize'))) && (!isInstalled())) {
- // You have submitted data then we have to reset the SQLs
- INIT_SQLS();
-
- // Connect to MySQL server
- SQL_CONNECT($mysql['host'], $mysql['login'], $mysql['pass1'], __FILE__, __LINE__);
- if (SQL_IS_LINK_UP()) {
- // Seems to work, also right database?
- if (SQL_SELECT_DB($mysql['dbase'], __FILE__, __LINE__) === true) {
- // Automatically run install.sql
- if ((isFileReadable(REQUEST_POST('spath') . 'install/tables.sql')) && (isFileReadable(REQUEST_POST('spath') . 'install/menu-'.getLanguage().'.sql'))) {
- // Both exists so import them
- foreach (array('tables', 'menu-'.getLanguage()) as $dump) {
- // Should be save here because file_exists() is there but we check it again. :)
- $FQFN = REQUEST_POST('spath') . 'install/' . $dump . '.sql';
-
- // Is the file readable?
- if (isFileReadable($FQFN)) {
- // Read the file
- $fileContent = readFromFile($FQFN, true);
-
- // Replace the {!prefix/type!} with actual one
- foreach (array('prefix', 'type') as $replace) {
- while (strpos($fileContent, '{!' . $replace . '!}') !== false) {
- $fileContent = str_replace('{!' . $replace . '!}', $mysql[$replace], $fileContent);
- } // END - while
- } // END - foreach
-
- // Split it up against ";\n" and merge it into existing SQLs
- MERGE_SQLS(explode(";\n", $fileContent));
- } else {
- // Not readable!
- debug_report_bug(sprintf("SQL dump %s is not readable!", $dump));
- }
- } // END - foreach
-
- // Are some SQLs found?
- if (COUNT_SQLS() == 0) {
- // Abort here
- addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_SQL_IMPORT_FAILED'));
- return;
- } // END - if
-
- // Now run all queries through and try to keep out empty or comment queries
- runFilterChain('run_sqls');
-
- // Copy the config template and verify it
- copyFileVerified(REQUEST_POST('spath') . 'inc/config-local.php.dist', REQUEST_POST('spath') . 'inc/cache/config-local.php', 0644);
-
- // Ok, all done. So we can write the config data to the php files
- if (REQUEST_POST('spath') != constant('PATH')) changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "SERVER-PATH", "define('PATH', \"", "\");", REQUEST_POST('spath'), 0);
- if (REQUEST_POST('burl') != constant('URL')) changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "HOST-URL", "define('URL', \"", "\");", REQUEST_POST('burl'), 0);
- changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "MAIN-TITLE", "define('MAIN_TITLE', \"", "\");", REQUEST_POST('title'), 0);
- changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "SLOGAN", "define('SLOGAN', \"", "\");", REQUEST_POST('slogan'), 0);
- changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "WEBMASTER", "define('WEBMASTER', \"", "\");", REQUEST_POST('email'), 0);
- changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "NULLPASS-WARNING", "setConfigEntry('WARN_NO_PASS', \"", "\");", REQUEST_POST('warn_no_pass'), 0);
- changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "WRITE-FOOTER", "setConfigEntry('WRITE_FOOTER', \"", "\");", REQUEST_POST('wfooter'), 0);
- changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "BACKLINK", "setConfigEntry('ENABLE_BACKLINK', \"", "\");", REQUEST_POST('blink'), 0);
- // DEACTIVATED: changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "OUTPUT-MODE", "define('OUTPUT_MODE', \"", "\");", REQUEST_POST('omode'), 0);
- changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "MYSQL-HOST", " 'host' => \"", "\",", $mysql['host'], 0);
- changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "MYSQL-DBASE", " 'dbase' => \"", "\",", $mysql['dbase'], 0);
- changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "MYSQL-LOGIN", " 'login' => \"", "\",", $mysql['login'], 0);
- changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "MYSQL-PASSWORD", " 'password' => \"", "\",", $mysql['pass1'], 0);
- changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "MYSQL-PREFIX", "setConfigEntry('_MYSQL_PREFIX', \"", "\");", $mysql['prefix'], 0);
- changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "TABLE-TYPE", "setConfigEntry('_TABLE_TYPE', \"", "\");", $mysql['type'], 0);
- changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "SMTP-HOSTNAME", "setConfigEntry('SMTP_HOSTNAME', \"", "\");", REQUEST_POST('smtp_host'), 0);
- changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "SMTP-USER", "setConfigEntry('SMTP_USER', \"", "\");", REQUEST_POST('smtp_user'), 0);
- changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "SMTP-PASSWORD", "setConfigEntry('SMTP_PASSWORD', \"", "\");", REQUEST_POST('smtp_pass1'), 0);
-
- // Generate a long site key
- $siteKey = generatePassword(50);
-
- // And write it
- changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "SITE-KEY", "setConfigEntry('SITE_KEY', \"", "\");", $siteKey, 0);
-
- // Script is now installed
- changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "INSTALLED", "setConfigEntry('MXCHANGE_INSTALLED', \"", "\");", 'Y', 0);
- } else {
- // Installation area not found!
- addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_MISSING_DUMPS'));
- }
+ break;
+
+ case 'finalize': // Write captured data to files
+ if ((REQUEST_ISSET_POST(('finalize'))) && (!isInstalled())) {
+ // You have submitted data then we have to reset the SQLs
+ INIT_SQLS();
+
+ // Connect to MySQL server
+ SQL_CONNECT($mysql['host'], $mysql['login'], $mysql['pass1'], __FILE__, __LINE__);
+ if (SQL_IS_LINK_UP()) {
+ // Seems to work, also right database?
+ if (SQL_SELECT_DB($mysql['dbase'], __FILE__, __LINE__) === true) {
+ // Automatically run install.sql
+ if ((isFileReadable(REQUEST_POST('spath') . 'install/tables.sql')) && (isFileReadable(REQUEST_POST('spath') . 'install/menu-'.getLanguage().'.sql'))) {
+ // Both exists so import them
+ foreach (array('tables', 'menu-'.getLanguage()) as $dump) {
+ // Should be save here because file_exists() is there but we check it again. :)
+ $FQFN = REQUEST_POST('spath') . 'install/' . $dump . '.sql';
+
+ // Is the file readable?
+ if (isFileReadable($FQFN)) {
+ // Read the file
+ $fileContent = readFromFile($FQFN, true);
+
+ // Replace the {!prefix/type!} with actual one
+ foreach (array('prefix', 'type') as $replace) {
+ while (strpos($fileContent, '{!' . $replace . '!}') !== false) {
+ $fileContent = str_replace('{!' . $replace . '!}', $mysql[$replace], $fileContent);
+ } // END - while
+ } // END - foreach
+
+ // Split it up against ";\n" and merge it into existing SQLs
+ MERGE_SQLS(explode(";\n", $fileContent));
+ } else {
+ // Not readable!
+ debug_report_bug(sprintf("SQL dump %s is not readable!", $dump));
+ }
+ } // END - foreach
+
+ // Are some SQLs found?
+ if (COUNT_SQLS() == 0) {
+ // Abort here
+ addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_SQL_IMPORT_FAILED'));
+ return;
+ } // END - if
+
+ // Now run all queries through and try to keep out empty or comment queries
+ runFilterChain('run_sqls');
+
+ // Copy the config template and verify it
+ copyFileVerified(REQUEST_POST('spath') . 'inc/config-local.php.dist', REQUEST_POST('spath') . 'inc/cache/config-local.php', 0644);
+
+ // Ok, all done. So we can write the config data to the php files
+ if (REQUEST_POST('spath') != constant('PATH')) changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "SERVER-PATH", "define('PATH', \"", "\");", REQUEST_POST('spath'), 0);
+ if (REQUEST_POST('burl') != constant('URL')) changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "HOST-URL", "define('URL', \"", "\");", REQUEST_POST('burl'), 0);
+ changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "MAIN-TITLE", "define('MAIN_TITLE', \"", "\");", REQUEST_POST('title'), 0);
+ changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "SLOGAN", "define('SLOGAN', \"", "\");", REQUEST_POST('slogan'), 0);
+ changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "WEBMASTER", "define('WEBMASTER', \"", "\");", REQUEST_POST('email'), 0);
+ changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "NULLPASS-WARNING", "setConfigEntry('WARN_NO_PASS', \"", "\");", REQUEST_POST('warn_no_pass'), 0);
+ changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "WRITE-FOOTER", "setConfigEntry('WRITE_FOOTER', \"", "\");", REQUEST_POST('wfooter'), 0);
+ changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "BACKLINK", "setConfigEntry('ENABLE_BACKLINK', \"", "\");", REQUEST_POST('blink'), 0);
+ // DEACTIVATED: changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "OUTPUT-MODE", "define('OUTPUT_MODE', \"", "\");", REQUEST_POST('omode'), 0);
+ changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "MYSQL-HOST", " 'host' => \"", "\",", $mysql['host'], 0);
+ changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "MYSQL-DBASE", " 'dbase' => \"", "\",", $mysql['dbase'], 0);
+ changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "MYSQL-LOGIN", " 'login' => \"", "\",", $mysql['login'], 0);
+ changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "MYSQL-PASSWORD", " 'password' => \"", "\",", $mysql['pass1'], 0);
+ changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "MYSQL-PREFIX", "setConfigEntry('_MYSQL_PREFIX', \"", "\");", $mysql['prefix'], 0);
+ changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "TABLE-TYPE", "setConfigEntry('_TABLE_TYPE', \"", "\");", $mysql['type'], 0);
+ changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "SMTP-HOSTNAME", "setConfigEntry('SMTP_HOSTNAME', \"", "\");", REQUEST_POST('smtp_host'), 0);
+ changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "SMTP-USER", "setConfigEntry('SMTP_USER', \"", "\");", REQUEST_POST('smtp_user'), 0);
+ changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "SMTP-PASSWORD", "setConfigEntry('SMTP_PASSWORD', \"", "\");", REQUEST_POST('smtp_pass1'), 0);
+
+ // Generate a long site key
+ $siteKey = generatePassword(50);
+
+ // And write it
+ changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "SITE-KEY", "setConfigEntry('SITE_KEY', \"", "\");", $siteKey, 0);
+
+ // Script is now installed
+ changeDataInFile(REQUEST_POST('spath') . 'inc/cache/config-local.php', "INSTALLED", "setConfigEntry('MXCHANGE_INSTALLED', \"", "\");", 'Y', 0);
+ } else {
+ // Installation area not found!
+ addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_MISSING_DUMPS'));
+ }
+ } // END - if
} // END - if
- } // END - if
- if (getTotalFatalErrors() > 0) {
- $OUT = '';
- foreach (getFatalArray() as $value) {
- $OUT .= " <li>".$value."</li>\n";
- } // END foreach
- define('__FATAL_ERROR_LI', $OUT);
- $OUT = '';
- foreach ($mysql as $key => $value) {
- $OUT .= " <input type=\"hidden\" name=\"mysql[".$key."]\" value=\"".$value."\" />\n";
- } // END foreach
- define('__MYSQL_DATA' , $OUT);
- define('__SPATH_VALUE' , REQUEST_POST('spath'));
- define('__BURL_VALUE' , REQUEST_POST('burl'));
- define('__TITLE_VALUE' , REQUEST_POST('title'));
- define('__SMTP_HOST' , REQUEST_POST('smtp_host'));
- define('__SMTP_USER' , REQUEST_POST('smtp_user'));
- define('__SMTP_PASS' , REQUEST_POST('smtp_pass1'));
-
- // Load template
- LOAD_TEMPLATE('install_fatal_errors');
+ if (getTotalFatalErrors() > 0) {
+ $OUT = '';
+ foreach (getFatalArray() as $value) {
+ $OUT .= " <li>".$value."</li>\n";
+ } // END foreach
+ define('__FATAL_ERROR_LI', $OUT);
+ $OUT = '';
+ foreach ($mysql as $key => $value) {
+ $OUT .= " <input type=\"hidden\" name=\"mysql[".$key."]\" value=\"".$value."\" />\n";
+ } // END foreach
+ define('__MYSQL_DATA' , $OUT);
+ define('__SPATH_VALUE' , REQUEST_POST('spath'));
+ define('__BURL_VALUE' , REQUEST_POST('burl'));
+ define('__TITLE_VALUE' , REQUEST_POST('title'));
+ define('__SMTP_HOST' , REQUEST_POST('smtp_host'));
+ define('__SMTP_USER' , REQUEST_POST('smtp_user'));
+ define('__SMTP_PASS' , REQUEST_POST('smtp_pass1'));
+
+ // Load template
+ LOAD_TEMPLATE('install_fatal_errors');
+ } else {
+ // Installation is done!
+ redirectToUrl('install.php?page=finalize');
+ }
+ } elseif (isInstalled()) {
+ // Redirection after writing data... :-)
+ LOAD_TEMPLATE('install_finished');
} else {
- // Installation is done!
- redirectToUrl('install.php?page=finalize');
+ // Something goes wrong during installation! :-(
+ addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_FINALIZER_FAILED'));
+ loadInclude('inc/fatal_errors.php');
}
- } elseif (isInstalled()) {
- // Redirection after writing data... :-)
- LOAD_TEMPLATE('install_finished');
- } else {
- // Something goes wrong during installation! :-(
- addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_FINALIZER_FAILED'));
- loadInclude('inc/fatal_errors.php');
- }
- break;
-
- default:
- DEBUG_LOG(__FILE__, __LINE__, sprintf("Wrong page %s detected", REQUEST_GET('page')));
- OUTPUT_HTML(" <div class=\"install_error\">{--WRONG_PAGE--}</div>");
- break;
+ break;
+
+ default:
+ DEBUG_LOG(__FILE__, __LINE__, sprintf("Wrong page %s detected", REQUEST_GET('page')));
+ OUTPUT_HTML(" <div class=\"install_error\">{--WRONG_PAGE--}</div>");
+ break;
}
} else {
// Already installed!
--- /dev/null
+<?php
+/************************************************************************
+ * MXChange v0.2.1 Start: 08/25/2003 *
+ * =============== Last change: 11/29/2005 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : language-functions.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Language functions *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Sprachfunktionen *
+ * -------------------------------------------------------------------- *
+ * $Revision:: $ *
+ * $Date:: $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: $ *
+ * Needs to be in all Files and every File needs "svn propset *
+ * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder *
+ * For more information visit: http://www.mxchange.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
+ ************************************************************************/
+// Some security stuff...
+if (!defined('__SECURITY')) {
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
+ require($INC);
+}
+
+// "Getter" for language strings
+// @TODO Rewrite all language constants to this function.
+function getMessage ($messageId) {
+ // Default is not found!
+ $return = '!'.$messageId.'!';
+
+ // Is the language string found?
+ if (isset($GLOBALS['msg'][strtolower($messageId)])) {
+ // Language array element found in small_letters
+ $return = $GLOBALS['msg'][$messageId];
+ } elseif (isset($GLOBALS['msg'][strtoupper($messageId)])) {
+ // @DEPRECATED Language array element found in BIG_LETTERS
+ $return = $GLOBALS['msg'][$messageId];
+ } elseif (defined($messageId)) {
+ // @DEPRECATED Deprecated constant found
+ $return = constant($messageId);
+ } else {
+ // Missing language constant
+ DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Missing message string %s detected.", $messageId));
+ }
+
+ // Return the string
+ return $return;
+}
+
+// "Getter" for language
+function getLanguage () {
+ // Set default return value to default language from config
+ $ret = getConfig('DEFAULT_LANG');
+
+ // Init variable
+ $lang = '';
+
+ // Is the variable set
+ if (REQUEST_ISSET_GET('mx_lang')) {
+ // Accept only first 2 chars
+ $lang = substr(REQUEST_GET('mx_lang'), 0, 2);
+ } elseif (isset($GLOBALS['cache_array']['language'])) {
+ // Use cached
+ $ret = $GLOBALS['cache_array']['language'];
+ } elseif (!empty($lang)) {
+ // Check if main language file does exist
+ if (isFileReadable(constant('PATH') . 'inc/language/'.$lang.'.php')) {
+ // Okay found, so let's update cookies
+ setLanguage($lang);
+ } // END - if
+ } elseif (isSessionVariableSet('mx_lang')) {
+ // Return stored value from cookie
+ $ret = getSession('mx_lang');
+
+ // Fixes a warning before the session has the mx_lang constant
+ if (empty($ret)) $ret = getConfig('DEFAULT_LANG');
+ }
+
+ // Cache entry
+ $GLOBALS['cache_array']['language'] = $ret;
+
+ // Return value
+ return $ret;
+}
+
+// "Setter" for language
+function setLanguage ($lang) {
+ // Accept only first 2 chars!
+ $lang = substr(SQL_ESCAPE(strip_tags($lang)), 0, 2);
+
+ // Set cookie
+ setSession('mx_lang', $lang);
+}
+
+// [EOF]
+?>
// Look for file
if (!isIncludeReadable($INC)) {
// Switch to default (DO NOT CHANGE!!!)
- setSession('mx_lang', 'de');
+ setLanguage('de');
$INC = 'inc/language/de.php';
// And set it temporarily
$content = array(
'menu' => "<a class=\"menu_blur\" href=\"{!URL!}/modules.php?module=index&what=active\">".getConfig('menu_blur_spacer').GUEST_ACTIVE_LINK."</a>",
'what' => 'active'
- );
+ );
- // Add link to "we were active today" page
- LOAD_TEMPLATE("guest_menu_bottom", false, $content);
+ // Add link to "we were active today" page
+ LOAD_TEMPLATE("guest_menu_bottom", false, $content);
} // END - if
}
if (!empty($act)) {
// Main menu
$result = SQL_QUERY_ESC("SELECT access_mode FROM `{!_MYSQL_PREFIX!}_admins_acls` WHERE admin_id=%s AND action_menu='%s' LIMIT 1",
- array(bigintval($aid), $act), __FUNCTION__, __LINE__);
+ array(bigintval($aid), $act), __FUNCTION__, __LINE__);
} elseif (!empty($wht)) {
// Sub menu
$result = SQL_QUERY_ESC("SELECT access_mode FROM `{!_MYSQL_PREFIX!}_admins_acls` WHERE admin_id=%s AND what_menu='%s' LIMIT 1",
- array(bigintval($aid), $wht), __FUNCTION__, __LINE__);
+ array(bigintval($aid), $wht), __FUNCTION__, __LINE__);
}
// Is an entry found?
$result = SQL_QUERY_ESC("SELECT `id`
FROM `{!_MYSQL_PREFIX!}_admins`
WHERE `email`='%s' LIMIT 1",
- array($email), __FUNCTION__, __LINE__);
+ array($email), __FUNCTION__, __LINE__);
// Is there an entry?
if (SQL_NUMROWS($result) == 1) {
default_acl='%s',
la_mode='%s'
WHERE `id`=%s LIMIT 1",
- array(
- $login,
- $POST['email'][$id],
- $POST['mode'][$id],
- $POST['la_mode'][$id],
- $id
- ), __FUNCTION__, __LINE__);
+ array(
+ $login,
+ $POST['email'][$id],
+ $POST['mode'][$id],
+ $POST['la_mode'][$id],
+ $id
+ ), __FUNCTION__, __LINE__);
} else {
// Do not allow it here
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admins` SET
email='%s',
la_mode='%s'
WHERE `id`=%s LIMIT 1",
- array(
- $login,
- $POST['email'][$id],
- $POST['la_mode'][$id],
- $id
- ), __FUNCTION__, __LINE__);
+ array(
+ $login,
+ $POST['email'][$id],
+ $POST['la_mode'][$id],
+ $id
+ ), __FUNCTION__, __LINE__);
}
// Purge cache
// Get the admin's data
$result = SQL_QUERY_ESC("SELECT login, email, default_acl AS mode, la_mode FROM `{!_MYSQL_PREFIX!}_admins` WHERE `id`=%s LIMIT 1",
- array($id), __FUNCTION__, __LINE__);
+ array($id), __FUNCTION__, __LINE__);
if ((SQL_NUMROWS($result) == 1) && ($selected == 1)) {
// Entry found
$content = SQL_FETCHARRAY($result);
// Get the admin's data
$result = SQL_QUERY_ESC("SELECT login, email, default_acl AS mode, la_mode FROM `{!_MYSQL_PREFIX!}_admins` WHERE `id`=%s LIMIT 1",
- array($id), __FUNCTION__, __LINE__);
+ array($id), __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Entry found
$content = SQL_FETCHARRAY($result);
if (($del == 1) && (getCurrentAdminId() != $id)) {
// Rewrite his tasks to all admins
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_task_system` SET `assigned_admin`=0 WHERE `assigned_admin`=%s",
- array($id), __FUNCTION__, __LINE__);
+ array($id), __FUNCTION__, __LINE__);
// Remove account
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admins` WHERE `id`=%s LIMIT 1",
- array($id), __FUNCTION__, __LINE__);
+ array($id), __FUNCTION__, __LINE__);
// Purge cache
cachePurgeAdminMenu($id);
function AUTOPURGE_ADD_POINTS($uid, $points) {
// Check if he has locked points or not
$result = SQL_QUERY_ESC("SELECT ref_payout FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(bigintval($uid)), __FUNCTION__, __LINE__);
+ array(bigintval($uid)), __FUNCTION__, __LINE__);
list($payout) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
} else {
// .. to user's account
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_points` SET %s=%s+%s WHERE userid=%s AND ref_depth=0 LIMIT 1",
- array($target, $target, $points, bigintval($uid)), __FUNCTION__, __LINE__);
+ array($target, $target, $points, bigintval($uid)), __FUNCTION__, __LINE__);
// Update mediadata as well
if ((GET_EXT_VERSION('mediadata') >= '0.0.4') && ($target == "points")) {
if (getConfig('beg_rallye') == 'Y') {
// Add points to rallye account
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET beg_points=beg_points+%s WHERE userid=%s LIMIT 1",
- array($points, $uid), __FUNCTION__, __LINE__);
+ array($points, $uid), __FUNCTION__, __LINE__);
} else {
// Add points to account
unset($GLOBALS['ref_level']);
// Select SQL command
switch ($type)
{
- case 'bonusid':
- $column = 'bonus_id';
- $bonus = $mid;
- break;
-
- case 'mailid' :
- $column = 'mail_id';
- $mail = $mid;
- break;
-
- default:
- DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Invalid type %s detected.", $type));
- break;
+ case 'bonusid':
+ $column = 'bonus_id';
+ $bonus = $mid;
+ break;
+
+ case 'mailid' :
+ $column = 'mail_id';
+ $mail = $mid;
+ break;
+
+ default:
+ DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Invalid type %s detected.", $type));
+ break;
}
// Is a column name set?
// Check for entry
$result = SQL_QUERY_ESC("SELECT COUNT(id) AS cnt FROM `{!_MYSQL_PREFIX!}_bonus_turbo` WHERE userid=%s AND %s=%s LIMIT 1",
- array($uid, $column, $mid), __FUNCTION__, __LINE__);
+ array($uid, $column, $mid), __FUNCTION__, __LINE__);
// Load clicks from table as current rank
list($rank) = SQL_FETCHROW($result);
// Add points to his account directly
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET turbo_bonus=turbo_bonus+".$points." WHERE userid=%s LIMIT 1",
- array(bigintval($uid)), __FUNCTION__, __LINE__);
+ array(bigintval($uid)), __FUNCTION__, __LINE__);
// Rember this whole data for displaying ranking list
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_bonus_turbo` (userid, mail_id, bonus_id, level, points, timemark) VALUES ('%s', '%s', '%s', '%s', '%s', UNIX_TIMESTAMP())",
- array(bigintval($uid), bigintval($mail), bigintval($bonus), $rank, $points), __FUNCTION__, __LINE__);
+ array(bigintval($uid), bigintval($mail), bigintval($bonus), $rank, $points), __FUNCTION__, __LINE__);
if ((GET_EXT_VERSION('bonus') >= '0.3.5') && (getConfig('bonus_mode') != "ADD") && ($points > 0)) BONUS_POINTS_HANDLER($points);
}
// Load current user's data
$result = SQL_QUERY_ESC("SELECT level, points, timemark FROM `{!_MYSQL_PREFIX!}_bonus_turbo` WHERE %s=%s AND `userid`=%s LIMIT 1",
- array($type, $data, $uid), __FUNCTION__, __LINE__);
+ array($type, $data, $uid), __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load data
list($rank, $points, $mark) = SQL_FETCHROW($result);
// Load rankings
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_bonus_turbo` WHERE %s=%s ORDER BY level LIMIT %s",
- array($type, $data, getConfig('bonus_lines')), __FUNCTION__, __LINE__);
+ array($type, $data, getConfig('bonus_lines')), __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Start generating the ranking list
$max = SQL_NUMROWS($result);
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",
- array($type, $data, $rank), __FUNCTION__, __LINE__);
+ array($type, $data, $rank), __FUNCTION__, __LINE__);
// Nothing found by default
$userid = '---'; $points = '---';
// Subtract points from...
switch (getConfig('bonus_mode'))
{
- case 'JACKPOT': // ... jackpot
- if ((SUB_JACKPOT($points) == -1) && (getConfig('bonus_uid') > 0)) {
- // Check points amount first...
+ case 'JACKPOT': // ... jackpot
+ if ((SUB_JACKPOT($points) == -1) && (getConfig('bonus_uid') > 0)) {
+ // Check points amount first...
+ $total = GET_TOTAL_DATA(getConfig('bonus_uid'), 'user_points', 'points') - GET_TOTAL_DATA(getConfig('bonus_uid'), 'user_data', 'used_points');
+ if ($total >= $points) {
+ // Subtract points from userid's account
+ SUB_POINTS('bonus_payout_jackpot', getConfig('bonus_uid'), $points);
+ } // END - if
+ } // END - if
+ break;
+
+ case 'UID': // ... userid's account
+ // Check his amount first
$total = GET_TOTAL_DATA(getConfig('bonus_uid'), 'user_points', 'points') - GET_TOTAL_DATA(getConfig('bonus_uid'), 'user_data', 'used_points');
if ($total >= $points) {
// Subtract points from userid's account
- SUB_POINTS('bonus_payout_jackpot', getConfig('bonus_uid'), $points);
- } // END - if
- } // END - if
- break;
-
- case 'UID': // ... userid's account
- // Check his amount first
- $total = GET_TOTAL_DATA(getConfig('bonus_uid'), 'user_points', 'points') - GET_TOTAL_DATA(getConfig('bonus_uid'), 'user_data', 'used_points');
- if ($total >= $points) {
- // Subtract points from userid's account
- SUB_POINTS('bonus_payout_uid', getConfig('bonus_uid'), $points);
- } else {
- // Try to subtract from jackpot
- $dummy = SUB_JACKPOT($points);
- }
- break;
+ SUB_POINTS('bonus_payout_uid', getConfig('bonus_uid'), $points);
+ } else {
+ // Try to subtract from jackpot
+ $dummy = SUB_JACKPOT($points);
+ }
+ break;
}
}
// Add record entry here
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_book` (`userid`,`subject`,`mode`,`points`) VALUES(%s,'%s','%s',%s)",
- array($uid, $subject, $mode, $points), __FUNCTION__, __LINE__);
+ array($uid, $subject, $mode, $points), __FUNCTION__, __LINE__);
}
// [EOF]
// Is the file there?
if (isFileReadable($fqfn)) {
// Yes, we can do. So let's remove it
- unlink($fqfn);
+ removeFile($fqfn);
// Is there a .htaccess file?
if (isFileReadable($path . '.htaccess')) {
// Remove cache file from system
//* DEBUG: */ print __METHOD__."(<font color=\"#0000aa\">".__LINE__."</font>): {$this->name} - DESTROYED!<br />\n";
- unlink($this->fqfn);
+ removeFile($this->fqfn);
// @TODO remove from $GLOBALS['cache_array']!!!
// Is the file there?
function COUNTRY_GENERATE_INFO ($id) {
// Load code and description
$result = SQL_QUERY_ESC("SELECT code, descr FROM `{!_MYSQL_PREFIX!}_countries` WHERE `id`=%s LIMIT 1",
- array(bigintval($id)), __FUNCTION__, __LINE__);
+ array(bigintval($id)), __FUNCTION__, __LINE__);
// Is there an entry?
if (SQL_NUMROWS($result) == 1) {
while ($content = SQL_FETCHARRAY($result_stop)) {
// Stop holiday
ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_holidays` WHERE userid=%s LIMIT 1",
- array(bigintval($content['userid'])), __FUNCTION__, __LINE__, false));
+ array(bigintval($content['userid'])), __FUNCTION__, __LINE__, false));
// Unlock account
ADD_SQL(SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data`
if (SQL_NUMROWS($result_media) == 0) {
// Not found so we create it (mode will be ignored here!)
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_mediadata` (media_key, media_value) VALUES ('%s', '%s')",
- array($key, $value), __FUNCTION__, __LINE__);
+ array($key, $value), __FUNCTION__, __LINE__);
} else {
// Update entry
switch ($mode) {
if ($mode == 'init') {
// Initialize entry
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_mediadata` SET media_value=%s WHERE media_key='%s' LIMIT 1",
- array($value, $key), __FUNCTION__, __LINE__);
+ array($value, $key), __FUNCTION__, __LINE__);
} else {
// Update entry
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_mediadata` SET media_value=media_value".$mode."%s WHERE media_key='%s' LIMIT 1",
- array($value, $key), __FUNCTION__, __LINE__);
+ array($value, $key), __FUNCTION__, __LINE__);
}
}
}
// Check for entry
$result = SQL_QUERY_ESC("SELECT media_value FROM `{!_MYSQL_PREFIX!}_mediadata` WHERE media_key='%s' LIMIT 1",
- array($key), __FUNCTION__, __LINE__);
+ array($key), __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load data
list($value) = SQL_FETCHROW($result);
// Search in database
// @TODO Can we replace this with GET_TOTAL_DATA() ?
$result = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s OR nickname='%s' LIMIT 1",
- array(bigintval($uidNick), $uidNick), __FUNCTION__, __LINE__);
+ array(bigintval($uidNick), $uidNick), __FUNCTION__, __LINE__);
// Check existence of nickname
$ret = (SQL_NUMROWS($result) == 1);
} elseif (NICKNAME_IS_ACTIVE($userid)) {
// Search for non-empty nickname
$result = SQL_QUERY_ESC("SELECT nickname FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND nickname != '' LIMIT 1",
- array(bigintval($userid)), __FUNCTION__, __LINE__);
+ array(bigintval($userid)), __FUNCTION__, __LINE__);
// Found?
if (SQL_NUMROWS($result) == 1) {
// Now search for the user
$result = SQL_QUERY_ESC("SELECT timestamp FROM `{!_MYSQL_PREFIX!}_online` WHERE sid='%s' LIMIT 1",
- array(session_id()), __FUNCTION__, __LINE__);
+ array(session_id()), __FUNCTION__, __LINE__);
// Entry found?
if (SQL_NUMROWS($result) == 1) {
timestamp=UNIX_TIMESTAMP(),
ip='%s'
WHERE sid='%s' LIMIT 1",
- array(
- $GLOBALS['module'],
- $GLOBALS['action'],
- $GLOBALS['what'],
- $uid,
- $rid,
- $MEM,
- $ADMIN,
- detectRemoteAddr(),
- session_id()
- ), __FUNCTION__, __LINE__
+ array(
+ $GLOBALS['module'],
+ $GLOBALS['action'],
+ $GLOBALS['what'],
+ $uid,
+ $rid,
+ $MEM,
+ $ADMIN,
+ detectRemoteAddr(),
+ session_id()
+ ), __FUNCTION__, __LINE__
);
} else {
// No entry does exists so we simply add it!
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_online` (module, action, what, userid, refid, is_member, is_admin, timestamp, sid, ip) VALUES ('%s','%s','%s', %s, %s, '%s','%s', UNIX_TIMESTAMP(), '%s','%s')",
- array(
- $GLOBALS['module'],
- $GLOBALS['action'],
- $GLOBALS['what'],
- $uid,
- $rid,
- $MEM,
- $ADMIN,
- session_id(),
- detectRemoteAddr()
- ), __FUNCTION__, __LINE__
+ array(
+ $GLOBALS['module'],
+ $GLOBALS['action'],
+ $GLOBALS['what'],
+ $uid,
+ $rid,
+ $MEM,
+ $ADMIN,
+ session_id(),
+ detectRemoteAddr()
+ ), __FUNCTION__, __LINE__
);
}
// Purge old entries
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_online` WHERE timestamp <= (UNIX_TIMESTAMP() - %s)",
- array(getConfig('online_timeout')), __FUNCTION__, __LINE__);
+ array(getConfig('online_timeout')), __FUNCTION__, __LINE__);
}
//
*
* Wobei $PayReicer der Username des Empfängers bei
* Primusportal.de ist. $PayAmount ist der gerundete( !! ) Betrag an Primera,
- * die der Empfänger erhalten soll. $PayDescription ist eine von Ihnen
+ * die der Empfänger erhalten soll. $PayDescription ist eine von Ihnen
* festgelegte kurze Beschreibung. Die Länge dieses Textes darf 100 Zeichen
* nicht überschreiten. Beispiel:
* $status = $Interface->payPrimera("garbage", 10000, "Auszahlung IhreSeite.de - ID: 12345");
// Set notified to Y
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET notified='Y' WHERE `id`=%s LIMIT 1",
- array(bigintval($id)), __FUNCTION__, __LINE__);
+ array(bigintval($id)), __FUNCTION__, __LINE__);
// Do a snapshot off all user refs
$result_user = SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `status`='CONFIRMED' ORDER BY `userid` ASC", __FUNCTION__, __LINE__);
// Check if line is already included...
$result_ref = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_rallye_users` WHERE rallye_id=%s AND `userid`=%s LIMIT 1",
- array(bigintval($id), bigintval($content['userid'])), __FUNCTION__, __LINE__);
+ array(bigintval($id), bigintval($content['userid'])), __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result_ref) == 0) {
// Free memory
SQL_FREERESULT($result_ref);
LEFT JOIN `{!_MYSQL_PREFIX!}_user_data` AS d
ON p.userid=d.userid
WHERE d.`status`='CONFIRMED' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND p.ref_depth=1 AND p.points > 0 AND d.userid=%s",
- array(getConfig('ref_payout'), bigintval($content['userid'])), __FUNCTION__, __LINE__);
+ array(getConfig('ref_payout'), bigintval($content['userid'])), __FUNCTION__, __LINE__);
list($cpoints) = SQL_FETCHROW($result_ref);
SQL_FREERESULT($result_ref);
// Add info line
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_rallye_users` (rallye_id, userid, refs, curr_points)
VALUES ('%s','%s','%s','%s')",
- array(bigintval($id), bigintval($content['userid']), bigintval($cnt), $cpoints), __FUNCTION__, __LINE__);
+ array(bigintval($id), bigintval($content['userid']), bigintval($cnt), $cpoints), __FUNCTION__, __LINE__);
$un = true;
} // END - if
function RALLYE_ADD_TOPUSERS ($rallye, $default=0) {
// First check how many prices are set
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id=%s ORDER BY price_level",
- array(bigintval($rallye)), __FUNCTION__, __LINE__);
+ array(bigintval($rallye)), __FUNCTION__, __LINE__);
$prices = SQL_NUMROWS($result);
SQL_FREERESULT($result);
LEFT JOIN `{!_MYSQL_PREFIX!}_refsystem` AS r
ON u.userid=r.userid
WHERE u.rallye_id=%s AND r.counter > 0 ORDER BY u.refs DESC",
- array(bigintval($rallye)), __FUNCTION__, __LINE__);
+ array(bigintval($rallye)), __FUNCTION__, __LINE__);
// Load users
$DATA = array(
// Check if line is already included...
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_rallye_users` WHERE rallye_id=%s AND `userid`=%s LIMIT 1",
- array(bigintval($id), bigintval($uid)), __FUNCTION__, __LINE__);
+ array(bigintval($id), bigintval($uid)), __FUNCTION__, __LINE__);
// Is this user added?
if (SQL_NUMROWS($result) == 0) {
// Add userid and his ref count to table
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_rallye_users` (rallye_id, userid, refs)
VALUES ('%s','%s','0')",
- array(bigintval($id), bigintval($uid)), __FUNCTION__, __LINE__);
+ array(bigintval($id), bigintval($uid)), __FUNCTION__, __LINE__);
} // END - if
// Free memory
// Expire rallye
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET expired='Y' WHERE `id`=%s LIMIT 1",
- array(bigintval($id)), __FUNCTION__, __LINE__);
+ array(bigintval($id)), __FUNCTION__, __LINE__);
// Run array through (by uid is the most important 2nd-level-array)
foreach($prices['uid'] as $key => $uid) {
// Add task
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_task_system` (status, task_type, subject, text, task_created)
VALUES ('NEW','RALLYE_EXPIRED','{--RALLYE_ADMIN_EXPIRED--}: %s','{--RALLYE_ADMIN_EXPIRED_TEXT--}',UNIX_TIMESTAMP())",
- array($title), __FUNCTION__, __LINE__);
+ array($title), __FUNCTION__, __LINE__);
// All work done here...
}
// Load users
$result = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid IN(%s) AND `status`='CONFIRMED' ORDER BY userid LIMIT %s",
- array($uid_string, count($uids_array)), __FUNCTION__, __LINE__);
+ array($uid_string, count($uids_array)), __FUNCTION__, __LINE__);
while ($content = SQL_FETCHARRAY($result)) {
// Construct the message masked and add it
$ret .= sprintf("%s %s %s (%s) - %s\n",
- translateGender($content['gender']),
- $content['surname'],
- $content['family'],
- $content['email'],
- $uids_array['poi'][$content['userid']]
+ translateGender($content['gender']),
+ $content['surname'],
+ $content['family'],
+ $content['email'],
+ $uids_array['poi'][$content['userid']]
);
} // END - while
// Load prices
$result = SQL_QUERY_ESC("SELECT price_level, points, info FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id=%s ORDER BY price_level",
- array(bigintval($rallye)), __FUNCTION__, __LINE__);
+ array(bigintval($rallye)), __FUNCTION__, __LINE__);
// Transfer elements
while ($content = SQL_FETCHARRAY($result)) {
// Load users uid old points earned
$result_user = SQL_QUERY_ESC("SELECT userid, refs, curr_points FROM `{!_MYSQL_PREFIX!}_rallye_users` WHERE rallye_id=%s ORDER BY `userid` ASC",
- array(bigintval($rallye)), __FUNCTION__, __LINE__);
+ array(bigintval($rallye)), __FUNCTION__, __LINE__);
while ($content = SQL_FETCHARRAY($result_user)) {
// Load current ref count
$cnt = RALLYE_GET_REFCOUNT($content['userid'], $content['refs']);
LEFT JOIN `{!_MYSQL_PREFIX!}_user_data` AS d
ON p.userid=d.userid
WHERE d.`status`='CONFIRMED' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND p.ref_depth=1 AND p.points > 0 AND d.userid=%s",
- array(getConfig('ref_payout'), bigintval($content['userid'])), __FUNCTION__, __LINE__);
+ array(getConfig('ref_payout'), bigintval($content['userid'])), __FUNCTION__, __LINE__);
list($refpoints) = SQL_FETCHROW($result_ref);
SQL_FREERESULT($result_ref);
function RALLYE_LIST_WINNERS ($rallye, $default=0) {
// First check how many prices are set
$result_prices = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id=%s ORDER BY price_level",
- array(bigintval($rallye)), __FUNCTION__, __LINE__);
+ array(bigintval($rallye)), __FUNCTION__, __LINE__);
$prices = SQL_NUMROWS($result_prices);
SQL_FREERESULT($result_prices);
// active = 1: account is still confirmed
// active = 0: account is deleted or locked
$result_active = SQL_QUERY_ESC("SELECT COUNT(userid) FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
- array(bigintval($DATA['uid'][$idx])), __FUNCTION__, __LINE__);
+ array(bigintval($DATA['uid'][$idx])), __FUNCTION__, __LINE__);
list($active) = SQL_FETCHROW($result_active);
SQL_FREERESULT($result_active);
$result_rallye = SQL_QUERY_ESC("SELECT id, title, start_time, end_time
FROM `{!_MYSQL_PREFIX!}_rallye_data`
WHERE end_time <= (UNIX_TIMESTAMP() - %s) AND expired='Y'",
- array($EXPIRE), __FUNCTION__, __LINE__);
+ array($EXPIRE), __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result_rallye) > 0) {
// Init SQLs
// Purge whole rallye
ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_rallye_data` WHERE `id`=%s LIMIT 1",
- array(bigintval($content['id'])), __FUNCTION__, __LINE__, false));
+ array(bigintval($content['id'])), __FUNCTION__, __LINE__, false));
ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id=%s LIMIT 1",
- array(bigintval($content['id'])), __FUNCTION__, __LINE__, false));
+ array(bigintval($content['id'])), __FUNCTION__, __LINE__, false));
ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_rallye_users` WHERE rallye_id=%s LIMIT 1",
- array(bigintval($content['id'])), __FUNCTION__, __LINE__, false));
+ array(bigintval($content['id'])), __FUNCTION__, __LINE__, false));
// Add task
// @TODO Rewrite this to a function
ADD_SQL(SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_task_system` (status, task_type, subject, text, task_created)
VALUES ('NEW','RALLYE_PURGED','{--RALLYE_ADMIN_PURGED--}: %s','{--RALLYE_ADMIN_PURGED_TEXT--}',UNIX_TIMESTAMP())",
- array($content['title']), __FUNCTION__, __LINE__, false));
+ array($content['title']), __FUNCTION__, __LINE__, false));
} // END - while
// Run all SQLs
function ADD_REFBACK_POINTS ($uid, $ref, $points, $ref_points) {
//* DEBUG: */ print "----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n";
// Back ref depths
- $GLOBALS['cache_array']['depth'][$uid][$ref] = $GLOBALS['ref_level'];
+ $GLOBALS['cache_array']['depth'][$uid][$ref] = $GLOBALS['ref_level'];
// Init points
$return = $points;
// Get all ref levels
$result_refs = SQL_QUERY("SELECT level, percents FROM `{!_MYSQL_PREFIX!}_refdepths` WHERE level > 0 ORDER BY level ASC",
- __FUNCTION__, __LINE__);
+ __FUNCTION__, __LINE__);
// "Walk" through all level
while ($content = SQL_FETCHARRAY($result_refs)) {
// Update refback table ("refid" and "uid" must be exchanged!)
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_refs` SET points=points+%s WHERE userid=%s AND refid=%s LIMIT 1",
- array($refback, $refid, $uid), __FUNCTION__, __LINE__);
+ array($refback, $refid, $uid), __FUNCTION__, __LINE__);
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):refback={$refback},uid={$uid},refid={$refid} - UPDATE! (".SQL_AFFECTEDROWS().")<br />\n";
// Add points again, but only directly
// Get percents from database
$result = SQL_QUERY_ESC("SELECT refback FROM `{!_MYSQL_PREFIX!}_user_refs` WHERE userid=%s AND refid=%s LIMIT 1",
- array($ref, $uid), __FUNCTION__, __LINE__);
+ array($ref, $uid), __FUNCTION__, __LINE__);
// Entry found? (Should be!)
if (SQL_NUMROWS($result) == 1) {
FROM `{!_MYSQL_PREFIX!}_user_refs`
WHERE refid=%s AND level=%s
ORDER BY userid ASC",
- array($rid,$level), __FUNCTION__, __LINE__);
+ array($rid,$level), __FUNCTION__, __LINE__);
// Entries found?
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):numRows=".SQL_NUMROWS($result)."<br />\n";
// Check for his referal
$result_refid = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE refid=%s ORDER BY userid ASC",
- array(bigintval($uid)), __FUNCTION__, __LINE__);
+ array(bigintval($uid)), __FUNCTION__, __LINE__);
// When no entry was updated then we have to create it here
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):found=".SQL_NUMROWS($result_refid)."<br />\n";
// Check existence
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_refs` WHERE userid=%s AND level='%s' AND refid=%s LIMIT 1",
- array(bigintval($uid), $GLOBALS['cache_array']['back_level'], bigintval($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']])), __FUNCTION__, __LINE__);
+ array(bigintval($uid), $GLOBALS['cache_array']['back_level'], bigintval($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']])), __FUNCTION__, __LINE__);
// Do we have no entry?
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},level={$GLOBALS['cache_array']['back_level']},ref={$GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']]},minus={$minus},numRows=".SQL_NUMROWS($result)." - FOUND!<br />\n";
// Insert this level
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},level={$GLOBALS['cache_array']['back_level']},ref={$GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']]} - ADD!<br />\n";
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_refs` (userid,level,refid) VALUES (%s,%s,%s)",
- array(bigintval($uid), $GLOBALS['cache_array']['back_level'], bigintval($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']])), __FUNCTION__, __LINE__);
+ array(bigintval($uid), $GLOBALS['cache_array']['back_level'], bigintval($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']])), __FUNCTION__, __LINE__);
// Move to next referal level and count his counter one up!
$GLOBALS['cache_array']['back_level']++; updateRefbackTable($GLOBALS['cache_array']['up_refid'][($GLOBALS['cache_array']['back_level'] - 1)]);
// Shall we add this as well?
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_refs` WHERE userid=%s AND level='%s' AND refid=%s LIMIT 1",
- array(bigintval($uid), ($GLOBALS['cache_array']['back_level']-$minus), bigintval($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']])), __FUNCTION__, __LINE__);
+ array(bigintval($uid), ($GLOBALS['cache_array']['back_level']-$minus), bigintval($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']])), __FUNCTION__, __LINE__);
// Do we have no entry?
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},level=".($GLOBALS['cache_array']['back_level']-$minus).",ref={$GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']]},numRows=".SQL_NUMROWS($result)." - BACK!<br />\n";
if (SQL_NUMROWS($result) == 0) {
// Insert this level
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_refs` (userid,level,refid) VALUES (%s,%s,%s)",
- array(bigintval($uid), ($GLOBALS['cache_array']['back_level']-$minus), bigintval($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']])), __FUNCTION__, __LINE__);
+ array(bigintval($uid), ($GLOBALS['cache_array']['back_level']-$minus), bigintval($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']])), __FUNCTION__, __LINE__);
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},level=".($GLOBALS['cache_array']['back_level']-$minus).",ref={$GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']]} - RETURNED!<br />\n";
} // END - if
} // END - if
ON r.refid=d.userid
WHERE r.userid=%s AND r.level=%s
ORDER BY r.refid ASC",
- array(bigintval($uid), bigintval($level)), __FUNCTION__, __LINE__);
+ array(bigintval($uid), bigintval($level)), __FUNCTION__, __LINE__);
// Are there some entries?
if (SQL_NUMROWS($result) > 0) {
// Get entry from database
$result = SQL_QUERY_ESC("SELECT id, refid, refback, level FROM `{!_MYSQL_PREFIX!}_user_refs` WHERE `id`=%s AND `userid`=%s LIMIT 1",
- array($id, getUserId()), __FUNCTION__, __LINE__);
+ array($id, getUserId()), __FUNCTION__, __LINE__);
// Is there an entry?
if (SQL_NUMROWS($result) == 1) {
// Update entry
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_refs` SET refback='%s' WHERE `id`=%s AND `userid`=%s LIMIT 1",
- array($percents, $id, getUserId()), __FUNCTION__, __LINE__);
+ array($percents, $id, getUserId()), __FUNCTION__, __LINE__);
// Entry updated?
if (SQL_AFFECTEDROWS() < 1) {
//
function registerMustFillout () {
$result = SQL_QUERY("SELECT field_name, field_required FROM `{!_MYSQL_PREFIX!}_must_register` ORDER BY `id`",
- __FUNCTION__, __LINE__);
+ __FUNCTION__, __LINE__);
while ($content = SQL_FETCHARRAY($result)) {
$value = '';
$ret = false;
foreach ($array as $key => $value) {
$result = SQL_QUERY("SELECT field_required FROM `{!_MYSQL_PREFIX!}_must_register` WHERE field_name='".$key."' LIMIT 1",
- __FUNCTION__, __LINE__);
+ __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// "Must-line" found
list($chk) = SQL_FETCHROW($result);
// Look for categories
$result = SQL_QUERY("SELECT `id`, `cat`, `visible` FROM `{!_MYSQL_PREFIX!}_cats` ".$AND." ORDER BY `sort` ASC",
- __FUNCTION__, __LINE__);
+ __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// List alle visible modules (or all to the admin)
// Generate arrays which holds the relevante chars to replace
$GLOBALS['security_chars'] = array(
- // The chars we are looking for...
+// The chars we are looking for...
'from' => array("{", "}", '/', '.', "'", "$", '(', ')', '{--', '--}', "%", ';', "[", "]", ':', "--"),
- // ... and we will replace to.
+// ... and we will replace to.
'to' => array(
"{OPEN_ANCHOR2}",
"{CLOSE_ANCHOR2}",
"{CLOSE_INDEX}",
"{DBL_DOT}",
"{COMMENT}"
- ),
-);
-
-// Characters allowed in URLs
-//
-// Note: Do not replace 'to' with 'from' and vise-versa! When you do this all booked URLs will be
-// rejected because of the {SLASH}, {DOT} and all below listed items inside the URL.
-$GLOBALS['url_chars'] = array(
- // Search for these secured characters
+ ),
+ );
+
+ // Characters allowed in URLs
+ //
+ // Note: Do not replace 'to' with 'from' and vise-versa! When you do this all booked URLs will be
+ // rejected because of the {SLASH}, {DOT} and all below listed items inside the URL.
+ $GLOBALS['url_chars'] = array(
+ // Search for these secured characters
'to' => array("{SLASH}", "{DOT}", "{PER}", "{DBL_DOT}", "{COMMENT}"),
- // Replace with these characters
+ // Replace with these characters
'from' => array('/', '.', "%", ':', "--")
-);
-
-// Overworked security part:
-if (is_array($_GET)) {
- foreach ($_GET as $seckey => $secvalue) {
- if (is_array($secvalue)) {
- // Throw arrays away...
- unset($_GET[$seckey]);
- } else {
- // Only variables are allowed (non-array) but we secure them all!
- foreach ($GLOBALS['security_chars']['from'] as $key => $char) {
- // Pass all through
- $_GET[$seckey] = str_replace($char , $GLOBALS['security_chars']['to'][$key], $_GET[$seckey]);
+ );
+
+ // Overworked security part:
+ if (is_array($_GET)) {
+ foreach ($_GET as $seckey => $secvalue) {
+ if (is_array($secvalue)) {
+ // Throw arrays away...
+ unset($_GET[$seckey]);
+ } else {
+ // Only variables are allowed (non-array) but we secure them all!
+ foreach ($GLOBALS['security_chars']['from'] as $key => $char) {
+ // Pass all through
+ $_GET[$seckey] = str_replace($char , $GLOBALS['security_chars']['to'][$key], $_GET[$seckey]);
+ }
+
+ // Strip all other out
+ $_GET[$seckey] = strip_tags($_GET[$seckey]);
+ }
}
-
- // Strip all other out
- $_GET[$seckey] = strip_tags($_GET[$seckey]);
}
- }
-}
-if (basename($_SERVER['PHP_SELF']) != 'install.php') {
- // And POST data
- foreach ($_POST as $seckey => $secvalue) {
- if (!is_array($secvalue)) {
- // Only variables are allowed (non-array) to be secured...
- foreach ($GLOBALS['security_chars']['from'] as $key => $char) {
- // Pass all through
- $_POST[$seckey] = str_replace($char , $GLOBALS['security_chars']['to'][$key], $_POST[$seckey]);
+ if (basename($_SERVER['PHP_SELF']) != 'install.php') {
+ // And POST data
+ foreach ($_POST as $seckey => $secvalue) {
+ if (!is_array($secvalue)) {
+ // Only variables are allowed (non-array) to be secured...
+ foreach ($GLOBALS['security_chars']['from'] as $key => $char) {
+ // Pass all through
+ $_POST[$seckey] = str_replace($char , $GLOBALS['security_chars']['to'][$key], $_POST[$seckey]);
+ }
+
+ // Strip all other out
+ $_POST[$seckey] = strip_tags($_POST[$seckey]);
+ }
}
-
- // Strip all other out
- $_POST[$seckey] = strip_tags($_POST[$seckey]);
}
- }
-}
-// Activate caching or transparent compressing when it is not already done
-if (!defined('_OB_CACHING')) {
- if (phpversion() >= '4.0.4pl1' && (strstr(getenv('HTTP_USER_AGENT'),'compatible') || (strstr(getenv('HTTP_USER_AGENT'), "Mozilla")))) {
- if ((extension_loaded('zlib')) && (function_exists('ob_start'))) {
- // Start caching
- define('_OB_CACHING', 'on');
- ob_start();
- } else {
- // Extension not loaded or required function is missing
- define('_OB_CACHING', '404');
+ // Activate caching or transparent compressing when it is not already done
+ if (!defined('_OB_CACHING')) {
+ if (phpversion() >= '4.0.4pl1' && (strstr(getenv('HTTP_USER_AGENT'),'compatible') || (strstr(getenv('HTTP_USER_AGENT'), "Mozilla")))) {
+ if ((extension_loaded('zlib')) && (function_exists('ob_start'))) {
+ // Start caching
+ define('_OB_CACHING', 'on');
+ ob_start();
+ } else {
+ // Extension not loaded or required function is missing
+ define('_OB_CACHING', '404');
+ }
+ } else {
+ // Old PHP version
+ define('_OB_CACHING', 'old');
+ }
}
- } else {
- // Old PHP version
- define('_OB_CACHING', 'old');
- }
-}
-// At last secure the $_SERVER['PHP_SELF'] element
-$_SERVER['PHP_SELF'] = secureString($_SERVER['PHP_SELF']);
-
-// Split it up into path and filename
-$SELF_DIR = dirname($_SERVER['PHP_SELF']);
-$SELF_FILE = basename($_SERVER['PHP_SELF']);
-
-// Check for a .php inside the $SELF_DIR...
-while (ereg('.php', $SELF_DIR)) {
- // Correct the dirname
- $SELF_DIR = substr($SELF_DIR, 0, (strpos($SELF_DIR, '.php') + 4));
- // Rewrite filename...
- $SELF_FILE = basename($SELF_DIR);
- // ... and dirname
- $SELF_DIR = dirname($SELF_DIR);
-}
+ // At last secure the $_SERVER['PHP_SELF'] element
+ $_SERVER['PHP_SELF'] = secureString($_SERVER['PHP_SELF']);
+
+ // Split it up into path and filename
+ $SELF_DIR = dirname($_SERVER['PHP_SELF']);
+ $SELF_FILE = basename($_SERVER['PHP_SELF']);
+
+ // Check for a .php inside the $SELF_DIR...
+ while (ereg('.php', $SELF_DIR)) {
+ // Correct the dirname
+ $SELF_DIR = substr($SELF_DIR, 0, (strpos($SELF_DIR, '.php') + 4));
+ // Rewrite filename...
+ $SELF_FILE = basename($SELF_DIR);
+ // ... and dirname
+ $SELF_DIR = dirname($SELF_DIR);
+ }
-// Put both together again and let's pray it is secured now...
-$_SERVER['PHP_SELF'] = $SELF_DIR.'/'.$SELF_FILE;
+ // Put both together again and let's pray it is secured now...
+ $_SERVER['PHP_SELF'] = $SELF_DIR.'/'.$SELF_FILE;
-// Remove uneccessary variables
-unset($SELF_DIR);
-unset($SELF_FILE);
+ // Remove uneccessary variables
+ unset($SELF_DIR);
+ unset($SELF_FILE);
-// Security system loaded...
-define('__SECURITY', '1');
+ // Security system loaded...
+ define('__SECURITY', '1');
-//
-?>
+ //
+ ?>
// Skip these entries
$SKIPPED = array(
'ok', 'edit', 'terms', 'pay_type'
- );
+ );
- // Save sponsor data
- $DATA = array(
+ // Save sponsor data
+ $DATA = array(
'keys' => array(),
'values' => array()
- );
-
- // Check if sponsor already exists
- foreach ($POST as $k => $v) {
- if (!(array_search($k, $SKIPPED) > -1)) {
- // Check only posted input entries not the submit button
- switch ($k)
- {
- case 'email':
- $ALREADY = false;
- if (!isEmailValid($v)) {
- // Email address is not valid
- $SAVE = false;
- } else {
- // Do we want to add a new sponsor or update his data?
- $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE email='%s' LIMIT 1",
- array($POST['email']), __FUNCTION__, __LINE__);
-
- // Is a sponsor alread in the db?
- if (SQL_NUMROWS($result) == 1) {
- // Yes, he is!
- if (($GLOBALS['what'] == "add_sponsor") || ($NO_UPDATE)) {
- // Already found!
- $ALREADY = true;
+ );
+
+ // Check if sponsor already exists
+ foreach ($POST as $k => $v) {
+ if (!(array_search($k, $SKIPPED) > -1)) {
+ // Check only posted input entries not the submit button
+ switch ($k)
+ {
+ case 'email':
+ $ALREADY = false;
+ if (!isEmailValid($v)) {
+ // Email address is not valid
+ $SAVE = false;
} else {
- // Update his data
- $UPDATE = true;
+ // Do we want to add a new sponsor or update his data?
+ $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE email='%s' LIMIT 1",
+ array($POST['email']), __FUNCTION__, __LINE__);
+
+ // Is a sponsor alread in the db?
+ if (SQL_NUMROWS($result) == 1) {
+ // Yes, he is!
+ if (($GLOBALS['what'] == "add_sponsor") || ($NO_UPDATE)) {
+ // Already found!
+ $ALREADY = true;
+ } else {
+ // Update his data
+ $UPDATE = true;
+ }
+ }
+
+ // Free memory
+ SQL_FREERESULT($result);
}
- }
+ break;
- // Free memory
- SQL_FREERESULT($result);
- }
- break;
-
- case "pass1":
- $k = ''; $v = '';
- break;
+ case "pass1":
+ $k = ''; $v = '';
+ break;
- case "pass2":
- $k = "password"; $v = md5($v);
- break;
+ case "pass2":
+ $k = "password"; $v = md5($v);
+ break;
- case "url":
- if (!isUrlValid($v)) $SAVE = false;
- break;
+ case "url":
+ if (!isUrlValid($v)) $SAVE = false;
+ break;
- default:
- // Test if there is are time selections
- convertSelectionsToTimestamp($POST, $DATA, $k, $skip);
- break;
- }
+ default:
+ // Test if there is are time selections
+ convertSelectionsToTimestamp($POST, $DATA, $k, $skip);
+ break;
+ }
- if ((!empty($k)) && ($skip == false)) {
- // Add data
- $DATA['keys'][] = $k; $DATA['values'][] = $v;
+ if ((!empty($k)) && ($skip == false)) {
+ // Add data
+ $DATA['keys'][] = $k; $DATA['values'][] = $v;
+ }
}
}
- }
- // Save sponsor?
- if ($SAVE) {
- // Default is no force even when a guest want to abuse this force switch
- if ((empty($POST['force'])) || (!IS_ADMIN())) $POST['force'] = 0;
+ // Save sponsor?
+ if ($SAVE) {
+ // Default is no force even when a guest want to abuse this force switch
+ if ((empty($POST['force'])) || (!IS_ADMIN())) $POST['force'] = 0;
- // SQL and message string is empty by default
- $sql = ''; $message = '';
+ // SQL and message string is empty by default
+ $sql = ''; $message = '';
- // Update?
- if ($UPDATE) {
- // Update his data
- $sql = "UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET ";
- foreach ($DATA['keys'] as $k => $v) {
- $sql .= $v."='%s', ";
- }
+ // Update?
+ if ($UPDATE) {
+ // Update his data
+ $sql = "UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET ";
+ foreach ($DATA['keys'] as $k => $v) {
+ $sql .= $v."='%s', ";
+ }
+
+ // Remove last ", " from SQL string
+ $sql = substr($sql, 0, -2)." WHERE `id`='%s' LIMIT 1";
+ $DATA['values'][] = bigintval(REQUEST_GET('id'));
+
+ // Generate message
+ $message = SPONSOR_GET_MESSAGE(ADMIN_SPONSOR_UPDATED, "updated", $messageArray);
+ $ret = "updated";
+ } elseif ((!$ALREADY) || (($POST['force'] == '1') && (IS_ADMIN()))) {
+ // Add new sponsor, first add more data
+ $DATA['keys'][] = "sponsor_created"; $DATA['values'][] = time();
+ $DATA['keys'][] = 'status';
+ if ((!$NO_UPDATE) && (IS_ADMIN()) && ($GLOBALS['what'] == "add_sponsor")) {
+ // Only allowed for admin
+ $DATA['values'][] = "PENDING";
+ } else {
+ // Guest area
+ $DATA['values'][] = "UNCONFIRMED";
+
+ // Generate hash code
+ $DATA['keys'][] = "hash";
+ $DATA['values'][] = md5(session_id().':'.$POST['email'].':'.detectRemoteAddr().':'.detectUserAgent().':'.time());
+ $DATA['keys'][] = "remote_addr";
+ $DATA['values'][] = detectRemoteAddr();
+ }
+
+ // Implode all data into strings
+ $KEYS = implode(", " , $DATA['keys']);
+ $valueS = str_repeat("%s', '", count($DATA['values']) - 1);
+
+ // Generate string
+ $sql = "INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_data` (".$KEYS.") VALUES ('".$valueS."%s')";
+
+ // Generate message
+ $message = SPONSOR_GET_MESSAGE(getMessage('ADMIN_SPONSOR_ADDED'), "added", $messageArray);
+ $ret = "added";
+ } elseif ((!$NO_UPDATE) && (IS_ADMIN())) {
+ // Add all data as hidden data
+ $OUT = '';
+ foreach ($POST as $k => $v) {
+ // Do not add 'force' !
+ if ($k != "force") {
+ $OUT .= "<input type=\"hidden\" name=\"".$k."\" value=\"".stripslashes($v)."\" />\n";
+ }
+ }
+ define('__HIDDEN_DATA', $OUT);
+ define('__EMAIL' , $POST['email']);
- // Remove last ", " from SQL string
- $sql = substr($sql, 0, -2)." WHERE `id`='%s' LIMIT 1";
- $DATA['values'][] = bigintval(REQUEST_GET('id'));
-
- // Generate message
- $message = SPONSOR_GET_MESSAGE(ADMIN_SPONSOR_UPDATED, "updated", $messageArray);
- $ret = "updated";
- } elseif ((!$ALREADY) || (($POST['force'] == '1') && (IS_ADMIN()))) {
- // Add new sponsor, first add more data
- $DATA['keys'][] = "sponsor_created"; $DATA['values'][] = time();
- $DATA['keys'][] = 'status';
- if ((!$NO_UPDATE) && (IS_ADMIN()) && ($GLOBALS['what'] == "add_sponsor")) {
- // Only allowed for admin
- $DATA['values'][] = "PENDING";
+ // Ask for adding a sponsor with same email address
+ LOAD_TEMPLATE("admin_add_sponsor_already");
+ return;
} else {
- // Guest area
- $DATA['values'][] = "UNCONFIRMED";
-
- // Generate hash code
- $DATA['keys'][] = "hash";
- $DATA['values'][] = md5(session_id().':'.$POST['email'].':'.detectRemoteAddr().':'.detectUserAgent().':'.time());
- $DATA['keys'][] = "remote_addr";
- $DATA['values'][] = detectRemoteAddr();
+ // Already added!
+ $message = sprintf(getMessage('SPONSOR_ALREADY_FOUND', $POST['email']));
+ $ret = "already";
}
- // Implode all data into strings
- $KEYS = implode(", " , $DATA['keys']);
- $valueS = str_repeat("%s', '", count($DATA['values']) - 1);
-
- // Generate string
- $sql = "INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_data` (".$KEYS.") VALUES ('".$valueS."%s')";
-
- // Generate message
- $message = SPONSOR_GET_MESSAGE(getMessage('ADMIN_SPONSOR_ADDED'), "added", $messageArray);
- $ret = "added";
- } elseif ((!$NO_UPDATE) && (IS_ADMIN())) {
- // Add all data as hidden data
- $OUT = '';
- foreach ($POST as $k => $v) {
- // Do not add 'force' !
- if ($k != "force") {
- $OUT .= "<input type=\"hidden\" name=\"".$k."\" value=\"".stripslashes($v)."\" />\n";
- }
+ if (!empty($sql)) {
+ // Run SQL command
+ $result = SQL_QUERY_ESC($sql, $DATA['values'], __FUNCTION__, __LINE__);
}
- define('__HIDDEN_DATA', $OUT);
- define('__EMAIL' , $POST['email']);
- // Ask for adding a sponsor with same email address
- LOAD_TEMPLATE("admin_add_sponsor_already");
- return;
+ // Output message
+ if ((!$NO_UPDATE) && (IS_ADMIN())) {
+ LOAD_TEMPLATE('admin_settings_saved', false, $message);
+ }
} else {
- // Already added!
- $message = sprintf(getMessage('SPONSOR_ALREADY_FOUND', $POST['email']));
- $ret = "already";
- }
-
- if (!empty($sql)) {
- // Run SQL command
- $result = SQL_QUERY_ESC($sql, $DATA['values'], __FUNCTION__, __LINE__);
- }
-
- // Output message
- if ((!$NO_UPDATE) && (IS_ADMIN())) {
+ // Error found!
+ $message = SPONSOR_GET_MESSAGE(getMessage('SPONSOR_DATA_NOT_SAVED'), "failed", $messageArray);
LOAD_TEMPLATE('admin_settings_saved', false, $message);
}
- } else {
- // Error found!
- $message = SPONSOR_GET_MESSAGE(getMessage('SPONSOR_DATA_NOT_SAVED'), "failed", $messageArray);
- LOAD_TEMPLATE('admin_settings_saved', false, $message);
- }
- // Shall we return the status?
- if ($RET_STATUS) return $ret;
+ // Shall we return the status?
+ if ($RET_STATUS) return $ret;
}
//
function sponsorTranslateUserStatus ($status) {
// Check cookies against database records...
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_sponsor_data`
WHERE `id`='%s' AND password='%s' AND `status`='CONFIRMED' LIMIT 1",
- array(bigintval(getSession('sponsorid')), getSession('sponsorpass')), __FUNCTION__, __LINE__);
+ array(bigintval(getSession('sponsorid')), getSession('sponsorpass')), __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// All is fine
$ret = true;
$result_sub = SQL_QUERY_ESC("SELECT what AS sub_what, title AS sub_title FROM `{!_MYSQL_PREFIX!}_sponsor_menu`
WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ".$WHERE."
ORDER BY `sort`",
- array($content['main_action']), __FUNCTION__, __LINE__);
+ array($content['main_action']), __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result_sub) > 0) {
// Load sub menus
$SUB = '';
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data`
SET last_online=UNIX_TIMESTAMP()
WHERE `id`='%s' AND password='%s' LIMIT 1",
- array(bigintval(getSession('sponsorid')), getSession('sponsorpass')), __FUNCTION__, __LINE__);
+ array(bigintval(getSession('sponsorid')), getSession('sponsorpass')), __FUNCTION__, __LINE__);
// This update went fine?
$login = (SQL_AFFECTEDROWS() == 1);
// Saving data was completed... ufff...
switch ($GLOBALS['what'])
{
- case "account": // Change account data
- if ($EMAIL === true) {
- $message = getMessage('SPONSOR_ACCOUNT_EMAIL_CHANGED');
- $templ = "admin_sponsor_change_email";
- $subj = getMessage('ADMIN_SPONSOR_ACC_EMAIL_SUBJ');
- } else {
- $message = getMessage('SPONSOR_ACCOUNT_DATA_SAVED');
- $templ = "admin_sponsor_change_data";
- $subj = getMessage('ADMIN_SPONSOR_ACC_DATA_SUBJ');
- }
- break;
-
- case "settings": // Change settings
- // Translate some data
- $content['receive'] = translateYesNo($content['receive_warnings']);
- $content['interval'] = createFancyTime($content['warning_interval']);
-
- // Set message template and subject for admin
- $message = getMessage('SPONSOR_SETTINGS_SAVED');
- $templ = "admin_sponsor_settings";
- $subj = getMessage('ADMIN_SPONSOR_SETTINGS_SUBJ');
- break;
-
- default: // Unknown sponsor what value!
- DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown sponsor module (what) %s detected.", $GLOBALS['what']));
- $message = sprintf(getMessage('SPONSOR_UNKNOWN_WHAT'), $GLOBALS['what']);
- $templ = ''; $subj = '';
- break;
+ case "account": // Change account data
+ if ($EMAIL === true) {
+ $message = getMessage('SPONSOR_ACCOUNT_EMAIL_CHANGED');
+ $templ = "admin_sponsor_change_email";
+ $subj = getMessage('ADMIN_SPONSOR_ACC_EMAIL_SUBJ');
+ } else {
+ $message = getMessage('SPONSOR_ACCOUNT_DATA_SAVED');
+ $templ = "admin_sponsor_change_data";
+ $subj = getMessage('ADMIN_SPONSOR_ACC_DATA_SUBJ');
+ }
+ break;
+
+ case "settings": // Change settings
+ // Translate some data
+ $content['receive'] = translateYesNo($content['receive_warnings']);
+ $content['interval'] = createFancyTime($content['warning_interval']);
+
+ // Set message template and subject for admin
+ $message = getMessage('SPONSOR_SETTINGS_SAVED');
+ $templ = "admin_sponsor_settings";
+ $subj = getMessage('ADMIN_SPONSOR_SETTINGS_SUBJ');
+ break;
+
+ default: // Unknown sponsor what value!
+ DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown sponsor module (what) %s detected.", $GLOBALS['what']));
+ $message = sprintf(getMessage('SPONSOR_UNKNOWN_WHAT'), $GLOBALS['what']);
+ $templ = ''; $subj = '';
+ break;
}
if (SQL_AFFECTEDROWS() == 1) {
// First to old address
switch ($GLOBALS['what'])
{
- case "account": // Change account data
- $email_msg = LOAD_EMAIL_TEMPLATE("sponsor_change_data", $content);
- sendEmail($content['email'], getMessage('SPONSOR_ACC_DATA_SUBJ'), $email_msg);
+ case "account": // Change account data
+ $email_msg = LOAD_EMAIL_TEMPLATE("sponsor_change_data", $content);
+ sendEmail($content['email'], getMessage('SPONSOR_ACC_DATA_SUBJ'), $email_msg);
- if ($EMAIL === true) {
- // Add hash code to content array
- $content['hash'] = $HASH;
+ if ($EMAIL === true) {
+ // Add hash code to content array
+ $content['hash'] = $HASH;
- // Second mail goes to the new address
- $email_msg = LOAD_EMAIL_TEMPLATE("sponsor_change_email", $content);
- sendEmail($content['email'], getMessage('SPONSOR_ACC_EMAIL_SUBJ'), $email_msg);
- }
- break;
+ // Second mail goes to the new address
+ $email_msg = LOAD_EMAIL_TEMPLATE("sponsor_change_email", $content);
+ sendEmail($content['email'], getMessage('SPONSOR_ACC_EMAIL_SUBJ'), $email_msg);
+ }
+ break;
- case "settings": // Change settings
- // Send email
- $email_msg = LOAD_EMAIL_TEMPLATE("sponsor_settings", $content);
- sendEmail($content['email'], getMessage('SPONSOR_SETTINGS_SUBJ'), $email_msg);
- break;
+ case "settings": // Change settings
+ // Send email
+ $email_msg = LOAD_EMAIL_TEMPLATE("sponsor_settings", $content);
+ sendEmail($content['email'], getMessage('SPONSOR_SETTINGS_SUBJ'), $email_msg);
+ break;
}
} // END - if
} // END - if
foreach ($actionArray as $actionId => $action) {
// Add form for this action
$OUT .= sprintf(LOAD_TEMPLATE('member_surfbar_list_form', true),
- $width,
- bigintval($urlId),
- strtolower($action),
- strtoupper($action),
- strtoupper($action)
+ $width,
+ bigintval($urlId),
+ strtolower($action),
+ strtoupper($action),
+ strtoupper($action)
);
} // END - foreach
function SURFBAR_VALIDATE_MEMBER_ACTION_STATUS ($action, $status) {
// Search for the requested action/status combination in database
$result = SQL_QUERY_ESC("SELECT new_status FROM `{!_MYSQL_PREFIX!}_surfbar_actions` WHERE `action`='%s' AND `status`='%s' LIMIT 1",
- array($action, $status), __FUNCTION__, __LINE__);
+ array($action, $status), __FUNCTION__, __LINE__);
// Is the entry there?
$isValid = (SQL_NUMROWS($result) == 1);
function SURFBAR_MEMBER_RETREAT_ACTION ($urlData) {
// Create the data array for next function call
$data = array(
- $urlData['id'] => $urlData
+ $urlData['id'] => $urlData
);
// Simply change the status here
function SURFBAR_MEMBER_BOOKNOW_ACTION ($urlData) {
// Create the data array for next function call
$data = array(
- $urlData['id'] => $urlData
+ $urlData['id'] => $urlData
);
// Simply change the status here
// Has the URL or limit changed?
if (true) {
- //if (($urlData['views_allowed'] != $urlData['edit']['limit']) || ($url1 != $url2)) {
+ //if (($urlData['views_allowed'] != $urlData['edit']['limit']) || ($url1 != $url2)) {
// Run the query
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_surfbar_urls` SET url='%s', views_allowed=%s, views_max=%s WHERE `id`=%s AND `status`='%s' LIMIT 1",
- array($urlData['url'], $urlData['edit']['limit'], $urlData['edit']['limit'], $urlData['id'], $urlData['status']), __FUNCTION__, __LINE__);
+ array($urlData['url'], $urlData['edit']['limit'], $urlData['edit']['limit'], $urlData['id'], $urlData['status']), __FUNCTION__, __LINE__);
// All fine
$status = true;
// Update last notified
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET surfbar_low_notified=NOW() WHERE userid=%s LIMIT 1",
- array($uid), __FUNCTION__, __LINE__);
+ array($uid), __FUNCTION__, __LINE__);
} // END - if
} // END - foreach
}
WHERE %s='%s'".$add."
ORDER BY %s %s
%s",
- array($column, $searchTerm, $order, $sort, $limit), __FUNCTION__, __LINE__);
+ array($column, $searchTerm, $order, $sort, $limit), __FUNCTION__, __LINE__);
// Is there at least one record?
if (SQL_NUMROWS($result) > 0) {
// Just run the insert query for now
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_urls` (userid,url,status,views_max,views_allowed,fixed_reload) VALUES (%s,'%s','%s',%s,%s,%s)",
- array(
- $uid,
- $urlData['url'],
- $urlData['status'],
- $urlData['limit'],
- $urlData['limit'],
- $urlData['reload']
- ), __FUNCTION__, __LINE__
+ array(
+ $uid,
+ $urlData['url'],
+ $urlData['status'],
+ $urlData['limit'],
+ $urlData['limit'],
+ $urlData['reload']
+ ), __FUNCTION__, __LINE__
);
// Return insert id
// Prepare subject
$subject = getMessage(sprintf("ADMIN_SURFBAR_NOTIFY_%s_SUBJECT",
- strtoupper($messageType)
+ strtoupper($messageType)
));
// Is the subject line there?
// Prepare subject
$subject = getMessage(sprintf("MEMBER_SURFBAR_NOTIFY_%s_SUBJECT",
- strtoupper($messageType)
+ strtoupper($messageType)
));
// Is the subject line there?
if (REQUEST_ISSET_GET(('frame'))) {
// Use the frame as a template name part... ;-)
$templateName = sprintf("surfbar_frame_%s",
- REQUEST_GET(('frame'))
+ REQUEST_GET(('frame'))
);
} // END - if
ON u.id=l.url_id
WHERE l.userid=%s AND (UNIX_TIMESTAMP() - ".SURFBAR_GET_SURF_LOCK().") < UNIX_TIMESTAMP(l.last_surfed) AND (((UNIX_TIMESTAMP(l.last_surfed) - u.fixed_reload) < 0 AND u.fixed_reload > 0) OR u.fixed_reload = 0)
LIMIT 1",
- array(getUserId()), __FUNCTION__, __LINE__
+ array(getUserId()), __FUNCTION__, __LINE__
);
// Fetch row
$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__
+ array($status), __FUNCTION__, __LINE__
);
// Fetch row
FROM `{!_MYSQL_PREFIX!}_surfbar_urls`
WHERE userid=%s".$add."
LIMIT %s",
- array($uid, getConfig('surfbar_max_order')), __FUNCTION__, __LINE__
+ array($uid, getConfig('surfbar_max_order')), __FUNCTION__, __LINE__
);
// Fetch row
///* 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__);
+ 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__);
+ 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"
// 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__);
+ 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__);
+ array(getUserId(), SURFBAR_GET_ID()), __FUNCTION__, __LINE__);
// Was that update okay?
if (SQL_AFFECTEDROWS() < 1) {
// No, then insert entry
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_surfbar_stats` (userid,url_id,count) VALUES (%s,%s,1)",
- array(getUserId(), SURFBAR_GET_ID()), __FUNCTION__, __LINE__);
+ array(getUserId(), SURFBAR_GET_ID()), __FUNCTION__, __LINE__);
} // END - if
// Update total/daily/weekly/monthly counter
// 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__);
+ 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);
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__);
+ array(SURFBAR_GET_ID(), getUserId(), SURFBAR_GET_SALT()), __FUNCTION__, __LINE__);
} // END - if
// Debug message
WHERE userid=%s AND url_id=%s AND (UNIX_TIMESTAMP() - ".SURFBAR_GET_SURF_LOCK().") < UNIX_TIMESTAMP(last_surfed)
ORDER BY last_surfed ASC
LIMIT 1",
- array(getUserId(), bigintval($urlId)), __FUNCTION__, __LINE__
+ array(getUserId(), bigintval($urlId)), __FUNCTION__, __LINE__
);
// Fetch counter
WHERE u.userid NOT IN (%s,0) AND u.`status`='ACTIVE'
GROUP BY u.userid
ORDER BY u.userid ASC",
- array(getUserId()), __FUNCTION__, __LINE__);
+ array(getUserId()), __FUNCTION__, __LINE__);
} else {
// Get all userid
$result = SQL_QUERY("SELECT u.userid, UNIX_TIMESTAMP(d.surfbar_low_notified) AS notified
FROM `{!_MYSQL_PREFIX!}_surfbar_stats`
WHERE (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(last_online)) <= %s
GROUP BY userid",
- array(getConfig('online_timeout')), __FUNCTION__, __LINE__);
+ array(getConfig('online_timeout')), __FUNCTION__, __LINE__);
// Fetch count
$cnt = SQL_NUMROWS($result);
return $cnt;
}
-// Determine waiting time for one URL
+// Determine waiting time for one URL
function SURFBAR_DETERMINE_WAIT_TIME () {
// Get fixed reload lock
$fixed = SURFBAR_GET_FIXED_RELOAD();
userid=%s
ORDER BY
id ASC", array(getUserId()),
- __FUNCTION__, __LINE__);
+ __FUNCTION__, __LINE__);
// Load all entries
while ($content = SQL_FETCHARRAY($result)) {
FROM `{!_MYSQL_PREFIX!}_surfbar_urls` AS u
WHERE u.userid=%s AND u.status != 'DELETED'
ORDER BY u.id ASC",
- array(getUserId()), __FUNCTION__, __LINE__);
+ array(getUserId()), __FUNCTION__, __LINE__);
// Are there entries?
if (SQL_NUMROWS($result) > 0) {
// Get all assigned actions
$result = SQL_QUERY_ESC("SELECT action FROM `{!_MYSQL_PREFIX!}_surfbar_actions` WHERE `status`='%s' ORDER BY `id` ASC",
- array($status), __FUNCTION__, __LINE__);
+ array($status), __FUNCTION__, __LINE__);
// Some entries there?
if (SQL_NUMROWS($result) > 0) {
GROUP BY sbu.id
ORDER BY l.last_surfed ASC, sbu.id ASC
LIMIT %s,1",
- array($randNum), __FUNCTION__, __LINE__
+ array($randNum), __FUNCTION__, __LINE__
);
} else {
// Get data from specified id number
ON sbu.id=l.url_id
WHERE sbu.userid != %s AND sbu.`status`='ACTIVE' AND sbu.id=%s AND (sbu.views_allowed=0 OR (sbu.views_allowed > 0 AND sbu.views_max > 0))
LIMIT 1",
- array(getUserId(), bigintval($urlId)), __FUNCTION__, __LINE__
+ array(getUserId(), bigintval($urlId)), __FUNCTION__, __LINE__
);
}
} elseif (GET_EXT_VERSION('cache') != '0.1.8') {
// Load version from database
$result = SQL_QUERY_ESC("SELECT theme_ver FROM `{!_MYSQL_PREFIX!}_themes` WHERE theme_path='%s' LIMIT 1",
- array($name), __FUNCTION__, __LINE__);
+ array($name), __FUNCTION__, __LINE__);
// Entry found?
if (SQL_NUMROWS($result) == 1) {
} elseif (GET_EXT_VERSION('cache') != '0.1.8') {
// Check if current theme is already imported or not
$result = SQL_QUERY_ESC("SELECT theme_active FROM `{!_MYSQL_PREFIX!}_themes` WHERE theme_path='%s' AND theme_active='Y' LIMIT 1",
- array($name), __FUNCTION__, __LINE__);
+ array($name), __FUNCTION__, __LINE__);
// Is the theme active and installed?
$active = (SQL_NUMROWS($result) == 1);
} elseif (GET_EXT_VERSION('cache') != '0.1.8') {
// Check if current theme is already imported or not
$result = SQL_QUERY_ESC("SELECT theme_name FROM `{!_MYSQL_PREFIX!}_themes` WHERE theme_path='%s' AND theme_active='Y' LIMIT 1",
- array($name), __FUNCTION__, __LINE__);
+ array($name), __FUNCTION__, __LINE__);
// Load theme name
list($name) = SQL_FETCHROW($result);
// Add status or mode
if (REQUEST_ISSET_GET(('status'))) $add .= "&mode=".REQUEST_GET(('status'));
- elseif (REQUEST_ISSET_GET(('mode'))) $add .= "&mode=".REQUEST_GET(('mode'));
+ elseif (REQUEST_ISSET_GET(('mode'))) $add .= "&mode=".REQUEST_GET(('mode'));
// Makes order by links..
if ($letter == "front") $letter = getMessage('_ALL2');
// Add status or mode
if (REQUEST_ISSET_GET(('status'))) $OUT .= "&mode=".REQUEST_GET(('status'));
- elseif (REQUEST_ISSET_GET(('mode'))) $OUT .= "&mode=".REQUEST_GET(('mode'));
+ elseif (REQUEST_ISSET_GET(('mode'))) $OUT .= "&mode=".REQUEST_GET(('mode'));
- // Letter and so on
+ // Letter and so on
$OUT .= "&letter=".REQUEST_GET(('letter'))."&sortby=".REQUEST_GET(('sortby'))."&page=".$page."&offset=".$offset."\">";
}
$result = SQL_QUERY_ESC("SELECT userid
FROM `{!_MYSQL_PREFIX!}_user_data`
WHERE `email`='%s'".$locked." LIMIT 1",
- array($email), __FUNCTION__, __LINE__);
+ array($email), __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load userid
list($uid) = SQL_FETCHROW($result);
// Look for random user
$result = SQL_QUERY_ESC("SELECT `userid` FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `status`='CONFIRMED' AND `rand_confirmed` >= %s ORDER BY `rand_confirmed` DESC LIMIT %s, 1",
- array(getConfig('user_min_confirmed'), $randNum), __FUNCTION__, __LINE__);
+ array(getConfig('user_min_confirmed'), $randNum), __FUNCTION__, __LINE__);
// Do we have one entry there?
if (SQL_NUMROWS($result) == 1) {
// Reset this user's counter
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `rand_confirmed`=0 WHERE userid=%s LIMIT 1",
- array($refid), __FUNCTION__, __LINE__);
+ array($refid), __FUNCTION__, __LINE__);
} // END - if
// Free result
$dmy = '';
// Add last_login if available
- $lastOnline = '';
+ $lastOnline = '';
if (GET_EXT_VERSION('sql_patches') >= '0.2.8') {
$lastOnline = ', last_login';
} // END - if
'last_online' => 0,
'last_login' => 0,
'hash' => ''
- );
+ );
- // Check login data
- if ((EXT_IS_ACTIVE('nickname')) && (NICKNAME_PROBE_ON_USERID($uid))) {
- // Nickname entered
- $result = SQL_QUERY_ESC("SELECT userid, password, last_online".$lastOnline." FROM `{!_MYSQL_PREFIX!}_user_data` WHERE nickname='%s' AND `status`='CONFIRMED' LIMIT 1",
+ // Check login data
+ if ((EXT_IS_ACTIVE('nickname')) && (NICKNAME_PROBE_ON_USERID($uid))) {
+ // Nickname entered
+ $result = SQL_QUERY_ESC("SELECT userid, password, last_online".$lastOnline." FROM `{!_MYSQL_PREFIX!}_user_data` WHERE nickname='%s' AND `status`='CONFIRMED' LIMIT 1",
array($uid), __FUNCTION__, __LINE__);
- } else {
- // Direct userid entered
- $result = SQL_QUERY_ESC("SELECT userid, password, last_online".$lastOnline." FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
+ } else {
+ // Direct userid entered
+ $result = SQL_QUERY_ESC("SELECT userid, password, last_online".$lastOnline." FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
array($uid, $content['hash']), __FUNCTION__, __LINE__);
- }
+ }
- // Load entry
- $content = SQL_FETCHARRAY($result);
- if (!empty($content['userid'])) $uid = bigintval($content['userid']);
+ // Load entry
+ $content = SQL_FETCHARRAY($result);
+ if (!empty($content['userid'])) $uid = bigintval($content['userid']);
- // Is there an entry?
- if ((SQL_NUMROWS($result) == 1) && ((($probe_nickname) && (!empty($content['userid']))) || ($content['userid'] == $uid))) {
- // Free result
- SQL_FREERESULT($result);
+ // Is there an entry?
+ if ((SQL_NUMROWS($result) == 1) && ((($probe_nickname) && (!empty($content['userid']))) || ($content['userid'] == $uid))) {
+ // Free result
+ SQL_FREERESULT($result);
- // Check for old MD5 passwords
- if ((strlen($content['password']) == 32) && (md5($passwd) == $content['password'])) {
- // Just set the hash to the password from DB... :)
- $content['hash'] = $content['password'];
- } else {
- // Hash password with improved way for comparsion
- $content['hash'] = generateHash($passwd, substr($content['password'], 0, -40));
- }
+ // Check for old MD5 passwords
+ if ((strlen($content['password']) == 32) && (md5($passwd) == $content['password'])) {
+ // Just set the hash to the password from DB... :)
+ $content['hash'] = $content['password'];
+ } else {
+ // Hash password with improved way for comparsion
+ $content['hash'] = generateHash($passwd, substr($content['password'], 0, -40));
+ }
- // Does the password match the hash?
- if ($content['hash'] == $content['password']) {
- // New hashed password found so let's generate a new one
- $content['hash'] = generateHash($passwd);
+ // Does the password match the hash?
+ if ($content['hash'] == $content['password']) {
+ // New hashed password found so let's generate a new one
+ $content['hash'] = generateHash($passwd);
- // ... and update database
- // @TODO Make this filter working: $ADDON = runFilterChain('post_login_update', $content);
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET password='%s' WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
+ // ... and update database
+ // @TODO Make this filter working: $ADDON = runFilterChain('post_login_update', $content);
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET password='%s' WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
array($content['hash'], $uid), __FUNCTION__, __LINE__);
- // No login bonus by default
- $GLOBALS['bonus_payed'] = false;
+ // No login bonus by default
+ $GLOBALS['bonus_payed'] = false;
- // Probe for last online timemark
- $probe = time() - $content['last_online'];
- if (!empty($content['last_login'])) $probe = time() - $content['last_login'];
- if ((GET_EXT_VERSION('bonus') >= '0.2.2') && ($probe >= getConfig('login_timeout'))) {
- // Add login bonus to user's account
- $add = sprintf(", login_bonus=login_bonus+%s",
+ // Probe for last online timemark
+ $probe = time() - $content['last_online'];
+ if (!empty($content['last_login'])) $probe = time() - $content['last_login'];
+ if ((GET_EXT_VERSION('bonus') >= '0.2.2') && ($probe >= getConfig('login_timeout'))) {
+ // Add login bonus to user's account
+ $add = sprintf(", login_bonus=login_bonus+%s",
(float)getConfig('login_bonus')
- );
- $GLOBALS['bonus_payed'] = true;
+ );
+ $GLOBALS['bonus_payed'] = true;
- // Subtract login bonus from userid's account or jackpot
- if ((GET_EXT_VERSION('bonus') >= '0.3.5') && (getConfig('bonus_mode') != "ADD")) BONUS_POINTS_HANDLER('login_bonus');
- } // END - if
+ // Subtract login bonus from userid's account or jackpot
+ if ((GET_EXT_VERSION('bonus') >= '0.3.5') && (getConfig('bonus_mode') != "ADD")) BONUS_POINTS_HANDLER('login_bonus');
+ } // END - if
- // Calculate new hash with the secret key and master salt together
- $content['hash'] = generatePassString($content['hash']);
+ // Calculate new hash with the secret key and master salt together
+ $content['hash'] = generatePassString($content['hash']);
- // Update global array
- // @TODO Make this filter working: $URL = runFilterChain('do_login', array('content' => $content, 'addon' => $ADDON));
- setUserId($uid);
+ // Update global array
+ // @TODO Make this filter working: $URL = runFilterChain('do_login', array('content' => $content, 'addon' => $ADDON));
+ setUserId($uid);
- // Try to set session data (which shall normally always work!)
- if ((setSession('userid', $uid )) && (setSession('u_hash', $content['hash']))) {
- // Update database records
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET total_logins=total_logins+1".$add." WHERE userid=%s LIMIT 1",
+ // Try to set session data (which shall normally always work!)
+ if ((setSession('userid', $uid )) && (setSession('u_hash', $content['hash']))) {
+ // Update database records
+ 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&mode=bonus';
+ 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&mode=bonus';
+ } else {
+ // Bonus not added
+ $URL = 'modules.php?module=chk_login&mode=login';
+ }
} else {
- // Bonus not added
- $URL = 'modules.php?module=chk_login&mode=login';
+ // Cannot update counter!
+ $URL = 'modules.php?module=index&what=login&login='.getCode('CNTR_FAILED');
}
} else {
- // Cannot update counter!
- $URL = 'modules.php?module=index&what=login&login='.getCode('CNTR_FAILED');
+ // Cookies not setable!
+ $URL = 'modules.php?module=index&what=login&login='.getCode('NO_COOKIES');
}
- } else {
- // Cookies not setable!
- $URL = 'modules.php?module=index&what=login&login='.getCode('NO_COOKIES');
- }
- } elseif (GET_EXT_VERSION('sql_patches') >= '0.6.1') {
- // Update failture counter
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET login_failures=login_failures+1,last_failure=NOW() WHERE userid=%s LIMIT 1",
+ } elseif (GET_EXT_VERSION('sql_patches') >= '0.6.1') {
+ // Update failture counter
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET login_failures=login_failures+1,last_failure=NOW() WHERE userid=%s LIMIT 1",
array($uid), __FUNCTION__, __LINE__);
- // Wrong password!
- $URL = 'modules.php?module=index&what=login&login='.getCode('WRONG_PASS');
- }
- } elseif ((($probe_nickname) && (!empty($content['userid']))) || ($content['userid'] == $uid)) {
- // Other account status?
- // @TODO Can this query be merged with above query?
- $result = SQL_QUERY_ESC("SELECT status FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
+ // Wrong password!
+ $URL = 'modules.php?module=index&what=login&login='.getCode('WRONG_PASS');
+ }
+ } elseif ((($probe_nickname) && (!empty($content['userid']))) || ($content['userid'] == $uid)) {
+ // Other account status?
+ // @TODO Can this query be merged with above query?
+ $result = SQL_QUERY_ESC("SELECT status FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
array($uid), __FUNCTION__, __LINE__);
- // Entry found?
- if (SQL_NUMROWS($result) == 1) {
- // Load status
- list($status) = SQL_FETCHROW($result);
+ // Entry found?
+ if (SQL_NUMROWS($result) == 1) {
+ // Load status
+ list($status) = SQL_FETCHROW($result);
- // Create an error code from given status
- $errorCode = generateErrorCodeFromUserStatus($status);
+ // Create an error code from given status
+ $errorCode = generateErrorCodeFromUserStatus($status);
+ } else {
+ // ID not found!
+ $errorCode = getCode('WRONG_ID');
+ }
+
+ // Construct URL
+ $URL = 'modules.php?module=index&what=login&login='.$errorCode;
} else {
// ID not found!
- $errorCode = getCode('WRONG_ID');
+ $URL = 'modules.php?module=index&what=login&login='.getCode('WRONG_ID');
}
- // Construct URL
- $URL = 'modules.php?module=index&what=login&login='.$errorCode;
- } else {
- // ID not found!
- $URL = 'modules.php?module=index&what=login&login='.getCode('WRONG_ID');
- }
-
- // Return URL
- return $URL;
+ // Return URL
+ return $URL;
}
// Try to send a new password for the given user account
if ((EXT_IS_ACTIVE('nickname')) && (NICKNAME_PROBE_ON_USERID($uid))) {
// Nickname entered
$result = SQL_QUERY_ESC("SELECT userid, status FROM `{!_MYSQL_PREFIX!}_user_data` WHERE nickname='%s' OR email='%s' LIMIT 1",
- array($uid, $email), __FUNCTION__, __LINE__);
+ array($uid, $email), __FUNCTION__, __LINE__);
} elseif (($uid > 0) && (empty($email))) {
// Direct userid entered
$result = SQL_QUERY_ESC("SELECT userid, status FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(bigintval($uid)), __FUNCTION__, __LINE__);
+ array(bigintval($uid)), __FUNCTION__, __LINE__);
} elseif (!empty($email)) {
// Email entered
$result = SQL_QUERY_ESC("SELECT userid, status FROM `{!_MYSQL_PREFIX!}_user_data` WHERE email='%s' LIMIT 1",
- array($email), __FUNCTION__, __LINE__);
+ array($email), __FUNCTION__, __LINE__);
} else {
// Userid not set!
DEBUG_LOG(__FUNCTION__, __LINE__, 'Userid is not set! BUG!');
// Ooppps, this was missing! ;-) We should update the database...
$NEW_PASS = generatePassword();
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET password='%s' WHERE userid=%s LIMIT 1",
- array(generateHash($NEW_PASS), $uid), __FUNCTION__, __LINE__);
+ array(generateHash($NEW_PASS), $uid), __FUNCTION__, __LINE__);
// Prepare data and message for email
$msg = LOAD_EMAIL_TEMPLATE('new-pass', array('new_pass' => $NEW_PASS), $uid);
function WERNIS_LOG_TRANSFER ($wdsId, $amount, $type = 'FAILED', $message = '', $status = '') {
// Register this wernis movement
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_wernis` (`userid`,`wernis_account`,`wernis_amount`,`wernis_timestamp`,`wernis_type`,`wernis_api_message`,`wernis_api_status`) VALUES (%d, %d, %d, UNIX_TIMESTAMP(), '%s', '%s', '%s')",
- array(getUserId(), bigintval($wdsId), bigintval($amount), $type, $message, $status), __FUNCTION__, __LINE__);
+ array(getUserId(), bigintval($wdsId), bigintval($amount), $type, $message, $status), __FUNCTION__, __LINE__);
}
// Take fees and factor
if ((getConfig('yoomedia_requests_remain') > 0) || (!$countQuery)) {
// Prepare the low-level request
$requestString = sprintf("http://www.yoomedia.de/interface_2.0/%s?id=%s&sid=%s&pw=%s&reload=%s&ma=%s&uebrig=%s&verguetung=%s&erotik=%s",
- $script,
- getConfig(('yoomedia_id')),
- getConfig(('yoomedia_sid')),
- getConfig('yoomedia_passwd'),
- getConfig(('yoomedia_tm_max_reload')),
- getConfig(('yoomedia_tm_min_wait')),
- getConfig(('yoomedia_tm_clicks_remain')),
- getConfig(('yoomedia_tm_min_pay')),
- getConfig(('yoomedia_erotic_allowed'))
+ $script,
+ getConfig(('yoomedia_id')),
+ getConfig(('yoomedia_sid')),
+ getConfig('yoomedia_passwd'),
+ getConfig(('yoomedia_tm_max_reload')),
+ getConfig(('yoomedia_tm_min_wait')),
+ getConfig(('yoomedia_tm_clicks_remain')),
+ getConfig(('yoomedia_tm_min_pay')),
+ getConfig(('yoomedia_erotic_allowed'))
);
// Run the query
// Auto-generate URL
$data['url'] = sprintf("http://www.yoomedia.de/code/%s-mail.php?id=%s&sid=%s",
- $type,
- $data['id'],
- $data['sid']
+ $type,
+ $data['id'],
+ $data['sid']
);
// Lock this mail for new delivery
// Add the entry
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_yoomedia_reload` (`type`,`y_id`,`y_reload`,`inserted`) VALUES ('%s',%s,%s,'0000-00-00 00:00')",
- array($mode, bigintval($data['id']), bigintval($data['reload'])), __FUNCTION__, __LINE__);
+ array($mode, bigintval($data['id']), bigintval($data['reload'])), __FUNCTION__, __LINE__);
} // END - if
}
// Add the entry
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_yoomedia_reload` WHERE `type`='%s' AND `y_id`=%s LIMIT 1",
- array($mode, bigintval($data['id'])), __FUNCTION__, __LINE__);
+ array($mode, bigintval($data['id'])), __FUNCTION__, __LINE__);
}
// "Translates" the index number into an assosiative value
// Query database
$result = SQL_QUERY_ESC("SELECT `id`, UNIX_TIMESTAMP(`inserted`) AS inserted FROM `{!_MYSQL_PREFIX!}_yoomedia_reload` WHERE `type`='%s' AND `y_id`=%s LIMIT 1",
- array($type, bigintval($id)), __FUNCTION__, __LINE__);
+ array($type, bigintval($id)), __FUNCTION__, __LINE__);
// Entry found?
if (SQL_NUMROWS($result) == 1) {
if (((time() - $time) >= ($reload * 60*60)) && ($time > 0)) {
// Remove entry
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_yoomedia_reload` WHERE `id`=%s LIMIT 1",
- array($id), __FUNCTION__, __LINE__);
+ array($id), __FUNCTION__, __LINE__);
} else {
// Dont' sent again this mail
$reloaded = $time;
// Add the entry
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_yoomedia_reload` (`type`,`y_id`,`y_reload`) VALUES ('%s',%s,%s)",
- array($mode, bigintval($data['id']), bigintval($data['reload'])), __FUNCTION__, __LINE__);
+ array($mode, bigintval($data['id']), bigintval($data['reload'])), __FUNCTION__, __LINE__);
} // END - if
}
$GLOBALS['config_local_loaded'] = false;
// Is the local configuration there?
-if (isIncludeReadable('inc/cache/config-local.php')) {
+if ((isIncludeReadable('inc/cache/config-local.php')) && (isIncludeReadable('inc/config.php'))) {
+ // We are better in installation mode
+ $GLOBALS['mxchange_installing'] = true;
+
+ // Define default main_title here
+ define('MAIN_TITLE', 'Your mail-exchange title');
+
+ // Set output mode here
+ setConfigEntry('OUTPUT_MODE', 'render');
+
+ // Both exist! This is bad and should be avoided by the admin
+ app_die(__FILE__, __LINE__, 'You have uploaded or kept an out-dated file at <strong>inc/config.php</strong> along with the new file <strong>inc/cache/config-local.php</strong>. Please remove <strong>inc/config.php</strong> to avoid incompatiblity issues. Thank you.');
+} elseif (isIncludeReadable('inc/cache/config-local.php')) {
// Then load it
loadIncludeOnce('inc/cache/config-local.php');
// Mark configuration as loaded
$GLOBALS['config_local_loaded'] = true;
+} elseif (isIncludeReadable('inc/config.php')) {
+ // Out-dated inc/config.php found, falling back to load and "wrap" it
+ updateOldConfigFile();
} elseif (isInstalling()) {
// Set some essential constants
// @TODO Rewrite them to avoid this else block
foreach ($DEL as $del_ext) {
// First remove entry from extensions table
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_extensions` WHERE `ext_name`='%s' LIMIT 1",
- array($del_ext), __FILE__, __LINE__);
+ array($del_ext), __FILE__, __LINE__);
// Remove (maybe?) found tasks (main task and possible updates
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_task_system` WHERE subject='[%s:]' AND (task_type='EXTENSION' OR task_type='EXTENSION_UPDATE')",
- array($del_ext), __FILE__, __LINE__);
+ array($del_ext), __FILE__, __LINE__);
} // END - foreach
// I think it's not neccessary to run the optimization function here
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
require($INC);
-} elseif (!EXT_IS_ACTIVE("")) {
+} elseif (!EXT_IS_ACTIVE('')) {
return;
}
$sql = "SELECT userid, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE (beg_ral_notify ";
switch (getConfig('beg_rallye'))
{
-case 'Y': // Begging rallye is activated
- if (getConfig('beg_ral_en_notify') == 'Y')
- {
- // Okay, let's check for member accounts
- $sql .= "= 0 OR (beg_ral_notify > 0 AND beg_ral_en_notify < beg_ral_di_notify)";
- $mode = "en";
- }
+ case 'Y': // Begging rallye is activated
+ if (getConfig('beg_ral_en_notify') == 'Y')
+ {
+ // Okay, let's check for member accounts
+ $sql .= "= 0 OR (beg_ral_notify > 0 AND beg_ral_en_notify < beg_ral_di_notify)";
+ $mode = "en";
+ }
else
- {
- // Do not notify!
- $sql = '';
- }
- break;
-
-case 'N': // Begging rallye is deactivated
- if (getConfig('beg_ral_di_notify') == 'Y')
- {
- // Okay, let's check for member accounts
- $sql .= " > 0 AND beg_ral_di_notify < beg_ral_en_notify";
- $mode = "di";
- }
+ {
+ // Do not notify!
+ $sql = '';
+ }
+ break;
+
+ case 'N': // Begging rallye is deactivated
+ if (getConfig('beg_ral_di_notify') == 'Y')
+ {
+ // Okay, let's check for member accounts
+ $sql .= " > 0 AND beg_ral_di_notify < beg_ral_en_notify";
+ $mode = "di";
+ }
else
- {
- // Do not notify!
- $sql = '';
- }
- break;
+ {
+ // Do not notify!
+ $sql = '';
+ }
+ break;
}
if (!empty($sql)) {
// No IP locking setuped!
define('__BEG_IP_LOCKER', getMessage('BEG_NO_LIMITATION'));
}
- else
+ else
{
// Create timemark
define('__BEG_IP_LOCKER', createFancyTime(getConfig('beg_ip_timeout')));
SET beg_ral_notify='%s', beg_ral_%s_notify='%s'
WHERE userid=%s
LIMIT 1",
- array(time(), $mode, time(), $content['userid']), __FILE__, __LINE__);
+ array(time(), $mode, time(), $content['userid']), __FILE__, __LINE__);
// Load email template and send it to the user!
if ($sentBonusMails === true) {
FROM `{!_MYSQL_PREFIX!}_user_data`
WHERE `status`='CONFIRMED' AND birth_day=%s AND birth_month=%s AND birthday_sent < (UNIX_TIMESTAMP() - ".(getConfig('one_day') * 364).")".$add."
ORDER BY `userid` ASC",
- array($day, $month, $value), __FILE__, __LINE__);
+array($day, $month, $value), __FILE__, __LINE__);
if (SQL_NUMROWS($result_birthday) > 0) {
// Start sending out birthday mails
// Insert row into database
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_birthday` (userid, points, chk_value) VALUES ('%s','%s','%s' )",
- array(bigintval($content['userid']), getConfig('birthday_points'), $content['check']), __FILE__, __LINE__);
+ array(bigintval($content['userid']), getConfig('birthday_points'), $content['check']), __FILE__, __LINE__);
// Load email template with confirmation link
$msg = LOAD_EMAIL_TEMPLATE("member_birthday_confirm", $content, bigintval($content['userid']));
// Remember him that he has received a birthday mail
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET birthday_sent=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1",
- array(bigintval($content['userid'])), __FILE__, __LINE__);
+ array(bigintval($content['userid'])), __FILE__, __LINE__);
} // END - while
// Free memory
$sql = "SELECT userid, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE (bonus_ral_notify ";
switch (getConfig('bonus_active'))
{
-case 'Y': // Active rallye is activated
- if (getConfig('bonus_en_notify') == 'Y') {
- // Okay, let's check for member accounts
- $sql .= "= 0 OR (bonus_ral_notify > 0 AND bonus_ral_en_notify < bonus_ral_di_notify)";
- $mode = "en";
- } else {
- // Do not notify!
- $sql = '';
- }
- break;
-
-case 'N': // Active rallye is deactivated
- if (getConfig('bonus_di_notify') == 'Y') {
- // Okay, let's check for member accounts
- $sql .= " > 0 AND bonus_ral_di_notify < bonus_ral_en_notify";
- $mode = "di";
- } else {
- // Do not notify!
- $sql = '';
- }
- break;
+ case 'Y': // Active rallye is activated
+ if (getConfig('bonus_en_notify') == 'Y') {
+ // Okay, let's check for member accounts
+ $sql .= "= 0 OR (bonus_ral_notify > 0 AND bonus_ral_en_notify < bonus_ral_di_notify)";
+ $mode = "en";
+ } else {
+ // Do not notify!
+ $sql = '';
+ }
+ break;
+
+ case 'N': // Active rallye is deactivated
+ if (getConfig('bonus_di_notify') == 'Y') {
+ // Okay, let's check for member accounts
+ $sql .= " > 0 AND bonus_ral_di_notify < bonus_ral_en_notify";
+ $mode = "di";
+ } else {
+ // Do not notify!
+ $sql = '';
+ }
+ break;
}
if (!empty($sql)) {
SET bonus_ral_notify='%s', bonus_ral_%s_notify='%s'
WHERE userid=%s
LIMIT 1",
- array(time(), $mode, time(), $content['userid']), __FILE__, __LINE__);
+ array(time(), $mode, time(), $content['userid']), __FILE__, __LINE__);
// Load email template and send it to the user!
if ($sentBonusMails === true) {
$ret = REGISTER_ADMIN(REQUEST_POST('login'), $hashedPass, constant('WEBMASTER'));
switch ($ret)
{
- case 'done':
- $done = changeDataInFile(constant('PATH') . 'inc/cache/config-local.php', "ADMIN-SETUP", "setConfigEntry('ADMIN_REGISTERED', \"", "\");", 'Y', 0);
- if ($done === true) {
- // Registering is done
- redirectToUrl('modules.php?module=admin&register=done');
- } else {
- $ret = getMessage('ADMIN_CANNOT_COMPLETE');
- }
- break;
-
- case 'failed':
- $ret = getMessage('ADMIN_REGISTER_FAILED');
- break;
-
- case 'already':
- default:
- if ($ret == 'already') {
- // Admin does already exists!
- $ret = getMessage('ADMIN_LOGIN_ALREADY_REG');
- } else {
- // Any other kind will be logged and interpreted as 'done'
- DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown return code %s from CHECK_ADMIN_LOGIN() and interpreted as 'done'!", $ret));
- // @TODO Why is this set to 'done'?
- $ret = 'done';
- }
-
- // Admin still not registered?
- if (!isAdminRegistered()) {
- // Write to config that registration is done
- changeDataInFile(constant('PATH') . 'inc/cache/config-local.php', "ADMIN-SETUP", "setConfigEntry('ADMIN_REGISTERED', \"", "\");", 'Y', 0);
-
- // Load URL for login
- redirectToUrl('modules.php?module=admin');
- } // END - if
- break;
+ case 'done':
+ $done = changeDataInFile(constant('PATH') . 'inc/cache/config-local.php', "ADMIN-SETUP", "setConfigEntry('ADMIN_REGISTERED', \"", "\");", 'Y', 0);
+ if ($done === true) {
+ // Registering is done
+ redirectToUrl('modules.php?module=admin&register=done');
+ } else {
+ $ret = getMessage('ADMIN_CANNOT_COMPLETE');
+ }
+ break;
+
+ case 'failed':
+ $ret = getMessage('ADMIN_REGISTER_FAILED');
+ break;
+
+ case 'already':
+ default:
+ if ($ret == 'already') {
+ // Admin does already exists!
+ $ret = getMessage('ADMIN_LOGIN_ALREADY_REG');
+ } else {
+ // Any other kind will be logged and interpreted as 'done'
+ DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown return code %s from CHECK_ADMIN_LOGIN() and interpreted as 'done'!", $ret));
+ // @TODO Why is this set to 'done'?
+ $ret = 'done';
+ }
+
+ // Admin still not registered?
+ if (!isAdminRegistered()) {
+ // Write to config that registration is done
+ changeDataInFile(constant('PATH') . 'inc/cache/config-local.php', "ADMIN-SETUP", "setConfigEntry('ADMIN_REGISTERED', \"", "\");", 'Y', 0);
+
+ // Load URL for login
+ redirectToUrl('modules.php?module=admin');
+ } // END - if
+ break;
}
}
// Which status do we have?
switch ($ret)
{
- case 'done': // Admin and password are okay, so we log in now
- // Construct URL and redirect
- $URL = 'modules.php?module=admin&';
+ case 'done': // Admin and password are okay, so we log in now
+ // Construct URL and redirect
+ $URL = 'modules.php?module=admin&';
- // Rewrite overview module
- if ($GLOBALS['what'] == 'overview') {
- $GLOBALS['action'] = getModeAction($GLOBALS['module'], $GLOBALS['what']);
- } // END - if
+ // Rewrite overview module
+ if ($GLOBALS['what'] == 'overview') {
+ $GLOBALS['action'] = getModeAction($GLOBALS['module'], $GLOBALS['what']);
+ } // END - if
- // Add data to URL
- if (!empty($GLOBALS['what'])) $URL .= 'what='.$GLOBALS['what'];
+ // Add data to URL
+ if (!empty($GLOBALS['what'])) $URL .= 'what='.$GLOBALS['what'];
elseif (!empty($GLOBALS['action'])) $URL .= 'action='.$GLOBALS['action'];
elseif (REQUEST_ISSET_GET('area')) $URL .= 'area='.REQUEST_GET('area');
- // Load URL
- redirectToUrl($URL);
- break;
-
- case '404': // Administrator login not found
- REQUEST_SET_POST('ok', $ret);
- $ret = getMessage('ADMIN_NOT_FOUND');
- destroyAdminSession();
- break;
-
- case 'pass': // Wrong password
- REQUEST_SET_POST('ok', $ret);
- $ret = '{--WRONG_PASS--} [<a href="{!URL!}/modules.php?module=admin&reset_pass=1">{--ADMIN_RESET_PASS--}</a>]';
- destroyAdminSession();
- break;
-
- default: // Others will be logged
- DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown return code %s from CHECK_ADMIN_LOGIN()", $ret));
- break;
+ // Load URL
+ redirectToUrl($URL);
+ break;
+
+ case '404': // Administrator login not found
+ REQUEST_SET_POST('ok', $ret);
+ $ret = getMessage('ADMIN_NOT_FOUND');
+ destroyAdminSession();
+ break;
+
+ case 'pass': // Wrong password
+ REQUEST_SET_POST('ok', $ret);
+ $ret = '{--WRONG_PASS--} [<a href="{!URL!}/modules.php?module=admin&reset_pass=1">{--ADMIN_RESET_PASS--}</a>]';
+ destroyAdminSession();
+ break;
+
+ default: // Others will be logged
+ DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown return code %s from CHECK_ADMIN_LOGIN()", $ret));
+ break;
} // END - switch
} // END - if
$ret = CHECK_ADMIN_COOKIES(getSession('admin_login'), getSession('admin_md5'));
switch ($ret)
{
- case 'done':
- // Check for access control line of current menu entry
- $GLOBALS['acl_allow'] = runFilterChain('check_admin_acl');
+ case 'done':
+ // Check for access control line of current menu entry
+ $GLOBALS['acl_allow'] = runFilterChain('check_admin_acl');
- // When type of admin menu is not set fallback to old menu system
- if (!isConfigEntrySet('admin_menu')) setConfigEntry('admin_menu', 'OLD');
+ // When type of admin menu is not set fallback to old menu system
+ if (!isConfigEntrySet('admin_menu')) setConfigEntry('admin_menu', 'OLD');
- // Check for version and switch between old menu system and new intelligent menu system
- if ((ADMIN_CHECK_MENU_MODE() == 'NEW') && (isIncludeReadable('inc/modules/admin/lasys-inc.php'))) {
- // Default area is the entrance, of course
- $area = 'entrance';
+ // Check for version and switch between old menu system and new intelligent menu system
+ if ((ADMIN_CHECK_MENU_MODE() == 'NEW') && (isIncludeReadable('inc/modules/admin/lasys-inc.php'))) {
+ // Default area is the entrance, of course
+ $area = 'entrance';
- // Check for similar URL variable
- if (REQUEST_ISSET_GET('area')) $area = REQUEST_GET('area');
+ // Check for similar URL variable
+ if (REQUEST_ISSET_GET('area')) $area = REQUEST_GET('area');
- // Load logical-area menu-system file
- loadIncludeOnce('inc/modules/admin/lasys-inc.php');
+ // Load logical-area menu-system file
+ loadIncludeOnce('inc/modules/admin/lasys-inc.php');
- // Create new-style menu system will logical areas
- ADMIN_LOGICAL_AREA_SYSTEM($area, $act, $GLOBALS['what']);
- } else {
- // This little call constructs the whole default old and lacky menu system
- // on left side. It also renders the content on right side
- ADMIN_DO_ACTION($GLOBALS['what']);
- }
- break;
-
- case '404': // Administrator login not found
- REQUEST_SET_POST('ok', $ret);
- destroyAdminSession();
- addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_NOT_FOUND'));
- break;
-
- case 'pass': // Wrong password
- REQUEST_SET_POST('ok', $ret);
- destroyAdminSession();
- addFatalMessage(__FILE__, __LINE__, getMessage('WRONG_PASS'));
- break;
-
- default: // Others will be logged
- DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown return code %s from CHECK_ADMIN_COOKIES()", $ret));
- break;
+ // Create new-style menu system will logical areas
+ ADMIN_LOGICAL_AREA_SYSTEM($area, $act, $GLOBALS['what']);
+ } else {
+ // This little call constructs the whole default old and lacky menu system
+ // on left side. It also renders the content on right side
+ ADMIN_DO_ACTION($GLOBALS['what']);
+ }
+ break;
+
+ case '404': // Administrator login not found
+ REQUEST_SET_POST('ok', $ret);
+ destroyAdminSession();
+ addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_NOT_FOUND'));
+ break;
+
+ case 'pass': // Wrong password
+ REQUEST_SET_POST('ok', $ret);
+ destroyAdminSession();
+ addFatalMessage(__FILE__, __LINE__, getMessage('WRONG_PASS'));
+ break;
+
+ default: // Others will be logged
+ DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown return code %s from CHECK_ADMIN_COOKIES()", $ret));
+ break;
}
}
// Load the include file
$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
-if (isIncludeReadable($INC)) {
+if (isIncludeReadable($INC)) {
// Ok, we finally load the admin action module
loadInclude($INC);
} else {
// Lookup the admin
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_admins` WHERE login='%s' LIMIT 1",
- array($user), __FUNCTION__, __LINE__);
+ array($user), __FUNCTION__, __LINE__);
// Is the entry there?
if (SQL_NUMROWS($result) == 0) {
// Ok, let's create the admin login
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_admins` (login, password, email) VALUES ('%s', '%s', '%s')",
- array($user, $md5, $email), __FUNCTION__, __LINE__);
+ array($user, $md5, $email), __FUNCTION__, __LINE__);
$ret = 'done';
} // END - if
// Get password from DB
$result = SQL_QUERY_ESC("SELECT password".$add." FROM `{!_MYSQL_PREFIX!}_admins` WHERE `id`=%s LIMIT 1",
- array($aid), __FUNCTION__, __LINE__);
+ array($aid), __FUNCTION__, __LINE__);
// Entry found?
if (SQL_NUMROWS($result) == 1) {
// Update password and reset login failures
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admins` SET password='%s',login_failures=0,last_failure='0000-00-00 00:00:00' WHERE `id`=%s LIMIT 1",
- array($data['password'], $aid), __FUNCTION__, __LINE__);
+ array($data['password'], $aid), __FUNCTION__, __LINE__);
} else {
// Update password
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admins` SET password='%s' WHERE `id`=%s LIMIT 1",
- array($data['password'], $aid), __FUNCTION__, __LINE__);
+ array($data['password'], $aid), __FUNCTION__, __LINE__);
}
// Rebuild cache
if (($ret == 'pass') && (GET_EXT_VERSION('admins') >= '0.7.0')) {
// Update counter
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admins` SET login_failures=login_failures+1,last_failure=NOW() WHERE `id`=%s LIMIT 1",
- array($aid), __FUNCTION__, __LINE__);
+ array($aid), __FUNCTION__, __LINE__);
// Rebuild cache
rebuildCacheFiles('admins', 'admin');
if ((GET_EXT_VERSION('admins') >= '0.7.0') && ((EXT_VERSION_IS_OLDER('sql_patches', '0.3.6')) || (GET_EXT_VERSION('sql_patches') == ''))) {
// Reset counter on out-dated sql_patches version
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admins` SET login_failures=0,last_failure='0000-00-00 00:00:00' WHERE login='%s' LIMIT 1",
- array($adminLogin), __FUNCTION__, __LINE__);
+ array($adminLogin), __FUNCTION__, __LINE__);
// Rebuild cache
rebuildCacheFiles('admins', 'admin');
// Now set all session variables and return the result
return (
- (
- setSession('admin_md5', generatePassString($passHash))
- ) && (
- setSession('admin_login', $adminLogin)
- ) && (
- setSession('admin_last', time())
- ) && (
- setSession('admin_to', bigintval(REQUEST_POST('timeout')))
- )
+ (
+ setSession('admin_md5', generatePassString($passHash))
+ ) && (
+ setSession('admin_login', $adminLogin)
+ ) && (
+ setSession('admin_last', time())
+ ) && (
+ setSession('admin_to', bigintval(REQUEST_POST('timeout')))
+ )
);
}
// Check for menu entries
$result_what = SQL_QUERY_ESC("SELECT what, title, descr FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`, id DESC",
- array($menu), __FUNCTION__, __LINE__);
+ array($menu), __FUNCTION__, __LINE__);
// Remember the count for later checks
setAdminMenuHasEntries($menu, ((SQL_NUMROWS($result_what) > 0) && ($act == $menu)));
// USe this only for adding points (e.g. adding refs really makes no sence ;-) )
if ($add_all === true) $OUT = " <option value=\"all\">{--ALL_MEMBERS--}</option>\n";
- elseif ($none === true) $OUT = " <option value=\"0\">{--SELECT_NONE--}</option>\n";
+ elseif ($none === true) $OUT = " <option value=\"0\">{--SELECT_NONE--}</option>\n";
while ($content = SQL_FETCHARRAY($result)) {
$OUT .= " <option value=\"".bigintval($content['userid'])."\"";
$wht = "`what` != ''";
if ($mode == "action") $wht = "(`what`='' OR `what` IS NULL) AND action !='login'";
$result = SQL_QUERY_ESC("SELECT %s, title FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE ".$wht." ORDER BY `sort`",
- array($mode), __FUNCTION__, __LINE__);
+ array($mode), __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Load menu as selection
$OUT = "<select name=\"".$mode."_menu";
// Generate SQL string
$sql = sprintf("UPDATE `{!_MYSQL_PREFIX!}%s` SET %s WHERE %s LIMIT 1",
- $tableName,
- $DATA_UPDATE,
- $whereStatement
+ $tableName,
+ $DATA_UPDATE,
+ $whereStatement
);
} else {
// Add Line (does only work with auto_increment!
// Generate SQL string
$sql = sprintf("INSERT INTO {!_MYSQL_PREFIX!}%s (%s) VALUES (%s)",
- $tableName,
- $KEYs,
- $values
+ $tableName,
+ $KEYs,
+ $values
);
}
// Close selection box
$OUT .= "</select>\n";
-
+
// Return contents
return $OUT;
}
} elseif (GET_EXT_VERSION('admins') >= '0.6.7') {
// Load from database when version of 'admins' is enough
$result = SQL_QUERY_ESC("SELECT la_mode FROM `{!_MYSQL_PREFIX!}_admins` WHERE `id`=%s LIMIT 1",
- array($aid), __FUNCTION__, __LINE__);
+ array($aid), __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load data
list($ADMIN) = SQL_FETCHROW($result);
if (!empty($selected)) {
// Determine new status
$result = SQL_QUERY_ESC("SELECT %s FROM `{!_MYSQL_PREFIX!}_%s` WHERE %s=%s LIMIT 1",
- array($row, $table, $idRow, $id), __FUNCTION__, __LINE__);
+ array($row, $table, $idRow, $id), __FUNCTION__, __LINE__);
// Row found?
if (SQL_NUMROWS($result) == 1) {
// Change this status
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_%s` SET %s='%s' WHERE %s=%s LIMIT 1",
- array($table, $row, $newStatus, $idRow, $id), __FUNCTION__, __LINE__);
+ array($table, $row, $newStatus, $idRow, $id), __FUNCTION__, __LINE__);
// Count up affected rows
$cnt += SQL_AFFECTEDROWS();
// Then list it
$OUT .= LOAD_TEMPLATE(sprintf("admin_%s_%s_row",
- $listType,
- $table
- ), true, $content
+ $listType,
+ $table
+ ), true, $content
);
// Switch color
// Load master template
LOAD_TEMPLATE(sprintf("admin_%s_%s",
- $listType,
- $table
- ), false, $OUT
+ $listType,
+ $table
+ ), false, $OUT
);
}
foreach ($IDs as $id => $sel) {
// Construct SQL query
$sql = sprintf("UPDATE `{!_MYSQL_PREFIX!}_%s` SET",
- SQL_ESCAPE($table)
+ SQL_ESCAPE($table)
);
// Load data of entry
$result = SQL_QUERY_ESC("SELECT * FROM `{!_MYSQL_PREFIX!}_%s` WHERE %s=%s LIMIT 1",
- array($table, $idColumn, $id), __FUNCTION__, __LINE__);
+ array($table, $idColumn, $id), __FUNCTION__, __LINE__);
// Fetch the data
$content = SQL_FETCHARRAY($result);
// Finish SQL statement
$sql = substr($sql, 0, -1) . sprintf(" WHERE `%s`=%s AND `%s`='%s' LIMIT 1",
- $idColumn,
- bigintval($id),
- $statusColumn,
- $oldStatus
+ $idColumn,
+ bigintval($id),
+ $statusColumn,
+ $oldStatus
);
// Run the SQL
if (REQUEST_ISSET_POST('uid_raw', $id)) {
// Load all data from that id
$result = SQL_QUERY_ESC("SELECT * FROM `{!_MYSQL_PREFIX!}_%s` WHERE %s=%s LIMIT 1",
- array($table, $idColumn, $id), __FUNCTION__, __LINE__);
+ array($table, $idColumn, $id), __FUNCTION__, __LINE__);
// Fetch the data
$content = SQL_FETCHARRAY($result);
// Prepare SQL for this row
$sql = sprintf("UPDATE `{!_MYSQL_PREFIX!}_ SET",
- SQL_ESCAPE($table)
+ SQL_ESCAPE($table)
);
foreach (REQUEST_POST_ARRAY() as $key => $entries) {
// Skip raw userid which is always invalid
// Then add this value
$sql .= sprintf(" %s='%s',",
- SQL_ESCAPE($key),
- SQL_ESCAPE($entries[$id])
+ SQL_ESCAPE($key),
+ SQL_ESCAPE($entries[$id])
);
} elseif (($key != $idColumn) && (!is_array($entries))) {
// Add normal entries as well!
// Load all data from that id
$result = SQL_QUERY_ESC("SELECT * FROM `{!_MYSQL_PREFIX!}_%s` WHERE `%s`=%s LIMIT 1",
- array($table, $idColumn, $id), __FUNCTION__, __LINE__);
+ array($table, $idColumn, $id), __FUNCTION__, __LINE__);
// Fetch the data
global $DATA;
// Look up administator login
$result = SQL_QUERY_ESC("SELECT id, login, password FROM `{!_MYSQL_PREFIX!}_admins` WHERE email='%s' LIMIT 1",
- array($email), __FUNCTION__, __LINE__);
+ array($email), __FUNCTION__, __LINE__);
// Is there an account?
if (SQL_NUMROWS($result) == 0) {
// Then try to find that user
$result = SQL_QUERY_ESC("SELECT id, password, email FROM `{!_MYSQL_PREFIX!}_admins` WHERE login='%s' LIMIT 1",
- array($login), __FUNCTION__, __LINE__);
+ array($login), __FUNCTION__, __LINE__);
// Is an account here?
if (SQL_NUMROWS($result) == 1) {
// Update database
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admins` SET password='%s' WHERE login='%s' LIMIT 1",
- array($passHash, $login), __FUNCTION__, __LINE__);
+ array($passHash, $login), __FUNCTION__, __LINE__);
// Run filters
runFilterChain('post_admin_reset_pass', array('login' => $login, 'hash' => $passHash));
if ($id <= 0) {
// Initiate backtrace
debug_report_bug(sprintf("id is invalid: %s. row=%s, data=%s",
- $id,
- $row,
- $data
+ $id,
+ $row,
+ $data
));
} // END - if
// Update the task
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_task_system` SET %s='%s' WHERE `id`=%s LIMIT 1",
- array($row, $data, bigintval($id)), __FUNCTION__, __LINE__);
+ array($row, $data, bigintval($id)), __FUNCTION__, __LINE__);
}
// Checks wether if the admin menu has entries
function ifAdminMenuHasEntries ($action) {
return (
- ((
- isset($GLOBALS['admin_menu_has_entries'][$action])
- ) && (
- $GLOBALS['admin_menu_has_entries'][$action] === true
- )) || (
- $action == "login"
- )
+ ((
+ isset($GLOBALS['admin_menu_has_entries'][$action])
+ ) && (
+ $GLOBALS['admin_menu_has_entries'][$action] === true
+ )) || (
+ $action == "login"
+ )
);
}
function OUTPUT_STANDARD_OVERVIEW(&$result_tasks) {
// First check for solved and not assigned tasks and assign them to current admin
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_task_system` SET `assigned_admin`=%s WHERE assigned_admin < 1 AND status != 'NEW'",
- array(getCurrentAdminId()), __FILE__, __LINE__);
+ array(getCurrentAdminId()), __FILE__, __LINE__);
// We currently don't want to install an extension so let's find out if we need...
$EXT_LOAD_MODE = 'register';
FROM `{!_MYSQL_PREFIX!}_task_system`
WHERE `assigned_admin`=%s OR (`assigned_admin`=0 AND `status`='NEW')
ORDER BY `userid` DESC, `task_type` DESC, `subject` ASC, `task_created` DESC",
- array(getCurrentAdminId()), __FILE__, __LINE__);
+ array(getCurrentAdminId()), __FILE__, __LINE__);
if (SQL_NUMROWS($result_tasks) > 0) {
// New jobs found!
FROM `{!_MYSQL_PREFIX!}_task_system`
WHERE `id`=%s AND (`assigned_admin`=%s OR (`assigned_admin`=0 AND `status`='NEW'))
LIMIT 1",
- array(bigintval($id), getCurrentAdminId()), __FILE__, __LINE__);
+ array(bigintval($id), getCurrentAdminId()), __FILE__, __LINE__);
if (SQL_NUMROWS($result_task) == 1) {
// Task is valid...
list($tid, $uid, $type, $subj, $text, $created, $status, $aid) = SQL_FETCHROW($result_task);
if ($aid == '0') {
// Assgin current admin to unassgigned task
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_task_system` SET `assigned_admin`=%s WHERE `id`=%s LIMIT 1",
- array(getCurrentAdminId(), bigintval($tid)), __FILE__, __LINE__);
+ array(getCurrentAdminId(), bigintval($tid)), __FILE__, __LINE__);
} // END - if
$add = '';
if ($uid > 0) {
$result_user = SQL_QUERY_ESC("SELECT gender, surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(bigintval($uid)), __FILE__, __LINE__);
+ array(bigintval($uid)), __FILE__, __LINE__);
if (SQL_NUMROWS($result_user) == 1) {
list($gender, $sname, $fname, $email) = SQL_FETCHROW($result_user);
SQL_FREERESULT($result_user);
// @TODO Rewrite this to something with include files
switch ($type)
{
- case 'EXTENSION': // Install new extensions
- $ext_name = substr($subj, 1, strpos($subj, ':') - 1);
- $result_lines = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_extensions` WHERE `ext_name`='%s' LIMIT 1",
+ case 'EXTENSION': // Install new extensions
+ $ext_name = substr($subj, 1, strpos($subj, ':') - 1);
+ $result_lines = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_extensions` WHERE `ext_name`='%s' LIMIT 1",
array($ext_name), __FILE__, __LINE__);
- $lines = SQL_NUMROWS($result_lines);
- SQL_FREERESULT($result_lines);
- if ($lines == '0') {
- // New extension found
- $OUT .= LOAD_TEMPLATE('admin_ext_reg_form', true, array(
+ $lines = SQL_NUMROWS($result_lines);
+ SQL_FREERESULT($result_lines);
+ if ($lines == '0') {
+ // New extension found
+ $OUT .= LOAD_TEMPLATE('admin_ext_reg_form', true, array(
'id' => bigintval($id),
'ext_name' => $ext_name
- ));
- } else {
- // Task is closed so nothing is todo
- $OUT .= "<div class=\"admin_failed\">{--ADMIN_EXT_ALREADY_REGISTERED--}</div>\n";
+ ));
+ } else {
+ // Task is closed so nothing is todo
+ $OUT .= "<div class=\"admin_failed\">{--ADMIN_EXT_ALREADY_REGISTERED--}</div>\n";
+
+ // Close task but not already closes or deleted or update tasks
+ if (($status != 'CLOSED') && ($status != 'DELETED') && ($type != 'EXTENSION_UPDATE')) {
+ // Solve the task
+ runFilterChain('solve_task', $tid);
+ } // END - if
+ }
+ break;
- // Close task but not already closes or deleted or update tasks
- if (($status != 'CLOSED') && ($status != 'DELETED') && ($type != 'EXTENSION_UPDATE')) {
+ case 'EXTENSION_UPDATE': // Extension update
+ // Extension updates are installed automatically
+ $OUT .= "<div class=\"admin_failed medium\">{--ADMIN_EXTENSION_UPDATED--}</div>\n";
+
+ // Close task
+ if (($status != 'CLOSED') && ($status != 'DELETED')) {
// Solve the task
runFilterChain('solve_task', $tid);
} // END - if
- }
- break;
-
- case 'EXTENSION_UPDATE': // Extension update
- // Extension updates are installed automatically
- $OUT .= "<div class=\"admin_failed medium\">{--ADMIN_EXTENSION_UPDATED--}</div>\n";
-
- // Close task
- if (($status != 'CLOSED') && ($status != 'DELETED')) {
- // Solve the task
- runFilterChain('solve_task', $tid);
- } // END - if
- break;
+ break;
- case 'SUPPORT_MEMBER': // Assign on member's support request
- // @TODO This may also be rewritten to include files
- switch ($mode)
- {
- default: // @TODO Unknown support mode
- DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown support mode %s detected. This part is under construction!", $mode));
- $OUT .= "<div class=\"admin_failed medium\">".sprintf(getMessage('ADMIN_UNKNOWN_SUPPORT_MODE'), $mode)."</div>\n";
+ case 'SUPPORT_MEMBER': // Assign on member's support request
+ // @TODO This may also be rewritten to include files
+ switch ($mode)
+ {
+ default: // @TODO Unknown support mode
+ DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown support mode %s detected. This part is under construction!", $mode));
+ $OUT .= "<div class=\"admin_failed medium\">".sprintf(getMessage('ADMIN_UNKNOWN_SUPPORT_MODE'), $mode)."</div>\n";
+ break;
+ }
break;
- }
- break;
- case 'PAYOUT_REQUEST': // Payout requests
- if (EXT_IS_ACTIVE('payout')) {
- // Extension is installed so let him send a notification to the user
- $result_pay = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_payouts` WHERE userid=%s AND payout_timestamp=%s LIMIT 1",
- array(bigintval($uid), bigintval($created)), __FILE__, __LINE__);
- list($pid) = SQL_FETCHROW($result_pay);
- SQL_FREERESULT($result_pay);
-
- if ((!empty($pid)) && ($pid > 0)) {
- // Payout ID can be obtained
- $content = array(
+ case 'PAYOUT_REQUEST': // Payout requests
+ if (EXT_IS_ACTIVE('payout')) {
+ // Extension is installed so let him send a notification to the user
+ $result_pay = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_payouts` WHERE userid=%s AND payout_timestamp=%s LIMIT 1",
+ array(bigintval($uid), bigintval($created)), __FILE__, __LINE__);
+ list($pid) = SQL_FETCHROW($result_pay);
+ SQL_FREERESULT($result_pay);
+
+ if ((!empty($pid)) && ($pid > 0)) {
+ // Payout ID can be obtained
+ $content = array(
'pid' => $pid,
'tid' => $tid,
- );
- $OUT .= LOAD_TEMPLATE('admin_payout_overview_form', true, $content);
- } else {
- // Problem obtaining payout ID
- $OUT .= "<div class=\"admin_failed medium\">{--PAYOUT_OBTAIN_ID_FAILED--}</div>\n";
- }
- } else {
- // Extension is not installed
- $OUT .= "<div class=\"admin_failed medium\">{--ADMIN_PAYOUT_NOT_INSTALLED--}</div>\n";
- }
- break;
-
- case 'WERNIS_REQUEST': // Wernis requests
- if (EXT_IS_ACTIVE('wernis')) {
- // Extension is installed so let him send a notification to the user
- $result_pay = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_wernis` WHERE userid=%s AND wernis_timestamp=%s LIMIT 1",
- array(bigintval($uid), bigintval($created)), __FILE__, __LINE__);
- list($pid) = SQL_FETCHROW($result_pay);
- SQL_FREERESULT($result_pay);
-
- if ((!empty($pid)) && ($pid > 0)) {
- // Payout ID can be obtained
- $content = array(
+ );
+ $OUT .= LOAD_TEMPLATE('admin_payout_overview_form', true, $content);
+ } else {
+ // Problem obtaining payout ID
+ $OUT .= "<div class=\"admin_failed medium\">{--PAYOUT_OBTAIN_ID_FAILED--}</div>\n";
+ }
+ } else {
+ // Extension is not installed
+ $OUT .= "<div class=\"admin_failed medium\">{--ADMIN_PAYOUT_NOT_INSTALLED--}</div>\n";
+ }
+ break;
+
+ case 'WERNIS_REQUEST': // Wernis requests
+ if (EXT_IS_ACTIVE('wernis')) {
+ // Extension is installed so let him send a notification to the user
+ $result_pay = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_wernis` WHERE userid=%s AND wernis_timestamp=%s LIMIT 1",
+ array(bigintval($uid), bigintval($created)), __FILE__, __LINE__);
+ list($pid) = SQL_FETCHROW($result_pay);
+ SQL_FREERESULT($result_pay);
+
+ if ((!empty($pid)) && ($pid > 0)) {
+ // Payout ID can be obtained
+ $content = array(
'pid' => $pid,
'tid' => $tid,
- );
- $OUT .= LOAD_TEMPLATE('admin_wernis_overview_form', true, $content);
- } else {
- // Problem obtaining wernis ID
- $OUT .= "<div class=\"admin_failed medium\">{--WERNIS_OBTAIN_ID_FAILED--}</div>\n";
- }
- } else {
- // Extension is not installed
- $OUT .= "<div class=\"admin_failed medium\">{--ADMIN_WERNIS_NOT_INSTALLED--}</div>\n";
- }
- break;
-
- case 'HOLIDAY_REQUEST': // Holiday requests
- $OUT .= LOAD_TEMPLATE('admin_task_holiday', true, $uid);
- break;
-
- case 'NL_UNSUBSCRIBE': // Newsletter unsubscriptions
- $result = SQL_QUERY_ESC("SELECT nl_timespan FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(bigintval($uid)), __FILE__, __LINE__);
- list($span) = SQL_FETCHROW($result);
- SQL_FREERESULT($result);
-
- if ($span > 0) {
- // Undone unscubscribe request
- $content = array(
+ );
+ $OUT .= LOAD_TEMPLATE('admin_wernis_overview_form', true, $content);
+ } else {
+ // Problem obtaining wernis ID
+ $OUT .= "<div class=\"admin_failed medium\">{--WERNIS_OBTAIN_ID_FAILED--}</div>\n";
+ }
+ } else {
+ // Extension is not installed
+ $OUT .= "<div class=\"admin_failed medium\">{--ADMIN_WERNIS_NOT_INSTALLED--}</div>\n";
+ }
+ break;
+
+ case 'HOLIDAY_REQUEST': // Holiday requests
+ $OUT .= LOAD_TEMPLATE('admin_task_holiday', true, $uid);
+ break;
+
+ case 'NL_UNSUBSCRIBE': // Newsletter unsubscriptions
+ $result = SQL_QUERY_ESC("SELECT nl_timespan FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
+ array(bigintval($uid)), __FILE__, __LINE__);
+ list($span) = SQL_FETCHROW($result);
+ SQL_FREERESULT($result);
+
+ if ($span > 0) {
+ // Undone unscubscribe request
+ $content = array(
'uid' => $uid,
'id' => $tid
- );
- $OUT .= LOAD_TEMPLATE('admin_newsletter_tsk', true, $content);
- } else {
- // Already unsubscribed
- $OUT .= "<div class=\"admin_failed medium\">".ADMIN_NL_UNSUBSCRIBE_ALREADY."</div>\n";
- }
- break;
-
- default: // Unknown task type
- DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown task type %s detected.", $type));
- $OUT .= "<div class=\"admin_failed medium\">".sprintf(getMessage('ADMIN_UNKNOWN_TASK_TYPE'), $type, $id)."</div>\n";
- break;
+ );
+ $OUT .= LOAD_TEMPLATE('admin_newsletter_tsk', true, $content);
+ } else {
+ // Already unsubscribed
+ $OUT .= "<div class=\"admin_failed medium\">".ADMIN_NL_UNSUBSCRIBE_ALREADY."</div>\n";
+ }
+ break;
+
+ default: // Unknown task type
+ DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown task type %s detected.", $type));
+ $OUT .= "<div class=\"admin_failed medium\">".sprintf(getMessage('ADMIN_UNKNOWN_TASK_TYPE'), $type, $id)."</div>\n";
+ break;
}
$OUT .= " </td>
<td width=\"1%\" class=\"switch_sw".$SW." bottom2 right2\"> </td>
// Unassign from tasks
foreach ($POST['task'] as $id => $sel) {
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_task_system` SET `assigned_admin`=0 WHERE `id`=%s AND `assigned_admin`=%s LIMIT 1",
- array(bigintval($id), getCurrentAdminId()), __FILE__, __LINE__);
+ array(bigintval($id), getCurrentAdminId()), __FILE__, __LINE__);
}
} elseif (isset($POST['del'])) {
// Delete tasks
foreach ($POST['task'] as $id => $sel) {
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_task_system` WHERE `id`=%s AND assigned_admin IN (%s,0) LIMIT 1",
- array(bigintval($id), getCurrentAdminId()), __FILE__, __LINE__);
+ array(bigintval($id), getCurrentAdminId()), __FILE__, __LINE__);
}
}
// Update query
$result_tasks = SQL_QUERY_ESC("SELECT id, assigned_admin, userid, task_type, subject, text, task_created FROM `{!_MYSQL_PREFIX!}_task_system` WHERE `assigned_admin`=%s OR (`assigned_admin`=0 AND `status`='NEW') ORDER BY task_created DESC",
- array(getCurrentAdminId()), __FILE__, __LINE__);
+ array(getCurrentAdminId()), __FILE__, __LINE__);
} // END - if
// There are uncompleted jobs!
// Generate infos
switch ($content['task_type'])
{
- case 'EXTENSION':
- case 'EXTENSION_UPDATE':
- $content['infos'] = substr($content['subject'], 1, strpos($content['subject'], ':') - 1);
- break;
+ case 'EXTENSION':
+ case 'EXTENSION_UPDATE':
+ $content['infos'] = substr($content['subject'], 1, strpos($content['subject'], ':') - 1);
+ break;
}
// Get task type
// Select all users
$result_main = SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `status`='CONFIRMED' ORDER BY `userid` ASC",
- __FILE__, __LINE__);
+ __FILE__, __LINE__);
// Process all entries
while ($content = SQL_FETCHARRAY($result_main)) {
} elseif (REQUEST_ISSET_GET('uid')) {
// User ID found in URL so we use this give him some credits
$result = SQL_QUERY_ESC("SELECT surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
- array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Selected user does exist
list($sname, $fname, $email) = SQL_FETCHROW($result);
// Is there already a rallye running?
$result = SQL_QUERY_ESC("SELECT id, admin_id FROM `{!_MYSQL_PREFIX!}_rallye_data` WHERE (start_time <= %s AND end_time >= %s) OR (start_time >= %s AND start_time <= %s) LIMIT 1",
- array($START, $START, $START, $END), __FILE__, __LINE__);
+ array($START, $START, $START, $END), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 0) {
// Ok, start and end time did not overlap
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_rallye_data` (admin_id, title, descr, template, start_time, end_time, auto_add_new_user, is_active, send_notify)
VALUES ('%s','%s','%s','%s','%s','%s','%s','%s','%s')",
- array(
- getCurrentAdminId(),
- REQUEST_POST('title'),
- REQUEST_POST('descr'),
- REQUEST_POST('template'),
- $START,
- $END,
- REQUEST_POST('auto_add'),
- REQUEST_POST('active'),
- REQUEST_POST('notify'),
-), __FILE__, __LINE__);
+ array(
+ getCurrentAdminId(),
+ REQUEST_POST('title'),
+ REQUEST_POST('descr'),
+ REQUEST_POST('template'),
+ $START,
+ $END,
+ REQUEST_POST('auto_add'),
+ REQUEST_POST('active'),
+ REQUEST_POST('notify'),
+ ), __FILE__, __LINE__);
// Load ID
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_rallye_data` WHERE start_time='%s' AND end_time='%s' AND `title`='%s' LIMIT 1",
- array($START, $END, REQUEST_POST('title')), __FILE__, __LINE__);
+ array($START, $END, REQUEST_POST('title')), __FILE__, __LINE__);
list($id) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
- // Save sponsor in database
+ // Save sponsor in database
SPONSOR_HANDLE_SPONSOR(REQUEST_POST_ARRAY());
} else {
// Prepare constants for the template
// Load sub menus :)
foreach ($menus as $key_main => $value_main) {
$result = SQL_QUERY_ESC("SELECT what, title, sort FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
- array($value_main), __FILE__, __LINE__);
+ array($value_main), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Init arrays
$menus[$value_main] = array();
$OUT .= "</option>\n";
}
}
- else
+ else
{
$OUT .= " <option value=\"".$m."\">".$titles[$key]."</option>\n";
}
if (REQUEST_ISSET_POST(('menu'))) {
// Add sub menu
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('%s','%s','%s','%s','%s')",
- array(
- REQUEST_POST('menu'),
- REQUEST_POST('name'),
- REQUEST_POST('title'),
- REQUEST_POST('descr'),
- bigintval(REQUEST_POST('sort')),
- ), __FILE__, __LINE__
+ array(
+ REQUEST_POST('menu'),
+ REQUEST_POST('name'),
+ REQUEST_POST('title'),
+ REQUEST_POST('descr'),
+ bigintval(REQUEST_POST('sort')),
+ ), __FILE__, __LINE__
);
cachePurgeAdminMenu(0, REQUEST_POST('menu'), REQUEST_POST('name'));
} else {
// Add main menu
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (action, title, descr, sort) VALUES ('%s','%s','%s','%s')",
- array(
- REQUEST_POST('name'),
- REQUEST_POST('title'),
- REQUEST_POST('descr'),
- bigintval(REQUEST_POST('sort')),
- ), __FILE__, __LINE__
+ array(
+ REQUEST_POST('name'),
+ REQUEST_POST('title'),
+ REQUEST_POST('descr'),
+ bigintval(REQUEST_POST('sort')),
+ ), __FILE__, __LINE__
);
cachePurgeAdminMenu(0, REQUEST_POST('name'));
}
{
$cnt++;
$result = SQL_QUERY_ESC("SELECT title, action, what, descr FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE ".$AND." AND id=%s LIMIT 1",
- array(bigintval($sel)), __FILE__, __LINE__);
+ array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1)
{
// Entry found so we load the stuff...
);
$OUT .= LOAD_TEMPLATE("admin_amenu_edit_row", true, $content);
}
- else
+ else
{
// Entry not found?
$content = array(
// Load template
LOAD_TEMPLATE("admin_amenu_edit_form");
}
- elseif ((REQUEST_ISSET_POST('del')) && (!IS_DEMO()))
+elseif ((REQUEST_ISSET_POST('del')) && (!IS_DEMO()))
{
define('__SUB_VALUE', $SUB);
define('__CHK_VALUE', $chk);
{
$cnt++;
$result = SQL_QUERY_ESC("SELECT title FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE ".$AND." AND id=%s LIMIT 1",
- array(bigintval($sel)), __FILE__, __LINE__);
+ array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1)
{
// Entry found so we load the stuff...
);
$OUT .= LOAD_TEMPLATE("admin_amenu_delete_row", true, $content);
}
- else
+ else
{
// Entry not found?
$content = array(
// An action is done...
switch (REQUEST_POST('ok'))
{
- case 'edit': // Edit menu
- foreach (REQUEST_POST('sel') as $sel => $menu) {
- // Secure ID
- $sel = bigintval($sel);
+ case 'edit': // Edit menu
+ foreach (REQUEST_POST('sel') as $sel => $menu) {
+ // Secure ID
+ $sel = bigintval($sel);
- // Update entry
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET
+ // Update entry
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET
title='%s',
`action`='%s',
`what`='%s',
descr='%s'
WHERE ".$AND." AND id=%s LIMIT 1",
- array(
- $menu,
- REQUEST_POST('sel_action', $sel),
- REQUEST_POST('sel_what', $sel),
- REQUEST_POST('sel_desc', $sel),
- $sel,
-), __FILE__, __LINE__);
- }
+ array(
+ $menu,
+ REQUEST_POST('sel_action', $sel),
+ REQUEST_POST('sel_what', $sel),
+ REQUEST_POST('sel_desc', $sel),
+ $sel,
+ ), __FILE__, __LINE__);
+ }
- // Purge admin menu cache
- cachePurgeAdminMenu(0, REQUEST_POST('sel_action', $sel), REQUEST_POST('sel_what', $sel));
+ // Purge admin menu cache
+ cachePurgeAdminMenu(0, REQUEST_POST('sel_action', $sel), REQUEST_POST('sel_what', $sel));
- // Load template
- LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
- break;
+ // Load template
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
+ break;
- case 'del': // Delete menu
- foreach (REQUEST_POST('sel') as $sel => $menu) {
- SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE ".$AND." AND id=%s LIMIT 1",
+ case 'del': // Delete menu
+ foreach (REQUEST_POST('sel') as $sel => $menu) {
+ SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE ".$AND." AND id=%s LIMIT 1",
array(bigintval($sel)), __FILE__, __LINE__);
- cachePurgeAdminMenu(0, '', '', $AND);
- } // END - foreach
+ cachePurgeAdminMenu(0, '', '', $AND);
+ } // END - foreach
- // Load template
- LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
- break;
+ // Load template
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
+ break;
- default: // Unexpected action
- DEBUG_LOG(__FILE__, __LINE__, sprintf("Unsupported action %s detected.", REQUEST_POST('ok')));
- define('__OK_VALUE', REQUEST_POST('ok'));
- LOAD_TEMPLATE("admin_menu_unknown_okay");
- break;
+ default: // Unexpected action
+ DEBUG_LOG(__FILE__, __LINE__, sprintf("Unsupported action %s detected.", REQUEST_POST('ok')));
+ define('__OK_VALUE', REQUEST_POST('ok'));
+ LOAD_TEMPLATE("admin_menu_unknown_okay");
+ break;
}
} else {
if ((REQUEST_ISSET_GET(('act'))) && (REQUEST_ISSET_GET(('tid'))) && (REQUEST_ISSET_GET(('fid')))) {
if (REQUEST_ISSET_GET(('w'))) {
// Sub menus selected
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1",
- array(REQUEST_GET('act'), bigintval(REQUEST_GET('tid'))), __FILE__, __LINE__);
+ array(REQUEST_GET('act'), bigintval(REQUEST_GET('tid'))), __FILE__, __LINE__);
list($tid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
$result = SQL_QUERY("SELECT `id` FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1",
- array(REQUEST_GET('act'), bigintval(REQUEST_GET('fid'))), __FILE__, __LINE__);
+ array(REQUEST_GET('act'), bigintval(REQUEST_GET('fid'))), __FILE__, __LINE__);
list($fid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
} else {
// Main menu selected
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE (`what`='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1",
- array(bigintval(REQUEST_GET('tid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('tid'))), __FILE__, __LINE__);
list($tid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE (`what`='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1",
- array(bigintval(REQUEST_GET('fid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('fid'))), __FILE__, __LINE__);
list($fid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
}
if ((!empty($tid)) && (!empty($fid))) {
// Sort menu
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
- array(bigintval(REQUEST_GET('tid')), bigintval($fid)), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('tid')), bigintval($fid)), __FILE__, __LINE__);
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
- array(bigintval(REQUEST_GET('fid')), bigintval($tid)), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('fid')), bigintval($tid)), __FILE__, __LINE__);
cachePurgeAdminMenu(0, '', '', $AND);
}
}
if (!empty($SUB)) {
// Sub menus of a main menu
$result = SQL_QUERY_ESC("SELECT id, action, what, title, sort FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort` ASC",
- array($SUB), __FILE__, __LINE__);
+ array($SUB), __FILE__, __LINE__);
} else {
// Main menus
$result = SQL_QUERY("SELECT id, action, what, title, sort FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE (`what`='' OR `what` IS NULL) ORDER BY `sort` ASC", __FILE__, __LINE__);
foreach (REQUEST_POST('sel') as $template => $sel) {
// First of all load data from DB
$result = SQL_QUERY_ESC("SELECT admin_id, id FROM `{!_MYSQL_PREFIX!}_admins_mails` WHERE mail_template='%s' ORDER BY `id`",
- array($template), __FILE__, __LINE__);
+ array($template), __FILE__, __LINE__);
$OUT = ''; $aid2 = 0;
while ($content = SQL_FETCHARRAY($result)) {
// @TODO Can this be rewritten???
// Update entry
ADD_SQL(SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admins_mails` SET admin_id=%s WHERE `id`=%s ORDER BY `id` LIMIT 1",
- array($content['admin_id'], $id), __FILE__, __LINE__, false));
+ array($content['admin_id'], $id), __FILE__, __LINE__, false));
if (($content['admin_id'] < 1) && (REQUEST_ISSET_POST('template', $id))) {
// Remove any other admin entries
ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admins_mails` WHERE mail_template='%s' AND id != '%s'",
- array(REQUEST_POST('template', $id), $id), __FILE__, __LINE__, false));
+ array(REQUEST_POST('template', $id), $id), __FILE__, __LINE__, false));
} // END - if
if (REQUEST_POST('admin_new', REQUEST_POST('template', $id)) > 0) {
// Add new admin
ADD_SQL(SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_admins_mails` (admin_id, mail_template) VALUES ('%s','%s')",
- array($content['admin_id'], REQUEST_POST('template', $id)), __FILE__, __LINE__, false));
+ array($content['admin_id'], REQUEST_POST('template', $id)), __FILE__, __LINE__, false));
} // END - if
} // END - foreach
// Prepare data for the template
switch (getConfig('admin_menu'))
{
- case "NEW":
- define('__ADMIN_MENU_NEW', ' checked="checked"');
- define('__ADMIN_MENU_OLD' , '');
- break;
+ case "NEW":
+ define('__ADMIN_MENU_NEW', ' checked="checked"');
+ define('__ADMIN_MENU_OLD' , '');
+ break;
- case "OLD":
- define('__ADMIN_MENU_NEW', '');
- define('__ADMIN_MENU_OLD' , ' checked="checked"');
- break;
+ case "OLD":
+ define('__ADMIN_MENU_NEW', '');
+ define('__ADMIN_MENU_OLD' , ' checked="checked"');
+ break;
}
// Display form
foreach (REQUEST_POST('sel') as $id => $selected) {
// Load data for the ID
$result = SQL_QUERY_ESC("SELECT admin_id, action_menu, what_menu, access_mode FROM `{!_MYSQL_PREFIX!}_admins_acls` WHERE `id`=%s LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__);
+ array(bigintval($id)), __FILE__, __LINE__);
list($aid, $act, $wht, $mode) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
'what_selection' => ADMIN_MENU_SELECTION("what", $wht, $id),
'mode_options' => generateOptionList(
'/ARRAY/',
- array("allow", "deny"),
- array(constant('ADMINS_ALLOW_MODE'), constant('ADMINS_DENY_MODE')),
- $mode
- ),
+ array("allow", "deny"),
+ array(constant('ADMINS_ALLOW_MODE'), constant('ADMINS_DENY_MODE')),
+ $mode
+ ),
);
// Load row template
// Update entries
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admins_acls` SET admin_id=%s, action_menu='%s', what_menu='%s', access_mode='%s' WHERE `id`=%s LIMIT 1",
- array(
- REQUEST_POST('admin', $id),
- REQUEST_POST('action_menu', $id),
- REQUEST_POST('what_menu', $id),
- REQUEST_POST('mode', $id),
- $id
- ),__FILE__, __LINE__);
+ array(
+ REQUEST_POST('admin', $id),
+ REQUEST_POST('action_menu', $id),
+ REQUEST_POST('what_menu', $id),
+ REQUEST_POST('mode', $id),
+ $id
+ ),__FILE__, __LINE__);
}
// Update cache when installed
foreach (REQUEST_POST('sel') as $id => $selected) {
// Load data for the ID
$result = SQL_QUERY_ESC("SELECT admin_id, action_menu, what_menu, access_mode FROM `{!_MYSQL_PREFIX!}_admins_acls` WHERE `id`=%s LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__);
+ array(bigintval($id)), __FILE__, __LINE__);
list($admin, $act, $wht, $mode) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
// Remove entries
foreach (REQUEST_POST('sel') as $id => $selected) {
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admins_acls` WHERE `id`=%s LIMIT 1",
- array(bigintval($id)),__FILE__, __LINE__);
+ array(bigintval($id)),__FILE__, __LINE__);
}
// Update cache when installed
if (((REQUEST_ISSET_POST(('action_menu'))) || (REQUEST_ISSET_POST(('what_menu')))) && (!$BOTH)) {
// Main or sub menu selected
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_admins_acls` WHERE admin_id=%s AND action_menu='%s' AND what_menu='%s' LIMIT 1",
- array(bigintval(REQUEST_POST('admin_id')), REQUEST_POST('action_menu'), REQUEST_POST('what_menu')), __FILE__, __LINE__);
+ array(bigintval(REQUEST_POST('admin_id')), REQUEST_POST('action_menu'), REQUEST_POST('what_menu')), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 0) {
// Finally add the new ACL
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_admins_acls` (admin_id, action_menu, what_menu, access_mode)
VALUES ('%s','%s','%s','%s')",
- array(
- bigintval(REQUEST_POST('admin_id')),
- REQUEST_POST('action_menu'),
- REQUEST_POST('what_menu'),
- REQUEST_POST('mode')
-), __FILE__, __LINE__);
+ array(
+ bigintval(REQUEST_POST('admin_id')),
+ REQUEST_POST('action_menu'),
+ REQUEST_POST('what_menu'),
+ REQUEST_POST('mode')
+ ), __FILE__, __LINE__);
$content = getMessage('ADMIN_ADMINS_ACL_SAVED');
// Update cache when installed
define('_ACTION_SELECTION', ADMIN_MENU_SELECTION("action"));
define('_WHAT_SELECTION' , ADMIN_MENU_SELECTION("what"));
define('_MODE_OPTIONS' ,
- generateOptionList(
+ generateOptionList(
'/ARRAY/',
- array("allow", "deny"),
- array(
- getMessage('ADMINS_ALLOW_MODE'),
- getMessage('ADMINS_DENY_MODE')
- )
- )
+ array("allow", "deny"),
+ array(
+ getMessage('ADMINS_ALLOW_MODE'),
+ getMessage('ADMINS_DENY_MODE')
+ )
+ )
);
// Load template for adding new ACL
// Activate / Deactivate beg rallye (Y/N)
switch (getConfig('beg_rallye'))
{
- case 'Y':
- $content['rallye_yes'] = ' checked="checked"';
- $content['rallye_no'] = '';
- break;
-
- case 'N':
- $content['rallye_yes'] = '';
- $content['rallye_no'] = ' checked="checked"';
- break;
+ case 'Y':
+ $content['rallye_yes'] = ' checked="checked"';
+ $content['rallye_no'] = '';
+ break;
+
+ case 'N':
+ $content['rallye_yes'] = '';
+ $content['rallye_no'] = ' checked="checked"';
+ break;
}
switch (getConfig('beg_active'))
{
- case 'Y':
- $content['active_yes'] = ' checked="checked"';
- $content['active_no'] = '';
- break;
-
- case 'N':
- $content['active_yes'] = '';
- $content['active_no'] = ' checked="checked"';
- break;
+ case 'Y':
+ $content['active_yes'] = ' checked="checked"';
+ $content['active_no'] = '';
+ break;
+
+ case 'N':
+ $content['active_yes'] = '';
+ $content['active_no'] = ' checked="checked"';
+ break;
}
switch (getConfig('beg_mode'))
{
- case 'DIRECT':
- $content['mode_direct'] = ' checked="checked"';
- $content['mode_ref'] = '';
- break;
-
- case 'REF':
- $content['mode_direct'] = '';
- $content['mode_ref'] = ' checked="checked"';
- break;
+ case 'DIRECT':
+ $content['mode_direct'] = ' checked="checked"';
+ $content['mode_ref'] = '';
+ break;
+
+ case 'REF':
+ $content['mode_direct'] = '';
+ $content['mode_ref'] = ' checked="checked"';
+ break;
}
switch (getConfig('beg_ral_en_notify'))
{
- case 'Y':
- $content['ral_enable_notify_yes'] = ' checked="checked"';
- $content['ral_enable_notify_no'] = '';
- break;
-
- case 'N':
- $content['ral_enable_notify_yes'] = '';
- $content['ral_enable_notify_no'] = ' checked="checked"';
- break;
+ case 'Y':
+ $content['ral_enable_notify_yes'] = ' checked="checked"';
+ $content['ral_enable_notify_no'] = '';
+ break;
+
+ case 'N':
+ $content['ral_enable_notify_yes'] = '';
+ $content['ral_enable_notify_no'] = ' checked="checked"';
+ break;
}
switch (getConfig('beg_ral_di_notify'))
{
- case 'Y':
- $content['ral_disable_notify_yes'] = ' checked="checked"';
- $content['ral_disable_notify_no'] = '';
- break;
-
- case 'N':
- $content['ral_disable_notify_yes'] = '';
- $content['ral_disable_notify_no'] = ' checked="checked"';
- break;
+ case 'Y':
+ $content['ral_disable_notify_yes'] = ' checked="checked"';
+ $content['ral_disable_notify_no'] = '';
+ break;
+
+ case 'N':
+ $content['ral_disable_notify_yes'] = '';
+ $content['ral_disable_notify_no'] = ' checked="checked"';
+ break;
}
switch (getConfig('beg_new_mem_notify'))
{
- case 'Y':
- $content['new_member_notify_yes'] = ' checked="checked"';
- $content['new_member_notify_no'] = '';
- break;
-
- case 'N':
- $content['new_member_notify_yes'] = '';
- $content['new_member_notify_no'] = ' checked="checked"';
- break;
+ case 'Y':
+ $content['new_member_notify_yes'] = ' checked="checked"';
+ $content['new_member_notify_no'] = '';
+ break;
+
+ case 'N':
+ $content['new_member_notify_yes'] = '';
+ $content['new_member_notify_no'] = ' checked="checked"';
+ break;
}
switch (getConfig('beg_include_own'))
{
- case 'Y':
- $content['include_own_yes'] = ' checked="checked"';
- $content['include_own_no'] = '';
- break;
-
- case 'N':
- $content['include_own_yes'] = '';
- $content['include_own_no'] = ' checked="checked"';
- break;
+ case 'Y':
+ $content['include_own_yes'] = ' checked="checked"';
+ $content['include_own_no'] = '';
+ break;
+
+ case 'N':
+ $content['include_own_yes'] = '';
+ $content['include_own_no'] = ' checked="checked"';
+ break;
}
// Init elements
define('__POINTS_VALUE', getConfig('birthday_points'));
switch (getConfig('birthday_active'))
{
- case 'Y':
- $content['active_yes'] = ' checked="checked"';
- $content['active_no'] = '';
- break;
+ case 'Y':
+ $content['active_yes'] = ' checked="checked"';
+ $content['active_no'] = '';
+ break;
- case 'N':
- $content['active_yes'] = '';
- $content['active_no'] = ' checked="checked"';
- break;
+ case 'N':
+ $content['active_yes'] = '';
+ $content['active_no'] = ' checked="checked"';
+ break;
}
switch (getConfig('birthday_mode'))
{
- case 'DIRECT':
- $content['mode_direct'] = ' checked="checked"';
- $content['mode_ref'] = '';
- break;
+ case 'DIRECT':
+ $content['mode_direct'] = ' checked="checked"';
+ $content['mode_ref'] = '';
+ break;
- case 'REF':
- $content['mode_direct'] = '';
- $content['mode_ref'] = ' checked="checked"';
- break;
+ case 'REF':
+ $content['mode_direct'] = '';
+ $content['mode_ref'] = ' checked="checked"';
+ break;
}
// Display form
// Activate / Deactivate bonus active rallye (Y/N)
switch (getConfig('bonus_active'))
{
- case 'Y':
- define('__BONUS_ACTIVE_Y', ' checked="checked"');
- define('__BONUS_ACTIVE_N', '');
- break;
-
- case 'N':
- define('__BONUS_ACTIVE_Y', '');
- define('__BONUS_ACTIVE_N', ' checked="checked"');
- break;
+ case 'Y':
+ define('__BONUS_ACTIVE_Y', ' checked="checked"');
+ define('__BONUS_ACTIVE_N', '');
+ break;
+
+ case 'N':
+ define('__BONUS_ACTIVE_Y', '');
+ define('__BONUS_ACTIVE_N', ' checked="checked"');
+ break;
}
// Other bonus to de-/activate
switch (getConfig('bonus_login_yn'))
{
- case 'Y':
- define('__BONUS_LOGIN_Y', ' checked="checked"');
- define('__BONUS_LOGIN_N', '');
- break;
-
- case 'N':
- define('__BONUS_LOGIN_Y', '');
- define('__BONUS_LOGIN_N', ' checked="checked"');
- break;
+ case 'Y':
+ define('__BONUS_LOGIN_Y', ' checked="checked"');
+ define('__BONUS_LOGIN_N', '');
+ break;
+
+ case 'N':
+ define('__BONUS_LOGIN_Y', '');
+ define('__BONUS_LOGIN_N', ' checked="checked"');
+ break;
}
switch (getConfig('bonus_stats_yn'))
{
- case 'Y':
- define('__BONUS_STATS_Y', ' checked="checked"');
- define('__BONUS_STATS_N', '');
- break;
-
- case 'N':
- define('__BONUS_STATS_Y', '');
- define('__BONUS_STATS_N', ' checked="checked"');
- break;
+ case 'Y':
+ define('__BONUS_STATS_Y', ' checked="checked"');
+ define('__BONUS_STATS_N', '');
+ break;
+
+ case 'N':
+ define('__BONUS_STATS_Y', '');
+ define('__BONUS_STATS_N', ' checked="checked"');
+ break;
}
switch (getConfig('bonus_order_yn'))
{
- case 'Y':
- define('__BONUS_ORDER_Y', ' checked="checked"');
- define('__BONUS_ORDER_N', '');
- break;
-
- case 'N':
- define('__BONUS_ORDER_Y', '');
- define('__BONUS_ORDER_N', ' checked="checked"');
- break;
+ case 'Y':
+ define('__BONUS_ORDER_Y', ' checked="checked"');
+ define('__BONUS_ORDER_N', '');
+ break;
+
+ case 'N':
+ define('__BONUS_ORDER_Y', '');
+ define('__BONUS_ORDER_N', ' checked="checked"');
+ break;
}
switch (getConfig('bonus_ref_yn'))
{
- case 'Y':
- define('__BONUS_REF_Y', ' checked="checked"');
- define('__BONUS_REF_N', '');
- break;
-
- case 'N':
- define('__BONUS_REF_Y', '');
- define('__BONUS_REF_N', ' checked="checked"');
- break;
+ case 'Y':
+ define('__BONUS_REF_Y', ' checked="checked"');
+ define('__BONUS_REF_N', '');
+ break;
+
+ case 'N':
+ define('__BONUS_REF_Y', '');
+ define('__BONUS_REF_N', ' checked="checked"');
+ break;
}
switch (getConfig('bonus_click_yn'))
{
- case 'Y':
- define('__BONUS_CLICK_Y', ' checked="checked"');
- define('__BONUS_CLICK_N', '');
- break;
-
- case 'N':
- define('__BONUS_CLICK_Y', '');
- define('__BONUS_CLICK_N', ' checked="checked"');
- break;
+ case 'Y':
+ define('__BONUS_CLICK_Y', ' checked="checked"');
+ define('__BONUS_CLICK_N', '');
+ break;
+
+ case 'N':
+ define('__BONUS_CLICK_Y', '');
+ define('__BONUS_CLICK_N', ' checked="checked"');
+ break;
}
switch (getConfig('bonus_en_notify'))
{
- case 'Y':
- define('__BONUS_EN_NOTIFY_Y', ' checked="checked"');
- define('__BONUS_EN_NOTIFY_N', '');
- break;
-
- case 'N':
- define('__BONUS_EN_NOTIFY_Y', '');
- define('__BONUS_EN_NOTIFY_N', ' checked="checked"');
- break;
+ case 'Y':
+ define('__BONUS_EN_NOTIFY_Y', ' checked="checked"');
+ define('__BONUS_EN_NOTIFY_N', '');
+ break;
+
+ case 'N':
+ define('__BONUS_EN_NOTIFY_Y', '');
+ define('__BONUS_EN_NOTIFY_N', ' checked="checked"');
+ break;
}
switch (getConfig('bonus_di_notify'))
{
- case 'Y':
- define('__BONUS_DI_NOTIFY_Y', ' checked="checked"');
- define('__BONUS_DI_NOTIFY_N', '');
- break;
-
- case 'N':
- define('__BONUS_DI_NOTIFY_Y', '');
- define('__BONUS_DI_NOTIFY_N', ' checked="checked"');
- break;
+ case 'Y':
+ define('__BONUS_DI_NOTIFY_Y', ' checked="checked"');
+ define('__BONUS_DI_NOTIFY_N', '');
+ break;
+
+ case 'N':
+ define('__BONUS_DI_NOTIFY_Y', '');
+ define('__BONUS_DI_NOTIFY_N', ' checked="checked"');
+ break;
}
switch (getConfig('bonus_new_mem_notify'))
{
- case 'Y':
- define('__BONUS_NEW_MEMBER_NOTIFY_Y', ' checked="checked"');
- define('__BONUS_NEW_MEMBER_NOTIFY_N', '');
- break;
-
- case 'N':
- define('__BONUS_NEW_MEMBER_NOTIFY_Y', '');
- define('__BONUS_NEW_MEMBER_NOTIFY_N', ' checked="checked"');
- break;
+ case 'Y':
+ define('__BONUS_NEW_MEMBER_NOTIFY_Y', ' checked="checked"');
+ define('__BONUS_NEW_MEMBER_NOTIFY_N', '');
+ break;
+
+ case 'N':
+ define('__BONUS_NEW_MEMBER_NOTIFY_Y', '');
+ define('__BONUS_NEW_MEMBER_NOTIFY_N', ' checked="checked"');
+ break;
}
switch (getConfig('bonus_include_own'))
{
- case 'Y':
- define('__BONUS_INCLUDE_OWN_Y', ' checked="checked"');
- define('__BONUS_INCLUDE_OWN_N', '');
- break;
-
- case 'N':
- define('__BONUS_INCLUDE_OWN_Y', '');
- define('__BONUS_INCLUDE_OWN_N', ' checked="checked"');
- break;
+ case 'Y':
+ define('__BONUS_INCLUDE_OWN_Y', ' checked="checked"');
+ define('__BONUS_INCLUDE_OWN_N', '');
+ break;
+
+ case 'N':
+ define('__BONUS_INCLUDE_OWN_Y', '');
+ define('__BONUS_INCLUDE_OWN_N', ' checked="checked"');
+ break;
}
// Load final template
if (REQUEST_ISSET_POST(('add'))) {
// Add a new category
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_cats` WHERE cat='%s' LIMIT 1",
- array(REQUEST_POST('catname')), __FILE__, __LINE__);
+ array(REQUEST_POST('catname')), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 0) {
// Category does not exists, we simply add it...
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_cats` (cat, visible, sort) VALUES ('%s','%s','%s')",
- array(REQUEST_POST('catname'), REQUEST_POST('visible'), bigintval(REQUEST_POST('parent') + 1)), __FILE__, __LINE__);
+ array(REQUEST_POST('catname'), REQUEST_POST('visible'), bigintval(REQUEST_POST('parent') + 1)), __FILE__, __LINE__);
$content = CATEGORY_ADDED;
} else {
// Category does already exists
if (!empty($cat)) {
switch (REQUEST_GET('do'))
{
- case 'edit': // Change categories
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_cats` SET cat='%s', `visible`='%s', sort=%s WHERE `id`=%s LIMIT 1",
+ case 'edit': // Change categories
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_cats` SET cat='%s', `visible`='%s', sort=%s WHERE `id`=%s LIMIT 1",
array(
- $cat,
- REQUEST_POST('vis', $id),
- REQUEST_POST('sort', $id),
- $id
+ $cat,
+ REQUEST_POST('vis', $id),
+ REQUEST_POST('sort', $id),
+ $id
), __FILE__, __LINE__);
- $TEXT = CATEGORIES_SAVED;
- break;
+ $TEXT = CATEGORIES_SAVED;
+ break;
- case 'del': // Delete categories
- SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_cats` WHERE `id`=%s LIMIT 1",
+ case 'del': // Delete categories
+ SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_cats` WHERE `id`=%s LIMIT 1",
array($id), __FILE__, __LINE__);
- SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_cats` WHERE cat_id=%s",
+ SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_cats` WHERE cat_id=%s",
array($id), __FILE__, __LINE__);
- $TEXT = CATEGORIES_DELETED;
- break;
+ $TEXT = CATEGORIES_DELETED;
+ break;
}
} else {
// Entry not saved
foreach (REQUEST_POST('sel') as $id => $value) {
// Load data of category
$result = SQL_QUERY_ESC("SELECT cat FROM `{!_MYSQL_PREFIX!}_cats` WHERE `id`=%s LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__);
+ array(bigintval($id)), __FILE__, __LINE__);
list($cat) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
{
// Load data from the category
$result = SQL_QUERY_ESC("SELECT cat, visible, sort FROM `{!_MYSQL_PREFIX!}_cats` WHERE `id`=%s LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__);
+ array(bigintval($id)), __FILE__, __LINE__);
list($cat, $vis, $sort) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
// Take points from jackpot (Y/N)
switch (getConfig('doubler_jackpot'))
{
- case 'Y':
- define('__DOUBLER_JACKPOT_Y', ' checked="checked"');
- define('__DOUBLER_JACKPOT_N', '');
- break;
-
- case 'N':
- define('__DOUBLER_JACKPOT_Y', '');
- define('__DOUBLER_JACKPOT_N', ' checked="checked"');
- break;
+ case 'Y':
+ define('__DOUBLER_JACKPOT_Y', ' checked="checked"');
+ define('__DOUBLER_JACKPOT_N', '');
+ break;
+
+ case 'N':
+ define('__DOUBLER_JACKPOT_Y', '');
+ define('__DOUBLER_JACKPOT_N', ' checked="checked"');
+ break;
}
// Take points from own account (Y/N)
switch (getConfig('doubler_own'))
{
- case 'Y':
- define('__DOUBLER_OWN_Y', ' checked="checked"');
- define('__DOUBLER_OWN_N', '');
- break;
-
- case 'N':
- define('__DOUBLER_OWN_Y', '');
- define('__DOUBLER_OWN_N', ' checked="checked"');
- break;
+ case 'Y':
+ define('__DOUBLER_OWN_Y', ' checked="checked"');
+ define('__DOUBLER_OWN_N', '');
+ break;
+
+ case 'N':
+ define('__DOUBLER_OWN_Y', '');
+ define('__DOUBLER_OWN_N', ' checked="checked"');
+ break;
}
// Mail send mode
switch (getConfig('doubler_send_mode'))
{
- case 'DIRECT':
- define('__DOUBLER_SEND_DIRECT', ' checked="checked"');
- define('__DOUBLER_SEND_RESET' , '');
- break;
-
- case "RESET":
- define('__DOUBLER_SEND_DIRECT', '');
- define('__DOUBLER_SEND_RESET' , ' checked="checked"');
- break;
+ case 'DIRECT':
+ define('__DOUBLER_SEND_DIRECT', ' checked="checked"');
+ define('__DOUBLER_SEND_RESET' , '');
+ break;
+
+ case "RESET":
+ define('__DOUBLER_SEND_DIRECT', '');
+ define('__DOUBLER_SEND_RESET' , ' checked="checked"');
+ break;
}
// Take points from own account (Y/N)
switch (getConfig('doubler_sent_all'))
{
- case 'Y':
- define('__DOUBLER_SENT_ALL_Y', ' checked="checked"');
- define('__DOUBLER_SENT_ALL_N', '');
- break;
-
- case 'N':
- define('__DOUBLER_SENT_ALL_Y', '');
- define('__DOUBLER_SENT_ALL_N', ' checked="checked"');
- break;
+ case 'Y':
+ define('__DOUBLER_SENT_ALL_Y', ' checked="checked"');
+ define('__DOUBLER_SENT_ALL_N', '');
+ break;
+
+ case 'N':
+ define('__DOUBLER_SENT_ALL_Y', '');
+ define('__DOUBLER_SENT_ALL_N', ' checked="checked"');
+ break;
}
// Transfer options (!!!) to __MEMBER_SELECTION
if (REQUEST_ISSET_POST(('add_max'))) {
// Save all settings
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value='%s' LIMIT 1",
- array(bigintval(REQUEST_POST('max'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_POST('max'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 0) {
// Add this value (including comment)
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_max_receive` (value, comment) VALUES ('%s','%s')",
- array(bigintval(REQUEST_POST('max')), REQUEST_POST('comment')),__FILE__, __LINE__);
+ array(bigintval(REQUEST_POST('max')), REQUEST_POST('comment')),__FILE__, __LINE__);
$content = MAX_VALUE_SAVED;
} else {
// Value does alread exists!
switch (REQUEST_GET('do'))
{
- case 'edit': // Change entries
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_max_receive` SET value='%s', comment='%s' WHERE `id`=%s LIMIT 1",
+ case 'edit': // Change entries
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_max_receive` SET value='%s', comment='%s' WHERE `id`=%s LIMIT 1",
array(
- bigintval(REQUEST_POST('val', $id)),
- REQUEST_POST('comm', $id),
- $id
+ bigintval(REQUEST_POST('val', $id)),
+ REQUEST_POST('comm', $id),
+ $id
),__FILE__, __LINE__);
- $TEXT = MRECEIVE_SAVED;
- break;
+ $TEXT = MRECEIVE_SAVED;
+ break;
- case 'del':
- SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE `id`=%s LIMIT 1",
+ case 'del':
+ SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE `id`=%s LIMIT 1",
array($id), __FILE__, __LINE__);
- $TEXT = MRECEIVE_DELETED;
- break;
+ $TEXT = MRECEIVE_DELETED;
+ break;
}
}
{
// Load data
$result = SQL_QUERY_ESC("SELECT value, comment FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE `id`=%s LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__);
+ array(bigintval($id)), __FILE__, __LINE__);
list($value, $comment) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
foreach (REQUEST_POST('sel') as $id => $value) {
// Load data
$result = SQL_QUERY_ESC("SELECT value, comment FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE `id`=%s LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__);
+ array(bigintval($id)), __FILE__, __LINE__);
list($value, $comment) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
LOAD_TEMPLATE("admin_config_email_edit");
} else {
$result = SQL_QUERY("SELECT id, value, comment FROM `{!_MYSQL_PREFIX!}_max_receive` ORDER BY value",
- __FILE__, __LINE__);
+ __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// List already existing entries for editing
$OUT = ''; $SW = 2;
// Save settings
ADMIN_SAVE_SETTINGS_POST();
}
- else
+else
{
// Prepare constants for the template
define('__MAX_VALUE', getConfig('holiday_max'));
define('__LOCKED' , createTimeSelections(getConfig('holiday_lock') , "holiday_lock" , "WDh"));
switch (getConfig('holiday_mode')) {
- case "RESET":
- define('__RESET_DEFAULT' , ' checked="checked"');
- define('__DIRECT_DEFAULT', '');
- break;
+ case "RESET":
+ define('__RESET_DEFAULT' , ' checked="checked"');
+ define('__DIRECT_DEFAULT', '');
+ break;
- case 'DIRECT':
- define('__RESET_DEFAULT' , '');
- define('__DIRECT_DEFAULT', ' checked="checked"');
- break;
+ case 'DIRECT':
+ define('__RESET_DEFAULT' , '');
+ define('__DIRECT_DEFAULT', ' checked="checked"');
+ break;
}
// Load form template
switch ($sub)
{
-case "settings": // Settings related to the index page
- if (IS_FORM_SENT()) {
- // Save settings
- ADMIN_SAVE_SETTINGS_POST();
- OUTPUT_HTML("<a href=\"{!URL!}/modules.php?module=admin&what=config_home&sub=settings\">{--ADMIN_CONTINUE_TO_CONFIG--}</a>");
- } else {
- // Prepare data for the template
- $content = array_fill(-1, 60, '');
- $content[getConfig('index_delay')] = ' selected="selected"';
-
- define('__INDEX_COOKIE_SELECTION', createTimeSelections(getConfig('index_cookie'), "index_cookie", "YMWD"));
- LOAD_TEMPLATE("admin_config_home_settings", false, $content);
- }
- break;
-
-case "target": // Set which what-file will be placed in home-page (only modules.php?module=index)
- if (REQUEST_ISSET_GET(('home'))) {
- // Set new home
- updateConfiguration('index_home', REQUEST_GET(('home')));
- } // END - if
-
- // Load all what menu points
- $result = SQL_QUERY("SELECT id, what, title
+ case "settings": // Settings related to the index page
+ if (IS_FORM_SENT()) {
+ // Save settings
+ ADMIN_SAVE_SETTINGS_POST();
+ OUTPUT_HTML("<a href=\"{!URL!}/modules.php?module=admin&what=config_home&sub=settings\">{--ADMIN_CONTINUE_TO_CONFIG--}</a>");
+ } else {
+ // Prepare data for the template
+ $content = array_fill(-1, 60, '');
+ $content[getConfig('index_delay')] = ' selected="selected"';
+
+ define('__INDEX_COOKIE_SELECTION', createTimeSelections(getConfig('index_cookie'), "index_cookie", "YMWD"));
+ LOAD_TEMPLATE("admin_config_home_settings", false, $content);
+ }
+ break;
+
+ case "target": // Set which what-file will be placed in home-page (only modules.php?module=index)
+ if (REQUEST_ISSET_GET(('home'))) {
+ // Set new home
+ updateConfiguration('index_home', REQUEST_GET(('home')));
+ } // END - if
+
+ // Load all what menu points
+ $result = SQL_QUERY("SELECT id, what, title
FROM `{!_MYSQL_PREFIX!}_guest_menu`
WHERE `action`='main' AND `what` != '' AND `what` IS NOT NULL AND `locked`='N'
ORDER BY `sort` ASC", __FILE__, __LINE__);
- // Init variables
- $SW = 2;
- $OUT = '';
+ // Init variables
+ $SW = 2;
+ $OUT = '';
- // Process all entries
- while ($content = SQL_FETCHARRAY($result)) {
- // Link for setting 'what' as new "home"
- $LINK = "<a href=\"{!URL!}/modules.php?module=admin&what=config_home&sub=target&home=".$content['what']."\">{--_IS_NEW_HOME--}</a>";
+ // Process all entries
+ while ($content = SQL_FETCHARRAY($result)) {
+ // Link for setting 'what' as new "home"
+ $LINK = "<a href=\"{!URL!}/modules.php?module=admin&what=config_home&sub=target&home=".$content['what']."\">{--_IS_NEW_HOME--}</a>";
- // Is this current home?
- if ($content['what'] == getConfig('index_home')) {
- // Is current home
- $LINK = "<div class=\"admin_note\">{!_IS_CURRENT_HOME!}</div>";
- $content['title'] = "<div class=\"admin_note\">".$content['title']."</div>";
- } // END - if
+ // Is this current home?
+ if ($content['what'] == getConfig('index_home')) {
+ // Is current home
+ $LINK = "<div class=\"admin_note\">{!_IS_CURRENT_HOME!}</div>";
+ $content['title'] = "<div class=\"admin_note\">".$content['title']."</div>";
+ } // END - if
- // Prepare content
- $content['sw'] = $SW;
- $content['link'] = $LINK;
+ // Prepare content
+ $content['sw'] = $SW;
+ $content['link'] = $LINK;
- // Load row template
- $OUT .= LOAD_TEMPLATE("admin_config_home_row", true, $content);
+ // Load row template
+ $OUT .= LOAD_TEMPLATE("admin_config_home_row", true, $content);
- // Switch color
- $SW = 3 - $SW;
- } // END - while
+ // Switch color
+ $SW = 3 - $SW;
+ } // END - while
- // Free memory
- SQL_FREERESULT($result);
- define('__HOME_ROWS', $OUT);
+ // Free memory
+ SQL_FREERESULT($result);
+ define('__HOME_ROWS', $OUT);
- // Load template
- LOAD_TEMPLATE("admin_config_home");
- break;
+ // Load template
+ LOAD_TEMPLATE("admin_config_home");
+ break;
-default: // Output selection table
- LOAD_TEMPLATE("admin_config_home_main");
- break;
+ default: // Output selection table
+ LOAD_TEMPLATE("admin_config_home_main");
+ break;
}
} else {
// Make start editable
define('__MT_START',
- ADD_SELECTION("day" , date('d', time())).
- ADD_SELECTION("month", date('m', time())).
- ADD_SELECTION("year", -1)
+ ADD_SELECTION("day" , date('d', time())).
+ ADD_SELECTION("month", date('m', time())).
+ ADD_SELECTION("year", -1)
);
}
foreach (REQUEST_POST('sel') as $id => $sel) {
// Load module data
$result = SQL_QUERY_ESC("SELECT module, title, locked, hidden, admin_only, mem_only FROM `{!_MYSQL_PREFIX!}_mod_reg` WHERE `id`=%s LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__);
+ array(bigintval($id)), __FILE__, __LINE__);
list($mod, $title, $locked, $hidden, $admin, $mem) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
// Update module
ADD_SQL(SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `title`='%s', `locked`='%s', `hidden`='%s', `admin_only`='%s', `mem_only`='%s' WHERE `id`=%s LIMIT 1",
- array(
- REQUEST_POST('title', $id),
- REQUEST_POST('locked', $id),
- REQUEST_POST('hidden', $id),
- REQUEST_POST('admin', $id),
- REQUEST_POST('member', $id),
- $id
- ), __FILE__, __LINE__, false));
+ array(
+ REQUEST_POST('title', $id),
+ REQUEST_POST('locked', $id),
+ REQUEST_POST('hidden', $id),
+ REQUEST_POST('admin', $id),
+ REQUEST_POST('member', $id),
+ $id
+ ), __FILE__, __LINE__, false));
}
// Run all sqls
// Prepare constants for the template
switch (getConfig('order_max_full'))
{
- case 'ORDER':
- define('__ORDER_DEFAULT', ' checked="checked"');
- define('__MAX_DEFAULT' , '');
- break;
-
- case 'MAX':
- define('__ORDER_DEFAULT', '');
- define('__MAX_DEFAULT' , ' checked="checked"');
- break;
+ case 'ORDER':
+ define('__ORDER_DEFAULT', ' checked="checked"');
+ define('__MAX_DEFAULT' , '');
+ break;
+
+ case 'MAX':
+ define('__ORDER_DEFAULT', '');
+ define('__MAX_DEFAULT' , ' checked="checked"');
+ break;
}
// Minimum mails / order
// Sorting mode (ascending / descending)
switch (getConfig('order_mode'))
{
- case "ASC":
- define('__ASC_DEFAULT' , ' selected="selected"');
- define('__DESC_DEFAULT', '');
- break;
-
- case "DESC":
- define('__ASC_DEFAULT' , '');
- define('__DESC_DEFAULT', ' selected="selected"');
- break;
+ case "ASC":
+ define('__ASC_DEFAULT' , ' selected="selected"');
+ define('__DESC_DEFAULT', '');
+ break;
+
+ case "DESC":
+ define('__ASC_DEFAULT' , '');
+ define('__DESC_DEFAULT', ' selected="selected"');
+ break;
}
// Transfer other config data into constants for the template
if ((REQUEST_ISSET_POST(('add'))) && (REQUEST_ISSET_POST(('title'))) && (REQUEST_POST('rate') > 0)) {
// Add new payout type
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_payout_types` WHERE type='%s' LIMIT 1",
- array(REQUEST_POST('title')), __FILE__, __LINE__);
+ array(REQUEST_POST('title')), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 0) {
// Add now
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_payout_types`
(type, rate, min_points, from_account, from_pass, engine_url, engine_ret_ok, engine_ret_failed, pass_enc, allow_url)
VALUES ('%s', %d, %d,'%s','%s','%s','%s','%s','%s','%s')",
- array(
- REQUEST_POST('title'),
- bigintval(REQUEST_POST('rate')),
- bigintval(REQUEST_POST('mpoi')),
- REQUEST_POST('yacc'),
- REQUEST_POST('ypass'),
- REQUEST_POST('yurl'),
- REQUEST_POST('yrdone'),
- REQUEST_POST('yrfailed'),
- REQUEST_POST('ytrans'),
- REQUEST_POST('allow_url'),
-), __FILE__, __LINE__);
+ array(
+ REQUEST_POST('title'),
+ bigintval(REQUEST_POST('rate')),
+ bigintval(REQUEST_POST('mpoi')),
+ REQUEST_POST('yacc'),
+ REQUEST_POST('ypass'),
+ REQUEST_POST('yurl'),
+ REQUEST_POST('yrdone'),
+ REQUEST_POST('yrfailed'),
+ REQUEST_POST('ytrans'),
+ REQUEST_POST('allow_url'),
+ ), __FILE__, __LINE__);
$msg = getMessage('ADMIN_PAYOUT_TYPE_ADDED');
} else {
// Free memory
$id = bigintval($id);
// Edit only if something is entered
- if ((REQUEST_ISSET_POST(('title', $id))) && (REQUEST_POST('rate', $id) > 0)) {
+ if ((REQUEST_ISSET_POST('title', $id)) && (REQUEST_POST('rate', $id) > 0)) {
// Update entry
ADD_SQL(SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_payout_types` SET
type='%s',
min_points=%s,
allow_url='%s'
WHERE `id`='".$id."' LIMIT 1",
- array(
- REQUEST_POST('title', $id),
- convertCommaToDot(REQUEST_POST('rate', $id)),
- convertCommaToDot(REQUEST_POST('mpoi' , $id)),
- REQUEST_POST('allow', $id),
-),__FILE__, __LINE__, false));
+ array(
+ REQUEST_POST('title', $id),
+ convertCommaToDot(REQUEST_POST('rate', $id)),
+ convertCommaToDot(REQUEST_POST('mpoi' , $id)),
+ REQUEST_POST('allow', $id),
+ ),__FILE__, __LINE__, false));
}
}
foreach (REQUEST_POST('sel') as $id => $sel) {
// Load data
$result = SQL_QUERY_ESC("SELECT type, rate, min_points, allow_url FROM `{!_MYSQL_PREFIX!}_payout_types` WHERE `id`=%s LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__);
+ array(bigintval($id)), __FILE__, __LINE__);
list($title, $rate, $mpoi, $allow) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
// Delete entries
foreach (REQUEST_POST('sel') as $id => $sel) {
ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_payout_types` WHERE `id`=%s LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__, false));
+ array(bigintval($id)), __FILE__, __LINE__, false));
} // END - foreach
// Run all SQLs
// Load data
$result = SQL_QUERY_ESC("SELECT type, rate, min_points FROM `{!_MYSQL_PREFIX!}_payout_types` WHERE `id`=%s LIMIT 1",
- array($id), __FILE__, __LINE__);
+ array($id), __FILE__, __LINE__);
list($title, $rate, $mpoi) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
// Yes, then do some sanity-checks
switch (REQUEST_GET('sub'))
{
- case "points":
- if ((!REQUEST_ISSET_POST(('points_register'))) || (!REQUEST_ISSET_POST(('points_ref')))) {
- REQUEST_UNSET_POST('ok');
- }
- break;
-
- case "ref":
- if (REQUEST_ISSET_GET('do')) {
- if (((!REQUEST_ISSET_POST(('lvl'))) || (!REQUEST_ISSET_POST(('perc')))) && (REQUEST_GET('do') == 'add')) {
+ case "points":
+ if ((!REQUEST_ISSET_POST(('points_register'))) || (!REQUEST_ISSET_POST(('points_ref')))) {
REQUEST_UNSET_POST('ok');
}
- }
- break;
+ break;
+
+ case "ref":
+ if (REQUEST_ISSET_GET('do')) {
+ if (((!REQUEST_ISSET_POST(('lvl'))) || (!REQUEST_ISSET_POST(('perc')))) && (REQUEST_GET('do') == 'add')) {
+ REQUEST_UNSET_POST('ok');
+ }
+ }
+ break;
}
} else {
// Display overview
INIT_SQLS();
switch (REQUEST_GET('sub'))
{
- case "points":
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_config` SET points_register='".REQUEST_POST('points_register')."', points_ref='".REQUEST_POST('points_ref')."' WHERE config=0 LIMIT 1");
- break;
-
- case "ref":
- switch (REQUEST_GET('do'))
- {
- case 'add':
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_refdepths` (level, percents) VALUES ('".REQUEST_POST('lvl')."','".REQUEST_POST('perc')."')");
+ case "points":
+ ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_config` SET points_register='".REQUEST_POST('points_register')."', points_ref='".REQUEST_POST('points_ref')."' WHERE config=0 LIMIT 1");
break;
- case 'edit': // Change entries
- foreach (REQUEST_POST('lvl') as $id => $value) {
- // Secure ID
- $id = bigintval($id);
-
- // Revert german commata
- REQUEST_SET_POST(array('perc', $id), convertCommaToDot(REQUEST_POST('perc', $id)));
-
- // Update entry
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_refdepths` SET level='%s', percents='%s' WHERE `id`=%s LIMIT 1",
- array(bigintval($value), REQUEST_POST('perc', $id), $id), __FILE__, __LINE__);
+ case "ref":
+ switch (REQUEST_GET('do'))
+ {
+ case 'add':
+ ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_refdepths` (level, percents) VALUES ('".REQUEST_POST('lvl')."','".REQUEST_POST('perc')."')");
+ break;
+
+ case 'edit': // Change entries
+ foreach (REQUEST_POST('lvl') as $id => $value) {
+ // Secure ID
+ $id = bigintval($id);
+
+ // Revert german commata
+ REQUEST_SET_POST(array('perc', $id), convertCommaToDot(REQUEST_POST('perc', $id)));
+
+ // Update entry
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_refdepths` SET level='%s', percents='%s' WHERE `id`=%s LIMIT 1",
+ array(bigintval($value), REQUEST_POST('perc', $id), $id), __FILE__, __LINE__);
+ }
+ $message = getMessage('REF_DEPTHS_SAVED');
+ break;
+
+ case 'del':
+ foreach (REQUEST_POST('id') as $id => $value) {
+ SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_refdepths` WHERE `id`=%s LIMIT 1",
+ array(bigintval($id)), __FILE__, __LINE__);
+ }
+ $message = getMessage('REF_DEPTHS_DELETED');
+ break;
}
- $message = getMessage('REF_DEPTHS_SAVED');
- break;
- case 'del':
- foreach (REQUEST_POST('id') as $id => $value) {
- SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_refdepths` WHERE `id`=%s LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__);
+ // Update cache file
+ if (GET_EXT_VERSION('cache') >= '0.1.2') {
+ if ($GLOBALS['cache_instance']->loadCacheFile("refdepths")) $GLOBALS['cache_instance']->destroyCacheFile();
}
- $message = getMessage('REF_DEPTHS_DELETED');
break;
- }
-
- // Update cache file
- if (GET_EXT_VERSION('cache') >= '0.1.2') {
- if ($GLOBALS['cache_instance']->loadCacheFile("refdepths")) $GLOBALS['cache_instance']->destroyCacheFile();
- }
- break;
- case "settings":
- $REF = bigintval(REQUEST_POST('ref_payout'));
- ADD_SQL(sprintf("UPDATE `{!_MYSQL_PREFIX!}_config` SET
+ case "settings":
+ $REF = bigintval(REQUEST_POST('ref_payout'));
+ ADD_SQL(sprintf("UPDATE `{!_MYSQL_PREFIX!}_config` SET
allow_direct_pay='%s',
reg_points_mode='%s',
ref_payout='%s'
WHERE config=0 LIMIT 1",
- REQUEST_POST('allow_direct_pay'),
- REQUEST_POST('reg_points_mode'),
- $REF
- ));
- if ((getConfig('ref_payout') == 0) && (REQUEST_POST('ref_payout') > 0)) {
- // Update account's ref_payout for "must-confirm"
- ADD_SQL(sprintf("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET ref_payout=(%s - mails_confirmed)
+ REQUEST_POST('allow_direct_pay'),
+ REQUEST_POST('reg_points_mode'),
+ $REF
+ ));
+ if ((getConfig('ref_payout') == 0) && (REQUEST_POST('ref_payout') > 0)) {
+ // Update account's ref_payout for "must-confirm"
+ ADD_SQL(sprintf("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET ref_payout=(%s - mails_confirmed)
WHERE mails_confirmed < %s", $REF, $REF));
- } elseif ((getConfig('ref_payout') > 0) && (REQUEST_POST('ref_payout') == 0)) {
- // Update account's ref_payout for "not-must-confirm"
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET ref_payout=0 WHERE ref_payout > 0");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_points` SET points=points+locked_points WHERE locked_points>0");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_points` SET locked_points=0 WHERE locked_points>0");
- }
- break;
+ } elseif ((getConfig('ref_payout') > 0) && (REQUEST_POST('ref_payout') == 0)) {
+ // Update account's ref_payout for "not-must-confirm"
+ ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET ref_payout=0 WHERE ref_payout > 0");
+ ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_points` SET points=points+locked_points WHERE locked_points>0");
+ ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_user_points` SET locked_points=0 WHERE locked_points>0");
+ }
+ break;
}
if ((IS_SQLS_VALID()) && (IS_SQLS_VALID())) {
if (strpos($GLOBALS['sqls'][0], "INSERT") > -1) {
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_refdepths` WHERE level='%s' LIMIT 1",
- array(bigintval(REQUEST_POST('lvl'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_POST('lvl'))), __FILE__, __LINE__);
SQL_FREERESULT($result);
} // END - if
// Setup some settings like direct pay and so on
// Including new add-mode for one-time referal bonus
switch (getConfig('allow_direct_pay')) {
- case 'Y':
- define('__DIRECT_Y', ' checked="checked"');
- define('__DIRECT_N', '');
- break;
-
- case 'N':
- define('__DIRECT_Y', '');
- define('__DIRECT_N', ' checked="checked"');
- break;
+ case 'Y':
+ define('__DIRECT_Y', ' checked="checked"');
+ define('__DIRECT_N', '');
+ break;
+
+ case 'N':
+ define('__DIRECT_Y', '');
+ define('__DIRECT_N', ' checked="checked"');
+ break;
}
// One-time referal bonus add-mode
$OUT = ''; $SW = 2;
foreach (REQUEST_POST('sel') as $id => $value) {
$result = SQL_QUERY_ESC("SELECT level, percents FROM `{!_MYSQL_PREFIX!}_refdepths` WHERE `id`=%s LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__);
+ array(bigintval($id)), __FILE__, __LINE__);
list($lvl, $perc) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
$OUT = ''; $SW = 2;
foreach (REQUEST_POST('sel') as $id => $value) {
$result = SQL_QUERY_ESC("SELECT level, percents FROM `{!_MYSQL_PREFIX!}_refdepths` WHERE `id`=%s LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__);
+ array(bigintval($id)), __FILE__, __LINE__);
list($lvl, $perc) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
if ((REQUEST_ISSET_POST(('level'))) && ((REQUEST_ISSET_POST(('points'))) || (REQUEST_ISSET_POST(('info'))))) {
// Submitted data is valid, but maybe we already have this price level?
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id=%s AND price_level='%s' LIMIT 1",
- array(bigintval(REQUEST_GET('rallye')), bigintval(REQUEST_POST('level'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('rallye')), bigintval(REQUEST_POST('level'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 0) {
// Ok, new price level entered!
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_rallye_prices` (rallye_id, price_level, points, info)
VALUES ('%s','%s','%s','%s')",
- array(
- bigintval(REQUEST_GET('rallye')),
- bigintval(REQUEST_POST('level')),
- REQUEST_POST('points'),
- REQUEST_POST('info')
-), __FILE__, __LINE__);
+ array(
+ bigintval(REQUEST_GET('rallye')),
+ bigintval(REQUEST_POST('level')),
+ REQUEST_POST('points'),
+ REQUEST_POST('info')
+ ), __FILE__, __LINE__);
LOAD_TEMPLATE('admin_settings_saved', false, getMessage('RALLYE_PRICE_LEVEL_SAVED'));
} else {
// Free memory
// Delete selected entries
foreach (REQUEST_POST('sel') as $id => $sel) {
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE `id`=%s LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__);
+ array(bigintval($id)), __FILE__, __LINE__);
}
// Output message
// Update entry
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_rallye_prices` SET rallye_id=%s, price_level='%s', points='%s', info='%s' WHERE `id`=%s LIMIT 1",
- array(
- REQUEST_POST('rallye_id', $id),
- bigintval($level),
- REQUEST_POST('points', $id]),
- REQUEST_POST('infos', $id),
- $id
- ), __FILE__, __LINE__);
+ array(
+ REQUEST_POST('rallye_id', $id),
+ bigintval($level),
+ REQUEST_POST('points', $id),
+ REQUEST_POST('infos', $id),
+ $id
+ ), __FILE__, __LINE__);
}
// Output message
foreach (REQUEST_POST('sel') as $id => $sel) {
// Load data to selected rallye
$result = SQL_QUERY_ESC("SELECT rallye_id, price_level, points, info FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE `id`=%s LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__);
+ array(bigintval($id)), __FILE__, __LINE__);
list($rallye, $level, $points, $infos) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
foreach (REQUEST_POST('sel') as $id => $sel) {
// Load data to selected rallye
$result = SQL_QUERY_ESC("SELECT rallye_id, price_level, points, info FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE `id`=%s LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__);
+ array(bigintval($id)), __FILE__, __LINE__);
list($rallye, $level, $points, $infos) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
} else {
// a rallye was selected, so check if there are already prices assigned...
$result = SQL_QUERY_ESC("SELECT id, price_level, points, info FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id=%s ORDER BY price_level",
- array(bigintval(REQUEST_GET('rallye'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('rallye'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Load all prices for the selected rallye
if (IS_FORM_SENT()) {
foreach (REQUEST_POST('sel') as $id => $value) {
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_must_register` SET field_required='%s' WHERE `id`=%s AND field_required != '%s' LIMIT 1",
- array($value, bigintval($id), $value),__FILE__, __LINE__);
+ array($value, bigintval($id), $value),__FILE__, __LINE__);
}
LOAD_TEMPLATE('admin_settings_saved', false, getMessage('REGISTER_ADMIN_CHANGES_SAVED'));
}
// Guest stats
switch (getConfig('guest_stats'))
{
- case "MEMBERS":
- define('__MEMBERS_RADIO', ' selected="selected"');
- define('__MODULES_RADIO', '');
- define('__INACTIVE_RADIO', '');
- break;
+ case "MEMBERS":
+ define('__MEMBERS_RADIO', ' selected="selected"');
+ define('__MODULES_RADIO', '');
+ define('__INACTIVE_RADIO', '');
+ break;
- case "MODULES":
- define('__MEMBERS_RADIO', '');
- define('__MODULES_RADIO', ' selected="selected"');
- define('__INACTIVE_RADIO', '');
- break;
+ case "MODULES":
+ define('__MEMBERS_RADIO', '');
+ define('__MODULES_RADIO', ' selected="selected"');
+ define('__INACTIVE_RADIO', '');
+ break;
- case "INACTIVE":
- define('__MEMBERS_RADIO', '');
- define('__MODULES_RADIO', '');
- define('__INACTIVE_RADIO', ' selected="selected"');
- break;
+ case "INACTIVE":
+ define('__MEMBERS_RADIO', '');
+ define('__MODULES_RADIO', '');
+ define('__INACTIVE_RADIO', ' selected="selected"');
+ break;
}
// Max stats entries per page
// Save settings
ADMIN_SAVE_SETTINGS_POST();
}
- else
+else
{
// Remember config data in constants for the template
define('__CFG_TITLE_LEFT' , getConfig('title_left'));
// Save settings
ADMIN_SAVE_SETTINGS_POST();
}
- else
+else
{
// Prepare constants for the template
define('__MAX_VALUE', getConfig('top10_max'));
if (REQUEST_ISSET_GET(('mid'))) {
// Load email data
$result = SQL_QUERY_ESC("SELECT id, sender, subject, url, timestamp, payment_id FROM `{!_MYSQL_PREFIX!}_pool` WHERE `id`=%s LIMIT 1",
- array(bigintval(REQUEST_GET('mid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('mid'))), __FILE__, __LINE__);
// Delete mail only once
if (SQL_NUMROWS($result) == 1) {
LEFT JOIN `{!_MYSQL_PREFIX!}_pool` AS p
ON s.pool_id=p.id
WHERE s.pool_id=%s LIMIT 1",
- array(bigintval(REQUEST_GET('mid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('mid'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result_pool) == 1) {
// Fetch stats id
list($stats_id) = SQL_FETCHROW($result_pool);
if (getConfig('repay_deleted_mails') == 'REPAY') {
// Repayed
LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_POINTS_REPAYED'),
- translateComma($totalPoints)
+ translateComma($totalPoints)
));
} else {
// To jackpot
LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_POINTS_TO_JACKPOT'),
- translateComma($totalPoints)
+ translateComma($totalPoints)
));
}
} else {
// Remove links from DB
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_links` WHERE stats_id=%s",
- array(bigintval($stats_id)), __FILE__, __LINE__);
+ array(bigintval($stats_id)), __FILE__, __LINE__);
$cnt += SQL_AFFECTEDROWS();
// Load template for link
// Delete mail from queue
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_pool` WHERE `id`=%s LIMIT 1",
- array(bigintval(REQUEST_GET('mid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('mid'))), __FILE__, __LINE__);
$cnt += SQL_AFFECTEDROWS();
// Output link for manually removing stats entry
} elseif (REQUEST_ISSET_GET(('pid'))) {
// Remove stats entries
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE pool_id=%s LIMIT 1",
- array(bigintval(REQUEST_GET('pid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('pid'))), __FILE__, __LINE__);
// Output message
LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_USER_STATS_REMOVED'));
} elseif ((REQUEST_ISSET_GET(('bid'))) && (EXT_IS_ACTIVE('bonus'))) {
// Load data from bonus mail
$result = SQL_QUERY_ESC("SELECT id, subject, url, timestamp, mails_sent FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s",
- array(bigintval(REQUEST_GET('bid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('bid'))), __FILE__, __LINE__);
// Delete mail only once
if (SQL_NUMROWS($result) == 1) {
// Delete bonus mail entirely from database
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
- array(bigintval(REQUEST_GET('bid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('bid'))), __FILE__, __LINE__);
$cnt += SQL_AFFECTEDROWS();
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_links` WHERE bonus_id=%s",
- array(bigintval(REQUEST_GET('bid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('bid'))), __FILE__, __LINE__);
$cnt += SQL_AFFECTEDROWS();
// Prepare data for the template
} elseif ((REQUEST_ISSET_GET(('nid'))) && (GET_EXT_VERSION('bonus') >= '0.8.7')) {
// Load data from bonus mail
$result = SQL_QUERY_ESC("SELECT id, subject, url, timestamp FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s",
- array(bigintval(REQUEST_GET('nid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('nid'))), __FILE__, __LINE__);
// Delete mail only once
if (SQL_NUMROWS($result) == 1) {
// Delete bonus mail entirely from database
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
- array(bigintval(REQUEST_GET('nid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('nid'))), __FILE__, __LINE__);
$cnt += SQL_AFFECTEDROWS();
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_links` WHERE bonus_id=%s",
- array(bigintval(REQUEST_GET('nid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('nid'))), __FILE__, __LINE__);
$cnt += SQL_AFFECTEDROWS();
// Prepare data for the template
if (REQUEST_ISSET_GET('id')) {
// Check for selected sponsor
$result = SQL_QUERY_ESC("SELECT email, gender, surname, family FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE `id`='%s' LIMIT 1",
- array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Remove sponsor
if (IS_FORM_SENT()) {
// Remove account
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE `id`='%s' LIMIT 1",
- array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
// Remove orders
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_sponsor_orders` WHERE sponsorid='%s' LIMIT 1",
- array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
// Output message
LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_DELETED'), bigintval(REQUEST_GET('id'))));
// Delete entries...
foreach (REQUEST_POST('sel') as $id => $sel) {
ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_transfers_in` WHERE trans_id=%s LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__, false));
+ array(bigintval($id)), __FILE__, __LINE__, false));
ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_transfers_out` WHERE trans_id=%s LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__, false));
+ array(bigintval($id)), __FILE__, __LINE__, false));
} // END - foreach
// Run all SQLs
if ((IS_FORM_SENT()) || ((REQUEST_ISSET_POST('del')) && (REQUEST_ISSET_POST(('reason'))))) {
// Delete users account
$result_user = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result_user) == 1) {
// Free memory
SQL_FREERESULT($result_user);
} else {
// Realy want to delete?
$result = SQL_QUERY_ESC("SELECT email, surname, family FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load data
list ($email, $sname, $fname) = SQL_FETCHROW($result);
if (IS_FORM_SENT()) {
// Make mail editable...
$result = SQL_QUERY_ESC("SELECT subject, text, url FROM `{!_MYSQL_PREFIX!}_pool` WHERE `id`=%s LIMIT 1",
- array(bigintval(REQUEST_POST('id'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_POST('id'))), __FILE__, __LINE__);
list($subj, $text, $url) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
// @TODO More constants to rewrite
text='%s',
url='%s'
WHERE `id`=%s LIMIT 1",
- array(
- REQUEST_POST('subj'),
- REQUEST_POST('text'),
- REQUEST_POST('url'),
- bigintval(REQUEST_POST('id')),
-), __FILE__, __LINE__);
+ array(
+ REQUEST_POST('subj'),
+ REQUEST_POST('text'),
+ REQUEST_POST('url'),
+ bigintval(REQUEST_POST('id')),
+ ), __FILE__, __LINE__);
if (SQL_AFFECTEDROWS() == 1) {
$content = getMessage('SETTINGS_SAVED');
if ((REQUEST_ISSET_GET('id')) && (REQUEST_ISSET_GET(('mode')))) {
// Check for selected sponsor
$result = SQL_QUERY_ESC("SELECT company, position, gender, surname, family, street_nr1, street_nr2, zip, city, country, phone, fax, cell, email, url, tax_ident, receive_warnings, warning_interval FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE `id`='%s' LIMIT 1",
- array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load sponsor details
$DATA = SQL_FETCHARRAY($result);
// Personal data
switch ($DATA['gender'])
{
- case "M":
- define('__GENDER_M', ' selected="selected"');
- define('__GENDER_F', '');
- define('__GENDER_C', '');
- break;
-
- case "F":
- define('__GENDER_M', '');
- define('__GENDER_F', ' selected="selected"');
- define('__GENDER_C', '');
- break;
-
- case "C":
- define('__GENDER_M', '');
- define('__GENDER_F', '');
- define('__GENDER_C', ' selected="selected"');
- break;
+ case "M":
+ define('__GENDER_M', ' selected="selected"');
+ define('__GENDER_F', '');
+ define('__GENDER_C', '');
+ break;
+
+ case "F":
+ define('__GENDER_M', '');
+ define('__GENDER_F', ' selected="selected"');
+ define('__GENDER_C', '');
+ break;
+
+ case "C":
+ define('__GENDER_M', '');
+ define('__GENDER_F', '');
+ define('__GENDER_C', ' selected="selected"');
+ break;
}
define('__SURNAME' , $DATA['surname']);
define('__FAMILY' , $DATA['family']);
// Perform action on mode
switch (REQUEST_GET('mode'))
{
- case "add_points": // Add points
- if (strval(REQUEST_POST('points')) > 0) {
- // Replace german decimal comma with computer's decimal dot
- $POINTS = strval(convertCommaToDot(REQUEST_POST('points')));
+ case "add_points": // Add points
+ if (strval(REQUEST_POST('points')) > 0) {
+ // Replace german decimal comma with computer's decimal dot
+ $POINTS = strval(convertCommaToDot(REQUEST_POST('points')));
- // Add points to account
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET points_amount=points_amount+%s WHERE `id`='%s' LIMIT 1",
+ // Add points to account
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET points_amount=points_amount+%s WHERE `id`='%s' LIMIT 1",
array($POINTS, bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
- // Remember points /reason for the template
- define('__POINTS' , translateComma($POINTS));
- define('__REASON' , REQUEST_POST('reason'));
-
- // Send email
- $msg = LOAD_EMAIL_TEMPLATE("sponsor_add_points", REQUEST_POST('reason'), true);
- sendEmail(__EMAIL, ADMIN_SPONSOR_ADD_POINTS_SUBJ, $msg);
- $message = ADMIN_SPONSOR_POINTS_ADDED;
- } else {
- // No points entered to add!
- $message = ADMIN_SPONSPOR_NO_POINTS_TO_ADD;
- }
- break;
-
- case "sub_points": // Subtract points
- if (strval(REQUEST_POST('points')) > 0) {
- // Replace german decimal comma with computer's decimal dot
- $POINTS = strval(convertCommaToDot(REQUEST_POST('points')));
-
- // Add points to account
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET points_used=points_used+%s WHERE `id`='%s' LIMIT 1",
+ // Remember points /reason for the template
+ define('__POINTS' , translateComma($POINTS));
+ define('__REASON' , REQUEST_POST('reason'));
+
+ // Send email
+ $msg = LOAD_EMAIL_TEMPLATE("sponsor_add_points", REQUEST_POST('reason'), true);
+ sendEmail(__EMAIL, ADMIN_SPONSOR_ADD_POINTS_SUBJ, $msg);
+ $message = ADMIN_SPONSOR_POINTS_ADDED;
+ } else {
+ // No points entered to add!
+ $message = ADMIN_SPONSPOR_NO_POINTS_TO_ADD;
+ }
+ break;
+
+ case "sub_points": // Subtract points
+ if (strval(REQUEST_POST('points')) > 0) {
+ // Replace german decimal comma with computer's decimal dot
+ $POINTS = strval(convertCommaToDot(REQUEST_POST('points')));
+
+ // Add points to account
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET points_used=points_used+%s WHERE `id`='%s' LIMIT 1",
array($POINTS, bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
- // Remember points /reason for the template
- define('__POINTS' , translateComma($POINTS));
- define('__REASON' , REQUEST_POST('reason'));
-
- // Send email
- $msg = LOAD_EMAIL_TEMPLATE("sponsor_sub_points", REQUEST_POST('reason'), true);
- sendEmail(__EMAIL, ADMIN_SPONSOR_SUB_POINTS_SUBJ, $msg);
- $message = ADMIN_SPONSOR_POINTS_SUBTRACTED;
- } else {
- // No points entered to add!
- $message = ADMIN_SPONSPOR_NO_POINTS_TO_SUBTRACT;
- }
- break;
-
- case 'edit': // Edit sponsor account
- $PASS = true;
- if ((REQUEST_POST('pass1') != REQUEST_POST('pass2')) || ((!REQUEST_ISSET_POST(('pass1'))) && (!REQUEST_ISSET_POST(('pass1'))))) {
- // Remove passwords
- REQUEST_UNSET_POST(('pass1'));
- REQUEST_UNSET_POST(('pass2'));
- $PASS = false;
- }
-
- // Convert time selection
- $DATA = array(); $id = "warning_interval_ye"; $skip = false;
- convertSelectionsToTimestamp(REQUEST_POST_ARRAY(), $DATA, $id, $skip);
-
- // Save the sponsor
- SPONSOR_HANDLE_SPONSOR(REQUEST_POST_ARRAY());
-
- // Convert some data for the email template
- REQUEST_POST('gender' , translateGender(REQUEST_POST('gender')));
- REQUEST_POST('warning_interval', createFancyTime(REQUEST_POST('warning_interval')));
-
- if (!$PASS) REQUEST_SET_POST('pass1', getMessage('SPONSOR_PASS_UNCHANGED'));
-
- // Load email template and send the mail away
- $msg = LOAD_EMAIL_TEMPLATE("admin_sponsor_edit", REQUEST_POST_ARRAY(), false);
- sendEmail(REQUEST_POST('email'), getMessage('ADMIN_SPONSOR_EDIT_SUBJECT'), $msg);
- break;
-
- default: // Unknown mode
- DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown mode %s detected.", REQUEST_GET('mode')));
- $message = sprintf(getMessage('ADMIN_SPONSOR_INVALID_MODE'), REQUEST_GET(('mode')));
- break;
+ // Remember points /reason for the template
+ define('__POINTS' , translateComma($POINTS));
+ define('__REASON' , REQUEST_POST('reason'));
+
+ // Send email
+ $msg = LOAD_EMAIL_TEMPLATE("sponsor_sub_points", REQUEST_POST('reason'), true);
+ sendEmail(__EMAIL, ADMIN_SPONSOR_SUB_POINTS_SUBJ, $msg);
+ $message = ADMIN_SPONSOR_POINTS_SUBTRACTED;
+ } else {
+ // No points entered to add!
+ $message = ADMIN_SPONSPOR_NO_POINTS_TO_SUBTRACT;
+ }
+ break;
+
+ case 'edit': // Edit sponsor account
+ $PASS = true;
+ if ((REQUEST_POST('pass1') != REQUEST_POST('pass2')) || ((!REQUEST_ISSET_POST(('pass1'))) && (!REQUEST_ISSET_POST(('pass1'))))) {
+ // Remove passwords
+ REQUEST_UNSET_POST(('pass1'));
+ REQUEST_UNSET_POST(('pass2'));
+ $PASS = false;
+ }
+
+ // Convert time selection
+ $DATA = array(); $id = "warning_interval_ye"; $skip = false;
+ convertSelectionsToTimestamp(REQUEST_POST_ARRAY(), $DATA, $id, $skip);
+
+ // Save the sponsor
+ SPONSOR_HANDLE_SPONSOR(REQUEST_POST_ARRAY());
+
+ // Convert some data for the email template
+ REQUEST_POST('gender' , translateGender(REQUEST_POST('gender')));
+ REQUEST_POST('warning_interval', createFancyTime(REQUEST_POST('warning_interval')));
+
+ if (!$PASS) REQUEST_SET_POST('pass1', getMessage('SPONSOR_PASS_UNCHANGED'));
+
+ // Load email template and send the mail away
+ $msg = LOAD_EMAIL_TEMPLATE("admin_sponsor_edit", REQUEST_POST_ARRAY(), false);
+ sendEmail(REQUEST_POST('email'), getMessage('ADMIN_SPONSOR_EDIT_SUBJECT'), $msg);
+ break;
+
+ default: // Unknown mode
+ DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown mode %s detected.", REQUEST_GET('mode')));
+ $message = sprintf(getMessage('ADMIN_SPONSOR_INVALID_MODE'), REQUEST_GET(('mode')));
+ break;
}
if (!empty($message)) {
FROM `{!_MYSQL_PREFIX!}_user_data`
WHERE userid=%s
LIMIT 1",
- array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
}
if ((SQL_NUMROWS($result_main) == 1) || (!REQUEST_ISSET_GET('uid')))
// Output selection form with all confirmed user accounts listed
ADD_MEMBER_SELECTION_BOX();
}
- elseif (REQUEST_ISSET_POST('edit'))
+ elseif (REQUEST_ISSET_POST('edit'))
{
// Ok, change the account...
$PASS = false; $add = '';
// Don't change the password
$PASS = true;
}
- elseif ((REQUEST_POST('pass1') == REQUEST_POST('pass2')))
+ elseif ((REQUEST_POST('pass1') == REQUEST_POST('pass2')))
{
// Change the password
$PASS = true;
email='%s'
".$add."
WHERE userid=%s LIMIT 1",
- array(
- substr(REQUEST_POST('gender'), 0, 1),
- REQUEST_POST('surname'),
- REQUEST_POST('family'),
- REQUEST_POST('street_nr'),
- REQUEST_POST('country'),
- bigintval(REQUEST_POST('zip')),
- REQUEST_POST('city'),
- REQUEST_POST('email'),
- bigintval(REQUEST_GET('uid')),
-), __FILE__, __LINE__);
+ array(
+ substr(REQUEST_POST('gender'), 0, 1),
+ REQUEST_POST('surname'),
+ REQUEST_POST('family'),
+ REQUEST_POST('street_nr'),
+ REQUEST_POST('country'),
+ bigintval(REQUEST_POST('zip')),
+ REQUEST_POST('city'),
+ REQUEST_POST('email'),
+ bigintval(REQUEST_GET('uid')),
+ ), __FILE__, __LINE__);
$content = USER_ACCOUNT_SAVED;
}
- else
+ else
{
// Problem while saving data
$content = USER_ACCOUNT_NOT_SAVED;
// Load template
LOAD_TEMPLATE('admin_settings_saved', false, $content);
}
- else
+ else
{
// Display form to edit
list($gender, $surname, $family, $street, $zip, $city, $country, $email, $bday, $bmonth, $byear, $max) = SQL_FETCHROW($result_main);
// Transfer data to constants for the template
switch ($gender)
{
- case "M":
- define('_GENDER_M', ' selected="selected"');
- define('_GENDER_F', '');
- define('_GENDER_C', '');
- break;
+ case "M":
+ define('_GENDER_M', ' selected="selected"');
+ define('_GENDER_F', '');
+ define('_GENDER_C', '');
+ break;
- case "F":
- define('_GENDER_M', '');
- define('_GENDER_F', ' selected="selected"');
- define('_GENDER_C', '');
- break;
+ case "F":
+ define('_GENDER_M', '');
+ define('_GENDER_F', ' selected="selected"');
+ define('_GENDER_C', '');
+ break;
- case "C":
- define('_GENDER_M', '');
- define('_GENDER_F', '');
- define('_GENDER_C', ' selected="selected"');
- break;
+ case "C":
+ define('_GENDER_M', '');
+ define('_GENDER_F', '');
+ define('_GENDER_C', ' selected="selected"');
+ break;
}
define('_SURNAME', $surname); define('_FAMILY', $family); define('_CITY' , $city);
while ($pool = SQL_FETCHROW($result)) {
// Check sent mails and clicks
$result_mails = SQL_QUERY_ESC("SELECT max_rec, clicks FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE pool_id=%s LIMIT 1",
- array(bigintval($pool[0])), __FILE__, __LINE__);
+ array(bigintval($pool[0])), __FILE__, __LINE__);
list($sent, $clicks) = SQL_FETCHROW($result_mails);
SQL_FREERESULT($result_mails);
while ($pool = SQL_FETCHARRAY($result_list)) {
// Unconfirmed mails and sent mails
$result_uncon = SQL_QUERY_ESC("SELECT max_rec, clicks FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE pool_id=%s LIMIT 1",
- array(bigintval($pool['id'])), __FILE__, __LINE__);
+ array(bigintval($pool['id'])), __FILE__, __LINE__);
list($pool['sent_email'], $pool['clicks']) = SQL_FETCHROW($result_uncon);
SQL_FREERESULT($result_uncon);
$ACT = 'N'; $EXT_LOAD_MODE = 'deactivate';
if ($active == 'N') { $ACT = 'Y'; $EXT_LOAD_MODE = 'activate'; }
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET `ext_active`='".$ACT."' WHERE `id`=%s AND `ext_active`='%s' LIMIT 1",
- array(bigintval($ext_id), $active), __FILE__, __LINE__);
+ array(bigintval($ext_id), $active), __FILE__, __LINE__);
// Run embeded SQL commands
EXTENSION_RUN_SQLS($ext_id, $EXT_LOAD_MODE);
if (GET_EXT_VERSION('sql_patches') >= '0.0.6') {
// Update also CSS column when extensions sql_patches is newer or exact v0.0.6
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_has_css='%s', `ext_active`='%s' WHERE `id`=%s LIMIT 1",
- array(REQUEST_POST('css', $ext_id), $active, $ext_id), __FILE__, __LINE__);
+ array(REQUEST_POST('css', $ext_id), $active, $ext_id), __FILE__, __LINE__);
} else {
// When extension is older than v0.0.6 there is no column for the CSS information
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET `ext_active`='%s' WHERE `id`=%s LIMIT 1",
- array($active, $ext_id), __FILE__, __LINE__);
+ array($active, $ext_id), __FILE__, __LINE__);
}
// Run SQLs on activation / deactivation
// Load required data
if (GET_EXT_VERSION('sql_patches') >= '0.0.6') {
$result = SQL_QUERY_ESC("SELECT ext_name, ext_has_css, ext_active FROM `{!_MYSQL_PREFIX!}_extensions` WHERE `id`=%s LIMIT 1",
- array(bigintval($ext_id)), __FILE__, __LINE__);
+ array(bigintval($ext_id)), __FILE__, __LINE__);
list($name, $css, $active) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
} else {
$result = SQL_QUERY_ESC("SELECT ext_name, ext_active FROM `{!_MYSQL_PREFIX!}_extensions` WHERE `id`=%s LIMIT 1",
- array(bigintval($ext_id)), __FILE__, __LINE__);
+ array(bigintval($ext_id)), __FILE__, __LINE__);
list($name, $active) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
$css = "X";
// Case selection
switch ($do) {
-case "overview": // List all registered extensions
- if (GET_EXT_VERSION('sql_patches') >= '0.0.6') {
- // Load extension data with CSS informations
- $result = SQL_QUERY("SELECT id AS ext_id, ext_name, ext_active, ext_has_css AS ext_css, ext_version
+ case "overview": // List all registered extensions
+ if (GET_EXT_VERSION('sql_patches') >= '0.0.6') {
+ // Load extension data with CSS informations
+ $result = SQL_QUERY("SELECT id AS ext_id, ext_name, ext_active, ext_has_css AS ext_css, ext_version
FROM `{!_MYSQL_PREFIX!}_extensions`
".$where."
ORDER BY ext_name", __FILE__, __LINE__);
- } else {
- // Load extension data without CSS informations
- $result = SQL_QUERY("SELECT id AS ext_id, ext_name, ext_active, id, ext_version
+ } else {
+ // Load extension data without CSS informations
+ $result = SQL_QUERY("SELECT id AS ext_id, ext_name, ext_active, id, ext_version
FROM `{!_MYSQL_PREFIX!}_extensions`
".$where."
ORDER BY ext_name", __FILE__, __LINE__);
- }
+ }
- // Are there some entries?
- if (SQL_NUMROWS($result) > 0) {
- // Extensions are registered
- $OUT = ''; $SW = 2;
- while ($content = SQL_FETCHARRAY($result)) {
- // Prepare CSS selection output
- $cssSelection = '---';
- if (GET_EXT_VERSION('sql_patches') >= '0.0.6') $cssSelection = translateYesNo($content['ext_css']);
-
- // Prepare data for the row template
- $content = array(
+ // Are there some entries?
+ if (SQL_NUMROWS($result) > 0) {
+ // Extensions are registered
+ $OUT = ''; $SW = 2;
+ while ($content = SQL_FETCHARRAY($result)) {
+ // Prepare CSS selection output
+ $cssSelection = '---';
+ if (GET_EXT_VERSION('sql_patches') >= '0.0.6') $cssSelection = translateYesNo($content['ext_css']);
+
+ // Prepare data for the row template
+ $content = array(
'sw' => $SW,
'id' => $content['ext_id'],
'name' => $content['ext_name'],
'act_val' => $content['ext_active'],
'css' => $cssSelection,
'ver' => $content['ext_version'],
- );
+ );
- // Load row template and switch color
- $OUT .= LOAD_TEMPLATE("admin_extensions_row", true, $content);
- $SW = 3 - $SW;
- }
+ // Load row template and switch color
+ $OUT .= LOAD_TEMPLATE("admin_extensions_row", true, $content);
+ $SW = 3 - $SW;
+ }
- // Free memory
- SQL_FREERESULT($result);
+ // Free memory
+ SQL_FREERESULT($result);
- // Remember rows in constant for the template
- define('__EXT_ROWS', $OUT);
+ // Remember rows in constant for the template
+ define('__EXT_ROWS', $OUT);
- // Load template
- LOAD_TEMPLATE("admin_extensions");
- } else {
- // No extensions are registered
- LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NO_EXTENSION_REGISTERED'));
- }
- break;
+ // Load template
+ LOAD_TEMPLATE("admin_extensions");
+ } else {
+ // No extensions are registered
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NO_EXTENSION_REGISTERED'));
+ }
+ break;
-case 'register': // Register new extension
- $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_task_system` WHERE `assigned_admin`=%s AND `task_type`='EXTENSION' LIMIT 1",
+ case 'register': // Register new extension
+ $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_task_system` WHERE `assigned_admin`=%s AND `task_type`='EXTENSION' LIMIT 1",
array(getCurrentAdminId()), __FILE__, __LINE__);
- $task_found = SQL_NUMROWS($result);
-
- // Free result
- SQL_FREERESULT($result);
+ $task_found = SQL_NUMROWS($result);
- // Is the ID number valid and the task was found?
- if (($ext_id > 0) && ($task_found == 1)) {
- // ID is valid so begin with registration, we first want to it's real name from task management (subject column)
- $result = SQL_QUERY_ESC("SELECT subject FROM `{!_MYSQL_PREFIX!}_task_system` WHERE `id`=%s LIMIT 1",
- array(bigintval($ext_id)), __FILE__, __LINE__);
- list($subj) = SQL_FETCHROW($result);
+ // Free result
SQL_FREERESULT($result);
- // Disable cache update by default
- $cache_update = 0;
- if (!empty($subj)) {
- // Extract extension's name from subject...
- $ext_name = trim(substr($subj, 1, strpos($subj, ':') - 1));
-
- // Test the extension for deprecation
- LOAD_EXTENSION($ext_name, 'test');
-
- // Is the extension deprecated?
- if (EXT_GET_DEPRECATED() == 'N') {
- // ... so we can finally register and load it in registration mode
- if (REGISTER_EXTENSION($ext_name, $ext_id)) {
- // Extension was found and successfully registered
- LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_EXTENSION_REGISTERED'));
-
- // Show next link
- if (EXT_IS_ACTIVE('task')) {
- LOAD_TEMPLATE('admin_next_link', false, array(
+ // Is the ID number valid and the task was found?
+ if (($ext_id > 0) && ($task_found == 1)) {
+ // ID is valid so begin with registration, we first want to it's real name from task management (subject column)
+ $result = SQL_QUERY_ESC("SELECT subject FROM `{!_MYSQL_PREFIX!}_task_system` WHERE `id`=%s LIMIT 1",
+ array(bigintval($ext_id)), __FILE__, __LINE__);
+ list($subj) = SQL_FETCHROW($result);
+ SQL_FREERESULT($result);
+
+ // Disable cache update by default
+ $cache_update = 0;
+ if (!empty($subj)) {
+ // Extract extension's name from subject...
+ $ext_name = trim(substr($subj, 1, strpos($subj, ':') - 1));
+
+ // Test the extension for deprecation
+ LOAD_EXTENSION($ext_name, 'test');
+
+ // Is the extension deprecated?
+ if (EXT_GET_DEPRECATED() == 'N') {
+ // ... so we can finally register and load it in registration mode
+ if (REGISTER_EXTENSION($ext_name, $ext_id)) {
+ // Extension was found and successfully registered
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_EXTENSION_REGISTERED'));
+
+ // Show next link
+ if (EXT_IS_ACTIVE('task')) {
+ LOAD_TEMPLATE('admin_next_link', false, array(
'url' => 'modules.php?module=admin&what=list_task',
'title' => getMessage('ADMIN_EXT_REGISTER_NEXT_LINK')
- ));
- } else {
- LOAD_TEMPLATE('admin_next_link', false, array(
+ ));
+ } else {
+ LOAD_TEMPLATE('admin_next_link', false, array(
'url' => 'modules.php?module=admin',
'title' => getMessage('ADMIN_EXT_REGISTER_NEXT_LINK')
- ));
+ ));
+ }
+
+ // Do we need to update cache file?
+ // @TODO Rewrite this to a filter
+ if ((EXT_IS_ACTIVE('cache')) && ($GLOBALS['cache_mode'] != 'no')) {
+ // Remove cache file (will be auto-created again!)
+ if ($GLOBALS['cache_instance']->loadCacheFile('config')) $GLOBALS['cache_instance']->destroyCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile('extensions', true)) $GLOBALS['cache_instance']->destroyCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile('modreg')) $GLOBALS['cache_instance']->destroyCacheFile();
+ } // END - if
+ } elseif (GET_EXT_VERSION($ext_name) != '') {
+ // Notify the admin that we have a problem here...
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_ALREADY'));
+ } else {
+ // Notify the admin that we have a problem here...
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_REG_FAILED_404'), $ext_name));
}
-
- // Do we need to update cache file?
- // @TODO Rewrite this to a filter
- if ((EXT_IS_ACTIVE('cache')) && ($GLOBALS['cache_mode'] != 'no')) {
- // Remove cache file (will be auto-created again!)
- if ($GLOBALS['cache_instance']->loadCacheFile('config')) $GLOBALS['cache_instance']->destroyCacheFile();
- if ($GLOBALS['cache_instance']->loadCacheFile('extensions', true)) $GLOBALS['cache_instance']->destroyCacheFile();
- if ($GLOBALS['cache_instance']->loadCacheFile('modreg')) $GLOBALS['cache_instance']->destroyCacheFile();
- } // END - if
- } elseif (GET_EXT_VERSION($ext_name) != '') {
- // Notify the admin that we have a problem here...
- LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_ALREADY'));
} else {
- // Notify the admin that we have a problem here...
- LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_REG_FAILED_404'), $ext_name));
+ // Motify the admin that we have a problem here...
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_DEPRECATED'));
}
} else {
- // Motify the admin that we have a problem here...
- LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_DEPRECATED'));
+ // Extension was not found in task management
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_ID_404'));
}
+ } elseif ($task_found == '0') {
+ // No longer assigned or old task
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_ASSIGED'));
} else {
- // Extension was not found in task management
- LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_ID_404'));
+ // ID is invalid
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_INVALID'));
}
- } elseif ($task_found == '0') {
- // No longer assigned or old task
- LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_ASSIGED'));
- } else {
- // ID is invalid
- LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_INVALID'));
- }
- break;
+ break;
-case 'demo':
- LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_NOT_SAVED'));
- break;
+ case 'demo':
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_NOT_SAVED'));
+ break;
}
//
?>
$result = SQL_QUERY_ESC("SELECT what, title, sort
FROM `{!_MYSQL_PREFIX!}_guest_menu`
WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
- array($value_main), __FILE__, __LINE__);
+ array($value_main), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Initialize arrays
$menus[$value_main] = array();
// Insert new menu entry
if (REQUEST_ISSET_POST(('menu'))) {
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('%s','%s','%s','%s','%s','%s')",
- array(
- REQUEST_POST('menu'),
- REQUEST_POST('name'),
- REQUEST_POST('title'),
- bigintval(REQUEST_POST('sort')),
- REQUEST_POST('visible'),
- REQUEST_POST('active'),
-), __FILE__, __LINE__);
+ array(
+ REQUEST_POST('menu'),
+ REQUEST_POST('name'),
+ REQUEST_POST('title'),
+ bigintval(REQUEST_POST('sort')),
+ REQUEST_POST('visible'),
+ REQUEST_POST('active'),
+ ), __FILE__, __LINE__);
} else {
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (action, title, sort, visible, locked) VALUES ('%s','%s','%s','%s','%s')",
- array(
- REQUEST_POST('name'),
- REQUEST_POST('title'),
- bigintval(REQUEST_POST('sort')),
- REQUEST_POST('visible'),
- REQUEST_POST('active'),
-), __FILE__, __LINE__);
+ array(
+ REQUEST_POST('name'),
+ REQUEST_POST('title'),
+ bigintval(REQUEST_POST('sort')),
+ REQUEST_POST('visible'),
+ REQUEST_POST('active'),
+ ), __FILE__, __LINE__);
}
LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
} else {
{
$cnt++;
$result = SQL_QUERY_ESC("SELECT title, action, what FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE ".$AND." AND id=%s LIMIT 1",
- array(bigintval($sel)), __FILE__, __LINE__);
+ array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1)
{
// Entry found so we load the stuff...
);
$OUT .= LOAD_TEMPLATE("admin_gmenu_edit_row", true, $DATA);
}
- else
+ else
{
// Entry not found?
$content = array(
if ($confirm == 1) {
$cnt++;
$result = SQL_QUERY_ESC("SELECT title FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE ".$AND." AND id=%s LIMIT 1",
- array(bigintval($sel)), __FILE__, __LINE__);
+ array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Entry found so we load the stuff...
list($menu) = SQL_FETCHROW($result);
// An action is done...
switch (REQUEST_POST('ok'))
{
- case 'edit': // Edit menu
- foreach (REQUEST_POST('sel') as $sel => $menu) {
- // Secure selector
- $sel = bigintval($sel);
+ case 'edit': // Edit menu
+ foreach (REQUEST_POST('sel') as $sel => $menu) {
+ // Secure selector
+ $sel = bigintval($sel);
- // Update entry
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `title`='%s', `action`='%s', `what`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+ // Update entry
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `title`='%s', `action`='%s', `what`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
array($menu, REQUEST_POST('sel_action', $sel), REQUEST_POST('sel_what', $sel), $sel),__FILE__, __LINE__);
- }
- LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
- break;
+ }
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
+ break;
- case 'del': // Delete menu
- foreach (REQUEST_POST('sel') as $sel => $menu) {
- // Delete enty
- SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE ".$AND." AND id=%s LIMIT 1",
+ case 'del': // Delete menu
+ foreach (REQUEST_POST('sel') as $sel => $menu) {
+ // Delete enty
+ SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE ".$AND." AND id=%s LIMIT 1",
array(bigintval($sel)), __FILE__, __LINE__);
- }
- LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
- break;
+ }
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
+ break;
- case 'status': // Change access levels
- foreach (REQUEST_POST('sel') as $sel => $menu) {
- // Secure selector
- $sel = bigintval($sel);
+ case 'status': // Change access levels
+ foreach (REQUEST_POST('sel') as $sel => $menu) {
+ // Secure selector
+ $sel = bigintval($sel);
- // Update entry
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='%s', `locked`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+ // Update entry
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='%s', `locked`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
array(REQUEST_POST('visible', $sel), REQUEST_POST('locked', $sel), $sel), __FILE__, __LINE__);
- }
- LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
- break;
+ }
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
+ break;
- default: // Unexpected action
- define('__OK_VALUE', REQUEST_POST('ok'));
- DEBUG_LOG(__FILE__, __LINE__, sprintf("Unsupported action %s detected.", REQUEST_POST('ok')));
- LOAD_TEMPLATE("admin_menu_unknown_okay");
- break;
+ default: // Unexpected action
+ define('__OK_VALUE', REQUEST_POST('ok'));
+ DEBUG_LOG(__FILE__, __LINE__, sprintf("Unsupported action %s detected.", REQUEST_POST('ok')));
+ LOAD_TEMPLATE("admin_menu_unknown_okay");
+ break;
}
} elseif ((REQUEST_ISSET_POST(('status'))) && ($chk > 0) && (!IS_DEMO())) {
// Change status (visible / locked)
{
$cnt++;
$result = SQL_QUERY_ESC("SELECT title, visible, locked FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE ".$AND." AND id=%s LIMIT 1",
- array(bigintval($sel)), __FILE__, __LINE__);
+ array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1)
{
// Entry found so we load the stuff...
// Load template
$OUT .= LOAD_TEMPLATE("admin_menu_status_row", true, $content);
}
- else
+ else
{
// Entry not found?
$content = array(
if (REQUEST_ISSET_GET(('w'))) {
// Sub menus selected
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1",
- array(REQUEST_GET('act'), bigintval(REQUEST_GET('tid'))), __FILE__, __LINE__);
+ array(REQUEST_GET('act'), bigintval(REQUEST_GET('tid'))), __FILE__, __LINE__);
list($tid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1",
- array(REQUEST_GET('act'), bigintval(REQUEST_GET('fid'))), __FILE__, __LINE__);
+ array(REQUEST_GET('act'), bigintval(REQUEST_GET('fid'))), __FILE__, __LINE__);
list($fid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
} else {
// Main menu selected
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE (`what`='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1",
- array(bigintval(REQUEST_GET('tid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('tid'))), __FILE__, __LINE__);
list($tid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE (`what`='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1",
- array(bigintval(REQUEST_GET('fid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('fid'))), __FILE__, __LINE__);
list($fid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
}
if ((!empty($tid)) && (!empty($fid))) {
// Sort menu
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
- array(bigintval(REQUEST_GET('tid')), bigintval($fid)), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('tid')), bigintval($fid)), __FILE__, __LINE__);
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
- array(bigintval(REQUEST_GET('fid')), bigintval($tid)), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('fid')), bigintval($tid)), __FILE__, __LINE__);
} // END - if
} // END - if
} else {
// List sub menus
$result = SQL_QUERY_ESC("SELECT `id`,`action`,`what`,`title`,`sort` FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort` ASC",
- array($SUB), __FILE__, __LINE__);
+ array($SUB), __FILE__, __LINE__);
}
// Get number of menu entries
'title' => $content['title'],
'navi' => $NAVI,
'mode' => 'guest'
- );
- $OUT .= LOAD_TEMPLATE("admin_menu_overview_row", true, $content);
- $SW = 3 - $SW;
+ );
+ $OUT .= LOAD_TEMPLATE("admin_menu_overview_row", true, $content);
+ $SW = 3 - $SW;
}
// Free memory
WHERE d.`status`='CONFIRMED' AND d.joined < (UNIX_TIMESTAMP() - %s) AND d.last_online < (UNIX_TIMESTAMP() - %s) AND d.ap_notified < (UNIX_TIMESTAMP() - %s)
".$EXCLUDE_LIST."
ORDER BY d.userid",
- array(
- getConfig('ap_inactive_since'),
- getConfig('ap_inactive_since'),
- getConfig('ap_inactive_since')
- ), __FILE__, __LINE__);
+array(
+getConfig('ap_inactive_since'),
+getConfig('ap_inactive_since'),
+getConfig('ap_inactive_since')
+), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Ok, we have found some inactive accounts
} elseif (REQUEST_ISSET_POST('edit')) {
// Delete entries (with confirmation)
ADMIN_EDIT_ENTRIES_CONFIRM(
- REQUEST_POST('id'),
+ REQUEST_POST('id'),
'bank_packages',
- array('id', 'title', 'description', 'account_fee', 'free_transfers', 'transfer_fee', 'output_system_mode', 'package_active', 'free_months_no_fee', 'interest_plus', 'interest_minus', 'first_payment', 'free_account_income', 'free_account_stuff', 'tan_lock'),
- array('bigintval', '', '', 'translateComma', 'bigintval', 'translateComma', '', '', 'bigintval', 'translateComma', 'translateComma', 'translateComma', 'translateComma', '', 'bigintval'),
- array('', '', '', '', '', '', '', '', '', '', '', '', '', '', '')
+ array('id', 'title', 'description', 'account_fee', 'free_transfers', 'transfer_fee', 'output_system_mode', 'package_active', 'free_months_no_fee', 'interest_plus', 'interest_minus', 'first_payment', 'free_account_income', 'free_account_stuff', 'tan_lock'),
+ array('bigintval', '', '', 'translateComma', 'bigintval', 'translateComma', '', '', 'bigintval', 'translateComma', 'translateComma', 'translateComma', 'translateComma', '', 'bigintval'),
+ array('', '', '', '', '', '', '', '', '', '', '', '', '', '', '')
);
$show = false;
} elseif (REQUEST_ISSET_POST(('do_edit'))) {
FROM `{!_MYSQL_PREFIX!}_user_data`
WHERE `status`='CONFIRMED' AND beg_points > 0".$lastOnline."
ORDER BY beg_points DESC, last_online DESC, userid",
- array($ONLINE), __FILE__, __LINE__);
+ array($ONLINE), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// List users
FROM `{!_MYSQL_PREFIX!}_user_data`
WHERE `status`='CONFIRMED' AND ".$USE." > 0".$lastOnline."
ORDER BY points DESC, last_online DESC, userid",
- array($ONLINE), __FILE__, __LINE__);
+ array($ONLINE), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// List users
if (REQUEST_ISSET_GET('uid')) {
// Check if the user already exists
$result = SQL_QUERY_ESC("SELECT surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Loads surname, family's name and the email address
list($sname, $fname, $email) = SQL_FETCHROW($result);
while ($content = SQL_FETCHARRAY($result_cats)) {
// Check user's selection
$result_user = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_cats` WHERE userid=%s AND cat_id=%s LIMIT 1",
- array(bigintval(REQUEST_GET('uid')), bigintval($content['id'])), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('uid')), bigintval($content['id'])), __FILE__, __LINE__);
// Set selection
$selection = "<font color=\"#ee0000\">{--NO--}</div>";
if ((REQUEST_ISSET_POST(('add'))) && (REQUEST_ISSET_POST(('code'))) && (REQUEST_ISSET_POST(('descr')))) {
// Check if country code does already exist
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_countries` WHERE code='%s' LIMIT 1",
- array(strtoupper(REQUEST_POST('code'))), __FILE__, __LINE__);
+ array(strtoupper(REQUEST_POST('code'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 0) {
// Save entry
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_countries` (code, descr, is_active) VALUES ('%s','%s','%s')",
- array(
- strtoupper(substr(REQUEST_POST('code'), 0, 2)),
- REQUEST_POST('descr'),
- REQUEST_POST('is_active')
- ), __FILE__, __LINE__);
+ array(
+ strtoupper(substr(REQUEST_POST('code'), 0, 2)),
+ REQUEST_POST('descr'),
+ REQUEST_POST('is_active')
+ ), __FILE__, __LINE__);
// Country added
$message = sprintf(getMessage('ADMIN_COUNTRY_ADDED'), strtoupper(REQUEST_POST('descr')));
foreach (REQUEST_POST('id') as $id => $status) {
// Load data from DB
$result = SQL_QUERY_ESC("SELECT code, descr FROM `{!_MYSQL_PREFIX!}_countries` WHERE `id`=%s LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__);
+ array(bigintval($id)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load data
list($code, $descr) = SQL_FETCHROW($result);
// Load currenty setup country codes to list
$result = SQL_QUERY('SELECT id, code, descr, is_active FROM `{!_MYSQL_PREFIX!}_countries` ORDER BY code',
- __FILE__, __LINE__);
+ __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// List all countries
$OUT = ''; $SW = 2;
// Load data for the template
switch (REQUEST_GET('mode'))
{
-case "already": // Already payed out points
- break;
+ case "already": // Already payed out points
+ break;
-case "overview": // General overview page
- $SUM_ALREADY = 0; $SUM_WAITING = 0;
- // Number of direct already payouts and referal
- $result = SQL_QUERY("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_doubler` WHERE completed='Y' AND is_ref='N'", __FILE__, __LINE__);
- list($cnt) = SQL_FETCHROW($result);
- SQL_FREERESULT($result);
+ case "overview": // General overview page
+ $SUM_ALREADY = 0; $SUM_WAITING = 0;
+ // Number of direct already payouts and referal
+ $result = SQL_QUERY("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_doubler` WHERE completed='Y' AND is_ref='N'", __FILE__, __LINE__);
+ list($cnt) = SQL_FETCHROW($result);
+ SQL_FREERESULT($result);
- if ((empty($cnt)) || ($cnt == '0'))
- {
- // Nothing payed out so far
- define('__DOUBLER_ALREADY_DIRECT_LINK', '0');
- }
+ if ((empty($cnt)) || ($cnt == '0'))
+ {
+ // Nothing payed out so far
+ define('__DOUBLER_ALREADY_DIRECT_LINK', '0');
+ }
else
- {
- // Something was payed out
- $SUM_ALREADY += $cnt;
- define('__DOUBLER_ALREADY_DIRECT_LINK', "<a href=\"{!URL!}/modules.php?module=admin&what=list_doubler&mode=already&select=direct\">".$cnt."</a>");
- }
- $result = SQL_QUERY("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_doubler` WHERE completed='Y' AND is_ref='Y'", __FILE__, __LINE__);
- list($cnt) = SQL_FETCHROW($result);
- SQL_FREERESULT($result);
+ {
+ // Something was payed out
+ $SUM_ALREADY += $cnt;
+ define('__DOUBLER_ALREADY_DIRECT_LINK', "<a href=\"{!URL!}/modules.php?module=admin&what=list_doubler&mode=already&select=direct\">".$cnt."</a>");
+ }
+ $result = SQL_QUERY("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_doubler` WHERE completed='Y' AND is_ref='Y'", __FILE__, __LINE__);
+ list($cnt) = SQL_FETCHROW($result);
+ SQL_FREERESULT($result);
- if ((empty($cnt)) || ($cnt == '0'))
- {
- // Nothing payed out so far
- define('__DOUBLER_ALREADY_REF_LINK', '0');
- }
+ if ((empty($cnt)) || ($cnt == '0'))
+ {
+ // Nothing payed out so far
+ define('__DOUBLER_ALREADY_REF_LINK', '0');
+ }
else
- {
- // Something was payed out
- $SUM_ALREADY += $cnt;
- define('__DOUBLER_ALREADY_REF_LINK', "<a href=\"{!URL!}/modules.php?module=admin&what=list_doubler&mode=already&select=ref\">".$cnt."</a>");
- }
- define('__DOUBLER_ALREADY_ALL_LINK', "<a href=\"{!URL!}/modules.php?module=admin&what=list_doubler&mode=already&select=all\">".$SUM_ALREADY."</a>");
+ {
+ // Something was payed out
+ $SUM_ALREADY += $cnt;
+ define('__DOUBLER_ALREADY_REF_LINK', "<a href=\"{!URL!}/modules.php?module=admin&what=list_doubler&mode=already&select=ref\">".$cnt."</a>");
+ }
+ define('__DOUBLER_ALREADY_ALL_LINK', "<a href=\"{!URL!}/modules.php?module=admin&what=list_doubler&mode=already&select=all\">".$SUM_ALREADY."</a>");
- // And the same for waiting pouts (direct and referal)
- $result = SQL_QUERY("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_doubler` WHERE completed='N' AND is_ref='N'", __FILE__, __LINE__);
- list($cnt) = SQL_FETCHROW($result);
- SQL_FREERESULT($result);
+ // And the same for waiting pouts (direct and referal)
+ $result = SQL_QUERY("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_doubler` WHERE completed='N' AND is_ref='N'", __FILE__, __LINE__);
+ list($cnt) = SQL_FETCHROW($result);
+ SQL_FREERESULT($result);
- if ((empty($cnt)) || ($cnt == '0'))
- {
- // Nothing payed out so far
- define('__DOUBLER_WAITING_DIRECT_LINK', '0');
- }
+ if ((empty($cnt)) || ($cnt == '0'))
+ {
+ // Nothing payed out so far
+ define('__DOUBLER_WAITING_DIRECT_LINK', '0');
+ }
else
- {
- // Something was payed out
- $SUM_WAITING += $cnt;
- define('__DOUBLER_WAITING_DIRECT_LINK', "<a href=\"{!URL!}/modules.php?module=admin&what=list_doubler&mode=waiting&select=direct\">".$cnt."</a>");
- }
- $result = SQL_QUERY("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_doubler` WHERE completed='N' AND is_ref='Y'", __FILE__, __LINE__);
- list($cnt) = SQL_FETCHROW($result);
- SQL_FREERESULT($result);
+ {
+ // Something was payed out
+ $SUM_WAITING += $cnt;
+ define('__DOUBLER_WAITING_DIRECT_LINK', "<a href=\"{!URL!}/modules.php?module=admin&what=list_doubler&mode=waiting&select=direct\">".$cnt."</a>");
+ }
+ $result = SQL_QUERY("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_doubler` WHERE completed='N' AND is_ref='Y'", __FILE__, __LINE__);
+ list($cnt) = SQL_FETCHROW($result);
+ SQL_FREERESULT($result);
- if ((empty($cnt)) || ($cnt == '0'))
- {
- // Nothing payed out so far
- define('__DOUBLER_WAITING_REF_LINK', '0');
- }
+ if ((empty($cnt)) || ($cnt == '0'))
+ {
+ // Nothing payed out so far
+ define('__DOUBLER_WAITING_REF_LINK', '0');
+ }
else
- {
- // Something was payed out
- $SUM_WAITING += $cnt;
- define('__DOUBLER_WAITING_REF_LINK', "<a href=\"{!URL!}/modules.php?module=admin&what=list_doubler&mode=waiting&select=ref\">".$cnt."</a>");
- }
- define('__DOUBLER_WAITING_ALL_LINK', "<a href=\"{!URL!}/modules.php?module=admin&what=list_doubler&mode=waiting&select=all\">".$SUM_WAITING."</a>");
+ {
+ // Something was payed out
+ $SUM_WAITING += $cnt;
+ define('__DOUBLER_WAITING_REF_LINK', "<a href=\"{!URL!}/modules.php?module=admin&what=list_doubler&mode=waiting&select=ref\">".$cnt."</a>");
+ }
+ define('__DOUBLER_WAITING_ALL_LINK', "<a href=\"{!URL!}/modules.php?module=admin&what=list_doubler&mode=waiting&select=all\">".$SUM_WAITING."</a>");
- // All data is loaded here...
- break;
+ // All data is loaded here...
+ break;
}
// Load mode template
if (REQUEST_ISSET_GET('uid')) {
// Check if the user already exists
$result = SQL_QUERY_ESC("SELECT surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
- // Is there an entry?
+ // Is there an entry?
if (SQL_NUMROWS($result) == 1) {
// Loads surname, family's name and the email address
list($sname, $fname, $email) = SQL_FETCHROW($result);
if (EXT_IS_ACTIVE('bonus')) {
// Load bonus ID
$result = SQL_QUERY_ESC("SELECT stats_id, bonus_id, link_type FROM `{!_MYSQL_PREFIX!}_user_links` WHERE userid=%s ORDER BY `id`",
- array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
} else {
// Load stats ID (2nd will be ignored later! But it is needed for the same fetchrow command)
$result = SQL_QUERY_ESC("SELECT stats_id, stats_id, link_type FROM `{!_MYSQL_PREFIX!}_user_links` WHERE userid=%s ORDER BY `id`",
- array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
}
// Get number of rows from the query
if (REQUEST_GET('del') == "all") {
// Delete all unconfirmed mails by this user
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_links` WHERE userid=%s LIMIT %s",
- array(bigintval(REQUEST_GET('uid')), $nums), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('uid')), $nums), __FILE__, __LINE__);
// Prepare mail and send it away
$msg = LOAD_EMAIL_TEMPLATE("admin-del_links", $nums, bigintval(REQUEST_GET('uid')));
// Load data from stats table...
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",
+ 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;
+ $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":
- $result_data = SQL_QUERY_ESC("SELECT subject, timestamp, cat_id FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
+ 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');
- $LINK = "<a href=\"{!URL!}/mailid.php?uid=".REQUEST_GET('uid')."&bonusid=".$id2."\" target=\"_blank\">".$id2."</a>";
- break;
-
- default: // Problem in application detected!
- // Log the error
- DEBUG_LOG(__FILE__, __LINE__, sprintf("Invalid email type %s detected.", $type));
- break;
+ $type = 'bonusid'; $DATA = $id2; $PROBLEM = getMessage('BONUS_MAIL_PROBLEM');
+ $LINK = "<a href=\"{!URL!}/mailid.php?uid=".REQUEST_GET('uid')."&bonusid=".$id2."\" target=\"_blank\">".$id2."</a>";
+ break;
+
+ default: // Problem in application detected!
+ // Log the error
+ DEBUG_LOG(__FILE__, __LINE__, sprintf("Invalid email type %s detected.", $type));
+ break;
}
if (SQL_NUMROWS($result_data) == 1) {
} else {
// Load template for error
$OUT .= LOAD_TEMPLATE("admin_list_links_problem",
- array(
+ array(
'sw' => $SW,
'problem' => $PROBLEM,
'data' => $DATA
- )
+ )
);
}
$SW = 3 - $SW;
// Update database...
// First user's account
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET nl_until=(UNIX_TIMESTAMP() + nl_timespan), nl_receive='N', nl_timespan=0 WHERE userid=%s LIMIT 1",
- array(bigintval(REQUEST_POST('uid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_POST('uid'))), __FILE__, __LINE__);
// Next the task system...
runFilterChain('solve_task', bigintval(REQUEST_POST('id')));
if (REQUEST_ISSET_GET(('pid'))) {
// First let's get the member's ID
$result = SQL_QUERY_ESC("SELECT userid, target_account, payout_total, payout_timestamp, password FROM `{!_MYSQL_PREFIX!}_user_payouts` WHERE `id`=%s LIMIT 1",
- array(REQUEST_GET('pid')), __FILE__, __LINE__);
+ array(REQUEST_GET('pid')), __FILE__, __LINE__);
list($uid, $tuid, $points, $tstamp, $tpass) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
if (!REQUEST_ISSET_GET(('task')) && (!empty($uid)) && ($uid > 0)) {
// Get task ID from database
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_task_system` WHERE userid=%s AND `task_type`='PAYOUT_REQUEST' AND task_created='".$tstamp."' LIMIT 1",
- array(bigintval($uid)), __FILE__, __LINE__);
+ array(bigintval($uid)), __FILE__, __LINE__);
list($task) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
if (empty($task)) $task = 0;
if ((!empty($task)) && (!empty($uid)) && ($uid > 0)) {
// Load user's data
$result = SQL_QUERY_ESC("SELECT email, gender, surname, family FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(bigintval($uid)), __FILE__, __LINE__);
+ array(bigintval($uid)), __FILE__, __LINE__);
list($email, $gender, $surname, $family) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
if (IS_FORM_SENT()) {
// Obtain payout type and other data
$result = SQL_QUERY_ESC("SELECT payout_id FROM `{!_MYSQL_PREFIX!}_user_payouts` WHERE `id`=%s LIMIT 1",
- array(bigintval(REQUEST_GET('pid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('pid'))), __FILE__, __LINE__);
list($ptype) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
if (!empty($ptype)) {
// Obtain data from payout type
$result = SQL_QUERY_ESC("SELECT from_account, from_pass, engine_url, engine_ret_ok, engine_ret_failed, pass_enc, allow_url FROM `{!_MYSQL_PREFIX!}_payout_types` WHERE `id`=%s LIMIT 1",
- array(bigintval($ptype)), __FILE__, __LINE__);
+ array(bigintval($ptype)), __FILE__, __LINE__);
list($fuid, $fpass, $eurl, $eok, $failed, $eenc, $allow) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
$eurl = COMPILE_CODE($eurl);
switch ($eenc)
{
- case "md5":
- $fpass = md5($fpass);
- $tpass = md5($tpass);
- break;
-
- case "base64":
- $fpass = base64_encode($fpass);
- $tpass = base64_encode($tpass);
- break;
+ case "md5":
+ $fpass = md5($fpass);
+ $tpass = md5($tpass);
+ break;
+
+ case "base64":
+ $fpass = base64_encode($fpass);
+ $tpass = base64_encode($tpass);
+ break;
}
// Transfer variables...
// Clear payout request
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_payouts` SET `status`='ACCEPTED' WHERE `id`=%s LIMIT 1",
- array(bigintval(REQUEST_GET('pid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('pid'))), __FILE__, __LINE__);
// Send out mail
$msg = LOAD_EMAIL_TEMPLATE("member_payout_accepted", REQUEST_POST('text'), $uid);
// Clear payout request
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_payouts` SET `status`='REJECTED' WHERE `id`=%s LIMIT 1",
- array(bigintval(REQUEST_GET('pid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('pid'))), __FILE__, __LINE__);
// Send out mail
$msg = LOAD_EMAIL_TEMPLATE("member_payout_rejected", REQUEST_POST('text'), $uid);
} else {
// Prepare content
$content = array(
- 'task' => $task
+ 'task' => $task,
'pid' => bigintval(REQUEST_GET('pid'))
);
// Check for entries
$result = SQL_QUERY("SELECT id, userid, primera_account, primera_amount, primera_timestamp, primera_type, primera_api_message, primera_api_status FROM `{!_MYSQL_PREFIX!}_user_primera` ORDER BY primera_timestamp DESC, id DESC",
- __FILE__, __LINE__);
+__FILE__, __LINE__);
// Are there some entries to display?
if (SQL_NUMROWS($result) > 0) {
// Activate / deactivate
switch (REQUEST_GET('activate'))
{
- case '1': // Activate
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET is_active='Y' WHERE `id`=%s AND is_active='N' LIMIT 1");
- break;
+ case '1': // Activate
+ ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET is_active='Y' WHERE `id`=%s AND is_active='N' LIMIT 1");
+ break;
- case '0': // Deactivate
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET is_active='N' WHERE `id`=%s AND is_active='Y' LIMIT 1");
- break;
+ case '0': // Deactivate
+ ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET is_active='N' WHERE `id`=%s AND is_active='Y' LIMIT 1");
+ break;
}
} elseif (REQUEST_ISSET_GET(('notify'))) {
// Automatic notification
switch (REQUEST_GET('notify'))
{
- case '1': // Activate
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET send_notify='Y' WHERE `id`=%s AND send_notify='N' LIMIT 1");
- break;
+ case '1': // Activate
+ ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET send_notify='Y' WHERE `id`=%s AND send_notify='N' LIMIT 1");
+ break;
- case '0': // Deactivate
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET send_notify='N' WHERE `id`=%s AND send_notify='Y' LIMIT 1");
- break;
+ case '0': // Deactivate
+ ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET send_notify='N' WHERE `id`=%s AND send_notify='Y' LIMIT 1");
+ break;
}
} elseif (REQUEST_ISSET_GET(('auto'))) {
// Automatic adding of new members
switch (REQUEST_GET('auto'))
{
- case '1': // Activate
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET auto_add_new_user='Y' WHERE `id`=%s AND auto_add_new_user='N' LIMIT 1");
- break;
+ case '1': // Activate
+ ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET auto_add_new_user='Y' WHERE `id`=%s AND auto_add_new_user='N' LIMIT 1");
+ break;
- case '0': // Deactivate
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET auto_add_new_user='N' WHERE `id`=%s AND auto_add_new_user='Y' LIMIT 1");
- break;
+ case '0': // Deactivate
+ ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET auto_add_new_user='N' WHERE `id`=%s AND auto_add_new_user='Y' LIMIT 1");
+ break;
}
}
foreach (REQUEST_POST('sel') as $id => $selected) {
// Remove selected rallye entirely...
ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_rallye_data` WHERE `id`=%s LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__, false));
+ array(bigintval($id)), __FILE__, __LINE__, false));
ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id=%s",
- array(bigintval($id)), __FILE__, __LINE__, false));
+ array(bigintval($id)), __FILE__, __LINE__, false));
ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_rallye_users` WHERE rallye_id=%s",
- array(bigintval($id)), __FILE__, __LINE__, false));
+ array(bigintval($id)), __FILE__, __LINE__, false));
} // END - foreach
// Run SQLS
min_users='%s',
min_prices='%s'
WHERE `id`='".$id."' LIMIT 1",
- array(
- $title,
- REQUEST_POST('descr', $id),
- REQUEST_POST('templ', $id),
- bigintval($START),
- bigintval($END),
- bigintval(REQUEST_POST('min_users', $id)),
- bigintval(REQUEST_POST('min_prices', $id)),
- $id
- ), __FILE__, __LINE__, false));
+ array(
+ $title,
+ REQUEST_POST('descr', $id),
+ REQUEST_POST('templ', $id),
+ bigintval($START),
+ bigintval($END),
+ bigintval(REQUEST_POST('min_users', $id)),
+ bigintval(REQUEST_POST('min_prices', $id)),
+ $id
+ ), __FILE__, __LINE__, false));
}
// Run SQLS
FROM `{!_MYSQL_PREFIX!}_rallye_data`
WHERE `id`=%s
LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__);
+ array(bigintval($id)), __FILE__, __LINE__);
// Fetch an array
$content = SQL_FETCHARRAY($result);
} elseif ((REQUEST_GET('sub') == 'users') && (REQUEST_GET('rallye') > 0)) {
// List users and their refs before start and current
$result = SQL_QUERY_ESC("SELECT userid, refs, curr_points FROM `{!_MYSQL_PREFIX!}_rallye_users` WHERE rallye_id=%s ORDER BY `userid` ASC",
- array(bigintval(REQUEST_GET('rallye'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('rallye'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
$OUT = ''; $SW = 2;
// @TODO Rewrite this constant
$result = SQL_QUERY("SELECT id, admin_id, title, descr, template, start_time, end_time, auto_add_new_user, is_active, send_notify, notified, min_users, min_prices
FROM `{!_MYSQL_PREFIX!}_rallye_data`
ORDER BY start_time DESC",
- __FILE__, __LINE__);
+ __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// List found rallyes
$OUT = ''; $SW = 2;
// Is the rallye active or not?
switch ($content['is_active'])
{
- case 'Y':
- // Rallye is active so do not edit it!
- $content['select'] = "<div class=\"big\">".$content['id']."</div>";
- $content['active_title'] = getMessage('RALLYE_DEACTIVATE_NOW');
- $content['active'] = 0;
- break;
-
- case 'N':
- $content['active_title'] = getMessage('RALLYE_ACTIVATE_NOW');
- $content['active'] = '1';
- break;
+ case 'Y':
+ // Rallye is active so do not edit it!
+ $content['select'] = "<div class=\"big\">".$content['id']."</div>";
+ $content['active_title'] = getMessage('RALLYE_DEACTIVATE_NOW');
+ $content['active'] = 0;
+ break;
+
+ case 'N':
+ $content['active_title'] = getMessage('RALLYE_ACTIVATE_NOW');
+ $content['active'] = '1';
+ break;
}
// Notification to members?
switch ($content['send_notify'])
{
- case 'Y':
- $content['notify_title'] = getMessage('RALLYE_STOP_NOTIFY_NOW');
- $content['notify'] = 0;
- break;
-
- case 'N':
- $content['notify_title'] = getMessage('RALLYE_START_NOTIFY_NOW');
- $content['notify'] = '1';
- break;
+ case 'Y':
+ $content['notify_title'] = getMessage('RALLYE_STOP_NOTIFY_NOW');
+ $content['notify'] = 0;
+ break;
+
+ case 'N':
+ $content['notify_title'] = getMessage('RALLYE_START_NOTIFY_NOW');
+ $content['notify'] = '1';
+ break;
}
// Auto-add of new joined members?
switch ($content['auto_add_new_user'])
{
- case 'Y':
- $content['auto_title'] = getMessage('RALLYE_STOP_AUTO_ADD_NOW');
- $content['auto'] = 0;
- break;
-
- case 'N':
- $content['auto_title'] = getMessage('RALLYE_START_AUTO_ADD_NOW');
- $content['auto'] = '1';
- break;
+ case 'Y':
+ $content['auto_title'] = getMessage('RALLYE_STOP_AUTO_ADD_NOW');
+ $content['auto'] = 0;
+ break;
+
+ case 'N':
+ $content['auto_title'] = getMessage('RALLYE_START_AUTO_ADD_NOW');
+ $content['auto'] = '1';
+ break;
}
// Output row
// Check if the user already exists
$result_user = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array($uid), __FILE__, __LINE__);
+ array($uid), __FILE__, __LINE__);
// User found?
if (SQL_NUMROWS($result_user) == 1) {
} else {
// Loads surname, family's name and the email address
$result = SQL_QUERY_ESC("SELECT COUNT(*) FROM `{!_MYSQL_PREFIX!}_user_data` WHERE refid=%s",
- array($uid), __FILE__, __LINE__);
+ array($uid), __FILE__, __LINE__);
$result_lck = SQL_QUERY_ESC("SELECT COUNT(*) FROM `{!_MYSQL_PREFIX!}_user_data` WHERE refid=%s AND status != 'CONFIRMED' ORDER BY `userid` ASC",
- array($uid), __FILE__, __LINE__);
+ array($uid), __FILE__, __LINE__);
$menge = SQL_RESULT($result , 0, 0);
$menge_lck = SQL_RESULT($result_lck, 0, 0);
// Query for refs
$result_levels = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email, status, joined FROM `{!_MYSQL_PREFIX!}_user_data` WHERE refid=%s ORDER BY userid ASC",
- array($uid), __FILE__, __LINE__);
+ array($uid), __FILE__, __LINE__);
// Output info message
LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), generateUserProfileLink(REQUEST_GET('uid')), $menge, $menge_lck));
if (EXT_IS_ACTIVE('refback')) {
// Load all refs of this user
$result_refs = SQL_QUERY_ESC("SELECT refid FROM `{!_MYSQL_PREFIX!}_user_refs` WHERE userid=%s AND level='%s' ORDER BY refid ASC",
- array($uid, $levels['level']), __FILE__, __LINE__);
+ array($uid, $levels['level']), __FILE__, __LINE__);
//* DEBUG: */ echo $uid.'/'.$levels['level'].'/'.SQL_NUMROWS($result_refs)."<br />\n";
// Do we have levels?
if (SQL_NUMROWS($result_refs) > 0) {
// Loads surname, family's name and the email address
$result = SQL_QUERY_ESC("SELECT COUNT(*) FROM `{!_MYSQL_PREFIX!}_user_data` WHERE refid=%s",
- array($uid), __FILE__, __LINE__);
+ array($uid), __FILE__, __LINE__);
$result_lck = SQL_QUERY_ESC("SELECT COUNT(*) FROM `{!_MYSQL_PREFIX!}_user_data` WHERE refid=%s AND status != 'CONFIRMED' ORDER BY `userid` ASC",
- array($uid), __FILE__, __LINE__);
+ array($uid), __FILE__, __LINE__);
$menge = SQL_RESULT($result , 0, 0);
$menge_lck = SQL_RESULT($result_lck, 0, 0);
while ($content = SQL_FETCHARRAY($result_refs)) {
// Query for data
$result_user = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email, status, joined FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array($content['refid']), __FILE__, __LINE__);
+ array($content['refid']), __FILE__, __LINE__);
// Is the data there?
if (SQL_NUMROWS($result_user) == 1) {
// Check for referals
$result_cnt = SQL_QUERY_ESC("SELECT COUNT(userid) FROM `{!_MYSQL_PREFIX!}_user_data` WHERE refid=%s",
- array($content['refid']), __FILE__, __LINE__);
+ array($content['refid']), __FILE__, __LINE__);
// Load refs
$refs_cnt = SQL_RESULT($result_cnt, 0, 0);
} else {
// Check for referals
$result_refs = SQL_QUERY_ESC("SELECT COUNT(userid) FROM `{!_MYSQL_PREFIX!}_user_data` WHERE refid=%s",
- array(bigintval($levels['userid'])), __FILE__, __LINE__);
+ array(bigintval($levels['userid'])), __FILE__, __LINE__);
$refs_cnt = SQL_RESULT($result_refs, 0, 0);
SQL_FREERESULT($result_refs);
$result = SQL_QUERY_ESC("SELECT company, position, gender, surname, family, street_nr1, street_nr2, zip, city, country, phone, fax, cell, email, url, tax_ident, status, sponsor_created, last_online, last_change, receive_warnings, points_amount, points_used, remote_addr, warning_interval, refid, ref_count
FROM `{!_MYSQL_PREFIX!}_sponsor_data`
WHERE `id`='%s' LIMIT 1",
- array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load sponsor details
// Check for sponsor's orders (only count)
$result_orders = SQL_QUERY_ESC("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_sponsor_orders` WHERE sponsorid='%s'",
- array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
list($orders) = SQL_FETCHROW($result_orders);
SQL_FREERESULT($result_orders);
if (empty($orders)) $orders = 0;
} elseif (REQUEST_ISSET_GET(('rid'))) {
// Search for sponsor
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE `id`='%s' LIMIT 1",
- array(bigintval(REQUEST_GET('rid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('rid'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Free memory
SQL_FREERESULT($result);
$result = SQL_QUERY_ESC("SELECT id, gender, surname, family, email, status, sponsor_created, last_online, points_amount, points_used, remote_addr, ref_count
FROM `{!_MYSQL_PREFIX!}_sponsor_data`
WHERE refid='%s' ORDER BY `id`",
- array(bigintval(REQUEST_GET('rid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('rid'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// List refs now
// Save entry
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_paytypes`
SET pay_name='%s', pay_rate='%s', pay_min_count='%s', pay_currency='%s' WHERE `id`='%s' LIMIT 1",
- array(
- REQUEST_POST('name', $id),
- REQUEST_POST('rate', $id),
- bigintval(REQUEST_POST('min', $id)),
- REQUEST_POST('curr', $id),
- $id
- ), __FILE__, __LINE__);
+ array(
+ REQUEST_POST('name', $id),
+ REQUEST_POST('rate', $id),
+ bigintval(REQUEST_POST('min', $id)),
+ REQUEST_POST('curr', $id),
+ $id
+ ), __FILE__, __LINE__);
}
// Generate message
foreach (REQUEST_POST('id') as $id => $sel) {
// Remove entry
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_sponsor_paytypes` WHERE `id`='%s' LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__);
+ array(bigintval($id)), __FILE__, __LINE__);
}
// Generate message
if (REQUEST_ISSET_POST(('add'))) {
// Check if entry with same name does exists
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_sponsor_paytypes` WHERE pay_name='%s' LIMIT 1",
- array(REQUEST_POST('pay_name')), __FILE__, __LINE__);
+ array(REQUEST_POST('pay_name')), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 0) {
// No entry found so add this line
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_sponsor_paytypes` (pay_name, pay_rate, pay_min_count, pay_currency) VALUES ('%s','%s','%s','%s')",
- array(
- htmlspecialchars(REQUEST_POST('pay_name')),
- convertCommaToDot(REQUEST_POST('pay_rate')),
- bigintval(REQUEST_POST('pay_min_count')),
- htmlspecialchars(REQUEST_POST('pay_currency'))
- ), __FILE__, __LINE__);
+ array(
+ htmlspecialchars(REQUEST_POST('pay_name')),
+ convertCommaToDot(REQUEST_POST('pay_rate')),
+ bigintval(REQUEST_POST('pay_min_count')),
+ htmlspecialchars(REQUEST_POST('pay_currency'))
+ ), __FILE__, __LINE__);
// Payment type added!
$message = sprintf(getMessage('ADMIN_SPONSOR_PAYTYPE_ADDED'), REQUEST_POST('pay_name'));
foreach (REQUEST_POST('id') as $id => $sel) {
// Load entry
$result = SQL_QUERY_ESC("SELECT pay_name, pay_rate, pay_min_count, pay_currency FROM `{!_MYSQL_PREFIX!}_sponsor_paytypes` WHERE `id`='%s' LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__);
+ array(bigintval($id)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load data
list($name, $rate, $min, $curr) = SQL_FETCHROW($result);
} else {
// Load all payment types
$result = SQL_QUERY("SELECT id, pay_name, pay_rate, pay_min_count, pay_currency FROM `{!_MYSQL_PREFIX!}_sponsor_paytypes` ORDER BY pay_name",
- __FILE__, __LINE__);
+ __FILE__, __LINE__);
// Do we have some paytypes setup?
if (SQL_NUMROWS($result) > 0) {
if (REQUEST_ISSET_GET('id')) {
// Check for selected sponsor
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE `id`='%s' LIMIT 1",
- array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// ...
// Free memory
if (REQUEST_ISSET_POST('edit')) {
// Show entries for editing
ADMIN_EDIT_ENTRIES_CONFIRM(
- REQUEST_POST('id'),
+ REQUEST_POST('id'),
'surfbar_urls',
- array('id', 'userid', 'url'),
- array('bigintval', 'ADD_MEMBER_SELECTION_BOX', ''),
- array('', array(false, true, true), '')
+ array('id', 'userid', 'url'),
+ array('bigintval', 'ADD_MEMBER_SELECTION_BOX', ''),
+ array('', array(false, true, true), '')
);
$show = false;
} elseif (REQUEST_ISSET_POST(('do_edit'))) {
// Change data of entries
ADMIN_EDIT_ENTRIES_CONFIRM(
- REQUEST_POST('id'),
+ REQUEST_POST('id'),
'surfbar_urls',
- array(),
- array(),
- array(),
- true
+ array(),
+ array(),
+ array(),
+ true
);
} elseif (REQUEST_ISSET_POST('delete')) {
// Show entries for deletion
ADMIN_DELETE_ENTRIES_CONFIRM(
- REQUEST_POST('id'),
+ REQUEST_POST('id'),
'surfbar_urls',
- array('id', 'userid', 'url', 'registered'),
- array('bigintval', 'generateUserProfileLink', 'FRAMETESTER', ''),
- array('', '', '', '')
+ array('id', 'userid', 'url', 'registered'),
+ array('bigintval', 'generateUserProfileLink', 'FRAMETESTER', ''),
+ array('', '', '', '')
);
$show = false;
} elseif (REQUEST_ISSET_POST(('do_delete'))) {
} elseif (REQUEST_ISSET_POST(('lock'))) {
// Un-/lock selected URLs. This does not work for pending URLs
ADMIN_LOCK_ENTRIES_CONFIRM(
- REQUEST_POST('id'),
+ REQUEST_POST('id'),
'surfbar_urls',
- array('id', 'userid', 'url', 'registered', 'status'),
- array('bigintval', 'generateUserProfileLink', 'FRAMETESTER', '', 'surfbarTranslateUserStatus'),
- array('', '', '', '', '')
+ array('id', 'userid', 'url', 'registered', 'status'),
+ array('bigintval', 'generateUserProfileLink', 'FRAMETESTER', '', 'surfbarTranslateUserStatus'),
+ array('', '', '', '', '')
);
$show = false;
} elseif (REQUEST_ISSET_POST(('do_lock'))) {
// Un-/lock selected URLs. This does not work for pending URLs
ADMIN_LOCK_ENTRIES_CONFIRM(
- REQUEST_POST('id'),
+ REQUEST_POST('id'),
'surfbar_urls',
- array(),
- array(),
- array(),
- array('status' => array('ACTIVE' => 'LOCKED', 'LOCKED' => 'ACTIVE')),
- true
+ array(),
+ array(),
+ array(),
+ array('status' => array('ACTIVE' => 'LOCKED', 'LOCKED' => 'ACTIVE')),
+ true
);
} elseif (REQUEST_ISSET_POST(('undelete'))) {
// Undelete selected URLs. This does only work for deleted URLs... ;-)
ADMIN_UNDELETE_ENTRIES_CONFIRM(
- REQUEST_POST('id'),
+ REQUEST_POST('id'),
'surfbar_urls',
- array('id', 'userid', 'url', 'registered', 'status'),
- array('bigintval', 'generateUserProfileLink', 'FRAMETESTER', '', 'surfbarTranslateUserStatus'),
- array('', '', '', '', '')
+ array('id', 'userid', 'url', 'registered', 'status'),
+ array('bigintval', 'generateUserProfileLink', 'FRAMETESTER', '', 'surfbarTranslateUserStatus'),
+ array('', '', '', '', '')
);
$show = false;
} elseif (REQUEST_ISSET_POST(('do_undelete'))) {
// Undelete selected URLs. This does only work for deleted URLs... ;-)
ADMIN_UNDELETE_ENTRIES_CONFIRM(
- REQUEST_POST('id'),
+ REQUEST_POST('id'),
'surfbar_urls',
- array(),
- array(),
- array(),
- array('status' => array('DELETED' => 'ACTIVE')),
- true
+ array(),
+ array(),
+ array(),
+ array('status' => array('DELETED' => 'ACTIVE')),
+ true
);
}
switch (REQUEST_GET('type'))
{
-case "your": // List only your own open (new) tasks
- $whereStatement = "`assigned_admin`='".getCurrentAdminId()."' AND `status`='NEW' AND task_type != 'EXTENSION_UPDATE'";
- break;
-
-case "updates": // List only updates assigned to you
- $whereStatement = "`assigned_admin`=".getCurrentAdminId()." AND `status`='NEW' AND task_type = 'EXTENSION_UPDATE'";
- break;
-
-case "solved": // List only solved tasks assigned to you
- $whereStatement = "`assigned_admin`=".getCurrentAdminId()." AND `status`='SOLVED'";
- break;
-
-case "unassigned": // List unassigned (but not deleted) tasks
- $whereStatement = "`assigned_admin`=0 AND `status` != 'DELETED'";
- break;
-
-case "deleted": // List all deleted
- $whereStatement = "`status`='DELETED'";
- break;
-
-case "closed": // List all closed
- $whereStatement = "`assigned_admin`=".getCurrentAdminId()." AND `status`='CLOSED'";
- break;
-
-default: // Unknown type
- DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown task type %s detected.", REQUEST_GET('type')));
- LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_TASK_UNKNOWN_MODE'), REQUEST_GET('type')));
- break;
+ case "your": // List only your own open (new) tasks
+ $whereStatement = "`assigned_admin`='".getCurrentAdminId()."' AND `status`='NEW' AND task_type != 'EXTENSION_UPDATE'";
+ break;
+
+ case "updates": // List only updates assigned to you
+ $whereStatement = "`assigned_admin`=".getCurrentAdminId()." AND `status`='NEW' AND task_type = 'EXTENSION_UPDATE'";
+ break;
+
+ case "solved": // List only solved tasks assigned to you
+ $whereStatement = "`assigned_admin`=".getCurrentAdminId()." AND `status`='SOLVED'";
+ break;
+
+ case "unassigned": // List unassigned (but not deleted) tasks
+ $whereStatement = "`assigned_admin`=0 AND `status` != 'DELETED'";
+ break;
+
+ case "deleted": // List all deleted
+ $whereStatement = "`status`='DELETED'";
+ break;
+
+ case "closed": // List all closed
+ $whereStatement = "`assigned_admin`=".getCurrentAdminId()." AND `status`='CLOSED'";
+ break;
+
+ default: // Unknown type
+ DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown task type %s detected.", REQUEST_GET('type')));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_TASK_UNKNOWN_MODE'), REQUEST_GET('type')));
+ break;
}
if (!empty($whereStatement)) {
// Unassign from tasks
foreach (REQUEST_POST('task') as $id => $sel) {
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_task_system` SET `assigned_admin`=0 WHERE `id`=%s AND `assigned_admin`=%s LIMIT 1",
- array(bigintval($id), getCurrentAdminId()), __FILE__, __LINE__);
+ array(bigintval($id), getCurrentAdminId()), __FILE__, __LINE__);
}
} elseif (REQUEST_ISSET_POST('del')) {
// Delete tasks
if (REQUEST_GET('type') == "deleted") {
// Delete task immediately
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_task_system` WHERE `id`=%s LIMIT 1",
- array(bigintval($id)),__FILE__, __LINE__);
+ array(bigintval($id)),__FILE__, __LINE__);
} else {
// Mark task as to be deleted (purged by autppurge extension)
ADMIN_DELETE_TASK($id);
// Generate infos
switch ($content['task_type'])
{
- case 'EXTENSION':
- case 'EXTENSION_UPDATE':
- $content['infos'] = substr($content['subject'], 1, strpos($content['subject'], ':') - 1);
- break;
+ case 'EXTENSION':
+ case 'EXTENSION_UPDATE':
+ $content['infos'] = substr($content['subject'], 1, strpos($content['subject'], ':') - 1);
+ break;
}
// Member assigned with task?
// Free memory
SQL_FREERESULT($result);
}
- else
+else
{
// Nothing for in and out
$OUT = "<tr>
LEFT JOIN `{!_MYSQL_PREFIX!}_user_data` AS u
ON l.userid=u.userid
WHERE l.%s='%s' ORDER BY l.userid LIMIT %s",
- array($col, $ID, bigintval($max)),__FILE__, __LINE__);
+ array($col, $ID, bigintval($max)),__FILE__, __LINE__);
$unconfirmed = SQL_NUMROWS($result);
if ($unconfirmed > 0) {
} elseif (REQUEST_GET('mid') > 0) {
// Data in pool or in user_stats not found, so let's find out where data is missing
$result1 = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_pool` WHERE `id`=%s LIMIT 1",
- array(bigintval($ID)), __FILE__, __LINE__);
+ array(bigintval($ID)), __FILE__, __LINE__);
$result2 = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE pool_id=%s LIMIT 1",
- array(bigintval($ID)), __FILE__, __LINE__);
+ array(bigintval($ID)), __FILE__, __LINE__);
if (SQL_NUMROWS($result1) == 1) {
// pool table
LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_UNCONFIRMED_POOL_MISSING'), $ID));
FROM `{!_MYSQL_PREFIX!}_user_data`
WHERE userid=%s
LIMIT 1",
- array($uid), __FILE__, __LINE__);
+ array($uid), __FILE__, __LINE__);
if (SQL_NUMROWS($result_user) == 1) {
// Account found!
$DATA = SQL_FETCHARRAY($result_user);
// Nickname inclusion?
// @TODO Rewrite these to filters
if (EXT_IS_ACTIVE('nickname')) {
- // Nickname not set or invalid? Then
+ // Nickname not set or invalid? Then
if ((empty($DATA['nickname'])) || ($DATA['nickname'] == $uid)) $DATA['nickname'] = '---';
} else {
// Extension not found
// Check for entries
$result = SQL_QUERY("SELECT id, userid, wernis_account, wernis_amount, wernis_timestamp, wernis_type, wernis_api_message, wernis_api_status FROM `{!_MYSQL_PREFIX!}_user_wernis` ORDER BY wernis_timestamp DESC, id DESC",
- __FILE__, __LINE__);
+__FILE__, __LINE__);
// Are there some entries to display?
if (SQL_NUMROWS($result) > 0) {
if (REQUEST_ISSET_GET('id')) {
// Check for selected sponsor
$result = SQL_QUERY_ESC("SELECT gender, surname, family, email, status FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE `id`='%s' LIMIT 1",
- array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Get sponsor's current status and let only confirmed and locked status pass
list($gender, $sname, $fname, $email, $status) = SQL_FETCHROW($result);
// Update sponsor's account
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET `status`='".$status."' WHERE `id`='%s' LIMIT 1",
- array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
} elseif (REQUEST_ISSET_POST(('no'))) {
// No don't lock / unlock now!
redirectToUrl('modules.php?module=admin&what=list_sponsor&id='.bigintval(REQUEST_GET('id')));
if (REQUEST_ISSET_GET('uid')) {
// Load user's data
$result_user = SQL_QUERY_ESC("SELECT status, gender, surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
$ACT = false;
if (SQL_NUMROWS($result_user) == 1) {
// User found
if (GET_EXT_VERSION('user') >= '0.3.5') {
// Lock with reason
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `status`='LOCKED',lock_reason='%s',lock_timestamp=NOW() WHERE userid=%s LIMIT 1",
- array(REQUEST_POST('reason'), bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+ array(REQUEST_POST('reason'), bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
} else {
// Lock with no lock reason saved
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `status`='LOCKED' WHERE userid=%s LIMIT 1",
- array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
}
// Entry updated?
if (GET_EXT_VERSION('user') >= '0.3.5') {
// Reset lock reason as well
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `status`='CONFIRMED',lock_reason='',lock_timestamp='0000-00-00 00:00' WHERE userid=%s LIMIT 1",
- array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
} else {
// No lock reason to reset
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `status`='CONFIRMED' WHERE userid=%s LIMIT 1",
- array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
}
// Entry updated?
$URL = ADMIN_CREATE_USERID_LINK(REQUEST_GET('uid'));
} else {
$result = SQL_QUERY_ESC("SELECT email, surname, family FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
// Entry found?
if (SQL_NUMROWS($result) == 1) {
// Realy want to lock?
switch ($status)
{
- case 'CONFIRMED': // Yes, lock him down... ;-)
- define('__OK_VALUE' , 'lock');
- define('__HEADER_VALUE', sprintf(getMessage('ADMIN_HEADER_LOCK_ACCOUNT'), constant('__UID')));
- define('__TEXT_VALUE' , sprintf(getMessage('ADMIN_TEXT_LOCK_ACCOUNT'), constant('__UID')));
- break;
-
- case 'LOCKED': // Unlock the user
- define('__OK_VALUE' , 'unlock');
- define('__HEADER_VALUE', sprintf(getMessage('ADMIN_HEADER_UNLOCK_ACCOUNT'), constant('__UID')));
- define('__TEXT_VALUE' , sprintf(getMessage('ADMIN_TEXT_UNLOCK_ACCOUNT'), constant('__UID')));
- break;
-
- case 'UNCONFIRMED': // Unconfirmed accounts cannot be unlocked!
- define('__OK_VALUE' , 'del');
- define('__HEADER_VALUE', sprintf(getMessage('ADMIN_HEADER_DEL_ACCOUNT'), constant('__UID')));
- define('__TEXT_VALUE' , sprintf(getMessage('ADMIN_TEXT_DEL_ACCOUNT'), constant('__UID')));
- break;
+ case 'CONFIRMED': // Yes, lock him down... ;-)
+ define('__OK_VALUE' , 'lock');
+ define('__HEADER_VALUE', sprintf(getMessage('ADMIN_HEADER_LOCK_ACCOUNT'), constant('__UID')));
+ define('__TEXT_VALUE' , sprintf(getMessage('ADMIN_TEXT_LOCK_ACCOUNT'), constant('__UID')));
+ break;
+
+ case 'LOCKED': // Unlock the user
+ define('__OK_VALUE' , 'unlock');
+ define('__HEADER_VALUE', sprintf(getMessage('ADMIN_HEADER_UNLOCK_ACCOUNT'), constant('__UID')));
+ define('__TEXT_VALUE' , sprintf(getMessage('ADMIN_TEXT_UNLOCK_ACCOUNT'), constant('__UID')));
+ break;
+
+ case 'UNCONFIRMED': // Unconfirmed accounts cannot be unlocked!
+ define('__OK_VALUE' , 'del');
+ define('__HEADER_VALUE', sprintf(getMessage('ADMIN_HEADER_DEL_ACCOUNT'), constant('__UID')));
+ define('__TEXT_VALUE' , sprintf(getMessage('ADMIN_TEXT_DEL_ACCOUNT'), constant('__UID')));
+ break;
}
// Output form
// De- or activate maintenance mode
switch (getConfig('maintenance'))
{
- case 'Y':
- $target_mode = 'N';
- $out = getMessage('ADMIN_MAINTENANCE_DEACTIVATED');
- break;
+ case 'Y':
+ $target_mode = 'N';
+ $out = getMessage('ADMIN_MAINTENANCE_DEACTIVATED');
+ break;
- case 'N':
- $target_mode = 'Y';
- $out = getMessage('ADMIN_MAINTENANCE_ACTIVATED');
- break;
+ case 'N':
+ $target_mode = 'Y';
+ $out = getMessage('ADMIN_MAINTENANCE_ACTIVATED');
+ break;
}
// Update config
} else {
switch (getConfig('maintenance'))
{
- case 'Y': // Maintenance mode is active
- define('ADMIN_MAINTENANCE_MODE', getMessage('ADMIN_MAINTENANCE_MODE_IS_ACTIVE'));
- break;
+ case 'Y': // Maintenance mode is active
+ define('ADMIN_MAINTENANCE_MODE', getMessage('ADMIN_MAINTENANCE_MODE_IS_ACTIVE'));
+ break;
- case 'N': // Maintenance mode is inactive
- define('ADMIN_MAINTENANCE_MODE', getMessage('ADMIN_MAINTENANCE_MODE_IS_INACTIVE'));
- break;
+ case 'N': // Maintenance mode is inactive
+ define('ADMIN_MAINTENANCE_MODE', getMessage('ADMIN_MAINTENANCE_MODE_IS_INACTIVE'));
+ break;
}
// Display form
LOAD_TEMPLATE("admin_maintenance_form");
// Get all available main menus
$result = SQL_QUERY("SELECT action, title, sort FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE (`what`='' OR `what` IS NULL) ORDER BY `sort`",
- __FILE__, __LINE__);
+ __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Read menu structure
while ($content = SQL_FETCHARRAY($result)) {
// Load sub menus :)
foreach ($menus as $key_main => $value_main) {
$result = SQL_QUERY_ESC("SELECT what, title, sort FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='%s' AND `what` != '' ORDER BY `sort`",
- array($value_main), __FILE__, __LINE__);
+ array($value_main), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Initialize arrays
$menus[$value_main] = array();
// Insert new menu entry
if (REQUEST_ISSET_POST(('menu'))) {
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('%s','%s','%s','%s','%s','%s')",
- array(
- REQUEST_POST('menu'),
- REQUEST_POST('name'),
- REQUEST_POST('title'),
- REQUEST_POST('visible'),
- REQUEST_POST('active'),
- bigintval(REQUEST_POST('sort')),
- ), __FILE__, __LINE__);
+ array(
+ REQUEST_POST('menu'),
+ REQUEST_POST('name'),
+ REQUEST_POST('title'),
+ REQUEST_POST('visible'),
+ REQUEST_POST('active'),
+ bigintval(REQUEST_POST('sort')),
+ ), __FILE__, __LINE__);
} else {
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`title`,`visible`,`locked`,`sort`) VALUES ('%s','%s','%s','%s','%s')",
- array(
- REQUEST_POST('name'),
- REQUEST_POST('title'),
- REQUEST_POST('visible'),
- REQUEST_POST('active'),
- bigintval(REQUEST_POST('sort')),
- ), __FILE__, __LINE__);
+ array(
+ REQUEST_POST('name'),
+ REQUEST_POST('title'),
+ REQUEST_POST('visible'),
+ REQUEST_POST('active'),
+ bigintval(REQUEST_POST('sort')),
+ ), __FILE__, __LINE__);
}
LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
} else {
if ($confirm == 1) {
$cnt++;
$result = SQL_QUERY_ESC("SELECT title, action, what FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE ".$AND." AND id=%s LIMIT 1",
- array(bigintval($sel)), __FILE__, __LINE__);
+ array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Entry found so we load the stuff...
list($menu, $act, $wht, $descr) = SQL_FETCHROW($result);
if ($confirm == 1) {
$cnt++;
$result = SQL_QUERY_ESC("SELECT title FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE ".$AND." AND id=%s LIMIT 1",
- array(bigintval($sel)), __FILE__, __LINE__);
+ array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Entry found so we load the stuff...
list($title) = SQL_FETCHROW($result);
if ($confirm == 1) {
$cnt++;
$result = SQL_QUERY_ESC("SELECT title, visible, locked FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE ".$AND." AND id=%s LIMIT 1",
- array(bigintval($sel)), __FILE__, __LINE__);
+ array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Entry found so we load the stuff...
list($menu, $vis, $locked) = SQL_FETCHROW($result);
// Load template
$OUT .= LOAD_TEMPLATE("admin_menu_status_row", true, $content);
}
- else
+ else
{
// Entry not found?
$content = array(
if (!empty($SUB)) $AND = "`action`='".$SUB."'";
switch (REQUEST_POST('ok'))
{
- case 'edit': // Edit menu
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `title`='%s', `action`='%s', `what`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+ case 'edit': // Edit menu
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `title`='%s', `action`='%s', `what`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
array($menu, REQUEST_POST('sel_act', $sel), REQUEST_POST('sel_what', $sel), $sel), __FILE__, __LINE__);
- break;
+ break;
- case 'del': // Delete menu
- SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE ".$AND." AND id=%s LIMIT 1",
+ case 'del': // Delete menu
+ SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE ".$AND." AND id=%s LIMIT 1",
array($sel), __FILE__, __LINE__);
- break;
+ break;
- case 'status': // Change status of menus
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='%s', `locked`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+ case 'status': // Change status of menus
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='%s', `locked`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
array(REQUEST_POST('visible', $sel), REQUEST_POST('locked', $sel), $sel), __FILE__, __LINE__);
- break;
+ break;
}
break;
}
if (REQUEST_ISSET_GET(('w'))) {
// Sub menus selected
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1",
- array(bigintval(REQUEST_GET('act')), bigintval(REQUEST_GET('tid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('act')), bigintval(REQUEST_GET('tid'))), __FILE__, __LINE__);
list($tid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1",
- array(bigintval(REQUEST_GET('act')), bigintval(REQUEST_GET('fid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('act')), bigintval(REQUEST_GET('fid'))), __FILE__, __LINE__);
list($fid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
} else {
// Main menu selected
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE (`what`='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1",
- array(bigintval(REQUEST_GET('tid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('tid'))), __FILE__, __LINE__);
list($tid) = SQL_FETCHROW($result);
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE (`what`='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1",
- array(bigintval(REQUEST_GET('fid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('fid'))), __FILE__, __LINE__);
list($fid) = SQL_FETCHROW($result);
}
if ((!empty($tid)) && (!empty($fid))) {
// Sort menu
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
- array(bigintval(REQUEST_GET('tid')), bigintval($fid)), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('tid')), bigintval($fid)), __FILE__, __LINE__);
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
- array(bigintval(REQUEST_GET('fid')), bigintval($tid)), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('fid')), bigintval($tid)), __FILE__, __LINE__);
} // END - -fi
}
if (IS_FORM_SENT()) {
switch (REQUEST_GET('do')) {
- case 'add':
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_payments` (time, payment, mail_title, price) VALUES ('".REQUEST_POST('t_wait')."','".REQUEST_POST('payment')."','".REQUEST_POST('title')."','".REQUEST_POST('price')."')");
- $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_payments` WHERE time='%s' LIMIT 1",
+ case 'add':
+ ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_payments` (time, payment, mail_title, price) VALUES ('".REQUEST_POST('t_wait')."','".REQUEST_POST('payment')."','".REQUEST_POST('title')."','".REQUEST_POST('price')."')");
+ $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_payments` WHERE time='%s' LIMIT 1",
array(REQUEST_POST('t_wait')), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 1) {
- // Re-init the array here
- INIT_SQLS();
-
- // Free memory
- SQL_FREERESULT($result);
- }
- break;
-
- case 'edit':
- foreach (REQUEST_POST('time') as $id => $value) {
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_payments` SET time='".$value."', payment='".REQUEST_POST('pay', $id)."', price='".REQUEST_POST('price', $id)."', mail_title='".REQUEST_POST('title', $id)."' WHERE `id`='".$id."' LIMIT 1");
- }
- break;
-
- case 'del':
- foreach (REQUEST_POST('id') as $id => $value) {
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_payments` WHERE `id`='".$id."' LIMIT 1");
- }
- break;
+ if (SQL_NUMROWS($result) == 1) {
+ // Re-init the array here
+ INIT_SQLS();
+
+ // Free memory
+ SQL_FREERESULT($result);
+ }
+ break;
+
+ case 'edit':
+ foreach (REQUEST_POST('time') as $id => $value) {
+ ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_payments` SET time='".$value."', payment='".REQUEST_POST('pay', $id)."', price='".REQUEST_POST('price', $id)."', mail_title='".REQUEST_POST('title', $id)."' WHERE `id`='".$id."' LIMIT 1");
+ }
+ break;
+
+ case 'del':
+ foreach (REQUEST_POST('id') as $id => $value) {
+ ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_payments` WHERE `id`='".$id."' LIMIT 1");
+ }
+ break;
}
// Save settings
$OUT = ''; $SW = 2;
foreach (REQUEST_POST('sel') as $id => $value) {
$result = SQL_QUERY_ESC("SELECT time, mail_title FROM `{!_MYSQL_PREFIX!}_payments` WHERE `id`=%s LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__);
+ array(bigintval($id)), __FILE__, __LINE__);
list($time, $title) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
$OUT = ''; $SW = 2;
foreach (REQUEST_POST('sel') as $id => $value) {
$result = SQL_QUERY_ESC("SELECT time, payment, mail_title, price FROM `{!_MYSQL_PREFIX!}_payments` WHERE `id`=%s LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__);
+ array(bigintval($id)), __FILE__, __LINE__);
list($time, $pay, $title, $price) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
$sql = '';
switch (REQUEST_GET('mode'))
{
- case 'add':
- // Check if banner is already added
- $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_refbanner` WHERE url='%s' LIMIT 1",
+ case 'add':
+ // Check if banner is already added
+ $result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_refbanner` WHERE url='%s' LIMIT 1",
array(REQUEST_POST('url')), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 0) {
- // Add banner
- SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_refbanner` (url, alternate, visible)
+ if (SQL_NUMROWS($result) == 0) {
+ // Add banner
+ SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_refbanner` (url, alternate, visible)
VALUES ('%s','%s','%s')",
array(REQUEST_POST('url'), REQUEST_POST('alternate'), REQUEST_POST('visible')), __FILE__, __LINE__);
- } else {
- // Free memory
- SQL_FREERESULT($result);
- }
- break;
-
- case 'edit': // Update banner
- foreach (REQUEST_POST('sel') as $id => $sel) {
- // Secure ID
- $id = bigintval($id);
-
- // Update entry
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_refbanner` SET url='%s', alternate='%s', `visible`='%s' WHERE `id`=%s LIMIT 1",
+ } else {
+ // Free memory
+ SQL_FREERESULT($result);
+ }
+ break;
+
+ case 'edit': // Update banner
+ foreach (REQUEST_POST('sel') as $id => $sel) {
+ // Secure ID
+ $id = bigintval($id);
+
+ // Update entry
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_refbanner` SET url='%s', alternate='%s', `visible`='%s' WHERE `id`=%s LIMIT 1",
array(
- REQUEST_POST('url', $id),
- REQUEST_POST('alternate', $id),
- REQUEST_POST('visible'),
- $id
+ REQUEST_POST('url', $id),
+ REQUEST_POST('alternate', $id),
+ REQUEST_POST('visible'),
+ $id
), __FILE__, __LINE__);
- }
- break;
+ }
+ break;
}
if (SQL_AFFECTEDROWS() == 1) {
foreach (REQUEST_POST('sel') as $id => $sel) {
// Load data
$result = SQL_QUERY_ESC("SELECT url, alternate, visible FROM `{!_MYSQL_PREFIX!}_refbanner` WHERE `id`=%s LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__);
+ array(bigintval($id)), __FILE__, __LINE__);
list($url, $alt, $vis) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
// Delete banner
foreach (REQUEST_POST('sel') as $id => $sel) {
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_refbanner` WHERE `id`=%s LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__);
+ array(bigintval($id)), __FILE__, __LINE__);
}
}
// Referal levels
$result = SQL_QUERY("SELECT id, url, alternate, visible, counter, clicks FROM `{!_MYSQL_PREFIX!}_refbanner` ORDER BY url",
- __FILE__, __LINE__);
+ __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Make referal banner editable and deletable
$OUT = ''; $SW = 2;
// Fix weight
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET sort=%s WHERE `id`=%s LIMIT 1",
- array($cnt, $content['id']), __FILE__, __LINE__);
+ array($cnt, $content['id']), __FILE__, __LINE__);
$REP += SQL_AFFECTEDROWS();
// Count one up
// Now sort every each menu
foreach ($ACTIONS as $act) {
$result_fix = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
- array($act), __FILE__, __LINE__);
+ array($act), __FILE__, __LINE__);
$cnt = 1;
while ($content = SQL_FETCHARRAY($result_fix)) {
// Fix weight
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET sort=%s WHERE `id`=%s LIMIT 1",
- array($cnt, $content['id']), __FILE__, __LINE__);
+ array($cnt, $content['id']), __FILE__, __LINE__);
$REP += SQL_AFFECTEDROWS();
// Count one up
$REMOVED = 0; // Nothing is removed for now... ;-)
while ($content = SQL_FETCHARRAY($result)) {
$result_user = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(bigintval($content['userid'])), __FILE__, __LINE__);
+ array(bigintval($content['userid'])), __FILE__, __LINE__);
if (SQL_NUMROWS($result_user) == 0) {
// Ok, we found something to remove
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_cats` WHERE userid=%s",
- array(bigintval($content['userid'])), __FILE__, __LINE__);
+ array(bigintval($content['userid'])), __FILE__, __LINE__);
$REMOVED += SQL_AFFECTEDROWS();
} else {
// Free memory
// Now sort every each menu
foreach ($ACTIONS as $act) {
$result_fix = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
- array($act), __FILE__, __LINE__);
+ array($act), __FILE__, __LINE__);
$cnt = 1;
while ($content = SQL_FETCHARRAY($result_fix)) {
// Fix weight
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET sort=%s WHERE `id`=%s LIMIT 1",
- array($cnt, $content['id']), __FILE__, __LINE__);
+ array($cnt, $content['id']), __FILE__, __LINE__);
$REP += SQL_AFFECTEDROWS();
// Count one up
// Fix weight
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET sort=%s WHERE `id`=%s LIMIT 1",
- array($cnt, $content['id']), __FILE__, __LINE__);
+ array($cnt, $content['id']), __FILE__, __LINE__);
$REP += SQL_AFFECTEDROWS();
// Count one up
// Now sort every each menu
foreach ($ACTIONS as $act) {
$result_fix = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
- array($act), __FILE__, __LINE__);
+ array($act), __FILE__, __LINE__);
$cnt = 1;
while ($content = SQL_FETCHARRAY($result_fix)) {
// Fix weight
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET sort=%s WHERE `id`=%s LIMIT 1",
- array($cnt, $content['id']), __FILE__, __LINE__);
+ array($cnt, $content['id']), __FILE__, __LINE__);
$REP += SQL_AFFECTEDROWS();
// Count one up
// Load module's detail statistic
$result = SQL_QUERY_ESC("SELECT action, title, counter FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `what` != '' AND `what` IS NOT NULL ORDER BY counter DESC",
- array($mod), __FILE__, __LINE__);
+ array($mod), __FILE__, __LINE__);
$OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
// Add color switch
// Is the form sent?
if ((IS_FORM_SENT()) && (REQUEST_POST('points') > 0)) {
$result_main = SQL_QUERY("SELECT userid, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `status`='CONFIRMED' ORDER BY `userid` ASC",
- __FILE__, __LINE__);
+ __FILE__, __LINE__);
while ($content = SQL_FETCHARRAY($result_main)) {
// Ok, add points to used points and send an email to him...
SUB_POINTS("admin_all", $content['userid'], REQUEST_POST('points'));
} elseif (REQUEST_ISSET_GET('uid')) {
// User ID found in URL so we use this give him some credits
$result = SQL_QUERY_ESC("SELECT surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
- array(bigintval(REQUEST_GET('uid'))),__FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('uid'))),__FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Selected user does exist
$content = SQL_FETCHARRAY($result);
FROM `{!_MYSQL_PREFIX!}_surfbar_stats`
WHERE `url_id`=%s
ORDER BY `userid` ASC",
- array(bigintval(REQUEST_GET('url_id'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('url_id'))), __FILE__, __LINE__);
// Entries found?
if (SQL_NUMROWS($result) > 0) {
// Free memory
SQL_FREERESULT($result);
} else {
- // No themes found???
+ // No themes found???
$OUT .= "<tr>
<td colspan=\"7\" class=\"bottom2\" height=\"60\">
".LOAD_TEMPLATE('admin_settings_saved', true, getMessage('ADMIN_NO_THEMES_FOUND'))."
// Register it ith the exchange
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_themes` (`theme_path`,`theme_active`,`theme_ver`,`theme_name`)
VALUES ('%s','N','%s','%s')",
- array(REQUEST_POST('theme'), $GLOBALS['theme_data']['version'], $GLOBALS['theme_data']['name']), __FILE__, __LINE__);
+ array(REQUEST_POST('theme'), $GLOBALS['theme_data']['version'], $GLOBALS['theme_data']['name']), __FILE__, __LINE__);
// Destroy cache
rebuildCacheFiles("themes", "them");
ON po.payment_id=pay.id
WHERE po.id=%s
LIMIT 1",
- array($id), __FILE__, __LINE__);
+ array($id), __FILE__, __LINE__);
// Update wents fine?
if (SQL_NUMROWS($result) == 1) {
if ((GET_EXT_VERSION('bonus') >= '0.4.4') && (getConfig('bonus_active') == 'Y')) {
// Add points directly
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET bonus_order=bonus_order+".getConfig('bonus_order')." WHERE userid=%s LIMIT 1",
- array(bigintval($DATA['sender'])), __FILE__, __LINE__);
+ array(bigintval($DATA['sender'])), __FILE__, __LINE__);
// Subtract bonus points from system
BONUS_POINTS_HANDLER(getConfig('bonus_order'));
// Unlock selected email
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET data_type='NEW' WHERE `id`=%s AND data_type='ADMIN' LIMIT 1",
- array($id), __FILE__, __LINE__);
+ array($id), __FILE__, __LINE__);
} // END - if
} // END - foreach
// Load URL and subject from pool
$result = SQL_QUERY_ESC("SELECT url, subject, sender FROM `{!_MYSQL_PREFIX!}_pool` WHERE `id`=%s LIMIT 1",
- array($id), __FILE__, __LINE__);
+ array($id), __FILE__, __LINE__);
// Load data
$DATA = SQL_FETCHARRAY($result);
// Redirect URL
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET url='%s', data_type='NEW' WHERE `id`=%s LIMIT 1",
- array(REQUEST_POST('redirect'), $id),__FILE__, __LINE__);
+ array(REQUEST_POST('redirect'), $id),__FILE__, __LINE__);
// Prepare data for the row template
$content = array(
// Lookup in blacklist
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_url_blacklist` WHERE `url`='%s' LIMIT 1",
- array($url), __FILE__, __LINE__);
+ array($url), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 0) {
// Did not find a record so we can add it... :)
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_url_blacklist` (`url`,`pool_id`) VALUES ('%s',%s)",
- array($url, $id), __FILE__, __LINE__);
+ array($url, $id), __FILE__, __LINE__);
} // END - if
// Free memory
$result_main = SQL_QUERY_ESC("SELECT gender, surname, family, email, remote_addr, sponsor_created, points_amount, refid
FROM `{!_MYSQL_PREFIX!}_sponsor_data`
WHERE `status`='PENDING' AND id='%s' LIMIT 1",
- array($content['id']), __FILE__, __LINE__);
+ array($content['id']), __FILE__, __LINE__);
if (SQL_NUMROWS($result_main) == 1) {
// Load data
ON sp.id=so.payid
WHERE so.sponsorid='%s'
ORDER BY sp.pay_name",
- array($content['id']), __FILE__, __LINE__);
+ array($content['id']), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Payment does exist
while ($content2 = SQL_FETCHARRAY($result)) {
'stamp' => generateDateTime($content['pay_ordered'], '2'),
'pname' => $content['pay_name'],
);
-
+
// Load email template
$content['msg'] = LOAD_EMAIL_TEMPLATE("sponsor_unlock_sponsor_pay", $data, $content['id']);
}
// Unlock sponsor account
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET `status`='CONFIRMED'
WHERE `id`='%s' AND `status`='PENDING' LIMIT 1",
- array($content['id']), __FILE__, __LINE__);
+ array($content['id']), __FILE__, __LINE__);
// Update, if applyable, referal count and points
if (($content['refid'] > 0) && ($content['refid'] != $content['id'])) {
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data`
SET points_amount=points_amount+%s, ref_count=ref_count+1
WHERE `id`='%s' LIMIT 1",
- array(getConfig('sponsor_ref_points'), bigintval($content['refid'])), __FILE__, __LINE__);
+ array(getConfig('sponsor_ref_points'), bigintval($content['refid'])), __FILE__, __LINE__);
// Whas that update fine?
if (SQL_AFFECTEDROWS() == 1) {
(points_amount - points_used) AS points, receive_warnings, ref_count AS refs
FROM `{!_MYSQL_PREFIX!}_sponsor_data`
WHERE `id`='%s' LIMIT 1",
- array(bigintval($content['refid'])), __FILE__, __LINE__);
+ array(bigintval($content['refid'])), __FILE__, __LINE__);
$REFERRAL = SQL_FETCHARRAY($result);
// Send warnings out?
if (REQUEST_ISSET_GET(('image'))) {
if (REQUEST_GET('type') == 'usage') {
$FQFN = sprintf("%s%s/usage.png",
- constant('PATH'),
- getConfig('usage_base')
+ constant('PATH'),
+ getConfig('usage_base')
);
} else {
if (strpos(REQUEST_GET('image'), "\\") > 0) REQUEST_SET_GET('image', substr(REQUEST_GET('image'), 0, strpos(REQUEST_GET('image'), "\\")));
$FQFN = sprintf("%s%s/%s_usage_%s.png",
- constant('PATH'),
- getConfig('usage_base'),
- REQUEST_GET(('type')),
- REQUEST_GET(('image'))
+ constant('PATH'),
+ getConfig('usage_base'),
+ REQUEST_GET(('type')),
+ REQUEST_GET(('image'))
);
}
shutdown();
} elseif (!REQUEST_ISSET_GET(('usage'))) {
$FQFN = sprintf("%s%s/index.html",
- constant('PATH'),
- getConfig('usage_base')
+ constant('PATH'),
+ getConfig('usage_base')
);
} else {
$FQFN = sprintf("%s%s/usage_%s.html",
- constant('PATH'),
- getConfig('usage_base'),
- REQUEST_GET(('usage'))
+ constant('PATH'),
+ getConfig('usage_base'),
+ REQUEST_GET(('usage'))
);
}
if ((REQUEST_ISSET_GET('uid')) && (bigintval(REQUEST_GET('uid')) > 0)) {
// Load user data and display it
$result = SQL_QUERY_ESC("SELECT surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
// Is a user account found?
if (SQL_NUMROWS($result) == 1) {
// Check for online users
$result = SQL_QUERY("SELECT id, ip, userid, refid, module, action, what, is_member, is_admin, timestamp FROM `{!_MYSQL_PREFIX!}_online` ORDER by timestamp DESC",
- __FILE__, __LINE__);
+ __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Load header template
LOAD_TEMPLATE('admin_online_header');
// Get theme from profile
$result = SQL_QUERY_ESC("SELECT curr_theme".$add." FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(getUserId()), __FILE__, __LINE__);
+ array(getUserId()), __FILE__, __LINE__);
// Load data
$data = SQL_FETCHARRAY($result);
SET login_failures=0, last_failure='0000-00-00 00:00:00'
WHERE userid=%s
LIMIT 1",
- array(getUserId()), __FILE__, __LINE__);
+ array(getUserId()), __FILE__, __LINE__);
// Store it in session
setSession('mxchange_member_failures', $data['login_failures']);
SET last_login=UNIX_TIMESTAMP()
WHERE userid=%s AND last_login < (UNIX_TIMESTAMP() - %s)
LIMIT 1",
- array(
- getUserId(),
- getConfig('login_timeout')
- ), __FILE__, __LINE__
+ array(
+ getUserId(),
+ getConfig('login_timeout')
+ ), __FILE__, __LINE__
);
if (SQL_AFFECTEDROWS() == 1) $bonus = true;
} // END - if
if (IS_MEMBER()) {
// Ok, test passed... :)
$result = SQL_QUERY_ESC("SELECT subject, url FROM `{!_MYSQL_PREFIX!}_pool` WHERE `id`=%s AND sender=%s AND data_type='TEMP' LIMIT 1",
- array(bigintval(REQUEST_GET('order')), getUserId()), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('order')), getUserId()), __FILE__, __LINE__);
// Finally is the entry valid?
if (SQL_NUMROWS($result) == 1) {
if (REQUEST_ISSET_GET(('frame'))) $frame = REQUEST_GET(('frame'));
switch ($frame)
{
- case '':
- switch ($mode)
- {
- case 'member':
- // Build frameset
- define('__ORDER_VALUE', bigintval(REQUEST_GET('order')));
- define('__URL_VALUE' , DEREFERER($url));
- LOAD_TEMPLATE('member_order_frametester');
- break;
+ case '':
+ switch ($mode)
+ {
+ case 'member':
+ // Build frameset
+ define('__ORDER_VALUE', bigintval(REQUEST_GET('order')));
+ define('__URL_VALUE' , DEREFERER($url));
+ LOAD_TEMPLATE('member_order_frametester');
+ break;
- case 'guest':
- define('__URL_VALUE' , DEREFERER($url));
- LOAD_TEMPLATE('guest_frametester');
+ case 'guest':
+ define('__URL_VALUE' , DEREFERER($url));
+ LOAD_TEMPLATE('guest_frametester');
+ break;
+ }
break;
- }
- break;
- case 'test_top':
- LOAD_TEMPLATE('admin_settings_saved', false, '<div class="guest_done">{--GUEST_FRAMETESTER_TOP--}</span>');
- break;
+ case 'test_top':
+ LOAD_TEMPLATE('admin_settings_saved', false, '<div class="guest_done">{--GUEST_FRAMETESTER_TOP--}</span>');
+ break;
- case 'back': // Back buttom
- LOAD_TEMPLATE('member_order_back', false, REQUEST_GET('order'));
- break;
+ case 'back': // Back buttom
+ LOAD_TEMPLATE('member_order_back', false, REQUEST_GET('order'));
+ break;
- case 'send': // Send mail away
- LOAD_TEMPLATE('member_order_send', false, REQUEST_GET('order'));
- break;
+ case 'send': // Send mail away
+ LOAD_TEMPLATE('member_order_send', false, REQUEST_GET('order'));
+ break;
}
} else {
// Go away...
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
require($INC);
-} elseif ((!EXT_IS_ACTIVE("")) && (!IS_ADMIN())) {
+} elseif ((!EXT_IS_ACTIVE('')) && (!IS_ADMIN())) {
addFatalMessage(__FILE__, __LINE__, EXTENSION_PROBLEM_EXT_INACTIVE, "");
return;
} elseif ($BLOCK_MODE) {
FROM `{!_MYSQL_PREFIX!}_user_data`
WHERE last_online >= %s AND `status`='CONFIRMED'
ORDER BY last_online DESC LIMIT %s",
- array(START_TDAY, getConfig('active_limit')), __FILE__, __LINE__);
+array(START_TDAY, getConfig('active_limit')), __FILE__, __LINE__);
// Entries found?
if (SQL_NUMROWS($result) > 0) {
// Search for an unconfirmed or confirmed account
$result = SQL_QUERY_ESC("SELECT userid, email, refid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE user_hash='%s' AND (`status`='UNCONFIRMED' OR `status`='CONFIRMED') LIMIT 1",
- array(REQUEST_GET('hash')), __FILE__, __LINE__);
+ array(REQUEST_GET('hash')), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Ok, he want's to confirm now so we load some data
list ($uid, $email, $rid) = SQL_FETCHROW($result);
// Unlock his account (but only when it is on UNCONFIRMED!)
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `status`='CONFIRMED', ref_payout=%s, user_hash=NULL WHERE user_hash='%s' AND `status`='UNCONFIRMED' LIMIT 1",
- array(getConfig('ref_payout'), REQUEST_GET('hash')), __FILE__, __LINE__);
+ array(getConfig('ref_payout'), REQUEST_GET('hash')), __FILE__, __LINE__);
if (SQL_AFFECTEDROWS() == 1) {
$msg = LOAD_EMAIL_TEMPLATE("confirm-member", array('points' => getConfig('points_register')), bigintval($uid));
if (($rid > 0) && ($rid != $uid)) {
// Select the referal userid
$result = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(bigintval($rid)), __FILE__, __LINE__);
+ array(bigintval($rid)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Update ref counter...
updateReferalCounter($rid);
if ((GET_EXT_VERSION('bonus') >= '0.4.4') && (getConfig('bonus_active') == 'Y')) {
// Add points (directly only!)
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET bonus_ref=bonus_ref+%s WHERE userid=%s LIMIT 1",
- array(getConfig('bonus_ref'), bigintval($rid)), __FILE__, __LINE__);
+ array(getConfig('bonus_ref'), bigintval($rid)), __FILE__, __LINE__);
// Subtract points from system
BONUS_POINTS_HANDLER(getConfig('bonus_ref'));
} elseif ((IS_FORM_SENT()) && (REQUEST_ISSET_POST(('email')))) {
// Confirmation link requested 0 1 2
$result = SQL_QUERY_ESC("SELECT userid, status, user_hash FROM `{!_MYSQL_PREFIX!}_user_data` WHERE email='%s' LIMIT 1",
- array(REQUEST_POST('email')), __FILE__, __LINE__);
+ array(REQUEST_POST('email')), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Email address found
$DATA = SQL_FETCHROW($result);
switch ($DATA[1])
{
- case "UNCONFIRMED": // Account not confirmed
- $msg = LOAD_EMAIL_TEMPLATE("guest_request_confirm", array('hash' => $DATA[2]), $DATA[0]);
- sendEmail(REQUEST_POST('email'), getMessage('REQUEST_CONFIRM_LINK_SUBJ'), $msg);
- $content = getMessage('CONFIRM_LINK_SENT');
- break;
-
- case 'CONFIRMED': // Account already confirmed
- $content = getMessage('LOGIN_ID_CONFIRMED');
- break;
-
- case "LOCKED": // Account is locked
- $content = getMessage('LOGIN_ID_LOCKED');
- break;
+ case "UNCONFIRMED": // Account not confirmed
+ $msg = LOAD_EMAIL_TEMPLATE("guest_request_confirm", array('hash' => $DATA[2]), $DATA[0]);
+ sendEmail(REQUEST_POST('email'), getMessage('REQUEST_CONFIRM_LINK_SUBJ'), $msg);
+ $content = getMessage('CONFIRM_LINK_SENT');
+ break;
+
+ case 'CONFIRMED': // Account already confirmed
+ $content = getMessage('LOGIN_ID_CONFIRMED');
+ break;
+
+ case "LOCKED": // Account is locked
+ $content = getMessage('LOGIN_ID_LOCKED');
+ break;
}
} else {
// Email address not registered
// Which mail-send-mode did the admin setup?
switch (getConfig('doubler_send_mode'))
{
-case "DIRECT":
- define('DOUBLER_PAYOUT_TIME', DOUBLER_PAYOUT_TIME_DIRECT);
- break;
+ case "DIRECT":
+ define('DOUBLER_PAYOUT_TIME', DOUBLER_PAYOUT_TIME_DIRECT);
+ break;
-case "RESET":
- define('DOUBLER_PAYOUT_TIME', DOUBLER_PAYOUT_TIME_RESET);
- break;
+ case "RESET":
+ define('DOUBLER_PAYOUT_TIME', DOUBLER_PAYOUT_TIME_RESET);
+ break;
}
// Generate table with already payed out doubles
DEBUG_LOG(__FILE__, __LINE__, sprintf("Unhandled error code %s detected.", $errorCode));
$message .= getMessage('LOGIN_WRONG_ID');
break;
- }
- $message .= "</span>
+ }
+ $message .= "</span>
</td>
<td width=\"10\" class=\"seperator\"> </td>
</tr>\n";
- define('LOGIN_FAILURE_MSG', $message);
+ define('LOGIN_FAILURE_MSG', $message);
} else {
// No problems, no output
define('LOGIN_FAILURE_MSG', '');
'lang' => getMessage('MEDIA_DOUBLER_COUNT'),
'value' => $count1,
'rows' => '4'
- );
- // Add points
- $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row2', true, $content);
- $content = array(
+ );
+ // Add points
+ $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row2', true, $content);
+ $content = array(
'lang' => getMessage('MEDIA_DOUBLER_CPOINTS'),
'value' => translateComma($points1)
- );
- $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row', true, $content);
- $content = array(
+ );
+ $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row', true, $content);
+ $content = array(
'lang' => getMessage('MEDIA_DOUBLER_WAITING'),
'value' => translateComma($count2)
- );
- $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row', true, $content);
- $content = array(
+ );
+ $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row', true, $content);
+ $content = array(
'lang' => getMessage('MEDIA_DOUBLER_WPOINTS'),
'value' => translateComma($points2)
- );
- $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row', true, $content);
+ );
+ $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row', true, $content);
}
if (EXT_IS_ACTIVE('holiday')) {
LEFT JOIN `{!_MYSQL_PREFIX!}_user_data` AS d
ON h.userid=d.userid
WHERE d.`holiday_active`='Y'",
- __FILE__, __LINE__);
+ __FILE__, __LINE__);
list($holiday) = SQL_FETCHROW($result);
if (empty($holiday)) $holiday = 0;
$content = array(
FROM `{!_MYSQL_PREFIX!}_user_transfers_in` AS t
LEFT JOIN `{!_MYSQL_PREFIX!}_user_data` AS d
ON t.userid=d.userid",
- __FILE__, __LINE__);
+ __FILE__, __LINE__);
list($count_in, $points_in) = SQL_FETCHROW($result);
if (empty($count_in)) $count_in = 0;
if (empty($points_in)) $points_in = 0;
FROM `{!_MYSQL_PREFIX!}_user_transfers_out` AS t
LEFT JOIN `{!_MYSQL_PREFIX!}_user_data` AS d
ON t.userid=d.userid",
- __FILE__, __LINE__);
+ __FILE__, __LINE__);
list($count_out, $points_out) = SQL_FETCHROW($result);
if (empty($count_out)) $count_out = 0;
if (empty($points_out)) $points_out = 0;
'lang' => getMessage('MEDIA_TRANSFER_IN_COUNT'),
'value' => $count_in,
'rows' => '4'
- );
- $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row2', true, $content);
- $content = array(
+ );
+ $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row2', true, $content);
+ $content = array(
'lang' => getMessage('MEDIA_TRANSFER_IN_POINTS'),
'value' => translateComma($points_in)
- );
- $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row', true, $content);
- $content = array(
+ );
+ $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row', true, $content);
+ $content = array(
'lang' => getMessage('MEDIA_TRANSFER_OUT_COUNT'),
'value' => $count_out
- );
- $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row', true, $content);
- $content = array(
+ );
+ $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row', true, $content);
+ $content = array(
'lang' => getMessage('MEDIA_TRANSFER_OUT_POINTS'),
'value' => translateComma($points_out)
- );
- $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row', true, $content);
+ );
+ $OUT_SPECIAL .= LOAD_TEMPLATE('mediadata_extra_row', true, $content);
}
define('__EXTRA_MEDIADATA' , $OUT_EXTRA);
if ($GLOBALS['refid'] > 0) {
// Test if the refid is valid
$result = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(bigintval($GLOBALS['refid'])), __FILE__, __LINE__);
+ array(bigintval($GLOBALS['refid'])), __FILE__, __LINE__);
// Userid found?
//* DEBUG: */ die("refid={$GLOBALS['refid']}/numRows=".SQL_NUMROWS($result)."");
if (getConfig('ip_timeout') > 0) {
// Check his IP number
$result = SQL_QUERY_ESC("SELECT joined, last_update FROM `{!_MYSQL_PREFIX!}_user_data` WHERE REMOTE_ADDR='%s' AND (joined > (UNIX_TIMESTAMP() - %s) OR last_update > (UNIX_TIMESTAMP() - %s)) LIMIT 1",
- array(detectRemoteAddr(), getConfig('ip_timeout'), getConfig('ip_timeout')), __FILE__, __LINE__);
+ array(detectRemoteAddr(), getConfig('ip_timeout'), getConfig('ip_timeout')), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Same IP in timeout range and different email address entered... Eat this, faker! ;-)
// But admins are allowed to fake their own exchange service.
if (GET_EXT_VERSION('sql_patches') >= '0.2.7') {
// Okay, add design here
$ADD1 = ", `curr_theme`";
- $ADD2 = ', ''.getCurrentTheme().''';
+ $ADD2 = ", '".getCurrentTheme()."'";
} // END - if
// Check if I shall disable sending mail to newly registered members out about active/begging rallye
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_data` (gender, surname, family, street_nr,%s, zip, city, email, birth_day, birth_month, birth_year, password, max_mails, receive_mails, refid, status, user_hash, REMOTE_ADDR, joined, last_update".$ADD1.")
VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONFIRMED','%s','%s', UNIX_TIMESTAMP(), UNIX_TIMESTAMP()".$ADD2.")",
array(
- $countryRow,
- substr(REQUEST_POST('gender'), 0, 1),
- REQUEST_POST('surname'),
- REQUEST_POST('family'),
- REQUEST_POST('street_nr'),
- $countryData,
- bigintval(REQUEST_POST('zip')),
- REQUEST_POST('city'),
- REQUEST_POST('addy'),
- bigintval(REQUEST_POST('day')),
- bigintval(REQUEST_POST('month')),
- bigintval(REQUEST_POST('year')),
- generateHash(REQUEST_POST('pass1')),
- bigintval(REQUEST_POST('max_mails')),
- bigintval(REQUEST_POST('max_mails')),
- bigintval(REQUEST_POST('refid')),
- $hash,
- detectRemoteAddr(),
+ $countryRow,
+ substr(REQUEST_POST('gender'), 0, 1),
+ REQUEST_POST('surname'),
+ REQUEST_POST('family'),
+ REQUEST_POST('street_nr'),
+ $countryData,
+ bigintval(REQUEST_POST('zip')),
+ REQUEST_POST('city'),
+ REQUEST_POST('addy'),
+ bigintval(REQUEST_POST('day')),
+ bigintval(REQUEST_POST('month')),
+ bigintval(REQUEST_POST('year')),
+ generateHash(REQUEST_POST('pass1')),
+ bigintval(REQUEST_POST('max_mails')),
+ bigintval(REQUEST_POST('max_mails')),
+ bigintval(REQUEST_POST('refid')),
+ $hash,
+ detectRemoteAddr(),
), __FILE__, __LINE__);
// Get his userid
// Write his welcome-points
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_points` WHERE userid=%s AND ref_depth=0 LIMIT 1",
- array(bigintval($userid)), __FILE__, __LINE__);
+ array(bigintval($userid)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 0) {
// Add only when the line was not found (maybe some more secure?)
$locked = "points";
if (getConfig('ref_payout') > 0) $locked = "locked_points"; // Pay him later. First he has to confirm some mails!
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_points` (userid, ref_depth, ".$locked.") VALUES (%s,0,'%s')",
- array(bigintval($userid), getConfig('points_register')), __FILE__, __LINE__);
+ array(bigintval($userid), getConfig('points_register')), __FILE__, __LINE__);
// Update mediadata as well
if ((GET_EXT_VERSION('mediadata') >= '0.0.4') && ($locked == "points")) {
if ($joined == 'Y') {
// Insert category entry
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_cats` (userid, cat_id) VALUES (%s, %s)",
- array(bigintval($userid), bigintval($cat)), __FILE__, __LINE__);
+ array(bigintval($userid), bigintval($cat)), __FILE__, __LINE__);
} // END - if
} // END - foreach
} // END - if
// Continue with birthday...
switch (getLanguage())
{
- case 'de':
- $DATA['birthday'] = bigintval(REQUEST_POST('day')).'.'.bigintval(REQUEST_POST('month')).'.'.bigintval(REQUEST_POST('year'));
- break;
+ case 'de':
+ $DATA['birthday'] = bigintval(REQUEST_POST('day')).'.'.bigintval(REQUEST_POST('month')).'.'.bigintval(REQUEST_POST('year'));
+ break;
- default:
- $DATA['birthday'] = bigintval(REQUEST_POST('month')).'/'.bigintval(REQUEST_POST('day')).'/'.bigintval(REQUEST_POST('year'));
- break;
+ default:
+ $DATA['birthday'] = bigintval(REQUEST_POST('month')).'/'.bigintval(REQUEST_POST('day')).'/'.bigintval(REQUEST_POST('year'));
+ break;
}
// Display information to the user that he got mail and send it away
// Generate birthday selection
switch (getLanguage())
{
- case 'de': // German date format
- define('BIRTHDAY_SELECTION', ADD_SELECTION('day', REQUEST_POST('day')).ADD_SELECTION('month', REQUEST_POST('month')).ADD_SELECTION('year', REQUEST_POST('year')));
- break;
+ case 'de': // German date format
+ define('BIRTHDAY_SELECTION', ADD_SELECTION('day', REQUEST_POST('day')).ADD_SELECTION('month', REQUEST_POST('month')).ADD_SELECTION('year', REQUEST_POST('year')));
+ break;
- default: // Default is the US date format... :)
- define('BIRTHDAY_SELECTION', ADD_SELECTION('month', REQUEST_POST('month')).ADD_SELECTION('day', REQUEST_POST('day')).ADD_SELECTION('year', REQUEST_POST('year')));
- break;
+ default: // Default is the US date format... :)
+ define('BIRTHDAY_SELECTION', ADD_SELECTION('month', REQUEST_POST('month')).ADD_SELECTION('day', REQUEST_POST('day')).ADD_SELECTION('year', REQUEST_POST('year')));
+ break;
}
// Adds a table for the guests with all visible categories
// Set account to pending
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET `status`='PENDING'
WHERE `id`='%s' AND hash='%s' AND `status`='UNCONFIRMED' LIMIT 1",
- array(bigintval($SPONSOR['id']), REQUEST_GET('hash')), __FILE__, __LINE__);
+ array(bigintval($SPONSOR['id']), REQUEST_GET('hash')), __FILE__, __LINE__);
// Check on success
if (SQL_AFFECTEDROWS() == 1) {
// Changed email adress need to be confirmed
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET `status`='CONFIRMED'
WHERE `id`='%s' AND hash='%s' AND `status`='EMAIL' LIMIT 1",
- array(bigintval($SPONSOR['id']), REQUEST_GET('hash')), __FILE__, __LINE__);
+ array(bigintval($SPONSOR['id']), REQUEST_GET('hash')), __FILE__, __LINE__);
- // Check on success
+ // Check on success
if (SQL_AFFECTEDROWS() == 1) {
// Sponsor account is unlocked again
LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_ACCOUNT_IS_CONFIRMED_AGAIN'));
$result = SQL_QUERY_ESC("SELECT id, hash, status, remote_addr, gender, surname, family, sponsor_created
FROM `{!_MYSQL_PREFIX!}_sponsor_data`
WHERE email='%s' AND (`status`='UNCONFIRMED' OR `status`='EMAIL') LIMIT 1",
- array(REQUEST_POST('email')), __FILE__, __LINE__);
+ array(REQUEST_POST('email')), __FILE__, __LINE__);
// Entry found?
if (SQL_NUMROWS($result) == 1) {
$result = SQL_QUERY_ESC("SELECT id, hash, remote_addr, gender, surname, family, sponsor_created
FROM `{!_MYSQL_PREFIX!}_sponsor_data`
WHERE email='%s' AND id='%s' AND `status`='CONFIRMED' LIMIT 1",
- array(REQUEST_POST('email'), bigintval(REQUEST_POST('id'))), __FILE__, __LINE__);
+ array(REQUEST_POST('email'), bigintval(REQUEST_POST('id'))), __FILE__, __LINE__);
// Entry found?
if (SQL_NUMROWS($result) == 1) {
// Update password
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_sponsor_data` SET password='%s'
WHERE `id`='%s' LIMIT 1",
- array(md5($SPONSOR['password']), bigintval($SPONSOR['id'])), __FILE__, __LINE__);
+ array(md5($SPONSOR['password']), bigintval($SPONSOR['id'])), __FILE__, __LINE__);
// Output message
LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_LOST_PASSWORD_SENT'));
// Check status and login data ...
$result = SQL_QUERY_ESC("SELECT status FROM `{!_MYSQL_PREFIX!}_sponsor_data`
WHERE `id`='%s' AND password='%s' LIMIT 1",
- array(bigintval(REQUEST_POST('sponsorid')), md5(REQUEST_POST('pass'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_POST('sponsorid')), md5(REQUEST_POST('pass'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Okay, first login data check passed, now has he/she an approved (CONFIRMED) account?
if ($status == 'CONFIRMED') {
// Is confirmed so both is fine and we can continue with login procedure
$login = ((setSession('sponsorid' , bigintval(REQUEST_POST('sponsorid')))) &&
- (setSession('sponsorpass', md5(REQUEST_POST('pass')) ))
+ (setSession('sponsorpass', md5(REQUEST_POST('pass')) ))
);
if ($login === true) {
// Homepage URL is empty
$FORM_ERRORS[] = getMessage('SPONSOR_TERMS_NOT_ACCEPTED');
}
-
+
// If there is something wrong/missing stop registration
if (count($FORM_ERRORS) > 0) REQUEST_UNSET_POST('ok');
}
// Check the status of the registration process
switch ($STATUS)
{
- case "added": // Sponsor successfully added with account status = UNCONFIRMED!
- // Check for his ID number
- $result = SQL_QUERY_ESC("SELECT id, hash FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE email='%s' LIMIT 1",
+ case "added": // Sponsor successfully added with account status = UNCONFIRMED!
+ // Check for his ID number
+ $result = SQL_QUERY_ESC("SELECT id, hash FROM `{!_MYSQL_PREFIX!}_sponsor_data` WHERE email='%s' LIMIT 1",
array(REQUEST_POST('email')), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 1) {
- // ID found so let's load it for the confirmation email
- list($id, $hash) = SQL_FETCHROW($result);
-
- // Prepare data for the email template
- define('__ID' , $id);
- define('__HASH' , $hash);
- define('__EMAIL' , REQUEST_POST('email'));
- define('__SURNAME' , REQUEST_POST('surname'));
- define('__FAMILY' , REQUEST_POST('family'));
- define('__GENDER' , translateGender(REQUEST_POST('gender')));
- define('__TIMESTAMP', generateDateTime(time(), 0));
- define('__PASSWORD' , REQUEST_POST('pass1'));
-
- // Generate email and send it to the new sponsor
- $EMAIL_MSG = LOAD_EMAIL_TEMPLATE("sponsor_confirm", $hash);
- sendEmail(REQUEST_POST('email'), getMessage('SPONSOR_PLEASE_CONFIRM_SUBJ'), $EMAIL_MSG);
-
- // Send mail to admin
- sendAdminNotification(getMessage('ADMIN_NEW_SPONSOR'), "admin_sponsor_reg", $hash);
-
- // Output message: DONE
- $message = $messageArray['added'];
- } else {
- // Sponsor account not found???
- $message = sprintf(getMessage('SPONSOR_EMAIL_404'), REQUEST_POST('email'));
- }
-
- // Free memory
- SQL_FREERESULT($result);
- break;
+ if (SQL_NUMROWS($result) == 1) {
+ // ID found so let's load it for the confirmation email
+ list($id, $hash) = SQL_FETCHROW($result);
+
+ // Prepare data for the email template
+ define('__ID' , $id);
+ define('__HASH' , $hash);
+ define('__EMAIL' , REQUEST_POST('email'));
+ define('__SURNAME' , REQUEST_POST('surname'));
+ define('__FAMILY' , REQUEST_POST('family'));
+ define('__GENDER' , translateGender(REQUEST_POST('gender')));
+ define('__TIMESTAMP', generateDateTime(time(), 0));
+ define('__PASSWORD' , REQUEST_POST('pass1'));
+
+ // Generate email and send it to the new sponsor
+ $EMAIL_MSG = LOAD_EMAIL_TEMPLATE("sponsor_confirm", $hash);
+ sendEmail(REQUEST_POST('email'), getMessage('SPONSOR_PLEASE_CONFIRM_SUBJ'), $EMAIL_MSG);
+
+ // Send mail to admin
+ sendAdminNotification(getMessage('ADMIN_NEW_SPONSOR'), "admin_sponsor_reg", $hash);
+
+ // Output message: DONE
+ $message = $messageArray['added'];
+ } else {
+ // Sponsor account not found???
+ $message = sprintf(getMessage('SPONSOR_EMAIL_404'), REQUEST_POST('email'));
+ }
- default:
- DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown status %s detected.", $STATUS));
- if (!IS_ADMIN()) {
- // Message for testing admin
- $message = sprintf(getMessage('ADMIN_SPONSOR_UNKNOWN_STATUS'), $STATUS);
- } else {
- // Message for the guest
- $message = sprintf(getMessage('SPONSOR_UNKNOWN_STATUS'), $STATUS);
- }
- break;
+ // Free memory
+ SQL_FREERESULT($result);
+ break;
+
+ default:
+ DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown status %s detected.", $STATUS));
+ if (!IS_ADMIN()) {
+ // Message for testing admin
+ $message = sprintf(getMessage('ADMIN_SPONSOR_UNKNOWN_STATUS'), $STATUS);
+ } else {
+ // Message for the guest
+ $message = sprintf(getMessage('SPONSOR_UNKNOWN_STATUS'), $STATUS);
+ }
+ break;
}
// Display message
// Check for gender selection
switch (REQUEST_POST('gender'))
{
- case "M": // Male
- define('__GENDER_M' , ' selected="selected"');
- define('__GENDER_F' , '');
- define('__GENDER_C' , '');
- break;
-
- case "F": // Female
- define('__GENDER_M' , '');
- define('__GENDER_F' , ' selected="selected"');
- define('__GENDER_C' , '');
- break;
-
- case "C": // Company
- define('__GENDER_M' , '');
- define('__GENDER_F' , '');
- define('__GENDER_C' , ' selected="selected"');
- break;
+ case "M": // Male
+ define('__GENDER_M' , ' selected="selected"');
+ define('__GENDER_F' , '');
+ define('__GENDER_C' , '');
+ break;
+
+ case "F": // Female
+ define('__GENDER_M' , '');
+ define('__GENDER_F' , ' selected="selected"');
+ define('__GENDER_C' , '');
+ break;
+
+ case "C": // Company
+ define('__GENDER_M' , '');
+ define('__GENDER_F' , '');
+ define('__GENDER_C' , ' selected="selected"');
+ break;
}
// Check for receive_warnings
switch (REQUEST_POST('receive_warnings'))
{
- case 'Y':
- define('__REC_Y' , ' selected="selected"');
- define('__REC_N' , '');
- break;
-
- case 'N':
- define('__REC_Y' , '');
- define('__REC_N' , ' selected="selected"');
- break;
+ case 'Y':
+ define('__REC_Y' , ' selected="selected"');
+ define('__REC_N' , '');
+ break;
+
+ case 'N':
+ define('__REC_Y' , '');
+ define('__REC_N' , ' selected="selected"');
+ break;
}
// Errors found
switch (getConfig('guest_stats'))
{
-case 'MEMBERS': // Statistics about your members
- // Members yesterday / today online
- $ymem = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE last_online >= ".getConfig('START_YDAY')." AND `last_online` < ".getConfig('START_TDAY')." AND `status`='CONFIRMED'", __FILE__, __LINE__));
- $tmem = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE last_online >= ".getConfig('START_TDAY')." AND `status`='CONFIRMED'", __FILE__, __LINE__));
-
- // Yesterday / today registered
- $yreg = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE joined >= ".getConfig('START_YDAY')." AND joined < ".getConfig('START_TDAY'), __FILE__, __LINE__));
- $treg = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE joined >= ".getConfig('START_TDAY'), __FILE__, __LINE__));
-
- // Only males / females
- $male = GET_TOTAL_DATA('M', 'user_data', 'userid', 'gender', true, " AND `status`='CONFIRMED'");
- $female = GET_TOTAL_DATA('F', 'user_data', 'userid', 'gender', true, " AND `status`='CONFIRMED'");
-
- // Unconfirmed accounts
- $unconfirmed = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE status != 'CONFIRMED'", __FILE__, __LINE__));
-
- // Total members
- $total = $male + $female;
-
- // List every month
- $months = array();
- for ($idx = 1; $idx < 13; $idx++) {
- // Copy it so we don't touch the for() loop index
- $month = $idx;
-
- // Append leading zero
- if ($idx < 10) $month = '0'.$idx;
-
- // Count months
- $months[$month] = GET_TOTAL_DATA(bigintval($month), 'user_data', 'userid', 'birth_month', true, " AND `status`='CONFIRMED'");
- }
-
- // Members in categories
- $result = SQL_QUERY("SELECT id, cat FROM `{!_MYSQL_PREFIX!}_cats` WHERE `visible`='Y' ORDER BY `id`", __FILE__, __LINE__);
-
- // Load categories first
- $cats = array(); $cat_cnt = array();
- // @TODO This can be somehow rewritten
- while ($content = SQL_FETCHARRAY($result)) {
- // Simple...
- $cats[$content['id']] = $content['cat'];
- }
-
- // Now we have all categories loaded, count members
- foreach ($cats as $id => $dummy) {
- // We only need id and nothing more to count...
- $cat_cnt[$id] = GET_TOTAL_DATA(bigintval($id), 'user_cats', 'id', 'cat_id', true);
- }
-
- // Prepare data for the template
- // @TODO Rewrite all these constants
- define('__TOTAL_USERS' , $total);
- define('__UNCONFIRMED' , $unconfirmed);
- define('__MALE_COUNT' , $male);
- define('__FEMALE_COUNT', $female);
- define('__TMEM_COUNT' , $tmem);
- define('__YMEM_COUNT' , $ymem);
- define('__TREG_COUNT' , $treg);
- define('__YREG_COUNT' , $yreg);
- define('__LMODE_VALUE' , $lmode);
- define('__LINK_TITLE' , $ltitle);
-
- // Generate monthly stats
- $SW = 2; $r2 = ' right2'; $l = 'll'; $r = 'lr'; $OUT = '';
- foreach ($months as $month => $cnt) {
- if ($SW == 2) $OUT .= "<tr>\n";
-
- // Prepare data for template
- $content = array(
+ case 'MEMBERS': // Statistics about your members
+ // Members yesterday / today online
+ $ymem = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE last_online >= ".getConfig('START_YDAY')." AND `last_online` < ".getConfig('START_TDAY')." AND `status`='CONFIRMED'", __FILE__, __LINE__));
+ $tmem = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE last_online >= ".getConfig('START_TDAY')." AND `status`='CONFIRMED'", __FILE__, __LINE__));
+
+ // Yesterday / today registered
+ $yreg = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE joined >= ".getConfig('START_YDAY')." AND joined < ".getConfig('START_TDAY'), __FILE__, __LINE__));
+ $treg = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE joined >= ".getConfig('START_TDAY'), __FILE__, __LINE__));
+
+ // Only males / females
+ $male = GET_TOTAL_DATA('M', 'user_data', 'userid', 'gender', true, " AND `status`='CONFIRMED'");
+ $female = GET_TOTAL_DATA('F', 'user_data', 'userid', 'gender', true, " AND `status`='CONFIRMED'");
+
+ // Unconfirmed accounts
+ $unconfirmed = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE status != 'CONFIRMED'", __FILE__, __LINE__));
+
+ // Total members
+ $total = $male + $female;
+
+ // List every month
+ $months = array();
+ for ($idx = 1; $idx < 13; $idx++) {
+ // Copy it so we don't touch the for() loop index
+ $month = $idx;
+
+ // Append leading zero
+ if ($idx < 10) $month = '0'.$idx;
+
+ // Count months
+ $months[$month] = GET_TOTAL_DATA(bigintval($month), 'user_data', 'userid', 'birth_month', true, " AND `status`='CONFIRMED'");
+ }
+
+ // Members in categories
+ $result = SQL_QUERY("SELECT id, cat FROM `{!_MYSQL_PREFIX!}_cats` WHERE `visible`='Y' ORDER BY `id`", __FILE__, __LINE__);
+
+ // Load categories first
+ $cats = array(); $cat_cnt = array();
+ // @TODO This can be somehow rewritten
+ while ($content = SQL_FETCHARRAY($result)) {
+ // Simple...
+ $cats[$content['id']] = $content['cat'];
+ }
+
+ // Now we have all categories loaded, count members
+ foreach ($cats as $id => $dummy) {
+ // We only need id and nothing more to count...
+ $cat_cnt[$id] = GET_TOTAL_DATA(bigintval($id), 'user_cats', 'id', 'cat_id', true);
+ }
+
+ // Prepare data for the template
+ // @TODO Rewrite all these constants
+ define('__TOTAL_USERS' , $total);
+ define('__UNCONFIRMED' , $unconfirmed);
+ define('__MALE_COUNT' , $male);
+ define('__FEMALE_COUNT', $female);
+ define('__TMEM_COUNT' , $tmem);
+ define('__YMEM_COUNT' , $ymem);
+ define('__TREG_COUNT' , $treg);
+ define('__YREG_COUNT' , $yreg);
+ define('__LMODE_VALUE' , $lmode);
+ define('__LINK_TITLE' , $ltitle);
+
+ // Generate monthly stats
+ $SW = 2; $r2 = ' right2'; $l = 'll'; $r = 'lr'; $OUT = '';
+ foreach ($months as $month => $cnt) {
+ if ($SW == 2) $OUT .= "<tr>\n";
+
+ // Prepare data for template
+ $content = array(
'l_class' => $l,
'm_descr' => $GLOBALS['month_descr'][$month],
'r_class' => $r,
'r2_class' => $r2,
'cnt' => $cnt
- );
-
- // Load row template
- $OUT .= LOAD_TEMPLATE("guest_stats_month_row", true, $content);
-
- if ($SW == 2) {
- $r2 = '';
- $l = 'rl'; $r = 'rr';
- } else {
- $OUT .= "</tr>\n";
- $r2 = ' right2';
- $l = 'll'; $r = 'lr';
+ );
+
+ // Load row template
+ $OUT .= LOAD_TEMPLATE("guest_stats_month_row", true, $content);
+
+ if ($SW == 2) {
+ $r2 = '';
+ $l = 'rl'; $r = 'rr';
+ } else {
+ $OUT .= "</tr>\n";
+ $r2 = ' right2';
+ $l = 'll'; $r = 'lr';
+ }
+ $SW = 3 - $SW;
}
- $SW = 3 - $SW;
- }
- define('__MONTH_STATS_ROWS', $OUT);
+ define('__MONTH_STATS_ROWS', $OUT);
- // Generate category stats
- $OUT = ''; $SW = 2;
- foreach ($cat_cnt as $id => $cnt) {
- // Prepare data for the template
- $content = array(
+ // Generate category stats
+ $OUT = ''; $SW = 2;
+ foreach ($cat_cnt as $id => $cnt) {
+ // Prepare data for the template
+ $content = array(
'sw' => $SW,
'cat' => $cats[$id],
'cnt' => $cnt,
- );
-
- // Load row template and switch colors
- $OUT .= LOAD_TEMPLATE('guest_stats_cats_row', true, $content);
- $SW = 3 - $SW;
- }
- define('__CATS_STATS_ROWS', $OUT);
-
- // Load final template
- LOAD_TEMPLATE('guest_stats_member');
- break;
-
-case 'MODULES': // TOP10 module clicks
- $AND = '';
- if (!IS_ADMIN()) $AND = " AND `locked`='N' AND `visible`='Y'";
- $guest_t10 = SQL_QUERY("SELECT counter, title FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE counter > 0".$AND." ORDER BY counter DESC LIMIT 0,10", __FILE__, __LINE__);
- $mem_t10 = SQL_QUERY("SELECT counter, title FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE counter > 0".$AND." ORDER BY counter DESC LIMIT 0,10", __FILE__, __LINE__);
- $OUT = '';
- if ((SQL_NUMROWS($guest_t10) > 0) || (SQL_NUMROWS($mem_t10) > 0)) {
- // Output header
- // @TODO Rewrite this to one template and $OUT .= ....
- OUTPUT_HTML("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"guest_table dashed\" width=\"310\">
+ );
+
+ // Load row template and switch colors
+ $OUT .= LOAD_TEMPLATE('guest_stats_cats_row', true, $content);
+ $SW = 3 - $SW;
+ }
+ define('__CATS_STATS_ROWS', $OUT);
+
+ // Load final template
+ LOAD_TEMPLATE('guest_stats_member');
+ break;
+
+ case 'MODULES': // TOP10 module clicks
+ $AND = '';
+ if (!IS_ADMIN()) $AND = " AND `locked`='N' AND `visible`='Y'";
+ $guest_t10 = SQL_QUERY("SELECT counter, title FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE counter > 0".$AND." ORDER BY counter DESC LIMIT 0,10", __FILE__, __LINE__);
+ $mem_t10 = SQL_QUERY("SELECT counter, title FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE counter > 0".$AND." ORDER BY counter DESC LIMIT 0,10", __FILE__, __LINE__);
+ $OUT = '';
+ if ((SQL_NUMROWS($guest_t10) > 0) || (SQL_NUMROWS($mem_t10) > 0)) {
+ // Output header
+ // @TODO Rewrite this to one template and $OUT .= ....
+ OUTPUT_HTML("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"guest_table dashed\" width=\"310\">
<tr>
<td align=\"center\" class=\"guest_stats_title bottom2\" colspan=\"2\"><strong>{--GUEST_TOPTEN_STATS--}</strong></td>
</tr>");
- }
+ }
- if (SQL_NUMROWS($guest_t10) > 0) {
- // Guest clicks
- OUTPUT_HTML("<tr>
+ if (SQL_NUMROWS($guest_t10) > 0) {
+ // Guest clicks
+ OUTPUT_HTML("<tr>
<td align=\"center\" class=\"guest_title2 bottom2\" colspan=\"2\">{--GUEST_TOP_GUEST_STATS--}</td>
</tr>");
- $SW = 2;
- while ($content = SQL_FETCHARRAY($guest_t10)) {
- OUTPUT_HTML("<tr>
+ $SW = 2;
+ while ($content = SQL_FETCHARRAY($guest_t10)) {
+ OUTPUT_HTML("<tr>
<td class=\"switch_sw".$SW." bottom2 right2\" align=\"right\" width=\"250\">".$content['title']." </td>
<td class=\"switch_sw".$SW." bottom2\" width=\"50\"> ".$content['counter']."</td>
</tr>");
- $SW = 3 - $SW;
+ $SW = 3 - $SW;
+ }
}
- }
- if (SQL_NUMROWS($guest_t10) > 0) {
- // Guest clicks
- OUTPUT_HTML("<tr>
+ if (SQL_NUMROWS($guest_t10) > 0) {
+ // Guest clicks
+ OUTPUT_HTML("<tr>
<td align=\"center\" class=\"guest_title2 bottom2\" colspan=\"2\">{--GUEST_TOP_MEMBER_STATS--}</td>
</tr>");
- $SW = 2;
- while ($content = SQL_FETCHARRAY($mem_t10)) {
- OUTPUT_HTML("<tr>
+ $SW = 2;
+ while ($content = SQL_FETCHARRAY($mem_t10)) {
+ OUTPUT_HTML("<tr>
<td class=\"switch_sw".$SW." bottom2 right2\" align=\"right\" width=\"250\">".$content['title']." </td>
<td class=\"switch_sw".$SW." bottom2\" width=\"50\"> ".$content['counter']."</td>
</tr>");
- $SW = 3 - $SW;
+ $SW = 3 - $SW;
+ }
}
- }
- if ((SQL_NUMROWS($guest_t10) > 0) || (SQL_NUMROWS($mem_t10) > 0)) {
- // Output footer
- OUTPUT_HTML("<tr>
+ if ((SQL_NUMROWS($guest_t10) > 0) || (SQL_NUMROWS($mem_t10) > 0)) {
+ // Output footer
+ OUTPUT_HTML("<tr>
<td align=\"center\" class=\"guest_stats_footer\" colspan=\"2\">
<a href=\"{!URL!}/modules.php?module=index&what=stats&mode=".$lmode."\">".$ltitle."</a>
</td>
</tr>
</table>");
- }
- break;
+ }
+ break;
-case 'INACTIVE': // Deactivated stats
- LOAD_TEMPLATE('admin_settings_saved', false, "<strong>{--GUEST_STATS_DEACTIVATED--}</strong>");
- break;
+ case 'INACTIVE': // Deactivated stats
+ LOAD_TEMPLATE('admin_settings_saved', false, "<strong>{--GUEST_STATS_DEACTIVATED--}</strong>");
+ break;
}
//
ORDER BY
total_logins DESC
LIMIT %s",
- array(getConfig('top10_max')), __FILE__, __LINE__);
+array(getConfig('top10_max')), __FILE__, __LINE__);
$OUT = ''; $SW = 2; $cnt = 1;
while ($content = SQL_FETCHARRAY($result)) {
tpoints DESC,
d.last_online DESC
LIMIT %s",
- array(getConfig('top10_max')), __FILE__, __LINE__);
+array(getConfig('top10_max')), __FILE__, __LINE__);
$OUT = ''; $SW = 2; $cnt = 1;
while ($content = SQL_FETCHARRAY($result)) {
refs DESC,
d.last_online DESC
LIMIT %s",
- array(getConfig('top10_max')), __FILE__, __LINE__);
+array(getConfig('top10_max')), __FILE__, __LINE__);
$OUT = ''; $SW = 2; $cnt = 1;
while ($content = SQL_FETCHARRAY($result)) {
$rdf->set_salt(md5(getConfig('SITE_KEY')));
$rdf->set_max_item(10);
$rdf->set_Options(
- array(
+array(
'textinput' => "hidden",
'sitelink' => "http://www.wds66.com",
'refid' => getConfig('wernis_refid'),
'reflink' => "/ref.php?refid=",
- )
+)
);
// Use proxy?
require($INC);
} elseif (!IS_LOGGED_IN()) {
redirectToUrl(URL."/modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("")) && (!IS_ADMIN())) {
+} elseif ((!EXT_IS_ACTIVE('')) && (!IS_ADMIN())) {
addFatalMessage(__FILE__, __LINE__, EXTENSION_PROBLEM_EXT_INACTIVE, "");
return;
} elseif ($BLOCK_MODE) {
// Load nickname
$data = 'nickname';
}
- else
+else
{
// Load userid
$data = 'userid';
$result = SQL_QUERY_ESC("SELECT userid, beg_points AS beg, last_online FROM `{!_MYSQL_PREFIX!}_user_data`
WHERE beg_points > 0 AND `status`='CONFIRMED'".$lastOnline."
ORDER BY beg_points DESC, last_online DESC, userid LIMIT %s",
- array($ONLINE, getConfig('beg_ranks')), __FILE__, __LINE__);
+array($ONLINE, getConfig('beg_ranks')), __FILE__, __LINE__);
// Reset temporary variable and check for users
$OUT = '';
WHERE ".$USE." > 0 AND `status`='CONFIRMED'".$lastOnline."
ORDER BY points DESC, last_online DESC, userid
LIMIT %s",
- array($ONLINE, getConfig('bonus_ranks')), __FILE__, __LINE__);
+array($ONLINE, getConfig('bonus_ranks')), __FILE__, __LINE__);
// Reset temporary variable and check for users
$OUT = '';
while ($content = SQL_FETCHARRAY($result)) {
// Prepare data for the template
$content = array(
- $content['sw'] = $SW;
- $content['cnt'] = $cnt;
- $content['uid'] = bigintval($content['uid']);
- $content['points'] = translateComma($content['points']);
- $content['last'] = generateDateTime($content['last'], '2');
+ 'sw' => $SW,
+ 'cnt' => $cnt,
+ 'uid' => bigintval($content['uid']),
+ 'points' => translateComma($content['points']),
+ 'last' => generateDateTime($content['last'], '2')
+ );
// Load row template
$OUT .= LOAD_TEMPLATE("member_bonus_row", true, $content);
// Count one up and switch colors
- $cnt++;$SW = 3 - $SW;
+ $cnt++; $SW = 3 - $SW;
}
} else {
// No one is interested in our "active rallye" ! :-(
case 'Y':
$sql = '';
$result_user = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_cats` WHERE userid=%s AND cat_id=%s LIMIT 1",
- array($UID, bigintval($cat)), __FILE__, __LINE__);
+ array($UID, bigintval($cat)), __FILE__, __LINE__);
if (SQL_NUMROWS($result_user) == 0) {
$sql = "INSERT INTO `{!_MYSQL_PREFIX!}_user_cats` (userid, cat_id) VALUES ('%s','%s')";
// Which mail-send-mode did the admin setup?
switch (getConfig('doubler_send_mode')) {
-case "DIRECT":
- define('DOUBLER_PAYOUT_TIME', getMessage('DOUBLER_PAYOUT_TIME_DIRECT'));
- break;
-
-case "RESET":
- define('DOUBLER_PAYOUT_TIME', getMessage('DOUBLER_PAYOUT_TIME_RESET'));
- break;
-
-default:
- define('DOUBLER_PAYOUT_TIME', sprintf(getMessage('DOUBLER_PAYOUT_TIME_UNKNOWN'), getConfig('doubler_send_mode')));
- DEBUG_LOG(__FILE__, __LINE__, constant('DOUBLER_PAYOUT_TIME'));
- break;
+ case "DIRECT":
+ define('DOUBLER_PAYOUT_TIME', getMessage('DOUBLER_PAYOUT_TIME_DIRECT'));
+ break;
+
+ case "RESET":
+ define('DOUBLER_PAYOUT_TIME', getMessage('DOUBLER_PAYOUT_TIME_RESET'));
+ break;
+
+ default:
+ define('DOUBLER_PAYOUT_TIME', sprintf(getMessage('DOUBLER_PAYOUT_TIME_UNKNOWN'), getConfig('doubler_send_mode')));
+ DEBUG_LOG(__FILE__, __LINE__, constant('DOUBLER_PAYOUT_TIME'));
+ break;
}
// Generate table with already payed out doubles
} else {
// Everything went okay so let's store his request and send mails
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_holidays` (userid, holiday_start, holiday_end, comments) VALUES ('%s','%s','%s','%s')",
- array(getUserId(), $START, $END, REQUEST_POST('comments')), __FILE__, __LINE__);
+ array(getUserId(), $START, $END, REQUEST_POST('comments')), __FILE__, __LINE__);
// Activate holiday system
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data`
SET `holiday_active`='N', holiday_activated=UNIX_TIMESTAMP()
WHERE userid=%s LIMIT 1",
- array(getUserId()), __FILE__, __LINE__);
+ array(getUserId()), __FILE__, __LINE__);
// Prepare constants
define('_START_DAY' , REQUEST_POST('start_day'));
// Create task
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_task_system` (userid, assigned_admin, status, task_type, subject, text, task_created) VALUES ('%s','0','NEW','HOLIDAY_REQUEST','{--HOLIDAY_ADMIN_SUBJECT--}','%s', UNIX_TIMESTAMP())",
- array(getUserId(), $msg), __FILE__, __LINE__);
+ array(getUserId(), $msg), __FILE__, __LINE__);
// Display message
LOAD_TEMPLATE('admin_settings_saved', false, getMessage('HOLIDAY_IS_ACTIVATED_NOW'));
}
// Holiday shall be ended now
-if (REQUEST_ISSET_POST(('stop'))) {
+if (REQUEST_ISSET_POST('stop')) {
// Okay, end the holiday here...
$result = SQL_QUERY_ESC("SELECT holiday_active, holiday_activated FROM `{!_MYSQL_PREFIX!}_user_data`
WHERE userid=%s LIMIT 1", array(getUserId()), __FILE__, __LINE__);
}
// If something is wrong or link in menu is just clicked display form
-if ((!IS_FORM_SENT()) && (!REQUEST_ISSET_POST(('stop'))) {
+if ((!IS_FORM_SENT()) && (!REQUEST_ISSET_POST('stop'))) {
// Check if user is in holiday...
$result = SQL_QUERY_ESC("SELECT holiday_active, holiday_activated FROM `{!_MYSQL_PREFIX!}_user_data`
WHERE userid=%s LIMIT 1", array(getUserId()), __FILE__, __LINE__);
// User can deactivate his holiday request
switch ($active)
{
- case 'Y': // Display deactivation form
- // Load starting and ending date
- $result = SQL_QUERY_ESC("SELECT holiday_start, holiday_end FROM `{!_MYSQL_PREFIX!}_user_holidays`
+ case 'Y': // Display deactivation form
+ // Load starting and ending date
+ $result = SQL_QUERY_ESC("SELECT holiday_start, holiday_end FROM `{!_MYSQL_PREFIX!}_user_holidays`
WHERE userid=%s LIMIT 1", array(getUserId()), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 1) {
- // Data was found
- list($start, $end) = SQL_FETCHROW($result);
- SQL_FREERESULT($result);
-
- // Prepare it for the template
- define('__HOLIDAY_START', generateDateTime($start , '3'));
- define('__HOLIDAY_END' , generateDateTime($end , '3'));
- define('__HOLIDAY_LOCK' , generateDateTime($locked, '1'));
-
- // Load template
- LOAD_TEMPLATE('member_holiday_deactivate');
- } else {
- // Free memory
- SQL_FREERESULT($result);
-
- // Remove entry and reload URL
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data`
+ if (SQL_NUMROWS($result) == 1) {
+ // Data was found
+ list($start, $end) = SQL_FETCHROW($result);
+ SQL_FREERESULT($result);
+
+ // Prepare it for the template
+ define('__HOLIDAY_START', generateDateTime($start , '3'));
+ define('__HOLIDAY_END' , generateDateTime($end , '3'));
+ define('__HOLIDAY_LOCK' , generateDateTime($locked, '1'));
+
+ // Load template
+ LOAD_TEMPLATE('member_holiday_deactivate');
+ } else {
+ // Free memory
+ SQL_FREERESULT($result);
+
+ // Remove entry and reload URL
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data`
SET `holiday_active`='N'
WHERE userid=%s LIMIT 1", array(getUserId()), __FILE__, __LINE__);
- redirectToUrl('modules.php?module=login&what=holiday');
- return;
- }
- break;
-
- case 'N': // Display activation form
- // Starting day
- define('_START_DAY' , ADD_SELECTION('day' , date('d', (time() + getConfig('one_day'))), 'start'));
- define('_START_MONTH', ADD_SELECTION('month', date('m', (time() + getConfig('one_day'))), 'start'));
- define('_START_YEAR' , ADD_SELECTION('year' , date('Y', (time() + getConfig('one_day'))), 'start'));
-
- // Calcualte ending date
- $D = date('d', time() + getConfig('one_day') + (getConfig('one_day') * getConfig('holiday_max')));
- $M = date('m', time() + getConfig('one_day') + (getConfig('one_day') * getConfig('holiday_max')));
- $Y = date('Y', time() + getConfig('one_day') + (getConfig('one_day') * getConfig('holiday_max')));
-
- // Ending day
- define('_END_DAY' , ADD_SELECTION('day' , $D, 'end'));
- define('_END_MONTH', ADD_SELECTION('month', $M, 'end'));
- define('_END_YEAR' , ADD_SELECTION('year' , $Y, 'end'));
-
- // Copy value from configuration
- define('__HOLIDAY_MAX', getConfig('holiday_max'));
-
- // Output form
- LOAD_TEMPLATE('member_holiday_form');
- break;
+ redirectToUrl('modules.php?module=login&what=holiday');
+ return;
+ }
+ break;
+
+ case 'N': // Display activation form
+ // Starting day
+ define('_START_DAY' , ADD_SELECTION('day' , date('d', (time() + getConfig('one_day'))), 'start'));
+ define('_START_MONTH', ADD_SELECTION('month', date('m', (time() + getConfig('one_day'))), 'start'));
+ define('_START_YEAR' , ADD_SELECTION('year' , date('Y', (time() + getConfig('one_day'))), 'start'));
+
+ // Calcualte ending date
+ $D = date('d', time() + getConfig('one_day') + (getConfig('one_day') * getConfig('holiday_max')));
+ $M = date('m', time() + getConfig('one_day') + (getConfig('one_day') * getConfig('holiday_max')));
+ $Y = date('Y', time() + getConfig('one_day') + (getConfig('one_day') * getConfig('holiday_max')));
+
+ // Ending day
+ define('_END_DAY' , ADD_SELECTION('day' , $D, 'end'));
+ define('_END_MONTH', ADD_SELECTION('month', $M, 'end'));
+ define('_END_YEAR' , ADD_SELECTION('year' , $Y, 'end'));
+
+ // Copy value from configuration
+ define('__HOLIDAY_MAX', getConfig('holiday_max'));
+
+ // Output form
+ LOAD_TEMPLATE('member_holiday_form');
+ break;
}
} else {
// To fast!
if (IS_FORM_SENT()) {
// Save settings
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `html`='%s' WHERE userid=%s LIMIT 1",
- array(REQUEST_POST('html'), getUserId()), __FILE__, __LINE__);
+ array(REQUEST_POST('html'), getUserId()), __FILE__, __LINE__);
LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_SETTINGS_SAVED'));
} else {
// Load template for changing settings
$result = SQL_QUERY_ESC("SELECT html FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(getUserId()), __FILE__, __LINE__);
+ array(getUserId()), __FILE__, __LINE__);
list($mode) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
switch ($mode)
{
-case 'show': // Show his data
- if (EXT_IS_ACTIVE('country', true)) {
- // New way 0 1 2 3 4 5 6 7 8 9 10 11 12 13
- $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country_code, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
+ case 'show': // Show his data
+ if (EXT_IS_ACTIVE('country', true)) {
+ // New way 0 1 2 3 4 5 6 7 8 9 10 11 12 13
+ $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country_code, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
array(getUserId()), __FILE__, __LINE__);
- } else {
- // Old way 0 1 2 3 4 5 6 7 8 9 10 11 12 13
- $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
+ } else {
+ // Old way 0 1 2 3 4 5 6 7 8 9 10 11 12 13
+ $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
array(getUserId()), __FILE__, __LINE__);
- }
- $DATA = SQL_FETCHROW($result);
- SQL_FREERESULT($result);
-
- // Translate / add some things
- $DATA[10] = translateGender($DATA[10]);
- $DATA[13] = generateDateTime($DATA[13], '0');
-
- // How far is last change on his profile away from now?
- if ((($DATA[13] + getConfig('profile_lock')) > time()) && (!IS_ADMIN()) && (getConfig('profile_lock') > 0)) {
- // You cannot change your account
- define('CHANGE', "<div class=\"member_failed\">".sprintf(getMessage('MEMBER_PROFILE_LOCKED'), generateDateTime($DATA[13] + getConfig('profile_lock'), '0'))."</div>");
- } else {
- // He is allowed to change his profile
- define('CHANGE', LOAD_TEMPLATE("member_mydata_button", true));
- }
-
- if (strlen($DATA[7]) == 1) $DATA[7] = '0'.$DATA[7];
- if (strlen($DATA[8]) == 1) $DATA[8] = '0'.$DATA[8];
-
- switch (getLanguage()) {
- case 'de': define('DOB', $DATA[7].'.'.$DATA[8].'.'.$DATA[9]); break;
- default : define('DOB', $DATA[8].'-'.$DATA[7].'-'.$DATA[9]); break;
- }
-
- if (EXT_IS_ACTIVE('country')) {
- // Load country's description and code
- $DATA[3] = COUNTRY_GENERATE_INFO($DATA[3]);
- }
-
- // Load template
- LOAD_TEMPLATE('member_mydata_overview');
- break;
-
-case 'edit': // Edit data
- if (EXT_IS_ACTIVE('country', true)) {
- // New way 0 1 2 3 4 5 6 7 8 9 10 11 12 13
- $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country_code, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update
-FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(constant('UID_VALUE')), __FILE__, __LINE__);
- } else {
- // Old way 0 1 2 3 4 5 6 7 8 9 10 11 12 13
- $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update
-FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(constant('UID_VALUE')), __FILE__, __LINE__);
- }
-
- $DATA = SQL_FETCHROW($result);
- SQL_FREERESULT($result);
- $DATA[13] = $DATA[12] + getConfig('profile_lock');
-
- // How far is last change on his profile away from now?
- if (($DATA[13] > time()) && (!IS_ADMIN()) && (getConfig('profile_lock') > 0)) {
- $DATA[13] = generateDateTime($DATA[13] + getConfig('profile_lock'), '0');
- // You cannot change your account
- LOAD_TEMPLATE('member_mydata_locked');
- } else {
- // He is allowed to change his profile
- switch ($DATA[10])
- {
- case 'M':
- define('M_DEFAULT', ' selected="selected"');
- define('F_DEFAULT', '');
- define('C_DEFAULT', '');
- break;
-
- case 'F':
- define('M_DEFAULT', '');
- define('F_DEFAULT', ' selected="selected"');
- define('C_DEFAULT', '');
- break;
-
- case 'C':
- define('M_DEFAULT', '');
- define('F_DEFAULT', '');
- define('C_DEFAULT', ' selected="selected"');
- break;
}
- $DOB = '';
- switch (getLanguage())
- {
- case 'de': // German date format
- // Day
- $DOB .= ADD_SELECTION('day', $DATA[7]);
-
- // Month
- $DOB .= ADD_SELECTION('month', $DATA[8]);
-
- // Year
- $DOB .= ADD_SELECTION('year', $DATA[9]);
- break;
-
- default: // Default is the US date format... :)
- break;
+ $DATA = SQL_FETCHROW($result);
+ SQL_FREERESULT($result);
+
+ // Translate / add some things
+ $DATA[10] = translateGender($DATA[10]);
+ $DATA[13] = generateDateTime($DATA[13], '0');
+
+ // How far is last change on his profile away from now?
+ if ((($DATA[13] + getConfig('profile_lock')) > time()) && (!IS_ADMIN()) && (getConfig('profile_lock') > 0)) {
+ // You cannot change your account
+ define('CHANGE', "<div class=\"member_failed\">".sprintf(getMessage('MEMBER_PROFILE_LOCKED'), generateDateTime($DATA[13] + getConfig('profile_lock'), '0'))."</div>");
+ } else {
+ // He is allowed to change his profile
+ define('CHANGE', LOAD_TEMPLATE("member_mydata_button", true));
}
- define('DOB', $DOB);
- define('MAX_REC_LIST', addMaxReceiveList('member', $DATA[11], true));
+ if (strlen($DATA[7]) == 1) $DATA[7] = '0'.$DATA[7];
+ if (strlen($DATA[8]) == 1) $DATA[8] = '0'.$DATA[8];
+
+ switch (getLanguage()) {
+ case 'de': define('DOB', $DATA[7].'.'.$DATA[8].'.'.$DATA[9]); break;
+ default : define('DOB', $DATA[8].'-'.$DATA[7].'-'.$DATA[9]); break;
+ }
if (EXT_IS_ACTIVE('country')) {
- // Generate selection box
- $OUT = "<select name=\"country_code\" class=\"member_select\" size=\"1\">\n";
- $whereStatement = "WHERE is_active='Y'";
- if (IS_ADMIN()) $whereStatement = '';
- $OUT .= generateOptionList("countries", "id", "descr", $DATA[3], "code", $whereStatement);
- $OUT .= "</select>";
- define('__COUNTRY_CONTENT', $OUT);
- } else {
- // Ouput default input box
- define('__COUNTRY_CONTENT', "<input type=\"text\" name=\"cntry\" class=\"member_normal\" size=\"2\" maxlength=\"3\" value=\"".$DATA[3]."\" />");
+ // Load country's description and code
+ $DATA[3] = COUNTRY_GENERATE_INFO($DATA[3]);
}
// Load template
- LOAD_TEMPLATE('member_mydata_edit');
- }
- break;
-
-case 'save': // Save entered data
- // Load old email / password: 0 1 2
- $result = SQL_QUERY_ESC("SELECT email, password, last_update FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(getUserId()), __FILE__, __LINE__);
- $DATA = SQL_FETCHROW($result);
- SQL_FREERESULT($result);
- $DATA[3] = $DATA[2] + getConfig('profile_lock');
-
- // How far is last change on his profile away from now?
- if (($DATA[3] > time()) && (!IS_ADMIN()) && (getConfig('profile_lock') > 0)) {
- $DATA[3] = generateDateTime($DATA[3] + getConfig('profile_lock'), '0');
- // You cannot change your account
- LOAD_TEMPLATE("member_mydata_locked");
- } elseif (!isEmailValid(REQUEST_POST('addy'))) {
- // Invalid email address!
- LOAD_TEMPLATE('admin_settings_saved', false, getMessage('INVALID_EMAIL_ADDRESS_ENTERED'));
- } else {
- // Generate hash
- $hash = generateHash(REQUEST_POST('pass1'), substr($DATA[1], 0, -40));
- if ((($hash == $DATA[1]) || (REQUEST_POST('pass1') == REQUEST_POST('pass2'))) && (REQUEST_ISSET_POST(('pass1')))) {
- // Only on simple changes normal mode is active = no email or password changed
- $mode = 'normal'; $AND = '';
-
- // Did the user changed the password?
- if ($hash != $DATA[1]) { $AND = ", password='".$hash."'"; $mode = 'pass'; }
-
- // Or did he changed his password?
- if (REQUEST_POST('addy') != $DATA[0]) {
- // Jupp
- if ($mode == 'normal') { $mode = 'email'; } else { $mode .= ";email"; }
- REQUEST_SET_POST('old_addy', $DATA[0]);
- }
-
- // Update member's profile
- if (EXT_IS_ACTIVE('country')) {
- // New way
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET
+ LOAD_TEMPLATE('member_mydata_overview');
+ break;
+
+ case 'edit': // Edit data
+ if (EXT_IS_ACTIVE('country', true)) {
+ // New way 0 1 2 3 4 5 6 7 8 9 10 11 12 13
+ $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country_code, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update
+FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
+ array(constant('UID_VALUE')), __FILE__, __LINE__);
+ } else {
+ // Old way 0 1 2 3 4 5 6 7 8 9 10 11 12 13
+ $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update
+FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
+ array(constant('UID_VALUE')), __FILE__, __LINE__);
+ }
+
+ $DATA = SQL_FETCHROW($result);
+ SQL_FREERESULT($result);
+ $DATA[13] = $DATA[12] + getConfig('profile_lock');
+
+ // How far is last change on his profile away from now?
+ if (($DATA[13] > time()) && (!IS_ADMIN()) && (getConfig('profile_lock') > 0)) {
+ $DATA[13] = generateDateTime($DATA[13] + getConfig('profile_lock'), '0');
+ // You cannot change your account
+ LOAD_TEMPLATE('member_mydata_locked');
+ } else {
+ // He is allowed to change his profile
+ switch ($DATA[10])
+ {
+ case 'M':
+ define('M_DEFAULT', ' selected="selected"');
+ define('F_DEFAULT', '');
+ define('C_DEFAULT', '');
+ break;
+
+ case 'F':
+ define('M_DEFAULT', '');
+ define('F_DEFAULT', ' selected="selected"');
+ define('C_DEFAULT', '');
+ break;
+
+ case 'C':
+ define('M_DEFAULT', '');
+ define('F_DEFAULT', '');
+ define('C_DEFAULT', ' selected="selected"');
+ break;
+ }
+ $DOB = '';
+ switch (getLanguage())
+ {
+ case 'de': // German date format
+ // Day
+ $DOB .= ADD_SELECTION('day', $DATA[7]);
+
+ // Month
+ $DOB .= ADD_SELECTION('month', $DATA[8]);
+
+ // Year
+ $DOB .= ADD_SELECTION('year', $DATA[9]);
+ break;
+
+ default: // Default is the US date format... :)
+ break;
+ }
+
+ define('DOB', $DOB);
+ define('MAX_REC_LIST', addMaxReceiveList('member', $DATA[11], true));
+
+ if (EXT_IS_ACTIVE('country')) {
+ // Generate selection box
+ $OUT = "<select name=\"country_code\" class=\"member_select\" size=\"1\">\n";
+ $whereStatement = "WHERE is_active='Y'";
+ if (IS_ADMIN()) $whereStatement = '';
+ $OUT .= generateOptionList("countries", "id", "descr", $DATA[3], "code", $whereStatement);
+ $OUT .= "</select>";
+ define('__COUNTRY_CONTENT', $OUT);
+ } else {
+ // Ouput default input box
+ define('__COUNTRY_CONTENT', "<input type=\"text\" name=\"cntry\" class=\"member_normal\" size=\"2\" maxlength=\"3\" value=\"".$DATA[3]."\" />");
+ }
+
+ // Load template
+ LOAD_TEMPLATE('member_mydata_edit');
+ }
+ break;
+
+ case 'save': // Save entered data
+ // Load old email / password: 0 1 2
+ $result = SQL_QUERY_ESC("SELECT email, password, last_update FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
+ array(getUserId()), __FILE__, __LINE__);
+ $DATA = SQL_FETCHROW($result);
+ SQL_FREERESULT($result);
+ $DATA[3] = $DATA[2] + getConfig('profile_lock');
+
+ // How far is last change on his profile away from now?
+ if (($DATA[3] > time()) && (!IS_ADMIN()) && (getConfig('profile_lock') > 0)) {
+ $DATA[3] = generateDateTime($DATA[3] + getConfig('profile_lock'), '0');
+ // You cannot change your account
+ LOAD_TEMPLATE("member_mydata_locked");
+ } elseif (!isEmailValid(REQUEST_POST('addy'))) {
+ // Invalid email address!
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('INVALID_EMAIL_ADDRESS_ENTERED'));
+ } else {
+ // Generate hash
+ $hash = generateHash(REQUEST_POST('pass1'), substr($DATA[1], 0, -40));
+ if ((($hash == $DATA[1]) || (REQUEST_POST('pass1') == REQUEST_POST('pass2'))) && (REQUEST_ISSET_POST(('pass1')))) {
+ // Only on simple changes normal mode is active = no email or password changed
+ $mode = 'normal'; $AND = '';
+
+ // Did the user changed the password?
+ if ($hash != $DATA[1]) { $AND = ", password='".$hash."'"; $mode = 'pass'; }
+
+ // Or did he changed his password?
+ if (REQUEST_POST('addy') != $DATA[0]) {
+ // Jupp
+ if ($mode == 'normal') { $mode = 'email'; } else { $mode .= ";email"; }
+ REQUEST_SET_POST('old_addy', $DATA[0]);
+ }
+
+ // Update member's profile
+ if (EXT_IS_ACTIVE('country')) {
+ // New way
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET
gender='%s', surname='%s', family='%s',
street_nr='%s',
country_code=%s, zip=%s, city='%s',
notified='N',
last_profile_sent=UNIX_TIMESTAMP()
WHERE userid=%s AND password='%s' LIMIT 1",
-array(
- REQUEST_POST('gender'),
- REQUEST_POST('surname'),
- REQUEST_POST('family'),
- REQUEST_POST('street_nr'),
- bigintval(REQUEST_POST('country_code')),
- bigintval(REQUEST_POST('zip')),
- REQUEST_POST('city'),
- REQUEST_POST('addy'),
- bigintval(REQUEST_POST('day')),
- bigintval(REQUEST_POST('month')),
- bigintval(REQUEST_POST('year')),
- bigintval(REQUEST_POST('max_mails')),
- UID_VALUE,
- getSession('u_hash')
- ), __FILE__, __LINE__);
- } else {
- // Old way
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET
+ array(
+ REQUEST_POST('gender'),
+ REQUEST_POST('surname'),
+ REQUEST_POST('family'),
+ REQUEST_POST('street_nr'),
+ bigintval(REQUEST_POST('country_code')),
+ bigintval(REQUEST_POST('zip')),
+ REQUEST_POST('city'),
+ REQUEST_POST('addy'),
+ bigintval(REQUEST_POST('day')),
+ bigintval(REQUEST_POST('month')),
+ bigintval(REQUEST_POST('year')),
+ bigintval(REQUEST_POST('max_mails')),
+ UID_VALUE,
+ getSession('u_hash')
+ ), __FILE__, __LINE__);
+ } else {
+ // Old way
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET
gender='%s', surname='%s', family='%s',
street_nr='%s',
country='%s', zip=%s, city='%s',
notified='N',
last_profile_sent=UNIX_TIMESTAMP()
WHERE userid=%s AND password='%s' LIMIT 1",
-array(
- REQUEST_POST('gender'),
- REQUEST_POST('surname'),
- REQUEST_POST('family'),
- REQUEST_POST('street_nr'),
- REQUEST_POST('cntry'),
- bigintval(REQUEST_POST('zip')),
- REQUEST_POST('city'),
- REQUEST_POST('addy'),
- bigintval(REQUEST_POST('day')),
- bigintval(REQUEST_POST('month')),
- bigintval(REQUEST_POST('year')),
- bigintval(REQUEST_POST('max_mails')),
- UID_VALUE,
- getSession('u_hash')
- ), __FILE__, __LINE__);
- }
-
- // Get all modes ...
- $modes = explode(';', $mode);
-
- // ... and run them through
- sendModeMails ('mydata', $modes);
- } else {
- // Entered wrong pass for updating profile
- LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEBER_UPDATE_PWD_WRONG'));
- }
- }
- break;
-
-case 'notify': // Switch off notfication
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET notified='N', last_update=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1",
- array(getUserId()), __FILE__, __LINE__);
- $URL = 'modules.php?module=login&what=welcome&msg=' . urlencode(getMessage('PROFILE_UPDATED'));
- break;
+ array(
+ REQUEST_POST('gender'),
+ REQUEST_POST('surname'),
+ REQUEST_POST('family'),
+ REQUEST_POST('street_nr'),
+ REQUEST_POST('cntry'),
+ bigintval(REQUEST_POST('zip')),
+ REQUEST_POST('city'),
+ REQUEST_POST('addy'),
+ bigintval(REQUEST_POST('day')),
+ bigintval(REQUEST_POST('month')),
+ bigintval(REQUEST_POST('year')),
+ bigintval(REQUEST_POST('max_mails')),
+ UID_VALUE,
+ getSession('u_hash')
+ ), __FILE__, __LINE__);
+ }
+
+ // Get all modes ...
+ $modes = explode(';', $mode);
+
+ // ... and run them through
+ sendModeMails ('mydata', $modes);
+ } else {
+ // Entered wrong pass for updating profile
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEBER_UPDATE_PWD_WRONG'));
+ }
+ }
+ break;
+
+ case 'notify': // Switch off notfication
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET notified='N', last_update=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1",
+ array(getUserId()), __FILE__, __LINE__);
+ $URL = 'modules.php?module=login&what=welcome&msg=' . urlencode(getMessage('PROFILE_UPDATED'));
+ break;
}
if (!empty($URL)) {
// Load status
$result = SQL_QUERY_ESC("SELECT nl_receive, nl_until, nl_timespan FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(getUserId()), __FILE__, __LINE__);
+array(getUserId()), __FILE__, __LINE__);
list($status, $until, $span) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
if ((IS_FORM_SENT()) && ($status == 'Y') && ($span == '0')) {
// Save request
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET nl_timespan='".(getConfig('one_day') * 30)."' WHERE userid=%s LIMIT 1",
- array(getUserId()), __FILE__, __LINE__);
+ array(getUserId()), __FILE__, __LINE__);
// Load admin message
$admin_msg = LOAD_EMAIL_TEMPLATE("admin_newsletter_request", array(), getUserId());
// Set status message and submit button
switch ($status)
{
- case 'Y': // Receives the newsletter
- define('__STATUS_VALUE', getMessage('NL_MEMBER_ON'));
- define('__UNTIL_VALUE' , '');
- define('NL_SUBMIT' , getMessage('NL_MEMBER_SUBMIT_OFF'));
- break;
+ case 'Y': // Receives the newsletter
+ define('__STATUS_VALUE', getMessage('NL_MEMBER_ON'));
+ define('__UNTIL_VALUE' , '');
+ define('NL_SUBMIT' , getMessage('NL_MEMBER_SUBMIT_OFF'));
+ break;
- case 'N': // Does not receive the newsletter
- define('__STATUS_VALUE', getMessage('NL_MEMBER_OFF'));
- define('__UNTIL_VALUE' , generateDateTime($until, '2'));
- define('NL_SUBMIT' , getMessage('NL_MEMBER_SUBMIT_ON'));
- break;
+ case 'N': // Does not receive the newsletter
+ define('__STATUS_VALUE', getMessage('NL_MEMBER_OFF'));
+ define('__UNTIL_VALUE' , generateDateTime($until, '2'));
+ define('NL_SUBMIT' , getMessage('NL_MEMBER_SUBMIT_ON'));
+ break;
}
// Load template and member settings
if ($isValid === true) {
// Look for nickname in database (we only need just one entry so don't worry about the "LIMIT 1" !
$result = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE nickname='%s' AND userid != '%s' LIMIT 1",
- array(REQUEST_POST('nickname'), getUserId()), __FILE__, __LINE__);
+ array(REQUEST_POST('nickname'), getUserId()), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 0) {
// Nickname not in use, so set it now
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET nickname='%s' WHERE userid=%s LIMIT 1",
- array(REQUEST_POST('nickname'), getUserId()), __FILE__, __LINE__);
+ array(REQUEST_POST('nickname'), getUserId()), __FILE__, __LINE__);
$content = getMessage('NICKNAME_SAVED');
} else {
// Free result
$result_mmails = SQL_QUERY_ESC("SELECT userid, receive_mails, mail_orders, ".$HOLIDAY."
FROM `{!_MYSQL_PREFIX!}_user_data`
WHERE userid=%s AND max_mails > 0 LIMIT 1",
- array(getUserId()), __FILE__, __LINE__);
+array(getUserId()), __FILE__, __LINE__);
$mmails = SQL_NUMROWS($result_mmails);
list($DMY, $MAXI, $ORDERS, $HOLIDAY) = SQL_FETCHROW($result_mmails);
$result = SQL_QUERY_ESC("SELECT id, data_type
FROM `{!_MYSQL_PREFIX!}_pool`
WHERE sender=%s AND url='%s' AND timestamp > (UNIX_TIMESTAMP() - %s) LIMIT 1",
- array(getUserId(), REQUEST_POST('url'), getConfig('url_tlock')), __FILE__, __LINE__);
+ array(getUserId(), REQUEST_POST('url'), getConfig('url_tlock')), __FILE__, __LINE__);
$type = "TEMP"; $id = 0;
if (SQL_NUMROWS($result) == 1) {
if (getConfig('url_blacklist') == 'Y') {
// Ok, I do that for you know...
$result = SQL_QUERY_ESC("SELECT UNIX_TIMESTAMP(`timestamp`) AS tstamp FROM `{!_MYSQL_PREFIX!}_url_blacklist` WHERE `url`='%s' LIMIT 1",
- array(REQUEST_POST('url')), __FILE__, __LINE__);
+ array(REQUEST_POST('url')), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Jupp, we got one listed
ON c.userid=d.userid
WHERE c.cat_id=%s AND c.userid != '%s' AND d.`status`='CONFIRMED' AND d.receive_mails > 0".$add."
ORDER BY d.%s %s",
- array(
- bigintval(REQUEST_POST('cat')),
- getUserId(),
- getConfig('order_select'),
- getConfig('order_mode'),
- ), __FILE__, __LINE__);
+ array(
+ bigintval(REQUEST_POST('cat')),
+ getUserId(),
+ getConfig('order_select'),
+ getConfig('order_mode'),
+ ), __FILE__, __LINE__);
// Do we enougth receivers left?
if (SQL_NUMROWS($result) >= REQUEST_POST('receiver')) {
// Check for his holiday status
$result_holiday = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_holidays`
WHERE userid=%s AND holiday_start < UNIX_TIMESTAMP() AND holiday_end > UNIX_TIMESTAMP() LIMIT 1",
- array(bigintval($content['userid'])), __FILE__, __LINE__);
- if (SQL_NUMROWS($result_holiday) == 1) $content['userid'] = 0; // Exclude user who are in holiday
+ array(bigintval($content['userid'])), __FILE__, __LINE__);
+ if (SQL_NUMROWS($result_holiday) == 1) $content['userid'] = 0; // Exclude user who are in holiday
// Free memory
SQL_FREERESULT($result_holiday);
// Update receiver list
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET receive_mails=receive_mails-1 WHERE userid IN (%s) LIMIT %s",
- array(str_replace(';', ", ", $RECEIVER), $MAX_SEND), __FILE__, __LINE__);
+ array(str_replace(';', ", ", $RECEIVER), $MAX_SEND), __FILE__, __LINE__);
// Is calculated max receivers larger than wanted receivers then reset it
if ($MAX_SEND > REQUEST_POST('receiver')) $MAX_SEND = REQUEST_POST('receiver');
// HTML extension is active
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_pool` (sender, subject, text, receivers, payment_id, data_type, timestamp, url, cat_id, target_send, zip, html_msg)
VALUES ('%s','%s','%s','%s','%s','TEMP','%s','%s','%s','%s','%s','%s')",
-array(
- getUserId(),
- REQUEST_POST('subject'),
- REQUEST_POST('text'),
- $RECEIVER,
- bigintval(REQUEST_POST('type')),
- $TIME,
- REQUEST_POST('url'),
- bigintval(REQUEST_POST('cat')),
- $MAX_SEND,
- bigintval(REQUEST_POST('zip')),
- REQUEST_POST('html')
-), __FILE__, __LINE__);
+ array(
+ getUserId(),
+ REQUEST_POST('subject'),
+ REQUEST_POST('text'),
+ $RECEIVER,
+ bigintval(REQUEST_POST('type')),
+ $TIME,
+ REQUEST_POST('url'),
+ bigintval(REQUEST_POST('cat')),
+ $MAX_SEND,
+ bigintval(REQUEST_POST('zip')),
+ REQUEST_POST('html')
+ ), __FILE__, __LINE__);
} else {
// No HTML extension is active
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_pool` (sender, subject, text, receivers, payment_id, data_type, timestamp, url, cat_id, target_send, zip)
VALUES ('%s','%s','%s','%s','%s','TEMP','%s','%s','%s','%s','%s')",
-array(
- getUserId(),
- REQUEST_POST('subject'),
- REQUEST_POST('text'),
- $RECEIVER,
- bigintval(REQUEST_POST('type')),
- $TIME,
- REQUEST_POST('url'),
- bigintval(REQUEST_POST('cat')),
- $MAX_SEND,
- bigintval(REQUEST_POST('zip')),
-), __FILE__, __LINE__);
+ array(
+ getUserId(),
+ REQUEST_POST('subject'),
+ REQUEST_POST('text'),
+ $RECEIVER,
+ bigintval(REQUEST_POST('type')),
+ $TIME,
+ REQUEST_POST('url'),
+ bigintval(REQUEST_POST('cat')),
+ $MAX_SEND,
+ bigintval(REQUEST_POST('zip')),
+ ), __FILE__, __LINE__);
}
} else {
// Change current order
zip=%s,
html_msg='%s'
WHERE `id`=%s LIMIT 1",
-array(
- REQUEST_POST('subject'),
- REQUEST_POST('text'),
- $RECEIVER,
- bigintval(REQUEST_POST('type')),
- REQUEST_POST('url'),
- bigintval(REQUEST_POST('cat')),
- $MAX_SEND,
- bigintval(REQUEST_POST('zip')),
- REQUEST_POST('html'),
- bigintval($id)
-), __FILE__, __LINE__);
+ array(
+ REQUEST_POST('subject'),
+ REQUEST_POST('text'),
+ $RECEIVER,
+ bigintval(REQUEST_POST('type')),
+ REQUEST_POST('url'),
+ bigintval(REQUEST_POST('cat')),
+ $MAX_SEND,
+ bigintval(REQUEST_POST('zip')),
+ REQUEST_POST('html'),
+ bigintval($id)
+ ), __FILE__, __LINE__);
} else {
// No HTML extension is active
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET
target_send=%s,
zip=%s
WHERE `id`=%s LIMIT 1",
-array(
- REQUEST_POST('subject'),
- REQUEST_POST('text'),
- $RECEIVER,
- bigintval(REQUEST_POST('type')),
- REQUEST_POST('url'),
- bigintval(REQUEST_POST('cat')),
- $MAX_SEND,
- bigintval(REQUEST_POST('zip')),
- bigintval($id)
-), __FILE__, __LINE__);
+ array(
+ REQUEST_POST('subject'),
+ REQUEST_POST('text'),
+ $RECEIVER,
+ bigintval(REQUEST_POST('type')),
+ REQUEST_POST('url'),
+ bigintval(REQUEST_POST('cat')),
+ $MAX_SEND,
+ bigintval(REQUEST_POST('zip')),
+ bigintval($id)
+ ), __FILE__, __LINE__);
}
}
// Order is placed as temporary. We need to get it's id for the frametester
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_pool` WHERE sender=%s AND subject='%s' AND payment_id=%s AND data_type='TEMP' AND timestamp=%s LIMIT 1",
array(
- getUserId(),
- REQUEST_POST('subject'),
- bigintval(REQUEST_POST('type')),
- $TIME
+ getUserId(),
+ REQUEST_POST('subject'),
+ bigintval(REQUEST_POST('type')),
+ $TIME
), __FILE__, __LINE__);
list($id) = SQL_FETCHROW($result);
// Select users in current category
$result_uids = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_cats` WHERE cat_id=%s AND userid != '%s' ORDER BY `userid` ASC",
- array(bigintval($content['id']), getUserId()), __FILE__, __LINE__);
+ array(bigintval($content['id']), getUserId()), __FILE__, __LINE__);
$uid_cnt = 0;
while (list($ucat) = SQL_FETCHROW($result_uids)) {
if (!$HOL_ACTIVE) {
// Check if the user want's to receive mails?
$result_ver = SQL_QUERY_ESC("SELECT zip FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s".$HTML." AND receive_mails > 0 AND `status`='CONFIRMED' LIMIT 1",
- array(bigintval($ucat)), __FILE__, __LINE__);
+ array(bigintval($ucat)), __FILE__, __LINE__);
if ((SQL_NUMROWS($result_ver) == 1) && (REQUEST_ISSET_POST('zip')) && (getConfig('order_multi_page') == 'Y')) {
list($zip) = SQL_FETCHROW($result_ver);
$message = '';
switch (REQUEST_GET('msg'))
{
- case getCode('URL_TLOCK'):
- $result = SQL_QUERY_ESC("SELECT timestamp FROM `{!_MYSQL_PREFIX!}_pool` WHERE `id`=%s LIMIT 1",
+ case getCode('URL_TLOCK'):
+ $result = SQL_QUERY_ESC("SELECT timestamp FROM `{!_MYSQL_PREFIX!}_pool` WHERE `id`=%s LIMIT 1",
array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
- // Load timestamp from last order
- list($LORDER) = SQL_FETCHROW($result);
- $LORDER = generateDateTime($LORDER, '1');
+ // Load timestamp from last order
+ list($LORDER) = SQL_FETCHROW($result);
+ $LORDER = generateDateTime($LORDER, '1');
- // Free memory
- SQL_FREERESULT($result);
+ // Free memory
+ SQL_FREERESULT($result);
- // Calculate hours...
- $STD = round(getConfig('url_tlock') / 60 / 60);
+ // Calculate hours...
+ $STD = round(getConfig('url_tlock') / 60 / 60);
- // Minutes...
- $MIN = round((getConfig('url_tlock') - $STD * 60 * 60) / 60);
+ // Minutes...
+ $MIN = round((getConfig('url_tlock') - $STD * 60 * 60) / 60);
- // And seconds
- $SEC = getConfig('url_tlock') - $STD * 60 * 60 - $MIN * 60;
+ // And seconds
+ $SEC = getConfig('url_tlock') - $STD * 60 * 60 - $MIN * 60;
- // Finally contruct the message
- // @TODO Rewrite this old lost code to a template
- $message = "{--MEMBER_URL_TIME_LOCK--}<br />{--CONFIG_URL_TLOCK--} ".$STD."
+ // Finally contruct the message
+ // @TODO Rewrite this old lost code to a template
+ $message = "{--MEMBER_URL_TIME_LOCK--}<br />{--CONFIG_URL_TLOCK--} ".$STD."
{--_HOURS--}, ".$MIN." {--_MINUTES--} {--_AND--} ".$SEC." {--_SECONDS--}<br />
{--MEMBER_LAST_TLOCK--}: ".$LORDER;
- break;
+ break;
- case getCode('OVERLENGTH'):
- $message = getMessage('MEMBER_TEXT_OVERLENGTH');
- break;
+ case getCode('OVERLENGTH'):
+ $message = getMessage('MEMBER_TEXT_OVERLENGTH');
+ break;
- case getCode('URL_FOUND'):
- $message = getMessage('MEMBER_TEXT_CONTAINS_URL');
- break;
+ case getCode('URL_FOUND'):
+ $message = getMessage('MEMBER_TEXT_CONTAINS_URL');
+ break;
- case getCode('SUBJ_URL'):
- $message = getMessage('MEMBER_SUBJ_CONTAINS_URL');
- break;
+ case getCode('SUBJ_URL'):
+ $message = getMessage('MEMBER_SUBJ_CONTAINS_URL');
+ break;
- case getCode('BLIST_URL'):
- $message = "{--MEMBER_URL_BLACK_LISTED--}<br />\n{--MEMBER_BLIST_TIME--}: ".generateDateTime(REQUEST_GET('blist'), '0');
- break;
+ case getCode('BLIST_URL'):
+ $message = "{--MEMBER_URL_BLACK_LISTED--}<br />\n{--MEMBER_BLIST_TIME--}: ".generateDateTime(REQUEST_GET('blist'), '0');
+ break;
- case getCode('NO_RECS_LEFT'):
- $message = getMessage('MEMBER_SELECTED_MORE_RECS');
- break;
+ case getCode('NO_RECS_LEFT'):
+ $message = getMessage('MEMBER_SELECTED_MORE_RECS');
+ break;
- case getCode('INVALID_TAGS'):
- $message = getMessage('MEMBER_HTML_INVALID_TAGS');
- break;
+ case getCode('INVALID_TAGS'):
+ $message = getMessage('MEMBER_HTML_INVALID_TAGS');
+ break;
- case getCode('MORE_POINTS'):
- $message = getMessage('MEMBER_MORE_POINTS_NEEDED');
- break;
+ case getCode('MORE_POINTS'):
+ $message = getMessage('MEMBER_MORE_POINTS_NEEDED');
+ break;
- case getCode('MORE_RECEIVERS1'):
- $message = getMessage('MEMBER_ENTER_MORE_RECEIVERS');
- break;
+ case getCode('MORE_RECEIVERS1'):
+ $message = getMessage('MEMBER_ENTER_MORE_RECEIVERS');
+ break;
- case getCode('MORE_RECEIVERS2'):
- $message = getMessage('MEMBER_NO_MORE_RECEIVERS_FOUND');
- break;
+ case getCode('MORE_RECEIVERS2'):
+ $message = getMessage('MEMBER_NO_MORE_RECEIVERS_FOUND');
+ break;
- case getCode('MORE_RECEIVERS3'):
- $message = sprintf(getMessage('MEMBER_ENTER_MORE_MIN_RECEIVERS'), getConfig('order_min'));
- break;
+ case getCode('MORE_RECEIVERS3'):
+ $message = sprintf(getMessage('MEMBER_ENTER_MORE_MIN_RECEIVERS'), getConfig('order_min'));
+ break;
- case getCode('INVALID_URL'):
- $message = getMessage('MEMBER_ENTER_INVALID_URL');
- break;
+ case getCode('INVALID_URL'):
+ $message = getMessage('MEMBER_ENTER_INVALID_URL');
+ break;
- case "": // When no error code is included in the URL we do not need to output an error message as well...
- break;
+ case "": // When no error code is included in the URL we do not need to output an error message as well...
+ break;
- default:
- DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown error code %s detected.", REQUEST_GET('msg')));
- $message = sprintf(getMessage('UNKNOWN_CODE'), REQUEST_GET('msg'));
- break;
+ default:
+ DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown error code %s detected.", REQUEST_GET('msg')));
+ $message = sprintf(getMessage('UNKNOWN_CODE'), REQUEST_GET('msg'));
+ break;
}
if (!empty($message)) {
// Check how many mail orders he has placed today and how many he's allowed to send
switch (getConfig('order_max_full'))
{
- case 'MAX': // He is allowed to send as much as possible
- define('ORDER_MAX_VALUE', getMessage('MEMBER_ORDER_ALLOWED_MAX'));
- break;
-
- case 'ORDER': // He is allowed to send as much as he setup the receiving value
- define('ORDER_MAX_VALUE', sprintf(getMessage('MEMBER_ORDER_ALLOWED_RECEIVE'), $ALLOWED, $MAXI));
- break;
-
- default: // Unknown/invalid
- DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown order_mas_full config detected.", getConfig('order_max_full')));
- define('ORDER_MAX_VALUE', getMessage('MEMBER_ORDER_ALLOWED_UNKNOWN'));
- break;
+ case 'MAX': // He is allowed to send as much as possible
+ define('ORDER_MAX_VALUE', getMessage('MEMBER_ORDER_ALLOWED_MAX'));
+ break;
+
+ case 'ORDER': // He is allowed to send as much as he setup the receiving value
+ define('ORDER_MAX_VALUE', sprintf(getMessage('MEMBER_ORDER_ALLOWED_RECEIVE'), $ALLOWED, $MAXI));
+ break;
+
+ default: // Unknown/invalid
+ DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown order_mas_full config detected.", getConfig('order_max_full')));
+ define('ORDER_MAX_VALUE', getMessage('MEMBER_ORDER_ALLOWED_UNKNOWN'));
+ break;
}
// Load final template
// Check if we already have an order placed and make it editable
$result = SQL_QUERY_ESC("SELECT subject, text, payment_id, timestamp, url, target_send, cat_id, zip FROM `{!_MYSQL_PREFIX!}_pool` WHERE sender=%s AND data_type='TEMP' LIMIT 1",
- array(getUserId()), __FILE__, __LINE__);
+ array(getUserId()), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Old order found
while ($content = SQL_FETCHARRAY($result_depths)) {
// Load referal points
$result_points = SQL_QUERY_ESC("SELECT points FROM `{!_MYSQL_PREFIX_user_points!}` WHERE userid=%s AND ref_depth=%d LIMIT 1",
- array(getUserId(), bigintval($content['level'])), __FILE__, __LINE__);
+ array(getUserId(), bigintval($content['level'])), __FILE__, __LINE__);
// Entry found?
if (SQL_NUMROWS($result_points) == 1) {
FROM `{!_MYSQL_PREFIX!}_payout_types`
WHERE %s >= min_points
ORDER BY type ASC",
- array(convertCommaToDot($TPTS)), __FILE__, __LINE__);
+ array(convertCommaToDot($TPTS)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Free memory
SQL_FREERESULT($result);
ON p.payout_id = t.id
WHERE p.userid = %s
ORDER BY p.payout_timestamp DESC",
- array(getUserId()), __FILE__, __LINE__);
+ array(getUserId()), __FILE__, __LINE__);
if (SQL_NUMROWS($result_payouts) > 0) {
// List all his requests
$OUT = ''; $SW = 2;
} else {
// Chedk if he can get paid by selected type
$result = SQL_QUERY_ESC("SELECT type, rate, min_points, allow_url AS allow FROM `{!_MYSQL_PREFIX!}_payout_types` WHERE `id`=%s LIMIT 1",
- array(bigintval(REQUEST_GET('payout'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('payout'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// ID is valid so load the data
// Banner/textlink ordered
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_payouts` (userid, payout_total, payout_id, payout_timestamp, status, target_url, link_text, banner_url)
VALUES (%s,%s,%s, UNIX_TIMESTAMP(), 'NEW','%s','%s','%s')",
- array(
- getUserId(),
- bigintval(REQUEST_POST('payout')),
- bigintval(REQUEST_GET('payout')),
- REQUEST_POST('turl'),
- REQUEST_POST('alt'),
- REQUEST_POST('banner')
-), __FILE__, __LINE__);
+ array(
+ getUserId(),
+ bigintval(REQUEST_POST('payout')),
+ bigintval(REQUEST_GET('payout')),
+ REQUEST_POST('turl'),
+ REQUEST_POST('alt'),
+ REQUEST_POST('banner')
+ ), __FILE__, __LINE__);
// Load templates
$msg_mem = LOAD_EMAIL_TEMPLATE("member_payout_request_banner", array(), getUserId());
// e-currency payout requested
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_payouts` (userid, payout_total, target_account, target_bank, payout_id, payout_timestamp, status, password)
VALUES (%s,%s,%s,'%s',%s, UNIX_TIMESTAMP(), 'NEW','%s')",
- array(
- getUserId(),
- bigintval(REQUEST_POST('payout')),
- bigintval(REQUEST_POST('account')),
- REQUEST_POST('bank'),
- bigintval(REQUEST_GET('payout')),
- REQUEST_POST('pass')
-), __FILE__, __LINE__);
+ array(
+ getUserId(),
+ bigintval(REQUEST_POST('payout')),
+ bigintval(REQUEST_POST('account')),
+ REQUEST_POST('bank'),
+ bigintval(REQUEST_GET('payout')),
+ REQUEST_POST('pass')
+ ), __FILE__, __LINE__);
// Load templates
$msg_mem = LOAD_EMAIL_TEMPLATE("member_payout_request", array(), getUserId());
// Generate task
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_task_system` (assigned_admin, status, task_type, subject, text, task_created, userid)
VALUES (0, 'NEW','PAYOUT_REQUEST','[payout:] {--PAYOUT_REQUEST_ADMIN--}','%s', UNIX_TIMESTAMP(), %s)",
- array(
- $msg_adm,
- getUserId()
-), __FILE__, __LINE__);
+ array(
+ $msg_adm,
+ getUserId()
+ ), __FILE__, __LINE__);
// Send out mails
sendEmail(getUserId(), getMessage('PAYOUT_REQUEST_MEMBER'), $msg_mem);
// Load referal counts
$result_refs = SQL_QUERY_ESC("SELECT counter FROM `{!_MYSQL_PREFIX!}_refsystem` WHERE userid=%s AND level='%s' LIMIT 1",
- array(getUserId(), bigintval($content['level'])), __FILE__, __LINE__);
+ array(getUserId(), bigintval($content['level'])), __FILE__, __LINE__);
if (SQL_NUMROWS($result_refs) == 1) {
list($REFS) = SQL_FETCHROW($result_refs);
SQL_FREERESULT($result_refs);
define('__REF_LEVEL_ROWS', $OUT);
$result = SQL_QUERY_ESC("SELECT used_points, ref_payout FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(getUserId()), __FILE__, __LINE__);
+array(getUserId()), __FILE__, __LINE__);
list($USED, $PAY) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
// Load data
$result = SQL_QUERY_ESC("SELECT login_bonus, turbo_bonus".$add." FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(getUserId()), __FILE__, __LINE__);
+ array(getUserId()), __FILE__, __LINE__);
// We don't add this points now. This will be done after each month
list($login, $turbo, $ref, $order, $stats) = SQL_FETCHROW($result);
// Get Primus id
$result = SQL_QUERY_ESC("SELECT primera_userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(getUserId()), __FILE__, __LINE__);
+ array(getUserId()), __FILE__, __LINE__);
// Are there some entries?
if (SQL_NUMROWS($result) == 1) {
// And load all rows!
$result = SQL_QUERY_ESC("SELECT `id`,`primera_account`,`primera_amount`,`primera_timestamp`,`primera_type` FROM `{!_MYSQL_PREFIX!}_user_primera` WHERE `userid` = %s ORDER BY `primera_timestamp` DESC",
- array(getUserId()), __FILE__, __LINE__);
+ array(getUserId()), __FILE__, __LINE__);
// Load all rows
$content['rows'] = ''; $SW = 2;
// Get Primera id
$content['primera_nickname'] = '';
$result = SQL_QUERY_ESC("SELECT primera_userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(getUserId()), __FILE__, __LINE__);
+ array(getUserId()), __FILE__, __LINE__);
// Are there some entries?
if (SQL_NUMROWS($result) == 1) {
// Update primera nickname
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `primera_userid`=%s WHERE userid=%s LIMIT 1",
- array(REQUEST_POST('primera_nickname'), getUserId()), __FILE__, __LINE__);
+ array(REQUEST_POST('primera_nickname'), getUserId()), __FILE__, __LINE__);
// All done!
LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PRIMERA_MEMBER_PAYOUT_DONE'));
FROM `{!_MYSQL_PREFIX!}_refdepths` AS r
WHERE r.level > 0
ORDER BY r.level ASC",
- array(getUserId()), __FILE__, __LINE__);
+array(getUserId()), __FILE__, __LINE__);
// Are there some entries? (Shall be!)
if (SQL_NUMROWS($result) > 0) {
// Load current referal clicks
$result = SQL_QUERY_ESC("SELECT ref_clicks FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(getUserId()), __FILE__, __LINE__);
+array(getUserId()), __FILE__, __LINE__);
list($c) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
if ($test == $content['url']) {
// Download banner (I hope you keep the banner on same server???)
$fp = sendGetRequest($content['url']); $bannerContent = '';
- if ((!empty($fp)) && (is_array($fp)) && (count($fp) > 0) {
+ if ((!empty($fp)) && (is_array($fp)) && (count($fp) > 0)) {
// Loads only found banner, when there is a 404 error this foreach() command
// will cause an "Invalid argument supplied for foreach()" error
foreach ($fp as $f) {
FROM `{!_MYSQL_PREFIX!}_refdepths` AS r
WHERE r.level > 0
ORDER BY r.level ASC",
- array(getUserId()), __FILE__, __LINE__);
+array(getUserId()), __FILE__, __LINE__);
// Are there some entries? (Shall be!)
if (SQL_NUMROWS($result) > 0) {
FROM `{!_MYSQL_PREFIX!}_pool`
WHERE sender=%s AND data_type != 'SEND'
ORDER BY timestamp DESC",
- array(getUserId()), __FILE__, __LINE__);
+array(getUserId()), __FILE__, __LINE__);
// Are there mails left in pool?
if (SQL_NUMROWS($result) > 0) {
FROM `{!_MYSQL_PREFIX!}_user_stats`
WHERE userid=%s
ORDER BY timestamp_ordered DESC",
- array(getUserId()), __FILE__, __LINE__);
+array(getUserId()), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Mail orders are in pool so we can display them
// Drop a message in the admin's area
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_task_system` (userid, assigned_admin, status, task_type, subject, text, task_created) VALUES ('%s','0','NEW','SUPPORT_MEMBER','%s','%s', UNIX_TIMESTAMP())",
- array(getUserId(), $subj_a, REQUEST_POST('qsummary') . ':'.array('text' => REQUEST_POST('qdetails'))), __FILE__, __LINE__);
+ array(getUserId(), $subj_a, REQUEST_POST('qsummary') . ':'.array('text' => REQUEST_POST('qdetails'))), __FILE__, __LINE__);
// Form sent
LOAD_TEMPLATE("member_support_contcted");
if (REQUEST_ISSET_POST(('member_theme'))) {
// Save theme to member's profile
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET curr_theme='%s' WHERE userid=%s LIMIT 1",
- array(REQUEST_POST('member_theme'), getUserId()), __FILE__, __LINE__);
+ array(REQUEST_POST('member_theme'), getUserId()), __FILE__, __LINE__);
// Set new theme for guests
$newTheme = SQL_ESCAPE(REQUEST_POST('member_theme'));
}
if (empty($OUT)) {
- // No themes found???
+ // No themes found???
$OUT = "<tr>
<td colspan=\"5\" class=\"bottom2\" height=\"80\">
".LOAD_TEMPLATE('admin_settings_saved', true, getMessage('MEMBER_NO_THEMES_FOUND'))."
// Load data
$result = SQL_QUERY_ESC("SELECT opt_in FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(getUserId()), __FILE__, __LINE__);
+array(getUserId()), __FILE__, __LINE__);
list($opt_in) = SQL_FETCHROW($result);
// Free memory
switch ($mode)
{
-case "new": // Start new transfer
- // Get total points and subtract the balance amount from it = maximum transferable points
- $total = GET_TOTAL_DATA(getUserId(), "user_points", "points") - GET_TOTAL_DATA(getUserId(), "user_data", "used_points");
-
- // Remember maximum value for template
- define('__TRANSFER_MAX_VALUE', round($total - getConfig('transfer_balance') - 0.5));
-
- if (IS_FORM_SENT()) {
- // Add new transfer
- if (getConfig('transfer_code') > 0) {
- // Check for code
- $code = generateRandomCodde(getConfig('transfer_code'), REQUEST_POST('code_chk'), getUserId(), constant('__TRANSFER_MAX_VALUE'));
- $valid_code = ($code == REQUEST_POST('code'));
- } else {
- // Zero length (= disabled) is always valid!
- $valid_code = true;
- }
+ case "new": // Start new transfer
+ // Get total points and subtract the balance amount from it = maximum transferable points
+ $total = GET_TOTAL_DATA(getUserId(), "user_points", "points") - GET_TOTAL_DATA(getUserId(), "user_data", "used_points");
+
+ // Remember maximum value for template
+ define('__TRANSFER_MAX_VALUE', round($total - getConfig('transfer_balance') - 0.5));
+
+ if (IS_FORM_SENT()) {
+ // Add new transfer
+ if (getConfig('transfer_code') > 0) {
+ // Check for code
+ $code = generateRandomCodde(getConfig('transfer_code'), REQUEST_POST('code_chk'), getUserId(), constant('__TRANSFER_MAX_VALUE'));
+ $valid_code = ($code == REQUEST_POST('code'));
+ } else {
+ // Zero length (= disabled) is always valid!
+ $valid_code = true;
+ }
- // Test password
- $valid_pass = ($pass == generateHash(REQUEST_POST('password'), $pass));
+ // Test password
+ $valid_pass = ($pass == generateHash(REQUEST_POST('password'), $pass));
- // Test transfer amount
- $valid_amount = ((REQUEST_ISSET_POST(('points'))) && (REQUEST_POST('points') <= constant('__TRANSFER_MAX_VALUE')));
+ // Test transfer amount
+ $valid_amount = ((REQUEST_ISSET_POST(('points'))) && (REQUEST_POST('points') <= constant('__TRANSFER_MAX_VALUE')));
- // Test reason for transfer
- $valid_reason = (REQUEST_ISSET_POST(('reason')));
+ // Test reason for transfer
+ $valid_reason = (REQUEST_ISSET_POST(('reason')));
- // Test if a recipient is selected
- $valid_recipient = (REQUEST_POST('to_uid') > 0);
+ // Test if a recipient is selected
+ $valid_recipient = (REQUEST_POST('to_uid') > 0);
- // Check for nickname extension and set additional data
- $nick = false; $add = ", userid";
- if (EXT_IS_ACTIVE('nickname')) {
- $add = ", nickname";
- $nick = true;
- }
+ // Check for nickname extension and set additional data
+ $nick = false; $add = ", userid";
+ if (EXT_IS_ACTIVE('nickname')) {
+ $add = ", nickname";
+ $nick = true;
+ }
- // Re-check receivers and own personal data
- $result = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email".$add." FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid IN ('%s','%s') AND `status`='CONFIRMED' ORDER BY userid LIMIT 2",
+ // Re-check receivers and own personal data
+ $result = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email".$add." FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid IN ('%s','%s') AND `status`='CONFIRMED' ORDER BY userid LIMIT 2",
array(getUserId(), bigintval(REQUEST_POST('to_uid'))), __FILE__, __LINE__);
- $valid_data = (SQL_NUMROWS($result) == 2);
-
- if ($valid_code && $valid_pass && $valid_amount && $valid_reason && $valid_recipient) {
- // Let's start the transfer and load user data
- list($uid1, $gender1, $sname1, $fname1, $email1, $nick1) = SQL_FETCHROW($result);
- list($uid2, $gender2, $sname2, $fname2, $email2, $nick2) = SQL_FETCHROW($result);
- SQL_FREERESULT($result);
- // @TODO Rewrite all these constants to array elements
- if ($uid1 == getUserId()) {
- // Data row 1 is sender's data
- define('__SENDER_GENDER' , translateGender($gender1));
- define('__SENDER_NICK' , $nick1);
- define('__SENDER_SNAME' , $sname1);
- define('__SENDER_FNAME' , $fname1);
- define('__SENDER_EMAIL' , $email1);
- // Data row 2 is recpient's data
- define('__RECIPIENT_GENDER', translateGender($gender2));
- define('__RECIPIENT_NICK' , $nick2);
- define('__RECIPIENT_SNAME' , $sname2);
- define('__RECIPIENT_FNAME' , $fname2);
- define('__RECIPIENT_EMAIL' , $email2);
-
- // Prepare variables for testing
- $TEST_NICK_SENDER = $nick1;
- $TEST_NICK_REC = $nick2;
- } else {
- // Data row 2 is sender's data
- define('__SENDER_GENDER' , translateGender($gender2));
- define('__SENDER_NICK' , $nick2);
- define('__SENDER_SNAME' , $sname2);
- define('__SENDER_FNAME' , $fname2);
- define('__SENDER_EMAIL' , $email2);
- // Data row 1 is recpient's data
- define('__RECIPIENT_GENDER', translateGender($gender1));
- define('__RECIPIENT_NICK' , $nick1);
- define('__RECIPIENT_SNAME' , $sname1);
- define('__RECIPIENT_FNAME' , $fname1);
- define('__RECIPIENT_EMAIL' , $email1);
-
- // Prepare variables for testing
- $TEST_NICK_SENDER = $nick2;
- $TEST_NICK_REC = $nick1;
- }
+ $valid_data = (SQL_NUMROWS($result) == 2);
+
+ if ($valid_code && $valid_pass && $valid_amount && $valid_reason && $valid_recipient) {
+ // Let's start the transfer and load user data
+ list($uid1, $gender1, $sname1, $fname1, $email1, $nick1) = SQL_FETCHROW($result);
+ list($uid2, $gender2, $sname2, $fname2, $email2, $nick2) = SQL_FETCHROW($result);
+ SQL_FREERESULT($result);
+ // @TODO Rewrite all these constants to array elements
+ if ($uid1 == getUserId()) {
+ // Data row 1 is sender's data
+ define('__SENDER_GENDER' , translateGender($gender1));
+ define('__SENDER_NICK' , $nick1);
+ define('__SENDER_SNAME' , $sname1);
+ define('__SENDER_FNAME' , $fname1);
+ define('__SENDER_EMAIL' , $email1);
+ // Data row 2 is recpient's data
+ define('__RECIPIENT_GENDER', translateGender($gender2));
+ define('__RECIPIENT_NICK' , $nick2);
+ define('__RECIPIENT_SNAME' , $sname2);
+ define('__RECIPIENT_FNAME' , $fname2);
+ define('__RECIPIENT_EMAIL' , $email2);
+
+ // Prepare variables for testing
+ $TEST_NICK_SENDER = $nick1;
+ $TEST_NICK_REC = $nick2;
+ } else {
+ // Data row 2 is sender's data
+ define('__SENDER_GENDER' , translateGender($gender2));
+ define('__SENDER_NICK' , $nick2);
+ define('__SENDER_SNAME' , $sname2);
+ define('__SENDER_FNAME' , $fname2);
+ define('__SENDER_EMAIL' , $email2);
+ // Data row 1 is recpient's data
+ define('__RECIPIENT_GENDER', translateGender($gender1));
+ define('__RECIPIENT_NICK' , $nick1);
+ define('__RECIPIENT_SNAME' , $sname1);
+ define('__RECIPIENT_FNAME' , $fname1);
+ define('__RECIPIENT_EMAIL' , $email1);
+
+ // Prepare variables for testing
+ $TEST_NICK_SENDER = $nick2;
+ $TEST_NICK_REC = $nick1;
+ }
- // Sender's UID is always currently stored in cookie userid...
- define('__SENDER_UID' , getUserId());
- define('__RECIPIENT_UID' , REQUEST_POST('to_uid'));
+ // Sender's UID is always currently stored in cookie userid...
+ define('__SENDER_UID' , getUserId());
+ define('__RECIPIENT_UID' , REQUEST_POST('to_uid'));
- $SENDER = constant('__SENDER_UID');
- $RECIPIENT = constant('__RECIPIENT_UID');
- if ($nick) {
- if (($TEST_NICK_SENDER != constant('__SENDER_UID')) && (!empty($TEST_NICK_SENDER))) {
- $SENDER = constant('__SENDER_NICK');
- }
+ $SENDER = constant('__SENDER_UID');
+ $RECIPIENT = constant('__RECIPIENT_UID');
+ if ($nick) {
+ if (($TEST_NICK_SENDER != constant('__SENDER_UID')) && (!empty($TEST_NICK_SENDER))) {
+ $SENDER = constant('__SENDER_NICK');
+ }
- if (($TEST_NICK_REC != constant('__RECIPIENT_UID')) && (!empty($TEST_NICK_REC))) {
- $RECIPIENT = constant('__RECIPIENT_NICK');
+ if (($TEST_NICK_REC != constant('__RECIPIENT_UID')) && (!empty($TEST_NICK_REC))) {
+ $RECIPIENT = constant('__RECIPIENT_NICK');
+ }
}
- }
- // Remember transfer reason and fancy date/time in constants
- define('__TRANSFER_REASON', REQUEST_POST('reason'));
- define('__TRANSFER_EXPIRES', createFancyTime(getConfig('transfer_age')));
+ // Remember transfer reason and fancy date/time in constants
+ define('__TRANSFER_REASON', REQUEST_POST('reason'));
+ define('__TRANSFER_EXPIRES', createFancyTime(getConfig('transfer_age')));
- // Generate tranafer id
- define('__TRANS_ID', bigintval(generateRandomCodde("10", mt_rand(0, 99999), getUserId(), REQUEST_POST('reason'))));
+ // Generate tranafer id
+ define('__TRANS_ID', bigintval(generateRandomCodde("10", mt_rand(0, 99999), getUserId(), REQUEST_POST('reason'))));
- // Add entries to both tables
- SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_transfers_in` (userid, from_uid, points, reason, time_trans, trans_id) VALUES ('%s','%s','%s','%s', UNIX_TIMESTAMP(),'%s')",
+ // Add entries to both tables
+ SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_transfers_in` (userid, from_uid, points, reason, time_trans, trans_id) VALUES ('%s','%s','%s','%s', UNIX_TIMESTAMP(),'%s')",
array(bigintval(REQUEST_POST('to_uid')), getUserId(), bigintval(REQUEST_POST('points')), REQUEST_POST('reason'), __TRANS_ID),
__FILE__, __LINE__);
- SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_transfers_out` (userid, to_uid, points, reason, time_trans, trans_id) VALUES ('%s','%s','%s','%s', UNIX_TIMESTAMP(),'%s')",
+ SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_transfers_out` (userid, to_uid, points, reason, time_trans, trans_id) VALUES ('%s','%s','%s','%s', UNIX_TIMESTAMP(),'%s')",
array(getUserId(), bigintval(REQUEST_POST('to_uid')), bigintval(REQUEST_POST('points')), REQUEST_POST('reason'), __TRANS_ID),
__FILE__, __LINE__);
- // Add points to account *directly* ...
- ADD_POINTS_REFSYSTEM_DIRECT('member_transfer', bigintval(REQUEST_POST('to_uid')), bigintval(REQUEST_POST('points')));
-
- // ... and add it to current user's used points
- SUB_POINTS('transfer', getUserId(), REQUEST_POST('points'));
-
- // First send email to recipient
- $msg = LOAD_EMAIL_TEMPLATE("member_transfer_recipient", '', constant('__RECIPIENT_UID'));
- sendEmail(constant('__RECIPIENT_EMAIL'), getMessage('TRANSFER_MEMBER_RECIPIENT_SUBJ').": ".$SENDER, $msg);
-
- // Second send email to sender
- $msg = LOAD_EMAIL_TEMPLATE("member_transfer_sender", '', constant('__SENDER_UID'));
- sendEmail(constant('__SENDER_EMAIL'), getMessage('TRANSFER_MEMBER_SENDER_SUBJ').": ".$RECIPIENT, $msg);
-
- // At last send admin mail(s)
- $ADMIN_SUBJ = sprintf("%s (%s->%s)", getMessage('TRANSFER_ADMIN_SUBJECT'), $SENDER, $RECIPIENT);
- sendAdminNotification($ADMIN_SUBJ, "admin_transfer_points");
-
- // Transfer is completed
- LOAD_TEMPLATE('admin_settings_saved', false, getMessage('TRANSFER_COMPLETED')."<br /><a href=\"{!URL!}/modules.php?module=login&what=transfer\">{--TRANSFER_CONTINUE_OVERVIEW--}</a>");
- } elseif (!$valid_code) {
- // Invalid Touring code!
- LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_CODE--}</div>");
- REQUEST_UNSET_POST('ok');
- } elseif (!$valid_pass) {
- // Wrong password entered
- LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_PASSWORD--}</div>");
- REQUEST_UNSET_POST('ok');
- } elseif (!$valid_amount) {
- // Too much points entered
- LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_POINTS--}</div>");
- REQUEST_UNSET_POST('ok');
- } elseif (!$valid_reason) {
- // No transfer reason entered
- LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_REASON--}</div>");
- REQUEST_UNSET_POST('ok');
- } elseif (!$valid_recipient) {
- // No recipient selected
- LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_RECIPIENT--}</div>");
- REQUEST_UNSET_POST('ok');
- } elseif (!$valid_data) {
- // No recipient selected
- LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_DATA--}</div>");
- REQUEST_UNSET_POST('ok');
+ // Add points to account *directly* ...
+ ADD_POINTS_REFSYSTEM_DIRECT('member_transfer', bigintval(REQUEST_POST('to_uid')), bigintval(REQUEST_POST('points')));
+
+ // ... and add it to current user's used points
+ SUB_POINTS('transfer', getUserId(), REQUEST_POST('points'));
+
+ // First send email to recipient
+ $msg = LOAD_EMAIL_TEMPLATE("member_transfer_recipient", '', constant('__RECIPIENT_UID'));
+ sendEmail(constant('__RECIPIENT_EMAIL'), getMessage('TRANSFER_MEMBER_RECIPIENT_SUBJ').": ".$SENDER, $msg);
+
+ // Second send email to sender
+ $msg = LOAD_EMAIL_TEMPLATE("member_transfer_sender", '', constant('__SENDER_UID'));
+ sendEmail(constant('__SENDER_EMAIL'), getMessage('TRANSFER_MEMBER_SENDER_SUBJ').": ".$RECIPIENT, $msg);
+
+ // At last send admin mail(s)
+ $ADMIN_SUBJ = sprintf("%s (%s->%s)", getMessage('TRANSFER_ADMIN_SUBJECT'), $SENDER, $RECIPIENT);
+ sendAdminNotification($ADMIN_SUBJ, "admin_transfer_points");
+
+ // Transfer is completed
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('TRANSFER_COMPLETED')."<br /><a href=\"{!URL!}/modules.php?module=login&what=transfer\">{--TRANSFER_CONTINUE_OVERVIEW--}</a>");
+ } elseif (!$valid_code) {
+ // Invalid Touring code!
+ LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_CODE--}</div>");
+ REQUEST_UNSET_POST('ok');
+ } elseif (!$valid_pass) {
+ // Wrong password entered
+ LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_PASSWORD--}</div>");
+ REQUEST_UNSET_POST('ok');
+ } elseif (!$valid_amount) {
+ // Too much points entered
+ LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_POINTS--}</div>");
+ REQUEST_UNSET_POST('ok');
+ } elseif (!$valid_reason) {
+ // No transfer reason entered
+ LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_REASON--}</div>");
+ REQUEST_UNSET_POST('ok');
+ } elseif (!$valid_recipient) {
+ // No recipient selected
+ LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_RECIPIENT--}</div>");
+ REQUEST_UNSET_POST('ok');
+ } elseif (!$valid_data) {
+ // No recipient selected
+ LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_note\">{--TRANSFER_INVALID_DATA--}</div>");
+ REQUEST_UNSET_POST('ok');
+ }
}
- }
- if (!IS_FORM_SENT()) {
- // Load member list
- if (EXT_IS_ACTIVE('nickname')) {
- // Load userid and nickname
- $result = SQL_QUERY_ESC("SELECT userid, nickname FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `status`='CONFIRMED' AND opt_in='Y' AND userid != '%s' ORDER BY `userid` ASC",
+ if (!IS_FORM_SENT()) {
+ // Load member list
+ if (EXT_IS_ACTIVE('nickname')) {
+ // Load userid and nickname
+ $result = SQL_QUERY_ESC("SELECT userid, nickname FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `status`='CONFIRMED' AND opt_in='Y' AND userid != '%s' ORDER BY `userid` ASC",
array(getUserId()), __FILE__, __LINE__);
- } else {
- // Load only userid
- $result = SQL_QUERY_ESC("SELECT userid, userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `status`='CONFIRMED' AND opt_in='Y' AND userid != '%s' ORDER BY `userid` ASC",
+ } else {
+ // Load only userid
+ $result = SQL_QUERY_ESC("SELECT userid, userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `status`='CONFIRMED' AND opt_in='Y' AND userid != '%s' ORDER BY `userid` ASC",
array(getUserId()), __FILE__, __LINE__);
- }
+ }
- if (SQL_NUMROWS($result) > 0) {
- // Load list
- $OUT = "<select name=\"to_uid\" size=\"1\" class=\"member_select\">
+ if (SQL_NUMROWS($result) > 0) {
+ // Load list
+ $OUT = "<select name=\"to_uid\" size=\"1\" class=\"member_select\">
<option value=\"0\">{--SELECT_NONE--}</option>\n";
- // @TODO Try to rewrite his to $content = SQL_FETCHARRAY(), see some lines above for two different queries
- while (list($uid, $nick) = SQL_FETCHROW($result)) {
- $OUT .= " <option value=\"".$uid."\"";
- if ((REQUEST_ISSET_POST(('to_uid'))) && (REQUEST_POST('to_uid') == $uid)) $OUT .= ' selected="selected"';
- $OUT .= ">";
- if (($nick != $uid) && (!empty($nick))) {
- // Output nickname
- $OUT .= $nick;
- } else {
- // Output userid
- $OUT .= $uid;
+ // @TODO Try to rewrite his to $content = SQL_FETCHARRAY(), see some lines above for two different queries
+ while (list($uid, $nick) = SQL_FETCHROW($result)) {
+ $OUT .= " <option value=\"".$uid."\"";
+ if ((REQUEST_ISSET_POST(('to_uid'))) && (REQUEST_POST('to_uid') == $uid)) $OUT .= ' selected="selected"';
+ $OUT .= ">";
+ if (($nick != $uid) && (!empty($nick))) {
+ // Output nickname
+ $OUT .= $nick;
+ } else {
+ // Output userid
+ $OUT .= $uid;
+ }
+ $OUT .= "</option>\n";
}
- $OUT .= "</option>\n";
+ $OUT .= "</select>\n";
+ define('__TRANSFER_TO_DISABLED', '');
+
+ // Free memory
+ SQL_FREERESULT($result);
+ } else {
+ // No one else is opt-in
+ $OUT = getMessage('TRANSFER_NO_ONE_ELSE_OPT_IN');
+ define('__TRANSFER_TO_DISABLED', " disabled");
}
- $OUT .= "</select>\n";
- define('__TRANSFER_TO_DISABLED', '');
- // Free memory
- SQL_FREERESULT($result);
- } else {
- // No one else is opt-in
- $OUT = getMessage('TRANSFER_NO_ONE_ELSE_OPT_IN');
- define('__TRANSFER_TO_DISABLED', " disabled");
- }
+ // Transfer output to constant for the template
+ define('__TRANSFER_USERID_SELECTION', $OUT);
- // Transfer output to constant for the template
- define('__TRANSFER_USERID_SELECTION', $OUT);
+ // Generate Code
+ if (getConfig('transfer_code') > 0) {
+ $rand = mt_rand(0, 99999);
+ $code = generateRandomCodde(getConfig('transfer_code'), $rand, getUserId(), constant('__TRANSFER_MAX_VALUE'));
+ $img = GENERATE_IMAGE($code, false);
+ define('__TRANSFER_IMAGE_INPUT', "<input type=\"hidden\" name=\"code_chk\" value=\"".$rand."\" /><input type=\"text\" name=\"code\" class=\"member_normal\" size=\"5\" maxlength=\"7\"{!__TRANSFER_TO_DISABLED!} /> ".$img);
+ } else {
+ $code = "00000";
+ define('__TRANSFER_IMAGE_INPUT', getMessage('TRANSFER_NO_CODE'));
+ }
- // Generate Code
- if (getConfig('transfer_code') > 0) {
- $rand = mt_rand(0, 99999);
- $code = generateRandomCodde(getConfig('transfer_code'), $rand, getUserId(), constant('__TRANSFER_MAX_VALUE'));
- $img = GENERATE_IMAGE($code, false);
- define('__TRANSFER_IMAGE_INPUT', "<input type=\"hidden\" name=\"code_chk\" value=\"".$rand."\" /><input type=\"text\" name=\"code\" class=\"member_normal\" size=\"5\" maxlength=\"7\"{!__TRANSFER_TO_DISABLED!} /> ".$img);
- } else {
- $code = "00000";
- define('__TRANSFER_IMAGE_INPUT', getMessage('TRANSFER_NO_CODE'));
- }
+ // Transfer maybe already entered valued'
+ if (REQUEST_ISSET_GET('ok')) {
+ // Get values from form
+ define('__TRANSFER_POINTS_VALUE', bigintval(REQUEST_POST('points')));
+ define('__TRANSFER_REASON_VALUE', strip_tags(REQUEST_POST('reason')));
+ } else {
+ // Set empty values
+ define('__TRANSFER_POINTS_VALUE', '');
+ define('__TRANSFER_REASON_VALUE', '');
+ }
- // Transfer maybe already entered valued'
- if (REQUEST_ISSET_GET('ok')) {
- // Get values from form
- define('__TRANSFER_POINTS_VALUE', bigintval(REQUEST_POST('points')));
- define('__TRANSFER_REASON_VALUE', strip_tags(REQUEST_POST('reason')));
- } else {
- // Set empty values
- define('__TRANSFER_POINTS_VALUE', '');
- define('__TRANSFER_REASON_VALUE', '');
+ // Output form
+ LOAD_TEMPLATE("member_transfer_new");
}
-
- // Output form
- LOAD_TEMPLATE("member_transfer_new");
- }
- break;
-
-case "list_in": // List only incoming transactions
-case "list_out": // List only outgoing transactions
- // As you can see I put list_in and list_out together. I now do a switch() again on it for the right SQL command
- switch ($mode)
- {
- case "list_in":
- $sql = "SELECT trans_id, from_uid, points, reason, time_trans FROM `{!_MYSQL_PREFIX!}_user_transfers_in` WHERE userid=%s ORDER BY time_trans DESC LIMIT ".getConfig('transfer_max');
- // @TODO Rewrite these constants
- $NOTHING = getMessage('TRANSFER_NO_INCOMING_TRANSFERS');
- define('__TRANSFER_SUM', getMessage('TRANSFER_TOTAL_INCOMING'));
- define('__TRANSFER_TITLE', getMessage('TRANSFER_LIST_INCOMING'));
break;
- case "list_out":
- $sql = "SELECT trans_id, to_uid, points, reason, time_trans FROM `{!_MYSQL_PREFIX!}_user_transfers_out` WHERE userid=%s ORDER BY time_trans DESC LIMIT ".getConfig('transfer_max');
- // @TODO Rewrite these constants
- $NOTHING = getMessage('TRANSFER_NO_OUTGOING_TRANSFERS');
- define('__TRANSFER_SUM', getMessage('TRANSFER_TOTAL_OUTGOING'));
- define('__TRANSFER_TITLE', getMessage('TRANSFER_LIST_OUTGOING'));
- break;
- }
-
- // Run the SQL command
- $total = 0;
- $result = SQL_QUERY_ESC($sql, array(getUserId()), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) > 0) {
- $OUT = ''; $SW = 2;
- // @TODO This should be somehow rewritten to $content = SQL_FETCHARRAY(), see switch() block above for SQL queries
- while (list($tid, $uid, $points, $reason, $stamp) = SQL_FETCHROW($result)) {
- // Rewrite points
- if ($type == "OUT") $points = $points.'-';
-
- // Prepare content for template
- $content = array(
+ case "list_in": // List only incoming transactions
+ case "list_out": // List only outgoing transactions
+ // As you can see I put list_in and list_out together. I now do a switch() again on it for the right SQL command
+ switch ($mode)
+ {
+ case "list_in":
+ $sql = "SELECT trans_id, from_uid, points, reason, time_trans FROM `{!_MYSQL_PREFIX!}_user_transfers_in` WHERE userid=%s ORDER BY time_trans DESC LIMIT ".getConfig('transfer_max');
+ // @TODO Rewrite these constants
+ $NOTHING = getMessage('TRANSFER_NO_INCOMING_TRANSFERS');
+ define('__TRANSFER_SUM', getMessage('TRANSFER_TOTAL_INCOMING'));
+ define('__TRANSFER_TITLE', getMessage('TRANSFER_LIST_INCOMING'));
+ break;
+
+ case "list_out":
+ $sql = "SELECT trans_id, to_uid, points, reason, time_trans FROM `{!_MYSQL_PREFIX!}_user_transfers_out` WHERE userid=%s ORDER BY time_trans DESC LIMIT ".getConfig('transfer_max');
+ // @TODO Rewrite these constants
+ $NOTHING = getMessage('TRANSFER_NO_OUTGOING_TRANSFERS');
+ define('__TRANSFER_SUM', getMessage('TRANSFER_TOTAL_OUTGOING'));
+ define('__TRANSFER_TITLE', getMessage('TRANSFER_LIST_OUTGOING'));
+ break;
+ }
+
+ // Run the SQL command
+ $total = 0;
+ $result = SQL_QUERY_ESC($sql, array(getUserId()), __FILE__, __LINE__);
+ if (SQL_NUMROWS($result) > 0) {
+ $OUT = ''; $SW = 2;
+ // @TODO This should be somehow rewritten to $content = SQL_FETCHARRAY(), see switch() block above for SQL queries
+ while (list($tid, $uid, $points, $reason, $stamp) = SQL_FETCHROW($result)) {
+ // Rewrite points
+ if ($type == "OUT") $points = $points.'-';
+
+ // Prepare content for template
+ $content = array(
'sw' => $SW,
'tid' => $id,
'stamp' => generateDateTime($stamp, '3'),
'uid' => $uid,
'reason' => $reason,
'points' => translateComma($points)
- );
+ );
- // Load row template
- $OUT .= LOAD_TEMPLATE("member_transfer_row2", true, $content);
+ // Load row template
+ $OUT .= LOAD_TEMPLATE("member_transfer_row2", true, $content);
- // Add points and switch color
- $total += $points;
- $SW = 3 - $SW;
- }
+ // Add points and switch color
+ $total += $points;
+ $SW = 3 - $SW;
+ }
- // Free memory
- SQL_FREERESULT($result);
- } else {
- // Nothing for in or out
- $OUT = "<tr>
+ // Free memory
+ SQL_FREERESULT($result);
+ } else {
+ // Nothing for in or out
+ $OUT = "<tr>
<td colspan=\"5\" align=\"center\" class=\"bottom2\" height=\"70\">
".LOAD_TEMPLATE('admin_settings_saved', true, $NOTHING)."
</td>
</tr>";
- }
-
- // ... and add them to a constant for the template
- // @TODO Rewrite these constants
- define('__TRANSFER_ROWS', $OUT);
-
- // Remeber total amount
- define('__TRANSFER_TOTAL_VALUE', $total);
-
- // Load final template
- LOAD_TEMPLATE("member_transfer_list");
- break;
-
-case "list_all": // List all transactions
- // We fill a temporary table with data from both tables. This is much easier
- // to code and unstand by you as sub-SELECT queries. I know this is not the
- // fastest way but it shall be fine for now.
- //
- // First of all create the temporary table
- $result = SQL_QUERY("CREATE TEMPORARY TABLE `{!_MYSQL_PREFIX!}_transfers_tmp` (
+ }
+
+ // ... and add them to a constant for the template
+ // @TODO Rewrite these constants
+ define('__TRANSFER_ROWS', $OUT);
+
+ // Remeber total amount
+ define('__TRANSFER_TOTAL_VALUE', $total);
+
+ // Load final template
+ LOAD_TEMPLATE("member_transfer_list");
+ break;
+
+ case "list_all": // List all transactions
+ // We fill a temporary table with data from both tables. This is much easier
+ // to code and unstand by you as sub-SELECT queries. I know this is not the
+ // fastest way but it shall be fine for now.
+ //
+ // First of all create the temporary table
+ $result = SQL_QUERY("CREATE TEMPORARY TABLE `{!_MYSQL_PREFIX!}_transfers_tmp` (
trans_id VARCHAR(12) NOT NULL DEFAULT '',
party_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
points BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
KEY(party_uid)
) TYPE=HEAP", __FILE__, __LINE__);
- // Let's begin with the incoming list
- $result = SQL_QUERY_ESC("SELECT trans_id, from_uid, points, reason, time_trans FROM `{!_MYSQL_PREFIX!}_user_transfers_in` WHERE userid=%s ORDER BY `id` LIMIT %s",
-array(getUserId(), getConfig('transfer_max')), __FILE__, __LINE__);
- while ($DATA = SQL_FETCHROW($result)) {
- $DATA[] = "IN";
- $DATA = implode("','", $DATA);
- $res_temp = SQL_QUERY("INSERT INTO `{!_MYSQL_PREFIX!}_transfers_tmp` (trans_id, party_uid, points, reason, time_trans, trans_type) VALUES ('".$DATA."')", __FILE__, __LINE__);
- }
-
- // Free memory
- SQL_FREERESULT($result);
-
- // As the last table transfer data from outgoing table to temporary
- $result = SQL_QUERY_ESC("SELECT trans_id, to_uid, points, reason, time_trans FROM `{!_MYSQL_PREFIX!}_user_transfers_out` WHERE userid=%s ORDER BY `id` LIMIT %s",
-array(getUserId(), getConfig('transfer_max')), __FILE__, __LINE__);
- while ($DATA = SQL_FETCHROW($result)) {
- $DATA[] = "OUT";
- $DATA = implode("','", $DATA);
- $res_temp = SQL_QUERY("INSERT INTO `{!_MYSQL_PREFIX!}_transfers_tmp` (trans_id, party_uid, points, reason, time_trans, trans_type) VALUES ('".$DATA."')", __FILE__, __LINE__);
- }
-
- // Free memory
- SQL_FREERESULT($result);
-
- $total = 0;
- if (SQL_NUMROWS($result) > 0) {
- // Search for entries
- $result = SQL_QUERY("SELECT party_uid, trans_id, points, reason, time_trans, trans_type FROM `{!_MYSQL_PREFIX!}_transfers_tmp` ORDER BY time_trans DESC",
- __FILE__, __LINE__);
-
- // Output rows
- $OUT = ''; $SW = 2;
- while ($content = SQL_FETCHARRAY($result)) {
- // Rewrite points
- if ($content['trans_type'] == "OUT") $content['points'] = '-'.$content['points']."";
-
- // Prepare content for template
- $content['sw'] = $SW;
- $content['time'] = generateDateTime($content['time_trans'], '3');
- $content['points'] = translateComma($content['points']);
-
- // Load row template
- $OUT .= LOAD_TEMPLATE("member_transfer_row", true, $content);
-
- // Add points and switch color
- $total += $content['points'];
- $SW = 3 - $SW;
- }
+ // Let's begin with the incoming list
+ $result = SQL_QUERY_ESC("SELECT trans_id, from_uid, points, reason, time_trans FROM `{!_MYSQL_PREFIX!}_user_transfers_in` WHERE userid=%s ORDER BY `id` LIMIT %s",
+ array(getUserId(), getConfig('transfer_max')), __FILE__, __LINE__);
+ while ($DATA = SQL_FETCHROW($result)) {
+ $DATA[] = "IN";
+ $DATA = implode("','", $DATA);
+ $res_temp = SQL_QUERY("INSERT INTO `{!_MYSQL_PREFIX!}_transfers_tmp` (trans_id, party_uid, points, reason, time_trans, trans_type) VALUES ('".$DATA."')", __FILE__, __LINE__);
+ }
+
+ // Free memory
+ SQL_FREERESULT($result);
+
+ // As the last table transfer data from outgoing table to temporary
+ $result = SQL_QUERY_ESC("SELECT trans_id, to_uid, points, reason, time_trans FROM `{!_MYSQL_PREFIX!}_user_transfers_out` WHERE userid=%s ORDER BY `id` LIMIT %s",
+ array(getUserId(), getConfig('transfer_max')), __FILE__, __LINE__);
+ while ($DATA = SQL_FETCHROW($result)) {
+ $DATA[] = "OUT";
+ $DATA = implode("','", $DATA);
+ $res_temp = SQL_QUERY("INSERT INTO `{!_MYSQL_PREFIX!}_transfers_tmp` (trans_id, party_uid, points, reason, time_trans, trans_type) VALUES ('".$DATA."')", __FILE__, __LINE__);
+ }
+
+ // Free memory
+ SQL_FREERESULT($result);
- // Free memory
- SQL_FREERESULT($result);
- } else {
- // Nothing for in and out
- $OUT = "<tr>
+ $total = 0;
+ if (SQL_NUMROWS($result) > 0) {
+ // Search for entries
+ $result = SQL_QUERY("SELECT party_uid, trans_id, points, reason, time_trans, trans_type FROM `{!_MYSQL_PREFIX!}_transfers_tmp` ORDER BY time_trans DESC",
+ __FILE__, __LINE__);
+
+ // Output rows
+ $OUT = ''; $SW = 2;
+ while ($content = SQL_FETCHARRAY($result)) {
+ // Rewrite points
+ if ($content['trans_type'] == "OUT") $content['points'] = '-'.$content['points']."";
+
+ // Prepare content for template
+ $content['sw'] = $SW;
+ $content['time'] = generateDateTime($content['time_trans'], '3');
+ $content['points'] = translateComma($content['points']);
+
+ // Load row template
+ $OUT .= LOAD_TEMPLATE("member_transfer_row", true, $content);
+
+ // Add points and switch color
+ $total += $content['points'];
+ $SW = 3 - $SW;
+ }
+
+ // Free memory
+ SQL_FREERESULT($result);
+ } else {
+ // Nothing for in and out
+ $OUT = "<tr>
<td colspan=\"5\" align=\"center\" class=\"bottom2\" height=\"70\">
".LOAD_TEMPLATE('admin_settings_saved', true, getMessage('TRANSFER_NO_INOUT_TRANSFERS'))."
</td>
</tr>";
- }
-
- // ... and add them to a constant for the template
- // @TODO Rewrite all these constants
- define('__TRANSFER_ROWS', $OUT);
-
- // Remeber total amount
- define('__TRANSFER_TOTAL_VALUE', $total);
-
- // Set title
- define('__TRANSFER_TITLE', getMessage('TRANSFER_LIST_ALL'));
-
- // Set "balance" word
- define('__TRANSFER_SUM', getMessage('TRANSFER_TOTAL_BALANCE'));
-
- // Load final template
- LOAD_TEMPLATE("member_transfer_list");
-
- // At the end we don't need a temporary table in memory
- $result = SQL_QUERY("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_transfers_tmp`", __FILE__, __LINE__);
-
- // Free some memory...
- SQL_FREERESULT($result);
- break;
-
-case "": // Overview page
- // Check incoming transfers
- $result = SQL_QUERY_ESC("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_user_transfers_in` WHERE userid=%s", array(getUserId()), __FILE__, __LINE__);
- list($dmy) = SQL_FETCHROW($result);
- SQL_FREERESULT($result);
-
- $total=$dmy;
- if ($dmy > 0) {
- define('__TRANSFER_IN_LINK', "<a href=\"{!URL!}/modules.php?module=login&what=transfer&mode=list_in\">".$dmy."</a>");
- } else {
- define('__TRANSFER_IN_LINK', $dmy);
- }
-
- // Check outgoing transfers
- $result = SQL_QUERY_ESC("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_user_transfers_out` WHERE userid=%s", array(getUserId()), __FILE__, __LINE__);
- list($dmy) = SQL_FETCHROW($result);
- SQL_FREERESULT($result);
-
- $total+=$dmy;
- if ($dmy > 0) {
- define('__TRANSFER_OUT_LINK', "<a href=\"{!URL!}/modules.php?module=login&what=transfer&mode=list_out\">".$dmy."</a>");
- } else {
- define('__TRANSFER_OUT_LINK', $dmy);
- }
-
- // Total transactions
- if ($total > 0) {
- define('__TRANSFER_ALL_LINK', "<a href=\"{!URL!}/modules.php?module=login&what=transfer&mode=list_all\">".$total."</a>");
- } else {
- define('__TRANSFER_ALL_LINK', $total);
- }
-
- if (IS_FORM_SENT()) {
- // Save settings
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET opt_in='%s' WHERE userid=%s LIMIT 1",
- array(REQUEST_POST('opt_in'), getUserId()), __FILE__, __LINE__);
-
- // Rember for next switch() command
- $opt_in = REQUEST_POST('opt_in');
-
- // "Settings saved..."
- LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_done\">{--SETTINGS_SAVED--}</div>");
- }
-
- switch ($opt_in)
- {
- case 'Y':
- define('__TRANSFER_ALLOW_Y', ' checked="checked"');
- define('__TRANSFER_ALLOW_N', '');
- define('__TRANSFER_NEW_LINK', "<a href=\"{!URL!}/modules.php?module=login&what=transfer&mode=new\">{--TRANSFER_NOW_LINK--}</a>");
- break;
+ }
- case 'N':
- define('__TRANSFER_ALLOW_Y', '');
- define('__TRANSFER_ALLOW_N', ' checked="checked"');
- define('__TRANSFER_NEW_LINK', getMessage('TRANSFER_PLEASE_ALLOW_OPT_IN'));
- break;
- }
+ // ... and add them to a constant for the template
+ // @TODO Rewrite all these constants
+ define('__TRANSFER_ROWS', $OUT);
+
+ // Remeber total amount
+ define('__TRANSFER_TOTAL_VALUE', $total);
+
+ // Set title
+ define('__TRANSFER_TITLE', getMessage('TRANSFER_LIST_ALL'));
+
+ // Set "balance" word
+ define('__TRANSFER_SUM', getMessage('TRANSFER_TOTAL_BALANCE'));
- // Check for latest out-transfers
- $result = SQL_QUERY_ESC("SELECT time_trans
+ // Load final template
+ LOAD_TEMPLATE("member_transfer_list");
+
+ // At the end we don't need a temporary table in memory
+ $result = SQL_QUERY("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_transfers_tmp`", __FILE__, __LINE__);
+
+ // Free some memory...
+ SQL_FREERESULT($result);
+ break;
+
+ case "": // Overview page
+ // Check incoming transfers
+ $result = SQL_QUERY_ESC("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_user_transfers_in` WHERE userid=%s", array(getUserId()), __FILE__, __LINE__);
+ list($dmy) = SQL_FETCHROW($result);
+ SQL_FREERESULT($result);
+
+ $total=$dmy;
+ if ($dmy > 0) {
+ define('__TRANSFER_IN_LINK', "<a href=\"{!URL!}/modules.php?module=login&what=transfer&mode=list_in\">".$dmy."</a>");
+ } else {
+ define('__TRANSFER_IN_LINK', $dmy);
+ }
+
+ // Check outgoing transfers
+ $result = SQL_QUERY_ESC("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_user_transfers_out` WHERE userid=%s", array(getUserId()), __FILE__, __LINE__);
+ list($dmy) = SQL_FETCHROW($result);
+ SQL_FREERESULT($result);
+
+ $total+=$dmy;
+ if ($dmy > 0) {
+ define('__TRANSFER_OUT_LINK', "<a href=\"{!URL!}/modules.php?module=login&what=transfer&mode=list_out\">".$dmy."</a>");
+ } else {
+ define('__TRANSFER_OUT_LINK', $dmy);
+ }
+
+ // Total transactions
+ if ($total > 0) {
+ define('__TRANSFER_ALL_LINK', "<a href=\"{!URL!}/modules.php?module=login&what=transfer&mode=list_all\">".$total."</a>");
+ } else {
+ define('__TRANSFER_ALL_LINK', $total);
+ }
+
+ if (IS_FORM_SENT()) {
+ // Save settings
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET opt_in='%s' WHERE userid=%s LIMIT 1",
+ array(REQUEST_POST('opt_in'), getUserId()), __FILE__, __LINE__);
+
+ // Rember for next switch() command
+ $opt_in = REQUEST_POST('opt_in');
+
+ // "Settings saved..."
+ LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_done\">{--SETTINGS_SAVED--}</div>");
+ }
+
+ switch ($opt_in)
+ {
+ case 'Y':
+ define('__TRANSFER_ALLOW_Y', ' checked="checked"');
+ define('__TRANSFER_ALLOW_N', '');
+ define('__TRANSFER_NEW_LINK', "<a href=\"{!URL!}/modules.php?module=login&what=transfer&mode=new\">{--TRANSFER_NOW_LINK--}</a>");
+ break;
+
+ case 'N':
+ define('__TRANSFER_ALLOW_Y', '');
+ define('__TRANSFER_ALLOW_N', ' checked="checked"');
+ define('__TRANSFER_NEW_LINK', getMessage('TRANSFER_PLEASE_ALLOW_OPT_IN'));
+ break;
+ }
+
+ // Check for latest out-transfers
+ $result = SQL_QUERY_ESC("SELECT time_trans
FROM `{!_MYSQL_PREFIX!}_user_transfers_out`
WHERE time_trans > (UNIX_TIMESTAMP() - %s) AND `userid`=%s
ORDER BY time_trans DESC
LIMIT 1", array(getConfig('transfer_timeout'), getUserId()), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 0) {
- // Load template
- define('__TRANSFER_SETTINGS_CONTENT', LOAD_TEMPLATE("member_transfer_settings", true));
- } else {
- // Load newest transaction
- list($newest) = SQL_FETCHROW($result);
- SQL_FREERESULT($result);
- define('__TRANSFER_SETTINGS_CONTENT', sprintf(getMessage('TRANSFER_LATEST_IS'), generateDateTime($newest, '3')));
- }
-
- // Load template
- LOAD_TEMPLATE("member_transfer_overview");
- break;
+ if (SQL_NUMROWS($result) == 0) {
+ // Load template
+ define('__TRANSFER_SETTINGS_CONTENT', LOAD_TEMPLATE("member_transfer_settings", true));
+ } else {
+ // Load newest transaction
+ list($newest) = SQL_FETCHROW($result);
+ SQL_FREERESULT($result);
+ define('__TRANSFER_SETTINGS_CONTENT', sprintf(getMessage('TRANSFER_LATEST_IS'), generateDateTime($newest, '3')));
+ }
+
+ // Load template
+ LOAD_TEMPLATE("member_transfer_overview");
+ break;
}
//
$result_data = SQL_QUERY_ESC("SELECT id, subject, timestamp, cat_id, points, text, is_notify, data_type, time, url
FROM `{!_MYSQL_PREFIX!}_bonus`
WHERE `id`=%s LIMIT 1",
- array(bigintval(REQUEST_GET('bonusid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('bonusid'))), __FILE__, __LINE__);
// Load data
$content = SQL_FETCHARRAY($result_data);
// Get timestamp from insert
$content['user_status'] = sprintf(getMessage('MEMBER_MAIL_BONUS_CONFIRMED_ON'),
- generateDateTime(getTimestampFromUserStats('bonusid', $content['id']), '2')
+ generateDateTime(getTimestampFromUserStats('bonusid', $content['id']), '2')
);
// Display it depending on mail (data) type
LEFT JOIN `{!_MYSQL_PREFIX!}_payments` AS pay
ON p.payment_id=pay.id
WHERE s.id=%s LIMIT 1",
- array(bigintval(REQUEST_GET('mailid'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('mailid'))), __FILE__, __LINE__);
// Load data
$content = SQL_FETCHARRAY($result_data);
// Get timestamp from insert
$content['user_status'] = sprintf(getMessage('MEMBER_MAIL_NORMAL_CONFIRMED_ON'),
- generateDateTime(getTimestampFromUserStats('mailid', $content['id']), '2')
+ generateDateTime(getTimestampFromUserStats('mailid', $content['id']), '2')
);
// Display it depending on mail (data) type
if (EXT_IS_ACTIVE('bonus')) {
// Load bonus ID
$result = SQL_QUERY_ESC("SELECT stats_id, bonus_id, link_type FROM `{!_MYSQL_PREFIX!}_user_links` WHERE userid=%s ORDER BY bonus_id DESC, stats_id DESC",
- array(getUserId()), __FILE__, __LINE__);
+ array(getUserId()), __FILE__, __LINE__);
} else {
// Don't load bonus ID
$result = SQL_QUERY_ESC("SELECT stats_id, stats_id, link_type FROM `{!_MYSQL_PREFIX!}_user_links` WHERE userid=%s ORDER BY stats_id DESC",
- array(getUserId()), __FILE__, __LINE__);
+ array(getUserId()), __FILE__, __LINE__);
}
// Mails left for confirmation?
$cat = ''; $result_data = false;
switch ($type)
{
- case 'NORMAL':
- $result_data = SQL_QUERY_ESC("SELECT s.subject, s.timestamp_ordered, s.cat_id, s.payment_id, p.sender
+ case 'NORMAL':
+ $result_data = SQL_QUERY_ESC("SELECT s.subject, s.timestamp_ordered, s.cat_id, s.payment_id, p.sender
FROM `{!_MYSQL_PREFIX!}_user_stats` AS s
LEFT JOIN `{!_MYSQL_PREFIX!}_pool` AS p
ON s.pool_id=p.id
WHERE s.id=%s
LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
- $type = 'mailid'; $DATA = $id; $PROBLEM = getMessage('NORMAL_MAIL_PROBLEM');
- break;
+ $type = 'mailid'; $DATA = $id; $PROBLEM = getMessage('NORMAL_MAIL_PROBLEM');
+ break;
- case 'BONUS':
- $result_data = SQL_QUERY_ESC("SELECT subject, timestamp, cat_id, points, 0 FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
+ case 'BONUS':
+ $result_data = SQL_QUERY_ESC("SELECT subject, timestamp, cat_id, points, 0 FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
array(bigintval($id2)), __FILE__, __LINE__);
- $type = 'bonusid'; $DATA = $id2; $PROBLEM = getMessage('BONUS_MAIL_PROBLEM');
- break;
+ $type = 'bonusid'; $DATA = $id2; $PROBLEM = getMessage('BONUS_MAIL_PROBLEM');
+ break;
- default: // Unknown type detected!
- DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown mail type %s detected.", $type));
- break;
+ default: // Unknown type detected!
+ DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown mail type %s detected.", $type));
+ break;
}
// Data found to this mail?
// Chedk if he is returning from a profile update notification
$result = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE notified='Y' AND `userid`=%s LIMIT 1",
- array(getUserId()), __FILE__, __LINE__);
+array(getUserId()), __FILE__, __LINE__);
if ((SQL_NUMROWS($result) == 1) && (EXT_IS_ACTIVE('profile'))) {
// Yes, he is so let's place him his wanted buttons
// Get WDS66 id
$result = SQL_QUERY_ESC("SELECT wernis_userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(getUserId()), __FILE__, __LINE__);
+ array(getUserId()), __FILE__, __LINE__);
// Are there some entries?
if (SQL_NUMROWS($result) == 1) {
// And load all rows!
$result = SQL_QUERY_ESC("SELECT `id`,`wernis_account`,`wernis_amount`,`wernis_timestamp`,`wernis_type` FROM `{!_MYSQL_PREFIX!}_user_wernis` WHERE `userid` = %s ORDER BY `wernis_timestamp` DESC",
- array(getUserId()), __FILE__, __LINE__);
+ array(getUserId()), __FILE__, __LINE__);
// Load all rows
$content['rows'] = ''; $SW = 2;
// Get WDS66 id
$content['wds66_id'] = '';
$result = SQL_QUERY_ESC("SELECT wernis_userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(getUserId()), __FILE__, __LINE__);
+ array(getUserId()), __FILE__, __LINE__);
// Are there some entries?
if (SQL_NUMROWS($result) == 1) {
// Get WDS66 id
$result = SQL_QUERY_ESC("SELECT wernis_userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(getUserId()), __FILE__, __LINE__);
+ array(getUserId()), __FILE__, __LINE__);
// Are there some entries?
if (SQL_NUMROWS($result) == 1) {
// Update the user data as well..
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `wernis_userid`=%s WHERE userid=%s LIMIT 1",
- array(bigintval(REQUEST_POST('wds66_id')), getUserId()), __FILE__, __LINE__);
+ array(bigintval(REQUEST_POST('wds66_id')), getUserId()), __FILE__, __LINE__);
// All done!
LOAD_TEMPLATE('admin_settings_saved', false, getMessage('WERNIS_MEMBER_WITHDRAW_DONE'));
// Update WDS66 id
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `wernis_userid`=%s WHERE userid=%s LIMIT 1",
- array(bigintval(REQUEST_POST('wds66_id')), getUserId()), __FILE__, __LINE__);
+ array(bigintval(REQUEST_POST('wds66_id')), getUserId()), __FILE__, __LINE__);
// All done!
LOAD_TEMPLATE('admin_settings_saved', false, getMessage('WERNIS_MEMBER_PAYOUT_DONE'));
// Update sending pool
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET data_type='%s' WHERE `id`=%s AND sender=%s AND data_type='TEMP' LIMIT 1",
- array($type, bigintval(REQUEST_GET('order')), getUserId()), __FILE__, __LINE__);
+ array($type, bigintval(REQUEST_GET('order')), getUserId()), __FILE__, __LINE__);
// Finally is the entry valid?
if (SQL_AFFECTEDROWS() == 1) {
// Load personal data...
$result = SQL_QUERY_ESC("SELECT gender, surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(getUserId()), __FILE__, __LINE__);
+ array(getUserId()), __FILE__, __LINE__);
list($gender, $sname, $fname, $email) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
// Load mail again... 0 1 2 3 4 5 6 7
$result = SQL_QUERY_ESC("SELECT subject, text, receivers, payment_id, timestamp, url, cat_id, target_send FROM `{!_MYSQL_PREFIX!}_pool` WHERE `id`=%s AND sender=%s LIMIT 1",
- array(bigintval(REQUEST_GET('order')), getUserId()), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('order')), getUserId()), __FILE__, __LINE__);
$DATA = SQL_FETCHROW($result);
SQL_FREERESULT($result);
if (empty($DATA[0])) $DATA[0] = getMessage('DEFAULT_SUBJECT_LINE');
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
require($INC);
-} elseif ((!EXT_IS_ACTIVE('sponsor'))
+} elseif ((!EXT_IS_ACTIVE('sponsor'))) {
addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE')));
return;
} elseif (!IS_SPONSOR()) {
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
require($INC);
-} elseif ((!EXT_IS_ACTIVE('sponsor'))
+} elseif ((!EXT_IS_ACTIVE('sponsor'))) {
addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'sponsor'));
return;
} elseif (!IS_SPONSOR()) {
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
require($INC);
-} elseif ((!EXT_IS_ACTIVE('sponsor'))
+} elseif (!EXT_IS_ACTIVE('sponsor')) {
addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'sponsor'));
return;
} elseif (!IS_SPONSOR()) {
status, receive_warnings
FROM `{!_MYSQL_PREFIX!}_sponsor_data`
WHERE `id`='%s' AND password='%s' LIMIT 1",
- array(bigintval(getSession('sponsorid')), getSession('sponsorpass')), __FILE__, __LINE__);
+array(bigintval(getSession('sponsorid')), getSession('sponsorpass')), __FILE__, __LINE__);
// Entry found?
if (SQL_NUMROWS($result) == 1) {
}
// Unsecure data which we don't want here
- $UNSAFE = array('receive_warnings', 'warning_interval');
+ $UNSAFE = array('receive_warnings', 'warning_interval');
// Remove all (maybe spoofed) unsafe data from array
foreach ($UNSAFE as $remove) {
// Check for gender selection
switch ($content['gender'])
{
- case "M": // Male
- define('__GENDER_M', ' selected="selected"');
- define('__GENDER_F', '');
- define('__GENDER_C', '');
- break;
+ case "M": // Male
+ define('__GENDER_M', ' selected="selected"');
+ define('__GENDER_F', '');
+ define('__GENDER_C', '');
+ break;
- case "F": // Female
- define('__GENDER_M', '');
- define('__GENDER_F', ' selected="selected"');
- define('__GENDER_C', '');
- break;
+ case "F": // Female
+ define('__GENDER_M', '');
+ define('__GENDER_F', ' selected="selected"');
+ define('__GENDER_C', '');
+ break;
- case "C": // Company
- define('__GENDER_M', '');
- define('__GENDER_F', '');
- define('__GENDER_C', ' selected="selected"');
- break;
+ case "C": // Company
+ define('__GENDER_M', '');
+ define('__GENDER_F', '');
+ define('__GENDER_C', ' selected="selected"');
+ break;
}
// Output formular
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
require($INC);
-} elseif ((!EXT_IS_ACTIVE('sponsor'))
+} elseif (!EXT_IS_ACTIVE('sponsor')) {
addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'sponsor'));
return;
} elseif (!IS_SPONSOR()) {
$result = SQL_QUERY_ESC("SELECT status, receive_warnings, warning_interval, email, surname, family, gender
FROM `{!_MYSQL_PREFIX!}_sponsor_data`
WHERE `id`='%s' AND password='%s' LIMIT 1",
- array(bigintval(getSession('sponsorid')), getSession('sponsorpass')), __FILE__, __LINE__);
+array(bigintval(getSession('sponsorid')), getSession('sponsorpass')), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load sponsor data
$content = SQL_FETCHARRAY($result);
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
require($INC);
-} elseif ((!EXT_IS_ACTIVE('sponsor'))
+} elseif (!EXT_IS_ACTIVE('sponsor')) {
addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'sponsor'));
return;
} elseif (!IS_SPONSOR()) {
$result = SQL_QUERY_ESC("SELECT gender, surname, family, (points_amount - points_used) AS points
FROM `{!_MYSQL_PREFIX!}_sponsor_data`
WHERE `id`='%s' AND password='%s' LIMIT 1",
- array(bigintval(getSession('sponsorid')), getSession('sponsorpass')), __FILE__, __LINE__);
+array(bigintval(getSession('sponsorid')), getSession('sponsorpass')), __FILE__, __LINE__);
list($gender, $surname, $family, $points) = SQL_FETCHROW($result);
// Free memory
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
require($INC);
-} elseif (!EXT_IS_ACTIVE("")) {
+} elseif (!EXT_IS_ACTIVE('')) {
ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE);
return;
}
WHERE `status`='CONFIRMED'".$whereStatement1." AND beg_points > 0
ORDER BY beg_points DESC, userid
LIMIT %s",
- array($whereStatement2), __FILE__, __LINE__);
+ array($whereStatement2), __FILE__, __LINE__);
if (SQL_NUMROWS($result_main) > 0) {
// Load our winners...
".$whereStatement1."".$add."
ORDER BY points DESC, userid
LIMIT %s",
- array($whereStatement2), __FILE__, __LINE__);
+ array($whereStatement2), __FILE__, __LINE__);
// Some entries were found?
if (SQL_NUMROWS($result_main) > 0) {
while ($content = SQL_FETCHARRAY($result)) {
// Update account
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `nl_receive`='Y', `nl_until`=0 WHERE `userid`=%s LIMIT 1",
- array(bigintval($content['userid'])), __FILE__, __LINE__);
+ array(bigintval($content['userid'])), __FILE__, __LINE__);
// Send email to him
$msg = LOAD_EMAIL_TEMPLATE("member_newsletter_reset", true, bigintval($content['userid']));
require('inc/wrapper-functions.php');
// Load more function libraries or includes
-foreach (array('request-functions', 'session-functions', 'config-functions', 'code-functions', 'inc-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', 'db/lib', 'handler', 'hooks') as $lib) {
// Load special functions
loadIncludeOnce('inc/' . $lib . '.php');
} // END - foreach
// Check if this file is writeable or read-only and warn the user
if ((!isInstalling()) && (isInstalled())) {
+ // Load "databases" aka static arrays
+ loadIncludeOnce('inc/databases.php');
+
+ // Init session
+ loadIncludeOnce('inc/session.php');
+
+ // Load versions
+ loadIncludeOnce('inc/versions.php');
+
// Load configuration file(s) here
loadIncludeOnce('inc/load_config.php');
// Load configuration stuff
loadConfiguration();
- // Load "databases" aka static arrays
- loadIncludeOnce('inc/databases.php');
-
- // Init session
- loadIncludeOnce('inc/session.php');
-
- // Load versions
- loadIncludeOnce('inc/versions.php');
-
// Loading patching system is required here...
loadIncludeOnce('inc/patch-system.php');
// Include neccessary functions for installation //
///////////////////////////////////////////////////
+ // This hack prevents a backtrace in CSS output
+ if ($GLOBALS['output_mode'] == '1') {
+ // Problem with config so set output mode
+ setConfigEntry('OUTPUT_MODE', 'render');
+ } // END - if
+
// Set other missing variables
if (!isset($GLOBALS['output_mode'])) $GLOBALS['output_mode'] = '0';
} elseif (!EXT_IS_ACTIVE('cache')) {
// Load from database
$result = SQL_QUERY_ESC("SELECT title FROM `{!_MYSQL_PREFIX!}_mod_reg` WHERE `module`='%s' LIMIT 1",
- array($mod), __FUNCTION__, __LINE__);
+ array($mod), __FUNCTION__, __LINE__);
list($name) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
}
// Look for title
$result = SQL_QUERY_ESC("SELECT title FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE %s='%s' LIMIT 1",
- array($mode, $column, $wht), __FUNCTION__, __LINE__);
+ array($mode, $column, $wht), __FUNCTION__, __LINE__);
// Is there an entry?
if (SQL_NUMROWS($result) == 1) {
} elseif (!EXT_IS_ACTIVE('cache')) {
// Check for module in database
$result = SQL_QUERY_ESC("SELECT locked, hidden, admin_only, mem_only FROM `{!_MYSQL_PREFIX!}_mod_reg` WHERE `module`='%s' LIMIT 1",
- array($mod_chk), __FUNCTION__, __LINE__);
+ array($mod_chk), __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Read data
list($locked, $hidden, $admin, $mem) = SQL_FETCHROW($result);
} else {
// @TODO Nothing helped???
DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("ret=%s,locked=%s,admin=%s,mem=%s",
- $ret,
- $locked,
- $admin,
- $mem
+ $ret,
+ $locked,
+ $admin,
+ $mem
));
}
} // END - if
} elseif (!$found) {
// Problem with module detected
DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Problem in module %s detected. ret=%s, locked=%s, hidden=%s, mem=%s, admin=%s",
- $mod,
- $ret,
- $locked,
- $hidden,
- $mem,
- $admin
+ $mod,
+ $ret,
+ $locked,
+ $hidden,
+ $mem,
+ $admin
));
}
$type = "action";
$search = substr($file, 7);
switch ($ACC_LVL) {
- case 'admin':
- $modCheck = 'admin';
- break;
-
- case 'sponsor':
- case 'guest':
- case 'member':
- $modCheck = $GLOBALS['module'];
- break;
+ case 'admin':
+ $modCheck = 'admin';
+ break;
+
+ case 'sponsor':
+ case 'guest':
+ case 'member':
+ $modCheck = $GLOBALS['module'];
+ break;
}
$AND = " AND (`what`='' OR `what` IS NULL)";
} elseif (substr($file, 0, 5) == "what-") {
$search = substr($file, 5);
$AND = '';
switch ($ACC_LVL) {
- case 'admin':
- $modCheck = 'admin';
- break;
-
- case 'guest':
- case 'member':
- $modCheck = $GLOBALS['module'];
- if (!IS_ADMIN()) {
- $AND = " AND `visible`='Y' AND `locked`='N'";
- }
- break;
+ case 'admin':
+ $modCheck = 'admin';
+ break;
+
+ case 'guest':
+ case 'member':
+ $modCheck = $GLOBALS['module'];
+ if (!IS_ADMIN()) {
+ $AND = " AND `visible`='Y' AND `locked`='N'";
+ }
+ break;
}
$dummy = substr($search, 0, -4);
$AND .= " AND `action`='".getModeAction($ACC_LVL, $dummy)."'";
// Get the title from menu
$result = SQL_QUERY_ESC("SELECT title FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE %s='%s' ".$AND." LIMIT 1",
- array($ACC_LVL, $type, $search), __FUNCTION__, __LINE__);
+ array($ACC_LVL, $type, $search), __FUNCTION__, __LINE__);
// Menu found?
if (SQL_NUMROWS($result) == 1) {
// Load SQL data and add the menu to the output stream...
$result_main = SQL_QUERY_ESC("SELECT title, action FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE (`what`='' OR `what` IS NULL)".$AND." ORDER BY `sort`",
- array($mode), __FUNCTION__, __LINE__);
+ array($mode), __FUNCTION__, __LINE__);
//* DEBUG: */ echo __LINE__.'/'.$main_cnt.'/'.$main_action.'/'.$sub_what.':'.$GLOBALS['what']."*<br />\n";
if (SQL_NUMROWS($result_main) > 0) {
OUTPUT_HTML("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"".$mode."_menu\">");
// Sub menu
$result_sub = SQL_QUERY_ESC("SELECT title AS sub_title, what AS sub_what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ".$AND." ORDER BY `sort`",
- array($mode, $content['action']), __FUNCTION__, __LINE__);
+ array($mode, $content['action']), __FUNCTION__, __LINE__);
// Get number of rows
$ctl = SQL_NUMROWS($result_sub);
if ((isUserIdSet()) && (isSessionVariableSet('u_hash'))) {
// Cookies are set with values, but are they valid?
$result = SQL_QUERY_ESC("SELECT password, status, last_module, last_online FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(getUserId()), __FUNCTION__, __LINE__);
+ array(getUserId()), __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load data from cookies
list($password, $status, $mod, $onl) = SQL_FETCHROW($result);
} elseif ((!empty($admin)) && ((!EXT_IS_ACTIVE('cache'))) || (!isset($GLOBALS['cache_array']['admins']['password'][$admin]))) {
// Search for admin
$result = SQL_QUERY_ESC("SELECT HIGH_PRIORITY password FROM `{!_MYSQL_PREFIX!}_admins` WHERE login='%s' LIMIT 1",
- array($admin), __FUNCTION__, __LINE__);
+ array($admin), __FUNCTION__, __LINE__);
// Is he admin?
$passDB = '';
case 'guest':
// Guests (in the registration form) are not allowed to select 0 mails per day.
$result = SQL_QUERY("SELECT value, comment FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value > 0 ORDER BY value",
- __FUNCTION__, __LINE__);
+ __FUNCTION__, __LINE__);
break;
case 'member':
// Members are allowed to set to zero mails per day (we will change this soon!)
$result = SQL_QUERY("SELECT value, comment FROM `{!_MYSQL_PREFIX!}_max_receive` ORDER BY value",
- __FUNCTION__, __LINE__);
+ __FUNCTION__, __LINE__);
break;
default: // Invalid!
function isEmailTaken ($email) {
// Query the database
$result = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE email LIKE '{PER}%s{PER}' LIMIT 1",
- array($email), __FUNCTION__, __LINE__);
+ array($email), __FUNCTION__, __LINE__);
// Is the email there?
$ret = (SQL_NUMROWS($result) == 1);
if (($mode != 'admin') && ($UPDATE === true)) {
// Update guest or member menu
$sql = SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_%s_menu` SET counter=counter+1 WHERE `action`='%s' AND `what`='%s'".$add." LIMIT 1",
- array($mode, $act, $wht), __FUNCTION__, __LINE__, false);
+ array($mode, $act, $wht), __FUNCTION__, __LINE__, false);
} elseif (($wht != "overview") && (!empty($wht))) {
// Other actions
$sql = SQL_QUERY_ESC("SELECT id, what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `action`='%s' AND `what`='%s'".$add." ORDER BY action DESC LIMIT 1",
- array($mode, $act, $wht), __FUNCTION__, __LINE__, false);
+ array($mode, $act, $wht), __FUNCTION__, __LINE__, false);
} else {
// Admin login overview
$sql = SQL_QUERY_ESC("SELECT id, what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `action`='%s' AND (`what`='' OR `what` IS NULL)".$add." ORDER BY action DESC LIMIT 1",
- array($mode, $act), __FUNCTION__, __LINE__, false);
+ array($mode, $act), __FUNCTION__, __LINE__, false);
}
// Run SQL command
// Load hash
$result_main = SQL_QUERY_ESC("SELECT password FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
- array(getUserId()), __FUNCTION__, __LINE__);
+ array(getUserId()), __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result_main) == 1) {
// Load hash from database
list($hashDB) = SQL_FETCHROW($result_main);
if (($hash == getSession('u_hash')) || (REQUEST_POST('pass1') == REQUEST_POST('pass2'))) {
// Load user's data
$result = SQL_QUERY_ESC("SELECT gender, surname, family, street_nr, country, zip, city, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND password='%s' LIMIT 1",
- array(getUserId(), $hashDB), __FUNCTION__, __LINE__);
+ array(getUserId(), $hashDB), __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load the data
$DATA = SQL_FETCHROW($result);
switch ($mod)
{
- case 'mydata':
- foreach ($modes as $mode) {
- switch ($mode)
- {
- case 'normal': break; // Do not add any special lines
-
- case 'email': // Email was changed!
- $content = getMessage('MEMBER_CHANGED_EMAIL').": ".REQUEST_POST('old_addy')."\n";
- break;
-
- case 'pass': // Password was changed
- $content = getMessage('MEMBER_CHANGED_PASS')."\n";
- break;
-
- default:
- DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown mode %s detected.", $mode));
- $content = getMessage('MEMBER_UNKNOWN_MODE').": ".$mode."\n\n";
- break;
- } // END - switch
- } // END - if
-
- if (EXT_IS_ACTIVE('country')) {
- // Replace code with description
- $DATA[4] = COUNTRY_GENERATE_INFO(REQUEST_POST('country_code'));
- } // END - if
-
- // Load template
- $msg = LOAD_EMAIL_TEMPLATE("member_mydata_notify", $content, getUserId());
-
- if (getConfig('admin_notify') == 'Y') {
- // The admin needs to be notified about a profile change
- $msg_admin = "admin_mydata_notify";
- $sub_adm = getMessage('ADMIN_CHANGED_DATA');
- } else {
- // No mail to admin
- $msg_admin = '';
- $sub_adm = '';
- }
+ case 'mydata':
+ foreach ($modes as $mode) {
+ switch ($mode)
+ {
+ case 'normal': break; // Do not add any special lines
+
+ case 'email': // Email was changed!
+ $content = getMessage('MEMBER_CHANGED_EMAIL').": ".REQUEST_POST('old_addy')."\n";
+ break;
+
+ case 'pass': // Password was changed
+ $content = getMessage('MEMBER_CHANGED_PASS')."\n";
+ break;
+
+ default:
+ DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown mode %s detected.", $mode));
+ $content = getMessage('MEMBER_UNKNOWN_MODE').": ".$mode."\n\n";
+ break;
+ } // END - switch
+ } // END - if
+
+ if (EXT_IS_ACTIVE('country')) {
+ // Replace code with description
+ $DATA[4] = COUNTRY_GENERATE_INFO(REQUEST_POST('country_code'));
+ } // END - if
+
+ // Load template
+ $msg = LOAD_EMAIL_TEMPLATE("member_mydata_notify", $content, getUserId());
+
+ if (getConfig('admin_notify') == 'Y') {
+ // The admin needs to be notified about a profile change
+ $msg_admin = "admin_mydata_notify";
+ $sub_adm = getMessage('ADMIN_CHANGED_DATA');
+ } else {
+ // No mail to admin
+ $msg_admin = '';
+ $sub_adm = '';
+ }
- // Set subject lines
- $sub_mem = getMessage('MEMBER_CHANGED_DATA');
+ // Set subject lines
+ $sub_mem = getMessage('MEMBER_CHANGED_DATA');
- // Output success message
- $content = "<span class=\"member_done\">{--MYDATA_MAIL_SENT--}</span>";
- break;
+ // Output success message
+ $content = "<span class=\"member_done\">{--MYDATA_MAIL_SENT--}</span>";
+ break;
- default:
- DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unsupported module %s detected.", $mod));
- $content = "<span class=\"member_failed\">{--UNKNOWN_MODULE--}</span>";
- break;
+ default:
+ DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unsupported module %s detected.", $mod));
+ $content = "<span class=\"member_failed\">{--UNKNOWN_MODULE--}</span>";
+ break;
} // END - switch
} else {
// Could not load profile data
if ($mod != "css") {
// Do count all other modules but not accesses on CSS file css.php!
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET clicks=clicks+1 WHERE `module`='%s' LIMIT 1",
- array($mod), __FUNCTION__, __LINE__);
+ array($mod), __FUNCTION__, __LINE__);
} // END - if
}
// Load from database
$result = SQL_QUERY_ESC("SELECT action FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `what`='%s' LIMIT 1",
- array($mode, $wht), __FUNCTION__, __LINE__);
+ array($mode, $wht), __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load action value and pray that this one is the right you want... ;-)
list($ret) = SQL_FETCHROW($result);
} elseif ($cid > 0) {
// Lookup the category in database
$result = SQL_QUERY_ESC("SELECT cat FROM `{!_MYSQL_PREFIX!}_cats` WHERE `id`=%s LIMIT 1",
- array(bigintval($cid)), __FUNCTION__, __LINE__);
+ array(bigintval($cid)), __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Category found... :-)
list($ret) = SQL_FETCHROW($result);
// Load payment data
$result = SQL_QUERY_ESC("SELECT mail_title, price FROM `{!_MYSQL_PREFIX!}_payments` WHERE `id`=%s LIMIT 1",
- array(bigintval($pid)), __FUNCTION__, __LINE__);
+ array(bigintval($pid)), __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Payment type found... :-)
if (!$full) {
// Search for it in database
$result = SQL_QUERY_ESC("SELECT %s FROM `{!_MYSQL_PREFIX!}_payments` WHERE `id`=%s LIMIT 1",
- array($lookFor, $pid), __FUNCTION__, __LINE__);
+ array($lookFor, $pid), __FUNCTION__, __LINE__);
// Is the entry there?
if (SQL_NUMROWS($result) == 1) {
// Try to look the entry up
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_links` WHERE %s='%s' AND `userid`=%s AND link_type='%s' LIMIT 1",
- array($rowName, $stats_id, bigintval($uid), $type), __FUNCTION__, __LINE__);
+ array($rowName, $stats_id, bigintval($uid), $type), __FUNCTION__, __LINE__);
// Was it *not* found?
if (SQL_NUMROWS($result) == 0) {
// So we add one!
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_links` (%s, userid, link_type) VALUES ('%s','%s','%s')",
- array($rowName, $stats_id, bigintval($uid), $type), __FUNCTION__, __LINE__);
+ array($rowName, $stats_id, bigintval($uid), $type), __FUNCTION__, __LINE__);
$ret = 'done';
} else {
// Already found
if ($countRows === true) {
// Count whole table
$result = SQL_QUERY_ESC("SELECT COUNT(`%s`) FROM `{!_MYSQL_PREFIX!}_%s`".$add,
- array($lookFor, $tableName), __FUNCTION__, __LINE__);
+ array($lookFor, $tableName), __FUNCTION__, __LINE__);
} else {
// Sum whole table
$result = SQL_QUERY_ESC("SELECT SUM(`%s`) FROM `{!_MYSQL_PREFIX!}_%s`".$add,
- array($lookFor, $tableName), __FUNCTION__, __LINE__);
+ array($lookFor, $tableName), __FUNCTION__, __LINE__);
}
} elseif (($countRows === true) || ($lookFor == 'userid')) {
// Count rows
//* DEBUG: */ echo "COUNT!<br />\n";
$result = SQL_QUERY_ESC("SELECT COUNT(`%s`) FROM `{!_MYSQL_PREFIX!}_%s` WHERE `%s`='%s'".$add,
- array($lookFor, $tableName, $whereStatement, $search), __FUNCTION__, __LINE__);
+ array($lookFor, $tableName, $whereStatement, $search), __FUNCTION__, __LINE__);
} else {
// Add all rows
//* DEBUG: */ echo "SUM!<br />\n";
$result = SQL_QUERY_ESC("SELECT SUM(`%s`) FROM `{!_MYSQL_PREFIX!}_%s` WHERE `%s`='%s'".$add,
- array($lookFor, $tableName, $whereStatement, $search), __FUNCTION__, __LINE__);
+ array($lookFor, $tableName, $whereStatement, $search), __FUNCTION__, __LINE__);
}
// Load row
} elseif (!EXT_IS_ACTIVE('cache')) {
// Get referal data
$result_lvl = SQL_QUERY_ESC("SELECT percents FROM `{!_MYSQL_PREFIX!}_refdepths` WHERE level='%s' LIMIT 1",
- array(bigintval($level)), __FUNCTION__, __LINE__);
+ array(bigintval($level)), __FUNCTION__, __LINE__);
// Entry found?
if (SQL_NUMROWS($result_lvl) == 1) {
// Check user account
$result_user = SQL_QUERY_ESC("SELECT refid, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
- array(bigintval($uid)), __FUNCTION__, __LINE__);
+ array(bigintval($uid)), __FUNCTION__, __LINE__);
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},numRows=".SQL_NUMROWS($result_user).",points={$points}<br />\n";
if (SQL_NUMROWS($result_user) == 1) {
// Update points...
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_points` SET %s=%s+%s WHERE userid=%s AND ref_depth='%s' LIMIT 1",
- array($data, $data, $ref_points, bigintval($uid), bigintval($GLOBALS['ref_level'])), __FUNCTION__, __LINE__);
+ array($data, $data, $ref_points, bigintval($uid), bigintval($GLOBALS['ref_level'])), __FUNCTION__, __LINE__);
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):data={$data},ref_points={$ref_points},uid={$uid},depth={$GLOBALS['ref_level']},mode={$add_mode} - UPDATE! (".SQL_AFFECTEDROWS().")<br />\n";
// No entry updated?
if (SQL_AFFECTEDROWS() < 1) {
// First ref in this level! :-)
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_points` (userid,ref_depth,%s) VALUES (%s,'%s',%s)",
- array($data, bigintval($uid), bigintval($GLOBALS['ref_level']), $ref_points), __FUNCTION__, __LINE__);
+ array($data, bigintval($uid), bigintval($GLOBALS['ref_level']), $ref_points), __FUNCTION__, __LINE__);
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):data={$data},ref_points={$ref_points},uid={$uid},depth={$GLOBALS['ref_level']},mode={$add_mode} - INSERTED! (".SQL_AFFECTEDROWS().")<br />\n";
} // END - if
// Update counter
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_refsystem` SET counter=counter+1 WHERE userid=%s AND level='%s' LIMIT 1",
- array(bigintval($uid), $GLOBALS['cache_array']['ref_level'][$uid]), __FUNCTION__, __LINE__);
+ array(bigintval($uid), $GLOBALS['cache_array']['ref_level'][$uid]), __FUNCTION__, __LINE__);
// When no entry was updated then we have to create it here
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):updated=".SQL_AFFECTEDROWS()."<br />\n";
if (SQL_AFFECTEDROWS() < 1) {
// First count!
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_refsystem` (userid, level, counter) VALUES (%s,%s,1)",
- array(bigintval($uid), $GLOBALS['cache_array']['ref_level'][$uid]), __FUNCTION__, __LINE__);
+ array(bigintval($uid), $GLOBALS['cache_array']['ref_level'][$uid]), __FUNCTION__, __LINE__);
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid}<br />\n";
} // END - if
// Check for his referal
$result = SQL_QUERY_ESC("SELECT refid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(bigintval($uid)), __FUNCTION__, __LINE__);
+ array(bigintval($uid)), __FUNCTION__, __LINE__);
// Load refid
list($ref) = SQL_FETCHROW($result);
} elseif (!EXT_IS_ACTIVE('cache')) {
// Load from database
$result = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_admins` WHERE login='%s' LIMIT 1",
- array($login), __FUNCTION__, __LINE__);
+ array($login), __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
list($ret) = SQL_FETCHROW($result);
} // END - if
} elseif (!EXT_IS_ACTIVE('cache')) {
// Load from database
$result = SQL_QUERY_ESC("SELECT password FROM `{!_MYSQL_PREFIX!}_admins` WHERE `id`=%s LIMIT 1",
- array($aid), __FUNCTION__, __LINE__);
+ array($aid), __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Fetch data
list($ret) = SQL_FETCHROW($result);
} elseif (!EXT_IS_ACTIVE('cache')) {
// Load from database
$result = SQL_QUERY_ESC("SELECT login FROM `{!_MYSQL_PREFIX!}_admins` WHERE `id`=%s LIMIT 1",
- array(bigintval($aid)), __FUNCTION__, __LINE__);
+ array(bigintval($aid)), __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Fetch data
list($ret) = SQL_FETCHROW($result);
} elseif (!EXT_IS_ACTIVE('cache')) {
// Load from database
$result_aid = SQL_QUERY_ESC("SELECT email FROM `{!_MYSQL_PREFIX!}_admins` WHERE `id`=%s LIMIT 1",
- array(bigintval($aid)), __FUNCTION__, __LINE__);
+ array(bigintval($aid)), __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result_aid) == 1) {
// Get data
list($ret) = SQL_FETCHROW($result_aid);
// Set cache
$GLOBALS['cache_array']['admins']['email'][$aid] = $ret;
- } // END - if
+ } // END - if
// Free result
SQL_FREERESULT($result_aid);
} elseif (!EXT_IS_ACTIVE('cache')) {
// Load from database
$result_aid = SQL_QUERY_ESC("SELECT default_acl FROM `{!_MYSQL_PREFIX!}_admins` WHERE `id`=%s LIMIT 1",
- array(bigintval($aid)), __FUNCTION__, __LINE__);
+ array(bigintval($aid)), __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result_aid) == 1) {
// Fetch data
list($ret) = SQL_FETCHROW($result_aid);
$ORDER = $name.$SPEC;
if ($table == 'country') $ORDER = $special;
$result = SQL_QUERY_ESC("SELECT %s, %s".$SPEC." FROM `{!_MYSQL_PREFIX!}_%s` ".$where." ORDER BY %s",
- array($id, $ORDER, $table, $name), __FUNCTION__, __LINE__);
+ array($id, $ORDER, $table, $name), __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Found data so add them as OPTION lines: $id is the value and $name is the "name" of the option
// @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
"UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `mem_only`='Y' WHERE `module`='order' LIMIT 1",
"UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='order' OR `what`='unconfirmed' LIMIT 2",
"UPDATE `{!_MYSQL_PREFIX!}_config` SET `activate_xchange`=0 WHERE `config`=0 LIMIT 1"
- ));
+ ));
- // Run SQLs
- runFilterChain('run_sqls');
+ // Run SQLs
+ runFilterChain('run_sqls');
- // Rebuild caches
- // @TODO Rewrite this to a filter
- rebuildCacheFiles('config', 'config');
- rebuildCacheFiles('modreg', 'modreg');
+ // Rebuild caches
+ // @TODO Rewrite this to a filter
+ rebuildCacheFiles('config', 'config');
+ rebuildCacheFiles('modreg', 'modreg');
} // END - if
}
// Delete category selections as well...
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_cats` WHERE userid=%s",
- array(bigintval($uid)), __FUNCTION__, __LINE__);
+ array(bigintval($uid)), __FUNCTION__, __LINE__);
// Remove from rallye if found
if (EXT_IS_ACTIVE('rallye')) {
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_rallye_users` WHERE userid=%s",
- array(bigintval($uid)), __FUNCTION__, __LINE__);
+ array(bigintval($uid)), __FUNCTION__, __LINE__);
} // END - if
// Now a mail to the user and that's all...
// Update points
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_jackpot` SET points=points+%s WHERE ok='ok' LIMIT 1",
- array($points), __FUNCTION__, __LINE__);
+ array($points), __FUNCTION__, __LINE__);
}
}
if ($jackpot >= $points) {
// Update points when there are enougth points in jackpot
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_jackpot` SET points=points-%s WHERE ok='ok' LIMIT 1",
- array($points), __FUNCTION__, __LINE__);
+ array($points), __FUNCTION__, __LINE__);
$ret = $jackpot - $points;
} // END - if
}
//* DEBUG: */ echo __LINE__.'!'.$modCheck."!<br />\n";
switch ($modCheck)
{
- case 'admin':
- $wht = 'overview';
- break;
-
- case 'login':
- case 'index':
- $wht = 'welcome';
- if (($modCheck == 'index') && (getConfig('index_home') != '')) $wht = getConfig('index_home');
- break;
-
- default:
- $wht = '';
- break;
+ case 'admin':
+ $wht = 'overview';
+ break;
+
+ case 'login':
+ case 'index':
+ $wht = 'welcome';
+ if (($modCheck == 'index') && (getConfig('index_home') != '')) $wht = getConfig('index_home');
+ break;
+
+ default:
+ $wht = '';
+ break;
}
// Return what value
function SUB_POINTS ($subject, $uid, $points) {
// Add points to used points
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `used_points`=`used_points`+%s WHERE userid=%s LIMIT 1",
- array($points, bigintval($uid)), __FUNCTION__, __LINE__);
+ array($points, bigintval($uid)), __FUNCTION__, __LINE__);
// Insert booking record
if (EXT_IS_ACTIVE('booking')) {
$result_all = SQL_QUERY("SELECT userid
FROM `{!_MYSQL_PREFIX!}_user_data`
WHERE `status`='CONFIRMED' AND receive_mails > 0 ".PREPARE_SQL_HTML_HOLIDAY($mode),
- __FUNCTION__, __LINE__);
+ __FUNCTION__, __LINE__);
// Get num rows
$numRows = SQL_NUMROWS($result_all);
// Check which users are in this category
$result_uids = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_cats` WHERE cat_id=%s",
- array(bigintval($content['id'])), __FUNCTION__, __LINE__);
+ array(bigintval($content['id'])), __FUNCTION__, __LINE__);
// Start adding all
$uid_cnt = 0;
while (list($ucat) = SQL_FETCHROW($result_uids)) {
$result_ver = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data`
WHERE userid=%s AND `status`='CONFIRMED' AND receive_mails > 0".PREPARE_SQL_HTML_HOLIDAY($mode)." LIMIT 1",
- array(bigintval($ucat)), __FUNCTION__, __LINE__);
+ array(bigintval($ucat)), __FUNCTION__, __LINE__);
// Add user count
$uid_cnt += SQL_NUMROWS($result_ver);
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_bonus`
(subject, text, receivers, points, time, data_type, timestamp, url, cat_id, target_send, mails_sent, html_msg)
VALUES ('%s','%s','%s','%s','%s','NEW', UNIX_TIMESTAMP(),'%s','%s','%s','%s','%s')",
- array(
- $subject,
- $text,
- $receiverList,
- $points,
- $seconds,
- $url,
- $cat,
- $target,
- bigintval($receiver),
- $HTML
- ), __FUNCTION__, __LINE__);
+ array(
+ $subject,
+ $text,
+ $receiverList,
+ $points,
+ $seconds,
+ $url,
+ $cat,
+ $target,
+ bigintval($receiver),
+ $HTML
+ ), __FUNCTION__, __LINE__);
} else {
// Add regular mail
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_bonus`
(subject, text, receivers, points, time, data_type, timestamp, url, cat_id, target_send, mails_sent)
VALUES ('%s','%s','%s','%s','%s','NEW', UNIX_TIMESTAMP(),'%s','%s','%s','%s')",
- array(
- $subject,
- $text,
- $receiverList,
- $points,
- $seconds,
- $url,
- $cat,
- $target,
- bigintval($receiver),
- ), __FUNCTION__, __LINE__);
+ array(
+ $subject,
+ $text,
+ $receiverList,
+ $points,
+ $seconds,
+ $url,
+ $cat,
+ $target,
+ bigintval($receiver),
+ ), __FUNCTION__, __LINE__);
}
}
if ((EXT_IS_ACTIVE('html_mail')) && ($mode == 'html')) {
// Only include HTML receivers
$result = SQL_QUERY_ESC("SELECT d.userid FROM `{!_MYSQL_PREFIX!}_user_data` AS d ".$CAT_TABS." WHERE d.`status`='CONFIRMED' AND d.`html`='Y'".$CAT_WHERE." ORDER BY d.%s %s LIMIT %s",
- array($cat, getConfig('order_select'), getConfig('order_mode'), $receiver), __FUNCTION__, __LINE__);
+ array($cat, getConfig('order_select'), getConfig('order_mode'), $receiver), __FUNCTION__, __LINE__);
} else {
// Include all
$result = SQL_QUERY_ESC("SELECT d.userid FROM `{!_MYSQL_PREFIX!}_user_data` AS d ".$CAT_TABS." WHERE d.`status`='CONFIRMED'".$CAT_WHERE." ORDER BY d.%s %s LIMIT %s",
- array($cat, getConfig('order_select'), getConfig('order_mode'), $receiver), __FUNCTION__, __LINE__);
+ array($cat, getConfig('order_select'), getConfig('order_mode'), $receiver), __FUNCTION__, __LINE__);
}
// Entries found?
FROM `{!_MYSQL_PREFIX!}_user_stats_data`
WHERE userid=%s AND stats_type='%s' AND stats_data='%s'
LIMIT 1",
- array(bigintval($uid), $type, $data), __FUNCTION__, __LINE__);
+ array(bigintval($uid), $type, $data), __FUNCTION__, __LINE__);
// Is the entry there?
if (SQL_NUMROWS($result) == 1) {
if ((!getTimestampFromUserStats($type, $data, $uid)) && (!is_array($data))) {
// Then insert it!
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_stats_data` (`userid`,`stats_type`,`stats_data`) VALUES (%s,'%s','%s')",
- array(bigintval($uid), $type, $data), __FUNCTION__, __LINE__);
+ array(bigintval($uid), $type, $data), __FUNCTION__, __LINE__);
} elseif (is_array($data)) {
// Invalid data!
DEBUG_LOG(__FUNCTION__, __LINE__, " uid={$uid},type={$type},data={".gettype($data).": Invalid statistics data type!");
ON ur.refid=ud.userid
WHERE ur.userid=%s AND ur.level=%s
ORDER BY ur.refid ASC",
- array(bigintval($uid), bigintval($level)), __FUNCTION__, __LINE__);
+ array(bigintval($uid), bigintval($level)), __FUNCTION__, __LINE__);
// Are there some entries?
if (SQL_NUMROWS($result) > 0) {
function reduceRecipientReceivedMails ($column, $id, $count) {
// Search for mail in database
$result = SQL_QUERY_ESC("SELECT `userid` FROM `{!_MYSQL_PREFIX!}_user_links` WHERE `%s`=%s ORDER BY `userid` ASC LIMIT %s",
- array($column, bigintval($id), $count), __FUNCTION__, __LINE__);
+ array($column, bigintval($id), $count), __FUNCTION__, __LINE__);
// Are there entries?
if (SQL_NUMROWS($result) > 0) {
// Now update all user accounts
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET `emails_received`=`emails_received`-1 WHERE `userid` IN (%s) LIMIT %s",
- array(implode(',', $UIDs), count($UIDs)), __FUNCTION__, __LINE__);
+ array(implode(',', $UIDs), count($UIDs)), __FUNCTION__, __LINE__);
} // END - if
// Free result
// Checks wether the SQLs array is filled
function IS_SQLS_VALID () {
return (
- (IS_SQLS_INITIALIZED()) &&
- (COUNT_SQLS() > 0)
+ (IS_SQLS_INITIALIZED()) &&
+ (COUNT_SQLS() > 0)
);
}
// Message is active in queue
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET data_type='QUEUE' WHERE `id`=%s LIMIT 1",
- array(bigintval($DATA['id'])), __FILE__, __LINE__);
+ array(bigintval($DATA['id'])), __FILE__, __LINE__);
// "Explode" all receivers into an array
if (ereg(';', $DATA['receivers'])) {
// Load personal data
//* DEBUG: */ echo "*L:".__LINE__.'/'.$uid."*<br />";
$result_user = SQL_QUERY_ESC("SELECT surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(bigintval($uid)), __FILE__, __LINE__);
+ array(bigintval($uid)), __FILE__, __LINE__);
// Is his data available?
if (SQL_NUMROWS($result_user) == 1) {
if (GET_EXT_VERSION('user') >= '0.1.4') {
// Update mails received for receiver
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET emails_received=emails_received+1 WHERE userid=%s LIMIT 1",
- array(bigintval($uid)), __FILE__, __LINE__);
+ array(bigintval($uid)), __FILE__, __LINE__);
} // END - if
// Do we have send maximum mails?
if (countSelection($dummy) == 0) {
// Queue reached!
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET `data_type`='SEND', `target_send`=0, `receivers`='' WHERE `id`=%s LIMIT 1",
- array(bigintval($DATA['id'])), __FILE__, __LINE__);
+ array(bigintval($DATA['id'])), __FILE__, __LINE__);
//* DEBUG: */ echo "*L:".__LINE__."*<br />";
// Update mediadata if version is 0.0.4 or higher
} elseif ($GLOBALS['pool_cnt'] >= getConfig('max_send')) {
// Update bonus pool
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET `data_type`='NEW', `target_send`=%s, `receivers`='%s' WHERE `id`=%s LIMIT 1",
- array(countSelection($dummy), implode(';', $dummy), bigintval($DATA['id'])), __FILE__, __LINE__);
+ array(countSelection($dummy), implode(';', $dummy), bigintval($DATA['id'])), __FILE__, __LINE__);
//* DEBUG: */ echo "*L:".__LINE__."<pre>";
//* DEBUG: */ print_r($dummy);
//* DEBUG: */ echo "</pre>\n!!!<br />";
while ($DATA = SQL_FETCHROW($result_main)) {
// Set mail order as 'active'. That means it will be sent out
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET data_type='ACTIVE' WHERE `id`=%s AND data_type='NEW' LIMIT 1",
- array($DATA[0]), __FILE__, __LINE__);
+ array($DATA[0]), __FILE__, __LINE__);
// Check fetched data for HTML
$HTML = $DATA[10]; if ($HTML == $DATA[0]) $HTML = 'N';
foreach ($RECEIVERS as $key => $uid) {
// Lookup user ID
$result_user = SQL_QUERY_ESC("SELECT gender, surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(bigintval($uid)), __FILE__, __LINE__);
+ array(bigintval($uid)), __FILE__, __LINE__);
// Is his data available?
//* DEBUG: */ echo "*L:".__LINE__.'/'.SQL_NUMROWS($result_user)."*<br />";
// Do we have a stats entry?
$result_stats = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE pool_id=%s AND `userid`=%s AND timestamp_ordered='%s' LIMIT 1",
- array($DATA[0], $DATA[1], $DATA[6]), __FILE__, __LINE__);
+ array($DATA[0], $DATA[1], $DATA[6]), __FILE__, __LINE__);
// If there's no stats entry add it!
//* DEBUG: */ echo "!L:".__LINE__.'/'.SQL_NUMROWS($result_stats)."!<br />";
if (SQL_NUMROWS($result_stats) == 0) {
// No entry was found, so we add him!
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_stats` (pool_id , userid, cat_id, payment_id, subject, url , max_rec , timestamp_ordered, timestamp_sstart) VALUES ('%s','%s','%s','%s','%s','%s','%s','%s' , UNIX_TIMESTAMP())",
- array(bigintval($DATA[0]), bigintval($DATA[1]), bigintval($DATA[9]), bigintval($DATA[5]), $DATA[2], $DATA[7], $DATA[8], bigintval($DATA[6])), __FILE__, __LINE__);
+ array(bigintval($DATA[0]), bigintval($DATA[1]), bigintval($DATA[9]), bigintval($DATA[5]), $DATA[2], $DATA[7], $DATA[8], bigintval($DATA[6])), __FILE__, __LINE__);
// Receive it's ID for the links table
$result_stats = SQL_QUERY_ESC("SELECT `id` FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE pool_id=%s AND `userid`=%s AND timestamp_ordered='%s' LIMIT 1",
- array(bigintval($DATA[0]), bigintval($DATA[1]), bigintval($DATA[6])), __FILE__, __LINE__);
+ array(bigintval($DATA[0]), bigintval($DATA[1]), bigintval($DATA[6])), __FILE__, __LINE__);
} // END - if
//* DEBUG: */ echo "!L:".__LINE__.'/'.SQL_NUMROWS($result_stats)."!<br />";
//* DEBUG: */ echo "?L:".__LINE__.'/'.$dummy.'/'.$key.'/'.$uid.'('.$DATA[1].")/".$DATA[0].'/'.$stats_id."?<br />";
switch (removeReceiver($dummy, $key, bigintval($uid), bigintval($DATA[0]), bigintval($stats_id)))
{
- case 'done':
- // Prepare the mail
- $DATA[11] = bigintval($stats_id);
- $DATA[12] = $sname;
- $DATA[13] = $fname;
- $DATA[14] = translateGender($gender);
-
- // Replace text variables
- foreach ($GLOBALS['replacer'] as $key => $value) {
- if (isset($DATA[$key])) $DATA[3] = str_replace($value, $DATA[$key], $DATA[3]);
- } // END - if
-
- // Prepare content
- $content = array(
+ case 'done':
+ // Prepare the mail
+ $DATA[11] = bigintval($stats_id);
+ $DATA[12] = $sname;
+ $DATA[13] = $fname;
+ $DATA[14] = translateGender($gender);
+
+ // Replace text variables
+ foreach ($GLOBALS['replacer'] as $key => $value) {
+ if (isset($DATA[$key])) $DATA[3] = str_replace($value, $DATA[$key], $DATA[3]);
+ } // END - if
+
+ // Prepare content
+ $content = array(
'id' => $DATA[11],
'url' => $DATA[7],
'sender_uid' => $DATA[1],
'time' => createFancyTime(getPaymentPoints($DATA[5], "time")),
'points' => translateComma(getPaymentPoints($DATA[5], "payment")),
'text' => $DATA[3]
- );
+ );
- // Load message template
- $mailText = LOAD_EMAIL_TEMPLATE("normal-mail", $content, bigintval($uid));
+ // Load message template
+ $mailText = LOAD_EMAIL_TEMPLATE("normal-mail", $content, bigintval($uid));
- // Send mail away
- sendEmail($email, $DATA[2], $mailText, $HTML);
+ // Send mail away
+ sendEmail($email, $DATA[2], $mailText, $HTML);
- // Count sent mails...
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET emails_sent=emails_sent+1 WHERE userid=%s LIMIT 1",
+ // Count sent mails...
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET emails_sent=emails_sent+1 WHERE userid=%s LIMIT 1",
array(bigintval($DATA[1])), __FILE__, __LINE__);
- if (GET_EXT_VERSION('user') >= '0.1.4') {
- // Update mails received for receiver
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET emails_received=emails_received+1 WHERE userid=%s LIMIT 1",
+ if (GET_EXT_VERSION('user') >= '0.1.4') {
+ // Update mails received for receiver
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET emails_received=emails_received+1 WHERE userid=%s LIMIT 1",
array(bigintval($uid)), __FILE__, __LINE__);
- } // END - if
-
- // Update mediadata if version is 0.0.4 or higher
- if (GET_EXT_VERSION('mediadata') >= '0.0.4') {
- // Update entry (or add missing)
- //* DEBUG: */ echo "*MEDIA/L:".__LINE__."*<br />";
- MEDIA_UPDATE_ENTRY(array("total_send", "normal_send"), 'add', 1);
- } // END - if
-
- // And count up the mail
- $GLOBALS['pool_cnt']++;
- //* DEBUG: */ echo"*EXIT/L:".__LINE__.'/'.$GLOBALS['pool_cnt']."*<br />";
- break;
-
- case "already":
- // Entry already found, but we still count one up!
- $GLOBALS['pool_cnt']++;
- //* DEBUG: */ echo"*EXIT/L:".__LINE__.'/'.$GLOBALS['pool_cnt']."<br />";
- break;
+ } // END - if
+
+ // Update mediadata if version is 0.0.4 or higher
+ if (GET_EXT_VERSION('mediadata') >= '0.0.4') {
+ // Update entry (or add missing)
+ //* DEBUG: */ echo "*MEDIA/L:".__LINE__."*<br />";
+ MEDIA_UPDATE_ENTRY(array("total_send", "normal_send"), 'add', 1);
+ } // END - if
+
+ // And count up the mail
+ $GLOBALS['pool_cnt']++;
+ //* DEBUG: */ echo"*EXIT/L:".__LINE__.'/'.$GLOBALS['pool_cnt']."*<br />";
+ break;
+
+ case "already":
+ // Entry already found, but we still count one up!
+ $GLOBALS['pool_cnt']++;
+ //* DEBUG: */ echo"*EXIT/L:".__LINE__.'/'.$GLOBALS['pool_cnt']."<br />";
+ break;
}
}
// Get sender's data
$result_sender = SQL_QUERY_ESC("SELECT surname, family, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(bigintval($DATA[1])), __FILE__, __LINE__);
+ array(bigintval($DATA[1])), __FILE__, __LINE__);
// Is the sender found?
if (SQL_NUMROWS($result_sender) == 1) {
// Set status to SEND because we completely send it away
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET `data_type`='SEND', `target_send`=0, `receivers`='' WHERE `id`=%s LIMIT 1",
- array(bigintval($DATA[0])), __FILE__, __LINE__);
+ array(bigintval($DATA[0])), __FILE__, __LINE__);
// Update send-completed-time
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_stats` SET `timestamp_send`=UNIX_TIMESTAMP() WHERE `pool_id`=%s LIMIT 1",
- array(bigintval($DATA[0])), __FILE__, __LINE__);
+ array(bigintval($DATA[0])), __FILE__, __LINE__);
$lastSentId = $DATA[0]; $GLOBALS['pool_cnt'] = 0;
$cnt2 += $GLOBALS['pool_cnt'];
break;
}
// Do we have send maximum mails?
- elseif (($GLOBALS['pool_cnt'] >= getConfig('max_send')) || ($cnt2 >= getConfig('max_send'))) {
+ elseif (($GLOBALS['pool_cnt'] >= getConfig('max_send')) || ($cnt2 >= getConfig('max_send'))) {
// There are some mails left to send for next round, so we reset the status back to NEW (=still not fully delivered)
$add = '';
if ($GLOBALS['pool_cnt'] <= $DATA[8]) $add = ", target_send=target_send-".$GLOBALS['pool_cnt'];
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET data_type='NEW', receivers='%s'".$add." WHERE `id`=%s LIMIT 1",
- array(implode(';', $dummy), bigintval($DATA[0])), __FILE__, __LINE__);
+ array(implode(';', $dummy), bigintval($DATA[0])), __FILE__, __LINE__);
//* DEBUG: */ echo"*EXIT/L:".__LINE__."*<br />";
break;
if (($RECEIVERS[0] == '0') || (empty($RECEIVERS[0]))) {
// List was empty
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET data_type='SEND' WHERE `id`=%s LIMIT 1",
- array(bigintval($DATA[0])), __FILE__, __LINE__);
+ array(bigintval($DATA[0])), __FILE__, __LINE__);
} else {
// Is the userid set?
if ($uid > 0) {
// Update receivers
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET receivers='%s' WHERE `id`=%s LIMIT 1",
- array(implode(';', $dummy), bigintval($DATA[0])), __FILE__, __LINE__);
+ array(implode(';', $dummy), bigintval($DATA[0])), __FILE__, __LINE__);
}
}
}
// We have to pay back some points to the sender (we add them directly :-P)
$result = SQL_QUERY_ESC("SELECT email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
- array(bigintval($uid)), __FILE__, __LINE__);
+ array(bigintval($uid)), __FILE__, __LINE__);
$DATA[10] = $PB; $DATA[11] = $cnt_back[$uid];
// User found?
// Update profile data
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET last_profile_sent=UNIX_TIMESTAMP(), notified='Y' WHERE userid=%s LIMIT 1",
- array(bigintval($content['userid'])), __FILE__, __LINE__);
+ array(bigintval($content['userid'])), __FILE__, __LINE__);
} // END - while
} // END - if
// +----------------------------------------------------------------------+
/**
-* Class RSS Parser
-*
-* This class offers methods to parse RSS Files
-*
-* @link http://www.fase4.com/rdf/ Latest release of this class
-* @package rss
-* @copyright Copyright (c) 2001 fase4.com. All rights reserved.
-* @author Stefan Saasen <s@fase4.com>
-* @author Roland Haeder <webmaster@mxchange.org>
-* @version 1.7 ($Date$Revision: 856 $
-* @access public
-*/
+ * Class RSS Parser
+ *
+ * This class offers methods to parse RSS Files
+ *
+ * @link http://www.fase4.com/rdf/ Latest release of this class
+ * @package rss
+ * @copyright Copyright (c) 2001 fase4.com. All rights reserved.
+ * @author Stefan Saasen <s@fase4.com>
+ * @author Roland Haeder <webmaster@mxchange.org>
+ * @version 1.7 ($Date$Revision: 856 $
+ * @access public
+ */
class fase4_rdf {
- /**
- * Word-wrapping mode for description, set it to 0 do disable this feature! Ommits _use_nl2br!
- *
- * @access private
- * @var integer
- */
- var $_word_wrap = 0;
-
- /**
- * Wether to recode \n -> <br /> or not in description
- *
- * @access private
- * @var boolean
- */
- var $_use_nl2br = true;
-
- /**
- * Sets the decoding mode of the read data (UTF8 scrambles some german umlauts here!)
- *
- * "htmlentities" - Use the function htmlentities()
- * "utf8_decode" - Use the function ut8_decode() when you have UTF8 encoded text
- *
- * @access private
- * @var string
- */
- var $_decoding_mode = "utf8_decode";
-
- /**
- * If $_link_target is set a target='xxx' attribute in each <a /> and <form /> html tag will be added
- *
- * Possible values are "_blank", "_content", "_parent", "_self", "_top"
- *
- * @access private
- * @var string
- */
- var $_link_target = "_blank";
-
- /**
- * vars for proxy settings - Prox Host
- *
- * @access private
- * @var string
- */
- var $_phost = "";
-
- /**
- * vars for proxy settings - Prox Port
- *
- * @access private
- * @var string
- */
- var $_pport = "";
-
- /**
- * vars for proxy settings - Prox Username
- *
- * @access private
- * @var string
- */
- var $_pname = "";
-
- /**
- * vars for proxy settings - Prox Password
- *
- * @access private
- * @var string
- */
- var $_ppasswd = "";
-
- /**
- * just a flag for checking if proxy-support should be enabled
- * set default to false (will be enabled if set_proxy is called)
- *
- * @access private
- * @see set_proxy()
- * @var bool
- */
- var $_use_proxy = false;
-
- /**
- * just a flag for checking if proxy-support with authentication
- * should be enabled
- * set default to false (will be enabled if set_proxy is called)
- *
- * @access private
- * @see set_proxy()
- * @var boolean
- */
- var $_use_proxy_auth = false;
-
- /**
- * The time the Files will be cached (in seconds).
- *
- * @access private
- * @var int
- */
- var $_refresh = 60; // int
-
- /**
- * The Name of the cached File.
- *
- * @access private
- * @var string
- */
- var $_cached_file = ""; // String
-
- /**
- * Indicates whether the cached or the remote file was used.
- *
- * @access private
- * @var boolean
- */
- var $_use_cached_file = true;
-
- /**
- * (fast|normal) depends on _use_dynamic_display(). _use_dynamic_display( TRUE ) -> 'normal', otherwise 'fast'
- *
- * @access private
- * @var string
- */
- var $_cache_type = "fast";
-
- /**
- * The Name of the Remote File.
- *
- * @access private
- * @var string
- */
- var $_remote_file = "";
-
- /**
- * Path to the Cache Directory.
- *
- * @access private
- * @var string
- */
- var $_cache_dir = "cache/"; // String
-
- /**
- * Indicates whether the Creating of the Cache Directory needs to be done or not.
- *
- * @access private
- * @var boolean
- */
- var $_cache_dir_ok = false;
-
- /**
- * Type of the file to be parsed (RSS or RDF).
- *
- * The Type depends on the root node
- *
- * @access private
- * @var string
- */
- var $_type = "rss"; // string (rss or rdf)
-
- /**
- * Array of Display Settings.
- *
- * Specific Parameters can be set to hidden. These are:
- * image, channel and textinput. If set to "hidden" those elements won't be displayed.
- *
- * @access private
- * @var array
- */
- var $_display_opt = array(
+ /**
+ * Word-wrapping mode for description, set it to 0 do disable this feature! Ommits _use_nl2br!
+ *
+ * @access private
+ * @var integer
+ */
+ var $_word_wrap = 0;
+
+ /**
+ * Wether to recode \n -> <br /> or not in description
+ *
+ * @access private
+ * @var boolean
+ */
+ var $_use_nl2br = true;
+
+ /**
+ * Sets the decoding mode of the read data (UTF8 scrambles some german umlauts here!)
+ *
+ * "htmlentities" - Use the function htmlentities()
+ * "utf8_decode" - Use the function ut8_decode() when you have UTF8 encoded text
+ *
+ * @access private
+ * @var string
+ */
+ var $_decoding_mode = "utf8_decode";
+
+ /**
+ * If $_link_target is set a target='xxx' attribute in each <a /> and <form /> html tag will be added
+ *
+ * Possible values are "_blank", "_content", "_parent", "_self", "_top"
+ *
+ * @access private
+ * @var string
+ */
+ var $_link_target = "_blank";
+
+ /**
+ * vars for proxy settings - Prox Host
+ *
+ * @access private
+ * @var string
+ */
+ var $_phost = "";
+
+ /**
+ * vars for proxy settings - Prox Port
+ *
+ * @access private
+ * @var string
+ */
+ var $_pport = "";
+
+ /**
+ * vars for proxy settings - Prox Username
+ *
+ * @access private
+ * @var string
+ */
+ var $_pname = "";
+
+ /**
+ * vars for proxy settings - Prox Password
+ *
+ * @access private
+ * @var string
+ */
+ var $_ppasswd = "";
+
+ /**
+ * just a flag for checking if proxy-support should be enabled
+ * set default to false (will be enabled if set_proxy is called)
+ *
+ * @access private
+ * @see set_proxy()
+ * @var bool
+ */
+ var $_use_proxy = false;
+
+ /**
+ * just a flag for checking if proxy-support with authentication
+ * should be enabled
+ * set default to false (will be enabled if set_proxy is called)
+ *
+ * @access private
+ * @see set_proxy()
+ * @var boolean
+ */
+ var $_use_proxy_auth = false;
+
+ /**
+ * The time the Files will be cached (in seconds).
+ *
+ * @access private
+ * @var int
+ */
+ var $_refresh = 60; // int
+
+ /**
+ * The Name of the cached File.
+ *
+ * @access private
+ * @var string
+ */
+ var $_cached_file = ""; // String
+
+ /**
+ * Indicates whether the cached or the remote file was used.
+ *
+ * @access private
+ * @var boolean
+ */
+ var $_use_cached_file = true;
+
+ /**
+ * (fast|normal) depends on _use_dynamic_display(). _use_dynamic_display( TRUE ) -> 'normal', otherwise 'fast'
+ *
+ * @access private
+ * @var string
+ */
+ var $_cache_type = "fast";
+
+ /**
+ * The Name of the Remote File.
+ *
+ * @access private
+ * @var string
+ */
+ var $_remote_file = "";
+
+ /**
+ * Path to the Cache Directory.
+ *
+ * @access private
+ * @var string
+ */
+ var $_cache_dir = "cache/"; // String
+
+ /**
+ * Indicates whether the Creating of the Cache Directory needs to be done or not.
+ *
+ * @access private
+ * @var boolean
+ */
+ var $_cache_dir_ok = false;
+
+ /**
+ * Type of the file to be parsed (RSS or RDF).
+ *
+ * The Type depends on the root node
+ *
+ * @access private
+ * @var string
+ */
+ var $_type = "rss"; // string (rss or rdf)
+
+ /**
+ * Array of Display Settings.
+ *
+ * Specific Parameters can be set to hidden. These are:
+ * image, channel and textinput. If set to "hidden" those elements won't be displayed.
+ *
+ * @access private
+ * @var array
+ */
+ var $_display_opt = array(
'build' => "",
'image' => "",
'channel' => "",
'sitelink' => "",
'refid' => "",
'reflink' => "",
- );
-
- /**
- * Defines the width attribute in the table that holds the rdf/rss representation
- *
- * @access private
- * @var int
- * @see see_table_width()
- */
- var $_table_width = "100%";
-
- /**
- * Indicates whether or not to use dynamic Display Settings
- *
- * @access private
- * @var array
- */
- var $_use_dynamic_display = false;
-
- /**
- * <item> count
- *
- * @access private
- * @var int
- */
- var $_item_count = 0;
-
- /**
- * No of max <item>s
- *
- * @access private
- * @var boolean
- */
- var $_max_count = false;
-
- /**
- * Array containing the content of <channel />
- *
- * @access private
- * @var array
- */
- var $_array_channel = array();
-
- /**
- * Array containing the content of each <item />
- *
- * @access private
- * @var array
- */
- var $_array_item = array();
-
- /**
- * Array containing the content of <textinput />
- *
- * @access private
- * @var array
- */
- var $_array_textinput = array();
-
- /**
- * Array containing the content of <image />
- *
- * @access private
- * @var array
- */
- var $_array_image = array();
-
- /**
- * Array containing the Channel content. Just For internal XML Parser Purposes.
- *
- * @access private
- * @var array
- */
- var $_citem = array();
-
- /**
- * Array containing the Channel Parser Depth. Just For internal XML Parser Purposes.
- *
- * @access private
- * @var array
- */
- var $_cdepth = array();
-
- /**
- * Array containing the Channel tags. Just For internal XML Parser Purposes.
- *
- * @access private
- * @var array
- */
- var $_ctags = array( "x" );
-
- /**
- * Array containing the Channel content. Just For internal XML Parser Purposes.
- *
- * @access private
- * @var array
- */
- var $_item = array(); // Array
-
- /**
- * Array containing the Channel Parser Depth. Just For internal XML Parser Purposes.
- *
- * @access private
- * @var array
- */
- var $_depth = array(); // Array
-
- /**
- * Array containing the tags. Just For internal XML Parser Purposes.
- *
- * @access private
- * @var array
- */
- var $_tags = array( "x" ); // Array
-
- /**
- * Garbage collection: probability in percent
- *
- * @var integer 0 => never
- * @access public
- */
- var $gc_probability = 1;
-
- /**
- * HTML Output
- *
- * @var string
- * @access private
- */
- var $_output = "";
-
- /**
- * @var string
- */
- var $_parse_mode = "";
-
- // Output variable
- var $out = "";
-
- // Salt for hashing
- var $salt = "";
-
- /**
- * Constructor of our Class
- *
- * This Method checks if the Cache Directory can be found. Otherwise it tries to creat the Cache Directory at the specified Path.
- * Additionally the Refresh Time is set to a default Value of 1200s (20 min).
- *
- * @access public
- * @author Stefan Saasen <s@fase4.com>
- * @see _refresh
- */
- function fase4_rdf()
- {
- // default Value, to be overwritten in set_refresh()
- $this->_refresh = (time() - 1200);
- $this->_clear_cItems();
- $this->_clear_Items();
- }
-
- /**
- * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
- *
- * @access public
- * @author Stefan Saasen <s@fase4.com>
- * @param string $rdf RDF File (Location)
- * @return string Displays RDF Content ( using _display() )
- * @see _remote_file, cache()
- */
- function parse_RDF( $rdf )
- {
- unset($this->_array_item);
- $this->_remote_file = $rdf;
- $this->out .= "<!-- http://www.fase4.com/rdf/ -->";
- $this->out .= "<table width=\"".$this->_table_width."\">";
- $this->out .= $this->cache();
- $this->out .= "</table>";
- $this->_output = "";
- $this->_item_count = 0;
- return true;
- }
-
- /**
- * This Method is called when all parsing is finished to use the garbage collection
- *
- * @access public
- * @author Stefan Saasen <s@fase4.com>
- * @param string $rdf RDF File (Location)
- * @return string Displays RDF Content ( using _display() )
- * @see _remote_file, cache()
- */
- function finish($return = false)
- {
+ );
+
+ /**
+ * Defines the width attribute in the table that holds the rdf/rss representation
+ *
+ * @access private
+ * @var int
+ * @see see_table_width()
+ */
+ var $_table_width = "100%";
+
+ /**
+ * Indicates whether or not to use dynamic Display Settings
+ *
+ * @access private
+ * @var array
+ */
+ var $_use_dynamic_display = false;
+
+ /**
+ * <item> count
+ *
+ * @access private
+ * @var int
+ */
+ var $_item_count = 0;
+
+ /**
+ * No of max <item>s
+ *
+ * @access private
+ * @var boolean
+ */
+ var $_max_count = false;
+
+ /**
+ * Array containing the content of <channel />
+ *
+ * @access private
+ * @var array
+ */
+ var $_array_channel = array();
+
+ /**
+ * Array containing the content of each <item />
+ *
+ * @access private
+ * @var array
+ */
+ var $_array_item = array();
+
+ /**
+ * Array containing the content of <textinput />
+ *
+ * @access private
+ * @var array
+ */
+ var $_array_textinput = array();
+
+ /**
+ * Array containing the content of <image />
+ *
+ * @access private
+ * @var array
+ */
+ var $_array_image = array();
+
+ /**
+ * Array containing the Channel content. Just For internal XML Parser Purposes.
+ *
+ * @access private
+ * @var array
+ */
+ var $_citem = array();
+
+ /**
+ * Array containing the Channel Parser Depth. Just For internal XML Parser Purposes.
+ *
+ * @access private
+ * @var array
+ */
+ var $_cdepth = array();
+
+ /**
+ * Array containing the Channel tags. Just For internal XML Parser Purposes.
+ *
+ * @access private
+ * @var array
+ */
+ var $_ctags = array( "x" );
+
+ /**
+ * Array containing the Channel content. Just For internal XML Parser Purposes.
+ *
+ * @access private
+ * @var array
+ */
+ var $_item = array(); // Array
+
+ /**
+ * Array containing the Channel Parser Depth. Just For internal XML Parser Purposes.
+ *
+ * @access private
+ * @var array
+ */
+ var $_depth = array(); // Array
+
+ /**
+ * Array containing the tags. Just For internal XML Parser Purposes.
+ *
+ * @access private
+ * @var array
+ */
+ var $_tags = array( "x" ); // Array
+
+ /**
+ * Garbage collection: probability in percent
+ *
+ * @var integer 0 => never
+ * @access public
+ */
+ var $gc_probability = 1;
+
+ /**
+ * HTML Output
+ *
+ * @var string
+ * @access private
+ */
+ var $_output = "";
+
+ /**
+ * @var string
+ */
+ var $_parse_mode = "";
+
+ // Output variable
+ var $out = "";
+
+ // Salt for hashing
+ var $salt = "";
+
+ /**
+ * Constructor of our Class
+ *
+ * This Method checks if the Cache Directory can be found. Otherwise it tries to creat the Cache Directory at the specified Path.
+ * Additionally the Refresh Time is set to a default Value of 1200s (20 min).
+ *
+ * @access public
+ * @author Stefan Saasen <s@fase4.com>
+ * @see _refresh
+ */
+ function fase4_rdf()
+ {
+ // default Value, to be overwritten in set_refresh()
+ $this->_refresh = (time() - 1200);
+ $this->_clear_cItems();
+ $this->_clear_Items();
+ }
+
+ /**
+ * This Method starts the parsing of the specified RDF File. The File can be a local or a remote File.
+ *
+ * @access public
+ * @author Stefan Saasen <s@fase4.com>
+ * @param string $rdf RDF File (Location)
+ * @return string Displays RDF Content ( using _display() )
+ * @see _remote_file, cache()
+ */
+ function parse_RDF( $rdf )
+ {
+ unset($this->_array_item);
+ $this->_remote_file = $rdf;
+ $this->out .= "<!-- http://www.fase4.com/rdf/ -->";
+ $this->out .= "<table width=\"".$this->_table_width."\">";
+ $this->out .= $this->cache();
+ $this->out .= "</table>";
+ $this->_output = "";
+ $this->_item_count = 0;
+ return true;
+ }
+
+ /**
+ * This Method is called when all parsing is finished to use the garbage collection
+ *
+ * @access public
+ * @author Stefan Saasen <s@fase4.com>
+ * @param string $rdf RDF File (Location)
+ * @return string Displays RDF Content ( using _display() )
+ * @see _remote_file, cache()
+ */
+ function finish($return = false)
+ {
if (!$return) {
echo $this->out;
} else {
return $this->out;
}
- flush();
- $this->_garbage_collection();
- }
-
- /**
- * With this method you can decide whether to use the normal cache and dynamic display Options or to use a static cache.
- *
- * In the first case the rdf/rss File will be stored locally, in the second case the html output of the specified source will be stored.
- * In this case you can not modify the display settings.
- * processing time: ( 1.4792) --> remote file
- * processing time: ( 0.0313) --> using 'normal cache' with display Modification turned on.
- * processing time: ( 0.0019) --> using 'fast cache'
- *
- * @access public
- * @author Stefan Saasen <s@fase4.com>
- * @param string $rdf RDF File (Location)
- * @return string Displays RDF Content ( using _display() )
- * @see _remote_file, cache()
- */
- function use_dynamic_display( $bool )
- {
- $this->_use_dynamic_display = $bool;
- return true;
- }
-
- /**
- * This Method avtually parses the XML data.
- *
- * @access private
- * @author Stefan Saasen <s@fase4.com>
- * @param string $data RDF File XML Data
- * @see _clear_Items()
- */
- function _parse_xRDF( $data )
- {
- $this->_clear_Items();
- $xml_parser = xml_parser_create();
- xml_set_object($xml_parser,$this);
- xml_parser_set_option($xml_parser,XML_OPTION_CASE_FOLDING,0);
- xml_set_element_handler($xml_parser, "_startElement", "_endElement");
- xml_set_character_data_handler($xml_parser, "_parseData");
- if (!xml_parse($xml_parser, trim($data))) {
- $this->_throw_exception(sprintf("XML error: %s at line %d",
- xml_error_string(xml_get_error_code($xml_parser)),
- xml_get_current_line_number($xml_parser))."<br /><br />Exception in function parse_RDF().");
- }
- xml_parser_free($xml_parser);
- }
-
-
- /**
- * This Methods allows you to set the Refresh Time
- *
- * @access public
- * @author Stefan Saasen <s@fase4.com>
- * @param int $seconds time files will be cached (in seconds).
- * @return boolean
- * @see _refresh
- */
- function set_refresh( $seconds )
- {
- $this->_refresh = (time() - $seconds);
- return true;
- }
-
- function set_salt( $saltPara )
- {
- $this->salt = $saltPara;
- return true;
- }
-
- /**
- * This Methods allows you to set the No. of <item>s to display
- *
- * @access public
- * @param int $int No of max <item>s
- * @author Stefan Saasen <s@fase4.com>
- * @return boolean
- * @see _max_count, _endElement()
- */
- function set_max_item( $int )
- {
- $this->_max_count = $int;
- return true;
- }
-
- /**
- * This Methods allows you to set the Cache Directory
- *
- * @access public
- * @author Stefan Saasen <s@fase4.com>
- * @param string $dir Path to Directory.
- * @return boolean
- * @see _cache_dir
- */
- function set_CacheDir( $dir )
- {
- if(substr($dir, -1) != "/") {
- $dir = $dir."/";
- }
- $this->_cache_dir = $dir;
- }
-
- /**
- * This Method displays Error Messages and terminates the Execution of the Script
- *
- * @access private
- * @param string $msg Message to display on failure
- * @author Stefan Saasen <s@fase4.com>
- */
- function _throw_exception( $msg )
- {
- $this->out .= "<div style=\"font-family: verdana, helvetica, arial, sans-serif;font-size:11px; color: #6699cc;margin-top:10px;margin-bottom:10px;\" align=\"center\">fase4 RDF Error: ".$msg."</div>";
- return true;
- }
-
- /**
- * This Method clears the Array containig the Items.
- *
- * @access private
- * @author Stefan Saasen <s@fase4.com>
- * @see _item
- */
- function _clear_Items( ) {
- $this->_item = array(
+ flush();
+ $this->_garbage_collection();
+ }
+
+ /**
+ * With this method you can decide whether to use the normal cache and dynamic display Options or to use a static cache.
+ *
+ * In the first case the rdf/rss File will be stored locally, in the second case the html output of the specified source will be stored.
+ * In this case you can not modify the display settings.
+ * processing time: ( 1.4792) --> remote file
+ * processing time: ( 0.0313) --> using 'normal cache' with display Modification turned on.
+ * processing time: ( 0.0019) --> using 'fast cache'
+ *
+ * @access public
+ * @author Stefan Saasen <s@fase4.com>
+ * @param string $rdf RDF File (Location)
+ * @return string Displays RDF Content ( using _display() )
+ * @see _remote_file, cache()
+ */
+ function use_dynamic_display( $bool )
+ {
+ $this->_use_dynamic_display = $bool;
+ return true;
+ }
+
+ /**
+ * This Method avtually parses the XML data.
+ *
+ * @access private
+ * @author Stefan Saasen <s@fase4.com>
+ * @param string $data RDF File XML Data
+ * @see _clear_Items()
+ */
+ function _parse_xRDF( $data )
+ {
+ $this->_clear_Items();
+ $xml_parser = xml_parser_create();
+ xml_set_object($xml_parser,$this);
+ xml_parser_set_option($xml_parser,XML_OPTION_CASE_FOLDING,0);
+ xml_set_element_handler($xml_parser, "_startElement", "_endElement");
+ xml_set_character_data_handler($xml_parser, "_parseData");
+ if (!xml_parse($xml_parser, trim($data))) {
+ $this->_throw_exception(sprintf("XML error: %s at line %d",
+ xml_error_string(xml_get_error_code($xml_parser)),
+ xml_get_current_line_number($xml_parser))."<br /><br />Exception in function parse_RDF().");
+ }
+ xml_parser_free($xml_parser);
+ }
+
+
+ /**
+ * This Methods allows you to set the Refresh Time
+ *
+ * @access public
+ * @author Stefan Saasen <s@fase4.com>
+ * @param int $seconds time files will be cached (in seconds).
+ * @return boolean
+ * @see _refresh
+ */
+ function set_refresh( $seconds )
+ {
+ $this->_refresh = (time() - $seconds);
+ return true;
+ }
+
+ function set_salt( $saltPara )
+ {
+ $this->salt = $saltPara;
+ return true;
+ }
+
+ /**
+ * This Methods allows you to set the No. of <item>s to display
+ *
+ * @access public
+ * @param int $int No of max <item>s
+ * @author Stefan Saasen <s@fase4.com>
+ * @return boolean
+ * @see _max_count, _endElement()
+ */
+ function set_max_item( $int )
+ {
+ $this->_max_count = $int;
+ return true;
+ }
+
+ /**
+ * This Methods allows you to set the Cache Directory
+ *
+ * @access public
+ * @author Stefan Saasen <s@fase4.com>
+ * @param string $dir Path to Directory.
+ * @return boolean
+ * @see _cache_dir
+ */
+ function set_CacheDir( $dir )
+ {
+ if(substr($dir, -1) != "/") {
+ $dir = $dir."/";
+ }
+ $this->_cache_dir = $dir;
+ }
+
+ /**
+ * This Method displays Error Messages and terminates the Execution of the Script
+ *
+ * @access private
+ * @param string $msg Message to display on failure
+ * @author Stefan Saasen <s@fase4.com>
+ */
+ function _throw_exception( $msg )
+ {
+ $this->out .= "<div style=\"font-family: verdana, helvetica, arial, sans-serif;font-size:11px; color: #6699cc;margin-top:10px;margin-bottom:10px;\" align=\"center\">fase4 RDF Error: ".$msg."</div>";
+ return true;
+ }
+
+ /**
+ * This Method clears the Array containig the Items.
+ *
+ * @access private
+ * @author Stefan Saasen <s@fase4.com>
+ * @see _item
+ */
+ function _clear_Items( ) {
+ $this->_item = array(
'title'=>"",
'link'=>"",
'description'=>"",
'lastBuildDate'=>"",
'width'=>"",
'height'=>""
- );
- }
- /**
- * This Method clears the Array containig the Channel Items.
- *
- * @access private
- * @author Stefan Saasen <s@fase4.com>
- * @see _item
- */
- function _clear_cItems( ) {
- $this->_citem = array(
+ );
+ }
+ /**
+ * This Method clears the Array containig the Channel Items.
+ *
+ * @access private
+ * @author Stefan Saasen <s@fase4.com>
+ * @see _item
+ */
+ function _clear_cItems( ) {
+ $this->_citem = array(
'title'=>"",
'link'=>"",
'description'=>"",
'sitelink'=>"",
'refid'=>"",
'reflink'=>"",
- );
- }
-
- /**
- * XML Parser Start Element Handler
- *
- * @access private
- * @author Stefan Saasen <s@fase4.com>
- * @param mixed $parser a reference to the XML parser calling the handler.
- * @param string $name contains the name of the element for which this handler is called.
- * @param string $attrs contains an associative array with the element's attributes (if any).
- * @see _get_ChannelData(), _clear_Items(), _type, _parse_mode, _depth, _tags, _cdepth, _ctags
- */
- function _startElement($parser, $name, $attrs) {
- // We have to determine, which type of xml data we have to parse
- if($name == "rss") {
- $this->_type = "rss";
- } elseif($name == "rdf:RDF" OR $name == "rdf") {
- $this->_type = "rdf";
- }
-
-
- if ( $name == "channel" AND $this->_type != "rdf" ) {
- $this->_parse_mode = "channel";
- } elseif ( ($name=="item")
- ||($name=="image")
- ||($name=="textinput")
- ||(($name=="channel") && ($this->_type != "rss")) ) {
- if($this->_parse_mode=="channel") {
- $this->_get_ChannelData( $parser );
- }
- $this->_parse_mode = "all";
- }
-
- if( !isset( $this->_depth[$this->get_parser_id($parser)] ) ) {
- $this->_depth[$this->get_parser_id($parser)] = 0;
- }
- $this->_depth[$this->get_parser_id($parser)]++;
- array_push($this->_tags, $name);
-
- if( !isset( $this->_cdepth[$this->get_parser_id($parser)] ) ) {
- $this->_cdepth[$this->get_parser_id($parser)] = 0;
- }
- $this->_cdepth[$this->get_parser_id($parser)]++;
- array_push($this->_ctags, $name);
- } // END _startElement()
-
- /**
- * Retrives the Channel Data in <rss> File
- *
- * @access private
- * @author Stefan Saasen <s@fase4.com>
- * @param mixed $parser a reference to the XML parser calling the handler.
- * @see _output, _display_opt, _citem
- */
- function _get_ChannelData( $parser )
- {
- $this->_citem["link"] = trim($this->_citem["link"]);
- if (($this->_display_opt["sitelink"] == $this->_citem["link"]) && (!empty($this->_display_opt["reflink"])) && (!empty($this->_display_opt["refid"])))
- {
- $this->_citem["link"] .= $this->_display_opt["reflink"].$this->_display_opt["refid"];
- }
-
- if( empty($this->_display_opt["channel"]) OR
- $this->_display_opt["channel"] != "hidden") {
- $this->_output .= "<tr><td>\n";
- $this->_output .= "<table border=\"0\" width=\"100%\" class=\"fase4_rdf_meta\" cellspacing=\"5\" cellpadding=\"2\">\n";
- $this->_output .= "<tr><td class=\"fase4_rdf_main_title\"><div class=\"fase4_rdf_main_title\">".htmlspecialchars($this->_citem["title"])."</div></td></tr>\n";
- $this->_output .= "<tr><td class=\"fase4_rdf\">".strip_tags($this->_citem["description"], "<a>, <img>")."</td></tr>\n";
- $this->_output .= "<tr><td> </td></tr>\n";
- $this->_output .= "<tr><td class=\"fase4_rdf\">\n";
- if(isset($this->_display_opt["build"]) && $this->_display_opt["build"] != "hidden") {
- if($this->_citem["lastBuildDate"]){$this->_output .= "build: ". $this->_citem["lastBuildDate"]."<br />";}
- }
- if(isset($this->_display_opt["cache_update"]) && $this->_display_opt["cache_update"] != "hidden" && ( $_update = $this->get_cache_update_time()) ) {
- $this->_output .= "cache update: ".$_update."<br />\n";
- }
- $this->_output .= "<a href=\"".$this->_citem["link"]."\" ";
- if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; }
- $this->_output .= ">".$this->_cut_string($this->_citem["link"])."</a>";
- $this->_output .= "</td></tr>\n";
- $this->_output .= "<tr><td><hr noshade width=\"100%\" size=\"1\"></td></tr>\n";
- $this->_output .= "</table></td></tr>";
- }
- $this->_array_channel = array( "title"=>$this->_citem["title"],
+ );
+ }
+
+ /**
+ * XML Parser Start Element Handler
+ *
+ * @access private
+ * @author Stefan Saasen <s@fase4.com>
+ * @param mixed $parser a reference to the XML parser calling the handler.
+ * @param string $name contains the name of the element for which this handler is called.
+ * @param string $attrs contains an associative array with the element's attributes (if any).
+ * @see _get_ChannelData(), _clear_Items(), _type, _parse_mode, _depth, _tags, _cdepth, _ctags
+ */
+ function _startElement($parser, $name, $attrs) {
+ // We have to determine, which type of xml data we have to parse
+ if($name == "rss") {
+ $this->_type = "rss";
+ } elseif($name == "rdf:RDF" OR $name == "rdf") {
+ $this->_type = "rdf";
+ }
+
+
+ if ( $name == "channel" AND $this->_type != "rdf" ) {
+ $this->_parse_mode = "channel";
+ } elseif ( ($name=="item")
+ ||($name=="image")
+ ||($name=="textinput")
+ ||(($name=="channel") && ($this->_type != "rss")) ) {
+ if($this->_parse_mode=="channel") {
+ $this->_get_ChannelData( $parser );
+ }
+ $this->_parse_mode = "all";
+ }
+
+ if( !isset( $this->_depth[$this->get_parser_id($parser)] ) ) {
+ $this->_depth[$this->get_parser_id($parser)] = 0;
+ }
+ $this->_depth[$this->get_parser_id($parser)]++;
+ array_push($this->_tags, $name);
+
+ if( !isset( $this->_cdepth[$this->get_parser_id($parser)] ) ) {
+ $this->_cdepth[$this->get_parser_id($parser)] = 0;
+ }
+ $this->_cdepth[$this->get_parser_id($parser)]++;
+ array_push($this->_ctags, $name);
+ } // END _startElement()
+
+ /**
+ * Retrives the Channel Data in <rss> File
+ *
+ * @access private
+ * @author Stefan Saasen <s@fase4.com>
+ * @param mixed $parser a reference to the XML parser calling the handler.
+ * @see _output, _display_opt, _citem
+ */
+ function _get_ChannelData( $parser )
+ {
+ $this->_citem["link"] = trim($this->_citem["link"]);
+ if (($this->_display_opt["sitelink"] == $this->_citem["link"]) && (!empty($this->_display_opt["reflink"])) && (!empty($this->_display_opt["refid"])))
+ {
+ $this->_citem["link"] .= $this->_display_opt["reflink"].$this->_display_opt["refid"];
+ }
+
+ if( empty($this->_display_opt["channel"]) OR
+ $this->_display_opt["channel"] != "hidden") {
+ $this->_output .= "<tr><td>\n";
+ $this->_output .= "<table border=\"0\" width=\"100%\" class=\"fase4_rdf_meta\" cellspacing=\"5\" cellpadding=\"2\">\n";
+ $this->_output .= "<tr><td class=\"fase4_rdf_main_title\"><div class=\"fase4_rdf_main_title\">".htmlspecialchars($this->_citem["title"])."</div></td></tr>\n";
+ $this->_output .= "<tr><td class=\"fase4_rdf\">".strip_tags($this->_citem["description"], "<a>, <img>")."</td></tr>\n";
+ $this->_output .= "<tr><td> </td></tr>\n";
+ $this->_output .= "<tr><td class=\"fase4_rdf\">\n";
+ if(isset($this->_display_opt["build"]) && $this->_display_opt["build"] != "hidden") {
+ if($this->_citem["lastBuildDate"]){$this->_output .= "build: ". $this->_citem["lastBuildDate"]."<br />";}
+ }
+ if(isset($this->_display_opt["cache_update"]) && $this->_display_opt["cache_update"] != "hidden" && ( $_update = $this->get_cache_update_time()) ) {
+ $this->_output .= "cache update: ".$_update."<br />\n";
+ }
+ $this->_output .= "<a href=\"".$this->_citem["link"]."\" ";
+ if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; }
+ $this->_output .= ">".$this->_cut_string($this->_citem["link"])."</a>";
+ $this->_output .= "</td></tr>\n";
+ $this->_output .= "<tr><td><hr noshade width=\"100%\" size=\"1\"></td></tr>\n";
+ $this->_output .= "</table></td></tr>";
+ }
+ $this->_array_channel = array( "title"=>$this->_citem["title"],
"link"=>$this->_citem["link"],
"description"=>$this->_citem["description"],
"lastBuildDate"=>$this->_citem["lastBuildDate"]);
- }
-
- /**
- * XML Parser End Element Handler
- *
- * @access private
- * @author Stefan Saasen <s@fase4.com>
- * @param mixed $parser a reference to the XML parser calling the handler.
- * @param string $name contains the name of the element for which this handler is called.
- * @see _clear_Items(), _type, _parse_mode, _depth, _tags, _cdepth, _ctags, _item, _output, _display_opt
- */
- function _endElement($parser, $name) {
- array_pop($this->_tags);
- $this->_depth[$this->get_parser_id($parser)]--;
- array_pop($this->_ctags);
- $this->_cdepth[$this->get_parser_id($parser)]--;
- $this->_item["link"] = trim($this->_item["link"]);
- if ((!empty($this->_display_opt["refid"])) && (!empty($this->_item["link"])))
- {
- if (!ereg("refid=", $this->_item["link"])) $this->_item["link"] .= "?refid=" . $this->_display_opt["refid"];
- }
- switch ($name) {
- case "item":
- if(empty($this->_max_count) OR $this->_item_count < $this->_max_count) {
- if($this->_item["title"] != $this->_item["description"]
- AND $this->_item["description"]) {
-
- // word-wrapping added by Roland Haeder <webmaster@mxchange.org>
- if (($this->_word_wrap > 0) && (strlen($this->_item["description"]) > $this->_word_wrap))
- {
- // Switch off _use_nl2br
- $this->_use_nl2br = false;
- // First remove all \n
- $this->_item["description"] = str_replace('\n', ' ', $this->_item["description"]);
- // Wrap with <br />\n
- $this->_item["description"] = wordwrap($this->_item["description"], $this->_word_wrap, "*<br>\n");
- }
- elseif (($this->_word_wrap == 0) && (!$this->_use_nl2br))
- {
- // Strip tags out instead when word-wrap is disabled
- $this->_item["description"] = strip_tags($this->_item["description"], "<a>, <img>");
- }
-
- // nl2br added by Roland Haeder <webmaster@mxchange.org>
- if ($this->_use_nl2br) $this->_item["description"] = nl2br($this->_item["description"]);
-
- $this->_output .= "<tr><td class=\"fase4_rdf_title\"><div class=\"fase4_rdf_title\"><a class=\"fase4_rdf_title\" href=\"".$this->_item["link"]."\" ";
- if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; }
- $this->_output .= ">".strip_tags($this->_item["title"], "<a>, <img>")."</a> (".$this->_item["pubDate"].")</div></td></tr>\n";
- $this->_output .= "<tr><td class=\"fase4_rdf\">".$this->_item["description"]."</td></tr>\n";
- // we just display the <hr> if there is a description
- $this->_output .= "<tr><td><hr noshade=\"noshade\" size=\"1\" /></td></tr>\n";
- } else {
- $this->_output .= "<tr><td class=\"fase4_rdf\">\n";
- $this->_output .= "<a href=\"".$this->_item["link"]."\" ";
- if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; }
- $this->_output .= ">".$this->_item["title"]."</a></td></tr>\n";
- }
- $this->_array_item[] = array( "title"=>$this->_item["title"],
+ }
+
+ /**
+ * XML Parser End Element Handler
+ *
+ * @access private
+ * @author Stefan Saasen <s@fase4.com>
+ * @param mixed $parser a reference to the XML parser calling the handler.
+ * @param string $name contains the name of the element for which this handler is called.
+ * @see _clear_Items(), _type, _parse_mode, _depth, _tags, _cdepth, _ctags, _item, _output, _display_opt
+ */
+ function _endElement($parser, $name) {
+ array_pop($this->_tags);
+ $this->_depth[$this->get_parser_id($parser)]--;
+ array_pop($this->_ctags);
+ $this->_cdepth[$this->get_parser_id($parser)]--;
+ $this->_item["link"] = trim($this->_item["link"]);
+ if ((!empty($this->_display_opt["refid"])) && (!empty($this->_item["link"])))
+ {
+ if (!ereg("refid=", $this->_item["link"])) $this->_item["link"] .= "?refid=" . $this->_display_opt["refid"];
+ }
+ switch ($name) {
+ case "item":
+ if(empty($this->_max_count) OR $this->_item_count < $this->_max_count) {
+ if($this->_item["title"] != $this->_item["description"]
+ AND $this->_item["description"]) {
+
+ // word-wrapping added by Roland Haeder <webmaster@mxchange.org>
+ if (($this->_word_wrap > 0) && (strlen($this->_item["description"]) > $this->_word_wrap))
+ {
+ // Switch off _use_nl2br
+ $this->_use_nl2br = false;
+ // First remove all \n
+ $this->_item["description"] = str_replace("\n", ' ', $this->_item["description"]);
+ // Wrap with <br />\n
+ $this->_item["description"] = wordwrap($this->_item["description"], $this->_word_wrap, "*<br>\n");
+ }
+ elseif (($this->_word_wrap == 0) && (!$this->_use_nl2br))
+ {
+ // Strip tags out instead when word-wrap is disabled
+ $this->_item["description"] = strip_tags($this->_item["description"], "<a>, <img>");
+ }
+
+ // nl2br added by Roland Haeder <webmaster@mxchange.org>
+ if ($this->_use_nl2br) $this->_item["description"] = nl2br($this->_item["description"]);
+
+ $this->_output .= "<tr><td class=\"fase4_rdf_title\"><div class=\"fase4_rdf_title\"><a class=\"fase4_rdf_title\" href=\"".$this->_item["link"]."\" ";
+ if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; }
+ $this->_output .= ">".strip_tags($this->_item["title"], "<a>, <img>")."</a> (".$this->_item["pubDate"].")</div></td></tr>\n";
+ $this->_output .= "<tr><td class=\"fase4_rdf\">".$this->_item["description"]."</td></tr>\n";
+ // we just display the <hr> if there is a description
+ $this->_output .= "<tr><td><hr noshade=\"noshade\" size=\"1\" /></td></tr>\n";
+ } else {
+ $this->_output .= "<tr><td class=\"fase4_rdf\">\n";
+ $this->_output .= "<a href=\"".$this->_item["link"]."\" ";
+ if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; }
+ $this->_output .= ">".$this->_item["title"]."</a></td></tr>\n";
+ }
+ $this->_array_item[] = array( "title"=>$this->_item["title"],
"link"=>$this->_item["link"],
"description"=>$this->_item["description"]);
- ++$this->_item_count;
- }
- $this->_clear_Items();
- break;
- case "image":
- if(isset($this->_display_opt["image"]) && ($this->_display_opt["image"] != "hidden") && $this->_item["url"]) {
- $this->_output .= "<tr><td class=\"fase4_rdf\">\n";
- $this->_output .= "<a href=\"".$this->_item["link"]."\" ";
- if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; }
- $this->_output .= "><img src=\"".$this->_item["url"]."\"";
- if(isset($this->_item["width"]) && isset($this->_item["height"])) {
- $this->_output .= " width=\"".$this->_item["width"]."\" height=\"".$this->_item["height"]."\"";
- }
- $this->_output .= " alt=\"".$this->_item["title"]."\" border=\"0\" /></a></td></tr>\n";
-
- $this->_array_image[] = array( "url"=>$this->_item["url"],
+ ++$this->_item_count;
+ }
+ $this->_clear_Items();
+ break;
+ case "image":
+ if(isset($this->_display_opt["image"]) && ($this->_display_opt["image"] != "hidden") && $this->_item["url"]) {
+ $this->_output .= "<tr><td class=\"fase4_rdf\">\n";
+ $this->_output .= "<a href=\"".$this->_item["link"]."\" ";
+ if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; }
+ $this->_output .= "><img src=\"".$this->_item["url"]."\"";
+ if(isset($this->_item["width"]) && isset($this->_item["height"])) {
+ $this->_output .= " width=\"".$this->_item["width"]."\" height=\"".$this->_item["height"]."\"";
+ }
+ $this->_output .= " alt=\"".$this->_item["title"]."\" border=\"0\" /></a></td></tr>\n";
+
+ $this->_array_image[] = array( "url"=>$this->_item["url"],
"link"=>$this->_item["link"],
"width"=>$this->_item["width"],
"height"=>$this->_item["height"]);
- $this->_clear_Items();
- } elseif( isset($this->_display_opt["image"] ) && ($this->_display_opt["image"] == "hidden") ) {
- $this->_clear_Items();
- }
-
- break;
- case "channel":
- if(isset($this->_display_opt["channel"]) AND $this->_display_opt["channel"] != "hidden" AND $this->_item["title"] != '') {
- $this->_output .= "<tr><td>\n";
- $this->_output .= '<table border="0" width="100%" class="fase4_rdf_meta" cellspacing="5" cellpadding="2">'."\n";
- $this->_output .= "<tr><td class=\"fase4_rdf\"><div class=\"fase4_rdf_title\">".htmlspecialchars($this->_item["title"])."</div></td></tr>\n";
- $this->_output .= "<tr><td class=\"fase4_rdf\">".strip_tags($this->_item["description"], "<a>, <img>")."</td></tr>\n";
- $this->_output .= "<tr><td> </td></tr>\n";
- $this->_output .= "<tr><td class=\"fase4_rdf\">\n";
- if($this->_display_opt["build"] != "hidden") {
- if($this->_item["lastBuildDate"]){$this->_output .= "build: ". $this->_item["lastBuildDate"]."<br />";}
- }
- if($this->_display_opt["cache_update"] != "hidden" && ( $_update = $this->get_cache_update_time()) ) {
- $this->_output .= "cache update: ".$_update."<br />\n";
- }
- $this->_output .= "<a href=\"".$this->_item["link"]."\" ";
- if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; }
- $this->_output .= ">".$this->_cut_string($this->_item["link"])."</a>\n";
- $this->_output .= "</td></tr>\n";
- $this->_output .= "</table></td></tr>\n";
- }
- $this->_array_channel = array( "title"=>$this->_item["title"],
+ $this->_clear_Items();
+ } elseif( isset($this->_display_opt["image"] ) && ($this->_display_opt["image"] == "hidden") ) {
+ $this->_clear_Items();
+ }
+
+ break;
+ case "channel":
+ if(isset($this->_display_opt["channel"]) AND $this->_display_opt["channel"] != "hidden" AND $this->_item["title"] != '') {
+ $this->_output .= "<tr><td>\n";
+ $this->_output .= '<table border="0" width="100%" class="fase4_rdf_meta" cellspacing="5" cellpadding="2">'."\n";
+ $this->_output .= "<tr><td class=\"fase4_rdf\"><div class=\"fase4_rdf_title\">".htmlspecialchars($this->_item["title"])."</div></td></tr>\n";
+ $this->_output .= "<tr><td class=\"fase4_rdf\">".strip_tags($this->_item["description"], "<a>, <img>")."</td></tr>\n";
+ $this->_output .= "<tr><td> </td></tr>\n";
+ $this->_output .= "<tr><td class=\"fase4_rdf\">\n";
+ if($this->_display_opt["build"] != "hidden") {
+ if($this->_item["lastBuildDate"]){$this->_output .= "build: ". $this->_item["lastBuildDate"]."<br />";}
+ }
+ if($this->_display_opt["cache_update"] != "hidden" && ( $_update = $this->get_cache_update_time()) ) {
+ $this->_output .= "cache update: ".$_update."<br />\n";
+ }
+ $this->_output .= "<a href=\"".$this->_item["link"]."\" ";
+ if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; }
+ $this->_output .= ">".$this->_cut_string($this->_item["link"])."</a>\n";
+ $this->_output .= "</td></tr>\n";
+ $this->_output .= "</table></td></tr>\n";
+ }
+ $this->_array_channel = array( "title"=>$this->_item["title"],
"link"=>$this->_item["link"],
"description"=>$this->_item["description"],
"lastBuildDate"=>$this->_item["lastBuildDate"]);
- $this->_clear_Items();
- $this->_clear_cItems();
- break;
+ $this->_clear_Items();
+ $this->_clear_cItems();
+ break;
case "textinput":
- if(isset($this->_display_opt["textinput"]) && ($this->_display_opt["textinput"] != "hidden") && $this->_item["name"] && $this->_item["link"]) {
- $this->_output .= "<tr><td class=\"fase4_rdf\">\n";
- $this->_output .= "<form action=\"".$this->_item["link"]."\" ";
- if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; }
- $this->_output .= "method=\"get\">\n";
- $this->_output .= "<div class=\"fase4_rdf_title\">".$this->_item["title"]."</div>";
- $this->_output .= strip_tags($this->_item["description"], "<a>, <img>")."<br><br>\n";
- $this->_output .= "<input class=\"fase4_rdf_input\" type=\"text\" name=\"".$this->_item["name"]."\"> \n";
- $this->_output .= "<input class=\"fase4_rdf_input\" type=\"submit\" value=\"go\">";
- $this->_output .= "</form>\n";
- $this->_output .= "</td></tr>\n";
- $this->_array_textinput = array( "title"=>$this->_item["title"],
+ if(isset($this->_display_opt["textinput"]) && ($this->_display_opt["textinput"] != "hidden") && $this->_item["name"] && $this->_item["link"]) {
+ $this->_output .= "<tr><td class=\"fase4_rdf\">\n";
+ $this->_output .= "<form action=\"".$this->_item["link"]."\" ";
+ if(isset($this->_link_target)) { $this->_output .= "target=\"".$this->_link_target."\" "; }
+ $this->_output .= "method=\"get\">\n";
+ $this->_output .= "<div class=\"fase4_rdf_title\">".$this->_item["title"]."</div>";
+ $this->_output .= strip_tags($this->_item["description"], "<a>, <img>")."<br><br>\n";
+ $this->_output .= "<input class=\"fase4_rdf_input\" type=\"text\" name=\"".$this->_item["name"]."\"> \n";
+ $this->_output .= "<input class=\"fase4_rdf_input\" type=\"submit\" value=\"go\">";
+ $this->_output .= "</form>\n";
+ $this->_output .= "</td></tr>\n";
+ $this->_array_textinput = array( "title"=>$this->_item["title"],
"name"=>$this->_item["name"],
"link"=>$this->_item["link"],
"description"=>$this->_item["description"]);
- $this->_clear_Items();
- } elseif( isset($this->_display_opt["textinput"]) && ($this->_display_opt["textinput"] == "hidden") ) {
- $this->_clear_Items();
- }
-
- break;
- }
- }
-
- /**
- * This Method returns the data from the <channel /> paragraph.
- *
- * @access public
- * @author Stefan Saasen <s@fase4.com>
- * @return array
- * @see _array_channel
- */
- function get_array_channel( )
- {
- return $this->_array_channel;
- }
-
- /**
- * This Method returns the data from each <item /> paragraph.
- *
- * @access public
- * @author Stefan Saasen <s@fase4.com>
- * @return array
- * @see _array_item
- */
- function get_array_item( )
- {
- return $this->_array_item;
- }
-
- /**
- * This Method returns the data from <textinput />.
- *
- * @access public
- * @author Stefan Saasen <s@fase4.com>
- * @return array
- * @see _array_textinput
- */
- function get_array_textinput( )
- {
- return $this->_array_textinput;
- }
-
- /**
- * Getter for parser id from resource
- *
- * @access private
- * @author Roland Haeder <webmaster@mxchange.org>
- * @return int
- */
+ $this->_clear_Items();
+ } elseif( isset($this->_display_opt["textinput"]) && ($this->_display_opt["textinput"] == "hidden") ) {
+ $this->_clear_Items();
+ }
+
+ break;
+ }
+ }
+
+ /**
+ * This Method returns the data from the <channel /> paragraph.
+ *
+ * @access public
+ * @author Stefan Saasen <s@fase4.com>
+ * @return array
+ * @see _array_channel
+ */
+ function get_array_channel( )
+ {
+ return $this->_array_channel;
+ }
+
+ /**
+ * This Method returns the data from each <item /> paragraph.
+ *
+ * @access public
+ * @author Stefan Saasen <s@fase4.com>
+ * @return array
+ * @see _array_item
+ */
+ function get_array_item( )
+ {
+ return $this->_array_item;
+ }
+
+ /**
+ * This Method returns the data from <textinput />.
+ *
+ * @access public
+ * @author Stefan Saasen <s@fase4.com>
+ * @return array
+ * @see _array_textinput
+ */
+ function get_array_textinput( )
+ {
+ return $this->_array_textinput;
+ }
+
+ /**
+ * Getter for parser id from resource
+ *
+ * @access private
+ * @author Roland Haeder <webmaster@mxchange.org>
+ * @return int
+ */
function get_parser_id ($parser) {
// Default is zero
$id = 0;
return $id;
}
- /**
- * This Method returns the data from <image />.
- *
- * @access public
- * @author Stefan Saasen <s@fase4.com>
- * @return array
- * @see _array_image
- */
- function get_array_image( )
- {
- return $this->_array_image;
- }
-
- /**
- * XML Parser Data Handler
- *
- * @access private
- * @author Stefan Saasen <s@fase4.com>
- * @param mixed $parser a reference to the XML parser calling the handler.
- * @param string $text contains the character data as a string.
- * @see _parse_mode, _item, _tags, _depth, _citem, _ctags, _cdepth
- */
- function _parseData($parser, $text)
- {
- // Deocing mode added by Roland Haeder <webmaster@mxchange.org>
- switch ($this->_decoding_mode)
- {
- case "utf8_decode":
- $text = utf8_decode($text);
- break;
-
- case "htmlentities":
- $text = htmlentities($text);
- break;
- }
-
- $clean = preg_replace("/\s/", "", $text);
- if ($clean) {
- $text = preg_replace("/^\s+/", "", $text)."\n";
- if($this->_parse_mode == "all") {
- if ( isset($this->_item[$this->_tags[$this->_depth[$this->get_parser_id($parser)]]]) &&
- $this->_item[$this->_tags[$this->_depth[$this->get_parser_id($parser)]]] ) {
- $this->_item[$this->_tags[$this->_depth[$this->get_parser_id($parser)]]] .= $text;
- } else {
- $this->_item[$this->_tags[$this->_depth[$this->get_parser_id($parser)]]] = $text;
- }
- } elseif (isset($this->_parse_mode) && $this->_parse_mode == "channel") {
- if ( isset($this->_citem[$this->_ctags[$this->_cdepth[$this->get_parser_id($parser)]]]) ) {
- $this->_citem[$this->_ctags[$this->_cdepth[$this->get_parser_id($parser)]]] .= $text;
- } else {
- $this->_citem[$this->_ctags[$this->_cdepth[$this->get_parser_id($parser)]]] = $text;
- }
- }
- }
- }
-
- /**
- * This Method allows you to choose if specific Parameters are displayed or not. These are:
- * image, channel, textinput, build and cache_update. If set to "hidden" those elements won't be displayed.
- *
- * @access public
- * @author Stefan Saasen <s@fase4.com>
- * @param array $options
- * @see _display_opt
- */
- function set_Options( $options = "" )
- {
- if(is_array( $options )) {
- $this->_display_opt = $options;
- return true;
- } else {
- unset($this->_display_opt);
- return false;
- }
- }
-
- /**
- * This Method allows you to define the width of the table that holds the representation of the rdf/rss file.
- *
- * @access public
- * @author Stefan Saasen <s@fase4.com>
- * @param int $width attribute width in tag <table>
- * @see _table_width
- */
- function set_table_width( $width = 400 )
- {
- $this->_table_width = $width;
- return true;
- }
-
- /**
- * This Method returns an assocative Array with available Options.
- *
- * The Keys are the Name of the Options to be set.
- * The Values are short Description of available Options.
- *
- * @access public
- * @author Stefan Saasen <s@fase4.com>
- * @return array $options
- * @see _display_opt
- */
- function get_Options()
- {
- $options = array( "image"=>"If 'image' is set to \"hidden\" no image provided by the RDF Publisher will be displayed.",
+ /**
+ * This Method returns the data from <image />.
+ *
+ * @access public
+ * @author Stefan Saasen <s@fase4.com>
+ * @return array
+ * @see _array_image
+ */
+ function get_array_image( )
+ {
+ return $this->_array_image;
+ }
+
+ /**
+ * XML Parser Data Handler
+ *
+ * @access private
+ * @author Stefan Saasen <s@fase4.com>
+ * @param mixed $parser a reference to the XML parser calling the handler.
+ * @param string $text contains the character data as a string.
+ * @see _parse_mode, _item, _tags, _depth, _citem, _ctags, _cdepth
+ */
+ function _parseData($parser, $text)
+ {
+ // Deocing mode added by Roland Haeder <webmaster@mxchange.org>
+ switch ($this->_decoding_mode)
+ {
+ case "utf8_decode":
+ $text = utf8_decode($text);
+ break;
+
+ case "htmlentities":
+ $text = htmlentities($text);
+ break;
+ }
+
+ $clean = preg_replace("/\s/", "", $text);
+ if ($clean) {
+ $text = preg_replace("/^\s+/", "", $text)."\n";
+ if($this->_parse_mode == "all") {
+ if ( isset($this->_item[$this->_tags[$this->_depth[$this->get_parser_id($parser)]]]) &&
+ $this->_item[$this->_tags[$this->_depth[$this->get_parser_id($parser)]]] ) {
+ $this->_item[$this->_tags[$this->_depth[$this->get_parser_id($parser)]]] .= $text;
+ } else {
+ $this->_item[$this->_tags[$this->_depth[$this->get_parser_id($parser)]]] = $text;
+ }
+ } elseif (isset($this->_parse_mode) && $this->_parse_mode == "channel") {
+ if ( isset($this->_citem[$this->_ctags[$this->_cdepth[$this->get_parser_id($parser)]]]) ) {
+ $this->_citem[$this->_ctags[$this->_cdepth[$this->get_parser_id($parser)]]] .= $text;
+ } else {
+ $this->_citem[$this->_ctags[$this->_cdepth[$this->get_parser_id($parser)]]] = $text;
+ }
+ }
+ }
+ }
+
+ /**
+ * This Method allows you to choose if specific Parameters are displayed or not. These are:
+ * image, channel, textinput, build and cache_update. If set to "hidden" those elements won't be displayed.
+ *
+ * @access public
+ * @author Stefan Saasen <s@fase4.com>
+ * @param array $options
+ * @see _display_opt
+ */
+ function set_Options( $options = "" )
+ {
+ if(is_array( $options )) {
+ $this->_display_opt = $options;
+ return true;
+ } else {
+ unset($this->_display_opt);
+ return false;
+ }
+ }
+
+ /**
+ * This Method allows you to define the width of the table that holds the representation of the rdf/rss file.
+ *
+ * @access public
+ * @author Stefan Saasen <s@fase4.com>
+ * @param int $width attribute width in tag <table>
+ * @see _table_width
+ */
+ function set_table_width( $width = 400 )
+ {
+ $this->_table_width = $width;
+ return true;
+ }
+
+ /**
+ * This Method returns an assocative Array with available Options.
+ *
+ * The Keys are the Name of the Options to be set.
+ * The Values are short Description of available Options.
+ *
+ * @access public
+ * @author Stefan Saasen <s@fase4.com>
+ * @return array $options
+ * @see _display_opt
+ */
+ function get_Options()
+ {
+ $options = array( "image"=>"If 'image' is set to \"hidden\" no image provided by the RDF Publisher will be displayed.",
"channel"=>"If 'channel' is set to \"hidden\" the Channel Meta Data (i.e the Title and the short description regarding the RDF Publisher will not be displayed",
"textinput"=>"If set to \"hidden\" no Input Form will be displayed",
"build"=>"If set to \"hidden\" the Build Date (if provided) of the RDF File will not be displayed",
"cache_update"=>"If set to \"hidden\" the Update Date/Time of the cached Rdf File will not be displayed");
- return $options;
- }
-
- /**
- * This Method returns the Content of the RDF File in one string. The String actually holds the whole XML Document.
- *
- * @access public
- * @author Stefan Saasen <s@fase4.com>
- * @param string $rdf RDF File (Location)
- * @return string XML Presentation of parsed RDF File
- * @see _cached_file, _remote_file, _cache_dir, _refresh, _update_cache()
- */
- function cache()
- {
- // checks if the cache directory already exists
- // if not, the cache directory will be created
- if(!$this->_cache_dir_ok) {
- $this->_create_cache_dir();
- }
- if($this->_use_dynamic_display == true) {
- $this->_cached_file = md5("dynamic".$this->salt.$this->_remote_file);
- $this->_cache_type = "normal";
- } else {
- $this->_cached_file = md5($this->salt.$this->_remote_file);
- $this->_cache_type = "fast";
- }
-
- $_cache_f = $this->_cache_dir.$this->_cached_file;
-
- if ( (!file_exists($_cache_f)) || (filemtime($_cache_f) < $this->_refresh) || (filesize($_cache_f) == 0)) {
- // We have to parse the remote file
- $this->_use_cached_file = false;
- // --> we want to provide proper Information for Use in
- // get_cache_update_time()
- clearstatcache();
- if($this->_use_dynamic_display == true) {
- $_rdf = @implode(" ", $this->_rdf_data()); // -> proxy
- if(!$_rdf) {
- $this->_throw_exception( $this->_remote_file." is not available" );
- }
- $this->_parse_xRDF( $_rdf );
- $this->_update_cache( $_rdf );
- $data = $this->_output;
- } else {
- $_rdf = @implode(" ", $this->_rdf_data()); // -> proxy
- if(!$_rdf) {
- $this->_throw_exception( $this->_remote_file." is not available" );
- }
- $this->_parse_xRDF( $_rdf );
- $this->_update_cache( $this->_output );
- $data = $this->_output;
- }
- } else {
- // we can use the cached file
- $this->_use_cached_file = true;
- if($this->_use_dynamic_display == true) {
- $this->_parse_xRDF( implode(" ", file($_cache_f)) );
- $data = $this->_output;
- } else {
- $data = @implode(" ", file($_cache_f));
- }
- }
- return trim($data);
- } // END cache()
-
- /**
- * This Methods creates the Cache Directory if the specified Directory does not exist.
- *
- * @access private
- * @author Stefan Saasen <s@fase4.com>
- * @param string $dir Path to Directory.
- * @return boolean
- * @see _cache_dir, _cache_dir_ok
- */
- function _create_cache_dir()
- {
- $path = "";
- if(!@is_dir($this->_cache_dir)) {
- $arr = explode("/", $this->_cache_dir);
- $c = count($arr);
- if($arr[0]=="") {
- $path = "/";
- }
- for($i = 0;$i<$c;$i++)
- {
- if($arr[$i]!="") {
- $path .= $arr[$i]."/";
- if(!@is_dir($path)) {
- if(!@mkdir($path, 0777)) {
- $this->_throw_exception("failed to create directory:<b>".$this->_cache_dir."</b>.<br /><br />Exception on Line: ".__LINE__);
- return false;
- }
- }
- }
- }
- $this->_cache_dir_ok = true;
- return true;
- } else {
- $this->_cache_dir_ok = true;
- return true;
- }
- } // END _create_cache_dir()
-
- /**
- * This Method updates the cached RDF Files and synchronises them with their remote Counterparts.
- *
- * @access private
- * @author Stefan Saasen <s@fase4.com>
- * @param string $rdf RDF File (Location)
- * @see _cache_dir, _cached_file, _throw_exception()
- */
- function _update_cache( $content = "" )
- {
- $_local = @fopen( $this->_cache_dir.$this->_cached_file, 'w' );
- if(!$_local) {
- $this->_throw_exception( "Cannot open ".$this->_cached_file."<br /><br />Exception at Line: ".__LINE__ );
- return false;
- }
- if (fwrite( $_local, $content) === false) {
- $this->_throw_exception( "Cannot write to ".$this->_cached_file."<br /<br />Exeception at Line: ".__LINE__);
- return false;
- }
- fclose( $_local );
- @chmod( $this->_cache_dir.$this->_cached_file, 0666);
- return true;
- } // END _update_cache()
-
- /**
- * This Method returns the Date/Time of last Cache Update of the actually parsed RDF File.
- *
- * @access public
- * @author Stefan Saasen <s@fase4.com>
- * @return string Date/Time of last Update
- * @see _cache_dir, _cached_file
- */
- function get_cache_update_time()
- {
- return (file_exists($this->_cache_dir.$this->_cached_file))?date("d.m.Y H:i:s", filemtime($this->_cache_dir.$this->_cached_file)):"Cachemiss";
- } // END get_cache_update_time()
-
- /**
- * This Method returns the Type of Cache that was used ('normal' or 'fast')
- *
- * @access public
- * @author Stefan Saasen <s@fase4.com>
- * @param string $rdf RDF File (Location)
- * @return string Displays RDF Content ( using _display() )
- * @see _remote_file, cache()
- */
- function get_CacheType()
- {
- return $this->_cache_type;
- }
-
- /**
- * Returns true if cached file was used, otherwise false
- *
- * @access public
- * @author Stefan Saasen <s@fase4.com>
- * @return array $options
- * @see _use_cached_file
- */
- function is_cachedFile()
- {
- return $this->_use_cached_file;
- }
-
- /**
- * This Method deletes all the cached Files.
- *
- * Please keep in mind to use this method just as a 'manual garbage collection'
- * You should cache the rss/rdf files locally to avoid unnecessary traffic.
- * (Both for your visitors and the Publisher)
- *
- * @access public
- * @author Stefan Saasen <s@fase4.com>
- * @see _cache_dir
- */
- function clear_cache()
- {
- $dir = dir($this->_cache_dir);
- while($file=$dir->read()) {
- // Exclude directories
- if (is_file($dir->path.$file) && substr($file, -6, 6) != ".cache" && substr($file, -4, 4) != ".log") {
- if(!@unlink($dir->path.$file)) {
- $this->_throw_exception("Unable to unlink ".$dir->path.$file."<br />\n<br />\nException at Line: ".__LINE__ );
- return false;
- } // END - if
- } // END - if
- } // END - while
- $dir->close();
- return true;
- } // END clear_cache()
-
- /**
- * Cuts the String $string after $str_len and adds "... "
- *
- * @access private
- * @param string $string String to be shortened
- * @param int $str_len length of the returned String (overall length including "... ")
- * @return string Cut String
- */
- function _cut_string( $string, $str_len = "30" )
- {
- if(strlen(trim($string))>$str_len) {
- $string = substr( trim($string) , 0, $str_len - 4);
- $string .= " ...";
- }
- return $string;
- } // END _cut_string()
-
- /**
- * this Method implements simple Garbage Collection
- *
- * @access private
- * @author Stefan Saasen <s@fase4.com>
- * @see _cache_dir, gc_probability, gc_maxlifetime
- */
- function _garbage_collection()
- {
- srand((double) microtime() * 1000000);
- if (mt_rand(1, 100) <= $this->gc_probability) {
- $dir = dir($this->_cache_dir);
- while($file=$dir->read()) {
- if (is_file($dir->path.$file) && substr($file, -6, 6) != ".cache" && substr($file, -4, 4) != ".log" && filemtime($dir->path.$file) <= time() - $this->_refresh ) {
- @unlink($dir->path.$file);
- } // END - if
- }
- $dir->close();
- } // END if
- }
-
- /* ==== Proxy/Auth methods ==== */
-
- /**
- * this method sets a proxy server
- *
- * @access public
- * @param string $phost Proxy Host
- * @param string $pport Prox Port
- * @author Marco Kraus <marco.kraus@siemens.com>
- */
- function set_proxy($phost, $pport)
- {
- $this->_use_proxy = true;
-
- if ($phost != '')
- $this->_phost = $phost;
-
- if ($pport != '')
- $this->_pport = $pport;
- }
-
- /**
- * this method sets a proxy server authentification
- *
- * @access public
- * @param string $pname Username
- * @param string $ppaswd Password
- * @author Marco Kraus <marco.kraus@siemens.com>
- */
- function set_proxy_auth( $pname, $ppasswd )
- {
- $this->_use_proxy_auth = true;
-
- if ($pname != '')
- $this->_pname = $pname;
-
- if ($ppasswd != '')
- $this->_ppasswd = $ppasswd;
- }
-
-
- /**
- * gets _remote_file into an array
- *
- * needed, cause if you use a proxy, you have to open
- * a raw-tcp-socket to get the data
- *
- * @access private
- * @author Marco Kraus <Marco.Kraus@siemens.com>
- * @return array
- * @see _use_proxy, cache()
- */
- function _rdf_data()
- {
- if ( $this->_use_proxy == true )
- {
- // we need a raw socket here to connect to proxy
- $fp = fsockopen($this->_phost,$this->_pport);
-
- if (!$fp) {
- $this->_throw_exception( $this->_remote_file." is not available with proxy" );
- } else {
- if ( $this->_use_proxy_auth == true ) {
- fputs($fp, "GET ".$this->_remote_file." HTTP/1.0\r\nUser-Agent: Fase4 RDF-Reader/1.40 modified by Quix0r\r\n\r\n");
- } else {
- fputs($fp, "GET ".$this->_remote_file." HTTP/1.0\r\nUser-Agent: Fase4 RDF-Reader/1.40 modified by Quix0r\r\nProxy-Authorization: Basic ".base64_encode("$this->_pname:$this->_ppasswd") ."\r\n\r\n");
- }
- }
-
-
- for ( $i = 0; !feof ($fp) ; $i++)
- {
- $usable_data[$i] = "";
- $usable_data[$i] = fgets($fp,4096);
-
- // PARSE HEADER ---- first line has to be <?xml, second rdf or rss, and third is blank
-
- // strstr did not fit (ask Rasmus why), so we compare each character
- if ( ($usable_data[$i][0] == "<" ) &&
- ($usable_data[$i][1] == "?" ) &&
- ($usable_data[$i][2] == "x" ) &&
- ($usable_data[$i][3] == "m" ) &&
- ($usable_data[$i][4] == "l" ) ) {
- $usable_data[0] = $usable_data[$i]; // save current field
- $i = 1; // just reset array to start
- }
-
- // there seems to be proxystuff after the <?xml....we delete this
- if ( (
- ($usable_data[$i][0] == "<" ) &&
- ($usable_data[$i][1] == "r" ) &&
- ($usable_data[$i][2] == "d" ) &&
- ($usable_data[$i][3] == "f" ) &&
- ($usable_data[$i][4] == ":" )
- )
- ||
- (
- ($usable_data[$i][0] == "<" ) &&
- ($usable_data[$i][1] == "r" ) &&
- ($usable_data[$i][2] == "s" ) &&
- ($usable_data[$i][3] == "s" )
- )
- ) {
-
- $usable_data[1] = $usable_data[$i]; // save current field
- $usable_data[2] = "\n";
- $i = 2; // just reset array to start
- }
- }
-
- fclose($fp);
- return $usable_data;
- } else {
- if (substr($this->_remote_file, 0, 7) != "http://") {
- $this->_throw_exception( "Cannot find http:// in ".$this->_remote_file."!" );
- return "";
+ return $options;
+ }
+
+ /**
+ * This Method returns the Content of the RDF File in one string. The String actually holds the whole XML Document.
+ *
+ * @access public
+ * @author Stefan Saasen <s@fase4.com>
+ * @param string $rdf RDF File (Location)
+ * @return string XML Presentation of parsed RDF File
+ * @see _cached_file, _remote_file, _cache_dir, _refresh, _update_cache()
+ */
+ function cache()
+ {
+ // checks if the cache directory already exists
+ // if not, the cache directory will be created
+ if(!$this->_cache_dir_ok) {
+ $this->_create_cache_dir();
+ }
+ if($this->_use_dynamic_display == true) {
+ $this->_cached_file = md5("dynamic".$this->salt.$this->_remote_file);
+ $this->_cache_type = "normal";
+ } else {
+ $this->_cached_file = md5($this->salt.$this->_remote_file);
+ $this->_cache_type = "fast";
+ }
+
+ $_cache_f = $this->_cache_dir.$this->_cached_file;
+
+ if ( (!file_exists($_cache_f)) || (filemtime($_cache_f) < $this->_refresh) || (filesize($_cache_f) == 0)) {
+ // We have to parse the remote file
+ $this->_use_cached_file = false;
+ // --> we want to provide proper Information for Use in
+ // get_cache_update_time()
+ clearstatcache();
+ if($this->_use_dynamic_display == true) {
+ $_rdf = @implode(" ", $this->_rdf_data()); // -> proxy
+ if(!$_rdf) {
+ $this->_throw_exception( $this->_remote_file." is not available" );
+ }
+ $this->_parse_xRDF( $_rdf );
+ $this->_update_cache( $_rdf );
+ $data = $this->_output;
+ } else {
+ $_rdf = @implode(" ", $this->_rdf_data()); // -> proxy
+ if(!$_rdf) {
+ $this->_throw_exception( $this->_remote_file." is not available" );
+ }
+ $this->_parse_xRDF( $_rdf );
+ $this->_update_cache( $this->_output );
+ $data = $this->_output;
+ }
} else {
- // Extract host information
- $host = substr($this->_remote_file, 7);
- // Extract the GET part
- $get = "/";
- if (strpos($host, "/") > 0) {
- $get = substr($host, strpos($host, "/"));
- $host = substr($host, 0, strpos($host, "/"));
+ // we can use the cached file
+ $this->_use_cached_file = true;
+ if($this->_use_dynamic_display == true) {
+ $this->_parse_xRDF( implode(" ", file($_cache_f)) );
+ $data = $this->_output;
+ } else {
+ $data = @implode(" ", file($_cache_f));
+ }
+ }
+ return trim($data);
+ } // END cache()
+
+ /**
+ * This Methods creates the Cache Directory if the specified Directory does not exist.
+ *
+ * @access private
+ * @author Stefan Saasen <s@fase4.com>
+ * @param string $dir Path to Directory.
+ * @return boolean
+ * @see _cache_dir, _cache_dir_ok
+ */
+ function _create_cache_dir()
+ {
+ $path = "";
+ if(!@is_dir($this->_cache_dir)) {
+ $arr = explode("/", $this->_cache_dir);
+ $c = count($arr);
+ if($arr[0]=="") {
+ $path = "/";
}
- // Extract port
- $port = "80";
- if (strpos($host, ":") > 0) {
- $port = substr($host, (strpos($host, ":") + 1));
- $host = substr($host, 0, (strpos($host, ":") - 1));
+ for($i = 0;$i<$c;$i++)
+ {
+ if($arr[$i]!="") {
+ $path .= $arr[$i]."/";
+ if(!@is_dir($path)) {
+ if(!@mkdir($path, 0777)) {
+ $this->_throw_exception("failed to create directory:<b>".$this->_cache_dir."</b>.<br /><br />Exception on Line: ".__LINE__);
+ return false;
+ }
+ }
+ }
}
+ $this->_cache_dir_ok = true;
+ return true;
+ } else {
+ $this->_cache_dir_ok = true;
+ return true;
+ }
+ } // END _create_cache_dir()
- // Start connection to server
- $fp = fsockopen($host, $port);
- if (!$fp) {
- $this->_throw_exception( $this->_remote_file." is maybe not available." );
- return "";
+ /**
+ * This Method updates the cached RDF Files and synchronises them with their remote Counterparts.
+ *
+ * @access private
+ * @author Stefan Saasen <s@fase4.com>
+ * @param string $rdf RDF File (Location)
+ * @see _cache_dir, _cached_file, _throw_exception()
+ */
+ function _update_cache( $content = "" )
+ {
+ $_local = @fopen( $this->_cache_dir.$this->_cached_file, 'w' );
+ if(!$_local) {
+ $this->_throw_exception( "Cannot open ".$this->_cached_file."<br /><br />Exception at Line: ".__LINE__ );
+ return false;
+ }
+ if (fwrite( $_local, $content) === false) {
+ $this->_throw_exception( "Cannot write to ".$this->_cached_file."<br /<br />Exeception at Line: ".__LINE__);
+ return false;
+ }
+ fclose( $_local );
+ @chmod( $this->_cache_dir.$this->_cached_file, 0666);
+ return true;
+ } // END _update_cache()
+
+ /**
+ * This Method returns the Date/Time of last Cache Update of the actually parsed RDF File.
+ *
+ * @access public
+ * @author Stefan Saasen <s@fase4.com>
+ * @return string Date/Time of last Update
+ * @see _cache_dir, _cached_file
+ */
+ function get_cache_update_time()
+ {
+ return (file_exists($this->_cache_dir.$this->_cached_file))?date("d.m.Y H:i:s", filemtime($this->_cache_dir.$this->_cached_file)):"Cachemiss";
+ } // END get_cache_update_time()
+
+ /**
+ * This Method returns the Type of Cache that was used ('normal' or 'fast')
+ *
+ * @access public
+ * @author Stefan Saasen <s@fase4.com>
+ * @param string $rdf RDF File (Location)
+ * @return string Displays RDF Content ( using _display() )
+ * @see _remote_file, cache()
+ */
+ function get_CacheType()
+ {
+ return $this->_cache_type;
+ }
+
+ /**
+ * Returns true if cached file was used, otherwise false
+ *
+ * @access public
+ * @author Stefan Saasen <s@fase4.com>
+ * @return array $options
+ * @see _use_cached_file
+ */
+ function is_cachedFile()
+ {
+ return $this->_use_cached_file;
+ }
+
+ /**
+ * This Method deletes all the cached Files.
+ *
+ * Please keep in mind to use this method just as a 'manual garbage collection'
+ * You should cache the rss/rdf files locally to avoid unnecessary traffic.
+ * (Both for your visitors and the Publisher)
+ *
+ * @access public
+ * @author Stefan Saasen <s@fase4.com>
+ * @see _cache_dir
+ */
+ function clear_cache()
+ {
+ $dir = dir($this->_cache_dir);
+ while($file=$dir->read()) {
+ // Exclude directories
+ if (is_file($dir->path.$file) && substr($file, -6, 6) != ".cache" && substr($file, -4, 4) != ".log") {
+ if(!@unlink($dir->path.$file)) {
+ $this->_throw_exception("Unable to unlink ".$dir->path.$file."<br />\n<br />\nException at Line: ".__LINE__ );
+ return false;
+ } // END - if
+ } // END - if
+ } // END - while
+ $dir->close();
+ return true;
+ } // END clear_cache()
+
+ /**
+ * Cuts the String $string after $str_len and adds "... "
+ *
+ * @access private
+ * @param string $string String to be shortened
+ * @param int $str_len length of the returned String (overall length including "... ")
+ * @return string Cut String
+ */
+ function _cut_string( $string, $str_len = "30" )
+ {
+ if(strlen(trim($string))>$str_len) {
+ $string = substr( trim($string) , 0, $str_len - 4);
+ $string .= " ...";
+ }
+ return $string;
+ } // END _cut_string()
+
+ /**
+ * this Method implements simple Garbage Collection
+ *
+ * @access private
+ * @author Stefan Saasen <s@fase4.com>
+ * @see _cache_dir, gc_probability, gc_maxlifetime
+ */
+ function _garbage_collection()
+ {
+ srand((double) microtime() * 1000000);
+ if (mt_rand(1, 100) <= $this->gc_probability) {
+ $dir = dir($this->_cache_dir);
+ while($file=$dir->read()) {
+ if (is_file($dir->path.$file) && substr($file, -6, 6) != ".cache" && substr($file, -4, 4) != ".log" && filemtime($dir->path.$file) <= time() - $this->_refresh ) {
+ @unlink($dir->path.$file);
+ } // END - if
}
- // Repare request line
- $request = sprintf("GET %s HTTP/1.0\r\nHost: %s\r\nUser-Agent: Fase4 RDF-Reader/1.40 modified by Quix0r\r\n\r\n", $get, $host);
- // Send request out
- fputs($fp, $request);
- $reply = ""; $isContent = false; $dummy = "";
- // Read reply
- $i=0;
- while ( !feof($fp) ) {
- $read = trim(fgets($fp, 4096));
- if (substr($read, 0, 5) == "<?xml" || $isContent) {
- // Add content
- $reply[] = $read;
- $isContent = true;
+ $dir->close();
+ } // END if
+ }
+
+ /* ==== Proxy/Auth methods ==== */
+
+ /**
+ * this method sets a proxy server
+ *
+ * @access public
+ * @param string $phost Proxy Host
+ * @param string $pport Prox Port
+ * @author Marco Kraus <marco.kraus@siemens.com>
+ */
+ function set_proxy($phost, $pport)
+ {
+ $this->_use_proxy = true;
+
+ if ($phost != '')
+ $this->_phost = $phost;
+
+ if ($pport != '')
+ $this->_pport = $pport;
+ }
+
+ /**
+ * this method sets a proxy server authentification
+ *
+ * @access public
+ * @param string $pname Username
+ * @param string $ppaswd Password
+ * @author Marco Kraus <marco.kraus@siemens.com>
+ */
+ function set_proxy_auth( $pname, $ppasswd )
+ {
+ $this->_use_proxy_auth = true;
+
+ if ($pname != '')
+ $this->_pname = $pname;
+
+ if ($ppasswd != '')
+ $this->_ppasswd = $ppasswd;
+ }
+
+
+ /**
+ * gets _remote_file into an array
+ *
+ * needed, cause if you use a proxy, you have to open
+ * a raw-tcp-socket to get the data
+ *
+ * @access private
+ * @author Marco Kraus <Marco.Kraus@siemens.com>
+ * @return array
+ * @see _use_proxy, cache()
+ */
+ function _rdf_data()
+ {
+ if ( $this->_use_proxy == true )
+ {
+ // we need a raw socket here to connect to proxy
+ $fp = fsockopen($this->_phost,$this->_pport);
+
+ if (!$fp) {
+ $this->_throw_exception( $this->_remote_file." is not available with proxy" );
+ } else {
+ if ( $this->_use_proxy_auth == true ) {
+ fputs($fp, "GET ".$this->_remote_file." HTTP/1.0\r\nUser-Agent: Fase4 RDF-Reader/1.40 modified by Quix0r\r\n\r\n");
} else {
- // Put in dummy
- $dummy[] = $read;
+ fputs($fp, "GET ".$this->_remote_file." HTTP/1.0\r\nUser-Agent: Fase4 RDF-Reader/1.40 modified by Quix0r\r\nProxy-Authorization: Basic ".base64_encode("$this->_pname:$this->_ppasswd") ."\r\n\r\n");
}
- $i++;
}
- if ((count($dummy) > 0) && (count($reply) == 0) && (!$isContent)) {
- // Transfer content from dummy
- $reply = $content;
+
+
+ for ( $i = 0; !feof ($fp) ; $i++)
+ {
+ $usable_data[$i] = "";
+ $usable_data[$i] = fgets($fp,4096);
+
+ // PARSE HEADER ---- first line has to be <?xml, second rdf or rss, and third is blank
+
+ // strstr did not fit (ask Rasmus why), so we compare each character
+ if ( ($usable_data[$i][0] == "<" ) &&
+ ($usable_data[$i][1] == "?" ) &&
+ ($usable_data[$i][2] == "x" ) &&
+ ($usable_data[$i][3] == "m" ) &&
+ ($usable_data[$i][4] == "l" ) ) {
+ $usable_data[0] = $usable_data[$i]; // save current field
+ $i = 1; // just reset array to start
+ }
+
+ // there seems to be proxystuff after the <?xml....we delete this
+ if ( (
+ ($usable_data[$i][0] == "<" ) &&
+ ($usable_data[$i][1] == "r" ) &&
+ ($usable_data[$i][2] == "d" ) &&
+ ($usable_data[$i][3] == "f" ) &&
+ ($usable_data[$i][4] == ":" )
+ )
+ ||
+ (
+ ($usable_data[$i][0] == "<" ) &&
+ ($usable_data[$i][1] == "r" ) &&
+ ($usable_data[$i][2] == "s" ) &&
+ ($usable_data[$i][3] == "s" )
+ )
+ ) {
+
+ $usable_data[1] = $usable_data[$i]; // save current field
+ $usable_data[2] = "\n";
+ $i = 2; // just reset array to start
+ }
}
+
fclose($fp);
- //die(htmlentities($reply));
- return $reply;
+ return $usable_data;
+ } else {
+ if (substr($this->_remote_file, 0, 7) != "http://") {
+ $this->_throw_exception( "Cannot find http:// in ".$this->_remote_file."!" );
+ return "";
+ } else {
+ // Extract host information
+ $host = substr($this->_remote_file, 7);
+ // Extract the GET part
+ $get = "/";
+ if (strpos($host, "/") > 0) {
+ $get = substr($host, strpos($host, "/"));
+ $host = substr($host, 0, strpos($host, "/"));
+ }
+ // Extract port
+ $port = "80";
+ if (strpos($host, ":") > 0) {
+ $port = substr($host, (strpos($host, ":") + 1));
+ $host = substr($host, 0, (strpos($host, ":") - 1));
+ }
+
+ // Start connection to server
+ $fp = fsockopen($host, $port);
+ if (!$fp) {
+ $this->_throw_exception( $this->_remote_file." is maybe not available." );
+ return "";
+ }
+ // Repare request line
+ $request = sprintf("GET %s HTTP/1.0\r\nHost: %s\r\nUser-Agent: Fase4 RDF-Reader/1.40 modified by Quix0r\r\n\r\n", $get, $host);
+ // Send request out
+ fputs($fp, $request);
+ $reply = ""; $isContent = false; $dummy = "";
+ // Read reply
+ $i=0;
+ while ( !feof($fp) ) {
+ $read = trim(fgets($fp, 4096));
+ if (substr($read, 0, 5) == "<?xml" || $isContent) {
+ // Add content
+ $reply[] = $read;
+ $isContent = true;
+ } else {
+ // Put in dummy
+ $dummy[] = $read;
+ }
+ $i++;
+ }
+ if ((count($dummy) > 0) && (count($reply) == 0) && (!$isContent)) {
+ // Transfer content from dummy
+ $reply = $content;
+ }
+ fclose($fp);
+ //die(htmlentities($reply));
+ return $reply;
+ }
}
- }
- } // END _rdf_data()
+ } // END _rdf_data()
} // END class
?>
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
require($INC);
-} elseif (!EXT_IS_ACTIVE("")) {
+} elseif (!EXT_IS_ACTIVE('')) {
return;
}
// Reset accounts
$result = SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET beg_points=0.00000 WHERE beg_points > 0",
- __FILE__, __LINE__);
+__FILE__, __LINE__);
//
?>
// Reset accounts
$result = SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET turbo_bonus=0, login_bonus=0, bonus_order=0, bonus_stats=0, bonus_ref=0",
- __FILE__, __LINE__);
+__FILE__, __LINE__);
//
?>
//* DEBUG: */ echo basename(__FILE__).":uid={$content['userid']}<br />\n";
$result_points = SQL_QUERY_ESC("SELECT ref_depth, locked_points FROM `{!_MYSQL_PREFIX!}_user_points`
WHERE userid=%s AND locked_points != 0.00000 ORDER BY ref_depth",
- array(bigintval($content['userid'])), __FILE__, __LINE__);
+ array(bigintval($content['userid'])), __FILE__, __LINE__);
//* DEBUG: */ echo basename(__FILE__).":payout=0;points|numRows=".SQL_NUMROWS($result_points)."<br />\n";
if (SQL_NUMROWS($result_points) > 0) {
ADD_SQL(SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_points` SET points=points+%s, locked_points=0.00000
WHERE userid=%s AND ref_depth=%d
LIMIT 1",
- array($content['locked_points'], bigintval($content['userid']), $content['ref_depth']), __FILE__, __LINE__, false));
+ array($content['locked_points'], bigintval($content['userid']), $content['ref_depth']), __FILE__, __LINE__, false));
// Update mediadata as well
if (GET_EXT_VERSION('mediadata') >= '0.0.4') {
FROM `{!_MYSQL_PREFIX!}_user_data`
WHERE holiday_activated > 0 AND holiday_activated < UNIX_TIMESTAMP() AND `holiday_active`='N'
ORDER BY holiday_activated",
- __FILE__, __LINE__);
+__FILE__, __LINE__);
// Entries found?
if (SQL_NUMROWS($result_main) > 0) {
FROM `{!_MYSQL_PREFIX!}_user_holidays`
WHERE userid=%s AND holiday_start <= UNIX_TIMESTAMP() AND holiday_end > UNIX_TIMESTAMP()
LIMIT 1",
- array(bigintval($content['userid'])), __FILE__, __LINE__);
+ array(bigintval($content['userid'])), __FILE__, __LINE__);
if (SQL_NUMROWS($result_holiday) == 1) {
// Okay, this user can be send away to holiday...
$content = merge_array($content, SQL_FETCHARRAY($result_holiday));
SET `holiday_active`='Y'
WHERE userid=%s
LIMIT 1",
- array(bigintval($content['userid'])), __FILE__, __LINE__, false));
+ array(bigintval($content['userid'])), __FILE__, __LINE__, false));
} // END - if
// Free memory
while ($content = SQL_FETCHARRAY($result_bonus)) {
// Add points
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET bonus_stats=bonus_stats+%s WHERE userid=%s LIMIT 1",
- array(getConfig('bonus_stats'), bigintval($content['userid'])), __FILE__, __LINE__);
+ array(getConfig('bonus_stats'), bigintval($content['userid'])), __FILE__, __LINE__);
// Translate some data
- $content['timestamp'] generateDateTime($content['timestamp_ordered'], '2');
+ $content['timestamp'] = generateDateTime($content['timestamp_ordered'], '2');
// Load email template and send email
$msg = LOAD_EMAIL_TEMPLATE("member_stats_bonus", $content, bigintval($content['userid']));
// Update database
$result_update = SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_stats` SET bonus_stats_active='Y' WHERE `id`=%s LIMIT 1",
- array(bigintval($content['id'])), __FILE__, __LINE__);
+ array(bigintval($content['id'])), __FILE__, __LINE__);
} // END - while
// Handle bonus points
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
require($INC);
-} elseif (!EXT_IS_ACTIVE("")) {
+} elseif (!EXT_IS_ACTIVE('')) {
return;
}
// Check wether this script is installed
function isInstalled () {
- return ((getConfig('MXCHANGE_INSTALLED') == 'Y') || (isIncludeReadable('inc/cache/config-local.php')));
+ return (
+ (
+ // New config file found and loaded
+ getConfig('MXCHANGE_INSTALLED') == 'Y'
+ ) || (
+ // Fall-back!
+ isIncludeReadable('inc/config.php')
+ ) || (
+ (
+ // New config file found, but not yet read
+ isIncludeReadable('inc/cache/config-local.php')
+ ) && (
+ (
+ // Only new config file is found
+ !isIncludeReadable('inc/config.php')
+ ) || (
+ // Is installation mode
+ isInstalling()
+ )
+ )
+ )
+ );
}
// Check wether an admin is registered
// @TODO Do some more sanity check here
function changeMode ($FQFN, $mode) {
// Is the file/directory there?
- if ((!isFile($FQFN)) && (!isDirectory($FQFN))) {
+ if ((!isFileReadable($FQFN)) && (!isDirectory($FQFN))) {
// Neither, so abort here
debug_report_bug('Cannot chmod() on ' . basename($FQFN) . '.');
} // END - if
chmod($FQFN, $mode);
}
+// Wrapper for unlink()
+function removeFile ($FQFN) {
+ // Is the file there?
+ if (isFileReadable($FQFN)) {
+ // Yes, so remove it
+ return unlink($FQFN);
+ } // END - if
+
+ // All fine if no file was removed. If we change this to 'false' or rewrite
+ // above if() block it would be to restrictive.
+ return true;
+}
+
// Wrapper for $_POST['sel']
function countPostSelection () {
return countSelection(REQUEST_POST('sel'));
// Prepare include file for looking
$INC = sprintf("inc/js/tag-%s.php",
- REQUEST_GET('tag')
+ REQUEST_GET('tag')
);
// Is that file readable?
if (isIncludeReadable($INC)) {
// Include it
loadIncludeOnce($INC);
- } // END - if
+ } // END - if
// Load footer
loadIncludeOnce('inc/footer.php');
$content = array(
'lead_uid' => -1,
'lead_email' => 'INVALID@EMAIL'
- );
+ );
- // Is the cookie set?
- if (isSessionVariableSet('lead_uid')) {
- // Is the user-account unlocked and valid?
- $result = SQL_QUERY_ESC("SELECT email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
+ // Is the cookie set?
+ if (isSessionVariableSet('lead_uid')) {
+ // Is the user-account unlocked and valid?
+ $result = SQL_QUERY_ESC("SELECT email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1",
array(bigintval(getSession('lead_uid'))), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 1) {
- // Secure the ID number
- $content['lead_uid'] = bigintval(getSession('lead_uid'));
+ if (SQL_NUMROWS($result) == 1) {
+ // Secure the ID number
+ $content['lead_uid'] = bigintval(getSession('lead_uid'));
- // Load the email address
- list($email) = SQL_FETCHROW($result);
+ // Load the email address
+ list($email) = SQL_FETCHROW($result);
- // Compile email
- $content['lead_email'] = COMPILE_CODE($email);
+ // Compile email
+ $content['lead_email'] = COMPILE_CODE($email);
+ } else {
+ // Not found!
+ $content['lead_uid'] = 0;
+ }
} else {
- // Not found!
- $content['lead_uid'] = 0;
+ // Maybe spider?
+ $content['lead_email'] = constant('WEBMASTER');
}
- } else {
- // Maybe spider?
- $content['lead_email'] = constant('WEBMASTER');
- }
- // Load the lead template
- LOAD_TEMPLATE('lead_code', false, $content);
+ // Load the lead template
+ LOAD_TEMPLATE('lead_code', false, $content);
- // Footer
- loadIncludeOnce('inc/footer.php');
+ // Footer
+ loadIncludeOnce('inc/footer.php');
} else {
// You have to install first!
redirectToUrl('install.php');
if ($url_mid > 0) {
// Normal-Mails
$result = SQL_QUERY_ESC("SELECT link_type FROM `{!_MYSQL_PREFIX!}_user_links` WHERE stats_id=%s AND `userid`=%s LIMIT 1",
- array($url_mid, $url_uid), __FILE__, __LINE__);
+ array($url_mid, $url_uid), __FILE__, __LINE__);
$type = 'mailid'; $urlId = $url_mid;
} elseif ($url_bid > 0) {
// Bonus-Mail
$result = SQL_QUERY_ESC("SELECT link_type FROM `{!_MYSQL_PREFIX!}_user_links` WHERE bonus_id=%s AND `userid`=%s LIMIT 1",
- array($url_bid, $url_uid), __FILE__, __LINE__);
+ array($url_bid, $url_uid), __FILE__, __LINE__);
$type = 'bonusid'; $urlId = $url_bid;
} else {
// Problem: No ID entered
switch ($ltype)
{
- 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",
+ 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__);
- break;
+ break;
- case 'BONUS':
- // Is the bonus extension active?
- redirectOnUninstalledExtension('bonus');
+ case 'BONUS':
+ // Is the bonus extension active?
+ redirectOnUninstalledExtension('bonus');
- // Bonus-Mails
- $result = SQL_QUERY_ESC("SELECT id, url, subject FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
+ // Bonus-Mails
+ $result = SQL_QUERY_ESC("SELECT id, url, subject FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
array($url_bid), __FILE__, __LINE__);
- break;
+ break;
}
if (SQL_NUMROWS($result) == 1) {
// Is the user's ID unlocked?
$result = SQL_QUERY_ESC("SELECT status, gender, surname, family FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array($url_uid), __FILE__, __LINE__);
+ array($url_uid), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
list($status, $gender, $sname, $fname) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
// User has confirmed his account so we can procede...
switch ($ltype)
{
- case 'NORMAL':
- $result = SQL_QUERY_ESC("SELECT payment_id FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE pool_id=%s LIMIT 1",
+ 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__);
- if (SQL_NUMROWS($result) == 1) {
- list($pay) = SQL_FETCHROW($result);
- $time = getPaymentPoints($pay, 'time');
- $payment = getPaymentPoints($pay, 'payment');
- $isValid = true;
- }
-
- // Free memory
- SQL_FREERESULT($result);
- break;
-
- case 'BONUS':
- $result = SQL_QUERY_ESC("SELECT points, time FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
+ if (SQL_NUMROWS($result) == 1) {
+ list($pay) = SQL_FETCHROW($result);
+ $time = getPaymentPoints($pay, 'time');
+ $payment = getPaymentPoints($pay, 'payment');
+ $isValid = true;
+ }
+
+ // Free memory
+ SQL_FREERESULT($result);
+ break;
+
+ case 'BONUS':
+ $result = SQL_QUERY_ESC("SELECT points, time FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
array($url_bid), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 1) {
- list($points, $time) = SQL_FETCHROW($result);
- $payment = '0.00000';
- $isValid = true;
- }
-
- // Free memory
- SQL_FREERESULT($result);
- break;
+ if (SQL_NUMROWS($result) == 1) {
+ list($points, $time) = SQL_FETCHROW($result);
+ $payment = '0.00000';
+ $isValid = true;
+ }
+
+ // Free memory
+ SQL_FREERESULT($result);
+ break;
}
// Add header
// Maybe he wants to confirm an email?
if ($url_mid > 0) {
$result = SQL_QUERY_ESC("SELECT id, link_type FROM `{!_MYSQL_PREFIX!}_user_links` WHERE stats_id=%s AND `userid`=%s LIMIT 1",
- array($url_mid, $url_uid), __FILE__, __LINE__);
+ array($url_mid, $url_uid), __FILE__, __LINE__);
$type = 'mailid'; $urlId = $url_mid;
} elseif ($url_bid > 0) {
$result = SQL_QUERY_ESC("SELECT id, link_type FROM `{!_MYSQL_PREFIX!}_user_links` WHERE bonus_id=%s AND `userid`=%s LIMIT 1",
- array($url_bid, $url_uid), __FILE__, __LINE__);
+ array($url_bid, $url_uid), __FILE__, __LINE__);
$type = 'bonusid'; $urlId = $url_bid;
}
SQL_FREERESULT($result);
switch ($ltype)
{
- case 'NORMAL':
- $result_mailid = SQL_QUERY_ESC("SELECT pool_id, userid, id FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE `id`=%s LIMIT 1",
+ case 'NORMAL':
+ $result_mailid = SQL_QUERY_ESC("SELECT pool_id, userid, id FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE `id`=%s LIMIT 1",
array($url_mid), __FILE__, __LINE__);
- break;
+ break;
- case 'BONUS':
- $result_mailid = SQL_QUERY_ESC("SELECT id, id, is_notify FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
+ case 'BONUS':
+ $result_mailid = SQL_QUERY_ESC("SELECT id, id, is_notify FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
array($url_bid), __FILE__, __LINE__);
- break;
+ break;
}
// Entry found?
// Is the user's ID unlocked?
$result = SQL_QUERY_ESC("SELECT status, gender, surname, family, ref_payout FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array($url_uid), __FILE__, __LINE__);
+ array($url_uid), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load data
list($status, $gender, $sname, $fname, $ref_pay) = SQL_FETCHROW($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_uid), __FILE__, __LINE__);
+ array($url_uid), __FILE__, __LINE__);
// User has confirmed his account so we can procede...
switch ($ltype)
{
- case 'NORMAL':
- $result = SQL_QUERY_ESC("SELECT payment_id FROM `{!_MYSQL_PREFIX!}_user_stats` WHERE pool_id=%s LIMIT 1",
+ 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__);
- // Entry found?
- if (SQL_NUMROWS($result) == 1) {
- list($pay) = SQL_FETCHROW($result);
- $time = getPaymentPoints($pay, 'time');
- $payment = getPaymentPoints($pay, 'payment');
- $isValid = true;
- } // END - if
+ // Entry found?
+ if (SQL_NUMROWS($result) == 1) {
+ list($pay) = SQL_FETCHROW($result);
+ $time = getPaymentPoints($pay, 'time');
+ $payment = getPaymentPoints($pay, 'payment');
+ $isValid = true;
+ } // END - if
- // Free memory...
- SQL_FREERESULT($result);
- break;
+ // Free memory...
+ SQL_FREERESULT($result);
+ break;
- case 'BONUS':
- $result = SQL_QUERY_ESC("SELECT time, points FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
+ case 'BONUS':
+ $result = SQL_QUERY_ESC("SELECT time, points FROM `{!_MYSQL_PREFIX!}_bonus` WHERE `id`=%s LIMIT 1",
array(bigintval($pool)), __FILE__, __LINE__);
- // Entry found?
- if (SQL_NUMROWS($result) == 1) {
- list($time, $payment) = SQL_FETCHROW($result);
- $isValid = true;
- }
+ // Entry found?
+ if (SQL_NUMROWS($result) == 1) {
+ list($time, $payment) = SQL_FETCHROW($result);
+ $isValid = true;
+ }
- // Free memory...
- SQL_FREERESULT($result);
- break;
+ // Free memory...
+ SQL_FREERESULT($result);
+ break;
}
// Is this entry valid?
} // END - if
switch ($mode) {
- case 'add':
- // Init stats data
- $stats_data = 0;
-
- // Count clicks
- switch ($ltype)
- {
- case 'NORMAL':
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_stats` SET clicks=clicks + 1 WHERE `id`=%s LIMIT 1",
- array($url_mid), __FILE__, __LINE__);
-
- // Update mediadata as well
- if (GET_EXT_VERSION('mediadata') >= '0.0.4') {
- // Update database
- MEDIA_UPDATE_ENTRY(array('total_clicks', 'normal_clicks'), 'add', 1);
+ case 'add':
+ // Init stats data
+ $stats_data = 0;
+
+ // Count clicks
+ switch ($ltype)
+ {
+ case 'NORMAL':
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_stats` SET clicks=clicks + 1 WHERE `id`=%s LIMIT 1",
+ array($url_mid), __FILE__, __LINE__);
+
+ // Update mediadata as well
+ if (GET_EXT_VERSION('mediadata') >= '0.0.4') {
+ // Update database
+ MEDIA_UPDATE_ENTRY(array('total_clicks', 'normal_clicks'), 'add', 1);
+ }
+ $stats_data = $url_mid;
+ break;
+
+ case 'BONUS':
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET clicks=clicks + 1 WHERE `id`=%s LIMIT 1",
+ array($url_bid), __FILE__, __LINE__);
+
+ // Update mediadata as well
+ if (GET_EXT_VERSION('mediadata') >= '0.0.4') {
+ // Update database
+ MEDIA_UPDATE_ENTRY(array('total_clicks', 'bonus_clicks'), 'add', 1);
+ }
+ $stats_data = $url_bid;
+ break;
}
- $stats_data = $url_mid;
- break;
-
- case 'BONUS':
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_bonus` SET clicks=clicks + 1 WHERE `id`=%s LIMIT 1",
- array($url_bid), __FILE__, __LINE__);
-
- // Update mediadata as well
- if (GET_EXT_VERSION('mediadata') >= '0.0.4') {
- // Update database
- MEDIA_UPDATE_ENTRY(array('total_clicks', 'bonus_clicks'), 'add', 1);
- }
- $stats_data = $url_bid;
- break;
- }
- // Export data into constants for the template
- define('_POINTS_VALUE' , translateComma($payment));
- define('_TEMPLATE_BANNER', LOAD_TEMPLATE('mailid_banner', true));
+ // Export data into constants for the template
+ define('_POINTS_VALUE' , translateComma($payment));
+ define('_TEMPLATE_BANNER', LOAD_TEMPLATE('mailid_banner', true));
- // Only when user extension = v0.1.2: Update mails-confirmed counter
- // @TODO Rewrite these blocks to filter
- if (GET_EXT_VERSION('user') >= '0.1.2') {
- // Update counter
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET mails_confirmed=mails_confirmed + 1 WHERE userid=%s LIMIT 1",
+ // Only when user extension = v0.1.2: Update mails-confirmed counter
+ // @TODO Rewrite these blocks to filter
+ if (GET_EXT_VERSION('user') >= '0.1.2') {
+ // Update counter
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET mails_confirmed=mails_confirmed + 1 WHERE userid=%s LIMIT 1",
array($url_uid), __FILE__, __LINE__);
- // Update random confirmed as well?
- if (GET_EXT_VERSION('user') >= '0.3.4') {
- // Update second counter
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET rand_confirmed=rand_confirmed + 1 WHERE userid=%s LIMIT 1",
+ // Update random confirmed as well?
+ if (GET_EXT_VERSION('user') >= '0.3.4') {
+ // Update second counter
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET rand_confirmed=rand_confirmed + 1 WHERE userid=%s LIMIT 1",
array($url_uid), __FILE__, __LINE__);
+ } // END - if
} // END - if
- } // END - if
-
- // Insert stats record
- insertUserStatsRecord($url_uid, $type, $stats_data);
-
- // Right code entered?
- if (bigintval(REQUEST_POST('gfx_check')) == $img_code) {
- // Add points over referal system is the default
- $locked = false;
- $template = 'mailid_points_done';
-
- // Right code entered add points and remove entry
- if (($ref_pay > 0) && (getConfig('allow_direct_pay') != 'Y')) {
- // Don't add points over the referal system
- $locked = true;
- $template = 'mailid_points_locked';
- } // END - if
- // Count down ref_payout value
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET ref_payout=ref_payout-1 WHERE userid=%s AND ref_payout > 0 LIMIT 1",
+ // Insert stats record
+ insertUserStatsRecord($url_uid, $type, $stats_data);
+
+ // Right code entered?
+ if (bigintval(REQUEST_POST('gfx_check')) == $img_code) {
+ // Add points over referal system is the default
+ $locked = false;
+ $template = 'mailid_points_done';
+
+ // Right code entered add points and remove entry
+ if (($ref_pay > 0) && (getConfig('allow_direct_pay') != 'Y')) {
+ // Don't add points over the referal system
+ $locked = true;
+ $template = 'mailid_points_locked';
+ } // END - if
+
+ // Count down ref_payout value
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET ref_payout=ref_payout-1 WHERE userid=%s AND ref_payout > 0 LIMIT 1",
array($url_uid), __FILE__, __LINE__);
- // Add points
- unset($GLOBALS['ref_level']);
- ADD_POINTS_REFSYSTEM('mailid_okay', $url_uid, $payment, false, '0', $locked);
-
- // Shall I add bonus points for "turbo clickers" ?
- if (GET_EXT_VERSION('bonus') >= '0.2.2') {
- // Is an active-rallye running and this is not a notification mail?
- if ((getConfig('bonus_active') == 'Y') && ($notify == 'N')) {
- // Shall I exclude the webmaster's own userid from the active-rallye?
- if ((((getConfig('bonus_uid') == $url_uid) && (getConfig('bonus_include_own') == 'Y')) || (getConfig('bonus_uid') != $url_uid)) && (getConfig('def_refid') != $url_uid)) {
- // Add points and remember ranking are done in this function....
- BONUS_ADD_TURBO_POINTS($urlId, $url_uid, $type);
-
- // Set template to mailid_points_done2 which contains a link to the ranking list
- $template = 'mailid_points_done2';
- if ($locked) $template = 'mailid_points_locked2';
- define('_UID_VALUE' , $url_uid);
- define('_TYPE_VALUE', $type);
- define('_DATA_VALUE', translateComma($urlId));
+ // Add points
+ unset($GLOBALS['ref_level']);
+ ADD_POINTS_REFSYSTEM('mailid_okay', $url_uid, $payment, false, '0', $locked);
+
+ // Shall I add bonus points for "turbo clickers" ?
+ if (GET_EXT_VERSION('bonus') >= '0.2.2') {
+ // Is an active-rallye running and this is not a notification mail?
+ if ((getConfig('bonus_active') == 'Y') && ($notify == 'N')) {
+ // Shall I exclude the webmaster's own userid from the active-rallye?
+ if ((((getConfig('bonus_uid') == $url_uid) && (getConfig('bonus_include_own') == 'Y')) || (getConfig('bonus_uid') != $url_uid)) && (getConfig('def_refid') != $url_uid)) {
+ // Add points and remember ranking are done in this function....
+ BONUS_ADD_TURBO_POINTS($urlId, $url_uid, $type);
+
+ // Set template to mailid_points_done2 which contains a link to the ranking list
+ $template = 'mailid_points_done2';
+ if ($locked) $template = 'mailid_points_locked2';
+ define('_UID_VALUE' , $url_uid);
+ define('_TYPE_VALUE', $type);
+ define('_DATA_VALUE', translateComma($urlId));
+ } // END - if
} // END - if
} // END - if
- } // END - if
- // Load total points
- define('__TOTAL_POINTS', translateComma(
+ // Load total points
+ define('__TOTAL_POINTS', translateComma(
GET_TOTAL_DATA($url_uid, 'user_points', 'points') -
GET_TOTAL_DATA($url_uid, 'user_data', 'used_points'))
- );
+ );
- // Load template
- LOAD_TEMPLATE($template);
- } else {
- // Wrong image code! So add points to sender's account
- unset($GLOBALS['ref_level']);
- ADD_POINTS_REFSYSTEM_DIRECT('mailid_payback', $sender, $payment);
+ // Load template
+ LOAD_TEMPLATE($template);
+ } else {
+ // Wrong image code! So add points to sender's account
+ unset($GLOBALS['ref_level']);
+ ADD_POINTS_REFSYSTEM_DIRECT('mailid_payback', $sender, $payment);
- // Load template
- LOAD_TEMPLATE('mailid_points_failed');
- }
+ // Load template
+ LOAD_TEMPLATE('mailid_points_failed');
+ }
- // Remove link from table
- SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_links` WHERE `id`=%s LIMIT 1",
+ // Remove link from table
+ SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_links` WHERE `id`=%s LIMIT 1",
array(bigintval($lid)), __FILE__, __LINE__);
- break;
-
- case 'img':
- GENERATE_IMAGE($img_code);
- break;
+ break;
- case 'confirm':
- if ($code > 0) {
- // Export data into constants for the template
- define('_CODE_VALUE', $code);
- define('_UID_VALUE' , $url_uid );
- define('_TYPE_VALUE', $type);
- define('_DATA_VALUE', $urlId);
- define('_TEMPLATE_BANNER', LOAD_TEMPLATE('mailid_banner', true));
- if (getConfig('code_length') > 0) {
- // Generate Code
- define('_IMAGE_CODE', generateCaptchaCode($code, $type, $urlId, $url_uid));
- $templ = 'mailid_enter_code';
- } else {
- // Disabled code
- define('__GFX_CODE', $img_code);
- $templ = 'mailid_confirm_buttom';
- }
+ case 'img':
+ GENERATE_IMAGE($img_code);
+ break;
- // Load template
- LOAD_TEMPLATE($templ);
- }
- break;
-
- case '':
- // Ok, all data is valid and loaded. Finally let's output the timer... :-)
- // Export data into constants for the template
- define('_TIME_VALUE', $time);
- define('_TIM2_VALUE', strlen($time));
- define('_UID_VALUE' , $url_uid );
- define('_TYPE_VALUE', $type);
- define('_DATA_VALUE', $urlId);
- define('_RAND_VALUE', mt_rand(0, 99999));
- define('_TEMPLATE_BANNER', LOAD_TEMPLATE('mailid_banner', true));
-
- // Load template
- LOAD_TEMPLATE('mailid_timer');
- break;
+ case 'confirm':
+ if ($code > 0) {
+ // Export data into constants for the template
+ define('_CODE_VALUE', $code);
+ define('_UID_VALUE' , $url_uid );
+ define('_TYPE_VALUE', $type);
+ define('_DATA_VALUE', $urlId);
+ define('_TEMPLATE_BANNER', LOAD_TEMPLATE('mailid_banner', true));
+ if (getConfig('code_length') > 0) {
+ // Generate Code
+ define('_IMAGE_CODE', generateCaptchaCode($code, $type, $urlId, $url_uid));
+ $templ = 'mailid_enter_code';
+ } else {
+ // Disabled code
+ define('__GFX_CODE', $img_code);
+ $templ = 'mailid_confirm_buttom';
+ }
+
+ // Load template
+ LOAD_TEMPLATE($templ);
+ }
+ break;
+
+ case '':
+ // Ok, all data is valid and loaded. Finally let's output the timer... :-)
+ // Export data into constants for the template
+ define('_TIME_VALUE', $time);
+ define('_TIM2_VALUE', strlen($time));
+ define('_UID_VALUE' , $url_uid );
+ define('_TYPE_VALUE', $type);
+ define('_DATA_VALUE', $urlId);
+ define('_RAND_VALUE', mt_rand(0, 99999));
+ define('_TEMPLATE_BANNER', LOAD_TEMPLATE('mailid_banner', true));
+
+ // Load template
+ LOAD_TEMPLATE('mailid_timer');
+ break;
} // END - switch
} else {
LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (6)</div>");
if (IS_MEMBER()) {
// Is still logged in so we welcome him with his name
$result = SQL_QUERY_ESC("SELECT surname, family FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array(getUserId()), __FILE__, __LINE__);
+ array(getUserId()), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load surname and family's name and build the username
list($s, $f) = SQL_FETCHROW($result);
$check = checkModulePermissions($GLOBALS['module']);
switch ($check)
{
- case 'admin_only':
- case 'mem_only':
- case 'done':
- // Does the module exists on local file system?
- if ((isFileReadable(constant('__MODULE'))) && (getTotalFatalErrors() == 0)) {
- // Module is valid, active and located on the local disc...
- $MOD_VALID = true;
- } elseif (!empty($URL)) {
- // An URL was specified so we load the de-referrer module
- redirectToUrl(DEREFERER($URL));
- } elseif (getTotalFatalErrors() == 0) {
+ case 'admin_only':
+ case 'mem_only':
+ case 'done':
+ // Does the module exists on local file system?
+ if ((isFileReadable(constant('__MODULE'))) && (getTotalFatalErrors() == 0)) {
+ // Module is valid, active and located on the local disc...
+ $MOD_VALID = true;
+ } elseif (!empty($URL)) {
+ // An URL was specified so we load the de-referrer module
+ redirectToUrl(DEREFERER($URL));
+ } elseif (getTotalFatalErrors() == 0) {
+ addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_404'), $GLOBALS['module']));
+ }
+ break;
+
+ case '404':
addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_404'), $GLOBALS['module']));
- }
- break;
-
- case '404':
- addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_404'), $GLOBALS['module']));
- break;
-
- case 'locked':
- if (!isFileReadable(constant('__MODULE'))) {
- // Module does addionally not exists
- addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_404'), $GLOBALS['module']));
- } // END - if
-
- // Add fatal message
- addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_LOCKED'), $GLOBALS['module']));
- break;
-
- default:
- DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown status %s return from module check. Module=%s", $check, $GLOBALS['module']));
- addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_UNKNOWN'), $check));
- break;
+ break;
+
+ case 'locked':
+ if (!isFileReadable(constant('__MODULE'))) {
+ // Module does addionally not exists
+ addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_404'), $GLOBALS['module']));
+ } // END - if
+
+ // Add fatal message
+ addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_LOCKED'), $GLOBALS['module']));
+ break;
+
+ default:
+ DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown status %s return from module check. Module=%s", $check, $GLOBALS['module']));
+ addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_UNKNOWN'), $check));
+ break;
}
} elseif (getTotalFatalErrors() == 0) {
// MySQL problems!
// Base URL for redirection
switch (getConfig('refid_target'))
{
- case 'register':
- $URL = 'modules.php?module=index&what=register&refid=';
- break;
+ case 'register':
+ $URL = 'modules.php?module=index&what=register&refid=';
+ break;
- case 'index':
- $URL = 'index.php?refid=';
- break;
+ case 'index':
+ $URL = 'index.php?refid=';
+ break;
}
// Get referal ID from ref or refid variable
if (REQUEST_ISSET_GET(('ref'))) $ref = REQUEST_GET('ref');
- elseif (REQUEST_ISSET_GET(('refid'))) $ref = REQUEST_GET('refid');
+ elseif (REQUEST_ISSET_GET(('refid'))) $ref = REQUEST_GET('refid');
if (!empty($ref)) {
// Test if nickname or numeric id
if (EXT_IS_ACTIVE('nickname')) {
// Nickname in URL, so load the ID
$result = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE nickname='%s' LIMIT 1",
- array($ref), __FILE__, __LINE__);
+ array($ref), __FILE__, __LINE__);
// Load userid
list($ref) = SQL_FETCHROW($result);
if ($ref > 0) {
// Update ref counter
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET ref_clicks=ref_clicks+1 WHERE userid=%s LIMIT 1",
- array(bigintval($ref)), __FILE__, __LINE__);
+ array(bigintval($ref)), __FILE__, __LINE__);
} // END - if
} else {
// No refid and we add our refid (don't forget to set $def_refid!)
ON d.userid=b.userid
WHERE d.`status`='CONFIRMED' AND d.userid=%s AND b.%s=%s
LIMIT 1",
- array(bigintval(REQUEST_GET('uid')), $t, bigintval(REQUEST_GET('d'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('uid')), $t, bigintval(REQUEST_GET('d'))), __FILE__, __LINE__);
// Entry found?
if (SQL_NUMROWS($result) == 1) {
// Get referal ID from ref or refid variable
$ref = 0;
if (REQUEST_ISSET_GET(('ref'))) $ref = bigintval(REQUEST_GET('ref'));
- elseif (REQUEST_ISSET_GET(('refid'))) $ref = bigintval(REQUEST_GET('refid'));
+ elseif (REQUEST_ISSET_GET(('refid'))) $ref = bigintval(REQUEST_GET('refid'));
if (!empty($ref)) {
// We have an refid here. So we simply add it
'restart' => getConfig('surfbar_restart_time'),
'start' => str_repeat('X', strlen(getConfig('surfbar_restart_time'))),
'autostart' => (getConfig('surfbar_autostart') == 'Y') ? 'true' : 'false'
- );
+ );
- // Load template for stopped surfbar
- LOAD_TEMPLATE('surfbar_stopped', false, $content);
+ // Load template for stopped surfbar
+ LOAD_TEMPLATE('surfbar_stopped', false, $content);
}
} elseif ((REQUEST_ISSET_GET(('check'))) && (REQUEST_ISSET_GET('id')) && (REQUEST_ISSET_GET(('salt')))) {
// Dummy next id get
-.active_row1, .active_row2, .active_row3 {
- text-align : center;
- padding-left : 5px;
- padding-right : 5px;
+.active_row1,.active_row2,.active_row3 {
+ text-align: center;
+ padding-left: 5px;
+ padding-right: 5px;
}
.active_row2 {
- text-align : left;
-}
+ text-align: left;
+}
\ No newline at end of file
background-color: #EEEEFF;
padding-left: 10px;
padding-right: 10px;
-}
+}
\ No newline at end of file
.bonus_rank_1 {
- font-weight : bold;
- font-size : 22px;
+ font-weight: bold;
+ font-size: 22px;
}
.bonus_rank_2 {
- font-weight : bold;
- font-size : 18px;
+ font-weight: bold;
+ font-size: 18px;
}
.bonus_rank_3 {
- font-weight : bold;
-}
+ font-weight: bold;
+}
\ No newline at end of file
.doubler_table {
+
}
.doubler_main {
+
}
.doubler_error {
- font-weight : bold;
- color : #AA0000;
+ font-weight: bold;
+ color: #AA0000;
}
.doubler_big_row {
- height : 70px;
+ height: 70px;
}
.doubler_header {
- text-align : center;
- height : 24px;
- background-color : #EEEEFF;
+ text-align: center;
+ height: 24px;
+ background-color: #EEEEFF;
}
.doubler_footer {
- height : 24px;
- background-color : #EEEEFF;
-}
+ height: 24px;
+ background-color: #EEEEFF;
+}
\ No newline at end of file
body {
- background-color : #FFFFFF;
- color : #000000;
- font-family : Verdana, Arial, Geneva, Helvetica, sans-serif;
- font-size : 12px;
- letter-spacing : 1px;
-
- margin : 0px;
- margin-left : 0px;
- margin-right : 0px;
- margin-top : 0px;
- margin-bottom : 0px;
+ background-color: #FFFFFF;
+ color: #000000;
+ font-family: Verdana, Arial, Geneva, Helvetica, sans-serif;
+ font-size: 12px;
+ letter-spacing: 1px;
+ margin: 0px;
+ margin-left: 0px;
+ margin-right: 0px;
+ margin-top: 0px;
+ margin-bottom: 0px;
}
table {
- table-layout : auto;
- border-spacing : 0px;
- overflow : auto;
+ table-layout: auto;
+ border-spacing: 0px;
+ overflow: auto;
}
A {
- font-style : normal;
- text-decoration : none;
+ font-style: normal;
+ text-decoration: none;
}
A:link {
- color : #000000;
+ color: #000000;
}
A:visited {
- color : #000000;
+ color: #000000;
}
A:active {
- color : #000088;
- background-color : transparent;
+ color: #000088;
+ background-color: transparent;
}
A:hover {
- background-color : transparent;
+ background-color: transparent;
}
-input, textarea, select, option {
- color : #000000;
- background-color : #FFFFFF;
- border : 1px solid #000000;
- text-decoration : none;
+input,textarea,select,option {
+ color: #000000;
+ background-color: #FFFFFF;
+ border: 1px solid #000000;
+ text-decoration: none;
}
-ul, ol {
- margin-top : 0px;
- margin-bottom : 0px;
+ul,ol {
+ margin-top: 0px;
+ margin-bottom: 0px;
}
-.admin_reset, .guest_reset, .member_reset {
- border-style : groove;
- border : solid 1px #000000;
- color : #000000;
- cursor : pointer;
+.admin_reset,.guest_reset,.member_reset {
+ border-style: groove;
+ border: solid 1px #000000;
+ color: #000000;
+ cursor: pointer;
}
-.admin_submit, .guest_submit, .member_submit {
- color : #000000;
- border-color : #000000;
- cursor : pointer;
+.admin_submit,.guest_submit,.member_submit {
+ color: #000000;
+ border-color: #000000;
+ cursor: pointer;
}
.admin_submit_reject {
- border-style : groove;
- color : #000000;
- border-color : #000000;
- cursor : pointer;
+ border-style: groove;
+ color: #000000;
+ border-color: #000000;
+ cursor: pointer;
}
-.runtime_fatal, .runtime_fatalcontent {
- color : #000000;
- background-color : #FFFFFF;
+.runtime_fatal,.runtime_fatalcontent {
+ color: #000000;
+ background-color: #FFFFFF;
}
.runtime_fatal {
- color : #000000;
+ color: #000000;
}
.runtime_fatalcontent {
- text-align : left;
- font-size : 12px;
+ text-align: left;
+ font-size: 12px;
}
.admin {
- color : #000000;
- background-color : #FFFFFF;
+ color: #000000;
+ background-color: #FFFFFF;
}
.admin_note {
- color : #000000;
- font-size : 12px;
+ color: #000000;
+ font-size: 12px;
}
DIV.admin_note {
- padding-top : 10px;
- padding-right : 10px;
- padding-left : 10px;
+ padding-top: 10px;
+ padding-right: 10px;
+ padding-left: 10px;
}
.admin_fatal {
- color : #000000;
- font-size : 18px;
+ color: #000000;
+ font-size: 18px;
}
-.admin_edit, .member_confirm {
- background-color : #FFFFFF;
+.admin_edit,.member_confirm {
+ background-color: #FFFFFF;
}
.member_banner {
- background-color : #FFFFFF;
- width : 488px;
+ background-color: #FFFFFF;
+ width: 488px;
}
.admin_error {
- background-color : #FFFFFF;
- color : #000000;
- font-size : 10px;
+ background-color: #FFFFFF;
+ color: #000000;
+ font-size: 10px;
}
-.admin_select, .guest_select, .member_select {
- border : solid 1px #000000;
- background-color : #EEEEFF;
+.admin_select,.guest_select,.member_select {
+ border: solid 1px #000000;
+ background-color: #EEEEFF;
}
-.admin_register, .admin_desc_header, .admin_done, .admin_title, .member_title2, .guest_title2, .admin_message {
- background-color : #EEEEFF;
- color : #000000;
- text-align : center;
+.admin_register,.admin_desc_header,.admin_done,.admin_title,.member_title2,.guest_title2,.admin_message
+ {
+ background-color: #EEEEFF;
+ color: #000000;
+ text-align: center;
}
.admin_title2 {
- font-weight : bold;
- padding : 4px;
- background-color : #EEEEFF;
- color : #000000;
- text-align : center;
- font-size : 14px;
+ font-weight: bold;
+ padding: 4px;
+ background-color: #EEEEFF;
+ color: #000000;
+ text-align: center;
+ font-size: 14px;
}
-.member_done, .guest_done {
- color : #000000;
+.member_done,.guest_done {
+ color: #000000;
}
.member_misc {
- background-color : #FFFFFF;
+ background-color: #FFFFFF;
}
-.admin_misc, .member_misc {
- color : #000000;
+.admin_misc,.member_misc {
+ color: #000000;
}
.admin_done2 {
- color : #000000;
+ color: #000000;
}
-.admin_green, .admin_no {
- color : #000000;
+.admin_green,.admin_no {
+ color: #000000;
}
.admin_welcome {
- background-color : #EEEEFF;
- color : #000000;
- vertical-align : middle;
- font-size : 18px;
- height : 50px;
+ background-color: #EEEEFF;
+ color: #000000;
+ vertical-align: middle;
+ font-size: 18px;
+ height: 50px;
}
.admin_header {
- background-color : #EEEEFF;
+ background-color: #EEEEFF;
}
.admin_menu {
- background-color : #EEEEFF;
- color : #000000;
- width : 230px;
+ background-color: #EEEEFF;
+ color: #000000;
+ width: 230px;
}
.admin_logout {
- background-color : #DDDDFF;
- color : #000000;
+ background-color: #DDDDFF;
+ color: #000000;
}
.admin_desc_cont {
- text-align : left;
- background-color : #FFFFFF;
+ text-align: left;
+ background-color: #FFFFFF;
}
-.admin_table, .member_table {
- background-color : #FFFFFF;
+.admin_table,.member_table {
+ background-color: #FFFFFF;
}
.admin_editmenu {
- min-width : 500px;
- max-width : 90%;
+ min-width: 500px;
+ max-width: 90%;
}
.admin_form_header {
- text-align : center;
- height : 36px;
- background-color : #EEEEFF;
- color : #000000;
+ text-align: center;
+ height: 36px;
+ background-color: #EEEEFF;
+ color: #000000;
}
.member_header {
- text-align : center;
- height : 28px;
- background-color : #EEEEFF;
+ text-align: center;
+ height: 28px;
+ background-color: #EEEEFF;
}
-.admin_failed, .guest_failed, .member_failed, .member_note {
- color : #000000;
+.admin_failed,.guest_failed,.member_failed,.member_note {
+ color: #000000;
}
.member_note_bg {
- background-color : #FFFFFF;
+ background-color: #FFFFFF;
}
.member_data {
- background-color : #FFFFFF;
- color : #000000;
- height : 20px;
+ background-color: #FFFFFF;
+ color: #000000;
+ height: 20px;
}
.admin_header_b1 {
- border-bottom : 1px solid #000000;
- background-color : #EEEEFF;
- height : 22px;
+ border-bottom: 1px solid #000000;
+ background-color: #EEEEFF;
+ height: 22px;
}
.admin_snote {
- font-size : 12px;
+ font-size: 12px;
}
-.admin_normal, .guest_normal, .member_normal {
- border-style : solid;
- border : solid 1px #000000;
- background-color : #EEEEFF;
+.admin_normal,.guest_normal,.member_normal {
+ border-style: solid;
+ border: solid 1px #000000;
+ background-color: #EEEEFF;
}
.admin_alpha {
- text-align : center;
- height : 40px;
- vertical-align : middle;
+ text-align: center;
+ height: 40px;
+ vertical-align: middle;
}
.admin_sortlinks {
- text-align : center;
- height : 20px;
- vertical-align : middle;
+ text-align: center;
+ height: 20px;
+ vertical-align: middle;
}
.member_stats {
- vertical-align : top;
- font-weight : bold;
- height : 23px;
- font-size : 16px;
- border-style : none;
- border : 0px;
- background : #FFFFFF;
- color : #000000;
- margin-top : -4px;
- margin-bottom : 1px;
- cursor : default;
+ vertical-align: top;
+ font-weight: bold;
+ height: 23px;
+ font-size: 16px;
+ border-style: none;
+ border: 0px;
+ background: #FFFFFF;
+ color: #000000;
+ margin-top: -4px;
+ margin-bottom: 1px;
+ cursor: default;
}
.normal {
- border-style : groove;
+ border-style: groove;
}
.member_main {
- background-color : #FFFFFF;
+ background-color: #FFFFFF;
}
-.guest_title, .member_title {
- text-align : center;
- color : #000000;
- vertical-align : middle;
- background-color : #EEEEFF;
- height : 60px;
+.guest_title,.member_title {
+ text-align: center;
+ color: #000000;
+ vertical-align: middle;
+ background-color: #EEEEFF;
+ height: 60px;
}
.guest_login_header {
- color : #000000;
- vertical-align : middle;
- background-color : #EEEEFF;
+ color: #000000;
+ vertical-align: middle;
+ background-color: #EEEEFF;
}
-.guest_menu, .member_menu {
- width : 220px;
- background-color : #FFFFFF;
- vertical-align : top;
+.guest_menu,.member_menu {
+ width: 220px;
+ background-color: #FFFFFF;
+ vertical-align: top;
}
-.guest_menu_title, .member_menu_title {
- background-color : #EEEEFF;
- color : #000000;
- height : 25px;
- width : 200px;
- border : 1px solid #000000;
+.guest_menu_title,.member_menu_title {
+ background-color: #EEEEFF;
+ color: #000000;
+ height: 25px;
+ width: 200px;
+ border: 1px solid #000000;
}
-.guest_menu_row, .guest_menu_bottom, .member_menu_row, .member_menu_bottom {
- border : 1px solid #000000;
- border-top : 0px;
- background-color : #FFFFFF;
- height : 22px;
- text-align : left;
+.guest_menu_row,.guest_menu_bottom,.member_menu_row,.member_menu_bottom
+ {
+ border: 1px solid #000000;
+ border-top: 0px;
+ background-color: #FFFFFF;
+ height: 22px;
+ text-align: left;
}
-.guest_menu_seperator, .member_menu_seperator {
- height : 15px;
+.guest_menu_seperator,.member_menu_seperator {
+ height: 15px;
}
-.guest_content, .member_content {
- background-color : #FFFFFF;
- width : 99%;
- padding-left : 2px;
- padding-right : 2px;
- margin-left : 5px;
- margin-right : 5px;
+.guest_content,.member_content {
+ background-color: #FFFFFF;
+ width: 99%;
+ padding-left: 2px;
+ padding-right: 2px;
+ margin-left: 5px;
+ margin-right: 5px;
}
-.guest_advert, .guest_login, .member_advert, .member_login {
- background-color : #FFFFFF;
- vertical-align : top;
- margin-top : 10px;
+.guest_advert,.guest_login,.member_advert,.member_login {
+ background-color: #FFFFFF;
+ vertical-align: top;
+ margin-top: 10px;
}
.guest_footer {
- height : 30px;
- background-color : #EEEEFF;
+ height: 30px;
+ background-color: #EEEEFF;
}
#master {
- width : 100%;
- height : 100%;
- min-height : 90%;
- max-height : 100%;
- vertical-align : top;
+ width: 100%;
+ height: 100%;
+ min-height: 90%;
+ max-height: 100%;
+ vertical-align: top;
}
.masterbox {
- text-align : center;
+ text-align: center;
}
.footer_lines {
- vertical-align : bottom;
- font-size : 10px;
- width : 380px;
- vertical-align : middle;
- background-color : #FFFFFF;
- height : 30px;
- padding-top : 5px;
- padding-bottom : 5px;
+ vertical-align: bottom;
+ font-size: 10px;
+ width: 380px;
+ vertical-align: middle;
+ background-color: #FFFFFF;
+ height: 30px;
+ padding-top: 5px;
+ padding-bottom: 5px;
}
.footer_box {
- text-align : center;
- width : 760px;
+ text-align: center;
+ width: 760px;
}
.dashed {
- border : solid 1px #000000;
+ border: solid 1px #000000;
}
-.switch_sw1, .switch_mem1 {
- background-color : #FFFFFF;
+.switch_sw1,.switch_mem1 {
+ background-color: #FFFFFF;
}
-.switch_sw2, .switch_mem2 {
- background-color : #FFFFFF;
+.switch_sw2,.switch_mem2 {
+ background-color: #FFFFFF;
}
.impressum {
- font-size : 12px;
- width : 320px;
- vertical-align : middle;
- background-color : #FFFFFF;
- height : 70px;
+ font-size: 12px;
+ width: 320px;
+ vertical-align: middle;
+ background-color: #FFFFFF;
+ height: 70px;
}
.mediadata {
- background-color : #FFFFFF;
+ background-color: #FFFFFF;
}
-.media_header, .impressum_header {
- background-color : #EEEEFF;
- text-align : center;
- color : #000000;
- height : 26px;
- font-weight : bold;
- font-size : 20px;
+.media_header,.impressum_header {
+ background-color: #EEEEFF;
+ text-align: center;
+ color: #000000;
+ height: 26px;
+ font-weight: bold;
+ font-size: 20px;
}
.media_left {
- font-size : 14px;
- width : 200px;
+ font-size: 14px;
+ width: 200px;
}
.media_right {
- color : #000000;
- font-weight : bold;
- font-size : 14px;
- width : 70px;
+ color: #000000;
+ font-weight: bold;
+ font-size: 14px;
+ width: 70px;
}
.admin_sep_footer {
- background-color : #EEEEFF;
- font-size : 1px;
+ background-color: #EEEEFF;
+ font-size: 1px;
}
.admin_sep_footer2 {
- background-color : #EEEEFF;
- font-size : 1px;
+ background-color: #EEEEFF;
+ font-size: 1px;
}
-.admin_footer, .member_refbanner, .member_update, .admin_del_link {
- background-color : #EEEEFF;
+.admin_footer,.member_refbanner,.member_update,.admin_del_link {
+ background-color: #EEEEFF;
}
.member_footer {
- height : 30px;
- background-color : #EEEEFF;
+ height: 30px;
+ background-color: #EEEEFF;
}
.admin_footer {
- text-align : center;
- height : 30px
+ text-align: center;
+ height: 30px
}
.admin_task_header {
- background-color : #EEEEFF;
- color : #000000;
- vertical-align : middle;
- font-size : 18px;
- height : 35px;
+ background-color: #EEEEFF;
+ color: #000000;
+ vertical-align: middle;
+ font-size: 18px;
+ height: 35px;
}
.seperator {
- font-size : 1px
+ font-size: 1px
}
.tab1 {
- text-align : center
+ text-align: center
}
-.admin_delete, .admin_yes {
- border-style : groove;
- border : solid 1px #000000;
- background-color : #000000;
- color : #FFFFFF;
- cursor : pointer;
+.admin_delete,.admin_yes {
+ border-style: groove;
+ border: solid 1px #000000;
+ background-color: #000000;
+ color: #FFFFFF;
+ cursor: pointer;
}
.guest_stats {
- background-color : #FFFFFF;
- width : 460px;
+ background-color: #FFFFFF;
+ width: 460px;
}
.guest_stats_title {
- color : #000000;
- vertical-align : middle;
- background-color : #EEEEFF;
- height : 30px;
+ color: #000000;
+ vertical-align: middle;
+ background-color: #EEEEFF;
+ height: 30px;
}
.guest_stats_l {
- width : 344px;
- text-align : right;
+ width: 344px;
+ text-align: right;
}
.guest_stats_m {
- width : 2px;
+ width: 2px;
}
-.guest_stats_r, .guest_stats_lr, .guest_stats_rr {
- color : #000000;
- width : 28px;
- font-weight : bold;
- text-align : center;
+.guest_stats_r,.guest_stats_lr,.guest_stats_rr {
+ color: #000000;
+ width: 28px;
+ font-weight: bold;
+ text-align: center;
}
-.guest_stats_ll, .guest_stats_rl {
- width : 192px;
- text-align : right;
+.guest_stats_ll,.guest_stats_rl {
+ width: 192px;
+ text-align: right;
}
.guest_stats_footer {
- color : #000000;
- vertical-align : middle;
- background-color : #EEEEFF;
- height : 20px;
+ color: #000000;
+ vertical-align: middle;
+ background-color: #EEEEFF;
+ height: 20px;
}
.task_pre {
- font-weight : bold;
- margin-left : 0px;
- margin-right : 0px;
- margin-top : 10px;
- margin-bottom : 10px;
+ font-weight: bold;
+ margin-left: 0px;
+ margin-right: 0px;
+ margin-top: 10px;
+ margin-bottom: 10px;
}
.impressum_body {
- background-color : #FFFFFF;
+ background-color: #FFFFFF;
}
-.guest_content_align, .member_content_align, .admin_content_align {
- text-align : center;
- vertical-align : top;
+.guest_content_align,.member_content_align,.admin_content_align {
+ text-align: center;
+ vertical-align: top;
}
.member_mailidtop {
- background-color : #FFFFFF;
- width : 100%;
- height : 100%;
+ background-color: #FFFFFF;
+ width: 100%;
+ height: 100%;
}
-.list_categories, .admin_action_header, .admin_main, .admin_menu_main, .admin_menu_sub {
- text-align : left;
- width : 100%;
+.list_categories,.admin_action_header,.admin_main,.admin_menu_main,.admin_menu_sub
+ {
+ text-align: left;
+ width: 100%;
}
.member_unconfirmed {
- background-color : #FFFFFF;
- width : 100%;
- text-align : center;
+ background-color: #FFFFFF;
+ width: 100%;
+ text-align: center;
}
.you_are_here {
- white-space : nowrap;
- font-size : 14px;
- text-align : left;
+ white-space: nowrap;
+ font-size: 14px;
+ text-align: left;
+}
+
+.tiny {
+ font-size: 12px;
+}
+
+.medium {
+ font-size: 14px;
+}
+
+.big {
+ font-size: 20px;
+}
+
+.top {
+ border-top: 1px solid #000000;
+}
+
+.bottom {
+ border-bottom: 1px solid #000000;
}
-.tiny { font-size : 12px; }
-.medium { font-size : 14px; }
-.big { font-size : 20px; }
+.left {
+ border-left: 1px solid #000000;
+}
+
+.right {
+ border-right: 1px solid #000000;
+}
-.top { border-top : 1px solid #000000; }
-.bottom { border-bottom : 1px solid #000000; }
-.left { border-left : 1px solid #000000; }
-.right { border-right : 1px solid #000000; }
+.top2 {
+ border-top: 1px solid #000000;
+}
-.top2 { border-top : 1px solid #000000; }
-.bottom2 { border-bottom : 1px solid #000000; }
-.left2 { border-left : 1px solid #000000; }
-.right2 { border-right : 1px solid #000000; }
+.bottom2 {
+ border-bottom: 1px solid #000000;
+}
+
+.left2 {
+ border-left: 1px solid #000000;
+}
+
+.right2 {
+ border-right: 1px solid #000000;
+}
.nobr {
- white-space : nowrap;
+ white-space: nowrap;
}
.guest_table {
- background-color : #FFFFFF;
+ background-color: #FFFFFF;
}
.main {
- height : 99%;
- vertical-align : top;
+ height: 99%;
+ vertical-align: top;
}
.footer {
- height : 1%;
- vertical-align : bottom;
+ height: 1%;
+ vertical-align: bottom;
}
.menu_blur {
- display : block;
+ display: block;
}
.menu_blur:hover {
- background-color : #EEEEFF;
+ background-color: #EEEEFF;
}
.disabled {
- border-style : groove;
- background-color : #AAAAAA;
- color : #FFFFFF;
+ border-style: groove;
+ background-color: #AAAAAA;
+ color: #FFFFFF;
}
.mini_select {
- border : solid 1px #000000;
- background-color : #EEEEFF;
- font-size : 10px;
+ border: solid 1px #000000;
+ background-color: #EEEEFF;
+ font-size: 10px;
}
.theme_box {
- border : 1px solid #000000;
- border-top : 0px;
- width : 100%;
- height : 70px;
- background-color : #FFFFFF;
+ border: 1px solid #000000;
+ border-top: 0px;
+ width: 100%;
+ height: 70px;
+ background-color: #FFFFFF;
}
.theme_note {
- font-size : 12px;
- font-weight : bold;
+ font-size: 12px;
+ font-weight: bold;
}
.theme_content {
- color : #000000;
+ color: #000000;
}
.guest {
- width : 100%;
+ width: 100%;
}
.agb_box {
- text-align : left;
+ text-align: left;
}
-.agb_title, .fatal_title {
- font-size : 16px;
- text-align : center;
- height : 40px;
- font-weight : bold;
+.agb_title,.fatal_title {
+ font-size: 16px;
+ text-align: center;
+ height: 40px;
+ font-weight: bold;
}
.agb_para {
- text-indent : 8px;
- text-align : left;
- margin-left : 5px;
- margin-right : 5px;
- margin-bottom : 12px;
+ text-indent: 8px;
+ text-align: left;
+ margin-left: 5px;
+ margin-right: 5px;
+ margin-bottom: 12px;
}
.fatal_box {
- text-align : center;
- width : 100%;
- margin-top : 10px;
+ text-align: center;
+ width: 100%;
+ margin-top: 10px;
}
.admin_message {
- padding-bottom : 15px;
+ padding-bottom: 15px;
}
#show_timings_block {
- float : left;
- border : solid 1px #000000;
- background-color : #EEEEFF;
- font-size : 10px;
- vertical-align : middle;
- width : 465px;
- height : 20px;
+ float: left;
+ border: solid 1px #000000;
+ background-color: #EEEEFF;
+ font-size: 10px;
+ vertical-align: middle;
+ width: 465px;
+ height: 20px;
}
.show_timings_column {
- background-color : #FFFFFF;
- margin-top : 2px;
- width : 150px;
- border : solid 1px #000000;
- height : 14px;
+ background-color: #FFFFFF;
+ margin-top: 2px;
+ width: 150px;
+ border: solid 1px #000000;
+ height: 14px;
}
.show_timings_data {
- font-weight : bold;
+ font-weight: bold;
}
-
.login_failure_header {
- text-align : center;
- background-color : #EEEEFF;
- font-weight : bold;
+ text-align: center;
+ background-color: #EEEEFF;
+ font-weight: bold;
}
.login_failures {
- text-align : center;
- width : 400px;
+ text-align: center;
+ width: 400px;
}
-.member_skyscraper, .guest_skyscraper {
- width : 122px;
- height : 601px;
- border : 1px solid #000000;
- margin : 0px;
- padding : 0px;
- padding-top : 1px;
+.member_skyscraper,.guest_skyscraper {
+ width: 122px;
+ height: 601px;
+ border: 1px solid #000000;
+ margin: 0px;
+ padding: 0px;
+ padding-top: 1px;
}
-ul.admin_menu_main, ul.admin_menu_sub {
- list-style : none inside;
-}
+ul.admin_menu_main,ul.admin_menu_sub {
+ list-style: none inside;
+}
\ No newline at end of file
.install_fatal {
- text-align : left;
- color : #000000;
+ text-align: left;
+ color: #000000;
}
.install_select {
- border : dashed 1px #000000;
- background-color : #EEEEFF;
+ border: dashed 1px #000000;
+ background-color: #EEEEFF;
}
+
.install_normal {
- border-style : solid;
- border : dashed 1px #000000;
+ border-style: solid;
+ border: dashed 1px #000000;
}
.install_submit {
- border-style : groove;
+ border-style: groove;
}
.install {
+
}
.install_main {
- color : #000000;
- background-color : #FFFFFF;
- text-decoration : none;
+ color: #000000;
+ background-color: #FFFFFF;
+ text-decoration: none;
}
.install_header {
- color : #000000;
- background-color : #EEEEFF;
- font-size : 20px;
- text-decoration : underline;
- heigth : 30px;
- vertical-align : middle;
- padding-top : 5px;
- padding-bottom : 5px;
+ color: #000000;
+ background-color: #EEEEFF;
+ font-size: 20px;
+ text-decoration: underline;
+ heigth: 30px;
+ vertical-align: middle;
+ padding-top: 5px;
+ padding-bottom: 5px;
}
.install_fatal {
- background-color : #FFFFFF;
- color : #000000;
+ background-color: #FFFFFF;
+ color: #000000;
}
.install_fatalcontent {
- text-align : left;
- background-color : #FFFFFF;
+ text-align: left;
+ background-color: #FFFFFF;
}
-.install_error, .install_finished {
- font-size : 20px;
- color : #000000;
+.install_error,.install_finished {
+ font-size: 20px;
+ color: #000000;
}
-.install_security, .install_welcome, .install_text {
- color : #000000;
+.install_security,.install_welcome,.install_text {
+ color: #000000;
}
.install_text {
- padding-bottom : 10px;
- text-align : left;
- margin-left : 20px;
- margin-right : 20px;
+ padding-bottom: 10px;
+ text-align: left;
+ margin-left: 20px;
+ margin-right: 20px;
}
.install_security {
- width : 350px;
- padding-top : 10px;
- padding-bottom : 10px;
+ width: 350px;
+ padding-top: 10px;
+ padding-bottom: 10px;
}
.install_welcome {
- padding-top : 5px;
- padding-bottom : 10px;
-}
+ padding-top: 5px;
+ padding-bottom: 10px;
+}
\ No newline at end of file
.register_submit {
- border-style : outset;
+ border-style: outset;
}
.register_reset {
- border-style : groove;
- border : solid 1px #000000;
- color : #000000;
+ border-style: groove;
+ border: solid 1px #000000;
+ color: #000000;
}
+
.register_submit {
- color : #000000;
- border-color : #000000;
+ color: #000000;
+ border-color: #000000;
}
.register_select {
- border : solid 1px #000000;
- background-color : #EEEEFF;
+ border: solid 1px #000000;
+ background-color: #EEEEFF;
}
.register_failed {
- color : #000000;
+ color: #000000;
}
.register_snote {
- font-size : 12px;
+ font-size: 12px;
}
.register_normal {
- border-style : solid;
- border : solid 1px #000000;
- padding-right : 5px;
+ border-style: solid;
+ border: solid 1px #000000;
+ padding-right: 5px;
}
.register_main {
- background-color : #FFFFFF;
- width : 540px;
+ background-color: #FFFFFF;
+ width: 540px;
}
.register_done2 {
- height : 40px;
- color : #000000;
- background-color : #FFFFFF;
- width : 500px;
+ height: 40px;
+ color: #000000;
+ background-color: #FFFFFF;
+ width: 500px;
}
.register_title {
- background-color : #EEEEFF;
- text-align : center;
- font-size : 18px;
- padding-left : 5px;
- padding-right : 5px;
+ background-color: #EEEEFF;
+ text-align: center;
+ font-size: 18px;
+ padding-left: 5px;
+ padding-right: 5px;
}
.register_seperator {
- height : 7px;
- font-size : 1px;
+ height: 7px;
+ font-size: 1px;
}
.register_left {
- text-align : right;
- margin-right : 2px;
- color : #000000;
- font-weight : bold;
- font-size : 14px;
- padding-left : 5px;
+ text-align: right;
+ margin-right: 2px;
+ color: #000000;
+ font-weight: bold;
+ font-size: 14px;
+ padding-left: 5px;
}
.register_right {
- padding-right : 5px;
+ padding-right: 5px;
}
.register_header {
- text-align : center;
- background-color : #EEEEFF;
- color : #000000;
- font-weight : bold;
- border-top : 1px solid #000000;
- border-bottom : 1px solid #000000;
- height : 25px;
+ text-align: center;
+ background-color: #EEEEFF;
+ color: #000000;
+ font-weight: bold;
+ border-top: 1px solid #000000;
+ border-bottom: 1px solid #000000;
+ height: 25px;
}
-A:hover.register_term {
- background-color : #EEEEFF;
- border-top : 1px solid #000000;
- border-bottom : 1px solid #000000;
-}
+A:hover .register_term {
+ background-color: #EEEEFF;
+ border-top: 1px solid #000000;
+ border-bottom: 1px solid #000000;
+}
\ No newline at end of file
.sponsor_table {
- background-color : #FFFFFF;
+ background-color: #FFFFFF;
}
.sponsor_what {
- height : 24px;
+ height: 24px;
}
-.sponsor_header, .sponsor_footer {
- background-color : #EEEEFF;
+.sponsor_header,.sponsor_footer {
+ background-color: #EEEEFF;
}
.sponsor_action {
- background-color : #EEEEFF;
- height : 25px;
-}
+ background-color: #EEEEFF;
+ height: 25px;
+}
\ No newline at end of file
.surfbar_banner {
+
}
+
.surfbar_table {
+
}
+
.surfbar_td {
+
}
+
.surfbar_points {
+
}
+
#surfbar_counter {
+
}
+
#surfbar_restart {
+
}
+
#counter_word {
+
}
+
.surfbar_reload {
+
}
+
.surfbar_max {
+
}
+
.surfbar_points {
- font-weight : bold;
+ font-weight: bold;
}
\ No newline at end of file
-.top10_row1, .top10_row2, .top10_row3, .top10_row4, .top10_row5 {
- text-align : center;
- padding-left : 5px;
- padding-right : 5px;
+.top10_row1,.top10_row2,.top10_row3,.top10_row4,.top10_row5 {
+ text-align: center;
+ padding-left: 5px;
+ padding-right: 5px;
}
-.top10_row2, .top10_row4 {
- text-align : left;
-}
+.top10_row2,.top10_row4 {
+ text-align: left;
+}
\ No newline at end of file
-.transfer_row1, .transfer_row3 {
- text-align : center;
- font-weight : bold;
+.transfer_row1,.transfer_row3 {
+ text-align: center;
+ font-weight: bold;
}
.transfer_row2 {
- text-align : center;
+ text-align: center;
}
-.transfer_row4, .transfer_row5 {
+.transfer_row4,.transfer_row5 {
padding-left: 2px;
-}
+}
\ No newline at end of file
switch ($GLOBALS['theme_mode'])
{
-case 'test': // Do stuff while testing the theme: The admin clicked on 'Import'
- break;
+ case 'test': // Do stuff while testing the theme: The admin clicked on 'Import'
+ break;
-case 'load': // Do stuff while theme is loaded normally
- break;
+ case 'load': // Do stuff while theme is loaded normally
+ break;
}
//
?>
-.active_row1, .active_row2, .active_row3 {
- text-align : center;
- padding-left : 5px;
- padding-right : 5px;
+.active_row1,.active_row2,.active_row3 {
+ text-align: center;
+ padding-left: 5px;
+ padding-right: 5px;
}
.active_row2 {
- text-align : left;
-}
+ text-align: left;
+}
\ No newline at end of file
background-color: #e5f6e5;
padding-left: 10px;
padding-right: 10px;
-}
+}
\ No newline at end of file
.bonus_rank_1 {
- font-weight : bold;
- font-size : 22px;
+ font-weight: bold;
+ font-size: 22px;
}
.bonus_rank_2 {
- font-weight : bold;
- font-size : 18px;
+ font-weight: bold;
+ font-size: 18px;
}
.bonus_rank_3 {
- font-weight : bold;
-}
+ font-weight: bold;
+}
\ No newline at end of file
.doubler_table {
+
}
.doubler_main {
+
}
.doubler_error {
- font-weight : bold;
- color : #AA0000;
+ font-weight: bold;
+ color: #AA0000;
}
.doubler_big_row {
- height : 70px;
+ height: 70px;
}
.doubler_header {
- background-color : #ddeedd;
- text-align : center;
- height : 24px;
+ background-color: #ddeedd;
+ text-align: center;
+ height: 24px;
}
.doubler_footer {
- height : 24px;
- background-color : #ddeedd;
-}
+ height: 24px;
+ background-color: #ddeedd;
+}
\ No newline at end of file
body {
- background-color : #EEFFEE;
- color : #000000;
- font-family : Verdana, Arial, Geneva, Helvetica, sans-serif;
- font-size : 12px;
- letter-spacing : 1px;
-
- scrollbar-base-color : #E9E4AE;
- scrollbar-face-color : #CDEFCD;
- scrollbar-highlight-color : #EEFFEE;
- scrollbar-shadow-color : #CDEFCD;
- scrollbar-3dlight-color : #DDDDDD;
- scrollbar-arrow-color : #000000;
- scrollbar-track-color : #CCEFCC;
- scrollbar-darkshadow-color : #999999;
-
- margin : 0px;
- margin-left : 0px;
- margin-right : 0px;
- margin-top : 0px;
- margin-bottom : 0px;
+ background-color: #EEFFEE;
+ color: #000000;
+ font-family: Verdana, Arial, Geneva, Helvetica, sans-serif;
+ font-size: 12px;
+ letter-spacing: 1px;
+ scrollbar-base-color: #E9E4AE;
+ scrollbar-face-color: #CDEFCD;
+ scrollbar-highlight-color: #EEFFEE;
+ scrollbar-shadow-color: #CDEFCD;
+ scrollbar-3dlight-color: #DDDDDD;
+ scrollbar-arrow-color: #000000;
+ scrollbar-track-color: #CCEFCC;
+ scrollbar-darkshadow-color: #999999;
+ margin: 0px;
+ margin-left: 0px;
+ margin-right: 0px;
+ margin-top: 0px;
+ margin-bottom: 0px;
}
table {
- table-layout : auto;
- border-spacing : 0px;
- overflow : auto;
+ table-layout: auto;
+ border-spacing: 0px;
+ overflow: auto;
}
A {
- font-style : normal;
- text-decoration : none;
+ font-style: normal;
+ text-decoration: none;
}
A:link {
- color : #2e51a9;
+ color: #2e51a9;
}
A:visited {
- color : #AA0044;
+ color: #AA0044;
}
A:active {
- color : #2e51a9;
- background-color : transparent;
+ color: #2e51a9;
+ background-color: transparent;
}
A:hover {
- background-color : transparent;
+ background-color: transparent;
}
-input, textarea {
- color : #009900;
- background-color : #EEFFEE;
- border : 1px solid #AA0044;
- text-decoration : none;
- border-style : groove;
+input,textarea {
+ color: #009900;
+ background-color: #EEFFEE;
+ border: 1px solid #AA0044;
+ text-decoration: none;
+ border-style: groove;
}
-select, option {
- background-color : #EEFFEE;
- border : solid 1px #009900;
- color : #AA0044;
- text-decoration : none;
- border-style : groove;
+select,option {
+ background-color: #EEFFEE;
+ border: solid 1px #009900;
+ color: #AA0044;
+ text-decoration: none;
+ border-style: groove;
}
-ul, ol {
- margin-top : 0px;
- margin-bottom : 0px;
+ul,ol {
+ margin-top: 0px;
+ margin-bottom: 0px;
}
-.admin_reset, .guest_reset, .member_reset {
- border-style : groove;
- border : solid 1px #009900;
- color : #AA0044;
- cursor : pointer;
+.admin_reset,.guest_reset,.member_reset {
+ border-style: groove;
+ border: solid 1px #009900;
+ color: #AA0044;
+ cursor: pointer;
}
-.admin_submit, .guest_submit, .member_submit {
- color : #AA0044;
- border-color : #009900;
- cursor : pointer;
+.admin_submit,.guest_submit,.member_submit {
+ color: #AA0044;
+ border-color: #009900;
+ cursor: pointer;
}
.admin_submit_reject {
- border-style : groove;
- color : #881111;
- border-color : #009900;
- cursor : pointer;
+ border-style: groove;
+ color: #881111;
+ border-color: #009900;
+ cursor: pointer;
}
-.runtime_fatal, .runtime_fatalcontent {
- width : 700px;
- color : #118811;
- background-color : #DDEEDD;
+.runtime_fatal,.runtime_fatalcontent {
+ width: 700px;
+ color: #118811;
+ background-color: #DDEEDD;
}
.runtime_fatal {
- color : #00AA00;
+ color: #00AA00;
}
.runtime_fatalcontent {
- text-align : left;
- font-size : 12px;
+ text-align: left;
+ font-size: 12px;
}
.admin {
- color : #118811;
- background-color : #DDEEDD;
+ color: #118811;
+ background-color: #DDEEDD;
}
.admin_note {
- color : #FF0000;
- font-size : 12px;
+ color: #FF0000;
+ font-size: 12px;
}
DIV.admin_note {
- padding-top : 10px;
- padding-right : 10px;
- padding-left : 10px;
+ padding-top: 10px;
+ padding-right: 10px;
+ padding-left: 10px;
}
.admin_fatal {
- font-size : 18px;
- color : #00AA00;
+ font-size: 18px;
+ color: #00AA00;
}
-.admin_edit, .member_confirm {
- background-color : #eeffee;
+.admin_edit,.member_confirm {
+ background-color: #eeffee;
}
.member_banner {
- background-color : #eeffee;
- width : 488px;
+ background-color: #eeffee;
+ width: 488px;
}
.admin_error {
- background-color : #eeffee;
- color : #00AA00;
- font-size : 10px;
+ background-color: #eeffee;
+ color: #00AA00;
+ font-size: 10px;
}
-.admin_select, .guest_select, .member_select {
- border : solid 1px #009900;
- background-color : #EEFFEE;
+.admin_select,.guest_select,.member_select {
+ border: solid 1px #009900;
+ background-color: #EEFFEE;
}
-.admin_register, .admin_desc_header, .admin_done, .admin_title, .member_title2, .guest_title2, .admin_message {
- background-color : #ddeedd;
- color : #009900;
- text-align : center;
+.admin_register,.admin_desc_header,.admin_done,.admin_title,.member_title2,.guest_title2,.admin_message
+ {
+ background-color: #ddeedd;
+ color: #009900;
+ text-align: center;
}
-.member_done, .guest_done {
- color : #009900;
+.member_done,.guest_done {
+ color: #009900;
}
.member_misc {
- background-color : #DDEEDD;
+ background-color: #DDEEDD;
}
-.admin_misc, .member_misc {
- color : #000000;
+.admin_misc,.member_misc {
+ color: #000000;
}
.admin_done2 {
- color : #AA0044;
+ color: #AA0044;
}
-.admin_green, .admin_no {
- color : #009900;
+.admin_green,.admin_no {
+ color: #009900;
}
.admin_welcome {
- background-color : #DDEEDD;
- color : #009900;
- vertical-align : middle;
- font-size : 18px;
- height : 50px;
+ background-color: #DDEEDD;
+ color: #009900;
+ vertical-align: middle;
+ font-size: 18px;
+ height: 50px;
}
.admin_header {
- background-color : #ddeedd;
+ background-color: #ddeedd;
}
.admin_menu {
- background-color : #DDEEDD;
- color : #000077;
- width : 220px;
+ background-color: #DDEEDD;
+ color: #000077;
+ width: 220px;
}
.admin_logout {
- background-color : #AAFFAA;
- color : #00AA00;
+ background-color: #AAFFAA;
+ color: #00AA00;
}
.admin_desc_cont {
- text-align : left;
- background-color : #eeffee;
+ text-align: left;
+ background-color: #eeffee;
}
-.admin_table, .member_table {
- background-color : #eeffee;
+.admin_table,.member_table {
+ background-color: #eeffee;
}
.admin_editmenu {
- min-width : 500px;
- max-width : 90%;
+ min-width: 500px;
+ max-width: 90%;
}
.admin_form_header {
- text-align : center;
- height : 36px;
- background-color : #ddeedd;
- color : #009900;
+ text-align: center;
+ height: 36px;
+ background-color: #ddeedd;
+ color: #009900;
}
.member_header {
- text-align : center;
- height : 28px;
- background-color : #ddeedd;
+ text-align: center;
+ height: 28px;
+ background-color: #ddeedd;
}
-.admin_failed, .guest_failed, .member_failed, .member_note {
- color : #00AA00;
+.admin_failed,.guest_failed,.member_failed,.member_note {
+ color: #00AA00;
}
.member_note_bg {
- background-color : #eeffee;
+ background-color: #eeffee;
}
.member_data {
- background-color : #eeffee;
- color : #009900;
- height : 20px;
+ background-color: #eeffee;
+ color: #009900;
+ height: 20px;
}
.admin_header_b1 {
- border-bottom : 1px solid #AA0044;
- background-color : #ddeedd;
- height : 22px;
+ border-bottom: 1px solid #AA0044;
+ background-color: #ddeedd;
+ height: 22px;
}
.admin_snote {
- font-size : 12px;
+ font-size: 12px;
}
-.admin_normal, .guest_normal, .member_normal {
- border-style : solid;
- border : solid 1px #009900;
+.admin_normal,.guest_normal,.member_normal {
+ border-style: solid;
+ border: solid 1px #009900;
}
.member_stats {
- vertical-align : top;
- font-weight : bold;
- height : 23px;
- font-size : 16px;
- border-style : none;
- border : 0px;
- background : #DDEEDD;
- color : #000000;
- margin-top : -4px;
- margin-bottom : 1px;
- cursor : default;
+ vertical-align: top;
+ font-weight: bold;
+ height: 23px;
+ font-size: 16px;
+ border-style: none;
+ border: 0px;
+ background: #DDEEDD;
+ color: #000000;
+ margin-top: -4px;
+ margin-bottom: 1px;
+ cursor: default;
}
.normal {
- border-style : groove;
+ border-style: groove;
}
.member_main {
- background-color : #DDEEDD;
+ background-color: #DDEEDD;
}
-.guest_title, .member_title {
- text-align : center;
- color : #009900;
- vertical-align : middle;
- background-color : #DDEEDD;
- height : 60px;
+.guest_title,.member_title {
+ text-align: center;
+ color: #009900;
+ vertical-align: middle;
+ background-color: #DDEEDD;
+ height: 60px;
}
.guest_login_header {
- color : #009900;
- vertical-align : middle;
- background-color : #DDEEDD;
+ color: #009900;
+ vertical-align: middle;
+ background-color: #DDEEDD;
}
-.guest_menu, .member_menu {
- width : 220px;
- background-color : #DDEEDD;
- vertical-align : top;
+.guest_menu,.member_menu {
+ width: 220px;
+ background-color: #DDEEDD;
+ vertical-align: top;
}
-.guest_menu_title, .member_menu_title {
- background-color : #BDEFCD;
- color : #009900;
- height : 25px;
- width : 200px;
- border : 1px solid #AA0044;
+.guest_menu_title,.member_menu_title {
+ background-color: #BDEFCD;
+ color: #009900;
+ height: 25px;
+ width: 200px;
+ border: 1px solid #AA0044;
}
-.guest_menu_row, .guest_menu_bottom, .member_menu_row, .member_menu_bottom {
- border : 1px solid #AA0044;
- border-top : 0px;
- background-color : #eeffbc;
- height : 22px;
- text-align : left;
+.guest_menu_row,.guest_menu_bottom,.member_menu_row,.member_menu_bottom
+ {
+ border: 1px solid #AA0044;
+ border-top: 0px;
+ background-color: #eeffbc;
+ height: 22px;
+ text-align: left;
}
.member_menu_whats {
- border : 1px solid #AA0044;
- border-top : 0px;
- background-color : #eeffee;
- height : 20px;
+ border: 1px solid #AA0044;
+ border-top: 0px;
+ background-color: #eeffee;
+ height: 20px;
}
-.guest_menu_seperator, .member_menu_seperator {
- height : 15px;
+.guest_menu_seperator,.member_menu_seperator {
+ height: 15px;
}
-.guest_content, .member_content {
- background-color : #eeffee;
- width : 99%;
- padding-left : 2px;
- padding-right : 2px;
- margin-left : 5px;
- margin-right : 5px;
+.guest_content,.member_content {
+ background-color: #eeffee;
+ width: 99%;
+ padding-left: 2px;
+ padding-right: 2px;
+ margin-left: 5px;
+ margin-right: 5px;
}
-.guest_advert, .guest_login, .member_advert, .member_login {
- background-color : #DDEEDD;
- vertical-align : top;
- margin-top : 10px;
+.guest_advert,.guest_login,.member_advert,.member_login {
+ background-color: #DDEEDD;
+ vertical-align: top;
+ margin-top: 10px;
}
#master {
- width : 100%;
- height : 100%;
- min-height : 90%;
- max-height : 100%;
- text-align : center;
+ width: 100%;
+ height: 100%;
+ min-height: 90%;
+ max-height: 100%;
+ text-align: center;
}
.masterbox {
- text-align : center;
+ text-align: center;
}
.footer {
- text-align : center;
+ text-align: center;
}
.footer_lines {
- font-size : 10px;
- width : 380px;
- height : 30px;
- vertical-align : middle;
- background-color : #E5EFE5;
- padding-top : 5px;
- padding-bottom : 5px;
+ font-size: 10px;
+ width: 380px;
+ height: 30px;
+ vertical-align: middle;
+ background-color: #E5EFE5;
+ padding-top: 5px;
+ padding-bottom: 5px;
}
.footer_box {
- text-align : center;
- width : 760px;
+ text-align: center;
+ width: 760px;
}
.dashed {
- border : solid 1px #AA0044;
+ border: solid 1px #AA0044;
}
-.switch_sw1, .switch_mem1 {
- background-color : #b8efc1;
+.switch_sw1,.switch_mem1 {
+ background-color: #b8efc1;
}
-.switch_sw2, .switch_mem2 {
- background-color : #b8fccb;
+.switch_sw2,.switch_mem2 {
+ background-color: #b8fccb;
}
.impressum {
- font-size : 12px;
- width : 320px;
- vertical-align : middle;
- background-color : #E5EFE5;
- height : 70px;
+ font-size: 12px;
+ width: 320px;
+ vertical-align: middle;
+ background-color: #E5EFE5;
+ height: 70px;
}
.mediadata {
- background-color : #eeffee;
+ background-color: #eeffee;
}
-.media_header, .impressum_header {
- background-color : #b8fccb;
- text-align : center;
- color : #009900;
- height : 26px;
- font-weight : bold;
- font-size : 20px;
+.media_header,.impressum_header {
+ background-color: #b8fccb;
+ text-align: center;
+ color: #009900;
+ height: 26px;
+ font-weight: bold;
+ font-size: 20px;
}
.media_left {
- font-size : 14px;
- width : 200px;
+ font-size: 14px;
+ width: 200px;
}
.media_right {
- color : #009900;
- font-weight : bold;
- font-size : 14px;
- width : 70px;
+ color: #009900;
+ font-weight: bold;
+ font-size: 14px;
+ width: 70px;
}
.admin_sep_footer {
- background-color : #DDEEDD;
- font-size : 1px;
+ background-color: #DDEEDD;
+ font-size: 1px;
}
.admin_sep_footer2 {
- background-color : #eeffee;
- font-size : 1px;
+ background-color: #eeffee;
+ font-size: 1px;
}
-.admin_footer, .member_refbanner, .member_update, .admin_del_link {
- background-color : #DDEEDD;
+.admin_footer,.member_refbanner,.member_update,.admin_del_link {
+ background-color: #DDEEDD;
}
.member_footer {
- height : 30px;
- background-color : #DDEEDD;
+ height: 30px;
+ background-color: #DDEEDD;
}
.admin_footer {
- text-align : center;
- height : 30px
+ text-align: center;
+ height: 30px
}
.admin_task_header {
- background-color : #ddeedd;
- color : #009900;
- vertical-align : middle;
- font-size : 18px;
- height : 35px;
+ background-color: #ddeedd;
+ color: #009900;
+ vertical-align: middle;
+ font-size: 18px;
+ height: 35px;
}
.seperator {
- font-size : 1px
+ font-size: 1px
}
.tab1 {
- text-align : center
+ text-align: center
}
-.admin_delete, .admin_yes {
- border-style : groove;
- border : solid 1px #00AA00;
- background-color : #AA0044;
- color : #DDEEDD;
- cursor : pointer;
+.admin_delete,.admin_yes {
+ border-style: groove;
+ border: solid 1px #00AA00;
+ background-color: #AA0044;
+ color: #DDEEDD;
+ cursor: pointer;
}
.guest_stats {
- background-color : #eeffee;
- width : 460px;
+ background-color: #eeffee;
+ width: 460px;
}
.guest_stats_title {
- color : #009900;
- vertical-align : middle;
- background-color : #DDEEDD;
- height : 30px;
+ color: #009900;
+ vertical-align: middle;
+ background-color: #DDEEDD;
+ height: 30px;
}
.guest_stats_l {
- width : 344px;
- text-align : right;
+ width: 344px;
+ text-align: right;
}
.guest_stats_m {
- width : 2px;
+ width: 2px;
}
-.guest_stats_r, .guest_stats_lr, .guest_stats_rr {
- color : #009900;
- width : 28px;
- font-weight : bold;
- text-align : center;
+.guest_stats_r,.guest_stats_lr,.guest_stats_rr {
+ color: #009900;
+ width: 28px;
+ font-weight: bold;
+ text-align: center;
}
-.guest_stats_ll, .guest_stats_rl {
- width : 192px;
- text-align : right;
+.guest_stats_ll,.guest_stats_rl {
+ width: 192px;
+ text-align: right;
}
.guest_stats_footer {
- color : #009900;
- vertical-align : middle;
- background-color : #DDEEDD;
- height : 20px;
+ color: #009900;
+ vertical-align: middle;
+ background-color: #DDEEDD;
+ height: 20px;
}
.task_pre {
- font-weight : bold;
- margin-left : 0px;
- margin-right : 0px;
- margin-top : 10px;
- margin-bottom : 10px;
+ font-weight: bold;
+ margin-left: 0px;
+ margin-right: 0px;
+ margin-top: 10px;
+ margin-bottom: 10px;
}
.impressum_body {
- background-color : #DDEEDD;
+ background-color: #DDEEDD;
}
-.guest_content_align, .member_content_align, .admin_content_align {
- text-align : center;
- align : center;
- vertical-align : top;
+.guest_content_align,.member_content_align,.admin_content_align {
+ text-align: center;
+ align: center;
+ vertical-align: top;
}
.member_mailidtop {
- background-color : #DDEEDD;
- width : 100%;
- height : 100%;
+ background-color: #DDEEDD;
+ width: 100%;
+ height: 100%;
}
-.list_categories, .admin_action_header, .admin_main, .admin_menu_main, .admin_menu_sub {
- text-align : left;
- width : 100%;
+.list_categories,.admin_action_header,.admin_main,.admin_menu_main,.admin_menu_sub
+ {
+ text-align: left;
+ width: 100%;
}
.admin_alpha {
- text-align : center;
- height : 40px;
- vertical-align : middle;
+ text-align: center;
+ height: 40px;
+ vertical-align: middle;
}
.admin_sortlinks {
- text-align : center;
- height : 20px;
- vertical-align : middle;
+ text-align: center;
+ height: 20px;
+ vertical-align: middle;
}
.admin_title2 {
- font-weight : bold;
- padding : 4px;
- background-color : #ddeedd;
- color : #000099;
- text-align : center;
- font-size : 14px;
+ font-weight: bold;
+ padding: 4px;
+ background-color: #ddeedd;
+ color: #000099;
+ text-align: center;
+ font-size: 14px;
}
.member_unconfirmed {
- background-color : #DDEEDD;
- width : 100%;
- text-align : center;
+ background-color: #DDEEDD;
+ width: 100%;
+ text-align: center;
}
.you_are_here {
- white-space : nowrap;
- font-size : 14px;
- text-align : left;
+ white-space: nowrap;
+ font-size: 14px;
+ text-align: left;
}
-.tiny { font-size : 12px; }
-.medium { font-size : 14px; }
-.big { font-size : 20px; }
+.tiny {
+ font-size: 12px;
+}
+
+.medium {
+ font-size: 14px;
+}
+
+.big {
+ font-size: 20px;
+}
+
+.top {
+ border-top: 1px solid #4400AA;
+}
+
+.bottom {
+ border-bottom: 1px solid #4400AA;
+}
+
+.left {
+ border-left: 1px solid #4400AA;
+}
+
+.right {
+ border-right: 1px solid #4400AA;
+}
+
+.top2 {
+ border-top: 1px solid #AA0044;
+}
-.top { border-top : 1px solid #4400AA; }
-.bottom { border-bottom : 1px solid #4400AA; }
-.left { border-left : 1px solid #4400AA; }
-.right { border-right : 1px solid #4400AA; }
+.bottom2 {
+ border-bottom: 1px solid #AA0044;
+}
-.top2 { border-top : 1px solid #AA0044; }
-.bottom2 { border-bottom : 1px solid #AA0044; }
-.left2 { border-left : 1px solid #AA0044; }
-.right2 { border-right : 1px solid #AA0044; }
+.left2 {
+ border-left: 1px solid #AA0044;
+}
+
+.right2 {
+ border-right: 1px solid #AA0044;
+}
.nobr {
- white-space : nowrap;
+ white-space: nowrap;
}
.guest_table {
- background-color : #eeffee;
+ background-color: #eeffee;
}
.main {
- height : 99%
+ height: 99%
}
.footer {
- height : 1%;
- vertical-align : bottom;
+ height: 1%;
+ vertical-align: bottom;
}
.menu_blur {
- display : block;
+ display: block;
}
.menu_blur:hover {
- background-color : #deefac;
+ background-color: #deefac;
}
.guest_footer {
- height : 30px;
- background-color : #E5E5F5;
+ height: 30px;
+ background-color: #E5E5F5;
}
.disabled {
- border-style : groove;
- background-color : #AAAAAA;
- color : #FF9900;
+ border-style: groove;
+ background-color: #AAAAAA;
+ color: #FF9900;
}
.mini_select {
- border : dotted 1px #009900;
- background-color : #EEFFEE;
- font-size : 10px;
+ border: dotted 1px #009900;
+ background-color: #EEFFEE;
+ font-size: 10px;
}
.theme_box {
- border : 1px dotted #AA0044;
- border-top : 0px;
- width : 100%;
- height : 70px;
- background-color : #eeffbc;
+ border: 1px dotted #AA0044;
+ border-top: 0px;
+ width: 100%;
+ height: 70px;
+ background-color: #eeffbc;
}
.theme_note {
- font-size : 12px;
- font-weight : bold;
+ font-size: 12px;
+ font-weight: bold;
}
.theme_content {
- color : #009900;
+ color: #009900;
}
.agb_box {
- text-align : left;
+ text-align: left;
}
-.agb_title, .fatal_title {
- font-size : 16px;
- text-align : center;
- height : 40px;
- font-weight : bold;
+.agb_title,.fatal_title {
+ font-size: 16px;
+ text-align: center;
+ height: 40px;
+ font-weight: bold;
}
.agb_para {
- text-indent : 8px;
- text-align : left;
- margin-left : 5px;
- margin-right : 5px;
- margin-bottom : 12px;
+ text-indent: 8px;
+ text-align: left;
+ margin-left: 5px;
+ margin-right: 5px;
+ margin-bottom: 12px;
}
.fatal_box {
- text-align : center;
- width : 100%;
- margin-top : 10px;
+ text-align: center;
+ width: 100%;
+ margin-top: 10px;
}
.admin_message {
- padding-top : 5px;
- padding-bottom : 5px;
+ padding-top: 5px;
+ padding-bottom: 5px;
}
#show_timings_block {
- float : left;
- border : solid 1px #AA0044;
- background-color : #ddeedd;
- font-size : 10px;
- vertical-align : middle;
- width : 465px;
- height : 20px;
+ float: left;
+ border: solid 1px #AA0044;
+ background-color: #ddeedd;
+ font-size: 10px;
+ vertical-align: middle;
+ width: 465px;
+ height: 20px;
}
.show_timings_column {
- background-color : #EEFFEE;
- margin-top : 2px;
- width : 150px;
- border : solid 1px #009900;
- height : 14px;
+ background-color: #EEFFEE;
+ margin-top: 2px;
+ width: 150px;
+ border: solid 1px #009900;
+ height: 14px;
}
.show_timings_data {
- font-weight : bold;
+ font-weight: bold;
}
.login_failure_header {
- text-align : center;
- background-color : #ddeedd;
- font-weight : bold;
+ text-align: center;
+ background-color: #ddeedd;
+ font-weight: bold;
}
.login_failures {
- text-align : center;
- width : 400px;
+ text-align: center;
+ width: 400px;
}
-.member_skyscraper, .guest_skyscraper {
- width : 122px;
- height : 602px;
- border : 1px solid #AA0044;
- margin : 0px;
- padding : 0px;
- padding-top : 1px;
+.member_skyscraper,.guest_skyscraper {
+ width: 122px;
+ height: 602px;
+ border: 1px solid #AA0044;
+ margin: 0px;
+ padding: 0px;
+ padding-top: 1px;
}
-ul.admin_menu_main, ul.admin_menu_sub {
- list-style : none inside;
- padding-left : 10px;
-}
+ul.admin_menu_main,ul.admin_menu_sub {
+ list-style: none inside;
+ padding-left: 10px;
+}
\ No newline at end of file
.install_fatal {
- text-align : left;
- color : #00AA00;
+ text-align: left;
+ color: #00AA00;
}
.install_select {
- border : dashed 1px #00AA00;
- background-color : #F0F0F5;
+ border: dashed 1px #00AA00;
+ background-color: #F0F0F5;
}
+
.install_normal {
- border-style : solid;
- border : dashed 1px #00AA00;
+ border-style: solid;
+ border: dashed 1px #00AA00;
}
.install_submit {
- border-style : groove;
+ border-style: groove;
}
.install {
+
}
.install_main {
- color : #111188;
- background-color : #DDEEDD;
- text-decoration : none;
+ color: #111188;
+ background-color: #DDEEDD;
+ text-decoration: none;
}
.install_header {
- color : #F76300;
- background-color : #CCDDCC;
- font-size : 20px;
- text-decoration : underline;
- height : 30px;
- padding-top : 5px;
- padding-bottom : 5px;
+ color: #F76300;
+ background-color: #CCDDCC;
+ font-size: 20px;
+ text-decoration: underline;
+ height: 30px;
+ padding-top: 5px;
+ padding-bottom: 5px;
}
.install_fatal {
- background-color : #DDEEDD;
- color : #AA0000;
+ background-color: #DDEEDD;
+ color: #AA0000;
}
.install_fatalcontent {
- text-align : left;
- background-color : #DDEEDD;
+ text-align: left;
+ background-color: #DDEEDD;
}
.install_error {
- font-size : 20px;
- color : #AA0000;
+ font-size: 20px;
+ color: #AA0000;
}
.install_finished {
- font-size : 20px;
- color : #00AA00;
+ font-size: 20px;
+ color: #00AA00;
}
.install_security {
- color : #AA0000;
- width : 350px;
- padding-top : 10px;
- padding-bottom : 10px;
+ color: #AA0000;
+ width: 350px;
+ padding-top: 10px;
+ padding-bottom: 10px;
}
.install_welcome {
- color : #0000CC;
- padding-top : 5px;
- padding-bottom : 10px;
- font-size : 16px;
+ color: #0000CC;
+ padding-top: 5px;
+ padding-bottom: 10px;
+ font-size: 16px;
}
.install_text {
- color : #000000;
- padding-bottom : 10px;
- text-align : left;
- margin-left : 20px;
- margin-right : 20px;
+ color: #000000;
+ padding-bottom: 10px;
+ text-align: left;
+ margin-left: 20px;
+ margin-right: 20px;
}
.install_footer {
- padding-bottom : 10px;
-}
+ padding-bottom: 10px;
+}
\ No newline at end of file
.register_submit {
- border-style : outset;
+ border-style: outset;
}
.register_reset {
- border-style : groove;
- border : solid 1px #009900;
- color : #AA0044;
+ border-style: groove;
+ border: solid 1px #009900;
+ color: #AA0044;
}
+
.register_submit {
- color : #AA0044;
- border-color : #009900;
+ color: #AA0044;
+ border-color: #009900;
}
.register_select {
- border : dotted 1px #009900;
- background-color : #EEFFEE;
+ border: dotted 1px #009900;
+ background-color: #EEFFEE;
}
.register_failed {
- color : #00AA00;
+ color: #00AA00;
}
.register_snote {
- font-size : 12px;
+ font-size: 12px;
}
.register_normal {
- border-style : solid;
- border : dotted 1px #009900;
+ border-style: solid;
+ border: dotted 1px #009900;
}
.register_main {
- background-color : #DDEEDD;
- width : 540px;
+ background-color: #DDEEDD;
+ width: 540px;
}
.register_done2 {
- height : 40px;
- color : #009900;
- background-color : #eeffbc;
- width : 500px;
+ height: 40px;
+ color: #009900;
+ background-color: #eeffbc;
+ width: 500px;
}
.register_title {
- text-align : center;
- font-size : 18px;
+ text-align: center;
+ font-size: 18px;
}
.register_seperator {
- height : 7px;
- font-size : 1px;
+ height: 7px;
+ font-size: 1px;
}
.register_left {
- text-align : right;
- margin-right : 2px;
- color : #0000AA;
- font-weight : bold;
- font-size : 14px;
+ text-align: right;
+ margin-right: 2px;
+ color: #0000AA;
+ font-weight: bold;
+ font-size: 14px;
}
.register_right {
+
}
.register_header {
- text-align : center;
- background-color : #eeffbc;
- color : #0000AA;
- font-weight : bold;
- border-top : 1px dotted #AA0044;
- border-bottom : 1px dotted #AA0044;
- height : 25px;
+ text-align: center;
+ background-color: #eeffbc;
+ color: #0000AA;
+ font-weight: bold;
+ border-top: 1px dotted #AA0044;
+ border-bottom: 1px dotted #AA0044;
+ height: 25px;
}
.register_term {
- background-color : #AA0044;
-}
+ background-color: #AA0044;
+}
\ No newline at end of file
.sponsor_table {
- background-color : #DDEEDD;
+ background-color: #DDEEDD;
}
-.sponsor_header, .sponsor_footer {
- background-color : #CCDDCC;
+.sponsor_header,.sponsor_footer {
+ background-color: #CCDDCC;
}
.sponsor_action {
- background-color : #CCDDCC;
- height : 25px;
+ background-color: #CCDDCC;
+ height: 25px;
}
.sponsor_what {
- height : 24px;
-}
+ height: 24px;
+}
\ No newline at end of file
.surfbar_banner {
+
}
+
.surfbar_table {
+
}
+
.surfbar_td {
+
}
+
.surfbar_points {
+
}
+
#surfbar_restart {
+
}
+
#surfbar_counter {
+
}
+
#counter_word {
+
}
+
.surfbar_reload {
+
}
+
.surfbar_max {
+
}
+
.surfbar_points {
- font-weight : bold;
-}
+ font-weight: bold;
+}
\ No newline at end of file
-.top10_row1, .top10_row2, .top10_row3, .top10_row4, .top10_row5 {
- text-align : center;
- padding-left : 5px;
- padding-right : 5px;
+.top10_row1,.top10_row2,.top10_row3,.top10_row4,.top10_row5 {
+ text-align: center;
+ padding-left: 5px;
+ padding-right: 5px;
}
-.top10_row2, .top10_row4 {
- text-align : left;
-}
+.top10_row2,.top10_row4 {
+ text-align: left;
+}
\ No newline at end of file
-.transfer_row1, .transfer_row3 {
- text-align : center;
- font-weight : bold;
+.transfer_row1,.transfer_row3 {
+ text-align: center;
+ font-weight: bold;
}
.transfer_row2 {
- text-align : center;
+ text-align: center;
}
-.transfer_row4, .transfer_row5 {
+.transfer_row4,.transfer_row5 {
padding-left: 2px;
-}
+}
\ No newline at end of file
switch ($GLOBALS['theme_mode'])
{
-case 'test': // Do stuff while testing the theme: The admin clicked on 'Import'
- break;
+ case 'test': // Do stuff while testing the theme: The admin clicked on 'Import'
+ break;
-case 'load': // Do stuff while theme is loaded normally
- break;
+ case 'load': // Do stuff while theme is loaded normally
+ break;
}
//
?>
-.active_row1, .active_row2, .active_row3 {
- text-align : center;
- padding-left : 5px;
- padding-right : 5px;
+.active_row1,.active_row2,.active_row3 {
+ text-align: center;
+ padding-left: 5px;
+ padding-right: 5px;
}
.active_row2 {
- text-align : left;
-}
+ text-align: left;
+}
\ No newline at end of file
background-color: #DDDDAA;
padding-left: 10px;
padding-right: 10px;
-}
+}
\ No newline at end of file
.bonus_rank_1 {
- font-weight : bold;
- font-size : 22px;
+ font-weight: bold;
+ font-size: 22px;
}
.bonus_rank_2 {
- font-weight : bold;
- font-size : 18px;
+ font-weight: bold;
+ font-size: 18px;
}
.bonus_rank_3 {
- font-weight : bold;
-}
+ font-weight: bold;
+}
\ No newline at end of file
.doubler_table {
+
}
.doubler_main {
+
}
.doubler_error {
- font-weight : bold;
- color : #AA0000;
+ font-weight: bold;
+ color: #AA0000;
}
.doubler_big_row {
- height : 70px;
+ height: 70px;
}
.doubler_header {
- text-align : center;
- height : 24px;
- background-color : #DDDDAA;
+ text-align: center;
+ height: 24px;
+ background-color: #DDDDAA;
}
.doubler_footer {
- height : 24px;
- background-color : #DDDDAA;
-}
+ height: 24px;
+ background-color: #DDDDAA;
+}
\ No newline at end of file
body {
- background-color : #FFFFCC;
- color : #880000;
- font-family : Verdana, Arial, Geneva, Helvetica, sans-serif;
- font-size : 12px;
- letter-spacing : 1px;
-
- margin : 0px;
- margin-left : 0px;
- margin-right : 0px;
- margin-top : 0px;
- margin-bottom : 0px;
+ background-color: #FFFFCC;
+ color: #880000;
+ font-family: Verdana, Arial, Geneva, Helvetica, sans-serif;
+ font-size: 12px;
+ letter-spacing: 1px;
+ margin: 0px;
+ margin-left: 0px;
+ margin-right: 0px;
+ margin-top: 0px;
+ margin-bottom: 0px;
}
table {
- table-layout : auto;
- border-spacing : 0px;
- overflow : auto;
+ table-layout: auto;
+ border-spacing: 0px;
+ overflow: auto;
}
A {
- font-style : normal;
- text-decoration : none;
+ font-style: normal;
+ text-decoration: none;
}
A:link {
- color : #880000;
+ color: #880000;
}
A:visited {
- color : #880000;
+ color: #880000;
}
A:active {
- color : #880000;
- background-color : transparent;
+ color: #880000;
+ background-color: transparent;
}
A:hover {
- background-color : transparent;
+ background-color: transparent;
}
-input, textarea, select, option {
- color : #880000;
- background-color : #FFFFCC;
- border : 1px solid #880000;
- text-decoration : none;
+input,textarea,select,option {
+ color: #880000;
+ background-color: #FFFFCC;
+ border: 1px solid #880000;
+ text-decoration: none;
}
-ul, ol {
- margin-top : 0px;
- margin-bottom : 0px;
+ul,ol {
+ margin-top: 0px;
+ margin-bottom: 0px;
}
-.admin_reset, .guest_reset, .member_reset {
- border-style : groove;
- border : solid 1px #880000;
- color : #880000;
- cursor : pointer;
+.admin_reset,.guest_reset,.member_reset {
+ border-style: groove;
+ border: solid 1px #880000;
+ color: #880000;
+ cursor: pointer;
}
-.admin_submit, .guest_submit, .member_submit {
- color : #880000;
- border-color : #880000;
- cursor : pointer;
+.admin_submit,.guest_submit,.member_submit {
+ color: #880000;
+ border-color: #880000;
+ cursor: pointer;
}
.admin_submit_reject {
- border-style : groove;
- color : #880000;
- border-color : #880000;
- cursor : pointer;
+ border-style: groove;
+ color: #880000;
+ border-color: #880000;
+ cursor: pointer;
}
-.runtime_fatal, .runtime_fatalcontent {
- color : #880000;
- background-color : #FFFFCC;
+.runtime_fatal,.runtime_fatalcontent {
+ color: #880000;
+ background-color: #FFFFCC;
}
.runtime_fatal {
- color : #880000;
+ color: #880000;
}
.runtime_fatalcontent {
- text-align : left;
- font-size : 12px;
+ text-align: left;
+ font-size: 12px;
}
.admin {
- color : #880000;
- background-color : #FFFFCC;
+ color: #880000;
+ background-color: #FFFFCC;
}
.admin_note {
- color : #880000;
- font-size : 12px;
+ color: #880000;
+ font-size: 12px;
}
DIV.admin_note {
- padding-top : 10px;
- padding-right : 10px;
- padding-left : 10px;
+ padding-top: 10px;
+ padding-right: 10px;
+ padding-left: 10px;
}
.admin_fatal {
- color : #880000;
- font-size : 18px;
+ color: #880000;
+ font-size: 18px;
}
-.admin_edit, .member_confirm {
- background-color : #FFFFCC;
+.admin_edit,.member_confirm {
+ background-color: #FFFFCC;
}
.member_banner {
- background-color : #FFFFCC;
- width : 488px;
+ background-color: #FFFFCC;
+ width: 488px;
}
.admin_error {
- background-color : #FFFFCC;
- color : #880000;
- font-size : 10px;
+ background-color: #FFFFCC;
+ color: #880000;
+ font-size: 10px;
}
-.admin_select, .guest_select, .member_select {
- border : solid 1px #880000;
- background-color : #DDDDAA;
+.admin_select,.guest_select,.member_select {
+ border: solid 1px #880000;
+ background-color: #DDDDAA;
}
-.admin_register, .admin_desc_header, .admin_done, .admin_title, .member_title2, .guest_title2, .admin_message {
- background-color : #DDDDAA;
- color : #880000;
- text-align : center;
+.admin_register,.admin_desc_header,.admin_done,.admin_title,.member_title2,.guest_title2,.admin_message
+ {
+ background-color: #DDDDAA;
+ color: #880000;
+ text-align: center;
}
-.member_done, .guest_done {
- color : #880000;
+.member_done,.guest_done {
+ color: #880000;
}
.member_misc {
- background-color : #FFFFCC;
+ background-color: #FFFFCC;
}
-.admin_misc, .member_misc {
- color : #880000;
+.admin_misc,.member_misc {
+ color: #880000;
}
.admin_done2 {
- color : #880000;
+ color: #880000;
}
-.admin_green, .admin_no {
- color : #880000;
+.admin_green,.admin_no {
+ color: #880000;
}
.admin_welcome {
- background-color : #DDDDAA;
- color : #880000;
- vertical-align : middle;
- font-size : 18px;
- height : 50px;
+ background-color: #DDDDAA;
+ color: #880000;
+ vertical-align: middle;
+ font-size: 18px;
+ height: 50px;
}
.admin_header {
- background-color : #DDDDAA;
+ background-color: #DDDDAA;
}
.admin_menu {
- background-color : #DDDDAA;
- color : #880000;
- width : 230px;
+ background-color: #DDDDAA;
+ color: #880000;
+ width: 230px;
}
.admin_logout {
- background-color : #CCCCAA;
- color : #880000;
+ background-color: #CCCCAA;
+ color: #880000;
}
.admin_desc_cont {
- text-align : left;
- background-color : #FFFFCC;
+ text-align: left;
+ background-color: #FFFFCC;
}
-.admin_table, .member_table {
- background-color : #FFFFCC;
+.admin_table,.member_table {
+ background-color: #FFFFCC;
}
.admin_editmenu {
- min-width : 500px;
- max-width : 90%;
+ min-width: 500px;
+ max-width: 90%;
}
.admin_form_header {
- text-align : center;
- height : 36px;
- background-color : #DDDDAA;
- color : #880000;
+ text-align: center;
+ height: 36px;
+ background-color: #DDDDAA;
+ color: #880000;
}
.member_header {
- text-align : center;
- height : 28px;
- background-color : #DDDDAA;
+ text-align: center;
+ height: 28px;
+ background-color: #DDDDAA;
}
-.admin_failed, .guest_failed, .member_failed, .member_note {
- color : #880000;
+.admin_failed,.guest_failed,.member_failed,.member_note {
+ color: #880000;
}
.member_note_bg {
- background-color : #FFFFCC;
+ background-color: #FFFFCC;
}
.member_data {
- background-color : #FFFFCC;
- color : #880000;
- height : 20px;
+ background-color: #FFFFCC;
+ color: #880000;
+ height: 20px;
}
.admin_header_b1 {
- border-bottom : 1px solid #880000;
- background-color : #DDDDAA;
- height : 22px;
+ border-bottom: 1px solid #880000;
+ background-color: #DDDDAA;
+ height: 22px;
}
.admin_snote {
- font-size : 12px;
+ font-size: 12px;
}
-.admin_normal, .guest_normal, .member_normal {
- border-style : solid;
- border : solid 1px #880000;
- background-color : #DDDDAA;
+.admin_normal,.guest_normal,.member_normal {
+ border-style: solid;
+ border: solid 1px #880000;
+ background-color: #DDDDAA;
}
.member_stats {
- vertical-align : top;
- font-weight : bold;
- height : 23px;
- font-size : 16px;
- border-style : none;
- border : 0px;
- background : #FFFFCC;
- color : #880000;
- margin-top : -4px;
- margin-bottom : 1px;
- cursor : default;
+ vertical-align: top;
+ font-weight: bold;
+ height: 23px;
+ font-size: 16px;
+ border-style: none;
+ border: 0px;
+ background: #FFFFCC;
+ color: #880000;
+ margin-top: -4px;
+ margin-bottom: 1px;
+ cursor: default;
}
.normal {
- border-style : groove;
+ border-style: groove;
}
.member_main {
- background-color : #FFFFCC;
+ background-color: #FFFFCC;
}
-.guest_title, .member_title {
- text-align : center;
- color : #880000;
- vertical-align : middle;
- background-color : #DDDDAA;
- height : 60px;
+.guest_title,.member_title {
+ text-align: center;
+ color: #880000;
+ vertical-align: middle;
+ background-color: #DDDDAA;
+ height: 60px;
}
.guest_login_header {
- color : #880000;
- vertical-align : middle;
- background-color : #DDDDAA;
+ color: #880000;
+ vertical-align: middle;
+ background-color: #DDDDAA;
}
-.guest_menu, .member_menu {
- width : 220px;
- background-color : #FFFFCC;
- vertical-align : top;
+.guest_menu,.member_menu {
+ width: 220px;
+ background-color: #FFFFCC;
+ vertical-align: top;
}
-.guest_menu_title, .member_menu_title {
- background-color : #DDDDAA;
- color : #880000;
- height : 25px;
- width : 200px;
- border : 1px solid #880000;
+.guest_menu_title,.member_menu_title {
+ background-color: #DDDDAA;
+ color: #880000;
+ height: 25px;
+ width: 200px;
+ border: 1px solid #880000;
}
-.guest_menu_row, .guest_menu_bottom, .member_menu_row, .member_menu_bottom {
- border : 1px solid #880000;
- border-top : 0px;
- background-color : #FFFFCC;
- height : 22px;
- text-align : left;
+.guest_menu_row,.guest_menu_bottom,.member_menu_row,.member_menu_bottom
+ {
+ border: 1px solid #880000;
+ border-top: 0px;
+ background-color: #FFFFCC;
+ height: 22px;
+ text-align: left;
}
-.guest_menu_seperator, .member_menu_seperator {
- height : 15px;
+.guest_menu_seperator,.member_menu_seperator {
+ height: 15px;
}
-.guest_content, .member_content {
- background-color : #FFFFCC;
- width : 99%;
- padding-left : 2px;
- padding-right : 2px;
- margin-left : 5px;
- margin-right : 5px;
+.guest_content,.member_content {
+ background-color: #FFFFCC;
+ width: 99%;
+ padding-left: 2px;
+ padding-right: 2px;
+ margin-left: 5px;
+ margin-right: 5px;
}
-.guest_advert, .guest_login, .member_advert, .member_login {
- background-color : #FFFFCC;
- vertical-align : top;
- margin-top : 10px;
+.guest_advert,.guest_login,.member_advert,.member_login {
+ background-color: #FFFFCC;
+ vertical-align: top;
+ margin-top: 10px;
}
#master {
- width : 100%;
- height : 100%;
- min-height : 90%;
- max-height : 100%;
- vertical-align : top;
+ width: 100%;
+ height: 100%;
+ min-height: 90%;
+ max-height: 100%;
+ vertical-align: top;
}
.masterbox {
- text-align : center;
+ text-align: center;
}
.footer_lines {
- vertical-align : bottom;
- font-size : 10px;
- width : 380px;
- vertical-align : middle;
- background-color : #FFFFCC;
- height : 40px;
+ vertical-align: bottom;
+ font-size: 10px;
+ width: 380px;
+ vertical-align: middle;
+ background-color: #FFFFCC;
+ height: 40px;
}
.footer_box {
- text-align : center;
- width : 760px;
+ text-align: center;
+ width: 760px;
}
.dashed {
- border : solid 1px #880000;
+ border: solid 1px #880000;
}
-.switch_sw1, .switch_mem1 {
- background-color : #FFFFCC;
+.switch_sw1,.switch_mem1 {
+ background-color: #FFFFCC;
}
-.switch_sw2, .switch_mem2 {
- background-color : #FFFFCC;
+.switch_sw2,.switch_mem2 {
+ background-color: #FFFFCC;
}
.impressum {
- font-size : 12px;
- width : 320px;
- vertical-align : middle;
- background-color : #FFFFCC;
- height : 70px;
+ font-size: 12px;
+ width: 320px;
+ vertical-align: middle;
+ background-color: #FFFFCC;
+ height: 70px;
}
.mediadata {
- background-color : #FFFFCC;
+ background-color: #FFFFCC;
}
-.media_header, .impressum_header {
- background-color : #DDDDAA;
- text-align : center;
- color : #880000;
- height : 26px;
- font-weight : bold;
- font-size : 20px;
+.media_header,.impressum_header {
+ background-color: #DDDDAA;
+ text-align: center;
+ color: #880000;
+ height: 26px;
+ font-weight: bold;
+ font-size: 20px;
}
.media_left {
- font-size : 14px;
- width : 200px;
+ font-size: 14px;
+ width: 200px;
}
.media_right {
- color : #880000;
- font-weight : bold;
- font-size : 14px;
- width : 70px;
+ color: #880000;
+ font-weight: bold;
+ font-size: 14px;
+ width: 70px;
}
.admin_sep_footer {
- background-color : #DDDDAA;
- font-size : 1px;
+ background-color: #DDDDAA;
+ font-size: 1px;
}
.admin_sep_footer2 {
- background-color : #DDDDAA;
- font-size : 1px;
+ background-color: #DDDDAA;
+ font-size: 1px;
}
-.admin_footer, .member_refbanner, .member_update, .admin_del_link {
- background-color : #DDDDAA;
+.admin_footer,.member_refbanner,.member_update,.admin_del_link {
+ background-color: #DDDDAA;
}
.member_footer {
- height : 30px;
- background-color : #DDDDAA;
+ height: 30px;
+ background-color: #DDDDAA;
}
.admin_footer {
- text-align : center;
- height : 30px
+ text-align: center;
+ height: 30px
}
.admin_task_header {
- background-color : #DDDDAA;
- color : #880000;
- vertical-align : middle;
- font-size : 18px;
- height : 35px;
+ background-color: #DDDDAA;
+ color: #880000;
+ vertical-align: middle;
+ font-size: 18px;
+ height: 35px;
}
.seperator {
- font-size : 1px
+ font-size: 1px
}
.tab1 {
- text-align : center
+ text-align: center
}
-.admin_delete, .admin_yes {
- border-style : groove;
- border : solid 1px #880000;
- background-color : #880000;
- color : #FFFFCC;
- cursor : pointer;
+.admin_delete,.admin_yes {
+ border-style: groove;
+ border: solid 1px #880000;
+ background-color: #880000;
+ color: #FFFFCC;
+ cursor: pointer;
}
.guest_stats {
- background-color : #FFFFCC;
- width : 460px;
+ background-color: #FFFFCC;
+ width: 460px;
}
.guest_stats_title {
- color : #880000;
- vertical-align : middle;
- background-color : #DDDDAA;
- height : 30px;
+ color: #880000;
+ vertical-align: middle;
+ background-color: #DDDDAA;
+ height: 30px;
}
.guest_stats_l {
- width : 344px;
- text-align : right;
+ width: 344px;
+ text-align: right;
}
.guest_stats_m {
- width : 2px;
+ width: 2px;
}
-.guest_stats_r, .guest_stats_lr, .guest_stats_rr {
- color : #880000;
- width : 28px;
- font-weight : bold;
- text-align : center;
+.guest_stats_r,.guest_stats_lr,.guest_stats_rr {
+ color: #880000;
+ width: 28px;
+ font-weight: bold;
+ text-align: center;
}
-.guest_stats_ll, .guest_stats_rl {
- width : 192px;
- text-align : right;
+.guest_stats_ll,.guest_stats_rl {
+ width: 192px;
+ text-align: right;
}
.guest_stats_footer {
- color : #880000;
- vertical-align : middle;
- background-color : #DDDDAA;
- height : 20px;
+ color: #880000;
+ vertical-align: middle;
+ background-color: #DDDDAA;
+ height: 20px;
}
.task_pre {
- font-weight : bold;
- margin-left : 0px;
- margin-right : 0px;
- margin-top : 10px;
- margin-bottom : 10px;
+ font-weight: bold;
+ margin-left: 0px;
+ margin-right: 0px;
+ margin-top: 10px;
+ margin-bottom: 10px;
}
.impressum_body {
- background-color : #FFFFCC;
+ background-color: #FFFFCC;
}
-.guest_content_align, .member_content_align, .admin_content_align {
- text-align : center;
- vertical-align : top;
+.guest_content_align,.member_content_align,.admin_content_align {
+ text-align: center;
+ vertical-align: top;
}
.member_mailidtop {
- background-color : #FFFFCC;
- width : 100%;
- height : 100%;
+ background-color: #FFFFCC;
+ width: 100%;
+ height: 100%;
}
-.list_categories, .admin_action_header, .admin_main, .admin_menu_main, .admin_menu_sub {
- text-align : left;
- width : 100%;
+.list_categories,.admin_action_header,.admin_main,.admin_menu_main,.admin_menu_sub
+ {
+ text-align: left;
+ width: 100%;
}
.member_unconfirmed {
- background-color : #FFFFCC;
- width : 100%;
- text-align : center;
+ background-color: #FFFFCC;
+ width: 100%;
+ text-align: center;
}
.you_are_here {
- white-space : nowrap;
- font-size : 14px;
- text-align : left;
+ white-space: nowrap;
+ font-size: 14px;
+ text-align: left;
+}
+
+.tiny {
+ font-size: 12px;
}
-.tiny { font-size : 12px; }
-.medium { font-size : 14px; }
-.big { font-size : 20px; }
+.medium {
+ font-size: 14px;
+}
-.top { border-top : 1px solid #880000; }
-.bottom { border-bottom : 1px solid #880000; }
-.left { border-left : 1px solid #880000; }
-.right { border-right : 1px solid #880000; }
+.big {
+ font-size: 20px;
+}
-.top2 { border-top : 1px solid #880000; }
-.bottom2 { border-bottom : 1px solid #880000; }
-.left2 { border-left : 1px solid #880000; }
-.right2 { border-right : 1px solid #880000; }
+.top {
+ border-top: 1px solid #880000;
+}
+
+.bottom {
+ border-bottom: 1px solid #880000;
+}
+
+.left {
+ border-left: 1px solid #880000;
+}
+
+.right {
+ border-right: 1px solid #880000;
+}
+
+.top2 {
+ border-top: 1px solid #880000;
+}
+
+.bottom2 {
+ border-bottom: 1px solid #880000;
+}
+
+.left2 {
+ border-left: 1px solid #880000;
+}
+
+.right2 {
+ border-right: 1px solid #880000;
+}
.nobr {
- white-space : nowrap;
+ white-space: nowrap;
}
.guest_table {
- background-color : #FFFFCC;
+ background-color: #FFFFCC;
}
.main {
- height : 99%;
- vertical-align : top;
+ height: 99%;
+ vertical-align: top;
}
.footer {
- height : 1%;
- vertical-align : bottom;
+ height: 1%;
+ vertical-align: bottom;
}
.menu_blur {
- display : block;
+ display: block;
}
.menu_blur:hover {
- background-color : #DDDDAA;
+ background-color: #DDDDAA;
}
.guest_footer {
- height : 30px;
- background-color : #DDDDAA;
+ height: 30px;
+ background-color: #DDDDAA;
}
.admin_alpha {
- text-align : center;
- height : 40px;
- vertical-align : middle;
+ text-align: center;
+ height: 40px;
+ vertical-align: middle;
}
.admin_sortlinks {
- text-align : center;
- height : 20px;
- vertical-align : middle;
+ text-align: center;
+ height: 20px;
+ vertical-align: middle;
}
.disabled {
- border-style : groove;
- background-color : #AAAAAA;
- color : #FFFFCC;
+ border-style: groove;
+ background-color: #AAAAAA;
+ color: #FFFFCC;
}
.mini_select {
- border : solid 1px #880000;
- background-color : #DDDDAA;
- font-size : 10px;
+ border: solid 1px #880000;
+ background-color: #DDDDAA;
+ font-size: 10px;
}
.theme_box {
- border : 1px solid #880000;
- border-top : 0px;
- width : 100%;
- height : 70px;
- background-color : #FFFFCC;
+ border: 1px solid #880000;
+ border-top: 0px;
+ width: 100%;
+ height: 70px;
+ background-color: #FFFFCC;
}
.theme_note {
- font-size : 12px;
- font-weight : bold;
+ font-size: 12px;
+ font-weight: bold;
}
.theme_content {
- color : #880000;
+ color: #880000;
}
.admin_title2 {
- font-weight : bold;
- padding : 4px;
- background-color : #DDDDAA;
- color : #880000;
- text-align : center;
- font-size : 14px;
+ font-weight: bold;
+ padding: 4px;
+ background-color: #DDDDAA;
+ color: #880000;
+ text-align: center;
+ font-size: 14px;
}
.agb_box {
- text-align : left;
+ text-align: left;
}
-.agb_title, .fatal_title {
- font-size : 16px;
- text-align : center;
- height : 40px;
- font-weight : bold;
+.agb_title,.fatal_title {
+ font-size: 16px;
+ text-align: center;
+ height: 40px;
+ font-weight: bold;
}
-.agb_para {
- text-indent : 8px;
- text-align : left;
- margin-left : 5px;
- margin-right : 5px;
- margin-bottom : 12px;
+.agb_para {
+ text-indent: 8px;
+ text-align: left;
+ margin-left: 5px;
+ margin-right: 5px;
+ margin-bottom: 12px;
}
.fatal_box {
- text-align : center;
- width : 100%;
- margin-top : 10px;
+ text-align: center;
+ width: 100%;
+ margin-top: 10px;
}
.admin_message {
- margin-bottom : 15px;
+ margin-bottom: 15px;
}
#show_timings_block {
- float : left;
- border : solid 1px #880000;
- background-color : #DDDDAA;
- font-size : 10px;
- vertical-align : middle;
- width : 465px;
- height : 20px;
+ float: left;
+ border: solid 1px #880000;
+ background-color: #DDDDAA;
+ font-size: 10px;
+ vertical-align: middle;
+ width: 465px;
+ height: 20px;
}
.show_timings_column {
- background-color : #FFFFCC;
- margin-top : 2px;
- width : 150px;
- border : solid 1px #880000;
- height : 14px;
+ background-color: #FFFFCC;
+ margin-top: 2px;
+ width: 150px;
+ border: solid 1px #880000;
+ height: 14px;
}
.show_timings_data {
- font-weight : bold;
+ font-weight: bold;
}
.login_failure_header {
- text-align : center;
- background-color : #DDDDAA;
- font-weight : bold;
+ text-align: center;
+ background-color: #DDDDAA;
+ font-weight: bold;
}
.login_failures {
- text-align : center;
- width : 400px;
+ text-align: center;
+ width: 400px;
}
-.member_skyscraper, .guest_skyscraper {
- width : 122px;
- height : 602px;
- border : 1px solid #880000;
- margin : 0px;
- padding : 0px;
- padding-top : 1px;
+.member_skyscraper,.guest_skyscraper {
+ width: 122px;
+ height: 602px;
+ border: 1px solid #880000;
+ margin: 0px;
+ padding: 0px;
+ padding-top: 1px;
}
-ul.admin_menu_main, ul.admin_menu_sub {
- list-style : none inside;
-}
+ul.admin_menu_main,ul.admin_menu_sub {
+ list-style: none inside;
+}
\ No newline at end of file
.help_main {
- height : 100%;
+ height: 100%;
}
.help_title {
- background-color : #DDDDAA;
- height : 100px;
+ background-color: #DDDDAA;
+ height: 100px;
}
.help_content {
- background-color : #DDDDAA;
-}
+ background-color: #DDDDAA;
+}
\ No newline at end of file
.install_table {
- background-color : #F5F5C5;
+ background-color: #F5F5C5;
}
.install_msg {
- color : #880000;
- background-color : #EDEDBA;
+ color: #880000;
+ background-color: #EDEDBA;
}
.install_fatal {
- color : #880000;
+ color: #880000;
}
.install_select {
- border : dashed 1px #880000;
- background-color : #DDDDAA;
+ border: dashed 1px #880000;
+ background-color: #DDDDAA;
}
+
.install_normal {
- border-style : solid;
- border : dashed 1px #880000;
+ border-style: solid;
+ border: dashed 1px #880000;
}
.install_submit {
- border-style : groove;
+ border-style: groove;
}
.install_main {
- color : #880000;
- background-color : #FFFFCC;
- text-decoration : none;
+ color: #880000;
+ background-color: #FFFFCC;
+ text-decoration: none;
}
.install_header {
- color : #880000;
- background-color : #DDDDAA;
- width : 400px;
- height : 30px;
- font-size : 20px;
- text-decoration : underline;
- padding-top : 5px;
- padding-bottom : 5px;
+ color: #880000;
+ background-color: #DDDDAA;
+ width: 400px;
+ height: 30px;
+ font-size: 20px;
+ text-decoration: underline;
+ padding-top: 5px;
+ padding-bottom: 5px;
}
.install_fatal {
- background-color : #FFFFCC;
- color : #880000;
+ background-color: #FFFFCC;
+ color: #880000;
}
.install_fatalcontent {
- text-align : left;
- background-color : #FFFFCC;
+ text-align: left;
+ background-color: #FFFFCC;
}
-.install_error, .install_finished {
- font-size : 20px;
- color : #880000;
+.install_error,.install_finished {
+ font-size: 20px;
+ color: #880000;
}
-.install_security, .install_welcome, .install_text {
- color : #880000;
+.install_security,.install_welcome,.install_text {
+ color: #880000;
}
.install_text {
- padding-bottom : 10px;
- text-align : left;
- margin-left : 20px;
- margin-right : 20px;
+ padding-bottom: 10px;
+ text-align: left;
+ margin-left: 20px;
+ margin-right: 20px;
}
.install_security {
- width : 350px;
- padding-top : 10px;
- padding-bottom : 10px;
+ width: 350px;
+ padding-top: 10px;
+ padding-bottom: 10px;
}
.install_welcome {
- padding-top : 5px;
- padding-bottom : 10px;
-}
+ padding-top: 5px;
+ padding-bottom: 10px;
+}
\ No newline at end of file
.paidlinks_errors {
- margin-left: 5px;
- margin-right: 5px;
- margin-top: 5px;
- margin-bottom: 5px;
- text-align: left;
- align: left;
-}
+ margin-left: 5px;
+ margin-right: 5px;
+ margin-top: 5px;
+ margin-bottom: 5px;
+ text-align: left;
+ align: left;
+}
\ No newline at end of file
.register_submit {
- border-style : outset;
+ border-style: outset;
}
.register_reset {
- border-style : groove;
- border : solid 1px #880000;
- color : #880000;
+ border-style: groove;
+ border: solid 1px #880000;
+ color: #880000;
}
+
.register_submit {
- color : #880000;
- border-color : #880000;
+ color: #880000;
+ border-color: #880000;
}
.register_select {
- border : solid 1px #880000;
- background-color : #DDDDAA;
+ border: solid 1px #880000;
+ background-color: #DDDDAA;
}
.register_failed {
- color : #880000;
+ color: #880000;
}
.register_snote {
- font-size : 12px;
+ font-size: 12px;
}
.register_normal {
- border-style : solid;
- border : solid 1px #880000;
- padding-right : 5px;
+ border-style: solid;
+ border: solid 1px #880000;
+ padding-right: 5px;
}
.register_main {
- background-color : #FFFFCC;
- width : 540px;
+ background-color: #FFFFCC;
+ width: 540px;
}
.register_done2 {
- height : 40px;
- color : #880000;
- background-color : #FFFFCC;
- width : 500px;
+ height: 40px;
+ color: #880000;
+ background-color: #FFFFCC;
+ width: 500px;
}
.register_title {
- background-color : #DDDDAA;
- text-align : center;
- font-size : 18px;
- padding-left : 5px;
- padding-right : 5px;
+ background-color: #DDDDAA;
+ text-align: center;
+ font-size: 18px;
+ padding-left: 5px;
+ padding-right: 5px;
}
.register_seperator {
- height : 7px;
- font-size : 1px;
+ height: 7px;
+ font-size: 1px;
}
.register_left {
- text-align : right;
- margin-right : 2px;
- color : #880000;
- font-weight : bold;
- font-size : 14px;
- padding-left : 5px;
+ text-align: right;
+ margin-right: 2px;
+ color: #880000;
+ font-weight: bold;
+ font-size: 14px;
+ padding-left: 5px;
}
.register_right {
- padding-right : 5px;
+ padding-right: 5px;
}
.register_header {
- text-align : center;
- background-color : #DDDDAA;
- color : #880000;
- font-weight : bold;
- border-top : 1px solid #880000;
- border-bottom : 1px solid #880000;
- height : 25px;
+ text-align: center;
+ background-color: #DDDDAA;
+ color: #880000;
+ font-weight: bold;
+ border-top: 1px solid #880000;
+ border-bottom: 1px solid #880000;
+ height: 25px;
}
-A:hover.register_term {
- background-color : #DDDDAA;
- border-top : 1px solid #880000;
- border-bottom : 1px solid #880000;
-}
+A:hover .register_term {
+ background-color: #DDDDAA;
+ border-top: 1px solid #880000;
+ border-bottom: 1px solid #880000;
+}
\ No newline at end of file
.sponsor_table {
- background-color : #FFFFCC;
+ background-color: #FFFFCC;
}
.sponsor_action {
- background-color : #DDDDAA;
- height : 25px;
+ background-color: #DDDDAA;
+ height: 25px;
}
-.sponsor_header, .sponsor_footer {
- background-color : #DDDDAA;
+.sponsor_header,.sponsor_footer {
+ background-color: #DDDDAA;
}
.sponsor_what {
- background-color : #FFFFCC;
- height : 24px;
+ background-color: #FFFFCC;
+ height: 24px;
}
TR.sponsor_row_blur:hover {
- background-color : #DDDDAA;
+ background-color: #DDDDAA;
}
A.sponsor_blur {
- display : block;
- height : 33px;
- padding-top : 9px;
- padding-left : 7px;
-}
+ display: block;
+ height: 33px;
+ padding-top: 9px;
+ padding-left: 7px;
+}
\ No newline at end of file
.surfbar_banner {
background-color: #DDDDAA;
}
+
.surfbar_table {
+
}
+
.surfbar_td {
+
}
+
.surfbar_points {
+
}
+
#surfbar_restart {
+
}
+
#surfbar_counter {
+
}
+
#counter_word {
+
}
+
.surfbar_reload {
+
}
+
.surfbar_max {
+
}
+
.surfbar_points {
- font-weight : bold;
-}
+ font-weight: bold;
+}
\ No newline at end of file
-.top10_row1, .top10_row2, .top10_row3, .top10_row4, .top10_row5 {
- text-align : center;
- padding-left : 5px;
- padding-right : 5px;
+.top10_row1,.top10_row2,.top10_row3,.top10_row4,.top10_row5 {
+ text-align: center;
+ padding-left: 5px;
+ padding-right: 5px;
}
-.top10_row2, .top10_row4 {
- text-align : left;
-}
+.top10_row2,.top10_row4 {
+ text-align: left;
+}
\ No newline at end of file
-.transfer_row1, .transfer_row3 {
- text-align : center;
- font-weight : bold;
+.transfer_row1,.transfer_row3 {
+ text-align: center;
+ font-weight: bold;
}
.transfer_row2 {
- text-align : center;
+ text-align: center;
}
-.transfer_row4, .transfer_row5 {
+.transfer_row4,.transfer_row5 {
padding-left: 2px;
-}
+}
\ No newline at end of file
switch ($GLOBALS['theme_mode'])
{
-case 'test': // Do stuff while testing the theme: The admin clicked on 'Import'
- break;
+ case 'test': // Do stuff while testing the theme: The admin clicked on 'Import'
+ break;
-case 'load': // Do stuff while theme is loaded normally
- break;
+ case 'load': // Do stuff while theme is loaded normally
+ break;
}
//
?>
if (((REQUEST_ISSET_GET(('user'))) || (REQUEST_ISSET_GET(('reseller')))) && (REQUEST_ISSET_GET(('banner')))) {
// for later things... ;-)
$result = SQL_QUERY_ESC("SELECT url FROM `{!_MYSQL_PREFIX!}_refbanner` WHERE `id`=%s LIMIT 1",
- array(bigintval(REQUEST_GET('banner'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('banner'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
list($url) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_refbanner` SET counter=counter+1 WHERE `id`=%s LIMIT 1",
- array(bigintval(REQUEST_GET('banner'))), __FILE__, __LINE__);
+ array(bigintval(REQUEST_GET('banner'))), __FILE__, __LINE__);
$type = substr($url, -3);
sendHeader('Content-Type: image/' . $type);