define('SERVER_URL', "http://www.mxchange.org");
// This current patch level
-define('CURR_SVN_REVISION', "369");
+define('CURR_SVN_REVISION', "370");
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
if (function_exists('mysql_real_escape_string')) {
// The new and improved version
+ //* DEBUG: */ echo __FUNCTION__.":str={$str}<br />\n";
return mysql_real_escape_string($str, $link);
} elseif (function_exists('mysql_escape_string')) {
// The obsulete function
{
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus MODIFY data_type ENUM('NEW','QUEUE','SEND') NOT NULL DEFAULT 'NEW'";
}
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='setup' AND what='config_autopurge' LIMIT 1";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='user' AND what='list_autopurge' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what IN('config_autopurge','list_autopurge') LIMIT 2";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data DROP ap_notified";
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='main' AND what='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='Y', locked='Y' WHERE action='main' AND what='bonus' LIMIT 1";
+ $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='Y' WHERE what='bonus' LIMIT 1";
$SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='Y', 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.3": // SQL queries for v0.2.3
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE action='main' AND 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 VALUES (NULL,'main','bonus','Aktiv-Rallye',7,'Y','Y','', 0)";
// Update notes (these will be set as task text!)
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='main' AND 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='Y', locked='Y' WHERE action='main' AND what='holiday' LIMIT 1";
+ $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='Y' WHERE what='holiday' LIMIT 1";
break;
case "update": // Update an extension
$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 action='main' AND 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 action='main' AND 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='Y', locked='Y' WHERE action='main' AND what='html_mail' LIMIT 1";
+ $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='Y' WHERE what='html_mail' LIMIT 1";
break;
case "update": // Update an extension
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='main' AND 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='Y', locked='Y' WHERE action='main' AND what='nickname' LIMIT 1";
+ $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='Y' WHERE what='nickname' 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."_online";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='misc', what='usr_online' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='usr_online' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
break;
case "0.4.8": // SQL queries for v0.4.8
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='Mailbuchung' WHERE action='setup' AND 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.";
$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 action='main' AND what='payout' LIMIT 1";
+ $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 action='main' AND 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='Y', locked='Y' WHERE action='main' AND what='payout' LIMIT 1";
+ $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='Y' WHERE what='payout' LIMIT 1";
break;
case "update": // Update an 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 action='main' AND what='primera' LIMIT 1";
+ $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 action='main' AND 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='Y', locked='Y' WHERE action='main' AND what='primera' LIMIT 1";
+ $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='Y' WHERE what='primera' 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='setup' AND 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
$SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_salts`";
$SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_surfbar_stats`";
$SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE `action`='surfbar' LIMIT 5";
- $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='surfbar' LIMIT 6";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE `action`='surfbar' LIMIT 6";
break;
case "activate": // Do stuff when admin activates this extension
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='main' AND what='wernis' 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."_member_menu SET visible='Y', locked='Y' WHERE action='main' AND what='wernis' LIMIT 1";
+ $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='Y' WHERE what='wernis' LIMIT 1";
break;
case "update": // Update an extension
// Clear output buffer for later output
ob_end_clean();
+ // Extension "rewrite" installed?
if ((EXT_IS_ACTIVE("rewrite", true)) && (function_exists('REWRITE_LINKS')) && ($CSS != "1") && ($CSS != "-1")) {
$OUTPUT = REWRITE_LINKS($OUTPUT);
- }
+ } // END - if
// Compile and run finished rendered HTML code
while (strpos($OUTPUT, '{!') > 0) {
$eval = "\$newContent = \"".COMPILE_CODE(addslashes($OUTPUT))."\";";
@eval($eval);
+ // Was that eval okay?
if (empty($newContent)) {
// Something went wrong!
die("Evaluation error:<pre>".htmlentities($eval)."</pre>");
- }
+ } // END - if
$OUTPUT = $newContent;
- }
+ } // END - while
// Output code here, DO NOT REMOVE! ;-)
OUTPUT_RAW($OUTPUT);
// Rewrite links when rewrite extension is active
if ((EXT_IS_ACTIVE("rewrite", true)) && (function_exists('REWRITE_LINKS')) && ($CSS != "1") && ($CSS != "-1")) {
$OUTPUT = REWRITE_LINKS($OUTPUT);
- }
+ } // END - if
// Compile and run finished rendered HTML code
while (strpos($OUTPUT, '{!') > 0) {
$eval = "\$OUTPUT = \"".COMPILE_CODE(addslashes($OUTPUT))."\";";
eval($eval);
- }
+ } // END - while
// Output code here, DO NOT REMOVE! ;-)
OUTPUT_RAW($OUTPUT);
// Output the raw HTML code
function OUTPUT_RAW ($HTML) {
// Output stripped HTML code to avoid broken JavaScript code, etc.
- echo stripslashes($HTML);
+ echo stripslashes(stripslashes($HTML));
// Flush the output if only _OB_CACHING is not "on"
if (_OB_CACHING != "on") {
// Flush it
flush();
- }
+ } // END - if
}
// Add a fatal error message to the queue array
$DATA = array(
'hash' => $hash,
'uid' => $userid,
- 'gender' => $gender,
+ 'gender' => $gender,
'surname' => SQL_ESCAPE($_POST['surname']),
'family' => SQL_ESCAPE($_POST['family_name']),
'email' => SQL_ESCAPE($_POST['addy']),
// Shall I display the refid or shall I make it editable?
if ($_CONFIG['display_refid'] == "Y") {
// Load template to enter it
- define('REFID_CONTENT', LOAD_TEMPLATE("guest_register_refid", true, $GLOBALS['refid']));
+ define('REFID_CONTENT', LOAD_TEMPLATE("guest_register_refid_hide", true, $GLOBALS['refid']));
} else {
// Load "hide" form template
- define('REFID_CONTENT', LOAD_TEMPLATE("guest_register_refid_hide", true, $GLOBALS['refid']));
+ define('REFID_CONTENT', LOAD_TEMPLATE("guest_register_refid", true, $GLOBALS['refid']));
}
// You may want to modify the register_header.tpl.xx file and not this script when you add your scripts etc. :-)