require("inc/config.php");
// Is the "beg" extension active?
-if (!EXT_IS_ACTIVE("beg")) {
- // Redirect to index
- LOAD_URL("modules.php?module=index&msg=".constant('CODE_EXTENSION_PROBLEM')."&ext=beg");
-} // END - if
+REDIRCT_ON_UNINSTALLED_EXTENSION("beg");
// Is the script installed?
if (isBooleanConstantAndTrue('mxchange_installed')) {
require("inc/config.php");
// Is the "birthday" extension active?
-if (!EXT_IS_ACTIVE("birthday")) {
- // Redirect to index
- LOAD_URL("modules.php?module=index&msg=".constant('CODE_EXTENSION_PROBLEM')."&ext=birthday");
-} // END - if
+REDIRECT_ON_UNINSTALLED_EXTENSION("birthday");
// Is the script installed?
if (isBooleanConstantAndTrue('mxchange_installed')) {
unset($GLOBALS['ref_level']);
ADD_POINTS_REFSYSTEM("birthday_confirm", $uid, $data['points'], false, "0", $locked, strtolower(getConfig('birthday_mode')));
- // Remove entry from table
- SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_birthday` WHERE userid=%s AND chk_value='%s' LIMIT 1",
- array($uid, $chk), __FILE__, __LINE__);
-
// Update mediadata if version is 0.0.4 or newer
if (GET_EXT_VERSION("mediadata") >= "0.0.4") {
// Update database
MEDIA_UPDATE_ENTRY(array("total_points"), "add", $data['points']);
}
+ // Remove entry from table
+ SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_birthday` WHERE userid=%s AND chk_value='%s' LIMIT 1",
+ array($uid, $chk), __FILE__, __LINE__);
+
// Transfer data to constants for the template
define('__GENDER', TRANSLATE_GENDER($data['gender']));
- define('__SNAME', $data['surname']);
- define('__FNAME', $data['family']);
- define('__GIFT' , $data['points']);
+ define('__SNAME' , $data['surname']);
+ define('__FNAME' , $data['family']);
+ define('__GIFT' , TRANSLATE_COMMA($data['points']));
// Load message from template
define('__MSG', LOAD_TEMPLATE("birthday_msg", true));
}
} else {
// Cannot load data!
- define('__MSG', BIRTHDAY_CANNOT_LOAD_DATA);
+ define('__MSG', getMessage('BIRTHDAY_CANNOT_LOAD_DATA'));
}
// Free memory
require("inc/config.php");
// Load header
-LOAD_INC_ONCE("inc/header.php");
+LOAD_INC("inc/header.php");
// Load CSS code
-LOAD_INC_ONCE("inc/stylesheet.php");
+LOAD_INC("inc/stylesheet.php");
// Load footer
-LOAD_INC_ONCE("inc/footer.php");
+LOAD_INC("inc/footer.php");
//
?>
require("inc/config.php");
// Is the "doubler" extension active?
-if (!EXT_IS_ACTIVE("doubler")) {
- // Redirect to index
- LOAD_URL("modules.php?module=index&msg={!CODE_EXTENSION_PROBLEM!}&ext=doubler");
-} // END - if
+REDIRECT_ON_UNINSTALLED_EXTENSION("doubler");
// Is the script installed?
if (isBooleanConstantAndTrue('mxchange_installed')) {
// Update usage counter
UPDATE_CONFIG("doubler_counter", 1, "+");
- incrementCondigEntry('doubler_counter');
// Set constant
define('__DOUBLER_MSG', LOAD_TEMPLATE("doubler_reflink", true, $_POST['userid']));
// Load mail template and send mail away...
$msg = LOAD_EMAIL_TEMPLATE("member_doubler", $content, $uid);
- SEND_EMAIL($uid, DOUBLER_MEMBER_SUBJECT, $msg);
+ SEND_EMAIL($uid, getMessage('DOUBLER_MEMBER_SUBJECT'), $msg);
} // END - if
} // END - while
} // END - if
CREATE_EXTENSION_DEACTIVATION_TASK($ext_name);
// Notify the admin
- SEND_ADMIN_NOTIFICATION(ADMIN_SUBJECT_EXTENSION_DEACTIVATED, "admin_ext_deactivated", array('ext_name' => $ext_name));
+ SEND_ADMIN_NOTIFICATION(
+ getMessage('ADMIN_SUBJECT_EXTENSION_DEACTIVATED'),
+ "admin_ext_deactivated",
+ array('ext_name' => $ext_name)
+ );
} // END - if
}
// Creates a task for automatically deactivated (deprecated) extension
function CREATE_EXTENSION_DEACTIVATION_TASK ($ext) {
// Create subject line
- $subject = sprintf("[%s:] %s", $ext, TASK_SUBJ_EXTENSION_DEACTIVATED);
+ $subject = sprintf("[%s:] %s", $ext, getMessage('TASK_SUBJ_EXTENSION_DEACTIVATED'));
// Not installed and do we have created a task for the admin?
if ((DETERMINE_TASK_ID_BY_SUBJECT($subject) == 0) && (GET_EXT_VERSION($ext) != "")) {
// Initial release
$content = array(
'ver' => $ver,
- 'notes' => INITIAL_RELEASE
+ 'notes' => getMessage('INITIAL_RELEASE')
);
} else {
// No update notes found!
$content = array(
'ver' => $ver,
- 'notes' => NO_UPDATE_NOTES
+ 'notes' => getMessage('NO_UPDATE_NOTES')
);
}
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE what='active' LIMIT 1";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='config_active' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='active' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_active' LIMIT 1";
// Unregister filter
UNREGISTER_FILTER('online_extra_links', 'ADD_LINK_ACTIVE_LIST', true, $dry_run);
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='N' WHERE what='active' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='N' WHERE `what`='active' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE what='active' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='active' LIMIT 1";
break;
case "update": // Update an extension
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='admins' LIMIT 6";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='admins' LIMIT 6";
$SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_acls`";
$SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_mails`";
$SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP default_acl";
break;
case "0.5.6": // SQL queries for v0.5.6
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET what='admins_contct' WHERE what='admins_contact' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='admins_contct' WHERE `what`='admins_contact' LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Namenskonflikt zwischen den Erweiterungen <strong>admins</strong> und (kommender) <strong>contact</strong>.";
break;
case "0.5.8": // SQL queries for v0.5.8
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET what='admins_contct' WHERE what='admins_contact' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='admins_contct' WHERE `what`='admins_contact' LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Ein Punkt in der Versionsnummernliste verhinderte das 0.5.6-Update.";
break;
case "0.6.6": // SQL queries for v0.5.6
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET what='admins_contct' WHERE what='admins_contact' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='admins_contct' WHERE `what`='admins_contact' LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Namenskonflikt zwischen den Erweiterungen <strong>admins</strong> und (kommender) <strong>contact</strong>.";
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// Remove all other themes
$SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_extensions` WHERE ext_name LIKE 'admintheme%'";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET action='stats' WHERE what='usr_online' LIMIT 1";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET action='stats' WHERE what='email_stats' LIMIT 1";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET action='misc' WHERE what='maintenance' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='stats' WHERE `what`='usr_online' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='stats' WHERE `what`='email_stats' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='misc' WHERE `what`='maintenance' LIMIT 1";
break;
case "remove": // Do stuff when removing extension
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// Remove all other menu themes
$SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_extensions` WHERE ext_name LIKE 'admintheme%'";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET action='misc' WHERE what='usr_online' LIMIT 1";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET action='stats' WHERE what='email' LIMIT 1";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET action='setup' WHERE what='maintenance' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='misc' WHERE `what`='usr_online' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='stats' WHERE `what`='email' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='setup' WHERE `what`='maintenance' LIMIT 1";
break;
case "remove": // Do stuff when removing extension
$SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_transfers`";
$SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_packages`";
$SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_tanlist`";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='bank' LIMIT 14";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE action='bank' LIMIT 8";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='bank' LIMIT 14";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='bank' LIMIT 8";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE action='bank' LIMIT 8";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `action`='bank' LIMIT 8";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE action='bank' LIMIT 8";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `action`='bank' LIMIT 8";
break;
case "update": // Update an extension
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='config_beg' OR what='list_beg' LIMIT 2";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE what='beg' LIMIT 1";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE what='beg' OR what='beg2' LIMIT 2";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_beg' OR `what`='list_beg' LIMIT 2";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='beg' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='beg' OR `what`='beg2' LIMIT 2";
$SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_beg_ips`";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE what='beg' LIMIT 1";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='beg' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='beg' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='beg' LIMIT 1";
$SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', hidden='N', admin_only='N', mem_only='N' WHERE module='beg' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE what='beg' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='beg' LIMIT 1";
$SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what IN('beg','beg2') LIMIT 2";
$SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE module='beg' LIMIT 1";
break;
break;
case "0.1.5": // SQL queries for v0.1.5
- $SQLs[] = "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";
+ $SQLs[] = "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!)
$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.2.4": // SQL queries for v0.2.4
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET action='extras', sort='1' WHERE what='beg' LIMIT 1";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET action='rals', sort='3', title='Bettel-Rallye' WHERE what='beg2' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='1' WHERE `what`='beg' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='rals', `sort`='3', `title`='Bettel-Rallye' WHERE `what`='beg2' LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut.";
// SQL commands to run
$SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP birthday_sent";
$SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_birthday`";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='config_birthday' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_birthday' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
case "remove": // Do stuff when removing extension
// SQL commands to run
$SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN ('bonus','config_bonus','send_bonus','list_bonus','list_notifications') LIMIT 5";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE what='bonus' LIMIT 1";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE action='bonus' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='bonus' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='bonus' LIMIT 1";
$SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` MODIFY link_type ENUM('NORMAL') NOT NULL DEFAULT 'NORMAL'";
$SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` DROP bonus_id";
$SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus`";
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='bonus' LIMIT 1";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE action='bonus' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='bonus' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='bonus' LIMIT 1";
$SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', hidden='N', admin_only='N', mem_only='N' WHERE module='show_bonus' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what='bonus' LIMIT 1";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE action='bonus' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='bonus' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='bonus' LIMIT 1";
$SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE module='show_bonus' LIMIT 1";
break;
break;
case "0.2.1": // SQL queries for v0.2.1
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='config_bonus' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_bonus' LIMIT 1";
$SQLs[] = "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.')";
$SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 10.000";
$SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 100.000";
break;
case "0.2.3": // SQL queries for v0.2.3
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE what='bonus' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='bonus' LIMIT 1";
$SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`, `what`, `title`, `sort`, `visible`, `locked`, `counter`) VALUES ('main','bonus','Aktiv-Rallye',7,'Y','Y', 0)";
// Update notes (these will be set as task text!)
break;
case "0.6.4": // SQL queries for v0.6.4
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title='Aktiv-Rallye' WHERE what='config_bonus' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Aktiv-Rallye' WHERE `what`='config_bonus' LIMIT 1";
// Update notes (these will be set as task text!)
$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.8.3": // SQL queries for v0.8.3
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET action='rals', sort='2', title='Aktiv-Rallye' WHERE what='bonus' LIMIT 1";
+ $SQLs[] = "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!)
$UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut.";
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='booking' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='booking' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what='booking' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='booking' LIMIT 1";
break;
case "update": // Update an extension
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='config_cache' OR what='cache_stats' LIMIT 2";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_cache' OR `what`='cache_stats' LIMIT 2";
// Unregister all filters
UNREGISTER_FILTER('extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', true, $dry_run);
case "remove": // Do stuff when removing extension
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_countries`";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='country' LIMIT 2";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='country' LIMIT 2";
break;
case "activate": // Do stuff when admin activates this extension
case "remove": // Do stuff when removing extension
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_doubler`";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='doubler' LIMIT 3";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE what='doubler' LIMIT 1";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE what='doubler' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='doubler' LIMIT 3";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='doubler' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='doubler' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='doubler' LIMIT 1";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE what='doubler' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='doubler' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='doubler' LIMIT 1";
$SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', hidden='N', admin_only='N', mem_only='N' WHERE module='doubler' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what='doubler' LIMIT 1";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE what='doubler' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='doubler' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='doubler' LIMIT 1";
$SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE module='doubler' LIMIT 1";
break;
break;
case "0.1.4": // SQL queries for v0.1.4
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET action='extras', sort='4' WHERE what='doubler' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='4' WHERE `what`='doubler' LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut.";
case "remove": // Do stuff when removing extension
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_holidays`";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE what='holiday' LIMIT 1";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='holiday' LIMIT 4";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='holiday' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='holiday' LIMIT 4";
$SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value='0' LIMIT 1";
$SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_max_receive` (value, comment) VALUES ('0','Urlaub')";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='holiday' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='holiday' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what='holiday' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='holiday' LIMIT 1";
break;
case "update": // Update an extension
break;
case "0.1.9": // SQL queries for v0.1.9
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET action='account', sort='2', title='In Urlaub' WHERE what='holiday' LIMIT 1";
+ $SQLs[] = "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!)
$UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut.";
$SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP html";
$SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` DROP html_msg";
$SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_pool` DROP html_msg";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE what='html_mail' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='html_mail' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='html_mail' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='html_mail' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what='html_mail' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='html_mail' LIMIT 1";
break;
case "update": // Update an extension
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='logs' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='logs' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='maintenance' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='maintenance' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
case "remove": // Do stuff when removing extension
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_mediadata`";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='config_mediadata' LIMIT 1";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE what='mediadata' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_mediadata' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='mediadata' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='mods' LIMIT 3";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='mods' LIMIT 3";
break;
case "activate": // Do stuff when admin activates this extension
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='newsletter' AND what != 'send_newsletter' LIMIT 3";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE what='newsletter' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='newsletter' AND what != 'send_newsletter' LIMIT 3";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='newsletter' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `locked`='N', `visible`='Y' WHERE what='newsletter' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `locked`='N', `visible`='Y' WHERE `what`='newsletter' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `locked`='Y', `visible`='N' WHERE what='newsletter' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `locked`='Y', `visible`='N' WHERE `what`='newsletter' LIMIT 1";
break;
case "update": // Update an extension
$SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter', NULL, 'Newsletter','Einstellungen am Newsletter, Newsletter versenden, Abbestellungen auflisten usw.', 3)";
$SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter','list_newsletter','Abbestellungen','Alle Abbestellungen auflisten und bearbeiten.', 2)";
$SQLs[] = "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)";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET action='newsletter', what='send_newsletter', title='Versenden', sort='1' WHERE what='newsletter' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='newsletter', `what`='send_newsletter', `title`='Versenden', `sort`='1' WHERE `what`='newsletter' LIMIT 1";
$SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','newsletter','Newsletter-Empfang','N','Y', 10)";
$SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD nl_charge FLOAT(10,2) UNSIGNED NOT NULL DEFAULT '5.00'";
$SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nl_receive ENUM('Y','N') NOT NULL DEFAULT 'Y'";
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE what='nickname' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='nickname' LIMIT 1";
$SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN ('config_nickname','list_nickname') LIMIT 2";
$SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_nickname_history`";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='nickname' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='nickname' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what='nickname' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='nickname' LIMIT 1";
break;
case "update": // Update an extension
break;
case "0.1.6": // SQL queries for v0.1.6
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET action='extras', sort='2' WHERE what='nickname' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='2' WHERE `what`='nickname' LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut.";
case "remove": // Do stuff when removing extension
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_online`";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='usr_online' LIMIT 1";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE action='online' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='usr_online' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='online' LIMIT 1";
// Unregister filter
UNREGISTER_FILTER('init', 'UPDATE_ONLINE_LIST', true, $dry_run);
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE action='online' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='online' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE action='online' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='online' LIMIT 1";
break;
case "update": // Update an extension
case "remove": // Do stuff when removing extension
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_optimize_gain`";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='optimize' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='optimize' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='config_order' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_order' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='order' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='order' LIMIT 1";
$SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', hidden='N', admin_only='N', mem_only='Y' WHERE module='order' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what='order' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='order' LIMIT 1";
$SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `visible`='N', `locked`='Y' WHERE module='order' LIMIT 1";
break;
break;
case "0.1.1": // SQL queries for v0.1.1
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='config_order' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_order' LIMIT 1";
$SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`, `what`, `title`, `sort`, `descr`) VALUES ('setup','config_order','Mailbuchungsseite','7','Einstellungen am Mailbuchungsformular.')";
$SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD mail_orders BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
case "0.4.6": // SQL queries for v0.4.6
$SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('order',NULL,'Mailbuchungen',3,'Y','N')";
$SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('order','order2','Framekiller-Mails',2,'Y','N')";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET action='order', sort='1', title='Klick-Mails' WHERE what='order' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='order', `sort`='1', `title`='Klick-Mails' WHERE `what`='order' LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut.";
break;
case "0.4.8": // SQL queries for v0.4.8
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title='Mailbuchung' WHERE what='config_order' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Mailbuchung' WHERE `what`='config_order' LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Menüpunkt "Mailbuchungsseite" nach "Mailbuchung" umbenannt und weitere Einstellungen aus Sonstige Einstellungen verschoben.";
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='config_other' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_other' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_payouts`";
$SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_payout_types`";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='payouts'";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE what='payout' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='payouts'";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='payout' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='payout' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='payout' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what='payout' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='payout' LIMIT 1";
break;
case "update": // Update an extension
{
case "0.1.2": // SQL queries for v0.1.2
$SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('payouts', NULL, 'Auszahlungsmanagement','Management der Auszahlungsarten.','8')";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET action='payouts', title='Einstellungen' WHERE action='setup' AND what='config_payouts' LIMIT 1";
+ $SQLs[] = "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 "remove": // Do stuff when removing extension
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_primera`";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='primera'";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE what='primera' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='primera'";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='primera' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='primera' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='primera' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what='primera' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='primera' LIMIT 1";
break;
case "update": // Update an extension
$SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_users`";
// Remove menus
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='rallye' LIMIT 4";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE what='rallyes' LIMIT 1";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE what='rallyes' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='rallye' LIMIT 4";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='rallyes' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='rallyes' LIMIT 1";
// Unregister filter
UNREGISTER_FILTER('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', true, $dry_run);
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE what='rallyes' LIMIT 1";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='rallyes' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='rallyes' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='rallyes' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE what='rallyes' LIMIT 1";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what='rallyes' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='rallyes' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='rallyes' LIMIT 1";
break;
case "update": // Update an extension
break;
case "0.3.2": // SQL queries for v0.3.2
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET action='rals', sort='1', title='Referal-Rallye' WHERE what='rallyes' LIMIT 1";
+ $SQLs[] = "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!)
$UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut.";
case "remove": // Do stuff when removing extension
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_refs`";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE what='refback' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='refback' LIMIT 1";
$SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN('config_refback','list_refback') LIMIT 2";
$SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_refsystem` SET level=level-1";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='refback' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='refback' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what='refback' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='refback' LIMIT 1";
break;
case "update": // Update an extension
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='config_register' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_register' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
case "0.4.2": // SQL queries for v0.4.2
$SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD register_default ENUM('Y','N') NOT NULL DEFAULT 'N'";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET what='config_register2' WHERE what='config_reg' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='config_register2' WHERE `what`='config_reg' LIMIT 1";
// Update notes (these will be set as task text!)
$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.";
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='config_removeip' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_removeip' LIMIT 1";
// Remove filters
UNREGISTER_FILTER('post_youhere_line', 'ADD_ANONYMITY_NOTICE', true, $dry_run);
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='repair' LIMIT 5";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='repair' LIMIT 5";
break;
case "activate": // Do stuff when admin activates this extension
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='config_rewrite' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_rewrite' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
$SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaign_assigns`";
$SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_admin_data`";
$SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_display_data`";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='sponsor' OR what IN('repr_sponsor','sponsor_medit','sponsor_madd') LIMIT 20";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE action='sponsor' LIMIT 5";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE what='sponsor' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='sponsor' OR what IN('repr_sponsor','sponsor_medit','sponsor_madd') LIMIT 20";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='sponsor' LIMIT 5";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='sponsor' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE action='sponsor' LIMIT 4";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='sponsor' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='sponsor' LIMIT 4";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='sponsor' LIMIT 1";
$SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_sponsor_menu` SET active='Y' WHERE active='N'";
$SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_sponsor_registry` SET is_active='Y' WHERE is_active='N'";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE action='sponsor' LIMIT 4";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what='sponsor' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='sponsor' LIMIT 4";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='sponsor' LIMIT 1";
$SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_sponsor_menu` SET active='N' WHERE active='Y'";
$SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_sponsor_registry` SET is_active='N' WHERE is_active='Y'";
break;
(action='extras' AND (`what`='' OR `what` IS NULL)) OR
(action='rals' AND (`what`='' OR `what` IS NULL)) OR
(action='account' AND (`what`='' OR `what` IS NULL))";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET action='main' WHERE
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='main' WHERE
action='stats' OR
action='extras' OR
action='rals' OR
break;
case "0.1.1": // SQL queries for v0.1.1
- $SQLs[] = "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";
+ $SQLs[] = "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";
$SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD index_delay TINYINT(3) UNSIGNED NOT NULL DEFAULT '-1'";
$SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD index_cookie BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*365)."";
break;
case "0.3.0": // SQL queries for v0.3.0
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title='{!POINTS!}/Referal-Ebenen' WHERE `what`='config_points' LIMIT 1";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title='Mailvergütungen...' WHERE `what`='payments' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='{!POINTS!}/Referal-Ebenen' WHERE `what`='config_points' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Mailvergütungen...' WHERE `what`='payments' LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Zwei Menüpunkte umbenannt.";
$SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('extras',NULL,'Extras',5,'Y','N')";
$SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('rals',NULL,'Rallyes',6,'Y','N')";
$SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('account',NULL,'Ihr Account',7,'Y','N')";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET action='stats', sort='1', title='Klick-Mails' WHERE `what`='stats' LIMIT 1";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET action='extras', sort='3' WHERE `what`='reflinks' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='stats', `sort`='1', `title`='Klick-Mails' WHERE `what`='stats' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='3' WHERE `what`='reflinks' LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut.";
break;
case "0.5.7": // SQL queries for v0.5.7
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='list_norefs' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='list_norefs' LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Auflistung der Mitglieder ohne Werber nach what=list_user&mode=norefs verschoben.";
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='task' LIMIT 2";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='task' LIMIT 2";
break;
case "activate": // Do stuff when admin activates this extension
$SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='theme' LIMIT 4";
// Delete guest menu entries
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE action='themes' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='themes' LIMIT 1";
// Delete member menu entries
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE action='themes' OR `what`='themes' LIMIT 2";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='themes' OR `what`='themes' LIMIT 2";
break;
case "activate": // Do stuff when admin activates this extension
// Memember menu
$SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',3,'Y','N')";
$SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','themes','Designs', 6,'Y','N')";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET sort='8' WHERE action='themes' LIMIT 1";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET action='account', sort='1', title='Designs' WHERE `what`='themes' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `sort`='8' WHERE `action`='themes' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='account', `sort`='1', `title`='Designs' WHERE `what`='themes' LIMIT 1";
// User data
$SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD curr_theme VARCHAR(255) NOT NULL DEFAULT 'default'";
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE what='top10' LIMIT 1";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='config_top10' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='top10' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_top10' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE what='top10' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='top10' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE what='top10' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='top10' LIMIT 1";
break;
case "update": // Update an extension
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_in`";
$SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_out`";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='transfer' LIMIT 4";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE what='transfer' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='transfer' LIMIT 4";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='transfer' LIMIT 1";
$SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP opt_in";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='transfer' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='transfer' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='transfer' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='transfer' LIMIT 1";
break;
case "update": // Update an extension
break;
case "0.2.5": // SQL queries for v0.2.5
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET action='extras', sort='5' WHERE what='transfer' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='5' WHERE `what`='transfer' LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Mitgliedsmenü komplett geändert.";
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='usage' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='usage' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
case "remove": // Do stuff when removing extension
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_wernis`";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='wernis'";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE what='wernis' LIMIT 1";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE what='wernis_portal' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='wernis'";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='wernis' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='wernis_portal' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE what='wernis_portal' LIMIT 1";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='wernis' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='wernis_portal' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='wernis' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE what='wernis_portal' LIMIT 1";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what='wernis' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='wernis_portal' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='wernis' LIMIT 1";
break;
case "update": // Update an extension
}
// Message to regular users (non-admin)
- $CORR = FATAL_REPORT_ERRORS;
+ $CORR = getMessage('FATAL_REPORT_ERRORS');
// PHP warnings fixed
if ($check == "done") {
- if (IS_ADMIN()) $CORR = FATAL_CORRECT_ERRORS;
+ if (IS_ADMIN()) $CORR = getMessage('FATAL_CORRECT_ERRORS');
} // END - if
// Load footer template
// Is the filter already initialized?
if ((isset($filters)) && (is_array($filters))) {
// Then abort here
- addFatalMessage(FILTER_FAILED_ALREADY_INIT);
+ addFatalMessage(getMessage('FILTER_FAILED_ALREADY_INIT'));
return false;
} // END - if
if ((isset($filters[$filterName][$filterFunction])) && (!$force)) {
// Then abort here
if (!$silentAbort) {
- addFatalMessage(sprintf(FILTER_FAILED_ALREADY_ADDED, $filterFunction, $filterName));
+ addFatalMessage(sprintf(getMessage('FILTER_FAILED_ALREADY_ADDED'), $filterFunction, $filterName));
} // END - if
// Abort here
// Is the function there?
if (!function_exists($filterFunction)) {
// Then abort here
- addFatalMessage(sprintf(FILTER_FAILED_NOT_FOUND, $filterFunction, $filterName));
+ addFatalMessage(sprintf(getMessage('FILTER_FAILED_NOT_FOUND'), $filterFunction, $filterName));
return false;
} // END - if
// Is that filter there?
if ((!isset($filters[$filterName][$filterFunction])) && (!$force)) {
// Not found, so abort here
- addFatalMessage(sprintf(FILTER_FAILED_NOT_REMOVED, $filterFunction, $filterName));
+ addFatalMessage(sprintf(getMessage('FILTER_FAILED_NOT_REMOVED'), $filterFunction, $filterName));
return false;
} // END - if
// Then abort here (quick'N'dirty hack)
if ((!$silentAbort) && (defined('FILTER_FAILED_NO_FILTER_FOUND'))) {
// Add fatal message
- addFatalMessage(sprintf(FILTER_FAILED_NO_FILTER_FOUND, $filterName));
+ addFatalMessage(sprintf(getMessage('FILTER_FAILED_NO_FILTER_FOUND'), $filterName));
} // END - if
// Abort here
// Is a database link here and not in installation mode?
if ((!is_resource($link)) && (!isBooleanConstantAndTrue('mxchange_installing'))) {
// Abort here
- addFatalMessage(sprintf(FILTER_FLUSH_FAILED_NO_DATABASE, $filterFunction, $filterName));
+ addFatalMessage(sprintf(getMessage('FILTER_FLUSH_FAILED_NO_DATABASE'), $filterFunction, $filterName));
return false;
} // END - if
// Is the element set?
if (isset($GLOBALS['ext_load_mode'])) {
// Redirect here
- LOAD_URL("modules.php?module=admin&logout=1&".$GLOBALS['ext_load_mode']."=sql_patches");
+ LOAD_URL("modules.php?module=admin&logout=1&".$GLOBALS['ext_load_mode']."=sql_patches");
} // END - if
// This should not happen!
// Filter for initializing randomizer
function FILTER_INIT_RANDOMIZER () {
// Simply init the randomizer with seed and _ADD value
- mt_srand(make_seed() + constant('_ADD'));
+ mt_srand(generateSeed() + constant('_ADD'));
}
//
}
// Generates a ***weak*** seed (taken from de.php.net/mt_srand)
-function make_seed () {
+function generateSeed () {
list($usec, $sec) = explode(" ", microtime());
return ((float)$sec + (float)$usec);
}
return $msg;
}
+// Checks wether the given extension is currently not installed
+// and redirects if so.
+function REDIRCT_ON_UNINSTALLED_EXTENSION ($ext_name) {
+ // Is the extension uninstalled/inactive?
+ if (!EXT_IS_ACTIVE($ext_name)) {
+ // Redirect to index
+ LOAD_URL("modules.php?module=index&msg=".constant('CODE_EXTENSION_PROBLEM')."&ext=".$ext_name);
+ } // END - if
+}
+
//////////////////////////////////////////////////
// AUTOMATICALLY RE-GENERATED MISSING FUNCTIONS //
//////////////////////////////////////////////////
break;
}
} else {
+ // Already installed!
addFatalMessage(getMessage('ALREADY_INSTALLED'));
}
+
//
?>
define('LANG_WRITE_FOOTER', "Scriptname, -version und -author anzeigen?");
define('LANG_FRAMESET_ACTIVE', "Soll das Frameset aktiviert werden? (Wenn nein wird ein Table-Set aktiviert)");
define('MYSQL_ERRORS', "Es sind MySQL-Fehler aufgetreten! Bitte korregieren Sie diese!");
-define('LANG_MOD_UNKNOWN_1', "Der Return-Code <u>");
-define('LANG_MOD_UNKNOWN_2', "</u> ist unbekannt!");
-define('LANG_MOD_LOCKED_1', "Das Modul <u>");
-define('LANG_MOD_LOCKED_2', "</u> wurde gesperrt!");
+define('LANG_MOD_REG_UNKNOWN_1', "Der Return-Code <u>");
+define('LANG_MOD_REG_UNKNOWN_2', "</u> ist unbekannt!");
+define('LANG_MOD_REG_LOCKED_1', "Das Modul <u>");
+define('LANG_MOD_REG_LOCKED_2', "</u> wurde gesperrt!");
define('ADMIN_UNKNOWN_ACTION_1', "Unbekannte Admin-Aktion <u>");
define('ADMIN_UNKNOWN_ACTION_2', "</u> erkannt! Bitte das Modul richtig aufrufen!");
define('ADMIN_ACTION_404_1', "Admin-Modul für Aktion <u>");
define('LANG_WRITE_FOOTER', "Display name, version and author of this script?");
define('LANG_FRAMESET_ACTIVE', "Enable frameset? If not a table-set will be used instead.");
define('MYSQL_ERRORS', "MySQL errors detected. Please correct first to continue.");
-define('LANG_MOD_UNKNOWN_1', "Unknown return-code <u>");
-define('LANG_MOD_UNKNOWN_2', "</u> detected!");
-define('LANG_MOD_LOCKED_1', "Selected module <u>");
-define('LANG_MOD_LOCKED_2', "</u> is locked!");
+define('LANG_MOD_REG_UNKNOWN_1', "Unknown return-code <u>");
+define('LANG_MOD_REG_UNKNOWN_2', "</u> detected!");
+define('LANG_MOD_REG_LOCKED_1', "Selected module <u>");
+define('LANG_MOD_REG_LOCKED_2', "</u> is locked!");
define('ADMIN_UNKNOWN_ACTION_1', "Unknown administrator-action <u>");
define('ADMIN_UNKNOWN_ACTION_2', "</u> detected. Please call this module correctly!");
define('ADMIN_ACTION_404_1', "Administrator module for action <u>");
{
// Load sub menus
$result_sub = SQL_QUERY_ESC("SELECT what, title FROM `{!_MYSQL_PREFIX!}_sponsor_menu`
-WHERE action='%s' AND `what` != '' AND `what` IS NOT NULL ".$WHERE."
+WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ".$WHERE."
ORDER BY `sort`", array($action), __FILE__, __LINE__);
if (SQL_NUMROWS($result_sub) > 0)
{
global $SURFBAR_CACHE;
// Search for the requested action/status combination in database
- $result = SQL_QUERY_ESC("SELECT new_status FROM `{!_MYSQL_PREFIX!}_surfbar_actions` WHERE action='%s' AND `status`='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT new_status FROM `{!_MYSQL_PREFIX!}_surfbar_actions` WHERE `action`='%s' AND `status`='%s' LIMIT 1",
array($action, $status), __FILE__, __LINE__);
// Is the entry there?
// Check if action/what pair is valid
$result_action = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_admin_menu`
-WHERE action='%s' AND ((what='%s' AND what != 'overview') OR ((what='' OR `what` IS NULL) AND '%s'='overview'))
+WHERE `action`='%s' AND ((what='%s' AND what != 'overview') OR ((what='' OR `what` IS NULL) AND '%s'='overview'))
LIMIT 1", array($act, $wht, $wht), __FILE__, __LINE__);
if (SQL_NUMROWS($result_action) == 1) {
}
$OUT .= "</NOBR></td>
</tr>\n";
- $result_what = SQL_QUERY_ESC("SELECT what, title, descr FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`, id DESC",
+ $result_what = SQL_QUERY_ESC("SELECT what, title, descr FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`, id DESC",
array($menu), __FILE__, __LINE__);
if ((SQL_NUMROWS($result_what) > 0) && ($act == $menu))
{
), __FILE__, __LINE__);
// Load ID
- $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_rallye_data` WHERE start_time='%s' AND end_time='%s' AND title='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_rallye_data` WHERE start_time='%s' AND end_time='%s' AND `title`='%s' LIMIT 1",
array($START, $END, $_POST['title']), __FILE__, __LINE__);
list($id) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
// Load sub menus :)
foreach ($menus as $key_main => $value_main)
{
- $result = SQL_QUERY_ESC("SELECT what, title, sort FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
+ $result = SQL_QUERY_ESC("SELECT what, title, sort FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
array($value_main), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0)
{
// Get IDs
if (!empty($_GET['w'])) {
// Sub menus selected
- $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='%s' AND sort='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1",
array($_GET['act'], bigintval($_GET['tid'])), __FILE__, __LINE__);
list($tid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
- $result = SQL_QUERY("SELECT id FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='%s' AND sort='%s' LIMIT 1",
+ $result = SQL_QUERY("SELECT id FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1",
array($_GET['act'], bigintval($_GET['fid'])), __FILE__, __LINE__);
list($fid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
} else {
// Main menu selected
- $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE (what='' OR `what` IS NULL) AND sort='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE (what='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1",
array(bigintval($_GET['tid'])), __FILE__, __LINE__);
list($tid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
- $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE (what='' OR `what` IS NULL) AND sort='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE (what='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1",
array(bigintval($_GET['fid'])), __FILE__, __LINE__);
list($fid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
if ((!empty($tid)) && (!empty($fid))) {
// Sort menu
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
array(bigintval($_GET['tid']), bigintval($fid)), __FILE__, __LINE__);
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
array(bigintval($_GET['fid']), bigintval($tid)), __FILE__, __LINE__);
CACHE_PURGE_ADMIN_MENU(0, "", "", $AND);
}
// By default list menus
if (!empty($SUB)) {
// Sub menus of a main menu
- $result = SQL_QUERY_ESC("SELECT id, action, what, title, sort FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort` ASC",
+ $result = SQL_QUERY_ESC("SELECT id, action, what, title, sort FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort` ASC",
array($SUB), __FILE__, __LINE__);
} else {
// Main menus
// Load all what menu points
$result = SQL_QUERY("SELECT id, what, title
FROM `{!_MYSQL_PREFIX!}_guest_menu`
-WHERE action='main' AND `what` != '' AND `what` IS NOT NULL AND `locked`='N'
+WHERE `action`='main' AND `what` != '' AND `what` IS NOT NULL AND `locked`='N'
ORDER BY `sort` ASC", __FILE__, __LINE__);
$SW = 2; $OUT = ""; $atitle = "";
$id = bigintval($id);
// Update module
- 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",
+ 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($_POST['title'][$id], $_POST['locked'][$id], $_POST['hidden'][$id], $_POST['admin'][$id], $_POST['member'][$id], $id), __FILE__, __LINE__);
}
foreach ($menus as $key_main => $value_main) {
$result = SQL_QUERY_ESC("SELECT what, title, sort
FROM `{!_MYSQL_PREFIX!}_guest_menu`
-WHERE action='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
+WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
array($value_main), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0)
{
$sel = bigintval($sel);
// Update entry
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET title='%s', action='%s', what='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `title`='%s', `action`='%s', `what`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
array($menu, $_POST['sel_action'][$sel], $_POST['sel_what'][$sel], $sel),__FILE__, __LINE__);
}
LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SETTINGS_SAVED'));
// Get IDs
if (!empty($_GET['w'])) {
// Sub menus selected
- $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE action='%s' AND sort='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1",
array($_GET['act'], bigintval($_GET['tid'])), __FILE__, __LINE__);
list($tid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
- $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE action='%s' AND sort='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1",
array($_GET['act'], bigintval($_GET['fid'])), __FILE__, __LINE__);
list($fid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
} else {
// Main menu selected
- $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE (what='' OR `what` IS NULL) AND sort='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE (what='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1",
array(bigintval($_GET['tid'])), __FILE__, __LINE__);
list($tid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
- $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE (what='' OR `what` IS NULL) AND sort='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE (what='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1",
array(bigintval($_GET['fid'])), __FILE__, __LINE__);
list($fid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
if ((!empty($tid)) && (!empty($fid))) {
// Sort menu
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
array(bigintval($_GET['tid']), bigintval($fid)), __FILE__, __LINE__);
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
array(bigintval($_GET['fid']), bigintval($tid)), __FILE__, __LINE__);
} // END - if
} // END - if
// Load sub menus :)
foreach ($menus as $key_main => $value_main) {
- $result = SQL_QUERY_ESC("SELECT what, title, sort FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE action='%s' AND `what` != '' ORDER BY `sort`",
+ $result = SQL_QUERY_ESC("SELECT what, title, sort FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='%s' AND `what` != '' ORDER BY `sort`",
array($value_main), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Initialize arrays
switch ($_POST['ok'])
{
case "edit": // Edit menu
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET title='%s', action='%s', what='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `title`='%s', `action`='%s', `what`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
array($menu, $_POST['sel_act'][$sel], $_POST['sel_what'][$sel], $sel), __FILE__, __LINE__);
break;
// Get IDs
if (!empty($_GET['w'])) {
// Sub menus selected
- $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE action='%s' AND sort='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1",
array(bigintval($_GET['act']), bigintval($_GET['tid'])), __FILE__, __LINE__);
list($tid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
- $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE action='%s' AND sort='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1",
array(bigintval($_GET['act']), bigintval($_GET['fid'])), __FILE__, __LINE__);
list($fid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
} else {
// Main menu selected
- $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE (what='' OR `what` IS NULL) AND sort='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE (what='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1",
array(bigintval($_GET['tid'])), __FILE__, __LINE__);
list($tid) = SQL_FETCHROW($result);
- $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE (what='' OR `what` IS NULL) AND sort='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE (what='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1",
array(bigintval($_GET['fid'])), __FILE__, __LINE__);
list($fid) = SQL_FETCHROW($result);
}
if ((!empty($tid)) && (!empty($fid))) {
// Sort menu
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
array(bigintval($_GET['tid']), bigintval($fid)), __FILE__, __LINE__);
- SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
array(bigintval($_GET['fid']), bigintval($tid)), __FILE__, __LINE__);
} // END - -fi
}
}
// Set logout weight to 999
-SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET sort='999' WHERE action='logout' AND (what='' OR `what` IS NULL) LIMIT 1", __FILE__, __LINE__);
+SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `sort`='999' WHERE `action`='logout' AND (what='' OR `what` IS NULL) LIMIT 1", __FILE__, __LINE__);
// Now sort every each menu
foreach ($ACTIONS as $act) {
- $result_fix = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
+ $result_fix = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
array($act), __FILE__, __LINE__);
$cnt = 1;
while (list($id) = SQL_FETCHROW($result_fix)) {
$cnt++;
}
// Set logout weight to 999
-$result_sort = SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET sort='999' WHERE action='logout' AND (what='' OR `what` IS NULL) LIMIT 1", __FILE__, __LINE__);
+$result_sort = SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET sort='999' WHERE `action`='logout' AND (what='' OR `what` IS NULL) LIMIT 1", __FILE__, __LINE__);
// Now sort every each menu
foreach ($ACTIONS as $act) {
- $result_fix = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE action='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
+ $result_fix = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
array($act), __FILE__, __LINE__);
$cnt = 1;
while (list($id) = SQL_FETCHROW($result_fix)) {
$cnt++;
}
// Set logout weight to 999
-SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET sort='999' WHERE action='logout' AND (what='' OR `what` IS NULL) LIMIT 1", __FILE__, __LINE__);
+SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET sort='999' WHERE `action`='logout' AND (what='' OR `what` IS NULL) LIMIT 1", __FILE__, __LINE__);
// Now sort every each menu
foreach ($ACTIONS as $act) {
- $result_fix = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE action='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
+ $result_fix = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
array($act), __FILE__, __LINE__);
$cnt = 1;
while (list($id) = SQL_FETCHROW($result_fix)) {
if (FILE_READABLE($INC)) {
// Ok, we finally load the guest action module
LOAD_INC($INC);
-} elseif ($IS_VALID) {
- addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
} else {
- addFatalMessage(sprintf(getMessage('GUEST_LOCKED_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
+ addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
}
//
// Load the include file
$INC = sprintf("inc/modules/guest/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
-$IS_VALID = WHAT_IS_VALID($GLOBALS['action'], $GLOBALS['what'], "guest");
-
-if ((FILE_READABLE($INC)) && ($IS_VALID)) {
+if (FILE_READABLE($INC)) {
// Ok, we finally load the guest action module
LOAD_INC($INC);
-} elseif ($IS_VALID) {
- addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
} else {
- addFatalMessage(sprintf(getMessage('GUEST_LOCKED_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
+ addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
}
//
if (FILE_READABLE($INC)) {
// Ok, we finally load the guest action module
LOAD_INC($INC);
-} elseif ($IS_VALID) {
- addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
} else {
- addFatalMessage(sprintf(getMessage('GUEST_LOCKED_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
+ addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
}
//
if (FILE_READABLE($INC)) {
// Ok, we finally load the guest action module
LOAD_INC($INC);
-} elseif ($IS_VALID) {
- addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
} else {
- addFatalMessage(sprintf(getMessage('GUEST_LOCKED_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
+ addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
}
//
<td valign=\"top\" align=\"center\" rowspan=\"3\" class=\"member_content\">");
$INC_ACTION = sprintf("inc/modules/member/action-%s.php", $act);
-if ((FILE_READABLE($INC_ACTION)) && (VALIDATE_MENU_ACTION("member", GET_ACTION("member", $GLOBALS['what']), $GLOBALS['what']))) {
+if ((FILE_READABLE($INC_ACTION)) && (VALIDATE_MENU_ACTION("member", $GLOBALS['action'], $GLOBALS['what']))) {
// Requested module is available so we load it
LOAD_INC($INC_ACTION);
} else {
break;
}
$dummy = substr($search, 0, -4);
- $AND .= " AND action='".GET_ACTION($ACC_LVL, $dummy)."'";
+ $AND .= " AND `action`='".GET_ACTION($ACC_LVL, $dummy)."'";
} elseif (($ACC_LVL == "sponsor") || ($ACC_LVL == "engine")) {
// Sponsor / engine menu
$type = "what";
$main_action = "";
$sub_what = "";
- if (!VALIDATE_MENU_ACTION($MODE, $act, $wht, true)) return getMessage('CODE_MENU_NOT_VALID');
+ // is the menu action valid?
+ if (!VALIDATE_MENU_ACTION($MODE, $act, $wht, true)) {
+ return getMessage('CODE_MENU_NOT_VALID');
+ } // END - if
// Non-admin shall not see all menus
if (!IS_ADMIN()) {
// Load menu header template
LOAD_TEMPLATE($MODE."_menu_title", false, $content);
- $result_sub = SQL_QUERY_ESC("SELECT title, what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE action='%s' AND `what` != '' AND `what` IS NOT NULL ".$AND." ORDER BY `sort`",
+ $result_sub = SQL_QUERY_ESC("SELECT title, what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ".$AND." ORDER BY `sort`",
array($MODE, $main_action), __FILE__, __LINE__);
$ctl = SQL_NUMROWS($result_sub);
if ($ctl > 0) {
while (list($value, $comment) = SQL_FETCHROW($result)) {
$OUT .= " <option value=\"".$value."\"";
if ($_POST['max_mails'] == $value) $OUT .= " selected=\"selected\"";
- $OUT .= ">".$value." ".PER_DAY;
+ $OUT .= ">".$value." {--PER_DAY--}";
if (!empty($comment)) $OUT .= " (".$comment.")";
$OUT .= "</option>\n";
}
while (list($value, $comment) = SQL_FETCHROW($result)) {
$OUT .= " <option value=\"".$value."\"";
if ($default == $value) $OUT .= " selected=\"selected\"";
- $OUT .= ">".$value." ".PER_DAY;
+ $OUT .= ">".$value." {--PER_DAY--}";
if (!empty($comment)) $OUT .= " (".$comment.")";
$OUT .= "</option>\n";
}
$OUT = LOAD_TEMPLATE("member_receive_table", true);
} else {
// Maybe the admin has to setup some maximum values?
- $OUT = LOAD_TEMPLATE("admin_settings_saved", true, NO_MAX_VALUES);
+ $OUT = LOAD_TEMPLATE("admin_settings_saved", true, getMessage('NO_MAX_VALUES'));
}
break;
}
return $ret;
}
-// Checks wether 'what' is valid
-// @TODO This cache can be flushed to hard drive
-function WHAT_IS_VALID ($act, $wht, $type="guest") {
- global $cacheArray;
-
- // Is admin or cache entry is there?
- if (IS_ADMIN()) {
- // Everything is valid to the admin :-)
- $ret = true;
- } elseif (isset($cacheArray['what_valid'][$type][$act][$what])) {
- // Use the cache
- $ret = $cacheArray['what_valid'][$type][$act][$what];
-
- // Count the cache hit
- incrementConfigEntry('cache_hits');
- } else {
- // By default is nothing valid
- $ret = false;
-
- // Look in database
- $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE action='%s' AND what='%s' AND `locked`='N' LIMIT 1", array($type, $act, $wht), __FILE__, __LINE__);
-
- // Is "what" valid?
- $ret = (SQL_NUMROWS($result) == 1);
-
- // Free the result
- SQL_FREERESULT($result);
- }
-
- // Cache the entry
- $cacheArray['what_valid'][$type][$act][$what] = $ret;
-
- // Return the result
- return $ret;
-}
-
// Checks wether the current user is a member
function IS_MEMBER () {
global $status, $LAST, $cacheArray;
// Validate the given menu action
function VALIDATE_MENU_ACTION ($MODE, $act, $wht, $UPDATE=false) {
+ global $cacheArray;
+
+ // Is the cache entry there and we shall not update?
+ if ((isset($cacheArray['action_valid'][$MODE][$act][$wht])) && ($UPDATE === false)) {
+ // Count cache hit
+ incrementConfigEntry('cache_hits');
+
+ // Then use this cache
+ return $cacheArray['action_valid'][$MODE][$act][$wht];
+ } // END - if
+
// By default nothing is valid
$ret = false;
if ((!IS_ADMIN()) && ($MODE != "admin")) $ADD = " AND `locked`='N'";
//* DEBUG: */ echo __LINE__.":".$MODE."/".$act."/".$wht."*<br />\n";
- if (($MODE != "admin") && ($UPDATE)) {
+ 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",
+ $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), __FILE__, __LINE__, false);
- } elseif ($wht != "overview") {
+ } elseif (($wht != "overview") && (!empty($wht))) {
// Other actions
- $SQL = SQL_QUERY_ESC("SELECT id, what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE action='%s'".$ADD." ORDER BY action DESC LIMIT 1",
- array($MODE, $act), __FILE__, __LINE__, false);
+ $SQL = SQL_QUERY_ESC("SELECT id, what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `action`='%s' AND `what`='%s'".$ADD." ORDER BY action DESC LIMIT 1",
+ array($MODE, $act, $wht), __FILE__, __LINE__, false);
} else {
// Admin login overview
- $SQL = SQL_QUERY_ESC("SELECT id, what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE action='%s' AND (what='' OR `what` IS NULL)".$ADD." ORDER BY action DESC LIMIT 1",
+ $SQL = SQL_QUERY_ESC("SELECT id, what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `action`='%s' AND (what='' OR `what` IS NULL)".$ADD." ORDER BY action DESC LIMIT 1",
array($MODE, $act), __FILE__, __LINE__, false);
}
// Run SQL command
$result = SQL_QUERY($SQL, __FILE__, __LINE__);
- if ($UPDATE) {
+ if ($UPDATE === true) {
// Check updated/affected rows
$ret = (SQL_AFFECTEDROWS() == 1);
} else {
// Free memory
SQL_FREERESULT($result);
+ // Set cache entry
+ $cacheArray['action_valid'][$MODE][$act][$wht] = $ret;
+
// Return result
return $ret;
}
if (empty($ret)) $ret = "main";
// Load from database
- $result = SQL_QUERY_ESC("SELECT action FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE what='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT action FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `what`='%s' LIMIT 1",
array($MODE, $wht), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load action value and pray that this one is the right you want... ;-)
// Activate System
$SQLs = array(
"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!}_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"
);
// Already installed?
if ((isBooleanConstantAndTrue('mxchange_installed')) && (isBooleanConstantAndTrue('admin_registered'))) {
// Add fatal message
- addFatalMessage(ALREADY_INSTALLED);
+ addFatalMessage(getMessage('ALREADY_INSTALLED'));
} // END - if
// Does something goes wrong?
// Init "action" and "what"
global $what, $action;
-$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
// Is this script installed and a JavaScript tag is provied?
if ((isBooleanConstantAndTrue('mxchange_installed')) && (isset($_GET['tag']))) {
// Set header
- @header("Content-type: text/javascript");
+ header("Content-type: text/javascript");
// Load header
LOAD_INC_ONCE("inc/header.php");
require("inc/config.php");
if (isBooleanConstantAndTrue('mxchange_installed')) {
- // Is the extension active
- if (!EXT_IS_ACTIVE("mailid", true)) {
- // Is not activated/installed yet!
- LOAD_URL("modules.php?module=index&msg=".constant('CODE_EXTENSION_PROBLEM')."&ext=mailid");
- } // END - if
+ // Is the extension active?
+ REDIRECT_ON_UNINSTALLED_EXTENSION("mailid");
// Init
$url_uid = 0; $url_bid = 0; $url_mid = 0;
case "BONUS":
// Is the bonus extension active?
- if (!EXT_IS_ACTIVE("bonus")) {
- // Abort here
- LOAD_URL("modules.php?module=index&msg=".constant('CODE_EXTENSION_PROBLEM')."&ext=mailid");
- } // END - if
+ REDIRECT_ON_UNINSTALLED_EXTENSION("bonus");
// Bonus-Mails
$result = SQL_QUERY_ESC("SELECT id, url, subject FROM `{!_MYSQL_PREFIX!}_bonus` WHERE id=%s LIMIT 1",
define('_TEMPLATE_BANNER', LOAD_TEMPLATE("mailid_banner", true));
// Only when user extension = v0.1.2: Update mails-confirmed counter
+ // @TODO Rewrite these blocks to filter
if (GET_EXT_VERSION("user") >= "0.1.2") {
// Update counter
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET mails_confirmed=mails_confirmed + 1 WHERE userid=%s LIMIT 1",
break;
case "confirm":
- if ($code > 0)
- {
+ 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', $DATA);
define('_TEMPLATE_BANNER', LOAD_TEMPLATE("mailid_banner", true));
- if (getConfig('code_length') > 0)
- {
+ if (getConfig('code_length') > 0) {
// Generate Code
define('_IMAGE_CODE', IMG_CODE($code, $type, $DATA, $url_uid));
$templ = "mailid_enter_code";
- }
- else
- {
+ } else {
// Disabled code
define('__GFX_CODE', $img_code);
$templ = "mailid_confirm_buttom";
// Load template
LOAD_TEMPLATE("mailid_timer");
break;
- }
+ } // END - switch
}
- else LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">".MAIL_ALREADY_CONFIRMED." (6)</div>");
+ else 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>");
+ else 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>");
+ else 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
case "mem_only":
case "done":
// Does the module exists on local file system?
- if ((FILE_READABLE(__MODULE)) && (getTotalFatalErrors() == 0)) {
+ if ((FILE_READABLE(constant('__MODULE'))) && (getTotalFatalErrors() == 0)) {
// Module is valid, active and located on the local disc...
$MOD_VALID = true;
} elseif (!empty($URL)) {
break;
case "locked":
- if (!FILE_READABLE(__MODULE)) {
+ if (!FILE_READABLE(constant('__MODULE'))) {
// Module does addionally not exists
addFatalMessage(LANG_MOD_REG_404_1.$GLOBALS['module'].LANG_MOD_REG_404_2);
} // END - if
// Add fatal message
- addFatalMessage(LANG_MOD_LOCKED_1.$GLOBALS['module'].LANG_MOD_LOCKED_2);
+ addFatalMessage(LANG_MOD_REG_LOCKED_1.$GLOBALS['module'].LANG_MOD_REG_LOCKED_2);
break;
default:
DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown status %s return from module check. Module=%s", $check, $GLOBALS['module']));
- addFatalMessage(LANG_MOD_UNKNOWN_1.$check.LANG_MOD_UNKNOWN_2);
+ addFatalMessage(LANG_MOD_REG_UNKNOWN_1.$check.LANG_MOD_REG_UNKNOWN_2);
break;
}
} elseif (getTotalFatalErrors() == 0) {
/////////////////////////////////////////////
//
// Everything is okay so we can load the module
- LOAD_INC_ONCE(__MODULE);
+ LOAD_INC_ONCE(constant('__MODULE'));
} // END - if
// Next-to-end add the footer
switch (getConfig('refid_target'))
{
case "register":
- $URL = "modules.php?module=index&what=register&refid=";
+ $URL = "modules.php?module=index&what=register&refid=";
break;
case "index":
require("inc/config.php");
// Is the "bonus" extension active?
-if (!EXT_IS_ACTIVE("bonus")) {
- // Redirect to index
- LOAD_URL("modules.php?module=index&msg=".constant('CODE_EXTENSION_PROBLEM')."&ext=bonus");
-} // END - if
+REDIRECT_ON_UNINSTALLED_EXTENSION("bonus");
// List only rankings when script is installed
if (isBooleanConstantAndTrue('mxchange_installed')) {
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>");
+ define('__BONUS_MSG', "<span class=\"guest_failed\">{--BONUS_SHOW_NO_DATA--}</span>");
}
// Free memory
SQL_FREERESULT($result);
} else {
// Wrong type entered
- define('__BONUS_MSG', "<span class=\"guest_failed\">".BONUS_SHOW_WRONG_TYPE."</span>");
+ define('__BONUS_MSG', "<span class=\"guest_failed\">{--BONUS_SHOW_WRONG_TYPE--}</span>");
}
} else {
// Wrong call!
- define('__BONUS_MSG', "<span class=\"guest_failed\">".BONUS_SHOW_WRONG_CALL."</span>");
+ define('__BONUS_MSG', "<span class=\"guest_failed\">{--BONUS_SHOW_WRONG_CALL--}</span>");
}
// Load send_bonus header template (for your banners, e.g.?)
// Is the script installed?
if (isBooleanConstantAndTrue('mxchange_installed')) {
// Base URL for redirection
- $URL = "modules.php?module=index&what=sponsor_login&hash=";
+ $URL = "modules.php?module=index&what=sponsor_login&hash=";
if (empty($_GET['hash'])) {
// No refid and we add our refid (don't forget to set $def_refid!)
$URL = "modules.php?module=index";
require("inc/config.php");
// Redirect only to registration page when this script is installed
-if (defined('mxchange_installed') && (isBooleanConstantAndTrue(mxchange_installed))) {
+if (isBooleanConstantAndTrue('mxchange_installed')) {
// 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;
// Is the script installed?
if (isBooleanConstantAndTrue('mxchange_installed')) {
// Only logged in users may use this surfbar!
- if (!EXT_IS_ACTIVE("surfbar")) {
- // Surfbar deactivated
- LOAD_URL("modules.php?module=login&msg=".constant('CODE_EXTENSION_PROBLEM')."&ext=surfbar");
- } elseif (!IS_MEMBER()) {
+ 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");
- }
+ } // END - if
// Handle tasks on self-maintenance
SURFBAR_HANDLE_SELF_MAINTENANCE();
array(bigintval($_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
LOAD_URL (URL."/index.php");
}
-// // END - if
+// END - if
?>