X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-list_holiday.php;h=980b3744f783ac183d280ffa8b1954021eaf41cf;hb=132a12000d4bd4121e614f7b58024b676c89679f;hp=b6573bb1dd6872fa60dc75dda0497d6ecb899580;hpb=cf3765c38cf0a76f396aca291f71858936e92956;p=mailer.git diff --git a/inc/modules/admin/what-list_holiday.php b/inc/modules/admin/what-list_holiday.php index b6573bb1dd..980b3744f7 100644 --- a/inc/modules/admin/what-list_holiday.php +++ b/inc/modules/admin/what-list_holiday.php @@ -14,12 +14,10 @@ * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009, 2010 by Mailer Developer Team * - * For more information visit: http://www.mxchange.org * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * + * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -40,24 +38,30 @@ // Some security stuff... if ((!defined('__SECURITY')) || (!isAdmin())) { die(); -} +} // END - if // Add description as navigation point -addMenuDescription('admin', __FILE__); +addYouAreHereLink('admin', __FILE__); // Start listing holiday requests $result = SQL_QUERY("SELECT - h.id, h.userid, h.holiday_start, h.holiday_end, h.comments, d.status, d.last_online + `h`.`id`, + `h`.`userid`, + `h`.`holiday_start`, + `h`.`holiday_end`, + `h`.`comments`, + `d`.`status`, + `d`.`last_online` FROM - `{?_MYSQL_PREFIX?}_user_holidays` AS h + `{?_MYSQL_PREFIX?}_user_holidays` AS `h` LEFT JOIN - `{?_MYSQL_PREFIX?}_user_data` AS d + `{?_MYSQL_PREFIX?}_user_data` AS `d` ON - h.userid=d.userid + `h`.`userid`=`d`.`userid` ORDER BY - h.userid ASC", __FILE__, __LINE__); + `h`.`userid` ASC", __FILE__, __LINE__); -if (SQL_NUMROWS($result) > 0) { +if (!SQL_HASZERONUMS($result)) { // List all holiday requests $OUT = ''; while ($content = SQL_FETCHARRAY($result)) { @@ -67,23 +71,22 @@ if (SQL_NUMROWS($result) > 0) { 'userid' => $content['userid'], 'start' => generateDateTime($content['holiday_start'], 3), 'end' => generateDateTime($content['holiday_end'], 3), - 'comments' => wordwrap($content['comments'], 15), 'status' => $content['status'], 'last_online' => generateDateTime($content['last_online'], 3), ); // Load row template and switch color - $OUT .= loadTemplate('admin_list_holiday_row', true, $content); + $OUT .= loadTemplate('admin_list_holiday_row', TRUE, $content); } // END - while // Free memory SQL_FREERESULT($result); // Load main template - loadTemplate('admin_list_holiday', false, $OUT); + loadTemplate('admin_list_holiday', FALSE, $OUT); } else { // No holiday requests found - loadTemplate('admin_settings_saved', false, '{--ADMIN_HOLIDAY_NOTHING_FOUND--}'); + displayMessage('{--ADMIN_LIST_HOLIDAY_404--}'); } // [EOF]