// Check only posted input entries not the submit button
switch ($k)
{
- case "email":
+ case 'email':
$ALREADY = false;
if (!VALIDATE_EMAIL($v)) {
// Email address is not valid
break;
case "pass1":
- $k = ""; $v = "";
+ $k = ''; $v = '';
break;
case "pass2":
if ((empty($POST['force'])) || (!IS_ADMIN())) $POST['force'] = 0;
// SQL and message string is empty by default
- $sql = ""; $message = "";
+ $sql = ''; $message = '';
// Update?
if ($UPDATE) {
$ret = "added";
} elseif ((!$NO_UPDATE) && (IS_ADMIN())) {
// Add all data as hidden data
- $OUT = "";
+ $OUT = '';
foreach ($POST as $k => $v) {
// Do not add 'force' !
if ($k != "force") {
// Output message
if ((!$NO_UPDATE) && (IS_ADMIN())) {
- LOAD_TEMPLATE("admin_settings_saved", false, $message);
+ LOAD_TEMPLATE('admin_settings_saved', false, $message);
}
} else {
// Error found!
$message = SPONSOR_GET_MESSAGE(getMessage('SPONSOR_DATA_NOT_SAVED'), "failed", $messageArray);
- LOAD_TEMPLATE("admin_settings_saved", false, $message);
+ LOAD_TEMPLATE('admin_settings_saved', false, $message);
}
// Shall we return the status?
// Search for an email address in the database
function SPONSOR_FOUND_EMAIL_DB ($email) {
// Do we already have the provided email address in our DB?
- $ret = (GET_TOTAL_DATA($email, "sponsor_data", "id", "email", true) == 1);
+ $ret = (GET_TOTAL_DATA($email, "sponsor_data", "id", 'email', true) == 1);
// Return result
return $ret;
//
function GENERATE_SPONSOR_MENU($current)
{
- $OUT = "";
+ $OUT = '';
$WHERE = " AND active='Y'";
- if (IS_ADMIN()) $WHERE = "";
+ if (IS_ADMIN()) $WHERE = '';
// Load main menu entries
$result_main = SQL_QUERY("SELECT action AS main_action, title AS main_title FROM `{!_MYSQL_PREFIX!}_sponsor_menu`
array($content['main_action']), __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result_sub) > 0) {
// Load sub menus
- $SUB = "";
+ $SUB = '';
while ($content2 = SQL_FETCHARRAY($result_sub)) {
// Merge both arrays
$content = merge_array($content, $content2);
$OUT .= LOAD_TEMPLATE("sponsor_action", true, $content);
} else {
// No sub menus active
- $OUT .= LOAD_TEMPLATE("admin_settings_saved", true, getMessage('SPONSOR_NO_SUB_MENUS_ACTIVE'));
+ $OUT .= LOAD_TEMPLATE('admin_settings_saved', true, getMessage('SPONSOR_NO_SUB_MENUS_ACTIVE'));
}
// Free memory
}
} else {
// No main menus active
- $OUT .= LOAD_TEMPLATE("admin_settings_saved", true, getMessage('SPONSOR_NO_MAIN_MENUS_ACTIVE'));
+ $OUT .= LOAD_TEMPLATE('admin_settings_saved', true, getMessage('SPONSOR_NO_MAIN_MENUS_ACTIVE'));
}
// Free memory
//
function GENERATE_SPONSOR_CONTENT ($what) {
- $OUT = "";
+ $OUT = '';
$INC = sprintf("inc/modules/sponsor/%s.php", $what);
if (INCLUDE_READABLE($INC)) {
// Every sponsor action will output nothing directly. It will be written into $OUT!
LOAD_INC_ONCE($INC);
} else {
// File not found!
- $OUT .= LOAD_TEMPLATE("admin_settings_saved", true, sprintf(getMessage('SPONSOR_CONTENT_404'), $what));
+ $OUT .= LOAD_TEMPLATE('admin_settings_saved', true, sprintf(getMessage('SPONSOR_CONTENT_404'), $what));
}
// Return content
default: // Unknown sponsor what value!
DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Unknown sponsor module (what) %s detected.", $GLOBALS['what']));
$message = sprintf(getMessage('SPONSOR_UNKNOWN_WHAT'), $GLOBALS['what']);
- $templ = ""; $subj = "";
+ $templ = ''; $subj = '';
break;
}
SEND_ADMIN_NOTIFICATION($subj, $templ, $content);
// Shall we send mail to the sponsor's new email address?
- if ($content['receive_warnings'] == "Y") {
+ if ($content['receive_warnings'] == 'Y') {
// Okay send email with confirmation link to new address and with no confirmation link
// to the old address