$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
+
// Add description as navigation point
-ADD_DESCR("admin", basename(__FILE__));
+ADD_DESCR("admin", __FILE__);
// Check for selected holidays
$SUM = 0;
{
// Get the userid
$result = SQL_QUERY_ESC("SELECT userid, holiday_start, holiday_end
-FROM "._MYSQL_PREFIX."_user_holidays
+FROM `{!_MYSQL_PREFIX!}_user_holidays`
WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1)
{
SQL_FREERESULT($result);
// Update user's account
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data
+ SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data`
SET holiday_active='N', holiday_activated='0'
WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__);
// Remove holiday
- $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_holidays
+ SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_holidays`
WHERE id=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__);
// Prepare loaded data for the
// Fetch data
$result_load = SQL_QUERY_ESC("SELECT holiday_start AS start, holiday_end AS end
-FROM "._MYSQL_PREFIX."_user_holidays
+FROM `{!_MYSQL_PREFIX!}_user_holidays`
WHERE userid=%s LIMIT 1", array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
if (SQL_NUMROWS($result_load) == 1)
{
unset($content[1]);
// Delete one holiday request (for task)
- $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_holidays
+ SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_holidays`
WHERE userid=%s LIMIT 1", array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
// Send email to user