$to = date('Y-m-d', $from_unix + 518400); $days_in_from = date('t', $from_unix); list($from_year, $from_month, $from_mday) = explode('-', $from); list($to_year, $to_month, $to_mday) = explode('-', $to); /**************************************************************************** * GET */ $needle['from'] = $from; $needle['to'] = $to; if (awec_get_events($needle, $events, false) === false) { fallback('index.php'); } $res = dbquery("SELECT\n\tDATE_FORMAT('" . $from . "', '" . $awec_settings['date_fmt'] . "') AS from_date,\n\tDATE_FORMAT('" . $to . "', '" . $awec_settings['date_fmt'] . "') AS to_date\n\t"); $row = dbarray($res); $caption = $row['from_date'] . ' - ' . $row['to_date']; awec_set_title($caption); /**************************************************************************** * GUI */ echo ' <table border="0" width="100%" cellspacing="0"> <tbody> <tr> <td align="left"><a href="' . $cal_href . '&date=' . date('Y-m-d', $from_unix - 604800) . '"><<</a></td> <td align="center">' . $caption . '</td> <td align="right"><a href="' . $cal_href . '&date=' . date('Y-m-d', $from_unix + 604800) . '">>></a></td> </tr> </tbody> </table> <hr />';
* GET */ $events = array(); $needle = array('from' => $date, 'to' => $date); if (awec_get_events($needle, $events, true) === false) { fallback('index.php'); } $res = dbquery("SELECT\n\tDATE_FORMAT('" . $date . "', '" . $awec_settings['date_fmt'] . "') AS date"); $row = dbarray($res); $date = array_shift($row); /**************************************************************************** * GUI */ opentable($date); awec_menu(); awec_set_title($date); if (iAWEC_POST) { echo '<a href="edit_event.php?date=' . $_GET['date'] . '">' . $locale['EC100'] . '</a>'; } if (count($events)) { foreach ($events[$year][$month][$mday] as $event) { if ($event['is_birthday']) { ec_render_birthday($event); } else { $event['ev_title'] = '<a href="view_event.php?id=' . $event['ev_id'] . '">' . $event['ev_title'] . '</a>'; awec_render_event($event); } } } else { echo '<p>' . $locale['awec_no_events'] . '</p>'; }
/*************************************************************************** * awEventCalendar * * * * Copyright (C) 2006-2008 Artur Wiebe * * wibix@gmx.de * * * * 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 * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * ***************************************************************************/ if (!defined('IN_FUSION')) { die; } awec_set_title($locale['awec_calendar'] . ' - ' . $ec_year); echo ' <form action="' . FUSION_SELF . '" method="get"> <table width="100%" border="0"> <colgroup> <col width="20%" /> <col width="60%" /> <col width="20%" /> </colgroup> <tbody> <tr> <td align="left"> <a href="' . $cal_href . '&y=' . ($ec_year - 1) . '"><< ' . ($ec_year - 1) . '</a> </td> <td align="center"> <strong>' . $locale['EC450'] . ':</strong>