************************************************************************/
// Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) )
-require("inc/libs/security_functions.php");
+require('inc/libs/security_functions.php');
// Init "action" and "what"
-$GLOBALS['what'] = "";
-$GLOBALS['action'] = "";
+$GLOBALS['what'] = '';
+$GLOBALS['action'] = '';
// Set module
-$GLOBALS['module'] = "admin";
+$GLOBALS['module'] = 'admin';
$GLOBALS['output_mode'] = -1;
// Load the required file(s)
-require("inc/config.php");
+require('inc/config.php');
// Is the script installed?
if (isInstalled()) {
// Is the admin logged-in and no sql_patches installed?
- if ((IS_ADMIN()) && (!EXT_IS_ACTIVE("sql_patches"))) {
+ if ((IS_ADMIN()) && (!EXT_IS_ACTIVE('sql_patches'))) {
// Extension 'sql_patches' is missing!
LOAD_URL("modules.php?module=admin&sql_patches=1");
} else {
}
} else {
// You have to install first!
- LOAD_URL("install.php");
+ LOAD_URL('install.php');
}
// Really all done here... ;-)
************************************************************************/
// Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) )
-require("inc/libs/security_functions.php");
+require('inc/libs/security_functions.php');
// Init "action" and "what"
-$GLOBALS['what'] = "";
-$GLOBALS['action'] = "";
+$GLOBALS['what'] = '';
+$GLOBALS['action'] = '';
// Set module
-$GLOBALS['module'] = "agb";
+$GLOBALS['module'] = 'agb';
$GLOBALS['output_mode'] = -1;
// Load the required file(s)
-require("inc/config.php");
+require('inc/config.php');
// Is the script installed?
if (isInstalled()) {
// Simply redirect... :-)
- LOAD_URL("modules.php?module=index&what=agb");
+ LOAD_URL('modules.php?module=index&what=agb');
} else {
// You have to install first!
- LOAD_URL("install.php");
+ LOAD_URL('install.php');
}
// Really all done here... ;-)
************************************************************************/
// Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) )
-require("inc/libs/security_functions.php");
+require('inc/libs/security_functions.php');
// Init "action" and "what"
$GLOBALS['startTime'] = microtime(true);
-$GLOBALS['what'] = "";
-$GLOBALS['action'] = "";
+$GLOBALS['what'] = '';
+$GLOBALS['action'] = '';
// Set module
-$GLOBALS['module'] = "beg";
+$GLOBALS['module'] = 'beg';
$GLOBALS['refid'] = 0;
$GLOBALS['output_mode'] = -1;
$msg = null;
// Load the required file(s)
-require("inc/config.php");
+require('inc/config.php');
-// Is the "beg" extension active?
-REDIRCT_ON_UNINSTALLED_EXTENSION("beg");
+// Is the 'beg' extension active?
+REDIRCT_ON_UNINSTALLED_EXTENSION('beg');
// Is the script installed?
if (isInstalled()) {
// Check for userid
- if (REQUEST_ISSET_GET(('uid'))) {
+ if (REQUEST_ISSET_GET('uid')) {
// Init variables
$uid = 0;
$result = false;
// Validate if it is not a number
if ("".(REQUEST_GET('uid') + 0)."" !== "".REQUEST_GET('uid')."") {
- if (EXT_IS_ACTIVE("nickname")) {
+ 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__);
$points = mt_rand((getConfig('beg_points') * 100000), (getConfig('beg_points_max') * 100000)) / 100000;
// Set nickname / userid for the template(s
- define('__BEG_UID' , REQUEST_GET(('uid')));
+ define('__BEG_UID' , REQUEST_GET('uid'));
define('__BEG_CLICKS', ($clicks + 1));
define('__BEG_BANNER', LOAD_TEMPLATE("beg_banner", true));
define('__BEG_POINTS', TRANSLATE_COMMA($points));
SQL_FREERESULT($result);
// Include header
- LOAD_INC_ONCE("inc/header.php");
+ LOAD_INC_ONCE('inc/header.php');
// Load final template
LOAD_TEMPLATE("beg_link");
}
// Include footer
- LOAD_INC_ONCE("inc/footer.php");
+ LOAD_INC_ONCE('inc/footer.php');
} elseif (($status != "CONFIRMED") && ($status != "failed")) {
// Maybe locked/unconfirmed account?
$msg = GEN_ERROR_CODE_FROM_ACCOUNT_STATUS($status);
}
// Reload to index module
- if ((!empty($msg)) && (!empty($msg))) LOAD_URL("modules.php?module=index&msg=".$msg."&ext=beg");
+ if ((!empty($msg)) && (!empty($msg))) LOAD_URL('modules.php?module=index&msg='.$msg.'&ext=beg');
} else {
// No userid entered
- LOAD_URL("modules.php?module=index");
+ LOAD_URL('modules.php?module=index');
}
} else {
// You have to install first!
- LOAD_URL("install.php");
+ LOAD_URL('install.php');
}
// Really all done here... ;-)
************************************************************************/
// Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) )
-require("inc/libs/security_functions.php");
+require('inc/libs/security_functions.php');
// Init "action" and "what"
-$GLOBALS['what'] = "";
-$GLOBALS['action'] = "";
+$GLOBALS['what'] = '';
+$GLOBALS['action'] = '';
// Set module
-$GLOBALS['module'] = "birthday_confirm";
+$GLOBALS['module'] = 'birthday_confirm';
$GLOBALS['output_mode'] = -1;
// Load the required file(s)
-require("inc/config.php");
+require('inc/config.php');
-// Is the "birthday" extension active?
-REDIRECT_ON_UNINSTALLED_EXTENSION("birthday");
+// Is the 'birthday' extension active?
+REDIRECT_ON_UNINSTALLED_EXTENSION('birthday');
// Is the script installed?
if (isInstalled()) {
$data = SQL_FETCHARRAY($result, false);
// Is the account confirmed?
- if ($data['status'] == "CONFIRMED") {
+ if ($data['status'] == 'CONFIRMED') {
// Set mode depending on how many mails the member has to confirm
$locked = false;
- if (($data['ref_payout'] > 0) && (getConfig('allow_direct_pay') != "Y")) $locked = true;
+ if (($data['ref_payout'] > 0) && (getConfig('allow_direct_pay') != 'Y')) $locked = true;
// Add points to account
unset($GLOBALS['ref_level']);
- ADD_POINTS_REFSYSTEM("birthday_confirm", $uid, $data['points'], false, "0", $locked, strtolower(getConfig('birthday_mode')));
+ ADD_POINTS_REFSYSTEM('birthday_confirm', $uid, $data['points'], false, '0', $locked, strtolower(getConfig('birthday_mode')));
// Update mediadata if version is 0.0.4 or newer
- if (GET_EXT_VERSION("mediadata") >= "0.0.4") {
+ if (GET_EXT_VERSION('mediadata') >= '0.0.4') {
// Update database
- MEDIA_UPDATE_ENTRY(array("total_points"), "add", $data['points']);
+ MEDIA_UPDATE_ENTRY(array('total_points'), 'add', $data['points']);
}
// Remove entry from table
define('__GIFT' , TRANSLATE_COMMA($data['points']));
// Load message from template
- define('__MSG', LOAD_TEMPLATE("birthday_msg", true));
+ define('__MSG', LOAD_TEMPLATE('birthday_msg', true));
} else {
// Unconfirmed / locked accounts cannot get points
define('__MSG', sprintf(getMessage('BIRTHDAY_CANNOT_STATUS'), TRANSLATE_STATUS($data['status'])));
SQL_FREERESULT($result);
// Set this because we have no module in URI
- $GLOBALS['module'] = "birthday_confirm";
+ $GLOBALS['module'] = 'birthday_confirm';
// Include header
- LOAD_INC("inc/header.php");
+ LOAD_INC('inc/header.php');
// Load birthday header template (for your banners, e.g.?)
- define('__BIRTHDAY_HEADER', LOAD_TEMPLATE("birthday_header", true));
+ define('__BIRTHDAY_HEADER', LOAD_TEMPLATE('birthday_header', true));
// Load birthday footer template (for your banners, e.g.?)
- define('__BIRTHDAY_FOOTER', LOAD_TEMPLATE("birthday_footer", true));
+ define('__BIRTHDAY_FOOTER', LOAD_TEMPLATE('birthday_footer', true));
// Load final template and output it
- LOAD_TEMPLATE("birthday_confirm");
+ LOAD_TEMPLATE('birthday_confirm');
// Include footer
- LOAD_INC("inc/footer.php");
+ LOAD_INC('inc/footer.php');
} else {
// You have to install first!
- LOAD_URL("install.php");
+ LOAD_URL('install.php');
}
// Really all done here... ;-)
************************************************************************/
// Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) )
-require("inc/libs/security_functions.php");
+require('inc/libs/security_functions.php');
// Init "action" and "what"
-$GLOBALS['what'] = "";
-$GLOBALS['action'] = "";
+$GLOBALS['what'] = '';
+$GLOBALS['action'] = '';
// Set module
-$GLOBALS['module'] = "click";
+$GLOBALS['module'] = 'click';
$GLOBALS['output_mode'] = -1;
// Load the required file(s)
-require("inc/config.php");
+require('inc/config.php');
if (((REQUEST_ISSET_GET(('user'))) || (REQUEST_ISSET_GET(('reseller')))) && (REQUEST_ISSET_GET(('banner')))) {
// Update clicks counter...
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_refbanner` SET clicks=clicks+1 WHERE id=%s LIMIT 1", array(bigintval(REQUEST_GET('banner'))), __FILE__, __LINE__);
if (SQL_AFFECTEDROWS() == 1) {
if (REQUEST_ISSET_GET(('user'))) {
- LOAD_URL("ref.php?refid=".bigintval(REQUEST_GET('user')));
+ LOAD_URL('ref.php?refid=' . bigintval(REQUEST_GET('user')));
} elseif (REQUEST_ISSET_GET(('reseller'))) {
- LOAD_URL("shop_reseller.php?reseller=".bigintval(REQUEST_GET('reseller')));
+ LOAD_URL('shop_reseller.php?reseller=' . bigintval(REQUEST_GET('reseller')));
}
} // END - if
} // END - if
// Load index page
-LOAD_URL("index.php");
+LOAD_URL('index.php');
// Shutdown
shutdown();
************************************************************************/
// Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) )
-require("inc/libs/security_functions.php");
+require('inc/libs/security_functions.php');
// Init "action" and "what"
-$GLOBALS['what'] = "";
-$GLOBALS['action'] = "";
+$GLOBALS['what'] = '';
+$GLOBALS['action'] = '';
// Set module to confirm
-$GLOBALS['module'] = "confirm";
+$GLOBALS['module'] = 'confirm';
$GLOBALS['output_mode'] = -1;
// Load the required file(s)
-require("inc/config.php");
+require('inc/config.php');
// Is the script installed?
if ((isInstalled()) && (isAdminRegistered())) {
// Base URL for redirection
- $URL = "modules.php?module=index&what=confirm&hash=";
+ $URL = 'modules.php?module=index&what=confirm&hash=';
if (!REQUEST_ISSET_GET(('hash'))) {
// No refid and we add our refid (don't forget to set $def_refid!)
- $URL = "modules.php?module=index";
+ $URL = 'modules.php?module=index';
} else {
// We have an refid here. So we simply add it
$URL .= REQUEST_GET('hash');
LOAD_URL($URL);
} else {
// You have to install first!
- LOAD_URL("install.php");
+ LOAD_URL('install.php');
}
// Really all done here... ;-)
************************************************************************/
// Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) )
-require("inc/libs/security_functions.php");
+require('inc/libs/security_functions.php');
// Footer is disabled in CSS mode
$GLOBALS['footer_sent'] = "-1";
// Init variables
-$GLOBALS['what'] = "";
-$GLOBALS['action'] = "";
+$GLOBALS['what'] = '';
+$GLOBALS['action'] = '';
// This is a CSS file loader!
-$GLOBALS['output_mode'] = "1";
-$GLOBALS['module'] = "css";
+$GLOBALS['output_mode'] = '1';
+$GLOBALS['module'] = 'css';
// Set header
-header("Content-type: text/css");
+header('Content-type: text/css');
// Load the required file(s)
-require("inc/config.php");
+require('inc/config.php');
// Load header
-LOAD_INC("inc/header.php");
+LOAD_INC('inc/header.php');
// Load CSS code
-LOAD_INC("inc/stylesheet.php");
+LOAD_INC('inc/stylesheet.php');
// Load footer
-LOAD_INC("inc/footer.php");
+LOAD_INC('inc/footer.php');
//
?>
************************************************************************/
// Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) )
-require("inc/libs/security_functions.php");
+require('inc/libs/security_functions.php');
// Init "action" and "what"
-$GLOBALS['what'] = "";
-$GLOBALS['action'] = "";
+$GLOBALS['what'] = '';
+$GLOBALS['action'] = '';
// Set module and fake "CSS mode"
-$GLOBALS['module'] = "debug";
+$GLOBALS['module'] = 'debug';
$GLOBALS['output_mode'] = -1;
// Load the required file(s)
-require("inc/config.php");
+require('inc/config.php');
// Redirect only to registration page when this script is installed
if ((isInstalled()) && (getTotalFatalErrors() == 0)) {
// Is the extension installed?
- if (!EXT_IS_ACTIVE("debug")) {
+ if (!EXT_IS_ACTIVE('debug')) {
// Then abort here
shutdown();
} // END - if
LOAD_INC($INC);
} else {
// Missing request file, may happen while development
- DEBUG_ABUSE_LOG(__FILE__, __LINE__, "request_404", REQUEST_POST('request'));
+ DEBUG_ABUSE_LOG(__FILE__, __LINE__, 'request_404', REQUEST_POST('request'));
}
} else {
// Unhandled request detected
- DEBUG_ABUSE_LOG(__FILE__, __LINE__, "request_unhandled", REQUEST_POST('request'));
+ DEBUG_ABUSE_LOG(__FILE__, __LINE__, 'request_unhandled', REQUEST_POST('request'));
}
} else {
// Empty request
- DEBUG_ABUSE_LOG(__FILE__, __LINE__, "request_empty", "");
+ DEBUG_ABUSE_LOG(__FILE__, __LINE__, 'request_empty', '');
}
} else {
// Not installed or fatal errors
- DEBUG_ABUSE_LOG(__FILE__, __LINE__, "request_fatal", getTotalFatalErrors());
+ DEBUG_ABUSE_LOG(__FILE__, __LINE__, 'request_fatal', getTotalFatalErrors());
} // END - if
// Really all done here... ;-)
************************************************************************/
// Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) )
-require("inc/libs/security_functions.php");
+require('inc/libs/security_functions.php');
// Init "action" and "what"
$GLOBALS['startTime'] = microtime(true);
-$GLOBALS['what'] = "";
-$GLOBALS['action'] = "";
+$GLOBALS['what'] = '';
+$GLOBALS['action'] = '';
// Set module
-$GLOBALS['module'] = "doubler";
+$GLOBALS['module'] = 'doubler';
$GLOBALS['refid'] = 0;
$GLOBALS['output_mode'] = 0;
// Load the required file(s)
-require("inc/config.php");
+require('inc/config.php');
-// Is the "doubler" extension active?
-REDIRECT_ON_UNINSTALLED_EXTENSION("doubler");
+// Is the 'doubler' extension active?
+REDIRECT_ON_UNINSTALLED_EXTENSION('doubler');
// Is the script installed?
if (isInstalled()) {
// Only check this if refid is provided!
if ($GLOBALS['refid'] > 0) {
// Probe for nickname extension and if a nickname was supplied by URL
- $probe_nickname = ((EXT_IS_ACTIVE("nickname")) && (("".round($GLOBALS['refid'])."") != $GLOBALS['refid']));
+ $probe_nickname = ((EXT_IS_ACTIVE('nickname')) && ((''.round($GLOBALS['refid']).'') != $GLOBALS['refid']));
// Do we have nickname or userid set?
if ($probe_nickname) {
// If no account was found set default refid and status to CONFIRMED
if (empty($GLOBALS['refid'])) {
$GLOBALS['refid'] = getConfig('def_refid');
- $status = "CONFIRMED";
+ $status = 'CONFIRMED';
} // END - if
// Begin with doubler script...
// Begin with doubling process
if ((REQUEST_ISSET_POST(('userid'))) && (REQUEST_ISSET_POST(('pass'))) && (REQUEST_ISSET_POST(('points')))) {
// Probe for nickname extension and if a nickname was entered
- $probe_nickname = ((EXT_IS_ACTIVE("nickname")) && (("".round(REQUEST_POST('userid'))."") != REQUEST_POST('userid')));
+ $probe_nickname = ((EXT_IS_ACTIVE('nickname')) && ((''.round(REQUEST_POST('userid')).'') != REQUEST_POST('userid')));
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",
$probe_points = ((REQUEST_POST('points') >= getConfig('doubler_min')) && (REQUEST_POST('points') <= getConfig('doubler_max')));
// Check all together
- if ((!empty($uid)) && ($password == generateHash(REQUEST_POST('pass'), substr($password, 0, -40))) && ($status == "CONFIRMED") && ($probe_points)) {
+ if ((!empty($uid)) && ($password == generateHash(REQUEST_POST('pass'), substr($password, 0, -40))) && ($status == 'CONFIRMED') && ($probe_points)) {
// Nickname resolved to a unique userid or direct userid entered by the member
$GLOBALS['doubler_uid'] = $uid;
// Calulcate points
- $points = GET_TOTAL_DATA($uid, "user_points", "points") - GET_TOTAL_DATA($uid, "user_data", "used_points");
+ $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)
array($uid, bigintval($GLOBALS['refid']), bigintval(REQUEST_POST('points') * 2)), __FILE__, __LINE__);
// Subtract entered points
- SUB_POINTS("doubler", $uid, REQUEST_POST('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');
- UPDATE_CONFIG("doubler_points", $points, "+");
+ UPDATE_CONFIG('doubler_points', $points, '+');
incrementConfigEntry('doubler_points', $points);
// Add second line for the referal but only when uid != refid
} // END - if
// Update usage counter
- UPDATE_CONFIG("doubler_counter", 1, "+");
+ UPDATE_CONFIG('doubler_counter', 1, '+');
// Set constant
- define('__DOUBLER_MSG', LOAD_TEMPLATE("doubler_reflink", true, REQUEST_POST('userid')));
+ 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") {
+ } elseif ($status == 'CONFIRMED') {
// Account is unconfirmed!
define('__ERROR_MSG', getMessage('DOUBLER_FORM_WRONG_PASS'));
- } elseif ($status == "UNCONFIRMED") {
+ } elseif ($status == 'UNCONFIRMED') {
// Account is unconfirmed!
define('__ERROR_MSG', getMessage('DOUBLER_FORM_STATUS_UNCONFIRMED'));
- } elseif ($status == "LOCKED") {
+ } elseif ($status == 'LOCKED') {
// Account is locked by admin / holiday!
define('__ERROR_MSG', getMessage('DOUBLER_FORM_STATUS_LOCKED'));
} elseif (REQUEST_POST('points') < getConfig('doubler_min')) {
}
// Set messages to nothing
- if (!defined('__DOUBLER_MSG')) define('__DOUBLER_MSG', "");
- if (!defined('__ERROR_MSG')) define('__ERROR_MSG' , "");
+ 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") LOAD_INC("inc/doubler_send.php");
+ if (getConfig('doubler_send_mode') == 'DIRECT') LOAD_INC('inc/doubler_send.php');
// Output header
- LOAD_INC("inc/header.php");
+ LOAD_INC('inc/header.php');
// Banner in text
- define('__DOUBLER_BANNER', LOAD_TEMPLATE("doubler_banner", true));
+ 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));
+ 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('__MAX_VALUE' , TRANSLATE_COMMA(getConfig('doubler_max')));
// Text "Enter login"
- if (EXT_IS_ACTIVE("nickname")) {
+ if (EXT_IS_ACTIVE('nickname')) {
// Choose login/nickname
define('DOUBLER_ENTER_LOGIN', getMessage('GUEST_ENTER_LOGIN_NICKNAME'));
} else {
// Which mail-send-mode did the admin setup?
switch (getConfig('doubler_send_mode'))
{
- case "DIRECT":
+ case 'DIRECT':
define('DOUBLER_PAYOUT_TIME', getMessage('DOUBLER_PAYOUT_TIME_DIRECT'));
break;
- case "RESET":
+ 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"));
+ define('__DOUBLER_PAYOUT_HISTORY', DOUBLER_GENERATE_TABLE('0', 'Y', 'N', 'DESC'));
// Generate timemark
define('__TIMEOUT_MARK', CREATE_FANCY_TIME(getConfig('doubler_timeout')));
define('__LEFT_VALUE', TRANSLATE_COMMA(DOUBLER_GET_TOTAL_POINTS_LEFT()));
// Output neccessary form for this
- LOAD_TEMPLATE("doubler_index");
+ LOAD_TEMPLATE('doubler_index');
// Output footer
- LOAD_INC("inc/footer.php");
+ LOAD_INC('inc/footer.php');
} else {
// You have to install first!
- LOAD_URL("install.php");
+ LOAD_URL('install.php');
}
// Really all done here... ;-)
************************************************************************/
// Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) )
-require("inc/libs/security_functions.php");
+require('inc/libs/security_functions.php');
// Init "action" and "what"
-$GLOBALS['what'] = "";
-$GLOBALS['action'] = "";
+$GLOBALS['what'] = '';
+$GLOBALS['action'] = '';
// Set module
-$GLOBALS['module'] = "img";
+$GLOBALS['module'] = 'img';
$GLOBALS['output_mode'] = -1;
// Load the required file(s)
-require("inc/config.php");
+require('inc/config.php');
// Script installed?
if (isInstalled()) {
// Load header
- LOAD_INC_ONCE("inc/header.php");
+ LOAD_INC_ONCE('inc/header.php');
// Code set?
if (REQUEST_ISSET_GET(('code'))) {
}
// Finish generation here
- LOAD_INC_ONCE("inc/footer.php");
+ LOAD_INC_ONCE('inc/footer.php');
} else {
// You have to install first!
- LOAD_URL("install.php");
+ LOAD_URL('install.php');
}
// Really all done here... ;-)
// Init & set the include pool
INIT_INC_POOL();
-SET_INC_POOL(GET_DIR_AS_ARRAY("inc/autopurge/", "purge-"));
+SET_INC_POOL(GET_DIR_AS_ARRAY('inc/autopurge/', 'purge-'));
// Run the filter
runFilterChain('load_includes');
}
// Abort if autopurge is not active or disabled by admin
-if ((!EXT_IS_ACTIVE("autopurge")) || (getConfig('auto_purge_active') != "Y")) {
+if ((!EXT_IS_ACTIVE('autopurge')) || (getConfig('auto_purge_active') != "Y")) {
// Abort here
return false;
}
-if ((getConfig('auto_purge_active') == "Y") && (getConfig('auto_purge') > 0)) {
+if ((getConfig('auto_purge_active') == 'Y') && (getConfig('auto_purge') > 0)) {
// Init SQLs
INIT_SQLS();
SQL_FREERESULT($result);
// Is the 'bonus' extension installed and activated?
- if (EXT_IS_ACTIVE("bonus", true)) {
+ 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__);
} // END - if
// Abort if autopurge is not active or disabled by admin
-if ((!EXT_IS_ACTIVE("autopurge")) || (getConfig('auto_purge_active') != "Y")) {
+if ((!EXT_IS_ACTIVE('autopurge')) || (getConfig('auto_purge_active') != "Y")) {
// Abort here
return false;
} // END - if
// Shall I look for inactive accounts and autopurge inactive accounts?
-if (getConfig('autopurge_inactive') == "Y") {
+if (getConfig('autopurge_inactive') == 'Y') {
// Init SQLs
INIT_SQLS();
$since = getConfig(('ap_inactive_since'));
// Init exclusion list
- $EXCLUDE_LIST = "";
+ $EXCLUDE_LIST = '';
if (getConfig('def_refid') > 0) {
$EXCLUDE_LIST = " AND d.userid != ".getConfig('def_refid');
} // END - if
// Check for more extensions
- if (EXT_IS_ACTIVE("beg")) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('beg_uid')."";
- if (EXT_IS_ACTIVE("bonus")) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('bonus_uid')."";
- if (EXT_IS_ACTIVE("doubler")) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('doubler_uid')."";
+ if (EXT_IS_ACTIVE('beg')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('beg_uid')."";
+ if (EXT_IS_ACTIVE('bonus')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('bonus_uid')."";
+ if (EXT_IS_ACTIVE('doubler')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('doubler_uid')."";
// Check for new holiday extension
- if (GET_EXT_VERSION("holiday") >= "0.1.3") {
+ if (GET_EXT_VERSION('holiday') >= '0.1.3') {
// Include only users with no active holiday
$EXCLUDE_LIST .= " AND d.holiday_active='N'";
} // END - if
if (SQL_NUMROWS($result_inactive) > 0) {
// Prepare variables and constants...
- $UIDs = "";
+ $UIDs = '';
define('__INACTIVE_SINCE', (getConfig('ap_inactive_since') / 60 / 60));
define('__INACTIVE_TIME' , (getConfig('ap_in_time') / 60 / 60));
$UIDs = str_replace(", ", "\n", substr($UIDs, 0, -2));
// Send mail notification to admin
- SEND_ADMIN_NOTIFICATION(getMessage('AUTOPURGE_ADMIN_INACTIVE_SUBJECT'), "admin_autopurge_inactive", $UIDs, "");
+ SEND_ADMIN_NOTIFICATION(getMessage('AUTOPURGE_ADMIN_INACTIVE_SUBJECT'), "admin_autopurge_inactive", $UIDs, '');
} // END - if
// Free memory
array($since, $since, $time), __FILE__, __LINE__);
if (SQL_NUMROWS($result_inactive) > 0) {
// Prepare variable...
- $UIDs = "";
+ $UIDs = '';
// Delete inactive accounts
while ($content = SQL_FETCHARRAY($result_inactive)) {
$content['last_online'] = MAKE_DATETIME($content['last_online'], "0");
// Finnaly delete this inactive account
- DELETE_USER_ACCOUNT($content['userid'], LOAD_EMAIL_TEMPLATE("member_autopurge_delete", $content['last_online'], ""));
+ DELETE_USER_ACCOUNT($content['userid'], LOAD_EMAIL_TEMPLATE("member_autopurge_delete", $content['last_online'], ''));
} // END - while
// Remove last comma
$UIDs = str_replace(", ", "\n", substr($UIDs, 0, -2));
// Send mail notification to admin
- if (getConfig('ap_in_notify') == "Y") {
- SEND_ADMIN_NOTIFICATION(getMessage('AUTOPURGE_ADMIN_DELETE_SUBJECT'), "admin_autopurge_delete", $UIDs, "");
+ if (getConfig('ap_in_notify') == 'Y') {
+ SEND_ADMIN_NOTIFICATION(getMessage('AUTOPURGE_ADMIN_DELETE_SUBJECT'), "admin_autopurge_delete", $UIDs, '');
} // END - if
} // END - if
} // END - if
// Abort if autopurge is not active or disabled by admin
-if ((!EXT_IS_ACTIVE("autopurge")) || (getConfig('auto_purge_active') != "Y")) {
+if ((!EXT_IS_ACTIVE('autopurge')) || (getConfig('auto_purge_active') != "Y")) {
// Abort here
return false;
} // END - if
// Search for mails from deleted members?
-if (getConfig('ap_del_mails') == "Y") {
+if (getConfig('ap_del_mails') == 'Y') {
// Okay, let's check for them...
$since = getConfig(('ap_dm_timeout'));
$result_mails = SQL_QUERY_ESC("SELECT sender
SQL_FREERESULT($result_mails);
// Do we have deleted mails and the admin want's to receive a notification
- if (($DELETED > 0) && (getConfig('ap_dm_notify') == "Y")) {
+ if (($DELETED > 0) && (getConfig('ap_dm_notify') == 'Y')) {
// Send out email to admin
- SEND_ADMIN_NOTIFICATION(getMessage('AUTOPURGE_ADMIN_DEL_MAILS_SUBJECT'), "admin_autopurge_del_mails", $DELETED, "");
+ SEND_ADMIN_NOTIFICATION(getMessage('AUTOPURGE_ADMIN_DEL_MAILS_SUBJECT'), "admin_autopurge_del_mails", $DELETED, '');
} // END - if
}
} // END - if
// Abort if autopurge is not active or disabled by admin
-if ((!EXT_IS_ACTIVE("autopurge")) || (getConfig('auto_purge_active') != "Y")) {
+if ((!EXT_IS_ACTIVE('autopurge')) || (getConfig('auto_purge_active') != "Y")) {
// Abort here
return false;
} // END - if
// Check version (must be > 0.0)
-if ((GET_EXT_VERSION("task") > "0.0") && (getConfig('ap_tasks') == "Y")) {
+if ((GET_EXT_VERSION('task') > '0.0') && (getConfig('ap_tasks') == 'Y')) {
// Since when shall we purge?
$since = getConfig(('ap_tasks_time'));
$DELETED = SQL_AFFECTEDROWS();
// Do we need to send a notification?
- if (($DELETED > 0) && (getConfig('ap_tasks_notify') == "Y")) {
+ if (($DELETED > 0) && (getConfig('ap_tasks_notify') == 'Y')) {
// Send out email to admin
- SEND_ADMIN_NOTIFICATION(getMessage('AUTOPURGE_ADMIN_TASKS_SUBJECT'), "admin_autopurge_tsks", $DELETED, "");
+ SEND_ADMIN_NOTIFICATION(getMessage('AUTOPURGE_ADMIN_TASKS_SUBJECT'), "admin_autopurge_tsks", $DELETED, '');
} // END - if
} // END - if
} // END - if
// Abort if autopurge is not active or disabled by admin
-if ((!EXT_IS_ACTIVE("autopurge")) || (getConfig('auto_purge_active') != "Y")) {
+if ((!EXT_IS_ACTIVE('autopurge')) || (getConfig('auto_purge_active') != "Y")) {
// Abort here
return false;
} // END - if
// Shall I auto-purge unconfirmed accounts?
-if (getConfig('autopurge_unconfirmed') == "Y") {
+if (getConfig('autopurge_unconfirmed') == 'Y') {
// Init variables and find unconfirmed accounts which I shall auto-purge
$time = getConfig(('ap_un_time'));
$result_uncon = SQL_QUERY_ESC("SELECT userid, email, joined
array($time), __FILE__, __LINE__);
if (SQL_NUMROWS($result_uncon) > 0) {
// Prepare variable...
- $UIDs = "";
+ $UIDs = '';
define('__UNCONFIRMED_TIME' , (getConfig('ap_un_time') / 60 / 60));
// Delete inactive accounts
$content['joined'] = MAKE_DATETIME($content['joined'], "0");
// Finnaly delete this inactive account
- DELETE_USER_ACCOUNT($content['userid'], LOAD_EMAIL_TEMPLATE("member_autopurge_unconfirmed", $content['joined'], ""));
+ DELETE_USER_ACCOUNT($content['userid'], LOAD_EMAIL_TEMPLATE("member_autopurge_unconfirmed", $content['joined'], ''));
} // END - while
// Remove last comma
$UIDs = str_replace(", ", "\n", substr($UIDs, 0, -2));
// Send mail notification to admin
- if (getConfig('ap_un_notify') == "Y") {
- SEND_ADMIN_NOTIFICATION(getMessage('AUTOPURGE_ADMIN_UNCONFIRMED_SUBJECT'), "admin_autopurge_unconfirmed", $UIDs, "");
+ if (getConfig('ap_un_notify') == 'Y') {
+ SEND_ADMIN_NOTIFICATION(getMessage('AUTOPURGE_ADMIN_UNCONFIRMED_SUBJECT'), "admin_autopurge_unconfirmed", $UIDs, '');
} // END - if
} // END - if
} // END - foreach
// Count cache hits if exists
- if ((isset($_CONFIG['cache_hits'])) && (EXT_IS_ACTIVE("cache"))) {
+ if ((isset($_CONFIG['cache_hits'])) && (EXT_IS_ACTIVE('cache'))) {
$_CONFIG['cache_hits']++;
} // END - if
- } elseif ((!EXT_IS_ACTIVE("cache")) || (!isset($GLOBALS['cache_array']['config'][$no]))) {
+ } elseif ((!EXT_IS_ACTIVE('cache')) || (!isset($GLOBALS['cache_array']['config'][$no]))) {
// Load config from DB
$result_config = SQL_QUERY_ESC("SELECT * FROM `{!_MYSQL_PREFIX!}_config` WHERE config=%d LIMIT 1",
array(bigintval($no)), __FUNCTION__, __LINE__);
define('DEBUG_SQL', false);
// Extra title is empty by default
-$EXTRA_TITLE = "";
+$EXTRA_TITLE = '';
//
?>
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
// Do we need to update cache/db counter?
//* DEBUG: */ echo "DB=".getConfig('db_hits').",CACHE=".getConfig('cache_hits')."<br />\n";
- if ((GET_EXT_VERSION("cache") >= "0.0.7") && (getConfig('db_hits') > 0) && (getConfig('cache_hits') > 0) && (isCacheInstanceValid())) {
+ if ((GET_EXT_VERSION('cache') >= '0.0.7') && (getConfig('db_hits') > 0) && (getConfig('cache_hits') > 0) && (isCacheInstanceValid())) {
// Add new hits
incrementConfigEntry('db_hits', getConfig('db_hits_run'));
// Update counter for db/cache
- UPDATE_CONFIG(array("db_hits", "cache_hits"), array(getConfig(('db_hits')), getConfig(('cache_hits'))));
+ UPDATE_CONFIG(array('db_hits', 'cache_hits'), array(getConfig(('db_hits')), getConfig(('cache_hits'))));
} // END - if
// Close database link and forget the link
// Debugging
//
//* DEBUG: */ $fp = fopen(constant('PATH')."inc/cache/escape_debug.log", 'a') or app_die(__FILE__, __LINE__, "Cannot write debug.log!");
- //* DEBUG: */ fwrite($fp, $F."(".$L."): ".str_replace("\r", "", str_replace("\n", " ", $eval))."\n");
+ //* DEBUG: */ fwrite($fp, $F."(".$L."): ".str_replace("\r", '', str_replace("\n", " ", $eval))."\n");
//* DEBUG: */ fclose($fp);
// Run the code
// Extract table name
$tableArray = explode(" ", $sql);
- $tableName = str_replace("`", "", $tableArray[2]);
+ $tableName = str_replace("`", '', $tableArray[2]);
// Shall we add/drop?
if (((ereg("ADD", $sql)) || (ereg("DROP", $sql))) && ($noIndex)) {
// And column name as well
- $columnName = str_replace("`", "", $tableArray[4]);
+ $columnName = str_replace("`", '', $tableArray[4]);
// Get column information
$result = SQL_QUERY_ESC("SHOW COLUMNS FROM %s LIKE '%s'",
//* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Skipped FULLTEXT: sql=%s,file=%s,line=%s", $sql, $F, $L));
} elseif (!$noIndex) {
// And column name as well
- $columnName = str_replace("`", "", $tableArray[4]);
+ $columnName = str_replace("`", '', $tableArray[4]);
// Is this "UNIQUE" or so? FULLTEXT has been handled the elseif() block above
if (in_array(strtoupper($columnName), array("INDEX", "UNIQUE", "KEY", "FULLTEXT"))) {
$begin = 1; $columnName = ",";
while (strpos($columnName, ",") !== false) {
// Use last
- $columnName = str_replace("`", "", $tableArray[count($tableArray) - $begin]);
+ $columnName = str_replace("`", '', $tableArray[count($tableArray) - $begin]);
//* DEBUG: */ print __LINE__.":".$columnName."----------------".$begin."<br />\n";
// Remove brackes
- $columnName = str_replace("(", "", str_replace(")", "", $columnName));
+ $columnName = str_replace("(", '', str_replace(")", '', $columnName));
//* DEBUG: */ print __LINE__.":".$columnName."----------------".$begin."<br />\n";
// Continue
// If not currently doubled set it to zero
unset($_GET['DOUBLER_UID']);
unset($_POST['DOUBLER_UID']);
-set_session('DOUBLER_UID', "");
+set_session('DOUBLER_UID', '');
if (empty($GLOBALS['doubler_uid'])) $GLOBALS['doubler_uid'] = 0;
// Check for doubles which we can pay out
LIMIT %d", array($DOUBLER_POINTS, $min, getConfig('doubler_max_sent')), __FILE__, __LINE__);
// Do we have entries found?
-if (((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == "Y")) || ((SQL_NUMROWS($result_main) == getConfig('doubler_group_sent')) && (getConfig('doubler_sent_all') != "Y"))) {
+if (((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == 'Y')) || ((SQL_NUMROWS($result_main) == getConfig('doubler_group_sent')) && (getConfig('doubler_sent_all') != "Y"))) {
// Switch to matching SQL resource
$result_load = $result_main;
- if ((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == "Y")) $result_load = $result_total;
+ if ((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == 'Y')) $result_load = $result_total;
// At least one account was found
while ($content = SQL_FETCHARRAY($result_load)) {
// Only double when points are enougth!
if ($DOUBLER_POINTS >= $content['points']) {
// Check for his ref points
- $ref = GET_TOTAL_DATA($content['userid'], "doubler", "points", "refid", false, " AND completed='N' AND is_ref='Y'");
+ $ref = GET_TOTAL_DATA($content['userid'], 'doubler', 'points', 'refid', false, " AND completed='N' AND is_ref='Y'");
// Zero refid when empty (might be helpful!)
if (empty($ref)) $ref = 0;
$okay = false;
// Check for jackpot inclusion in doubling process
- if (($jackpot > 0) && ($jackpot >= $content['points']) && (getConfig('doubler_jackpot') == "Y")) {
+ if (($jackpot > 0) && ($jackpot >= $content['points']) && (getConfig('doubler_jackpot') == 'Y')) {
// Subtract points from jackpot
SUB_JACKPOT($content['points']);
$jackpot -= $content['points'];
require($FQFN);
// Is this extension deprecated?
- if (EXT_GET_DEPRECATED() == "Y") {
+ if (EXT_GET_DEPRECATED() == 'Y') {
// Deactivate the extension
DEACTIVATE_EXTENSION($ext_name);
// Does this extension exists?
//* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "currName=".EXT_GET_CURR_NAME()."");
- if (LOAD_EXTENSION(EXT_GET_CURR_NAME(), "register", "", $dry_run)) {
+ if (LOAD_EXTENSION(EXT_GET_CURR_NAME(), 'register', '', $dry_run)) {
// Set current extension name again
EXT_SET_CURR_NAME($ext_name);
foreach ($history as $ver) {
//* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "ext_name=".EXT_GET_CURR_NAME().", ext_ver={$ver}");
// Load extension in update mode
- LOAD_EXTENSION(EXT_GET_CURR_NAME(), "update", $ver, $dry_run);
+ LOAD_EXTENSION(EXT_GET_CURR_NAME(), 'update', $ver, $dry_run);
// Add update notes to our output
ADD_EXTENSION_NOTES($ver);
EXT_INCREMENT_UPDATE_INTERATOR();
// Check for required file
- if (LOAD_EXTENSION($ext_update, "register", "", $dry_run)) {
+ if (LOAD_EXTENSION($ext_update, 'register', '', $dry_run)) {
// Set current extension name again
EXT_SET_CURR_NAME($ext_name);
} // END - if
// Switch back to register mode
- $EXT_LOAD_MODE = "register";
+ $EXT_LOAD_MODE = 'register';
// Remains true if extension registration reports no failures
//* DEBUG: */ print __FUNCTION__."[".__LINE__."]:currName=".EXT_GET_CURR_NAME().":"; var_dump($test);
runFilterChain('pre_extension_installed', array('dry_run' => $dry_run));
// 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__);
// Is this the sql_patches?
//* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ":".EXT_GET_CURR_NAME()."/{$EXT_LOAD_MODE}");
- if ((EXT_GET_CURR_NAME() == "sql_patches") && (($EXT_LOAD_MODE == "register") || ($EXT_LOAD_MODE == "remove")) && (!$dry_run) && ($test)) {
+ if ((EXT_GET_CURR_NAME() == 'sql_patches') && (($EXT_LOAD_MODE == 'register') || ($EXT_LOAD_MODE == 'remove')) && (!$dry_run) && ($test)) {
//* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ": LOAD!");
if ($logout === true) {
// Then redirect to logout
// Load extension in detected mode
//* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ":ext_name[{$ext_id}]=".EXT_GET_CURR_NAME()."");
- LOAD_EXTENSION(EXT_GET_CURR_NAME(), $load_mode, "", false);
+ LOAD_EXTENSION(EXT_GET_CURR_NAME(), $load_mode, '', false);
// Init these SQLs
INIT_SQLS();
runFilterChain('run_sqls');
// Removal mode?
- if ($load_mode == "remove") {
+ 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__);
} // END - if
// Remove cache file(s) if extension is active
- if (((EXT_IS_ACTIVE("cache")) || (GET_EXT_VERSION("cache") != "")) && (((SQL_AFFECTEDROWS() == 1)) || ($sqlRan === true) || ($load_mode == "activate") || ($load_mode == "deactivate"))) {
+ if (((EXT_IS_ACTIVE('cache')) || (GET_EXT_VERSION('cache') != "")) && (((SQL_AFFECTEDROWS() == 1)) || ($sqlRan === true) || ($load_mode == 'activate') || ($load_mode == 'deactivate'))) {
// Run filters
runFilterChain('post_extension_run_sql', EXT_GET_CURR_NAME());
} // END - if
// Is this the sql_patches?
//* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ": id=".$ext_id.",currName=".EXT_GET_CURR_NAME().",loadMode=".$load_mode);
- if ((EXT_GET_CURR_NAME() == "sql_patches") && (($load_mode == "register") || ($load_mode == "remove"))) {
+ if ((EXT_GET_CURR_NAME() == 'sql_patches') && (($load_mode == 'register') || ($load_mode == 'remove'))) {
// Then redirect to logout
//* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, ": LOAD!");
LOAD_URL("modules.php?module=admin&logout=1&".$load_mode."=sql_patches");
} elseif (isset($GLOBALS['ext_loaded'][$ext_name])) {
// @TODO Extension is loaded, what next?
app_die(__FUNCTION__, __LINE__, "LOADED:$ext_name");
- } elseif (($ext_name == "cache") || (GET_EXT_VERSION("cache") == "")) {
+ } elseif (($ext_name == 'cache') || (GET_EXT_VERSION('cache') == "")) {
//* 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",
//* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, " ext_name={$ext_name},active={$active}");
// Is this extension activated? (For admins we always have active extensions...)
- return ($active == "Y");
+ return ($active == 'Y');
}
// Get version from extensions
function GET_EXT_VERSION ($ext_name) {
INIT_INC_POOL();
// Load extension in test mode
- LOAD_EXTENSION($ext_name, "test", $ext_ver, $dry_run);
+ LOAD_EXTENSION($ext_name, 'test', $ext_ver, $dry_run);
// Save version history
$history = EXT_GET_VER_HISTORY();
$GLOBALS['cache_array']['update_ver'][EXT_GET_CURR_NAME()] = $history[$idx];
// Load again...
- LOAD_EXTENSION(EXT_GET_CURR_NAME(), "update", $GLOBALS['cache_array']['update_ver'][EXT_GET_CURR_NAME()], $dry_run);
+ LOAD_EXTENSION(EXT_GET_CURR_NAME(), 'update', $GLOBALS['cache_array']['update_ver'][EXT_GET_CURR_NAME()], $dry_run);
if (EXT_GET_UPDATE_DEPENDS() != "") {
// Is the extension there?
// Init variables
$SW = 2; $i = 1;
- $OUT = "";
+ $OUT = '';
// Do we have queries?
- if ((IS_SQLS_VALID()) && (GET_EXT_VERSION("sql_patches") >= "0.0.7") && (getConfig('verbose_sql') == "Y")) {
+ if ((IS_SQLS_VALID()) && (GET_EXT_VERSION('sql_patches') >= '0.0.7') && (getConfig('verbose_sql') == 'Y')) {
foreach (GET_SQLS() as $idx => $sql) {
// Trim out spaces
$sql = trim($sql);
// Load main template
$OUT = LOAD_TEMPLATE("admin_ext_sql_table", true, $content);
- } elseif ((GET_EXT_VERSION("sql_patches") >= "0.0.7") && (getConfig('verbose_sql') == "Y")) {
+ } elseif ((GET_EXT_VERSION('sql_patches') >= '0.0.7') && (getConfig('verbose_sql') == 'Y')) {
// No addional SQL commands to run
- $OUT = LOAD_TEMPLATE("admin_settings_saved", true, getMessage('ADMIN_NO_ADDITIONAL_SQLS'));
+ $OUT = LOAD_TEMPLATE('admin_settings_saved', true, getMessage('ADMIN_NO_ADDITIONAL_SQLS'));
} // END - if
// Return output
// Get extension name from id
function GET_EXT_NAME ($ext_id) {
// Init extension name
- $ret = "";
+ $ret = '';
// Is cache there?
if (isset($GLOBALS['cache_array']['extensions']['ext_name'][$ext_id])) {
// Count cache hits
incrementConfigEntry('cache_hits');
- } elseif (!EXT_IS_ACTIVE("cache")) {
+ } 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__);
// Count cache hits
incrementConfigEntry('cache_hits');
- } elseif (!EXT_IS_ACTIVE("cache")) {
+ } 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__);
// Extension has been activated?
if (SQL_AFFECTEDROWS() == 1) {
// Then run all queries
- EXTENSION_RUN_SQLS(GET_EXT_ID($ext_name), "activate");
+ EXTENSION_RUN_SQLS(GET_EXT_ID($ext_name), 'activate');
} // END - if
}
// Extension has been activated?
if (SQL_AFFECTEDROWS() == 1) {
// Then run all queries
- EXTENSION_RUN_SQLS(GET_EXT_ID($ext_name), "deactivate");
+ EXTENSION_RUN_SQLS(GET_EXT_ID($ext_name), 'deactivate');
// Create new task
CREATE_EXTENSION_DEACTIVATION_TASK($ext_name);
$currVersion = GET_EXT_VERSION($ext_name);
// Remove all dots from both versions
- $currVersion = str_replace(".", "", $currVersion);
- $ext_ver = str_replace(".", "", $ext_ver);
+ $currVersion = str_replace(".", '', $currVersion);
+ $ext_ver = str_replace(".", '', $ext_ver);
// Now compare both and return the result
return ($currVersion < $ext_ver);
// All is false by default
$ret = false;
- //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "mod={$mod},cache=".GET_EXT_VERSION("cache"));
- if (GET_EXT_VERSION("cache") >= "0.1.2") {
+ //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "mod={$mod},cache=".GET_EXT_VERSION('cache'));
+ if (GET_EXT_VERSION('cache') >= '0.1.2') {
// Cache version is okay, so let's check the cache!
if (isset($GLOBALS['cache_array']['modules']['has_menu'][$mod])) {
// Check module cache and count hit
- $ret = ($GLOBALS['cache_array']['modules']['has_menu'][$mod] == "Y");
+ $ret = ($GLOBALS['cache_array']['modules']['has_menu'][$mod] == 'Y');
incrementConfigEntry('cache_hits');
} elseif (isset($GLOBALS['cache_array']['extensions']['ext_menu'][$mod])) {
// Check cache and count hit
- $ret = ($GLOBALS['cache_array']['extensions']['ext_menu'][$mod] == "Y");
+ $ret = ($GLOBALS['cache_array']['extensions']['ext_menu'][$mod] == 'Y');
incrementConfigEntry('cache_hits');
- } elseif ((IS_ADMIN()) && ($mod == "admin")) {
+ } elseif ((IS_ADMIN()) && ($mod == 'admin')) {
// Admin module has always a menu!
$ret = true;
}
- } elseif ((GET_EXT_VERSION("sql_patches") >= "0.3.6") && ((!EXT_IS_ACTIVE("cache")) || ($forceDb === true))) {
+ } 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__);
$GLOBALS['cache_array']['extensions']['ext_menu'][$mod] = $has_menu;
// Does it have a menu?
- $ret = ($has_menu == "Y");
+ $ret = ($has_menu == 'Y');
} // END - if
// Free memory
SQL_FREERESULT($result);
- } elseif (GET_EXT_VERSION("sql_patches") == "") {
+ } elseif (GET_EXT_VERSION('sql_patches') == "") {
// No sql_patches installed, so maybe in admin area or no admin registered?
- $ret = (((IS_ADMIN()) || (!isAdminRegistered())) && ($mod == "admin")); // Then there is a menu!
+ $ret = (((IS_ADMIN()) || (!isAdminRegistered())) && ($mod == 'admin')); // Then there is a menu!
}
// Return status
// Add updates notes for given version
function ADD_EXTENSION_NOTES ($ver) {
// Init notes/content
- $out = ""; $content = array();
+ $out = ''; $content = array();
// Is do we have verbose output enabled?
- if ((getConfig('verbose_sql') == "Y") || (!EXT_IS_ACTIVE("sql_patches"))) {
+ if ((getConfig('verbose_sql') == 'Y') || (!EXT_IS_ACTIVE('sql_patches'))) {
// Update notes found?
- if (EXT_GET_UPDATE_NOTES() != "") {
+ if (EXT_GET_UPDATE_NOTES() != '') {
// Update notes found
$content = array(
'ver' => $ver,
// Reset them
EXT_SET_UPDATE_NOTES("");
- } elseif (($ver == "0.0") || ($ver == "0.0.0")) {
+ } elseif (($ver == '0.0') || ($ver == '0.0.0')) {
// Initial release
$content = array(
'ver' => $ver,
}
// Load template
- $out = LOAD_TEMPLATE("admin_ext_notes", true, $content);
+ $out = LOAD_TEMPLATE('admin_ext_notes', true, $content);
} // END - if
// Add the notes
// Setter for EXT_VERSION flag
function EXT_SET_VERSION ($version) {
- $GLOBALS['ext_version'][EXT_GET_CURR_NAME()] = (float) $version;
+ $GLOBALS['ext_version'][EXT_GET_CURR_NAME()] = (string) $version;
}
// Getter for EXT_VERSION flag
// Init extension notice
function EXT_INIT_NOTES () {
- $GLOBALS['ext_notes'] = "";
+ $GLOBALS['ext_notes'] = '';
}
// Append extension notice
}
// Version number
-EXT_SET_VERSION("0.0");
+EXT_SET_VERSION('0.0');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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
+case 'remove': // Do stuff when removing extension
// SQL commands to run
break;
-case "activate": // Do stuff when admin activates this extension
+case 'activate': // Do stuff when admin activates this extension
// SQL commands to run
break;
-case "deactivate": // Do stuff when admin deactivates this extension
+case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ case '0.0.1': // SQL queries for v0.0.1
$SQLs[] = "";
// Update notes (these will be set as task text!)
}
break;
-case "modify": // When the extension got modified
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.0.9");
+EXT_SET_VERSION('0.0.9');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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
+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('online_extra_links', 'ADD_LINK_ACTIVE_LIST', true, $dry_run);
break;
-case "activate": // Do stuff when admin activates this extension
+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
+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
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ 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
+ 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
+ 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
+ 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
+ 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)");
EXT_SET_UPDATE_NOTES("Aktiven-Liste im Gastbereich ist nun einschränkbar.");
break;
- case "0.0.6": // SQL queries for v0.0.6
+ 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
+ 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
+ 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");
+ 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);
}
break;
-case "modify": // When the extension got modified
+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.
+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
}
// Version of this extension
-EXT_SET_VERSION("0.7.2");
+EXT_SET_VERSION('0.7.2');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.1", "0.2", "0.3", "0.3.1", "0.4.0", "0.4.1", "0.4.2", "0.4.3", "0.4.4", "0.4.5", "0.4.6", "0.4.7", "0.4.8", "0.4.9", "0.5.0", "0.5.1", "0.5.2", "0.5.3", "0.5.4", "0.5.5", "0.5.6", "0.5.7", "0.5.8", "0.5.9", "0.6.0", "0.6.1", "0.6.2", "0.6.3", "0.6.4", "0.6.5", "0.6.6", "0.6.7", "0.6.8", "0.6.9", "0.7.0", "0.7.1", "0.7.2"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.2.0', '0.3.0', '0.3.1', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.5', '0.6.6', '0.6.7', '0.6.8', '0.6.9', '0.7.0', '0.7.1', '0.7.2'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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
+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`");
UNREGISTER_FILTER('sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', true, $dry_run);
break;
-case "activate": // Do stuff when admin activates this extension
+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
+case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
ADD_EXT_SQL("");
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.2": // SQL queries for v0.2
+ 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": // SQL queries for v0.3
+ 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')");
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
+ 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
+ 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,
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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ case '0.6.8': // SQL queries for v0.6.8
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("<strong>set_session()</strong> mit @-Zeichen gegen ungewollte Ausgaben abgesichert.");
break;
- case "0.6.9": // SQL queries for v0.6.9
+ 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
+ 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
+ case '0.7.1': // SQL queries for v0.7.1
// Update depends on sql_patches
- EXT_ADD_UPDATE_DEPENDS("sql_patches");
+ EXT_ADD_UPDATE_DEPENDS('sql_patches');
// Add filters
REGISTER_FILTER('sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', false, true, $dry_run);
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
+ 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");
}
break;
-case "modify": // When the extension got modified
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.0");
+EXT_SET_VERSION('0.0');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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`='misc' WHERE `what`='maintenance'");
break;
-case "remove": // Do stuff when removing extension
+case 'remove': // Do stuff when removing extension
// SQL commands to run
ADD_EXT_SQL("");
break;
-case "activate": // Do stuff when admin activates this extension
+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
+case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
ADD_EXT_SQL("");
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.1
+ case '0.0.1': // SQL queries for v0.1
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("");
break;
}
break;
-case "modify": // When the extension got modified
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.0");
+EXT_SET_VERSION('0.0');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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`='setup' WHERE `what`='maintenance' LIMIT 1");
break;
-case "remove": // Do stuff when removing extension
+case 'remove': // Do stuff when removing extension
// SQL commands to run
ADD_EXT_SQL("");
break;
-case "activate": // Do stuff when admin activates this extension
+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
+case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
ADD_EXT_SQL("");
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ 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;
-case "modify": // When the extension got modified
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.4.0");
+EXT_SET_VERSION('0.4.0');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.1", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.7", "0.3.8", "0.3.9", "0.4.0"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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"))
- {
+ 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
+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"))
- {
+ 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
+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
+case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
ADD_EXT_SQL("");
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.1": // SQL queries for v0.1
+ 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'");
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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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)."'");
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
+ 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'");
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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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>ADMIN_USER_PROFILE_LINK()</u> ausgelagert.");
break;
- case "0.2.8": // SQL queries for v0.2.8
+ 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>ADMIN_USER_PROFILE_LINK()</u> ausgelagert.");
break;
- case "0.2.9": // SQL queries for v0.2.9
+ 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
+ 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
+ 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
+ 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
+ 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'");
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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.0");
+EXT_SET_VERSION('0.0');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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` (
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
+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("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='bank'");
break;
-case "activate": // Do stuff when admin activates this extension
+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
+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
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ case '0.0.1': // SQL queries for v0.0.1
ADD_EXT_SQL("");
// Update notes (these will be set as task text!)
}
break;
-case "modify": // When the extension got modified
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.2.6");
+EXT_SET_VERSION('0.2.6');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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')");
) TYPE={!_TABLE_TYPE!}");
break;
-case "remove": // Do stuff when removing extension
+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("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_beg_ips`");
break;
-case "activate": // Do stuff when admin activates this extension
+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");
+ 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
+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
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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/".GET_LANGUAGE()."/html/) in den neuen Order beg!");
break;
- case "0.1.0": // SQL queries for v0.2.1
+ 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
+ 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":
+ 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!}_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"; }
+ 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')");
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
+ 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
+ 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
+ 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
+ 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
+ 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'");
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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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");
EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut.");
break;
- case "0.2.5": // SQL queries for v0.2.5
+ 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
+ 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 ;");
}
break;
-case "modify": // When the extension got modified
+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.
+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
$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")) {
+ 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
}
// Version number
-EXT_SET_VERSION("0.3.9");
+EXT_SET_VERSION('0.3.9');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.1", "0.2", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.7", "0.3.8", "0.3.9"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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
+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
+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
+case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
ADD_EXT_SQL("");
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.1": // SQL queries for v0.1
+ 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.2": // SQL queries for v0.2
+ 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` (
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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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/".GET_LANGUAGE()."/html/) in den neuen Order birthday!");
break;
- case "0.3.4": // SQL queries for v0.3.4
+ 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
+ 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
+ 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'");
EXT_SET_UPDATE_NOTES("Vergütungsmodus des Geburtstagsbonus einstellbar.");
break;
- case "0.3.7": // SQL queries for v0.3.7
+ 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
+ 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
+ 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");
}
break;
-case "modify": // When the extension got modified
+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.
+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
}
// Version of this extension
-EXT_SET_VERSION("0.8.8");
+EXT_SET_VERSION('0.8.8');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.1.6", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.7", "0.3.8", "0.3.9", "0.4.0", "0.4.1", "0.4.2", "0.4.3", "0.4.4", "0.4.5", "0.4.6", "0.4.7", "0.4.8", "0.4.9", "0.5.0", "0.5.1", "0.5.2", "0.5.3", "0.5.4", "0.5.5", "0.5.6", "0.5.7", "0.5.8", "0.5.9", "0.6.0", "0.6.1", "0.6.2", "0.6.3", "0.6.4", "0.6.5", "0.6.6", "0.6.7", "0.6.8", "0.6.9", "0.7.0", "0.7.1", "0.7.2", "0.7.3", "0.7.4", "0.7.5", "0.7.6", "0.7.7", "0.7.8", "0.7.9", "0.8.0", "0.8.1", "0.8.2", "0.8.3", "0.8.4", "0.8.5", "0.8.6", "0.8.7", "0.8.8"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.1.6', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.5', '0.6.6', '0.6.7', '0.6.8', '0.6.9', '0.7.0', '0.7.1', '0.7.2', '0.7.3', '0.7.4', '0.7.5', '0.7.6', '0.7.7', '0.7.8', '0.7.9', '0.8.0', '0.8.1', '0.8.2', '0.8.3', '0.8.4', '0.8.5', '0.8.6', '0.8.7', '0.8.8'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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("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'");
+ 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
+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("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus_turbo`");
break;
-case "activate": // Do stuff when admin activates this extension
+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");
+ 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
+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
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.1.6": // SQL queries for v0.1.6
+ 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
+ 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
+ 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");
EXT_SET_UPDATE_NOTES("Login-Bonus und Turbo-Klick-Bonus intergriert.");
break;
- case "0.2.2": // SQL queries for v0.2.2
+ 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,
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
+ 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)");
EXT_SET_UPDATE_NOTES("Aktiv-Rallye mit Klick-Vergütung hinzugefügt.");
break;
- case "0.2.4": // SQL queries for v0.2.4
+ 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
+ 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`");
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
+ 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
+ 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
+ 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");
EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert");
break;
- case "0.2.9": // SQL queries for v0.2.9
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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");
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
+ 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
+ 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
+ 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
+ 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
+ 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");
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
+ 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
+ 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
+ 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
+ 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'");
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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ case '0.5.6': // SQL queries for v0.5.6
// Get current month
$curr = date("m", time());
if (strlen($curr) == 1) $curr = "0".$curr;
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
+ case '0.5.7': // SQL queries for v0.5.7
break;
- case "0.5.8": // SQL queries for v0.5.8
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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'");
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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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'");
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
+ 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
+ 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
+ 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
+ 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
+ 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'");
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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
}
break;
-case "modify": // When the extension got modified
+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.
+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") {
+ 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')));
}
// Check for bonus rallye is active and send mails out
- if ((getConfig('bonus_active') == "Y") && (getConfig('bonus_new_mem_notify') == "Y")) {
+ 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')));
}
}
// Version number
-EXT_SET_VERSION("0.0");
+EXT_SET_VERSION('0.0');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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)."");
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
+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
+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
+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 "modify": // When the extension got modified
- break;
-
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ case '0.0.1': // SQL queries for v0.0.1
ADD_EXT_SQL("");
// Update notes (these will be set as task text!)
break;
}
-case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+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
}
// Version number
-EXT_SET_VERSION("0.2.2");
+EXT_SET_VERSION('0.2.2');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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("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
+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_FILTER('extension_remove', 'CACHE_DESTROY_ALL', true, $dry_run);
break;
-case "activate": // Do stuff when admin activates this extension
+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
+case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
ADD_EXT_SQL("");
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ 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
+ 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
+ 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
+ case '0.0.4': // SQL queries for v0.0.4
// Is the cache extension itself there?
- if (EXT_IS_ACTIVE("cache")) {
+ 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
EXT_SET_UPDATE_NOTES("Spalte "keep_active" ist hinzugefügt. Cache wurde reinitialisiert.");
break;
- case "0.0.5": // SQL queries for v0.0.5
+ 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
+ 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
+ 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)");
EXT_SET_UPDATE_NOTES("Hits auf den Cache werden gezählt.");
break;
- case "0.0.8": // SQL queries for v0.0.8
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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'");
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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ case '0.2.0': // SQL queries for v0.2.0
// This update depends on sql_patches
- EXT_ADD_UPDATE_DEPENDS("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
+ 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);
EXT_SET_UPDATE_NOTES("Filter für Erweiterungsmanagement hinzugefügt.");
break;
- case "0.2.2": // SQL queries for v0.2.2
+ 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);
}
break;
-case "modify": // When the extension got modified
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.0.4");
+EXT_SET_VERSION('0.0.4');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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` (
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
+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
+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
+case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
ADD_EXT_SQL("");
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ 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
+ 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
+ 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
+ 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;
-case "modify": // When the extension got modified
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.0");
+EXT_SET_VERSION('0.0');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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` (
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
+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("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='debug'");
break;
-case "activate": // Do stuff when admin activates this extension
+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
+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
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ case '0.0.1': // SQL queries for v0.0.1
ADD_EXT_SQL("");
// Update notes (these will be set as task text!)
}
break;
-case "modify": // When the extension got modified
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.0.1");
+EXT_SET_VERSION('0.0.1');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.0.1"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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
+case 'remove': // Do stuff when removing extension
// SQL commands to run
ADD_EXT_SQL("");
break;
-case "activate": // Do stuff when admin activates this extension
+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
+case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
ADD_EXT_SQL("");
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ 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;
-case "modify": // When the extension got modified
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.1.6");
+EXT_SET_VERSION('0.1.6');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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` (
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
+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!}_member_menu` WHERE `what`='doubler'");
break;
-case "activate": // Do stuff when admin activates this extension
+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");
+ 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
+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
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ 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
+ 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");
EXT_SET_UPDATE_NOTES("Gebühr wird vom Verdoppler-Pott abgezogen.");
break;
- case "0.0.3": // SQL queries for v0.0.3
+ 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
+ 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'");
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
+ 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
+ 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'");
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
+ 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
+ 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/".GET_LANGUAGE()."/html/) in den neuen Order doubler!");
break;
- case "0.0.9": // SQL queries for v0.0.9
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.0");
+EXT_SET_VERSION('0.0');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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
+case 'remove': // Do stuff when removing extension
// SQL commands to run
break;
-case "activate": // Do stuff when admin activates this extension
+case 'activate': // Do stuff when admin activates this extension
// SQL commands to run
break;
-case "deactivate": // Do stuff when admin deactivates this extension
+case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ case '0.0.1': // SQL queries for v0.0.1
ADD_EXT_SQL("");
// Update notes (these will be set as task text!)
}
break;
-case "modify": // When the extension got modified
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.2.1");
+EXT_SET_VERSION('0.2.1');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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` (
ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value='0' LIMIT 1");
break;
-case "remove": // Do stuff when removing extension
+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("INSERT INTO `{!_MYSQL_PREFIX!}_max_receive` (value, comment) VALUES ('0','Urlaub')");
break;
-case "activate": // Do stuff when admin activates this extension
+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
+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
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.2": // SQL queries for v0.0.2
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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>ADMIN_USER_PROFILE_LINK()</u> ausgelagert.");
break;
- case "0.0.9": // SQL queries for v0.0.9
+ 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.0": // SQL queries for v0.2.1
+ 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.1.1": // SQL queries for v0.1.1
+ 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
+ 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.1.3": // SQL queries for v0.1.3
+ 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)."'");
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.1.4": // SQL queries for v0.1.4
+ 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'");
// 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.5": // SQL queries for v0.1.5
+ 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'");
// 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
+ 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("Fehlende Tabellenspalte hinzugefügt.");
break;
- case "0.1.7": // SQL queries for v0.1.7
+ 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.1.8": // SQL queries for v0.1.8
+ 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");
+ 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
+ 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;
- case "0.2.0": // SQL queries for v0.2.0
+ 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
+ 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;
-case "modify": // When the extension got modified
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.1.6");
+EXT_SET_VERSION('0.1.6');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.51", "0.0.52", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', "0.0.51", "0.0.52", '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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("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
+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("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='html_mail'");
break;
-case "activate": // Do stuff when admin activates this extension
+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
+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
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.6": // SQL queries for v0.0.6
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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":
+ case '0.1.6':
// Dependency is needed for ext-registration!! (want to alter a non existent Table)
- EXT_ADD_UPDATE_DEPENDS("bonus");
+ 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
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.0.1");
+EXT_SET_VERSION('0.0.1');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.0.1"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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
+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
+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
+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
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.2
+ 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'),
('ZW', 'Zimbabwe', 'ext-iso3166');");
// This extension depends on the country extension
- EXT_ADD_UPDATE_DEPENDS("country");
+ 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;
-case "modify": // When the extension got modified
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.0");
+EXT_SET_VERSION('0.0');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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
+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
+case 'activate': // Do stuff when admin activates this extension
// SQL commands to run
break;
-case "deactivate": // Do stuff when admin deactivates this extension
+case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ case '0.0.1': // SQL queries for v0.0.1
ADD_EXT_SQL("");
// Update notes (these will be set as task text!)
}
break;
-case "modify": // When the extension got modified
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.3.3");
+EXT_SET_VERSION('0.3.3');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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
+case 'remove': // Do stuff when removing extension
// SQL commands to run
ADD_EXT_SQL("");
break;
-case "activate": // Do stuff when admin activates this extension
+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");
+ 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
+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
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.0.6");
+EXT_SET_VERSION('0.0.6');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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
+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
+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
+case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
ADD_EXT_SQL("");
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.0.9");
+EXT_SET_VERSION('0.0.9');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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
+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
+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
+case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
ADD_EXT_SQL("");
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ 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
+ 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
+ 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
+ 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` (
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
+ 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
+ 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
+ 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)");
Bitte stellen Sie diesen derzeit manuell unter <a href=\"{!URL!}/modules.php?module=admin&what=config_mediadata\">Einstellungen-Medidata</a> selber einstellen.");
break;
- case "0.0.8": // SQL queries for v0.0.8
+ 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
+ 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!)
}
break;
-case "modify": // When the extension got modified
+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.
+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 ((isset($dry_run)) && (isset($EXT_LOAD_MODE))) {
- if ((!$dry_run) && ($EXT_LOAD_MODE == "update") && ($EXT_VER == "0.0.4")) {
+ if ((!$dry_run) && ($EXT_LOAD_MODE == 'update') && ($EXT_VER == '0.0.4')) {
// Add auto-check file
ADD_INC_TO_POOL(sprintf("%sinc/gen_mediadata.php", constant('PATH')));
} // END - if
}
// Version number
-EXT_SET_VERSION("0.0.8");
+EXT_SET_VERSION('0.0.8');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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
+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
+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
+case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
ADD_EXT_SQL("");
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.2": // SQL queries for v0.0.2
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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!)
}
break;
-case "modify": // When the extension got modified
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.1.8");
+EXT_SET_VERSION('0.1.8');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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
+case 'remove': // Do stuff when removing extension
// SQL commands to run
ADD_EXT_SQL("");
break;
-case "activate": // Do stuff when admin activates this extension
+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
+case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
ADD_EXT_SQL("");
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.2": // SQL queries for v0.0.2
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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/".GET_LANGUAGE()."/html/member/ !) mit hoch!</strong>");
// Depends on 'country'!
- EXT_ADD_UPDATE_DEPENDS("country");
+ EXT_ADD_UPDATE_DEPENDS('country');
break;
- case "0.1.3": // SQL queries for v0.1.3
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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;
-case "modify": // When the extension got modified
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.0");
+EXT_SET_VERSION('0.0');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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
+case 'remove': // Do stuff when removing extension
// SQL commands to run
break;
-case "activate": // Do stuff when admin activates this extension
+case 'activate': // Do stuff when admin activates this extension
// SQL commands to run
break;
-case "deactivate": // Do stuff when admin deactivates this extension
+case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ case '0.0.1': // SQL queries for v0.0.1
ADD_EXT_SQL("");
// Update notes (these will be set as task text!)
}
break;
-case "modify": // When the extension got modified
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.1.2");
+EXT_SET_VERSION('0.1.2');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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
+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
+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
+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
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ 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)");
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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.1.9");
+EXT_SET_VERSION('0.1.9');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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
+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
+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
+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
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ 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");
+ 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
+ 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
+ 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
+ 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
+ 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, _'");
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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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` (
}
break;
-case "modify": // When the extension got modified
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.0.5");
+EXT_SET_VERSION('0.0.5');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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` (
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
+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'");
UNREGISTER_FILTER('init', 'UPDATE_ONLINE_LIST', true, $dry_run);
break;
-case "activate": // Do stuff when admin activates this extension
+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
+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
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ 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
+ 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
+ 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
+ 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
+ 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
}
break;
-case "modify": // When the extension got modified
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.0.6");
+EXT_SET_VERSION('0.0.6');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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,
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
+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
+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
+case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
ADD_EXT_SQL("");
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.5.0");
+EXT_SET_VERSION('0.5.0');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.1", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.7", "0.3.8", "0.3.9", "0.4.0", "0.4.1", "0.4.2", "0.4.3", "0.4.4", "0.4.5", "0.4.6", "0.4.7", "0.4.8", "0.4.9", "0.5.0"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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
+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
+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");
+ 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
+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
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.1": // SQL queries for v0.1
+ 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.')");
EXT_SET_UPDATE_NOTES("Maximale Mailbuchungen sind nun vom maximalen Empfang abhägig.");
break;
- case "0.1.1": // SQL queries for v0.1.1
+ 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");
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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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>");
break;
- case "0.2.7": // SQL queries for v0.2.7
+ 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
+ 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
+ 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
+ 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
+ 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'");
EXT_SET_UPDATE_NOTES("Beworbene URL wird nun getestet.");
break;
- case "0.3.2": // SQL queries for v0.3.2
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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");
EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut.");
break;
- case "0.4.7": // SQL queries for v0.4.7
+ 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
+ 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
+ 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
+ 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,
}
break;
-case "modify": // When the extension got modified
+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.
+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")) {
+ 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
}
// Version number
-EXT_SET_VERSION("0.2.1");
+EXT_SET_VERSION('0.2.1');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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
+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
+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
+case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
ADD_EXT_SQL("");
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ 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.2": // SQL queries for v0.0.2
+ 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.3": // SQL queries for v0.0.3
+ 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
+ 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.");
break;
- case "0.0.5": // SQL queries for v0.0.5
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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>
</ol>");
break;
- case "0.1.1": // SQL queries for v0.1.1
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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;
- case "0.1.7": // SQL queries for v0.1.7
+ 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;
- case "0.1.8": // SQL queries for v0.1.8
+ 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
+ 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;
- case "0.2.0": // SQL queries for v0.2.0
+ 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;
- case "0.2.1": // SQL queries for v0.2.1
+ 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!)
}
break;
-case "modify": // When the extension got modified
+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.
+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
}
// Version of this extension
-EXT_SET_VERSION("0.3.8");
+EXT_SET_VERSION('0.3.8');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.1", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.7", "0.3.8"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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` (
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
+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!}_member_menu` WHERE `what`='payout'");
break;
-case "activate": // Do stuff when admin activates this extension
+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
+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
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.1.2": // SQL queries for v0.1.2
+ 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
+ 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 pass_enc ENUM('md5','base64','none') NOT NULL DEFAULT 'md5'");
break;
- case "0.1.4": // SQL queries for v0.1.4
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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>ADMIN_USER_PROFILE_LINK()</u> ausgelagert.");
break;
- case "0.2.8": // SQL queries for v0.2.8
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+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.
+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
}
// Version of this extension
-EXT_SET_VERSION("0.0");
+EXT_SET_VERSION('0.0');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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` (
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
+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
+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
+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
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ 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;
-case "modify": // When the extension got modified
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.0.9");
+EXT_SET_VERSION('0.0.9');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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
+case 'remove': // Do stuff when removing extension
// SQL commands to run
ADD_EXT_SQL("");
break;
-case "activate": // Do stuff when admin activates this extension
+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
+case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
ADD_EXT_SQL("");
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.3.5");
+EXT_SET_VERSION('0.3.5');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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("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
+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`");
UNREGISTER_FILTER('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', true, $dry_run);
break;
-case "activate": // Do stuff when admin activates this extension
+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
+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
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ case '0.1.9': // SQL queries for v0.1.9
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("Funktion ADMIN_USER_PROFILE_LINK() mit Verlinkung auf Referal-Liste implementiert.");
break;
- case "0.2.0": // SQL queries for v0.2.0
+ 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'");
</ul>");
break;
- case "0.2.1": // SQL queries for v0.2.1
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ case '0.3.5': // SQL queries for 0.3.5
// This update depends on sql_patches
- EXT_ADD_UPDATE_DEPENDS("sql_patches");
+ EXT_ADD_UPDATE_DEPENDS('sql_patches');
// Register filter
REGISTER_FILTER('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', false, true, $dry_run);
}
break;
-case "modify": // When the extension got modified
+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.
+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);
+ $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 = ''; $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)";
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"))) {
+ if ((SQL_NUMROWS($result) == 1) && (EXT_IS_ACTIVE('autopurge'))) {
// End rallye here...
RALLYE_EXPIRE_RALLYES($result);
} // END - if
}
// Version number
-EXT_SET_VERSION("0.0.1");
+EXT_SET_VERSION('0.0.1');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0","0.0.1"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0','0.0.1'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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` (
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
+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("UPDATE `{!_MYSQL_PREFIX!}_refsystem` SET level=level-1");
break;
-case "activate": // Do stuff when admin activates this extension
+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
+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
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ 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");
}
break;
-case "modify": // When the extension got modified
+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.
+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
}
// Shall we include special files?
-if ($EXT_LOAD_MODE == "register") {
+if ($EXT_LOAD_MODE == 'register') {
// Execute this special file on this update
ADD_INC_TO_POOL(sprintf("%sinc/gen_refback.php",
constant('PATH')
}
// Version number
-EXT_SET_VERSION("0.5.2");
+EXT_SET_VERSION('0.5.2');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.1", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.7", "0.3.8", "0.3.9", "0.4.0", "0.4.1", "0.4.2", "0.4.3", "0.4.4", "0.4.5", "0.4.6", "0.4.7", "0.4.8", "0.4.9", "0.5.0", "0.5.1", "0.5.2"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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
+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
+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
+case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
ADD_EXT_SQL("");
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.1": // SQL queries for v0.1
+ 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,
EXT_SET_UPDATE_NOTES("Einstellbare Pflichtfelder hinzugefügt.");
break;
- case "0.1.1": // SQL queries for v0.1.1
+ 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");
+ 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
+ case '0.1.3': // SQL queries for v0.1.3
// This update depends on sql_patches update!
- EXT_ADD_UPDATE_DEPENDS("sql_patches");
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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/".GET_LANGUAGE()."/html/guest/ zu finden ist!</strong>");
// Depends on 'country'
- EXT_ADD_UPDATE_DEPENDS("country");
+ EXT_ADD_UPDATE_DEPENDS('country');
break;
- case "0.3.3": // SQL queries for v0.3.3
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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");
EXT_SET_UPDATE_NOTES("Bei der Anmeldung kann die Standart-Auswahl zwischen Ja/Nein umgeschaltet werden. Das Ändern des Templates <strong>templates/".GET_LANGUAGE()."/html/guest/guest_register.tpl</strong> ist nicht mehr nötig.");
break;
- case "0.4.3": // SQL queries for v0.4.3
+ 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
+ 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
+ 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
+ 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
+ case '0.4.7': // SQL queries for v0.4.7
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("<strong>set_session()</strong> mit @-Zeichen gegen ungewollte Ausgaben abgesichert.");
break;
- case "0.4.8": // SQL queries for v0.4.8
+ 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
+ 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
+ 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 REGISTER_ADD_CATEGORY_TABLE() 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
+ 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
+ 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
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.0.1");
+EXT_SET_VERSION('0.0.1');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.0.1"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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("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
+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'");
UNREGISTER_FILTER('post_youhere_line', 'ADD_ANONYMITY_NOTICE', true, $dry_run);
break;
-case "activate": // Do stuff when admin activates this extension
+case 'activate': // Do stuff when admin activates this extension
// SQL commands to run
break;
-case "deactivate": // Do stuff when admin deactivates this extension
+case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ case '0.0.1': // SQL queries for v0.0.1
// Update depends on sql_patches
- EXT_ADD_UPDATE_DEPENDS("sql_patches");
+ EXT_ADD_UPDATE_DEPENDS('sql_patches');
// Add filters
REGISTER_FILTER('post_youhere_line', 'ADD_ANONYMITY_NOTICE', false, true, $dry_run);
}
break;
-case "modify": // When the extension got modified
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.1.5");
+EXT_SET_VERSION('0.1.5');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.1", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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
+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
+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
+case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
ADD_EXT_SQL("");
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.1": // SQL queries for v0.1
+ 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_amenu','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_gmenu','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_mmenu','Mitglied-Menü', 4, 'Repariert die Gewichtung des Mitglieder-Menü-Systems')");
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
+ 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
+ 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
+ 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
+ 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
+ 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;
}
break;
-case "modify": // When the extension got modified
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.1.3");
+EXT_SET_VERSION('0.1.3');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// Check if mod_rewrite is loadeded
if (!IF_APACHE_MODULE_LOADED('mod_rewrite')){
EXT_SET_REPORTS_FAILURE(true);
ADD_EXT_SQL("");
break;
-case "remove": // Do stuff when removing extension
+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
+case 'activate': // Do stuff when admin activates this extension
// Check if mod_rewrite is loadeded
if (!IF_APACHE_MODULE_LOADED('mod_rewrite')) {
SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_extensions` SET ext_active='N' WHERE ext_name='rewrite' LIMIT 1", __FILE__, __LINE__);
ADD_EXT_SQL("");
break;
-case "deactivate": // Do stuff when admin deactivates this extension
+case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
ADD_EXT_SQL("");
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ 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
+ 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
+ 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.");
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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)");
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
+ 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
+ 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
+ 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":
+ case '0.1.3':
// Check if mod_rewrite is loadeded
if (!IF_APACHE_MODULE_LOADED('mod_rewrite')){
EXT_SET_REPORTS_FAILURE(true);
}
break;
-case "modify": // When the extension got modified
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.0");
+EXT_SET_VERSION('0.0');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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
+case 'remove': // Do stuff when removing extension
// SQL commands to run
break;
-case "activate": // Do stuff when admin activates this extension
+case 'activate': // Do stuff when admin activates this extension
// SQL commands to run
break;
-case "deactivate": // Do stuff when admin deactivates this extension
+case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ case '0.0.1': // SQL queries for v0.0.1
ADD_EXT_SQL("");
// Update notes (these will be set as task text!)
}
break;
-case "modify": // When the extension got modified
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.0");
+EXT_SET_VERSION('0.0');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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");
+ EXT_ADD_UPDATE_DEPENDS('repair');
//
// Sponsor data
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
+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("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='sponsor'");
break;
-case "activate": // Do stuff when admin activates this extension
+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_registry` SET is_active='Y' WHERE is_active='N'");
break;
-case "deactivate": // Do stuff when admin deactivates this extension
+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_registry` SET is_active='N' WHERE is_active='Y'");
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ case '0.0.1': // SQL queries for v0.0.1
ADD_EXT_SQL("");
// Update notes (these will be set as task text!)
}
break;
-case "modify": // When the extension got modified
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.6.2");
+EXT_SET_VERSION('0.6.2');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.7", "0.3.8", "0.3.9", "0.4.0", "0.4.1", "0.4.2", "0.4.3", "0.4.4", "0.4.5", "0.4.6", "0.4.7", "0.4.8", "0.4.9", "0.5.0", "0.5.1", "0.5.2", "0.5.3", "0.5.4", "0.5.5", "0.5.6", "0.5.7", "0.5.8", "0.5.9", "0.6.0", "0.6.1", "0.6.2"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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
+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`");
*/
break;
-case "activate": // Do stuff when admin activates this extension
+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
+case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
ADD_EXT_SQL("");
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ 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)");
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
+ 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
+ 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.");
break;
- case "0.0.4": // SQL queries for v0.0.4
+ 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.");
break;
- case "0.0.5": // SQL queries for v0.0.5
+ 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)");
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.0.6": // SQL queries for v0.0.6
+ 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("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.0.7": // SQL queries for v0.0.7
+ 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("Die SQL-Anweisungen werden bei eingeschalteter Verbose-Funktion detailiert angezeigt.");
break;
- case "0.0.8": // SQL queries for v0.0.8
+ 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("Nette Mouse-Hover-Effekte eingebaut (Anleitung <strong>MENUE_HOVER.txt</strong> zum Patchen der general.css bitte lesen!)");
break;
- case "0.0.9": // SQL queries for v0.0.9
+ 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)");
// 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;
- case "0.1.0": // SQL queries for v0.2.1
+ 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'");
// 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.1": // SQL queries for v0.1.1
+ 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)."");
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.2": // SQL queries for v0.1.2
+ 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");
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.3": // SQL queries for v0.1.3
+ 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("Auf welche Seite soll der Ref-Link zeigen? Eingangsseite oder Anmeldeformular?");
break;
- case "0.1.4": // SQL queries for v0.1.4
+ 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
+ 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("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.6": // SQL queries for v0.1.6
+ 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 '-'");
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
+ 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
+ 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
+ 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
+ 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");
EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert");
break;
- case "0.2.1": // SQL queries for v0.2.1
+ 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
+ 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
+ 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'");
EXT_SET_UPDATE_NOTES("Gast- und Mitgliedsmenüs lassen sich getrennt voneinander abschalten.");
break;
- case "0.2.4": // SQL queries for v0.2.4
+ case '0.2.4': // SQL queries for v0.2.4
$auto_type = "png"; // PNG image is the default
if ((INCLUDE_READABLE("theme/".GET_CURR_THEME()."/images/code_bg.jpg")) && function_exists('imagecreatefromjpeg')) {
// Switch to JPEG format
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
+ 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
+ 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
+ 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");
</ol>");
break;
- case "0.2.8": // SQL queries for v0.2.8
+ 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
+ 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'");
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
+ 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");
EXT_SET_UPDATE_NOTES("Zwei Menüpunkte umbenannt.");
break;
- case "0.3.1": // SQL queries for v0.3.1
+ 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)");
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
+ 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` (
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
+ 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'");
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
+ 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
+ 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')");
EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett umgebaut.");
break;
- case "0.3.6": // SQL queries for v0.3.6
+ 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 ''");
EXT_SET_UPDATE_NOTES("Passwort-System mit Zufallshash erweitert (Schutzt gegen Dictionary-Attacks!)");
break;
- case "0.3.7": // SQL queries for v0.3.7
+ 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
+ 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");
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
+ 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--%'");
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
+ 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
+ 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
+ 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
+ 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 ''");
EXT_SET_UPDATE_NOTES("Proxy-Einstellungen hinzugefügt.");
break;
- case "0.4.4": // SQL queries for v0.4.4
+ 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");
EXT_SET_UPDATE_NOTES("Schlüssel in Admin-, Gast- und Mitgliedsmenü verbessert.");
break;
- case "0.4.5": // SQL queries for v0.4.5
+ 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'");
EXT_SET_UPDATE_NOTES("Täglichen/wöchentlichen/monatlichen Reset verbessert.");
break;
- case "0.4.6": // SQL queries for v0.4.6
+ 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
+ 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
+ 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
+ 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
+ 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`)");
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
+ 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
+ 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
+ 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)");
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
+ 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");
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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,
EXT_SET_UPDATE_NOTES("Tabellen für Filter-System hinzugefügt.");
break;
- case "0.6.0": // SQL queries for v0.6.0
+ 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;
- case "0.6.1": // SQL queries for v0.6.1
+ 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
+ case '0.6.2': // SQL queries for v0.6.2
// Depends on refback extension
- EXT_ADD_UPDATE_DEPENDS("user");
+ 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.");
}
break;
-case "modify": // When the extension got modified
+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.
+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") != '') {
+ if (GET_EXT_VERSION('sql_patches') != '') {
// Init key
- setConfigEntry('secret_key', "");
+ setConfigEntry('secret_key', '');
// Read key from secret file
if ((getConfig('file_hash') == "") || (getConfig('master_salt') == "") || (getConfig('pass_scramble') == "")) {
LOAD_INC_ONCE("inc/gen_sql_patches.php");
// @TODO Rewrite this to a filter!
- if ((GET_EXT_VERSION("cache") >= "0.1.2") && (isCacheInstanceValid())) {
+ if ((GET_EXT_VERSION('cache') >= '0.1.2') && (isCacheInstanceValid())) {
// Remove extensions and mod_reg cache file
LOAD_INC_ONCE("inc/libs/cache_functions.php");
require(sprintf("%sinc/extensions/ext-cache.php", constant('PATH')));
setConfigEntry('secret_key', READ_FILE($hashFile));
} else {
// Remove it from database
- UPDATE_CONFIG("file_hash", "");
+ UPDATE_CONFIG("file_hash", '');
// Cannot read secret file!
app_die(__FILE__, __LINE__, "Cannot read secret file! Please try to reload");
}
// Version number
-EXT_SET_VERSION("0.1.2");
+EXT_SET_VERSION('0.1.2');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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
+case 'remove': // Do stuff when removing extension
// SQL commands to run
ADD_EXT_SQL("");
break;
-case "activate": // Do stuff when admin activates this extension
+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
+case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
ADD_EXT_SQL("");
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.2": // SQL queries for v0.0.2
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.0");
+EXT_SET_VERSION('0.0');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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` (
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
+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("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='surfbar'");
break;
-case "activate": // Do stuff when admin activates this extension
+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");
+ 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
+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
+case 'update': // Update an extension
switch ($EXT_VER) {
- case "0.0.1": // SQL queries for v0.0.1
+ case '0.0.1': // SQL queries for v0.0.1
ADD_EXT_SQL("");
// Update notes (these will be set as task text!)
}
break;
-case "modify": // When the extension got modified
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.3.2");
+EXT_SET_VERSION('0.3.2');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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
+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
+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
+case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
ADD_EXT_SQL("");
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ 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");
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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>ADMIN_USER_PROFILE_LINK()</u> ausgelagert.");
break;
- case "0.1.4": // SQL queries for v0.1.4
+ 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
+ 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
+ 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>
</ul>");
break;
- case "0.1.7": // SQL queries for v0.1.7
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ case '0.3.2': // SQL queries for v0.3.2
// This update depends on user update
- EXT_ADD_UPDATE_DEPENDS("sql_patches");
+ 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;
-case "modify": // When the extension got modified
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.0.8");
+EXT_SET_VERSION('0.0.8');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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
+case 'remove': // Do stuff when removing extension
// Drop theme table
ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_themes`");
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
+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
+case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
ADD_EXT_SQL("");
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ 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
+ 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
+ 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
+ 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
+ case '0.0.5': // SQL queries for v0.0.5
// Update notes (these will be set as task text!)
EXT_SET_UPDATE_NOTES("<strong>set_session()</strong> mit @-Zeichen gegen ungewollte Ausgaben abgesichert.");
break;
- case "0.0.6": // SQL queries for v0.0.6
+ 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
+ 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
+ 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` (
}
break;
-case "modify": // When the extension got modified
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.1.2");
+EXT_SET_VERSION('0.1.2');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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
+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
+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
+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
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.2.9");
+EXT_SET_VERSION('0.2.9');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running
+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`");
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
+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("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP `opt_in`");
break;
-case "activate": // Do stuff when admin activates this extension
+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
+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
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.2": // SQL queries for v0.0.2
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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>ADMIN_USER_PROFILE_LINK()</u> ausgelagert.");
break;
- case "0.1.5": // SQL queries for v0.1.5
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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");
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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;
-case "modify": // When the extension got modified
+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.
+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")) {
+ if ((isResetModeEnabled()) && (getConfig('ap_transfer') == 'Y')) {
// Automatically remove outdated or not displayed transactions
TRANSFER_AUTPPURGE(getConfig('transfer_max'), getConfig('transfer_age'));
}
* -------------------------------------------------------------------- *
* Short description : Helper extension for usage directory *
* -------------------------------------------------------------------- *
- * Kurzbeschreibung : Helfer-Erweiterung fuer das "usage" Verzeichnis *
+ * Kurzbeschreibung : Helfer-Erweiterung fuer das 'usage' Verzeichnis *
* -------------------------------------------------------------------- *
* $Revision:: $ *
* $Date:: $ *
}
// Version number
-EXT_SET_VERSION("0.0");
+EXT_SET_VERSION('0.0');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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
+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
+case 'activate': // Do stuff when admin activates this extension
// SQL commands to run
break;
-case "deactivate": // Do stuff when admin deactivates this extension
+case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ case '0.0.1': // SQL queries for v0.0.1
ADD_EXT_SQL("");
// Update notes (these will be set as task text!)
}
break;
-case "modify": // When the extension got modified
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.3.5");
+EXT_SET_VERSION('0.3.5');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.1", "0.1.1", "0.1.2", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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,
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
+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_stats_data`");
break;
-case "activate": // Do stuff when admin activates this extension
+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
+case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
ADD_EXT_SQL("");
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.1": // SQL queries for v0.1
+ 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
+ case '0.1.1': // SQL queries for v0.1.1
// This update depends on sql_patches update!
- EXT_ADD_UPDATE_DEPENDS("sql_patches");
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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>ADMIN_USER_PROFILE_LINK()</u> ausgelagert.");
break;
- case "0.2.0": // SQL queries for v0.2.0
+ 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
+ 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)");
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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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
+ 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");
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
+ 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)."");
}
break;
-case "modify": // When the extension got modified
+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.
+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
}
// Version of this extension
-EXT_SET_VERSION("0.0.4");
+EXT_SET_VERSION('0.0.4');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4'));
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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` (
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
+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!}_guest_menu` WHERE `what`='wernis_portal'");
break;
-case "activate": // Do stuff when admin activates this extension
+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
+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
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ 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");
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
+ 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
+ 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
+ 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!)
}
break;
-case "modify": // When the extension got modified
+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.
+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
}
// Version number
-EXT_SET_VERSION("0.0");
+EXT_SET_VERSION('0.0');
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(array("0.0"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(array('0.0'));
// This extension is deprecated!
// Only since 'network' is ready! EXT_SET_DEPRECATED("Y");
switch ($EXT_LOAD_MODE)
{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+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");
) TYPE={!_TABLE_TYPE!} COMMENT='Reload lock reminder for Yoo!Media campaigns'");
break;
-case "remove": // Do stuff when removing extension
+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
+case 'activate': // Do stuff when admin activates this extension
// SQL commands to run
break;
-case "deactivate": // Do stuff when admin deactivates this extension
+case 'deactivate': // Do stuff when admin deactivates this extension
// SQL commands to run
break;
-case "update": // Update an extension
+case 'update': // Update an extension
switch ($EXT_VER)
{
- case "0.0.1": // SQL queries for v0.0.1
+ case '0.0.1': // SQL queries for v0.0.1
ADD_EXT_SQL("");
// Update notes (these will be set as task text!)
}
break;
-case "modify": // When the extension got modified
+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.
+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
LOAD_TEMPLATE("fatal_header");
// Set unset variable
- if (empty($check)) $check = "";
+ if (empty($check)) $check = '';
if ((isInstalling()) || (!isInstalled())) {
// While we are installing ouput other header than while it is installed... :-)
- $OUT = "";
+ $OUT = '';
foreach (getFatalArray() as $key => $value) {
// Prepare content for the template
$content = array(
LOAD_TEMPLATE("install_fatal_table", false, $OUT);
} elseif (isInstalled()) {
// Display all runtime fatal errors
- $OUT = "";
+ $OUT = '';
foreach (getFatalArray() as $key => $value) {
// Prepare content for the template
$content = array(
$GLOBALS['filters']['counter'] = array();
// Load all saved filers if sql_patches is updated
- if (GET_EXT_VERSION("sql_patches") >= "0.5.9") {
+ if (GET_EXT_VERSION('sql_patches') >= '0.5.9') {
// Init add
- $add = "";
- if (GET_EXT_VERSION("sql_patches") >= "0.6.0") $add = ", `filter_counter`";
+ $add = '';
+ if (GET_EXT_VERSION('sql_patches') >= '0.6.0') $add = ", `filter_counter`";
// Load all active filers
$result = SQL_QUERY("SELECT `filter_name`,`filter_function`,`filter_active`".$add."
//* DEBUG: */ echo __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): name={$filterName},func={$filterFunction},active={$active}<br />\n";
// Is the filter active?
- if ($active == "Y") {
+ if ($active == 'Y') {
// Is this filter there?
if (!function_exists($filterFunction)) {
// Unregister it
} // END - if
// Is the extension sql_patches updated?
- if (EXT_VERSION_IS_OLDER("sql_patches", "0.5.9")) {
+ if (EXT_VERSION_IS_OLDER('sql_patches', '0.5.9')) {
// Abort silently here
return false;
} // END - if
} // END - if
// Shall we update usage counters (ONLY FOR DEBUGGING!)
- if (getConfig('update_filter_usage') == "Y") {
+ if (getConfig('update_filter_usage') == 'Y') {
// Update all counters
foreach ($GLOBALS['filters']['counter'] as $filterName => $filterArray) {
// Walk through all filters
// Handle failed logins here if not in guest
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):type={$data['type']},action={$GLOBALS['action']},what={$GLOBALS['what']},lvl={$data['access_level']}<br />\n";
- if ((($data['type'] == "what") || ($data['type'] == "action") && ((!isset($GLOBALS['what'])) || ($GLOBALS['what'] == "overview") || ($GLOBALS['what'] == getConfig('index_home')))) && ($data['access_level'] != "guest") && ((GET_EXT_VERSION("sql_patches") >= "0.4.7") || (GET_EXT_VERSION("admins") >= "0.7.0"))) {
+ if ((($data['type'] == "what") || ($data['type'] == "action") && ((!isset($GLOBALS['what'])) || ($GLOBALS['what'] == "overview") || ($GLOBALS['what'] == getConfig('index_home')))) && ($data['access_level'] != 'guest') && ((GET_EXT_VERSION('sql_patches') >= '0.4.7') || (GET_EXT_VERSION('admins') >= '0.7.0'))) {
// Handle failure
$content['content'] .= HANDLE_LOGIN_FAILTURES($data['access_level']);
} // END - if
// Filter for auto-activation of a extension
function FILTER_AUTO_ACTIVATE_EXTENSION ($data) {
// Is this extension always activated?
- if (EXT_GET_ALWAYS_ACTIVE() == "Y") {
+ if (EXT_GET_ALWAYS_ACTIVE() == 'Y') {
// Then activate the extension
//* DEBUG: */ echo __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): ext_name={$data['ext_name']}<br />\n";
ACTIVATE_EXTENSION($data['ext_name']);
$ret = true;
// Ok, Cookie-Update done
- if (GET_EXT_VERSION("admins") >= "0.3") {
+ if (GET_EXT_VERSION('admins') >= '0.3.0') {
// Check if action GET variable was set
$action = SQL_ESCAPE($GLOBALS['action']);
if (!empty($GLOBALS['what'])) {
// Get action value by what-value
- $action = GET_ACTION("admin", $GLOBALS['what']);
+ $action = GET_ACTION('admin', $GLOBALS['what']);
} // END - if
// Check for access control line of current menu entry
} // END - if
// Shall we display the parsing time and number of queries?
- if ((GET_EXT_VERSION("sql_patches") >= "0.4.1") && (getConfig('show_timings') == "Y") && (!REQUEST_ISSET_GET(('frame'))) && ($GLOBALS['header_sent'] == "2")) {
+ if ((GET_EXT_VERSION('sql_patches') >= '0.4.1') && (getConfig('show_timings') == 'Y') && (!REQUEST_ISSET_GET(('frame'))) && ($GLOBALS['header_sent'] == "2")) {
// Then display it here
DISPLAY_PARSING_TIME_FOOTER();
} // END - if
case "direct":
// If we are switching from render to direct output rendered code
- if ((!empty($OUTPUT)) && (constant('_OB_CACHING') != "on")) { OUTPUT_RAW($OUTPUT); $OUTPUT = ""; }
+ if ((!empty($OUTPUT)) && (constant('_OB_CACHING') != "on")) { OUTPUT_RAW($OUTPUT); $OUTPUT = ''; }
// The same as above... ^
OUTPUT_RAW($HTML);
header("Pragma: no-cache"); // HTTP/1.0
header("Connection: Close");
- // Extension "rewrite" installed?
- if ((EXT_IS_ACTIVE("rewrite")) && ($GLOBALS['output_mode'] != "1") && ($GLOBALS['output_mode'] != "-1")) {
+ // Extension 'rewrite' installed?
+ if ((EXT_IS_ACTIVE('rewrite')) && ($GLOBALS['output_mode'] != "1") && ($GLOBALS['output_mode'] != "-1")) {
$OUTPUT = REWRITE_LINKS($OUTPUT);
} // END - if
// Compile and run finished rendered HTML code
while (strpos($OUTPUT, '{!') > 0) {
// Prepare the content and eval() it...
- $newContent = "";
+ $newContent = '';
$eval = "\$newContent = \"".COMPILE_CODE(smartAddSlashes($OUTPUT))."\";";
eval($eval);
OUTPUT_RAW($OUTPUT);
} elseif ((constant('OUTPUT_MODE') == "render") && (!empty($OUTPUT))) {
// Rewrite links when rewrite extension is active
- if ((EXT_IS_ACTIVE("rewrite")) && ($GLOBALS['output_mode'] != "1") && ($GLOBALS['output_mode'] != "-1")) {
+ if ((EXT_IS_ACTIVE('rewrite')) && ($GLOBALS['output_mode'] != "1") && ($GLOBALS['output_mode'] != "-1")) {
$OUTPUT = REWRITE_LINKS($OUTPUT);
} // END - if
}
// Add a fatal error message to the queue array
-function addFatalMessage ($F, $L, $message, $extra="") {
+function addFatalMessage ($F, $L, $message, $extra='') {
debug_report_bug($message);
if (is_array($extra)) {
// Multiple extras for a message with masks
$HTTP_USER_AGENT = GET_USER_AGENT();
// Init some data
- $ret = "";
+ $ret = '';
if (empty($GLOBALS['refid'])) $GLOBALS['refid'] = 0;
// @DEPRECATED Try to rewrite the if() condition
// Base directory
$BASE = sprintf("%stemplates/%s/html/", constant('PATH'), GET_LANGUAGE());
- $MODE = "";
+ $MODE = '';
// Check for admin/guest/member templates
if (strpos($template, "admin_") > -1) {
while (strpos($tmpl_file, "'") !== false) { $tmpl_file = str_replace("'", '{QUOT}', $tmpl_file); }
// Do we have to compile the code?
- $ret = "";
+ $ret = '';
if ((strpos($tmpl_file, "\$") !== false) || (strpos($tmpl_file, '{--') !== false) || (strpos($tmpl_file, '--}') > 0)) {
// Okay, compile it!
$tmpl_file = "\$ret=\"".COMPILE_CODE(smartAddSlashes($tmpl_file))."\";";
Subject : ".$subject."
Message : ".$message."
</pre>\n");
- } elseif (($HTML == "Y") && (EXT_IS_ACTIVE("html_mail"))) {
+ } elseif (($HTML == 'Y') && (EXT_IS_ACTIVE('html_mail'))) {
// Send mail as HTML away
SEND_HTML_EMAIL($toEmail, $subject, $message, $mailHeader);
} elseif (!empty($toEmail)) {
// Send Mail away
SEND_RAW_EMAIL($toEmail, $subject, $message, $mailHeader);
- } elseif ($HTML == "N") {
+ } elseif ($HTML == 'N') {
// Problem found!
SEND_RAW_EMAIL(constant('WEBMASTER'), "[PROBLEM:]".$subject, $message, $mailHeader);
}
}
$mail->FromName = constant('MAIN_TITLE');
$mail->Subject = $subject;
- if ((EXT_IS_ACTIVE("html_mail")) && (strip_tags($msg) != $msg)) {
+ if ((EXT_IS_ACTIVE('html_mail')) && (strip_tags($msg) != $msg)) {
$mail->Body = $msg;
$mail->AltBody = "Your mail program required HTML support to read this mail!";
$mail->WordWrap = 70;
} else {
$mail->Body = decodeEntities($msg);
}
- $mail->AddAddress($toEmail, "");
+ $mail->AddAddress($toEmail, '');
$mail->AddReplyTo(constant('WEBMASTER'), constant('MAIN_TITLE'));
$mail->AddCustomHeader("Errors-To:".constant('WEBMASTER'));
$mail->AddCustomHeader("X-Loop:".constant('WEBMASTER'));
$ABC = explode(",", "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,0,1,2,3,4,5,6,7,8,9,-,+,_,/");
// Start creating password
- $PASS = "";
+ $PASS = '';
for ($i = 0; $i < $LEN; $i++) {
$PASS .= $ABC[mt_rand(0, count($ABC) -1)];
} // END - for
$ret = constant('DEFAULT_LANG');
// Init variable
- $lang = "";
+ $lang = '';
// Is the variable set
if (REQUEST_ISSET_GET(('mx_lang'))) {
// Make sure all template names are lowercase!
$template = strtolower($template);
- // Default "nickname" if extension is not installed
+ // Default 'nickname' if extension is not installed
$nick = "---";
// Prepare IP number and User Agent
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):UID={$UID},template={$template},content[]=".gettype($content)."<br />\n";
if (($UID > 0) && (is_array($content))) {
// If nickname extension is installed, fetch nickname as well
- if (EXT_IS_ACTIVE("nickname")) {
+ if (EXT_IS_ACTIVE('nickname')) {
//* 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",
} // END - if
// Now does the final template exists?
- $newContent = "";
+ $newContent = '';
if (FILE_READABLE($FQFN)) {
// The local file does exists so we load it. :)
$tmpl_file = READ_FILE($FQFN);
header ("Location: ".str_replace("&", "&", $URL));
} else {
// Output error message
- LOAD_INC("inc/header.php");
+ LOAD_INC('inc/header.php');
LOAD_TEMPLATE("redirect_url", false, str_replace("&", "&", $URL));
- LOAD_INC("inc/footer.php");
+ LOAD_INC('inc/footer.php');
}
// Shut the mailer down here
//
function ADD_SELECTION ($type, $DEFAULT, $prefix="", $id="0") {
- $OUT = "";
+ $OUT = '';
if ($type == "yn") {
// This is a yes/no selection only!
$YEAR = date('Y', time());
// Use configured min age or fixed?
- if (GET_EXT_VERSION("other") >= "0.2.1") {
+ if (GET_EXT_VERSION('other') >= '0.2.1') {
// Configured
$startYear = $YEAR - getConfig('min_age');
} 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") {
+ if (GET_EXT_VERSION('other') >= '0.2.1') {
// Use configured minimum age
$YEAR = date('Y', time()) - getConfig('min_age');
} else {
case "yn":
$OUT .= "<option value=\"Y\"";
- if ($DEFAULT == "Y") $OUT .= " selected=\"selected\"";
+ if ($DEFAULT == 'Y') $OUT .= " selected=\"selected\"";
$OUT .= ">{--YES--}</option>\n<option value=\"N\"";
- if ($DEFAULT == "N") $OUT .= " selected=\"selected\"";
+ if ($DEFAULT == 'N') $OUT .= " selected=\"selected\"";
$OUT .= ">{--NO--}</option>\n";
break;
}
// Default
$translated = "??? (".$yn.")";
switch ($yn) {
- case "Y": $translated = getMessage('YES'); break;
- case "N": $translated = getMessage('NO'); break;
+ case 'Y': $translated = getMessage('YES'); break;
+ case 'N': $translated = getMessage('NO'); break;
default:
// Log unknown value
DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown value %s. Expected Y/N!", $yn));
if ($len == 0) $len = 10;
// Cut off requested counts of number
- $return = substr(str_replace('.', "", $rcode), 0, $len);
+ $return = substr(str_replace('.', '', $rcode), 0, $len);
// Done building code
return $return;
// Does only allow numbers
function bigintval ($num, $castValue = true) {
// Filter all numbers out
- $ret = preg_replace("/[^0123456789]/", "", $num);
+ $ret = preg_replace("/[^0123456789]/", '', $num);
// Shall we cast?
if ($castValue) $ret = (double)$ret;
// "implode" IDs and query string
$aid = implode(",", $adminIds);
if ($aid == "-1") {
- if (EXT_IS_ACTIVE("events")) {
+ if (EXT_IS_ACTIVE('events')) {
// Add line to user events
EVENTS_ADD_LINE($subj, $msg, $UID);
} else {
//
function CREATE_FANCY_TIME ($stamp) {
// Get data array with years/months/weeks/days/...
- $data = CREATE_TIME_SELECTIONS($stamp, "", "", "", true);
- $ret = "";
+ $data = CREATE_TIME_SELECTIONS($stamp, '', '', '', true);
+ $ret = '';
foreach($data as $k => $v) {
if ($v > 0) {
// Value is greater than 0 "eval" data to return string
//
function ADD_EMAIL_NAV ($PAGES, $offset, $show_form, $colspan, $return=false) {
- $SEP = ""; $TOP = "";
+ $SEP = ''; $TOP = '';
if (!$show_form) {
$TOP = " top2";
$SEP = "<tr><td colspan=\"".$colspan."\" class=\"seperator\"> </td></tr>";
}
- $NAV = "";
+ $NAV = '';
for ($page = 1; $page <= $PAGES; $page++) {
// Is the page currently selected or shall we generate a link to it?
if (($page == REQUEST_GET('page')) || ((!REQUEST_ISSET_GET(('page'))) && ($page == "1"))) {
$NAV .= "<a href=\"{!URL!}/modules.php?module=admin&what=".$GLOBALS['what']."&page=".$page."&offset=".$offset;
// Add userid when we shall show all mails from a single member
- if ((REQUEST_ISSET_GET(('uid'))) && (bigintval(REQUEST_GET('uid')) > 0)) $NAV .= "&uid=".bigintval(REQUEST_GET('uid'));
+ if ((REQUEST_ISSET_GET('uid')) && (bigintval(REQUEST_GET('uid')) > 0)) $NAV .= "&uid=".bigintval(REQUEST_GET('uid'));
// Close open anchor tag
$NAV .= "\">";
} // END - if
// Extract host name
- $host = str_replace("http://", "", $url);
+ $host = str_replace("http://", '', $url);
if (ereg("/", $host)) $host = substr($host, 0, strpos($host, "/"));
// Generate relative URL
if (!is_array($postData)) {
// Abort here
DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("postData is not an array. Type: %s", gettype($postData)));
- return array("", "", "");
+ return array("", '', '');
} // END - if
// Compile the script name
// Sends a raw request to another host
function SEND_RAW_REQUEST ($host, $request) {
// Initialize array
- $response = array("", "", "");
+ $response = array("", '', '');
// Default is not to use proxy
$useProxy = false;
// Was the request successfull?
if ((!eregi("200 OK", $response[0])) || (empty($response[0]))) {
// Not found / access forbidden
- $response = array("", "", "");
+ $response = array("", '', '');
} // END - if
// Return response
}
// Generate an email link
-function CREATE_EMAIL_LINK ($email, $table = "admins") {
+function CREATE_EMAIL_LINK ($email, $table = 'admins') {
// Default email link (INSECURE! Spammer can read this by harvester programs)
$EMAIL = "mailto:".$email;
// Check for several extensions
- if ((EXT_IS_ACTIVE("admins")) && ($table == "admins")) {
+ if ((EXT_IS_ACTIVE('admins')) && ($table == 'admins')) {
// Create email link for contacting admin in guest area
$EMAIL = ADMINS_CREATE_EMAIL_LINK($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_CREATE_EMAIL_LINK($email);
- } elseif ((EXT_IS_ACTIVE("sponsor")) && ($table == "sponsor_data")) {
+ } elseif ((EXT_IS_ACTIVE('sponsor')) && ($table == "sponsor_data")) {
// Create email link to contact sponsor within admin area (or like the link above?)
$EMAIL = SPONSOR_CREATE_EMAIL_LINK($email);
}
// Generate a hash for extra-security for all passwords
function generateHash ($plainText, $salt = "") {
- // Is the required extension "sql_patches" there and a salt is not given?
- if (((EXT_VERSION_IS_OLDER("sql_patches", "0.3.6")) || (!EXT_IS_ACTIVE("sql_patches"))) && (empty($salt))) {
+ // Is the required extension 'sql_patches' there and a salt is not given?
+ if (((EXT_VERSION_IS_OLDER('sql_patches', '0.3.6')) || (!EXT_IS_ACTIVE('sql_patches'))) && (empty($salt))) {
// Extension sql_patches is missing/outdated so we hash the plain text with MD5
return md5($plainText);
} // END - if
// Scramble a string
function scrambleString($str) {
// Init
- $scrambled = "";
+ $scrambled = '';
// Final check, in case of failture it will return unscrambled string
if (strlen($str) > 40) {
// normally be stored in cookies
function ADD_URL_DATA ($URL) {
// Init add
- $add = "";
+ $add = '';
// Determine URL binder
$BIND = "?";
if ((REQUEST_ISSET_GET(('refid'))) && (strpos($URL, "refid=") == 0)) {
// Cookie found in URL
$add .= $BIND."refid=".bigintval(REQUEST_GET('refid'));
- } elseif ((GET_EXT_VERSION("sql_patches") != '') && (getConfig('def_refid') > 0)) {
+ } elseif ((GET_EXT_VERSION('sql_patches') != '') && (getConfig('def_refid') > 0)) {
// Not found! So let's set default here
$add .= $BIND."refid=".getConfig('def_refid');
}
// Is a secret key and master salt already initialized?
if ((getConfig('secret_key') != "") && (getConfig('master_salt') != "")) {
// Only calculate when the secret key is generated
- $newHash = ""; $start = 9;
+ $newHash = ''; $start = 9;
for ($idx = 0; $idx < 10; $idx++) {
$part1 = hexdec(substr($passHash, $start, 4));
$part2 = hexdec(substr(getConfig('secret_key'), $start, 4));
foreach ($cookies as $cookieName) {
// Is the cookie set to "deleted"?
if (get_session($cookieName) == "deleted") {
- set_session($cookieName, "");
+ set_session($cookieName, '');
}
} // END - foreach
} // END - if
// Output error messages in a fasioned way and die...
function app_die ($F, $L, $msg) {
// Load header
- LOAD_INC_ONCE("inc/header.php");
+ LOAD_INC_ONCE('inc/header.php');
// Prepare message for output
$msg = sprintf(getMessage('MXCHANGE_HAS_DIED'), basename($F), $L, $msg);
// Load the message template
- LOAD_TEMPLATE("admin_settings_saved", false, $msg);
+ LOAD_TEMPLATE('admin_settings_saved', false, $msg);
// Load footer
- LOAD_INC_ONCE("inc/footer.php");
+ LOAD_INC_ONCE('inc/footer.php');
// Exit explicitly
shutdown();
if (!isSessionVariableSet('mxchange_theme')) {
// Set default theme
set_session('mxchange_theme', $ret);
- } elseif ((isSessionVariableSet('mxchange_theme')) && (GET_EXT_VERSION("sql_patches") >= "0.1.4")) {
+ } elseif ((isSessionVariableSet('mxchange_theme')) && (GET_EXT_VERSION('sql_patches') >= '0.1.4')) {
//die("<pre>".print_r($GLOBALS['cache_array']['themes'], true)."</pre>");
// Get theme from cookie
$ret = get_session('mxchange_theme');
// Get id from theme
function THEME_GET_ID ($name) {
- // Is the extension "theme" installed?
- if (!EXT_IS_ACTIVE("theme")) {
+ // Is the extension 'theme' installed?
+ if (!EXT_IS_ACTIVE('theme')) {
// Then abort here
return 0;
} // END - if
// Count up
incrementConfigEntry('cache_hits');
- } elseif (GET_EXT_VERSION("cache") != "0.1.8") {
+ } 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__);
// Prepare SQL queries?
if ($sqlPrepare === true) {
// Remove some unwanted chars
- $content = str_replace("\r", "", $content);
+ $content = str_replace("\r", '', $content);
$content = str_replace("\n\n", "\n", $content);
} // END - if
// 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
$excludePattern = '@(\.|\.\.|\.revision|\.svn|debug\.log|\.cache|config\.php)$@';
- $ds = GET_DIR_AS_ARRAY($dir, "", true, false, $excludePattern);
+ $ds = GET_DIR_AS_ARRAY($dir, '', true, false, $excludePattern);
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):ds[]=".count($ds)."<br />\n";
// Walk through all entries
// By default nothing is new... ;-)
$new = false;
- if (EXT_IS_ACTIVE("cache")) {
- // Check if $_GET['check_revision_data'] is setted (switch for manually rewrite the .revision-File)
- if (isset($_GET['check_revision_data']) && $_GET['check_revision_data'] == 'yes') $new = true;
+ if (EXT_IS_ACTIVE('cache')) {
+ // 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;
+ || !$GLOBALS['cache_instance']->loadCacheFile('revision')) $new = true;
// Is the cache file outdated/invalid?
if ($new === true){
unset($GLOBALS['cache_array']['revision']);
// Reload load_cach-revison.php
- LOAD_INC("inc/loader/load_cache-revision.php");
+ LOAD_INC('inc/loader/load_cache-revision.php');
} // END - if
// Return found value
// FQFN of revision file
$FQFN = sprintf("%sinc/cache/.revision", constant('PATH'));
- // Check if $_GET['check_revision_data'] is setted (switch for manually rewrite the .revision-File)
- if ((isset($_GET['check_revision_data'])) && ($_GET['check_revision_data'] == 'yes')) {
+ // 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')) {
// Has changed!
$new = true;
} else {
function getAkt_vers () {
// Init variables
- $next_dir = ""; // Directory to start with search
+ $next_dir = ''; // Directory to start with search
$last_changed = array(
'path_name' => "",
'time' => 0
// This foreach loops the $searchFor-Tags (array('Revision', 'Date', 'Tag', 'Author') --> could easaly extended in the future)
foreach ($searchFor as $search) {
- //Searches for "$search-tag:VALUE$" or "$search-tag::VALUE$"(the stylish keywordversion ;-)) in the lates modified file
+ // Searches for "$search-tag:VALUE$" or "$search-tag::VALUE$"(the stylish keywordversion ;-)) in the lates modified file
$res += preg_match('@\$'.$search.'(:|::) (.*) \$@U', $last_file, $t);
// This trimms the search-result and puts it in the $akt_vers-return array
if (isset($t[2])) $akt_vers[$search] = trim($t[2]);
// Output a debug backtrace to the user
function debug_report_bug ($message = "") {
// Init message
- $debug = "";
+ $debug = '';
// Is the optional message set?
if (!empty($message)) {
// Use and log it
// Converts a message code to a human-readable message
function convertCodeToMessage ($code) {
- $msg = "";
+ $msg = '';
switch ($code) {
case getCode('LOGOUT_DONE') : $msg = getMessage('LOGOUT_DONE'); break;
case getCode('LOGOUT_FAILED') : $msg = "<span class=\"guest_failed\">{--LOGOUT_FAILED--}</span>"; break;
if (EXT_IS_ACTIVE($ext, true)) {
$msg = getMessage('ERROR_CONFIRMING_MAIL');
} else {
- $msg = sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), "mailid");
+ $msg = sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), 'mailid');
}
break;
// Is the extension uninstalled/inactive?
if (!EXT_IS_ACTIVE($ext_name)) {
// Redirect to index
- LOAD_URL("modules.php?module=index&msg=".getCode('EXTENSION_PROBLEM')."&ext=".$ext_name);
+ LOAD_URL('modules.php?module=index&msg=' . getCode('EXTENSION_PROBLEM') . '&ext=' . $ext_name);
} // END - if
}
// Is the login valid?
if ($login != "***") {
// Is the extension there?
- if (EXT_IS_ACTIVE("admins")) {
+ if (EXT_IS_ACTIVE('admins')) {
// Admin found
$admin = "<a href=\"".ADMINS_CREATE_EMAIL_LINK(GET_ADMIN_EMAIL($aid))."\">".$login."</a>";
} else {
// Extension not found
- $admin = sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), "admins");
+ $admin = sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), 'admins');
}
} else {
// Maybe deleted?
// Function taken from user comments on www.php.net / function eregi()
function isUrlValid ($url) {
// Prepare URL
- $url = strip_tags(str_replace("\\", "", compileUriCode(urldecode($url))));
+ $url = strip_tags(str_replace("\\", '', compileUriCode(urldecode($url))));
// Allows http and https
$http = "(http|https)+(:\/\/)";
// Smartly adds slashes
function smartAddSlashes ($unquoted) {
- $unquoted = str_replace("\\", "", $unquoted);
+ $unquoted = str_replace("\\", '', $unquoted);
return addslashes($unquoted);
}
}
// Send notification to admin
function SEND_ADMIN_NOTIFICATION ($subject, $templateName, $content=array(), $uid="0") {
- if (GET_EXT_VERSION("admins") >= "0.4.1") {
+ if (GET_EXT_VERSION('admins') >= '0.4.1') {
// Send new way
SEND_ADMIN_EMAILS_PRO($subject, $templateName, $content, $uid);
} else {
// Is debug mode enabled?
if ((isDebugModeEnabled()) || ($force === true)) {
// Remove CRLF
- $message = str_replace("\r", "", str_replace("\n", "", $message));
+ $message = str_replace("\r", '', str_replace("\n", '', $message));
// Log this message away
$fp = fopen(constant('PATH')."inc/cache/debug.log", 'a') or app_die(__FUNCTION__, __LINE__, "Cannot write logfile debug.log!");
// Load more reset scripts
function runResetIncludes () {
// Is the reset set or old sql_patches?
- if ((!isResetModeEnabled()) || (EXT_VERSION_IS_OLDER("sql_patches", "0.4.5"))) {
+ if ((!isResetModeEnabled()) || (EXT_VERSION_IS_OLDER('sql_patches', '0.4.5'))) {
// Then abort here
DEBUG_LOG(__FUNCTION__, __LINE__, "Cannot run reset! Please report this bug. Thanks");
} // END - if
if (!defined('DEBUG_RESET')) UPDATE_CONFIG("last_update", time());
// Is the config entry set?
- if (GET_EXT_VERSION("sql_patches") >= "0.4.2") {
+ if (GET_EXT_VERSION('sql_patches') >= '0.4.2') {
// Create current week mark
$currWeek = date("W", time());
// Converts timestamp selections into a timestamp
function CONVERT_SELECTIONS_TO_TIMESTAMP (&$POST, &$DATA, &$id, &$skip) {
// Init test variable
- $test2 = "";
+ $test2 = '';
// Get last three chars
$test = substr($id, -3);
} else {
// Process this entry
$skip = false;
- $test2 = "";
+ $test2 = '';
}
}
switch (GET_LANGUAGE()) {
case "de": // German language
// Remove german thousand dots first
- $str = str_replace(".", "", $str);
+ $str = str_replace(".", '', $str);
// Replace german commata with decimal dot and cast it
$float = (float)str_replace(",", ".", $str);
default: // US and so on
// Remove thousand dots first and cast
- $float = (float)str_replace(",", "", $str);
+ $float = (float)str_replace(",", '', $str);
break;
}
// Handle menu-depending failed logins and return the rendered content
function HANDLE_LOGIN_FAILTURES ($accessLevel) {
// Default output is empty ;-)
- $OUT = "";
+ $OUT = '';
// Is the session data set?
if ((isSessionVariableSet('mxchange_'.$accessLevel.'_failures')) && (isSessionVariableSet('mxchange_'.$accessLevel.'_last_fail'))) {
} // END - if
// Reset session data
- set_session('mxchange_'.$accessLevel.'_failures', "");
- set_session('mxchange_'.$accessLevel.'_last_fail', "");
+ set_session('mxchange_'.$accessLevel.'_failures', '');
+ set_session('mxchange_'.$accessLevel.'_last_fail', '');
} // END - if
// Return rendered content
// Rebuild cache
function rebuildCacheFiles ($cache, $inc="") {
// Shall I remove the cache file?
- if ((EXT_IS_ACTIVE("cache")) && (isCacheInstanceValid())) {
+ if ((EXT_IS_ACTIVE('cache')) && (isCacheInstanceValid())) {
// Rebuild cache
if ($GLOBALS['cache_instance']->loadCacheFile($cache)) {
// Destroy it
// Purge admin menu cache
function CACHE_PURGE_ADMIN_MENU ($id=0, $action="", $what="", $str="") {
// Is the cache extension enabled or no cache instance or admin menu cache disabled?
- if (!EXT_IS_ACTIVE("cache")) {
+ if (!EXT_IS_ACTIVE('cache')) {
// Cache extension not active
return false;
} elseif (!isCacheInstanceValid()) {
$remoteAddr = determineRealRemoteAddress();
// Is removeip installed?
- if (EXT_IS_ACTIVE("removeip")) {
+ if (EXT_IS_ACTIVE('removeip')) {
// Then anonymize it
$remoteAddr = GET_ANONYMOUS_REMOTE_ADDR($remoteAddr);
} // END - if
$remoteHost = getenv('REMOTE_HOST');
// Is removeip installed?
- if (EXT_IS_ACTIVE("removeip")) {
+ if (EXT_IS_ACTIVE('removeip')) {
// Then anonymize it
$remoteHost = GET_ANONYMOUS_REMOTE_HOST($remoteHost);
} // END - if
$userAgent = getenv('HTTP_USER_AGENT');
// Is removeip installed?
- if (EXT_IS_ACTIVE("removeip")) {
+ if (EXT_IS_ACTIVE('removeip')) {
// Then anonymize it
$userAgent = GET_ANONYMOUS_USER_AGENT($userAgent);
} // END - if
$referer = getenv('HTTP_REFERER');
// Is removeip installed?
- if (EXT_IS_ACTIVE("removeip")) {
+ if (EXT_IS_ACTIVE('removeip')) {
// Then anonymize it
$referer = GET_ANONYMOUS_REFERER($referer);
} // END - if
);
// Mail inserted into bonus pool
- if ($output) LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_BONUS_SEND'));
+ if ($output) LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_BONUS_SEND'));
} elseif ($output) {
// More entered than can be reached!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_MORE_SELECTED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_MORE_SELECTED'));
} else {
// Debug log
DEBUG_LOG(__FUNCTION__, __LINE__, " cat={$data['cat']},receiver={$data['receiver']},data=".base64_encode(serialize($data))." More selected, than available!");
} elseif ((isSessionVariableSet('refid')) && (get_session('refid') != 0)) {
// Set session refid als global
$GLOBALS['refid'] = bigintval(get_session('refid'));
- } elseif ((GET_EXT_VERSION("sql_patches") != "") && (getConfig('def_refid') > 0)) {
+ } elseif ((GET_EXT_VERSION('sql_patches') != "") && (getConfig('def_refid') > 0)) {
// Set default refid as refid in URL
$GLOBALS['refid'] = getConfig(('def_refid'));
- } elseif ((GET_EXT_VERSION("user") >= "0.3.4") && (getConfig('select_user_zero_refid')) == "Y") {
+ } elseif ((GET_EXT_VERSION('user') >= '0.3.4') && (getConfig('select_user_zero_refid')) == 'Y') {
// Select a random user which has confirmed enougth mails
$GLOBALS['refid'] = SELECT_RANDOM_REFID();
} else {
// Some security stuff...
if (!defined('__SECURITY')) {
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
require($INC);
}
$bsent = 0; $bclicks = 0; $bcount = 0;
// Check for normal mails
-$result_media = SQL_QUERY("SELECT SUM(max_rec) AS max_rec, SUM(clicks) AS clicks
-FROM `{!_MYSQL_PREFIX!}_user_stats`", __FILE__, __LINE__);
+$result_media = SQL_QUERY('SELECT SUM(max_rec) AS max_rec, SUM(clicks) AS clicks
+FROM `{!_MYSQL_PREFIX!}_user_stats`', __FILE__, __LINE__);
list($nsent, $nclicks) = SQL_FETCHROW($result_media);
if (empty($nsent)) $nsent = 0;
if (empty($nclicks)) $nclicks = 0;
SQL_FREERESULT($result_media);
// Count mail orders
-$result_media = SQL_QUERY("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_user_stats`", __FILE__, __LINE__);
+$result_media = SQL_QUERY('SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_user_stats`', __FILE__, __LINE__);
list($ncount) = SQL_FETCHROW($result_media);
SQL_FREERESULT($result_media);
// Check for bonus extension
-if (EXT_IS_ACTIVE("bonus")) {
+if (EXT_IS_ACTIVE('bonus')) {
// Count bonus mails
- $result_media = SQL_QUERY("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_bonus`", __FILE__, __LINE__);
+ $result_media = SQL_QUERY('SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_bonus`', __FILE__, __LINE__);
list($bcount) = SQL_FETCHROW($result_media);
SQL_FREERESULT($result_media);
// Check for bonus mails
- $result_media = SQL_QUERY("SELECT SUM(mails_sent) AS bonus_sent, SUM(clicks) AS bonus_clicks
-FROM `{!_MYSQL_PREFIX!}_bonus`", __FILE__, __LINE__);
+ $result_media = SQL_QUERY('SELECT SUM(mails_sent) AS bonus_sent, SUM(clicks) AS bonus_clicks
+FROM `{!_MYSQL_PREFIX!}_bonus`', __FILE__, __LINE__);
list($bsent, $bclicks) = SQL_FETCHROW($result_media);
if (empty($bsent)) $bsent = 0;
if (empty($bclicks)) $bclicks = 0;
} // END - if
// Load (maybe) missing file
-LOAD_INC_ONCE("inc/libs/mediadata_functions.php");
+LOAD_INC_ONCE('inc/libs/mediadata_functions.php');
// Insert info to database
-MEDIA_UPDATE_ENTRY(array("total_send" , "normal_send") , "init", $nsent);
-MEDIA_UPDATE_ENTRY(array("total_clicks", "normal_clicks"), "init", $nclicks);
-MEDIA_UPDATE_ENTRY(array("total_orders", "normal_orders"), "init", $ncount);
-MEDIA_UPDATE_ENTRY(array("total_send" , "bonus_send" ) , "init", $bsent);
-MEDIA_UPDATE_ENTRY(array("total_clicks", "bonus_clicks") , "init", $bclicks);
-MEDIA_UPDATE_ENTRY(array("total_orders", "bonus_orders") , "init", $bcount);
+MEDIA_UPDATE_ENTRY(array('total_send' , 'normal_send') , 'init', $nsent);
+MEDIA_UPDATE_ENTRY(array('total_clicks', 'normal_clicks'), 'init', $nclicks);
+MEDIA_UPDATE_ENTRY(array('total_orders', 'normal_orders'), 'init', $ncount);
+MEDIA_UPDATE_ENTRY(array('total_send' , 'bonus_send' ) , 'init', $bsent);
+MEDIA_UPDATE_ENTRY(array('total_clicks', 'bonus_clicks') , 'init', $bclicks);
+MEDIA_UPDATE_ENTRY(array('total_orders', 'bonus_orders') , 'init', $bcount);
// Aquire total used points
-$result = SQL_QUERY("SELECT SUM(used_points) AS used_points FROM `{!_MYSQL_PREFIX!}_user_data`", __FILE__, __LINE__);
+$result = SQL_QUERY('SELECT SUM(used_points) AS used_points FROM `{!_MYSQL_PREFIX!}_user_data`', __FILE__, __LINE__);
list($used) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
// ... and total points
-$result = SQL_QUERY("SELECT SUM(points) AS points FROM `{!_MYSQL_PREFIX!}_user_points`", __FILE__, __LINE__);
+$result = SQL_QUERY('SELECT SUM(points) AS points FROM `{!_MYSQL_PREFIX!}_user_points`', __FILE__, __LINE__);
list($points) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
// Update database
-MEDIA_UPDATE_ENTRY(array("total_points"), "init", ($points - $used));
+MEDIA_UPDATE_ENTRY(array('total_points'), 'init', ($points - $used));
//
?>
SQL_ALTER_TABLE("ALTER TABLE `{!_MYSQL_PREFIX!}_refsystem` ADD UNIQUE `userid_level` ( `userid`,`level` )", __FILE__, __LINE__);
// Rebuild cache
- rebuildCacheFiles("refsystem", "refsystem");
+ rebuildCacheFiles('refsystem', 'refsystem');
} // END - if
// Free result
SQL_FREERESULT($result);
// Reset the table
-SQL_QUERY("TRUNCATE TABLE `{!_MYSQL_PREFIX!}_user_refs`", __FILE__, __LINE__);
+SQL_QUERY('TRUNCATE TABLE `{!_MYSQL_PREFIX!}_user_refs`', __FILE__, __LINE__);
// Begin with all users in level one
-$result_direct = SQL_QUERY("SELECT u.userid
+$result_direct = SQL_QUERY('SELECT u.userid
FROM `{!_MYSQL_PREFIX!}_user_data` AS u
WHERE u.refid=0
-ORDER BY u.userid ASC", __FILE__, __LINE__);
+ORDER BY u.userid ASC', __FILE__, __LINE__);
// Do we have entries?
if (SQL_NUMROWS($result_direct) > 0) {
- // When "walk" through all users
+ // When 'walk' through all users
while ($content = SQL_FETCHARRAY($result_direct)) {
// Init level
$GLOBALS['cache_array']['back_level'] = 1;
}
// Check for version of sql_patches
-if (GET_EXT_VERSION("sql_patches") < "0.3.6") return false;
+if (GET_EXT_VERSION('sql_patches') < '0.3.6') return false;
// Check if there is no scrambling string
if (getConfig('pass_scramble') == "") {
if (FILE_READABLE($FQFN)) {
//* DEBUG: */ unlink($FQFN);
//* DEBUG: */ $test = hexdec(get_session('u_hash')) / hexdec($secretKey);
- //* DEBUG: */ $test = generateHash(str_replace('.', "", $test));
+ //* DEBUG: */ $test = generateHash(str_replace('.', '', $test));
//* DEBUG: */ die("Secret-Key: ".$secretKey."<br />Cookie: ".get_session('u_hash')."<br />Test: ".$test);
// Write $fileHash to database
DEBUG_LOG(__FUNCTION__, __LINE__, "".$msg, true);
// Output message to user and die
- if (EXT_IS_ACTIVE("debug")) {
+ if (EXT_IS_ACTIVE('debug')) {
// Debug extension found! So Output a small message
app_die(__FUNCTION__, __LINE__, "Error message written to debug.log. Please try to call <a href=\"{!URL!}\">the main page</a> to continue.");
} else {
// If not in CSS mode generate the header
if (($GLOBALS['output_mode'] != "1")) {
// Generate header
- $TITLE = "";
+ $TITLE = '';
// Add title decorations? (left)
if (!defined('__PAGE_TITLE')) {
// Config and database connection valid?
if ((isConfigLoaded()) && (SQL_IS_LINK_UP())) {
// Title decoration enabled?
- if ((getConfig('enable_title_deco') == "Y") && (getConfig('title_left') != "")) $TITLE .= trim(getConfig('title_left'))." ";
+ if ((getConfig('enable_title_deco') == 'Y') && (getConfig('title_left') != "")) $TITLE .= trim(getConfig('title_left'))." ";
// Do we have some extra title?
if (!empty($EXTRA_TITLE)) {
$TITLE .= constant('MAIN_TITLE');
// Add title of module? (middle decoration will also be added!)
- if ((getConfig('enable_mod_title') == "Y") || ((empty($GLOBALS['what'])) && (empty($GLOBALS['action']))) || ($GLOBALS['module'] == "admin")) $TITLE .= " ".trim(getConfig('title_middle'))." ".ADD_MODULE_TITLE($GLOBALS['module']);
+ if ((getConfig('enable_mod_title') == 'Y') || ((empty($GLOBALS['what'])) && (empty($GLOBALS['action']))) || ($GLOBALS['module'] == 'admin')) $TITLE .= " ".trim(getConfig('title_middle'))." ".ADD_MODULE_TITLE($GLOBALS['module']);
// Add title from what file
- $MODE = "";
- if ($GLOBALS['module'] == "login") $MODE = "member";
- elseif ($GLOBALS['module'] == "index") $MODE = "guest";
- if ((!empty($MODE)) && (getConfig('enable_what_title') == "Y")) $TITLE .= " ".trim(getConfig('title_middle'))." ".GET_MOD_DESCR($MODE, $GLOBALS['what']);
+ $MODE = '';
+ if ($GLOBALS['module'] == "login") $MODE = 'member';
+ elseif ($GLOBALS['module'] == 'index') $MODE = 'guest';
+ if ((!empty($MODE)) && (getConfig('enable_what_title') == 'Y')) $TITLE .= " ".trim(getConfig('title_middle'))." ".GET_MOD_DESCR($MODE, $GLOBALS['what']);
// Add title decorations? (right)
- if ((getConfig('enable_title_deco') == "Y") && (getConfig('title_right') != "")) $TITLE .= " ".trim(getConfig('title_right'));
+ if ((getConfig('enable_title_deco') == 'Y') && (getConfig('title_right') != "")) $TITLE .= " ".trim(getConfig('title_right'));
// Remember title in constant for the template
define('__PAGE_TITLE', $TITLE);
// Output page header code
LOAD_TEMPLATE("page_header");
- // Include meta data in "guest" module
- if ($GLOBALS['module'] == "index") {
+ // Include meta data in 'guest' module
+ if ($GLOBALS['module'] == 'index') {
// Load meta data template
LOAD_TEMPLATE("metadata");
} // END - if
if (getTotalFatalErrors() > 0) {
- $OUT = "";
+ $OUT = '';
foreach (getFatalArray() as $value) {
$OUT .= " <li>".$value."</li>\n";
} // END foreach
define('__FATAL_ERROR_LI', $OUT);
- $OUT = "";
+ $OUT = '';
foreach ($mysql as $key => $value) {
$OUT .= " <input type=\"hidden\" name=\"mysql[".$key."]\" value=\"".$value."\">\n";
} // END foreach
define('__SMTP_PASS' , REQUEST_POST('smtp_pass1'));
// Load template
- LOAD_TEMPLATE("install_fatal_errors");
+ LOAD_TEMPLATE('install_fatal_errors');
} else {
// Installation is done!
- LOAD_URL("install.php?page=finalize");
+ LOAD_URL('install.php?page=finalize');
}
} elseif (isInstalled()) {
// Redirection after writing data... :-)
- LOAD_TEMPLATE("install_finished");
+ LOAD_TEMPLATE('install_finished');
} else {
// Something goes wrong during installation! :-(
addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_FINALIZER_FAILED'));
- LOAD_INC("inc/fatal_errors.php");
+ LOAD_INC('inc/fatal_errors.php');
}
break;
// Check for installation mode
if ((isInstalling()) || (!isInstalled()) || (!isAdminRegistered())) {
// Load matching language file
- LOAD_INC("inc/language/install_".$mx_lang.".php");
+ LOAD_INC('inc/language/install_' . $mx_lang . '.php');
}
// Remove no more needed variables
// Filter for adding link to "active list"
function FILTER_ADD_LINK_ACTIVE_LIST () {
// Are the extensions online and active there?
- if ((EXT_IS_ACTIVE("active")) && (EXT_IS_ACTIVE("online"))) {
+ if ((EXT_IS_ACTIVE('active')) && (EXT_IS_ACTIVE('online'))) {
// Init content
$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"
+ 'what' => 'active'
);
// Add link to "we were active today" page
if (!empty($wht)) {
// Check for parent menu:
// First get it's action value
- $parent_action = GET_ACTION("admin", $wht);
+ $parent_action = GET_ACTION('admin', $wht);
// Check with this function...
- $parent = ADMINS_CHECK_ACL($parent_action, "");
+ $parent = ADMINS_CHECK_ACL($parent_action, '');
} else {
// Anything else is true!
$parent = false;
// Shall I test for a main or sub menu? (action or what?)
$acl_mode = "failed";
- if ((GET_EXT_VERSION("cache") >= "0.1.2") && (count($GLOBALS['cache_array']['admin_acls']) > 0)) {
+ if ((GET_EXT_VERSION('cache') >= '0.1.2') && (count($GLOBALS['cache_array']['admin_acls']) > 0)) {
// Lookup in cache
if ((!empty($act)) && (isset($GLOBALS['cache_array']['admin_acls']['action_menu'][$aid])) & ($GLOBALS['cache_array']['admin_acls']['action_menu'][$aid] == $act)) {
// Main menu line found
// Count cache hits
incrementConfigEntry('cache_hits');
}
- } elseif (!EXT_IS_ACTIVE("cache")) {
+ } elseif (!EXT_IS_ACTIVE('cache')) {
// Old version, so load it from database
if (!empty($act)) {
// Main menu
}
// Create email link to admins's account
-function ADMINS_CREATE_EMAIL_LINK ($email, $mod="admin") {
+function ADMINS_CREATE_EMAIL_LINK ($email, $mod='admin') {
// Is it an email?
if (strpos($email, "@") !== false) {
// Create email link
// When both passwords match update admin account
if ($POST['pass1'][$id] == $POST['pass2'][$id]) {
// Save only when both passwords are the same (also when they are empty)
- $add = ""; $cache_update = "1";
+ $add = ''; $cache_update = "1";
// Generate hash
$hash = generateHash($POST['pass1'][$id]);
// Display message
if (!empty($message)) {
- LOAD_TEMPLATE("admin_settings_saved", false, $message);
+ LOAD_TEMPLATE('admin_settings_saved', false, $message);
}
}
$currMode = GET_ADMIN_DEFAULT_ACL(GET_CURRENT_ADMIN_ID());
// Begin the edit loop
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
foreach ($POST['sel'] as $id => $selected) {
// Secure ID number
$id = bigintval($id);
SQL_FREERESULT($result_main);
if ($accounts > 1) {
// Delete accounts
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
foreach ($POST['sel'] as $id => $selected) {
// Secure ID number
$id = bigintval($id);
LOAD_TEMPLATE("admin_del_admins");
} else {
// Cannot delete last account!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_ADMINS_CANNOT_DELETE_LAST'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_ADMINS_CANNOT_DELETE_LAST'));
}
}
function ADMINS_LIST_ADMIN_ACCOUNTS() {
// Select all admin accounts
$result = SQL_QUERY("SELECT id, login, email, default_acl AS mode, la_mode FROM `{!_MYSQL_PREFIX!}_admins` ORDER BY login ASC", __FUNCTION__, __LINE__);
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
// Compile some variables
$content['mode'] = constant('ADMINS_'.strtoupper($content['mode']).'_MODE');
// Filter for adding extra data to the query
function FILTER_ADD_EXTRA_SQL_DATA ($add = "") {
// Is the admins extension updated? (should be!)
- if (GET_EXT_VERSION("admins") >= "0.3") $add .= ", default_acl AS def_acl";
- if (GET_EXT_VERSION("admins") >= "0.6.7") $add .= ", la_mode";
- if (GET_EXT_VERSION("admins") >= "0.7.2") $add .= ", login_failures, UNIX_TIMESTAMP(last_failure) AS last_failure";
+ if (GET_EXT_VERSION('admins') >= '0.3.0') $add .= ", default_acl AS def_acl";
+ if (GET_EXT_VERSION('admins') >= '0.6.7') $add .= ", la_mode";
+ if (GET_EXT_VERSION('admins') >= '0.7.2') $add .= ", login_failures, UNIX_TIMESTAMP(last_failure) AS last_failure";
// Return it
return $add;
array($target, $target, $points, bigintval($uid)), __FUNCTION__, __LINE__);
// Update mediadata as well
- if ((GET_EXT_VERSION("mediadata") >= "0.0.4") && ($target == "points")) {
+ if ((GET_EXT_VERSION('mediadata') >= '0.0.4') && ($target == "points")) {
// Update database
- MEDIA_UPDATE_ENTRY(array("total_points"), "add", $points);
+ MEDIA_UPDATE_ENTRY(array('total_points'), 'add', $points);
}
// Send out mail to user
if ((getConfig('ref_payout') > 0) && (getConfig('allow_direct_pay') != "Y")) $locked = true;
// Is begging rallye active?
- if (getConfig('beg_rallye') == "Y") {
+ 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__);
} else {
// Add points to account
unset($GLOBALS['ref_level']);
- ADD_POINTS_REFSYSTEM("beg", $uid, $points, false, "0", $locked, strtolower(getConfig('beg_mode')));
+ ADD_POINTS_REFSYSTEM('beg', $uid, $points, false, "0", $locked, strtolower(getConfig('beg_mode')));
}
// Subtract begged points from member account if the admin has selected one
if (getConfig('bonus_active') != "Y") return false;
// Init variables
- $sql = ""; $bonys = 0; $mail = 0; $column = "";
+ $sql = ''; $bonys = 0; $mail = 0; $column = '';
// Select SQL command
switch ($type)
{
- case "bonusid":
- $column = "bonus_id";
+ case 'bonusid':
+ $column = 'bonus_id';
$bonus = $mid;
break;
- case "mailid" :
- $column = "mail_id";
+ case 'mailid' :
+ $column = 'mail_id';
$mail = $mid;
break;
$points = getConfig('turbo_bonus');
} else {
// Anything else so let's explode all entered rank points
- $test = explode(";", getConfig('turbo_rates'));
+ $test = explode(';', getConfig('turbo_rates'));
if (!empty($test[$rank - 2])) {
// Level found
$points = $test[$rank - 2];
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__);
- if ((GET_EXT_VERSION("bonus") >= "0.3.5") && (getConfig('bonus_mode') != "ADD") && ($points > 0)) BONUS_POINTS_HANDLER($points);
+ if ((GET_EXT_VERSION('bonus') >= '0.3.5') && (getConfig('bonus_mode') != "ADD") && ($points > 0)) BONUS_POINTS_HANDLER($points);
}
//
function BONUS_MAKE_RANK_ROWS ($data, $type, $uid) {
- $self = false; $OUT = "";
+ $self = false; $OUT = '';
// How many ranks do we have?
- $ranks = count(explode(";", getConfig('turbo_rates'))) + 1;
+ $ranks = count(explode(';', getConfig('turbo_rates'))) + 1;
// 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",
<div class=\"guest_failed\">".sprintf(getMessage('BONUS_NO_RANKS'), $data)."</div>
</td>
</tr>\n";
- define('__YOUR_RANKING_LINE', "");
+ define('__YOUR_RANKING_LINE', '');
}
return $OUT;
}
$result = SQL_QUERY("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_bonus_turbo` WHERE timemark < (UNIX_TIMESTAMP() - ".getConfig('bonus_timeout').")", __FUNCTION__, __LINE__);
if (SQL_AFFECTEDROWS() > 0) {
// Send out email to admin
- SEND_ADMIN_NOTIFICATION(AUTOPURGE_ADMIN_TURBO_SUBJECT, "admin_autopurge_turbo", SQL_AFFECTEDROWS(), "");
+ SEND_ADMIN_NOTIFICATION(AUTOPURGE_ADMIN_TURBO_SUBJECT, "admin_autopurge_turbo", SQL_AFFECTEDROWS(), '');
}
}
//
// Add a record entry ("mode" can be add/sub!)
function ADD_BOOKING_RECORD ($subject, $uid, $points, $mode) {
// Is the sql_patches updated?
- if (EXT_VERSION_IS_OLDER("sql_patches", "0.5.7")) {
+ if (EXT_VERSION_IS_OLDER('sql_patches', '0.5.7')) {
// Abort here
return;
} // END - if
// Caching class
class CacheSystem {
// Define variables
- var $ret = "init";
- var $path = "";
- var $inc = "";
- var $fqfn = "";
+ var $ret = 'init';
+ var $path = '';
+ var $inc = '';
+ var $fqfn = '';
var $pointer = false;
var $data = array();
var $version = array();
- var $name = "";
+ var $name = '';
var $rebuilt = array();
+ var $extension = '.cache';
+ var $statusDone = 'done';
// Constructor
function CacheSystem ($interval, $path, $tested) {
// Failed is the default
- $this->ret = "failed";
+ $this->ret = 'failed';
// Remeber path
$this->path = $path;
// Check if path exists
if ((isDirectory($path)) && (!$tested)) {
+ // Make FQFN for dummy file
+ $fqfn = $path . 'dummy.tmp';
+
// Check if we can create a file inside the path
- touch($path."dummy.tmp", 'w');
- if (FILE_READABLE($path."dummy.tmp")) {
+ touch($fqfn, 'w');
+
+ // Is the file there?
+ if (FILE_READABLE($fqfn)) {
// Yes, we can do. So let's remove it
- unlink($path."dummy.tmp");
+ unlink($fqfn);
// Is there a .htaccess file?
- if (FILE_READABLE($path.".htaccess")) {
+ if (FILE_READABLE($path . '.htaccess')) {
// Update database that we have tested it
- UPDATE_CONFIG("cache_tested", 1);
+ UPDATE_CONFIG('cache_tested', 1);
// All done!
- $this->ret = "done";
+ $this->ret = $this->statusDone;
} else {
// Stop! Set a .htaccess file first
- $this->ret = "htaccess";
+ $this->ret = 'htaccess';
}
}
} elseif ($tested) {
// System already tested
- $this->ret = "done";
+ $this->ret = $this->statusDone;
}
}
$this->name = $cacheName;
// Construct include filename for LOAD_INC_ONCE() call
- $this->inc = $this->path . $cacheName . ".cache";
+ $this->inc = $this->path . $cacheName . $this->extension;
// Construct FQFN (full qualified file name)
$this->fqfn = constant('PATH') . $this->inc;
// Check if file exists and if version matches
- $status = ($this->isCacheReadable() && (is_writeable($this->fqfn)) && ($this->extensionVersionMatches("cache")));
+ $status = ($this->isCacheReadable() && (is_writeable($this->fqfn)) && ($this->extensionVersionMatches('cache')));
// Return status
return $status;
// Initializes the cache file
function init () {
// This will destory an existing cache file!
- if ($this->ret == "done") {
+ if ($this->ret == $this->statusDone) {
// Create file
if ($this->isCacheReadable()) chmod($this->fqfn, 0666);
$this->pointer = fopen($this->fqfn, 'w') or app_die(__METHOD__, __LINE__, "Cannot write to cache ".$this->fqfn." !");
fwrite($this->pointer, "<?php\n");
// Add default depency
- $this->storeExtensionVersion("cache");
+ $this->storeExtensionVersion('cache');
} else {
// Cannot create file
addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_PROBLEMS_DETECTED'));
// Write every array element to cache file
foreach ($data as $k => $v) {
// Write global cache array for immediate access
- if ((substr($k, 0, 4) == "ext_") && (isset($data['ext_name'])) && (isset($data['ext_id']))) {
- if ($k != "ext_name") {
+ if ((substr($k, 0, 4) == 'ext_') && (isset($data['ext_name'])) && (isset($data['ext_id']))) {
+ if ($k != 'ext_name') {
$GLOBALS['cache_array']['extensions'][$k][$data['ext_name']] = $v;
} else {
$GLOBALS['cache_array']['extensions'][$k][$data['ext_id']] = $v;
}
- if (($k == "ext_keep") && ($v == "Y")) {
+ if (($k == 'ext_keep') && ($v == 'Y')) {
$GLOBALS['cache_array']['active_extensions'][$data['ext_name']] = $v;
} // END - if
} elseif (is_array($v)) {
foreach ($array as $k => $v) {
if (is_array($v)) {
// Multi line(s) found
- $LINE = "";
+ $LINE = '';
foreach($v as $k2 => $v2) {
// Put every array element in a row...
$LINE .= $this->rewriteEntry($k, $v2);
// @TODO Add support for more types which break in last else-block
function rewriteEntry ($key, $value) {
// Init line
- $line = "";
+ $line = '';
// String or non-string? ;-)
if (is_string($value)) {
if (!isCacheInstanceValid()) return $data;
// Remove cache
- if ($GLOBALS['cache_instance']->loadCacheFile("config")) $GLOBALS['cache_instance']->destroyCacheFile();
- if ($GLOBALS['cache_instance']->loadCacheFile("extensions")) $GLOBALS['cache_instance']->destroyCacheFile();
- if ($GLOBALS['cache_instance']->loadCacheFile("modreg")) $GLOBALS['cache_instance']->destroyCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile('config')) $GLOBALS['cache_instance']->destroyCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile('extensions')) $GLOBALS['cache_instance']->destroyCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile('modreg')) $GLOBALS['cache_instance']->destroyCacheFile();
// Return it
return $data;
if (!isCacheInstanceValid()) return false;
// Remove cache
- if ($GLOBALS['cache_instance']->loadCacheFile("admins")) $GLOBALS['cache_instance']->destroyCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile('admins')) $GLOBALS['cache_instance']->destroyCacheFile();
}
// Destroy all cache files
if (!isCacheInstanceValid()) return false;
// Remove cache files
- if ($GLOBALS['cache_instance']->loadCacheFile("admins")) $GLOBALS['cache_instance']->destroyCacheFile();
- if ($GLOBALS['cache_instance']->loadCacheFile("admins_acls")) $GLOBALS['cache_instance']->destroyCacheFile();
- if ($GLOBALS['cache_instance']->loadCacheFile("config")) $GLOBALS['cache_instance']->destroyCacheFile();
- if ($GLOBALS['cache_instance']->loadCacheFile("extensions")) $GLOBALS['cache_instance']->destroyCacheFile();
- if ($GLOBALS['cache_instance']->loadCacheFile("modreg")) $GLOBALS['cache_instance']->destroyCacheFile();
- if ($GLOBALS['cache_instance']->loadCacheFile("refdepths")) $GLOBALS['cache_instance']->destroyCacheFile();
- if ($GLOBALS['cache_instance']->loadCacheFile("refsystem")) $GLOBALS['cache_instance']->destroyCacheFile();
- if ($GLOBALS['cache_instance']->loadCacheFile("themes")) $GLOBALS['cache_instance']->destroyCacheFile();
- if ($GLOBALS['cache_instance']->loadCacheFile("revision")) $GLOBALS['cache_instance']->destroyCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile('admins')) $GLOBALS['cache_instance']->destroyCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile('admins_acls')) $GLOBALS['cache_instance']->destroyCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile('config')) $GLOBALS['cache_instance']->destroyCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile('extensions')) $GLOBALS['cache_instance']->destroyCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile('modreg')) $GLOBALS['cache_instance']->destroyCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile('refdepths')) $GLOBALS['cache_instance']->destroyCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile('refsystem')) $GLOBALS['cache_instance']->destroyCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile('themes')) $GLOBALS['cache_instance']->destroyCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile('revision')) $GLOBALS['cache_instance']->destroyCacheFile();
}
// Filter for purging entire admin menu cache
// @TODO Lame description
function DOUBLER_GENERATE_TABLE ($uid="0", $done='N', $ref='N', $sort="ASC") {
if (empty($cnt)) $cnt = 0;
- $add = ""; $DT_MODE = 0;
+ $add = ''; $DT_MODE = 0;
if ($uid > 0) {
// Load entries only from a single user
$add = " AND userid='".bigintval($uid)."'";
- $MODE = "member"; $COLS = "4"; $DT_MODE = "2";
+ $MODE = 'member'; $COLS = "4"; $DT_MODE = "2";
$NOT_FOUND = getMessage('DOUBLER_MEMBER_NO_ENTRIES_FOUND');
} else {
// Guest mode!
- $MODE = "guest"; $COLS = "3"; $DT_MODE = "3";
+ $MODE = 'guest'; $COLS = "3"; $DT_MODE = "3";
$NOT_FOUND = getMessage('DOUBLER_GUEST_NO_ENTRIES_FOUND');
}
- if (($done == "Y") && ($sort == "ASC")) {
+ if (($done == 'Y') && ($sort == "ASC")) {
// Already payed out points (latest payouts first)
$limit = getConfig('doubler_display_old');
} elseif ($sort == "ASC") {
if (SQL_NUMROWS($result) > 0) {
// List entries
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
// Rewrite userid/refid only if admin is in
if (IS_ADMIN()) {
// List no entries
$OUT = "<tr>
<td colspan=\"".$COLS."\" align=\"center\" class=\"doubler_big_row bottom2\">
- ".LOAD_TEMPLATE("admin_settings_saved", true, $NOT_FOUND)."
+ ".LOAD_TEMPLATE('admin_settings_saved', true, $NOT_FOUND)."
</td>
</tr>\n";
}
// Initialize variables
$points = 0;
- if (getConfig('doubler_own') == "Y") {
+ if (getConfig('doubler_own') == 'Y') {
// Take points from doubler's own account
$points += getConfig('doubler_points') - getConfig('doubler_used');
}
- if (getConfig('doubler_jackpot') == "Y") {
+ if (getConfig('doubler_jackpot') == 'Y') {
// Load jackpot
$result = SQL_QUERY("SELECT points FROM `{!_MYSQL_PREFIX!}_jackpot` WHERE ok='ok' LIMIT 1", __FUNCTION__, __LINE__);
list($jackpot) = SQL_FETCHROW($result);
ORDER BY userid", __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result_stop) > 0) {
// We foud at least one
- $admin = "";
+ $admin = '';
// Init SQLs
INIT_SQLS();
//
function HTML_ADD_VALID_TAGS() {
- $OUT = "";
+ $OUT = '';
if (!is_array($GLOBALS['html_tags'])) return "";
foreach ($GLOBALS['html_tags'] as $tag) {
$OUT .= ", ".strtoupper($tag);
$test = stripslashes($html);
while (ereg("<", $test) && ereg(">", $test)) {
$check = strtolower(substr($test, strpos($test, "<") + 1, strpos($test, ">") - strpos($test, "<") - 1));
- $check = str_replace("/", "", $check);
+ $check = str_replace("/", '', $check);
if (!in_array($check, $GLOBALS['html_tags'])) {
// Invalid tag found!
return "";
}
// Now put all parts together
- $text = ""; $PARTS[] = $test;
+ $text = ''; $PARTS[] = $test;
foreach ($PARTS as $part) {
$text .= $part;
}
//
function SEND_HTML_EMAIL($to, $subject, $message, $FROM) {
- if (EXT_IS_ACTIVE("html_mail")) {
+ if (EXT_IS_ACTIVE('html_mail')) {
// Send mail away as HTML
$FROM = "Content-Type: text/html\n".$FROM;
SEND_EMAIL($to, $subject, $message, 'N', $FROM);
// Update entry
switch ($mode)
{
- case "add": $mode = "+"; break;
- case "sub": $mode = "-"; break;
+ case 'add': $mode = "+"; break;
+ case 'sub': $mode = "-"; break;
}
if ($mode == "init")
{
function MEDIA_GET_ENTRY($key)
{
// Return nothing by default
- $value = "";
+ $value = '';
// Check for entry
$result = SQL_QUERY_ESC("SELECT media_value FROM `{!_MYSQL_PREFIX!}_mediadata` WHERE media_key='%s' LIMIT 1",
//
function NL_ADD_VALID_TAGS () {
- $OUT = "";
+ $OUT = '';
if (!is_array($GLOBALS['html_tags'])) return "";
foreach ($GLOBALS['html_tags'] as $tag) {
$OUT .= ", ".strtoupper($tag);
$test = stripslashes($html);
while (ereg("<", $test) && ereg(">", $test)) {
$check = strtolower(substr($test, strpos($test, "<") + 1, strpos($test, ">") - strpos($test, "<") - 1));
- $check = str_replace("/", "", $check);
+ $check = str_replace("/", '', $check);
if (!in_array($check, $GLOBALS['html_tags'])) {
// Invalid tag found!
return "";
}
// Now put all parts together
- $text = ""; $PARTS[] = $test;
+ $text = ''; $PARTS[] = $test;
foreach ($PARTS as $part) {
$text .= $part;
}
//
function SEND_NEWSLETTER ($to, $subject, $message, $MODE) {
// Send mail away as HTML
- if (REQUEST_POST('auto_urls') == "Y") {
+ if (REQUEST_POST('auto_urls') == 'Y') {
// Automatically insert URLs into newsletter
- if ((EXT_IS_ACTIVE("html")) && ($MODE == "html")) {
+ if ((EXT_IS_ACTIVE('html_mail')) && ($MODE == 'html')) {
// Send HTML mail
SEND_EMAIL($to, $subject, HTML_INSERT_URLS($message), "Y");
} else {
}
} else {
// Regular send-out
- if ((EXT_IS_ACTIVE("html")) && ($MODE == "html")) {
+ if ((EXT_IS_ACTIVE('html_mail')) && ($MODE == 'html')) {
SEND_EMAIL($to, $subject, $message, "Y");
} else {
SEND_EMAIL($to, $subject, $message, "N");
//
function NICKNAME_GET_NICK ($userid) {
// If not found...
- $ret = "";
+ $ret = '';
// Found in cache?
if (isset($GLOBALS['cache_array']['nicknames'][$userid])) {
// Filter for updates/extends on the online list
function FILTER_UPDATE_ONLINE_LIST () {
// Do not update online list when extension is deactivated
- if (!EXT_IS_ACTIVE("online", true)) return;
+ if (!EXT_IS_ACTIVE('online', true)) return;
// Empty session?
if (session_id() == "") {
function ORDER_SELECT_OPTION_LIST($default) {
// Currenty the list is hardcoded...
- $LIST = array("userid", "zip", "country", "email", "birth_year", "last_online", "ref_clicks", "total_logins", "mail_orders");
- $OUT = "";
+ $LIST = array('userid', "zip", 'country', 'email', "birth_year", "last_online", "ref_clicks", "total_logins", "mail_orders");
+ $OUT = '';
foreach ($LIST as $item) {
- $selected = "";
+ $selected = '';
if ($item == $default) $selected = " selected=\"selected\"";
$OUT .= "<option value=\"".$item."\"".$selected.">{--ORDER_SELECT_COLUMN_".strtoupper($item)."--}</option>\n";
}
OUTPUT_HTML("</ul></div>");
} else {
// No payout types setup so far
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"guest_failed\">{--PAYOUT_NO_PAYOUT_TYPES--}</div");
+ LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"guest_failed\">{--PAYOUT_NO_PAYOUT_TYPES--}</div");
}
// Free memory
SQL_FREERESULT($result);
} else {
// Points is empty
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"guest_failed\">{--PAYOUT_NO_POINTS_ENTERED--}</div");
+ LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"guest_failed\">{--PAYOUT_NO_POINTS_ENTERED--}</div");
}
}
$this->data = $postReturn;
if ($postReturn["status"] == self::PI_GET_PRIMERA_DONE) {
- $primera = $postReturn["primera"];
+ $primera = $postReturn['primera'];
}
return $primera;
}
// Execute the withdraw of a sponsor only!
function PRIMERA_EXECUTE_WITHDRAW ($primusNick, $userMd5, $amount) {
// Is the sponsor extension installed?
- if (!EXT_IS_ACTIVE("sponsor")) {
+ if (!EXT_IS_ACTIVE('sponsor')) {
// No, abort here
return false;
} elseif (!IS_SPONSOR()) {
$DATA['refs'] = $cnt;
// Shall I notify this member?
- if (($notify == "Y") && ($un)) {
+ if (($notify == 'Y') && ($un)) {
// Load email template and send it to the user
$msg = LOAD_EMAIL_TEMPLATE("member_rallye_notify", array('prices' => $prices), $content['userid']);
SEND_EMAIL($content['userid'], sprintf(getMessage('RALLYE_MEMBER_NOTIFY'), $title), $msg);
// Choose the right admin template
$templ = "admin_rallye_no_notify";
- if ($notify == "Y") $templ = "admin_rallye_notify";
+ if ($notify == 'Y') $templ = "admin_rallye_notify";
// Send email to admin
SEND_ADMIN_NOTIFICATION(sprintf(getMessage('RALLYE_ADMIN_NOTIFY'), $title), $templ, $prices, "0");
SQL_FREERESULT($result_user);
}
//
-function RALLYE_ADD_PRICES ($rallye, $mode="email") {
+function RALLYE_ADD_PRICES ($rallye, $mode='email') {
// Output mode
switch($mode) {
- case "email": $mode = "\n"; break;
- case "html" : $mode = "<br />\n"; break;
+ case 'email': $mode = "\n"; break;
+ case 'html' : $mode = "<br />\n"; break;
}
// Load prices
if (SQL_NUMROWS($result_prices) > 0) {
// Load prices
if ($mode == "\n") $prices = "{--RALLYE_MEMBER_PRICES_ADDED--}:".$mode."------------------------------".$mode;
- $prices = "";
+ $prices = '';
while ($content = SQL_FETCHARRAY($result_prices)) {
$prices .= $content['price_level'].getMessage('RALLYE_PRICE').": ";
if (!empty($content['info'])) {
$_uid = "---";
// List only users with at least one ref!
//* DEBUG: */ echo "*".$cnt."/".$content['userid']."/".$content['curr_points']."/".$refpoints."*<br />\n";
- if (($cnt > 0) && ($refpoints > $content['curr_points'])) { $_uid = $content['userid']; } else { $cnt = ""; }
+ if (($cnt > 0) && ($refpoints > $content['curr_points'])) { $_uid = $content['userid']; } else { $cnt = ''; }
// Save values to array
$DATA['uid'][] = $_uid;
// Run this function only when a new member has confirmed his email address!
function RALLYE_AUTOADD_USER ($uid) {
global $DATA;
- $add = "";
+ $add = '';
// Updated extension?
- if (GET_EXT_VERSION("rallye") >= "0.2.0") {
+ if (GET_EXT_VERSION('rallye') >= '0.2.0') {
$add .= ", min_users, min_prices";
} // END - if
// Init variables
$min_users = 0; $min_prices = 0;
// Load data
- if (GET_EXT_VERSION("rallye") >= "0.2.0") {
+ if (GET_EXT_VERSION('rallye') >= '0.2.0') {
list($id, $title, $start, $end, $notify, $min_users, $min_prices) = SQL_FETCHROW($result);
} else {
list($id, $title, $start, $end, $notify) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
}
- if ($notify == "Y") {
+ if ($notify == 'Y') {
// Transfer all neccessary data to the global $DATA array
$DATA['start'] = MAKE_DATETIME($start, "2");
$DATA['end'] = MAKE_DATETIME($end , "2");
$DATA['title'] = $title;
$DATA['id'] = $id; // ID for the rallye details link
$DATA['ref'] = 0;
- $DATA['refs'] = GET_TOTAL_DATA($uid, "user_data", "userid", "refid", true);
+ $DATA['refs'] = GET_TOTAL_DATA($uid, "user_data", 'userid', "refid", true);
// Load prices
$prices = RALLYE_ADD_PRICES($id);
$DATA['ref'] = $prices['ref'][$key];
// Default is other
- $winnerLevel = "other";
+ $winnerLevel = 'other';
// Determine winner level
if ($DATA['level'] == 1) {
ADD_POINTS_REFSYSTEM("rallye_winner" . $winnerLevel, $uid, $DATA['points'], false, "0", false, "direct");
} // END - if
- if ($notify == "Y") {
+ if ($notify == 'Y') {
// Prepare infos for the mail template
if (!empty($DATA['info'])) {
// Take direct infos
} // END - foreach
// Select template depending on notfication is switch on / off
- if ($notify == "Y") {
+ if ($notify == 'Y') {
$templ = "admin_rallye_expired";
} elseif (is_array($users['uid'])) {
$templ = "admin_rallye_expired_no";
$uid_string = implode(",", $uids_array['uid']);
// Init result string
- $ret = "";
+ $ret = '';
// 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",
}
// Add row
- $add = "";
+ $add = '';
$OUT .= "<tr>
<td class=\"switch_sw".$SW." bottom2".$add."\"> ".($idx+1).".</td>
<td align=\"center\" class=\"switch_sw".$SW." bottom2".$add."\">";
$DATA['now_t'] = MAKE_DATETIME(time(), "1");
// Send mail to admin
- SEND_ADMIN_NOTIFICATION(sprintf(getMessage('RALLYE_ADMIN_PURGED_SUBJ'), $content['title']), "admin_rallye_purged", "", 0);
+ SEND_ADMIN_NOTIFICATION(sprintf(getMessage('RALLYE_ADMIN_PURGED_SUBJ'), $content['title']), "admin_rallye_purged", '', 0);
// Purge whole rallye
ADD_SQL(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_rallye_data` WHERE id=%s LIMIT 1",
//
function RALLYE_TEMPLATE_SELECTION ($name="template", $default="") {
// Check templates directory
- $OUT = ""; $ral = array();
+ $OUT = ''; $ral = array();
$BASE = sprintf("%stemplates/%s/html/rallye/", constant('PATH'), GET_LANGUAGE());
$dir = opendir($BASE);
while ($read = readdir($dir)) {
//
function RALLYE_GET_REFCOUNT ($uid, $old=0) {
// Check current refs
- if (GET_EXT_VERSION("cache") >= "0.1.2") {
+ if (GET_EXT_VERSION('cache') >= '0.1.2') {
// Get refs from cache
$cnt = 0;
foreach ($GLOBALS['cache_array']['refsystem']['userid'] as $id => $uid) {
} // END - if
// When he has a referal...
- if ((($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']] == $uid) || ($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']] == 0)) && (GET_EXT_VERSION("cache") >= "0.1.2") && (!isset($GLOBALS['cache_array']['back_cached']))) {
+ if ((($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']] == $uid) || ($GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']] == 0)) && (GET_EXT_VERSION('cache') >= '0.1.2') && (!isset($GLOBALS['cache_array']['back_cached']))) {
// Remove cache here
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},ref={$GLOBALS['cache_array']['up_refid'][$GLOBALS['cache_array']['back_level']]} - CACHE!<br />\n";
- if ($GLOBALS['cache_instance']->loadCacheFile("refback")) $GLOBALS['cache_instance']->destroyCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile('refback')) $GLOBALS['cache_instance']->destroyCacheFile();
$GLOBALS['cache_array']['back_cached'] = 1;
} // END - if
function GET_USER_REFS ($uid, $level) {
//* DEBUG: */ print "----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n";
// Default is no refs and no nickname
- $add = "";
+ $add = '';
$refs = array();
// Do we have nickname extension installed?
- if (EXT_IS_ACTIVE("nickname")) {
+ if (EXT_IS_ACTIVE('nickname')) {
$add = ", d.nickname";
} // END - if
__FUNCTION__, __LINE__);
while ($content = SQL_FETCHARRAY($result)) {
- $value = "";
- if ($content['field_required'] == "Y") $value = "<div class=\\\"guest_failed\\\"> (*)</div>";
+ $value = '';
+ if ($content['field_required'] == 'Y') $value = "<div class=\\\"guest_failed\\\"> (*)</div>";
// @TODO Rewrite these constants
$eval = "define('MUST_".strtoupper($content['field_name'])."', \"".$value."\");";
eval($eval);
// Check if extension country is not found (you have to enter the 2-chars long country code) or
// if extensions is present check if country code was selected
// 01 2 21 12 3 32 234 5 54 4 43 34 4 4 5 5432 2 3 3210
- $country = ((!EXT_IS_ACTIVE("country")) || ((EXT_IS_ACTIVE("country")) && (((empty($value)) && ($key == "cntry")) || (($key == "country_code") && (!empty($value)))) && (!empty($array['country_code']))));
- if ((empty($value)) && ($chk == "Y") && (!$country))
+ $country = ((!EXT_IS_ACTIVE('country')) || ((EXT_IS_ACTIVE('country')) && (((empty($value)) && ($key == "cntry")) || (($key == "country_code") && (!empty($value)))) && (!empty($array['country_code']))));
+ if ((empty($value)) && ($chk == 'Y') && (!$country))
{
// Required field not set
$array[$key] = "!";
function REGISTER_OUTPUT_REQUIRE_CHECK (&$array) {
$result = SQL_QUERY("SELECT field_name, field_required FROM `{!_MYSQL_PREFIX!}_must_register` ORDER BY `id`", __FUNCTION__, __LINE__);
while ($content = SQL_FETCHARRAY($result)) {
- if (($array[$content['field_name']] == "!") && ($content['field_required'] == "Y")) {
+ if (($array[$content['field_name']] == "!") && ($content['field_required'] == 'Y')) {
// Empty entry found
- $array[$content['field_name']] = "";
+ $array[$content['field_name']] = '';
$OUT = constant('REGISTER_'.strtoupper($content['field_name']).'_REQUIRED');
OUTPUT_HTML("<div class=\"register_failed\">".$OUT."</div>");
} // END - if
//
function REGISTER_ADD_CATEGORY_TABLE ($MODE, $return=false) {
- $OUT = "";
+ $OUT = '';
// Guests are mostly not interested in how many members has
// choosen an individual category
$AND = "WHERE `visible`='Y' ";
// Admins are allowed to see every category...
- if (IS_ADMIN()) $AND = "";
+ if (IS_ADMIN()) $AND = '';
// Look for categories
$result = SQL_QUERY("SELECT id, cat, visible FROM `{!_MYSQL_PREFIX!}_cats` ".$AND." ORDER BY `sort`",
// Is the array element not set?
if (!REQUEST_ISSET_POST('cat', $content['id'])) {
// Then set it
- REQUEST_SET_POST(array('cat', $content['id']), "");
+ REQUEST_SET_POST(array('cat', $content['id']), '');
} // END - if
// Prepare array for the template
'id' => $content['id'],
);
- if ((REQUEST_POST('cat', $content['id']) == "Y") || ((getConfig('register_default') == "Y") && (!REQUEST_ISSET_POST('cat', $content['id'])))) {
- $content['def_y'] = " checked=\"checked\"";
+ if ((REQUEST_POST('cat', $content['id']) == 'Y') || ((getConfig('register_default') == 'Y') && (!REQUEST_ISSET_POST('cat', $content['id'])))) {
+ $content['def_y'] = ' chkecked="checked"';
} else {
- $content['def_n'] = " checked=\"checked\"";
+ $content['def_n'] = ' chkecked="checked"';
}
// Load template and switch color
SQL_FREERESULT($result);
} else {
// No categories setted up so far...
- $OUT .= LOAD_TEMPLATE("admin_settings_saved", true, getMessage('NO_CATEGORIES_VISIBLE'));
+ $OUT .= LOAD_TEMPLATE('admin_settings_saved', true, getMessage('NO_CATEGORIES_VISIBLE'));
}
if ($return === true) {
// "Getter" for anonymous remote IP number
function GET_ANONYMOUS_REMOTE_ADDR ($remoteAddr) {
// Is config enabled?
- if (getConfig('removeip_anon_ip') == "Y") {
+ if (getConfig('removeip_anon_ip') == 'Y') {
// Switch way do we like?
switch (getConfig('anonymous_ip')) {
case "127.0.0.1": // mod_removeip style
// "Getter" for anonymous remote hostname
function GET_ANONYMOUS_REMOTE_HOST ($remoteHost) {
// Is config enabled?
- if (getConfig('removeip_anon_host') == "Y") {
+ if (getConfig('removeip_anon_host') == 'Y') {
// Set anon hostname
$remoteHost = "localhost.localnet";
} // END - if
// "Getter" for anonymous user agent
function GET_ANONYMOUS_USER_AGENT ($userAgent) {
// Is config enabled?
- if (getConfig('removeip_anon_ua') == "Y") {
+ if (getConfig('removeip_anon_ua') == 'Y') {
// Set anon user agent
$userAgent = "-";
} // END - if
// "Getter" for anonymous referer
function GET_ANONYMOUS_REFERER ($referer) {
// Is config enabled?
- if (getConfig('removeip_anon_ref') == "Y") {
+ if (getConfig('removeip_anon_ref') == 'Y') {
// Set anon user agent
$referer = "-";
} // END - if
$anonymity = 0;
// Is some data anonymized?
- if (getConfig('removeip_anon_ip') == "Y") $anonymity++;
- if (getConfig('removeip_anon_host') == "Y") $anonymity++;
- if (getConfig('removeip_anon_ua') == "Y") $anonymity++;
- if (getConfig('removeip_anon_ref') == "Y") $anonymity++;
+ if (getConfig('removeip_anon_ip') == 'Y') $anonymity++;
+ if (getConfig('removeip_anon_host') == 'Y') $anonymity++;
+ if (getConfig('removeip_anon_ua') == 'Y') $anonymity++;
+ if (getConfig('removeip_anon_ref') == 'Y') $anonymity++;
// Calculate anonymity level
$level = round($anonymity / 4 * 3);
$content = $data;
// Extension removeip activated?
- if ((EXT_IS_ACTIVE("removeip")) && (getConfig('removeip_'.strtolower($data['access_level']).'_show') == "Y")) {
+ if ((EXT_IS_ACTIVE('removeip')) && (getConfig('removeip_'.strtolower($data['access_level']).'_show') == 'Y')) {
// Add anoymity/privacy infos
$content['content'] .= REMOVEIP_ADD_INFOS()."<br />\n";
} // END - if
// Generate arrays which holds the relevante chars to replace
$GLOBALS['security_chars'] = array(
// The chars we are looking for...
- 'from' => array("{", "}", "/", ".", "'", "$", "(", ")", '{--', '--}', "%", ";", "[", "]", ":", "--"),
+ 'from' => array("{", "}", "/", ".", "'", "$", "(", ")", '{--', '--}', "%", ';', "[", "]", ":", "--"),
// ... and we will replace to.
'to' => array(
"{OPEN_ANCHOR2}",
}
}
-if (basename($_SERVER['PHP_SELF']) != "install.php") {
+if (basename($_SERVER['PHP_SELF']) != 'install.php') {
// And POST data
foreach ($_POST as $seckey => $secvalue) {
if (!is_array($secvalue)) {
// Check only posted input entries not the submit button
switch ($k)
{
- case "email":
+ case 'email':
$ALREADY = false;
if (!VALIDATE_EMAIL($v)) {
// Email address is not valid
break;
case "pass1":
- $k = ""; $v = "";
+ $k = ''; $v = '';
break;
case "pass2":
if ((empty($POST['force'])) || (!IS_ADMIN())) $POST['force'] = 0;
// SQL and message string is empty by default
- $sql = ""; $message = "";
+ $sql = ''; $message = '';
// Update?
if ($UPDATE) {
$ret = "added";
} elseif ((!$NO_UPDATE) && (IS_ADMIN())) {
// Add all data as hidden data
- $OUT = "";
+ $OUT = '';
foreach ($POST as $k => $v) {
// Do not add 'force' !
if ($k != "force") {
// Output message
if ((!$NO_UPDATE) && (IS_ADMIN())) {
- LOAD_TEMPLATE("admin_settings_saved", false, $message);
+ 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);
+ LOAD_TEMPLATE('admin_settings_saved', false, $message);
}
// Shall we return the status?
// Search for an email address in the database
function SPONSOR_FOUND_EMAIL_DB ($email) {
// Do we already have the provided email address in our DB?
- $ret = (GET_TOTAL_DATA($email, "sponsor_data", "id", "email", true) == 1);
+ $ret = (GET_TOTAL_DATA($email, "sponsor_data", "id", 'email', true) == 1);
// Return result
return $ret;
//
function GENERATE_SPONSOR_MENU($current)
{
- $OUT = "";
+ $OUT = '';
$WHERE = " AND active='Y'";
- if (IS_ADMIN()) $WHERE = "";
+ if (IS_ADMIN()) $WHERE = '';
// Load main menu entries
$result_main = SQL_QUERY("SELECT action AS main_action, title AS main_title FROM `{!_MYSQL_PREFIX!}_sponsor_menu`
array($content['main_action']), __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result_sub) > 0) {
// Load sub menus
- $SUB = "";
+ $SUB = '';
while ($content2 = SQL_FETCHARRAY($result_sub)) {
// Merge both arrays
$content = merge_array($content, $content2);
$OUT .= LOAD_TEMPLATE("sponsor_action", true, $content);
} else {
// No sub menus active
- $OUT .= LOAD_TEMPLATE("admin_settings_saved", true, getMessage('SPONSOR_NO_SUB_MENUS_ACTIVE'));
+ $OUT .= LOAD_TEMPLATE('admin_settings_saved', true, getMessage('SPONSOR_NO_SUB_MENUS_ACTIVE'));
}
// Free memory
}
} else {
// No main menus active
- $OUT .= LOAD_TEMPLATE("admin_settings_saved", true, getMessage('SPONSOR_NO_MAIN_MENUS_ACTIVE'));
+ $OUT .= LOAD_TEMPLATE('admin_settings_saved', true, getMessage('SPONSOR_NO_MAIN_MENUS_ACTIVE'));
}
// Free memory
//
function GENERATE_SPONSOR_CONTENT ($what) {
- $OUT = "";
+ $OUT = '';
$INC = sprintf("inc/modules/sponsor/%s.php", $what);
if (INCLUDE_READABLE($INC)) {
// Every sponsor action will output nothing directly. It will be written into $OUT!
LOAD_INC_ONCE($INC);
} else {
// File not found!
- $OUT .= LOAD_TEMPLATE("admin_settings_saved", true, sprintf(getMessage('SPONSOR_CONTENT_404'), $what));
+ $OUT .= LOAD_TEMPLATE('admin_settings_saved', true, sprintf(getMessage('SPONSOR_CONTENT_404'), $what));
}
// Return content
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 = "";
+ $templ = ''; $subj = '';
break;
}
SEND_ADMIN_NOTIFICATION($subj, $templ, $content);
// Shall we send mail to the sponsor's new email address?
- if ($content['receive_warnings'] == "Y") {
+ if ($content['receive_warnings'] == 'Y') {
// Okay send email with confirmation link to new address and with no confirmation link
// to the old address
// Include fields only for action 'edit'
if ($action == "edit") {
// Default is not limited
- $urlData['limited_yes'] = "";
- $urlData['limited_no'] = " checked=\"checked\"";
+ $urlData['limited_yes'] = '';
+ $urlData['limited_no'] = ' chkecked="checked"';
$urlData['limited'] = "false";
// Is this URL limited?
if ($urlData['views_max'] > 0) {
// Then rewrite form data
- $urlData['limited_yes'] = " checked=\"checked\"";
- $urlData['limited_no'] = "";
+ $urlData['limited_yes'] = ' chkecked="checked"';
+ $urlData['limited_no'] = '';
$urlData['limited'] = "true";
} // END - if
} // END - if
$executed = false;
// Is limitation "no" and "limit" is > 0?
- if ((isset($urlData[$action]['limited'])) && ($urlData[$action]['limited'] == "N") && ((isset($urlData[$action]['limit'])) && ($urlData[$action]['limit'] > 0)) || (!isset($urlData[$action]['limit']))) {
+ if ((isset($urlData[$action]['limited'])) && ($urlData[$action]['limited'] == 'N') && ((isset($urlData[$action]['limit'])) && ($urlData[$action]['limit'] > 0)) || (!isset($urlData[$action]['limit']))) {
// Set it to unlimited
$urlData[$action]['limit'] = 0;
} // END - if
$GLOBALS['last_url_data'] = array();
// Is the column an id number?
- if (($column == "id") || ($column == "userid")) {
+ if (($column == "id") || ($column == 'userid')) {
// Extra secure input
$searchTerm = bigintval($searchTerm);
} // END - if
// If the column is "id" there can be only one entry
- $limit = "";
+ $limit = '';
if ($column == "id") {
$limit = "LIMIT 1";
} // END - if
$content['limit'] = SURFBAR_TRANSLATE_LIMIT($content['limit']);
// If in reg-mode we notify admin
- if (($addMode == "reg") || (getConfig('surfbar_notify_admin_unlock') == "Y")) {
+ if (($addMode == "reg") || (getConfig('surfbar_notify_admin_unlock') == 'Y')) {
// Notify admin even when he as unlocked an email
SURFBAR_NOTIFY_ADMIN("url_{$addMode}", $content);
} // END - if
// Check wether the user is allowed to book more URLs
function SURFBAR_IF_USER_BOOK_MORE_URLS ($uid=0) {
// Is this admin and userid is zero or does the user has some URLs left to book?
- return ((($uid == 0) && (IS_ADMIN())) || (SURFBAR_GET_TOTAL_USER_URLS($uid, "", array("REJECTED")) < getConfig('surfbar_max_order')));
+ return ((($uid == 0) && (IS_ADMIN())) || (SURFBAR_GET_TOTAL_USER_URLS($uid, '', array("REJECTED")) < getConfig('surfbar_max_order')));
}
// Get total amount of URLs of given status for current user
function SURFBAR_GET_TOTAL_USER_URLS ($uid=0, $status="",$exclude="") {
}
// Default is all URLs
- $add = "";
+ $add = '';
// Is the status set?
if (is_array($status)) {
if ($length == 0) $length = 10;
// Generate a code until the length matches
- $valCode = "";
+ $valCode = '';
while (strlen($valCode) != $length) {
// Is the salt set?
if (empty($salt)) {
// Updates the statistics of current URL/userid
function SURFBAR_UPDATE_INSERT_STATS_RECORD () {
// Init add
- $add = "";
+ $add = '';
// Get allowed views
$allowed = SURFBAR_GET_VIEWS_ALLOWED();
$percent = abs(log(getConfig('surfbar_dynamic_percent') / 100 + 1));
// Get total users
- $totalUsers = GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true);
+ $totalUsers = GET_TOTAL_DATA("CONFIRMED", "user_data", 'userid', "status", true);
// Get online users
$onlineUsers = SURFBAR_DETERMINE_TOTAL_ONLINE();
$percent = abs(log(getConfig('surfbar_dynamic_percent') / 100 + 1));
// Get total users
- $totalUsers = GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true);
+ $totalUsers = GET_TOTAL_DATA("CONFIRMED", "user_data", 'userid', "status", true);
// Calculate addon
$addon += abs($max * $percent * $totalUsers);
$USE = SURFBAR_GET_LOCK_IDS();
// Shall we add some URL ids to ignore?
- $add = "";
+ $add = '';
if (count($USE) > 0) {
// Ignore some!
$add = " AND sbu.id NOT IN (";
if (is_null($GLOBALS['cache_array']['surfbar']['last_salt'])) {
// Then repair it wit the static!
//* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "last_salt - FIXED!", false);
- $GLOBALS['cache_array']['surfbar']['last_salt'] = "";
+ $GLOBALS['cache_array']['surfbar']['last_salt'] = '';
} // END - if
// Fix missing last_surfed
// @TODO Move all extension-dependent queries into filters
function OUTPUT_ADVANCED_OVERVIEW (&$result_main) {
// Init variables/arrays
- $EXTRAS = "";
- $OUT = "";
+ $EXTRAS = '';
+ $OUT = '';
$WHATs = array();
$DESCRs = array();
$TITLEs = array();
// First check for all account status seperately
//
// Confirmed accounts
- $value = GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true);
+ $value = GET_TOTAL_DATA("CONFIRMED", "user_data", 'userid', "status", true);
if ($value > 0) {
define('__CONFIRMED_VALUE', "<a href=\"{!URL!}/modules.php?module=admin&what=list_user&status=confirmed\">".$value."</a>");
}
// Unconfirmed accounts
- $value = GET_TOTAL_DATA("UNCONFIRMED", "user_data", "userid", "status", true);
+ $value = GET_TOTAL_DATA("UNCONFIRMED", "user_data", 'userid', "status", true);
if ($value > 0) {
define('__UNCONFIRMED_VALUE', "<a href=\"{!URL!}/modules.php?module=admin&what=chk_regs\">".$value."</a>");
}
// And locked accounts
- $value = GET_TOTAL_DATA("LOCKED", "user_data", "userid", "status", true);
+ $value = GET_TOTAL_DATA("LOCKED", "user_data", 'userid', "status", true);
if ($value > 0) {
define('__LOCKED_VALUE', "<a href=\"{!URL!}/modules.php?module=admin&what=list_user&status=locked\">".$value."</a>");
//
// Autopurged mails
//
- if (EXT_IS_ACTIVE("autopurge")) {
+ if (EXT_IS_ACTIVE('autopurge')) {
// Get auto-purged mails
$value = GET_TOTAL_DATA("DELETED", "pool", "id", "data_type", true);
//
// Autopurged bonus mails
//
- if (GET_EXT_VERSION("bonus") >= "0.1.8") {
+ if (GET_EXT_VERSION('bonus') >= '0.1.8') {
// Get auto-purged bonus mails
- $value = GET_TOTAL_DATA("DELETED", "bonus", "id", "data_type", true);
+ $value = GET_TOTAL_DATA("DELETED", 'bonus', "id", "data_type", true);
if ($value > 0) {
define('__MAIL_BONUS_AP_VALUE', "<a href=\"{!URL!}/modules.php?module=admin&what=email_details\">".$value."</a>");
} else {
define('__MAIL_BONUS_AP_VALUE', "0");
}
- } elseif (EXT_IS_ACTIVE("bonus")) {
- define('__MAIL_BONUS_AP_VALUE', sprintf(getMessage('ADMIN_EXT_BONUS_OUTDATED', "0.1.8")));
+ } elseif (EXT_IS_ACTIVE('bonus')) {
+ define('__MAIL_BONUS_AP_VALUE', sprintf(getMessage('ADMIN_EXT_BONUS_OUTDATED', '0.1.8')));
} else {
define('__MAIL_BONUS_AP_VALUE', "<span class=\"admin_note\">{--ADMIN_EXT_BONUS_404--}</span>");
}
//
// Sent bonus mails
//
- if (GET_EXT_VERSION("bonus") >= "0.1.8") {
+ if (GET_EXT_VERSION('bonus') >= '0.1.8') {
// Get sent bonus mails (but not notifications)
- $value = GET_TOTAL_DATA("SEND", "bonus", "id", "data_type", true, " AND is_notify='N'");
+ $value = GET_TOTAL_DATA("SEND", 'bonus', "id", "data_type", true, " AND is_notify='N'");
if ($value > 0) {
define('__MAIL_BONUS_SEND_VALUE', "<a href=\"{!URL!}/modules.php?module=admin&what=email_details\">".$value."</a>");
} else {
define('__MAIL_BONUS_SEND_VALUE', "0");
}
- } elseif (EXT_IS_ACTIVE("bonus")) {
- define('__MAIL_BONUS_SEND_VALUE', sprintf(getMessage('ADMIN_EXT_BONUS_OUTDATED', "0.1.8")));
+ } elseif (EXT_IS_ACTIVE('bonus')) {
+ define('__MAIL_BONUS_SEND_VALUE', sprintf(getMessage('ADMIN_EXT_BONUS_OUTDATED', '0.1.8')));
} else {
define('__MAIL_BONUS_SEND_VALUE', getMessage('ADMIN_EXT_BONUS_404'));
}
- if (EXT_IS_ACTIVE("autopurge")) {
+ if (EXT_IS_ACTIVE('autopurge')) {
// Start finding them...
$since = getConfig('ap_inactive_since');
- $EXCLUDE_LIST = "";
+ $EXCLUDE_LIST = '';
if (getConfig('def_refid') > 0) {
$EXCLUDE_LIST = " AND d.userid != ".getConfig('def_refid')."";
} // END - if
// Check for more extensions
// @TODO These can be rewritten to filter
- if (EXT_IS_ACTIVE("beg")) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('beg_uid')."";
- if (EXT_IS_ACTIVE("bonus")) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('bonus_uid')."";
- if (EXT_IS_ACTIVE("doubler")) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('doubler_uid')."";
- if (GET_EXT_VERSION("holiday") >= "0.1.3") $EXCLUDE_LIST .= " AND d.holiday_active='N'";
+ if (EXT_IS_ACTIVE('beg')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('beg_uid')."";
+ if (EXT_IS_ACTIVE('bonus')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('bonus_uid')."";
+ if (EXT_IS_ACTIVE('doubler')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('doubler_uid')."";
+ if (GET_EXT_VERSION('holiday') >= '0.1.3') $EXCLUDE_LIST .= " AND d.holiday_active='N'";
// Check for all accounts
ADD_SQL("SELECT DISTINCT d.userid, d.email, d.last_online
$TITLEs[] = getMessage('ADMIN_TASK_INACTIVE_AUTOPURGE_TITLE');
}
- if (GET_EXT_VERSION("sql_patches") >= "0.3.4") {
+ if (GET_EXT_VERSION('sql_patches') >= '0.3.4') {
// Check for accounts without referal
ADD_SQL("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE refid='0' ORDER BY userid");
$DESCRs[] = getMessage('ADMIN_TASK_LIST_ACCOUNT_NOREF');
$WHATs[] = "list_user&mode=norefs";
}
- if (EXT_IS_ACTIVE("payout")) {
+ if (EXT_IS_ACTIVE('payout')) {
// List new payout requests
ADD_SQL("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_payouts` WHERE `status`='NEW' ORDER BY userid");
$WHATs[] = "list_payouts";
$TITLEs[] = getMessage('ADMIN_TASK_LIST_PAYOUTS_ALL_TITLE');
}
- if (EXT_IS_ACTIVE("wernis")) {
+ if (EXT_IS_ACTIVE('wernis')) {
// List new wernis requests
ADD_SQL("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_wernis` ORDER BY userid");
$WHATs[] = "list_wernis";
$TITLEs[] = getMessage('ADMIN_TASK_LIST_WERNIS_ALL_TITLE');
}
- if (EXT_IS_ACTIVE("primera")) {
+ if (EXT_IS_ACTIVE('primera')) {
// List new primera requests
ADD_SQL("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_primera` ORDER BY userid");
$WHATs[] = "list_primera";
$TITLEs[] = getMessage('ADMIN_TASK_LIST_PRIMERA_ALL_TITLE');
}
- if (EXT_IS_ACTIVE("holiday")) {
+ if (EXT_IS_ACTIVE('holiday')) {
// List holiday requests
ADD_SQL("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_holidays` ORDER BY userid");
$WHATs[] = "list_holiday";
$TITLEs[] = getMessage('ADMIN_TASK_LIST_HOLIDAYS_TITLE');
}
- if (GET_EXT_VERSION("bonus") >= "0.8.7") {
+ if (GET_EXT_VERSION('bonus') >= '0.8.7') {
// List all notifications
ADD_SQL("SELECT id FROM `{!_MYSQL_PREFIX!}_bonus` WHERE is_notify='Y' ORDER BY timestamp DESC");
$WHATs[] = "list_notifications";
$TITLEs[] = getMessage('ADMIN_TASK_LIST_NOTIFICATIONS_TITLE');
} // END - if
- if (GET_EXT_VERSION("bonus") >= "0.2.3") {
+ if (GET_EXT_VERSION('bonus') >= '0.2.3') {
// Active rallye
- if (GET_EXT_VERSION("bonus") >= "0.6.9") {
+ if (GET_EXT_VERSION('bonus') >= '0.6.9') {
// Add more bonus points here
$USE = "(0";
- if (getConfig('bonus_click_yn') == "Y") $USE .= " + turbo_bonus";
- if (getConfig('bonus_login_yn') == "Y") $USE .= " + login_bonus";
- if (getConfig('bonus_order_yn') == "Y") $USE .= " + bonus_order";
- if (getConfig('bonus_stats_yn') == "Y") $USE .= " + bonus_stats";
- if (getConfig('bonus_ref_yn') == "Y") $USE .= " + bonus_ref";
+ if (getConfig('bonus_click_yn') == 'Y') $USE .= " + turbo_bonus";
+ if (getConfig('bonus_login_yn') == 'Y') $USE .= " + login_bonus";
+ if (getConfig('bonus_order_yn') == 'Y') $USE .= " + bonus_order";
+ if (getConfig('bonus_stats_yn') == 'Y') $USE .= " + bonus_stats";
+ if (getConfig('bonus_ref_yn') == 'Y') $USE .= " + bonus_ref";
$USE .= ")";
} else {
// Old version ???
}
// Autopurge installed?
- $lastOnline = "";
- if ((EXT_IS_ACTIVE("autopurge")) && (getConfig('autopurge_inactive') == "Y") && (getConfig('ap_inactive_since') > 0)) {
+ $lastOnline = '';
+ if ((EXT_IS_ACTIVE('autopurge')) && (getConfig('autopurge_inactive') == 'Y') && (getConfig('ap_inactive_since') > 0)) {
// Use last online timestamp to keep inactive members away from here
$lastOnline = sprintf(" AND last_online >= (UNIX_TIMESTAMP() - %s)", getConfig('ap_inactive_since'));
}
$TITLEs[] = getMessage('ADMIN_TASK_LIST_BONUS_TITLE');
}
- if (GET_EXT_VERSION("beg") >= "0.1.2") {
+ if (GET_EXT_VERSION('beg') >= '0.1.2') {
// Begging rallye
// Autopurge installed?
- $lastOnline = "";
- if ((EXT_IS_ACTIVE("autopurge")) && (getConfig('autopurge_inactive') == "Y") && (getConfig('ap_inactive_since') > 0)) {
+ $lastOnline = '';
+ if ((EXT_IS_ACTIVE('autopurge')) && (getConfig('autopurge_inactive') == 'Y') && (getConfig('ap_inactive_since') > 0)) {
// Use last online timestamp to keep inactive members away from here
$lastOnline = sprintf(" AND last_online >= (UNIX_TIMESTAMP() - %s)", getConfig('ap_inactive_since'));
}
$TITLEs[] = getMessage('ADMIN_TASK_LIST_BEG_TITLE');
}
- if (EXT_IS_ACTIVE("doubler")) {
+ if (EXT_IS_ACTIVE('doubler')) {
// List waiting payouts
ADD_SQL("SELECT id FROM `{!_MYSQL_PREFIX!}_doubler` WHERE completed='N' ORDER BY `id`");
$WHATs[] = "list_doubler&mode=waiting&select=all";
$TITLEs[] = getMessage('ADMIN_TASK_LIST_ENGINE_URLS_TITLE');
}
- if (EXT_IS_ACTIVE("sponsor")) {
+ if (EXT_IS_ACTIVE('sponsor')) {
// List all sponsors
ADD_SQL("SELECT id FROM `{!_MYSQL_PREFIX!}_sponsor_data` ORDER BY `id`");
$WHATs[] = "list_sponsor";
$TITLEs[] = getMessage('ADMIN_TASK_LIST_SPONSOR_ORDERS_TITLE');
}
- if (EXT_IS_ACTIVE("country")) {
+ if (EXT_IS_ACTIVE('country')) {
// List country codes
ADD_SQL("SELECT id FROM `{!_MYSQL_PREFIX!}_countries` ORDER BY `id`");
$WHATs[] = "list_country";
$TITLEs[] = getMessage('ADMIN_TASK_LIST_COUNTRY_TITLE');
}
- if (EXT_IS_ACTIVE("theme")) {
+ if (EXT_IS_ACTIVE('theme')) {
// List all themes
ADD_SQL("SELECT id FROM `{!_MYSQL_PREFIX!}_themes` ORDER BY `id`");
$WHATs[] = "theme_edit";
$TITLEs[] = getMessage('ADMIN_TASK_LIST_THEME_ACTIVE_TITLE');
}
- if (EXT_IS_ACTIVE("admins")) {
+ if (EXT_IS_ACTIVE('admins')) {
// List all administrator logins
ADD_SQL("SELECT id FROM `{!_MYSQL_PREFIX!}_admins` ORDER BY `id`");
$WHATs[] = "admins_edit";
$TITLEs[] = getMessage('ADMIN_TASK_LIST_ADMINS_ALL_TITLE');
}
- if (EXT_IS_ACTIVE("surfbar")) {
+ if (EXT_IS_ACTIVE('surfbar')) {
// List all URLs in surfbar
ADD_SQL("SELECT id FROM `{!_MYSQL_PREFIX!}_surfbar_urls` ORDER BY `id`");
$WHATs[] = "list_surfbar_urls";
//
function TASK_CREATE_EXTRA_ROWS ($WHATs, $DESCRs, $TITLEs) {
// Init variables
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
// Sadly this cannot be rewritten to a filter... :(
foreach (GET_SQLS() as $key => $sql) {
array_pk_sort($themesArray, array("theme_name"));
// Construct selection form for the box template
- $OUT = "";
+ $OUT = '';
foreach ($themesArray['theme_unix'] as $key => $theme) {
$OUT .= " <option value=\"".$theme."\"";
if ($theme == GET_CURR_THEME()) $OUT .= " selected=\"selected\"";
// Get version from name
function THEME_GET_VERSION ($name) {
- // Is the extension "theme" installed?
- if (!EXT_IS_ACTIVE("theme")) {
+ // Is the extension 'theme' installed?
+ if (!EXT_IS_ACTIVE('theme')) {
// Then abort here
return "!.!";
} // END - if
// Count up
incrementConfigEntry('cache_hits');
- } elseif (GET_EXT_VERSION("cache") != "0.1.8") {
+ } 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__);
// Checks if a theme is active
function THEME_IS_ACTIVE ($name) {
- // Is the extension "theme" installed?
- if (!EXT_IS_ACTIVE("theme")) {
+ // Is the extension 'theme' installed?
+ if (!EXT_IS_ACTIVE('theme')) {
// Then abort here
return false;
} // END - if
// Is the cache entry there?
if (isset($GLOBALS['cache_array']['themes']['theme_active'][$name])) {
// Get the version from cache
- $active = ($GLOBALS['cache_array']['themes']['theme_active'][$name] == "Y");
+ $active = ($GLOBALS['cache_array']['themes']['theme_active'][$name] == 'Y');
// Count up
incrementConfigEntry('cache_hits');
- } elseif (GET_EXT_VERSION("cache") != "0.1.8") {
+ } 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__);
// Gets current human-readable theme name
function GET_CURR_THEME_NAME () {
- // Is the extension "theme" installed?
- if (!EXT_IS_ACTIVE("theme")) {
+ // Is the extension 'theme' installed?
+ if (!EXT_IS_ACTIVE('theme')) {
// Then abort here
return "default";
} // END - if
// Count up
incrementConfigEntry('cache_hits');
- } elseif (GET_EXT_VERSION("cache") != "0.1.8") {
+ } 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__);
/* Creates the list of letters and makes them a link. */
$alphabet = array(getMessage('_ALL2'),"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",getMessage('_OTHERS'));
$num = count($alphabet) - 1;
- $OUT = "";
+ $OUT = '';
while (list($counter, $ltr) = each($alphabet)) {
if (REQUEST_GET('letter') == $ltr) {
// Current letter is letter from URL
// Add links for sorting
function SortLinks ($letter, $sortby, $colspan, $return=false) {
- $OUT = "";
+ $OUT = '';
if (!REQUEST_ISSET_GET(('offset'))) REQUEST_SET_GET('offset', 0);
if (!REQUEST_ISSET_GET(('page'))) REQUEST_SET_GET('page' , 0);
);
// Add nickname if extension is installed
- if (EXT_IS_ACTIVE("nickname")) {
+ if (EXT_IS_ACTIVE('nickname')) {
$list['nickname'] = getMessage('NICKNAME');
} // END - if
define('__FORM_FOOTER', "<tr><td colspan=\"{!__COLSPAN2!}\" class=\"seperator bottom2\"> </td></tr>");
}
- $OUT = "";
+ $OUT = '';
for ($page = 1; $page <= $PAGES; $page++) {
if (($page == REQUEST_GET('page')) || ((!REQUEST_ISSET_GET(('page'))) && ($page == "1"))) {
$OUT .= "<strong>-";
} else {
if (!REQUEST_ISSET_GET(('letter'))) REQUEST_SET_GET('letter', getMessage('_ALL2'));
- if (!REQUEST_ISSET_GET(('sortby'))) REQUEST_SET_GET('sortby', "userid");
+ if (!REQUEST_ISSET_GET(('sortby'))) REQUEST_SET_GET('sortby', 'userid');
// Base link
$OUT .= "<a href=\"{!URL!}/modules.php?module=admin&what=".$GLOBALS['what'];
}
// Create email link to user's account
-function USER_CREATE_EMAIL_LINK($email, $mod="admin") {
+function USER_CREATE_EMAIL_LINK($email, $mod='admin') {
// Show contact link only if user is confirmed by default
$locked = " AND `status`='CONFIRMED'";
// But admins shall always see it
- if (IS_ADMIN()) $locked = "";
+ if (IS_ADMIN()) $locked = '';
$result = SQL_QUERY_ESC("SELECT userid
FROM `{!_MYSQL_PREFIX!}_user_data`
$refid = 0;
// Is the extension version fine?
- if (GET_EXT_VERSION("user") >= "0.3.4") {
+ if (GET_EXT_VERSION('user') >= "0.3.4") {
// Get all user ids
- $totalUsers = GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true, " AND `rand_confirmed` >= ".getConfig('user_min_confirmed')."");
+ $totalUsers = GET_TOTAL_DATA("CONFIRMED", "user_data", 'userid', "status", true, " AND `rand_confirmed` >= ".getConfig('user_min_confirmed')."");
// Do we have at least one?
if ($totalUsers > 0) {
// Do the user login
function USER_DO_LOGIN ($uid, $passwd) {
// Init variables
- $dmy = "";
+ $dmy = '';
// Add last_login if available
- $lastOnline = "";
- if (GET_EXT_VERSION("sql_patches") >= "0.2.8") {
+ $lastOnline = '';
+ if (GET_EXT_VERSION('sql_patches') >= '0.2.8') {
$lastOnline = ", last_login";
} // END - if
);
// Check login data
- if ((EXT_IS_ACTIVE("nickname")) && (NICKNAME_PROBE_ON_USERID($uid))) {
+ 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__);
// 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'))) {
+ 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;
// 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');
+ 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
array($uid), __FUNCTION__, __LINE__);
if (SQL_AFFECTEDROWS() == 1) {
// Procedure to checking for login data
- if (($GLOBALS['bonus_payed']) && (EXT_IS_ACTIVE("bonus"))) {
+ if (($GLOBALS['bonus_payed']) && (EXT_IS_ACTIVE('bonus'))) {
// Bonus added (just displaying!)
$URL = "modules.php?module=chk_login&mode=bonus";
} else {
// Cookies not setable!
$URL = "modules.php?module=index&what=login&login=".getCode('NO_COOKIES');
}
- } elseif (GET_EXT_VERSION("sql_patches") >= "0.6.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__);
if (!empty($email)) $email = str_replace("{DOT}", '.', $email);
// Init result and error
- $errorCode = "";
+ $errorCode = '';
$result = false;
// Probe userid/nickname
- if ((EXT_IS_ACTIVE("nickname")) && (NICKNAME_PROBE_ON_USERID($uid))) {
+ 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__);
SEND_EMAIL($uid, getMessage('GUEST_NEW_PASSWORD'), $msg);
// Output note to user
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('GUEST_NEW_PASSWORD_SEND'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('GUEST_NEW_PASSWORD_SEND'));
} else {
// Account is locked or unconfirmed
$errorCode = GEN_ERROR_CODE_FROM_ACCOUNT_STATUS($status);
}
} else {
// ID or email is wrong
- LOAD_TEMPLATE("admin_settings_saved", false, "<span class=\"guest_failed\">{--GUEST_WRONG_ID_EMAIL--}</span>");
+ LOAD_TEMPLATE('admin_settings_saved', false, "<span class=\"guest_failed\">{--GUEST_WRONG_ID_EMAIL--}</span>");
}
// Return the error code
function WERNIS_EXECUTE_WITHDRAW ($wdsId, $userMd5, $amount) {
// Is the sponsor extension installed?
if (getConfig('wernis_withdraw_active') != "Y") {
- if (!EXT_IS_ACTIVE("sponsor")) {
+ if (!EXT_IS_ACTIVE('sponsor')) {
// No, abort here
return false;
} elseif (!IS_SPONSOR()) {
}
// Divide/multiply the factor
- if ($mode == "payout") {
+ if ($mode == 'payout') {
// Divide for payout
$points = $points / getConfig('wernis_payout_factor');
} else {
return $result;
}
-// Prepares a bonus mail for delivery. Works only if extension "bonus" is active
+// Prepares a bonus mail for delivery. Works only if extension 'bonus' is active
function YOOMEDIA_PREPARE_MAIL_DELIVERY ($data) {
// Is this an admin?
if (!IS_ADMIN()) {
// Abort here
return false;
- } elseif (!EXT_IS_ACTIVE("bonus")) {
+ } elseif (!EXT_IS_ACTIVE('bonus')) {
// Abort here
return false;
}
$data['all'] = TRANSLATE_COMMA(GET_TOTAL_RECEIVERS());
// Add categories
- $data['categories'] = ADD_CATEGORY_OPTIONS("normal");
+ $data['categories'] = ADD_CATEGORY_OPTIONS('normal');
// Load template
LOAD_TEMPLATE("admin_send_yoomedia", false, $data);
if (!IS_ADMIN()) {
// Abort here
return false;
- } elseif (!EXT_IS_ACTIVE("bonus")) {
+ } elseif (!EXT_IS_ACTIVE('bonus')) {
// Abort here
return false;
}
$data['receiver'] = 0;
// HTML or normal? (normal is default...)
- $type = "t";
- if (($mode == "html") && (EXT_IS_ACTIVE("html"))) $type = "h";
+ $type = 't';
+ if (($mode == 'html') && (EXT_IS_ACTIVE('html_mail'))) $type = 'h';
// Auto-generate URL
$data['url'] = sprintf("http://www.yoomedia.de/code/%s-mail.php?id=%s&sid=%s",
function YOOMEDIA_CONVERT_MODE ($mode) {
// Convert mode for normal/html
switch ($mode) {
- case "normal":
+ case 'normal':
$mode = "textmail";
break;
- case "html":
+ case 'html':
$mode = "htmlmail";
break;
} // END - switch
// Init & set the INC_POOL
INIT_INC_POOL();
-SET_INC_POOL(GET_DIR_AS_ARRAY("inc/loader/", "load_cache-"));
+SET_INC_POOL(GET_DIR_AS_ARRAY('inc/loader/', 'load_cache-'));
// Run the filter
runFilterChain('load_includes');
// Some security stuff...
if (!defined('__SECURITY')) {
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
require($INC);
}
// Init variables
EXT_INIT_CSS_FILES();
-$add = "";
+$add = '';
// Init cache instance and array
$GLOBALS['cache_instance'] = null;
$GLOBALS['cache_array']['active_extensions'] = array();
// By default no cache is set
-$GLOBALS['cache_mode'] = "no";
+$GLOBALS['cache_mode'] = 'no';
// Load sql_patchrs extension alone
-if (!LOAD_EXTENSION("sql_patches")) {
+if (!LOAD_EXTENSION('sql_patches')) {
// Could not load sql_patches! ARGH!!!
- trigger_error("Cannot load extension sql_patches.");
+ trigger_error('Cannot load extension sql_patches.');
} // END - if
// Init inc pool array
//
// Load extensions
//
-if (EXT_IS_ACTIVE("cache")) {
+if (EXT_IS_ACTIVE('cache')) {
// Load cache extension alone
- if (!LOAD_EXTENSION("cache")) {
+ if (!LOAD_EXTENSION('cache')) {
// Extension 'cache' was not loaded
- trigger_error("Cannot load extension cache.");
+ trigger_error('Cannot load extension cache.');
} // END - if
// Check extension cache
- switch (($GLOBALS['cache_instance']->loadCacheFile("extensions", true)) && ($GLOBALS['cache_instance']->extensionVersionMatches("sql_patches"))) {
- case true : $GLOBALS['cache_mode'] = "load"; break;
- case false: $GLOBALS['cache_mode'] = "init"; break;
+ switch (($GLOBALS['cache_instance']->loadCacheFile('extensions', true)) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
+ case true : $GLOBALS['cache_mode'] = 'load'; break;
+ case false: $GLOBALS['cache_mode'] = 'init'; break;
}
// Do we need to init the cache?
- if (($GLOBALS['cache_mode'] == "init") && (getConfig('cache_exts') == "Y")) {
+ if (($GLOBALS['cache_mode'] == 'init') && (getConfig('cache_exts') == 'Y')) {
// Init cache file
- $GLOBALS['cache_instance']->init("EXTENSIONS");
- $GLOBALS['cache_instance']->storeExtensionVersion("sql_patches");
- } elseif (getConfig('cache_exts') != "Y") {
+ $GLOBALS['cache_instance']->init('EXTENSIONS');
+ $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches');
+ } elseif (getConfig('cache_exts') != 'Y') {
// Cache will not be created for extensions
- $GLOBALS['cache_mode'] = "skip";
+ $GLOBALS['cache_mode'] = 'skip';
}
} // END - if
// Load cache?
-if ($GLOBALS['cache_mode'] == "load") {
+if ($GLOBALS['cache_mode'] == 'load') {
// Init include array
$EXT_POOL = array();
// Re-initialize handler
- $GLOBALS['cache_instance']->loadCacheFile("extensions", true);
+ $GLOBALS['cache_instance']->loadCacheFile('extensions', true);
// Load extension data from cache file
$EXT_DUMMY = $GLOBALS['cache_instance']->getArrayFromCache();
$EXT_NAMES = array();
foreach ($EXT_DUMMY['ext_name'] as $k => $name) {
// Load CSS file
- if ($EXT_DUMMY['ext_css'][$k] == "Y") EXT_ADD_CSS_FILE("".$name.".css");
+ if ($EXT_DUMMY['ext_css'][$k] == 'Y') EXT_ADD_CSS_FILE($name . '.css');
// Load extension file itself
- if ((($EXT_DUMMY['ext_active'][$k] == "Y") || ($EXT_DUMMY['ext_keep'][$k] == "Y") || (IS_ADMIN())) && (!in_array($name, array("sql_patches", "cache")))) {
+ if ((($EXT_DUMMY['ext_active'][$k] == 'Y') || ($EXT_DUMMY['ext_keep'][$k] == 'Y') || (IS_ADMIN())) && (!in_array($name, array('sql_patches', 'cache')))) {
$EXT_POOL[] = $name;
} // END - if
// Add ext name
$EXT_NAMES[$id] = $name;
- // Add deprecated flag (defaults to "not deprecated")
- $EXT_DUMMY['ext_deprecated'][$name] = "N";
+ // Add deprecated flag (defaults to 'not deprecated')
+ $EXT_DUMMY['ext_deprecated'][$name] = 'N';
// Mark it as active extension
$GLOBALS['cache_array']['active_extensions']['$name'] = $EXT_DUMMY['ext_keep'][$k];
INIT_FILTER_SYSTEM();
// Load more cache files (like admins)
- LOAD_INC_ONCE("inc/load_cache.php");
+ LOAD_INC_ONCE('inc/load_cache.php');
// Remove array
unset($EXT_POOL);
// If current user is not admin load only activated extensions. But load
// them all if we are going to init the cache files. The admin shall use
// every available extension for testing purposes.
- if ((!IS_ADMIN()) && ($GLOBALS['cache_mode'] != "init")) $add = " WHERE ext_active='Y'";
+ if ((!IS_ADMIN()) && ($GLOBALS['cache_mode'] != 'init')) $add = " WHERE ext_active='Y'";
- if (GET_EXT_VERSION("sql_patches") >= "0.0.6") {
+ if (GET_EXT_VERSION('sql_patches') >= '0.0.6') {
// Query with CSS file from DB
- $res_ext_crt = SQL_QUERY("SELECT id AS ext_id, ext_name, ext_has_css AS ext_css, ext_active, ext_version
-FROM `{!_MYSQL_PREFIX!}_extensions`".$add."
-ORDER BY ext_name", __FILE__, __LINE__);
+ $res_ext_crt = SQL_QUERY('SELECT id AS ext_id, ext_name, ext_has_css AS ext_css, ext_active, ext_version
+FROM `{!_MYSQL_PREFIX!}_extensions`' . $add . '
+ORDER BY ext_name', __FILE__, __LINE__);
} else {
// Old obsolete query string
- $res_ext_crt = SQL_QUERY("SELECT id AS ext_id, ext_name, ext_name, ext_active, ext_version
-FROM `{!_MYSQL_PREFIX!}_extensions`".$add."
-ORDER BY ext_name", __FILE__, __LINE__);
+ $res_ext_crt = SQL_QUERY('SELECT id AS ext_id, ext_name, ext_name, ext_active, ext_version
+FROM `{!_MYSQL_PREFIX!}_extensions`' . $add . '
+ORDER BY ext_name', __FILE__, __LINE__);
}
}
$DEL = array();
// At least one found?
-if ((SQL_NUMROWS($res_ext_crt) > 0) && ((($GLOBALS['cache_mode'] == "init") && ($GLOBALS['output_mode'] != "1") && ($GLOBALS['output_mode'] != "-1")) || ($GLOBALS['cache_mode'] == "no"))) {
+if ((SQL_NUMROWS($res_ext_crt) > 0) && ((($GLOBALS['cache_mode'] == 'init') && ($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != '-1')) || ($GLOBALS['cache_mode'] == 'no'))) {
// Extensions are registered so we load them
while ($content = SQL_FETCHARRAY($res_ext_crt)) {
// Get menu entry
- $content['ext_menu'] = "N";
+ $content['ext_menu'] = 'N';
if (MODULE_HAS_MENU($content['ext_name'], true)) {
- $content['ext_menu'] = "Y";
+ $content['ext_menu'] = 'Y';
} // END - if
// Generate FQFN for extension
// Does the extension file exists?
if (FILE_READABLE($FQFN)) {
// By default no extension is always active, except sql_patches
- EXT_SET_ALWAYS_ACTIVE("N");
+ EXT_SET_ALWAYS_ACTIVE('N');
// Load extension
- if (($content['ext_name'] != "sql_patches") && (($content['ext_name'] != "cache") || (!EXT_IS_ACTIVE("cache")))) {
+ if (($content['ext_name'] != 'sql_patches') && (($content['ext_name'] != 'cache') || (!EXT_IS_ACTIVE('cache')))) {
// Load extension
LOAD_EXTENSION($content['ext_name']);
} else {
// Keep sql_patches always active
- EXT_SET_ALWAYS_ACTIVE("Y");
+ EXT_SET_ALWAYS_ACTIVE('Y');
}
// Transfer EXT_ALWAYS_ACTIVE flag
$content['ext_keep'] = EXT_GET_ALWAYS_ACTIVE();
// CSS file handling:
- if ((!isset($content['ext_css'])) || ($content['ext_css'] == "Y")) {
+ if ((!isset($content['ext_css'])) || ($content['ext_css'] == 'Y')) {
// Create FQFN for the CSS file
$FQFN = sprintf("%stheme/%s/css/%s.css", constant('PATH'), GET_CURR_THEME(), $content['ext_name']);
// Is the file there?
if (FILE_READABLE($FQFN)) {
// CSS file for extension was found (use only relative path for now!)
- EXT_ADD_CSS_FILE($content['ext_name'].".css");
- $content['ext_css'] = "Y";
+ EXT_ADD_CSS_FILE($content['ext_name'] . '.css');
+ $content['ext_css'] = 'Y';
} else {
// Don't load CSS file
- $content['ext_css'] = "N";
+ $content['ext_css'] = 'N';
}
} // END - if
// Shall we cache?
- if ($GLOBALS['cache_mode'] == "init") {
+ if ($GLOBALS['cache_mode'] == 'init') {
// Add cache row
$GLOBALS['cache_instance']->addRow($content);
- } elseif ($GLOBALS['cache_mode'] == "no") {
+ } elseif ($GLOBALS['cache_mode'] == 'no') {
// Remember this value for later usage
$GLOBALS['cache_array']['active_extensions'][$content['ext_name']] = EXT_GET_ALWAYS_ACTIVE();
}
// Init filter system
INIT_FILTER_SYSTEM();
- if ($GLOBALS['cache_mode'] == "init") {
+ if ($GLOBALS['cache_mode'] == 'init') {
// Close cache file
$GLOBALS['cache_instance']->finalize();
// Load more cache files (like admins)
- LOAD_INC_ONCE("inc/load_cache.php");
+ LOAD_INC_ONCE('inc/load_cache.php');
} // END - if
// Free memory
SQL_FREERESULT($res_ext_crt);
-} elseif (!EXT_IS_ACTIVE("cache")) {
+} elseif (!EXT_IS_ACTIVE('cache')) {
// Init filter system even when there are no extensions installed. #16
INIT_FILTER_SYSTEM();
}
// Some security stuff...
if (!defined('__SECURITY')) {
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
require($INC);
} // END - if
// Let's start with the admins table...
-if (($GLOBALS['cache_instance']->loadCacheFile("admins")) && ($GLOBALS['cache_instance']->extensionVersionMatches("admins"))) {
+if (($GLOBALS['cache_instance']->loadCacheFile('admins')) && ($GLOBALS['cache_instance']->extensionVersionMatches('admins'))) {
// Load cache
$GLOBALS['cache_array']['admins'] = $GLOBALS['cache_instance']->getArrayFromCache();
// Rewrite all entries
foreach ($GLOBALS['cache_array']['admins'] as $key=>$entryArray) {
// Rewrite the entry
- if ($key == "aid") {
+ if ($key == 'aid') {
// Rewrite admin id (use login name as index)
$GLOBALS['cache_array']['admins']['aid'][$GLOBALS['cache_array']['admins']['login'][$idx]] = $entryArray[$idx];
} else {
$GLOBALS['cache_instance']->destroyCacheFile();
unset($GLOBALS['cache_array']['admins']);
}
-} elseif ((getConfig('cache_admins') == "Y") && ($GLOBALS['output_mode'] != "1") && ($GLOBALS['output_mode'] != "-1")) {
+} elseif ((getConfig('cache_admins') == 'Y') && ($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != '-1')) {
// Create cache file
- $GLOBALS['cache_instance']->init("ADMINS");
- $GLOBALS['cache_instance']->storeExtensionVersion("admins");
+ $GLOBALS['cache_instance']->init('ADMINS');
+ $GLOBALS['cache_instance']->storeExtensionVersion('admins');
// Load every data from DB to cache file
$add = runFilterChain('sql_admin_extra_data');
// Query the database about this
- $result_admins = SQL_QUERY("SELECT id AS aid, login, password, email".$add."
+ $result_admins = SQL_QUERY('SELECT id AS aid, login, password, email'.$add.'
FROM `{!_MYSQL_PREFIX!}_admins`
-ORDER BY login", __FILE__, __LINE__);
+ORDER BY login', __FILE__, __LINE__);
while ($dummy = SQL_FETCHARRAY($result_admins)) {
// Save row
$GLOBALS['cache_instance']->addRow($dummy);
}
// Next cached table are the admins_acls...
-if (GET_EXT_VERSION("admins") >= "0.3") {
+if (GET_EXT_VERSION('admins') >= '0.3') {
// Check for cache file
- if (($GLOBALS['cache_instance']->loadCacheFile("admins_acls")) && ($GLOBALS['cache_instance']->extensionVersionMatches("admins"))) {
+ if (($GLOBALS['cache_instance']->loadCacheFile('admins_acls')) && ($GLOBALS['cache_instance']->extensionVersionMatches('admins'))) {
// Load referal system from cache
$GLOBALS['cache_array']['admin_acls'] = $GLOBALS['cache_instance']->getArrayFromCache();
- } elseif ((getConfig('cache_acls') == "Y") && ($GLOBALS['output_mode'] != "1") && ($GLOBALS['output_mode'] != "-1")) {
+ } elseif ((getConfig('cache_acls') == 'Y') && ($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != '-1')) {
// Create cache file here
- $GLOBALS['cache_instance']->init("ADMINS_ACLS");
- $GLOBALS['cache_instance']->storeExtensionVersion("admins");
+ $GLOBALS['cache_instance']->init('ADMINS_ACLS');
+ $GLOBALS['cache_instance']->storeExtensionVersion('admins');
// Load all modules and their data (column 'id' is no longer required)
- $result = SQL_QUERY("SELECT admin_id, action_menu, what_menu, access_mode FROM `{!_MYSQL_PREFIX!}_admins_acls` ORDER BY admin_id, action_menu, what_menu", __FILE__, __LINE__);
+ $result = SQL_QUERY('SELECT admin_id, action_menu, what_menu, access_mode FROM `{!_MYSQL_PREFIX!}_admins_acls` ORDER BY admin_id, action_menu, what_menu', __FILE__, __LINE__);
// Add all rows
while ($data = SQL_FETCHARRAY($result)) {
// Some security stuff...
if (!defined('__SECURITY')) {
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
require($INC);
}
// Next cached table is the configuration (config)...
-if (($GLOBALS['cache_instance']->loadCacheFile("config", true)) && ($GLOBALS['cache_instance']->extensionVersionMatches("sql_patches"))) {
+if (($GLOBALS['cache_instance']->loadCacheFile('config', true)) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
// Load config from cache
$GLOBALS['cache_array']['config'] = $GLOBALS['cache_instance']->getArrayFromCache();
-} elseif ((getConfig('cache_config') == "Y") && ($GLOBALS['output_mode'] != "1") && ($GLOBALS['output_mode'] != "-1")) {
+} elseif ((getConfig('cache_config') == 'Y') && ($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != '-1')) {
// Create cache file here
- $GLOBALS['cache_instance']->init("CONFIG");
- $GLOBALS['cache_instance']->storeExtensionVersion("sql_patches");
+ $GLOBALS['cache_instance']->init('CONFIG');
+ $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches');
// Load all modules and their data
- $result = SQL_QUERY("SELECT * FROM `{!_MYSQL_PREFIX!}_config` ORDER BY config ASC", __FILE__, __LINE__);
+ $result = SQL_QUERY('SELECT * FROM `{!_MYSQL_PREFIX!}_config` ORDER BY config ASC', __FILE__, __LINE__);
while ($data = SQL_FETCHARRAY($result)) {
// Add row to cache file
$GLOBALS['cache_instance']->addRow($data);
// Some security stuff...
if (!defined('__SECURITY')) {
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
require($INC);
}
// Next cached table is the module registry (mod_reg)...
-if (($GLOBALS['cache_instance']->loadCacheFile("modreg")) && ($GLOBALS['cache_instance']->extensionVersionMatches("sql_patches"))) {
+if (($GLOBALS['cache_instance']->loadCacheFile('modreg')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
// Load cache
$GLOBALS['cache_array']['modules'] = $GLOBALS['cache_instance']->getArrayFromCache();
} // END - if
} // END - foreach
unset($modArray);
-} elseif ((getConfig('cache_modreg') == "Y") && ($GLOBALS['output_mode'] != "1") && ($GLOBALS['output_mode'] != "-1")) {
+} elseif ((getConfig('cache_modreg') == 'Y') && ($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != '-1')) {
// Create cache file here
- $GLOBALS['cache_instance']->init("MODULES");
- $GLOBALS['cache_instance']->storeExtensionVersion("sql_patches");
+ $GLOBALS['cache_instance']->init('MODULES');
+ $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches');
// Load all modules and their data
- if (GET_EXT_VERSION("sql_patches") >= "0.3.6") {
+ if (GET_EXT_VERSION('sql_patches') >= '0.3.6') {
// Load has_menu
- $result = SQL_QUERY("SELECT id, module, title, locked, hidden, admin_only, title, mem_only, has_menu
-FROM `{!_MYSQL_PREFIX!}_mod_reg` ORDER BY `id`", __FILE__, __LINE__);
+ $result = SQL_QUERY('SELECT id, module, title, locked, hidden, admin_only, title, mem_only, has_menu
+FROM `{!_MYSQL_PREFIX!}_mod_reg` ORDER BY `id`', __FILE__, __LINE__);
} else {
// Don't load has_menu
- $result = SQL_QUERY("SELECT id, module, title, locked, hidden, admin_only, title, mem_only
-FROM `{!_MYSQL_PREFIX!}_mod_reg` ORDER BY `id`", __FILE__, __LINE__);
+ $result = SQL_QUERY('SELECT id, module, title, locked, hidden, admin_only, title, mem_only
+FROM `{!_MYSQL_PREFIX!}_mod_reg` ORDER BY `id`', __FILE__, __LINE__);
}
// Cache all data
// Some security stuff...
if (!defined('__SECURITY')) {
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
require($INC);
}
// Next cached table is the referal system (refdepths)...
-if (($GLOBALS['cache_instance']->loadCacheFile("refdepths")) && ($GLOBALS['cache_instance']->extensionVersionMatches("sql_patches"))) {
+if (($GLOBALS['cache_instance']->loadCacheFile('refdepths')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
// Load referal system from cache
$GLOBALS['cache_array']['ref_depths'] = $GLOBALS['cache_instance']->getArrayFromCache();
-} elseif ((getConfig('cache_refdepth') == "Y") && ($GLOBALS['output_mode'] != "1") && ($GLOBALS['output_mode'] != "-1")) {
+} elseif ((getConfig('cache_refdepth') == 'Y') && ($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != '-1')) {
// Create cache file here
- $GLOBALS['cache_instance']->init("REFDEPTHS");
- $GLOBALS['cache_instance']->storeExtensionVersion("sql_patches");
+ $GLOBALS['cache_instance']->init('REFDEPTHS');
+ $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches');
// Load all modules and their data
- $result = SQL_QUERY("SELECT id, level, percents FROM `{!_MYSQL_PREFIX!}_refdepths` ORDER BY level", __FILE__, __LINE__);
+ $result = SQL_QUERY('SELECT id, level, percents FROM `{!_MYSQL_PREFIX!}_refdepths` ORDER BY level', __FILE__, __LINE__);
while ($data = SQL_FETCHARRAY($result)) {
// Add row to cache file
$GLOBALS['cache_instance']->addRow($data);
// Some security stuff...
if (!defined('__SECURITY')) {
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
require($INC);
}
// Next cached table is the referal system (refsystem)...
-if (($GLOBALS['cache_instance']->loadCacheFile("refsystem")) && ($GLOBALS['cache_instance']->extensionVersionMatches("sql_patches"))) {
+if (($GLOBALS['cache_instance']->loadCacheFile('refsystem')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
// Load referal system from cache
$GLOBALS['cache_array']['refsystem'] = $GLOBALS['cache_instance']->getArrayFromCache();
-} elseif ((getConfig('cache_refsys') == "Y") && ($GLOBALS['output_mode'] != "1") && ($GLOBALS['output_mode'] != "-1")) {
+} elseif ((getConfig('cache_refsys') == 'Y') && ($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != '-1')) {
// Create cache file here
- $GLOBALS['cache_instance']->init("REFSYSTEM");
- $GLOBALS['cache_instance']->storeExtensionVersion("sql_patches");
+ $GLOBALS['cache_instance']->init('REFSYSTEM');
+ $GLOBALS['cache_instance']->storeExtensionVersion('sql_patches');
// Load all modules and their data
- $result = SQL_QUERY("SELECT id, userid, level, counter FROM `{!_MYSQL_PREFIX!}_refsystem` ORDER BY userid, level", __FILE__, __LINE__);
+ $result = SQL_QUERY('SELECT id, userid, level, counter FROM `{!_MYSQL_PREFIX!}_refsystem` ORDER BY userid, level', __FILE__, __LINE__);
while ($data = SQL_FETCHARRAY($result)) {
// Add row to cache file
$GLOBALS['cache_instance']->addRow($data);
// Some security stuff...
if (!defined('__SECURITY')) {
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
require($INC);
}
// Next cached table is the revision...
-if (($GLOBALS['cache_instance']->loadCacheFile("revision", true))) {
+if (($GLOBALS['cache_instance']->loadCacheFile('revision', true))) {
// Load revision from cache
$GLOBALS['cache_array']['revision'] = $GLOBALS['cache_instance']->getArrayFromCache();
-} elseif (($GLOBALS['output_mode'] != "1") && ($GLOBALS['output_mode'] != "-1")) {
+} elseif (($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != '-1')) {
// Create cache file here
- $GLOBALS['cache_instance']->init("REVISION");
+ $GLOBALS['cache_instance']->init('revision');
// add the new RevInfos in and saves it to the cache
$GLOBALS['cache_instance']->addRow(getAkt_vers());
// Some security stuff...
if (!defined('__SECURITY')) {
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
require($INC);
-} elseif (!EXT_IS_ACTIVE("theme")) {
+} elseif (!EXT_IS_ACTIVE('theme')) {
// Skip this loader
return false;
}
// Next cached table is the referal system (themes)...
-if (($GLOBALS['cache_instance']->loadCacheFile("themes")) && ($GLOBALS['cache_instance']->extensionVersionMatches("theme"))) {
+if (($GLOBALS['cache_instance']->loadCacheFile('themes')) && ($GLOBALS['cache_instance']->extensionVersionMatches('theme'))) {
// Load referal system from cache
$cache = $GLOBALS['cache_instance']->getArrayFromCache();
// Restructure the array
$GLOBALS['cache_array']['themes'] = array();
foreach ($cache as $key => $data) {
- // Skip "theme_path" because we don't need to rebuild it
- if ($key == "theme_path") {
+ // Skip 'theme_path' because we don't need to rebuild it
+ if ($key == 'theme_path') {
// Add entries with id
foreach ($data as $id => $entry) {
$GLOBALS['cache_array']['themes']['theme_path'][$cache['id'][$id]] = $entry;
$GLOBALS['cache_array']['themes'][$key][$cache['theme_path'][$id]] = $entry;
} // END - foreach
}
- } // END - if
+ } // END - foreach
// Remove dummy array
unset($cache);
-} elseif ((getConfig('cache_themes') == "Y") && ($GLOBALS['output_mode'] != "1") && ($GLOBALS['output_mode'] != "-1")) {
+} elseif ((getConfig('cache_themes') == 'Y') && ($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != '-1')) {
// Create cache file here
- $GLOBALS['cache_instance']->init("THEMES");
- $GLOBALS['cache_instance']->storeExtensionVersion("theme");
+ $GLOBALS['cache_instance']->init('THEMES');
+ $GLOBALS['cache_instance']->storeExtensionVersion('theme');
// Load all themes and their data
- if (GET_EXT_VERSION("theme") >= "0.0.7") {
- $result = SQL_QUERY("SELECT id, theme_path, theme_active, theme_ver, theme_name FROM `{!_MYSQL_PREFIX!}_themes` ORDER BY `id`", __FILE__, __LINE__);
+ if (GET_EXT_VERSION('theme') >= '0.0.7') {
+ $result = SQL_QUERY('SELECT id, theme_path, theme_active, theme_ver, theme_name FROM `{!_MYSQL_PREFIX!}_themes` ORDER BY `id`', __FILE__, __LINE__);
} else {
- $result = SQL_QUERY("SELECT id, theme_path, theme_active, theme_ver FROM `{!_MYSQL_PREFIX!}_themes` ORDER BY `id`", __FILE__, __LINE__);
+ $result = SQL_QUERY('SELECT id, theme_path, theme_active, theme_ver FROM `{!_MYSQL_PREFIX!}_themes` ORDER BY `id`', __FILE__, __LINE__);
}
while ($data = SQL_FETCHARRAY($result)) {
// Add row to cache file
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif (!EXT_IS_ACTIVE("beg")) {
+} elseif (!EXT_IS_ACTIVE('beg')) {
return;
}
// Create timemark from saved month
$mark = mktime(0, 0, 0, getConfig('last_month'), date("d", time()), date('Y', time()));
-$sql = ""; $MODE = "";
+$sql = ''; $MODE = '';
// Shall I sent activation or deactivation mail?
$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")
+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)";
else
{
// Do not notify!
- $sql = "";
+ $sql = '';
}
break;
-case "N": // Begging rallye is deactivated
- if (getConfig('beg_ral_di_notify') == "Y")
+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";
else
{
// Do not notify!
- $sql = "";
+ $sql = '';
}
break;
}
$result_main = SQL_QUERY($sql, __FILE__, __LINE__);
if (SQL_NUMROWS($result_main) > 0) {
// Normal notification mails or bonus mails?
- $sentBonusMails = ((getConfig('beg_notify_bonus') > 0) && ($MODE == "en") && (EXT_IS_ACTIVE("bonus")));
+ $sentBonusMails = ((getConfig('beg_notify_bonus') > 0) && ($MODE == "en") && (EXT_IS_ACTIVE('bonus')));
// Generate subject line
$subject = constant('BEG_RALLYE_'.strtoupper($MODE).'_NOTIFY');
// Load message body for bonus mails
- $message = LOAD_EMAIL_TEMPLATE("beg_en_notify_body", "", "{PER}uid{PER}");
- $RECEIVER = ""; $UIDs = array();
+ $message = LOAD_EMAIL_TEMPLATE("beg_en_notify_body", '', "{PER}uid{PER}");
+ $RECEIVER = ''; $UIDs = array();
// Okay lets notify all users!
while ($content = SQL_FETCHARRAY($result_main)) {
// Shall I send out bonus mails?
if ($sentBonusMails === true) {
// Okay, make array to string
- $RECEIVER = implode(";", $UIDs);
+ $RECEIVER = implode(';', $UIDs);
// Prepare URL
$URL = "modules.php?module=index&what=login";
// Insert mail
- ADD_BONUS_MAIL_TO_QUEUE($subject, $message, $RECEIVER, getConfig('beg_notify_bonus'), getConfig('beg_notify_wait'), $URL, 0, "normal", SQL_NUMROWS($result_main));
+ ADD_BONUS_MAIL_TO_QUEUE($subject, $message, $RECEIVER, getConfig('beg_notify_bonus'), getConfig('beg_notify_wait'), $URL, 0, 'normal', SQL_NUMROWS($result_main));
} // END - if
} // END - if
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif (!EXT_IS_ACTIVE("birthday")) {
+} elseif (!EXT_IS_ACTIVE('birthday')) {
return;
}
$YEAR = date('Y', time());
// Shall I include only active members?
-$add = "%s"; $VALUE = "";
-if ((getConfig('birthday_active')) && (EXT_IS_ACTIVE("autopurge")) && (getConfig('autopurge_inactive') == "Y") && (getConfig('ap_inactive_since') > 0)) {
+$add = "%s"; $VALUE = '';
+if ((getConfig('birthday_active')) && (EXT_IS_ACTIVE('autopurge')) && (getConfig('autopurge_inactive') == 'Y') && (getConfig('ap_inactive_since') > 0)) {
$add = " AND last_online >= (UNIX_TIMESTAP() - %s)";
$VALUE = getConfig('ap_inactive_since');
}
// Add more entries to the array
$content['age'] = $AGE;
$content['points'] = TRANSLATE_COMMA(getConfig('birthday_points'));
- $content['check'] = "";
+ $content['check'] = '';
// @TODO 4 is hard-coded here, should we move it out in config?
for ($idx = 0; $idx < 4; $idx++) {
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif (!EXT_IS_ACTIVE("bonus")) {
+} elseif (!EXT_IS_ACTIVE('bonus')) {
return;
}
// Create timemark from saved month
$mark = mktime(0, 0, 0, getConfig('last_month'), date("d", time()), date('Y', time()));
-$sql = ""; $MODE = "";
+$sql = ''; $MODE = '';
// Shall I sent activation or deactivation mail?
$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") {
+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 = "";
+ $sql = '';
}
break;
-case "N": // Active rallye is deactivated
- if (getConfig('bonus_di_notify') == "Y") {
+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 = "";
+ $sql = '';
}
break;
}
$sql .= ") AND `status`='CONFIRMED' ORDER BY last_online ASC";
// Normal notification mails or bonus mails?
- $sentBonusMails = ((getConfig('bonus_notify_points') > 0) && ($MODE == "en") && (EXT_IS_ACTIVE("bonus")));
+ $sentBonusMails = ((getConfig('bonus_notify_points') > 0) && ($MODE == "en") && (EXT_IS_ACTIVE('bonus')));
// Generate subject line
$subject = constant('BONUS_RALLYE_'.strtoupper($MODE).'_NOTIFY');
// Load message body for bonus mails
- $message = LOAD_EMAIL_TEMPLATE("bonus_en_notify_body", "", "{PER}uid{PER}");
- $RECEIVER = ""; $UIDs = array();
+ $message = LOAD_EMAIL_TEMPLATE("bonus_en_notify_body", '', "{PER}uid{PER}");
+ $RECEIVER = ''; $UIDs = array();
// Check for accounts to be notified
$result_main = SQL_QUERY($sql, __FILE__, __LINE__);
// Shall I send out bonus mails?
if ($sentBonusMails === true) {
// Okay, make array to string
- $RECEIVER = implode(";", $UIDs);
+ $RECEIVER = implode(';', $UIDs);
// Prepare URL
$URL = "modules.php?module=index&what=login";
// Insert mail
- ADD_BONUS_MAIL_TO_QUEUE($subject, $message, $RECEIVER, getConfig('bonus_notify_points'), getConfig('bonus_notify_wait'), $URL, 0, "normal", SQL_NUMROWS($result_main));
+ ADD_BONUS_MAIL_TO_QUEUE($subject, $message, $RECEIVER, getConfig('bonus_notify_points'), getConfig('bonus_notify_wait'), $URL, 0, 'normal', SQL_NUMROWS($result_main));
} // END - if
} // END - if
if (REQUEST_ISSET_POST(('login'))) {
define('__LOGIN_VALUE', REQUEST_POST('login'));
} else {
- define('__LOGIN_VALUE', "");
+ define('__LOGIN_VALUE', '');
}
// Yet-another "Notice" fix
define('__MSG_PASS', LOAD_TEMPLATE("admin_login_msg", true, $passwdMessage));
// Reset variables
- $loginMessage = ""; $passwdMessage = "";
+ $loginMessage = ''; $passwdMessage = '';
} else {
// Reset values to nothing
- define('__MSG_LOGIN', "");
- define('__MSG_PASS' , "");
+ define('__MSG_LOGIN', '');
+ define('__MSG_PASS' , '');
}
// Output message in seperate template
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_NOT_REGISTERED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NOT_REGISTERED'));
// Load register template
LOAD_TEMPLATE("admin_reg_form");
$OUT = ADMIN_SEND_PASSWORD_RESET_LINK(REQUEST_POST('email'));
// Output result
- LOAD_TEMPLATE("admin_settings_saved", false, $OUT);
+ LOAD_TEMPLATE('admin_settings_saved', false, $OUT);
} elseif (REQUEST_ISSET_GET(('hash'))) {
// Output form for hash validation
LOAD_TEMPLATE("admin_validate_reset_hash_form", false, REQUEST_GET('hash'));
LOAD_TEMPLATE("admin_reset_password_form", false, $content);
} else {
// Cannot validate the login data and hash
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_VALIDATION_RESET_LOGIN_HASH_FAILED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_VALIDATION_RESET_LOGIN_HASH_FAILED'));
}
} elseif ((REQUEST_ISSET_POST(('reset_pass'))) && (REQUEST_ISSET_POST(('hash'))) && (REQUEST_ISSET_POST(('login'))) && (REQUEST_ISSET_POST(('pass1'))) && (REQUEST_POST('pass1') == REQUEST_POST('pass2'))) {
// Okay, we shall the admin password here. So first revalidate the hash
LOAD_TEMPLATE("admin_reset_pass_done", false, $OUT);
} else {
// Validation failed
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_VALIDATION_RESET_LOGIN_HASH_FAILED2'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_VALIDATION_RESET_LOGIN_HASH_FAILED2'));
}
} else {
// Output reset password form
if (REQUEST_ISSET_GET(('register'))) {
// Registration of first admin is done
- if (REQUEST_GET('register') == "done") LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_REGISTER_DONE'));
+ if (REQUEST_GET('register') == "done") LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_REGISTER_DONE'));
} // END - if
// Check if the admin has submitted data or not
destroyAdminSession();
break;
- case "pass": // Wrong password
+ 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>]\n";
destroyAdminSession();
if (REQUEST_ISSET_POST(('login'))) {
define('__LOGIN_VALUE', REQUEST_POST('login'));
} else {
- define('__LOGIN_VALUE', "");
+ define('__LOGIN_VALUE', '');
}
if (IS_FORM_SENT()) {
// Set messages to zero
- $loginMessage = ""; $passwdMessage = "";
+ $loginMessage = ''; $passwdMessage = '';
// No login entered?
if (!REQUEST_ISSET_POST(('login'))) $loginMessage = getMessage('ADMIN_NO_LOGIN');
if (strlen(REQUEST_POST('pass')) < 4) $passwdMessage = getMessage('ADMIN_SHORT_PASS');
// An error comes back from login?
- if ((!empty($ret)) && (REQUEST_POST('ok') == "pass")) $passwdMessage = $ret;
+ if ((!empty($ret)) && (REQUEST_POST('ok') == 'pass')) $passwdMessage = $ret;
// Load message template
define('__MSG_LOGIN', LOAD_TEMPLATE("admin_login_msg", true, $loginMessage));
unset($passwdMessage);
} else {
// Set constants to empty for hiding them
- define('__MSG_LOGIN', "");
- define('__MSG_PASS' , "");
+ define('__MSG_LOGIN', '');
+ define('__MSG_PASS' , '');
}
// Load login form
}
} else {
// Something went wrong here...
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"admin_fatal\">{--ADMIN_LOGOUT_FAILED--}</div>");
+ LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"admin_fatal\">{--ADMIN_LOGOUT_FAILED--}</div>");
// Add fatal message
addFatalMessage(__FILE__, __LINE__, getMessage('CANNOT_UNREG_SESS'));
addFatalMessage(__FILE__, __LINE__, getMessage('ADMIN_NOT_FOUND'));
break;
- case "pass": // Wrong password
+ case 'pass': // Wrong password
REQUEST_SET_POST('ok', $ret);
destroyAdminSession();
addFatalMessage(__FILE__, __LINE__, getMessage('WRONG_PASS'));
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (REQUEST_ISSET_POST(('no'))) {
// Do not logout now
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif (!EXT_IS_ACTIVE("task")) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "task");
+} elseif (!EXT_IS_ACTIVE('task')) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'task');
return;
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/admin/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
if (isset($GLOBALS['cache_array']['admins']['password'][$aid])) {
// Get password from cache
$data['password'] = $GLOBALS['cache_array']['admins']['password'][$aid];
- $ret = "pass";
+ $ret = 'pass';
incrementConfigEntry('cache_hits');
// Include more admins data?
- if (GET_EXT_VERSION("admins") >= "0.7.2") {
+ if (GET_EXT_VERSION('admins') >= '0.7.2') {
// Load them here
$data['login_failures'] = $GLOBALS['cache_array']['admins']['login_failures'][$aid];
$data['last_failure'] = $GLOBALS['cache_array']['admins']['last_failure'][$aid];
} // END - if
- } elseif (!EXT_IS_ACTIVE("cache")) {
+ } elseif (!EXT_IS_ACTIVE('cache')) {
// Add extra data via filter now
$add = runFilterChain('sql_admin_extra_data');
// Entry found?
if (SQL_NUMROWS($result) == 1) {
// Login password found
- $ret = "pass";
+ $ret = 'pass';
// Fetch data
$data = SQL_FETCHARRAY($result);
$data['password'] = generateHash($password);
// Is the sql_patches not installed, than we cannot have a valid hashed password here!
- if (($ret == "pass") && ((EXT_VERSION_IS_OLDER("sql_patches", "0.3.6")) || (GET_EXT_VERSION("sql_patches") == ""))) $ret = "done";
- } elseif ((EXT_VERSION_IS_OLDER("sql_patches", "0.3.6")) || (GET_EXT_VERSION("sql_patches") == "")) {
+ if (($ret == 'pass') && ((EXT_VERSION_IS_OLDER('sql_patches', '0.3.6')) || (GET_EXT_VERSION('sql_patches') == ""))) $ret = "done";
+ } elseif ((EXT_VERSION_IS_OLDER('sql_patches', '0.3.6')) || (GET_EXT_VERSION('sql_patches') == "")) {
// Old hashing way
return $ret;
} elseif (!isset($data['password'])) {
// Check if password is same
//* DEBUG: */ echo "*".$ret.",".$data['password'].",".$password.",".$salt."*<br >\n";
- if (($ret == "pass") && ($data['password'] == generateHash($password, $salt)) && ((!empty($salt))) || ($data['password'] == $password)) {
+ if (($ret == 'pass') && ($data['password'] == generateHash($password, $salt)) && ((!empty($salt))) || ($data['password'] == $password)) {
// Re-hash the plain passord with new random salt
$data['password'] = generateHash($password);
// Do we have 0.7.0 of admins or later?
// Remmeber login failures if available
- if (GET_EXT_VERSION("admins") >= "0.7.2") {
+ if (GET_EXT_VERSION('admins') >= '0.7.2') {
// Store it in session
set_session('mxchange_admin_failures', $data['login_failures']);
set_session('mxchange_admin_last_fail', $data['last_failure']);
}
// Rebuild cache
- rebuildCacheFiles("admins", "admin");
+ rebuildCacheFiles('admins', 'admin');
// Login has failed by default... ;-)
$ret = "failed";
// All done now
$ret = "done";
} // END - if
- } elseif ((empty($salt)) && ($ret == "pass")) {
+ } elseif ((empty($salt)) && ($ret == 'pass')) {
// Something bad went wrong
$ret = "failed";
} elseif ($ret == "done") {
}
// Count login failure if admins extension version is 0.7.0+
- if (($ret == "pass") && (GET_EXT_VERSION("admins") >= "0.7.0")) {
+ 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__);
// Rebuild cache
- rebuildCacheFiles("admins", "admin");
+ rebuildCacheFiles('admins', 'admin');
} // END - if
// Return the result
// Try to login the admin by setting some session/cookie variables
function LOGIN_ADMIN ($adminLogin, $passHash) {
// Reset failure counter on matching admins version
- if ((GET_EXT_VERSION("admins") >= "0.7.0") && ((EXT_VERSION_IS_OLDER("sql_patches", "0.3.6")) || (GET_EXT_VERSION("sql_patches") == ""))) {
+ 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__);
// Rebuild cache
- rebuildCacheFiles("admins", "admin");
+ rebuildCacheFiles('admins', 'admin');
} // END - if
// Now set all session variables and return the result
// Only be executed on cookie checking
function CHECK_ADMIN_COOKIES ($admin_login, $password) {
// By default no admin cookies are found
- $ret = "404"; $pass = "";
+ $ret = "404"; $pass = '';
// Get hash
$pass = GET_ADMIN_HASH(GET_ADMIN_ID($admin_login));
- if ($pass != "-1") $ret = "pass";
+ if ($pass != "-1") $ret = 'pass';
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):".generatePassString($pass)."(".strlen($pass).")/".$password."(".strlen($password).")<br />\n";
// Check if password matches
- if (($ret == "pass") && ((generatePassString($pass) == $password) || ($pass == $password) || ((strlen($pass) == 32) && (md5($password) == $pass)))) {
+ if (($ret == 'pass') && ((generatePassString($pass) == $password) || ($pass == $password) || ((strlen($pass) == 32) && (md5($password) == $pass)))) {
// Passwords matches!
$ret = "done";
}
define('__ADMIN_ID' , GET_CURRENT_ADMIN_ID());
// Preload templates
- if (EXT_IS_ACTIVE("admins")) {
+ if (EXT_IS_ACTIVE('admins')) {
define('__ADMIN_WELCOME', LOAD_TEMPLATE("admin_welcome_admins", true));
} else {
define('__ADMIN_WELCOME', LOAD_TEMPLATE("admin_welcome", true));
if (SQL_NUMROWS($result_action) == 1) {
// Is valid but does the inlcude file exists?
$INC = sprintf("inc/modules/admin/action-%s.php", $act);
- if ((INCLUDE_READABLE($INC)) && (VALIDATE_MENU_ACTION("admin", $act, $wht)) && ($GLOBALS['acl_allow'] === true)) {
+ if ((INCLUDE_READABLE($INC)) && (VALIDATE_MENU_ACTION('admin', $act, $wht)) && ($GLOBALS['acl_allow'] === true)) {
// Ok, we finally load the admin action module
LOAD_INC($INC);
} elseif ($GLOBALS['acl_allow'] === false) {
function ADD_ADMIN_MENU ($act, $wht, $return=false) {
// Init variables
$SUB = false;
- $OUT = "";
+ $OUT = '';
// Menu descriptions
$GLOBALS['menu']['description'] = array();
$GLOBALS['menu']['title'] = array();
// Is there a cache instance?
- if ((isCacheInstanceValid()) && (getConfig('cache_admin_menu') == "Y")) {
+ if ((isCacheInstanceValid()) && (getConfig('cache_admin_menu') == 'Y')) {
// Create cache name
$cacheName = "admin_".$act."_".$wht."_".GET_LANGUAGE()."_".strtolower(get_session('admin_login'));
<tr><td colspan=\"2\" height=\"7\" class=\"seperator\"> </td></tr>\n";
// @TODO Rewrite this to $content = SQL_FETCHARRAY()
while (list($menu, $title, $descr) = SQL_FETCHROW($result_main)) {
- if ((EXT_IS_ACTIVE("admins")) && (GET_EXT_VERSION("admins") > "0.2")) {
- $ACL = ADMINS_CHECK_ACL($menu, "");
+ if ((EXT_IS_ACTIVE('admins')) && (GET_EXT_VERSION('admins') > '0.2.0')) {
+ $ACL = ADMINS_CHECK_ACL($menu, '');
} else {
// ACL is "allow"... hmmm
$ACL = true;
while (list($wht_sub, $title_what, $desc_what) = SQL_FETCHROW($result_what)) {
// Filename
$INC = sprintf("inc/modules/admin/what-%s.php", $wht_sub);
- if ((EXT_IS_ACTIVE("admins")) && (GET_EXT_VERSION("admins") > "0.2")) {
+ if ((EXT_IS_ACTIVE('admins')) && (GET_EXT_VERSION('admins') > '0.2.0')) {
$ACL = ADMINS_CHECK_ACL("", $wht_sub);
} else {
// ACL is "allow"... hmmm
}
// Is there a cache instance again?
- if ((isCacheInstanceValid()) && (getConfig('cache_admin_menu') == "Y")) {
+ if ((isCacheInstanceValid()) && (getConfig('cache_admin_menu') == 'Y')) {
// Init cache
$GLOBALS['cache_instance']->init($cacheName);
}
// Create member selection box
-function ADD_MEMBER_SELECTION_BOX ($def="0", $add_all=false, $return=false, $none=false, $field="userid") {
+function ADD_MEMBER_SELECTION_BOX ($def="0", $add_all=false, $return=false, $none=false, $field='userid') {
// Output selection form with all confirmed user accounts listed
$result = SQL_QUERY("SELECT userid, surname, family FROM `{!_MYSQL_PREFIX!}_user_data` ORDER BY userid", __FUNCTION__, __LINE__);
// Default output
- $OUT = "";
+ $OUT = '';
// 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";
rebuildCacheFiles("config", "config");
// Settings saved
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SETTINGS_SAVED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
}
// Generate a selection box
function ADMIN_MAKE_MENU_SELECTION ($menu, $type, $name, $default="") {
// Open the requested menu directory
- $menuArray = GET_DIR_AS_ARRAY(sprintf("inc/modules/%s/", $menu), "", false, false);
+ $menuArray = GET_DIR_AS_ARRAY(sprintf("inc/modules/%s/", $menu), '', false, false);
// Init the selection box
$OUT = "<select name=\"".$name."\" class=\"admin_select\" size=\"1\">
// Load from cache
$ADMIN = $GLOBALS['cache_array']['admins']['la_mode'][$aid];
incrementConfigEntry('cache_hits');
- } elseif (GET_EXT_VERSION("admins") >= "0.6.7") {
- // Load from database when version of "admins" is enough
+ } 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__);
if (SQL_NUMROWS($result) == 1) {
list($currStatus) = SQL_FETCHROW($result);
// And switch it N<->Y
- if ($currStatus == "Y") $newStatus = "N"; else $newStatus = "Y";
+ if ($currStatus == 'Y') $newStatus = "N"; else $newStatus = "Y";
// Change this status
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_%s` SET %s='%s' WHERE %s=%s LIMIT 1",
} // END - foreach
// Output status
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_STATUS_CHANGED'), $cnt, count($IDs)));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_STATUS_CHANGED'), $cnt, count($IDs)));
} else {
// Nothing selected!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_NOTHING_SELECTED_CHANGE'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NOTHING_SELECTED_CHANGE'));
}
}
// Build a special template list
function ADMIN_BUILD_LIST ($listType, $IDs, $table, $columns, $filterFunctions, $extraValues, $idColumn, $userIdColumn) {
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
// "Walk" through all entries
foreach ($IDs as $id => $selected) {
$idx = array_search($key, $columns, true);
// Do we have a userid?
- if ($key == "userid") {
+ if ($key == 'userid') {
// Add it again as raw id
$content['uid'] = bigintval($value);
} // END - if
}
// Delete rows by given ID numbers
-function ADMIN_DELETE_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunctions=array(), $extraValues=array(), $deleteNow=false, $idColumn="id", $userIdColumn="userid") {
+function ADMIN_DELETE_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunctions=array(), $extraValues=array(), $deleteNow=false, $idColumn="id", $userIdColumn='userid') {
// All valid entries? (We hope so here!)
if ((is_array($IDs)) && (count($IDs) > 0) && (count($columns) == count($filterFunctions)) && (count($columns) == count($extraValues))) {
// Shall we delete here or list for deletion?
$sql = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_%s` WHERE %s IN (%s)";
// Delete them all
- $idList = "";
+ $idList = '';
foreach ($IDs as $id => $sel) {
// Is there a userid?
if (REQUEST_ISSET_POST('uid_raw', $id)) {
// Was this fine?
if (SQL_AFFECTEDROWS() == count($IDs)) {
// All deleted
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_ALL_ENTRIES_REMOVED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_ALL_ENTRIES_REMOVED'));
} else {
// Some are still there :(
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_SOME_ENTRIES_NOT_DELETED'), SQL_AFFECTEDROWS(), count($IDs)));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_SOME_ENTRIES_NOT_DELETED'), SQL_AFFECTEDROWS(), count($IDs)));
}
} else {
// List for deletion confirmation
}
// Edit rows by given ID numbers
-function ADMIN_EDIT_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunctions=array(), $extraValues=array(), $editNow=false, $idColumn="id", $userIdColumn="userid") {
+function ADMIN_EDIT_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunctions=array(), $extraValues=array(), $editNow=false, $idColumn="id", $userIdColumn='userid') {
// All valid entries? (We hope so here!)
if ((is_array($IDs)) && (count($IDs) > 0) && (count($columns) == count($filterFunctions)) && (count($columns) == count($extraValues))) {
// Shall we change here or list for editing?
// Was this fine?
if ($affected == count($IDs)) {
// All deleted
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_ALL_ENTRIES_EDITED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_ALL_ENTRIES_EDITED'));
} else {
// Some are still there :(
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_SOME_ENTRIES_NOT_EDITED'), $affected, count($IDs)));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_SOME_ENTRIES_NOT_EDITED'), $affected, count($IDs)));
}
} else {
// List for editing
}
// Un-/lock rows by given ID numbers
-function ADMIN_LOCK_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunctions=array(), $extraValues=array(), $statusArray=array(), $lockNow=false, $idColumn="id", $userIdColumn="userid") {
+function ADMIN_LOCK_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunctions=array(), $extraValues=array(), $statusArray=array(), $lockNow=false, $idColumn="id", $userIdColumn='userid') {
// All valid entries? (We hope so here!)
if ((is_array($IDs)) && (count($IDs) > 0) && (count($columns) == count($filterFunctions)) && (count($columns) == count($extraValues)) && ((!$lockNow) || (count($statusArray) == 1))) {
// Shall we un-/lock here or list for locking?
}
// Undelete rows by given ID numbers
-function ADMIN_UNDELETE_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunctions=array(), $extraValues=array(), $statusArray=array(), $lockNow=false, $idColumn="id", $userIdColumn="userid") {
+function ADMIN_UNDELETE_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunctions=array(), $extraValues=array(), $statusArray=array(), $lockNow=false, $idColumn="id", $userIdColumn='userid') {
// All valid entries? (We hope so here!)
if ((is_array($IDs)) && (count($IDs) > 0) && (count($columns) == count($filterFunctions)) && (count($columns) == count($extraValues)) && ((!$lockNow) || (count($statusArray) == 1))) {
// Shall we un-/lock here or list for locking?
// Sends out a link to the given email adress so the admin can reset his/her password
function ADMIN_SEND_PASSWORD_RESET_LINK ($email) {
// Init output
- $OUT = "";
+ $OUT = '';
// Compile out security characters (must be for looking up!)
$email = COMPILE_CODE($email);
// Reset the password for the login. Do NOT call this function without calling above function first!
function ADMIN_RESET_PASSWORD ($login, $password) {
// Init hash
- $passHash = "";
+ $passHash = '';
// Now check if we have sql_patches installed
- if (GET_EXT_VERSION("sql_patches") >= "0.3.6") {
+ if (GET_EXT_VERSION('sql_patches') >= '0.3.6') {
// Use new way of hashing
$passHash = generateHash($password);
} else {
array(GET_CURRENT_ADMIN_ID()), __FILE__, __LINE__);
// We currently don't want to install an extension so let's find out if we need...
- $EXT_LOAD_MODE = "register";
+ $EXT_LOAD_MODE = 'register';
$jobsDone = true;
// Open the extension directory
if (isset($GLOBALS['cache_array']['active_extensions'][$ext_name])) {
// Maybe we want to keept the current extension active?
- if (($GLOBALS['cache_array']['active_extensions'][$ext_name] == "Y") && (!EXT_IS_ACTIVE($ext_name))) {
+ if (($GLOBALS['cache_array']['active_extensions'][$ext_name] == 'Y') && (!EXT_IS_ACTIVE($ext_name))) {
// Reactivate this extension!
ACTIVATE_EXTENSION($ext_name);
} // END - if
function OUTPUT_SELECTED_TASKS ($POST, $result_tasks) {
if ((isset($POST['assign'])) && (count($POST['task']) > 0)) {
// Assign / do tasks
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
foreach ($POST['task'] as $id => $sel) {
$result_task = SQL_QUERY_ESC("SELECT id, userid, task_type, subject, text, task_created, status, assigned_admin FROM `{!_MYSQL_PREFIX!}_task_system` WHERE id=%s AND (assigned_admin='%s' OR (assigned_admin='0' AND `status`='NEW')) LIMIT 1",
array(bigintval($id), GET_CURRENT_ADMIN_ID()), __FILE__, __LINE__);
array(GET_CURRENT_ADMIN_ID(), bigintval($tid)), __FILE__, __LINE__);
} // END - if
- $add = "";
+ $add = '';
if ($type == "SUPPORT_MEMBER") {
$mode = substr($text, 0, strpos($text, ":"));
$text = substr($text, strpos($text, ":") + 1);
$text = LOAD_TEMPLATE("admin_extensions_text", true, $text);
// Initialize variables (no title for SQL commands by default)
- $ext_name = "";
+ $ext_name = '';
$title = getMessage('TASK_NO_TITLE');
// Shall I list SQL commands assigned to an extension installation or update task?
- if (((GET_EXT_VERSION("sql_patches") != '') && (getConfig('verbose_sql') == "Y")) || (!EXT_IS_ACTIVE("sql_patches"))) {
+ if (((GET_EXT_VERSION('sql_patches') != '') && (getConfig('verbose_sql') == 'Y')) || (!EXT_IS_ACTIVE('sql_patches'))) {
$ext_name = substr($subj, 1, strpos($subj, ":") - 1);
if ($type == "EXTENSION") {
// Load SQL commands for registering
$title = getMessage('ADMIN_SQLS_EXECUTED_ON_UPDATE');
} else {
// Remove extension's name
- $ext_name = "";
+ $ext_name = '';
}
// Add SQLs to a table
if (!IS_SQLS_VALID()) INIT_SQLS();
- if (empty($title)) $title = "";
- if ((!empty($ext_name)) && (GET_EXT_VERSION("sql_patches")) && (getConfig('verbose_sql') == "Y")) {
+ if (empty($title)) $title = '';
+ if ((!empty($ext_name)) && (GET_EXT_VERSION('sql_patches')) && (getConfig('verbose_sql') == 'Y')) {
// Add verbose SQL table
$text .= EXTENSION_VERBOSE_TABLE($title, " class=\"admin_table top2 left2 right2\"", true, "100%")."<br />\n";
} // END - if
break;
case "PAYOUT_REQUEST": // Payout requests
- if (EXT_IS_ACTIVE("payout")) {
+ 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__);
break;
case "WERNIS_REQUEST": // Wernis requests
- if (EXT_IS_ACTIVE("wernis")) {
+ 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__);
} // END - if
// There are uncompleted jobs!
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result_tasks)) {
// Init infos
$content['infos'] = "---";
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
//
?>
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Is the formular sent?
if (IS_FORM_SENT()) {
// Save the row to the database
- ADMIN_SAVE_SETTINGS(REQUEST_POST_ARRAY(), "_bank_packages", "", array("account_fee", "interest_plus", "interest_minus", "first_payment"), true);
+ ADMIN_SAVE_SETTINGS(REQUEST_POST_ARRAY(), "_bank_packages", '', array("account_fee", "interest_plus", "interest_minus", "first_payment"), true);
} else {
// Display form
LOAD_TEMPLATE("admin_add_bank_package");
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
// Check if category does already exist
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Fix a notice
-if (!REQUEST_ISSET_GET(('uid'))) REQUEST_SET_GET('uid', "");
+if (!REQUEST_ISSET_GET('uid')) REQUEST_SET_GET('uid', '');
if (REQUEST_GET('uid') == "all") {
// Add points to all accounts
SQL_FREERESULT($result_main);
// Output message
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_ALL_POINTS_ADDED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_ALL_POINTS_ADDED'));
} else {
// Display form add points
LOAD_TEMPLATE("admin_add_points_all");
}
-} elseif (REQUEST_ISSET_GET(('uid'))) {
+} 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__);
$msg = LOAD_EMAIL_TEMPLATE("add-points", $content, bigintval(REQUEST_GET('uid')));
SEND_EMAIL(bigintval(REQUEST_GET('uid')), getMessage('ADMIN_ADD_SUBJ'), $msg);
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_POINTS_ADDED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_POINTS_ADDED'));
} else {
// Opps, missing form here
// @TODO Rewrite these both constants
}
} else {
// User not found!
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))."</div>");
+ LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))."</div>");
}
} else {
// Output selection form with all confirmed user accounts listed
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
// Generate timestamps
LOAD_URL("modules.php?module=admin&what=config_rallye_prices&rallye=".$id);
} else {
// Problem detected...
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('RALLYE_PROBLEM_CREATE'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('RALLYE_PROBLEM_CREATE'));
}
} else {
// Free memory
SQL_FREERESULT($result);
// Overlapping detected
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('RALLYE_OVERLAP_TIMES'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('RALLYE_OVERLAP_TIMES'));
}
}
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
// Save sponsor in database
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Was an URL added?
if ((REQUEST_ISSET_POST(('add'))) && (REQUEST_ISSET_POST(('url')))) {
// Then add this URL
if (SURFBAR_ADMIN_ADD_URL(REQUEST_POST('url'), REQUEST_POST('limit'), REQUEST_POST('reload'))) {
// URL was added
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_SURFBAR_URL_ADDED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_URL_ADDED'));
} else {
// Not added
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_SURFBAR_URL_NOT_ADDED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_URL_NOT_ADDED'));
}
} // END - if
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Check if the admin has entered title and what-php file name...
if (((!REQUEST_ISSET_POST(('title'))) || (!REQUEST_ISSET_POST(('menu'))) || (!REQUEST_ISSET_POST(('descr')))) && (IS_FORM_SENT())) {
// Remove double eintries
// @TODO This can be somehow rewritten to a function
- $prev = ""; $dmy = $menus; $dmy2 = $titles; $dmy3 = $below;
+ $prev = ''; $dmy = $menus; $dmy2 = $titles; $dmy3 = $below;
foreach ($menus as $key => $value)
{
if ($value == $prev)
// Remove double eintries
// @TODO This can be somehow rewritten to a function
- $prev = ""; $dmy = $menus[$value_main]; $dmy2 = $titles[$value_main]; $dmy3 = $below[$value_main];
+ $prev = ''; $dmy = $menus[$value_main]; $dmy2 = $titles[$value_main]; $dmy3 = $below[$value_main];
foreach ($menus[$value_main] as $key => $value) {
if ($value == $prev) {
unset($dmy[$key]);
$OUT .= "</select>";
define('__BELOW_SELECTION' , $OUT);
- define('__WHAT_SELECTION' , ADMIN_MAKE_MENU_SELECTION("admin", "what", "name"));
- define('__ACTION_SELECTION', ADMIN_MAKE_MENU_SELECTION("admin", "action", "menu"));
+ define('__WHAT_SELECTION' , ADMIN_MAKE_MENU_SELECTION('admin', "what", "name"));
+ define('__ACTION_SELECTION', ADMIN_MAKE_MENU_SELECTION('admin', "action", "menu"));
// Display form
LOAD_TEMPLATE("admin_admin_add");
);
CACHE_PURGE_ADMIN_MENU(0, REQUEST_POST('name'));
}
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SETTINGS_SAVED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
} else {
// Is demo login!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SETTINGS_NOT_SAVED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_NOT_SAVED'));
}
//
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Do we edit/delete/change main menus or sub menus?
-$AND = "(`what` = '' OR `what` IS NULL)"; $SUB = "";
-if (REQUEST_ISSET_GET(('sub')))
+$AND = "(`what` = '' OR `what` IS NULL)"; $SUB = '';
+if (REQUEST_ISSET_GET('sub'))
{
- $AND = sprintf("`action`='%s' AND `what` IS NOT NULL", REQUEST_GET(('sub')));
- $SUB = REQUEST_GET(('sub'));
+ $AND = sprintf("`action`='%s' AND `what` IS NOT NULL", REQUEST_GET('sub'));
+ $SUB = REQUEST_GET('sub');
}
// Get count of (maybe) selected menu points
// Prepare data for the row template
$content = array(
- 'action' => ADMIN_MAKE_MENU_SELECTION("admin", "action", "sel_action[".$sel."]", $act),
- 'what' => ADMIN_MAKE_MENU_SELECTION("admin", "what", "sel_what[".$sel."]", $wht),
+ 'action' => ADMIN_MAKE_MENU_SELECTION('admin', "action", "sel_action[".$sel."]", $act),
+ 'what' => ADMIN_MAKE_MENU_SELECTION('admin', "what", "sel_what[".$sel."]", $wht),
'sw' => $SW,
'sel' => $sel,
'menu' => $menu,
define('__SUB_VALUE', $SUB);
define('__CHK_VALUE', $chk);
// Del menu entries with or without confirmation
- $SW = 2; $cnt = 0; $OUT = "";
+ $SW = 2; $cnt = 0; $OUT = '';
foreach (REQUEST_POST('sel') as $sel => $confirm)
{
if ($confirm == 1)
CACHE_PURGE_ADMIN_MENU(0, REQUEST_POST('sel_action', $sel), REQUEST_POST('sel_what', $sel));
// Load template
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SETTINGS_SAVED'));
+ 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",
array(bigintval($sel)), __FILE__, __LINE__);
- CACHE_PURGE_ADMIN_MENU(0, "", "", $AND);
+ CACHE_PURGE_ADMIN_MENU(0, '', '', $AND);
} // END - foreach
// Load template
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SETTINGS_SAVED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
break;
default: // Unexpected action
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__);
- CACHE_PURGE_ADMIN_MENU(0, "", "", $AND);
+ CACHE_PURGE_ADMIN_MENU(0, '', '', $AND);
}
}
define('__SUB_VALUE', $SUB);
// Init variables
- $OUT = ""; $SW = 2; $cnt = 0;
+ $OUT = ''; $SW = 2; $cnt = 0;
// Process all entries
while ($content = SQL_FETCHARRAY($result)) {
$cnt++;
// Init navigation variable
- $content['navi'] = "";
+ $content['navi'] = '';
if (($content['sort'] == 0) || (($content['sort'] == 1) && (!empty($SUB)))) {
// Is highest position
$content['navi'] = "<a href=\"{!URL!}/modules.php?module=admin&what=adminedit&sub={!__SUB_VALUE!}&act=".$content['action']."&w=".$content['what']."&tid=".($content['sort']+1)."&fid=".$content['sort']."\">{--LOWER--}</a>";
// Add more data to $content
$content['sw'] = $SW;
- $content['mode'] = "admin";
+ $content['mode'] = 'admin';
// Load row template and switch colors
$OUT .= LOAD_TEMPLATE("admin_menu_overview_row", true, $content);
LOAD_TEMPLATE("admin_amenu_edit");
} else {
// Menu entries are missing... (???)
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_NO_MENUS_FOUND'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NO_MENUS_FOUND'));
}
}
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Display form is default
$FORM = true;
$FORM = false;
// Admin login saved
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_ADMINS_ADD_DONE'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_ADMINS_ADD_DONE'));
// Run filter chain
runFilterChain('post_admin_added', REQUEST_POST_ARRAY());
if ($FORM === true) {
// Set missing elements
// @TODO Do we still need this ugly code here?
- if (!REQUEST_ISSET_POST(('login'))) REQUEST_SET_POST('login', "");
- if (!REQUEST_ISSET_POST(('email'))) REQUEST_SET_POST('email', "");
+ if (!REQUEST_ISSET_POST(('login'))) REQUEST_SET_POST('login', '');
+ if (!REQUEST_ISSET_POST(('email'))) REQUEST_SET_POST('email', '');
// Load form from template
LOAD_TEMPLATE("admin_admins_add");
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if ((IS_FORM_SENT()) && (REQUEST_ISSET_GET('admin'))) {
// Send mail or message
}
// Mail / message dropped
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMINS_ADMIN_CONTACTED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMINS_ADMIN_CONTACTED'));
} elseif (REQUEST_ISSET_GET('admin')) {
// Load contact form template
define('__ADMIN', REQUEST_GET('admin'));
LOAD_TEMPLATE("admin_admins_contct_form");
} else {
// Please select an admin!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMINS_SELECT_ADMIN'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMINS_SELECT_ADMIN'));
}
//
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Set selection data to empty array when it is empty
if (!REQUEST_ISSET_POST('sel')) REQUEST_SET_POST('sel', array());
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (REQUEST_ISSET_POST('edit')) {
// Check if entires are checked
$SEL = SELECTION_COUNT(REQUEST_POST('sel'));
if ($SEL > 0) {
// Add option for events
- $GLOBALS['cache_array']['admins'] = ADD_OPTION_LINES("admins", "id", "login", "", "email");
- $SW = 2; $rowNameS = "";
+ $GLOBALS['cache_array']['admins'] = ADD_OPTION_LINES('admins', "id", "login", '', 'email');
+ $SW = 2; $rowNameS = '';
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__);
- $OUT = ""; $aid2 = 0;
+ $OUT = ''; $aid2 = 0;
while ($content = SQL_FETCHARRAY($result)) {
// @TODO Can this be rewritten???
$OUT .= "<select name=\"admin_id[".$content['id']."]\" size=\"1\" class=\"admin_select\">
<option value=\"0\"";
if ($content['admin_id'] == "0") $OUT .= " selected=\"selected\"";
$OUT .=">{--ADMINS_ALL_ADMINS--}</option>\n";
- if (EXT_IS_ACTIVE("events")) {
+ if (EXT_IS_ACTIVE('events')) {
$OUT .= "<option value=\"-1\"";
if ($content['admin_id'] == "-1") $OUT .= " selected=\"selected\"";
$OUT .= ">{--ADMINS_TO_USER_EVENTS--}</option>\n";
}
- $OUT .= ADD_OPTION_LINES("admins", "id", "login", $content['admin_id'], "email");
+ $OUT .= ADD_OPTION_LINES('admins', "id", "login", $content['admin_id'], 'email');
$OUT .= "</select>\n<br />\n";
$aid2 = $content['admin_id']; $id2 = $content['id'];
}
LOAD_TEMPLATE("admin_admins_mails_edit");
} else {
// Nothing selected
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMINS_NO_MAIL_CHECKED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMINS_NO_MAIL_CHECKED'));
}
} else {
// Load all assigned mails
} // END - if
// List found entries
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($data = SQL_FETCHARRAY($result)) {
// Prepare content
$content = array(
LOAD_TEMPLATE("admin_admins_mails_list");
} else {
// No entries found
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMINS_MAILS_NO_ENTRIES'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMINS_MAILS_NO_ENTRIES'));
}
}
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
//
?>
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Calculate total hits
$totalHits = (getConfig('db_hits') + getConfig('cache_hits'));
}
// Add description as navigation point
-ADD_DESCR ("admin", basename(__FILE__));
+ADD_DESCR ('admin', basename(__FILE__));
// Check for accounts
$result = SQL_QUERY("SELECT userid, gender, surname, family, email, REMOTE_ADDR, refid, user_hash
if (SQL_NUMROWS($result) > 0) {
// We have some (new?) registrations!
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
// Add link to refid
if ($content['refid'] > 0) $content['refid'] = ADMIN_USER_PROFILE_LINK($content['refid']);
LOAD_TEMPLATE("admin_reg");
} else {
// No registrations left - or all has confirmed their email address... :-)
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_ALL_CONFIRMED_EMAIL'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_ALL_CONFIRMED_EMAIL'));
}
// Free memory
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
// Save data
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
// Save configuration
switch (getConfig('admin_menu'))
{
case "NEW":
- define('__ADMIN_MENU_NEW', " checked=\"checked\"");
- define('__ADMIN_MENU_OLD' , "");
+ define('__ADMIN_MENU_NEW', ' chkecked="checked"');
+ define('__ADMIN_MENU_OLD' , '');
break;
case "OLD":
- define('__ADMIN_MENU_NEW', "");
- define('__ADMIN_MENU_OLD' , " checked=\"checked\"");
+ define('__ADMIN_MENU_NEW', '');
+ define('__ADMIN_MENU_OLD' , ' chkecked="checked"');
break;
}
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
$SEL = 0;
if (REQUEST_ISSET_POST('sel')) $SEL = SELECTION_COUNT(REQUEST_POST('sel'));
if ((REQUEST_ISSET_POST('edit')) && ($SEL > 0)) {
// Edit ACLs
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
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",
$content = array(
'sw' => $SW,
'id' => $id,
- 'admins_selection' => ADD_OPTION_LINES("admins", "id", "login", $aid, "default_acl"),
+ 'admins_selection' => ADD_OPTION_LINES('admins', "id", "login", $aid, "default_acl"),
'action_selection' => ADMIN_MENU_SELECTION("action", $act, $id),
'what_selection' => ADMIN_MENU_SELECTION("what", $wht, $id),
'mode_options' => ADD_OPTION_LINES(
}
// Update cache when installed
- if (EXT_IS_ACTIVE("cache")) {
+ if (EXT_IS_ACTIVE('cache')) {
if ($GLOBALS['cache_instance']->loadCacheFile("admins_acls")) $GLOBALS['cache_instance']->destroyCacheFile();
// Purge menu cache
}
// Entries changed
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_ADMINS_ENTRIES_CHANGED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_ADMINS_ENTRIES_CHANGED'));
} elseif ((REQUEST_ISSET_POST('del')) && ($SEL > 0)) {
// Delete ACLs
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
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",
}
// Update cache when installed
- if (EXT_IS_ACTIVE("cache")) {
+ if (EXT_IS_ACTIVE('cache')) {
if ($GLOBALS['cache_instance']->loadCacheFile("admins_acls")) $GLOBALS['cache_instance']->destroyCacheFile();
// @TODO This causes the whole (!) menu cache being rebuild
}
// Entries deleted
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_ADMINS_ENTRIES_DELETED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_ADMINS_ENTRIES_DELETED'));
} elseif (REQUEST_ISSET_POST(('add'))) {
// Check if everything is fine...
$mode = GET_ADMIN_DEFAULT_ACL(bigintval(REQUEST_POST('admin_id')));
$ACL = false;
if (REQUEST_ISSET_POST(('what_menu'))) {
// Check parent ACL
- $ACL = ADMINS_CHECK_ACL(GET_ACTION("admin", REQUEST_POST('what_menu')), "");
+ $ACL = ADMINS_CHECK_ACL(GET_ACTION('admin', REQUEST_POST('what_menu')), '');
}
if ($mode != REQUEST_POST('mode') || ($ACL)) {
$content = getMessage('ADMIN_ADMINS_ACL_SAVED');
// Update cache when installed
- if (EXT_IS_ACTIVE("cache")) {
+ if (EXT_IS_ACTIVE('cache')) {
if ($GLOBALS['cache_instance']->loadCacheFile("admins_acls")) $GLOBALS['cache_instance']->destroyCacheFile();
// Purge cache
}
// Display message
- LOAD_TEMPLATE("admin_settings_saved", false, $content);
+ LOAD_TEMPLATE('admin_settings_saved', false, $content);
} else {
// List all ACLs
$result_acls = SQL_QUERY("SELECT id, admin_id, action_menu, what_menu, access_mode FROM `{!_MYSQL_PREFIX!}_admins_acls` ORDER BY admin_id, id", __FILE__, __LINE__);
if (SQL_NUMROWS($result_acls) > 0) {
// List ACLs
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result_acls)) {
// Prepare variables
if (empty($content['action_menu'])) $content['action_menu'] = "---";
}
// Prepare some constants for the template
- define('_ADMINS_SELECTION', ADD_OPTION_LINES("admins", "id", "login", "", "default_acl"));
+ define('_ADMINS_SELECTION', ADD_OPTION_LINES('admins', "id", "login", '', "default_acl"));
define('_ACTION_SELECTION', ADMIN_MENU_SELECTION("action"));
define('_WHAT_SELECTION' , ADMIN_MENU_SELECTION("what"));
define('_MODE_OPTIONS' ,
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
// Data was submitted so we store it
// Mail confirmation links
define('_CFG_AUTO_PURGE', CREATE_TIME_SELECTIONS(getConfig('auto_purge'), "auto_purge", "MWD"));
if (getConfig('auto_purge_active') != "Y") {
- define('_CFG_AP_ACTIVE_N', " checked=\"checked\"");
- define('_CFG_AP_ACTIVE_Y', "");
+ define('_CFG_AP_ACTIVE_N', ' chkecked="checked"');
+ define('_CFG_AP_ACTIVE_Y', '');
} else {
- define('_CFG_AP_ACTIVE_N', "");
- define('_CFG_AP_ACTIVE_Y', " checked=\"checked\"");
+ define('_CFG_AP_ACTIVE_N', '');
+ define('_CFG_AP_ACTIVE_Y', ' chkecked="checked"');
}
// Output template
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
// Translate german decimal commas to computer decimal dots
// Activate / Deactivate beg rallye (Y/N)
switch (getConfig('beg_rallye'))
{
- case "Y":
- define('__BEG_RALLYE_Y', " checked=\"checked\"");
- define('__BEG_RALLYE_N', "");
+ case 'Y':
+ define('__BEG_RALLYE_Y', ' chkecked="checked"');
+ define('__BEG_RALLYE_N', '');
break;
- case "N":
- define('__BEG_RALLYE_Y', "");
- define('__BEG_RALLYE_N', " checked=\"checked\"");
+ case 'N':
+ define('__BEG_RALLYE_Y', '');
+ define('__BEG_RALLYE_N', ' chkecked="checked"');
break;
}
switch (getConfig('beg_active'))
{
- case "Y":
- define('__BEG_ACTIVE_Y', " checked=\"checked\"");
- define('__BEG_ACTIVE_N', "");
+ case 'Y':
+ define('__BEG_ACTIVE_Y', ' chkecked="checked"');
+ define('__BEG_ACTIVE_N', '');
break;
- case "N":
- define('__BEG_ACTIVE_Y', "");
- define('__BEG_ACTIVE_N', " checked=\"checked\"");
+ case 'N':
+ define('__BEG_ACTIVE_Y', '');
+ define('__BEG_ACTIVE_N', ' chkecked="checked"');
break;
}
switch (getConfig('beg_mode'))
{
case "DIRECT":
- define('__BEG_MODE_DIRECT', " checked=\"checked\"");
- define('__BEG_MODE_REF' , "");
+ define('__BEG_MODE_DIRECT', ' chkecked="checked"');
+ define('__BEG_MODE_REF' , '');
break;
case "REF":
- define('__BEG_MODE_DIRECT', "");
- define('__BEG_MODE_REF' , " checked=\"checked\"");
+ define('__BEG_MODE_DIRECT', '');
+ define('__BEG_MODE_REF' , ' chkecked="checked"');
break;
}
switch (getConfig('beg_ral_en_notify'))
{
- case "Y":
- define('__BEG_RAL_EN_NOTIFY_Y', " checked=\"checked\"");
- define('__BEG_RAL_EN_NOTIFY_N', "");
+ case 'Y':
+ define('__BEG_RAL_EN_NOTIFY_Y', ' chkecked="checked"');
+ define('__BEG_RAL_EN_NOTIFY_N', '');
break;
- case "N":
- define('__BEG_RAL_EN_NOTIFY_Y', "");
- define('__BEG_RAL_EN_NOTIFY_N', " checked=\"checked\"");
+ case 'N':
+ define('__BEG_RAL_EN_NOTIFY_Y', '');
+ define('__BEG_RAL_EN_NOTIFY_N', ' chkecked="checked"');
break;
}
switch (getConfig('beg_ral_di_notify'))
{
- case "Y":
- define('__BEG_RAL_DI_NOTIFY_Y', " checked=\"checked\"");
- define('__BEG_RAL_DI_NOTIFY_N', "");
+ case 'Y':
+ define('__BEG_RAL_DI_NOTIFY_Y', ' chkecked="checked"');
+ define('__BEG_RAL_DI_NOTIFY_N', '');
break;
- case "N":
- define('__BEG_RAL_DI_NOTIFY_Y', "");
- define('__BEG_RAL_DI_NOTIFY_N', " checked=\"checked\"");
+ case 'N':
+ define('__BEG_RAL_DI_NOTIFY_Y', '');
+ define('__BEG_RAL_DI_NOTIFY_N', ' chkecked="checked"');
break;
}
switch (getConfig('beg_new_mem_notify'))
{
- case "Y":
- define('__BEG_NEW_MEMBER_NOTIFY_Y', " checked=\"checked\"");
- define('__BEG_NEW_MEMBER_NOTIFY_N', "");
+ case 'Y':
+ define('__BEG_NEW_MEMBER_NOTIFY_Y', ' chkecked="checked"');
+ define('__BEG_NEW_MEMBER_NOTIFY_N', '');
break;
- case "N":
- define('__BEG_NEW_MEMBER_NOTIFY_Y', "");
- define('__BEG_NEW_MEMBER_NOTIFY_N', " checked=\"checked\"");
+ case 'N':
+ define('__BEG_NEW_MEMBER_NOTIFY_Y', '');
+ define('__BEG_NEW_MEMBER_NOTIFY_N', ' chkecked="checked"');
break;
}
switch (getConfig('beg_include_own'))
{
- case "Y":
- define('__BEG_INCLUDE_OWN_Y', " checked=\"checked\"");
- define('__BEG_INCLUDE_OWN_N', "");
+ case 'Y':
+ define('__BEG_INCLUDE_OWN_Y', ' chkecked="checked"');
+ define('__BEG_INCLUDE_OWN_N', '');
break;
- case "N":
- define('__BEG_INCLUDE_OWN_Y', "");
- define('__BEG_INCLUDE_OWN_N', " checked=\"checked\"");
+ case 'N':
+ define('__BEG_INCLUDE_OWN_Y', '');
+ define('__BEG_INCLUDE_OWN_N', ' chkecked="checked"');
break;
}
switch (getConfig('beg_pay_mode')) {
case "IMG":
define('__BEG_PAY_MODE_IMG' , " selected=\"selected\"");
- define('__BEG_PAY_MODE_JS' , "");
- define('__BEG_PAY_MODE_BOTH', "");
- define('__BEG_PAY_MODE_NONE', "");
+ define('__BEG_PAY_MODE_JS' , '');
+ define('__BEG_PAY_MODE_BOTH', '');
+ define('__BEG_PAY_MODE_NONE', '');
break;
case "JS":
- define('__BEG_PAY_MODE_IMG' , "");
+ define('__BEG_PAY_MODE_IMG' , '');
define('__BEG_PAY_MODE_JS' , " selected=\"selected\"");
- define('__BEG_PAY_MODE_BOTH', "");
- define('__BEG_PAY_MODE_NONE', "");
+ define('__BEG_PAY_MODE_BOTH', '');
+ define('__BEG_PAY_MODE_NONE', '');
break;
case "BOTH":
- define('__BEG_PAY_MODE_IMG' , "");
- define('__BEG_PAY_MODE_JS' , "");
+ define('__BEG_PAY_MODE_IMG' , '');
+ define('__BEG_PAY_MODE_JS' , '');
define('__BEG_PAY_MODE_BOTH', " selected=\"selected\"");
- define('__BEG_PAY_MODE_NONE', "");
+ define('__BEG_PAY_MODE_NONE', '');
break;
case "NONE":
- define('__BEG_PAY_MODE_IMG' , "");
- define('__BEG_PAY_MODE_JS' , "");
- define('__BEG_PAY_MODE_BOTH', "");
+ define('__BEG_PAY_MODE_IMG' , '');
+ define('__BEG_PAY_MODE_JS' , '');
+ define('__BEG_PAY_MODE_BOTH', '');
define('__BEG_PAY_MODE_NONE', " selected=\"selected\"");
break;
}
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
// Save configuration
define('__POINTS_VALUE', getConfig('birthday_points'));
switch (getConfig('birthday_active'))
{
- case "Y":
- define('__BIRTHDAY_ACTIVE_Y', " checked=\"checked\"");
- define('__BIRTHDAY_ACTIVE_N', "");
+ case 'Y':
+ define('__BIRTHDAY_ACTIVE_Y', ' chkecked="checked"');
+ define('__BIRTHDAY_ACTIVE_N', '');
break;
- case "N":
- define('__BIRTHDAY_ACTIVE_Y', "");
- define('__BIRTHDAY_ACTIVE_N', " checked=\"checked\"");
+ case 'N':
+ define('__BIRTHDAY_ACTIVE_Y', '');
+ define('__BIRTHDAY_ACTIVE_N', ' chkecked="checked"');
break;
}
switch (getConfig('birthday_mode'))
{
case "DIRECT":
- define('__BIRTHDAY_MODE_DIRECT', " checked=\"checked\"");
- define('__BIRTHDAY_MODE_REF' , "");
+ define('__BIRTHDAY_MODE_DIRECT', ' chkecked="checked"');
+ define('__BIRTHDAY_MODE_REF' , '');
break;
case "REF":
- define('__BIRTHDAY_MODE_DIRECT', "");
- define('__BIRTHDAY_MODE_REF' , " checked=\"checked\"");
+ define('__BIRTHDAY_MODE_DIRECT', '');
+ define('__BIRTHDAY_MODE_REF' , ' chkecked="checked"');
break;
}
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
// Replace german decimal commas to computer decimal dots
REQUEST_SET_POST('bonus_notify_points', REVERT_COMMA(REQUEST_POST('bonus_notify_points')));
// Generate string for saving ranks
- REQUEST_SET_POST('turbo_rates', "");
+ REQUEST_SET_POST('turbo_rates', '');
$RATES = array();
foreach (REQUEST_POST('rate') as $rate) {
$rate = trim(REVERT_COMMA($rate));
if (!empty($rate)) $RATES[] = $rate;
}
- REQUEST_SET_POST('turbo_rates', trim(implode(";", $RATES)));
+ REQUEST_SET_POST('turbo_rates', trim(implode(';', $RATES)));
REQUEST_UNSET_POST(('rate'));
// Automatically calculate bonus points for ranks 2 and 3 when not set
- if (!REQUEST_ISSET_POST(('turbo_rates'))) REQUEST_SET_POST('turbo_rates', "".round(getConfig('turbo_bonus') / 2).";".round(getConfig('turbo_bonus') / 4)."");
+ if (!REQUEST_ISSET_POST(('turbo_rates'))) REQUEST_SET_POST('turbo_rates', "".round(getConfig('turbo_bonus') / 2).';'.round(getConfig('turbo_bonus') / 4)."");
// Save data
ADMIN_SAVE_SETTINGS_POST();
// Initialize array for the points list
//die("*".getConfig('turbo_rates')."*");
- $RANKS = explode(";", getConfig('turbo_rates'));
+ $RANKS = explode(';', getConfig('turbo_rates'));
// Automatically calculate bonus points for ranks 2 and 3 when not set
if (getConfig('turbo_rates') == "") $RANKS = array(round(getConfig('turbo_bonus') / 2), round(getConfig('turbo_bonus') / 4));
// Activate / Deactivate bonus active rallye (Y/N)
switch (getConfig('bonus_active'))
{
- case "Y":
- define('__BONUS_ACTIVE_Y', " checked=\"checked\"");
- define('__BONUS_ACTIVE_N', "");
+ case 'Y':
+ define('__BONUS_ACTIVE_Y', ' chkecked="checked"');
+ define('__BONUS_ACTIVE_N', '');
break;
- case "N":
- define('__BONUS_ACTIVE_Y', "");
- define('__BONUS_ACTIVE_N', " checked=\"checked\"");
+ case 'N':
+ define('__BONUS_ACTIVE_Y', '');
+ define('__BONUS_ACTIVE_N', ' chkecked="checked"');
break;
}
// Other bonus to de-/activate
switch (getConfig('bonus_login_yn'))
{
- case "Y":
- define('__BONUS_LOGIN_Y', " checked=\"checked\"");
- define('__BONUS_LOGIN_N', "");
+ case 'Y':
+ define('__BONUS_LOGIN_Y', ' chkecked="checked"');
+ define('__BONUS_LOGIN_N', '');
break;
- case "N":
- define('__BONUS_LOGIN_Y', "");
- define('__BONUS_LOGIN_N', " checked=\"checked\"");
+ case 'N':
+ define('__BONUS_LOGIN_Y', '');
+ define('__BONUS_LOGIN_N', ' chkecked="checked"');
break;
}
switch (getConfig('bonus_stats_yn'))
{
- case "Y":
- define('__BONUS_STATS_Y', " checked=\"checked\"");
- define('__BONUS_STATS_N', "");
+ case 'Y':
+ define('__BONUS_STATS_Y', ' chkecked="checked"');
+ define('__BONUS_STATS_N', '');
break;
- case "N":
- define('__BONUS_STATS_Y', "");
- define('__BONUS_STATS_N', " checked=\"checked\"");
+ case 'N':
+ define('__BONUS_STATS_Y', '');
+ define('__BONUS_STATS_N', ' chkecked="checked"');
break;
}
switch (getConfig('bonus_order_yn'))
{
- case "Y":
- define('__BONUS_ORDER_Y', " checked=\"checked\"");
- define('__BONUS_ORDER_N', "");
+ case 'Y':
+ define('__BONUS_ORDER_Y', ' chkecked="checked"');
+ define('__BONUS_ORDER_N', '');
break;
- case "N":
- define('__BONUS_ORDER_Y', "");
- define('__BONUS_ORDER_N', " checked=\"checked\"");
+ case 'N':
+ define('__BONUS_ORDER_Y', '');
+ define('__BONUS_ORDER_N', ' chkecked="checked"');
break;
}
switch (getConfig('bonus_ref_yn'))
{
- case "Y":
- define('__BONUS_REF_Y', " checked=\"checked\"");
- define('__BONUS_REF_N', "");
+ case 'Y':
+ define('__BONUS_REF_Y', ' chkecked="checked"');
+ define('__BONUS_REF_N', '');
break;
- case "N":
- define('__BONUS_REF_Y', "");
- define('__BONUS_REF_N', " checked=\"checked\"");
+ case 'N':
+ define('__BONUS_REF_Y', '');
+ define('__BONUS_REF_N', ' chkecked="checked"');
break;
}
switch (getConfig('bonus_click_yn'))
{
- case "Y":
- define('__BONUS_CLICK_Y', " checked=\"checked\"");
- define('__BONUS_CLICK_N', "");
+ case 'Y':
+ define('__BONUS_CLICK_Y', ' chkecked="checked"');
+ define('__BONUS_CLICK_N', '');
break;
- case "N":
- define('__BONUS_CLICK_Y', "");
- define('__BONUS_CLICK_N', " checked=\"checked\"");
+ case 'N':
+ define('__BONUS_CLICK_Y', '');
+ define('__BONUS_CLICK_N', ' chkecked="checked"');
break;
}
switch (getConfig('bonus_en_notify'))
{
- case "Y":
- define('__BONUS_EN_NOTIFY_Y', " checked=\"checked\"");
- define('__BONUS_EN_NOTIFY_N', "");
+ case 'Y':
+ define('__BONUS_EN_NOTIFY_Y', ' chkecked="checked"');
+ define('__BONUS_EN_NOTIFY_N', '');
break;
- case "N":
- define('__BONUS_EN_NOTIFY_Y', "");
- define('__BONUS_EN_NOTIFY_N', " checked=\"checked\"");
+ case 'N':
+ define('__BONUS_EN_NOTIFY_Y', '');
+ define('__BONUS_EN_NOTIFY_N', ' chkecked="checked"');
break;
}
switch (getConfig('bonus_di_notify'))
{
- case "Y":
- define('__BONUS_DI_NOTIFY_Y', " checked=\"checked\"");
- define('__BONUS_DI_NOTIFY_N', "");
+ case 'Y':
+ define('__BONUS_DI_NOTIFY_Y', ' chkecked="checked"');
+ define('__BONUS_DI_NOTIFY_N', '');
break;
- case "N":
- define('__BONUS_DI_NOTIFY_Y', "");
- define('__BONUS_DI_NOTIFY_N', " checked=\"checked\"");
+ case 'N':
+ define('__BONUS_DI_NOTIFY_Y', '');
+ define('__BONUS_DI_NOTIFY_N', ' chkecked="checked"');
break;
}
switch (getConfig('bonus_new_mem_notify'))
{
- case "Y":
- define('__BONUS_NEW_MEMBER_NOTIFY_Y', " checked=\"checked\"");
- define('__BONUS_NEW_MEMBER_NOTIFY_N', "");
+ case 'Y':
+ define('__BONUS_NEW_MEMBER_NOTIFY_Y', ' chkecked="checked"');
+ define('__BONUS_NEW_MEMBER_NOTIFY_N', '');
break;
- case "N":
- define('__BONUS_NEW_MEMBER_NOTIFY_Y', "");
- define('__BONUS_NEW_MEMBER_NOTIFY_N', " checked=\"checked\"");
+ case 'N':
+ define('__BONUS_NEW_MEMBER_NOTIFY_Y', '');
+ define('__BONUS_NEW_MEMBER_NOTIFY_N', ' chkecked="checked"');
break;
}
switch (getConfig('bonus_include_own'))
{
- case "Y":
- define('__BONUS_INCLUDE_OWN_Y', " checked=\"checked\"");
- define('__BONUS_INCLUDE_OWN_N', "");
+ case 'Y':
+ define('__BONUS_INCLUDE_OWN_Y', ' chkecked="checked"');
+ define('__BONUS_INCLUDE_OWN_N', '');
break;
- case "N":
- define('__BONUS_INCLUDE_OWN_Y', "");
- define('__BONUS_INCLUDE_OWN_N', " checked=\"checked\"");
+ case 'N':
+ define('__BONUS_INCLUDE_OWN_Y', '');
+ define('__BONUS_INCLUDE_OWN_N', ' chkecked="checked"');
break;
}
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
// Cache path has been not changed by default so don't test it again
REQUEST_SET_POST('cache_tested', "Y");
}
- if ((REQUEST_POST('cache_admins') == "N") && ($GLOBALS['cache_instance']->loadCacheFile("admins"))) {
+ if ((REQUEST_POST('cache_admins') == 'N') && ($GLOBALS['cache_instance']->loadCacheFile('admins'))) {
$GLOBALS['cache_instance']->destroyCacheFile();
}
- if ((REQUEST_POST('cache_acls') == "N") && ($GLOBALS['cache_instance']->loadCacheFile("acls"))) {
+ if ((REQUEST_POST('cache_acls') == 'N') && ($GLOBALS['cache_instance']->loadCacheFile("acls"))) {
$GLOBALS['cache_instance']->destroyCacheFile();
}
- if ((REQUEST_POST('cache_exts') == "N") && ($GLOBALS['cache_instance']->loadCacheFile("extensions", true))) {
+ if ((REQUEST_POST('cache_exts') == 'N') && ($GLOBALS['cache_instance']->loadCacheFile("extensions", true))) {
$GLOBALS['cache_instance']->destroyCacheFile();
}
- if ((REQUEST_POST('cache_config') == "N") && ($GLOBALS['cache_instance']->loadCacheFile("config"))) {
+ if ((REQUEST_POST('cache_config') == 'N') && ($GLOBALS['cache_instance']->loadCacheFile("config"))) {
$GLOBALS['cache_instance']->destroyCacheFile();
}
- if ((REQUEST_POST('cache_modreg') == "N") && ($GLOBALS['cache_instance']->loadCacheFile("modreg"))) {
+ if ((REQUEST_POST('cache_modreg') == 'N') && ($GLOBALS['cache_instance']->loadCacheFile("modreg"))) {
$GLOBALS['cache_instance']->destroyCacheFile();
}
- if ((REQUEST_POST('cache_refdepth') == "N") && ($GLOBALS['cache_instance']->loadCacheFile("refdepth"))) {
+ if ((REQUEST_POST('cache_refdepth') == 'N') && ($GLOBALS['cache_instance']->loadCacheFile("refdepth"))) {
$GLOBALS['cache_instance']->destroyCacheFile();
}
- if ((REQUEST_POST('cache_refsys') == "N") && ($GLOBALS['cache_instance']->loadCacheFile("refsys"))) {
+ if ((REQUEST_POST('cache_refsys') == 'N') && ($GLOBALS['cache_instance']->loadCacheFile("refsys"))) {
$GLOBALS['cache_instance']->destroyCacheFile();
}
} else {
// Prepare data
switch (getConfig('cache_admins')) {
- case "Y":
- define('__ADMINS_Y', " checked=\"checked\"");
- define('__ADMINS_N', "");
+ case 'Y':
+ define('__ADMINS_Y', ' chkecked="checked"');
+ define('__ADMINS_N', '');
break;
- case "N":
- define('__ADMINS_Y', "");
- define('__ADMINS_N', " checked=\"checked\"");
+ case 'N':
+ define('__ADMINS_Y', '');
+ define('__ADMINS_N', ' chkecked="checked"');
break;
}
switch (getConfig('cache_acls')) {
- case "Y":
- define('__ACLS_Y', " checked=\"checked\"");
- define('__ACLS_N', "");
+ case 'Y':
+ define('__ACLS_Y', ' chkecked="checked"');
+ define('__ACLS_N', '');
break;
- case "N":
- define('__ACLS_Y', "");
- define('__ACLS_N', " checked=\"checked\"");
+ case 'N':
+ define('__ACLS_Y', '');
+ define('__ACLS_N', ' chkecked="checked"');
break;
}
switch (getConfig('cache_exts')) {
- case "Y":
- define('__EXTS_Y', " checked=\"checked\"");
- define('__EXTS_N', "");
+ case 'Y':
+ define('__EXTS_Y', ' chkecked="checked"');
+ define('__EXTS_N', '');
break;
- case "N":
- define('__EXTS_Y', "");
- define('__EXTS_N', " checked=\"checked\"");
+ case 'N':
+ define('__EXTS_Y', '');
+ define('__EXTS_N', ' chkecked="checked"');
break;
}
switch (getConfig('cache_config')) {
- case "Y":
- define('__CONFIG_Y', " checked=\"checked\"");
- define('__CONFIG_N', "");
+ case 'Y':
+ define('__CONFIG_Y', ' chkecked="checked"');
+ define('__CONFIG_N', '');
break;
- case "N":
- define('__CONFIG_Y', "");
- define('__CONFIG_N', " checked=\"checked\"");
+ case 'N':
+ define('__CONFIG_Y', '');
+ define('__CONFIG_N', ' chkecked="checked"');
break;
}
switch (getConfig('cache_modreg')) {
- case "Y":
- define('__MODREG_Y', " checked=\"checked\"");
- define('__MODREG_N', "");
+ case 'Y':
+ define('__MODREG_Y', ' chkecked="checked"');
+ define('__MODREG_N', '');
break;
- case "N":
- define('__MODREG_Y', "");
- define('__MODREG_N', " checked=\"checked\"");
+ case 'N':
+ define('__MODREG_Y', '');
+ define('__MODREG_N', ' chkecked="checked"');
break;
}
switch (getConfig('cache_refdepth')) {
- case "Y":
- define('__REFDEPTH_Y', " checked=\"checked\"");
- define('__REFDEPTH_N', "");
+ case 'Y':
+ define('__REFDEPTH_Y', ' chkecked="checked"');
+ define('__REFDEPTH_N', '');
break;
- case "N":
- define('__REFDEPTH_Y', "");
- define('__REFDEPTH_N', " checked=\"checked\"");
+ case 'N':
+ define('__REFDEPTH_Y', '');
+ define('__REFDEPTH_N', ' chkecked="checked"');
break;
}
switch (getConfig('cache_refsys')) {
- case "Y":
- define('__REFSYS_Y', " checked=\"checked\"");
- define('__REFSYS_N', "");
+ case 'Y':
+ define('__REFSYS_Y', ' chkecked="checked"');
+ define('__REFSYS_N', '');
break;
- case "N":
- define('__REFSYS_Y', "");
- define('__REFSYS_N', " checked=\"checked\"");
+ case 'N':
+ define('__REFSYS_Y', '');
+ define('__REFSYS_N', ' chkecked="checked"');
break;
}
switch (getConfig('cache_themes')) {
- case "Y":
- define('__THEMES_Y', " checked=\"checked\"");
- define('__THEMES_N', "");
+ case 'Y':
+ define('__THEMES_Y', ' chkecked="checked"');
+ define('__THEMES_N', '');
break;
- case "N":
- define('__THEMES_Y', "");
- define('__THEMES_N', " checked=\"checked\"");
+ case 'N':
+ define('__THEMES_Y', '');
+ define('__THEMES_N', ' chkecked="checked"');
break;
}
switch (getConfig('cache_admin_menu')) {
- case "Y":
- define('__ADMIN_MENU_Y', " checked=\"checked\"");
- define('__ADMIN_MENU_N', "");
+ case 'Y':
+ define('__ADMIN_MENU_Y', ' chkecked="checked"');
+ define('__ADMIN_MENU_N', '');
break;
- case "N":
- define('__ADMIN_MENU_Y', "");
- define('__ADMIN_MENU_N', " checked=\"checked\"");
+ case 'N':
+ define('__ADMIN_MENU_Y', '');
+ define('__ADMIN_MENU_N', ' chkecked="checked"');
break;
}
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Init variable to avoid a notice
-$CATS = "";
+$CATS = '';
if (REQUEST_ISSET_POST(('add'))) {
// Add a new category
SQL_FREERESULT($result);
// Display message
- LOAD_TEMPLATE("admin_settings_saved", false, $content);
+ LOAD_TEMPLATE('admin_settings_saved', false, $content);
} elseif ((IS_FORM_SENT()) && (REQUEST_ISSET_POST(('id'))) && (is_array(REQUEST_POST('id')))) {
// Change or delete categories...
- $TEXT = "";
+ $TEXT = '';
foreach (REQUEST_POST('id') as $id => $cat) {
// Secure ID
$id = bigintval($id);
if (isset($TEXT)) {
// Display message
- LOAD_TEMPLATE("admin_settings_saved", false, $TEXT);
+ LOAD_TEMPLATE('admin_settings_saved', false, $TEXT);
}
} elseif ((REQUEST_ISSET_POST('del')) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
// Delete categories
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
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",
LOAD_TEMPLATE("admin_del_cats");
} elseif ((REQUEST_ISSET_POST('edit')) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
// Edit categories
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
foreach (REQUEST_POST('sel') as $id => $value)
{
// Load data from the category
LOAD_TEMPLATE("admin_edit_cats");
} else {
// Init variable here
- $CATS = "";
+ $CATS = '';
// Load all categories
$result = SQL_QUERY("SELECT id, cat, visible, sort FROM `{!_MYSQL_PREFIX!}_cats` ORDER BY `sort`", __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Init variables
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
// List already existing categories for editing
while ($content = SQL_FETCHARRAY($result)) {
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
// Replace commata with decimal dot
// Take points from jackpot (Y/N)
switch (getConfig('doubler_jackpot'))
{
- case "Y":
- define('__DOUBLER_JACKPOT_Y', " checked=\"checked\"");
- define('__DOUBLER_JACKPOT_N', "");
+ case 'Y':
+ define('__DOUBLER_JACKPOT_Y', ' chkecked="checked"');
+ define('__DOUBLER_JACKPOT_N', '');
break;
- case "N":
- define('__DOUBLER_JACKPOT_Y', "");
- define('__DOUBLER_JACKPOT_N', " checked=\"checked\"");
+ case 'N':
+ define('__DOUBLER_JACKPOT_Y', '');
+ define('__DOUBLER_JACKPOT_N', ' chkecked="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', "");
+ case 'Y':
+ define('__DOUBLER_OWN_Y', ' chkecked="checked"');
+ define('__DOUBLER_OWN_N', '');
break;
- case "N":
- define('__DOUBLER_OWN_Y', "");
- define('__DOUBLER_OWN_N', " checked=\"checked\"");
+ case 'N':
+ define('__DOUBLER_OWN_Y', '');
+ define('__DOUBLER_OWN_N', ' chkecked="checked"');
break;
}
switch (getConfig('doubler_send_mode'))
{
case "DIRECT":
- define('__DOUBLER_SEND_DIRECT', " checked=\"checked\"");
- define('__DOUBLER_SEND_RESET' , "");
+ define('__DOUBLER_SEND_DIRECT', ' chkecked="checked"');
+ define('__DOUBLER_SEND_RESET' , '');
break;
case "RESET":
- define('__DOUBLER_SEND_DIRECT', "");
- define('__DOUBLER_SEND_RESET' , " checked=\"checked\"");
+ define('__DOUBLER_SEND_DIRECT', '');
+ define('__DOUBLER_SEND_RESET' , ' chkecked="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', "");
+ case 'Y':
+ define('__DOUBLER_SENT_ALL_Y', ' chkecked="checked"');
+ define('__DOUBLER_SENT_ALL_N', '');
break;
- case "N":
- define('__DOUBLER_SENT_ALL_Y', "");
- define('__DOUBLER_SENT_ALL_N', " checked=\"checked\"");
+ case 'N':
+ define('__DOUBLER_SENT_ALL_Y', '');
+ define('__DOUBLER_SENT_ALL_N', ' chkecked="checked"');
break;
}
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Remove empty array index
if (!REQUEST_ISSET_POST(('max'))) REQUEST_UNSET_POST(('add_max'));
SQL_FREERESULT($result);
// Display message
- LOAD_TEMPLATE("admin_settings_saved", false, $content);
+ LOAD_TEMPLATE('admin_settings_saved', false, $content);
} elseif ((IS_FORM_SENT()) && (REQUEST_ISSET_GET('do'))) {
// Change or delete entries...
- $TEXT = "";
+ $TEXT = '';
foreach (REQUEST_POST('id') as $id => $value) {
// Secure ID
$id = bigintval($id);
if (isset($TEXT)) {
// Display message
- LOAD_TEMPLATE("admin_settings_saved", false, $TEXT);
+ LOAD_TEMPLATE('admin_settings_saved', false, $TEXT);
}
} elseif ((REQUEST_ISSET_POST('del')) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
// Delete entries
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
foreach (REQUEST_POST('sel') as $id => $value)
{
// Load data
LOAD_TEMPLATE("admin_config_email_del");
} elseif ((REQUEST_ISSET_POST('edit')) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
// Edit entries
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
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",
__FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// List already existing entries for editing
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
// Prepare data for the row template
$content['sw'] = $SW;
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
// Save configuration
} else {
// Prepare data
switch (getConfig('verbose_sql')) {
- case "Y":
- define('__VERBOSE_Y', " checked=\"checked\"");
- define('__VERBOSE_N', "");
+ case 'Y':
+ define('__VERBOSE_Y', ' chkecked="checked"');
+ define('__VERBOSE_N', '');
break;
- case "N":
- define('__VERBOSE_Y', "");
- define('__VERBOSE_N', " checked=\"checked\"");
+ case 'N':
+ define('__VERBOSE_Y', '');
+ define('__VERBOSE_N', ' chkecked="checked"');
break;
}
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT())
{
switch (getConfig('holiday_mode')) {
case "RESET":
- define('__RESET_DEFAULT' , " checked=\"checked\"");
- define('__DIRECT_DEFAULT', "");
+ define('__RESET_DEFAULT' , ' chkecked="checked"');
+ define('__DIRECT_DEFAULT', '');
break;
case "DIRECT":
- define('__RESET_DEFAULT' , "");
- define('__DIRECT_DEFAULT', " checked=\"checked\"");
+ define('__RESET_DEFAULT' , '');
+ define('__DIRECT_DEFAULT', ' chkecked="checked"');
break;
}
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
-// Init "sub" value
-$sub = "";
-if (REQUEST_ISSET_GET(('sub'))) $sub = REQUEST_GET('sub');
+// Init 'sub' value
+$sub = '';
+if (REQUEST_ISSET_GET('sub')) $sub = REQUEST_GET('sub');
switch ($sub)
{
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 = array_fill(-1, 60, '');
$content[getConfig('index_delay')] = " selected=\"selected\"";
define('__INDEX_COOKIE_SELECTION', CREATE_TIME_SELECTIONS(getConfig('index_cookie'), "index_cookie", "YMWD"));
// Init variables
$SW = 2;
- $OUT = "";
+ $OUT = '';
// Process all entries
while ($content = SQL_FETCHARRAY($result)) {
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
// Test timestamp
// Convert some data
REQUEST_SET_POST('mt_stage', bigintval(REQUEST_POST('mt_stage')));
- if (REQUEST_POST('mt_stage') <= GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true)) {
+ if (REQUEST_POST('mt_stage') <= GET_TOTAL_DATA("CONFIRMED", "user_data", 'userid', "status", true)) {
// Not enougth!
REQUEST_UNSET_POST('ok');
}
// Some security stuff...
if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
$SEL = 0;
if (REQUEST_ISSET_POST('edit')) {
$SEL = SELECTION_COUNT(REQUEST_POST('sel'));
if ($SEL > 0) {
// Output header
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
// Edit selected modules
foreach (REQUEST_POST('sel') as $id => $sel) {
'mod' => $mod,
'id' => $id,
'title' => $title,
- 'locked' => ADD_SELECTION("yn", $locked, "locked", $id),
- 'hidden' => ADD_SELECTION("yn", $hidden, "hidden", $id),
- 'admin' => ADD_SELECTION("yn", $admin , "admin" , $id),
- 'mem' => ADD_SELECTION("yn", $mem , "member", $id),
+ 'locked' => ADD_SELECTION('yn', $locked, 'locked', $id),
+ 'hidden' => ADD_SELECTION('yn', $hidden, 'hidden', $id),
+ 'admin' => ADD_SELECTION('yn', $admin , 'admin' , $id),
+ 'mem' => ADD_SELECTION('yn', $mem , 'member', $id),
);
// Load row template
- $OUT .= LOAD_TEMPLATE("admin_mods_edit_row", true, $content);
+ $OUT .= LOAD_TEMPLATE('admin_mods_edit_row', true, $content);
}
define('__MODS_ROWS', $OUT);
// Load main template
- LOAD_TEMPLATE("admin_mods_edit");
+ LOAD_TEMPLATE('admin_mods_edit');
} else {
// Nothing selected
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MODS_NOTHING_SELECTED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MODS_NOTHING_SELECTED'));
// Remove maybe confusing data
REQUEST_UNSET_POST('edit');
$id = bigintval($id);
// 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",
+ 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),
runFilterChain('run_sqls');
// Remove cache file if version matches
- if (GET_EXT_VERSION("cache") >= "0.1.2") {
- if ($GLOBALS['cache_instance']->loadCacheFile("modreg")) $GLOBALS['cache_instance']->destroyCacheFile();
+ if (GET_EXT_VERSION('cache') >= '0.1.2') {
+ if ($GLOBALS['cache_instance']->loadCacheFile('modreg')) $GLOBALS['cache_instance']->destroyCacheFile();
} // END - if
// Entries updated
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MODS_CHANGED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MODS_CHANGED'));
}
if ($SEL == 0) {
// Load module data (We do not need to check if there's at least one...)
- $result = SQL_QUERY("SELECT id, module, locked, hidden, admin_only, title, mem_only
+ $result = SQL_QUERY('SELECT id, module, locked, hidden, admin_only, title, mem_only
FROM `{!_MYSQL_PREFIX!}_mod_reg`
-ORDER BY module", __FILE__, __LINE__);
- $OUT = ""; $SW = 2;
+ORDER BY module', __FILE__, __LINE__);
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
// Reset title to --- if it is NULL
- if (empty($content['title'])) $content['title'] = "---";
- if (($content['module'] == "index") || ($content['module'] == "login")) {
+ if (empty($content['title'])) $content['title'] = '---';
+ if (($content['module'] == 'index') || ($content['module'] == 'login')) {
// Add link to detail statistics
$content['module'] = "<strong><a href=\"{!URL!}/modules.php?module=admin&what=stats_mods&mod=".$content['module']."\">".$content['module']."</a></strong>";
}
);
// Load row template
- $OUT .= LOAD_TEMPLATE("admin_mods_list_row", true, $content);
+ $OUT .= LOAD_TEMPLATE('admin_mods_list_row', true, $content);
// Switch colors
$SW = 3 - $SW;
define('__MODS_ROWS', $OUT);
// Load main template
- LOAD_TEMPLATE("admin_mods_list");
+ LOAD_TEMPLATE('admin_mods_list');
}
//
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
// Save data
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
// Save data
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
// Save data
// Prepare constants for the template
switch (getConfig('order_max_full'))
{
- case "ORDER":
- define('__ORDER_DEFAULT', " checked=\"checked\"");
- define('__MAX_DEFAULT' , "");
+ case 'ORDER':
+ define('__ORDER_DEFAULT', ' chkecked="checked"');
+ define('__MAX_DEFAULT' , '');
break;
- case "MAX":
- define('__ORDER_DEFAULT', "");
- define('__MAX_DEFAULT' , " checked=\"checked\"");
+ case 'MAX':
+ define('__ORDER_DEFAULT', '');
+ define('__MAX_DEFAULT' , ' chkecked="checked"');
break;
}
{
case "ASC":
define('__ASC_DEFAULT' , " selected=\"selected\"");
- define('__DESC_DEFAULT', "");
+ define('__DESC_DEFAULT', '');
break;
case "DESC":
- define('__ASC_DEFAULT' , "");
+ define('__ASC_DEFAULT' , '');
define('__DESC_DEFAULT', " selected=\"selected\"");
break;
}
define('_CFG_MAX_TLENGTH' , getConfig('max_tlength'));
if (getConfig('test_text') != "Y") {
- define('_CFG_TEST_TEXT_N', " checked=\"checked\"");
- define('_CFG_TEST_TEXT_Y', "");
+ define('_CFG_TEST_TEXT_N', ' chkecked="checked"');
+ define('_CFG_TEST_TEXT_Y', '');
} else {
- define('_CFG_TEST_TEXT_N', "");
- define('_CFG_TEST_TEXT_Y', " checked=\"checked\"");
+ define('_CFG_TEST_TEXT_N', '');
+ define('_CFG_TEST_TEXT_Y', ' chkecked="checked"');
}
switch (getConfig('repay_deleted_mails')) {
case "REPAY":
define('_CFG_REPAY_POINTS_REPAY' , " selected=\"selected\"");
- define('_CFG_REPAY_POINTS_JACKPOT', "");
- define('_CFG_REPAY_POINTS_SHRED' , "");
+ define('_CFG_REPAY_POINTS_JACKPOT', '');
+ define('_CFG_REPAY_POINTS_SHRED' , '');
break;
case "JACKPOT":
- define('_CFG_REPAY_POINTS_REPAY' , "");
+ define('_CFG_REPAY_POINTS_REPAY' , '');
define('_CFG_REPAY_POINTS_JACKPOT', " selected=\"selected\"");
- define('_CFG_REPAY_POINTS_SHRED' , "");
+ define('_CFG_REPAY_POINTS_SHRED' , '');
break;
case "SHRED":
- define('_CFG_REPAY_POINTS_REPAY' , "");
- define('_CFG_REPAY_POINTS_JACKPOT', "");
+ define('_CFG_REPAY_POINTS_REPAY' , '');
+ define('_CFG_REPAY_POINTS_JACKPOT', '');
define('_CFG_REPAY_POINTS_SHRED' , " selected=\"selected\"");
break;
}
if (getConfig('test_subj') != "Y") {
- define('_CFG_TEST_SUBJ_N', " checked=\"checked\"");
- define('_CFG_TEST_SUBJ_Y', "");
+ define('_CFG_TEST_SUBJ_N', ' chkecked="checked"');
+ define('_CFG_TEST_SUBJ_Y', '');
} else {
- define('_CFG_TEST_SUBJ_N', "");
- define('_CFG_TEST_SUBJ_Y', " checked=\"checked\"");
+ define('_CFG_TEST_SUBJ_N', '');
+ define('_CFG_TEST_SUBJ_Y', ' chkecked="checked"');
}
if (getConfig('url_blacklist') != "Y") {
- define('_CFG_URL_BLIST_N', " checked=\"checked\"");
- define('_CFG_URL_BLIST_Y', "");
+ define('_CFG_URL_BLIST_N', ' chkecked="checked"');
+ define('_CFG_URL_BLIST_Y', '');
} else {
- define('_CFG_URL_BLIST_N', "");
- define('_CFG_URL_BLIST_Y', " checked=\"checked\"");
+ define('_CFG_URL_BLIST_N', '');
+ define('_CFG_URL_BLIST_Y', ' chkecked="checked"');
}
// Selection list
if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif (!EXT_IS_ACTIVE("other")) {
+} elseif (!EXT_IS_ACTIVE('other')) {
// Missing extension!
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "other");
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'other');
return;
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Stop saving data if one input field is !isset
if (IS_FORM_SENT()) {
// Calculate stamps and set calculated stamps
- REQUEST_POST('online_timeout') = CREATE_TIMESTAMP_FROM_SELECTIONS("ip_timeout" , REQUEST_POST_ARRAY());
- REQUEST_POST('url_tlock') = CREATE_TIMESTAMP_FROM_SELECTIONS("url_tlock" , REQUEST_POST_ARRAY());
- REQUEST_POST('profile_lock') = CREATE_TIMESTAMP_FROM_SELECTIONS("profile_lock" , REQUEST_POST_ARRAY());
- REQUEST_POST('profile_update') = CREATE_TIMESTAMP_FROM_SELECTIONS("profile_update" , REQUEST_POST_ARRAY());
- REQUEST_SET_POST('resend_profile_update', CREATE_TIMESTAMP_FROM_SELECTIONS("resend_profile_update", REQUEST_POST_ARRAY()));
+ REQUEST_POST('online_timeout') = CREATE_TIMESTAMP_FROM_SELECTIONS('ip_timeout' , REQUEST_POST_ARRAY());
+ REQUEST_POST('url_tlock') = CREATE_TIMESTAMP_FROM_SELECTIONS('url_tlock' , REQUEST_POST_ARRAY());
+ REQUEST_POST('profile_lock') = CREATE_TIMESTAMP_FROM_SELECTIONS('profile_lock' , REQUEST_POST_ARRAY());
+ REQUEST_POST('profile_update') = CREATE_TIMESTAMP_FROM_SELECTIONS('profile_update' , REQUEST_POST_ARRAY());
+ REQUEST_SET_POST('resend_profile_update', CREATE_TIMESTAMP_FROM_SELECTIONS('resend_profile_update', REQUEST_POST_ARRAY()));
// Online-Timeout shall be > 0 or your database will crow and crow and crow...
if (!REQUEST_ISSET_POST(('online_timeout'))) { REQUEST_UNSET_POST('ok'); }
define('_CFG_MIN_AGE' , getConfig('min_age'));
// Time selection boxes
- define('_CFG_ONLINE_TIMEOUT', CREATE_TIME_SELECTIONS(getConfig('online_timeout'), "ip_timeout" , "ms"));
- define('_CFG_URL_TLOCK' , CREATE_TIME_SELECTIONS(getConfig('url_tlock') , "url_tlock" , "WDh"));
- define('_CFG_PROFILE_LOCK' , CREATE_TIME_SELECTIONS(getConfig('profile_lock') , "profile_lock" , "WDh"));
- define('_CFG_PROFILE_UPDATE', CREATE_TIME_SELECTIONS(getConfig('profile_update'), "profile_update" , "YM"));
- define('_CFG_PROF_REUPDATE' , CREATE_TIME_SELECTIONS(getConfig('resend_profile_update') , "resend_profile_update", "MWD"));
-
- if (getConfig('order_multi_page') != "Y") {
- define('_CFG_ORDER_MULTI_N', " checked=\"checked\"");
- define('_CFG_ORDER_MULTI_Y', "");
+ define('_CFG_ONLINE_TIMEOUT', CREATE_TIME_SELECTIONS(getConfig('online_timeout'), 'ip_timeout' , 'ms'));
+ define('_CFG_URL_TLOCK' , CREATE_TIME_SELECTIONS(getConfig('url_tlock') , 'url_tlock' , 'WDh'));
+ define('_CFG_PROFILE_LOCK' , CREATE_TIME_SELECTIONS(getConfig('profile_lock') , 'profile_lock' , 'WDh'));
+ define('_CFG_PROFILE_UPDATE', CREATE_TIME_SELECTIONS(getConfig('profile_update'), 'profile_update' , 'YM'));
+ define('_CFG_PROF_REUPDATE' , CREATE_TIME_SELECTIONS(getConfig('resend_profile_update') , 'resend_profile_update', 'MWD'));
+
+ if (getConfig('order_multi_page') != 'Y') {
+ define('_CFG_ORDER_MULTI_N', ' chkecked="checked"');
+ define('_CFG_ORDER_MULTI_Y', '');
} else {
- define('_CFG_ORDER_MULTI_N', "");
- define('_CFG_ORDER_MULTI_Y', " checked=\"checked\"");
+ define('_CFG_ORDER_MULTI_N', '');
+ define('_CFG_ORDER_MULTI_Y', ' chkecked="checked"');
}
if (getConfig('autosend_active') != "Y") {
- define('_CFG_AUTOSEND_ACTIVE_N', " checked=\"checked\"");
- define('_CFG_AUTOSEND_ACTIVE_Y', "");
+ define('_CFG_AUTOSEND_ACTIVE_N', ' chkecked="checked"');
+ define('_CFG_AUTOSEND_ACTIVE_Y', '');
} else {
- define('_CFG_AUTOSEND_ACTIVE_N', "");
- define('_CFG_AUTOSEND_ACTIVE_Y', " checked=\"checked\"");
+ define('_CFG_AUTOSEND_ACTIVE_N', '');
+ define('_CFG_AUTOSEND_ACTIVE_Y', ' chkecked="checked"');
}
if (getConfig('send_prof_update') != "Y") {
- define('_CFG_SEND_UPDATE_N', " checked=\"checked\"");
- define('_CFG_SEND_UPDATE_Y', "");
+ define('_CFG_SEND_UPDATE_N', ' chkecked="checked"');
+ define('_CFG_SEND_UPDATE_Y', '');
} else {
- define('_CFG_SEND_UPDATE_N', "");
- define('_CFG_SEND_UPDATE_Y', " checked=\"checked\"");
+ define('_CFG_SEND_UPDATE_N', '');
+ define('_CFG_SEND_UPDATE_Y', ' chkecked="checked"');
}
if (getConfig('admin_notify') != "Y") {
- define('_CFG_ADMIN_NOTIFY_N', " checked=\"checked\"");
- define('_CFG_ADMIN_NOTIFY_Y', "");
+ define('_CFG_ADMIN_NOTIFY_N', ' chkecked="checked"');
+ define('_CFG_ADMIN_NOTIFY_Y', '');
} else {
- define('_CFG_ADMIN_NOTIFY_N', "");
- define('_CFG_ADMIN_NOTIFY_Y', " checked=\"checked\"");
+ define('_CFG_ADMIN_NOTIFY_N', '');
+ define('_CFG_ADMIN_NOTIFY_Y', ' chkecked="checked"');
}
if (getConfig('css_php') == "DIRECT") {
- define('_CFG_CSS_PHP_DIRECT', " checked=\"checked\"");
- define('_CFG_CSS_PHP_FILE', "");
+ define('_CFG_CSS_PHP_DIRECT', ' chkecked="checked"');
+ define('_CFG_CSS_PHP_FILE', '');
} else {
- define('_CFG_CSS_PHP_DIRECT', "");
- define('_CFG_CSS_PHP_FILE', " checked=\"checked\"");
+ define('_CFG_CSS_PHP_DIRECT', '');
+ define('_CFG_CSS_PHP_FILE', ' chkecked="checked"');
}
- if (getConfig('guest_menu') == "Y") {
- define('_CFG_GUEST_MENU_ACTIVE', " checked=\"checked\"");
- define('_CFG_GUEST_MENU_INACTIVE', "");
+ if (getConfig('guest_menu') == 'Y') {
+ define('_CFG_GUEST_MENU_ACTIVE', ' chkecked="checked"');
+ define('_CFG_GUEST_MENU_INACTIVE', '');
} else {
- define('_CFG_GUEST_MENU_ACTIVE', "");
- define('_CFG_GUEST_MENU_INACTIVE', " checked=\"checked\"");
+ define('_CFG_GUEST_MENU_ACTIVE', '');
+ define('_CFG_GUEST_MENU_INACTIVE', ' chkecked="checked"');
}
- if (getConfig('member_menu') == "Y") {
- define('_CFG_MEMBER_MENU_ACTIVE', " checked=\"checked\"");
- define('_CFG_MEMBER_MENU_INACTIVE', "");
+ if (getConfig('member_menu') == 'Y') {
+ define('_CFG_MEMBER_MENU_ACTIVE', ' chkecked="checked"');
+ define('_CFG_MEMBER_MENU_INACTIVE', '');
} else {
- define('_CFG_MEMBER_MENU_ACTIVE', "");
- define('_CFG_MEMBER_MENU_INACTIVE', " checked=\"checked\"");
+ define('_CFG_MEMBER_MENU_ACTIVE', '');
+ define('_CFG_MEMBER_MENU_INACTIVE', ' chkecked="checked"');
}
- if (getConfig('youre_here') == "Y") {
- define('_CFG_YOURE_HERE_ACTIVE', " checked=\"checked\"");
- define('_CFG_YOURE_HERE_INACTIVE', "");
+ if (getConfig('youre_here') == 'Y') {
+ define('_CFG_YOURE_HERE_ACTIVE', ' chkecked="checked"');
+ define('_CFG_YOURE_HERE_INACTIVE', '');
} else {
- define('_CFG_YOURE_HERE_ACTIVE', "");
- define('_CFG_YOURE_HERE_INACTIVE', " checked=\"checked\"");
+ define('_CFG_YOURE_HERE_ACTIVE', '');
+ define('_CFG_YOURE_HERE_INACTIVE', ' chkecked="checked"');
}
- if (getConfig('show_timings') == "Y") {
- define('_CFG_SHOW_TIMINGS_Y', " checked=\"checked\"");
- define('_CFG_SHOW_TIMINGS_N', "");
+ if (getConfig('show_timings') == 'Y') {
+ define('_CFG_SHOW_TIMINGS_Y', ' chkecked="checked"');
+ define('_CFG_SHOW_TIMINGS_N', '');
} else {
- define('_CFG_SHOW_TIMINGS_Y', "");
- define('_CFG_SHOW_TIMINGS_N', " checked=\"checked\"");
+ define('_CFG_SHOW_TIMINGS_Y', '');
+ define('_CFG_SHOW_TIMINGS_N', ' chkecked="checked"');
}
- if (getConfig('show_points_unconfirmed') == "Y") {
- define('_CFG_SHOW_POINTS_UNCONFIRMED_Y', " checked=\"checked\"");
- define('_CFG_SHOW_POINTS_UNCONFIRMED_N', "");
+ if (getConfig('show_points_unconfirmed') == 'Y') {
+ define('_CFG_SHOW_POINTS_UNCONFIRMED_Y', ' chkecked="checked"');
+ define('_CFG_SHOW_POINTS_UNCONFIRMED_N', '');
} else {
- define('_CFG_SHOW_POINTS_UNCONFIRMED_Y', "");
- define('_CFG_SHOW_POINTS_UNCONFIRMED_N', " checked=\"checked\"");
+ define('_CFG_SHOW_POINTS_UNCONFIRMED_Y', '');
+ define('_CFG_SHOW_POINTS_UNCONFIRMED_N', ' chkecked="checked"');
}
if (getConfig('mailid_error_redirect') == 'INDEX') {
- define('_CFG_MAILID_REDIRECT_INDEX', " checked=\"checked\"");
- define('_CFG_MAILID_REDIRECT_REJECT', "");
+ define('_CFG_MAILID_REDIRECT_INDEX', ' chkecked="checked"');
+ define('_CFG_MAILID_REDIRECT_REJECT', '');
} else {
- define('_CFG_MAILID_REDIRECT_INDEX', "");
- define('_CFG_MAILID_REDIRECT_REJECT', " checked=\"checked\"");
+ define('_CFG_MAILID_REDIRECT_INDEX', '');
+ define('_CFG_MAILID_REDIRECT_REJECT', ' chkecked="checked"');
}
for ($i = 0; $i <= 5; $i++) {
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (REQUEST_ISSET_POST(('rate'))) REQUEST_SET_POST('rate', REVERT_COMMA(REQUEST_POST('rate')));
$msg = getMessage('ADMIN_PAYOUT_ENTRIES_CHANGED');
} else {
$display = false; //Suppress any other outputs
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
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",
$msg = getMessage('ADMIN_PAYOUT_ENTRIES_DELETED');
} else {
$display = false; //Suppress any other outputs
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
foreach (REQUEST_POST('sel') as $id => $sel) {
// Secure ID number
$id = bigintval($id);
if (!empty($msg)) {
// Output message
- LOAD_TEMPLATE("admin_settings_saved", false, $msg);
+ LOAD_TEMPLATE('admin_settings_saved', false, $msg);
}
// Payout types
if ((SQL_NUMROWS($result_type) > 0) && ($display)) {
// List all payout types
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result_type)) {
// Prepare data for the row template
$content = array(
// Does your members request payouts?
if ((SQL_NUMROWS($result_mem) > 0) && ($display)) {
// Members has requested payouts
- LOAD_TEMPLATE("admin_settings_saved", false, "<a href=\"{!URL!}/modules.php?module=admin&what=list_payouts\">{--ADMIN_PAYOUT_LIST_REQUESTS--}</a></P>");
+ LOAD_TEMPLATE('admin_settings_saved', false, "<a href=\"{!URL!}/modules.php?module=admin&what=list_payouts\">{--ADMIN_PAYOUT_LIST_REQUESTS--}</a></P>");
} elseif ($display) {
// No member requests so far
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_PAYOUT_NO_MEMBER_REQUESTS'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_PAYOUT_NO_MEMBER_REQUESTS'));
}
// Free result
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Init variables
-$message = "";
+$message = '';
// Is the 'sub' parameter set?
-if (REQUEST_ISSET_GET(('sub'))) {
+if (REQUEST_ISSET_GET('sub')) {
// Yes, then do some sanity-checks
switch (REQUEST_GET('sub'))
{
case "ref":
if (REQUEST_ISSET_GET('do')) {
- if (((!REQUEST_ISSET_POST(('lvl'))) || (!REQUEST_ISSET_POST(('perc')))) && (REQUEST_GET('do') == "add")) {
+ if (((!REQUEST_ISSET_POST(('lvl'))) || (!REQUEST_ISSET_POST(('perc')))) && (REQUEST_GET('do') == 'add')) {
REQUEST_UNSET_POST('ok');
}
}
case "ref":
switch (REQUEST_GET('do'))
{
- case "add":
+ case 'add':
ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_refdepths` (level, percents) VALUES ('".REQUEST_POST('lvl')."','".REQUEST_POST('perc')."')");
break;
}
// Update cache file
- if (GET_EXT_VERSION("cache") >= "0.1.2") {
+ if (GET_EXT_VERSION('cache') >= '0.1.2') {
if ($GLOBALS['cache_instance']->loadCacheFile("refdepths")) $GLOBALS['cache_instance']->destroyCacheFile();
}
break;
// Shall we display a message?
if (!empty($message)) {
// When do so...
- LOAD_TEMPLATE("admin_settings_saved", false, $message);
+ LOAD_TEMPLATE('admin_settings_saved', false, $message);
}
} elseif (REQUEST_GET('sub') == "settings") {
// 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', "");
+ case 'Y':
+ define('__DIRECT_Y', ' chkecked="checked"');
+ define('__DIRECT_N', '');
break;
- case "N":
- define('__DIRECT_Y', "");
- define('__DIRECT_N', " checked=\"checked\"");
+ case 'N':
+ define('__DIRECT_Y', '');
+ define('__DIRECT_N', ' chkecked="checked"');
break;
}
// One-time referal bonus add-mode
switch (getConfig('reg_points_mode')) {
- case "ref" : define('__MODE_REF', " checked=\"checked\""); define('__MODE_DIRECT', ""); break;
- case "direct": define('__MODE_REF', ""); define('__MODE_DIRECT', " checked=\"checked\""); break;
+ case "ref" : define('__MODE_REF', ' chkecked="checked"'); define('__MODE_DIRECT', ''); break;
+ case "direct": define('__MODE_REF', ''); define('__MODE_DIRECT', ' chkecked="checked"'); break;
}
// Referal payout value
// 12 3 32 2 3 32 2 3 4 43 21
if ((REQUEST_ISSET_POST('del')) && (REQUEST_ISSET_POST('sel')) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
// Delete entries
- $OUT = ""; $SW = 2;
+ $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__);
LOAD_TEMPLATE("admin_points_del");
} elseif ((REQUEST_ISSET_POST('edit')) && (REQUEST_ISSET_POST('sel')) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
// Edit entries
- $OUT = ""; $SW = 2;
+ $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__);
$result = SQL_QUERY("SELECT id, level, percents FROM `{!_MYSQL_PREFIX!}_refdepths` ORDER BY level", __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Make referal levels editable and deletable
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
// List already existing categories for editing
while ($content = SQL_FETCHARRAY($result)) {
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
// First merge temporarily the new API data into the current config
ADMIN_SAVE_SETTINGS_POST();
} else {
// Failed to test the API!
- LOAD_TEMPLATE("admin_settings_saved", false, GET_PRIMERA_ERROR_MESSAGE());
+ LOAD_TEMPLATE('admin_settings_saved', false, GET_PRIMERA_ERROR_MESSAGE());
}
} else {
// Prepare data for template output
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
// Test proxy settings
ADMIN_SAVE_SETTINGS_POST();
} else {
// Invalid!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_PROXY_SETTINGS_INVALID'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_PROXY_SETTINGS_INVALID'));
}
} else {
// Prepare content
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (REQUEST_ISSET_GET(('rallye'))) {
// Price submitted?
REQUEST_POST('points'),
REQUEST_POST('info')
), __FILE__, __LINE__);
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('RALLYE_PRICE_LEVEL_SAVED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('RALLYE_PRICE_LEVEL_SAVED'));
} else {
// Free memory
SQL_FREERESULT($result);
// Price level found!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('RALLYE_PRICE_ALREADY_FOUND'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('RALLYE_PRICE_ALREADY_FOUND'));
}
}
} elseif (REQUEST_ISSET_POST('remove')) {
}
// Output message
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('RALLYE_ENTRIES_DELETED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('RALLYE_ENTRIES_DELETED'));
} else {
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('RALLYE_ENTRIES_NOT_DELETED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('RALLYE_ENTRIES_NOT_DELETED'));
}
} elseif (REQUEST_ISSET_POST('change')) {
// Change entries
}
// Output message
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('RALLYE_ENTRIES_CHANGED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('RALLYE_ENTRIES_CHANGED'));
}
if (REQUEST_ISSET_POST('edit')) {
$SEL = SELECTION_COUNT(REQUEST_POST('sel'));
if ($SEL > 0) {
// Make selected editable
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
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",
} else {
// Nothing selected
$content = sprintf(getMessage('RALLYE_NO_PRICES_SELECTED'), "<a href=\"{!URL!}/modules.php?module=admin&what=config_rallye_prices&rallye=".REQUEST_GET('rallye')."\">", "</a>");
- LOAD_TEMPLATE("admin_settings_saved", false, $content);
+ LOAD_TEMPLATE('admin_settings_saved', false, $content);
}
} elseif (REQUEST_ISSET_POST('del')) {
// Check if at last one line is selected
$SEL = SELECTION_COUNT(REQUEST_POST('sel'));
if ($SEL > 0) {
// List all prices
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
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",
} else {
// Nothing selected
$content = RALLYE_NO_PRICES_SELECTED_1."<a href=\"{!URL!}/modules.php?module=admin&what=config_rallye_prices&rallye=".REQUEST_GET('rallye')."\">".RALLYE_NO_PRICES_SELECTED_2."</a>".RALLYE_NO_PRICES_SELECTED_3;
- LOAD_TEMPLATE("admin_settings_saved", false, $content);
+ LOAD_TEMPLATE('admin_settings_saved', false, $content);
}
} else {
// a rallye was selected, so check if there are already prices assigned...
if (SQL_NUMROWS($result) > 0) {
// Load all prices for the selected rallye
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
// Fix empty info
if (empty($content['info'])) $content['info'] = "---";
WHERE d.admin_id=a.id ORDER BY start_time DESC", __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// List found rallyes
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
$select = "<input type=\"checkbox\" name=\"sel[".$content['id']."]\" class=\"admin_normal\" value=\"1\">";
- if ($content['is_active'] == "Y") $select = "<div class=\"big\">".$content['id']."</div>";
+ if ($content['is_active'] == 'Y') $select = "<div class=\"big\">".$content['id']."</div>";
// Prepare data for the row template
// @TODO Rewritings: aid->admin_id, alogin->login in template
LOAD_TEMPLATE("admin_list_rallye_prices");
} else {
// No rallyes setup so far
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('RALLYE_NO_RALLYES_SETUP'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('RALLYE_NO_RALLYES_SETUP'));
}
}
//
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
// Save configuration
// Add more content
switch (getConfig('refback_enabled')) {
- case "Y": // Refback enabled
- $content['refback_enabled_y'] = " checked=\"checked\"";
- $content['refback_enabled_n'] = "";
+ case 'Y': // Refback enabled
+ $content['refback_enabled_y'] = ' chkecked="checked"';
+ $content['refback_enabled_n'] = '';
break;
- case "N": // Refback disabled
- $content['refback_enabled_y'] = "";
- $content['refback_enabled_n'] = " checked=\"checked\"";
+ case 'N': // Refback disabled
+ $content['refback_enabled_y'] = '';
+ $content['refback_enabled_n'] = ' chkecked="checked"';
break;
}
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
// Save data
define('__MEMBER_SELECTION', ADD_MEMBER_SELECTION_BOX(getConfig('def_refid'), false, true, true, "def_refid"));
switch (getConfig('refid_target')) {
- case "index":
+ case 'index':
define('__DEF_RT_INDEX' , " selected=\"selected\"");
- define('__DEF_RT_REGISTER', "");
+ define('__DEF_RT_REGISTER', '');
break;
- case "register":
- define('__DEF_RT_INDEX' , "");
+ case 'register':
+ define('__DEF_RT_INDEX' , '');
define('__DEF_RT_REGISTER', " selected=\"selected\"");
break;
} // END - switch
switch (getConfig('select_user_zero_refid')) {
- case "Y":
+ case 'Y':
define('__RAND_REFID_Y', " selected=\"selected\"");
- define('__RAND_REFID_N', "");
+ define('__RAND_REFID_N', '');
break;
- case "N":
- define('__RAND_REFID_Y', "");
+ case 'N':
+ define('__RAND_REFID_Y', '');
define('__RAND_REFID_N', " selected=\"selected\"");
break;
default: // Invalid config!
DEBUG_LOG(__FILE__, __LINE__, sprintf("Invalid select_user_zero_refid %s detected.", getConfig('select_user_zero_refid')));
- define('__RAND_REFID_Y', "");
- define('__RAND_REFID_N', "");
+ define('__RAND_REFID_Y', '');
+ define('__RAND_REFID_N', '');
break;
} // END - switch
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Do we want to save changes?
if (IS_FORM_SENT()) {
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__);
}
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('REGISTER_ADMIN_CHANGES_SAVED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('REGISTER_ADMIN_CHANGES_SAVED'));
}
// List all register values
$result = SQL_QUERY("SELECT id, field_name, field_required FROM `{!_MYSQL_PREFIX!}_must_register` ORDER BY `id`", __FILE__, __LINE__);
-$OUT = ""; $SW = 2;
+$OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
// Get language string
$content['field_name'] = getMessage(strtoupper($content['field_name']));
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
// Calculate timestamp from selections...
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
// Save configuration
} else {
// Prepare data
switch (getConfig('removeip_anon_ip')) {
- case "Y":
- define('__CFG_REMOVEIP_ANON_IP_Y', " checked=\"checked\"");
- define('__CFG_REMOVEIP_ANON_IP_N', "");
+ case 'Y':
+ define('__CFG_REMOVEIP_ANON_IP_Y', ' chkecked="checked"');
+ define('__CFG_REMOVEIP_ANON_IP_N', '');
break;
- case "N":
- define('__CFG_REMOVEIP_ANON_IP_Y', "");
- define('__CFG_REMOVEIP_ANON_IP_N', " checked=\"checked\"");
+ case 'N':
+ define('__CFG_REMOVEIP_ANON_IP_Y', '');
+ define('__CFG_REMOVEIP_ANON_IP_N', ' chkecked="checked"');
break;
} // END - switch
switch (getConfig('removeip_anon_host')) {
- case "Y":
- define('__CFG_REMOVEIP_ANON_HOST_Y', " checked=\"checked\"");
- define('__CFG_REMOVEIP_ANON_HOST_N', "");
+ case 'Y':
+ define('__CFG_REMOVEIP_ANON_HOST_Y', ' chkecked="checked"');
+ define('__CFG_REMOVEIP_ANON_HOST_N', '');
break;
- case "N":
- define('__CFG_REMOVEIP_ANON_HOST_Y', "");
- define('__CFG_REMOVEIP_ANON_HOST_N', " checked=\"checked\"");
+ case 'N':
+ define('__CFG_REMOVEIP_ANON_HOST_Y', '');
+ define('__CFG_REMOVEIP_ANON_HOST_N', ' chkecked="checked"');
break;
} // END - switch
switch (getConfig('removeip_anon_ua')) {
- case "Y":
- define('__CFG_REMOVEIP_ANON_UA_Y', " checked=\"checked\"");
- define('__CFG_REMOVEIP_ANON_UA_N', "");
+ case 'Y':
+ define('__CFG_REMOVEIP_ANON_UA_Y', ' chkecked="checked"');
+ define('__CFG_REMOVEIP_ANON_UA_N', '');
break;
- case "N":
- define('__CFG_REMOVEIP_ANON_UA_Y', "");
- define('__CFG_REMOVEIP_ANON_UA_N', " checked=\"checked\"");
+ case 'N':
+ define('__CFG_REMOVEIP_ANON_UA_Y', '');
+ define('__CFG_REMOVEIP_ANON_UA_N', ' chkecked="checked"');
break;
} // END - switch
switch (getConfig('removeip_anon_ref')) {
- case "Y":
- define('__CFG_REMOVEIP_ANON_REF_Y', " checked=\"checked\"");
- define('__CFG_REMOVEIP_ANON_REF_N', "");
+ case 'Y':
+ define('__CFG_REMOVEIP_ANON_REF_Y', ' chkecked="checked"');
+ define('__CFG_REMOVEIP_ANON_REF_N', '');
break;
- case "N":
- define('__CFG_REMOVEIP_ANON_REF_Y', "");
- define('__CFG_REMOVEIP_ANON_REF_N', " checked=\"checked\"");
+ case 'N':
+ define('__CFG_REMOVEIP_ANON_REF_Y', '');
+ define('__CFG_REMOVEIP_ANON_REF_N', ' chkecked="checked"');
break;
} // END - switch
switch (getConfig('removeip_admin_show')) {
- case "Y":
- define('__CFG_REMOVEIP_ADMIN_SHOW_Y', " checked=\"checked\"");
- define('__CFG_REMOVEIP_ADMIN_SHOW_N', "");
+ case 'Y':
+ define('__CFG_REMOVEIP_ADMIN_SHOW_Y', ' chkecked="checked"');
+ define('__CFG_REMOVEIP_ADMIN_SHOW_N', '');
break;
- case "N":
- define('__CFG_REMOVEIP_ADMIN_SHOW_Y', "");
- define('__CFG_REMOVEIP_ADMIN_SHOW_N', " checked=\"checked\"");
+ case 'N':
+ define('__CFG_REMOVEIP_ADMIN_SHOW_Y', '');
+ define('__CFG_REMOVEIP_ADMIN_SHOW_N', ' chkecked="checked"');
break;
} // END - switch
switch (getConfig('removeip_guest_show')) {
- case "Y":
- define('__CFG_REMOVEIP_GUEST_SHOW_Y', " checked=\"checked\"");
- define('__CFG_REMOVEIP_GUEST_SHOW_N', "");
+ case 'Y':
+ define('__CFG_REMOVEIP_GUEST_SHOW_Y', ' chkecked="checked"');
+ define('__CFG_REMOVEIP_GUEST_SHOW_N', '');
break;
- case "N":
- define('__CFG_REMOVEIP_GUEST_SHOW_Y', "");
- define('__CFG_REMOVEIP_GUEST_SHOW_N', " checked=\"checked\"");
+ case 'N':
+ define('__CFG_REMOVEIP_GUEST_SHOW_Y', '');
+ define('__CFG_REMOVEIP_GUEST_SHOW_N', ' chkecked="checked"');
break;
} // END - switch
switch (getConfig('removeip_member_show')) {
- case "Y":
- define('__CFG_REMOVEIP_MEMBER_SHOW_Y', " checked=\"checked\"");
- define('__CFG_REMOVEIP_MEMBER_SHOW_N', "");
+ case 'Y':
+ define('__CFG_REMOVEIP_MEMBER_SHOW_Y', ' chkecked="checked"');
+ define('__CFG_REMOVEIP_MEMBER_SHOW_N', '');
break;
- case "N":
- define('__CFG_REMOVEIP_MEMBER_SHOW_Y', "");
- define('__CFG_REMOVEIP_MEMBER_SHOW_N', " checked=\"checked\"");
+ case 'N':
+ define('__CFG_REMOVEIP_MEMBER_SHOW_Y', '');
+ define('__CFG_REMOVEIP_MEMBER_SHOW_N', ' chkecked="checked"');
break;
} // END - switch
switch (getConfig('removeip_sponsor_show')) {
- case "Y":
- define('__CFG_REMOVEIP_SPONSOR_SHOW_Y', " checked=\"checked\"");
- define('__CFG_REMOVEIP_SPONSOR_SHOW_N', "");
+ case 'Y':
+ define('__CFG_REMOVEIP_SPONSOR_SHOW_Y', ' chkecked="checked"');
+ define('__CFG_REMOVEIP_SPONSOR_SHOW_N', '');
break;
- case "N":
- define('__CFG_REMOVEIP_SPONSOR_SHOW_Y', "");
- define('__CFG_REMOVEIP_SPONSOR_SHOW_N', " checked=\"checked\"");
+ case 'N':
+ define('__CFG_REMOVEIP_SPONSOR_SHOW_Y', '');
+ define('__CFG_REMOVEIP_SPONSOR_SHOW_N', ' chkecked="checked"');
break;
} // END - switch
switch (getConfig('anonymous_ip')) {
case "127.0.0.1":
define('__CFG_ANONYMOUS_IP_LOCAL' , " selected=\"selected\"");
- define('__CFG_ANONYMOUS_IP_ZERO' , "");
- define('__CFG_ANONYMOUS_IP_RANDOM', "");
+ define('__CFG_ANONYMOUS_IP_ZERO' , '');
+ define('__CFG_ANONYMOUS_IP_RANDOM', '');
break;
case "0.0.0.0":
- define('__CFG_ANONYMOUS_IP_LOCAL' , "");
+ define('__CFG_ANONYMOUS_IP_LOCAL' , '');
define('__CFG_ANONYMOUS_IP_ZERO' , " selected=\"selected\"");
- define('__CFG_ANONYMOUS_IP_RANDOM', "");
+ define('__CFG_ANONYMOUS_IP_RANDOM', '');
break;
case "RANDOM":
- define('__CFG_ANONYMOUS_IP_LOCAL' , "");
- define('__CFG_ANONYMOUS_IP_ZERO' , "");
+ define('__CFG_ANONYMOUS_IP_LOCAL' , '');
+ define('__CFG_ANONYMOUS_IP_ZERO' , '');
define('__CFG_ANONYMOUS_IP_RANDOM', " selected=\"selected\"");
break;
} // END - switch
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
// Generate string
$MODs = array();
foreach (REQUEST_POST('mod') as $mod => $sel) {
// Now you can never deselect the admin module, bah!!! ;-)
- if (($sel == "Y") || ($mod == "admin")) {
+ if (($sel == 'Y') || ($mod == 'admin')) {
// Add module to queue
$MODs[] = $mod;
}
} else {
// Load existing modules and generate TR rows for the template
$result = SQL_QUERY("SELECT module, title FROM `{!_MYSQL_PREFIX!}_mod_reg` ORDER BY module", __FILE__, __LINE__);
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
// Set title to three dashes when no title is supplied
if (empty($content['title'])) $content['title'] = "---";
// Already registered module?
if (ereg($content['module'], getConfig('rewrite_skip'))) {
// Found
- $y = " checked=\"checked\"";
- $n = "";
+ $y = ' chkecked="checked"';
+ $n = '';
} else {
// Not found
- $y = "";
- $n = " checked=\"checked\"";
+ $y = '';
+ $n = ' chkecked="checked"';
}
// Remember data in array for the dynamic row template
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
// If salt length is empty or null then we shall generate new passwords
if (!REQUEST_ISSET_POST(('salt_length')) || (REQUEST_POST('salt_length') == "0")) {
// Generate new passwords for all!
- LOAD_INC("inc/gen_sql_patches.php");
+ LOAD_INC('inc/gen_sql_patches.php');
// Forget the wrong number!
REQUEST_UNSET_POST(('salt_length'));
// Redirect to logout link
- LOAD_URL("modules.php?module=admin&logout=1");
+ LOAD_URL('modules.php?module=admin&logout=1');
} // END - if
// Save settings
define('__SALT_LENGTH', getConfig('salt_length'));
// Load template
- LOAD_TEMPLATE("admin_config_secure");
+ LOAD_TEMPLATE('admin_config_secure');
}
//
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
// Test Path
ADMIN_SAVE_SETTINGS_POST();
} else {
// Invalid!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_SESSION_SAVE_PATH_INVALID'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SESSION_SAVE_PATH_INVALID'));
}
} else {
// Prepare content
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
// Allow only direct points (non-floating)
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Was the form submitted?
if (IS_FORM_SENT()) {
{
case "MEMBERS":
define('__MEMBERS_RADIO', " selected=\"selected\"");
- define('__MODULES_RADIO', "");
- define('__INACTIVE_RADIO', "");
+ define('__MODULES_RADIO', '');
+ define('__INACTIVE_RADIO', '');
break;
case "MODULES":
- define('__MEMBERS_RADIO', "");
+ define('__MEMBERS_RADIO', '');
define('__MODULES_RADIO', " selected=\"selected\"");
- define('__INACTIVE_RADIO', "");
+ define('__INACTIVE_RADIO', '');
break;
case "INACTIVE":
- define('__MEMBERS_RADIO', "");
- define('__MODULES_RADIO', "");
+ define('__MEMBERS_RADIO', '');
+ define('__MODULES_RADIO', '');
define('__INACTIVE_RADIO', " selected=\"selected\"");
break;
}
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Was the form submitted?
if (IS_FORM_SENT()) {
// Prepare payment model for template
if (getConfig('surfbar_pay_model') == "STATIC") {
// Static model
- define('__CONFIG_SURFBAR_PAY_MODEL_STATIC' , " checked=\"checked\"");
- define('__CONFIG_SURFBAR_PAY_MODEL_DYNAMIC', "");
+ define('__CONFIG_SURFBAR_PAY_MODEL_STATIC' , ' chkecked="checked"');
+ define('__CONFIG_SURFBAR_PAY_MODEL_DYNAMIC', '');
} else {
// Dynamic model
- define('__CONFIG_SURFBAR_PAY_MODEL_STATIC' , "");
- define('__CONFIG_SURFBAR_PAY_MODEL_DYNAMIC', " checked=\"checked\"");
+ define('__CONFIG_SURFBAR_PAY_MODEL_STATIC' , '');
+ define('__CONFIG_SURFBAR_PAY_MODEL_DYNAMIC', ' chkecked="checked"');
}
// Prepare auto-sart
- if (getConfig('surfbar_autostart') == "Y") {
+ if (getConfig('surfbar_autostart') == 'Y') {
// Yes selected
- define('__CONFIG_SURFBAR_AUTOSTART_Y', " checked=\"checked\"");
- define('__CONFIG_SURFBAR_AUTOSTART_N', "");
+ define('__CONFIG_SURFBAR_AUTOSTART_Y', ' chkecked="checked"');
+ define('__CONFIG_SURFBAR_AUTOSTART_N', '');
} else {
// No selected
- define('__CONFIG_SURFBAR_AUTOSTART_Y', "");
- define('__CONFIG_SURFBAR_AUTOSTART_N', " checked=\"checked\"");
+ define('__CONFIG_SURFBAR_AUTOSTART_Y', '');
+ define('__CONFIG_SURFBAR_AUTOSTART_N', ' chkecked="checked"');
}
// Prepare notify limits
- if (getConfig('surfbar_notify_limits') == "Y") {
+ if (getConfig('surfbar_notify_limits') == 'Y') {
// Yes selected
- define('__CONFIG_SURFBAR_NOTIFY_LIMITS_Y', " checked=\"checked\"");
- define('__CONFIG_SURFBAR_NOTIFY_LIMITS_N', "");
+ define('__CONFIG_SURFBAR_NOTIFY_LIMITS_Y', ' chkecked="checked"');
+ define('__CONFIG_SURFBAR_NOTIFY_LIMITS_N', '');
} else {
// No selected
- define('__CONFIG_SURFBAR_NOTIFY_LIMITS_Y', "");
- define('__CONFIG_SURFBAR_NOTIFY_LIMITS_N', " checked=\"checked\"");
+ define('__CONFIG_SURFBAR_NOTIFY_LIMITS_Y', '');
+ define('__CONFIG_SURFBAR_NOTIFY_LIMITS_N', ' chkecked="checked"');
}
// Prepare notify admin about unlocked emails
- if (getConfig('surfbar_notify_admin_unlock') == "Y") {
+ if (getConfig('surfbar_notify_admin_unlock') == 'Y') {
// Yes selected
- define('__CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK_Y', " checked=\"checked\"");
- define('__CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK_N', "");
+ define('__CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK_Y', ' chkecked="checked"');
+ define('__CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK_N', '');
} else {
// No selected
- define('__CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK_Y', "");
- define('__CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK_N', " checked=\"checked\"");
+ define('__CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK_Y', '');
+ define('__CONFIG_SURFBAR_NOTIFY_ADMIN_UNLOCK_N', ' chkecked="checked"');
}
// Prepare order migration
- if (getConfig('surfbar_migrate_order') == "Y") {
+ if (getConfig('surfbar_migrate_order') == 'Y') {
// Yes selected
- define('__CONFIG_SURFBAR_MIGRATE_ORDER_Y', " checked=\"checked\"");
- define('__CONFIG_SURFBAR_MIGRATE_ORDER_N', "");
+ define('__CONFIG_SURFBAR_MIGRATE_ORDER_Y', ' chkecked="checked"');
+ define('__CONFIG_SURFBAR_MIGRATE_ORDER_N', '');
} else {
// No selected
- define('__CONFIG_SURFBAR_MIGRATE_ORDER_Y', "");
- define('__CONFIG_SURFBAR_MIGRATE_ORDER_N', " checked=\"checked\"");
+ define('__CONFIG_SURFBAR_MIGRATE_ORDER_Y', '');
+ define('__CONFIG_SURFBAR_MIGRATE_ORDER_N', ' chkecked="checked"');
}
// Pause URL mode
if (getConfig('surfbar_pause_mode') == "INTERNAL") {
// Internal pause page
- define('__CONFIG_SURFBAR_PAUSE_MODE_INTERNAL', " checked=\"checked\"");
- define('__CONFIG_SURFBAR_PAUSE_MODE_EXTERNAL', "");
+ define('__CONFIG_SURFBAR_PAUSE_MODE_INTERNAL', ' chkecked="checked"');
+ define('__CONFIG_SURFBAR_PAUSE_MODE_EXTERNAL', '');
} else {
// External pause page (if not empty)
- define('__CONFIG_SURFBAR_PAUSE_MODE_INTERNAL', "");
- define('__CONFIG_SURFBAR_PAUSE_MODE_EXTERNAL', " checked=\"checked\"");
+ define('__CONFIG_SURFBAR_PAUSE_MODE_INTERNAL', '');
+ define('__CONFIG_SURFBAR_PAUSE_MODE_EXTERNAL', ' chkecked="checked"');
}
// Notification mode
if (getConfig('surfbar_notification_mode') == "INSTANT") {
// Instant notification
define('__CONFIG_SURFBAR_NOTIFICATION_MODE_INSTANT', " selected=\"selected\"");
- define('__CONFIG_SURFBAR_NOTIFICATION_MODE_RESET' , "");
+ define('__CONFIG_SURFBAR_NOTIFICATION_MODE_RESET' , '');
} else {
// Only daily reset
- define('__CONFIG_SURFBAR_NOTIFICATION_MODE_INSTANT', "");
+ define('__CONFIG_SURFBAR_NOTIFICATION_MODE_INSTANT', '');
define('__CONFIG_SURFBAR_NOTIFICATION_MODE_RESET' , " selected=\"selected\"");
}
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT())
{
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT())
{
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
// Save settings...
// Autppurge expired transfer entries?
switch (getConfig('ap_transfer')) {
- case "Y":
+ case 'Y':
define('__YES_AP', " selected=\"selected\"");
- define('__NO_AP', "");
+ define('__NO_AP', '');
break;
- case "N":
- define('__YES_AP', "");
+ case 'N':
+ define('__YES_AP', '');
define('__NO_AP', " selected=\"selected\"");
break;
}
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
// Save settings
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
// First merge temporarily the new API data into the current config
ADMIN_SAVE_SETTINGS_POST();
} else {
// Failed to test the API!
- LOAD_TEMPLATE("admin_settings_saved", false, GET_WERNIS_ERROR_MESSAGE());
+ LOAD_TEMPLATE('admin_settings_saved', false, GET_WERNIS_ERROR_MESSAGE());
}
} else {
// Prepare data for template output
);
// Prepare payout Y/N selection
- if (getConfig('wernis_payout_active') == "Y") {
+ if (getConfig('wernis_payout_active') == 'Y') {
// Payout allowed
- define('__CFG_WERNIS_PAYOUT_ACTIVE_Y', " checked=\"checked\"");
- define('__CFG_WERNIS_PAYOUT_ACTIVE_N', "");
+ define('__CFG_WERNIS_PAYOUT_ACTIVE_Y', ' chkecked="checked"');
+ define('__CFG_WERNIS_PAYOUT_ACTIVE_N', '');
} else {
// Payout disabled
- define('__CFG_WERNIS_PAYOUT_ACTIVE_Y', "");
- define('__CFG_WERNIS_PAYOUT_ACTIVE_N', " checked=\"checked\"");
+ define('__CFG_WERNIS_PAYOUT_ACTIVE_Y', '');
+ define('__CFG_WERNIS_PAYOUT_ACTIVE_N', ' chkecked="checked"');
}
// Prepare withdraw Y/N selection
- if (getConfig('wernis_withdraw_active') == "Y") {
+ if (getConfig('wernis_withdraw_active') == 'Y') {
// Payout allowed
- define('__CFG_WERNIS_WITHDRAW_ACTIVE_Y', " checked=\"checked\"");
- define('__CFG_WERNIS_WITHDRAW_ACTIVE_N', "");
+ define('__CFG_WERNIS_WITHDRAW_ACTIVE_Y', ' chkecked="checked"');
+ define('__CFG_WERNIS_WITHDRAW_ACTIVE_N', '');
} else {
// Payout disabled
- define('__CFG_WERNIS_WITHDRAW_ACTIVE_Y', "");
- define('__CFG_WERNIS_WITHDRAW_ACTIVE_N', " checked=\"checked\"");
+ define('__CFG_WERNIS_WITHDRAW_ACTIVE_Y', '');
+ define('__CFG_WERNIS_WITHDRAW_ACTIVE_N', ' chkecked="checked"');
}
// Load template
if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif (!EXT_IS_ACTIVE("yoomedia")) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "yoomedia");
+} elseif (!EXT_IS_ACTIVE('yoomedia')) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'yoomedia');
return;
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Was the form submitted?
if (IS_FORM_SENT()) {
ADMIN_SAVE_SETTINGS_POST();
} else {
// Config not saved
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_CONFIG_YOOMEDIA_TEST_FAILED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_CONFIG_YOOMEDIA_TEST_FAILED'));
}
} else {
// Prepare content
switch (getConfig('yoomedia_erotic_allowed')) {
case 0: // No erotic at all
define('__CFG_YOOMEDIA_EROTIC_NONE' , " selected=\"selected\"");
- define('__CFG_YOOMEDIA_EROTIC_INCLUDE', "");
- define('__CFG_YOOMEDIA_EROTIC_ONLY' , "");
+ define('__CFG_YOOMEDIA_EROTIC_INCLUDE', '');
+ define('__CFG_YOOMEDIA_EROTIC_ONLY' , '');
break;
case 1: // Include erotic
- define('__CFG_YOOMEDIA_EROTIC_NONE' , "");
+ define('__CFG_YOOMEDIA_EROTIC_NONE' , '');
define('__CFG_YOOMEDIA_EROTIC_INCLUDE', " selected=\"selected\"");
- define('__CFG_YOOMEDIA_EROTIC_ONLY' , "");
+ define('__CFG_YOOMEDIA_EROTIC_ONLY' , '');
break;
case 2: // Erotic only
- define('__CFG_YOOMEDIA_EROTIC_NONE' , "");
- define('__CFG_YOOMEDIA_EROTIC_INCLUDE', "");
+ define('__CFG_YOOMEDIA_EROTIC_NONE' , '');
+ define('__CFG_YOOMEDIA_EROTIC_INCLUDE', '');
define('__CFG_YOOMEDIA_EROTIC_ONLY' , " selected=\"selected\"");
break;
}
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Init counter for deleted mails
$cnt = 0;
list($stats_id) = SQL_FETCHROW($result_pool);
// Get all user links
- $links = GET_TOTAL_DATA($stats_id, "user_links", "userid", "stats_id", true);
+ $links = GET_TOTAL_DATA($stats_id, "user_links", 'userid', "stats_id", true);
// Reset sent mails for recipient(s)
REDUCED_RECIPIENT_RECEIVED_MAILS("stats_id", REQUEST_GET('mid'), $links);
// Output message
if (getConfig('repay_deleted_mails') == "REPAY") {
// Repayed
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_POINTS_REPAYED'),
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_POINTS_REPAYED'),
TRANSLATE_COMMA($totalPoints)
));
} else {
// To jackpot
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_POINTS_TO_JACKPOT'),
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_POINTS_TO_JACKPOT'),
TRANSLATE_COMMA($totalPoints)
));
}
} else {
// No points repayed!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_NO_POINTS_REPAYED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NO_POINTS_REPAYED'));
}
} else {
// Points shredded!
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_POINTS_SHREDDED'), $totalPoints));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_POINTS_SHREDDED'), $totalPoints));
}
// Remove links from DB
$cnt += SQL_AFFECTEDROWS();
// Load template for link
- LOAD_TEMPLATE("admin_settings_saved", false, "<a href=\"{!URL!}/modules.php?module=admin&what=del_email&pid=".bigintval(REQUEST_GET('mid'))."\">".ADMIN_REMOVE_STATS_ENTRY."</a>");
+ LOAD_TEMPLATE('admin_settings_saved', false, "<a href=\"{!URL!}/modules.php?module=admin&what=del_email&pid=".bigintval(REQUEST_GET('mid'))."\">".ADMIN_REMOVE_STATS_ENTRY."</a>");
} // END - if
// Free the result
OUTPUT_HTML(sprintf(ADMIN_DELETED_MAILS_COUNT, $cnt));
} else {
// Mail already deleted!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_NORMAL_MAIL_ALREADY_DELETED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NORMAL_MAIL_ALREADY_DELETED'));
}
} elseif (REQUEST_ISSET_GET(('pid'))) {
// Remove stats entries
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_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__);
list ($id, $subject, $url, $timestamp, $sent) = SQL_FETCHROW($result);
// Reset sent mails for recipient(s)
- REDUCED_RECIPIENT_RECEIVED_MAILS("bonus_id", REQUEST_GET('bid'), $sent);
+ REDUCED_RECIPIENT_RECEIVED_MAILS('bonus_id', REQUEST_GET('bid'), $sent);
// Init counter for deleted mails
$cnt = 0;
LOAD_TEMPLATE("admin_del_email_bonus");
} else {
// Mail already deleted!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_BONUS_MAIL_ALREADY_DELETED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_BONUS_MAIL_ALREADY_DELETED'));
}
// Free result
SQL_FREERESULT($result);
-} elseif ((REQUEST_ISSET_GET(('nid'))) && (GET_EXT_VERSION("bonus") >= "0.8.7")) {
+} 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__);
LOAD_TEMPLATE("admin_del_email_notify");
} else {
// Mail already deleted!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_NOTIFY_MAIL_ALREADY_DELETED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NOTIFY_MAIL_ALREADY_DELETED'));
}
} else {
// No mail orders fond
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_WRONG_CALL'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_WRONG_CALL'));
}
//
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Check for selected holidays
$SUM = 0;
$cnt++;
}
}
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('HOLIDAY_ADMIN_MULTI_DEL'), $cnt));
-} elseif (REQUEST_ISSET_GET(('uid'))) {
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('HOLIDAY_ADMIN_MULTI_DEL'), $cnt));
+} elseif (REQUEST_ISSET_GET('uid')) {
// Set default message
$message = getMessage('HOLIDAY_ADMIN_SINGLE_404');
SQL_FREERESULT($result_load);
// Output message
- LOAD_TEMPLATE("admin_settings_saved", false, $message);
+ LOAD_TEMPLATE('admin_settings_saved', false, $message);
} else {
// Please call me over other scripts... ;)
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('HOLIDAY_NO_DIRECT_CALL'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('HOLIDAY_NO_DIRECT_CALL'));
}
//
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (REQUEST_ISSET_GET(('id'))) {
// Check for selected sponsor
array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__);
// Output message
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_SPONSOR_DELETED'), bigintval(REQUEST_GET('id'))));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_DELETED'), bigintval(REQUEST_GET('id'))));
} elseif (REQUEST_ISSET_POST(('no'))) {
// Do not delete him...
LOAD_URL("modules.php?module=admin&what=list_sponsor&id=".bigintval(REQUEST_GET('id')));
}
} else {
// Sponsor not found!
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_SPONSOR_404'), bigintval(REQUEST_GET('id'))));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_404'), bigintval(REQUEST_GET('id'))));
}
} else {
// Not called by what-list_sponsor.php
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_CALL_NOT_DIRECTLY'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_CALL_NOT_DIRECTLY'));
}
//
if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif (!EXT_IS_ACTIVE("task")) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "task");
+} elseif (!EXT_IS_ACTIVE('task')) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'task');
return;
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
//
?>
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (REQUEST_ISSET_POST('del')) {
// Delete entries from tables
$total = 0;
if (SQL_NUMROWS($result) > 0) {
// Output rows
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
// Prepare data for the row template
// @TODO Rewritings: idx->trans_id in template
// Nothing for in and out
$OUT = "<tr>
<td colspan=\"6\" align=\"center\" class=\"bottom2\" height=\"70\">
- ".LOAD_TEMPLATE("admin_settings_saved", true, getMessage('TRANSFER_NO_INOUT_TRANSFERS'))."
+ ".LOAD_TEMPLATE('admin_settings_saved', true, getMessage('TRANSFER_NO_INOUT_TRANSFERS'))."
</td>
</tr>";
}
}
// Display only title when no form was submitted
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// User exists..
if ((IS_FORM_SENT()) || ((REQUEST_ISSET_POST('del')) && (REQUEST_ISSET_POST(('reason'))))) {
DELETE_USER_ACCOUNT(REQUEST_GET('uid'), REQUEST_POST('reason'));
// Output message
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_DEL_COMPLETED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_DEL_COMPLETED'));
} else {
// Account does not exists!
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))."</div>");
+ LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))."</div>");
}
} elseif (REQUEST_ISSET_POST(('no'))) {
// Do not delete him...
LOAD_URL(ADMIN_CREATE_USERID_LINK(REQUEST_GET('uid')));
-} elseif (!REQUEST_ISSET_GET(('uid'))) {
+} elseif (!REQUEST_ISSET_GET('uid')) {
// Output selection form with all confirmed user accounts listed
ADD_MEMBER_SELECTION_BOX();
} else {
LOAD_TEMPLATE("admin_del_user", false, $content);
} else {
// Account does not exists!
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))."</div>");
+ LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))."</div>");
}
}
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if ((IS_FORM_SENT()) && (!REQUEST_ISSET_POST(('id')))) {
REQUEST_UNSET_POST('ok');
}
// Display message
- LOAD_TEMPLATE("admin_settings_saved", false, $content);
+ LOAD_TEMPLATE('admin_settings_saved', false, $content);
} else {
// There are mail orders available
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
// Prepare data for the row template
// @TODO Rewritings: subj->subject in template
}
} else {
// No mail orders left in pool
- LOAD_TEMPLATE("admin_settings_saved", false, "<span class=\"admin_failed\">{--ADMIN_NO_MAILS_IN_POOL--}</span>");
+ LOAD_TEMPLATE('admin_settings_saved', false, "<span class=\"admin_failed\">{--ADMIN_NO_MAILS_IN_POOL--}</span>");
}
//
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if ((REQUEST_ISSET_GET(('id'))) && (REQUEST_ISSET_GET(('mode')))) {
// Check for selected sponsor
{
case "M":
define('__GENDER_M', " selected=\"selected\"");
- define('__GENDER_F', "");
- define('__GENDER_C', "");
+ define('__GENDER_F', '');
+ define('__GENDER_C', '');
break;
case "F":
- define('__GENDER_M', "");
+ define('__GENDER_M', '');
define('__GENDER_F', " selected=\"selected\"");
- define('__GENDER_C', "");
+ define('__GENDER_C', '');
break;
case "C":
- define('__GENDER_M', "");
- define('__GENDER_F', "");
+ define('__GENDER_M', '');
+ define('__GENDER_F', '');
define('__GENDER_C', " selected=\"selected\"");
break;
}
if (!empty($message)) {
// Output message
- LOAD_TEMPLATE("admin_settings_saved", false, $message);
+ LOAD_TEMPLATE('admin_settings_saved', false, $message);
} // END - if
} elseif (FILE_READABLE(sprintf("%stemplates/%s/html/admin/%s.tpl", constant('PATH'), GET_LANGUAGE(), $TPL))) {
// Create mailto link
LOAD_TEMPLATE($TPL);
} else {
// Template not found!
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_SPONSOR_MODUS_TPL_404'), REQUEST_GET(('mode'))));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_MODUS_TPL_404'), REQUEST_GET(('mode'))));
}
} else {
// Sponsor not found!
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_SPONSOR_404'), bigintval(REQUEST_GET('id'))));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_404'), bigintval(REQUEST_GET('id'))));
}
} else {
// Not called by what-list_sponsor.php
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_CALL_NOT_DIRECTLY'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_CALL_NOT_DIRECTLY'));
}
//
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Fix a notice
$result_main = false;
-if (REQUEST_ISSET_GET(('uid'))) {
+if (REQUEST_ISSET_GET('uid')) {
// 0 1 2 3 4 5 6 7 8 9 10 11
$result_main = SQL_QUERY_ESC("SELECT gender, surname, family, street_nr, zip, city, country, email, birth_day, birth_month, birth_year, max_mails
FROM `{!_MYSQL_PREFIX!}_user_data`
array(bigintval(REQUEST_GET('uid'))), __FILE__, __LINE__);
}
-if ((SQL_NUMROWS($result_main) == 1) || (!REQUEST_ISSET_GET(('uid'))))
+if ((SQL_NUMROWS($result_main) == 1) || (!REQUEST_ISSET_GET('uid')))
{
// User found
- if (!REQUEST_ISSET_GET(('uid')))
+ if (!REQUEST_ISSET_GET('uid'))
{
// Output selection form with all confirmed user accounts listed
ADD_MEMBER_SELECTION_BOX();
elseif (REQUEST_ISSET_POST('edit'))
{
// Ok, change the account...
- $PASS = false; $add = "";
+ $PASS = false; $add = '';
if ((!REQUEST_ISSET_POST(('pass1'))) && (!REQUEST_ISSET_POST(('pass2'))))
{
// Don't change the password
}
// Load template
- LOAD_TEMPLATE("admin_settings_saved", false, $content);
+ LOAD_TEMPLATE('admin_settings_saved', false, $content);
}
else
{
{
case "M":
define('_GENDER_M', " selected=\"selected\"");
- define('_GENDER_F', "");
- define('_GENDER_C', "");
+ define('_GENDER_F', '');
+ define('_GENDER_C', '');
break;
case "F":
- define('_GENDER_M', "");
+ define('_GENDER_M', '');
define('_GENDER_F', " selected=\"selected\"");
- define('_GENDER_C', "");
+ define('_GENDER_C', '');
break;
case "C":
- define('_GENDER_M', "");
- define('_GENDER_F', "");
+ define('_GENDER_M', '');
+ define('_GENDER_F', '');
define('_GENDER_C', " selected=\"selected\"");
break;
}
}
} else {
// Account does not exists!
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))."</div>");
+ LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))."</div>");
}
//
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// 0 1 2 3 4 5 6 7 8 9 10
$sql = "SELECT id, sender, subject, text, receivers, payment_id, data_type, timestamp, url, target_send, cat_id
}
else
{
- define('__TOP_EMAIL_NAV' , "");
- define('__BOTTOM_EMAIL_NAV', "");
+ define('__TOP_EMAIL_NAV' , '');
+ define('__BOTTOM_EMAIL_NAV', '');
}
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($pool = SQL_FETCHROW($result))
{
// Check sent mails and clicks
'pay' => GET_PAYMENT($pool[5]),
'cat' => GET_CATEGORY($pool[10]),
'sent' => $sent,
- 'ruids' => str_replace(";", ", ", $pool[4]),
+ 'ruids' => str_replace(';', ", ", $pool[4]),
'unconfirmed' => $unconfirmed,
'type' => TRANSLATE_POOL_TYPE($pool[6]),
'tsend' => $pool[9],
LOAD_TEMPLATE("admin_email_archiv");
} else {
// No mail orders fond
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_NO_MAILS_IN_POOL'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NO_MAILS_IN_POOL'));
}
//
?>
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Normal mails ordered by your members
// 0 1 2 3 4 5 6 7 8 9 10
ORDER BY timestamp DESC";
$WHO = _ALL;
-$SQL2 = "";
+$SQL2 = '';
if (REQUEST_ISSET_GET(('mid'))) {
// Only a specific mail shall be displayed
WHERE id='".bigintval(REQUEST_GET('mid'))."'
LIMIT 1";
$WHO = MAIL_ID.": ".REQUEST_GET('mid');
-} elseif (REQUEST_ISSET_GET(('uid'))) {
+} elseif (REQUEST_ISSET_GET('uid')) {
// All mails by a specific member shall be displayed
// 0 1 2 3 4 5 6 7 8 9 10
$sql = "SELECT id, sender, subject, text, receivers, payment_id, data_type, timestamp, url, target_send, cat_id
$WHO = USER_ID.": ".REQUEST_GET('uid');
}
-if ((EXT_IS_ACTIVE("bonus")) && ($WHO == _ALL)) {
+if ((EXT_IS_ACTIVE('bonus')) && ($WHO == _ALL)) {
// Bonus mails sent by you
// 0 1 2 3 4 5 6 7 8 9 10 11 12
$SQL2 = "SELECT id, subject, text, receivers, points, time, data_type, timestamp, url, cat_id, target_send, mails_sent, clicks
$MAIL = false;
if (SQL_NUMROWS($result_list) > 0) {
// Init rows
- $OUT = ""; $content = array();
+ $OUT = ''; $content = array();
// Walk through all entries
while ($pool = SQL_FETCHARRAY($result_list)) {
$content['text'] = COMPILE_CODE($pool['text']);
$content['payment'] = GET_PAYMENT($pool['payment_id']);
$content['category'] = GET_CATEGORY($pool['cat_id']);
- $content['receivers'] = str_replace(";", ", ", $pool['receivers']);
+ $content['receivers'] = str_replace(';', ", ", $pool['receivers']);
$content['type'] = TRANSLATE_POOL_TYPE($pool['data_type']);
$content['frametester'] = FRAMETESTER($pool['url']);
$content['url'] = COMPILE_CODE($pool['url']);
SQL_FREERESULT($result_list);
// Add navigation (with change box and colspan=3)
- $content['nav'] = "";
+ $content['nav'] = '';
if ($PAGES > 1) $content['nav'] = ADD_EMAIL_NAV($PAGES, getConfig('mails_page'), false, "3", true);
// Prepare content
LOAD_TEMPLATE("admin_list_emails", false, $content);
$MAIL = true;
- if ((EXT_IS_ACTIVE("bonus")) && ($WHO == _ALL)) {
+ if ((EXT_IS_ACTIVE('bonus')) && ($WHO == _ALL)) {
// Check only if bonus extension is active
if (SQL_NUMROWS($result_bonus) > 0) OUTPUT_HTML("<br /><br />");
}
}
-if ((EXT_IS_ACTIVE("bonus")) && ($WHO == _ALL)) {
+if ((EXT_IS_ACTIVE('bonus')) && ($WHO == _ALL)) {
// Load bonus mails only when extension is active
if (SQL_NUMROWS($result_bonus) > 0) {
// Calculate pages
$PAGES = round(SQL_NUMROWS($result_bonus) / getConfig('mails_page') + 0.5);
// List emails
- $OUT = ""; $content = array();
+ $OUT = ''; $content = array();
while ($bonus = SQL_FETCHARRAY($result_bonus)) {
// Calculate unconfirmed emails
$bonus['unconfirmed'] = $bonus['mails_sent'] - $bonus['clicks'];
$content = $bonus;
$content['time'] = CREATE_FANCY_TIME($content['time']);
$content['category'] = GET_CATEGORY($content['cat_id']);
- $content['receivers'] = str_replace(";", ", ", $content['receivers']);
+ $content['receivers'] = str_replace(';', ", ", $content['receivers']);
$content['type'] = TRANSLATE_POOL_TYPE($content['data_type']);
$content['frametester'] = FRAMETESTER($content['url']);
$content['timestamp'] = MAKE_DATETIME($content['timestamp'], "0");
} // END - while
// Add navigation (without change box but with colspan=3)
- $content['nav'] = "";
+ $content['nav'] = '';
if ($PAGES > 1) $content['nav'] = ADD_EMAIL_NAV($PAGES, getConfig('mails_page'), false, "3", true);
// Prepare content
if (!$MAIL) {
// No mail orders fond
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_NO_MAILS_IN_POOL'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NO_MAILS_IN_POOL'));
} // END - if
//
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
//
?>
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Normally we want the overview of all registered extensions
$do = "overview";
if (REQUEST_ISSET_GET(('reg_ext'))) {
// We are about to register a new extension
- $do = "register"; $ext_id = bigintval(REQUEST_GET('reg_ext'));
+ $do = 'register'; $ext_id = bigintval(REQUEST_GET('reg_ext'));
// The ID comes from task management and it is - of course - *not* the extension's name!
} elseif ((REQUEST_ISSET_POST('change')) && ($SEL > 0) && (!IS_DEMO())) {
// De-/activate extensions
foreach (REQUEST_POST('sel') as $ext_id => $active) {
// Shall we keep the extension always active?
- if ((isset($GLOBALS['cache_array']['active_extensions'][GET_EXT_NAME($ext_id)])) && ($GLOBALS['cache_array']['active_extensions'][GET_EXT_NAME($ext_id)] == "Y") && ($active == "N")) {
+ if ((isset($GLOBALS['cache_array']['active_extensions'][GET_EXT_NAME($ext_id)])) && ($GLOBALS['cache_array']['active_extensions'][GET_EXT_NAME($ext_id)] == 'Y') && ($active == 'N')) {
// Keep this extension active!
} else {
// De/activate extension
- $ACT = "N"; $EXT_LOAD_MODE = "deactivate";
- if ($active == "N") { $ACT = "Y"; $EXT_LOAD_MODE = "activate"; }
+ $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__);
// Change this extension?
if ($sel == 1) {
// Load mode is modify
- $EXT_LOAD_MODE = "modify";
+ $EXT_LOAD_MODE = 'modify';
// Get entry for 'active'
$active = REQUEST_POST('active', $ext_id);
// Update extension's record
- if (GET_EXT_VERSION("sql_patches") >= "0.0.6") {
+ 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__);
// Run SQLs on activation / deactivation
switch ($active) {
- case "Y": $EXT_LOAD_MODE = "activate"; break;
- case "N": $EXT_LOAD_MODE = "deactivate"; break;
+ case 'Y': $EXT_LOAD_MODE = 'activate'; break;
+ case 'N': $EXT_LOAD_MODE = 'deactivate'; break;
}
// Run embeded SQL commands
}
// Extensions changed
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_EXT_CHANGED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_EXT_CHANGED'));
} else {
// Edit selected entries
- $SW = "2"; $OUT = "";
+ $SW = "2"; $OUT = '';
foreach (REQUEST_POST('sel') as $ext_id => $sel) {
// Edit this extension?
- if (($sel == "Y") || ($sel == "N")) {
+ if (($sel == 'Y') || ($sel == 'N')) {
// Load required data
- if (GET_EXT_VERSION("sql_patches") >= "0.0.6") {
+ 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__);
list($name, $css, $active) = SQL_FETCHROW($result);
// Output row
$cssSelection = "---";
- if (GET_EXT_VERSION("sql_patches") >= "0.0.6") $cssSelection = ADD_SELECTION("yn", $css, "css", $ext_id);
+ if (GET_EXT_VERSION('sql_patches') >= '0.0.6') $cssSelection = ADD_SELECTION("yn", $css, "css", $ext_id);
// Prepare data for the row template
$content = array(
'sw' => $SW,
'id' => $ext_id,
'name' => $name,
- 'active' => ADD_SELECTION("yn", $active, "active", $ext_id),
+ 'active' => ADD_SELECTION("yn", $active, 'active', $ext_id),
'css' => $cssSelection,
);
}
} elseif ((REQUEST_ISSET_POST('delete')) && ($SEL > 0) && (!IS_DEMO())) {
// List extensions and when verbose is enabled SQL statements which will be executed
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
foreach (REQUEST_POST('sel') as $ext_id => $sel) {
// Init variables
- $VERBOSE_OUT = "";
+ $VERBOSE_OUT = '';
INIT_SQLS();
// Secure id number
// Get extension name
$ext_name = GET_EXT_NAME($ext_id);
- if (getConfig('verbose_sql') == "Y") {
+ if (getConfig('verbose_sql') == 'Y') {
// Load SQL commands in remove mode
- if (LOAD_EXTENSION($ext_name, "remove", "", true)) {
+ if (LOAD_EXTENSION($ext_name, 'remove', '', true)) {
// Generate extra table with loaded SQL commands
$VERBOSE_OUT = EXTENSION_VERBOSE_TABLE();
} // END - if
runFilterChain('extension_remove', GET_EXT_NAME($ext_id));
// Run embeded SQL commands
- EXTENSION_RUN_SQLS($ext_id, "remove");
+ EXTENSION_RUN_SQLS($ext_id, 'remove');
} // END - if
} // END - foreach
} elseif ((REQUEST_ISSET_GET('do')) && (!IS_DEMO())) {
$do = SQL_ESCAPE(strip_tags(REQUEST_GET('do')));
} elseif (REQUEST_ISSET_GET('do')) {
// Demo mode active!
- $do = "demo";
+ $do = 'demo';
}
// Shall we display active/inactive extensions?
-$where = "";
+$where = '';
if (REQUEST_ISSET_GET(('active'))) {
$where = sprintf("WHERE ext_active = '%s'", SQL_ESCAPE(strip_tags(REQUEST_GET('active'))));
} // END - if
// Case selection
switch ($do) {
case "overview": // List all registered extensions
- if (GET_EXT_VERSION("sql_patches") >= "0.0.6") {
+ 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`
// Are there some entries?
if (SQL_NUMROWS($result) > 0) {
// Extensions are registered
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
// Prepare CSS selection output
$cssSelection = "---";
- if (GET_EXT_VERSION("sql_patches") >= "0.0.6") $cssSelection = TRANSLATE_YESNO($content['ext_css']);
+ if (GET_EXT_VERSION('sql_patches') >= '0.0.6') $cssSelection = TRANSLATE_YESNO($content['ext_css']);
// Prepare data for the row template
$content = array(
LOAD_TEMPLATE("admin_extensions");
} else {
// No extensions are registered
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_NO_EXTENSION_REGISTERED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NO_EXTENSION_REGISTERED'));
}
break;
-case "register": // Register new extension
+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(GET_CURRENT_ADMIN_ID()), __FILE__, __LINE__);
$task_found = SQL_NUMROWS($result);
$ext_name = trim(substr($subj, 1, strpos($subj, ":") - 1));
// Test the extension for deprecation
- LOAD_EXTENSION($ext_name, "test");
+ LOAD_EXTENSION($ext_name, 'test');
// Is the extension deprecated?
- if (EXT_GET_DEPRECATED() == "N") {
+ 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'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_EXTENSION_REGISTERED'));
// Show next link
- if (EXT_IS_ACTIVE("task")) {
+ 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')
}
// Do we need to update cache file?
- if ((EXT_IS_ACTIVE("cache")) && ($GLOBALS['cache_mode'] != "no")) {
+ 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();
} // 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'));
+ 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));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_REG_FAILED_404'), $ext_name));
}
} else {
// Motify the admin that we have a problem here...
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_REG_FAILED_DEPRECATED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_DEPRECATED'));
}
} else {
// Extension was not found in task management
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_REG_FAILED_ID_404'));
+ 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'));
+ 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'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_REG_FAILED_INVALID'));
}
break;
-case "demo":
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SETTINGS_NOT_SAVED'));
+case 'demo':
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_NOT_SAVED'));
break;
}
//
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Check if the admin has entered title and what-php file name...
if (((!REQUEST_ISSET_POST(('title'))) || (!REQUEST_ISSET_POST(('menu')))) && (IS_FORM_SENT())) {
// Remove double eintries
// @TODO This can be somehow rewritten to a function
- $prev = ""; $dmy = $menus; $dmy2 = $titles; $dmy3 = $below;
+ $prev = ''; $dmy = $menus; $dmy2 = $titles; $dmy3 = $below;
foreach ($menus as $key => $value) {
if ($value == $prev) {
unset($dmy[$key]);
// Remove double eintries
// @TODO This can be somehow rewritten to a function
- $prev = ""; $dmy = $menus[$value_main]; $dmy2 = $titles[$value_main]; $dmy3 = $below[$value_main];
+ $prev = ''; $dmy = $menus[$value_main]; $dmy2 = $titles[$value_main]; $dmy3 = $below[$value_main];
foreach ($menus[$value_main] as $key => $value) {
if ($value == $prev) {
unset($dmy[$key]);
$OUT .= "</select>";
define('__BELOW_SELECTION' , $OUT);
- define('__WHAT_SELECTION' , ADMIN_MAKE_MENU_SELECTION("guest", "what", "name"));
- define('__ACTION_SELECTION', ADMIN_MAKE_MENU_SELECTION("guest", "action", "menu"));
+ define('__WHAT_SELECTION' , ADMIN_MAKE_MENU_SELECTION('guest', "what", "name"));
+ define('__ACTION_SELECTION', ADMIN_MAKE_MENU_SELECTION('guest', "action", "menu"));
// Display form
LOAD_TEMPLATE("admin_guest_add");
REQUEST_POST('active'),
), __FILE__, __LINE__);
}
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SETTINGS_SAVED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
} else {
// Demo mode!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SETTINGS_NOT_SAVED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_NOT_SAVED'));
}
//
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Do we edit/delete/change main menus or sub menus?
-$AND = "(`what` = '' OR `what` IS NULL)"; $SUB = "";
+$AND = "(`what` = '' OR `what` IS NULL)"; $SUB = '';
-if (REQUEST_ISSET_GET(('sub'))) {
- $AND = sprintf("`action`='%s' AND `what` IS NOT NULL", REQUEST_GET(('sub')));
- $SUB = REQUEST_GET(('sub'));
+if (REQUEST_ISSET_GET('sub')) {
+ $AND = sprintf("`action`='%s' AND `what` IS NOT NULL", REQUEST_GET('sub'));
+ $SUB = REQUEST_GET('sub');
} // END - if
// Get count of (maybe) selected menu points
define('__SUB_VALUE', $SUB);
define('__CHK_VALUE', $chk);
- $cnt = 0; $OUT = ""; $SW = 2;
+ $cnt = 0; $OUT = ''; $SW = 2;
foreach (REQUEST_POST('sel') as $sel => $confirm)
{
if ($confirm == 1)
$DATA = array(
'cnt' => $cnt,
'sel' => $sel,
- 'action' => ADMIN_MAKE_MENU_SELECTION("guest", "action", "sel_action[".$sel."]", $act),
- 'what' => ADMIN_MAKE_MENU_SELECTION("guest", "what", "sel_what[".$sel."]", $wht),
+ 'action' => ADMIN_MAKE_MENU_SELECTION('guest', "action", "sel_action[".$sel."]", $act),
+ 'what' => ADMIN_MAKE_MENU_SELECTION('guest', "what", "sel_what[".$sel."]", $wht),
'menu' => $menu,
'sw' => $SW,
);
define('__SUB_VALUE', $SUB);
define('__CHK_VALUE', $chk);
- $cnt = 0; $OUT = ""; $SW = 2;
+ $cnt = 0; $OUT = ''; $SW = 2;
foreach (REQUEST_POST('sel') as $sel => $confirm) {
if ($confirm == 1) {
$cnt++;
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'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
break;
case "del": // Delete menu
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'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
break;
case "status": // Change access levels
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'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
break;
default: // Unexpected action
define('__CHK_VALUE', $chk);
// Load template
- $SW = 2; $cnt = 0; $OUT = "";
+ $SW = 2; $cnt = 0; $OUT = '';
foreach (REQUEST_POST('sel') as $sel => $confirm)
{
if ($confirm == 1)
// Init variables
$SW = 2;
$cnt = 0;
- $OUT = "";
+ $OUT = '';
// Process all menu entries
while ($content = SQL_FETCHARRAY($result)) {
'what' => $content['what'],
'title' => $content['title'],
'navi' => $NAVI,
- 'mode' => "guest"
+ 'mode' => 'guest'
);
$OUT .= LOAD_TEMPLATE("admin_menu_overview_row", true, $content);
$SW = 3 - $SW;
LOAD_TEMPLATE("admin_gmenu_edit");
} else {
// Menu entries are missing... (???)
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_NO_MENUS_FOUND'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NO_MENUS_FOUND'));
}
}
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
//
?>
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
//
?>
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Exclude default referal id if set
-$EXCLUDE_LIST = "";
+$EXCLUDE_LIST = '';
if (getConfig('def_refid') > 0) {
$EXCLUDE_LIST = " AND d.userid != ".getConfig('def_refid')."";
} // END - if
// Check for more extensions
// @TODO Rewrite those lines to filter
-if (EXT_IS_ACTIVE("beg")) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('beg_uid')."";
-if (EXT_IS_ACTIVE("bonus")) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('bonus_uid')."";
-if (EXT_IS_ACTIVE("doubler")) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('doubler_uid')."";
-if (GET_EXT_VERSION("holiday") >= "0.1.3") $EXCLUDE_LIST .= " AND d.holiday_active='N'";
+if (EXT_IS_ACTIVE('beg')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('beg_uid')."";
+if (EXT_IS_ACTIVE('bonus')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('bonus_uid')."";
+if (EXT_IS_ACTIVE('doubler')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('doubler_uid')."";
+if (GET_EXT_VERSION('holiday') >= '0.1.3') $EXCLUDE_LIST .= " AND d.holiday_active='N'";
// Check for all accounts
$result = SQL_QUERY_ESC("SELECT DISTINCT d.userid, d.gender, d.surname, d.family, d.email, d.joined, d.last_online, d.ap_notified
if (SQL_NUMROWS($result) > 0) {
// Ok, we have found some inactive accounts
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
// Prepare data for the row template
// @TODO Rewritings: sname->surname,fname->family in templates
LOAD_TEMPLATE("admin_list_autopurge");
} else {
// All members are active or you don't have any registered
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_AUTOPURGE_ALL_ACTIVE'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_AUTOPURGE_ALL_ACTIVE'));
}
//
} // END - if
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Check if there is enougth selected
$show = true;
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", "", "", "TRANSLATE_COMMA", "bigintval", "TRANSLATE_COMMA", "", "", "bigintval", "TRANSLATE_COMMA", "TRANSLATE_COMMA", "TRANSLATE_COMMA", "TRANSLATE_COMMA", "", "bigintval"),
- array("", "", "", "", "", "", "", "", "", "", "", "", "", "", "")
+ array("bigintval", '', '', "TRANSLATE_COMMA", "bigintval", "TRANSLATE_COMMA", '', '', "bigintval", "TRANSLATE_COMMA", "TRANSLATE_COMMA", "TRANSLATE_COMMA", "TRANSLATE_COMMA", '', "bigintval"),
+ array("", '', '', '', '', '', '', '', '', '', '', '', '', '', '')
);
$show = false;
} elseif (REQUEST_ISSET_POST(('do_edit'))) {
ADMIN_EDIT_ENTRIES_CONFIRM(REQUEST_POST('id'), "bank_packages", array(), array(), array(), true);
} elseif (REQUEST_ISSET_POST('delete')) {
// Delete entries (with confirmation)
- ADMIN_DELETE_ENTRIES_CONFIRM(REQUEST_POST('id'), "bank_packages", array("id", "title", "description", "account_fee"), array("bigintval", "", "", "TRANSLATE_COMMA"), array("", "", "", ""));
+ ADMIN_DELETE_ENTRIES_CONFIRM(REQUEST_POST('id'), "bank_packages", array("id", "title", "description", "account_fee"), array("bigintval", '', '', "TRANSLATE_COMMA"), array("", '', '', ''));
$show = false;
} elseif (REQUEST_ISSET_POST('remove')) {
// Delete entries (with confirmation)
// Is there at lease one package?
if (SQL_NUMROWS($result) > 0) {
// List all packages
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
// "Translate" some data
$content['active'] = TRANSLATE_YESNO($content['active']);
LOAD_TEMPLATE("admin_list_bank_package");
} else {
// No packages found!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_BANK_NO_PACKAGES_FOUND'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_BANK_NO_PACKAGES_FOUND'));
}
// Free the result
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
-if (getConfig('beg_rallye') == "Y") {
+if (getConfig('beg_rallye') == 'Y') {
// Shall I withdraw now?
if (REQUEST_ISSET_POST(('withdraw'))) {
// Okay, let's prepare...
$curr = date("m", time()) - 1;
if (strlen($curr) == 1) $curr = "0".$curr;
UPDATE_CONFIG("last_month", $curr);
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_BEG_WITHDRAW_PREPARED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_BEG_WITHDRAW_PREPARED'));
} // END - if
// Autopurge installed?
- $lastOnline = "%s"; $ONLINE = "";
- if (EXT_IS_ACTIVE("autopurge")) {
+ $lastOnline = "%s"; $ONLINE = '';
+ if (EXT_IS_ACTIVE('autopurge')) {
// Use last online timestamp to keep inactive members away from here
$lastOnline = " AND last_online >= (UNIX_TIMESTAMP() - %s)";
$ONLINE = getConfig('ap_inactive_since');
if (SQL_NUMROWS($result) > 0) {
// List users
- $OUT = "";$SW = 2; $cnt = 1; $total = 0;
+ $OUT = '';$SW = 2; $cnt = 1; $total = 0;
while ($content = SQL_FETCHARRAY($result)) {
// Init variables
- $WIN1 = ""; $WIN2 = "";
+ $WIN1 = ''; $WIN2 = '';
if ($cnt <= getConfig('beg_ranks')) {
// Maybe he can win his active beg?
$WIN1 = "<strong>";
}
// Prepare constant for timemark
- if (EXT_IS_ACTIVE("autopurge")) {
+ if (EXT_IS_ACTIVE('autopurge')) {
define('__AUTOPURGE_TIMEOUT', MAKE_DATETIME(time() - getConfig('ap_inactive_since'), "2"));
} else {
- define('__AUTOPURGE_TIMEOUT', sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), "autopurge"));
+ define('__AUTOPURGE_TIMEOUT', sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), 'autopurge'));
}
// Load final template
LOAD_TEMPLATE("admin_list_beg");
} else {
// No one has joined the begging rallye...
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_BEG_NO_RALLYE'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_BEG_NO_RALLYE'));
}
} else {
// Rallye deactivated
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_BEG_RALLYE_DEACTIVATED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_BEG_RALLYE_DEACTIVATED'));
}
//
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
-if (getConfig('bonus_active') == "Y") {
+if (getConfig('bonus_active') == 'Y') {
// Shall I withdraw now?
if (REQUEST_ISSET_POST(('withdraw'))) {
// Okay, let's prepare...
$curr = date("m", time()) - 1;
if (strlen($curr) == 1) $curr = "0".$curr;
UPDATE_CONFIG("last_month", $curr);
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_BONUS_WITHDRAW_PREPARED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_BONUS_WITHDRAW_PREPARED'));
}
- if (GET_EXT_VERSION("bonus") >= "0.6.9") {
+ if (GET_EXT_VERSION('bonus') >= '0.6.9') {
// Add more bonus points here
$USE = "(0";
- if (getConfig('bonus_click_yn') == "Y") $USE .= " + turbo_bonus";
- if (getConfig('bonus_login_yn') == "Y") $USE .= " + login_bonus";
- if (getConfig('bonus_order_yn') == "Y") $USE .= " + bonus_order";
- if (getConfig('bonus_stats_yn') == "Y") $USE .= " + bonus_stats";
- if (getConfig('bonus_ref_yn') == "Y") $USE .= " + bonus_ref";
+ if (getConfig('bonus_click_yn') == 'Y') $USE .= " + turbo_bonus";
+ if (getConfig('bonus_login_yn') == 'Y') $USE .= " + login_bonus";
+ if (getConfig('bonus_order_yn') == 'Y') $USE .= " + bonus_order";
+ if (getConfig('bonus_stats_yn') == 'Y') $USE .= " + bonus_stats";
+ if (getConfig('bonus_ref_yn') == 'Y') $USE .= " + bonus_ref";
$USE .= ")";
} else {
// Old version ???
}
// Autopurge installed?
- $lastOnline = "%s"; $ONLINE = "";
- if (EXT_IS_ACTIVE("autopurge")) {
+ $lastOnline = "%s"; $ONLINE = '';
+ if (EXT_IS_ACTIVE('autopurge')) {
// Use last online timestamp to keep inactive members away from here
$lastOnline = " AND last_online >= (UNIX_TIMESTAMP() - %s)";
$ONLINE = getConfig('ap_inactive_since');
if (SQL_NUMROWS($result) > 0) {
// List users
- $OUT = "";$SW = 2; $cnt = 1; $total = 0;
+ $OUT = '';$SW = 2; $cnt = 1; $total = 0;
while ($content = SQL_FETCHARRAY($result)) {
// Add total points
$total += $content['points'];
// Generate array fore the dynamic template
- $WIN1 = ""; $WIN2 = "";
+ $WIN1 = ''; $WIN2 = '';
if ($cnt <= getConfig('bonus_ranks')) {
// Maybe he can win his active bonus?
$WIN1 = "<strong>";
}
// Prepare constant for timemark
- if (EXT_IS_ACTIVE("autopurge")) {
+ if (EXT_IS_ACTIVE('autopurge')) {
define('__AUTOPURGE_TIMEOUT', MAKE_DATETIME(time() - getConfig('ap_inactive_since'), "2"));
} else {
- define('__AUTOPURGE_TIMEOUT', sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), "autopurge"));
+ define('__AUTOPURGE_TIMEOUT', sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), 'autopurge'));
}
// Load final template
LOAD_TEMPLATE("admin_list_bonus");
} else {
// No one has become an "activity bonus"...
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_BONUS_NO_ACTIVE_RALLYE'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_BONUS_NO_ACTIVE_RALLYE'));
}
} else {
// Aktive-Rallye not activated
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_BONUS_RALLYE_DEACTIVATED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_BONUS_RALLYE_DEACTIVATED'));
}
//
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
-if (REQUEST_ISSET_GET(('uid'))) {
+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__);
if (SQL_NUMROWS($result_cats) > 0) {
// List categories
- $cnt = 1; $OUT = ""; $SW = 2;
+ $cnt = 1; $OUT = ''; $SW = 2;
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",
}
} else {
// User not found
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_MEMBER_404'), constant('__UID')));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_MEMBER_404'), constant('__UID')));
}
} else {
// Output selection form with all confirmed user accounts listed
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Add new code?
if ((REQUEST_ISSET_POST(('add'))) && (REQUEST_ISSET_POST(('code'))) && (REQUEST_ISSET_POST(('descr')))) {
}
// Display message
- LOAD_TEMPLATE("admin_settings_saved", false, $message);
+ LOAD_TEMPLATE('admin_settings_saved', false, $message);
} elseif ((REQUEST_ISSET_POST('change')) && (REQUEST_ISSET_POST(('id')))) {
// Change all status
ADMIN_CHANGE_ACTIVATION_STATUS(REQUEST_POST('id'), "countries", "is_active");
if (REQUEST_ISSET_POST('edit')) {
// Edit template
$row = "admin_list_country_edit_row";
- $post = "modify";
+ $post = 'modify';
$class = "admin_submit";
$submit = getMessage('ADMIN_COUNTRY_EDIT_NOW');
$title = getMessage('ADMIN_COUNTRY_EDIT_TITLE');
} else {
// Delete template
$row = "admin_list_country_del_row";
- $post = "remove";
+ $post = 'remove';
$class = "admin_delete";
$submit = getMessage('ADMIN_COUNTRY_DELETE_NOW');
$title = getMessage('ADMIN_COUNTRY_DELETE_TITLE');
- $reset = "";
+ $reset = '';
}
// Edit all selected country codes
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
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",
'sw' => $SW,
);
- if ($post == "modify") {
+ if ($post == 'modify') {
// Generate default selection in edit-mode
$content['status'] = ADD_OPTION_LINES("/ARRAY/", array("Y","N"), array(YES, NO ), $status);
} else {
}
} else {
// Shall we modify / remove entries now?
- $message = ""; INIT_SQLS();
+ $message = ''; INIT_SQLS();
if ((REQUEST_ISSET_POST(('modify'))) && (REQUEST_ISSET_POST(('id')))) {
// Modify
foreach (REQUEST_POST('id') as $id => $sel) {
runFilterChain('run_sqls');
// Display message
- LOAD_TEMPLATE("admin_settings_saved", false, $message);
+ LOAD_TEMPLATE('admin_settings_saved', false, $message);
}
// 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__);
if (SQL_NUMROWS($result) > 0) {
// List all countries
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
// Prepare array for the template
// @TODO Rewritings: name->descr,status->is_active in template
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (!REQUEST_ISSET_GET(('mode'))) {
// Chosse the overview page as default
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Start listing holiday requests
$result = SQL_QUERY("SELECT h.id, h.userid, h.holiday_start, h.holiday_end, h.comments, d.status, d.last_online
if (SQL_NUMROWS($result) > 0) {
// List all holiday requests
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
// Add three dashes to comment when it is empty
if (empty($content['comments'])) $content['comments'] = "---";
LOAD_TEMPLATE("admin_list_holiday");
} else {
// No holiday requests found
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('HOLIDAY_ADMIN_NOTHING_FOUND'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('HOLIDAY_ADMIN_NOTHING_FOUND'));
}
//
if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif (!EXT_IS_ACTIVE("mailid")) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "mailid");
+} elseif (!EXT_IS_ACTIVE('mailid')) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'mailid');
return;
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
-if (!REQUEST_ISSET_GET('del')) REQUEST_SET_GET('del', "");
+if (!REQUEST_ISSET_GET('del')) REQUEST_SET_GET('del', '');
-if (REQUEST_ISSET_GET(('uid'))) {
+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__);
SQL_FREERESULT($result);
// Grab user's all unconfirmed mails
- if (EXT_IS_ACTIVE("bonus")) {
+ 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__);
SEND_EMAIL($email, getMessage('ADMIN_DEL_LINK_SUBJ'), $msg);
// Display message
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_LINKS_DELETED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_LINKS_DELETED'));
} else {
// Init variables
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
// List all unconfirmed mails
// @TODO Find a way to rewrite this. See some lines above for different queries
while (list($id, $id2, $type) = SQL_FETCHROW($result)) {
// Initializes some variables
- $cat = "";
- $DATA = "";
+ $cat = '';
+ $DATA = '';
$PROBLEM = getMessage('GENERAL_MAIL_PROBLEM');
$result_data = false; // Closes Bug #58
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');
+ $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",
array(bigintval($id2)), __FILE__, __LINE__);
- $type = "bonusid"; $DATA = $id2; $PROBLEM = getMessage('BONUS_MAIL_PROBLEM');
+ $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;
}
} else {
// No mails left to confirm
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_MEMBER_LINKS'), REQUEST_GET('uid')));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_MEMBER_LINKS'), REQUEST_GET('uid')));
}
} else {
// User not found
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid')));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid')));
}
} else {
// Output selection form with all confirmed user accounts listed
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
-if ((REQUEST_ISSET_POST(('uid'))) && (REQUEST_ISSET_POST(('id')))) {
+if ((REQUEST_ISSET_POST('uid')) && (REQUEST_ISSET_POST(('id')))) {
// 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",
SEND_EMAIL(bigintval(REQUEST_POST('uid')), NL_MEMBER_DONE_SUBJECT, $msg);
// Output message to admin
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_NL_MEMBER_DONE'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NL_MEMBER_DONE'));
} else {
// @TODO Currently under construction!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('UNDER_CONSTRUCTION'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('UNDER_CONSTRUCTION'));
}
//
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Init variables
$WHO = _ALL;
-$SQL2 = "";
+$SQL2 = '';
// Set offset an current page to default values
if (!REQUEST_ISSET_GET(('page'))) REQUEST_GET('page') = "1";
if (!REQUEST_ISSET_GET(('offset'))) REQUEST_SET_GET('offset', getConfig('mails_page'));
-if ((EXT_IS_ACTIVE("bonus")) && ($WHO == getMessage('_ALL'))) {
+if ((EXT_IS_ACTIVE('bonus')) && ($WHO == getMessage('_ALL'))) {
// Bonus mails sent by you
// 0 1 2 3 4 5 6 7 8 9 10 11 12
$SQL2 = "SELECT id, subject, text, receivers, points, time, data_type, timestamp, url, cat_id, target_send, mails_sent, clicks
// Add limitation
if (!empty($SQL2)) $SQL2 .= $add;
-if ((EXT_IS_ACTIVE("bonus")) && (SQL_NUMROWS($result_max) > 0) && (!empty($SQL2))) {
+if ((EXT_IS_ACTIVE('bonus')) && (SQL_NUMROWS($result_max) > 0) && (!empty($SQL2))) {
// Run SQL query for notification mails
$result_bonus = SQL_QUERY($SQL2, __FILE__, __LINE__);
$PAGES = round(SQL_NUMROWS($result_bonus) / getConfig('mails_page') + 0.5);
// List emails
- $OUT = ""; $content = array();
+ $OUT = ''; $content = array();
while ($bonus = SQL_FETCHARRAY($result_bonus)) {
// Calculate unconfirmed emails
$bonus['unconfirmed'] = $bonus['mails_sent'] - $bonus['clicks'];
$content = $bonus;
$content['time'] = CREATE_FANCY_TIME($content['time']);
$content['category'] = GET_CATEGORY($content['cat_id']);
- $content['receivers'] = str_replace(";", ", ", $content['receivers']);
+ $content['receivers'] = str_replace(';', ", ", $content['receivers']);
$content['type'] = TRANSLATE_POOL_TYPE($content['data_type']);
$content['frametester'] = FRAMETESTER($content['url']);
$content['timestamp'] = MAKE_DATETIME($content['timestamp'], "0");
}
// Add navigation (without change box but with colspan=3)
- $content['nav'] = "";
+ $content['nav'] = '';
if ($PAGES > 1) $content['nav'] = ADD_EMAIL_NAV($PAGES, getConfig('mails_page'), false, "3", true);
// Prepare content
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (REQUEST_ISSET_GET(('pid'))) {
// First let's get the member's ID
if (empty($task)) $task = 0;
} elseif ((empty($uid)) || ($uid == "0")) {
// Cannot obtain member ID!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PAYOUT_FAILED_OBTAIN_USERID'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PAYOUT_FAILED_OBTAIN_USERID'));
} else {
// Get task ID from URL
$task = REQUEST_GET('task');
$msg = LOAD_EMAIL_TEMPLATE("member_payout_accepted", REQUEST_POST('text'), $uid);
// Output message
- if ($allow == "Y") {
+ if ($allow == 'Y') {
// Banner / Textlink request
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PAYOUT_BANNER_ACCEPTED_NOTIFIED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PAYOUT_BANNER_ACCEPTED_NOTIFIED'));
} else {
// Normal request
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PAYOUT_ACCEPTED_NOTIFIED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PAYOUT_ACCEPTED_NOTIFIED'));
}
// Finally send mail
}
} else {
// Cannot load payout id
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"admin_failed\">{--PAYOUT_FAILED_OBTAIN_PAYOUT_ID--}</div>");
+ LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"admin_failed\">{--PAYOUT_FAILED_OBTAIN_PAYOUT_ID--}</div>");
}
} else {
// Prepare content
$msg = LOAD_EMAIL_TEMPLATE("member_payout_rejected", REQUEST_POST('text'), $uid);
// Output message
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PAYOUT_REJECTED_NOTIFIED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PAYOUT_REJECTED_NOTIFIED'));
// Finally send mail
SEND_EMAIL($email, getMessage('PAYOUT_REJECTED_SUBJECT'), $msg);
}
} else {
// Cannot load user data
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PAYOUT_FAILED_OBTAIN_USERDATA'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PAYOUT_FAILED_OBTAIN_USERDATA'));
}
} elseif ((empty($task)) || ($task == "0")) {
// Failed loading task ID
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PAYOUT_FAILED_OBTAIN_TASK_ID'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PAYOUT_FAILED_OBTAIN_TASK_ID'));
}
} else {
- if (!REQUEST_ISSET_GET('do')) REQUEST_SET_GET('do', "");
+ if (!REQUEST_ISSET_GET('do')) REQUEST_SET_GET('do', '');
if (REQUEST_GET('do') == "delete") {
// Delete all requests
if (SQL_NUMROWS($result) > 0) {
// List found payouts
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHROW($result)) {
if ($content['status'] == "NEW") {
// Generate links for direct accepting and rejecting
}
// Nothing entered must be secured in member/what-payputs.php !
- if ($content['allow'] == "Y") {
+ if ($content['allow'] == 'Y') {
// Banner/Textlink views/clicks request
if (!empty($content['banner'])) {
// Load template for the banner
LOAD_TEMPLATE("admin_list_payouts");
} else {
// No payout requests are sent so far
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PAYOUT_ADMIN_NO_REQUESTS_FOUND'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PAYOUT_ADMIN_NO_REQUESTS_FOUND'));
}
}
//
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// 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",
// Are there some entries to display?
if (SQL_NUMROWS($result) > 0) {
// List all entries
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
// Translate some data and add color
$content['sw'] = $SW;
LOAD_TEMPLATE("admin_list_primera_main", false, $OUT);
} else {
// Nothing to display!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PRIMERA_ADMIN_NO_TRANSFERS'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PRIMERA_ADMIN_NO_TRANSFERS'));
}
// Free the result
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
-if (!REQUEST_ISSET_GET(('sub'))) REQUEST_SET_GET('sub', "");
-$message = "";
+if (!REQUEST_ISSET_GET('sub')) REQUEST_SET_GET('sub', '');
+$message = '';
// Quick actions on a rallye
if (REQUEST_ISSET_GET(('rallye'))) {
$SEL = SELECTION_COUNT(REQUEST_POST('sel'));
if ($SEL > 0) {
// Make all selected and deactivated rallyes editable
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
foreach (REQUEST_POST('sel') as $id => $selected) {
// Load rallye basic data
$result = SQL_QUERY_ESC("SELECT title, descr, template, start_time, end_time, min_users, min_prices
LOAD_TEMPLATE("admin_edit_rallyes");
} else {
// Nothing selected to edit
- LOAD_TEMPLATE("admin_settings_saved", false, LOAD_TEMPLATE("admin_list_rallye_noselect", true));
+ LOAD_TEMPLATE('admin_settings_saved', false, LOAD_TEMPLATE("admin_list_rallye_noselect", true));
}
} 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",
array(bigintval(REQUEST_GET('rallye'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
// @TODO Rewrite this constant
define('__RALLYE_VALUE', REQUEST_GET('rallye'));
while ($content = SQL_FETCHARRAY($result)) {
$cnt = RALLYE_GET_REFCOUNT($content['userid'], $content['refs']);
// Init variables
- $bl = "";
- $br = "";
+ $bl = '';
+ $br = '';
// Output row
if (($content['curr_points'] > 0) && ($cnt > 0)) { $bl = "<strong>"; $br = "</strong>"; }
} // END - if
// Get user points
- $points = GET_TOTAL_DATA($content['userid'], "user_points", "points", "userid", false, " AND ref_depth=1 LIMIT 1");
+ $points = GET_TOTAL_DATA($content['userid'], "user_points", "points", 'userid', false, " AND ref_depth=1 LIMIT 1");
//* DEBUG: */ echo basename(__FILE__).":uid={$content['userid']},points={$points},opoints={$content['curr_points']}<br />\n";
// Prepare content
LOAD_TEMPLATE("admin_list_rallye_usr");
} else {
// No entries found?
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('RALLYE_ADMIN_USERS_404'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('RALLYE_ADMIN_USERS_404'));
}
} else {
// Start listing rallyes
__FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// List found rallyes
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
// Load admin login
$content['alogin'] = GET_ADMIN_LOGIN($content['admin_id']);
// Is the rallye active or not?
switch ($content['is_active'])
{
- case "Y":
+ 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":
+ case 'N':
$content['active_title'] = getMessage('RALLYE_ACTIVATE_NOW');
$content['active'] = "1";
break;
// Notification to members?
switch ($content['send_notify'])
{
- case "Y":
+ case 'Y':
$content['notify_title'] = getMessage('RALLYE_STOP_NOTIFY_NOW');
$content['notify'] = 0;
break;
- case "N":
+ 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":
+ case 'Y':
$content['auto_title'] = getMessage('RALLYE_STOP_AUTO_ADD_NOW');
$content['auto'] = 0;
break;
- case "N":
+ case 'N':
$content['auto_title'] = getMessage('RALLYE_START_AUTO_ADD_NOW');
$content['auto'] = "1";
break;
LOAD_TEMPLATE("admin_list_rallyes");
} else {
// No rallyes setup so far
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('RALLYE_NO_RALLYES_SETUP'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('RALLYE_NO_RALLYES_SETUP'));
}
}
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
-if (REQUEST_ISSET_GET(('uid'))) {
+if (REQUEST_ISSET_GET('uid')) {
// Secure userid
$uid = bigintval(REQUEST_GET('uid'));
// User found?
if (SQL_NUMROWS($result_user) == 1) {
// Is the refback extension installed?
- if (EXT_IS_ACTIVE("refback")) {
+ if (EXT_IS_ACTIVE('refback')) {
// Load all referal levels
$result_levels = SQL_QUERY("SELECT level, percents
FROM `{!_MYSQL_PREFIX!}_refdepths`
array($uid), __FILE__, __LINE__);
// Output info message
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), ADMIN_USER_PROFILE_LINK(REQUEST_GET('uid')), $menge, $menge_lck));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), ADMIN_USER_PROFILE_LINK(REQUEST_GET('uid')), $menge, $menge_lck));
}
// Are there some levels (VERY BAD IF NONE!)
if (SQL_NUMROWS($result_levels) > 0) {
// List all ref levels or entries if no refback is installed
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($levels = SQL_FETCHARRAY($result_levels)) {
// Insert more data
$levels['sw'] = $SW;
// Is the refback still active? ;-)
- if (EXT_IS_ACTIVE("refback")) {
+ 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__);
$levels['info'] = sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), ADMIN_USER_PROFILE_LINK($uid), $menge, $menge_lck);
// Init variables
- $OUT_REFS = ""; $SW = 2;
+ $OUT_REFS = ''; $SW = 2;
// Load all refs
while ($content = SQL_FETCHARRAY($result_refs)) {
);
// Load main template
- if (EXT_IS_ACTIVE("refback")) {
+ if (EXT_IS_ACTIVE('refback')) {
LOAD_TEMPLATE("admin_list_refs2", false, $content);
} else {
LOAD_TEMPLATE("admin_list_refs", false, $content);
}
- } elseif (EXT_IS_ACTIVE("refback")) {
+ } elseif (EXT_IS_ACTIVE('refback')) {
// No levels found, very bad!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_NO_REF_LEVELS'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NO_REF_LEVELS'));
} else {
// No refs made so far
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('USER_REF_404'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('USER_REF_404'));
}
// Free result
SQL_FREERESULT($result_levels);
} else {
// User not found
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid')));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid')));
}
// Free memory
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (REQUEST_ISSET_GET(('id'))) {
// Show detailed informations to a sponsor
LOAD_TEMPLATE("admin_list_sponsor_details");
} else {
// Sponsor not found
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_SPONSOR_404'), REQUEST_GET('id')));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_404'), REQUEST_GET('id')));
}
} elseif (REQUEST_ISSET_GET(('rid'))) {
// Search for sponsor
SQL_FREERESULT($result);
} else {
// No refs made so far
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_SPONSOR_REFS_404'), "<a href=\"{!URL!}/modules.php?module=admin&what=list_sponsor&id=".bigintval(REQUEST_GET('rid'))."\">".bigintval(REQUEST_GET('rid'))."</a>"));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_REFS_404'), "<a href=\"{!URL!}/modules.php?module=admin&what=list_sponsor&id=".bigintval(REQUEST_GET('rid'))."\">".bigintval(REQUEST_GET('rid'))."</a>"));
}
} else {
// Sponsor not found
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_SPONSOR_404'), bigintval(REQUEST_GET('rid'))));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_404'), bigintval(REQUEST_GET('rid'))));
}
} else {
// List all sponsors
FROM `{!_MYSQL_PREFIX!}_sponsor_data` ORDER BY `id`", __FILE__, __LINE__);
if (SQL_NUMROWS($result_main) > 0) {
// At least one sponsor found!
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result_main)) {
// Transfer data to array
// @TODO Rewritings: sname->surname,fname->family,ip->remote_addr in template
LOAD_TEMPLATE("admin_list_sponsor");
} else {
// No sponsors registered so far
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_SPONSOR_NONE_REGISTERED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SPONSOR_NONE_REGISTERED'));
}
}
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
-$message = "";
+$message = '';
if (REQUEST_ISSET_POST(('add'))) {
// Check input variables
if (!empty($message)) {
// Output message
- LOAD_TEMPLATE("admin_settings_saved", false, $message);
+ LOAD_TEMPLATE('admin_settings_saved', false, $message);
}
}
}
// Output message
- LOAD_TEMPLATE("admin_settings_saved", false, $message);
+ LOAD_TEMPLATE('admin_settings_saved', false, $message);
} elseif ((REQUEST_ISSET_POST('edit')) || (REQUEST_ISSET_POST('del'))) {
// Load all data
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
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",
// Do we have some paytypes setup?
if (SQL_NUMROWS($result) > 0) {
// Prepare variables for listing
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
// List alle found payment types
while ($content = SQL_FETCHARRAY($result)) {
define('__LIST_CONTENT', LOAD_TEMPLATE("admin_list_sponsor_pay", true));
} else {
// Noting setup so far!
- define('__LIST_CONTENT', LOAD_TEMPLATE("admin_settings_saved", true, getMessage('ADMIN_SPONSOR_NO_PAYTYPES')));
+ define('__LIST_CONTENT', LOAD_TEMPLATE('admin_settings_saved', true, getMessage('ADMIN_SPONSOR_NO_PAYTYPES')));
}
// Add new payment types here
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (REQUEST_ISSET_GET(('id'))) {
// Check for selected sponsor
SQL_FREERESULT($result);
} else {
// Sponsor not found!
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_SPONSOR_404'), bigintval(REQUEST_GET('id'))));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_SPONSOR_404'), bigintval(REQUEST_GET('id'))));
}
} else {
// Not called by what-list_sponsor.php
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_CALL_NOT_DIRECTLY'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_CALL_NOT_DIRECTLY'));
}
//
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Load all actions
$result = SQL_QUERY("SELECT `id`,`status`,`action`,`new_status`
// Entries found?
if (SQL_NUMROWS($result) > 0) {
// List all entries
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
// "Translate" some data
$content['status'] = constant(sprintf("SURFBAR_URL_STATUS_%s", $content['status']));
LOAD_TEMPLATE("admin_list_surfbar_actions", false, $OUT);
} else {
// No entries found, very bad!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_SURFBAR_NO_ACTIONS'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_NO_ACTIONS'));
}
// Free result
} // END - if
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// By default show the list...
$show = true;
// Check for 'id' element
if ((REQUEST_POST_COUNT() > 0) && ((!REQUEST_ISSET_POST(('id'))) || (!is_array(REQUEST_POST('id'))) || (count(REQUEST_POST('id')) == 0))) {
// Not found so output message
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_SURFBAR_NO_SELECTIONS'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_NO_SELECTIONS'));
// Abort here
return;
ADMIN_EDIT_ENTRIES_CONFIRM(
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'))) {
ADMIN_DELETE_ENTRIES_CONFIRM(
REQUEST_POST('id'),
"surfbar_urls",
- array("id", "userid", "url", "registered"),
- array("bigintval", "ADMIN_USER_PROFILE_LINK", "FRAMETESTER", ""),
- array("", "", "", "")
+ array("id", 'userid', "url", "registered"),
+ array("bigintval", "ADMIN_USER_PROFILE_LINK", "FRAMETESTER", ''),
+ array("", '', '', '')
);
$show = false;
} elseif (REQUEST_ISSET_POST(('do_delete'))) {
ADMIN_LOCK_ENTRIES_CONFIRM(
REQUEST_POST('id'),
"surfbar_urls",
- array("id", "userid", "url", "registered", "status"),
- array("bigintval", "ADMIN_USER_PROFILE_LINK", "FRAMETESTER", "", "SURFBAR_TRANSLATE_STATUS"),
- array("", "", "", "", "")
+ array("id", 'userid', "url", "registered", "status"),
+ array("bigintval", "ADMIN_USER_PROFILE_LINK", "FRAMETESTER", '', "SURFBAR_TRANSLATE_STATUS"),
+ array("", '', '', '', '')
);
$show = false;
} elseif (REQUEST_ISSET_POST(('do_lock'))) {
ADMIN_UNDELETE_ENTRIES_CONFIRM(
REQUEST_POST('id'),
"surfbar_urls",
- array("id", "userid", "url", "registered", "status"),
- array("bigintval", "ADMIN_USER_PROFILE_LINK", "FRAMETESTER", "", "SURFBAR_TRANSLATE_STATUS"),
- array("", "", "", "", "")
+ array("id", 'userid', "url", "registered", "status"),
+ array("bigintval", "ADMIN_USER_PROFILE_LINK", "FRAMETESTER", '', "SURFBAR_TRANSLATE_STATUS"),
+ array("", '', '', '', '')
);
$show = false;
} elseif (REQUEST_ISSET_POST(('do_undelete'))) {
// Do we have some URLs left?
if (SQL_NUMROWS($result) > 0) {
// List all URLs
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
// "Translate"/add content
$content['sw'] = $SW;
LOAD_TEMPLATE("admin_list_surfbar_urls", false, $OUT);
} else {
// No URLs in surfbar
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_SURFBAR_NO_URLS_FOUND'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_NO_URLS_FOUND'));
}
// Free result
if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif (!EXT_IS_ACTIVE("task")) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "task");
+} elseif (!EXT_IS_ACTIVE('task')) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'task');
return;
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
-$whereStatement = "";
+$whereStatement = '';
if (!REQUEST_ISSET_GET(('type'))) REQUEST_SET_GET('type', "your");
switch (REQUEST_GET('type'))
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')));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_TASK_UNKNOWN_MODE'), REQUEST_GET('type')));
break;
}
if ((REQUEST_ISSET_POST(('assign'))) && ($SEL > 0)) {
// Assign / do tasks
LOAD_INC_ONCE("inc/modules/admin/overview-inc.php");
- if (empty($dmy)) $dmy = "";
+ if (empty($dmy)) $dmy = '';
OUTPUT_SELECTED_TASKS(REQUEST_POST_ARRAY(), $dmy);
} else {
// Start listing tasks matching selected filter
'message' => $type,
'type' => REQUEST_GET('type')
));
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result_tasks)) {
// Init infos
$content['infos'] = "---";
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// We only need outgoing transfers
$result = SQL_QUERY("SELECT userid, to_uid, trans_id, points, reason, time_trans FROM `{!_MYSQL_PREFIX!}_user_transfers_out` ORDER BY trans_id", __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0)
{
// Output rows
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
// Prepare data for the row template
$content = array(
// Nothing for in and out
$OUT = "<tr>
<td colspan=\"6\" align=\"center\" class=\"bottom2\" height=\"70\">
- ".LOAD_TEMPLATE("admin_settings_saved", true, getMessage('TRANSFER_NO_INOUT_TRANSFERS'))."
+ ".LOAD_TEMPLATE('admin_settings_saved', true, getMessage('TRANSFER_NO_INOUT_TRANSFERS'))."
</td>
</tr>";
}
if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif (!EXT_IS_ACTIVE("mailid")) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "mailid");
+} elseif (!EXT_IS_ACTIVE('mailid')) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'mailid');
return;
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Don't load the admin_list_unconfirmed template by default
$listed = false;
$col = "stats_id"; $type = "NORMAL"; $ID = "-1";
// Load admin_list_unconfirmed template
- $listed = true; $DATA = REQUEST_GET('mid'); $LINK = "mailid";
-} elseif ((REQUEST_ISSET_GET(('bid'))) && (EXT_IS_ACTIVE("bonus"))) {
+ $listed = true; $DATA = REQUEST_GET('mid'); $LINK = 'mailid';
+} elseif ((REQUEST_ISSET_GET(('bid'))) && (EXT_IS_ACTIVE('bonus'))) {
// @TODO This constant might be unused?
define('__LIST_UNCON_TITLE', getMessage('LIST_UNCONFIRMED_BONUS_LINKS'));
$sql = "SELECT id, id, subject, text, url, timestamp, mails_sent FROM `{!_MYSQL_PREFIX!}_bonus` WHERE id='".REQUEST_GET('bid')."' LIMIT 1";
// Column, type and ID for member's mail
- $col = "bonus_id"; $type = "BONUS"; $ID = REQUEST_GET('bid');
+ $col = 'bonus_id'; $type = "BONUS"; $ID = REQUEST_GET('bid');
// Load admin_list_unconfirmed template
- $listed = true; $DATA = $ID; $LINK = "bonusid";
+ $listed = true; $DATA = $ID; $LINK = 'bonusid';
} else {
// @TODO "Please do not call me directly." Should be rewritten to a nice selection depending on ext-bonus
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_CALL_NOT_DIRECTLY'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_CALL_NOT_DIRECTLY'));
}
// Shall I display links or not?
// Transfer data to constants for the template
if (($stats_id > 0) && ($ID == "-1")) $ID = $stats_id;
- if ($col == "bonus_id") $sender = 0;
+ if ($col == 'bonus_id') $sender = 0;
// Load unconfirmed mail links. Hmmm, this select query is pretty cool
// but it does only show unconfirmed mail links from existing user
if ($unconfirmed > 0) {
// At least one link left to confirm
- $OUT = ""; $SW = 2;
+
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
// Prepare data for the row template
// @TODO Rewritings: uid->userid
SQL_FREERESULT($result);
} else {
// All links are confirmed... strange, you shall normally not get a link to this place in this scenario... hmmm.
- $OUT = LOAD_TEMPLATE("admin_settings_saved", true, getMessage('ADMIN_UNCONFIRMED_NO_LINK_LEFT'));
+ $OUT = LOAD_TEMPLATE('admin_settings_saved', true, getMessage('ADMIN_UNCONFIRMED_NO_LINK_LEFT'));
}
// Prepare content
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));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_UNCONFIRMED_POOL_MISSING'), $ID));
} elseif (SQL_NUMROWS($result2) == 1) {
// user_stats table
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_UNCONFIRMED_STATS_MISSING'), $ID));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_UNCONFIRMED_STATS_MISSING'), $ID));
} else {
// both or link is invalid
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_UNCONFIRMED_INVALID_LINK'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_UNCONFIRMED_INVALID_LINK'));
}
// Free memory
SQL_FREERESULT($result2);
} elseif (REQUEST_ISSET_GET(('bid'))) {
// Data in bonus table not found
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_UNCONFIRMED_INVALID_LINK'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_UNCONFIRMED_INVALID_LINK'));
}
}
if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif ((!EXT_IS_ACTIVE("user")) || (GET_EXT_VERSION("user") == "")) {
+} elseif ((!EXT_IS_ACTIVE('user')) || (GET_EXT_VERSION('user') == "")) {
// Missing extension!
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "user");
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'user');
return;
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Init title with "all accounts"
$listHeader = getMessage('ADMIN_ALL_ACCOUNTS');
$MORE = ", userid"; $colspan = "4";
// Add nickname if extension is found&active
-if (EXT_IS_ACTIVE("nickname")) { $MORE = ", nickname"; }
+if (EXT_IS_ACTIVE('nickname')) { $MORE = ", nickname"; }
// Add random confirmed if extension version matches
-if (GET_EXT_VERSION("user") >= "0.3.4") {
+if (GET_EXT_VERSION('user') >= '0.3.4') {
// Add it...
$MORE .= ", rand_confirmed";
// Add lock reason?
- if (GET_EXT_VERSION("user") >= "0.3.5") {
+ if (GET_EXT_VERSION('user') >= '0.3.5') {
// Add them...
$MORE .= ", lock_reason, UNIX_TIMESTAMP(`lock_timestamp`) AS lock_timestamp";
} // END - if
} // END - if
-// Is the extension "country" installed?
-if (EXT_IS_ACTIVE("country")) {
+// Is the extension 'country' installed?
+if (EXT_IS_ACTIVE('country')) {
// Add country code
$MORE .= ", country_code";
} else {
// Init unset data (bad that we change $_GET here!)
if (!REQUEST_ISSET_GET(('letter'))) { REQUEST_SET_GET('letter', getMessage('_ALL2')); }
-if (!REQUEST_ISSET_GET(('sortby'))) { REQUEST_SET_GET('sortby', "userid"); }
+if (!REQUEST_ISSET_GET(('sortby'))) { REQUEST_SET_GET('sortby', 'userid'); }
if (!REQUEST_ISSET_GET(('page'))) { REQUEST_SET_GET('page' , "1"); }
// Set base URL
$BASE = "[<a href=\"{!URL!}/modules.php?module=admin";
-if (REQUEST_ISSET_GET(('uid'))) {
+if (REQUEST_ISSET_GET('uid')) {
// Secure the user ID
$uid = bigintval(REQUEST_GET('uid'));
// Get count/sum of refs, selected categories, unconfirmed mails
$REFS = GET_TOTAL_DATA($uid, "refsystem", "counter");
- $CATS = GET_TOTAL_DATA($uid, "user_cats", "id", "userid", true);
- $LINKS = GET_TOTAL_DATA($uid, "user_links", "id", "userid", true);
+ $CATS = GET_TOTAL_DATA($uid, "user_cats", "id", 'userid', true);
+ $LINKS = GET_TOTAL_DATA($uid, "user_links", "id", 'userid', true);
// Add links to the numbers
if ($LINKS > 0) $LINKS = $BASE."&what=list_links&uid=".$uid."\">".$LINKS."</a>]";
// Nickname inclusion?
// @TODO Rewrite these to filters
- if (EXT_IS_ACTIVE("nickname")) {
+ if (EXT_IS_ACTIVE('nickname')) {
// Nickname not set or invalid? Then
if ((empty($DATA['nickname'])) || ($DATA['nickname'] == $uid)) $DATA['nickname'] = "---";
} else {
}
// Is the user extension newer?
- if (GET_EXT_VERSION("user") >= "0.3.4") {
+ if (GET_EXT_VERSION('user') >= '0.3.4') {
// Then "translate" the number
$DATA['rand_confirmed'] = TRANSLATE_COMMA($DATA['rand_confirmed']);
} // END - if
$DATA['mails_confirmed'] = TRANSLATE_COMMA($DATA['mails_confirmed']);
$DATA['emails_received'] = TRANSLATE_COMMA($DATA['emails_received']);
- // Is the extension "country" installed?
- if (EXT_IS_ACTIVE("country")) {
+ // Is the extension 'country' installed?
+ if (EXT_IS_ACTIVE('country')) {
// Then overwrite country information
$DATA['country'] = COUNTRY_GENERATE_INFO($DATA['country_code']);
} elseif ($DATA['country'] == 0) {
LOAD_TEMPLATE("admin_user_details", false, $uid);
} else {
// Account does not exist!
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_MEMBER_404'), $uid));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_MEMBER_404'), $uid));
}
// Free the result
SQL_FREERESULT($result_user);
} else {
- $whereStatement = "";
+ $whereStatement = '';
if ((REQUEST_GET('letter') != getMessage('_ALL2')) && (REQUEST_GET('letter') != getMessage('_OTHERS')) && (REQUEST_ISSET_GET(('letter')))) {
// List only persons w
$whereStatement = " WHERE family LIKE '".REQUEST_GET('letter')."%'";
// Calculate page count (0.5 fixes a bug with page count)
if (getConfig('user_limit') == 0) {
setConfigEntry('user_limit', 100);
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('EXTENSION_WARNING_USER_LIMIT'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('EXTENSION_WARNING_USER_LIMIT'));
} // END - if
// Activate the extension please!
define('__PAGE_NAV', ADD_PAGENAV($PAGES, getConfig('user_limit'), true, $colspan, true));
} else {
// No page navigation is required
- define('__PAGE_NAV', "");
+ define('__PAGE_NAV', '');
}
// Column with nickname when nickname extension is present
// @TODO Rewrite this into a filter
- if (EXT_IS_ACTIVE("nickname")) {
+ if (EXT_IS_ACTIVE('nickname')) {
// Nickname extension found
define('__NICKNAME_TH', " <td class=\"admin_title bottom2\" align=\"center\">{--NICKNAME--}</td>");
} else {
// Not found
- define('__NICKNAME_TH', "");
+ define('__NICKNAME_TH', '');
}
// Load all users
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
// Set refid link
if ($content['refid'] > 0) $content['refid'] = ADMIN_USER_PROFILE_LINK($content['refid']);
// Get number of unconfirmed mails
- $LINKS = GET_TOTAL_DATA($content['userid'], "user_links", "id", "userid", true);
+ $LINKS = GET_TOTAL_DATA($content['userid'], "user_links", "id", 'userid', true);
if ($LINKS > 0) $LINKS = $BASE."&what=list_links&uid=".$content['userid']."\">".TRANSLATE_COMMA($LINKS)."</a>]";
// Set link to sent mails if present
// Is the lock reason not set?
if (!isset($content['lock_reason'])) $content['lock_reason'] = "---";
- // Is the extension "country" installed?
+ // Is the extension 'country' installed?
// @TODO Rewrite this into a filter
- if (EXT_IS_ACTIVE("country")) {
+ if (EXT_IS_ACTIVE('country')) {
// Then overwrite country information
$content['country'] = COUNTRY_GENERATE_INFO($content['country_code']);
} elseif ($content['country'] == "") {
SQL_FREERESULT($result_master);
} else {
// No one as registered so far! :-(
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_NO_NONE_REGISTERED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NO_NONE_REGISTERED'));
}
}
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// 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",
// Are there some entries to display?
if (SQL_NUMROWS($result) > 0) {
// List all entries
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
// Translate some data and add color
$content['sw'] = $SW;
LOAD_TEMPLATE("admin_list_wernis_main", false, $OUT);
} else {
// Nothing to display!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('WERNIS_ADMIN_NO_TRANSFERS'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('WERNIS_ADMIN_NO_TRANSFERS'));
}
// Free the result
if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
require($INC);
-} elseif (!EXT_IS_ACTIVE("yoomedia")) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "yoomedia");
+} elseif (!EXT_IS_ACTIVE('yoomedia')) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'yoomedia');
return;
-} elseif (!EXT_IS_ACTIVE("bonus")) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bonus");
+} elseif (!EXT_IS_ACTIVE('bonus')) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'bonus');
return;
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Do actions here
if (IS_FORM_SENT()) {
return;
} elseif (REQUEST_ISSET_POST(('sent'))) {
// Sent mail
- YOOMEDIA_SEND_BONUS_MAIL(REQUEST_POST_ARRAY(), "normal");
+ YOOMEDIA_SEND_BONUS_MAIL(REQUEST_POST_ARRAY(), 'normal');
} elseif (REQUEST_ISSET_POST('remove')) {
// Add mail to exclude list
- YOOMEDIA_EXCLUDE_MAIL(REQUEST_POST_ARRAY(), "normal");
+ YOOMEDIA_EXCLUDE_MAIL(REQUEST_POST_ARRAY(), 'normal');
} elseif (REQUEST_ISSET_POST(('unlist'))) {
// Remove mail from exclude list
- YOOMEDIA_UNLIST_MAIL(REQUEST_POST_ARRAY(), "normal");
+ YOOMEDIA_UNLIST_MAIL(REQUEST_POST_ARRAY(), 'normal');
}
// Enougth queries left?
if (getConfig('yoomedia_requests_remain') == 0) {
// Output message
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_YOOMEDIA_REQUESTS_DEPLETED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_YOOMEDIA_REQUESTS_DEPLETED'));
// Abort here!
return false;
// Sanity-check on result array
if ((!is_array($result)) || (count($result) == 0) || (!isset($result[0]['id']))) {
// Invalid result
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_YOOMEDIA_INVALID_RESULT'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_YOOMEDIA_INVALID_RESULT'));
return false;
} elseif (count($result[0]) < 7) {
// Error received so prepare error code
$code = $code[0];
// Output message
- LOAD_TEMPLATE("admin_yoomedia_error", false, sprintf("{--ADMIN_YOOMEDIA_ERROR_%s--}", strtoupper(YOOMEDIA_TRANSLATE_ERROR($code))));
+ LOAD_TEMPLATE('admin_yoomedia_error', false, sprintf("{--ADMIN_YOOMEDIA_ERROR_%s--}", strtoupper(YOOMEDIA_TRANSLATE_ERROR($code))));
return false;
}
// Prepare all entries
-$OUT = ""; $SW = 2;
+$OUT = ''; $SW = 2;
foreach ($result as $entry) {
// Translate some data
$entry['pay'] = TRANSLATE_COMMA($entry['pay'], true, 5);
$entry['sw'] = $SW;
// Check reload lock
- $reload = YOOMEDIA_CHECK_RELOAD($entry['id'], $entry['reload'], "textmail");
+ $reload = YOOMEDIA_CHECK_RELOAD($entry['id'], $entry['reload'], 'textmail');
// Is this mail already sent?
if ($reload !== false) {
} // END - if
// Add reload lock
- $entry['already'] = sprintf(ADMIN_YOOMEDIA_TEXTMAIL_SEND_AGAIN, CREATE_FANCY_TIME($countdown));
+ $entry['already'] = sprintf(getMessage('ADMIN_YOOMEDIA_TEXTMAIL_SEND_AGAIN'), CREATE_FANCY_TIME($countdown));
} else {
// Never resentable unless manual removal
- $entry['already'] = ADMIN_YOOMEDIA_TEXTMAIL_MANUALLY_LOCKED;
+ $entry['already'] = getMessage('ADMIN_YOOMEDIA_TEXTMAIL_MANUALLY_LOCKED');
}
// Load row template for displaying
- $OUT .= LOAD_TEMPLATE("admin_list_yoomedia_tm_already", true, $entry);
+ $OUT .= LOAD_TEMPLATE('admin_list_yoomedia_tm_already', true, $entry);
} else {
// Load row template with buttons
- $OUT .= LOAD_TEMPLATE("admin_list_yoomedia_tm_row", true, $entry);
+ $OUT .= LOAD_TEMPLATE('admin_list_yoomedia_tm_row', true, $entry);
}
// Switch color
} // END - if
// Load main template
-LOAD_TEMPLATE("admin_list_yoomedia_tm", false, $OUT);
+LOAD_TEMPLATE('admin_list_yoomedia_tm', false, $OUT);
//
?>
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
-$message = "";
+ADD_DESCR('admin', __FILE__);
+$message = '';
if (REQUEST_ISSET_GET(('id'))) {
// Check for selected sponsor
if (!empty($message)) {
// Output message
- LOAD_TEMPLATE("admin_settings_saved", false, $message);
+ LOAD_TEMPLATE('admin_settings_saved', false, $message);
}
//
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Is a userid set?
-if (REQUEST_ISSET_GET(('uid'))) {
+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__);
// Is a lock reason set?
if ((REQUEST_ISSET_POST(('lock'))) && ($status != "LOCKED")) {
// Ok, lock the account!
- if (GET_EXT_VERSION("user") >= "0.3.5") {
+ 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__);
$ACT = true;
} elseif ((REQUEST_ISSET_POST(('unlock'))) && ($status == "LOCKED")) {
// Ok, unlock the account!
- if (GET_EXT_VERSION("user") >= "0.3.5") {
+ 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__);
// Send away...
SEND_EMAIL(bigintval(REQUEST_GET('uid')), getMessage('ADMIN_UNLOCKED_SUBJ'), $msg);
- if (EXT_IS_ACTIVE("rallye")) {
+ if (EXT_IS_ACTIVE('rallye')) {
RALLYE_AUTOADD_USER(REQUEST_GET('uid'));
} // END - if
} // END - if
LOAD_TEMPLATE("admin_lock_user");
} else {
// Account does not exists!
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))."</div>");
+ LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))."</div>");
}
}
} elseif ($ACT) {
// An action was performed...
if (!empty($message)) {
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"admin_green\">".$message."</div>");
+ LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"admin_green\">".$message."</div>");
} else {
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"admin_green\">".getMessage('ADMIN_USER_UPDATED')."</div>");
+ LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"admin_green\">".getMessage('ADMIN_USER_UPDATED')."</div>");
}
}
} else {
// Account does not exists!
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))."</div>");
+ LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))."</div>");
}
} else {
// List all users
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (REQUEST_ISSET_GET(('access'))) {
// Secure input and construct FQFN
OUTPUT_HTML($OUTPUT);
// Output message
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_UNKNOWN_LOGFILE_FORMAT'), $access));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_UNKNOWN_LOGFILE_FORMAT'), $access));
return;
}
shutdown();
} else {
// Not readable!
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('LOGFILE_NOT_READABLE'), $access));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('LOGFILE_NOT_READABLE'), $access));
}
} else {
// List access logfiles
OUTPUT_HTML("</ol>");
} else {
// logs directory does not exist
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_LOGS_DIR_404'), getConfig('logs_base')));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_LOGS_DIR_404'), getConfig('logs_base')));
}
}
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
// De- or activate maintenance mode
switch (getConfig('maintenance'))
{
- case "Y":
+ case 'Y':
$target_mode = "N";
$out = getMessage('ADMIN_MAINTENANCE_DEACTIVATED');
break;
- case "N":
+ case 'N':
$target_mode = "Y";
$out = getMessage('ADMIN_MAINTENANCE_ACTIVATED');
break;
}
// Update config
- UPDATE_CONFIG("maintenance", $target_mode);
+ UPDATE_CONFIG('maintenance', $target_mode);
// Load template
- LOAD_TEMPLATE("admin_settings_saved", false, $out);
+ LOAD_TEMPLATE('admin_settings_saved', false, $out);
} else {
switch (getConfig('maintenance'))
{
- case "Y": // Maintenance mode is active
+ case 'Y': // Maintenance mode is active
define('ADMIN_MAINTENANCE_MODE', getMessage('ADMIN_MAINTENANCE_MODE_IS_ACTIVE'));
break;
- case "N": // Maintenance mode is inactive
+ case 'N': // Maintenance mode is inactive
define('ADMIN_MAINTENANCE_MODE', getMessage('ADMIN_MAINTENANCE_MODE_IS_INACTIVE'));
break;
}
}
// Add desciption as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Check if the admin has entered title and what-php file name...
if ((!REQUEST_ISSET_POST(('title'))) && (IS_FORM_SENT())) {
// Remove double eintries
// @TODO This can be somehow rewritten to a function
- $prev = ""; $dmy = $menus; $dmy2 = $titles; $dmy3 = $below;
+ $prev = ''; $dmy = $menus; $dmy2 = $titles; $dmy3 = $below;
foreach ($menus as $key => $value) {
if ($value == $prev) {
// Remove entries
// Remove double eintries
// @TODO This can be somehow rewritten to a function
- $prev = ""; $dmy = $menus[$value_main]; $dmy2 = $titles[$value_main]; $dmy3 = $below[$value_main];
+ $prev = ''; $dmy = $menus[$value_main]; $dmy2 = $titles[$value_main]; $dmy3 = $below[$value_main];
foreach ($menus[$value_main] as $key => $value) {
if ($value == $prev) {
unset($dmy[$key]);
$OUT .= "</select>";
define('__BELOW_SELECTION' , $OUT);
- define('__WHAT_SELECTION' , ADMIN_MAKE_MENU_SELECTION("member", "what", "name"));
- define('__ACTION_SELECTION', ADMIN_MAKE_MENU_SELECTION("member", "action", "menu"));
+ define('__WHAT_SELECTION' , ADMIN_MAKE_MENU_SELECTION('member', "what", "name"));
+ define('__ACTION_SELECTION', ADMIN_MAKE_MENU_SELECTION('member', "action", "menu"));
// Display form
LOAD_TEMPLATE("admin_member_add");
bigintval(REQUEST_POST('sort')),
), __FILE__, __LINE__);
}
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SETTINGS_SAVED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
} else {
// Demo mode!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SETTINGS_NOT_SAVED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_NOT_SAVED'));
}
//
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Do we edit/delete/change main menus or sub menus?
-$AND = "(`what` = '' OR `what` IS NULL)"; $SUB = "";
+$AND = "(`what` = '' OR `what` IS NULL)"; $SUB = '';
-if (REQUEST_ISSET_GET(('sub'))) {
- $AND = sprintf("`action`='%s' AND `what` IS NOT NULL", REQUEST_GET(('sub')));
- $SUB = REQUEST_GET(('sub'));
+if (REQUEST_ISSET_GET('sub')) {
+ $AND = sprintf("`action`='%s' AND `what` IS NOT NULL", REQUEST_GET('sub'));
+ $SUB = REQUEST_GET('sub');
}
// Get count of (maybe) selected menu points
// Edit menu entries
define('__SUB_VALUE', $SUB);
define('__CHK_VALUE', $chk);
- $SW = 2; $cnt = 0; $OUT = "";
+ $SW = 2; $cnt = 0; $OUT = '';
foreach (REQUEST_POST('sel') as $sel => $confirm) {
if ($confirm == 1) {
$cnt++;
'sel' => $sel,
'menu' => $menu,
'sw' => $SW,
- 'act' => ADMIN_MAKE_MENU_SELECTION("member", "act", "sel_act[".$sel."]", $act),
- 'what' => ADMIN_MAKE_MENU_SELECTION("member", "what", "sel_what[".$sel."]", $wht),
+ 'act' => ADMIN_MAKE_MENU_SELECTION('member', "act", "sel_act[".$sel."]", $act),
+ 'what' => ADMIN_MAKE_MENU_SELECTION('member', "what", "sel_what[".$sel."]", $wht),
);
// Load template
$OUT .= LOAD_TEMPLATE("admin_mmenu_edit_row", true, $content);
// Del menu entries with or without confirmation
define('__SUB_VALUE', $SUB);
define('__CHK_VALUE', $chk);
- $SW = 2; $cnt = 0; $OUT = "";
+ $SW = 2; $cnt = 0; $OUT = '';
foreach (REQUEST_POST('sel') as $sel => $confirm) {
if ($confirm == 1) {
$cnt++;
// Change status (visible / locked)
define('__SUB_VALUE', $SUB);
define('__CHK_VALUE', $chk);
- $SW = 2; $cnt = 0; $OUT = "";
+ $SW = 2; $cnt = 0; $OUT = '';
foreach (REQUEST_POST('sel') as $sel => $confirm) {
if ($confirm == 1) {
$cnt++;
}
// Load template
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SETTINGS_SAVED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SETTINGS_SAVED'));
} else {
if ((REQUEST_ISSET_GET(('act'))) && (REQUEST_ISSET_GET(('tid'))) && (REQUEST_ISSET_GET(('fid')))) {
// Init
- $tid = ""; $fid = "";
+ $tid = ''; $fid = '';
// Get IDs
if (REQUEST_ISSET_GET(('w'))) {
// @TODO Rewrite this constant
define('__SUB_VALUE', $SUB);
- $SW = 2; $cnt = 0; $OUT = "";
+ $SW = 2; $cnt = 0; $OUT = '';
while ($content = SQL_FETCHARRAY($result)) {
// Init navigation
- $content['navi'] = "";
+ $content['navi'] = '';
$cnt++;
if (($content['sort'] == 0) || (($content['sort'] == 1) && (!empty($SUB)))) {
// Is highest position
LOAD_TEMPLATE("admin_mmenu_overview");
} else {
// Menu entries are missing... (???)
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_NO_MENUS_FOUND'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NO_MENUS_FOUND'));
}
}
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Optimize and repair database and return the result as a multi-dimensional array
$DATA = REPAIR_OPTIMIZE_DB();
// Output rows
-$SW = 2; $gain_tabs = 0; $OUT = "";
+$SW = 2; $gain_tabs = 0; $OUT = '';
foreach ($DATA['tables'] as $row_array)
{
// Init variables
- $B1 = ""; $B2 = "";
+ $B1 = ''; $B2 = '';
// Fixes a bug which causes a parser error on eval'd code
if (empty($row_array[1])) $row_array[1] = "NONE";
}
// Add description as navigation point
-// In Opera browsers the menu is being displayed double: ADD_DESCR("admin", __FILE__);
+// In Opera browsers the menu is being displayed double: ADD_DESCR('admin', __FILE__);
// Otherwise load include file 'overview-inc' (old standard overview page)
LOAD_INC_ONCE("inc/modules/admin/overview-inc.php");
$jobsDone = true;
-$taskExt = false; // Default is that "task" is not installed
+$taskExt = false; // Default is that 'task' is not installed
// When the admin is logging in check several things first (new jobs to complete and so on)
if ($GLOBALS['action'] == "login") {
- if (EXT_IS_ACTIVE("task")) {
+ if (EXT_IS_ACTIVE('task')) {
// When task extension is registered output advanced overview page
$jobsDone = OUTPUT_ADVANCED_OVERVIEW($result_tasks); // This function is provided by the extension 'task'
$taskExt = true;
// Are we in 'welcome' page and are there jobs to be done?
if (!ifAdminMenuHasEntries($GLOBALS['action'])) {
// This menu is empty and so no content is displayed
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_MENU_IS_EMPTY'), $GLOBALS['action']));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_MENU_IS_EMPTY'), $GLOBALS['action']));
} elseif ($jobsDone === true) {
// Generate overview of all main menus
if ((is_array($GLOBALS['menu']['description'])) && (count($GLOBALS['menu']['description']) > 0)) {
- $OUT = "";
+ $OUT = '';
foreach ($GLOBALS['menu']['description'] as $key => $value) {
// Prepare content
$content = array(
LOAD_TEMPLATE("admin_menu_hints", false, $OUT);
}
} elseif (!$taskExt) {
- if (EXT_IS_ACTIVE("task")) {
+ if (EXT_IS_ACTIVE('task')) {
// Output warning message
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('EXTENSION_WARNING_EXT_INACTIVE'), "task"));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('EXTENSION_WARNING_EXT_INACTIVE'), 'task'));
}
// List selected tasks on overview when task management is not active
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
-if (((!REQUEST_ISSET_POST(('t_wait'))) || (!REQUEST_ISSET_POST(('payment')))) && (REQUEST_ISSET_GET('do')) && (REQUEST_GET('do') == "add")) {
+if (((!REQUEST_ISSET_POST(('t_wait'))) || (!REQUEST_ISSET_POST(('payment')))) && (REQUEST_ISSET_GET('do')) && (REQUEST_GET('do') == 'add')) {
REQUEST_UNSET_POST('ok');
}
if (IS_FORM_SENT()) {
switch (REQUEST_GET('do')) {
- case "add":
+ 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__);
}
// Output template
- LOAD_TEMPLATE("admin_settings_saved", false, $content);
+ LOAD_TEMPLATE('admin_settings_saved', false, $content);
} elseif ((REQUEST_ISSET_POST('del')) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
// Delete entries here
- $OUT = ""; $SW = 2;
+ $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__);
LOAD_TEMPLATE("admin_del_payments");
} elseif ((REQUEST_ISSET_POST('edit')) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
// Edit entries
- $OUT = ""; $SW = 2;
+ $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__);
$result = SQL_QUERY("SELECT id, time, payment, mail_title, price FROM `{!_MYSQL_PREFIX!}_payments` ORDER BY time", __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Make referal levels editable and deletable
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
// List already existing categories for editing
while ($content = SQL_FETCHARRAY($result)) {
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Init variable
$SEL = 0;
if (IS_FORM_SENT()) {
// Fix older calls from add-new-banner-form
- if (!REQUEST_ISSET_GET(('mode'))) REQUEST_SET_GET('mode', "add");
- $sql = "";
+ if (!REQUEST_ISSET_GET(('mode'))) REQUEST_SET_GET('mode', 'add');
+ $sql = '';
switch (REQUEST_GET('mode'))
{
- case "add":
+ 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__);
} else {
$content = "<span class=\"admin_failed\">{--SETTINGS_NOT_SAVED--}</span>";
}
- LOAD_TEMPLATE("admin_settings_saved", false, $content);
+ LOAD_TEMPLATE('admin_settings_saved', false, $content);
} elseif (($SEL > 0) && (REQUEST_ISSET_POST('edit'))) {
// Edit banner
- $SW = ""; $OUT = "";
+ $SW = ''; $OUT = '';
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",
__FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Make referal banner editable and deletable
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
// Preapre data for the row
// @TODO Rewritings: alt->alternate,cnt->counter,clx->clicks in template
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
$ACTIONS = array();
}
// Output message
-LOAD_TEMPLATE("admin_settings_saved", false, $message);
+LOAD_TEMPLATE('admin_settings_saved', false, $message);
//
?>
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
$result = SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_cats` ORDER BY userid", __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
}
// Load template
-LOAD_TEMPLATE("admin_settings_saved", false, $content);
+LOAD_TEMPLATE('admin_settings_saved', false, $content);
//
?>
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
$ACTIONS = array();
// First fix all main menus (what="")...
}
// Output message
-LOAD_TEMPLATE("admin_settings_saved", false, $message);
+LOAD_TEMPLATE('admin_settings_saved', false, $message);
//
?>
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
$ACTIONS = array();
}
// Output message
-LOAD_TEMPLATE("admin_settings_saved", false, $message);
+LOAD_TEMPLATE('admin_settings_saved', false, $message);
//
?>
if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif (!EXT_IS_ACTIVE("order")) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "order");
+} elseif (!EXT_IS_ACTIVE('order')) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'order');
return;
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Set empty mode to "select"
if (!REQUEST_ISSET_GET('mode')) REQUEST_SET_GET('mode', "select");
// Store send mode
define('__MODE', REQUEST_GET(('mode')));
- if (EXT_IS_ACTIVE("html_mail")) {
+ if (EXT_IS_ACTIVE('html_mail')) {
// If HTML extension is active
define('__HTML_SELECT', LOAD_TEMPLATE("admin_send_bonus_html", true));
} else {
// And if not
- define('__HTML_SELECT', "");
+ define('__HTML_SELECT', '');
}
// Select template
switch(REQUEST_GET('mode')) {
- case "html": // HTML mails
- case "normal": // Normal mails
+ case 'html': // HTML mails
+ case 'normal': // Normal mails
$template = "admin_send_bonus_form";
break;
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
if (IS_FORM_SENT()) {
$result = SQL_QUERY("SELECT userid, email
// Members are available so we can send out the newsletter!
while ($content = SQL_FETCHARRAY($result)) {
// Construct mail...
- $template = "newsletter";
+ $template = 'newsletter';
// Check for extension and sending-mode
- if (!EXT_IS_ACTIVE("html_mail", true) && (REQUEST_POST('mode') == "html")) {
+ if (!EXT_IS_ACTIVE('html_mail', true) && (REQUEST_POST('mode') == 'html')) {
// Set mode to text mode
REQUEST_POST('mode') == "text";
- } elseif (REQUEST_POST('mode') == "html") {
+ } elseif (REQUEST_POST('mode') == 'html') {
// Set HTML templates
$template = "newsletter_html";
}
SQL_FREERESULT($result);
// Output message
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_NL_SEND_DONE'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NL_SEND_DONE'));
}
} else {
// Copy data into constants for the template and load it
// @TODO Rewrite this constant
define('_DATESTAMP', MAKE_DATETIME(time(), "3"));
- if (EXT_IS_ACTIVE("html_mail")) {
+ if (EXT_IS_ACTIVE('html_mail')) {
// Load template with HTML mode
LOAD_TEMPLATE("admin_newsletter");
} else {
// Some security stuff...
if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+ $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
require($INC);
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// If var is empty set it to empty
-if (!REQUEST_ISSET_GET('mod')) REQUEST_SET_GET('mod', "");
+if (!REQUEST_ISSET_GET('mod')) REQUEST_SET_GET('mod', '');
// Check if module was selected
-if ((REQUEST_GET('mod') == "index") || (REQUEST_GET('mod') == "login")) {
+if ((REQUEST_GET('mod') == 'index') || (REQUEST_GET('mod') == 'login')) {
// Select menu system
- $mod = "";
+ $mod = '';
switch (REQUEST_GET('mod')) {
- case "index": $mod = "guest" ; break;
- case "login": $mod = "member"; break;
+ case 'index': $mod = 'guest' ; break;
+ case 'login': $mod = 'member'; break;
default: // Unknown
DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown mod %s detected.", REQUEST_GET('mod')));
break;
// 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__);
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
// Add color switch
$content['sw'] = $SW;
// Load row template
- $OUT .= LOAD_TEMPLATE("admin_mods_stats2_row", true, $content);
+ $OUT .= LOAD_TEMPLATE('admin_mods_stats2_row', true, $content);
// Switch colors
$SW = 3 - $SW;
define('__MODS_ROWS', $OUT);
// Load final template
- LOAD_TEMPLATE("admin_mods_stats2");
+ LOAD_TEMPLATE('admin_mods_stats2');
} else {
// Load module statics
$result = SQL_QUERY("SELECT module, title, clicks FROM `{!_MYSQL_PREFIX!}_mod_reg` ORDER BY clicks DESC, module", __FILE__, __LINE__);
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
- if (empty($content['title'])) $content['title'] = "---";
+ if (empty($content['title'])) $content['title'] = '---';
- if (($content['module'] == "index") || ($content['module'] == "login")) {
+ if (($content['module'] == 'index') || ($content['module'] == 'login')) {
// Add link to detail statistics
$content['module'] = "<strong><a href=\"{!URL!}/modules.php?module=admin&what=stats_mods&mod=".$content['module']."\">".$content['module']."</a></strong>";
} // END - if
$content['sw'] = $SW;
// Load row template
- $OUT .= LOAD_TEMPLATE("admin_mods_stats_row", true, $content);
+ $OUT .= LOAD_TEMPLATE('admin_mods_stats_row', true, $content);
} // END - while
// Free memory
define('__MODS_ROWS', $OUT);
// Load final template
- LOAD_TEMPLATE("admin_mods_stats");
+ LOAD_TEMPLATE('admin_mods_stats');
}
//
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Fix a notice
-if (!REQUEST_ISSET_GET(('uid'))) REQUEST_SET_GET('uid', "");
+if (!REQUEST_ISSET_GET('uid')) REQUEST_SET_GET('uid', '');
if (REQUEST_GET('uid') == "all") {
// Add points to all accounts
SQL_FREERESULT($result_main);
// Output message
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_ALL_POINTS_SUBTRACTED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_ALL_POINTS_SUBTRACTED'));
} else {
// Display form add points
LOAD_TEMPLATE("admin_sub_points_all");
}
-} elseif (REQUEST_ISSET_GET(('uid'))) {
+} 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__);
SEND_EMAIL($content['email'], getMessage('ADMIN_SUB_SUBJ'), $msg);
// Output message
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_POINTS_SUBTRACTED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_POINTS_SUBTRACTED'));
} else {
// @TODO Rewrite these constants
define('__USER_VALUE', "<a href=\"".CREATE_EMAIL_LINK($content['email'], "user_data")."\">".$content['surname']." ".$content['family']."</a>");
}
} else {
// User not found!
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))."</div>");
+ LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"admin_failed\">".sprintf(getMessage('ADMIN_MEMBER_404'), REQUEST_GET('uid'))."</div>");
}
// Free result
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Is the 'url_id' set?
if (REQUEST_ISSET_GET(('url_id'))) {
// Entries found?
if (SQL_NUMROWS($result) > 0) {
// Get all rows
- $OUT = ""; $SW = 2; $cnt = 0; $visits = 0;
+ $OUT = ''; $SW = 2; $cnt = 0; $visits = 0;
while ($content = SQL_FETCHARRAY($result)) {
// Count totals
$visits += $content['total_visits'];
LOAD_TEMPLATE("admin_surfbar_url_stats", false, $content);
} else {
// No statistics so far
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_SURFBAR_NO_URL_STATS'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_NO_URL_STATS'));
}
} else {
// Generate general statistics
// Entries found?
if (SQL_NUMROWS($result) > 0) {
// Get all rows
- $OUT = ""; $SW = 2; $urls = 0; $visits = 0;
+ $OUT = ''; $SW = 2; $urls = 0; $visits = 0;
while ($content = SQL_FETCHARRAY($result)) {
// Count totals
$urls += $content['visited_urls'];
LOAD_TEMPLATE("admin_surfbar_stats", false, $content);
} else {
// No statistics so far
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_SURFBAR_NO_STATS'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_NO_STATS'));
}
}
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Normally we want the overview of all registered theme_check
$mode = "overview";
// Get count of theme_check for validation
$count = trim($response[count($response) - 2]);
foreach ($response as $idx => $value) {
- $value = str_replace("\n", "", $value); $ver = "";
+ $value = str_replace("\n", '', $value); $ver = '';
// Leave loop when data is invalid or EOF?
if ((substr($value, 0, 6) == "theme-") && (substr($value, -4) == ".zip")) {
array_pk_sort($THEMES, array("cver", "fname"), 0, 1);
// Extensions where found which are not downloaded and installed
- $OUT = ""; $SW = 2; $TSIZE = 0;
+ $OUT = ''; $SW = 2; $TSIZE = 0;
foreach ($THEMES['fname'] as $idx => $name) {
// Generate download link
$LINK = SERVER_URL."/themes/theme-".$name.".zip";
}
} else {
// No theme where found
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_THEME_NOTHING_FOUND'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_THEME_NOTHING_FOUND'));
}
//
if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif (!EXT_IS_ACTIVE("theme")) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "theme");
+} elseif (!EXT_IS_ACTIVE('theme')) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'theme');
return;
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Check for selected themes
$SEL = 0;
if (REQUEST_ISSET_POST('sel')) $SEL = SELECTION_COUNT(REQUEST_POST('sel'));
if ($SEL > 0) {
- $OUT = "";
+ $OUT = '';
foreach (REQUEST_POST('sel') as $id => $sel) {
- $sql = "";
+ $sql = '';
// Shall I de-/activate or delete themes?
if (REQUEST_ISSET_POST(('status'))) {
// Change status
- if (REQUEST_POST('active', $id) == "Y") {
+ if (REQUEST_POST('active', $id) == 'Y') {
$sql = "UPDATE `{!_MYSQL_PREFIX!}_themes` SET theme_active='N' WHERE id='".$id."' LIMIT 1";
} else {
$sql = "UPDATE `{!_MYSQL_PREFIX!}_themes` SET theme_active='Y' WHERE id='".$id."' LIMIT 1";
}
// Switch to testing mode
-$GLOBALS['theme_mode'] = "test";
+$GLOBALS['theme_mode'] = 'test';
// Generate output lines for the template
-$OUT = ""; $SW = 2;
+$OUT = ''; $SW = 2;
$result = SQL_QUERY("SELECT id, theme_path, theme_active, theme_ver, theme_name FROM `{!_MYSQL_PREFIX!}_themes` ORDER BY theme_path", __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
while ($content = SQL_FETCHARRAY($result)) {
// No themes found???
$OUT .= "<tr>
<td colspan=\"7\" class=\"bottom2\" height=\"60\">
- ".LOAD_TEMPLATE("admin_settings_saved", true, getMessage('ADMIN_NO_THEMES_FOUND'))."
+ ".LOAD_TEMPLATE('admin_settings_saved', true, getMessage('ADMIN_NO_THEMES_FOUND'))."
</td>
</tr>\n";
}
if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif (!EXT_IS_ACTIVE("theme")) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "theme");
+} elseif (!EXT_IS_ACTIVE('theme')) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'theme');
return;
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Switch to testing mode
-$GLOBALS['theme_mode'] = "test";
+$GLOBALS['theme_mode'] = 'test';
// Import selected theme if not present
if (REQUEST_ISSET_POST(('theme'))) {
}
// Output message
- LOAD_TEMPLATE("admin_settings_saved", false, $msg);
+ LOAD_TEMPLATE('admin_settings_saved', false, $msg);
} // END - if
// Initialize array
array_pk_sort($THEMES, array("theme_name"));
// Generate output lines for the template
-$OUT = ""; $SW = 2;
+$OUT = ''; $SW = 2;
foreach ($THEMES['theme_unix'] as $key => $unix) {
// Already installed is default
$FOUND = "<div class=\"admin_note\">{--ADMIN_THEME_ALREADY_INSTALLED--}</div>";
if (empty($OUT)) {
// No themes found???
- $OUT .= LOAD_TEMPLATE("admin_theme_import_none", true, LOAD_TEMPLATE("admin_settings_saved", true, getMessage('ADMIN_NO_THEMES_FOUND')));
+ $OUT .= LOAD_TEMPLATE("admin_theme_import_none", true, LOAD_TEMPLATE('admin_settings_saved', true, getMessage('ADMIN_NO_THEMES_FOUND')));
} // END - if
// Set the generated list
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Define some variables
global $DATA;
SQL_FREERESULT($result);
// Is the surfbar installed?
- if ((EXT_IS_ACTIVE("surfbar")) && (getConfig('surfbar_migrate_order') == "Y")) {
+ if ((EXT_IS_ACTIVE('surfbar')) && (getConfig('surfbar_migrate_order') == 'Y')) {
// Then "migrate" the URL to the surfbar
SURFBAR_ADMIN_MIGRATE_URL($DATA['url'], $DATA['sender']);
} // END - if
// Check for bonus extension version >= 0.4.4 for the order bonus
- if ((GET_EXT_VERSION("bonus") >= "0.4.4") && (getConfig('bonus_active') == "Y")) {
+ 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__);
}
// Mails unlocked for mail delivery
- LOAD_TEMPLATE("admin_settings_saved", false, $message);
+ LOAD_TEMPLATE('admin_settings_saved', false, $message);
} elseif (REQUEST_ISSET_POST(('reject'))) {
if ($SEL > 0) {
// Reject mail orders
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
foreach (REQUEST_POST('sel') as $id => $value) {
// Secure ID number
$id = bigintval($id);
LOAD_TEMPLATE("admin_unlock_emails_redir");
} else {
// Nothing selected
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_MAILS_NOTHING_CHECKED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_MAILS_NOTHING_CHECKED'));
}
- } elseif ((REQUEST_ISSET_POST(('lock'))) && ($SEL > 0) && (getConfig('url_blacklist') == "Y")) {
+ } elseif ((REQUEST_ISSET_POST(('lock'))) && ($SEL > 0) && (getConfig('url_blacklist') == 'Y')) {
// Lock URLs
foreach (REQUEST_POST('sel') as $id => $url) {
// Secure id number
} // END - foreach
// Output message
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_URLS_BLOCKED'));
- } elseif ((!REQUEST_ISSET_POST(('lock'))) && (!REQUEST_ISSET_POST(('accept'))) && (!REQUEST_ISSET_POST(('reject'))) && (getConfig('url_blacklist') == "Y")) {
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_URLS_BLOCKED'));
+ } elseif ((!REQUEST_ISSET_POST(('lock'))) && (!REQUEST_ISSET_POST(('accept'))) && (!REQUEST_ISSET_POST(('reject'))) && (getConfig('url_blacklist') == 'Y')) {
// Mail orders are in pool so we can display them
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result_main)) {
// Prepare data for the template
$content = array(
// Prepare rejection URL
$REJECT = "http://";
- if (GET_EXT_VERSION("other") >= "0.1.6") $REJECT = getConfig('reject_url');
+ if (GET_EXT_VERSION('other') >= '0.1.6') $REJECT = getConfig('reject_url');
define('__REJECT_URL', $REJECT);
// Load main template
LOAD_TEMPLATE("admin_unlock_emails");
} elseif ((REQUEST_ISSET_POST(('lock'))) && (getConfig('url_blacklist') != "Y")) {
// URL blacklist not activated
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_URL_BLACKLIST_DISABLED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_URL_BLACKLIST_DISABLED'));
} else {
// Wrong call!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_WRONG_CALL'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_WRONG_CALL'));
}
} else {
// No mail orders fond
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_NO_MAILS_IN_POOL'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_NO_MAILS_IN_POOL'));
}
//
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Check if admin has submitted form
if (IS_FORM_SENT()) {
$REFERRAL = SQL_FETCHARRAY($result);
// Send warnings out?
- if ($REFERRAL['receive_warnings'] == "Y") {
+ if ($REFERRAL['receive_warnings'] == 'Y') {
// Translate some data
$REFERRAL['points'] = TRANSLATE_COMMA($REFERRAL['points']);
$REFERRAL['ref_points'] = TRANSLATE_COMMA(getConfig('sponsor_ref_points'));
}
} else {
// Nothing selected
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_SPONSOR_NONE_SELECTED_UNLOCK'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SPONSOR_NONE_SELECTED_UNLOCK'));
}
// Add seperator
if (SQL_NUMROWS($result) > 0) {
// Entries found so let's list them!
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
// Transfer data to array
// @TODO Rewritings: remote->remote_addr, created->sponsor_created in template
LOAD_TEMPLATE("admin_unlock_sponsor");
} else {
// No pending accounts found
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_SPONSOR_NONE_PENDING'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SPONSOR_NONE_PENDING'));
}
// Free memory
} // END - if
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Is the form sent?
if ((REQUEST_ISSET_POST(('unlock'))) && (is_array(REQUEST_POST('id'))) && (count(REQUEST_POST('id')) > 0)) {
// Unlock selected URLs
if (SURFBAR_ADMIN_UNLOCK_URL_IDS(REQUEST_POST('id'))) {
// Unlock done! :-)
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_SURFBAR_UNLOCK_DONE'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_UNLOCK_DONE'));
} else {
// Unlock failed!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_SURFBAR_UNLOCK_FAILED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_UNLOCK_FAILED'));
}
} elseif ((REQUEST_ISSET_POST(('reject'))) && (is_array(REQUEST_POST('id'))) && (count(REQUEST_POST('id')) > 0)) {
// Reject selected URLs
if (SURFBAR_ADMIN_REJECT_URL_IDS(REQUEST_POST('id'))) {
// Unlock done! :-)
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_SURFBAR_UNLOCK_DONE'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_UNLOCK_DONE'));
} else {
// Unlock failed!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_SURFBAR_UNLOCK_FAILED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_UNLOCK_FAILED'));
}
}
// Do we have some URLs left?
if (SQL_NUMROWS($result) > 0) {
// List all URLs
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
// "Translate"/add content
$content['sw'] = $SW;
LOAD_TEMPLATE("admin_unlock_surfbar_urls", false, $OUT);
} else {
// No URLs in surfbar
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_SURFBAR_NO_URLS_FOUND'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_NO_URLS_FOUND'));
}
// Free result
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Init array
$ONLINE['code'] = "???";
if (empty($response[0]) && empty($response[1]) && empty($response[2]) && empty($response[3])) {
// Error!
- $response = array("", "", "");
+ $response = array("", '', '');
} else {
// Analyse header for response code
if (eregi("200 OK", $response[0])) {
// Which is the latest version on server?
$ONLINE = array(
- 'version' => str_replace("\n", "", $response[0]),
- 'changed' => str_replace("\n", "", $response[1]),
- 'revision' => str_replace("\n", "", $response[2]),
+ 'version' => str_replace("\n", '', $response[0]),
+ 'changed' => str_replace("\n", '', $response[1]),
+ 'revision' => str_replace("\n", '', $response[2]),
);
// Array for available patches
if (($response[3] != "[EOF]") && ($ONLINE['version'] == constant('FULL_VERSION'))) {
// We have found new patches (newer than FULL_VERSION)
- $max = str_replace("\n", "", $response[count($response) - 2]); $totalSize = 0;
+ $max = str_replace("\n", '', $response[count($response) - 2]); $totalSize = 0;
// Maximum of available pacthes extracted (above). Now we can get all informations
for ($idx = 0; $idx < $max; $idx++) {
// List only newer patches
- $TEST = substr(str_replace("\n", "", $response[$idx * 5 + 2]), 0, strlen(getConfig('patch_level')));
+ $TEST = substr(str_replace("\n", '', $response[$idx * 5 + 2]), 0, strlen(getConfig('patch_level')));
// I have removed the addional test for the stored timemark in database or you cannot find
// new updates on my server when you haven't installed it before I upload a patch... :-(
if (bigintval($TEST) > getConfig(('patch_level'))) {
// Copy every data from the response array
- $PATCHES['fname'][] = str_replace("\n", "", $response[$idx * 5 + 2]);
- $PATCHES['fsize'][] = str_replace("\n", "", $response[$idx * 5 + 3]);
- $PATCHES['ctime'][] = str_replace("\n", "", $response[$idx * 5 + 4]);
+ $PATCHES['fname'][] = str_replace("\n", '', $response[$idx * 5 + 2]);
+ $PATCHES['fsize'][] = str_replace("\n", '', $response[$idx * 5 + 3]);
+ $PATCHES['ctime'][] = str_replace("\n", '', $response[$idx * 5 + 4]);
switch (GET_LANGUAGE()) {
- case "de": $PATCHES['descr'][] = str_replace("\n", "", $response[$idx * 5 + 5]); break; // Load german description
- default : $PATCHES['descr'][] = str_replace("\n", "", $response[$idx * 5 + 6]); break; // Load english description as default
+ case "de": $PATCHES['descr'][] = str_replace("\n", '', $response[$idx * 5 + 5]); break; // Load german description
+ default : $PATCHES['descr'][] = str_replace("\n", '', $response[$idx * 5 + 6]); break; // Load english description as default
}
// Add patch's size to total
// Is a newer version available?
if (empty($ONLINE['version'])) {
// Disconnected?
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"admin_failed\">{--ADMIN_CANNOT_CHECK_VERSION--} (".$ONLINE['code'].")</div>");
+ LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"admin_failed\">{--ADMIN_CANNOT_CHECK_VERSION--} (".$ONLINE['code'].")</div>");
} elseif (($ONLINE['version'] != constant('FULL_VERSION')) || ($ONLINE['revision'] != constant('CURR_SVN_REVISION'))) {
// New full-version available (all previous released patches are included in this version!)
define('__ONLINE_VERSION', $ONLINE['version']);
LOAD_TEMPLATE("admin_update_download");
} else {
// You have the latest version!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('NO_UPDATES_AVAILABLE'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('NO_UPDATES_AVAILABLE'));
}
//
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Base directory (should be moved to database)
$usage = getConfig('usage_base')."/";
if (REQUEST_ISSET_GET(('image'))) {
- if (REQUEST_GET('type') == "usage") {
+ if (REQUEST_GET('type') == 'usage') {
$FQFN = sprintf("%s%s/usage.png",
constant('PATH'),
getConfig('usage_base')
$content = str_replace("daily_usage_", "{!URL!}/modules.php?module=admin&what=".$GLOBALS['what']."&type=daily&image=", $content);
$content = str_replace("hourly_usage_", "{!URL!}/modules.php?module=admin&what=".$GLOBALS['what']."&type=hourly&image=", $content);
$content = str_replace("ctry_usage_", "{!URL!}/modules.php?module=admin&what=".$GLOBALS['what']."&type=ctry&image=", $content);
- $content = str_replace("usage_", "{!URL!}/modules.php?module=admin&what=".$GLOBALS['what']."&usage=", str_replace(".html", "", $content));
+ $content = str_replace("usage_", "{!URL!}/modules.php?module=admin&what=".$GLOBALS['what']."&usage=", str_replace(".html", '', $content));
// Disabled due to too much trouble
//$content = str_replace("HREF=\"http://", "href=\"{!URL!}/modules.php?module=loader&url=http://", $content);
".$content."
</div>");
} else {
- // Nothing to load, then we have no directory "usage"
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('ADMIN_USAGE_DIRECTORY_404'), getConfig('usage_base')));
+ // Nothing to load, then we have no directory 'usage'
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('ADMIN_USAGE_DIRECTORY_404'), getConfig('usage_base')));
}
//
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Is a user id given?
-if ((REQUEST_ISSET_GET(('uid'))) && (bigintval(REQUEST_GET('uid')) > 0)) {
+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__);
// Send contact form out
$msg = LOAD_EMAIL_TEMPLATE("member_contct", $content);
SEND_EMAIL($content['email'], getMessage('ADMIN_CONTACT_USER_SUBJECT'), $msg);
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_USER_CONTACTED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_USER_CONTACTED'));
} else {
// Load contact form template
LOAD_TEMPLATE("admin_contct_user_form", false, $content);
}
} else {
// Not found?
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(USER_ACCOUNT_404, bigintval(REQUEST_GET('uid'))));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(USER_ACCOUNT_404, bigintval(REQUEST_GET('uid'))));
}
// Free result
}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Online stats are only working if extension ext-online is installed
-if (EXT_IS_ACTIVE("online")) {
+if (EXT_IS_ACTIVE('online')) {
// Count guests, members and admins
// @TODO Rewrite these constants
// @TODO Add a filter for sponsor
- define('_GUESTS_ONLINE' , GET_TOTAL_DATA("N", "online", "id", "is_admin", true, " AND is_member='N'"));
- define('_ADMINS_ONLINE' , GET_TOTAL_DATA("N", "online", "id", "is_admin", true, " AND is_member='Y'"));
- define('_MEMBERS_ONLINE', GET_TOTAL_DATA("N", "online", "id", "is_admin", true));
+ define('_GUESTS_ONLINE' , GET_TOTAL_DATA("N", 'online', "id", "is_admin", true, " AND is_member='N'"));
+ define('_ADMINS_ONLINE' , GET_TOTAL_DATA("N", 'online', "id", "is_admin", true, " AND is_member='Y'"));
+ define('_MEMBERS_ONLINE', GET_TOTAL_DATA("N", 'online', "id", "is_admin", true));
// Load template
LOAD_TEMPLATE("admin_mini_online");
if (empty($content['action'])) $content['action'] = "---";
if (empty($content['what'])) $content['what'] = "---";
- if ($content['is_admin'] == "Y") {
+ if ($content['is_admin'] == 'Y') {
// Is an administrator
$content['userid'] = getMessage('_IS_ADMIN');
- } elseif (($content['is_member'] == "N") && ($content['is_admin'] == "N")) {
+ } elseif (($content['is_member'] == 'N') && ($content['is_admin'] == 'N')) {
// Is a guest
$content['userid'] = getMessage('_IS_GUEST');
} elseif ($content['userid'] > 0) {
} // END - if
} else {
// Online statistics deactivated!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ONLINE_STATISTICS_DEACTIVATED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ONLINE_STATISTICS_DEACTIVATED'));
}
//
if (isUserIdSet() && (isSessionVariableSet('u_hash'))) {
// Login failures are supported since 0.4.7
// Do we have 0.4.7 of sql_patches or later?
- $add = "";
- if (GET_EXT_VERSION("sql_patches") >= "0.6.1") {
+ $add = '';
+ if (GET_EXT_VERSION('sql_patches') >= '0.6.1') {
// Load them here
$add = ", login_failures, UNIX_TIMESTAMP(last_failure) AS last_failure";
} // END - if
set_session('mxchange_theme', $data['curr_theme']);
// Remmeber login failures if available
- if (GET_EXT_VERSION("sql_patches") >= "0.6.1") {
+ if (GET_EXT_VERSION('sql_patches') >= '0.6.1') {
// Reset login failures
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data`
SET login_failures=0, last_failure='0000-00-00 00:00:00'
// Bonus is not given by default ;-)
$bonus = false;
- if ((GET_EXT_VERSION("sql_patches") >= "0.2.8") && (GET_EXT_VERSION("bonus") >= "0.2.1") && (getConfig('bonus_login_yn') == "Y")) {
+ if ((GET_EXT_VERSION('sql_patches') >= '0.2.8') && (GET_EXT_VERSION('bonus') >= '0.2.1') && (getConfig('bonus_login_yn') == 'Y')) {
// Update last login if far enougth away
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data`
SET last_login=UNIX_TIMESTAMP()
if (SQL_AFFECTEDROWS() == 1) $bonus = true;
} // END - if
- if (($bonus) && (REQUEST_GET('mode') == "bonus") && (EXT_IS_ACTIVE("bonus"))) {
+ if (($bonus) && (REQUEST_GET('mode') == 'bonus') && (EXT_IS_ACTIVE('bonus'))) {
// Output message with added points
$message .= "<div class=\"tiny\">
".sprintf(getMessage('BONUS_LOGIN_BONUS_ADDED'), TRANSLATE_COMMA(getConfig('login_bonus')))."
</div>";
- } elseif (EXT_IS_ACTIVE("bonus")) {
+ } elseif (EXT_IS_ACTIVE('bonus')) {
// No login bonus added!
$message .= "<div class=\"member_failed\">{--BONUS_LOGIN_BONUS_NOT_ADDED--}</div>";
}
}
// Output final message
-LOAD_TEMPLATE("admin_settings_saved", false, $message);
+LOAD_TEMPLATE('admin_settings_saved', false, $message);
//
?>
require($INC);
}
-$MODE = "guest";
+$MODE = 'guest';
if (REQUEST_ISSET_GET(('order'))) {
// Order number placed, is he also logged in?
REQUEST_SET_POST('url', $url);
// Mode is member
- $MODE = "member";
+ $MODE = 'member';
} else {
// Matching line not found!
LOAD_URL("modules.php?module=index&what=login");
if (REQUEST_ISSET_POST(('url'))) $url = REQUEST_POST('url');
// Add missing element
- $frame = "";
+ $frame = '';
if (REQUEST_ISSET_GET(('frame'))) $frame = REQUEST_GET(('frame'));
switch ($frame)
{
case "":
switch ($MODE)
{
- case "member":
+ case 'member':
// Build frameset
define('__ORDER_VALUE', bigintval(REQUEST_GET('order')));
define('__URL_VALUE' , DEREFERER($url));
LOAD_TEMPLATE("member_order_frametester");
break;
- case "guest":
+ case 'guest':
define('__URL_VALUE' , DEREFERER($url));
LOAD_TEMPLATE("guest_frametester");
break;
break;
case "test_top":
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"guest_done\">{--GUEST_FRAMETESTER_TOP--}</span>");
+ LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"guest_done\">{--GUEST_FRAMETESTER_TOP--}</span>");
break;
case "back": // Back buttom
}
// Add description as navigation point
-ADD_DESCR("guest", __FILE__);
+ADD_DESCR('guest', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/guest/what-%s.php", $GLOBALS['what']);
}
// Add description as navigation point
-ADD_DESCR("guest", __FILE__);
+ADD_DESCR('guest', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/guest/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
}
// Add description as navigation point
-ADD_DESCR("guest", __FILE__);
+ADD_DESCR('guest', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/guest/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif ((!EXT_IS_ACTIVE("online")) && (!IS_ADMIN())) {
+} elseif ((!EXT_IS_ACTIVE('online')) && (!IS_ADMIN())) {
// Just skip this extension
return;
}
// Total visitors online
-$total = GET_TOTAL_DATA("", "online", "id", "userid", true);
+$total = GET_TOTAL_DATA("", 'online', "id", 'userid', true);
if (getConfig('mad_count') < $total) {
// Update counter
// Prepare content
$content = array(
- 'guests' => TRANSLATE_COMMA(GET_TOTAL_DATA("N", "online", "id", "is_admin", true, " AND is_member='N'")),
- 'members' => TRANSLATE_COMMA(GET_TOTAL_DATA("N", "online", "id", "is_admin", true, " AND is_member='Y'")),
- 'admins' => TRANSLATE_COMMA(GET_TOTAL_DATA("Y", "online", "id", "is_admin", true)),
+ 'guests' => TRANSLATE_COMMA(GET_TOTAL_DATA("N", 'online', "id", "is_admin", true, " AND is_member='N'")),
+ 'members' => TRANSLATE_COMMA(GET_TOTAL_DATA("N", 'online', "id", "is_admin", true, " AND is_member='Y'")),
+ 'admins' => TRANSLATE_COMMA(GET_TOTAL_DATA("Y", 'online', "id", "is_admin", true)),
'total' => TRANSLATE_COMMA($total)
);
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
require($INC);
-} elseif ((!EXT_IS_ACTIVE("sponsor")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
+} elseif ((!EXT_IS_ACTIVE('sponsor')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'sponsor');
return;
} elseif ($GLOBALS['block_mode']) {
// Block mode detected
}
// Add description as navigation point
-ADD_DESCR("guest", __FILE__);
+ADD_DESCR('guest', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/guest/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif ((!EXT_IS_ACTIVE("theme")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "theme");
+} elseif ((!EXT_IS_ACTIVE('theme')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'theme');
return;
}
// Load all active designs (or all if admin)
-$whereStatement = ""; $OUT = "";
+$whereStatement = ''; $OUT = '';
if (!IS_ADMIN()) $whereStatement = " WHERE theme_active='Y'";
$result_themes = SQL_QUERY("SELECT theme_path FROM `{!_MYSQL_PREFIX!}_themes`".$whereStatement, __FILE__, __LINE__);
$num_themes = SQL_NUMROWS($result_themes);
if ($num_themes > 1) {
// If more than 1 is installed output selection box
- $act = "";
+ $act = '';
if (!empty($GLOBALS['action'])) $act = SQL_ESCAPE($GLOBALS['action']);
- $OUT = THEME_SELECTION_BOX("index", $act, $GLOBALS['what'], $result_themes);
+ $OUT = THEME_SELECTION_BOX('index', $act, $GLOBALS['what'], $result_themes);
} elseif (($num_themes == 1) || ((!IS_ADMIN()) && ($num_themes == 0))) {
// If there's only one just print it's name
define('__THEME_NAME', GET_CURR_THEME_NAME());
$OUT = LOAD_TEMPLATE("theme_one", true);
} elseif (IS_ADMIN()) {
// If there is no theme installed and there's an admin notify him!
- $OUT = LOAD_TEMPLATE("admin_settings_saved", true, "<div class=\"admin_note\">{--ADMIN_NO_THEME_INSTALLED_WARNING--}</div>");
+ $OUT = LOAD_TEMPLATE('admin_settings_saved', true, "<div class=\"admin_note\">{--ADMIN_NO_THEME_INSTALLED_WARNING--}</div>");
}
// Free memory
}
// Add description as navigation point
-ADD_DESCR("guest", __FILE__);
+ADD_DESCR('guest', __FILE__);
// Load default template
LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4));
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif ((!EXT_IS_ACTIVE("active")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "active");
+} elseif ((!EXT_IS_ACTIVE('active')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'active');
return;
}
// Add description as navigation point
-ADD_DESCR("guest", __FILE__);
+ADD_DESCR('guest', __FILE__);
// Extra field to include is by default uid
-$add = "userid";
+$add = 'userid';
// If nickname is installed the extra field is the nickname of the user
-if (EXT_IS_ACTIVE("nickname")) $add = "nickname";
+if (EXT_IS_ACTIVE('nickname')) $add = 'nickname';
// Check for members who were active only this day
$result = SQL_QUERY_ESC("SELECT userid, ".$add.", last_online
// Entries found?
if (SQL_NUMROWS($result) > 0) {
// At least one member was online so let's load them all
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while (list($uid, $nick, $last) = SQL_FETCHROW($result)) {
$nick2 = "---";
if (($nick != $uid) && (!empty($nick))) $nick2 = $nick;
}
// Add description as navigation point
-ADD_DESCR ("guest", basename(__FILE__));
+ADD_DESCR ('guest', basename(__FILE__));
// Load default template
LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4));
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "beg");
+} elseif ((!EXT_IS_ACTIVE('beg')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'beg');
return;
}
// Add description as navigation point
-ADD_DESCR("guest", __FILE__);
+ADD_DESCR('guest', __FILE__);
// Prepare constants
define('__BEG_POINTS' , TRANSLATE_COMMA(getConfig('beg_points')));
}
// Add description as navigation point
-ADD_DESCR("guest", __FILE__);
+ADD_DESCR('guest', __FILE__);
if (REQUEST_ISSET_GET(('hash'))) {
// Initialize the user ID
}
// If version matches add ref bonus to refid's account
- if ((GET_EXT_VERSION("bonus") >= "0.4.4") && (getConfig('bonus_active') == "Y")) {
+ 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__);
} // END - if
} // END - if
- if (EXT_IS_ACTIVE("rallye")) {
+ if (EXT_IS_ACTIVE('rallye')) {
// Add user to rallye (or not?)
RALLYE_AUTOADD_USER(bigintval($uid));
} // END - if
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif ((!EXT_IS_ACTIVE("doubler")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "doubler");
+} elseif ((!EXT_IS_ACTIVE('doubler')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'doubler');
return;
}
// Add description as navigation point
-ADD_DESCR("guest", __FILE__);
+ADD_DESCR('guest', __FILE__);
// Percent values etc.
define('__CHARGE_VALUE', TRANSLATE_COMMA(getConfig('doubler_charge') * 100));
}
// Add description as navigation point
-ADD_DESCR("guest", __FILE__);
+ADD_DESCR('guest', __FILE__);
// Load template template
LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4));
}
// Add description as navigation point
-ADD_DESCR("guest", __FILE__);
+ADD_DESCR('guest', __FILE__);
// Load default template
LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4));
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif ((!EXT_IS_ACTIVE("user")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "user");
+} elseif ((!EXT_IS_ACTIVE('user')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'user');
return;
}
// Add description as navigation point
-ADD_DESCR("guest", __FILE__);
+ADD_DESCR('guest', __FILE__);
global $DATA;
$errorCode = 0;
$probe_nickname = false;
$uid = false;
-$hash = "";
-$URL = "";
-$add = "";
+$hash = '';
+$URL = '';
+$add = '';
// Already logged in?
if ((isUserIdSet()) && (isSessionVariableSet('u_hash'))) {
$uid = getUserId();
} elseif ((REQUEST_ISSET_POST(('id'))) && (REQUEST_ISSET_POST(('password'))) && (IS_FORM_SENT())) {
// Set userid and crypt password when login data was submitted
- if ((EXT_IS_ACTIVE("nickname")) && (NICKNAME_PROBE_ON_USERID(REQUEST_POST('id')))) {
+ if ((EXT_IS_ACTIVE('nickname')) && (NICKNAME_PROBE_ON_USERID(REQUEST_POST('id')))) {
// Nickname entered
$uid = SQL_ESCAPE(REQUEST_POST('id'));
} else {
if (REQUEST_ISSET_POST(('id'))) $uid = REQUEST_POST('id');
} else {
// Not logged in
- $uid = 0; $hash = "";
+ $uid = 0; $hash = '';
}
// Set unset variables
-if (!REQUEST_ISSET_POST(('new_pass'))) REQUEST_SET_POST('new_pass', "");
-if (!REQUEST_ISSET_GET(('login'))) REQUEST_SET_GET('login' , "");
+if (!REQUEST_ISSET_POST(('new_pass'))) REQUEST_SET_POST('new_pass', '');
+if (!REQUEST_ISSET_GET(('login'))) REQUEST_SET_GET('login' , '');
if (IS_MEMBER()) {
// Login immidiately...
case getCode('EXTENSION_PROBLEM'):
if (IS_ADMIN()) {
- $message .= sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), "nickname");
+ $message .= sprintf(getMessage('EXTENSION_PROBLEM_NOT_INSTALLED'), 'nickname');
} else {
$message .= getMessage('LOGIN_WRONG_ID');
}
define('LOGIN_FAILURE_MSG', $message);
} else {
// No problems, no output
- define('LOGIN_FAILURE_MSG', "");
+ define('LOGIN_FAILURE_MSG', '');
}
// Display login form with resend-password form
-if (EXT_IS_ACTIVE("nickname")) {
+if (EXT_IS_ACTIVE('nickname')) {
LOAD_TEMPLATE("guest_nickname_login");
} else {
LOAD_TEMPLATE("guest_login");
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif ((!EXT_IS_ACTIVE("mediadata")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "mediadata");
+} elseif ((!EXT_IS_ACTIVE('mediadata')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'mediadata');
return;
}
// Add description as navigation point
-ADD_DESCR("guest", __FILE__);
+ADD_DESCR('guest', __FILE__);
// @TODO Rewrite all constants
define('value', "value");
define('rows', "rows");
// Get total confirmed user IDs...
-define('user_confirmed' , round(GET_TOTAL_DATA("CONFIRMED" , "user_data", "userid", "status", true)));
-define('user_unconfirmed', round(GET_TOTAL_DATA("UNCONFIRMED", "user_data", "userid", "status", true)));
-define('user_locked' , round(GET_TOTAL_DATA("LOCKED" , "user_data", "userid", "status", true)));
+define('user_confirmed' , round(GET_TOTAL_DATA("CONFIRMED" , "user_data", 'userid', "status", true)));
+define('user_unconfirmed', round(GET_TOTAL_DATA("UNCONFIRMED", "user_data", 'userid', "status", true)));
+define('user_locked' , round(GET_TOTAL_DATA("LOCKED" , "user_data", 'userid', "status", true)));
define('user_count' , (constant('user_confirmed') + constant('user_unconfirmed') + constant('user_locked')));
// Start of this exchange
if (empty($clicks)) $clicks = 0;
// Bonus mails
-if (EXT_IS_ACTIVE("bonus")) {
+if (EXT_IS_ACTIVE('bonus')) {
$bmails = MEDIA_GET_ENTRY("bonus_orders");
if (empty($bmails)) $bmails = 0;
SQL_FREERESULT($result);
// Get total points
-$points = MEDIA_GET_ENTRY("total_points");
+$points = MEDIA_GET_ENTRY('total_points');
if (empty($points)) $points = 0;
if (empty($ref)) $ref = 0;
//
// Initialize Variables
-$OUT_EXTRA = ""; $ROWS_EXTRA = 2;
-$OUT_POINTS = ""; $ROWS_POINTS = 2;
-$OUT_USER = ""; $ROWS_USER = 6;
-$OUT_SPECIAL = ""; // We don't need row count here
+$OUT_EXTRA = ''; $ROWS_EXTRA = 2;
+$OUT_POINTS = ''; $ROWS_POINTS = 2;
+$OUT_USER = ''; $ROWS_USER = 6;
+$OUT_SPECIAL = ''; // We don't need row count here
// @TODO Rewrite these all if-blocks to filters
-if (EXT_IS_ACTIVE("beg")) {
+if (EXT_IS_ACTIVE('beg')) {
// Clicks on beg links
$result = SQL_QUERY("SELECT SUM(beg_clicks) FROM `{!_MYSQL_PREFIX!}_user_data` WHERE beg_clicks>0", __FILE__, __LINE__);
list($extra) = SQL_FETCHROW($result);
$ROWS_EXTRA++;
}
-if (EXT_IS_ACTIVE("doubler")) {
+if (EXT_IS_ACTIVE('doubler')) {
// Total payed points
$result = SQL_QUERY("SELECT COUNT(id), SUM(points) FROM `{!_MYSQL_PREFIX!}_doubler` WHERE completed='Y' AND points > 0", __FILE__, __LINE__);
list($count1, $points1) = SQL_FETCHROW($result);
$OUT_SPECIAL .= LOAD_TEMPLATE("mediadata_extra_row", true, $content);
}
-if (EXT_IS_ACTIVE("holiday")) {
+if (EXT_IS_ACTIVE('holiday')) {
// Total holiday requests
$result = SQL_QUERY("SELECT DISTINCT COUNT(h.userid)
FROM `{!_MYSQL_PREFIX!}_user_holidays` AS h
$ROWS_USER++;
}
-if (EXT_IS_ACTIVE("transfer")) {
+if (EXT_IS_ACTIVE('transfer')) {
// Statistics for points transfers
$result = SQL_QUERY("SELECT DISTINCT COUNT(t.id), SUM(t.points)
FROM `{!_MYSQL_PREFIX!}_user_transfers_in` AS t
define('__PATCH_CTIME', MAKE_DATETIME(getConfig('patch_ctime'), "2"));
// Load template
-LOAD_TEMPLATE("mediadata");
+LOAD_TEMPLATE('mediadata');
//
?>
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif ((!EXT_IS_ACTIVE("rallye")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "rallye");
+} elseif ((!EXT_IS_ACTIVE('rallye')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'rallye');
return;
}
// Add description as navigation point
-ADD_DESCR("guest", __FILE__);
+ADD_DESCR('guest', __FILE__);
OUTPUT_HTML("<div align=\"center\">");
// Check for possible running rallyes
$ADMIN = " AND d.is_active='Y'";
-if (IS_ADMIN()) $ADMIN = "";
+if (IS_ADMIN()) $ADMIN = '';
$result = SQL_QUERY("SELECT DISTINCT d.id, d.admin_id, a.login, d.title, d.descr, d.template, d.start_time, d.end_time, d.min_users, d.min_prices
FROM `{!_MYSQL_PREFIX!}_rallye_data` AS d, `{!_MYSQL_PREFIX!}_admins` AS a
define('__RALLYE_TOP_USERS', "<div align=\"center\" class=\"big\">".__RALLYE_EXTRAS."</div>");
define('__RALLYE_CAN_WIN_THIS', RALLYE_OUR_WINNERS_ARE);
} else {
- define('__RALLYE_PRICES', RALLYE_ADD_PRICES($id, "html"));
+ define('__RALLYE_PRICES', RALLYE_ADD_PRICES($id, 'html'));
define('__RALLYE_TOP_USERS', RALLYE_ADD_TOPUSERS($id, getUserId()));
define('__RALLYE_CAN_WIN_THIS', RALLYE_YOU_CAN_WIN);
}
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif ((!EXT_IS_ACTIVE("register"))) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "register");
+} elseif ((!EXT_IS_ACTIVE('register'))) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'register');
return;
}
// Add description as navigation point
-ADD_DESCR("guest", __FILE__);
+ADD_DESCR('guest', __FILE__);
global $DATA;
if (!IS_FORM_SENT()) REQUEST_UNSET_POST('ok');
-if (!REQUEST_ISSET_POST(('agree'))) REQUEST_SET_POST('agree' , "");
-if (!REQUEST_ISSET_POST(('addy'))) REQUEST_SET_POST('addy' , "");
-if (!REQUEST_ISSET_POST(('surname'))) REQUEST_SET_POST('surname' , "");
-if (!REQUEST_ISSET_POST(('family'))) REQUEST_SET_POST('family' , "");
-if (!REQUEST_ISSET_POST(('pass1'))) REQUEST_SET_POST('pass1' , "");
-if (!REQUEST_ISSET_POST(('pass2'))) REQUEST_SET_POST('pass2' , "");
-if (!REQUEST_ISSET_POST(('day'))) REQUEST_SET_POST('day' , "");
-if (!REQUEST_ISSET_POST(('month'))) REQUEST_SET_POST('month' , "");
-if (!REQUEST_ISSET_POST(('year'))) REQUEST_SET_POST('year' , "");
-if (!REQUEST_ISSET_POST(('max_mails'))) REQUEST_SET_POST('max_mails' , "");
-if (!REQUEST_ISSET_POST(('street_nr'))) REQUEST_SET_POST('street_nr' , "");
-if (!REQUEST_ISSET_POST(('zip'))) REQUEST_SET_POST('zip' , "");
-if (!REQUEST_ISSET_POST(('city'))) REQUEST_SET_POST('city' , "");
-if (!REQUEST_ISSET_POST(('cntry'))) REQUEST_SET_POST('cntry' , "");
+if (!REQUEST_ISSET_POST(('agree'))) REQUEST_SET_POST('agree' , '');
+if (!REQUEST_ISSET_POST(('addy'))) REQUEST_SET_POST('addy' , '');
+if (!REQUEST_ISSET_POST(('surname'))) REQUEST_SET_POST('surname' , '');
+if (!REQUEST_ISSET_POST(('family'))) REQUEST_SET_POST('family' , '');
+if (!REQUEST_ISSET_POST(('pass1'))) REQUEST_SET_POST('pass1' , '');
+if (!REQUEST_ISSET_POST(('pass2'))) REQUEST_SET_POST('pass2' , '');
+if (!REQUEST_ISSET_POST(('day'))) REQUEST_SET_POST('day' , '');
+if (!REQUEST_ISSET_POST(('month'))) REQUEST_SET_POST('month' , '');
+if (!REQUEST_ISSET_POST(('year'))) REQUEST_SET_POST('year' , '');
+if (!REQUEST_ISSET_POST(('max_mails'))) REQUEST_SET_POST('max_mails' , '');
+if (!REQUEST_ISSET_POST(('street_nr'))) REQUEST_SET_POST('street_nr' , '');
+if (!REQUEST_ISSET_POST('zip')) REQUEST_SET_POST('zip' , '');
+if (!REQUEST_ISSET_POST(('city'))) REQUEST_SET_POST('city' , '');
+if (!REQUEST_ISSET_POST(('cntry'))) REQUEST_SET_POST('cntry' , '');
if (!REQUEST_ISSET_POST(('country_code'))) REQUEST_SET_POST('country_code', "1");
// Default refid is zero
REQUEST_SET_POST('pass1', "!");
REQUEST_SET_POST('pass2', "!");
} else {
- if (!REQUEST_ISSET_POST(('pass1'))) { REQUEST_SET_POST('pass1', "!"); } else { REQUEST_SET_POST('pass1', ""); }
- if (!REQUEST_ISSET_POST(('pass2'))) { REQUEST_SET_POST('pass2', "!"); } else { REQUEST_SET_POST('pass2', ""); }
+ if (!REQUEST_ISSET_POST(('pass1'))) { REQUEST_SET_POST('pass1', "!"); } else { REQUEST_SET_POST('pass1', ''); }
+ if (!REQUEST_ISSET_POST(('pass2'))) { REQUEST_SET_POST('pass2', "!"); } else { REQUEST_SET_POST('pass2', ''); }
}
$FAILED = true;
} // END - if
if (!IS_ADMIN()) {
// Do this check only when no admin is logged in
foreach (REQUEST_POST('cat') as $id => $answer) {
- if ($answer == "Y") $cats++;
+ if ($answer == 'Y') $cats++;
} // END - foreach
if ($cats < getConfig('least_cats')) {
} // END - if
} // END - if
- if ((REQUEST_POST('addy') != "!") && (getConfig('check_double_email') == "Y")) {
+ if ((REQUEST_POST('addy') != "!") && (getConfig('check_double_email') == 'Y')) {
// Does the email address already exists in our database?
$CHK = SEARCH_EMAIL_USERTAB(REQUEST_POST('addy'));
if ($CHK) { REQUEST_SET_POST('addy', "?"); $FAILED = true; }
// Get total ...
// ... confirmed, ...
- $confirmedUsers = GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true);
+ $confirmedUsers = GET_TOTAL_DATA("CONFIRMED", "user_data", 'userid', "status", true);
// ... unconfirmed ...
- $unconfirmedUsers = GET_TOTAL_DATA("UNCONFIRMED", "user_data", "userid", "status", true);
+ $unconfirmedUsers = GET_TOTAL_DATA("UNCONFIRMED", "user_data", 'userid', "status", true);
// ... and locked users!
- $lockedUsers = GET_TOTAL_DATA("LOCKED", "user_data", "userid", "status", true);
+ $lockedUsers = GET_TOTAL_DATA("LOCKED", "user_data", 'userid', "status", true);
// Generate hash which will be inserted into confirmation mail
$hash = generateHash(sha1($confirmedUsers.":".$unconfirmedUsers.":".$lockedUsers.":".REQUEST_POST('month')."-".REQUEST_POST('day')."-".REQUEST_POST('year').":".getenv('SERVER_NAME').":".GET_REMOTE_ADDR().":".GET_USER_AGENT()."/".constant('SITE_KEY')."/".constant('DATE_KEY')."/".constant('RAND_NUMBER')));
// Add design when extension sql_patches is v0.2.7 or greater
- $ADD1 = ""; $ADD2 = "";
- if (GET_EXT_VERSION("sql_patches") >= "0.2.7") {
+ $ADD1 = ''; $ADD2 = '';
+ if (GET_EXT_VERSION('sql_patches') >= '0.2.7') {
// Okay, add design here
$ADD1 = ", curr_theme";
$ADD2 = ", '".GET_CURR_THEME()."'";
// @TODO Rewrite this to a single filter
//
// First comes first: begging rallye
- if (GET_EXT_VERSION("beg") >= "0.1.7") {
+ if (GET_EXT_VERSION('beg') >= '0.1.7') {
// Okay, shall I disable now?
if (getConfig('beg_new_mem_notify') != "Y") {
$ADD1 .= ", beg_ral_notify, beg_ral_en_notify";
} // END - if
// Second: active rallye
- if (GET_EXT_VERSION("bonus") >= "0.7.7") {
+ if (GET_EXT_VERSION('bonus') >= '0.7.7') {
// Okay, shall I disable now?
if (getConfig('bonus_new_mem_notify') != "Y") {
$ADD1 .= ", bonus_ral_notify, bonus_ral_en_notify";
} // END - if
// Write user data to table
- if (EXT_IS_ACTIVE("country")) {
+ if (EXT_IS_ACTIVE('country')) {
// Save with new selectable country code
$countryRow = "country_code";
$countryData = bigintval(REQUEST_POST('country_code'));
} else {
// Old way with enterable two-char-code
- $countryRow = "country";
+ $countryRow = 'country';
$countryData = substr(REQUEST_POST('cntry'), 0, 2);
}
// Did this work?
if ($userid == 0) {
// Something bad happened!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('USER_NOT_REGISTERED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('USER_NOT_REGISTERED'));
return;
} // END - if
// Is the refback extension there?
- if (EXT_IS_ACTIVE("refback")) {
+ // @TODO Rewrite this to a filter
+ if (EXT_IS_ACTIVE('refback')) {
// Update refback table
UPDATE_REFBACK_TABLE($userid);
} // END - if
// 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";
array(bigintval($userid), getConfig('points_register')), __FILE__, __LINE__);
// Update mediadata as well
- if ((GET_EXT_VERSION("mediadata") >= "0.0.4") && ($locked == "points")) {
+ if ((GET_EXT_VERSION('mediadata') >= '0.0.4') && ($locked == "points")) {
// Update database
- MEDIA_UPDATE_ENTRY(array("total_points"), "add", getConfig('points_register'));
+ MEDIA_UPDATE_ENTRY(array('total_points'), 'add', getConfig('points_register'));
} // END - if
} // END - if
// Write catgories
if ((is_array(REQUEST_POST('cat'))) && (count(REQUEST_POST('cat')))) {
foreach (REQUEST_POST('cat') as $cat => $joined) {
- if ($joined == "Y") {
+ 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__);
if (REQUEST_POST('refid') == "0") REQUEST_SET_POST('refid', constant('MAIN_TITLE'));
// Is ZIP code set?
- if (REQUEST_ISSET_POST(('zip'))) {
+ if (REQUEST_ISSET_POST('zip')) {
// Prepare data array for the email template
// Start with the gender...
$DATA = array(
SEND_ADMIN_NOTIFICATION(getMessage('ADMIN_NEW_ACCOUNT'), "register-admin", $DATA, $userid);
// Output success registration
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('REGISTRATION_DONE'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('REGISTRATION_DONE'));
} else {
if (REQUEST_POST('agree') == "!") {
OUTPUT_HTML("<div class=\"register_failed\">{--HAVE_TO_AGREE--}</div>");
if (REQUEST_POST('addy') == "!") {
OUTPUT_HTML("<div class=\"register_failed\">{--ENTER_EMAIL--}</div>");
- REQUEST_SET_POST('addy', "");
+ REQUEST_SET_POST('addy', '');
} elseif (REQUEST_POST('addy') == "?") {
OUTPUT_HTML("<div class=\"register_failed\">{--EMAIL_ALREADY_DB--}</div>");
- REQUEST_SET_POST('addy', "");
+ REQUEST_SET_POST('addy', '');
}
if (REQUEST_POST('surname') == "!") {
OUTPUT_HTML("<div class=\"register_failed\">{--ENTER_SURNAME--}</div>");
- REQUEST_SET_POST('surname', "");
+ REQUEST_SET_POST('surname', '');
} // END - if
if (REQUEST_POST('family') == "!") {
OUTPUT_HTML("<div class=\"register_failed\">{--ENTER_FAMILY--}</div>");
- REQUEST_SET_POST('family', "");
+ REQUEST_SET_POST('family', '');
} // END - if
if ((REQUEST_POST('pass1') == "!") && (REQUEST_POST('pass2') == "!")) {
}
// Adds a table for the guests with all visible categories
- define('CATEGORY_SELECTION', REGISTER_ADD_CATEGORY_TABLE("guest", true));
+ define('CATEGORY_SELECTION', REGISTER_ADD_CATEGORY_TABLE('guest', true));
// Adds maximum receiveable mails list... :)
- define('MAX_RECEIVE_LIST', ADD_MAX_RECEIVE_LIST("guest", "", true));
+ define('MAX_RECEIVE_LIST', ADD_MAX_RECEIVE_LIST('guest', '', true));
// Shall I display the refid or shall I make it editable?
- if (getConfig('display_refid') == "Y") {
+ if (getConfig('display_refid') == 'Y') {
// Load "hide" form template
define('REFID_CONTENT', LOAD_TEMPLATE("guest_register_refid_hide", true, $GLOBALS['refid']));
} else {
define('__FAMILY', SQL_ESCAPE(REQUEST_POST('family')));
define('__STREET', SQL_ESCAPE(REQUEST_POST('street_nr')));
define('__COUNTRY', SQL_ESCAPE(REQUEST_POST('cntry')));
- if (REQUEST_ISSET_POST(('zip'))) {
+ if (REQUEST_ISSET_POST('zip')) {
define('__ZIP', bigintval(REQUEST_POST('zip')));
} else {
- define('__ZIP', "");
+ define('__ZIP', '');
}
define('__CITY', SQL_ESCAPE(REQUEST_POST('city')));
define('__ADDY', SQL_ESCAPE(REQUEST_POST('addy')));
// Shall I add a counrty selection box or the old input box?
- if (EXT_IS_ACTIVE("country")) {
+ if (EXT_IS_ACTIVE('country')) {
// New variant, good!
$OUT = "<select name=\"country_code\" class=\"guest_select\" size=\"1\">\n";
$whereStatement = "WHERE is_active='Y'";
- if (IS_ADMIN()) $whereStatement = "";
+ if (IS_ADMIN()) $whereStatement = '';
$OUT .= ADD_OPTION_LINES("countries", "id", "descr", REQUEST_POST('country_code'), "code", $whereStatement);
$OUT .= "</select>";
define('__COUNTRY_CONTENT', $OUT);
}
// Set MUST_??? constants
- if ((EXT_IS_ACTIVE("register")) && (GET_EXT_VERSION("register") > "0.0")) REGISTER_FILL_MUST_CONSTANTS();
+ if ((EXT_IS_ACTIVE('register')) && (GET_EXT_VERSION('register') > '0.0')) REGISTER_FILL_MUST_CONSTANTS();
// Display registration form
LOAD_TEMPLATE("guest_register");
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
require($INC);
-} elseif ((!EXT_IS_ACTIVE("sponsor"))) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
+} elseif ((!EXT_IS_ACTIVE('sponsor'))) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'sponsor');
return;
}
// Add description as navigation point
-ADD_DESCR("guest", __FILE__);
+ADD_DESCR('guest', __FILE__);
//
?>
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
require($INC);
-} elseif ((!EXT_IS_ACTIVE("sponsor"))) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
+} elseif ((!EXT_IS_ACTIVE('sponsor'))) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'sponsor');
return;
}
// Add description as navigation point
-ADD_DESCR("guest", __FILE__);
+ADD_DESCR('guest', __FILE__);
// Init both results (see footer of this file)
$result_act = false;
if (SQL_NUMROWS($result_act) > 0) {
// Load all actions
- $OUT_ACT = ""; $SW = 2;
+ $OUT_ACT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result_act)) {
// Prepare data for the row template
// @TODO Rewritings: conv->conv_rate,name->conv_name in template
$result_pay = SQL_QUERY("SELECT pay_name, pay_rate, pay_min_count, pay_currency FROM `{!_MYSQL_PREFIX!}_sponsor_paytypes` ORDER BY pay_name", __FILE__, __LINE__);
if (SQL_NUMROWS($result_pay) > 0) {
// Load all pay types
- $OUT_PAY = ""; $SW = 2;
+ $OUT_PAY = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result_pay)) {
// Prepare data for the row template
// @TODO Rewritings: name->pay_name,min->pay_min_count,min->pay_min_count,curr->pay_currency
}
} else {
// No pay types setuped so far!
- $OUT_PAY = LOAD_TEMPLATE("guest_sponsor_infos_none_row", LOAD_TEMPLATE("admin_settings_saved", true, getMessage('SPONSOR_NO_ACTIONS_ACTIVATED')));
+ $OUT_PAY = LOAD_TEMPLATE("guest_sponsor_infos_none_row", LOAD_TEMPLATE('admin_settings_saved', true, getMessage('SPONSOR_NO_ACTIONS_ACTIVATED')));
}
} else {
// No actions activated so far!
- $OUT_ACT = LOAD_TEMPLATE("guest_sponsor_infos_none_row", LOAD_TEMPLATE("admin_settings_saved", true, getMessage('SPONSOR_NO_ACTIONS_ACTIVATED')));
- $OUT_PAY = LOAD_TEMPLATE("guest_sponsor_infos_none_row", LOAD_TEMPLATE("admin_settings_saved", true, getMessage('SPONSOR_NO_ACTIONS_ACTIVATED')));
+ $OUT_ACT = LOAD_TEMPLATE("guest_sponsor_infos_none_row", LOAD_TEMPLATE('admin_settings_saved', true, getMessage('SPONSOR_NO_ACTIONS_ACTIVATED')));
+ $OUT_PAY = LOAD_TEMPLATE("guest_sponsor_infos_none_row", LOAD_TEMPLATE('admin_settings_saved', true, getMessage('SPONSOR_NO_ACTIONS_ACTIVATED')));
}
// Free memory
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
require($INC);
-} elseif ((!EXT_IS_ACTIVE("sponsor"))) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
+} elseif ((!EXT_IS_ACTIVE('sponsor'))) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'sponsor');
return;
}
// Add description as navigation point
-ADD_DESCR("guest", __FILE__);
+ADD_DESCR('guest', __FILE__);
-$MODE = "";
+$MODE = '';
if (REQUEST_ISSET_GET(('mode'))) {
// A "special" mode of the login system was requested
switch (REQUEST_GET('mode'))
{
- case "activate" : $MODE = "activate"; break; // Activation link requested
+ case 'activate' : $MODE = 'activate'; break; // Activation link requested
case "lost_pass": $MODE = "lost_pass"; break; // Request new password
}
} // END - if
SEND_ADMIN_NOTIFICATION(getMessage('ADMIN_NEW_SPONSOR'), "admin_sponsor_pending", $SPONSOR);
// Sponsor account set to pending
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSOR_ACCOUNT_IS_PENDING'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_ACCOUNT_IS_PENDING'));
} else {
// Could not unlock account!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSOR_ACCOUNT_PENDING_FAILED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_ACCOUNT_PENDING_FAILED'));
}
} elseif ($SPONSOR['status'] == "EMAIL") {
// Changed email adress need to be confirmed
// Check on success
if (SQL_AFFECTEDROWS() == 1) {
// Sponsor account is unlocked again
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSOR_ACCOUNT_IS_CONFIRMED_AGAIN'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_ACCOUNT_IS_CONFIRMED_AGAIN'));
} else {
// Could not unlock account!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSOR_ACCOUNT_EMAIL_FAILED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_ACCOUNT_EMAIL_FAILED'));
}
} else {
/// ??? Other status?
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSOR_ACCOUNT_STATUS_FAILED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_ACCOUNT_STATUS_FAILED'));
}
} else {
// No sponsor found
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSOR_ACCOUNT_NOT_FOUND'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_ACCOUNT_NOT_FOUND'));
}
// Free memory
SQL_FREERESULT($result);
-} elseif ($MODE == "activate") {
+} elseif ($MODE == 'activate') {
// Send activation link again
if (IS_FORM_SENT()) {
// Check submitted data
SEND_EMAIL(REQUEST_POST('email'), SPONSOR_ACTIVATION_LINK_SUBJ, $msg_sponsor);
// Output message
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSOR_ACTIVATION_LINK_SENT'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_ACTIVATION_LINK_SENT'));
} else {
// No account found or not UNCONFIRMED
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSOR_ACTIVATION_LINK_404'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_ACTIVATION_LINK_404'));
}
// Free memory
array(md5($SPONSOR['password']), bigintval($SPONSOR['id'])), __FILE__, __LINE__);
// Output message
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSOR_LOST_PASSWORD_SENT'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_LOST_PASSWORD_SENT'));
} else {
// No account found or not UNCONFIRMED
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSOR_LOST_PASSWORD_404'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_LOST_PASSWORD_404'));
}
// Free memory
LOAD_URL("modules.php?module=sponsor");
} else {
// Cookie setup failed!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSPOR_COOKIE_SETUP_FAILED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSPOR_COOKIE_SETUP_FAILED'));
// Login formular and other links
LOAD_TEMPLATE("guest_sponsor_login");
} else {
// Status is not fine
$content = constant('SPONSOR_LOGIN_FAILED_'.strtoupper($status).'');
- LOAD_TEMPLATE("admin_settings_saved", false, $content);
+ LOAD_TEMPLATE('admin_settings_saved', false, $content);
// Login formular and other links
LOAD_TEMPLATE("guest_sponsor_login");
}
} else {
// Account missing or wrong pass! We shall not find this out for the "hacker folks"...
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSOR_LOGIN_FAILED_404_WRONG_PASS'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_LOGIN_FAILED_404_WRONG_PASS'));
// Login formular and other links
LOAD_TEMPLATE("guest_sponsor_login");
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
require($INC);
-} elseif ((!EXT_IS_ACTIVE("sponsor"))) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
+} elseif ((!EXT_IS_ACTIVE('sponsor'))) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'sponsor');
return;
}
// Add description as navigation point
-ADD_DESCR("guest", __FILE__);
+ADD_DESCR('guest', __FILE__);
// Create array for form errors (= missing data)
$FORM_ERRORS = array();
}
// 3. ZIP code
- if (!REQUEST_ISSET_POST(('zip'))) {
+ if (!REQUEST_ISSET_POST('zip')) {
// ZIP code is empty
$FORM_ERRORS[] = getMessage('SPONSOR_ZIP_IS_EMPTY');
} elseif (bigintval(REQUEST_POST('zip')) != REQUEST_POST('zip')) {
// ZIP is invalid
$FORM_ERRORS[] = getMessage('SPONSOR_ZIP_IS_INVALID');
- REQUEST_SET_POST('zip', "");
+ REQUEST_SET_POST('zip', '');
}
// 4. City
} elseif (!VALIDATE_URL(REQUEST_POST('url'))) {
// Homepage URL is invalid
$FORM_ERRORS[] = getMessage('SPONSOR_URL_IS_INVALID');
- REQUEST_SET_POST('url', "");
+ REQUEST_SET_POST('url', '');
}
// 7. Light validation of email address
} elseif (SPONSOR_FOUND_EMAIL_DB(REQUEST_POST('email'))) {
// Email already found in database!
$FORM_ERRORS[] = getMessage('SPONSOR_EMAIL_IS_ALREADY_REGISTERED');
- REQUEST_SET_POST('email', "");
+ REQUEST_SET_POST('email', '');
}
// 8. Pay type selected?
}
// Display message
- LOAD_TEMPLATE("admin_settings_saved", false, $message);
+ LOAD_TEMPLATE('admin_settings_saved', false, $message);
} else {
// Check for payment types
$result = SQL_QUERY("SELECT id, pay_name, pay_rate, pay_currency, pay_min_count
{
case "M": // Male
define('__GENDER_M' , " selected=\"selected\"");
- define('__GENDER_F' , "");
- define('__GENDER_C' , "");
+ define('__GENDER_F' , '');
+ define('__GENDER_C' , '');
break;
case "F": // Female
- define('__GENDER_M' , "");
+ define('__GENDER_M' , '');
define('__GENDER_F' , " selected=\"selected\"");
- define('__GENDER_C' , "");
+ define('__GENDER_C' , '');
break;
case "C": // Company
- define('__GENDER_M' , "");
- define('__GENDER_F' , "");
+ define('__GENDER_M' , '');
+ define('__GENDER_F' , '');
define('__GENDER_C' , " selected=\"selected\"");
break;
}
// Check for receive_warnings
switch (REQUEST_POST('receive_warnings'))
{
- case "Y":
+ case 'Y':
define('__REC_Y' , " selected=\"selected\"");
- define('__REC_N' , "");
+ define('__REC_N' , '');
break;
- case "N":
- define('__REC_Y' , "");
+ case 'N':
+ define('__REC_Y' , '');
define('__REC_N' , " selected=\"selected\"");
break;
}
define('__SPONSOR_REFID', REQUEST_POST('refid'));
} else {
// None found, first call
- define('__COMPANY' , "");
- define('__POSITION' , "");
- define('__TAX_IDENT', "");
- define('__GENDER_M' , "");
- define('__GENDER_F' , "");
- define('__GENDER_C' , "");
- define('__SURNAME' , "");
- define('__FAMILY' , "");
- define('__STREET1' , "");
- define('__STREET2' , "");
- define('__COUNTRY' , "");
- define('__ZIP' , "");
- define('__CITY' , "");
- define('__PHONE' , "");
- define('__FAX' , "");
- define('__CELL' , "");
- define('__EMAIL' , "");
- define('__URL' , "");
- define('__REC_Y' , "");
- define('__REC_N' , "");
+ define('__COMPANY' , '');
+ define('__POSITION' , '');
+ define('__TAX_IDENT', '');
+ define('__GENDER_M' , '');
+ define('__GENDER_F' , '');
+ define('__GENDER_C' , '');
+ define('__SURNAME' , '');
+ define('__FAMILY' , '');
+ define('__STREET1' , '');
+ define('__STREET2' , '');
+ define('__COUNTRY' , '');
+ define('__ZIP' , '');
+ define('__CITY' , '');
+ define('__PHONE' , '');
+ define('__FAX' , '');
+ define('__CELL' , '');
+ define('__EMAIL' , '');
+ define('__URL' , '');
+ define('__REC_Y' , '');
+ define('__REC_N' , '');
// No errors found so far
- define('__SPONSOR_FORM_ERRORS', "");
+ define('__SPONSOR_FORM_ERRORS', '');
}
// Prepare referal things
LOAD_TEMPLATE("guest_sponsor_reg");
} else {
// Nothing added so far
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SPONSOR_PAYMENT_LIST_IS_EMPTY'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('SPONSOR_PAYMENT_LIST_IS_EMPTY'));
}
// Free memory
}
// Add description as navigation point
-ADD_DESCR("guest", __FILE__);
+ADD_DESCR('guest', __FILE__);
// Derterminate which stats we want and set mode and title for the link below stats block
if (!REQUEST_ISSET_GET(('mode'))) REQUEST_SET_GET('mode', strtolower(getConfig('guest_stats')));
$treg = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE joined >= ".constant('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'");
+ $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__));
if ($idx < 10) $month = "0".$idx;
// Count months
- $months[$month] = GET_TOTAL_DATA(bigintval($month), "user_data", "userid", "birth_month", true, " AND `status`='CONFIRMED'");
+ $months[$month] = GET_TOTAL_DATA(bigintval($month), "user_data", 'userid', "birth_month", true, " AND `status`='CONFIRMED'");
}
// Members in categories
define('__LINK_TITLE' , $ltitle);
// Generate monthly stats
- $SW = 2; $r2 = " right2"; $l = "ll"; $r = "lr"; $OUT = "";
+ $SW = 2; $r2 = " right2"; $l = "ll"; $r = "lr"; $OUT = '';
foreach ($months as $month => $cnt) {
if ($SW == 2) $OUT .= "<tr>\n";
$OUT .= LOAD_TEMPLATE("guest_stats_month_row", true, $content);
if ($SW == 2) {
- $r2 = "";
+ $r2 = '';
$l = "rl"; $r = "rr";
} else {
$OUT .= "</tr>\n";
define('__MONTH_STATS_ROWS', $OUT);
// Generate category stats
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
foreach ($cat_cnt as $id => $cnt) {
// Prepare data for the template
$content = array(
break;
case "MODULES": // TOP10 module clicks
- $AND = "";
+ $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 = "";
+ $OUT = '';
if ((SQL_NUMROWS($guest_t10) > 0) || (SQL_NUMROWS($mem_t10) > 0)) {
// Output header
// @TODO Rewrite this to one template and $OUT .= ....
break;
case "INACTIVE": // Deactivated stats
- LOAD_TEMPLATE("admin_settings_saved", false, "<strong>{--GUEST_STATS_DEACTIVATED--}</strong>");
+ LOAD_TEMPLATE('admin_settings_saved', false, "<strong>{--GUEST_STATS_DEACTIVATED--}</strong>");
break;
}
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif ((!EXT_IS_ACTIVE("top10")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "top10");
+} elseif ((!EXT_IS_ACTIVE('top10')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'top10');
return;
}
// Add description as navigation point
-ADD_DESCR("guest", __FILE__);
+ADD_DESCR('guest', __FILE__);
//// TOP logins
$result = SQL_QUERY_ESC("
LIMIT %s",
array(getConfig('top10_max')), __FILE__, __LINE__);
-$OUT = ""; $SW = 2; $cnt = 1;
+$OUT = ''; $SW = 2; $cnt = 1;
while ($content = SQL_FETCHARRAY($result)) {
// Init nickname
$content['nickname'] = "---";
// Get nickname
- if (EXT_IS_ACTIVE("nickname")) $content['nickname'] = NICKNAME_GET_NICK($content['userid']);
+ if (EXT_IS_ACTIVE('nickname')) $content['nickname'] = NICKNAME_GET_NICK($content['userid']);
// Prepare data for template
// @TODO Rewritings: uid->userid,nick->nickname,logins->total_logins in template
LIMIT %s",
array(getConfig('top10_max')), __FILE__, __LINE__);
-$OUT = ""; $SW = 2; $cnt = 1;
+$OUT = ''; $SW = 2; $cnt = 1;
while ($content = SQL_FETCHARRAY($result)) {
// Init nickname
$content['nickname'] = "---";
// Get nickname
- if (EXT_IS_ACTIVE("nickname")) $content['nickname'] = NICKNAME_GET_NICK($content['userid']);
+ if (EXT_IS_ACTIVE('nickname')) $content['nickname'] = NICKNAME_GET_NICK($content['userid']);
// Prepare data for template
// @TODO Rewritings: nick->nickname,uid->userid in template
LIMIT %s",
array(getConfig('top10_max')), __FILE__, __LINE__);
-$OUT = ""; $SW = 2; $cnt = 1;
+$OUT = ''; $SW = 2; $cnt = 1;
while ($content = SQL_FETCHARRAY($result)) {
// Init nickname
$content['nickname'] = "---";
// Get nickname
- if (EXT_IS_ACTIVE("nickname")) $content['nickname'] = NICKNAME_GET_NICK($content['userid']);
+ if (EXT_IS_ACTIVE('nickname')) $content['nickname'] = NICKNAME_GET_NICK($content['userid']);
// Prepare data for template
// @TODO Rewritings: nick->nickname,uid->userid in template
}
// Add description as navigation point
-ADD_DESCR("guest", __FILE__);
+ADD_DESCR('guest', __FILE__);
// Count referal levels
$result = SQL_QUERY("SELECT COUNT(id) FROM `{!_MYSQL_PREFIX!}_refdepths` WHERE level>0", __FILE__, __LINE__);
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif ((!EXT_IS_ACTIVE("wernis")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "wernis");
+} elseif ((!EXT_IS_ACTIVE('wernis')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'wernis');
return;
}
LOAD_INC_ONCE("inc/rdf.class.php");
// Add description as navigation point
-ADD_DESCR("guest", __FILE__);
+ADD_DESCR('guest', __FILE__);
OUTPUT_HTML("<div style=\"padding-left: 10px; padding-right: 10px\">");
$rdf = new fase4_rdf();
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif (!EXT_IS_ACTIVE("sql_patches")) {
- // The extension "sql_patches" *MUST* be activated or you have lot's of problems!
+} elseif (!EXT_IS_ACTIVE('sql_patches')) {
+ // The extension 'sql_patches' *MUST* be activated or you have lot's of problems!
LOAD_URL("admin.php");
}
// Adding the main content module here
if (empty($GLOBALS['action'])) {
// Get action value from what value
- $GLOBALS['action'] = GET_ACTION("guest", $GLOBALS['what']);
+ $GLOBALS['action'] = GET_ACTION('guest', $GLOBALS['what']);
} // END - if
// Add the guest's menu here...
-if ((getConfig('guest_menu') == "Y") || (!EXT_IS_ACTIVE("sql_patches", true))) {
+if ((getConfig('guest_menu') == 'Y') || (!EXT_IS_ACTIVE('sql_patches', true))) {
// Show only when guest menu is active
- ADD_MENU("guest", $GLOBALS['action'], $GLOBALS['what']);
+ ADD_MENU('guest', $GLOBALS['action'], $GLOBALS['what']);
} // END - if
// TDs between menu and content
$INC = sprintf("inc/modules/guest/action-%s.php", $GLOBALS['action']);
// Is the file there?
-if ((INCLUDE_READABLE($INC)) && (VALIDATE_MENU_ACTION("guest", $GLOBALS['action'], $GLOBALS['what']))) {
+if ((INCLUDE_READABLE($INC)) && (VALIDATE_MENU_ACTION('guest', $GLOBALS['action'], $GLOBALS['what']))) {
// Requested module is available so we load it
LOAD_INC_ONCE($INC);
} else {
// Invalid module specified or not found...
- LOAD_URL("modules.php?module=index");
+ LOAD_URL('modules.php?module=index');
}
-if ((getConfig('guest_menu') == "Y") || (!EXT_IS_ACTIVE("sql_patches", true))) {
+if ((getConfig('guest_menu') == 'Y') || (!EXT_IS_ACTIVE('sql_patches', true))) {
// Right side of content (hint: a good place for 120x600 skyscraper banner!)
LOAD_TEMPLATE("guest_content_footer");
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- $URL = "modules.php?module=index";
- if ($check == "mem_only") $URL .= "&msg=".getCode('MODULE_MEM_ONLY')."&mod=".$GLOBALS['module'];
+ $URL = 'modules.php?module=index';
+ if ($check == 'mem_only') $URL .= '&msg='.getCode('MODULE_MEM_ONLY').'&mod='.$GLOBALS['module'];
LOAD_URL($URL);
}
-if ($status != "CONFIRMED") {
+if ($status != 'CONFIRMED') {
// If the status is different than confirmed move the user away from here
$errorCode = GEN_ERROR_CODE_FROM_ACCOUNT_STATUS($status);
// Load URL
- LOAD_URL("modules.php?module=index&what=login&login=".$errorCode);
+ LOAD_URL('modules.php?module=index&what=login&login='.$errorCode);
} // END - if
// Load adverstising template
-define('__MEMBER_ADVERT', LOAD_TEMPLATE("member_banner", true));
+define('__MEMBER_ADVERT', LOAD_TEMPLATE('member_banner', true));
// Disable block mode by default
$GLOBALS['block_mode'] = false;
// Generate a tableset for the menu title and content
-LOAD_TEMPLATE("member_header");
+LOAD_TEMPLATE('member_header');
// Begin menu block here
OUTPUT_HTML("<tr>
// Adding the main content module here
if (empty($GLOBALS['action'])) {
- if (empty($GLOBALS['what'])) $GLOBALS['what'] = "welcome";
+ if (empty($GLOBALS['what'])) $GLOBALS['what'] = 'welcome';
} else {
$act = SQL_ESCAPE($GLOBALS['action']);
}
// Add the member's menu here...
-if ((getConfig('member_menu') == "Y") || (!EXT_IS_ACTIVE("sql_patches", true))) {
- ADD_MENU("member", GET_ACTION("member", $GLOBALS['what']), $GLOBALS['what']);
+if ((getConfig('member_menu') == 'Y') || (!EXT_IS_ACTIVE('sql_patches', true))) {
+ ADD_MENU('member', GET_ACTION('member', $GLOBALS['what']), $GLOBALS['what']);
} // END - if
// Menu -> content
<td valign=\"top\" align=\"center\" rowspan=\"3\" class=\"member_content\">");
$INC = sprintf("inc/modules/member/action-%s.php", $act);
-if ((INCLUDE_READABLE($INC)) && (VALIDATE_MENU_ACTION("member", $GLOBALS['action'], $GLOBALS['what']))) {
+if ((INCLUDE_READABLE($INC)) && (VALIDATE_MENU_ACTION('member', $GLOBALS['action'], $GLOBALS['what']))) {
// Requested module is available so we load it
LOAD_INC($INC);
} else {
// Invalid module specified or not found...
- LOAD_URL("modules.php?module=login");
+ LOAD_URL('modules.php?module=login');
}
-if ((getConfig('member_menu') == "Y") || (!EXT_IS_ACTIVE("sql_patches", true))) {
+if ((getConfig('member_menu') == 'Y') || (!EXT_IS_ACTIVE('sql_patches', true))) {
// Right side of content (hint: a good place for 120x600 skyscraper banner!)
- LOAD_TEMPLATE("member_content_right");
+ LOAD_TEMPLATE('member_content_right');
// Some advertising stuff?
- LOAD_TEMPLATE("member_advert");
+ LOAD_TEMPLATE('member_advert');
}
OUTPUT_HTML(" </td>
</tr>");
-// Load same template for "Goto TOP"
-LOAD_TEMPLATE("member_goto_top");
+// Load same template for 'Goto TOP'
+LOAD_TEMPLATE('member_goto_top');
// Footer template (Thanx to Mr. Glaus!)
-LOAD_TEMPLATE("member_footer");
+LOAD_TEMPLATE('member_footer');
//
?>
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
+ LOAD_URL('modules.php?module=index');
} elseif ($GLOBALS['block_mode']) {
// Block mode detected
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bank");
+ LOAD_URL('modules.php?module=index');
+} elseif ((!EXT_IS_ACTIVE('bank')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'bank');
return;
} elseif ($GLOBALS['block_mode']) {
// Block mode detected
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
+ LOAD_URL('modules.php?module=index');
} elseif ($GLOBALS['block_mode']) {
// Block mode detected
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
+ LOAD_URL('modules.php?module=index');
} elseif ($GLOBALS['block_mode']) {
// Block mode detected
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
+ LOAD_URL('modules.php?module=index');
} elseif ($GLOBALS['block_mode']) {
// Block mode detected
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("order")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "order");
+ LOAD_URL('modules.php?module=index');
+} elseif ((!EXT_IS_ACTIVE('order')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'order');
return;
} elseif ($GLOBALS['block_mode']) {
// Block mode detected
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
+ LOAD_URL('modules.php?module=index');
} elseif ($GLOBALS['block_mode']) {
// Block mode detected
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
+ LOAD_URL('modules.php?module=index');
} elseif ($GLOBALS['block_mode']) {
// Block mode detected
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("surfbar")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "surfbar");
+ LOAD_URL('modules.php?module=index');
+} elseif ((!EXT_IS_ACTIVE('surfbar')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'surfbar');
return;
} elseif ($GLOBALS['block_mode']) {
// Block mode detected
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Load the include file
$INC = sprintf("inc/modules/member/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("theme")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "theme");
+ LOAD_URL('modules.php?module=index');
+} elseif ((!EXT_IS_ACTIVE('theme')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'theme');
return;
}
// Load all active designs (or all if admin)
-$whereStatement = ""; $OUT = "";
+$whereStatement = ''; $OUT = '';
if (!IS_ADMIN()) $whereStatement = " WHERE theme_active='Y'";
$result_themes = SQL_QUERY("SELECT theme_path FROM `{!_MYSQL_PREFIX!}_themes`".$whereStatement, __FILE__, __LINE__);
$num_themes = SQL_NUMROWS($result_themes);
if ($num_themes > 1) {
// If more than 1 is installed output selection box
- $act = ""; $wht = "";
+ $act = ''; $wht = '';
if (!empty($GLOBALS['action'])) $act = SQL_ESCAPE($GLOBALS['action']);
if (!empty($GLOBALS['what'])) $wht = SQL_ESCAPE($GLOBALS['what']);
$OUT = THEME_SELECTION_BOX("login", $act, $wht, $result_themes);
$OUT = LOAD_TEMPLATE("theme_one", true);
} elseif (IS_ADMIN()) {
// If there is no theme installed and there's an admin notify him!
- $OUT = LOAD_TEMPLATE("admin_settings_saved", true, "<div class=\"admin_note\">{--ADMIN_NO_THEME_INSTALLED_WARNING--}</div>");
+ $OUT = LOAD_TEMPLATE('admin_settings_saved', true, "<div class=\"admin_note\">{--ADMIN_NO_THEME_INSTALLED_WARNING--}</div>");
}
// Free memory
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Loads the name-matching template
LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4));
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bank");
+} elseif ((!EXT_IS_ACTIVE('bank')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'bank');
return;
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
+ LOAD_URL('modules.php?module=index');
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Loads the name-matching template
LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4));
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bank");
+ LOAD_URL('modules.php?module=index');
+} elseif ((!EXT_IS_ACTIVE('bank')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'bank');
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Loads the name-matching template
LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4));
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bank");
+ LOAD_URL('modules.php?module=index');
+} elseif ((!EXT_IS_ACTIVE('bank')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'bank');
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Loads the name-matching template
LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4));
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bank");
+ LOAD_URL('modules.php?module=index');
+} elseif ((!EXT_IS_ACTIVE('bank')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'bank');
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Loads the name-matching template
LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4));
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("bank")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bank");
+ LOAD_URL('modules.php?module=index');
+} elseif ((!EXT_IS_ACTIVE('bank')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'bank');
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Loads the name-matching template
LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4));
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "beg");
+ LOAD_URL('modules.php?module=index');
+} elseif ((!EXT_IS_ACTIVE('beg')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'beg');
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
$uid = getUserId();
-if (EXT_IS_ACTIVE("nickname"))
+if (EXT_IS_ACTIVE('nickname'))
{
// Load nickname
- $data = "nickname";
+ $data = 'nickname';
}
else
{
// Load userid
- $data = "userid";
+ $data = 'userid';
}
// Run SQL command
require($INC);
} elseif (!IS_MEMBER()) {
LOAD_URL("modules.php[5~?module=index");
-} elseif ((!EXT_IS_ACTIVE("beg")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "beg");
+} elseif ((!EXT_IS_ACTIVE('beg')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'beg');
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Autopurge installed?
-$lastOnline = "%s"; $ONLINE = "";
-if (EXT_IS_ACTIVE("autopurge")) {
+$lastOnline = "%s"; $ONLINE = '';
+if (EXT_IS_ACTIVE('autopurge')) {
// Use last online timestamp to keep inactive members away from here
$lastOnline = " AND last_online >= (UNIX_TIMESTAMP() - %s)";
$ONLINE = getConfig('ap_inactive_since');
array($ONLINE, getConfig('beg_ranks')), __FILE__, __LINE__);
// Reset temporary variable and check for users
-$OUT = "";
+$OUT = '';
if (SQL_NUMROWS($result) > 0) {
// Load our winners...
$SW = 2; $cnt = 1;
require($INC);
} elseif (!IS_MEMBER()) {
LOAD_URL("modules.php[5~?module=index");
-} elseif ((!EXT_IS_ACTIVE("bonus")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "bonus");
+} elseif ((!EXT_IS_ACTIVE('bonus')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'bonus');
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
-if (GET_EXT_VERSION("bonus") >= "0.6.9") {
+if (GET_EXT_VERSION('bonus') >= '0.6.9') {
// Add more bonus points here
// @TODO Rewrite this to a filter
$USE = "(0";
- if (getConfig('bonus_click_yn') == "Y") $USE .= " + turbo_bonus";
- if (getConfig('bonus_login_yn') == "Y") $USE .= " + login_bonus";
- if (getConfig('bonus_order_yn') == "Y") $USE .= " + bonus_order";
- if (getConfig('bonus_stats_yn') == "Y") $USE .= " + bonus_stats";
- if (getConfig('bonus_ref_yn') == "Y") $USE .= " + bonus_ref";
+ if (getConfig('bonus_click_yn') == 'Y') $USE .= " + turbo_bonus";
+ if (getConfig('bonus_login_yn') == 'Y') $USE .= " + login_bonus";
+ if (getConfig('bonus_order_yn') == 'Y') $USE .= " + bonus_order";
+ if (getConfig('bonus_stats_yn') == 'Y') $USE .= " + bonus_stats";
+ if (getConfig('bonus_ref_yn') == 'Y') $USE .= " + bonus_ref";
$USE .= ")";
} else {
// Old version ???
}
// Autopurge installed?
-$lastOnline = "%s"; $ONLINE = "";
-if (EXT_IS_ACTIVE("autopurge")) {
+$lastOnline = "%s"; $ONLINE = '';
+if (EXT_IS_ACTIVE('autopurge')) {
// Use last online timestamp to keep inactive members away from here
$lastOnline = " AND last_online >= (UNIX_TIMESTAMP() - %s)";
$ONLINE = getConfig('ap_inactive_since');
array($ONLINE, getConfig('bonus_ranks')), __FILE__, __LINE__);
// Reset temporary variable and check for users
-$OUT = "";
+$OUT = '';
if (SQL_NUMROWS($result) > 0) {
// Load our winners...
$SW = 2; $cnt = 1;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
$UID = getUserId();
$whereStatement = " WHERE `visible`='Y'";
-if (IS_ADMIN()) $whereStatement = "";
+if (IS_ADMIN()) $whereStatement = '';
$result = SQL_QUERY("SELECT id, cat FROM `{!_MYSQL_PREFIX!}_cats`".$whereStatement." ORDER BY `sort`", __FILE__, __LINE__);
$cats = SQL_NUMROWS($result);
if (IS_FORM_SENT()) {
$cnt = 0;
foreach (REQUEST_POST('cat') as $cat => $joined) {
- if ($joined == "N") $cnt++;
+ if ($joined == 'N') $cnt++;
}
if (($cats - $cnt) < getConfig('least_cats')) {
if (IS_FORM_SENT()) {
foreach (REQUEST_POST('cat') as $cat => $joined) {
switch ($joined) {
- case "Y":
- $sql = "";
+ 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__);
}
break;
- case "N":
+ case 'N':
$sql = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_cats` WHERE userid=%s AND cat_id=%s LIMIT 1";
break;
}
}
// Categories saved...
- LOAD_TEMPLATE("admin_settings_saved", true, getMessage('MEMBER_CATS_SAVED'));
+ LOAD_TEMPLATE('admin_settings_saved', true, getMessage('MEMBER_CATS_SAVED'));
} else {
if ($LEAST) {
// Also here we have to secure it... :(
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('CATS_LEAST'), getConfig('least_cats')));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('CATS_LEAST'), getConfig('least_cats')));
}
// Put some data into constants for the template
define('__ROWS', ($cats*2+4));
// Start switching colors and load all visible categories
// @TODO Rewrite this to use $OUT .= ...
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
// Default he has not joined
- $content['jn'] = " checked=\"checked\"";
- $content['jy'] = "";
+ $content['jn'] = ' chkecked="checked"';
+ $content['jy'] = '';
// When we found an entry don't read it, just change the jx elements
if (REQUEST_ISSET_POST(('cat'))) {
// Form sent?
if (REQUEST_POST('cat', $content['id']) =='Y') {
- $content['jy'] = " checked=\"checked\"";
- $content['jn'] = "";
+ $content['jy'] = ' chkecked="checked"';
+ $content['jn'] = '';
}
} else {
// Check if he has an entry
- if (GET_TOTAL_DATA($UID, "user_cats", "id", "userid", true, sprintf(" AND cat_id=%s", bigintval($content['id']))) == 1) {
- $content['jn'] = "";
- $content['jy'] = " checked=\"checked\"";
+ if (GET_TOTAL_DATA($UID, "user_cats", "id", 'userid', true, sprintf(" AND cat_id=%s", bigintval($content['id']))) == 1) {
+ $content['jn'] = '';
+ $content['jy'] = ' chkecked="checked"';
}
}
}
} else {
// No cateogries are defined yet
- LOAD_TEMPLATE("admin_settings_saved", true, getMessage('MEMBER_NO_CATS'));
+ LOAD_TEMPLATE('admin_settings_saved', true, getMessage('MEMBER_NO_CATS'));
}
// Free result
require($INC);
} elseif (!IS_MEMBER()) {
LOAD_URL("modules.php[5~?module=index");
-} elseif ((!EXT_IS_ACTIVE("doubler")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "doubler");
+} elseif ((!EXT_IS_ACTIVE('doubler')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'doubler');
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Percent values etc.
define('__CHARGE_VALUE', TRANSLATE_COMMA(getConfig('doubler_charge') * 100));
define('__MAX_VALUE' , TRANSLATE_COMMA(getConfig('doubler_max')));
// Transfer referal ID
-if (EXT_IS_ACTIVE("nickname")) {
+if (EXT_IS_ACTIVE('nickname')) {
// Load nickname from DB
$nick = NICKNAME_GET_NICK(getUserId());
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
+ LOAD_URL('modules.php?module=index');
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Simply redirect...
-LOAD_URL("modules.php?module=index");
+LOAD_URL('modules.php?module=index');
//
?>
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("holiday")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "holiday");
+ LOAD_URL('modules.php?module=index');
+} elseif ((!EXT_IS_ACTIVE('holiday')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'holiday');
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Check for running mail orders in pool
$result1 = SQL_QUERY_ESC("SELECT timestamp FROM `{!_MYSQL_PREFIX!}_pool`
}
// Display message and exit here
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('HOLIDAY_MEMBER_ORDER'), MAKE_DATETIME($stamp, "1")));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('HOLIDAY_MEMBER_ORDER'), MAKE_DATETIME($stamp, "1")));
return;
}
}
array(getUserId(), $msg), __FILE__, __LINE__);
// Display message
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('HOLIDAY_IS_ACTIVATED_NOW'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('HOLIDAY_IS_ACTIVATED_NOW'));
}
}
list($active, $locked) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
- if (($active == "Y") && (($locked + getConfig('holiday_lock')) < time()))
+ if (($active == 'Y') && (($locked + getConfig('holiday_lock')) < time()))
{
// Load data
$result = SQL_QUERY_ESC("SELECT holiday_start, holiday_end FROM `{!_MYSQL_PREFIX!}_user_holidays`
SEND_ADMIN_NOTIFICATION(getMessage('HOLIDAY_ADMIN_DEAC_SUBJ'), "admin_holiday_deactivated", array(), getUserId());
// Display message to user
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('HOLIDAY_MEMBER_DEACTIVATED_NOW'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('HOLIDAY_MEMBER_DEACTIVATED_NOW'));
} else {
// Display message to user
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('HOLIDAY_MEMBER_CANNOT_DEACTIVATE'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('HOLIDAY_MEMBER_CANNOT_DEACTIVATE'));
}
- } elseif ($active == "Y") {
+ } elseif ($active == 'Y') {
// To fast!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('HOLIDAY_MEMBER_LOCKED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('HOLIDAY_MEMBER_LOCKED'));
}
}
// User can deactivate his holiday request
switch ($active)
{
- case "Y": // Display deactivation form
+ 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__);
}
break;
- case "N": // Display activation form
+ 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"));
}
} else {
// To fast!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('HOLIDAY_MEMBER_LOCKED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('HOLIDAY_MEMBER_LOCKED'));
}
}
//
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("html_mail")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "html_mail");
+ LOAD_URL('modules.php?module=index');
+} elseif ((!EXT_IS_ACTIVE('html_mail')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'html_mail');
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Class was found and loaded
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__);
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MEMBER_SETTINGS_SAVED'));
+ 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",
list($mode) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
- if ($mode == "Y") {
- define('HTML_Y', " checked=\"checked\"");
- define('HTML_N', "");
+ if ($mode == 'Y') {
+ define('HTML_Y', ' chkecked="checked"');
+ define('HTML_N', '');
} else {
- define('HTML_N', " checked=\"checked\"");
- define('HTML_Y', "");
+ define('HTML_N', ' chkecked="checked"');
+ define('HTML_Y', '');
}
LOAD_TEMPLATE("member_html_mail_settings");
}
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
+ LOAD_URL('modules.php?module=index');
}
// Base URL for redirection (both cases)
if (destroy_user_session()) {
// Remove theme cookie as well
- set_session("mxchange_theme", "");
+ set_session("mxchange_theme", '');
// Logout completed
$URL .= getCode('LOGOUT_DONE');
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("mydata")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "mydata");
+ LOAD_URL('modules.php?module=index');
+} elseif ((!EXT_IS_ACTIVE('mydata')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'mydata');
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
-define('UID_VALUE', getUserId()); $URL = "";
+define('UID_VALUE', getUserId()); $URL = '';
// Detect what the member wants to do
$MODE = "show"; // Show his data
switch ($MODE)
{
case "show": // Show his data
- if (EXT_IS_ACTIVE("country", true)) {
+ 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(UID_VALUE), __FILE__, __LINE__);
default : define('DOB', $DATA[8]."-".$DATA[7]."-".$DATA[9]); break;
}
- if (EXT_IS_ACTIVE("country")) {
+ if (EXT_IS_ACTIVE('country')) {
// Load country's description and code
$DATA[3] = COUNTRY_GENERATE_INFO($DATA[3]);
}
break;
case "edit": // Edit data
- if (EXT_IS_ACTIVE("country", true)) {
+ 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 "M":
define('M_DEFAULT', " selected=\"selected\"");
- define('F_DEFAULT', "");
- define('C_DEFAULT', "");
+ define('F_DEFAULT', '');
+ define('C_DEFAULT', '');
break;
case "F":
- define('M_DEFAULT', "");
+ define('M_DEFAULT', '');
define('F_DEFAULT', " selected=\"selected\"");
- define('C_DEFAULT', "");
+ define('C_DEFAULT', '');
break;
case "C":
- define('M_DEFAULT', "");
- define('F_DEFAULT', "");
+ define('M_DEFAULT', '');
+ define('F_DEFAULT', '');
define('C_DEFAULT', " selected=\"selected\"");
break;
}
- $DOB = "";
+ $DOB = '';
switch (GET_LANGUAGE())
{
case "de": // German date format
}
define('DOB', $DOB);
- define('MAX_REC_LIST', ADD_MAX_RECEIVE_LIST("member", $DATA[11], true));
+ define('MAX_REC_LIST', ADD_MAX_RECEIVE_LIST('member', $DATA[11], true));
- if (EXT_IS_ACTIVE("country")) {
+ 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 = "";
+ if (IS_ADMIN()) $whereStatement = '';
$OUT .= ADD_OPTION_LINES("countries", "id", "descr", $DATA[3], "code", $whereStatement);
$OUT .= "</select>";
define('__COUNTRY_CONTENT', $OUT);
LOAD_TEMPLATE("member_mydata_locked");
} elseif (!VALIDATE_EMAIL(REQUEST_POST('addy'))) {
// Invalid email address!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('INVALID_EMAIL_ADDRESS_ENTERED'));
+ 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 = "";
+ $MODE = 'normal'; $AND = '';
// Did the user changed the password?
- if ($hash != $DATA[1]) { $AND = ", password='".$hash."'"; $MODE = "pass"; }
+ 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"; }
+ if ($MODE == 'normal') { $MODE = 'email'; } else { $MODE .= ";email"; }
REQUEST_SET_POST('old_addy', $DATA[0]);
}
// Update member's profile
- if (EXT_IS_ACTIVE("country")) {
+ if (EXT_IS_ACTIVE('country')) {
// New way
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET
gender='%s', surname='%s', family='%s',
}
// Get all modes ...
- $modes = explode(";", $MODE);
+ $modes = explode(';', $MODE);
// ... and run them through
- SEND_MODE_MAILS ("mydata", $modes);
+ SEND_MODE_MAILS ('mydata', $modes);
} else {
// Entered wrong pass for updating profile
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MEBER_UPDATE_PWD_WRONG'));
+ 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'));
+ $URL = 'modules.php?module=login&what=welcome&msg=' . urlencode(getMessage('PROFILE_UPDATED'));
break;
}
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("newsletter")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "newsletter");
+ LOAD_URL('modules.php?module=index');
+} elseif ((!EXT_IS_ACTIVE('newsletter')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'newsletter');
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Load status
$result = SQL_QUERY_ESC("SELECT nl_receive, nl_until, nl_timespan FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
// Remember charge value
define('__CHARGE_VALUE', TRANSLATE_COMMA(getConfig('nl_charge')));
-if ((IS_FORM_SENT()) && ($status == "Y") && ($span == "0")) {
+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__);
SEND_ADMIN_NOTIFICATION(getMessage('NL_ADMIN_SUBJECT'), "admin_newsletter_request", array(), getUserId());
// Display message
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('NL_MEMBER_REQUEST_DONE'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('NL_MEMBER_REQUEST_DONE'));
} elseif ($span > 0) {
// Already ordered
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('NL_MEMBER_REQUEST_ALREADY'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('NL_MEMBER_REQUEST_ALREADY'));
} else {
// Load template for the note
define('NL_MEMBER_NOTE', LOAD_TEMPLATE("member_newsletter_note", true));
// Set status message and submit button
switch ($status)
{
- case "Y": // Receives the newsletter
+ case 'Y': // Receives the newsletter
define('__STATUS_VALUE', getMessage('NL_MEMBER_ON'));
- define('__UNTIL_VALUE' , "");
+ define('__UNTIL_VALUE' , '');
define('NL_SUBMIT' , getMessage('NL_MEMBER_SUBMIT_OFF'));
break;
- case "N": // Does not receive the newsletter
+ case 'N': // Does not receive the newsletter
define('__STATUS_VALUE', getMessage('NL_MEMBER_OFF'));
define('__UNTIL_VALUE' , MAKE_DATETIME($until, "2"));
define('NL_SUBMIT' , getMessage('NL_MEMBER_SUBMIT_ON'));
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("nickname")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "nickname");
+ LOAD_URL('modules.php?module=index');
+} elseif ((!EXT_IS_ACTIVE('nickname')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'nickname');
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
$isValid = false;
if (IS_FORM_SENT()) {
}
// Load template
- LOAD_TEMPLATE("admin_settings_saved", false, $content);
+ LOAD_TEMPLATE('admin_settings_saved', false, $content);
} else {
// Load current nickname
define('__NICKNAME', NICKNAME_GET_NICK(getUserId()));
// Do we have already submit the form?
if (REQUEST_ISSET_POST(('nickname'))) {
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">{--NICKNAME_IS_INVALID--}</div");
+ LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_failed\">{--NICKNAME_IS_INVALID--}</div");
} // END - if
// Load Template
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("order")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "order");
+ LOAD_URL('modules.php?module=index');
+} elseif ((!EXT_IS_ACTIVE('order')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'order');
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
-$URL = ""; $id = 0;
+$URL = ''; $id = 0;
$whereStatement = " WHERE `visible`='Y'";
// Set undefined array elements
-if (!REQUEST_ISSET_GET(('msg'))) REQUEST_SET_GET('msg' , "");
-if (!REQUEST_ISSET_POST(('zip'))) REQUEST_SET_POST('zip' , "");
-if (!REQUEST_ISSET_POST(('html'))) REQUEST_SET_POST('html' , "");
-if (!REQUEST_ISSET_POST(('receiver'))) REQUEST_SET_POST('receiver', "");
-if (IS_ADMIN()) $whereStatement = "";
+if (!REQUEST_ISSET_GET('msg')) REQUEST_SET_GET('msg' , '');
+if (!REQUEST_ISSET_POST('zip')) REQUEST_SET_POST('zip' , '');
+if (!REQUEST_ISSET_POST('html')) REQUEST_SET_POST('html' , '');
+if (!REQUEST_ISSET_POST('receiver')) REQUEST_SET_POST('receiver', '');
+if (IS_ADMIN()) $whereStatement = '';
// Minimum mails / order
define('__MIN_VALUE', getConfig('order_min'));
// Count unconfirmed mails
-$links = GET_TOTAL_DATA(getUserId(), "user_links", "id", "userid", true);
+$links = GET_TOTAL_DATA(getUserId(), "user_links", "id", 'userid', true);
// Does the user has more than 0 mails per day set?
-$HOLIDAY = "userid";
-if (GET_EXT_VERSION("holiday") >= "0.1.3") {
+$HOLIDAY = 'userid';
+if (GET_EXT_VERSION('holiday') >= '0.1.3') {
// Fetch also holiday activation data
$HOLIDAY = "holiday_active";
} // END - if
if ($HOLIDAY == $DMY) $HOLIDAY='N';
$ALLOWED = $MAXI - $ORDERS;
-if (getConfig('order_max_full') == "MAX") $ALLOWED = $MAXI;
+if (getConfig('order_max_full') == 'MAX') $ALLOWED = $MAXI;
// Now check his points amount
$total = GET_TOTAL_DATA(getUserId(), "user_points", "points") - GET_TOTAL_DATA(getUserId(), "user_data", "used_points");;
-if (($HOLIDAY == "Y") && (GET_EXT_VERSION("holiday") >= "0.1.3")) {
+if (($HOLIDAY == 'Y') && (GET_EXT_VERSION('holiday') >= '0.1.3')) {
// Holiday is active!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('HOLIDAY_ORDER_NOT_POSSIBLE'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('HOLIDAY_ORDER_NOT_POSSIBLE'));
} elseif ((REQUEST_ISSET_POST(('frametester'))) && ($ALLOWED > 0) && (REQUEST_POST('receiver') > 0)) {
// Continue with the frametester, we first need to store the data temporary in the pool
//
if ($type == "TEMP") {
// No entry found, so we need to check out the stats table as well... :)
// We have to add that suff here, now we continue WITHOUT checking and check the text and subject against some filters
- $URL = "";
- if (getConfig('test_text') == "Y") {
+ $URL = '';
+ if (getConfig('test_text') == 'Y') {
// Test submitted text against some filters (length, URLs in text etc.)
if ((strpos(strtolower(REQUEST_POST('text')), "https://") > -1) || (strpos(strtolower(REQUEST_POST('text')), "http://") > -1) || (strpos(strtolower(REQUEST_POST('text')), "www") > -1)) {
// URL found!
- $URL = "modules.php?module=login&what=order&msg=".getCode('URL_FOUND');
+ $URL = 'modules.php?module=login&what=order&msg=' . getCode('URL_FOUND');
} // END - if
// Remove new-line and carriage-return characters
- $TEST = str_replace("\n", "", str_replace("\r", "", REQUEST_POST('text')));
+ $TEST = str_replace("\n", '', str_replace("\r", '', REQUEST_POST('text')));
// Text length within allowed length?
if (strlen($TEST) > getConfig('max_tlength')) {
// Text is too long!
- $URL = "modules.php?module=login&what=order&msg=".getCode('OVERLENGTH');
+ $URL = 'modules.php?module=login&what=order&msg=' . getCode('OVERLENGTH');
} // END - if
} // END - if
// Shall I test the subject line against URLs?
- if (getConfig('test_subj') == "Y") {
+ if (getConfig('test_subj') == 'Y') {
// Check the subject line for issues
REQUEST_SET_POST('subject', str_replace("\\", "[nl]", substr(REQUEST_POST('subject'), 0, 200)));
if ((strpos(strtolower(REQUEST_POST('subject')), "http://") > -1) || (strpos(strtolower(REQUEST_POST('subject')), "www") > -1)) {
// URL in subject found
- $URL = "modules.php?module=login&what=order&msg=".getCode('SUBJ_URL');
+ $URL = 'modules.php?module=login&what=order&msg=' . getCode('SUBJ_URL');
} // END - if
} // END - if
// And shall I check that his URL is not in the black list?
- if (getConfig('url_blacklist') == "Y") {
+ 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__);
list($blist) = SQL_FETCHROW($result);
// Create redirect-URL
- $URL = "modules.php?module=login&what=order&msg=".getCode('BLIST_URL')."&blist=".$blist;
+ $URL = 'modules.php?module=login&what=order&msg=' . getCode('BLIST_URL')."&blist=".$blist;
} // END - if
// Free result
// Enougth receivers entered?
if ((REQUEST_POST('receiver') < getConfig('order_min')) && (!IS_ADMIN())) {
// Less than allowed receivers entered!
- $URL = "modules.php?module=login&what=order&msg=".getCode('MORE_RECEIVERS3');
+ $URL = 'modules.php?module=login&what=order&msg=' . getCode('MORE_RECEIVERS3');
} // END - if
// Validate URL
if (!VALIDATE_URL(REQUEST_POST('url'))) {
// URL is invalid!
- $URL = "modules.php?module=login&what=order&msg=".getCode('INVALID_URL');
+ $URL = 'modules.php?module=login&what=order&msg=' . getCode('INVALID_URL');
} // END - if
// Probe for HTML extension
- if (EXT_IS_ACTIVE("html_mail")) {
+ if (EXT_IS_ACTIVE('html_mail')) {
// HTML or regular text mail?
- if (REQUEST_POST('html') == "Y") {
+ if (REQUEST_POST('html') == 'Y') {
// Chek for valid HTML tags
REQUEST_SET_POST('text', HTML_CHECK_TAGS(REQUEST_POST('text')));
// Maybe invalid tags found?
- if (!REQUEST_ISSET_POST(('text'))) $URL = "modules.php?module=login&what=order&msg=".getCode('INVALID_TAGS')."&id=".$id;
+ if (!REQUEST_ISSET_POST(('text'))) $URL = 'modules.php?module=login&what=order&msg=' . getCode('INVALID_TAGS')."&id=".$id;
} else {
// Remove any HTML code
REQUEST_SET_POST('text', str_replace("<", "{OPEN_HTML}", str_replace(">", "{CLOSE_HTML}", REQUEST_POST('text'))));
}
} elseif (!IS_ADMIN()) {
// He has already sent a mail within a specific time
- $URL = "modules.php?module=login&what=order&msg=".getCode('URL_TLOCK')."&id=".$id;
+ $URL = 'modules.php?module=login&what=order&msg=' . getCode('URL_TLOCK')."&id=".$id;
}
// Still no error?
if (empty($URL)) {
// Check if category and number of receivers is okay
- $add = "";
- if ((getConfig('order_multi_page') == "Y") && (REQUEST_ISSET_POST(('zip')))) {
+ $add = '';
+ if ((getConfig('order_multi_page') == 'Y') && (REQUEST_ISSET_POST('zip'))) {
// Choose recipients by ZIP code
$add = " AND d.zip LIKE '".bigintval(REQUEST_POST('zip'))."{PER}'";
} // END - if
if (SQL_NUMROWS($result) >= REQUEST_POST('receiver')) {
// Check for holiday extensions
$HOLIDAY = false;
- if (GET_EXT_VERSION("holiday") >= "0.1.3") {
+ if (GET_EXT_VERSION('holiday') >= '0.1.3') {
// Include checking for users in holiday
$HOLIDAY = true;
} // END - if
SQL_FREERESULT($result);
// Implode array into string for the sending pool
- $RECEIVER = implode($TEST, ";");
+ $RECEIVER = implode($TEST, ';');
// Count array for maximum sent
$MAX_SEND = count($TEST);
// 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');
$USED = $MAX_SEND * GET_PAY_POINTS(bigintval(REQUEST_POST('type')));
// Fix empty zip code
- if (!REQUEST_ISSET_POST(('zip'))) REQUEST_SET_POST('zip', "0");
+ if (!REQUEST_ISSET_POST('zip')) REQUEST_SET_POST('zip', "0");
// Check if he has enougth points for this order and selected more than 0 receivers
if (($USED > 0) && ($USED <= $total) && ($MAX_SEND > 0)) {
if (($id == "0") || ($type != "TEMP")) {
// New order
$id = 0;
- if (EXT_IS_ACTIVE("html_mail")) {
+ if (EXT_IS_ACTIVE('html_mail')) {
// 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')",
}
} else {
// Change current order
- if (EXT_IS_ACTIVE("html_mail")) {
+ if (EXT_IS_ACTIVE('html_mail')) {
// HTML extension is active
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET
subject='%s',
$URL = "modules.php?module=frametester&order=".$id."";
} elseif ($MAX_SEND == 0) {
// Not enougth receivers found which can receive mails
- $URL = "modules.php?module=login&what=order&msg=".getCode('MORE_RECEIVERS2');
+ $URL = 'modules.php?module=login&what=order&msg=' . getCode('MORE_RECEIVERS2');
} else {
// No enougth points left!
- $URL = "modules.php?module=login&what=order&msg=".getCode('MORE_POINTS');
+ $URL = 'modules.php?module=login&what=order&msg=' . getCode('MORE_POINTS');
}
} else {
// Ordered more mails than he can send in this category
- $URL = "modules.php?module=login&what=order&msg=".getCode('NO_RECS_LEFT');
+ $URL = 'modules.php?module=login&what=order&msg=' . getCode('NO_RECS_LEFT');
}
}
} elseif (REQUEST_POST('receiver') == "0") {
// Not enougth receivers selected
- $URL = "modules.php?module=login&what=order&msg=".getCode('MORE_RECEIVERS1');
-} elseif (($ALLOWED == 0) && (getConfig('order_max_full') == "ORDER")) {
+ $URL = 'modules.php?module=login&what=order&msg=' . getCode('MORE_RECEIVERS1');
+} elseif (($ALLOWED == 0) && (getConfig('order_max_full') == 'ORDER')) {
// No more mail orders allowed
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MEMBER_ORDER_ALLOWED_EXHAUSTED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_ORDER_ALLOWED_EXHAUSTED'));
} elseif (($links < getConfig('unconfirmed')) && ($mmails == "1")) {
// Display order form
$result_cats = SQL_QUERY("SELECT id, cat FROM `{!_MYSQL_PREFIX!}_cats`".$whereStatement." ORDER BY `sort`", __FILE__, __LINE__);
);
// Enable HTML checking
- $HTML = ""; $HOLIDAY = false; $HOL_STRING = "";
- if ((EXT_IS_ACTIVE("html_mail")) && (REQUEST_POST('html') == "Y")) $HTML = " AND html='Y'";
- if (GET_EXT_VERSION("holiday") >= "0.1.3") {
+ $HTML = ''; $HOLIDAY = false; $HOL_STRING = '';
+ if ((EXT_IS_ACTIVE('html_mail')) && (REQUEST_POST('html') == 'Y')) $HTML = " AND html='Y'";
+ if (GET_EXT_VERSION('holiday') >= '0.1.3') {
// Extension's version is fine
$HOLIDAY = true; $HOL_STRING = " AND holiday_active='N'";
} // END - if
$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__);
- if ((SQL_NUMROWS($result_ver) == 1) && (REQUEST_ISSET_POST(('zip'))) && (getConfig('order_multi_page') == "Y")) {
+ if ((SQL_NUMROWS($result_ver) == 1) && (REQUEST_ISSET_POST('zip')) && (getConfig('order_multi_page') == 'Y')) {
list($zip) = SQL_FETCHROW($result_ver);
SQL_FREERESULT($result_ver);
if (substr($zip, 0, strlen(REQUEST_POST('zip'))) == REQUEST_POST('zip')) {
$typeS = array();
if (SQL_NUMROWS($result) > 0) {
// Check for message ID in URL
- $message = "";
+ $message = '';
switch (REQUEST_GET('msg'))
{
case getCode('URL_TLOCK'):
if (!empty($message)) {
// We got system message so we drop it out to the user
- LOAD_TEMPLATE("admin_settings_saved", false, $message);
+ LOAD_TEMPLATE('admin_settings_saved', false, $message);
} // END - if
// Load all email types...
// 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
+ case 'MAX': // He is allowed to send as much as possible
define('ORDER_MAX_VALUE', getMessage('ORDER_ALLOWED_MAX'));
break;
- case "ORDER": // He is allowed to send as much as he setup the receiving value
+ case 'ORDER': // He is allowed to send as much as he setup the receiving value
define('ORDER_MAX_VALUE', sprintf(getMessage('ORDER_ALLOWED_RECEIVE'), $ALLOWED, $MAXI));
break;
LOAD_TEMPLATE("member_order_points", false, $total);
// Reset variables
- $OLD_ORDER = false; $subject = ""; $text = ""; $target = "";
+ $OLD_ORDER = false; $subject = ''; $text = ''; $target = '';
// 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",
SQL_FREERESULT($result);
// 01 2 21 12 2 23 443 3 3210
- if ((REQUEST_ISSET_POST(('data'))) || ((getConfig('order_multi_page') != "Y") && ((!IS_ADMIN()) && (!EXT_IS_ACTIVE("html_mail"))))) {
+ if ((REQUEST_ISSET_POST(('data'))) || ((getConfig('order_multi_page') != "Y") && ((!IS_ADMIN()) && (!EXT_IS_ACTIVE('html_mail'))))) {
// Pre-output categories
- $CAT = "";
+ $CAT = '';
foreach ($CATS['id'] as $key => $value) {
$CAT .= " <option value=\"".$value."\"";
if (($OLD_ORDER) && ($content['cat'] == $value)) $CAT .= " selected=\"selected\"";
} // END - foreach
// Mail type
- $type = "";
+ $type = '';
foreach ($typeS as $key => $value) {
$P = TRANSLATE_COMMA($typeS[$key][1]);
if (is_array($value)) {
define('TEXT', COMPILE_CODE($text));
define('T_URL', $url);
- if (REQUEST_ISSET_POST(('zip'))) {
+ if (REQUEST_ISSET_POST('zip')) {
// Output entered ZIP code
define('ZIP_OUTPUT', LOAD_TEMPLATE("member_order-zip2", true, REQUEST_POST('zip')));
} else {
}
// HTML extension
- if ((EXT_IS_ACTIVE("html_mail")) && (REQUEST_POST('html') == "Y")) {
+ if ((EXT_IS_ACTIVE('html_mail')) && (REQUEST_POST('html') == 'Y')) {
// Extension is active so output valid HTML tags
define('MEMBER_HTML_EXTENSION', LOAD_TEMPLATE("member_order-html_ext", true, HTML_ADD_VALID_TAGS()));
} else {
LOAD_TEMPLATE("member_order_page2");
} else {
// Remember maybe entered ZIP code in constant
- $add = "";
- if (EXT_IS_ACTIVE("html_mail")) {
+ $add = '';
+ if (EXT_IS_ACTIVE('html_mail')) {
// Add some content when html extension is active
- if ((getConfig('order_multi_page') == "Y") || (IS_ADMIN())) $add = "<tr><td colspan=\"2\" class=\"seperator bottom2\" height=\"5\"> </td></tr>\n";
+ if ((getConfig('order_multi_page') == 'Y') || (IS_ADMIN())) $add = "<tr><td colspan=\"2\" class=\"seperator bottom2\" height=\"5\"> </td></tr>\n";
define('MEMBER_HTML_EXTENSION', LOAD_TEMPLATE("member_order-html_intro", true));
} else {
// No HTML extension installed
}
// Do we want ZIP code or not?
- if ((getConfig('order_multi_page') == "Y") || (IS_ADMIN())) {
+ if ((getConfig('order_multi_page') == 'Y') || (IS_ADMIN())) {
// Yes
if (REQUEST_POST('zip') > 0) {
$content = array(
define('MEMBER_ZIP_CONTENT', LOAD_TEMPLATE("member_order-zip1", true, $content));
} else {
// No
- define('MEMBER_ZIP_CONTENT', "");
+ define('MEMBER_ZIP_CONTENT', '');
}
// Output form for page 1 (ZIP code or HTML)
}
} else {
// No mail types defined
- LOAD_TEMPLATE("admin_settings_saved", false, "<span class=\"member_failed\">{--MEMBER_NO_PAYMENTS--}</span>");
+ LOAD_TEMPLATE('admin_settings_saved', false, "<span class=\"member_failed\">{--MEMBER_NO_PAYMENTS--}</span>");
}
} else {
// No points left
- LOAD_TEMPLATE("admin_settings_saved", false, "<span class=\"member_failed\">{--MEMBER_NO_POINTS--}</span>");
+ LOAD_TEMPLATE('admin_settings_saved', false, "<span class=\"member_failed\">{--MEMBER_NO_POINTS--}</span>");
}
} else {
// No cateogries are defined yet
- LOAD_TEMPLATE("admin_settings_saved", false, "<span class=\"member_failed\">{--MEMBER_NO_CATS--}</span>");
+ LOAD_TEMPLATE('admin_settings_saved', false, "<span class=\"member_failed\">{--MEMBER_NO_CATS--}</span>");
}
} elseif ($mmails == "0") {
// Please set more than 0 mails per day
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MEMBER_HAS_ZERO_MMAILS'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_HAS_ZERO_MMAILS'));
} else {
// Please confirm some mails first
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('MEMBER_LINKS_LEFT'), $links, getConfig('unconfirmed')));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('MEMBER_LINKS_LEFT'), $links, getConfig('unconfirmed')));
}
if (!empty($URL)) {
require($INC);
} elseif (!IS_MEMBER()) {
// Not logged in
- LOAD_URL("modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("payout")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "payout");
+ LOAD_URL('modules.php?module=index');
+} elseif ((!EXT_IS_ACTIVE('payout')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'payout');
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
$result_depths = SQL_QUERY("SELECT level, percents FROM `{!_MYSQL_PREFIX!}_refdepths` ORDER BY level", __FILE__, __LINE__);
$TPTS = 0;
array(getUserId()), __FILE__, __LINE__);
if (SQL_NUMROWS($result_payouts) > 0) {
// List all his requests
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result_payouts)) {
// Translate status
$content['status'] = getMessage('PAYOUT_MEMBER_STATUS_'.strtoupper($content['status']).'');
$content['status'] = "<div class=\"member_failed\">".$content['status']."</div>";
// Nothing entered must be secured in member/what-payputs.php !
- if ($content['allow'] == "Y") {
+ if ($content['allow'] == 'Y') {
// Banner/Textlink views/clicks request
if (!empty($content['banner'])) {
// Banner
define('PAYOUT_POINTS_VALUE', $PAYOUT);
// Subtract points from member's account
- SUB_POINTS("payout", getUserId(), $PAYOUT);
+ SUB_POINTS('payout', getUserId(), $PAYOUT);
// Add entry to his tranfer history
- if ($content['allow'] == "Y") {
+ if ($content['allow'] == 'Y') {
// 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')",
// Load templates
$msg_mem = LOAD_EMAIL_TEMPLATE("member_payout_request_banner", array(), getUserId());
- if (GET_EXT_VERSION("admins") >= "0.4.1") {
+ if (GET_EXT_VERSION('admins') >= '0.4.1') {
$adm_tpl = "admin_payout_request_banner";
} else {
$msg_adm = LOAD_EMAIL_TEMPLATE("admin_payout_request_banner", array(), getUserId());
// Load templates
$msg_mem = LOAD_EMAIL_TEMPLATE("member_payout_request", array(), getUserId());
$msg_adm = LOAD_EMAIL_TEMPLATE("admin_payout_request", array(), getUserId());
- $admin_tpl = "";
- if (GET_EXT_VERSION("admins") >= "0.4.1")
+ $admin_tpl = '';
+ if (GET_EXT_VERSION('admins') >= '0.4.1')
{
$admin_tpl = "admin_payout_request";
}
SEND_ADMIN_NOTIFICATION(getMessage('PAYOUT_REQUEST_ADMIN'), $admin_tpl, array(), getUserId());
// Load template and output it
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PAYOUT_REQUEST_SENT'));
- } elseif ($content['allow'] == "Y") {
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PAYOUT_REQUEST_SENT'));
+ } elseif ($content['allow'] == 'Y') {
// Prepare content
$content = array(
'payout' => bigintval(REQUEST_GET('payout'))
}
} else {
// Not enougth points
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PAYOUT_POINTS_NOT_ENOUGTH'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PAYOUT_POINTS_NOT_ENOUGTH'));
}
} else {
// ID is invalid
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PAYOUT_ID_INVALID'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PAYOUT_ID_INVALID'));
}
}
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
+ LOAD_URL('modules.php?module=index');
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
$result_depths = SQL_QUERY("SELECT level, percents FROM `{!_MYSQL_PREFIX!}_refdepths` ORDER BY level", __FILE__, __LINE__);
$depths = SQL_NUMROWS($result_depths);
// Add many more rows for the login/turbo/ref/order bonus
// @TODO Should we rewrite this to a filter?
-if (!EXT_IS_ACTIVE("bonus")) $depths += 1;
-if (GET_EXT_VERSION("bonus") >= "0.2.2") $depths += 6;
-if (GET_EXT_VERSION("bonus") >= "0.4.4") $depths += 4;
+if (!EXT_IS_ACTIVE('bonus')) $depths += 1;
+if (GET_EXT_VERSION('bonus') >= '0.2.2') $depths += 6;
+if (GET_EXT_VERSION('bonus') >= '0.4.4') $depths += 4;
// Remember row count in constant
define('__ROWS_VALUE', ($depths*2+15));
// Init some vars...
-$TPTS = 0; $TREF = 0; $TLOCK = 0; $OUT = "";
+$TPTS = 0; $TREF = 0; $TLOCK = 0; $OUT = '';
// Load ref levels
while ($content = SQL_FETCHARRAY($result_depths)) {
$CONFIRMED = "---"; $SENT = "---"; $RECEIVED = "---";
// Only user >= v0.1.2: Fetch confirmed mails counter
-if (GET_EXT_VERSION("user") >= "0.1.2") {
- $add = "";
- if (GET_EXT_VERSION("user") >= "0.1.4") {
+if (GET_EXT_VERSION('user') >= '0.1.2') {
+ $add = '';
+ if (GET_EXT_VERSION('user') >= '0.1.4') {
$add = ", emails_sent, emails_received";
}
$result = SQL_QUERY_ESC("SELECT mails_confirmed".$add." FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1", array(getUserId()), __FILE__, __LINE__);
define('__TLOCK_VALUE', TRANSLATE_COMMA($TLOCK));
// Fixes a bug when there is no bonus extension installed
-if (EXT_VERSION_IS_OLDER("bonus", "0.4.4")) setConfigEntry('bonus_active', "X");
+if (EXT_VERSION_IS_OLDER('bonus', '0.4.4')) setConfigEntry('bonus_active', "X");
// Display login bonus and turbo-click bonus
-if ((GET_EXT_VERSION("bonus") >= "0.2.2") && (EXT_IS_ACTIVE("bonus")) && (getConfig('bonus_active') == "Y")) {
+if ((GET_EXT_VERSION('bonus') >= '0.2.2') && (EXT_IS_ACTIVE('bonus')) && (getConfig('bonus_active') == 'Y')) {
$add = ", 0, 0, 0";
- if (GET_EXT_VERSION("bonus") >= "0.4.4") $add = ", bonus_ref, bonus_order, bonus_stats";
+ if (GET_EXT_VERSION('bonus') >= '0.4.4') $add = ", bonus_ref, bonus_order, bonus_stats";
// Load data
$result = SQL_QUERY_ESC("SELECT login_bonus, turbo_bonus".$add." FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
define('__TURBO_VALUE', TRANSLATE_COMMA($turbo));
define('__LOGIN_VALUE', TRANSLATE_COMMA($login));
- if (GET_EXT_VERSION("bonus") >= "0.4.4") {
+ if (GET_EXT_VERSION('bonus') >= '0.4.4') {
// Add referal, stats and order bonys
define('__REF_VALUE' , TRANSLATE_COMMA($ref));
define('__ORDER_VALUE', TRANSLATE_COMMA($order));
} elseif (getConfig('bonus_active') != "Y") {
// Bonus active rallye deactivated
define('__SPECIAL_ROWS', LOAD_TEMPLATE("member_points_bonus_disabled", true));
-} elseif ((IS_ADMIN()) && (EXT_VERSION_IS_OLDER("bonus", "0.2.2")) && (EXT_IS_ACTIVE("bonus"))) {
+} elseif ((IS_ADMIN()) && (EXT_VERSION_IS_OLDER('bonus', '0.2.2')) && (EXT_IS_ACTIVE('bonus'))) {
// Please upgrade your bonus extension to v0.2.2 or newer!
define('__SPECIAL_ROWS', LOAD_TEMPLATE("member_points_upgrade"));
} else {
// Members shall see no special rows here
- define('__SPECIAL_ROWS', "");
+ define('__SPECIAL_ROWS', '');
}
// Remeber values for the final template
define('__SENT_VALUE' , $SENT);
// Load final template
-if (EXT_IS_ACTIVE("user")) {
+if (EXT_IS_ACTIVE('user')) {
// Load template when required extension is there
LOAD_TEMPLATE("member_points");
} elseif (IS_ADMIN()) {
// Missing extension
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "user");
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'user');
} else {
// Message for user
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PROBLEM_POINTS_OVERVIEW_UNAVAILABLE'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PROBLEM_POINTS_OVERVIEW_UNAVAILABLE'));
}
-if (EXT_IS_ACTIVE("payout")) {
+if (EXT_IS_ACTIVE('payout')) {
// Payput extension is installed and active so we can check if the user has enougth points
PAYOUT_OUTPUT_PAYOUT_LIST(REVERT_COMMA(($TPTS - $USED)));
}
require($INC);
} elseif (!IS_MEMBER()) {
// User is not logged in
- LOAD_URL("modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("primera")) && (!IS_ADMIN())) {
- // Extension "primera" is not activated
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "primera");
+ LOAD_URL('modules.php?module=index');
+} elseif ((!EXT_IS_ACTIVE('primera')) && (!IS_ADMIN())) {
+ // Extension 'primera' is not activated
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'primera');
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Check if the admin has entered the data
if ((getConfig('primera_api_name') == "") || (getConfig('primera_api_md5') == "")) {
// Something important is missing...
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PRIMERA_MEMBER_API_DATA_MISSING'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PRIMERA_MEMBER_API_DATA_MISSING'));
return;
}
array(getUserId()), __FILE__, __LINE__);
// Load all rows
- $content['rows'] = ""; $SW = 2;
+ $content['rows'] = ''; $SW = 2;
while ($data = SQL_FETCHARRAY($result)) {
// Prepare data for output
$rowContent = array(
// Is this enougth for a payout?
if ($points < getConfig('primera_min_payout')) {
// No, then abort here
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('PRIMERA_MEMBER_MIN_PAYOUT_PAYOUT'), TRANSLATE_COMMA(getConfig('primera_min_payout'))));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('PRIMERA_MEMBER_MIN_PAYOUT_PAYOUT'), TRANSLATE_COMMA(getConfig('primera_min_payout'))));
return;
}
$content['min_points'] = TRANSLATE_COMMA(getConfig('primera_min_payout'));
// Get Primera id
- $content['primera_nickname'] = "";
+ $content['primera_nickname'] = '';
$result = SQL_QUERY_ESC("SELECT primera_userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
array(getUserId()), __FILE__, __LINE__);
SQL_FREERESULT($result);
} else {
// Invalid mode!
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('PRIMERA_MEMBER_MODE_INVALID'), REQUEST_GET(('mode'))));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('PRIMERA_MEMBER_MODE_INVALID'), REQUEST_GET(('mode'))));
return;
}
// Is the user ID and password set?
if (!REQUEST_ISSET_POST(('primera_nickname'))) {
// Nothing entered in Primus nickname
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PRIMERA_MEMBER_EMPTY_USERNAME'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PRIMERA_MEMBER_EMPTY_USERNAME'));
} elseif (!REQUEST_ISSET_POST(('primera_password'))) {
// Nothing entered in Primera password
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PRIMERA_MEMBER_EMPTY_PASSWORD'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PRIMERA_MEMBER_EMPTY_PASSWORD'));
} elseif (!REQUEST_ISSET_POST(('amount'))) {
// Nothing entered in amount
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PRIMERA_MEMBER_EMPTY_AMOUNT'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PRIMERA_MEMBER_EMPTY_AMOUNT'));
} elseif (REQUEST_POST('amount') != bigintval(REQUEST_POST('amount'))) {
// Only numbers in amount!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PRIMERA_MEMBER_INVALID_AMOUNT'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PRIMERA_MEMBER_INVALID_AMOUNT'));
} elseif (REQUEST_POST('amount') < getConfig('primera_min_payout')) {
// Not enougth entered!
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('PRIMERA_MEMBER_AMOUNT_SMALLER_MIN'), getConfig(('primera_min_payout'))));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('PRIMERA_MEMBER_AMOUNT_SMALLER_MIN'), getConfig(('primera_min_payout'))));
} elseif (REQUEST_POST('amount') > $points) {
// Not enougth points left!
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('PRIMERA_MEMBER_PAYOUT_POINTS_DEPLETED'), bigintval(REQUEST_POST('amount')), bigintval($points)));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('PRIMERA_MEMBER_PAYOUT_POINTS_DEPLETED'), bigintval(REQUEST_POST('amount')), bigintval($points)));
} else {
// All is fine here so do the payout
$success = PRIMERA_EXECUTE_PAYOUT(REQUEST_POST('primera_nickname'), md5(REQUEST_POST('primera_password')), REQUEST_POST('amount'));
array(REQUEST_POST('primera_nickname'), getUserId()), __FILE__, __LINE__);
// All done!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('PRIMERA_MEMBER_PAYOUT_DONE'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('PRIMERA_MEMBER_PAYOUT_DONE'));
return;
} elseif ((GET_PRIMERA_ERROR_CODE() == "user_failed") || (GET_PRIMERA_ERROR_CODE() == "own_failed") || (GET_PRIMERA_ERROR_CODE() == "amount_failed") || (GET_PRIMERA_ERROR_CODE() == "api_amount_failed")) {
// Wrong login data
- LOAD_TEMPLATE("admin_settings_saved", false, GET_PRIMERA_ERROR_MESSAGE());
+ LOAD_TEMPLATE('admin_settings_saved', false, GET_PRIMERA_ERROR_MESSAGE());
} else {
// Something went wrong
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('PRIMERA_MEMBER_PAYOUT_FAILED'), GET_PRIMERA_ERROR_MESSAGE()));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('PRIMERA_MEMBER_PAYOUT_FAILED'), GET_PRIMERA_ERROR_MESSAGE()));
}
}
break;
default: // Invalid mode!
DEBUG_LOG(__FILE__, __LINE__, sprintf("Invalid mode %s detected.", REQUEST_GET('mode')));
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('PRIMERA_MEMBER_MODE_INVALID'), REQUEST_GET(('mode'))));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('PRIMERA_MEMBER_MODE_INVALID'), REQUEST_GET(('mode'))));
return;
}
} // END - if
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("rallye")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "rallye");
+ LOAD_URL('modules.php?module=index');
+} elseif ((!EXT_IS_ACTIVE('rallye')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'rallye');
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
OUTPUT_HTML("<div align=\"center\">");
// Check for possible running rallyes
$ADMIN = " AND d.is_active='Y'";
-if (IS_ADMIN()) $ADMIN = "";
+if (IS_ADMIN()) $ADMIN = '';
$result = SQL_QUERY("SELECT DISTINCT d.id, d.admin_id, a.login, d.title, d.descr, d.template, d.start_time, d.end_time, d.min_users, d.min_prices
FROM `{!_MYSQL_PREFIX!}_rallye_data` AS d, `{!_MYSQL_PREFIX!}_admins` AS a
WHERE d.admin_id=a.id".$ADMIN." AND d.notified='Y'
define('__RALLYE_TOP_USERS', "<div align=\"center\" class=\"big\">{!__RALLYE_EXTRAS!}</div>");
define('__RALLYE_CAN_WIN_THIS', getMessage('RALLYE_OUR_WINNERS_ARE'));
} else {
- define('__RALLYE_PRICES', RALLYE_ADD_PRICES($id, "html"));
+ define('__RALLYE_PRICES', RALLYE_ADD_PRICES($id, 'html'));
define('__RALLYE_TOP_USERS', RALLYE_ADD_TOPUSERS($id, getUserId()));
define('__RALLYE_CAN_WIN_THIS', getMessage('RALLYE_YOU_CAN_WIN'));
}
require($INC);
} elseif (!IS_MEMBER()) {
// User is not logged in
- LOAD_URL("modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("refback")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "refback");
+ LOAD_URL('modules.php?module=index');
+} elseif ((!EXT_IS_ACTIVE('refback')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'refback');
return;
}
// Is the refback system enabled?
if (getConfig('refback_enabled') != "Y") {
// Output message
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MEMBER_REFBACK_DISABLED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_REFBACK_DISABLED'));
// Abort here
return false;
} // END - if
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Was the form submitted?
if ((REQUEST_ISSET_POST('edit')) && (REQUEST_ISSET_POST(('id')))) {
// Check status
if (isset($status['ok'])) {
// No message found
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MEMBER_REFBACK_DONE'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_REFBACK_DONE'));
} elseif (isset($status['message'])) {
// Something went wrong with error message
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('MEMBER_REFBACK_ERROR_MESSAGE'), $status['message']));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('MEMBER_REFBACK_ERROR_MESSAGE'), $status['message']));
} else {
// No message found
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MEMBER_REFBACK_ERROR_EMPTY_MESSAGE'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_REFBACK_ERROR_EMPTY_MESSAGE'));
}
} else {
// Percents out-of-bounds ;-)
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('MEMBER_REFBACK_ERROR_OUT_OF_BOUNDS'), getConfig('refback_min_perc'), getConfig('refback_max_perc')));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('MEMBER_REFBACK_ERROR_OUT_OF_BOUNDS'), getConfig('refback_min_perc'), getConfig('refback_max_perc')));
}
// Insert line
// Are there some entries? (Shall be!)
if (SQL_NUMROWS($result) > 0) {
// List all levels
- $OUT = "";
+ $OUT = '';
while ($content = SQL_FETCHARRAY($result)) {
// Init variables
- $rows = "";
+ $rows = '';
$counter = 0;
$SW = 2;
LOAD_TEMPLATE("member_refback_list", false, $OUT);
} else {
// No entries
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MEMBER_REFBACK_NO_ENTRIES'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_REFBACK_NO_ENTRIES'));
}
// Free result
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
+ LOAD_URL('modules.php?module=index');
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Load current referal clicks
$result = SQL_QUERY_ESC("SELECT ref_clicks FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
<strong><a href=\"{!URL!}/ref.php?refid=".getUserId()."\" target=\"_blank\">{!URL!}/ref.php?ref=".getUserId()."</a></strong><br />
<br />");
-if (EXT_IS_ACTIVE("nickname")) {
+if (EXT_IS_ACTIVE('nickname')) {
// Add nickname link when nickname is entered
$nick = NICKNAME_GET_NICK(getUserId());
// Clicks on your reflink
OUTPUT_HTML("{--YOUR_REFCLICKS--}: <strong>".$c."</strong> {--CLICKS--}</div><br /><br />");
$whereStatement = " WHERE `visible`='Y'";
-if (IS_ADMIN()) $whereStatement = "";
+if (IS_ADMIN()) $whereStatement = '';
$result = SQL_QUERY("SELECT id, url, alternate, counter, clicks FROM `{!_MYSQL_PREFIX!}_refbanner`", __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// List available ref banners
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
$test = str_replace(constant('URL'), constant('PATH'), $content['url']); $size = 0;
if ($test == $content['url']) {
// Download banner (I hope you keep the banner on same server???)
- $fp = GET_URL($content['url']); $bannerContent = "";
+ $fp = GET_URL($content['url']); $bannerContent = '';
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
LOAD_TEMPLATE("member_reflinks_table", false, getUserId());
} else {
// No refbanner found!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MEMBER_NO_REFBANNER_FOUND'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_NO_REFBANNER_FOUND'));
}
// Free result
require($INC);
} elseif (!IS_MEMBER()) {
// User is not logged in
- LOAD_URL("modules.php?module=index");
+ LOAD_URL('modules.php?module=index');
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Load all referal levels
$result = SQL_QUERY_ESC("SELECT r.level, r.percents
// Are there some entries? (Shall be!)
if (SQL_NUMROWS($result) > 0) {
// List all levels
- $OUT = "";
+ $OUT = '';
while ($content = SQL_FETCHARRAY($result)) {
// Init variables
- $rows = "";
+ $rows = '';
$counter = 0;
$SW = 2;
LOAD_TEMPLATE("member_ref_list", false, $OUT);
} else {
// No entries
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MEMBER_REFBACK_NO_ENTRIES'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_REFBACK_NO_ENTRIES'));
}
// Free result
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("sponsor")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
+ LOAD_URL('modules.php?module=index');
+} elseif ((!EXT_IS_ACTIVE('sponsor')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'sponsor');
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Loads the name-matching template
LOAD_TEMPLATE(substr(basename(__FILE__), 5, -4));
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
+ LOAD_URL('modules.php?module=index');
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Init output
$main_content = array();
// Are there mails left in pool?
if (SQL_NUMROWS($result) > 0) {
// Load all orders
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($data = SQL_FETCHARRAY($result)) {
// Is the ZIP code set? If not, set dashes
if (empty($data['zip'])) $data['zip'] = "---";
$main_content['pool'] = LOAD_TEMPLATE("member_pool_table", true, $OUT);
} else {
// No mails in pool!
- $main_content['pool'] = LOAD_TEMPLATE("admin_settings_saved", true, getMessage('MEMBER_NO_MAILS_IN_POOL'));
+ $main_content['pool'] = LOAD_TEMPLATE('admin_settings_saved', true, getMessage('MEMBER_NO_MAILS_IN_POOL'));
}
// Free result
if (SQL_NUMROWS($result) > 0) {
// Mail orders are in pool so we can display them
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($data = SQL_FETCHROW($result)) {
// Prepare data for the template
$content = array(
$main_content['stats'] = LOAD_TEMPLATE("member_stats_table", true, $OUT);
} else {
// No mail orders fond
- $main_content['stats'] = LOAD_TEMPLATE("admin_settings_saved", true, getMessage('MEMBER_NO_MAILS_IN_STATS'));
+ $main_content['stats'] = LOAD_TEMPLATE('admin_settings_saved', true, getMessage('MEMBER_NO_MAILS_IN_STATS'));
}
// Free result
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()){
- LOAD_URL("modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("support")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "support");
+ LOAD_URL('modules.php?module=index');
+} elseif ((!EXT_IS_ACTIVE('support')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'support');
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
if ((!IS_FORM_SENT()) || (!REQUEST_ISSET_POST(('qsummary')))) {
// Output form
LOAD_TEMPLATE("member_support_form");
} else {
// Load mail template based on your member's decision
- if (GET_EXT_VERSION("admins") >= "0.4.1") {
+ if (GET_EXT_VERSION('admins') >= '0.4.1') {
$a_tpl = "admin_support-".REQUEST_POST('qsummary');
} else {
$msg_a = LOAD_EMAIL_TEMPLATE("admin_support-".REQUEST_POST('qsummary'), array('text' => REQUEST_POST('qdetails')), getUserId());
require($INC);
} elseif (!IS_MEMBER()) {
// Redirect
- LOAD_URL("modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("surfbar")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "surfbar");
+ LOAD_URL('modules.php?module=index');
+} elseif ((!EXT_IS_ACTIVE('surfbar')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'surfbar');
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Still allowed to book more URLs?
if (!SURFBAR_IF_USER_BOOK_MORE_URLS()) {
// No more URLs allowed to book!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MEMBER_SURFBAR_NO_MORE_ALLOWED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_SURFBAR_NO_MORE_ALLOWED'));
} elseif ((IS_FORM_SENT()) && (REQUEST_ISSET_POST(('limited')))) {
// Is limitation "no" and "limit" is > 0?
- if ((REQUEST_POST('limited') == "N") && ((REQUEST_ISSET_POST(('limit'))) && (REQUEST_POST('limit') > 0)) || (!REQUEST_ISSET_POST(('limit')))) {
+ if ((REQUEST_POST('limited') == 'N') && ((REQUEST_ISSET_POST(('limit'))) && (REQUEST_POST('limit') > 0)) || (!REQUEST_ISSET_POST(('limit')))) {
// Set it to unlimited
REQUEST_SET_POST('limit', 0);
} // END - if
} // END - if
// Load message template
- LOAD_TEMPLATE("admin_settings_saved", false, $msg);
+ LOAD_TEMPLATE('admin_settings_saved', false, $msg);
} else {
// Prepare some content
$content = array(
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("surfbar")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "surfbar");
+ LOAD_URL('modules.php?module=index');
+} elseif ((!EXT_IS_ACTIVE('surfbar')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'surfbar');
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Load user URLs
$URLs = SURFBAR_GET_USER_URLS();
// Action performed but shall we display it?
if (((REQUEST_POST('action') != "edit") && (REQUEST_POST('action') != "delete")) || (REQUEST_ISSET_POST(('execute')))) {
// Display "action done" message if action is wether 'edit' nor 'delete' or has been executed
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MEMBER_SURFBAR_ACTION_DONE'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_SURFBAR_ACTION_DONE'));
} // END - if
} else {
// Something went wrong
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MEMBER_SURFBAR_ACTION_FAILED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_SURFBAR_ACTION_FAILED'));
}
} elseif (count($URLs) > 0) {
// List all URLs
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
foreach ($URLs as $id => $content) {
// "Translate"/insert data
$content['sw'] = $SW;
LOAD_TEMPLATE("member_surfbar_list", false, $OUT);
} else {
// No URLs booked so far
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MEMBER_SURFBAR_NO_URLS_FOUND'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_SURFBAR_NO_URLS_FOUND'));
}
//
require($INC);
} elseif (!IS_MEMBER()) {
// Not logged in
- LOAD_URL("modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("surfbar")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "surfbar");
+ LOAD_URL('modules.php?module=index');
+} elseif ((!EXT_IS_ACTIVE('surfbar')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'surfbar');
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Prepare content for output
$content = array(
'surfbar_total_urls' => SURFBAR_GET_TOTAL_URLS("ACTIVE", "0"),
'surfbar_user_urls' => SURFBAR_GET_TOTAL_USER_URLS(),
'surfbar_total_online' => SURFBAR_DETERMINE_TOTAL_ONLINE(),
- 'surfbar_total_users' => TRANSLATE_COMMA(GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true)),
+ 'surfbar_total_users' => TRANSLATE_COMMA(GET_TOTAL_DATA("CONFIRMED", "user_data", 'userid', "status", true)),
'surfbar_min_reward' => TRANSLATE_COMMA(SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE()),
'surfbar_max_reward' => TRANSLATE_COMMA(SURFBAR_CALCULATE_DYNAMIC_MAX_VALUE()),
'surfbar_min_time' => CREATE_FANCY_TIME(SURFBAR_CALCULATE_DYNAMIC_MIN_VALUE()),
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("surfbar")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "surfbar");
+ LOAD_URL('modules.php?module=index');
+} elseif ((!EXT_IS_ACTIVE('surfbar')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'surfbar');
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
//
?>
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("theme")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "theme");
+ LOAD_URL('modules.php?module=index');
+} elseif ((!EXT_IS_ACTIVE('theme')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'theme');
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
if (REQUEST_ISSET_POST(('member_theme'))) {
// Save theme to member's profile
set_session('mxchange_theme', $newTheme);
// Theme saved!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MEMBER_THEME_SAVED'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_THEME_SAVED'));
}
// Initialize array
array_pk_sort($THEMES, array("theme_name"));
// Generate output lines for the template
-$OUT = ""; $SW = 2;
+$OUT = ''; $SW = 2;
foreach ($THEMES['theme_unix'] as $key => $unix) {
- $default = "";
+ $default = '';
if (get_session('mxchange_theme') == $unix) $default = " selected=\"selected\"";
// Add row
// No themes found???
$OUT = "<tr>
<td colspan=\"5\" class=\"bottom2\" height=\"80\">
- ".LOAD_TEMPLATE("admin_settings_saved", true, getMessage('MEMBER_NO_THEMES_FOUND'))."
+ ".LOAD_TEMPLATE('admin_settings_saved', true, getMessage('MEMBER_NO_THEMES_FOUND'))."
</td>
</tr>\n";
}
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("transfer")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "transfer");
+ LOAD_URL('modules.php?module=index');
+} elseif ((!EXT_IS_ACTIVE('transfer')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'transfer');
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Load data
$result = SQL_QUERY_ESC("SELECT opt_in FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
// Free memory
SQL_FREERESULT($result);
-$MODE = "";
+$MODE = '';
if (REQUEST_ISSET_GET(('mode'))) $MODE = REQUEST_GET('mode');
// Check for "faker"
-if (($opt_in == "N") && ($MODE == "new")) $MODE = "";
+if (($opt_in == 'N') && ($MODE == "new")) $MODE = '';
switch ($MODE)
{
// Check for nickname extension and set additional data
$nick = false; $add = ", userid";
- if (EXT_IS_ACTIVE("nickname")) {
+ if (EXT_IS_ACTIVE('nickname')) {
$add = ", nickname";
$nick = true;
}
ADD_POINTS_REFSYSTEM("member_transfer", bigintval(REQUEST_POST('to_uid')), bigintval(REQUEST_POST('points')), false, "0", false, "direct");
// ... and add it to current user's used points
- SUB_POINTS("transfer", getUserId(), REQUEST_POST('points'));
+ SUB_POINTS('transfer', getUserId(), REQUEST_POST('points'));
// First send email to recipient
- $msg = LOAD_EMAIL_TEMPLATE("member_transfer_recipient", "", constant('__RECIPIENT_UID'));
+ $msg = LOAD_EMAIL_TEMPLATE("member_transfer_recipient", '', constant('__RECIPIENT_UID'));
SEND_EMAIL(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'));
+ $msg = LOAD_EMAIL_TEMPLATE("member_transfer_sender", '', constant('__SENDER_UID'));
SEND_EMAIL(constant('__SENDER_EMAIL'), getMessage('TRANSFER_MEMBER_SENDER_SUBJ').": ".$RECIPIENT, $msg);
// At last send admin mail(s)
SEND_ADMIN_NOTIFICATION($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>");
+ 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>");
+ 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>");
+ 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>");
+ 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>");
+ 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>");
+ 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>");
+ 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")) {
+ 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",
array(getUserId()), __FILE__, __LINE__);
$OUT .= "</option>\n";
}
$OUT .= "</select>\n";
- define('__TRANSFER_TO_DISABLED', "");
+ define('__TRANSFER_TO_DISABLED', '');
// Free memory
SQL_FREERESULT($result);
define('__TRANSFER_REASON_VALUE', strip_tags(REQUEST_POST('reason')));
} else {
// Set empty values
- define('__TRANSFER_POINTS_VALUE', "");
- define('__TRANSFER_REASON_VALUE', "");
+ define('__TRANSFER_POINTS_VALUE', '');
+ define('__TRANSFER_REASON_VALUE', '');
}
// Output form
$total = 0;
$result = SQL_QUERY_ESC($sql, array(getUserId()), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
- $OUT = ""; $SW = 2;
+ $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
// Nothing for in or out
$OUT = "<tr>
<td colspan=\"5\" align=\"center\" class=\"bottom2\" height=\"70\">
- ".LOAD_TEMPLATE("admin_settings_saved", true, $NOTHING)."
+ ".LOAD_TEMPLATE('admin_settings_saved', true, $NOTHING)."
</td>
</tr>";
}
__FILE__, __LINE__);
// Output rows
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result)) {
// Rewrite points
if ($content['trans_type'] == "OUT") $content['points'] = "-".$content['points']."";
// 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'))."
+ ".LOAD_TEMPLATE('admin_settings_saved', true, getMessage('TRANSFER_NO_INOUT_TRANSFERS'))."
</td>
</tr>";
}
$opt_in = REQUEST_POST('opt_in');
// "Settings saved..."
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_done\">{--SETTINGS_SAVED--}</div>");
+ 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', "");
+ case 'Y':
+ define('__TRANSFER_ALLOW_Y', ' chkecked="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\"");
+ case 'N':
+ define('__TRANSFER_ALLOW_Y', '');
+ define('__TRANSFER_ALLOW_N', ' chkecked="checked"');
define('__TRANSFER_NEW_LINK', getMessage('TRANSFER_PLEASE_ALLOW_OPT_IN'));
break;
}
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("mailid")) && (!IS_ADMIN())) {
+ LOAD_URL('modules.php?module=index');
+} elseif ((!EXT_IS_ACTIVE('mailid')) && (!IS_ADMIN())) {
LOAD_URL("modules.php?module=login");
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Shall we display a mail?
-if ((REQUEST_ISSET_GET(('bonusid'))) && (EXT_IS_ACTIVE("bonus"))) {
+if ((REQUEST_ISSET_GET(('bonusid'))) && (EXT_IS_ACTIVE('bonus'))) {
// Display bonus mail by loading it's full data
$result_data = SQL_QUERY_ESC("SELECT id, subject, timestamp, cat_id, points, text, is_notify, data_type, time, url
FROM `{!_MYSQL_PREFIX!}_bonus`
// Get timestamp from insert
$content['user_status'] = sprintf(getMessage('MEMBER_MAIL_BONUS_CONFIRMED_ON'),
- MAKE_DATETIME(USER_STATS_GET_TIMESTAMP("bonusid", $content['id']), "2")
+ MAKE_DATETIME(USER_STATS_GET_TIMESTAMP('bonusid', $content['id']), "2")
);
// Display it depending on mail (data) type
// Get timestamp from insert
$content['user_status'] = sprintf(getMessage('MEMBER_MAIL_NORMAL_CONFIRMED_ON'),
- MAKE_DATETIME(USER_STATS_GET_TIMESTAMP("mailid", $content['id']), "2")
+ MAKE_DATETIME(USER_STATS_GET_TIMESTAMP('mailid', $content['id']), "2")
);
// Display it depending on mail (data) type
SQL_FREERESULT($result_data);
}
-if (EXT_IS_ACTIVE("bonus")) {
+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__);
// Mails left for confirmation?
if (SQL_NUMROWS($result) > 0) {
// Please confirm these mails!
- $sum = 0; $OUT = ""; $SW = 2;
+ $sum = 0; $OUT = ''; $SW = 2;
// @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
while (list($id, $id2, $type) = SQL_FETCHROW($result)) {
// Load data from stats table...
- $cat = ""; $result_data = false;
+ $cat = ''; $result_data = false;
switch ($type)
{
case "NORMAL":
WHERE s.id=%s
LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
- $type = "mailid"; $DATA = $id; $PROBLEM = getMessage('NORMAL_MAIL_PROBLEM');
+ $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",
array(bigintval($id2)), __FILE__, __LINE__);
- $type = "bonusid"; $DATA = $id2; $PROBLEM = getMessage('BONUS_MAIL_PROBLEM');
+ $type = 'bonusid'; $DATA = $id2; $PROBLEM = getMessage('BONUS_MAIL_PROBLEM');
break;
default: // Unknown type detected!
}
// Data found to this mail?
- if ((SQL_NUMROWS($result_data) == 1) && (($type == "mailid") || ($type == "bonusid"))) {
+ if ((SQL_NUMROWS($result_data) == 1) && (($type == 'mailid') || ($type == 'bonusid'))) {
// Mail was found!
list($subject, $timestamp, $cat, $pay, $sender) = SQL_FETCHROW($result_data);
}
// Prepare sender id
- if (($sender > 0) && ($type == "mailid")) {
+ if (($sender > 0) && ($type == 'mailid')) {
// Sender id
$sender = bigintval($sender);
- } elseif ($type == "bonusid") {
+ } elseif ($type == 'bonusid') {
// Is admin
$sender = getMessage('_ADMIN_SHORT');
} else {
);
// Load row template
- if (getConfig('show_points_unconfirmed') == "Y") {
+ if (getConfig('show_points_unconfirmed') == 'Y') {
$OUT .= LOAD_TEMPLATE("member_unconfirmed_row", true, $content);
} else {
$OUT .= LOAD_TEMPLATE("member_unconfirmed_row_nopoints", true, $content);
);
// Display points or not?
- if (getConfig('show_points_unconfirmed') == "Y") {
+ if (getConfig('show_points_unconfirmed') == 'Y') {
$OUT .= LOAD_TEMPLATE("member_unconfirmed_404", true, $content);
} else {
$OUT .= LOAD_TEMPLATE("member_unconfirmed_404_nopoints", true, $content);
define('__UNCONFIRMED_ROWS', $OUT);
// Load main template
- if (getConfig('show_points_unconfirmed') == "Y") {
+ if (getConfig('show_points_unconfirmed') == 'Y') {
LOAD_TEMPLATE("member_unconfirmed_table");
} else {
LOAD_TEMPLATE("member_unconfirmed_table_nopoints");
}
} else {
// No mails left to confirm... :)
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MEMBER_NO_MAILS_TO_CONFIRM'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_NO_MAILS_TO_CONFIRM'));
}
//
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
} elseif (!IS_MEMBER()) {
- LOAD_URL("modules.php?module=index");
+ LOAD_URL('modules.php?module=index');
}
// Add description as navigation point
-ADD_DESCR ("member", basename(__FILE__));
+ADD_DESCR ('member', basename(__FILE__));
// Export data for template
define('_LAST_ONLINE_VALUE', MAKE_DATETIME($GLOBALS['last']['online']));
-define('_LAST_MODULE_VALUE', GET_MOD_DESCR("member", $GLOBALS['last']['module']));
+define('_LAST_MODULE_VALUE', GET_MOD_DESCR('member', $GLOBALS['last']['module']));
// Load header template
LOAD_TEMPLATE("member_welcome_header");
$result = SQL_QUERY_ESC("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE notified='Y' AND userid=%s LIMIT 1",
array(getUserId()), __FILE__, __LINE__);
-if ((SQL_NUMROWS($result) == 1) && (EXT_IS_ACTIVE("profile"))) {
+if ((SQL_NUMROWS($result) == 1) && (EXT_IS_ACTIVE('profile'))) {
// Yes, he is so let's place him his wanted buttons
LOAD_TEMPLATE("profile-update");
} else {
require($INC);
} elseif (!IS_MEMBER()) {
// User is not logged in
- LOAD_URL("modules.php?module=index");
-} elseif ((!EXT_IS_ACTIVE("wernis")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "wernis");
+ LOAD_URL('modules.php?module=index');
+} elseif ((!EXT_IS_ACTIVE('wernis')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'wernis');
return;
}
// Add description as navigation point
-ADD_DESCR("member", __FILE__);
+ADD_DESCR('member', __FILE__);
// Check if the admin has entered the data
if ((getConfig('wernis_api_id') == "") || (getConfig('wernis_api_md5') == "")) {
// Something important is missing...
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('WERNIS_MEMBER_API_DATA_MISSING'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('WERNIS_MEMBER_API_DATA_MISSING'));
return;
} // END - if
array(getUserId()), __FILE__, __LINE__);
// Load all rows
- $content['rows'] = ""; $SW = 2;
+ $content['rows'] = ''; $SW = 2;
while ($data = SQL_FETCHARRAY($result)) {
// Prepare data for output
$rowContent = array(
$content['withdraw_link'] = "<em>{--WERNIS_MEMBER_WITHDRAW_DISABLED--}</em>";
// Is the payout mode active?
- if (getConfig('wernis_payout_active') == "Y") {
+ if (getConfig('wernis_payout_active') == 'Y') {
// Add link
$content['payout_link'] = "<a class=\"menu_blur\" style=\"height: 40px\" href=\"{!URL!}/modules.php?module=login&what=wernis&mode=payout\"><div style=\"padding-top: 10px\">{--MEMBER_WERNIS_MODE_PAYOUT--}</div></a>";
} // END - if
// Is the withdraw mode active?
- if (getConfig('wernis_withdraw_active') == "Y") {
+ if (getConfig('wernis_withdraw_active') == 'Y') {
// Add link
$content['withdraw_link'] = "<a class=\"menu_blur\" style=\"height: 40px\" href=\"{!URL!}/modules.php?module=login&what=wernis&mode=withdraw\"><div style=\"padding-top: 10px\">{--MEMBER_WERNIS_MODE_WITHDRAW--}</div></a>";
} // END - if
// Mode chooser! ;-)
REQUEST_SET_GET('mode', "choose");
}
-} elseif ((REQUEST_GET('mode') == "payout") && (getConfig('wernis_payout_active') == "Y")) {
+} elseif ((REQUEST_GET('mode') == 'payout') && (getConfig('wernis_payout_active') == 'Y')) {
// Get total points and check if the user can request a payout
$points = GET_TOTAL_DATA(getUserId(), "user_points", "points") - GET_TOTAL_DATA(getUserId(), "user_data", "used_points");
$points = $points - getConfig('points_register');
// Is there a percentage or fixed fee?
- $points = WERNIS_TAKE_FEE($points, "payout");
+ $points = WERNIS_TAKE_FEE($points, 'payout');
// Is this enougth for a payout?
if ($points < getConfig('wernis_min_payout')) {
// No, then abort here
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_MIN_PAYOUT'), TRANSLATE_COMMA(getConfig('wernis_min_payout'))));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_MIN_PAYOUT'), TRANSLATE_COMMA(getConfig('wernis_min_payout'))));
return;
} // END - if
WERNIS_ADD_FEES_TO_ARRAY($content);
// Get WDS66 id
- $content['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__);
// Free result
SQL_FREERESULT($result);
-} elseif ((REQUEST_GET('mode') == "withdraw") && (getConfig('wernis_withdraw_active') == "Y")) {
+} elseif ((REQUEST_GET('mode') == "withdraw") && (getConfig('wernis_withdraw_active') == 'Y')) {
// Get total points for just displaying them
$points = GET_TOTAL_DATA(getUserId(), "user_points", "points") - GET_TOTAL_DATA(getUserId(), "user_data", "used_points");
// Prepare data for the template
$content['points'] = TRANSLATE_COMMA($points);
$content['min_points'] = TRANSLATE_COMMA(getConfig('wernis_min_withdraw'));
- $content['wds66_id'] = "";
+ $content['wds66_id'] = '';
// Add fees to array
WERNIS_ADD_FEES_TO_ARRAY($content);
SQL_FREERESULT($result);
} else {
// Invalid mode!
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_MODE_INVALID'), REQUEST_GET(('mode'))));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_MODE_INVALID'), REQUEST_GET(('mode'))));
return;
}
// Is the user ID and password set?
if (!REQUEST_ISSET_POST(('wds66_id'))) {
// Nothing entered in WDS66 user ID
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('WERNIS_MEMBER_EMPTY_USERNAME'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('WERNIS_MEMBER_EMPTY_USERNAME'));
} elseif (!REQUEST_ISSET_POST(('wds66_password'))) {
// Nothing entered in WDS66 password
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('WERNIS_MEMBER_EMPTY_PASSWORD'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('WERNIS_MEMBER_EMPTY_PASSWORD'));
} elseif (!REQUEST_ISSET_POST(('amount'))) {
// Nothing entered in amount
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('WERNIS_MEMBER_EMPTY_AMOUNT'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('WERNIS_MEMBER_EMPTY_AMOUNT'));
} elseif (REQUEST_POST('wds66_id') != bigintval(REQUEST_POST('wds66_id'))) {
// Only numbers in account ID!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('WERNIS_MEMBER_INVALID_USERNAME'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('WERNIS_MEMBER_INVALID_USERNAME'));
} elseif (REQUEST_POST('amount') != bigintval(REQUEST_POST('amount'))) {
// Only numbers in amount!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('WERNIS_MEMBER_INVALID_AMOUNT'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('WERNIS_MEMBER_INVALID_AMOUNT'));
} else {
// Check input data depending on the mode and execute the requested mode
switch (REQUEST_GET('mode')) {
case "withdraw": // Widthdraws WDS66 -> This exchange
if (REQUEST_POST('amount') < getConfig('wernis_min_withdraw')) {
// Not enougth entered!
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_AMOUNT_SMALLER_MIN'), getConfig(('wernis_min_withdraw'))));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_AMOUNT_SMALLER_MIN'), getConfig(('wernis_min_withdraw'))));
} else {
// All is fine here so do the withdraw
$success = WERNIS_EXECUTE_WITHDRAW(REQUEST_POST('wds66_id'), md5(REQUEST_POST('wds66_password')), REQUEST_POST('amount'));
array(bigintval(REQUEST_POST('wds66_id')), getUserId()), __FILE__, __LINE__);
// All done!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('WERNIS_MEMBER_WITHDRAW_DONE'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('WERNIS_MEMBER_WITHDRAW_DONE'));
return;
} elseif ((GET_WERNIS_ERROR_CODE() == "user_failed") || (GET_WERNIS_ERROR_CODE() == "own_failed") || (GET_WERNIS_ERROR_CODE() == "amount_failed")) {
// Wrong login data
- LOAD_TEMPLATE("admin_settings_saved", false, GET_WERNIS_ERROR_MESSAGE());
+ LOAD_TEMPLATE('admin_settings_saved', false, GET_WERNIS_ERROR_MESSAGE());
} else {
// Something went wrong
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_WITHDRAW_FAILED'), GET_WERNIS_ERROR_MESSAGE()));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_WITHDRAW_FAILED'), GET_WERNIS_ERROR_MESSAGE()));
}
}
break;
- case "payout": // Payout this exchange -> WDS66
+ case 'payout': // Payout this exchange -> WDS66
if (REQUEST_POST('amount') < getConfig('wernis_min_payout')) {
// Not enougth entered!
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_AMOUNT_SMALLER_MIN'), getConfig(('wernis_min_payout'))));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_AMOUNT_SMALLER_MIN'), getConfig(('wernis_min_payout'))));
} elseif (REQUEST_POST('amount') > $points) {
// Not enougth points left!
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_PAYOUT_POINTS_DEPLETED'), bigintval(REQUEST_POST('amount')), bigintval($points)));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_PAYOUT_POINTS_DEPLETED'), bigintval(REQUEST_POST('amount')), bigintval($points)));
} else {
// All is fine here so do the withdraw
$success = WERNIS_EXECUTE_PAYOUT(REQUEST_POST('wds66_id'), REQUEST_POST('amount'));
array(bigintval(REQUEST_POST('wds66_id')), getUserId()), __FILE__, __LINE__);
// All done!
- LOAD_TEMPLATE("admin_settings_saved", false, getMessage('WERNIS_MEMBER_PAYOUT_DONE'));
+ LOAD_TEMPLATE('admin_settings_saved', false, getMessage('WERNIS_MEMBER_PAYOUT_DONE'));
return;
} elseif ((GET_WERNIS_ERROR_CODE() == "user_failed") || (GET_WERNIS_ERROR_CODE() == "own_failed") || (GET_WERNIS_ERROR_CODE() == "amount_failed") || (GET_WERNIS_ERROR_CODE() == "api_amount_failed")) {
// Wrong login data
- LOAD_TEMPLATE("admin_settings_saved", false, GET_WERNIS_ERROR_MESSAGE());
+ LOAD_TEMPLATE('admin_settings_saved', false, GET_WERNIS_ERROR_MESSAGE());
} else {
// Something went wrong
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_WITHDRAW_FAILED'), GET_WERNIS_ERROR_MESSAGE()));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_WITHDRAW_FAILED'), GET_WERNIS_ERROR_MESSAGE()));
}
}
break;
default: // Invalid mode!
DEBUG_LOG(__FILE__, __LINE__, sprintf("Invalid mode %s detected.", REQUEST_GET('mode')));
- LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_MODE_INVALID'), REQUEST_GET(('mode'))));
+ LOAD_TEMPLATE('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_MODE_INVALID'), REQUEST_GET(('mode'))));
return;
}
}
************************************************************************/
// Some security stuff...
-$URL = "";
+$URL = '';
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif ((!EXT_IS_ACTIVE("order")) && (!IS_ADMIN())) {
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "order");
+} elseif ((!EXT_IS_ACTIVE('order')) && (!IS_ADMIN())) {
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'order');
return;
} elseif (!IS_MEMBER()) {
// Sorry, no guest access!
- $URL = "modules.php?module=index";
+ $URL = 'modules.php?module=index';
} elseif (!REQUEST_ISSET_GET(('order'))) {
// You cannot call this module directly!
$URL = "modules.php?module=login&what=order";
// When URL is empty nothing bad happend here
if (empty($URL)) {
// Is the auto-send mechanism active or inactive?
- if (getConfig('autosend_active') == "Y") {
+ if (getConfig('autosend_active') == 'Y') {
// Auto-send is active
define('ADMIN_AUTOSEND', getMessage('ADMIN_AUTOSEND_ACTIVE'));
define('MEMBER_AUTOSEND', getMessage('MEMBER_AUTOSEND_ACTIVE'));
$USED = $DATA[7] * GET_PAY_POINTS($DATA[3]);
// Update used points
- $add = "";
- if (getConfig('order_max_full') == "ORDER") $add = ", mail_orders=mail_orders+1";
- SUB_POINTS("order", getUserId(), $USED);
+ $add = '';
+ if (getConfig('order_max_full') == 'ORDER') $add = ", mail_orders=mail_orders+1";
+ SUB_POINTS('order', getUserId(), $USED);
// Prepare content
$content = array(
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__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'));
return;
} elseif (!IS_SPONSOR()) {
define('__SPONSOR_FOOTER', LOAD_TEMPLATE("sponsor_footer", true));
// "You are here" navigation
-define('__SPONSOR_YOURE_HERE', ADD_DESCR("sponsor", $GLOBALS['what'], false, false));
+define('__SPONSOR_YOURE_HERE', ADD_DESCR('sponsor', $GLOBALS['what'], false, false));
// Load main sponsor template
LOAD_TEMPLATE("sponsor_main");
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
require($INC);
-} elseif ((!EXT_IS_ACTIVE("sponsor"))
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
+} elseif ((!EXT_IS_ACTIVE('sponsor'))
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'sponsor');
return;
} elseif (!IS_SPONSOR()) {
// No sponsor!
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
require($INC);
-} elseif ((!EXT_IS_ACTIVE("sponsor"))
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
+} elseif ((!EXT_IS_ACTIVE('sponsor'))
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'sponsor');
return;
} elseif (!IS_SPONSOR()) {
// No sponsor!
$message = sprintf(getMessage('SPONSOR_PASSWORD_TOO_SHORT'), getConfig('pass_len'));
} else {
// Default is we don't want to change password!
- $PASS_AND = ""; $PASS_DATA = "";
+ $PASS_AND = ''; $PASS_DATA = '';
// Check if we want to change password or not
if ((REQUEST_POST('pass1') == REQUEST_POST('pass2')) && (REQUEST_ISSET_POST(('pass1'))) && (REQUEST_POST('pass1') != REQUEST_POST('pass_old'))) {
if (!empty($message)) {
// Output message
- $OUT = LOAD_TEMPLATE("admin_settings_saved", true, $message);
+ $OUT = LOAD_TEMPLATE('admin_settings_saved', true, $message);
} else {
// No message generated
- $OUT = LOAD_TEMPLATE("admin_settings_saved", true, getMessage('SPONSOR_NO_MESSAGE_GENERATED'));
+ $OUT = LOAD_TEMPLATE('admin_settings_saved', true, getMessage('SPONSOR_NO_MESSAGE_GENERATED'));
}
} else {
// Check for gender selection
{
case "M": // Male
define('__GENDER_M', " selected=\"selected\"");
- define('__GENDER_F', "");
- define('__GENDER_C', "");
+ define('__GENDER_F', '');
+ define('__GENDER_C', '');
break;
case "F": // Female
- define('__GENDER_M', "");
+ define('__GENDER_M', '');
define('__GENDER_F', " selected=\"selected\"");
- define('__GENDER_C', "");
+ define('__GENDER_C', '');
break;
case "C": // Company
- define('__GENDER_M', "");
- define('__GENDER_F', "");
+ define('__GENDER_M', '');
+ define('__GENDER_F', '');
define('__GENDER_C', " selected=\"selected\"");
break;
}
} else {
// Locked or so?
$STATUS = SPONSOR_TRANSLATE_STATUS($content['status']);
- $OUT = LOAD_TEMPLATE("admin_settings_saved", true, sprintf(getMessage('SPONSOR_ACCOUNT_FAILED'), $STATUS));
+ $OUT = LOAD_TEMPLATE('admin_settings_saved', true, sprintf(getMessage('SPONSOR_ACCOUNT_FAILED'), $STATUS));
}
} else {
// Sponsor account not found!
- $OUT = LOAD_TEMPLATE("admin_settings_saved", true, sprintf(getMessage('SPONSOR_ACCOUNT_404'), get_session('sponsorid')));
+ $OUT = LOAD_TEMPLATE('admin_settings_saved', true, sprintf(getMessage('SPONSOR_ACCOUNT_404'), get_session('sponsorid')));
}
// Free memory
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
require($INC);
-} elseif ((!EXT_IS_ACTIVE("sponsor"))
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
+} elseif ((!EXT_IS_ACTIVE('sponsor'))
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'sponsor');
return;
} elseif (!IS_SPONSOR()) {
// No sponsor!
if (!empty($message)) {
// Output message
- $OUT = LOAD_TEMPLATE("admin_settings_saved", true, $message);
+ $OUT = LOAD_TEMPLATE('admin_settings_saved', true, $message);
} else {
// No message generated
- $OUT = LOAD_TEMPLATE("admin_settings_saved", true, getMessage('SPONSOR_NO_MESSAGE_GENERATED'));
+ $OUT = LOAD_TEMPLATE('admin_settings_saved', true, getMessage('SPONSOR_NO_MESSAGE_GENERATED'));
}
} else {
// Make yes/no selection
switch ($content['receive_warnings']) {
- case "Y":
- define('__YES', " checked=\"checked\"");
- define('__NO', "");
+ case 'Y':
+ define('__YES', ' chkecked="checked"');
+ define('__NO', '');
break;
- case "N":
- define('__YES', "");
- define('__NO', " checked=\"checked\"");
+ case 'N':
+ define('__YES', '');
+ define('__NO', ' chkecked="checked"');
break;
}
} else {
// Locked or so?
$STATUS = SPONSOR_TRANSLATE_STATUS($content['status']);
- $OUT = LOAD_TEMPLATE("admin_settings_saved", true, sprintf(getMessage('SPONSOR_ACCOUNT_FAILED'), $STATUS));
+ $OUT = LOAD_TEMPLATE('admin_settings_saved', true, sprintf(getMessage('SPONSOR_ACCOUNT_FAILED'), $STATUS));
}
} else {
// Sponsor account not found!
- $OUT = LOAD_TEMPLATE("admin_settings_saved", true, sprintf(getMessage('SPONSOR_ACCOUNT_404'), get_session('sponsorid')));
+ $OUT = LOAD_TEMPLATE('admin_settings_saved', true, sprintf(getMessage('SPONSOR_ACCOUNT_404'), get_session('sponsorid')));
}
// Free memory
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4)."/security.php";
require($INC);
-} elseif ((!EXT_IS_ACTIVE("sponsor"))
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "sponsor");
+} elseif ((!EXT_IS_ACTIVE('sponsor'))
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'sponsor');
return;
} elseif (!IS_SPONSOR()) {
// No sponsor!
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif (!EXT_IS_ACTIVE("beg")) {
+} elseif (!EXT_IS_ACTIVE('beg')) {
return;
}
// Check if month is done
if (($curr != getConfig('last_month')) && (getConfig('last_month') > 0) && (getConfig('beg_ranks') > 0) && ($GLOBALS['output_mode'] != 1)) {
- // Extension "autopurge" is inactive or purging of inactive accounts is deactivated
- $whereStatement1 = "";
+ // Extension 'autopurge' is inactive or purging of inactive accounts is deactivated
+ $whereStatement1 = '';
$whereStatement2 = getConfig(('beg_ranks'));
// Shall we exclude webmaster's own userid?
} // END - if
// Let's check if there are some points left we can "pay"...
- if (EXT_IS_ACTIVE("autopurge")) {
+ if (EXT_IS_ACTIVE('autopurge')) {
// Use last online stamp only when autopurge for inactive members is activated
- if ((getConfig('ap_inactive_since') > 0) && (getConfig('beg_active') == "Y")) {
+ if ((getConfig('ap_inactive_since') > 0) && (getConfig('beg_active') == 'Y')) {
// Okay, include last online timestamp
$whereStatement1 .= sprintf(" AND last_online >= (UNIX_TIMESTAMP() - %s)", getConfig(('ap_inactive_since')));;
} // END - if
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif (!EXT_IS_ACTIVE("bonus")) {
+} elseif (!EXT_IS_ACTIVE('bonus')) {
return;
}
$curr = date("m", time());
if (($curr != getConfig('last_month')) && (getConfig('bonus_ranks') > 0) && ($GLOBALS['output_mode'] != 1)) {
- // Extension "autopurge" is inactive or purging of inactive accounts is deactivated
+ // Extension 'autopurge' is inactive or purging of inactive accounts is deactivated
$whereStatement1 = "WHERE `status`='CONFIRMED'";
$whereStatement2 = getConfig(('bonus_ranks'));
// Shall I keep inactive members away from here? (mostly wanted in an "active-rallye" ...)
- if (EXT_IS_ACTIVE("autopurge")) {
+ if (EXT_IS_ACTIVE('autopurge')) {
// Use last online stamp only when autopurge for inactive members is activated
if (getConfig('ap_inactive_since') > 0) {
// Okay, include last online timestamp
} // END - if
// Add more bonus points here
- $add = "";
- if (getConfig('bonus_click_yn') == "Y") $add .= " + turbo_bonus";
- if (getConfig('bonus_login_yn') == "Y") $add .= " + login_bonus";
- if (getConfig('bonus_order_yn') == "Y") $add .= " + bonus_order";
- if (getConfig('bonus_stats_yn') == "Y") $add .= " + bonus_stats";
- if (getConfig('bonus_ref_yn') == "Y") $add .= " + bonus_ref";
+ $add = '';
+ if (getConfig('bonus_click_yn') == 'Y') $add .= " + turbo_bonus";
+ if (getConfig('bonus_login_yn') == 'Y') $add .= " + login_bonus";
+ if (getConfig('bonus_order_yn') == 'Y') $add .= " + bonus_order";
+ if (getConfig('bonus_stats_yn') == 'Y') $add .= " + bonus_stats";
+ if (getConfig('bonus_ref_yn') == 'Y') $add .= " + bonus_ref";
// Shall we add some entries?
if (!empty($add)) {
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif (!EXT_IS_ACTIVE("newsletter")) {
+} elseif (!EXT_IS_ACTIVE('newsletter')) {
return;
}
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif (!EXT_IS_ACTIVE("surfbar")) {
+} elseif (!EXT_IS_ACTIVE('surfbar')) {
return;
}
if ((!isInstalling()) && (isInstalled())) {
// Check for write-permission for config.php and inc directory
if (empty($GLOBALS['module'])) $GLOBALS['module'] = REQUEST_GET('module');
- if (empty($GLOBALS['module'])) $GLOBALS['module'] = "index";
+ if (empty($GLOBALS['module'])) $GLOBALS['module'] = 'index';
// CSS array
EXT_INIT_CSS_FILES();
loadConfiguration();
// Load "databases" aka static arrays
- LOAD_INC_ONCE("inc/databases.php");
+ LOAD_INC_ONCE('inc/databases.php');
// Init session
- LOAD_INC_ONCE("inc/session.php");
+ LOAD_INC_ONCE('inc/session.php');
// Load versions
- LOAD_INC_ONCE("inc/versions.php");
+ LOAD_INC_ONCE('inc/versions.php');
// Loading patching system is required here...
- LOAD_INC_ONCE("inc/patch-system.php"); // Initialize patch system
+ LOAD_INC_ONCE('inc/patch-system.php'); // Initialize patch system
// Run daily reset
- LOAD_INC_ONCE("inc/check-reset.php");
+ LOAD_INC_ONCE('inc/check-reset.php');
// Load admin include file if he is admin
if (IS_ADMIN()) {
// Administrative functions
- LOAD_INC_ONCE("inc/modules/admin/admin-inc.php");
+ LOAD_INC_ONCE('inc/modules/admin/admin-inc.php');
} // END - if
- //* DEBUG: */ ADD_POINTS_REFSYSTEM("test", 36, 1000);
+ //* DEBUG: */ ADD_POINTS_REFSYSTEM('test', 36, 1000);
//* DEBUG: */ die();
// Get all values
if (($GLOBALS['output_mode'] != 1) && ($GLOBALS['output_mode'] != -1)) {
- if (empty($GLOBALS['module'])) $GLOBALS['module'] = "empty";
+ if (empty($GLOBALS['module'])) $GLOBALS['module'] = 'empty';
if (empty($GLOBALS['what'])) $GLOBALS['what'] = GET_WHAT($GLOBALS['module']);
if (empty($GLOBALS['action'])) $GLOBALS['action'] = GET_ACTION($GLOBALS['module'], $GLOBALS['what']);
} else {
// Set action/what to empty
- $GLOBALS['action'] = "";
- $GLOBALS['what'] = "";
+ $GLOBALS['action'] = '';
+ $GLOBALS['what'] = '';
}
// Run the init filter chain
// Set default 'what' value
//* DEBUG: */ OUTPUT_HTML("-".$GLOBALS['module']."/".$GLOBALS['what']."-<br />");
if ((empty($GLOBALS['what'])) && (empty($GLOBALS['action'])) && ($GLOBALS['output_mode'] != 1) && ($GLOBALS['output_mode'] != -1)) {
- if ($GLOBALS['module'] == "admin") {
+ if ($GLOBALS['module'] == 'admin') {
// Set 'action' value to 'login' in admin menu
$GLOBALS['action'] = GET_ACTION($GLOBALS['module'], $GLOBALS['what']);
- } elseif (($GLOBALS['module'] == "index") || ($GLOBALS['module'] == "login")) {
+ } elseif (($GLOBALS['module'] == 'index') || ($GLOBALS['module'] == 'login')) {
// Set 'what' value to 'welcome' in guest and member menu
- $GLOBALS['what'] = "welcome";
- if (getConfig('index_home') != "") $GLOBALS['what'] = getConfig('index_home');
+ $GLOBALS['what'] = 'welcome';
+ if (getConfig('index_home') != '') $GLOBALS['what'] = getConfig('index_home');
} else {
// Anything else like begging link
- $GLOBALS['what'] = "";
+ $GLOBALS['what'] = '';
}
} // END - if
// Update sending pool
- if (($GLOBALS['output_mode'] != "1") && ($GLOBALS['output_mode'] != "-1")) LOAD_INC_ONCE("inc/pool-update.php"); // Sends out mails in configureable steps
+ if (($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != '-1')) LOAD_INC_ONCE('inc/pool-update.php'); // Sends out mails in configureable steps
// Load all active extension including language files when not upgrading.
// Check module for testing and count one click
- if (checkModulePermissions($GLOBALS['module']) == "done") countModuleHit($GLOBALS['module']);
+ if (checkModulePermissions($GLOBALS['module']) == 'done') countModuleHit($GLOBALS['module']);
// Shall we activate the exchange?
if (getConfig('activate_xchange') > 0) activateExchange();
// Is the extension sql_patches installed and at least 0.3.6?
- if (GET_EXT_VERSION("sql_patches") >= "0.3.6") {
+ if (GET_EXT_VERSION('sql_patches') >= '0.3.6') {
// Generate random number
- define('RAND_NUMBER', generateRandomCodde(10, mt_rand(10000,32766), getUserId(), ""));
+ define('RAND_NUMBER', generateRandomCodde(10, mt_rand(10000,32766), getUserId(), ''));
} else {
// Generate weak (!!!) code
define('RAND_NUMBER', mt_rand(1000000, 9999999));
///////////////////////////////////////////////////
// Set other missing variables
- if (!isset($GLOBALS['output_mode'])) $GLOBALS['output_mode'] = "0";
+ if (!isset($GLOBALS['output_mode'])) $GLOBALS['output_mode'] = '0';
// Include databases.php
- LOAD_INC_ONCE("inc/databases.php");
+ LOAD_INC_ONCE('inc/databases.php');
// Init session
- LOAD_INC_ONCE("inc/session.php");
+ LOAD_INC_ONCE('inc/session.php');
// Load versions
- LOAD_INC_ONCE("inc/versions.php");
+ LOAD_INC_ONCE('inc/versions.php');
// Check if we are in installation routine
- if ((!isInstalling()) && ($GLOBALS['output_mode'] != "1") && ($GLOBALS['output_mode'] != -1)) {
+ if ((!isInstalling()) && ($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != -1)) {
// Redirect to the installation system
- LOAD_URL("install.php");
+ LOAD_URL('install.php');
} // END - if
// Double-check installation mode
if ((!isInstalled()) || (!isAdminRegistered())) {
// Check for file permissions
- if (!IS_INC_WRITEABLE("config")) {
+ if (!IS_INC_WRITEABLE('config')) {
addFatalMessage(__FILE__, __LINE__, getMessage('CONFIG_IS_WRITE_PROTECTED'));
} // END - if
- if (!IS_INC_WRITEABLE("dummy")) {
+ if (!IS_INC_WRITEABLE('dummy')) {
addFatalMessage(__FILE__, __LINE__, getMessage('DUMMY_IS_WRITE_PROTECTED'));
} // END - if
- if (!IS_INC_WRITEABLE(".secret/dummy")) {
+ if (!IS_INC_WRITEABLE('.secret/dummy')) {
addFatalMessage(__FILE__, __LINE__, getMessage('SECRET_IS_WRITE_PROTECTED'));
} // END - if
} // END - if
runFilterChain('init');
// Load extension 'sql_patches'
- LOAD_EXTENSION("sql_patches");
+ LOAD_EXTENSION('sql_patches');
}
-if ((getTotalFatalErrors() > 0) && (isInstalled()) && (!isInstalling()) && ($GLOBALS['output_mode'] != "1")) {
+if ((getTotalFatalErrors() > 0) && (isInstalled()) && (!isInstalling()) && ($GLOBALS['output_mode'] != '1')) {
// One or more fatal error(s) occur during connect...
- LOAD_INC_ONCE("inc/header.php");
- LOAD_INC_ONCE("inc/fatal_errors.php");
- LOAD_INC_ONCE("inc/footer.php");
+ LOAD_INC_ONCE('inc/header.php');
+ LOAD_INC_ONCE('inc/fatal_errors.php');
+ LOAD_INC_ONCE('inc/footer.php');
} // END - if
//
// Returns the title for given module
function ADD_MODULE_TITLE ($mod) {
// Init variables
- $name = "";
+ $name = '';
$result = false;
// Is the script installed?
if (isInstalled()) {
// Check if cache is valid
- if ((GET_EXT_VERSION("cache") >= "0.1.2") && (isset($GLOBALS['cache_array']['modules']['module'])) && (in_array($mod, $GLOBALS['cache_array']['modules']['module']))) {
+ if ((GET_EXT_VERSION('cache') >= '0.1.2') && (isset($GLOBALS['cache_array']['modules']['module'])) && (in_array($mod, $GLOBALS['cache_array']['modules']['module']))) {
// Load from cache
$name = $GLOBALS['cache_array']['modules']['title'][$mod];
// Update cache hits
incrementConfigEntry('cache_hits');
- } elseif (!EXT_IS_ACTIVE("cache")) {
+ } 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__);
// Check validity of a given module name (no file extension)
function checkModulePermissions ($mod) {
// Filter module name (names with low chars and underlines are fine!)
- $mod = preg_replace("/[^a-z_]/", "", $mod);
+ $mod = preg_replace("/[^a-z_]/", '', $mod);
// Check for prefix is a extension...
$modSplit = explode("_", $mod);
- $extension = ""; $mod_chk = $mod;
+ $extension = ''; $mod_chk = $mod;
//* DEBUG: */ echo __LINE__."*".count($modSplit)."*/".$mod."*<br />";
if (count($modSplit) == 2) {
// Okay, there is a seperator (_) in the name so is the first part a module?
$found = false;
// Check if cache is latest version
- if (GET_EXT_VERSION("cache") >= "0.1.2") {
+ if (GET_EXT_VERSION('cache') >= '0.1.2') {
// Is the cache there?
if (!isset($GLOBALS['cache_array']['modules'])) {
// This should normally not happen...
// No, then we have to update it!
$ret = "cache_miss";
}
- } elseif (!EXT_IS_ACTIVE("cache")) {
+ } 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__);
// Check returned values against current access permissions
//
// Admin access ----- Guest access ----- --- Guest or member? ---
- if ((IS_ADMIN()) || (($locked == "N") && ($admin == "N") && (($mem == "N") || (IS_MEMBER())))) {
+ if ((IS_ADMIN()) || (($locked == 'N') && ($admin == 'N') && (($mem == 'N') || (IS_MEMBER())))) {
// If you are admin you are welcome for everything!
$ret = "done";
- } elseif ($locked == "Y") {
+ } elseif ($locked == 'Y') {
// Module is locked
$ret = "locked";
- } elseif (($mem == "Y") && (!IS_MEMBER())) {
+ } elseif (($mem == 'Y') && (!IS_MEMBER())) {
// You have to login first!
$ret = "mem_only";
- } elseif (($admin == "Y") && (!IS_ADMIN())) {
+ } elseif (($admin == 'Y') && (!IS_ADMIN())) {
// Only the Admin is allowed to enter this module!
$ret = "admin_only";
} else {
// ----- Legacy module ----- ---- Module in base folder ---- --- Module with extension's name ---
if ((FILE_READABLE(sprintf("%sinc/modules/%s.php", constant('PATH'), $mod))) || (FILE_READABLE(sprintf("%s%s.php", constant('PATH'), $mod))) || (FILE_READABLE(sprintf("%s%s/%s.php", constant('PATH'), $extension, $mod)))) {
// Data is missing so we add it
- if (GET_EXT_VERSION("sql_patches") >= "0.3.6") {
+ if (GET_EXT_VERSION('sql_patches') >= '0.3.6') {
// Since 0.3.6 we have a has_menu column, this took me a half hour
// to find a loop here... *sigh*
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_mod_reg`
$file = basename($FQFN);
// Init variables
- $LINK_ADD = "";
- $OUT = "";
- $AND = "";
+ $LINK_ADD = '';
+ $OUT = '';
+ $AND = '';
// First we have to do some analysis...
if (substr($file, 0, 7) == "action-") {
$type = "action";
$search = substr($file, 7);
switch ($ACC_LVL) {
- case "admin":
- $modCheck = "admin";
+ case 'admin':
+ $modCheck = 'admin';
break;
- case "sponsor":
- case "guest":
- case "member":
+ case 'sponsor':
+ case 'guest':
+ case 'member':
$modCheck = $GLOBALS['module'];
break;
}
// This is an admin what file!
$type = "what";
$search = substr($file, 5);
- $AND = "";
+ $AND = '';
switch ($ACC_LVL) {
- case "admin":
- $modCheck = "admin";
+ case 'admin':
+ $modCheck = 'admin';
break;
- case "guest":
- case "member":
+ case 'guest':
+ case 'member':
$modCheck = $GLOBALS['module'];
if (!IS_ADMIN()) {
$AND = " AND `visible`='Y' AND `locked`='N'";
}
$dummy = substr($search, 0, -4);
$AND .= " AND `action`='".GET_ACTION($ACC_LVL, $dummy)."'";
- } elseif (($ACC_LVL == "sponsor") || ($ACC_LVL == "engine")) {
+ } elseif (($ACC_LVL == 'sponsor') || ($ACC_LVL == "engine")) {
// Sponsor / engine menu
$type = "what";
$search = $file;
$modCheck = $GLOBALS['module'];
- $AND = "";
+ $AND = '';
} else {
// Other
$type = "menu";
$search = $file;
$modCheck = $GLOBALS['module'];
- $AND = "";
+ $AND = '';
}
// Begin the navigation line
$prefix = "<div class=\"you_are_here\">{--YOU_ARE_HERE--} <strong><a class=\"you_are_here\" href=\"{!URL!}/modules.php?module=".$GLOBALS['module'].$LINK_ADD."\">Home</a></strong>";
} else {
if (!$return) $GLOBALS['nav_depth']++;
- $prefix = "";
+ $prefix = '';
}
$prefix .= " -> ";
if ($return === true) {
// Return title
return $ret;
- } elseif (((GET_EXT_VERSION("sql_patches") >= "0.2.3") && (getConfig('youre_here') == "Y")) || ((IS_ADMIN()) && ($modCheck == "admin"))) {
+ } elseif (((GET_EXT_VERSION('sql_patches') >= '0.2.3') && (getConfig('youre_here') == 'Y')) || ((IS_ADMIN()) && ($modCheck == 'admin'))) {
// Output HTML code
$OUT = $prefix."<strong><a class=\"you_are_here\" href=\"{!URL!}/modules.php?module=".$modCheck."&".$type."=".$search.$LINK_ADD."\">".$ret."</a></strong>\n";
function ADD_MENU ($MODE, $act, $wht) {
// Init some variables
$main_cnt = 0;
- $AND = "";
- $main_action = "";
- $sub_what = "";
+ $AND = '';
+ $main_action = '';
+ $sub_what = '';
// is the menu action valid?
if (!VALIDATE_MENU_ACTION($MODE, $act, $wht, true)) {
$content = merge_array($content, $content2);
// Init content
- $OUT = "";
+ $OUT = '';
// Full file name for checking menu
//* DEBUG: */ echo __LINE__.":!!!!".$content['sub_what']."!!!<br />\n";
$INC_BLOCK = sprintf("inc/modules/%s/action-%s.php", $MODE, $content['action']);
if (FILE_READABLE($INC_BLOCK)) {
// Load include file
- if ((!EXT_IS_ACTIVE($content['action'])) || ($content['action'] == "online")) OUTPUT_HTML("<tr>
+ if ((!EXT_IS_ACTIVE($content['action'])) || ($content['action'] == 'online')) OUTPUT_HTML("<tr>
<td class=\"".$MODE."_menu_whats\">");
//* DEBUG: */ echo __LINE__."/".$main_cnt."/".$content['action']."/".$content['sub_what'].":".$GLOBALS['what']."*<br />\n";
LOAD_INC($INC_BLOCK);
//* DEBUG: */ echo __LINE__."/".$main_cnt."/".$content['action']."/".$content['sub_what'].":".$GLOBALS['what']."*<br />\n";
- if ((!EXT_IS_ACTIVE($content['action'])) || ($content['action'] == "online")) OUTPUT_HTML(" </td>
+ if ((!EXT_IS_ACTIVE($content['action'])) || ($content['action'] == 'online')) OUTPUT_HTML(" </td>
</tr>");
}
//* DEBUG: */ echo __LINE__."/".$main_cnt."/".$content['action']."/".$content['sub_what'].":".$GLOBALS['what']."*<br />\n";
// This patched function will reduce many SELECT queries for the specified or current admin login
function IS_ADMIN ($admin="") {
// Init variables
- $ret = false; $passCookie = ""; $valPass = "";
+ $ret = false; $passCookie = ''; $valPass = '';
//* DEBUG: */ echo __LINE__."ADMIN:".$admin."<br />";
// If admin login is not given take current from cookies...
// Count cache hits
incrementConfigEntry('cache_hits');
- } elseif ((!empty($admin)) && ((!EXT_IS_ACTIVE("cache"))) || (!isset($GLOBALS['cache_array']['admins']['password'][$admin]))) {
+ } 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__);
// Is he admin?
- $passDB = "";
+ $passDB = '';
if (SQL_NUMROWS($result) == 1) {
// Admin login was found so let's load password from DB
list($passDB) = SQL_FETCHROW($result);
if (!empty($valPass)) {
// Check if password is valid
//* DEBUG: */ print __FUNCTION__."*".$valPass."/".$passCookie."*<br />\n";
- $ret = (($valPass == $passCookie) || ((strlen($valPass) == 32) && ($valPass == md5($passCookie))) || (($valPass == "*FAILED*") && (!EXT_IS_ACTIVE("cache"))));
+ $ret = (($valPass == $passCookie) || ((strlen($valPass) == 32) && ($valPass == md5($passCookie))) || (($valPass == "*FAILED*") && (!EXT_IS_ACTIVE('cache'))));
}
// Return result of comparision
// Generates a list of "max receiveable emails per day"
function ADD_MAX_RECEIVE_LIST ($MODE, $default = "", $return = false) {
- $OUT = "";
+ $OUT = '';
$result = false;
switch ($MODE) {
- case "guest":
+ 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__);
break;
- case "member":
+ 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__);
// Some entries are found?
if (SQL_NUMROWS($result) > 0) {
- $OUT = "";
+ $OUT = '';
while ($content = SQL_FETCHARRAY($result)) {
$OUT .= " <option value=\"".$content['value']."\"";
if (REQUEST_POST('max_mails') == $content['value']) $OUT .= " selected=\"selected\"";
$ret = false;
// Look in all menus or only unlocked
- $add = "";
- if ((!IS_ADMIN()) && ($MODE != "admin")) $add = " AND `locked`='N'";
+ $add = '';
+ if ((!IS_ADMIN()) && ($MODE != 'admin')) $add = " AND `locked`='N'";
//* DEBUG: */ echo __LINE__.":".$MODE."/".$act."/".$wht."*<br />\n";
- if (($MODE != "admin") && ($UPDATE === true)) {
+ 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);
$DATA[0] = TRANSLATE_GENDER($DATA[0]);
// Clear/init the content variable
- $content = "";
- $DATA['info'] = "";
+ $content = '';
+ $DATA['info'] = '';
switch ($mod)
{
- case "mydata":
+ case 'mydata':
foreach ($modes as $mode) {
switch ($mode)
{
- case "normal": break; // Do not add any special lines
+ case 'normal': break; // Do not add any special lines
- case "email": // Email was changed!
+ case 'email': // Email was changed!
$content = MEMBER_CHANGED_EMAIL.": ".REQUEST_POST('old_addy')."\n";
break;
- case "pass": // Password was changed
+ case 'pass': // Password was changed
$content = MEMBER_CHANGED_PASS."\n";
break;
} // END - switch
} // END - if
- if (EXT_IS_ACTIVE("country")) {
+ 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") {
+ if (getConfig('admin_notify') == 'Y') {
// The admin needs to be notified about a profile change
$msg_admin = "admin_mydata_notify";
$sub_adm = ADMIN_CHANGED_DATA;
} else {
// No mail to admin
- $msg_admin = "";
- $sub_adm = "";
+ $msg_admin = '';
+ $sub_adm = '';
}
// Set subject lines
if ((!empty($sub_adm)) && (!empty($msg_admin))) {
// Send admin mail
SEND_ADMIN_NOTIFICATION($sub_adm, $msg_admin, $content, getUserId());
- } elseif (getConfig('admin_notify') == "Y") {
+ } elseif (getConfig('admin_notify') == 'Y') {
// Cannot send mails to admin!
$content = getMessage('CANNOT_SEND_ADMIN_MAILS');
} else {
} // END - if
// Load template
- LOAD_TEMPLATE("admin_settings_saved", false, $content);
+ LOAD_TEMPLATE('admin_settings_saved', false, $content);
}
// Update module counter
// Get action value from mode (admin/guest/member) and what-value
function GET_ACTION ($MODE, &$wht) {
// Init status
- $ret = "";
+ $ret = '';
//* DEBUG: */ echo __LINE__."=".$MODE."/".$wht."/".$GLOBALS['action']."=<br />";
- if ((empty($wht)) && ($MODE != "admin")) {
+ if ((empty($wht)) && ($MODE != 'admin')) {
$wht = "welcome";
if (getConfig('index_home') != "") $wht = getConfig('index_home');
} // END - if
- if ($MODE == "admin") {
+ if ($MODE == 'admin') {
// Action value for admin area
if (REQUEST_ISSET_GET('action')) {
// Use from request!
if (MODULE_HAS_MENU($MODE)) {
// Rewriting modules to menu
switch ($MODE) {
- case "index": $MODE = "guest"; break;
- case "login": $MODE = "member"; break;
+ case 'index': $MODE = 'guest'; break;
+ case "login": $MODE = 'member'; break;
} // END - switch
// Guest and member menu is "main" as the default
// Free memory
SQL_FREERESULT($result);
- } elseif ((GET_EXT_VERSION("sql_patches") == "") && ($MODE != "admin")) {
+ } elseif ((GET_EXT_VERSION('sql_patches') == "") && ($MODE != 'admin')) {
// No sql_patches installed, but maybe we need to register an admin?
if (isAdminRegistered()) {
// Redirect
if ($stats_id > 0) {
// Only when we got a real stats ID continue searching for the entry
$type = "NORMAL"; $rowName = "stats_id";
- if ($bonus) { $type = "BONUS"; $rowName = "bonus_id"; }
+ if ($bonus) { $type = "BONUS"; $rowName = 'bonus_id'; }
// 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",
}
// Calculate sum (default) or count records of given criteria
-function GET_TOTAL_DATA ($search, $tableName, $lookFor = "id", $whereStatement = "userid", $countRows = false, $add = "") {
+function GET_TOTAL_DATA ($search, $tableName, $lookFor = "id", $whereStatement = 'userid', $countRows = false, $add = "") {
$ret = 0;
//* DEBUG: */ echo $search."/".$tableName."/".$lookFor."/".$whereStatement."/".$add."<br />\n";
if ((empty($search)) && ($search != "0")) {
$result = SQL_QUERY_ESC("SELECT SUM(`%s`) FROM `{!_MYSQL_PREFIX!}_%s`".$add,
array($lookFor, $tableName), __FUNCTION__, __LINE__);
}
- } elseif (($countRows === true) || ($lookFor == "userid")) {
+ } 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,
SQL_FREERESULT($result);
// Fix empty values
- if ((empty($ret)) && ($lookFor != "counter") && ($lookFor != "id") && ($lookFor != "userid")) {
+ if ((empty($ret)) && ($lookFor != "counter") && ($lookFor != "id") && ($lookFor != 'userid')) {
// Float number
$ret = "0.00000";
} elseif ("".$ret."" == "") {
$per = 0;
// Do we have cache?
- if ((isset($GLOBALS['cache_array']['ref_depths']['level'])) && (EXT_IS_ACTIVE("cache"))) {
+ if ((isset($GLOBALS['cache_array']['ref_depths']['level'])) && (EXT_IS_ACTIVE('cache'))) {
// First look for level
$key = array_search($level, $GLOBALS['cache_array']['ref_depths']['level']);
if ($key !== false) {
// Count cache hit
incrementConfigEntry('cache_hits');
}
- } elseif (!EXT_IS_ACTIVE("cache")) {
+ } 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__);
} // END - if
// Add booking record if extension is installed
- if (EXT_IS_ACTIVE("booking")) {
+ if (EXT_IS_ACTIVE('booking')) {
// Add record
- ADD_BOOKING_RECORD($subject, $uid, $points, "add");
+ ADD_BOOKING_RECORD($subject, $uid, $points, 'add');
} // END - if
// Count up referal depth
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): Referal level increased. DEPTH={$GLOBALS['ref_level']}<br />\n";
}
- // Default is "normal" points
+ // Default is 'normal' points
$data = "points";
// Which points, locked or normal?
$ref_points = $points * $per / 100;
// Pay refback here if level > 0 and in ref-mode
- if ((EXT_IS_ACTIVE("refback")) && ($GLOBALS['ref_level'] > 0) && ($per < 100) && ($add_mode == "ref") && (isset($GLOBALS['cache_array']['add_uid'][$uid]))) {
+ if ((EXT_IS_ACTIVE('refback')) && ($GLOBALS['ref_level'] > 0) && ($per < 100) && ($add_mode == "ref") && (isset($GLOBALS['cache_array']['add_uid'][$uid]))) {
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},data={$GLOBALS['cache_array']['add_uid'][$uid]},ref_points={$ref_points},depth={$GLOBALS['ref_level']} - BEFORE!<br />\n";
$ref_points = ADD_REFBACK_POINTS($GLOBALS['cache_array']['add_uid'][$uid], $uid, $points, $ref_points);
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},data={$GLOBALS['cache_array']['add_uid'][$uid]},ref_points={$ref_points},depth={$GLOBALS['ref_level']} - AFTER!<br />\n";
} // END - if
// Update mediadata as well
- if (GET_EXT_VERSION("mediadata") >= "0.0.4") {
+ if (GET_EXT_VERSION('mediadata') >= '0.0.4') {
// Update database
- MEDIA_UPDATE_ENTRY(array("total_points"), "add", $ref_points);
+ MEDIA_UPDATE_ENTRY(array('total_points'), 'add', $ref_points);
} // END - if
// Points updated, maybe I shall send him an email?
// And sent it away
SEND_EMAIL($email, getMessage('SUBJECT_DIRECT_PAYMENT'), $msg);
- if (!REQUEST_ISSET_GET(('mid'))) LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_POINTS_ADDED'));
+ if (!REQUEST_ISSET_GET(('mid'))) LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_POINTS_ADDED'));
}
// Maybe there's another ref?
// Move to next referal level and count his counter one up!
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):ref={$ref} - ADVANCE!<br />\n";
$GLOBALS['cache_array']['ref_level'][$uid]++; UPDATE_REF_COUNTER($ref);
- } elseif ((($ref == $uid) || ($ref == 0)) && (GET_EXT_VERSION("cache") >= "0.1.2")) {
+ } elseif ((($ref == $uid) || ($ref == 0)) && (GET_EXT_VERSION('cache') >= '0.1.2')) {
// Remove cache here
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):ref={$ref} - CACHE!<br />\n";
rebuildCacheFiles("refsystem", "refsystem");
$GLOBALS['cache_array']['ref_level'][$uid]--;
// Handle refback here if extension is installed
- if (EXT_IS_ACTIVE("refback")) {
+ if (EXT_IS_ACTIVE('refback')) {
UPDATE_REFBACK_table($uid);
} // END - if
}
// Update cache hits
incrementConfigEntry('cache_hits');
- } elseif (!EXT_IS_ACTIVE("cache")) {
+ } 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__);
// Update cache hits
incrementConfigEntry('cache_hits');
- } elseif (!EXT_IS_ACTIVE("cache")) {
+ } 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__);
// Update cache hits
incrementConfigEntry('cache_hits');
- } elseif (!EXT_IS_ACTIVE("cache")) {
+ } 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__);
// Update cache hits
incrementConfigEntry('cache_hits');
- } elseif (!EXT_IS_ACTIVE("cache")) {
+ } 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__);
$ret = "***";
// Is sql_patches there and was it found in cache?
- if (!EXT_IS_ACTIVE("sql_patches")) {
+ if (!EXT_IS_ACTIVE('sql_patches')) {
// Not found, which is bad, so we need to allow all
$ret = "allow";
} elseif (isset($GLOBALS['cache_array']['admins']['def_acl'][$aid])) {
// Update cache hits
incrementConfigEntry('cache_hits');
- } elseif (!EXT_IS_ACTIVE("cache")) {
+ } 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__);
}
//
function ADD_OPTION_LINES ($table, $id, $name, $default="", $special="", $where="") {
- $ret = "";
+ $ret = '';
if ($table == "/ARRAY/") {
// Selection from array
if (is_array($id) && is_array($name) && count($id) == count($name)) {
$SPEC = ", ".$id;
if (!empty($special)) $SPEC = ", ".$special;
$ORDER = $name.$SPEC;
- if ($table == "country") $ORDER = $special;
+ 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__);
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()
while (list($value, $title, $add) = SQL_FETCHROW($result)) {
- if (empty($special)) $add = "";
+ if (empty($special)) $add = '';
$ret .= "<option value=\"".$value."\"";
if ($default == $value) $ret .= " selected=\"selected\"";
if (!empty($add)) $add = " (".$add.")";
// Activate exchange
function activateExchange () {
// Is the extension 'user' there?
- if (!EXT_IS_ACTIVE("user")) {
+ if (!EXT_IS_ACTIVE('user')) {
// Silently abort here
return false;
} // END - if
// Check total amount of users
- $totalUsers = GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true, " AND max_mails > 0");
+ $totalUsers = GET_TOTAL_DATA("CONFIRMED", "user_data", 'userid', "status", true, " AND max_mails > 0");
if ($totalUsers >= getConfig('activate_xchange')) {
// Activate System
SET_SQLS(array(
- "UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', hidden='N', mem_only='Y' WHERE `module`='order' LIMIT 1",
+ "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"
));
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_points` WHERE userid=%s", array(bigintval($uid)), __FUNCTION__, __LINE__);
// Update mediadata as well
- if (GET_EXT_VERSION("mediadata") >= "0.0.4") {
+ if (GET_EXT_VERSION('mediadata') >= '0.0.4') {
// Update database
- MEDIA_UPDATE_ENTRY(array("total_points"), "sub", $points);
+ MEDIA_UPDATE_ENTRY(array('total_points'), 'sub', $points);
} // END - if
// Now, when we have all his points adds them do the jackpot!
array(bigintval($uid)), __FUNCTION__, __LINE__);
// Remove from rallye if found
- if (EXT_IS_ACTIVE("rallye")) {
+ if (EXT_IS_ACTIVE('rallye')) {
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_rallye_users` WHERE userid=%s",
array(bigintval($uid)), __FUNCTION__, __LINE__);
}
//
function META_DESCRIPTION ($mod, $wht) {
// Exclude admin and member's area
- if (($mod != "admin") && ($mod != "login")) {
+ if (($mod != 'admin') && ($mod != "login")) {
// Construct dynamic description
- $DESCR = "{!MAIN_TITLE!} ".trim(getConfig('title_middle'))." ".ADD_DESCR("guest", "what-".$wht, true);
+ $DESCR = "{!MAIN_TITLE!} ".trim(getConfig('title_middle'))." ".ADD_DESCR('guest', "what-".$wht, true);
// Output it directly
OUTPUT_HTML("<meta name=\"description\" content=\"".$DESCR."\" />");
}
//
function IS_DEMO () {
- return ((EXT_IS_ACTIVE("demo")) && (get_session('admin_login') == "demo"));
+ return ((EXT_IS_ACTIVE('demo')) && (get_session('admin_login') == 'demo'));
}
// Gets the matching what name from module
return REQUEST_GET('what');
} // END - if
- $wht = "";
+ $wht = '';
//* DEBUG: */ echo __LINE__."!".$modCheck."!<br />\n";
switch ($modCheck)
{
- case "admin":
+ case 'admin':
$wht = "overview";
break;
case "login":
- case "index":
+ case 'index':
$wht = "welcome";
- if (($modCheck == "index") && (getConfig('index_home') != "")) $wht = getConfig('index_home');
+ if (($modCheck == 'index') && (getConfig('index_home') != "")) $wht = getConfig('index_home');
break;
default:
- $wht = "";
+ $wht = '';
break;
}
array($points, bigintval($uid)), __FUNCTION__, __LINE__);
// Insert booking record
- if (EXT_IS_ACTIVE("booking")) {
+ if (EXT_IS_ACTIVE('booking')) {
// Add record
- ADD_BOOKING_RECORD($subject, $uid, $points, "sub");
+ ADD_BOOKING_RECORD($subject, $uid, $points, 'sub');
} // END - if
// Update mediadata as well
- if (GET_EXT_VERSION("mediadata") >= "0.0.4") {
+ if (GET_EXT_VERSION('mediadata') >= '0.0.4') {
// Update database
- MEDIA_UPDATE_ENTRY(array("total_points"), "sub", $points);
+ MEDIA_UPDATE_ENTRY(array('total_points'), 'sub', $points);
} // END - if
}
// Do we have multiple entries?
if (is_array($entries)) {
// Walk through all
- $all = "";
+ $all = '';
foreach ($entries as $idx => $entry) {
// Update mode set?
if (!empty($updateMode)) {
// Prepares an SQL statement part for HTML mail and/or holiday depency
function PREPARE_SQL_HTML_HOLIDAY ($mode) {
// Exclude no users by default
- $MORE = "";
+ $MORE = '';
// HTML mail?
- if ($mode == "html") $MORE = " AND html='Y'";
- if (GET_EXT_VERSION("holiday") >= "0.1.3") {
+ if ($mode == 'html') $MORE = " AND html='Y'";
+ if (GET_EXT_VERSION('holiday') >= '0.1.3') {
// Add something for the holiday extension
$MORE .= " AND holiday_active='N'";
} // END - if
}
// "Getter" for total available receivers
-function GET_TOTAL_RECEIVERS ($mode="normal") {
+function GET_TOTAL_RECEIVERS ($mode='normal') {
// Query database
$result_all = SQL_QUERY("SELECT userid
FROM `{!_MYSQL_PREFIX!}_user_data`
function ADD_CATEGORY_OPTIONS ($mode) {
// Prepare WHERE statement
$whereStatement = " WHERE `visible`='Y'";
- if (IS_ADMIN()) $whereStatement = "";
+ if (IS_ADMIN()) $whereStatement = '';
// Initialize array...
$CATS = array(
SQL_FREERESULT($result);
// Generate options
- $OUT = "";
+ $OUT = '';
foreach ($CATS['id'] as $key => $value) {
if (strlen($CATS['name'][$key]) > 20) $CATS['name'][$key] = substr($CATS['name'][$key], 0, 17)."...";
$OUT .= " <option value=\"".$value."\">".$CATS['name'][$key]." (".$CATS['uids'][$key]." {--USER_IN_CAT--})</option>\n";
}
// Add bonus mail to queue
-function ADD_BONUS_MAIL_TO_QUEUE ($subject, $text, $receiverList, $points, $seconds, $url, $cat, $mode="normal", $receiver=0) {
+function ADD_BONUS_MAIL_TO_QUEUE ($subject, $text, $receiverList, $points, $seconds, $url, $cat, $mode='normal', $receiver=0) {
// Is admin or bonus extension there?
if (!IS_ADMIN()) {
// Abort here
return false;
- } elseif (!EXT_IS_ACTIVE("bonus")) {
+ } elseif (!EXT_IS_ACTIVE('bonus')) {
// Abort here
return false;
}
// Calculcate target sent
- $target = SELECTION_COUNT(explode(";", $receiverList));
+ $target = SELECTION_COUNT(explode(';', $receiverList));
// Receiver is zero?
if ($receiver == 0) {
} // END - if
// HTML extension active?
- if (EXT_IS_ACTIVE("html")) {
+ if (EXT_IS_ACTIVE('html_mail')) {
// No HTML by default
$HTML = "N";
// HTML mode?
- if ($mode == "html") $HTML = "Y";
+ if ($mode == 'html') $HTML = "Y";
// Add HTML mail
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_bonus`
function GENERATE_RECEIVER_LIST ($cat, $receiver, $mode="") {
// Init variables
$CAT_TABS = "%s";
- $CAT_WHERE = "";
- $receiverList = "";
+ $CAT_WHERE = '';
+ $receiverList = '';
$result = false;
// Secure data
} // END - if
// Exclude users in holiday?
- if (GET_EXT_VERSION("holiday") >= "0.1.3") {
+ if (GET_EXT_VERSION('holiday') >= '0.1.3') {
// Add something for the holiday extension
$CAT_WHERE .= " AND d.holiday_active='N'";
} // END - if
- if ((EXT_IS_ACTIVE("html_mail")) && ($mode == "html")) {
+ 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__);
// Load all entries
while ($content = SQL_FETCHARRAY($result)) {
// Add receiver when not empty
- if (!empty($content['userid'])) $receiverList .= $content['userid'].";";
+ if (!empty($content['userid'])) $receiverList .= $content['userid'] . ';';
} // END - while
// Free memory
} // END - if
// Is the extension installed and updated?
- if ((!EXT_IS_ACTIVE("sql_patches")) || (EXT_VERSION_IS_OLDER("sql_patches", "0.5.6"))) {
+ if ((!EXT_IS_ACTIVE('sql_patches')) || (EXT_VERSION_IS_OLDER('sql_patches', '0.5.6'))) {
// Return zero here
return $stamp;
} // END - if
// Inserts user stats
function USER_STATS_INSERT_RECORD ($uid, $type, $data) {
// Is the extension installed and updated?
- if ((!EXT_IS_ACTIVE("sql_patches")) || (EXT_VERSION_IS_OLDER("sql_patches", "0.5.6"))) {
+ if ((!EXT_IS_ACTIVE('sql_patches')) || (EXT_VERSION_IS_OLDER('sql_patches', '0.5.6'))) {
// Return zero here
return false;
} // END - if
function GET_USER_REF_POINTS ($uid, $level) {
//* DEBUG: */ print "----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n";
// Default is no refs and no nickname
- $add = "";
+ $add = '';
$refs = array();
// Do we have nickname extension installed?
- if (EXT_IS_ACTIVE("nickname")) {
+ if (EXT_IS_ACTIVE('nickname')) {
$add = ", ud.nickname";
} // END - if
$row['points'] = GET_TOTAL_DATA($row['refid'], "user_points", "points") - GET_TOTAL_DATA($row['refid'], "user_data", "used_points");
// Get unconfirmed mails
- $row['unconfirmed'] = GET_TOTAL_DATA($row['refid'], "user_links", "id", "userid", true);
+ $row['unconfirmed'] = GET_TOTAL_DATA($row['refid'], "user_links", "id", 'userid', true);
// Init clickrate with zero
$row['clickrate'] = 0;
$row['clickrate'] = ($row['mails_confirmed'] / $row['emails_received'] * 100);
} // END - if
- // Activity is "active" by default because if autopurge is not installed
+ // Activity is 'active' by default because if autopurge is not installed
$row['activity'] = MEMBER_ACTIVITY_ACTIVE;
// Is autopurge installed and the user inactive?
- if ((EXT_IS_ACTIVE("autopurge")) && ((time() - getConfig('ap_inactive_since')) >= $row['last_online'])) {
+ if ((EXT_IS_ACTIVE('autopurge')) && ((time() - getConfig('ap_inactive_since')) >= $row['last_online'])) {
// Inactive user!
$row['activity'] = MEMBER_ACTIVITY_INACTIVE;
} // END - if
// Init & set the include pool
INIT_INC_POOL();
-SET_INC_POOL(GET_DIR_AS_ARRAY("inc/pool/", "pool-"));
+SET_INC_POOL(GET_DIR_AS_ARRAY('inc/pool/', 'pool-'));
// Run the filter
runFilterChain('load_includes');
if (isResetModeEnabled()) {
// Skip here
return false;
-} elseif (!EXT_IS_ACTIVE("bonus")) {
+} elseif (!EXT_IS_ACTIVE('bonus')) {
// Abort if extension bonus is not active
return false;
}
// Only send bonus mail when bonus extension is active and maximum send-mails is not reached
if ($GLOBALS['pool_cnt'] < getConfig('max_send')) {
// Do we need to send out bonus mails?
- if (EXT_IS_ACTIVE("html_mail")) {
+ if (EXT_IS_ACTIVE('html_mail')) {
// 0 1 2 3 4 5 6 7 8 9 10 11
$result_bonus = SQL_QUERY("SELECT id, subject, text, receivers, points, time, data_type, timestamp, url, cat_id, target_send, html_msg FROM `{!_MYSQL_PREFIX!}_bonus` WHERE data_type='NEW' ORDER BY timestamp DESC", __FILE__, __LINE__);
} else {
if (SQL_NUMROWS($result_bonus) > 0) {
// Send these mails away...
- $cnt2 = "";
+ $cnt2 = '';
while ($DATA = SQL_FETCHARRAY($result_bonus)) {
// Compile URL
$DATA['url'] = COMPILE_CODE($DATA['url']);
array(bigintval($DATA['id'])), __FILE__, __LINE__);
// "Explode" all receivers into an array
- if (ereg(";", $DATA['receivers'])) {
+ if (ereg(';', $DATA['receivers'])) {
// There's more than one receiver in the list...
- $RECEIVERS = explode(";", $DATA['receivers']);
+ $RECEIVERS = explode(';', $DATA['receivers']);
} elseif (!empty($DATA['points'])) {
// Only one user left
$RECEIVERS = array($DATA['receivers']);
// Count one up and remove entry from dummy array
$GLOBALS['pool_cnt']++; unset($dummy[$key]);
- if (GET_EXT_VERSION("user") >= "0.1.4") {
+ 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__);
}
// Update mediadata if version is 0.0.4 or higher
- if (GET_EXT_VERSION("mediadata") >= "0.0.4") {
+ if (GET_EXT_VERSION('mediadata') >= '0.0.4') {
// Update entry (or add missing
$P = $GLOBALS['pool_cnt'];
if (!empty($cnt2) && empty($GLOBALS['pool_cnt'])) $P = $cnt2;
//* DEBUG: */ echo "+MEDIA/L:".__LINE__."/".$P."+<br />";
- MEDIA_UPDATE_ENTRY(array("total_send", "bonus_send"), "add", $P);
+ MEDIA_UPDATE_ENTRY(array("total_send", "bonus_send"), 'add', $P);
} // END - if
// Close sending system
//* DEBUG: */ echo "*L:".__LINE__."*<br />";
// Update mediadata if version is 0.0.4 or higher
- if (GET_EXT_VERSION("mediadata") >= "0.0.4") {
+ if (GET_EXT_VERSION('mediadata') >= '0.0.4') {
// Update entry (or add missing)
//* DEBUG: */ echo "*MEDIA/L:".__LINE__."*<br />";
- MEDIA_UPDATE_ENTRY(array("total_orders", "bonus_orders"), "add", 1);
+ MEDIA_UPDATE_ENTRY(array("total_orders", "bonus_orders"), 'add', 1);
} // END - if
} 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(SELECTION_COUNT($dummy), implode(";", $dummy), bigintval($DATA['id'])), __FILE__, __LINE__);
+ array(SELECTION_COUNT($dummy), implode(';', $dummy), bigintval($DATA['id'])), __FILE__, __LINE__);
//* DEBUG: */ echo "*L:".__LINE__."<pre>";
//* DEBUG: */ print_r($dummy);
//* DEBUG: */ echo "</pre>\n!!!<br />";
if (isResetModeEnabled()) {
// Skip here
return false;
-} elseif (!EXT_IS_ACTIVE("user")) {
+} elseif (!EXT_IS_ACTIVE('user')) {
// Abort here if extension user is not active
return false;
}
// Need this here
// Check for freed mail orders to send out
-if (EXT_IS_ACTIVE("html_mail")) {
+if (EXT_IS_ACTIVE('html_mail')) {
// 0 1 2 3 4 5 6 7 8 9 10
$result_main = SQL_QUERY("SELECT id, sender, subject, text, receivers, payment_id, timestamp, url, target_send, cat_id, html_msg FROM `{!_MYSQL_PREFIX!}_pool` WHERE data_type='NEW' ORDER BY timestamp DESC", __FILE__, __LINE__);
} else {
if (SQL_NUMROWS($result_main) > 0) {
// Parse all mails
while ($DATA = SQL_FETCHROW($result_main)) {
- // Set mail order as "active". That means it will be sent out
+ // 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__);
// Entry updated?
if (SQL_AFFECTEDROWS() == 1) {
// "Explode" all receivers into an array
- if (ereg(";", $DATA[4])) {
+ if (ereg(';', $DATA[4])) {
// There's more than one receiver in the list...
- $RECEIVERS = explode(";", $DATA[4]);
+ $RECEIVERS = explode(';', $DATA[4]);
} elseif (!empty($DATA[4])) {
// Only one user left
$RECEIVERS = array($DATA[4]);
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") {
+ 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") {
+ 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);
+ MEDIA_UPDATE_ENTRY(array("total_send", "normal_send"), 'add', 1);
} // END - if
// And count up the mail
$cnt2 += $GLOBALS['pool_cnt'];
// Update mediadata if version is 0.0.4 or higher
- if (GET_EXT_VERSION("mediadata") >= "0.0.4") {
+ if (GET_EXT_VERSION('mediadata') >= '0.0.4') {
// Update entry (or add missing)
//* DEBUG: */ echo "*MEDIA/L:".__LINE__."*<br />";
- MEDIA_UPDATE_ENTRY(array("total_orders", "normal_orders"), "add", 1);
+ MEDIA_UPDATE_ENTRY(array("total_orders", "normal_orders"), 'add', 1);
} // END - if
//* DEBUG: */ echo"*EXIT/L:".__LINE__."/".$P."<br />";
// Do we have send maximum mails?
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 = "";
+ $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;
// 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__);
}
}
}
ADD_JACKPOT($PB);
// Send mail out to admin
- SEND_ADMIN_NOTIFICATION(ADMIN_BACK_JACKPOT." (".$uid.")", "back-admin", $content, "admin");
+ SEND_ADMIN_NOTIFICATION(ADMIN_BACK_JACKPOT." (".$uid.")", "back-admin", $content, 'admin');
}
} // END - if
} // END - foreach
require($INC);
}
-if ((getConfig('send_prof_update') == "Y") && (getConfig('profile_update') > 0) && (getConfig('resend_profile_update'))) {
+if ((getConfig('send_prof_update') == 'Y') && (getConfig('profile_update') > 0) && (getConfig('resend_profile_update'))) {
// Load personal data 0 1 2 3
$result = SQL_QUERY_ESC("SELECT userid, email, last_update, joined
FROM
}
// Load email template and send mail away
- $msg = LOAD_EMAIL_TEMPLATE("profile-updte", "", bigintval($content['userid']));
+ $msg = LOAD_EMAIL_TEMPLATE("profile-updte", '', bigintval($content['userid']));
SEND_EMAIL($content['email'], getMessage('PROFILE_OUTDATED'), $msg);
// Update profile data
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif (!EXT_IS_ACTIVE("beg")) {
+} elseif (!EXT_IS_ACTIVE('beg')) {
return;
}
// Do not execute when script is in CSS mode or no daily reset
-if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled()) || (getConfig('beg_rallye') == "Y")) return;
+if (($GLOBALS['output_mode'] == 1) || (!isResetModeEnabled()) || (getConfig('beg_rallye') == 'Y')) return;
//* DEBUG: */ echo basename(__FILE__)."<br />\n";
// Reset accounts
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif (!EXT_IS_ACTIVE("bonus")) {
+} elseif (!EXT_IS_ACTIVE('bonus')) {
return;
}
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif (!EXT_IS_ACTIVE("sql_patches")) {
+} elseif (!EXT_IS_ACTIVE('sql_patches')) {
return;
}
//* DEBUG: */ echo basename(__FILE__)."<br />\n";
// Update user profiles
-if (GET_EXT_VERSION("order") >= "0.1.1") {
+if (GET_EXT_VERSION('order') >= '0.1.1') {
// Latest version
$result_daily = SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET receive_mails=max_mails, mail_orders=0 WHERE receive_mails != max_mails", __FILE__, __LINE__);
} else {
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") {
+ if (GET_EXT_VERSION('mediadata') >= '0.0.4') {
// Update database
- MEDIA_UPDATE_ENTRY(array("total_points"), "add", $content['locked_points']);
+ MEDIA_UPDATE_ENTRY(array('total_points'), 'add', $content['locked_points']);
} // END - if
} // END - while
} // END - if
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif (!EXT_IS_ACTIVE("holiday")) {
+} elseif (!EXT_IS_ACTIVE('holiday')) {
return;
}
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif (!EXT_IS_ACTIVE("surfbar")) {
+} elseif (!EXT_IS_ACTIVE('surfbar')) {
return;
}
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif (!EXT_IS_ACTIVE("yoomedia")) {
+} elseif (!EXT_IS_ACTIVE('yoomedia')) {
return;
}
setUserId(0);
// Remove all user data from session
- return ((set_session('userid', "")) && (set_session('u_hash', "")));
+ return ((set_session('userid', '')) && (set_session('u_hash', '')));
}
// Destroys the admin session
function destroyAdminSession ($destroy = true) {
// Kill maybe existing session variables including array elements
- set_session('admin_login', "");
- set_session('admin_md5' , "");
- set_session('admin_last' , "");
- set_session('admin_to' , "");
+ set_session('admin_login', '');
+ set_session('admin_md5' , '');
+ set_session('admin_last' , '');
+ set_session('admin_to' , '');
// Destroy session and return status
if ($destroy) {
if (!defined('__SECURITY')) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-} elseif (!EXT_IS_ACTIVE("surfbar")) {
+} elseif (!EXT_IS_ACTIVE('surfbar')) {
return;
}
************************************************************************/
// Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) )
-require("inc/libs/security_functions.php");
+require('inc/libs/security_functions.php');
// Init "action" and "what"
-$GLOBALS['what'] = "";
-$GLOBALS['action'] = "";
+$GLOBALS['what'] = '';
+$GLOBALS['action'] = '';
// Set module
-$GLOBALS['module'] = "index";
+$GLOBALS['module'] = 'index';
-// Set "CSS-Mode"
-$GLOBALS['output_mode'] = "0";
+// Set 'CSS-Mode'
+$GLOBALS['output_mode'] = '0';
// Load config.php
-require("inc/config.php");
+require('inc/config.php');
// Is the script installed?
if (isInstalled()) {
// Header
- LOAD_INC("inc/header.php");
+ LOAD_INC('inc/header.php');
// Fix missing array elements here
if (!isConfigEntrySet('index_delay')) setConfigEntry('index_delay' , 0);
// Is the index page configured for redirect pr not?
if (getConfig('index_cookie') > 0) {
// Set cookie and remeber it for specified time
- set_session('visited', "true");
+ set_session('visited', 'true');
} elseif (isSessionVariableSet('visited')) {
// Remove cookie when admin set 0 in setup
- set_session('visited', "");
+ set_session('visited', '');
}
// Template laden
- LOAD_TEMPLATE("index", false, ADD_URL_DATA(""));
+ LOAD_TEMPLATE('index', false, ADD_URL_DATA(''));
// Shall I insert an automated forward?
if (getConfig('index_delay') > 0) {
// This will be a JavaScript-redirect!
define('__DELAY_VALUE', (getConfig('index_delay') * 1000 + 500));
- define('__MOD_VALUE' , ADD_URL_DATA("index"));
- LOAD_TEMPLATE("index_forward");
+ define('__MOD_VALUE' , ADD_URL_DATA('index'));
+ LOAD_TEMPLATE('index_forward');
} // END - if
} else {
// Redirect to main page
- LOAD_URL("modules.php?module=index");
+ LOAD_URL('modules.php?module=index');
}
// Footer
- LOAD_INC("inc/footer.php");
+ LOAD_INC('inc/footer.php');
} else {
// You have to install first!
- LOAD_URL("install.php");
+ LOAD_URL('install.php');
}
// All done here...
************************************************************************/
// Load security system
-require("inc/libs/security_functions.php");
+require('inc/libs/security_functions.php');
// Tell every module / include file we are installing
$GLOBALS['mxchange_installing'] = true;
// Init "action" and "what"
-$GLOBALS['what'] = "";
-$GLOBALS['action'] = "";
+$GLOBALS['what'] = '';
+$GLOBALS['action'] = '';
// Set CSS variable for "normal mode"
$GLOBALS['output_mode'] = 0;
// Set module
-$GLOBALS['module'] = "install";
+$GLOBALS['module'] = 'install';
// Load config file
-require("inc/config.php");
+require('inc/config.php');
// Header
-LOAD_INC("inc/header.php");
+LOAD_INC('inc/header.php');
// Reload page to page=welcome when it is not specified
if (!REQUEST_ISSET_GET('page')) {
- LOAD_URL("install.php?page=welcome");
+ LOAD_URL('install.php?page=welcome');
} // END - if
// Already installed?
// Does something goes wrong?
if (getTotalFatalErrors() == 0) {
// Add main installation table
- LOAD_TEMPLATE("install_header");
+ LOAD_TEMPLATE('install_header');
// Here start's our installtion stuff
- LOAD_INC_ONCE("inc/install-inc.php");
+ LOAD_INC_ONCE('inc/install-inc.php');
// Close main installation table
- LOAD_TEMPLATE("install_footer");
+ LOAD_TEMPLATE('install_footer');
}
// Footer
-LOAD_INC("inc/footer.php");
+LOAD_INC('inc/footer.php');
//
?>
define('_OB_CACHING', "old");
// Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) )
-require("inc/libs/security_functions.php");
+require('inc/libs/security_functions.php');
// Init "action" and "what"
-$GLOBALS['what'] = "";
-$GLOBALS['action'] = "";
+$GLOBALS['what'] = '';
+$GLOBALS['action'] = '';
// This is a fake-CSS file loader, more a JavaScript loader...
// This is in one way good and in one not. The whole reset part will be
// pattern is given...
//
// But mxchange 0.3.0 will show that in better way! :D :D :D
-$GLOBALS['output_mode'] = "1";
-$GLOBALS['module'] = "js";
+$GLOBALS['output_mode'] = '1';
+$GLOBALS['module'] = 'js';
// Load the required file(s)
-require("inc/config.php");
+require('inc/config.php');
// Is this script installed and a JavaScript tag is provied?
if ((isInstalled()) && (REQUEST_ISSET_GET(('tag')))) {
// Set header
- header("Content-type: text/javascript");
+ header('Content-type: text/javascript');
// Load header
- LOAD_INC_ONCE("inc/header.php");
+ LOAD_INC_ONCE('inc/header.php');
// Prepare include file for looking
$INC = sprintf("inc/js/tag-%s.php",
} // END - if
// Load footer
- LOAD_INC_ONCE("inc/footer.php");
+ LOAD_INC_ONCE('inc/footer.php');
} // END - if
// Shutdown
************************************************************************/
// Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) )
-require("inc/libs/security_functions.php");
+require('inc/libs/security_functions.php');
// Init "action" and "what"
$GLOBALS['startTime'] = microtime(true);
-$GLOBALS['what'] = "";
-$GLOBALS['action'] = "";
+$GLOBALS['what'] = '';
+$GLOBALS['action'] = '';
// Set module
-$GLOBALS['module'] = "lead-confirm";
+$GLOBALS['module'] = 'lead-confirm';
// Set "CSS-Mode"
-$GLOBALS['output_mode'] = "0";
+$GLOBALS['output_mode'] = '0';
// Load config.php
-require("inc/config.php");
+require('inc/config.php');
// Is the script installed?
if (isInstalled()) {
// Header
- LOAD_INC("inc/header.php");
+ LOAD_INC('inc/header.php');
// Initialize the array for the template
$content = array(
'lead_uid' => -1,
- 'lead_email' => "INVALID@EMAIL"
+ 'lead_email' => 'INVALID@EMAIL'
);
// Is the cookie set?
}
// Load the lead template
- LOAD_TEMPLATE("lead_code", false, $content);
+ LOAD_TEMPLATE('lead_code', false, $content);
// Footer
- LOAD_INC("inc/footer.php");
+ LOAD_INC('inc/footer.php');
} else {
// You have to install first!
- LOAD_URL("install.php");
+ LOAD_URL('install.php');
}
// All done here...
************************************************************************/
// Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) )
-require("inc/libs/security_functions.php");
+require('inc/libs/security_functions.php');
// Init "action" and "what"
-$GLOBALS['what'] = "";
-$GLOBALS['action'] = "";
+$GLOBALS['what'] = '';
+$GLOBALS['action'] = '';
// Set module
-$GLOBALS['module'] = "login";
+$GLOBALS['module'] = 'login';
-// Set "CSS-Mode"
-$GLOBALS['output_mode'] = "0";
+// Set 'CSS-Mode'
+$GLOBALS['output_mode'] = '0';
// Load the required file(s)
-require("inc/config.php");
+require('inc/config.php');
// Is the script installed?
if (isInstalled()) {
// Is this a member?
if (IS_MEMBER()) {
// Then redirect into login area
- LOAD_URL("modules.php?module=login");
+ LOAD_URL('modules.php?module=login');
} else {
// Guests will be redirected to login form
- LOAD_URL("modules.php?module=index&what=login");
+ LOAD_URL('modules.php?module=index&what=login');
}
} else {
// You have to install first!
- LOAD_URL("install.php");
+ LOAD_URL('install.php');
}
// Really all done here... ;-)
************************************************************************/
// Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) )
-require("inc/libs/security_functions.php");
+require('inc/libs/security_functions.php');
// Init "action" and "what"
-$GLOBALS['what'] = "";
-$GLOBALS['action'] = "";
+$GLOBALS['what'] = '';
+$GLOBALS['action'] = '';
// Tell everyone we are in this module
-$GLOBALS['module'] = "mailid";
+$GLOBALS['module'] = 'mailid';
$GLOBALS['output_mode'] = -1;
// Load the required file(s)
-require("inc/config.php");
+require('inc/config.php');
if (isInstalled()) {
// Is the extension active?
- REDIRECT_ON_UNINSTALLED_EXTENSION("mailid");
+ REDIRECT_ON_UNINSTALLED_EXTENSION('mailid');
// Init
$url_uid = 0; $url_bid = 0; $url_mid = 0;
// Secure all data
- if (REQUEST_ISSET_GET(('uid'))) $url_uid = bigintval(REQUEST_GET('uid'));
- if (REQUEST_ISSET_GET(('mailid'))) $url_mid = bigintval(REQUEST_GET('mailid'));
- if (REQUEST_ISSET_GET(('bonusid'))) $url_bid = bigintval(REQUEST_GET('bonusid'));
+ if (REQUEST_ISSET_GET('uid')) $url_uid = bigintval(REQUEST_GET('uid'));
+ if (REQUEST_ISSET_GET('mailid')) $url_mid = bigintval(REQUEST_GET('mailid'));
+ if (REQUEST_ISSET_GET('bonusid')) $url_bid = bigintval(REQUEST_GET('bonusid'));
// 01 1 12 3 32 21 1 22 10
if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == 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__);
- $type = "mailid"; $urlId = $url_mid;
+ $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__);
- $type = "bonusid"; $urlId = $url_bid;
+ $type = 'bonusid'; $urlId = $url_bid;
} else {
// Problem: No ID entered
- LOAD_URL("index.php");
+ LOAD_URL('index.php');
}
if (SQL_NUMROWS($result) == 1) {
switch ($ltype)
{
- case "NORMAL":
+ 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;
- case "BONUS":
+ case 'BONUS':
// Is the bonus extension active?
- REDIRECT_ON_UNINSTALLED_EXTENSION("bonus");
+ REDIRECT_ON_UNINSTALLED_EXTENSION('bonus');
// Bonus-Mails
$result = SQL_QUERY_ESC("SELECT id, url, subject FROM `{!_MYSQL_PREFIX!}_bonus` WHERE id=%s LIMIT 1",
if (SQL_NUMROWS($result) == 1) {
list($status, $gender, $sname, $fname) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
- if ($status == "CONFIRMED") {
+ if ($status == 'CONFIRMED') {
// User has confirmed his account so we can procede...
switch ($ltype)
{
- case "NORMAL":
+ 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 = GET_PAY_POINTS($pay, "time");
- $payment = GET_PAY_POINTS($pay, "payment");
+ $time = GET_PAY_POINTS($pay, 'time');
+ $payment = GET_PAY_POINTS($pay, 'payment');
$isValid = true;
}
SQL_FREERESULT($result);
break;
- case "BONUS":
+ 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";
+ $payment = '0.00000';
$isValid = true;
}
}
// Add header
- LOAD_INC_ONCE("inc/header.php");
+ LOAD_INC_ONCE('inc/header.php');
// Was that mail a valid one?
if ($isValid === true) {
// If time is zero seconds we have a sponsor mail. 1 Second shall be set to avoid problems
- if (($time == "0") && ($payment > 0)) { $URL = constant('URL'); $time = "1"; }
+ if (($time == '0') && ($payment > 0)) { $URL = constant('URL'); $time = '1'; }
if (($time > 0) && (($payment > 0) || ($points > 0))) {
// He can confirm this mail!
// Export data into constants for the template
define('_URL_VALUE' , DEREFERER($URL));
// Load template
- LOAD_TEMPLATE("mailid_frames");
+ LOAD_TEMPLATE('mailid_frames');
} else {
$msg = getCode('DATA_INVALID');
}
// Error code is set?
if (!empty($msg)) {
switch (getConfig('mailid_error_redirect')) {
- case "INDEX": // Redirect to index page
- LOAD_URL("modules.php?module=index&msg=".$msg."&ext=mailid");
+ case 'INDEX': // Redirect to index page
+ LOAD_URL('modules.php?module=index&msg='.$msg.'&ext=mailid');
break;
- case "REJECT": // Redirect to rejection page
+ case 'REJECT': // Redirect to rejection page
LOAD_CONFIGURED_URL('reject_url');
break;
default:
DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown status %s detected in mailid_error_redirect.", getConfig('mailid_error_redirect')));
- LOAD_URL("modules.php?module=index&msg=".getCode('UNKNOWN_STATUS')."&ext=mailid");
+ LOAD_URL('modules.php?module=index&msg=' . getCode('UNKNOWN_STATUS') . '&ext=mailid');
break;
}
} else {
// Include footer
- LOAD_INC_ONCE("inc/footer.php");
+ LOAD_INC_ONCE('inc/footer.php');
}
} else {
// You have to install first!
- LOAD_URL("install.php");
+ LOAD_URL('install.php');
}
// Shutdown
************************************************************************/
// Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) )
-require("inc/libs/security_functions.php");
+require('inc/libs/security_functions.php');
// Init "action" and "what"
-$GLOBALS['what'] = "";
-$GLOBALS['action'] = "";
+$GLOBALS['what'] = '';
+$GLOBALS['action'] = '';
// Tell everyone we are in this module
-$GLOBALS['module'] = "mailid";
+$GLOBALS['module'] = 'mailid';
$GLOBALS['output_mode'] = 0;
// Load the required file(s)
-require("inc/config.php");
+require('inc/config.php');
if (isInstalled()) {
// Is the extension active
- if (!EXT_IS_ACTIVE("mailid", true)) {
+ if (!EXT_IS_ACTIVE('mailid', true)) {
// Is not activated/installed yet!
- addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "mailid");
+ addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'mailid');
} // END - if
// Secure all data
- $url_uid = 0; $url_bid = 0; $url_mid = 0; $code = 0; $mode = "";
- if (REQUEST_ISSET_GET(('uid'))) $url_uid = bigintval(REQUEST_GET('uid'));
- if (REQUEST_ISSET_GET(('mailid'))) $url_mid = bigintval(REQUEST_GET('mailid'));
- if (REQUEST_ISSET_GET(('bonusid'))) $url_bid = bigintval(REQUEST_GET('bonusid'));
- if (REQUEST_ISSET_GET(('code'))) $code = bigintval(REQUEST_GET('code'));
- if (REQUEST_ISSET_GET(('mode'))) $mode = REQUEST_GET('mode');
+ $url_uid = 0; $url_bid = 0; $url_mid = 0; $code = 0; $mode = '';
+ if (REQUEST_ISSET_GET('uid')) $url_uid = bigintval(REQUEST_GET('uid'));
+ if (REQUEST_ISSET_GET('mailid')) $url_mid = bigintval(REQUEST_GET('mailid'));
+ if (REQUEST_ISSET_GET('bonusid')) $url_bid = bigintval(REQUEST_GET('bonusid'));
+ if (REQUEST_ISSET_GET('code')) $code = bigintval(REQUEST_GET('code'));
+ if (REQUEST_ISSET_GET('mode')) $mode = REQUEST_GET('mode');
// 01 1 12 2 2 21 1 22 10
if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == 0)) {
// No image? Then output header
- if ($mode != "img") LOAD_INC_ONCE("inc/header.php");
+ if ($mode != 'img') LOAD_INC_ONCE('inc/header.php');
// 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__);
- $type = "mailid"; $urlId = $url_mid;
- } elseif ($url_bid > 0) {
+ $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__);
- $type = "bonusid"; $urlId = $url_bid;
+ $type = 'bonusid'; $urlId = $url_bid;
}
if (SQL_NUMROWS($result) == 1) {
SQL_FREERESULT($result);
switch ($ltype)
{
- case "NORMAL":
+ 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;
- case "BONUS":
+ 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;
list($pool, $sender, $notify) = SQL_FETCHROW($result_mailid);
// Correct notification switch in non-bonus mails
- if (($notify != "Y") && ($notify != "N")) $notify = "N";
+ if (($notify != 'Y') && ($notify != 'N')) $notify = 'N';
// Free some memory
SQL_FREERESULT($result_mailid);
// Set sender to 0 when we have a bonus mail
- if ($ltype == "BONUS") $sender = 0;
+ if ($ltype == 'BONUS') $sender = 0;
// 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",
// Free some memory
SQL_FREERESULT($result);
- if ($status == "CONFIRMED") {
+ 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__);
// User has confirmed his account so we can procede...
switch ($ltype)
{
- case "NORMAL":
+ 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 = GET_PAY_POINTS($pay, "time");
- $payment = GET_PAY_POINTS($pay, "payment");
+ $time = GET_PAY_POINTS($pay, 'time');
+ $payment = GET_PAY_POINTS($pay, 'payment');
$isValid = true;
} // END - if
SQL_FREERESULT($result);
break;
- case "BONUS":
+ case 'BONUS':
$result = SQL_QUERY_ESC("SELECT time, points FROM `{!_MYSQL_PREFIX!}_bonus` WHERE id=%s LIMIT 1",
array(bigintval($pool)), __FILE__, __LINE__);
// Is this entry valid?
if ($isValid) {
- if (($time == "0") && ($payment > 0)) $time = "1";
+ if (($time == '0') && ($payment > 0)) $time = '1';
if (($time > 0) && ($payment > 0)) {
if (!empty($code)) {
// Generate code
} // END - if
switch ($mode) {
- case "add":
+ case 'add':
// Init stats data
$stats_data = 0;
// Count clicks
switch ($ltype)
{
- case "NORMAL":
+ 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") {
+ if (GET_EXT_VERSION('mediadata') >= '0.0.4') {
// Update database
- MEDIA_UPDATE_ENTRY(array("total_clicks", "normal_clicks"), "add", 1);
+ MEDIA_UPDATE_ENTRY(array('total_clicks', 'normal_clicks'), 'add', 1);
}
$stats_data = $url_mid;
break;
- case "BONUS":
+ 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") {
+ if (GET_EXT_VERSION('mediadata') >= '0.0.4') {
// Update database
- MEDIA_UPDATE_ENTRY(array("total_clicks", "bonus_clicks"), "add", 1);
+ 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' , TRANSLATE_COMMA($payment));
- define('_TEMPLATE_BANNER', LOAD_TEMPLATE("mailid_banner", true));
+ 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") {
+ 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") {
+ 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",
+ SQL_QUERY_ESC(OB"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
if (bigintval(REQUEST_POST('gfx_check')) == $img_code) {
// Add points over referal system is the default
$locked = false;
- $template = "mailid_points_done";
+ $template = 'mailid_points_done';
// Right code entered add points and remove entry
- if (($ref_pay > 0) && (getConfig('allow_direct_pay') != "Y")) {
+ if (($ref_pay > 0) && (getConfig('allow_direct_pay') != 'Y')) {
// Don't add points over the referal system
$locked = true;
- $template = "mailid_points_locked";
+ $template = 'mailid_points_locked';
} // END - if
// Count down ref_payout value
// Add points
unset($GLOBALS['ref_level']);
- ADD_POINTS_REFSYSTEM("mailid_okay", $url_uid, $payment, false, "0", $locked);
+ 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") {
+ 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")) {
+ 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)) {
+ 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";
+ $template = 'mailid_points_done2';
+ if ($locked) $template = 'mailid_points_locked2';
define('_UID_VALUE' , $url_uid);
define('_TYPE_VALUE', $type);
define('_DATA_VALUE', TRANSLATE_COMMA($urlId));
// Load total points
define('__TOTAL_POINTS', TRANSLATE_COMMA(
- GET_TOTAL_DATA($url_uid, "user_points", "points") -
- GET_TOTAL_DATA($url_uid, "user_data", "used_points"))
+ GET_TOTAL_DATA($url_uid, 'user_points', 'points') -
+ GET_TOTAL_DATA($url_uid, 'user_data', 'used_points'))
);
// Load template
} else {
// Wrong image code! So add points to sender's account
unset($GLOBALS['ref_level']);
- ADD_POINTS_REFSYSTEM("mailid_payback", $sender, $payment, false, 0, false, "direct");
+ ADD_POINTS_REFSYSTEM('mailid_payback', $sender, $payment, false, 0, false, 'direct');
// Load template
- LOAD_TEMPLATE("mailid_points_failed");
+ LOAD_TEMPLATE('mailid_points_failed');
}
// Remove link from table
array(bigintval($lid)), __FILE__, __LINE__);
break;
- case "img":
+ case 'img':
GENERATE_IMAGE($img_code);
break;
- case "confirm":
+ 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));
+ define('_TEMPLATE_BANNER', LOAD_TEMPLATE('mailid_banner', true));
if (getConfig('code_length') > 0) {
// Generate Code
define('_IMAGE_CODE', IMG_CODE($code, $type, $urlId, $url_uid));
- $templ = "mailid_enter_code";
+ $templ = 'mailid_enter_code';
} else {
// Disabled code
define('__GFX_CODE', $img_code);
- $templ = "mailid_confirm_buttom";
+ $templ = 'mailid_confirm_buttom';
}
// Load template
}
break;
- case "":
+ 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('_TYPE_VALUE', $type);
define('_DATA_VALUE', $urlId);
define('_RAND_VALUE', mt_rand(0, 99999));
- define('_TEMPLATE_BANNER', LOAD_TEMPLATE("mailid_banner", true));
+ define('_TEMPLATE_BANNER', LOAD_TEMPLATE('mailid_banner', true));
// Load template
- LOAD_TEMPLATE("mailid_timer");
+ LOAD_TEMPLATE('mailid_timer');
break;
} // END - switch
} else {
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (6)</div>");
+ LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (6)</div>");
}
} else {
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (5)</div>");
+ LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (5)</div>");
}
} else {
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (4)</div>");
+ LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (4)</div>");
}
} else {
SQL_FREERESULT($result);
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (3)</div>");
+ LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (3)</div>");
}
} else {
SQL_FREERESULT($result);
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (2)</div>");
+ LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (2)</div>");
}
} else {
SQL_FREERESULT($result);
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (1)</div>");
+ LOAD_TEMPLATE('admin_settings_saved', false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (1)</div>");
}
// Insert footer if no image
- if ($mode != "img") {
+ if ($mode != 'img') {
// Write footer
- LOAD_INC_ONCE("inc/footer.php");
+ LOAD_INC_ONCE('inc/footer.php');
} // END - if
}
-} elseif ($mode != "img") {
+} elseif ($mode != 'img') {
// You have to install first!
- LOAD_URL("install.php");
+ LOAD_URL('install.php');
}
// Really all done here... ;-)
//xdebug_start_trace();
// Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) )
-require("inc/libs/security_functions.php");
+require('inc/libs/security_functions.php');
// Init "action" and "what"
$GLOBALS['startTime'] = microtime(true);
$GLOBALS['output_mode'] = 0;
-$GLOBALS['what'] = "";
-$GLOBALS['action'] = "";
-$GLOBALS['module'] = "";
+$GLOBALS['what'] = '';
+$GLOBALS['action'] = '';
+$GLOBALS['module'] = '';
// Needed include files
-require("inc/config.php");
+require('inc/config.php');
-// Fix missing module to "index"
-if (!REQUEST_ISSET_GET(('module'))) REQUEST_SET_GET('module', "index");
+// Fix missing module to 'index'
+if (!REQUEST_ISSET_GET('module')) REQUEST_SET_GET('module', 'index');
// Check if logged in
if (IS_MEMBER()) {
if (SQL_NUMROWS($result) == 1) {
// Load surname and family's name and build the username
list($s, $f) = SQL_FETCHROW($result);
- $username = $s." ".$f;
+ $username = $s.' '.$f;
// Additionally admin?
if (IS_ADMIN()) {
// Add it
- $username .= " ({--_ADMIN_SHORT--})";
+ $username .= ' ({--_ADMIN_SHORT--})';
} // END - if
} else {
// Hmmm, logged in and no valid userid?
- $username = "<em>{--_UNKNOWN--}</em>";
+ $username = '<em>{--_UNKNOWN--}</em>';
// Destroy session
destroy_user_session();
}
// The header file
-LOAD_INC_ONCE("inc/header.php");
+LOAD_INC_ONCE('inc/header.php');
// Modules are by default not valid!
-$MOD_VALID = false; $check = "failed";
-if ((getConfig('maintenance') == "Y") && (!IS_ADMIN()) && ($GLOBALS['module'] != "admin")) {
+$MOD_VALID = false; $check = 'failed';
+if ((getConfig('maintenance') == 'Y') && (!IS_ADMIN()) && ($GLOBALS['module'] != 'admin')) {
// Maintain mode is active and you are no admin
addFatalMessage(__FILE__, __LINE__, getMessage('LANG_DOWN_MAINTAINCE'));
} elseif ((SQL_IS_LINK_UP()) && (getTotalFatalErrors() == 0)) {
$check = checkModulePermissions($GLOBALS['module']);
switch ($check)
{
- case "admin_only":
- case "mem_only":
- case "done":
+ case 'admin_only':
+ case 'mem_only':
+ case 'done':
// Does the module exists on local file system?
if ((FILE_READABLE(constant('__MODULE'))) && (getTotalFatalErrors() == 0)) {
// Module is valid, active and located on the local disc...
}
break;
- case "404":
+ case '404':
addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_404'), $GLOBALS['module']));
break;
- case "locked":
+ case 'locked':
if (!FILE_READABLE(constant('__MODULE'))) {
// Module does addionally not exists
addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('LANG_MOD_REG_404'), $GLOBALS['module']));
} // END - if
// Next-to-end add the footer
-LOAD_INC_ONCE("inc/footer.php");
+LOAD_INC_ONCE('inc/footer.php');
//
?>
************************************************************************/
// Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) )
-require("inc/libs/security_functions.php");
+require('inc/libs/security_functions.php');
// Init "action" and "what"
-$GLOBALS['what'] = "";
-$GLOBALS['action'] = "";
+$GLOBALS['what'] = '';
+$GLOBALS['action'] = '';
// Set module
-$GLOBALS['module'] = "ref";
+$GLOBALS['module'] = 'ref';
$GLOBALS['output_mode'] = -1;
// Load the required file(s)
-require("inc/config.php");
+require('inc/config.php');
// Redirect only to registration page when this script is installed
if (isInstalled()) {
// Base URL for redirection
switch (getConfig('refid_target'))
{
- case "register":
- $URL = "modules.php?module=index&what=register&refid=";
+ case 'register':
+ $URL = 'modules.php?module=index&what=register&refid=';
break;
- case "index":
- $URL = "index.php?refid=";
+ case 'index':
+ $URL = 'index.php?refid=';
break;
}
if (!empty($ref)) {
// Test if nickname or numeric id
- if ($ref != "".($ref + 0)."") {
- if (EXT_IS_ACTIVE("nickname")) {
+ if ($ref != ''.($ref + 0).'') {
+ 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__);
} // END - if
} else {
// No refid and we add our refid (don't forget to set $def_refid!)
- $URL = "index.php";
+ $URL = 'index.php';
}
// Load the URL
LOAD_URL($URL);
} else {
// You have to install first!
- LOAD_URL("install.php");
+ LOAD_URL('install.php');
}
// Really all done here... ;-)
************************************************************************/
// Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) )
-require("inc/libs/security_functions.php");
+require('inc/libs/security_functions.php');
// Init "action" and "what"
$GLOBALS['startTime'] = microtime(true);
-$GLOBALS['what'] = "";
-$GLOBALS['action'] = "";
+$GLOBALS['what'] = '';
+$GLOBALS['action'] = '';
// Set this because we have no module in URI
-$GLOBALS['module'] = "show_bonus";
+$GLOBALS['module'] = 'show_bonus';
$GLOBALS['output_mode'] = 0;
// Load the required file(s)
-require("inc/config.php");
+require('inc/config.php');
-// Is the "bonus" extension active?
-REDIRECT_ON_UNINSTALLED_EXTENSION("bonus");
+// Is the 'bonus' extension active?
+REDIRECT_ON_UNINSTALLED_EXTENSION('bonus');
// List only rankings when script is installed
if (isInstalled()) {
// Include header
- LOAD_INC("inc/header.php");
+ LOAD_INC('inc/header.php');
if ((REQUEST_GET('uid') > 0) && (REQUEST_GET('d') > 0) && (REQUEST_ISSET_GET(('t')))) {
// Set row name
- $t = "";
+ $t = '';
switch (REQUEST_GET('t')) {
- case "bonusid": // Bonus mail
- $t = "bonus_id";
+ case 'bonusid': // Bonus mail
+ $t = 'bonus_id';
break;
- case "mailid": // Regular member mail
- $t = "mail_id";
+ case 'mailid': // Regular member mail
+ $t = 'mail_id';
break;
default: // Invalid type
// __YOUR_RANKING_LINE
// Load pre-template
- define('__BONUS_MSG', LOAD_TEMPLATE("show_bonus_msg", true));
+ define('__BONUS_MSG', LOAD_TEMPLATE('show_bonus_msg', true));
} else {
// No data found
define('__BONUS_MSG', "<span class=\"guest_failed\">{--BONUS_SHOW_NO_DATA--}</span>");
}
// Load send_bonus header template (for your banners, e.g.?)
- define('__BONUS_HEADER', LOAD_TEMPLATE("show_bonus_header", true));
+ define('__BONUS_HEADER', LOAD_TEMPLATE('show_bonus_header', true));
// Load show_bonus footer template (for your banners, e.g.?)
- define('__BONUS_FOOTER', LOAD_TEMPLATE("show_bonus_footer", true));
+ define('__BONUS_FOOTER', LOAD_TEMPLATE('show_bonus_footer', true));
// Total ranks who can win
define('__BONUS_TOTAL_RANKS', getConfig('bonus_ranks'));
// Load final template
- LOAD_TEMPLATE("show_bonus");
+ LOAD_TEMPLATE('show_bonus');
// Include footer
- LOAD_INC("inc/footer.php");
+ LOAD_INC('inc/footer.php');
} else {
// You have to install first!
- LOAD_URL("install.php");
+ LOAD_URL('install.php');
}
// Really all done here... ;-)
************************************************************************/
// Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) )
-require("inc/libs/security_functions.php");
+require('inc/libs/security_functions.php');
// Init "action" and "what"
-$GLOBALS['what'] = "";
-$GLOBALS['action'] = "";
+$GLOBALS['what'] = '';
+$GLOBALS['action'] = '';
// Set module
-$GLOBALS['module'] = "sponsor_confirm";
+$GLOBALS['module'] = 'sponsor_confirm';
-// Set "CSS-Mode"
-$GLOBALS['output_mode'] = "0";
+// Set 'CSS-Mode'
+$GLOBALS['output_mode'] = '0';
// Load the required file(s)
-require("inc/config.php");
+require('inc/config.php');
// Is the script installed?
if (isInstalled()) {
// Base URL for redirection
- $URL = "modules.php?module=index&what=sponsor_login&hash=";
+ $URL = 'modules.php?module=index&what=sponsor_login&hash=';
if (!REQUEST_ISSET_GET(('hash'))) {
// No refid and we add our refid (don't forget to set $def_refid!)
- $URL = "modules.php?module=index";
+ $URL = 'modules.php?module=index';
} else {
// We have an refid here. So we simply add it
$URL .= REQUEST_GET(('hash'));
LOAD_URL($URL);
} else {
// You have to install first!
- LOAD_URL("install.php");
+ LOAD_URL('install.php');
}
// Really all done here... ;-)
************************************************************************/
// Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) )
-require("inc/libs/security_functions.php");
+require('inc/libs/security_functions.php');
// Init "action" and "what"
-$GLOBALS['what'] = ""; $GLOBALS['action'] = "";
+$GLOBALS['what'] = '';
+$GLOBALS['action'] = '';
// Set module
-$GLOBALS['module'] = "sponsor_ref";
+$GLOBALS['module'] = 'sponsor_ref';
-// Set "CSS-Mode"
-$GLOBALS['output_mode'] = "0";
+// Set 'CSS-Mode'
+$GLOBALS['output_mode'] = '0';
// Load the required file(s)
-require("inc/config.php");
+require('inc/config.php');
// Redirect only to registration page when this script is installed
if (isInstalled()) {
// Base URL for redirection
- $URL = "modules.php?module=index&what=sponsor_reg&refid=";
+ $URL = 'modules.php?module=index&what=sponsor_reg&refid=';
// Get referal ID from ref or refid variable
$ref = 0;
$URL .= $ref;
} else {
// No refid so we redirect to the index page
- $URL = "index.php";
+ $URL = 'index.php';
}
// Load the URL
LOAD_URL($URL);
} else {
// You have to install first!
- LOAD_URL("install.php");
+ LOAD_URL('install.php');
}
// Really all done here... ;-)
************************************************************************/
// Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) )
-require("inc/libs/security_functions.php");
+require('inc/libs/security_functions.php');
// Init "action" and "what"
$GLOBALS['cache_array']['surfbar'] = array();
$GLOBALS['startTime'] = microtime(true);
-$GLOBALS['what'] = "";
-$GLOBALS['action'] = "";
+$GLOBALS['what'] = '';
+$GLOBALS['action'] = '';
// Set module
-$GLOBALS['module'] = "surfbar";
+$GLOBALS['module'] = 'surfbar';
$GLOBALS['refid'] = 0;
$GLOBALS['output_mode'] = 0;
$msg = null;
// Load the required file(s)
-require("inc/config.php");
+require('inc/config.php');
// Is the script installed?
if (isInstalled()) {
// Only logged in users may use this surfbar!
- REDIRECT_ON_UNINSTALLED_EXTENSION("surfbar");
+ REDIRECT_ON_UNINSTALLED_EXTENSION('surfbar');
// No member?
if (!IS_MEMBER()) {
// Redirect
// @TODO Display quick login form here or redirect as configured
- LOAD_URL("modules.php?module=index");
+ LOAD_URL('modules.php?module=index');
} // END - if
// Handle tasks on self-maintenance
SURFBAR_HANDLE_SELF_MAINTENANCE();
// Is there a check value?
- if ((SURFBAR_CHECK_RELOAD_FULL()) || ((REQUEST_ISSET_GET(('frame'))) && (in_array(REQUEST_GET('frame'), array("stop", "stop2", "stats", "textlinks"))))) {
+ if ((SURFBAR_CHECK_RELOAD_FULL()) || ((REQUEST_ISSET_GET(('frame'))) && (in_array(REQUEST_GET('frame'), array('stop', 'stop2', 'stats', 'textlinks'))))) {
// Reload-lock is full, surfbar stopped so...
// Load header
- LOAD_INC_ONCE("inc/header.php");
+ LOAD_INC_ONCE('inc/header.php');
// Load template
- if (((REQUEST_ISSET_GET(('frame'))) && (REQUEST_GET('frame') == "stop")) || (!REQUEST_ISSET_GET(('frame')))) {
+ if (((REQUEST_ISSET_GET(('frame'))) && (REQUEST_GET('frame') == 'stop')) || (!REQUEST_ISSET_GET(('frame')))) {
// Load template for "start" page
- LOAD_TEMPLATE("surfbar_frame_start");
+ LOAD_TEMPLATE('surfbar_frame_start');
// Load banner
- LOAD_TEMPLATE("surfbar_start_banner");
+ LOAD_TEMPLATE('surfbar_start_banner');
// This makes the footer appear again
REQUEST_UNSET_GET(('frame'));
- } elseif ((REQUEST_ISSET_GET(('frame'))) && (REQUEST_GET('frame') == "stats")) {
+ } elseif ((REQUEST_ISSET_GET(('frame'))) && (REQUEST_GET('frame') == 'stats')) {
// Get total points amount
- $points = GET_TOTAL_DATA(getUserId(), "user_points", "points") - GET_TOTAL_DATA(getUserId(), "user_data", "used_points");
+ $points = GET_TOTAL_DATA(getUserId(), 'user_points', 'points') - GET_TOTAL_DATA(getUserId(), 'user_data', 'used_points');
// Prepare content
$content = array(
);
// Load template for "stats" page
- LOAD_TEMPLATE("surfbar_frame_stats", false, $content);
- } elseif ((REQUEST_ISSET_GET(('frame'))) && (REQUEST_GET('frame') == "textlinks")) {
+ LOAD_TEMPLATE('surfbar_frame_stats', false, $content);
+ } elseif ((REQUEST_ISSET_GET(('frame'))) && (REQUEST_GET('frame') == 'textlinks')) {
// Prepare content
$content = array(
'online' => SURFBAR_DETERMINE_TOTAL_ONLINE(),
);
// Load template for "stats" page
- LOAD_TEMPLATE("surfbar_frame_textlinks", false, $content);
+ LOAD_TEMPLATE('surfbar_frame_textlinks', false, $content);
} else {
// Prepare content
$content = array(
'restart' => getConfig('surfbar_restart_time'),
- 'start' => str_repeat("X", strlen(getConfig('surfbar_restart_time'))),
- 'autostart' => (getConfig('surfbar_autostart') == "Y") ? "true" : "false"
+ '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('surfbar_stopped', false, $content);
}
} elseif ((REQUEST_ISSET_GET(('check'))) && (REQUEST_ISSET_GET(('id'))) && (REQUEST_ISSET_GET(('salt')))) {
// Dummy next id get
$GLOBALS['footer_sent'] = 1;
} else {
// Prepare content
- $content = "";
+ $content = '';
// Determine template name
$templateName = SURFBAR_DETERMINE_TEMPLATE_NAME();
// Frame "top" set?
- if ((REQUEST_ISSET_GET(('frame'))) && (REQUEST_GET('frame') == "top")) {
+ if ((REQUEST_ISSET_GET(('frame'))) && (REQUEST_GET('frame') == 'top')) {
// Determine next id
$nextId = SURFBAR_DETERMINE_NEXT_ID();
'curr_reload' => SURFBAR_GET_USER_LOCKS(),
'max_urls' => SURFBAR_GET_TOTAL_URLS(),
'reload' => SURFBAR_GET_RELOAD_TIME($nextId),
- 'xxx' => str_repeat("X", strlen(SURFBAR_GET_RELOAD_TIME($nextId)))
+ 'xxx' => str_repeat('X', strlen(SURFBAR_GET_RELOAD_TIME($nextId)))
);
// Update salt (double-call lock!) and statistics
SURFBAR_UPDATE_SALT_STATS();
} else {
// Load new URL
- SURFBAR_RELOAD_TO_STOP_PAGE("stop2");
+ SURFBAR_RELOAD_TO_STOP_PAGE('stop2');
}
- } elseif ((REQUEST_ISSET_GET(('frame'))) && (REQUEST_GET('frame') == "start")) {
+ } elseif ((REQUEST_ISSET_GET(('frame'))) && (REQUEST_GET('frame') == 'start')) {
// Starter frame found so let the footer display
REQUEST_UNSET_GET(('frame'));
} else {
}
// Load header
- LOAD_INC_ONCE("inc/header.php");
+ LOAD_INC_ONCE('inc/header.php');
// Load that template
//* DEBUG: */ die("templateName={$templateName}<br />\n<strong>content</strong>=<pre>".print_r($content, true)."</pre>");
}
// Load footer
- LOAD_INC_ONCE("inc/footer.php");
+ LOAD_INC_ONCE('inc/footer.php');
} else {
// You have to install first!
- LOAD_URL("install.php");
+ LOAD_URL('install.php');
}
// Really all done here... ;-)
// Theme definitions
//
// The name of your theme
-$GLOBALS['theme_data']['name'] = "Solid-Business";
+$GLOBALS['theme_data']['name'] = 'Solid-Business';
// Only your name please!
-$GLOBALS['theme_data']['author'] = "Roland Häder";
+$GLOBALS['theme_data']['author'] = 'Roland Häder';
// Your email address
-$GLOBALS['theme_data']['email'] = "webmaster@mxchange.org";
+$GLOBALS['theme_data']['email'] = 'webmaster@mxchange.org';
// URL where you have uploaded it
-$GLOBALS['theme_data']['url'] = "http://www.mxchange.org";
+$GLOBALS['theme_data']['url'] = 'http://www.mxchange.org';
// Version number
-$GLOBALS['theme_data']['version'] = "0.0";
+$GLOBALS['theme_data']['version'] = '0.0';
// Switch mode
-if (empty($GLOBALS['theme_mode'])) $GLOBALS['theme_mode'] = "load";
+if (empty($GLOBALS['theme_mode'])) $GLOBALS['theme_mode'] = 'load';
switch ($GLOBALS['theme_mode'])
{
-case "test": // Do stuff while testing the theme: The admin clicked on "Import"
+case 'test': // Do stuff while testing the theme: The admin clicked on 'Import'
break;
-case "load": // Do stuff while theme is loaded normally
+case 'load': // Do stuff while theme is loaded normally
break;
}
//
// Theme definitions
//
// The name of your theme
-$GLOBALS['theme_data']['name'] = "Standart-Theme";
+$GLOBALS['theme_data']['name'] = 'Standart-Theme';
// Only your name please!
-$GLOBALS['theme_data']['author'] = "Roland Häder";
+$GLOBALS['theme_data']['author'] = 'Roland Häder';
// Your email address
-$GLOBALS['theme_data']['email'] = "webmaster@mxchange.org";
+$GLOBALS['theme_data']['email'] = 'webmaster@mxchange.org';
// URL where you have uploaded it
-$GLOBALS['theme_data']['url'] = "http://www.mxchange.org";
+$GLOBALS['theme_data']['url'] = 'http://www.mxchange.org';
// Version number
-$GLOBALS['theme_data']['version'] = "0.0";
+$GLOBALS['theme_data']['version'] = '0.0';
// Switch mode
-if (empty($GLOBALS['theme_mode'])) $GLOBALS['theme_mode'] = "load";
+if (empty($GLOBALS['theme_mode'])) $GLOBALS['theme_mode'] = 'load';
switch ($GLOBALS['theme_mode'])
{
-case "test": // Do stuff while testing the theme: The admin clicked on "Import"
+case 'test': // Do stuff while testing the theme: The admin clicked on 'Import'
break;
-case "load": // Do stuff while theme is loaded normally
+case 'load': // Do stuff while theme is loaded normally
break;
}
//
// Theme definitions
//
// The name of your theme
-$GLOBALS['theme_data']['name'] = "Desert-Storm";
+$GLOBALS['theme_data']['name'] = 'Desert-Storm';
// Only your name please!
-$GLOBALS['theme_data']['author'] = "Roland Häder";
+$GLOBALS['theme_data']['author'] = 'Roland Häder';
// Your email address
-$GLOBALS['theme_data']['email'] = "webmaster@mxchange.org";
+$GLOBALS['theme_data']['email'] = 'webmaster@mxchange.org';
// URL where you have uploaded it
-$GLOBALS['theme_data']['url'] = "http://www.mxchange.org";
+$GLOBALS['theme_data']['url'] = 'http://www.mxchange.org';
// Version number
-$GLOBALS['theme_data']['version'] = "0.0.1";
+$GLOBALS['theme_data']['version'] = '0.0.1';
// Switch mode
-if (empty($GLOBALS['theme_mode'])) $GLOBALS['theme_mode'] = "load";
+if (empty($GLOBALS['theme_mode'])) $GLOBALS['theme_mode'] = 'load';
switch ($GLOBALS['theme_mode'])
{
-case "test": // Do stuff while testing the theme: The admin clicked on "Import"
+case 'test': // Do stuff while testing the theme: The admin clicked on 'Import'
break;
-case "load": // Do stuff while theme is loaded normally
+case 'load': // Do stuff while theme is loaded normally
break;
}
//
************************************************************************/
// Load security stuff here (Oh, I hope this is not unsecure? Am I paranoia??? ;-) )
-require("inc/libs/security_functions.php");
+require('inc/libs/security_functions.php');
// Init "action" and "what"
-$GLOBALS['what'] = "";
-$GLOBALS['action'] = "";
+$GLOBALS['what'] = '';
+$GLOBALS['action'] = '';
// Set module
-$GLOBALS['module'] = "view";
+$GLOBALS['module'] = 'view';
$GLOBALS['output_mode'] = -1;
// Load the required file(s)
-require("inc/config.php");
+require('inc/config.php');
if (((REQUEST_ISSET_GET(('user'))) || (REQUEST_ISSET_GET(('reseller')))) && (REQUEST_ISSET_GET(('banner')))) {
// for later things... ;-)
array(bigintval(REQUEST_GET('banner'))), __FILE__, __LINE__);
$type = substr($url, -3);
- header ("Content-Type: image/".$type);
+ header ('Content-Type: image/' . $type);
LOAD_URL($url, false);
} else {
// Free memory
}
} else {
// Do nothing for now
- LOAD_URL (URL."/index.php");
+ LOAD_URL('index.php');
}
// Shutdown