}
// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
// Init variable to avoid a notice
-$CATS = "";
+$CATS = '';
if (REQUEST_ISSET_POST(('add'))) {
// Add a new category
SQL_FREERESULT($result);
// Display message
- LOAD_TEMPLATE("admin_settings_saved", false, $content);
+ LOAD_TEMPLATE('admin_settings_saved', false, $content);
} elseif ((IS_FORM_SENT()) && (REQUEST_ISSET_POST(('id'))) && (is_array(REQUEST_POST('id')))) {
// Change or delete categories...
- $TEXT = "";
+ $TEXT = '';
foreach (REQUEST_POST('id') as $id => $cat) {
// Secure ID
$id = bigintval($id);
if (isset($TEXT)) {
// Display message
- LOAD_TEMPLATE("admin_settings_saved", false, $TEXT);
+ LOAD_TEMPLATE('admin_settings_saved', false, $TEXT);
}
} elseif ((REQUEST_ISSET_POST('del')) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
// Delete categories
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
foreach (REQUEST_POST('sel') as $id => $value) {
// Load data of category
$result = SQL_QUERY_ESC("SELECT cat FROM `{!_MYSQL_PREFIX!}_cats` WHERE id=%s LIMIT 1",
LOAD_TEMPLATE("admin_del_cats");
} elseif ((REQUEST_ISSET_POST('edit')) && (SELECTION_COUNT(REQUEST_POST('sel')) > 0)) {
// Edit categories
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
foreach (REQUEST_POST('sel') as $id => $value)
{
// Load data from the category
LOAD_TEMPLATE("admin_edit_cats");
} else {
// Init variable here
- $CATS = "";
+ $CATS = '';
// Load all categories
$result = SQL_QUERY("SELECT id, cat, visible, sort FROM `{!_MYSQL_PREFIX!}_cats` ORDER BY `sort`", __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Init variables
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
// List already existing categories for editing
while ($content = SQL_FETCHARRAY($result)) {