// Creates a new task for updated extension
function CREATE_EXTENSION_UPDATE_TASK ($admin_id, $ext_name, $ext_ver, $notes) {
// Create subject line
- $subject = "[UPDATE-".$ext_name."-".$ext_ver.":] {!ADMIN_UPDATE_EXT_SUBJ!}";
+ $subject = "[UPDATE-".$ext_name."-".$ext_ver.":] {--ADMIN_UPDATE_EXT_SUBJ--}";
// Is the extension there?
if (GET_EXT_VERSION($ext_name) != "") {
case "0.1.2": // SQL queries for v0.1.2
// Update notes (these will be set as task text!)
- $UPDATE_NOTES = "Die Tabelen <strong>{!MYSQL_PREFIX!}_config</strong>, <strong>{!MYSQL_PREFIX!}_refsystem</strong>, <strong>{!MYSQL_PREFIX!}_refdepths</strong> und <strong>{!MYSQL_PREFIX!}_mod_reg</strong> werden nun auch ausgelagert.";
+ $UPDATE_NOTES = "Die Tabelen <strong>{!_MYSQL_PREFIX!}_config</strong>, <strong>{!_MYSQL_PREFIX!}_refsystem</strong>, <strong>{!_MYSQL_PREFIX!}_refdepths</strong> und <strong>{!_MYSQL_PREFIX!}_mod_reg</strong> werden nun auch ausgelagert.";
break;
case "0.1.3": // SQL queries for v0.1.3
$SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE auto_purge auto_purge BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*14)."";
// Update notes (these will be set as task text!)
- $UPDATE_NOTES = "In der Tabelle <strong>{!MYSQL_PREFIX!}_config</strong> musste die Spalte <strong>auto_purge</strong> (autom. Löschen von Bestätigungsmails angepasst werden (war auf dem Testsystem auf TINYINT(4) gesetzt.)";
+ $UPDATE_NOTES = "In der Tabelle <strong>{!_MYSQL_PREFIX!}_config</strong> musste die Spalte <strong>auto_purge</strong> (autom. Löschen von Bestätigungsmails angepasst werden (war auf dem Testsystem auf TINYINT(4) gesetzt.)";
break;
case "0.0.3": // SQL queries for v0.0.3
$SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP ext_has_admin";
// Update notes (these will be set as task text!)
- $UPDATE_NOTES = "Spalte <u>ext_has_admin</u> aus der Tabelle <u>{!MYSQL_PREFIX!}_extensions</u> entfernt, da sie keinen Sinn mehr macht.";
+ $UPDATE_NOTES = "Spalte <u>ext_has_admin</u> aus der Tabelle <u>{!_MYSQL_PREFIX!}_extensions</u> entfernt, da sie keinen Sinn mehr macht.";
break;
case "0.1.6": // SQL queries for v0.1.6
default:
// Huh, something goes wrong or maybe you have edited config.php ???
DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Invalid renderer %s detected.", constant('OUTPUT_MODE')));
- mxchange_die("<strong>{!FATAL_ERROR!}:</strong> {!LANG_NO_RENDER_DIRECT!}");
+ mxchange_die("<strong>{--FATAL_ERROR--}:</strong> {--LANG_NO_RENDER_DIRECT--}");
break;
}
} elseif ((constant('_OB_CACHING') == "on") && ($footer == 1)) {
@eval($tmpl_file);
} elseif (!empty($template)) {
// Template file not found!
- $newContent = "{!TEMPLATE_404!}: ".$template."<br />
-{!TEMPLATE_CONTENT!}
+ $newContent = "{--TEMPLATE_404--}: ".$template."<br />
+{--TEMPLATE_CONTENT--}
<pre>".print_r($content, true)."</pre>
-{!TEMPLATE_DATA!}
+{--TEMPLATE_DATA--}
<pre>".print_r($DATA, true)."</pre>
<br /><br />";
case "yn":
$OUT .= "<option value=\"Y\"";
if ($DEFAULT == "Y") $OUT .= " selected=\"selected\"";
- $OUT .= ">{!YES!}</option>\n<option value=\"N\"";
+ $OUT .= ">{--YES--}</option>\n<option value=\"N\"";
if ($DEFAULT == "N") $OUT .= " selected=\"selected\"";
- $OUT .= ">{!NO!}</option>\n";
+ $OUT .= ">{--NO--}</option>\n";
break;
}
$OUT .= " </select>\n";
$eval = "\$OUT = \"[ ";
foreach ($TARGETS as $tar) {
- $eval .= "<span class=\\\"admin_user_link\\\"><a href=\\\"{!URL!}/modules.php?module=admin&what=".$tar."&u_id=".$uid."\\\" title=\\\"{!ADMIN_LINK_";
+ $eval .= "<span class=\\\"admin_user_link\\\"><a href=\\\"{!URL!}/modules.php?module=admin&what=".$tar."&u_id=".$uid."\\\" title=\\\"{--ADMIN_LINK_";
//* DEBUG: */ echo "*".$tar."/".$status."*<br />\n";
if (($tar == "lock_user") && ($status == "LOCKED")) {
// Locked accounts shall be unlocked
// All other status is fine
$eval .= strtoupper($tar);
}
- $eval .= "_TITLE!}\\\">{!ADMIN_";
+ $eval .= "_TITLE--}\\\">{--ADMIN_";
if (($tar == "lock_user") && ($status == "LOCKED")) {
// Locked accounts shall be unlocked
$eval .= "UNLOCK_USER";
// All other status is fine
$eval .= strtoupper($tar);
}
- $eval .= "!}</a></span> | ";
+ $eval .= "--}</a></span> | ";
}
// Finish navigation link
$msg = "";
switch ($code) {
case constant('CODE_LOGOUT_DONE') : $msg = getMessage('LOGOUT_DONE'); break;
- case constant('CODE_LOGOUT_FAILED') : $msg = "<span class=\"guest_failed\">{!LOGOUT_FAILED!}</span>"; break;
+ case constant('CODE_LOGOUT_FAILED') : $msg = "<span class=\"guest_failed\">{--LOGOUT_FAILED--}</span>"; break;
case constant('CODE_DATA_INVALID') : $msg = getMessage('MAIL_DATA_INVALID'); break;
case constant('CODE_POSSIBLE_INVALID') : $msg = getMessage('MAIL_POSSIBLE_INVALID'); break;
case constant('CODE_ACCOUNT_LOCKED') : $msg = getMessage('MEMBER_ACCOUNT_LOCKED_UNC'); break;
if (getTotalFatalErrors() > 0) {
OUTPUT_HTML("<span class=\"install_fatal\">");
foreach ($FATAL as $key => $err) {
- OUTPUT_HTML(" <strong>·</strong> {!FATAL_NO!}".($key + 1).": ".$err."<br />");
+ OUTPUT_HTML(" <strong>·</strong> {--FATAL_NO--}".($key + 1).": ".$err."<br />");
}
OUTPUT_HTML("</span><br />");
}
<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"install_content\">
<tr>
<td colspan=\"2\" align=\"center\">
- <div class=\"install\">{!HEADER_TEXT_PAGE5!}</strong>
+ <div class=\"install\">{--HEADER_TEXT_PAGE5--}</strong>
</td>
</tr>
<tr><td colspan=\"2\" height=\"21\" class=\"seperator\"> </td></tr>
<tr>
<td colspan=\"2\"><span class=\"install_intro\">
- {!TEXT_PAGE_5!}
+ {--TEXT_PAGE_5--}
</span></td>
</tr>
<tr><td colspan=\"2\" height=\"21\" class=\"seperator\"> </td></tr>
<tr>
- <td class=\"install\" align=\"right\">{!LANG_OUTPUT_MODE!}: </td>
+ <td class=\"install\" align=\"right\">{--LANG_OUTPUT_MODE--}: </td>
<td>
<select name=\"omode\" size=\"1\" class=\"install_select\">
<option value=\"render\"");
if (constant('OUTPUT_MODE') == "render") OUTPUT_HTML(" selected=\"selected\"");
- OUTPUT_HTML(">{!MODE_RENDER!}</option>
+ OUTPUT_HTML(">{--MODE_RENDER--}</option>
<option value=\"direct\"");
if (constant('OUTPUT_MODE') == "direct") OUTPUT_HTML(" selected=\"selected\"");
- OUTPUT_HTML(">{!MODE_DIRECT!}</option>
+ OUTPUT_HTML(">{--MODE_DIRECT--}</option>
</select>
</td>
</tr>
<tr><td colspan=\"2\" height=\"10\" class=\"seperator\"> </td></tr>
<tr>
- <td class=\"install\" align=\"right\">{!WARN_NO_PASSWORD!}: </td>
+ <td class=\"install\" align=\"right\">{--WARN_NO_PASSWORD--}: </td>
<td>
<select name=\"warn_no_pass\" size=\"1\" class=\"install_select\">
<option value=\"true\"");
if (isBooleanConstantAndTrue('warn_no_pass')) OUTPUT_HTML(" selected=\"selected\"");
- OUTPUT_HTML(">{!YES!}</option>
+ OUTPUT_HTML(">{--YES--}</option>
<option value=\"false\"");
if (!isBooleanConstantAndTrue('warn_no_pass')) OUTPUT_HTML(" selected=\"selected\"");
- OUTPUT_HTML(">{!NO!}</option>
+ OUTPUT_HTML(">{--NO--}</option>
</select>
</td>
</tr>
<tr><td colspan=\"2\" height=\"10\" class=\"seperator\"> </td></tr>
<tr>
- <td class=\"install\" align=\"right\">{!LANG_WRITE_FOOTER!}: </td>
+ <td class=\"install\" align=\"right\">{--LANG_WRITE_FOOTER--}: </td>
<td>
<select name=\"wfooter\" size=\"1\" class=\"install_select\">
<option value=\"true\"");
if (isBooleanConstantAndTrue('WRITE_FOOTER')) OUTPUT_HTML(" selected=\"selected\"");
- OUTPUT_HTML(">{!YES!}</option>
+ OUTPUT_HTML(">{--YES--}</option>
<option value=\"false\"");
if (!isBooleanConstantAndTrue('WRITE_FOOTER')) OUTPUT_HTML(" selected=\"selected\"");
- OUTPUT_HTML(">{!NO!}</option>
+ OUTPUT_HTML(">{--NO--}</option>
</select>
</td>
</tr>
<tr><td colspan=\"2\" height=\"10\" class=\"seperator\"> </td></tr>
<tr>
- <td class=\"install\" align=\"right\">{!INSTALL_ENABLE_BACKLINK!}: </td>
+ <td class=\"install\" align=\"right\">{--INSTALL_ENABLE_BACKLINK--}: </td>
<td>
<select name=\"blink\" size=\"1\" class=\"install_select\">
<option value=\"true\"");
if (isBooleanConstantAndTrue('ENABLE_BACKLINK')) OUTPUT_HTML(" selected=\"selected\"");
- OUTPUT_HTML(">{!YES!}</option>
+ OUTPUT_HTML(">{--YES--}</option>
<option value=\"false\"");
if (!isBooleanConstantAndTrue('ENABLE_BACKLINK')) OUTPUT_HTML(" selected=\"selected\"");
- OUTPUT_HTML(">{!NO!}</option>
+ OUTPUT_HTML(">{--NO--}</option>
</select>
</td>
</tr>
<tr>
<td colspan=\"2\" align=\"center\">");
foreach ($mysql as $key => $value) {
- OUTPUT_HTML(" <input type=\"hidden\" name=\"mysql[".$key."!}]\" value=\"".$value."!}\">");
+ OUTPUT_HTML(" <input type=\"hidden\" name=\"mysql[".$key."]\" value=\"".$value."\">");
}
OUTPUT_HTML(" <input type=\"hidden\" name=\"spath\" value=\"{!__SPATH_VALUE!}\">
<input type=\"hidden\" name=\"burl\" value=\"{!__BURL_VALUE!}\" />
<input type=\"hidden\" name=\"smtp_host\" value=\"{!__SMTP_HOST!}\" />
<input type=\"hidden\" name=\"smtp_user\" value=\"{!__SMTP_USER!}\" />
<input type=\"hidden\" name=\"smtp_pass\" value=\"{!__SMTP_PASS!}\" />
- <input type=\"submit\" class=\"admin_submit submit\" name=\"finalize\" value=\"{!NEXT_PAGE!}\" class=\"install_submit\" />
+ <input type=\"submit\" class=\"admin_submit submit\" name=\"finalize\" value=\"{--NEXT_PAGE--}\" class=\"install_submit\" />
</td>
</tr>
<tr><td colspan=\"2\" height=\"21\" class=\"seperator\"> </td></tr>
break;
default:
- DEBUG_LOG(__FILE__, __LINE__, sprintf("Wrong page %s detected!}, $_GET['page']));
- OUTPUT_HTML(" <div class=\"install_error\">{!WRONG_PAGE!}</strong>");
+ DEBUG_LOG(__FILE__, __LINE__, sprintf("Wrong page %s detected", $_GET['page']));
+ OUTPUT_HTML(" <div class=\"install_error\">{--WRONG_PAGE--}</strong>");
break;
}
} else {
- addFatalMessage(ALREADY_INSTALLED);
+ addFatalMessage(getMessage('ALREADY_INSTALLED'));
}
//
?>
ORDER BY type", array($points), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
OUTPUT_HTML("<br /><div align=\"center\">
-<div align=\"center\"><strong>{!PAYOUT_NOW!}:</strong></div><br />
+<div align=\"center\"><strong>{--PAYOUT_NOW--}:</strong></div><br />
<ul>");
// Now let's check
while (list($id, $type, $rate, $mpoi) = SQL_FETCHROW($result)) {
if ($points >= $mpoi) {
// Ok we found one
$P = $points * $rate - 0.5;
- OUTPUT_HTML("<li>{!PAYOUT_IN!}: <strong><a href=\"{!URL!}/modules.php?module=login&what=payout&payout=".$id."\">".$type." (".PAYOUT_MAX." ".round($P)." ".$type.")</a></strong></li>");
+ OUTPUT_HTML("<li>{--PAYOUT_IN--}: <strong><a href=\"{!URL!}/modules.php?module=login&what=payout&payout=".$id."\">".$type." (".PAYOUT_MAX." ".round($P)." ".$type.")</a></strong></li>");
}
}
OUTPUT_HTML("</ul></div>");
} else {
// No payout types setup so far
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"guest_failed\">{!PAYOUT_NO_PAYOUT_TYPES!}</div");
+ LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"guest_failed\">{--PAYOUT_NO_PAYOUT_TYPES--}</div");
}
// Free memory
SQL_FREERESULT($result);
} else {
// Points is empty
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"guest_failed\">{!PAYOUT_NO_POINTS_ENTERED!}</div");
+ LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"guest_failed\">{--PAYOUT_NO_POINTS_ENTERED--}</div");
}
}
// Get all id from locks within the timestamp
$result = SQL_QUERY_ESC("SELECT id, url_id, UNIX_TIMESTAMP(last_surfed) AS last
FROM
- {!MYSQL_PREFIX!}_surfbar_locks
+ {!_MYSQL_PREFIX!}_surfbar_locks
WHERE
userid=%s
ORDER BY
} elseif (EXT_IS_ACTIVE("bonus")) {
define('__MAIL_BONUS_AP_VALUE', ADMIN_EXT_BONUS_OUTDATED_1."0.1.8".ADMIN_EXT_BONUS_OUTDATED_2);
} else {
- define('__MAIL_BONUS_AP_VALUE', "<div class=\"admin_note\">{!ADMIN_EXT_BONUS_404!}</div>");
+ define('__MAIL_BONUS_AP_VALUE', "<div class=\"admin_note\">{--ADMIN_EXT_BONUS_404--}</div>");
}
} else {
- define('__MAIL_BONUS_AP_VALUE', "<div class=\"admin_note\">{!ADMIN_EXT_AUTOPURGE_404!}</div>");
- define('__MAIL_DELETED_VALUE', "<div class=\"admin_note\">{!ADMIN_EXT_AUTOPURGE_404!}</div>");
+ define('__MAIL_BONUS_AP_VALUE', "<div class=\"admin_note\">{--ADMIN_EXT_AUTOPURGE_404--}</div>");
+ define('__MAIL_DELETED_VALUE', "<div class=\"admin_note\">{--ADMIN_EXT_AUTOPURGE_404--}</div>");
}
//
}
} else {
// ID or email is wrong
- LOAD_TEMPLATE("admin_settings_saved", false, "<span class=\"guest_failed\">{!GUEST_WRONG_ID_EMAIL!}</span>");
+ LOAD_TEMPLATE("admin_settings_saved", false, "<span class=\"guest_failed\">{--GUEST_WRONG_ID_EMAIL--}</span>");
}
// Return the error code
case "pass": // Wrong password
$_POST['ok'] = $ret;
- $ret = "{!WRONG_PASS!} [<a href=\"{!URL!}/modules.php?module=admin&reset_pass=1\">{!ADMIN_RESET_PASS!}</a>]\n";
+ $ret = "{--WRONG_PASS--} [<a href=\"{!URL!}/modules.php?module=admin&reset_pass=1\">{--ADMIN_RESET_PASS--}</a>]\n";
destroyAdminSession();
break;
}
} else {
// Something went wrong here...
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"admin_fatal\">{!ADMIN_LOGOUT_FAILED!}</div>");
+ LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"admin_fatal\">{--ADMIN_LOGOUT_FAILED--}</div>");
// Add fatal message
addFatalMessage(getMessage('CANNOT_UNREG_SESS'));
//* DEBUG: */ echo "a:".$title."<br />";
// Return link
- return "<a href=\"{!URL!}/modules.php?module=admin&what=".$wht."&u_id=".$uid."\" title=\"{!ADMIN_USER_PROFILE_TITLE!}\">".$title."</a>";
+ return "<a href=\"{!URL!}/modules.php?module=admin&what=".$wht."&u_id=".$uid."\" title=\"{--ADMIN_USER_PROFILE_TITLE--}\">".$title."</a>";
}
// Check "logical-area-mode"
if ($type == "SUPPORT_MEMBER") {
$mode = substr($text, 0, strpos($text, ":"));
$text = substr($text, strpos($text, ":") + 1);
- $ADD = "<li>{!ADMIN_TASK_SUPPORT_MODE!}: <strong>".$mode."</strong></li>";
+ $ADD = "<li>{--ADMIN_TASK_SUPPORT_MODE--}: <strong>".$mode."</strong></li>";
} // END - if
if ($uid > 0) {
if (SQL_NUMROWS($result_user) == 1) {
list($gender, $sname, $fname, $email) = SQL_FETCHROW($result_user);
SQL_FREERESULT($result_user);
- $ADD = "<li>{!ADMIN_MEMBER_UID!}: <strong>".ADMIN_USER_PROFILE_LINK($uid)." (<a href=\"".CREATE_EMAIL_LINK($email, "user_data")."\">".TRANSLATE_GENDER($gender)." ".$sname." ".$fname."</a>)</strong></li>";
+ $ADD = "<li>{--ADMIN_MEMBER_UID--}: <strong>".ADMIN_USER_PROFILE_LINK($uid)." (<a href=\"".CREATE_EMAIL_LINK($email, "user_data")."\">".TRANSLATE_GENDER($gender)." ".$sname." ".$fname."</a>)</strong></li>";
} // END - if
} // END - if
));
} else {
// Task is closed so nothing is todo
- $OUT .= "<div class=\"admin_failed\">{!ADMIN_EXT_ALREADY_REGISTERED!}</div>\n";
+ $OUT .= "<div class=\"admin_failed\">{--ADMIN_EXT_ALREADY_REGISTERED--}</div>\n";
// Close task but not already closes or deleted or update tasks
if (($status != "CLOSED") && ($status != "DELETED") && ($type != "EXTENSION_UPDATE")) {
case "EXTENSION_UPDATE": // Extension update
// Extension updates are installed automatically
- $OUT .= "<div class=\"admin_failed medium\">{!ADMIN_EXTENSION_UPDATED!}</div>\n";
+ $OUT .= "<div class=\"admin_failed medium\">{--ADMIN_EXTENSION_UPDATED--}</div>\n";
// Close task
if (($status != "CLOSED") && ($status != "DELETED")) {
}
} else {
// Extension is not installed
- $OUT .= "<div class=\"admin_failed medium\">{!ADMIN_PAYOUT_NOT_INSTALLED!}</div>\n";
+ $OUT .= "<div class=\"admin_failed medium\">{--ADMIN_PAYOUT_NOT_INSTALLED--}</div>\n";
}
break;
$OUT .= LOAD_TEMPLATE("admin_wernis_overview_form", true, $content);
} else {
// Problem obtaining wernis ID
- $OUT .= "<div class=\"admin_failed medium\">{!WERNIS_OBTAIN_ID_FAILED!}</div>\n";
+ $OUT .= "<div class=\"admin_failed medium\">{--WERNIS_OBTAIN_ID_FAILED--}</div>\n";
}
} else {
// Extension is not installed
- $OUT .= "<div class=\"admin_failed medium\">{!ADMIN_WERNIS_NOT_INSTALLED!}</div>\n";
+ $OUT .= "<div class=\"admin_failed medium\">{--ADMIN_WERNIS_NOT_INSTALLED--}</div>\n";
}
break;
$infos = "---";
if ($admin == "0") {
// No admin currently is assigned
- $admin = "<div class=\"admin_note\">{!ADMIN_NO_ADMIN_ASSIGNED!}</div>";
+ $admin = "<div class=\"admin_note\">{--ADMIN_NO_ADMIN_ASSIGNED--}</div>";
} else {
// Load admin's data
$login = GET_ADMIN_LOGIN($admin);
// Member found otherwise it's a system task
$uid = ADMIN_USER_PROFILE_LINK($uid);
} else {
- $uid = "<em>{!ADMIN_IS_SYSTEM_TASK!}</em>";
+ $uid = "<em>{--ADMIN_IS_SYSTEM_TASK--}</em>";
}
// Prepare content
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",
- array($_GET['act'], bigintval($_GET['tid'])), __FILE__, __LINE__);
+ 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",
- array($_GET['act'], bigintval($_GET['fid'])), __FILE__, __LINE__);
+ array($_GET['act'], bigintval($_GET['fid'])), __FILE__, __LINE__);
list($fid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
- }
- else
- {
+ } 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",
- array(bigintval($_GET['tid'])), __FILE__, __LINE__);
+ 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",
- array(bigintval($_GET['fid'])), __FILE__, __LINE__);
+ array(bigintval($_GET['fid'])), __FILE__, __LINE__);
list($fid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
}
- if ((!empty($tid)) && (!empty($fid)))
- {
+ 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",
array(bigintval($_GET['tid']), bigintval($fid)), __FILE__, __LINE__);
}
// By default list menus
- if (!empty($SUB))
- {
+ 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",
array($SUB), __FILE__, __LINE__);
- }
- else
- {
+ } else {
// Main menus
$result = SQL_QUERY("SELECT id, action, what, title, sort FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE (what='' OR `what` IS NULL) ORDER BY `sort` ASC", __FILE__, __LINE__);
}
+
$max = SQL_NUMROWS($result);
- if ($max > 0)
- {
+ if ($max > 0) {
define('__SUB_VALUE', $SUB);
- $SW = 2; $cnt = 0; $OUT = "";
- while (list($id, $act, $wht, $title, $sort) = SQL_FETCHROW($result))
- {
+ $SW = 2;
+ $cnt = 0;
+ $OUT = "";
+ while (list($id, $act, $wht, $title, $sort) = SQL_FETCHROW($result)) {
$cnt++;
- if (($sort == 0) || (($sort == 1) && (!empty($SUB))))
- {
+ if (($sort == 0) || (($sort == 1) && (!empty($SUB)))) {
// Is highest position
- $NAVI = "<a href=\"{!URL!}/modules.php?module=admin&what=adminedit&sub=".$SUB."&act=".$act."&w=".$wht."&tid=".($sort+1)."&fid=".$sort."\">{!LOWER!}</a>";
- }
- elseif ($cnt == $max)
- {
+ $NAVI = "<a href=\"{!URL!}/modules.php?module=admin&what=adminedit&sub={!__SUB_VALUE!}&act=".$act."&w=".$wht."&tid=".($sort+1)."&fid=".$sort."\">{--LOWER--}</a>";
+ } elseif ($cnt == $max) {
// Is lowest position
- $NAVI = "<a href=\"{!URL!}/modules.php?module=admin&what=adminedit&sub=".$SUB."&act=".$act."&w=".$wht."&tid=".($sort-1)."&fid=".$sort."\">{!HIGHER!}</a>";
- }
- elseif ($sort > 0)
- {
+ $NAVI = "<a href=\"{!URL!}/modules.php?module=admin&what=adminedit&sub={!__SUB_VALUE!}&act=".$act."&w=".$wht."&tid=".($sort-1)."&fid=".$sort."\">{--HIGHER--}</a>";
+ } elseif ($sort > 0) {
// Anything else between highest and lowest
- $NAVI = "<a href=\"{!URL!}/modules.php?module=admin&what=adminedit&sub=".$SUB."&act=".$act."&w=".$wht."&tid=".($sort-1)."&fid=".$sort."\">{!HIGHER!}</a>/<a href=\"{!URL!}/modules.php?module=admin&what=adminedit&sub=".$SUB."&act=".$act."&w=".$wht."&tid=".($sort+1)."&fid=".$sort."\">{!LOWER!}</a>";
+ $NAVI = "<a href=\"{!URL!}/modules.php?module=admin&what=adminedit&sub={!__SUB_VALUE!}&act=".$act."&w=".$wht."&tid=".($sort-1)."&fid=".$sort."\">{--HIGHER--}</a>/<a href=\"{!URL!}/modules.php?module=admin&what=adminedit&sub={!__SUB_VALUE!}&act=".$act."&w=".$wht."&tid=".($sort+1)."&fid=".$sort."\">{--LOWER--}</a>";
}
- if (empty($act)) $act = " ";
+ if (empty($act)) $act = " ";
if (empty($wht)) $wht = " ";
- if (empty($title)) $title = " ";
+ if (empty($title)) $title = " ";
$content = array(
'sw' => $SW,
'navi' => $NAVI,
'mode' => "admin",
);
+
$OUT .= LOAD_TEMPLATE("admin_menu_overview_row", true, $content);
$SW = 3 - $SW;
}
// Load template
LOAD_TEMPLATE("admin_amenu_edit");
- }
- else
- {
+ } else {
// Menu entries are missing... (???)
LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_NO_MENUS_FOUND'));
}
SQL_FREERESULT($result);
// Does already exist
- $msg = "<div class=\"admin_failed\">{!ADMIN_PAYOUT_TYPE_ALREADY!}</div>";
+ $msg = "<div class=\"admin_failed\">{--ADMIN_PAYOUT_TYPE_ALREADY--}</div>";
}
}
// Does your members request payouts?
if ((SQL_NUMROWS($result_mem) > 0) && ($display)) {
// Members has requested payouts
- LOAD_TEMPLATE("admin_settings_saved", false, "<a href=\"{!URL!}/modules.php?module=admin&what=list_payouts\">{!ADMIN_PAYOUT_LIST_REQUESTS!}</a></P>");
+ LOAD_TEMPLATE("admin_settings_saved", false, "<a href=\"{!URL!}/modules.php?module=admin&what=list_payouts\">{--ADMIN_PAYOUT_LIST_REQUESTS--}</a></P>");
} elseif ($display) {
// No member requests so far
LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_PAYOUT_NO_MEMBER_REQUESTS'));
// Get number of menu entries
$max = SQL_NUMROWS($result);
- if ($max > 0)
- {
+ if ($max > 0) {
// Set sub value
define('__SUB_VALUE', $SUB);
- $SW = 2; $cnt = 0; $OUT = "";
- while (list($id, $act, $wht, $title, $sort) = SQL_FETCHROW($result))
- {
+ // Init variables
+ $SW = 2;
+ $cnt = 0;
+ $OUT = "";
+
+ while (list($id, $act, $wht, $title, $sort) = SQL_FETCHROW($result)) {
$cnt++;
if (($sort == 0) || (($sort == 1) && (!empty($SUB)))) {
// Is highest position
- $NAVI = "<a href=\"{!URL!}/modules.php?module=admin&what=guestedit&sub=".__SUB_VALUE."&act=".$act."&w=".$wht."&tid=".($sort+1)."&fid=".$sort."\">{!LOWER!}</a>";
+ $NAVI = "<a href=\"{!URL!}/modules.php?module=admin&what=guestedit&sub={!__SUB_VALUE!}&act=".$act."&w=".$wht."&tid=".($sort+1)."&fid=".$sort."\">{--LOWER--}</a>";
} elseif ($cnt == $max) {
// Is lowest position
- $NAVI = "<a href=\"{!URL!}/modules.php?module=admin&what=guestedit&sub=".__SUB_VALUE."&act=".$act."&w=".$wht."&tid=".($sort-1)."&fid=".$sort."\">{!HIGHER!}</a>";
+ $NAVI = "<a href=\"{!URL!}/modules.php?module=admin&what=guestedit&sub={!__SUB_VALUE!}&act=".$act."&w=".$wht."&tid=".($sort-1)."&fid=".$sort."\">{--HIGHER--}</a>";
} elseif ($sort > 0) {
// Anything else between highest and lowest
- $NAVI = "<a href=\"{!URL!}/modules.php?module=admin&what=guestedit&sub=".__SUB_VALUE."&act=".$act."&w=".$wht."&tid=".($sort-1)."&fid=".$sort."\">{!HIGHER!}</a>/<a href=\"{!URL!}/modules.php?module=admin&what=guestedit&sub=".__SUB_VALUE."&act=".$act."&w=".$wht."&tid=".($sort+1)."&fid=".$sort."\">{!LOWER!}</a>";
+ $NAVI = "<a href=\"{!URL!}/modules.php?module=admin&what=guestedit&sub={!__SUB_VALUE!}&act=".$act."&w=".$wht."&tid=".($sort-1)."&fid=".$sort."\">{--HIGHER--}</a>/<a href=\"{!URL!}/modules.php?module=admin&what=guestedit&sub={!__SUB_VALUE!}&act=".$act."&w=".$wht."&tid=".($sort+1)."&fid=".$sort."\">{--LOWER--}</a>";
}
- if (empty($act)) $act = " ";
+ if (empty($act)) $act = " ";
if (empty($wht)) $wht = " ";
- if (empty($title)) $title = " ";
+ if (empty($title)) $title = " ";
$content = array(
'sw' => $SW,
'id' => $id,
define('__BEG_WITHDRAW_FORM', LOAD_TEMPLATE("admin_list_beg_form", true));
} else {
// Display message "no manual withdraw possible"
- define('__BEG_WITHDRAW_FORM', "<div class=\"admin_failed\">{!ADMIN_BEG_ALREADY_WITHDRAW!}</div>");
+ define('__BEG_WITHDRAW_FORM', "<div class=\"admin_failed\">{--ADMIN_BEG_ALREADY_WITHDRAW--}</div>");
}
// Prepare constant for timemark
define('__BONUS_WITHDRAW_FORM', LOAD_TEMPLATE("admin_list_bonus_form", true));
} else {
// Display message "no manual withdraw possible"
- define('__BONUS_WITHDRAW_FORM', "<div class=\"admin_failed\">{!ADMIN_BONUS_ALREADY_WITHDRAW!}</div>");
+ define('__BONUS_WITHDRAW_FORM', "<div class=\"admin_failed\">{--ADMIN_BONUS_ALREADY_WITHDRAW--}</div>");
}
// Prepare constant for timemark
array(bigintval($_GET['u_id']), bigintval($cid)), __FILE__, __LINE__);
// Set selection
- $SELECTED = "<font color=\"red\">{!NO!}</div>";
- if (SQL_NUMROWS($result_user) == 1) $SELECTED = "<font color=\"green\">{!YES!}</div>";
+ $SELECTED = "<font color=\"red\">{--NO--}</div>";
+ if (SQL_NUMROWS($result_user) == 1) $SELECTED = "<font color=\"green\">{--YES--}</div>";
// Prepare array for the row template
$content = array(
'type' => $_GET['type']
));
$SW = 2;
- while (list($id, $admin, $uid, $type, $subj, $text, $created) = SQL_FETCHROW($result_tasks))
- {
+ while (list($id, $admin, $uid, $type, $subj, $text, $created) = SQL_FETCHROW($result_tasks)) {
$infos = "---";
- if ($admin == "0")
- {
+ if ($admin == "0") {
// No admin currently is assigned
- $admin = "<div class=\"admin_note\">{!ADMIN_NO_ADMIN_ASSIGNED!}</div>";
- }
- else
- {
+ $admin = "<div class=\"admin_note\">{--ADMIN_NO_ADMIN_ASSIGNED--}</div>";
+ } else {
// Load admin's data
$login = GET_ADMIN_LOGIN($admin);
- if ($login != "***")
- {
+ if ($login != "***") {
// Admin found
$admin = "<a href=\"{!URL!}/modules.php?module=admin&what=admins_contct&admin=".$admin."\">".$login."</a>";
- }
- else
- {
+ } else {
// Maybe deleted?
$admin = "<div class=\"admin_note\">".ADMIN_ID_404_1.$admin.ADMIN_ID_404_2."</div>";
}
$cnt++;
if (($sort == 0) || (($sort == 1) && (!empty($SUB)))) {
// Is highest position
- $NAVI = "<a href=\"{!URL!}/modules.php?module=admin&what=memedit&sub=".$SUB."&act=".$act."&w=".$wht."&tid=".($sort+1)."&fid=".$sort."\">{!LOWER!}</a>";
+ $NAVI = "<a href=\"{!URL!}/modules.php?module=admin&what=memedit&sub={!__SUB_VALUE!}&act=".$act."&w=".$wht."&tid=".($sort+1)."&fid=".$sort."\">{--LOWER--}</a>";
} elseif ($cnt == $max) {
// Is lowest position
- $NAVI = "<a href=\"{!URL!}/modules.php?module=admin&what=memedit&sub=".$SUB."&act=".$act."&w=".$wht."&tid=".($sort-1)."&fid=".$sort."\">{!HIGHER!}</a>";
+ $NAVI = "<a href=\"{!URL!}/modules.php?module=admin&what=memedit&sub={!__SUB_VALUE!}&act=".$act."&w=".$wht."&tid=".($sort-1)."&fid=".$sort."\">{--HIGHER--}</a>";
} elseif ($sort > 0) {
// Anything else between highest and lowest
- $NAVI = "<a href=\"{!URL!}/modules.php?module=admin&what=memedit&sub=".$SUB."&act=".$act."&w=".$wht."&tid=".($sort-1)."&fid=".$sort."\">{!HIGHER!}</a>/<a href=\"{!URL!}/modules.php?module=admin&what=memedit&sub=".$SUB."&act=".$act."&w=".$wht."&tid=".($sort+1)."&fid=".$sort."\">{!LOWER!}</a>";
+ $NAVI = "<a href=\"{!URL!}/modules.php?module=admin&what=memedit&sub={!__SUB_VALUE!}&act=".$act."&w=".$wht."&tid=".($sort-1)."&fid=".$sort."\">{--HIGHER--}</a>/<a href=\"{!URL!}/modules.php?module=admin&what=memedit&sub={!__SUB_VALUE!}&act=".$act."&w=".$wht."&tid=".($sort+1)."&fid=".$sort."\">{--LOWER--}</a>";
}
if (empty($act)) $act = " ";
if (empty($wht)) $wht = " ";
if (empty($title)) $title = " ";
+
$content = array(
'sw' => $SW,
'id' => $id,
// Is the loaded theme name != current theme name?
$LINK = $unix;
- if ($unix != GET_CURR_THEME()) $LINK = "<a href=\"{!URL!}/modules.php?module=admin&what=theme_edit&default_theme=".$unix."\" title=\"{!ADMIN_SET_AS_NEW_THEME!}\">".$unix."</a>";
+ if ($unix != GET_CURR_THEME()) $LINK = "<a href=\"{!URL!}/modules.php?module=admin&what=theme_edit&default_theme=".$unix."\" title=\"{--ADMIN_SET_AS_NEW_THEME--}\">".$unix."</a>";
// Prepare data for the row template
$content = array(
// Check if current theme is already imported or not
if (THEME_CHECK_EXIST($unix)) {
// Already installed
- $FOUND = "<div class=\"admin_note\">{!ADMIN_THEME_ALREADY_INSTALLED!}</div>";
+ $FOUND = "<div class=\"admin_note\">{--ADMIN_THEME_ALREADY_INSTALLED--}</div>";
} else {
// Theme not installed
$FOUND = "<form action=\"{!URL!}/modules.php?module=admin&what=theme_import\" method=\"POST\">
- <input type=\"submit\" name=\"ok\" class=\"admin_submit\" value=\"{!ADMIN_INSTALL_THEME!}\" />
+ <input type=\"submit\" name=\"ok\" class=\"admin_submit\" value=\"{--ADMIN_INSTALL_THEME--}\" />
<input type=\"hidden\" name=\"theme\" value=\"".$unix."\" />
</form>";
}
// Is a newer version available?
if (empty($ONLINE['version'])) {
// Disconnected?
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"admin_failed\">{!ADMIN_CANNOT_CHECK_VERSION!} (".$ONLINE['code'].")</div>");
-} elseif (($ONLINE['version'] != FULL_VERSION) || ($ONLINE['revision'] != CURR_SVN_REVISION)) {
+ LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"admin_failed\">{--ADMIN_CANNOT_CHECK_VERSION--} (".$ONLINE['code'].")</div>");
+} elseif (($ONLINE['version'] != constant('FULL_VERSION')) || ($ONLINE['revision'] != constant('CURR_SVN_REVISION'))) {
// New full-version available (all previous released patches are included in this version!)
define('__ONLINE_VERSION', $ONLINE['version']);
define('__ONLINE_CHANGE' , MAKE_DATETIME($ONLINE['changed'], "2"));
LOAD_TEMPLATE("admin_update_download");
} else {
// You have the latest version!
- LOAD_TEMPLATE("admin_settings_saved", false, NO_UPDATES_AVAILABLE);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('NO_UPDATES_AVAILABLE'));
}
//
}
// Initial message part
-$MSG = "<strong>{!VALIDATING_LOGIN!}</strong>";
+$MSG = "<strong>{--VALIDATING_LOGIN--}</strong>";
if (!empty($GLOBALS['userid']) && (isSessionVariableSet('u_hash'))) {
// Login failures are supported since 0.4.7
if (($bonus) && ($_GET['mode'] == "bonus") && (EXT_IS_ACTIVE("bonus"))) {
// Output message with added points
$MSG .= "<div class=\"tiny\">
- {!BONUS_LOGIN_BONUS_ADDED_1!}
+ {--BONUS_LOGIN_BONUS_ADDED_1--}
<strong>".TRANSLATE_COMMA(getConfig('login_bonus'))." {!POINTS!}</strong>
- {!BONUS_LOGIN_BONUS_ADDED_2!}
+ {--BONUS_LOGIN_BONUS_ADDED_2--}
</div>";
} elseif (EXT_IS_ACTIVE("bonus")) {
// No login bonus added!
- $MSG .= "<div class=\"member_failed\">{!BONUS_LOGIN_BONUS_NOT_ADDED!}</div>";
+ $MSG .= "<div class=\"member_failed\">{--BONUS_LOGIN_BONUS_NOT_ADDED--}</div>";
}
// Redirect to member area
break;
case "test_top":
- LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"guest_done\">{!GUEST_FRAMETESTER_TOP!}</span>");
+ LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"guest_done\">{--GUEST_FRAMETESTER_TOP--}</span>");
break;
case "back": // Back buttom
$OUT = LOAD_TEMPLATE("theme_one", true);
} elseif (IS_ADMIN()) {
// If there is no theme installed and there's an admin notify him!
- $OUT = LOAD_TEMPLATE("admin_settings_saved", true, "<div class=\"admin_note\">{!ADMIN_NO_THEME_INSTALLED_WARNING!}</div>");
+ $OUT = LOAD_TEMPLATE("admin_settings_saved", true, "<div class=\"admin_note\">{--ADMIN_NO_THEME_INSTALLED_WARNING--}</div>");
}
// Remember
// Did this work?
if ($userid == 0) {
// Something bad happened!
- LOAD_TEMPLATE("admin_settings_saved", false, USER_NOT_REGISTERED);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('USER_NOT_REGISTERED'));
return;
} // END - if
SEND_ADMIN_NOTIFICATION(getMessage('ADMIN_NEW_ACCOUNT'), "register-admin", $DATA, $userid);
// Output success registration
- LOAD_TEMPLATE("admin_settings_saved", false, REGISTRATION_DONE);
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('REGISTRATION_DONE'));
} else {
if ($_POST['agree'] == "!") {
- OUTPUT_HTML("<div class=\"register_failed\">".HAVE_TO_AGREE."</div>");
+ OUTPUT_HTML("<div class=\"register_failed\">{--HAVE_TO_AGREE--}</div>");
} // END - if
if ($_POST['addy'] == "!") {
- OUTPUT_HTML("<div class=\"register_failed\">".ENTER_EMAIL."</div>");
+ OUTPUT_HTML("<div class=\"register_failed\">{--ENTER_EMAIL--}</div>");
$_POST['addy'] = "";
} elseif ($_POST['addy'] == "?") {
- OUTPUT_HTML("<div class=\"register_failed\">".EMAIL_ALREADY_DB."</div>");
+ OUTPUT_HTML("<div class=\"register_failed\">{--EMAIL_ALREADY_DB--}</div>");
$_POST['addy'] = "";
}
if ($_POST['surname'] == "!") {
- OUTPUT_HTML("<div class=\"register_failed\">".ENTER_SURNAME."</div>");
+ OUTPUT_HTML("<div class=\"register_failed\">{--ENTER_SURNAME--}</div>");
$_POST['surname'] = "";
} // END - if
if ($_POST['family_name'] == "!") {
- OUTPUT_HTML("<div class=\"register_failed\">".ENTER_FAMILY."</div>");
+ OUTPUT_HTML("<div class=\"register_failed\">{--ENTER_FAMILY--}</div>");
$_POST['family_name'] = "";
} // END - if
if (($_POST['pass1'] == "!") && ($_POST['pass2'] == "!")) {
- OUTPUT_HTML("<div class=\"register_failed\">".ENTER_BOTH_PASSWORDS."</div>");
+ OUTPUT_HTML("<div class=\"register_failed\">{--ENTER_BOTH_PASSWORDS--}</div>");
} elseif ($_POST['pass1'] == "!") {
- OUTPUT_HTML("<div class=\"register_failed\">".ENTER_PASS1."</div>");
+ OUTPUT_HTML("<div class=\"register_failed\">{--ENTER_PASS1--}</div>");
} elseif ($_POST['pass2'] == "!") {
- OUTPUT_HTML("<div class=\"register_failed\">".ENTER_PASS2."</div>");
+ OUTPUT_HTML("<div class=\"register_failed\">{--ENTER_PASS2--}</div>");
}
- if ($SHORT_PASS) {
- OUTPUT_HTML("<div class=\"register_failed\">{!SHORT_PASS!}: ".getConfig('pass_len')."</div>");
+ if ($SHORT_PASS === true) {
+ OUTPUT_HTML("<div class=\"register_failed\">{--SHORT_PASS--}: ".getConfig('pass_len')."</div>");
} // END - if
- if ($IP_TIMEOUT) {
- OUTPUT_HTML("<div class=\"register_failed\">{!REMOTE_ADDR_TIMEOUT!}</div>");
+ if ($IP_TIMEOUT === true) {
+ OUTPUT_HTML("<div class=\"register_failed\">{--REMOTE_ADDR_TIMEOUT--}</div>");
} // END - if
if ((!empty($cats)) && ($cats < getConfig('least_cats'))) {
- OUTPUT_HTML("<div class=\"register_failed\">{!CATS_LEAST!}: ".getConfig('least_cats')."</div>");
+ OUTPUT_HTML("<div class=\"register_failed\">{--CATS_LEAST--}: ".getConfig('least_cats')."</div>");
} // END - if
// Generate birthday selection
// Output header
OUTPUT_HTML("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"guest_table dashed\" width=\"310\">
<tr>
- <td align=\"center\" class=\"guest_stats_title bottom2\" colspan=\"2\"><strong>{!GUEST_TOPTEN_STATS!}</strong></td>
+ <td align=\"center\" class=\"guest_stats_title bottom2\" colspan=\"2\"><strong>{--GUEST_TOPTEN_STATS--}</strong></td>
</tr>");
}
if (SQL_NUMROWS($guest_t10) > 0) {
// Guest clicks
OUTPUT_HTML("<tr>
- <td align=\"center\" class=\"guest_title2 bottom2\" colspan=\"2\">{!GUEST_TOP_GUEST_STATS!}</td>
+ <td align=\"center\" class=\"guest_title2 bottom2\" colspan=\"2\">{--GUEST_TOP_GUEST_STATS--}</td>
</tr>");
$SW = 2;
while (list($clicks, $title) = SQL_FETCHROW($guest_t10)) {
if (SQL_NUMROWS($guest_t10) > 0) {
// Guest clicks
OUTPUT_HTML("<tr>
- <td align=\"center\" class=\"guest_title2 bottom2\" colspan=\"2\">{!GUEST_TOP_MEMBER_STATS!}</td>
+ <td align=\"center\" class=\"guest_title2 bottom2\" colspan=\"2\">{--GUEST_TOP_MEMBER_STATS--}</td>
</tr>");
$SW = 2;
while (list($clicks, $title) = SQL_FETCHROW($mem_t10)) {
break;
case "INACTIVE": // Deactivated stats
- LOAD_TEMPLATE("admin_settings_saved", false, "<strong>{!GUEST_STATS_DEACTIVATED!}</strong>");
+ LOAD_TEMPLATE("admin_settings_saved", false, "<strong>{--GUEST_STATS_DEACTIVATED--}</strong>");
break;
}
FROM
`{!_MYSQL_PREFIX!}_user_data` AS d
LEFT JOIN
- {!MYSQL_PREFIX!}_user_points AS p
+ {!_MYSQL_PREFIX!}_user_points AS p
ON
p.userid=d.userid
WHERE
FROM
`{!_MYSQL_PREFIX!}_user_data` AS d
LEFT JOIN
- {!MYSQL_PREFIX!}_refsystem AS r
+ {!_MYSQL_PREFIX!}_refsystem AS r
ON
r.userid=d.userid
WHERE
$OUT = LOAD_TEMPLATE("theme_one", true);
} elseif (IS_ADMIN()) {
// If there is no theme installed and there's an admin notify him!
- $OUT = LOAD_TEMPLATE("admin_settings_saved", true, "<div class=\"admin_note\">{!ADMIN_NO_THEME_INSTALLED_WARNING!}</div>");
+ $OUT = LOAD_TEMPLATE("admin_settings_saved", true, "<div class=\"admin_note\">{--ADMIN_NO_THEME_INSTALLED_WARNING--}</div>");
}
// Remember
// Load status
$result = SQL_QUERY_ESC("SELECT nl_receive, nl_until, nl_timespan FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
- array($GLOBALS['userid']), __FILE__, __LINE__);
+ array($GLOBALS['userid']), __FILE__, __LINE__);
list($status, $until, $span) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
// Remember charge value
define('__CHARGE_VALUE', TRANSLATE_COMMA(getConfig('nl_charge')));
-if ((isset($_POST['ok'])) && ($status == "Y") && ($span == "0"))
-{
+if ((isset($_POST['ok'])) && ($status == "Y") && ($span == "0")) {
// Save request
SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET nl_timespan='".(getConfig('one_day') * 30)."' WHERE userid=%s LIMIT 1",
array($GLOBALS['userid']), __FILE__, __LINE__);
// Add task
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_task_system` (assigned_admin, status, task_type, subject, text, task_created, userid)
-VALUES ('0','NEW','NL_UNSUBSCRIBE','{!ADMIN_NL_SUBJECT!}','".$admin_msg."', UNIX_TIMESTAMP(),'%s')", array($GLOBALS['userid']), __FILE__, __LINE__);
+VALUES ('0','NEW','NL_UNSUBSCRIBE','{--ADMIN_NL_SUBJECT--}','".$admin_msg."', UNIX_TIMESTAMP(),'%s')", array($GLOBALS['userid']), __FILE__, __LINE__);
// Send mail to member
$msg = LOAD_EMAIL_TEMPLATE("member_newsletter_request", array(), $GLOBALS['userid']);
- SEND_EMAIL($GLOBALS['userid'], NL_MEMBER_SUBJECT, $msg);
+ SEND_EMAIL($GLOBALS['userid'], getMessage('NL_MEMBER_SUBJECT'), $msg);
// Send mail to all admins
- SEND_ADMIN_NOTIFICATION(NL_ADMIN_SUBJECT, "admin_newsletter_request", array(), $GLOBALS['userid']);
+ SEND_ADMIN_NOTIFICATION(getMessage('NL_ADMIN_SUBJECT'), "admin_newsletter_request", array(), $GLOBALS['userid']);
// Display message
- LOAD_TEMPLATE("admin_settings_saved", false, NL_MEMBER_REQUEST_DONE);
-}
- elseif ($span > 0)
-{
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('NL_MEMBER_REQUEST_DONE'));
+} elseif ($span > 0) {
// Already ordered
- LOAD_TEMPLATE("admin_settings_saved", false, NL_MEMBER_REQUEST_ALREADY);
-}
- else
-{
+ LOAD_TEMPLATE("admin_settings_saved", false, getMessage('NL_MEMBER_REQUEST_ALREADY'));
+} else {
// Load template for the note
define('NL_MEMBER_NOTE', LOAD_TEMPLATE("member_newsletter_note", true));
switch ($status)
{
case "Y": // Receives the newsletter
- define('__STATUS_VALUE', NL_MEMBER_ON);
- define('__UNTIL_VALUE', "");
- define('NL_SUBMIT', NL_MEMBER_SUBMIT_OFF);
+ define('__STATUS_VALUE', getMessage('NL_MEMBER_ON'));
+ define('__UNTIL_VALUE' , "");
+ define('NL_SUBMIT' , getMessage('NL_MEMBER_SUBMIT_OFF'));
break;
case "N": // Does not receive the newsletter
- define('__STATUS_VALUE', NL_MEMBER_OFF);
- define('__UNTIL_VALUE', MAKE_DATETIME($until, "2"));
- define('NL_SUBMIT', NL_MEMBER_SUBMIT_ON);
+ define('__STATUS_VALUE', getMessage('NL_MEMBER_OFF'));
+ define('__UNTIL_VALUE' , MAKE_DATETIME($until, "2"));
+ define('NL_SUBMIT' , getMessage('NL_MEMBER_SUBMIT_ON'));
break;
}
// Load template and member settings
LOAD_TEMPLATE("member_newsletter");
}
+
//
?>
// Finally contruct the message
// @TODO Rewrite this old lost code to a template
- $MSG = "{!MEMBER_URL_TIME_LOCK!}<br />{!CONFIG_URL_TLOCK!} ".$STD."
- {!_HOURS!}, ".$MIN." {!_MINUTES!} {!_AND!} ".$SEC." {!_SECONDS!}<br />
- {!MEMBER_LAST_TLOCK!}: ".$LORDER;
+ $MSG = "{--MEMBER_URL_TIME_LOCK--}<br />{--CONFIG_URL_TLOCK--} ".$STD."
+ {--_HOURS--}, ".$MIN." {--_MINUTES--} {--_AND--} ".$SEC." {--_SECONDS--}<br />
+ {--MEMBER_LAST_TLOCK--}: ".$LORDER;
break;
case constant('CODE_OVERLENGTH'):
break;
case constant('CODE_BLIST_URL'):
- $MSG = "{!MEMBER_URL_BLACK_LISTED!}<br />\n{!MEMBER_BLIST_TIME!}: ".MAKE_DATETIME($_GET['blist'], "0");
+ $MSG = "{--MEMBER_URL_BLACK_LISTED--}<br />\n{--MEMBER_BLIST_TIME--}: ".MAKE_DATETIME($_GET['blist'], "0");
break;
case constant('CODE_NO_RECS_LEFT'):
break;
case constant('CODE_MORE_RECEIVERS3'):
- $MSG = "{!MEMBER_ENTER_MORE_MIN_RECEIVERS_1!}".getConfig('order_min')."{!MEMBER_ENTER_MORE_MIN_RECEIVERS_2!}";
+ $MSG = "{--MEMBER_ENTER_MORE_MIN_RECEIVERS_1--}".getConfig('order_min')."{--MEMBER_ENTER_MORE_MIN_RECEIVERS_2--}";
break;
case constant('CODE_INVALID_URL'):
default:
DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown error code %s detected.", $_GET['msg']));
- $MSG = "{!UNKNOWN_CODE_1!}".$_GET['msg']."{!UNKNOWN_CODE_2!}";
+ $MSG = "{--UNKNOWN_CODE_1--}".$_GET['msg']."{--UNKNOWN_CODE_2--}";
break;
}
foreach ($CATS['id'] as $key => $value) {
$CAT .= " <option value=\"".$value."\"";
if (($OLD_ORDER) && ($cat == $value)) $CAT .= " selected=\"selected\"";
- $CAT .= ">".$CATS['name'][$key]." (".$CATS['uids'][$key]." {!USER_IN_CAT!})</option>\n";
+ $CAT .= ">".$CATS['name'][$key]." (".$CATS['uids'][$key]." {--USER_IN_CAT--})</option>\n";
} // END - foreach
// Mail type
// Output option line
$type .= " <option value=\"".$typeS[$key][0]."\"";
if (($OLD_ORDER) && ($payment == $typeS[$key][0])) $type .= " selected=\"selected\"";
- $type .= ">".$P." {!PER_MAIL!} - ".$typeS[$key][3]." - ".round($typeS[$key][2])." {!PAYMENT!}</option>\n";
+ $type .= ">".$P." {--PER_MAIL--} - ".$typeS[$key][3]." - ".round($typeS[$key][2])." {--PAYMENT--}</option>\n";
} // END - if
} // END - foreach
}
} else {
// No mail types defined
- LOAD_TEMPLATE("admin_settings_saved", false, "<span class=\"member_failed\">{!MEMBER_NO_PAYMENTS!}</span>");
+ LOAD_TEMPLATE("admin_settings_saved", false, "<span class=\"member_failed\">{--MEMBER_NO_PAYMENTS--}</span>");
}
} else {
- // No points left!
- LOAD_TEMPLATE("admin_settings_saved", false, "<span class=\"member_failed\">{!MEMBER_NO_POINTS!}</span>");
+ // No points left
+ LOAD_TEMPLATE("admin_settings_saved", false, "<span class=\"member_failed\">{--MEMBER_NO_POINTS--}</span>");
}
} else {
// No cateogries are defined yet
- LOAD_TEMPLATE("admin_settings_saved", false, "<span class=\"member_failed\">{!MEMBER_NO_CATS!}</span>");
+ LOAD_TEMPLATE("admin_settings_saved", false, "<span class=\"member_failed\">{--MEMBER_NO_CATS--}</span>");
}
} elseif ($mmails == "0") {
- // Please set more than 0 mails per day!
+ // Please set more than 0 mails per day
LOAD_TEMPLATE("admin_settings_saved", false, getMessage('MEMBER_HAS_ZERO_MMAILS'));
} else {
- // Please confirm some mails first!
+ // Please confirm some mails first
LOAD_TEMPLATE("admin_settings_saved", false, MEMBER_LINKS_LEFT_1.$links.MEMBER_LINKS_LEFT_2.getConfig('unconfirmed').MEMBER_LINKS_LEFT_3);
}
// Check if the user setups his MySQL stuff...
if ((empty($MySQL['login'])) && (!defined('mxchange_installing')) && (!isset($_GET['installing'])) && (isBooleanConstantAndTrue('mxchange_installed'))) {
// No login entered and outside installation mode
- OUTPUT_HTML("<strong>{!LANG_WARNING!}:</strong> ");
+ OUTPUT_HTML("<strong>{--LANG_WARNING--}:</strong> ");
if (isBooleanConstantAndTrue('mxchange_installed')) {
// You have changed my configuration file!
- mxchange_die("{!DIE_CONFIG_CHANGED_YOU!}");
+ mxchange_die("{--DIE_CONFIG_CHANGED_YOU--}");
} else {
// Please run the installation script (maybe again)
- mxchange_die("{!DIE_RUN_INSTALL_MYSQL!}");
+ mxchange_die("{--DIE_RUN_INSTALL_MYSQL--}");
}
} elseif ((!isBooleanConstantAndTrue('mxchange_installing')) && (!isset($_GET['installing'])) && (empty($MySQL['password'])) && (isBooleanConstantAndTrue('warn_no_pass'))) {
// No database password entered!!!
- OUTPUT_HTML("<div>{!LANG_WARNING!}:</div> {!WARN_NULL_PASSWORD!}");
+ OUTPUT_HTML("<div>{--LANG_WARNING--}:</div> {--WARN_NULL_PASSWORD--}");
}
// Set dummy $_CONFIG array
}
if ((!isset($NAV_DEPTH)) && (!$return)) {
$NAV_DEPTH = 0;
- $prefix = "<div class=\"you_are_here\">{!YOU_ARE_HERE!} <strong><a class=\"you_are_here\" href=\"{!URL!}/modules.php?module=".$GLOBALS['module'].$LINK_ADD."\">Home</a></strong>";
+ $prefix = "<div class=\"you_are_here\">{--YOU_ARE_HERE--} <strong><a class=\"you_are_here\" href=\"{!URL!}/modules.php?module=".$GLOBALS['module'].$LINK_ADD."\">Home</a></strong>";
} else {
if (!$return) $NAV_DEPTH++;
$prefix = "";
} // END - switch
} else {
// Could not load profile data
- $content = "<span class=\"member_failed\">{!MEMBER_CANNOT_LOAD_PROFILE!}</span>";
+ $content = "<span class=\"member_failed\">{--MEMBER_CANNOT_LOAD_PROFILE--}</span>";
}
} else {
// Passwords mismatch
- $content = "<span class=\"member_failed\">{!MEMBER_PASSWORD_ERROR!}</span>";
+ $content = "<span class=\"member_failed\">{--MEMBER_PASSWORD_ERROR--}</span>";
}
} else {
// Could not load profile
- $content = "<span class=\"member_failed\">{!MEMBER_CANNOT_LOAD_PROFILE!}</span>";
+ $content = "<span class=\"member_failed\">{--MEMBER_CANNOT_LOAD_PROFILE--}</span>";
}
// Send email to user if required
SEND_ADMIN_NOTIFICATION($sub_adm, $msg_admin, $content, $GLOBALS['userid']);
} elseif (getConfig('admin_notify') == "Y") {
// Cannot send mails to admin!
- $content = CANNOT_SEND_ADMIN_MAILS;
+ $content = getMessage('CANNOT_SEND_ADMIN_MAILS');
} else {
// No mail to admin
- $content = "<span class=\"member_done\">".MYDATA_MAIL_SENT."</span>";
+ $content = "<span class=\"member_done\">{--MYDATA_MAIL_SENT--}</span>";
}
} // END - if
SQL_FREERESULT($result);
}
//
-function IS_DEMO() {
+function IS_DEMO () {
return ((EXT_IS_ACTIVE("demo")) && (get_session('admin_login') == "demo"));
}
//
// Load personal data 0 1 2 3 4 5 6
$result = SQL_QUERY_ESC("SELECT userid, email, gender, surname, family, last_update, joined
FROM
- {!MYSQL_PREFIX!}_user_data
+ {!_MYSQL_PREFIX!}_user_data
WHERE
(last_update < (UNIX_TIMESTAMP() - %s) AND last_update != 0 AND last_profile_sent < (UNIX_TIMESTAMP() - %s))
OR