}
} else {
// Not found - open
- $OUT .= '<em style="cursor:help" class="notice" title="{%message,ADMIN_MENU_WHAT_404_TITLE=' . $content['sub_what'] . '%}">';
+ $OUT .= '<span class="bad" style="cursor:help" title="{%message,ADMIN_MENU_WHAT_404_TITLE=' . $content['sub_what'] . '%}">';
}
// Menu title
} // END - if
} else {
// Not found - close
- $OUT .= '</em>';
+ $OUT .= '</span>';
}
// Cunt it up
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'main_cnt=' . $main_cnt . ',getWhat()=' . getWhat());
if (SQL_NUMROWS($result_main) > $main_cnt) {
- // Add seperator
- $GLOBALS['rows'] .= loadTemplate('menu_seperator', true, $mode);
+ // Add separator
+ $GLOBALS['rows'] .= loadTemplate('menu_separator', true, $mode);
// Should we display adverts in this menu?
if ((isExtensionInstalledAndNewer('menu', '0.0.1')) && (getConfig($mode . '_menu_advert_enabled') == 'Y') && ($action != 'admin')) {
// Display advert template
$GLOBALS['rows'] .= loadTemplate('menu_' . $mode . '_advert_' . $action, true);
- // Add seperator again
- $GLOBALS['rows'] .= loadTemplate('menu_seperator', true, $mode);
+ // Add separator again
+ $GLOBALS['rows'] .= loadTemplate('menu_separator', true, $mode);
} // END - if
} // END - if
} // END - while
// Should we display adverts in this menu?
if ((isExtensionInstalledAndNewer('menu', '0.0.1')) && (getConfig($mode . '_menu_advert_enabled') == 'Y')) {
- // Add seperator again
- $GLOBALS['rows'] .= loadTemplate('menu_seperator', true, $mode);
+ // Add separator again
+ $GLOBALS['rows'] .= loadTemplate('menu_separator', true, $mode);
// Display advert template
$GLOBALS['rows'] .= loadTemplate('menu_' . $mode . '_advert_end', true);
// Count or sum whole table?
if ($countRows === true) {
// Count whole table
- $result = SQL_QUERY_ESC("SELECT COUNT(`%s`) AS `res` FROM `{?_MYSQL_PREFIX?}_%s`".$add,
+ $result = SQL_QUERY_ESC("SELECT COUNT(`%s`) AS `res` FROM `{?_MYSQL_PREFIX?}_%s`" . $add . ' LIMIT 1',
array(
$lookFor,
$tableName
), __FUNCTION__, __LINE__);
} else {
// Sum whole table
- $result = SQL_QUERY_ESC("SELECT SUM(`%s`) AS `res` FROM `{?_MYSQL_PREFIX?}_%s`".$add,
+ $result = SQL_QUERY_ESC("SELECT SUM(`%s`) AS `res` FROM `{?_MYSQL_PREFIX?}_%s`" . $add . ' LIMIT 1',
array(
$lookFor,
$tableName
} elseif (($countRows === true) || ($lookFor == 'userid')) {
// Count rows
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'COUNT!');
- $result = SQL_QUERY_ESC("SELECT COUNT(`%s`) AS `res` FROM `{?_MYSQL_PREFIX?}_%s` WHERE `%s`%s'%s'".$add,
+ $result = SQL_QUERY_ESC("SELECT COUNT(`%s`) AS `res` FROM `{?_MYSQL_PREFIX?}_%s` WHERE `%s`%s'%s'" . $add . ' LIMIT 1',
array(
$lookFor,
$tableName,
} else {
// Add all rows
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'SUM!');
- $result = SQL_QUERY_ESC("SELECT SUM(`%s`) AS `res` FROM `{?_MYSQL_PREFIX?}_%s` WHERE `%s`%s'%s'".$add,
+ $result = SQL_QUERY_ESC("SELECT SUM(`%s`) AS `res` FROM `{?_MYSQL_PREFIX?}_%s` WHERE `%s`%s'%s'" . $add . ' LIMIT 1',
array(
$lookFor,
$tableName,
}
} else {
// Data from database
- $SPEC = ', `' . $id . '`';
+ $SPEC = ',`' . $id . '`';
if (!empty($special)) {
- $SPEC = ', `' . $special . '` AS `special`';
+ $SPEC = ',`' . $special . '` AS `special`';
} // END - if
// Query the database
} // END - foreach
} else {
// No cateogries are defined yet
- $OUT = '<option class="notice">{--MEMBER_NO_CATEGORIES--}</option>';
+ $OUT = '<option class="bad">{--MEMBER_NO_CATEGORIES--}</option>';
}
// Return HTML code
}
// Creates a new task
-function createNewTask ($subject, $notes, $taskType, $userid = NULL, $adminId = '0', $strip = true) {
+function createNewTask ($subject, $notes, $taskType, $userid = NULL, $adminId = NULL, $strip = true) {
// Insert the task data into the database
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_task_system` (`assigned_admin`,`userid`,`status`,`task_type`,`subject`,`text`,`task_created`) VALUES (%s,%s,'NEW','%s','%s','%s', UNIX_TIMESTAMP())",
array(
- $adminId,
- $userid,
+ makeZeroToNull($adminId),
+ makeZeroToNull($userid),
$taskType,
$subject,
$notes