@error_reporting(0);
// CFG: REGISTER-GLOBALS
-@import_request_variables('');
+@import_request_variables("");
// CFG: SITE-KEY
define('SITE_KEY', "gg42ny8-4yng23498-mf423igum-mtu248utn42-mf4839gun43");
fwrite($fp, "Module=".$GLOBALS['module']."\n");
$OK = true;
}
- fwrite($fp, $F."(LINE=".$L."|NUM=".SQL_NUMROWS($result)."|AFFECTED=".SQL_AFFECTEDROWS()."): ".str_replace('\r', '', str_replace('\n', " ", $sql_string))."\n");
+ fwrite($fp, $F."(LINE=".$L."|NUM=".SQL_NUMROWS($result)."|AFFECTED=".SQL_AFFECTEDROWS()."): ".str_replace('\r', "", str_replace('\n', " ", $sql_string))."\n");
fclose($fp);
}
// Shall we remove numerical data here automatically?
if ($remove_numerical)
{
- // So let's remove all numerical elements to save memory!
+ // So let's remove all numerical elements to save memory!
$max = count($row);
for ($idx = 0; $idx < ($max / 2); $idx++)
{
// Debugging
//
//$fp = fopen(PATH."escape_debug.log", 'a') or mxchange_die("Cannot write debug.log!");
- //fwrite($fp, $file."(".$line."): ".str_replace('\r', '', str_replace('\n', " ", $eval))."\n");
+ //fwrite($fp, $file."(".$line."): ".str_replace('\r', "", str_replace('\n', " ", $eval))."\n");
//fclose($fp);
eval($eval);
if ($run)
************************************************************************/
// Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
+if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Get total points of the doubler itself
$DOUBLER_POINTS = DOUBLER_GET_TOTAL_POINTS_LEFT();
-if ($DOUBLER_POINTS == 0)
-{
+if ($DOUBLER_POINTS == 0) {
// Exit here to prevent some SQL errors (SQL_QUERY_ESC doen't insert zeros! We need to fix this...)
return;
}
if (($user > 0) && ($user >= $points) && (!$OK) && ($_CONFIG['doubler_uid'] > 0) && ($uid != $_CONFIG['doubler_uid']))
{
// Add points to used points
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET used_points=used_points+%s WHERE userid='' LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET used_points=used_points+%s WHERE userid='%d' LIMIT 1",
array($points, $_CONFIG['doubler_uid']), __FILE__, __LINE__);
// Update mediadata as well
foreach ($EXT_VER_HISTORY as $EXT_VER)
{
require($file);
- if (((GET_EXT_VERSION("sql_patches") != "") && ($_CONFIG['verbose_sql'] == 'Y')) || (!EXT_IS_ACTIVE("sql_patches")))
+ if (((GET_EXT_VERSION("sql_patches") != '') && ($_CONFIG['verbose_sql'] == 'Y')) || (!EXT_IS_ACTIVE("sql_patches")))
{
if (!empty($UPDATE_NOTES))
{
case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
// SQL commands to run
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu VALUES (NULL,'email','send_bonus','Bonusmail senden',5,'Versenden Sie hier Bonus-Mails an alle Mitglieder oder nur an alle aus einer Kategorie. Es spielt keine Rolle, wie viele Mails bereits versendet worden, Sie können hier immer senden.')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu VALUES (NULL,'main','bonus','Bonuspunkte',7,'Y','Y','',0)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu VALUES (NULL,'main','bonus','Bonuspunkte',7,'Y','Y', '', 0)";
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus";
$SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_bonus (
id bigint(20) NOT NULL auto_increment,
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[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu VALUES (NULL,'main','bonus','Aktiv-Rallye',7,'Y','Y','',0)";
+ $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!)
$UPDATE_NOTES = "Aktiv-Rallye mit Klick-Vergütung hinzugefügt.";
}
// Version number
-$EXT_VERSION = "0.1.8";
+$EXT_VERSION = "0.1.9";
// Auto-set extension version
if (empty($EXT_VER)) $EXT_VER = $EXT_VERSION;
// Version history array (add more with , "0.1" and so on)
-$EXT_VER_HISTORY = array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8");
+$EXT_VER_HISTORY = array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9");
switch ($EXT_LOAD_MODE)
{
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Die sonstigen Einstellungen lassen sich nun nur noch ändern, wenn die Erweiterung <strong>other</strong> auch installiert ist. Anderfalls gibt es einen SQL-Fehler beim Speichern und GROSS_GESCHRIEBENE Worte im Formular.";
break;
+
+ case "0.1.9": // SQL queries for v0.1.9
+ $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mailid_error_redirect ENUM('index', 'reject') NOT NULL DEFAULT 'index'";
+
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "Bei fehlerhafter Mail während der Bestätigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden.";
+ break;
}
break;
default: // Do stuff when extension is loaded
$dummy = LOAD_CONFIG();
- $_CONFIG['max_comma'] = $dummy['max_comma']; // Maximum numbers behind commata
- $_CONFIG['reject_url'] = $dummy['reject_url']; // Default rejection URL
+ $_CONFIG['max_comma'] = $dummy['max_comma']; // Maximum numbers behind commata
+ $_CONFIG['reject_url'] = $dummy['reject_url']; // Default rejection URL
+ $_CONFIG['mailid_error_redirect'] = $dummy['mailid_error_redirect']; // Default rejection URL
define('__CURRENCY', $dummy['currency']); // This is the currency for fees! They shall normally remain in real money currencies...
unset($dummy);
break;
$dummy = LOAD_CONFIG();
// When the sql_patches is not installed we cannot load it's configuration... *sigh*
- if (GET_EXT_VERSION("sql_patches") != "") {
+ if (GET_EXT_VERSION("sql_patches") != '') {
$_CONFIG['ext_autopurge'] = $dummy['ext_autopurge'];
$_CONFIG['mails_page'] = $dummy['mails_page'];
$_CONFIG['index_home'] = $dummy['index_home'];
}
// Shall we display the parsing time and number of queries?
- if ((isset($_CONFIG['show_timings'])) && ($_CONFIG['show_timings'] == "Y")) {
+ if ((isset($_CONFIG['show_timings'])) && ($_CONFIG['show_timings'] == 'Y')) {
// Then display it here
DISPLAY_PARSING_TIME_FOOTER();
}
// Vertical align is given
if (!empty($VALIGN)) $OUT .= " valign=\"".$VALIGN."\"";
- $OUT .= ">
-<TR>
- <TD";
+ $OUT .= ">\n<TR>\n<TD";
if (!empty($ALIGN)) $OUT .=" align=\"".$ALIGN."\"";
$OUT .= " class=\"".$CLASS."\">";
- OUTPUT_HTML($OUT);
+ OUTPUT_HTML($OUT);
}
// Close a table (you may want to add some footer stuff here)
function CLOSE_TABLE($ADD="") {
- OUTPUT_HTML(" </TD>
-</TR>");
+ OUTPUT_HTML(" </TD>\n</TR>");
if (!empty($ADD)) OUTPUT_HTML($ADD);
OUTPUT_HTML("</TABLE>");
}
}
// Compile and run finished rendered HTML code
- while (strpos($OUTPUT, "{!") > 0) {
+ while (strpos($OUTPUT, '{!') > 0) {
$eval = "\$OUTPUT = \"" . COMPILE_CODE(addslashes($OUTPUT)) . "\";";
- @eval($eval);
+ eval($eval);
}
// Output code here, DO NOT REMOVE! ;-)
}
// Compile and run finished rendered HTML code
- while (strpos($OUTPUT, "{!") > 0) {
+ while (strpos($OUTPUT, '{!') > 0) {
$eval = "\$OUTPUT = \"" . COMPILE_CODE(addslashes($OUTPUT)) . "\";";
- @eval($eval);
+ eval($eval);
}
// Output code here, DO NOT REMOVE! ;-)
}
// Add a fatal error message to the queue array
-function ADD_FATAL ($message, $extra="")
-{
+function ADD_FATAL ($message, $extra="") {
global $FATAL;
if (empty($extra)) {
// Regular text message to add to $FATAL
$tmpl_file = implode("", file($file));
// Replace ' to our own chars to preventing them being quoted
- while (strpos($tmpl_file, "\'") !== false) { $tmpl_file = str_replace("\'", "{QUOT}", $tmpl_file); }
+ while (strpos($tmpl_file, "\'") !== false) { $tmpl_file = str_replace("\'", '{QUOT}', $tmpl_file); }
// Do we have to compile the code?
if ((strpos($tmpl_file, "\$") !== false) || (strpos($tmpl_file, '{--') !== false) || (strpos($tmpl_file, '--}') > 0)) {
// Okay, compile it!
- $tmpl_file = "\$ret=\"".COMPILE_CODE(addslashes($tmpl_file))."\";";
+ $tmpl_file = "\$ret=\"" . COMPILE_CODE(addslashes($tmpl_file)) . "\";";
eval($tmpl_file);
} else {
// Simply return loaded code
// Send mail out to an email address
function SEND_EMAIL($TO, $SUBJECT, $MSG, $HTML='N', $FROM="") {
// Compile subject line (for POINTS constant etc.)
- $eval = "\$SUBJECT = \"".COMPILE_CODE(addslashes($SUBJECT))."\";";
+ $eval = "\$SUBJECT = \"" . COMPILE_CODE(addslashes($SUBJECT)) . "\";";
eval($eval);
$SUBJECT = html_entity_decode($SUBJECT);
if ($constants) {
// BEFORE 0.2.1 : Language and data constants
// WITH 0.2.1+ : Only language constants
- $code = str_replace("{--", '".', str_replace("--}", '."', $code));
+ $code = str_replace('{--', '".', str_replace('--}', '."', $code));
// BEFORE 0.2.1 : Not used
// WITH 0.2.1+ : Data constants
- $code = str_replace("{!", '".', str_replace("!}", '."', $code));
+ $code = str_replace('{!', '".', str_replace("!}", '."', $code));
}
// Compile QUOT and other non-HTML codes
}
// But shall I keep simple quotes for later use?
- if ($simple) $code = str_replace("\'", "{QUOT}", $code);
+ if ($simple) $code = str_replace("\'", '{QUOT}', $code);
// Find $content[bla][blub] entries
@preg_match_all('/\$(content|DATA)((\[([a-zA-Z0-9-_]+)\])*)/', $code, $matches);
$OUT .= " <OPTION value=\"Y\"";
if ($DEFAULT == 'Y') $OUT .= " selected=\"selected\"";
$OUT .= ">".YES."</OPTION>
- <OPTION value=\"N\"";
+ <OPTION value=\"N\"";
if ($DEFAULT == 'N') $OUT .= " selected=\"selected\"";
$OUT .= ">".NO."</OPTION>\n";
break;
if ($len == 0) $len = 10;
// Cut off requested counts of number
- $return = substr(str_replace('.', '', $rcode), 0, $len);
+ $return = substr(str_replace('.', "", $rcode), 0, $len);
// Done building code
return $return;
if ((!empty($_GET['refid'])) && (strpos($URL, "refid=") == 0)) {
// Cookie found in URL
$ADD .= $BIND."refid=".bigintval($_GET['refid']);
- } elseif ((GET_EXT_VERSION("sql_patches") != "") && ($_CONFIG['def_refid'] > 0)) {
+ } elseif ((GET_EXT_VERSION("sql_patches") != '') && ($_CONFIG['def_refid'] > 0)) {
// Not found! So let's set default here
$ADD .= $BIND."refid=".$_CONFIG['def_refid'];
}
//* DEBUG: */ echo "UNSET:".$var."=".get_session($var)."<br />\n";
unset($_SESSION[$var]);
return session_unregister($var);
- } elseif (("".$value."" != "") && (!isSessionVariableSet($var))) {
+ } elseif (("".$value."" != '') && (!isSessionVariableSet($var))) {
// Set session
//* DEBUG: */ echo "SET:".$var."=".$value."<br />\n";
$_SESSION[$var] = $value;
//* DEBUG: */ unlink($file);
//* DEBUG: */ $test = hexdec(get_session('u_hash')) / hexdec($secretKey);
- //* DEBUG: */ $test = generateHash(str_replace('.', '', $test));
+ //* DEBUG: */ $test = generateHash(str_replace('.', "", $test));
//* DEBUG: */ die("Secret-Key: ".$secretKey."<br>Cookie: ".get_session('u_hash')."<br>Test: ".$test);
// Write $file_hash to database
}
}
}
- if ((sizeof($FATAL) > 0) || ($FATAL[0] != ""))
+ if ((sizeof($FATAL) > 0) || ($FATAL[0] != ''))
{
$OUT = "";
foreach ($FATAL as $value)
define('PATCH_LISTED', "Anbei eine Liste der noetigen Dateien:");
define('NO_PATCHES_APPLIED', "Keine Patches wurden ausgeführt!");
define('LOAD_URL_ERROR_1', "Konnte nicht weiterleiten, da bereits Kopfinformationen gesendet wurden! <A href=\"");
-define('LOAD_URL_ERROR_2', "\">Bitte klicken Sie hier</A>, um zur URL zu kommen.<br />
-<br />
-Danke.");
+define('LOAD_URL_ERROR_2', "\">Bitte klicken Sie hier</A>, um zur URL zu kommen.<br />\n<br />\nDanke.");
define('GUEST_STATS', "Statistiken unseres {!MT_WORD2!}");
define('GUEST_STATS_MONTHLY', "Mitgliederverteilung auf Kalendermonate");
define('GUEST_STATS_CATS', "Mitgliederverteilung auf Mail-Kategorien");
<br />
Beispiele:
<UL>
- <LI><strong>1</strong> : Sendet nur an Mitglieder, deren Postleitzahl mit 1 anfängt.</LI>
- <LI><strong>12</strong> : Sendet nur an Mitglieder, deren Postleitzahl mit 12 anfängt.</LI>
- <LI><strong>123</strong> : Sendet nur an Mitglieder, deren Postleitzahl mit 123 anfängt.</LI>
+ <LI><strong>1</strong> : Sendet nur an Mitglieder, deren Postleitzahl mit 1 anfängt.</LI>
+ <LI><strong>12</strong> : Sendet nur an Mitglieder, deren Postleitzahl mit 12 anfängt.</LI>
+ <LI><strong>123</strong> : Sendet nur an Mitglieder, deren Postleitzahl mit 123 anfängt.</LI>
</UL>
<br />
Oder geben Sie nichts ein, wenn Sie diese Option nicht wünschen.");
define('ADMIN_USER_CONTACTED', "Das Mitglied wurde per EMail kontaktiert.");
define('ADMIN_CONTACT_USER_SUBJECT', "Nachricht vom {!MT_WORD!} {!MAIN_TITLE!}");
define('MEMBER_CANNOT_LOAD_PROFILE', "Fehler beim Laden des Mitgliederprofiles. Bitte Support benachrichten.");
-define('FOOTER_STATS_RUNTIME', "Laufzeit:");
-define('FOOTER_STATS_SQL_QUERIES', "SQL-Abfragen:");
-define('FOOTER_STATS_NUM_TEMPLATES', "Templates:");
-define('FOOTER_STATS_SECS', "Sek.");
-define('ADMIN_OPTION_FOOTER_STATS', "Skript-Statistiken im Seitenfuss einblenden (nützlich zum Debuggen)");
+define('SHOW_TIMINGS_RUNTIME', "Laufzeit:");
+define('SHOW_TIMINGS_SQL_QUERIES', "SQL-Abfragen:");
+define('SHOW_TIMINGS_NUM_TEMPLATES', "Templates:");
+define('SHOW_TIMINGS_SECS', "Sek.");
+define('ADMIN_OPTION_SHOW_TIMINGS', "Skript-Statistiken im Seitenfuss einblenden (nützlich zum Debuggen)");
+define('ADMIN_OPTION_MAILID_REDIRECT', "Soll bei fehlerhafter/gelöschter Mailbuchung beim Bestätigen die Mail auf die Hauptseite oder Ablehnungsseite weitergleitet werden?");
+define('ADMIN_CONFIG_MAILID_REDIRECT_INDEX', "Auf Hauptseite weiterleiten.");
+define('ADMIN_CONFIG_MAILID_REDIRECT_REJECT', "Auf Ablehnungsseite umleiten.");
//
?>
global $SEC_CHARS;
// Compile constants
- $code = str_replace("{--", '".', str_replace("--}", '."', $code));
+ $code = str_replace('{--', '".', str_replace('--}', '."', $code));
// Compile QUOT and other non-HTML codes
foreach ($SEC_CHARS['to'] as $k=>$from)
}
// But keep simple quotes for later use
- if ($simple) $code = str_replace("'", "{QUOT}", $code);
+ if ($simple) $code = str_replace("'", '{QUOT}', $code);
// Return compiled code
return $code;
{
// The local file does exists so we load it. :)
$tmpl_file = implode("", file($file));
- $tmpl_file = str_replace("'", "{QUOT}", $tmpl_file);
+ $tmpl_file = str_replace("'", '{QUOT}', $tmpl_file);
// Compile and run code
$ret = COMPILE_CODE(addslashes($tmpl_file), false, true);
if (($_POST['cat'][$id] == 'Y') || (($_CONFIG['register_default'] == 'Y') && (empty($_POST['cat'][$id]))))
{
- $content['def_y'] = " checked";
+ $content['def_y'] = ' checked';
}
else
{
- $content['def_n'] = " checked";
+ $content['def_n'] = ' checked';
}
// Load template and switch color
global $SEC_CHARS, $URL_CHARS;
$SEC_CHARS = array(
// The chars we are looking for...
- 'from' => array("{", "}", "/", ".", "'", "$", "(", ")", "{--", "--}", "%", ";", "[", "]", ":", "--"),
+ 'from' => array("{", "}", "/", ".", "'", "$", "(", ")", '{--', '--}', "%", ";", "[", "]", ":", "--"),
// ... and we will replace to.
'to' => array(
"{OPEN_ANCHOR2}",
"{CLOSE_ANCHOR2}",
"{SLASH}",
"{DOT}",
- "{QUOT}",
+ '{QUOT}',
"{DOLLAR}",
"{OPEN_ANCHOR}",
"{CLOSE_ANCHOR}",
$menuDesription[$menu] = $descr;
}
$OUT .= "<TR>
- <TD class=\"admin_menu\" colspan=\"2\">
- <NOBR> <STRONG>·</STRONG> ";
- if (($menu == $act) && (empty($wht)))
+ <TD class=\"admin_menu\" colspan=\"2\">
+ <NOBR> <STRONG>·</STRONG> ";
+ if (($menu == $act) && (empty($wht)))
{
$OUT .= "<STRONG>";
}
$OUT .= "[ <A href=\"".URL."/modules.php?module=admin&action=".$menu."\">";
}
$OUT .= $title;
- if (($menu == $act) && (empty($wht)))
+ if (($menu == $act) && (empty($wht)))
{
$OUT .= "</STRONG>";
}
$menuDesription = array();
$menuTitle = array(); $SUB = true;
$OUT .= "<TR>
- <TD width=\"10\" class=\"seperator\"> </TD>
- <TD class=\"admin_menu\">
- <TABLE border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"admin_menu_sub\">\n";
- while (list($wht_sub, $title_what, $desc_what) = SQL_FETCHROW($result_what))
+ <TD width=\"10\" class=\"seperator\"> </TD>
+ <TD class=\"admin_menu\">
+ <TABLE border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"admin_menu_sub\">\n";
+ while (list($wht_sub, $title_what, $desc_what) = SQL_FETCHROW($result_what))
{
// Filename
$INC = sprintf(PATH."inc/modules/admin/what-%s.php", $wht_sub);
$menuTitle[$wht_sub] = $title_what;
$menuDesription[$wht_sub] = $desc_what;
$OUT .= "<TR>
- <TD class=\"admin_menu\" colspan=\"2\">
- <NOBR> <STRONG>--></STRONG> ";
+ <TD class=\"admin_menu\" colspan=\"2\">
+ <NOBR> <STRONG>--></STRONG> ";
if ($readable)
{
if ($wht == $wht_sub)
// Free memory
SQL_FREERESULT($result_what);
$OUT .= " </TABLE>
- </TD>
+ </TD>
</TR>\n";
}
$OUT .= "<TR><TD height=\"7\" colspan=\"2\"></TD></TR>\n";
// Remeber options in constant
define('_MEMBER_SELECTION', $OUT);
- if (!$return)
- {
+ if (!$return) {
// Display selection box
define('__LANG_VALUE', GET_LANGUAGE());
}
}
//
-function ADMIN_MENU_SELECTION($MODE, $default="", $defid="")
-{
+function ADMIN_MENU_SELECTION($MODE, $default="", $defid="") {
$wht = "what != ''";
if ($MODE == "action") $wht = "what='' AND action !='login'";
$result = SQL_QUERY_ESC("SELECT %s, title FROM "._MYSQL_PREFIX."_admin_menu WHERE ".$wht." ORDER BY sort",
$OUT = "<SELECT name=\"".$MODE."_menu";
if ((!empty($defid)) || ($defid == "0")) $OUT .= "[".$defid."]";
$OUT .= "\" size=\"1\" class=\"admin_select\">
- <OPTION value=\"\">".SELECT_NONE."</OPTION>\n";
+ <OPTION value=\"\">".SELECT_NONE."</OPTION>\n";
while (list($menu, $title) = SQL_FETCHROW($result))
{
$OUT .= " <OPTION value=\"".$menu."\"";
$title = TASK_NO_TITLE;
// Shall I list SQL commands assigned to an extension installation or update task?
- if (((GET_EXT_VERSION("sql_patches") != "") && ($_CONFIG['verbose_sql'] == 'Y')) || (!EXT_IS_ACTIVE("sql_patches")))
+ if (((GET_EXT_VERSION("sql_patches") != '') && ($_CONFIG['verbose_sql'] == 'Y')) || (!EXT_IS_ACTIVE("sql_patches")))
{
$ext_name = substr($subj, 1, strpos($subj, ":") - 1);
if ($type == "EXTENSION")
ADD_DESCR("admin", basename(__FILE__));
// Do we edit/delete/change main menus or sub menus?
-$AND = "what=''"; $SUB = "";
+$AND = "what = ''"; $SUB = "";
if (!empty($_GET['sub']))
{
$AND = sprintf("action='%s'", SQL_ESCAPE($_GET['sub']));
// Add description as navigation point
ADD_DESCR("admin", basename(__FILE__));
-if (($_POST['ok'] != "") && ($_GET['admin'] != ""))
+if (($_POST['ok'] != '') && ($_GET['admin'] != ''))
{
// Send mail or message
if ((EXT_IS_ACTIVE("msg")) && ($_POST['type'] == "msg"))
// Mail / message dropped
LOAD_TEMPLATE("admin_settings_saved", false, ADMINS_ADMIN_CONTACTED);
}
- elseif ($_GET['admin'] != "")
+ elseif ($_GET['admin'] != '')
{
// Load contact form template
define('__ADMIN', $_GET['admin']);
// Setup constants for the template
switch ($_CONFIG['ap_inactive'])
{
- case 'Y': define('__YES_IN', " checked"); define('__NO_IN', ""); break;
- case 'N': define('__YES_IN', ""); define('__NO_IN', " checked"); break;
+ case 'Y': define('__YES_IN', ' checked'); define('__NO_IN', ""); break;
+ case 'N': define('__YES_IN', ""); define('__NO_IN', ' checked'); break;
}
switch ($_CONFIG['ap_unconfirmed'])
{
- case 'Y': define('__YES_UN', " checked"); define('__NO_UN', ""); break;
- case 'N': define('__YES_UN', ""); define('__NO_UN', " checked"); break;
+ case 'Y': define('__YES_UN', ' checked'); define('__NO_UN', ""); break;
+ case 'N': define('__YES_UN', ""); define('__NO_UN', ' checked'); break;
}
define('__AP_IN_SINCE', $_CONFIG['ap_in_since']);
define('__AP_IN_TIME' , $_CONFIG['ap_in_time']);
switch ($_CONFIG['admin_menu'])
{
case "NEW":
- define('__ADMIN_MENU_NEW', " checked");
+ define('__ADMIN_MENU_NEW', ' checked');
define('__ADMIN_MENU_OLD' , "");
break;
case "OLD":
define('__ADMIN_MENU_NEW', "");
- define('__ADMIN_MENU_OLD' , " checked");
+ define('__ADMIN_MENU_OLD' , ' checked');
break;
}
define('_CFG_AUTO_PURGE', CREATE_TIME_SELECTIONS($_CONFIG['auto_purge'], "auto_purge", "MWD"));
if ($_CONFIG['auto_purge_active'] == 'N')
{
- define('_CFG_AP_ACTIVE_N', " checked");
+ define('_CFG_AP_ACTIVE_N', ' checked');
define('_CFG_AP_ACTIVE_Y', "");
}
else
{
define('_CFG_AP_ACTIVE_N', "");
- define('_CFG_AP_ACTIVE_Y', " checked");
+ define('_CFG_AP_ACTIVE_Y', ' checked');
}
// Output template
switch ($_CONFIG['beg_rallye'])
{
case 'Y':
- define('__BEG_RALLYE_Y', " checked");
+ define('__BEG_RALLYE_Y', ' checked');
define('__BEG_RALLYE_N', "");
break;
case 'N':
define('__BEG_RALLYE_Y', "");
- define('__BEG_RALLYE_N', " checked");
+ define('__BEG_RALLYE_N', ' checked');
break;
}
switch ($_CONFIG['beg_active'])
{
case 'Y':
- define('__BEG_ACTIVE_Y', " checked");
+ define('__BEG_ACTIVE_Y', ' checked');
define('__BEG_ACTIVE_N', "");
break;
case 'N':
define('__BEG_ACTIVE_Y', "");
- define('__BEG_ACTIVE_N', " checked");
+ define('__BEG_ACTIVE_N', ' checked');
break;
}
switch ($_CONFIG['beg_mode'])
{
case "DIRECT":
- define('__BEG_MODE_DIRECT', " checked");
+ define('__BEG_MODE_DIRECT', ' checked');
define('__BEG_MODE_REF' , "");
break;
case "REF":
define('__BEG_MODE_DIRECT', "");
- define('__BEG_MODE_REF' , " checked");
+ define('__BEG_MODE_REF' , ' checked');
break;
}
switch ($_CONFIG['beg_ral_en_notify'])
{
case 'Y':
- define('__BEG_RAL_EN_NOTIFY_Y', " checked");
+ define('__BEG_RAL_EN_NOTIFY_Y', ' checked');
define('__BEG_RAL_EN_NOTIFY_N', "");
break;
case 'N':
define('__BEG_RAL_EN_NOTIFY_Y', "");
- define('__BEG_RAL_EN_NOTIFY_N', " checked");
+ define('__BEG_RAL_EN_NOTIFY_N', ' checked');
break;
}
switch ($_CONFIG['beg_ral_di_notify'])
{
case 'Y':
- define('__BEG_RAL_DI_NOTIFY_Y', " checked");
+ define('__BEG_RAL_DI_NOTIFY_Y', ' checked');
define('__BEG_RAL_DI_NOTIFY_N', "");
break;
case 'N':
define('__BEG_RAL_DI_NOTIFY_Y', "");
- define('__BEG_RAL_DI_NOTIFY_N', " checked");
+ define('__BEG_RAL_DI_NOTIFY_N', ' checked');
break;
}
switch ($_CONFIG['beg_new_mem_notify'])
{
case 'Y':
- define('__BEG_NEW_MEMBER_NOTIFY_Y', " checked");
+ define('__BEG_NEW_MEMBER_NOTIFY_Y', ' checked');
define('__BEG_NEW_MEMBER_NOTIFY_N', "");
break;
case 'N':
define('__BEG_NEW_MEMBER_NOTIFY_Y', "");
- define('__BEG_NEW_MEMBER_NOTIFY_N', " checked");
+ define('__BEG_NEW_MEMBER_NOTIFY_N', ' checked');
break;
}
switch ($_CONFIG['beg_include_own'])
{
case 'Y':
- define('__BEG_INCLUDE_OWN_Y', " checked");
+ define('__BEG_INCLUDE_OWN_Y', ' checked');
define('__BEG_INCLUDE_OWN_N', "");
break;
case 'N':
define('__BEG_INCLUDE_OWN_Y', "");
- define('__BEG_INCLUDE_OWN_N', " checked");
+ define('__BEG_INCLUDE_OWN_N', ' checked');
break;
}
switch ($_CONFIG['birthday_active'])
{
case 'Y':
- define('__BIRTHDAY_ACTIVE_Y', " checked");
+ define('__BIRTHDAY_ACTIVE_Y', ' checked');
define('__BIRTHDAY_ACTIVE_N', "");
break;
case 'N':
define('__BIRTHDAY_ACTIVE_Y', "");
- define('__BIRTHDAY_ACTIVE_N', " checked");
+ define('__BIRTHDAY_ACTIVE_N', ' checked');
break;
}
switch ($_CONFIG['birthday_mode'])
{
case "DIRECT":
- define('__BIRTHDAY_MODE_DIRECT', " checked");
+ define('__BIRTHDAY_MODE_DIRECT', ' checked');
define('__BIRTHDAY_MODE_REF' , "");
break;
case "REF":
define('__BIRTHDAY_MODE_DIRECT', "");
- define('__BIRTHDAY_MODE_REF' , " checked");
+ define('__BIRTHDAY_MODE_REF' , ' checked');
break;
}
switch ($_CONFIG['bonus_active'])
{
case 'Y':
- define('__BONUS_ACTIVE_Y', " checked");
+ define('__BONUS_ACTIVE_Y', ' checked');
define('__BONUS_ACTIVE_N', "");
break;
case 'N':
define('__BONUS_ACTIVE_Y', "");
- define('__BONUS_ACTIVE_N', " checked");
+ define('__BONUS_ACTIVE_N', ' checked');
break;
}
// Other bonus to de-/activate
switch ($_CONFIG['bonus_login_yn'])
{
case 'Y':
- define('__BONUS_LOGIN_Y', " checked");
+ define('__BONUS_LOGIN_Y', ' checked');
define('__BONUS_LOGIN_N', "");
break;
case 'N':
define('__BONUS_LOGIN_Y', "");
- define('__BONUS_LOGIN_N', " checked");
+ define('__BONUS_LOGIN_N', ' checked');
break;
}
switch ($_CONFIG['bonus_stats_yn'])
{
case 'Y':
- define('__BONUS_STATS_Y', " checked");
+ define('__BONUS_STATS_Y', ' checked');
define('__BONUS_STATS_N', "");
break;
case 'N':
define('__BONUS_STATS_Y', "");
- define('__BONUS_STATS_N', " checked");
+ define('__BONUS_STATS_N', ' checked');
break;
}
switch ($_CONFIG['bonus_order_yn'])
{
case 'Y':
- define('__BONUS_ORDER_Y', " checked");
+ define('__BONUS_ORDER_Y', ' checked');
define('__BONUS_ORDER_N', "");
break;
case 'N':
define('__BONUS_ORDER_Y', "");
- define('__BONUS_ORDER_N', " checked");
+ define('__BONUS_ORDER_N', ' checked');
break;
}
switch ($_CONFIG['bonus_ref_yn'])
{
case 'Y':
- define('__BONUS_REF_Y', " checked");
+ define('__BONUS_REF_Y', ' checked');
define('__BONUS_REF_N', "");
break;
case 'N':
define('__BONUS_REF_Y', "");
- define('__BONUS_REF_N', " checked");
+ define('__BONUS_REF_N', ' checked');
break;
}
switch ($_CONFIG['bonus_click_yn'])
{
case 'Y':
- define('__BONUS_CLICK_Y', " checked");
+ define('__BONUS_CLICK_Y', ' checked');
define('__BONUS_CLICK_N', "");
break;
case 'N':
define('__BONUS_CLICK_Y', "");
- define('__BONUS_CLICK_N', " checked");
+ define('__BONUS_CLICK_N', ' checked');
break;
}
switch ($_CONFIG['bonus_en_notify'])
{
case 'Y':
- define('__BONUS_EN_NOTIFY_Y', " checked");
+ define('__BONUS_EN_NOTIFY_Y', ' checked');
define('__BONUS_EN_NOTIFY_N', "");
break;
case 'N':
define('__BONUS_EN_NOTIFY_Y', "");
- define('__BONUS_EN_NOTIFY_N', " checked");
+ define('__BONUS_EN_NOTIFY_N', ' checked');
break;
}
switch ($_CONFIG['bonus_di_notify'])
{
case 'Y':
- define('__BONUS_DI_NOTIFY_Y', " checked");
+ define('__BONUS_DI_NOTIFY_Y', ' checked');
define('__BONUS_DI_NOTIFY_N', "");
break;
case 'N':
define('__BONUS_DI_NOTIFY_Y', "");
- define('__BONUS_DI_NOTIFY_N', " checked");
+ define('__BONUS_DI_NOTIFY_N', ' checked');
break;
}
switch ($_CONFIG['bonus_new_mem_notify'])
{
case 'Y':
- define('__BONUS_NEW_MEMBER_NOTIFY_Y', " checked");
+ define('__BONUS_NEW_MEMBER_NOTIFY_Y', ' checked');
define('__BONUS_NEW_MEMBER_NOTIFY_N', "");
break;
case 'N':
define('__BONUS_NEW_MEMBER_NOTIFY_Y', "");
- define('__BONUS_NEW_MEMBER_NOTIFY_N', " checked");
+ define('__BONUS_NEW_MEMBER_NOTIFY_N', ' checked');
break;
}
switch ($_CONFIG['bonus_include_own'])
{
case 'Y':
- define('__BONUS_INCLUDE_OWN_Y', " checked");
+ define('__BONUS_INCLUDE_OWN_Y', ' checked');
define('__BONUS_INCLUDE_OWN_N', "");
break;
case 'N':
define('__BONUS_INCLUDE_OWN_Y', "");
- define('__BONUS_INCLUDE_OWN_N', " checked");
+ define('__BONUS_INCLUDE_OWN_N', ' checked');
break;
}
// Prepare data
switch ($_CONFIG['cache_admins'])
{
- case 'Y': define('__ADMINS_Y', " checked"); define('__ADMINS_N', ""); break;
- case 'N': define('__ADMINS_Y', ""); define('__ADMINS_N', " checked"); break;
+ case 'Y': define('__ADMINS_Y', ' checked'); define('__ADMINS_N', ""); break;
+ case 'N': define('__ADMINS_Y', ""); define('__ADMINS_N', ' checked'); break;
}
switch ($_CONFIG['cache_acls'])
{
- case 'Y': define('__ACLS_Y', " checked"); define('__ACLS_N', ""); break;
- case 'N': define('__ACLS_Y', ""); define('__ACLS_N', " checked"); break;
+ case 'Y': define('__ACLS_Y', ' checked'); define('__ACLS_N', ""); break;
+ case 'N': define('__ACLS_Y', ""); define('__ACLS_N', ' checked'); break;
}
switch ($_CONFIG['cache_exts'])
{
- case 'Y': define('__EXTS_Y', " checked"); define('__EXTS_N', ""); break;
- case 'N': define('__EXTS_Y', ""); define('__EXTS_N', " checked"); break;
+ case 'Y': define('__EXTS_Y', ' checked'); define('__EXTS_N', ""); break;
+ case 'N': define('__EXTS_Y', ""); define('__EXTS_N', ' checked'); break;
}
switch ($_CONFIG['cache_config'])
{
- case 'Y': define('__CONFIG_Y', " checked"); define('__CONFIG_N', ""); break;
- case 'N': define('__CONFIG_Y', ""); define('__CONFIG_N', " checked"); break;
+ case 'Y': define('__CONFIG_Y', ' checked'); define('__CONFIG_N', ""); break;
+ case 'N': define('__CONFIG_Y', ""); define('__CONFIG_N', ' checked'); break;
}
switch ($_CONFIG['cache_modreg'])
{
- case 'Y': define('__MODREG_Y', " checked"); define('__MODREG_N', ""); break;
- case 'N': define('__MODREG_Y', ""); define('__MODREG_N', " checked"); break;
+ case 'Y': define('__MODREG_Y', ' checked'); define('__MODREG_N', ""); break;
+ case 'N': define('__MODREG_Y', ""); define('__MODREG_N', ' checked'); break;
}
switch ($_CONFIG['cache_refdepth'])
{
- case 'Y': define('__REFDEPTH_Y', " checked"); define('__REFDEPTH_N', ""); break;
- case 'N': define('__REFDEPTH_Y', ""); define('__REFDEPTH_N', " checked"); break;
+ case 'Y': define('__REFDEPTH_Y', ' checked'); define('__REFDEPTH_N', ""); break;
+ case 'N': define('__REFDEPTH_Y', ""); define('__REFDEPTH_N', ' checked'); break;
}
switch ($_CONFIG['cache_refsys'])
{
- case 'Y': define('__REFSYS_Y', " checked"); define('__REFSYS_N', ""); break;
- case 'N': define('__REFSYS_Y', ""); define('__REFSYS_N', " checked"); break;
+ case 'Y': define('__REFSYS_Y', ' checked'); define('__REFSYS_N', ""); break;
+ case 'N': define('__REFSYS_Y', ""); define('__REFSYS_N', ' checked'); break;
}
define('__PATH', $_CONFIG['cache_path']);
switch ($_CONFIG['doubler_jackpot'])
{
case 'Y':
- define('__DOUBLER_JACKPOT_Y', " checked");
+ define('__DOUBLER_JACKPOT_Y', ' checked');
define('__DOUBLER_JACKPOT_N', "");
break;
case 'N':
define('__DOUBLER_JACKPOT_Y', "");
- define('__DOUBLER_JACKPOT_N', " checked");
+ define('__DOUBLER_JACKPOT_N', ' checked');
break;
}
switch ($_CONFIG['doubler_own'])
{
case 'Y':
- define('__DOUBLER_OWN_Y', " checked");
+ define('__DOUBLER_OWN_Y', ' checked');
define('__DOUBLER_OWN_N', "");
break;
case 'N':
define('__DOUBLER_OWN_Y', "");
- define('__DOUBLER_OWN_N', " checked");
+ define('__DOUBLER_OWN_N', ' checked');
break;
}
switch ($_CONFIG['doubler_send_mode'])
{
case "DIRECT":
- define('__DOUBLER_SEND_DIRECT', " checked");
+ define('__DOUBLER_SEND_DIRECT', ' checked');
define('__DOUBLER_SEND_RESET' , "");
break;
case "RESET":
define('__DOUBLER_SEND_DIRECT', "");
- define('__DOUBLER_SEND_RESET' , " checked");
+ define('__DOUBLER_SEND_RESET' , ' checked');
break;
}
switch ($_CONFIG['doubler_sent_all'])
{
case 'Y':
- define('__DOUBLER_SENT_ALL_Y', " checked");
+ define('__DOUBLER_SENT_ALL_Y', ' checked');
define('__DOUBLER_SENT_ALL_N', "");
break;
case 'N':
define('__DOUBLER_SENT_ALL_Y', "");
- define('__DOUBLER_SENT_ALL_N', " checked");
+ define('__DOUBLER_SENT_ALL_N', ' checked');
break;
}
// Prepare data
switch ($_CONFIG['verbose_sql'])
{
- case 'Y': define('__VERBOSE_Y', " checked"); define('__VERBOSE_N', ""); break;
- case 'N': define('__VERBOSE_Y', ""); define('__VERBOSE_N', " checked"); break;
+ case 'Y': define('__VERBOSE_Y', ' checked'); define('__VERBOSE_N', ""); break;
+ case 'N': define('__VERBOSE_Y', ""); define('__VERBOSE_N', ' checked'); break;
}
// Load template
switch ($_CONFIG['holiday_mode'])
{
case "RESET":
- define('__RESET_DEFAULT' , " checked");
+ define('__RESET_DEFAULT' , ' checked');
define('__DIRECT_DEFAULT', "");
break;
case "DIRECT":
define('__RESET_DEFAULT' , "");
- define('__DIRECT_DEFAULT', " checked");
+ define('__DIRECT_DEFAULT', ' checked');
break;
}
switch ($_CONFIG['order_max'])
{
case "ORDER":
- define('__ORDER_DEFAULT', " checked");
+ define('__ORDER_DEFAULT', ' checked');
define('__MAX_DEFAULT' , "");
break;
case "MAX":
define('__ORDER_DEFAULT', "");
- define('__MAX_DEFAULT' , " checked");
+ define('__MAX_DEFAULT' , ' checked');
break;
}
if ($_CONFIG['test_text'] == 'N')
{
- define('_CFG_TEST_TEXT_N', " checked");
+ define('_CFG_TEST_TEXT_N', ' checked');
define('_CFG_TEST_TEXT_Y', "");
}
else
{
define('_CFG_TEST_TEXT_N', "");
- define('_CFG_TEST_TEXT_Y', " checked");
+ define('_CFG_TEST_TEXT_Y', ' checked');
}
if ($_CONFIG['test_subj'] == 'N')
{
- define('_CFG_TEST_SUBJ_N', " checked");
+ define('_CFG_TEST_SUBJ_N', ' checked');
define('_CFG_TEST_SUBJ_Y', "");
}
else
{
define('_CFG_TEST_SUBJ_N', "");
- define('_CFG_TEST_SUBJ_Y', " checked");
+ define('_CFG_TEST_SUBJ_Y', ' checked');
}
if ($_CONFIG['url_blacklist'] == 'N')
{
- define('_CFG_URL_BLIST_N', " checked");
+ define('_CFG_URL_BLIST_N', ' checked');
define('_CFG_URL_BLIST_Y', "");
}
else
{
define('_CFG_URL_BLIST_N', "");
- define('_CFG_URL_BLIST_Y', " checked");
+ define('_CFG_URL_BLIST_Y', ' checked');
}
if ($_CONFIG['order_multi_page'] == 'N')
{
- define('_CFG_ORDER_MULTI_N', " checked");
+ define('_CFG_ORDER_MULTI_N', ' checked');
define('_CFG_ORDER_MULTI_Y', "");
}
else
{
define('_CFG_ORDER_MULTI_N', "");
- define('_CFG_ORDER_MULTI_Y', " checked");
+ define('_CFG_ORDER_MULTI_Y', ' checked');
}
if ($_CONFIG['autosend_active'] == 'N')
{
- define('_CFG_AUTOSEND_ACTIVE_N', " checked");
+ define('_CFG_AUTOSEND_ACTIVE_N', ' checked');
define('_CFG_AUTOSEND_ACTIVE_Y', "");
}
else
{
define('_CFG_AUTOSEND_ACTIVE_N', "");
- define('_CFG_AUTOSEND_ACTIVE_Y', " checked");
+ define('_CFG_AUTOSEND_ACTIVE_Y', ' checked');
}
if ($_CONFIG['send_prof_update'] == 'N')
{
- define('_CFG_SEND_UPDATE_N', " checked");
+ define('_CFG_SEND_UPDATE_N', ' checked');
define('_CFG_SEND_UPDATE_Y', "");
}
else
{
define('_CFG_SEND_UPDATE_N', "");
- define('_CFG_SEND_UPDATE_Y', " checked");
+ define('_CFG_SEND_UPDATE_Y', ' checked');
}
if ($_CONFIG['admin_notify'] == 'N')
{
- define('_CFG_ADMIN_NOTIFY_N', " checked");
+ define('_CFG_ADMIN_NOTIFY_N', ' checked');
define('_CFG_ADMIN_NOTIFY_Y', "");
}
else
{
define('_CFG_ADMIN_NOTIFY_N', "");
- define('_CFG_ADMIN_NOTIFY_Y', " checked");
+ define('_CFG_ADMIN_NOTIFY_Y', ' checked');
}
if ($_CONFIG['css_php'] == "DIRECT")
{
- define('_CFG_CSS_PHP_DIRECT', " checked");
+ define('_CFG_CSS_PHP_DIRECT', ' checked');
define('_CFG_CSS_PHP_FILE', "");
}
else
{
define('_CFG_CSS_PHP_DIRECT', "");
- define('_CFG_CSS_PHP_FILE', " checked");
+ define('_CFG_CSS_PHP_FILE', ' checked');
}
if ($_CONFIG['guest_menu'] == 'Y') {
- define('_CFG_GUEST_MENU_ACTIVE', " checked");
+ define('_CFG_GUEST_MENU_ACTIVE', ' checked');
define('_CFG_GUEST_MENU_INACTIVE', "");
} else {
define('_CFG_GUEST_MENU_ACTIVE', "");
- define('_CFG_GUEST_MENU_INACTIVE', " checked");
+ define('_CFG_GUEST_MENU_INACTIVE', ' checked');
}
if ($_CONFIG['member_menu'] == 'Y') {
- define('_CFG_MEMBER_MENU_ACTIVE', " checked");
+ define('_CFG_MEMBER_MENU_ACTIVE', ' checked');
define('_CFG_MEMBER_MENU_INACTIVE', "");
} else {
define('_CFG_MEMBER_MENU_ACTIVE', "");
- define('_CFG_MEMBER_MENU_INACTIVE', " checked");
+ define('_CFG_MEMBER_MENU_INACTIVE', ' checked');
}
if ($_CONFIG['youre_here'] == 'Y') {
- define('_CFG_YOURE_HERE_ACTIVE', " checked");
+ define('_CFG_YOURE_HERE_ACTIVE', ' checked');
define('_CFG_YOURE_HERE_INACTIVE', "");
} else {
define('_CFG_YOURE_HERE_ACTIVE', "");
- define('_CFG_YOURE_HERE_INACTIVE', " checked");
+ define('_CFG_YOURE_HERE_INACTIVE', ' checked');
}
if ($_CONFIG['show_timings'] == 'Y') {
- define('_CFG_FOOTER_STATS_Y', " checked");
- define('_CFG_FOOTER_STATS_N', "");
+ define('_CFG_SHOW_TIMINGS_Y', ' checked');
+ define('_CFG_SHOW_TIMINGS_N', "");
} else {
- define('_CFG_FOOTER_STATS_Y', "");
- define('_CFG_FOOTER_STATS_N', " checked");
+ define('_CFG_SHOW_TIMINGS_Y', "");
+ define('_CFG_SHOW_TIMINGS_N', ' checked');
+ }
+ if ($_CONFIG['mailid_error_redirect'] == 'index') {
+ define('_CFG_MAILID_REDIRECT_INDEX', ' checked');
+ define('_CFG_MAILID_REDIRECT_REJECT', "");
+ } else {
+ define('_CFG_MAILID_REDIRECT_INDEX', "");
+ define('_CFG_MAILID_REDIRECT_REJECT', ' checked');
}
for ($i = 0; $i <= 5; $i++)
switch ($_CONFIG['allow_direct_pay'])
{
case 'Y':
- define('__DIRECT_Y', " checked");
+ define('__DIRECT_Y', ' checked');
define('__DIRECT_N', "");
break;
case 'N':
define('__DIRECT_Y', "");
- define('__DIRECT_N', " checked");
+ define('__DIRECT_N', ' checked');
break;
}
// One-time referral bonus add-mode
switch ($_CONFIG['reg_points_mode'])
{
- case "ref" : define('__MODE_REF', " checked"); define('__MODE_DIRECT', ""); break;
- case "direct": define('__MODE_REF', ""); define('__MODE_DIRECT', " checked"); break;
+ case "ref" : define('__MODE_REF', ' checked'); define('__MODE_DIRECT', ""); break;
+ case "direct": define('__MODE_REF', ""); define('__MODE_DIRECT', ' checked'); break;
}
// Referral payout value
if (ereg($mod, $_CONFIG['rewrite_skipped_mods']))
{
// Found
- $y = " checked";
+ $y = ' checked';
$n = "";
}
else
{
// Not found
$y = "";
- $n = " checked";
+ $n = ' checked';
}
// Remember data in array for the dynamic row template
ADD_DESCR("admin", basename(__FILE__));
// Do we edit/delete/change main menus or sub menus?
-$AND = "what=''"; $SUB = "";
+$AND = "what = ''"; $SUB = "";
if (!empty($_GET['sub']))
{
ADD_DESCR("admin", basename(__FILE__));
// Do we edit/delete/change main menus or sub menus?
-$AND = "what=''"; $SUB = "";
+$AND = "what = ''"; $SUB = "";
if (!empty($_GET['sub']))
{
// An act is done...
foreach ($_POST['sel'] as $sel=>$menu)
{
- $AND = "what=''";
+ $AND = "what = ''";
$sel = bigintval($sel);
if (!empty($SUB)) $AND = "action='".$SUB."'";
switch ($_POST['ok'])
global $link;
$ACTIONS = array();
-// First fix all main menus (what='')...
+// First fix all main menus (what="")...
$result_fix = SQL_QUERY("SELECT id, action FROM "._MYSQL_PREFIX."_admin_menu WHERE what='' AND action != 'logout' ORDER BY sort ASC", __FILE__, __LINE__);
$cnt = 0; $REP = 0;
while(list($id, $act) = SQL_FETCHROW($result_fix))
global $link;
$ACTIONs = array();
-// First fix all main menus (what='')...
+// First fix all main menus (what="")...
$result_fix = SQL_QUERY("SELECT id, action FROM "._MYSQL_PREFIX."_admin_menu WHERE what='' AND action != 'logout' ORDER BY sort ASC", __FILE__, __LINE__);
$cnt = 0; $REP = 0;
while(list($id, $act) = SQL_FETCHROW($result_fix))
ADD_DESCR("admin", basename(__FILE__));
$ACTIONS = array();
-// First fix all main menus (what='')...
+// First fix all main menus (what="")...
$result_fix = SQL_QUERY("SELECT id, action FROM "._MYSQL_PREFIX."_guest_menu WHERE what='' AND action != 'logout' ORDER BY sort ASC", __FILE__, __LINE__);
$cnt = 0; $REP = 0;
while(list($id, $act) = SQL_FETCHROW($result_fix))
ADD_DESCR("admin", basename(__FILE__));
$ACTIONS = array();
-// First fix all main menus (what='')...
+// First fix all main menus (what="")...
$result_fix = SQL_QUERY("SELECT id, action FROM "._MYSQL_PREFIX."_guest_menu WHERE what='' AND action != 'logout' ORDER BY sort ASC", __FILE__, __LINE__);
$cnt = 0; $REP = 0;
while(list($id, $act) = SQL_FETCHROW($result_fix))
ADD_DESCR("admin", basename(__FILE__));
$ACTIONS = array();
-// First fix all main menus (what='')...
+// First fix all main menus (what="")...
$result_fix = SQL_QUERY("SELECT id, action FROM "._MYSQL_PREFIX."_member_menu WHERE what='' AND action != 'logout' ORDER BY sort ASC", __FILE__, __LINE__);
$cnt = 0; $REP = 0;
while(list($id, $act) = SQL_FETCHROW($result_fix))
ADD_DESCR("admin", basename(__FILE__));
$ACTIONS = array();
-// First fix all main menus (what='')...
+// First fix all main menus (what="")...
$result_fix = SQL_QUERY("SELECT id, action FROM "._MYSQL_PREFIX."_member_menu WHERE what='' AND action != 'logout' ORDER BY sort ASC", __FILE__, __LINE__);
$cnt = 0; $REP = 0;
while(list($id, $act) = SQL_FETCHROW($result_fix))
// Is the nickname valid?
if (!$nick) {
// Nope, disable it
- if (GET_EXT_VERSION("sql_patches") != "") {
+ if (GET_EXT_VERSION("sql_patches") != '') {
// Use default refid
$GLOBALS['refid'] = $_CONFIG['def_refid'];
} else {
while (list($id, $cat) = SQL_FETCHROW($result))
{
// Default he has not joined
- $JOINED_N = " checked"; $JOINED_Y = "";
+ $JOINED_N = ' checked'; $JOINED_Y = "";
// Check category selection
$result_user = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_cats WHERE userid=%d AND cat_id=%d LIMIT 1",
// When we found an entry don't read it, just change the JOINED_x variables
if (isset($_POST['cat']))
{
- if ($_POST['cat'][$id] =='Y') { $JOINED_Y = " checked"; $JOINED_N = ""; }
+ if ($_POST['cat'][$id] =='Y') { $JOINED_Y = ' checked'; $JOINED_N = ""; }
}
else
{
if (SQL_NUMROWS($result_user) == 1)
{
- $JOINED_Y = " checked"; $JOINED_N = "";
+ $JOINED_Y = ' checked'; $JOINED_N = "";
}
// Free memory
if ($mode == 'Y')
{
- define('HTML_Y', " checked");
+ define('HTML_Y', ' checked');
define('HTML_N', "");
}
else
{
- define('HTML_N', " checked");
+ define('HTML_N', ' checked');
define('HTML_Y', "");
}
LOAD_TEMPLATE("member_html_mail_settings");
************************************************************************/
// Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
+if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
-}
- elseif (!IS_LOGGED_IN())
-{
+} elseif (!IS_LOGGED_IN()) {
LOAD_URL("modules.php?module=index");
-}
- elseif ((!EXT_IS_ACTIVE("transfer")) && (!IS_ADMIN()))
-{
+} elseif ((!EXT_IS_ACTIVE("transfer")) && (!IS_ADMIN())) {
ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "transfer");
return;
}
switch ($opt_in)
{
case 'Y':
- define('__TRANSFER_ALLOW_Y', " checked");
+ define('__TRANSFER_ALLOW_Y', ' checked');
define('__TRANSFER_ALLOW_N', "");
define('__TRANSFER_NEW_LINK', "<A href=\"".URL."/modules.php?module=login&what=transfer&mode=new\">".TRANSFER_NOW_LINK."</A>");
break;
case 'N':
define('__TRANSFER_ALLOW_Y', "");
- define('__TRANSFER_ALLOW_N', " checked");
+ define('__TRANSFER_ALLOW_N', ' checked');
define('__TRANSFER_NEW_LINK', TRANSFER_PLEASE_ALLOW_OPT_IN);
break;
}
* Holds the most recent mailer error message.
* @var string
*/
- var $ErrorInfo = '';
+ var $ErrorInfo = "";
/**
* Sets the From email address for the message.
* will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode.
* @var string
*/
- var $Sender = '';
+ var $Sender = "";
/**
* Sets the Subject of the message.
* @var string
*/
- var $Subject = '';
+ var $Subject = "";
/**
* Sets the Body of the message. This can be either an HTML or text body.
* If HTML then run IsHTML(true).
* @var string
*/
- var $Body = '';
+ var $Body = "";
/**
* Sets the text-only body of the message. This automatically sets the
* that can read HTML will view the normal Body.
* @var string
*/
- var $AltBody = '';
+ var $AltBody = "";
/**
* Sets word wrapping on the body of the message to a given number of
* is in a different directory than the PHP include path.
* @var string
*/
- var $PluginDir = '';
+ var $PluginDir = "";
/**
* Holds PHPMailer version.
* Sets the email address that a reading confirmation will be sent.
* @var string
*/
- var $ConfirmReadingTo = '';
+ var $ConfirmReadingTo = "";
/**
* Sets the hostname to use in Message-Id and Received headers
* by SERVER_NAME is used or 'localhost.localdomain'.
* @var string
*/
- var $Hostname = '';
+ var $Hostname = "";
/////////////////////////////////////////////////
// PROPERTIES FOR SMTP
* Sets the SMTP HELO of the message (Default is $Hostname).
* @var string
*/
- var $Helo = '';
+ var $Helo = "";
/**
* Sets connection prefix.
* Sets SMTP username.
* @var string
*/
- var $Username = '';
+ var $Username = "";
/**
* Sets SMTP password.
* @var string
*/
- var $Password = '';
+ var $Password = "";
/**
* Sets the SMTP server timeout in seconds. This function will not
var $ReplyTo = array();
var $attachment = array();
var $CustomHeader = array();
- var $message_type = '';
+ var $message_type = "";
var $boundary = array();
var $language = array();
var $error_count = 0;
* @param string $name
* @return void
*/
- function AddAddress($address, $name = '') {
+ function AddAddress($address, $name = "") {
$cur = count($this->to);
$this->to[$cur][0] = trim($address);
$this->to[$cur][1] = $name;
* @param string $name
* @return void
*/
- function AddCC($address, $name = '') {
+ function AddCC($address, $name = "") {
$cur = count($this->cc);
$this->cc[$cur][0] = trim($address);
$this->cc[$cur][1] = $name;
* @param string $name
* @return void
*/
- function AddBCC($address, $name = '') {
+ function AddBCC($address, $name = "") {
$cur = count($this->bcc);
$this->bcc[$cur][0] = trim($address);
$this->bcc[$cur][1] = $name;
* @param string $name
* @return void
*/
- function AddReplyTo($address, $name = '') {
+ function AddReplyTo($address, $name = "") {
$cur = count($this->ReplyTo);
$this->ReplyTo[$cur][0] = trim($address);
$this->ReplyTo[$cur][1] = $name;
* @return bool
*/
function Send() {
- $header = '';
- $body = '';
+ $header = "";
+ $body = "";
$result = true;
if((count($this->to) + count($this->cc) + count($this->bcc)) < 1) {
$header .= $this->CreateHeader();
$body = $this->CreateBody();
- if($body == '') {
+ if($body == "") {
return false;
}
*/
function MailSend($header, $body) {
- $to = '';
+ $to = "";
for($i = 0; $i < count($this->to); $i++) {
if($i != 0) { $to .= ', '; }
$to .= $this->AddrFormat($this->to[$i]);
*/
function SmtpSend($header, $body) {
include_once($this->PluginDir . 'class.smtp.php');
- $error = '';
+ $error = "";
$bad_rcpt = array();
if(!$this->SmtpConnect()) {
return false;
}
- $smtp_from = ($this->Sender == '') ? $this->From : $this->Sender;
+ $smtp_from = ($this->Sender == "") ? $this->From : $this->Sender;
if(!$this->smtp->Mail($smtp_from)) {
$error = $this->Lang('from_failed') . $smtp_from;
$this->SetError($error);
$port = $this->Port;
}
- if($this->smtp->Connect(((!empty($this->SMTPSecure))?$this->SMTPSecure.'://':'').$host, $port, $this->Timeout)) {
+ if($this->smtp->Connect(((!empty($this->SMTPSecure))?$this->SMTPSecure.'://':"").$host, $port, $this->Timeout)) {
if ($this->Helo != '') {
$this->smtp->Hello($this->Helo);
} else {
}
$line = explode($this->LE, $message);
- $message = '';
+ $message = "";
for ($i=0 ;$i < count($line); $i++) {
$line_part = explode(' ', $line[$i]);
- $buf = '';
+ $buf = "";
for ($e = 0; $e<count($line_part); $e++) {
$word = $line_part[$e];
if ($qp_mode and (strlen($word) > $length)) {
} else {
$message .= $buf . $soft_break;
}
- $buf = '';
+ $buf = "";
}
while (strlen($word) > 0) {
$len = $length;
* @return string
*/
function CreateHeader() {
- $result = '';
+ $result = "";
/* Set the boundaries */
$uniq_id = md5(uniqid(time()));
$this->boundary[2] = 'b2_' . $uniq_id;
$result .= $this->HeaderLine('Date', $this->RFCDate());
- if($this->Sender == '') {
+ if($this->Sender == "") {
$result .= $this->HeaderLine('Return-Path', trim($this->From));
} else {
$result .= $this->HeaderLine('Return-Path', trim($this->Sender));
* @return string
*/
function CreateBody() {
- $result = '';
+ $result = "";
$this->SetWordWrap();
switch($this->message_type) {
case 'alt':
- $result .= $this->GetBoundary($this->boundary[1], '', 'text/plain', '');
+ $result .= $this->GetBoundary($this->boundary[1], "", 'text/plain', "");
$result .= $this->EncodeString($this->AltBody, $this->Encoding);
$result .= $this->LE.$this->LE;
- $result .= $this->GetBoundary($this->boundary[1], '', 'text/html', '');
+ $result .= $this->GetBoundary($this->boundary[1], "", 'text/html', "");
$result .= $this->EncodeString($this->Body, $this->Encoding);
$result .= $this->LE.$this->LE;
$result .= $this->EndBoundary($this->boundary[1]);
$result .= $this->EncodeString($this->Body, $this->Encoding);
break;
case 'attachments':
- $result .= $this->GetBoundary($this->boundary[1], '', '', '');
+ $result .= $this->GetBoundary($this->boundary[1], "", "", "");
$result .= $this->EncodeString($this->Body, $this->Encoding);
$result .= $this->LE;
$result .= $this->AttachAll();
case 'alt_attachments':
$result .= sprintf("--%s%s", $this->boundary[1], $this->LE);
$result .= sprintf("Content-Type: %s;%s" . "\tboundary=\"%s\"%s", 'multipart/alternative', $this->LE, $this->boundary[2], $this->LE.$this->LE);
- $result .= $this->GetBoundary($this->boundary[2], '', 'text/plain', '') . $this->LE; // Create text body
+ $result .= $this->GetBoundary($this->boundary[2], "", 'text/plain', "") . $this->LE; // Create text body
$result .= $this->EncodeString($this->AltBody, $this->Encoding);
$result .= $this->LE.$this->LE;
- $result .= $this->GetBoundary($this->boundary[2], '', 'text/html', '') . $this->LE; // Create the HTML body
+ $result .= $this->GetBoundary($this->boundary[2], "", 'text/html', "") . $this->LE; // Create the HTML body
$result .= $this->EncodeString($this->Body, $this->Encoding);
$result .= $this->LE.$this->LE;
$result .= $this->EndBoundary($this->boundary[2]);
break;
}
if($this->IsError()) {
- $result = '';
+ $result = "";
}
return $result;
* @access private
*/
function GetBoundary($boundary, $charSet, $contentType, $encoding) {
- $result = '';
- if($charSet == '') {
+ $result = "";
+ if($charSet == "") {
$charSet = $this->CharSet;
}
- if($contentType == '') {
+ if($contentType == "") {
$contentType = $this->ContentType;
}
- if($encoding == '') {
+ if($encoding == "") {
$encoding = $this->Encoding;
}
$result .= $this->TextLine('--' . $boundary);
* @param string $type File extension (MIME) type.
* @return bool
*/
- function AddAttachment($path, $name = '', $encoding = 'base64', $type = 'application/octet-stream') {
+ function AddAttachment($path, $name = "", $encoding = 'base64', $type = 'application/octet-stream') {
if(!@is_file($path)) {
$this->SetError($this->Lang('file_access') . $path);
return false;
}
$filename = basename($path);
- if($name == '') {
+ if($name == "") {
$name = $filename;
}
if($bString) {
$mime[] = $this->EncodeString($string, $encoding);
if($this->IsError()) {
- return '';
+ return "";
}
$mime[] = $this->LE.$this->LE;
} else {
$mime[] = $this->EncodeFile($path, $encoding);
if($this->IsError()) {
- return '';
+ return "";
}
$mime[] = $this->LE.$this->LE;
}
$mime[] = sprintf("--%s--%s", $this->boundary[1], $this->LE);
- return join('', $mime);
+ return join("", $mime);
}
/**
function EncodeFile ($path, $encoding = 'base64') {
if(!@$fd = fopen($path, 'rb')) {
$this->SetError($this->Lang('file_open') . $path);
- return '';
+ return "";
}
$magic_quotes = get_magic_quotes_runtime();
set_magic_quotes_runtime(0);
* @return string
*/
function EncodeString ($str, $encoding = 'base64') {
- $encoded = '';
+ $encoded = "";
switch(strtolower($encoding)) {
case 'base64':
/* chunk_split is found in PHP >= 3.0.6 */
* @access private
* @return string
*/
- function EncodeQP( $input = '', $line_max = 76, $space_conv = false ) {
+ function EncodeQP( $input = "", $line_max = 76, $space_conv = false ) {
$hex = array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F');
$lines = preg_split('/(?:\r\n|\r|\n)/', $input);
$eol = "\r\n";
$escape = '=';
- $output = '';
+ $output = "";
while( list(, $line) = each($lines) ) {
$linlen = strlen($line);
- $newline = '';
+ $newline = "";
for($i = 0; $i < $linlen; $i++) {
$c = substr( $line, $i, 1 );
$dec = ord( $c );
}
if ( (strlen($newline) + strlen($c)) >= $line_max ) { // CRLF is not counted
$output .= $newline.$escape.$eol; // soft line break; " =\r\n" is okay
- $newline = '';
+ $newline = "";
// check if newline first character will be point or not
if ( $dec == 46 ) {
$c = '=2E';
*/
function EncodeQ ($str, $position = 'text') {
/* There should not be any EOL in the string */
- $encoded = preg_replace("[\r\n]", '', $str);
+ $encoded = preg_replace("[\r\n]", "", $str);
switch (strtolower($position)) {
case 'phrase':
* @param string $type File extension (MIME) type.
* @return bool
*/
- function AddEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = 'application/octet-stream') {
+ function AddEmbeddedImage($path, $cid, $name = "", $encoding = 'base64', $type = 'application/octet-stream') {
if(!@is_file($path)) {
$this->SetError($this->Lang('file_access') . $path);
}
$filename = basename($path);
- if($name == '') {
+ if($name == "") {
$name = $filename;
}
if(isset($_SERVER[$varName])) {
return $_SERVER[$varName];
} else {
- return '';
+ return "";
}
}
* @access private
* @return mime type of ext
*/
- function _mime_types($ext = '') {
+ function _mime_types($ext = "") {
$mimes = array(
'hqx' => 'application/mac-binhex40',
'cpt' => 'application/mac-compactpro',
* @param mixed $value Parameter Value
* NOTE: will not work with arrays, there are no arrays to set/reset
*/
- function set ( $name, $value = '' ) {
+ function set ( $name, $value = "" ) {
if ( isset($this->$name) ) {
$this->$name = $value;
} else {
* @param string $filename Parameter File Name
*/
function getFile($filename) {
- $return = '';
+ $return = "";
if ($fp = fopen($filename, 'rb')) {
while (!feof($fp)) {
$return .= fread($fp, 1024);
* @param string $password
* @return boolean
*/
- function Login ($username = '', $password = '')
+ function Login ($username = "", $password = "")
{
if ($this->connected == false)
{
$this->error = array(
'error' => "Server reported an error: $string",
'errno' => 0,
- 'errstr' => ''
+ 'errstr' => ""
);
if ($this->do_debug >= 1)
$body = $mail->getFile('contents.html');
-$body = eregi_replace("[\]",'',$body);
+$body = eregi_replace("[\]","",$body);
$mail->From = "name@yourdomain.com";
$mail->FromName = "First Last";
$this->AddChange("Encoding", $this->Mail->Encoding);
if($this->Mail->CharSet != "iso-8859-1")
$this->AddChange("CharSet", $this->Mail->CharSet);
- if($this->Mail->Sender != "")
+ if($this->Mail->Sender != '')
$this->AddChange("Sender", $this->Mail->Sender);
if($this->Mail->WordWrap != 0)
$this->AddChange("WordWrap", $this->Mail->WordWrap);
function failNotEquals($expected, $actual, $expected_label, $message=0) {
// Private function for reporting failure to match.
- $str = $message ? ($message . ' ') : '';
+ $str = $message ? ($message . ' ') : "";
$str .= "($expected_label/actual)<br>";
$htmlExpected = htmlspecialchars($expected);
$htmlActual = htmlspecialchars($actual);
}
function fail($message=0) {
- //printf("TestCase::fail(%s)<br>\n", ($message) ? $message : '');
+ //printf("TestCase::fail(%s)<br>\n", ($message) ? $message : "");
/* JUnit throws AssertionFailedError here. We just record the
failure and carry on */
$this->fExceptions[] = new Exception(&$message);
/* report result of test run */
$nRun = $this->countTests();
$nFailures = $this->countFailures();
- printf("<p>%s test%s run<br>", $nRun, ($nRun == 1) ? '' : 's');
- printf("%s failure%s.<br>\n", $nFailures, ($nFailures == 1) ? '' : 's');
+ printf("<p>%s test%s run<br>", $nRun, ($nRun == 1) ? "" : 's');
+ printf("%s failure%s.<br>\n", $nFailures, ($nFailures == 1) ? "" : 's');
if ($nFailures == 0)
return;
* @var array
*/
var $_display_opt = array(
- 'build' => '',
- 'image' => '',
- 'channel' => '',
- 'textinput' => '',
- 'cache_update' => '',
- 'sitelink' => '',
- 'refid' => '',
- 'reflink' => '',
+ 'build' => "",
+ 'image' => "",
+ 'channel' => "",
+ 'textinput' => "",
+ 'cache_update' => "",
+ 'sitelink' => "",
+ 'refid' => "",
+ 'reflink' => "",
);
/**
'language'=>"",
'pubDate'=>"",
'lastBuildDate'=>"",
- 'width'=>'',
- 'height'=>''
+ 'width'=>"",
+ 'height'=>""
);
}
/**
break;
case "channel":
- if(isset($this->_display_opt["channel"]) AND $this->_display_opt["channel"] != "hidden" AND $this->_item["title"] != "") {
+ if(isset($this->_display_opt["channel"]) AND $this->_display_opt["channel"] != "hidden" AND $this->_item["title"] != '') {
$this->_output .= "<tr><td>\n";
$this->_output .= '<table border="0" width="100%" class="fase4_rdf_meta" cellspacing="5" cellpadding="2">'."\n";
$this->_output .= "<tr><td class=\"fase4_rdf\"><div class=\"fase4_rdf_title\">".htmlspecialchars($this->_item["title"])."</div></td></tr>\n";
{
$this->_use_proxy = true;
- if ($phost != "")
+ if ($phost != '')
$this->_phost = $phost;
- if ($pport != "")
+ if ($pport != '')
$this->_pport = $pport;
}
{
$this->_use_proxy_auth = true;
- if ($pname != "")
+ if ($pname != '')
$this->_pname = $pname;
- if ($ppasswd != "")
+ if ($ppasswd != '')
$this->_ppasswd = $ppasswd;
}
} elseif (isSessionVariableSet('refid')) {
// Set session refid als global
$GLOBALS['refid'] = bigintval(get_session('refid'));
-} elseif (GET_EXT_VERSION("sql_patches") != "") {
+} elseif (GET_EXT_VERSION("sql_patches") != '') {
// Set default refid as refid in URL
$GLOBALS['refid'] = bigintval($_CONFIG['def_refid']);
} else {
//* DEBUG: */ die("*".$url_uid."/".$url_bid."/".$url_mid."*<pre>".print_r($FATAL, true)."</pre>");
// 01 1 12 3 32 21 1 2 2 10
- if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (count($FATAL) == 0))
- {
+ if (($url_uid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (count($FATAL) == 0)) {
// Maybe he wants to confirm an email?
- if ($url_mid > 0)
- {
+ if ($url_mid > 0) {
// Normal-Mails
$result = SQL_QUERY_ESC("SELECT link_type FROM "._MYSQL_PREFIX."_user_links WHERE stats_id=%d AND userid=%d LIMIT 1",
array($url_mid, $url_uid), __FILE__, __LINE__);
$type = "mailid"; $DATA = $url_mid;
- }
- elseif ($url_bid > 0)
- {
+ } elseif ($url_bid > 0) {
// Bonus-Mail
$result = SQL_QUERY_ESC("SELECT link_type FROM "._MYSQL_PREFIX."_user_links WHERE bonus_id=%d AND userid=%d LIMIT 1",
array($url_bid, $url_uid), __FILE__, __LINE__);
$type = "bonusid"; $DATA = $url_bid;
- }
- else
- {
+ } else {
// Problem: No ID entered
LOAD_URL("index.php");
}
- if (SQL_NUMROWS($result) == 1)
- {
+
+ if (SQL_NUMROWS($result) == 1) {
// Load the entry
list($ltype) = SQL_FETCHROW($result);
break;
}
- if (SQL_NUMROWS($result) == 1)
- {
+ if (SQL_NUMROWS($result) == 1) {
// Load data
list($pool, $URL) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
// Is the user's ID unlocked?
$result = SQL_QUERY_ESC("SELECT status, sex, surname, family FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1",
array($url_uid), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 1)
- {
+ if (SQL_NUMROWS($result) == 1) {
list($status, $sex, $sname, $fname) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
- if ($status == "CONFIRMED")
- {
+ if ($status == "CONFIRMED") {
// User has confirmed his account so we can procede...
switch ($ltype)
{
break;
}
- if ($VALID)
- {
+ // Was that mail a valid one?
+ if ($VALID) {
// If time is zero seconds we have a sponsor mail. 1 Second shall be set to avoid problems
if (($time == "0") && ($payment > 0)) { $URL = URL; $time = "1"; }
if (($time > 0) && (($payment > 0) || ($points > 0))) {
// Error code is set?
if (!empty($msg)) {
- LOAD_URL("modules.php?module=index&msg=".$msg);
- }
+ switch ($_CONFIG['mailid_error_redirect']) {
+ case "index": // Redirect to index page
+ LOAD_URL("modules.php?module=index&msg=".$msg);
+ break;
- require_once(PATH."inc/footer.php");
-}
- else
-{
+ case "reject": // Redirect to rejection page
+ LOAD_URL($_CONFIG['reject_url']);
+ break;
+ }
+ } else {
+ // Include footer
+ require_once(PATH."inc/footer.php");
+ }
+} else {
// You have to configure first!
LOAD_URL("install.php");
}
-// Really all done here... ;-)
-die();
+
+// Shutdown database link
+if (is_resource($link)) {
+ SQL_CLOSE($link, __FILE__, __LINE__);
+}
//
?>
<TR>
<TD width="10" class="seperator"> </TD>
- <TD align="right">{--ADMIN_OPTION_FOOTER_STATS--}:</TD>
+ <TD align="right">{--ADMIN_OPTION_SHOW_TIMINGS--}:</TD>
<TD width="10" class="seperator"> </TD>
<TD><SPAN class="nobr"> <INPUT type="radio"
- name="show_timings" value="Y"{--_CFG_FOOTER_STATS_Y--}> {--YES--}<BR>
- <INPUT type="radio" name="show_timings" value="N"{--_CFG_FOOTER_STATS_N--}> {--NO--}
+ name="mailid_error_redirect" value="Y"{--_CFG_SHOW_TIMINGS_Y--}> {--YES--}<BR>
+ <INPUT type="radio" name="mailid_error_redirect" value="N"{--_CFG_SHOW_TIMINGS_N--}> {--NO--}
+ </SPAN></TD>
+ <TD width="10" class="seperator"> </TD>
+ </TR>
+
+ <TR>
+ <TD colspan="5" height="7" class="seperator"> </TD>
+ </TR>
+
+ <TR>
+ <TD width="10" class="seperator"> </TD>
+ <TD align="right">{--ADMIN_OPTION_MAILID_REDIRECT--}:</TD>
+ <TD width="10" class="seperator"> </TD>
+ <TD><SPAN class="nobr"> <INPUT type="radio"
+ name="mailid_error_redirect" value="index"{--_CFG_MAILID_REDIRECT_INDEX--}> {--ADMIN_CONFIG_MAILID_REDIRECT_INDEX--}<BR>
+ <INPUT type="radio" name="mailid_error_redirect" value="reject"{--_CFG_MAILID_REDIRECT_REJECT--}> {--ADMIN_CONFIG_MAILID_REDIRECT_REJECT--}
</SPAN></TD>
<TD width="10" class="seperator"> </TD>
</TR>
<DIV align="center">
<DIV id="show_timings_block">
<DIV class="show_timings_column" style="float:right; margin-right: 2px">
- {--FOOTER_STATS_NUM_TEMPLATES--} <SPAN class="show_timings_data">$content[numTemplates]</SPAN>
+ {--SHOW_TIMINGS_NUM_TEMPLATES--} <SPAN class="show_timings_data">$content[numTemplates]</SPAN>
</DIV>
<DIV class="show_timings_column" style="float: left; margin-left: 2px">
- {--FOOTER_STATS_RUNTIME--} <SPAN class="show_timings_data">$content[runtime]</SPAN> {--FOOTER_STATS_SECS--}
+ {--SHOW_TIMINGS_RUNTIME--} <SPAN class="show_timings_data">$content[runtime]</SPAN> {--SHOW_TIMINGS_SECS--}
</DIV>
<DIV class="show_timings_column" align="center">
- {--FOOTER_STATS_SQL_QUERIES--} <SPAN class="show_timings_data">$content[numSQLs]</SPAN>
+ {--SHOW_TIMINGS_SQL_QUERIES--} <SPAN class="show_timings_data">$content[numSQLs]</SPAN>
</DIV>
</DIV>
</DIV>