// Build main menu
$result_main = SQL_QUERY("SELECT action, title, descr FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE (what='' OR `what` IS NULL) ORDER BY `sort`, id DESC", __FILE__, __LINE__);
- if (SQL_NUMROWS($result_main) > 0)
- {
+ if (SQL_NUMROWS($result_main) > 0) {
$OUT = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"admin_menu_main\">
<tr><td colspan=\"2\" height=\"7\" class=\"seperator\"> </td></tr>\n";
- while (list($menu, $title, $descr) = SQL_FETCHROW($result_main))
- {
- if ((EXT_IS_ACTIVE("admins")) && (GET_EXT_VERSION("admins") > "0.2"))
- {
+ while (list($menu, $title, $descr) = SQL_FETCHROW($result_main)) {
+ if ((EXT_IS_ACTIVE("admins")) && (GET_EXT_VERSION("admins") > "0.2")) {
$ACL = ADMINS_CHECK_ACL($menu, "");
- }
- else
- {
+ } else {
// ACL is "allow"... hmmm
$ACL = true;
}
- if ($ACL)
- {
- if (!$SUB)
- {
+
+ if ($ACL === true) {
+ if (!$SUB) {
// Insert compiled menu title and description
$menuTitle[$menu] = $title;
$menuDesription[$menu] = $descr;
// Compile and run the code here. This inserts all constants into the
// HTML output. Costs me some time to figure this out... *sigh* Quix0r
- $eval = "\$OUT = \"".COMPILE_CODE(addslashes($OUT))."\";";
+ $eval = "\$OUT = \"".COMPILE_CODE(SQL_ESCAPE($OUT))."\";";
eval($eval);
// Is there a cache instance again?