} // END - if
// Is a userid assign?
- if ($taskData['userid'] > 0) {
+ if (isValidId($taskData['userid'])) {
// Then load his data!
if (fetchUserData($taskData['userid'])) {
// Fetch row
if (isValidId($content['userid'])) {
// Member found otherwise it's a system task
- $content['userid'] = generateUserProfileLink($content['userid']);
+ $content['userid'] = '{%pipe,generateUserProfileLink=' . $content['userid'] . '%}';
} else {
$content['userid'] = '{--ADMIN_IS_SYSTEM_TASK--}';
}
if (isAdmin()) $whereStatement = '';
// Get all categories
-$result = SQL_QUERY("SELECT `id`, `cat` FROM `{?_MYSQL_PREFIX?}_cats`".$whereStatement." ORDER BY `sort` ASC", __FILE__, __LINE__);
+$result = SQL_QUERY('SELECT `id`, `cat` FROM `{?_MYSQL_PREFIX?}_cats`' . $whereStatement . ' ORDER BY `sort` ASC', __FILE__, __LINE__);
// Are there entries?
if (!SQL_HASZERONUMS($result)) {
switch ($joined) {
case 'Y':
// Check if this category has an entry
- if (countSumTotalData(getMemberId(), 'user_cats', 'id', 'userid', TRUE, sprintf(" AND `cat_id`=%s", bigintval($categoryId))) == 0) {
+ if (countSumTotalData(getMemberId(), 'user_cats', 'id', 'userid', TRUE, sprintf(' AND `cat_id`=%s', bigintval($categoryId))) == 0) {
// No, so add it
- addSql(sprintf("INSERT INTO `{?_MYSQL_PREFIX?}_user_cats` (`userid`, `cat_id`) VALUES (%s,%s)", getMemberId(), bigintval($categoryId)));
+ addSql(sprintf('INSERT INTO `{?_MYSQL_PREFIX?}_user_cats` (`userid`, `cat_id`) VALUES (%s,%s)', getMemberId(), bigintval($categoryId)));
} // END - if
break;
case 'N':
- addSql(sprintf("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `userid`=%s AND `cat_id`=%s LIMIT 1", getMemberId(), bigintval($categoryId)));
+ addSql(sprintf('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `userid`=%s AND `cat_id`=%s LIMIT 1', getMemberId(), bigintval($categoryId)));
break;
} // END - switch
} // END - foreach
} // END - if
} else {
// Check if he has an entry
- if (countSumTotalData(getMemberId(), 'user_cats', 'id', 'userid', TRUE, sprintf(" AND `cat_id`=%s", bigintval($content['id']))) == 1) {
+ if (countSumTotalData(getMemberId(), 'user_cats', 'id', 'userid', TRUE, sprintf(' AND `cat_id`=%s', bigintval($content['id']))) == 1) {
$content['jn'] = '';
$content['jy'] = ' checked="checked"';
} // END - if
SQL_FREERESULT($result_holiday);
} // END - if
- if ($holidayContent['userid'] > 0) {
+ if (isValidId($holidayContent['userid'])) {
// Add receiver
array_push($TEST, $holidayContent['userid']);
$count++;
if (isAdmin()) $whereStatement = '';
// Display order form
- $result_cats = SQL_QUERY("SELECT
+ $result_cats = SQL_QUERY('SELECT
`id`,
`cat`
FROM
`{?_MYSQL_PREFIX?}_cats`
-".$whereStatement."
+' . $whereStatement . '
ORDER BY
- `sort` ASC", __FILE__, __LINE__);
+ `sort` ASC', __FILE__, __LINE__);
// Some categories found?
if (!SQL_HASZERONUMS($result_cats)) {
array_push($categories['name'], $categoriesContent['cat']);
// Select users in current category
- $result_userids = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `cat_id`=%s AND `userid` != '%s' ORDER BY `userid` ASC",
+ $result_userids = SQL_QUERY_ESC('SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `cat_id`=%s AND `userid` != %s ORDER BY `userid` ASC',
array(bigintval($categoriesContent['id']), getMemberId()), __FILE__, __LINE__);
$userid_cnt = '0';
if ($isHolidayActive === FALSE) {
// Check if the user want's to receive mails?
- $result_ver = SQL_QUERY_ESC("SELECT `zip` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s".$HTML." AND `receive_mails` > 0 AND `status`='CONFIRMED' LIMIT 1",
+ $result_ver = SQL_QUERY_ESC("SELECT `zip` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s" . $HTML . " AND `receive_mails` > 0 AND `status`='CONFIRMED' LIMIT 1",
array(bigintval($userid)), __FILE__, __LINE__);
if ((SQL_NUMROWS($result_ver) == 1) && (isPostRequestElementSet('zip')) && (isOrderMultiPageEnabled())) {