* * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or * sell copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * * @category Web * @package DRI\HTML * @author Christoph Brill * @copyright 2012-2017 Christoph Brill * @license MIT https://opensource.org/licenses/MIT * @link https://people.freedesktop.org/~cbrill/ */ require_once 'common.inc.php'; if (isset($date)) { $title = 'IRC Logs of #'.$channel.' on irc.freenode.net for '.$date; $oneday = new DateInterval("P1D"); $prevday = date_sub(date_create_from_format("Y-m-d", $date), $oneday)->format("Y-m-d"); $nextday = date_add(date_create_from_format("Y-m-d", $date), $oneday)->format("Y-m-d"); } else { $title = 'DRI IRC log overview'; } $show_html = !isset($_GET['channel']) || (isset($_GET['show_html']) && $_GET['show_html'] == 'true'); $show_joins = isset($_GET['show_joins']) && $_GET['show_joins'] == 'true'; $show_irssi = isset($_GET['show_irssi']) && $_GET['show_irssi'] == 'true'; $highlight_names = isset($_GET['highlight_names']) ? $_GET['highlight_names'] : (isset($_COOKIE['stored_users']) ? $_COOKIE['stored_users'] : ''); if (isset($_GET['highlight_names'])) { setcookie('stored_users', $highlight_names, time()+2592000); } $colors = array('#009900', '#CC3300', '#330099', '#FF6600', '#CC33CC', '#66CCCC', '#FF0066', '#9900FF', '#00FFCC', '#6600FF'); echo ' '.$title.' '.PHP_EOL; if (isset($date)) { echo ' '.PHP_EOL; } echo '
'.PHP_EOL; if (!isset($date)) { require_once('overview.php'); } else { require_once('details.php'); } echo '
'.PHP_EOL;