}
// Send mail out to an email address
-function SEND_EMAIL($TO, $SUBJECT, $MSG, $HTML="N", $FROM="")
+function SEND_EMAIL($TO, $SUBJECT, $MSG, $HTML='N', $FROM="")
{
// Compile subject line (for POINTS constant etc.)
$eval = "\$SUBJECT = \"".COMPILE_CODE(addslashes($SUBJECT))."\";";
}
// Fix HTML parameter (default is no!)
- if (empty($HTML)) $HTML = "N";
+ if (empty($HTML)) $HTML = 'N';
if (DEBUG_MODE)
{
// In debug mode we want to display the mail instead of sending it away so we can debug this part
Message : ".$MSG."
</PRE>\n";
}
- elseif (($HTML == "Y") && (EXT_IS_ACTIVE("html_mail", true)))
+ elseif (($HTML == 'Y') && (EXT_IS_ACTIVE("html_mail", true)))
{
// Send mail as HTML away
SEND_HTML_EMAIL($TO, $SUBJECT, $MSG, $FROM);
// Send Mail away
SEND_RAW_EMAIL(stripslashes($TO), COMPILE_CODE($SUBJECT), stripslashes($MSG), $FROM);
}
- elseif ($HTML == "N")
+ elseif ($HTML == 'N')
{
// Problem found!
SEND_RAW_EMAIL(WEBMASTER, COMPILE_CODE($SUBJECT), stripslashes($MSG), $FROM);
// Keept for backward-compatiblity (please replace these variables against our new {--CONST--} syntax!)
$MAIN_TITLE = MAIN_TITLE; $URL = URL; $WEBMASTER = WEBMASTER;
- $surname = ""; $family = ""; $nick = ""; $sex = "N";
+ $surname = ""; $family = ""; $nick = ""; $sex = 'N';
// Prepare IP number and User Agent
$REMOTE_ADDR = getenv('REMOTE_ADDR');
else
{
// Neutral sex and email address is default
- $sex = "N";
+ $sex = 'N';
$email = WEBMASTER;
}
// Extract day, month and year from given timestamp
$DAY = date("d", $stamp);
$MONTH = date("m", $stamp);
- $YEAR = date("Y", $stamp);
+ $YEAR = date('Y', $stamp);
// Create timestamp for wished time which depends on extracted date
return mktime($H, $M, $S, $MONTH, $DAY, $YEAR);
case "year": // Year
// Get current year
- $YEAR = date("Y", time());
+ $YEAR = date('Y', time());
// Check if the default value is larger than minimum and bigger than actual year
if (($DEFAULT > 1930) && ($DEFAULT >= $YEAR))
{
// Get current year and subtract 16 (for erotic content)
$OUT .= " <OPTION value=\"1929\"><1930</OPTION>\n";
- $YEAR = date("Y", time()) - 16;
+ $YEAR = date('Y', time()) - 16;
for ($idx = 1930; $idx <= $YEAR; $idx++)
{
$OUT .= " <OPTION value=\"".$idx."\"";
case "yn":
$OUT .= " <OPTION value=\"Y\"";
- if ($DEFAULT == "Y") $OUT .= " selected=\"selected\"";
+ if ($DEFAULT == 'Y') $OUT .= " selected=\"selected\"";
$OUT .= ">".YES."</OPTION>
<OPTION value=\"N\"";
- if ($DEFAULT == "N") $OUT .= " selected=\"selected\"";
+ if ($DEFAULT == 'N') $OUT .= " selected=\"selected\"";
$OUT .= ">".NO."</OPTION>\n";
break;
}
{
switch ($yn)
{
- case "Y": $yn = YES; break;
- case "N": $yn = NO; break;
+ case 'Y': $yn = YES; break;
+ case 'N': $yn = NO; break;
default : $yn = "??? (".$yn.")"; break;
}
return $yn;
$timestamp = round($timestamp / 15) * 15;
// Do we have a leap year?
$SWITCH = 0;
- $TEST = date("Y", time()) / 4;
+ $TEST = date('Y', time()) / 4;
$M1 = date("m", time());
$M2 = date("m", (time() + $timestamp));
// If so and if current time is before 02/29 and estimated time is after 02/29 then add 86400 seconds (one day)
$OUT = "<DIV align=\"".$align."\">\n";
$OUT .= "<TABLE border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"admin_table dashed\">\n";
$OUT .= "<TR>\n";
- if (ereg("Y", $display) || (empty($display)))
+ if (ereg('Y', $display) || (empty($display)))
{
$OUT .= " <TD align=\"center\" class=\"admin_title bottom\"><STRONG class=\"tiny\">"._YEARS."</STRONG></TD>\n";
}
}
$OUT .= "</TR>\n";
$OUT .= "<TR>\n";
- if (ereg("Y", $display) || (empty($display)))
+ if (ereg('Y', $display) || (empty($display)))
{
// Generate year selection
$OUT .= " <TD align=\"center\"><SELECT class=\"mini_select\" name=\"".$prefix."_ye\" size=\"1\">\n";
$ret = "0";
// Do we have a leap year?
$SWITCH = 0;
- $TEST = date("Y", time()) / 4;
+ $TEST = date('Y', time()) / 4;
$M1 = date("m", time());
// If so and if current time is before 02/29 and estimated time is after 02/29 then add 86400 seconds (one day)
if ((floor($TEST) == $TEST) && ($M1 == "02") && ($POST[$prefix."_mo"] > "02")) $SWITCH = ONE_DAY;