* $Author:: $ *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team *
+ * Copyright (c) 2009 - 2013 by Mailer Developer Team *
* For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
$count = '0';
foreach (postRequestElement('sel') as $id => $sel) {
// Get the userid
- $result = SQL_QUERY_ESC("SELECT
- `userid`,`holiday_start`,`holiday_end`
+ $result = sqlQueryEscaped("SELECT
+ `userid`,
+ `holiday_start`,
+ `holiday_end`
FROM
`{?_MYSQL_PREFIX?}_user_holidays`
WHERE
`id`=%s
LIMIT 1", array(bigintval($id)), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 1) {
+ if (sqlNumRows($result) == 1) {
// Load data and free memory
- $content = SQL_FETCHARRAY($result);
+ $content = sqlFetchArray($result);
// Update user's account
- SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data`
+ sqlQueryEscaped("UPDATE `{?_MYSQL_PREFIX?}_user_data`
SET
`holiday_active`='N',
`holiday_activated`=0
LIMIT 1", array(bigintval($content['userid'])), __FILE__, __LINE__);
// Remove holiday
- SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM
+ sqlQueryEscaped("DELETE LOW_PRIORITY FROM
`{?_MYSQL_PREFIX?}_user_holidays`
WHERE
`id`=%s
} // END - if
// Free result
- SQL_FREERESULT($result);
+ sqlFreeResult($result);
} // END - foreach
// Display final message
$message = '{--ADMIN_HOLIDAY_SINGLE_404--}';
// Fetch data
- $result_load = SQL_QUERY_ESC("SELECT
+ $result_load = sqlQueryEscaped("SELECT
`holiday_start` AS `start`,
`holiday_end` AS `end`
FROM
`userid`=%s
LIMIT 1",
array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__);
- if (SQL_NUMROWS($result_load) == 1) {
+ if (sqlNumRows($result_load) == 1) {
// Load data
- $content = SQL_FETCHARRAY($result_load);
+ $content = sqlFetchArray($result_load);
// Delete one holiday request (for task)
- SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM
+ sqlQueryEscaped("DELETE LOW_PRIORITY FROM
`{?_MYSQL_PREFIX?}_user_holidays`
WHERE
`userid`=%s
} // END - if
// Free memory
- SQL_FREERESULT($result_load);
+ sqlFreeResult($result_load);
// Output message
displayMessage($message);