$previousday = Tki\News::previousDay($startdate); $nextday = Tki\News::nextDay($startdate); echo "<table width=\"73%\" border=\"0\" cellspacing=\"2\" cellpadding=\"2\">\n"; echo " <tr>\n"; echo " <td height=\"73\" width=\"27%\"><img src=\"" . $template->getVariables('template_dir') . "/images/bnnhead.png\" width=\"312\" height=\"123\" alt=\"The TKI Network\"></td>\n"; echo " <td height=\"73\" width=\"73%\" bgcolor=\"#000\" valign=\"bottom\" align=\"right\">\n"; echo " <p><font size=\"-1\">" . $langvars['l_news_info_1'] . "<br>" . $langvars['l_news_info_2'] . "<br>" . $langvars['l_news_info_3'] . "<br>" . $langvars['l_news_info_4'] . "<br>" . $langvars['l_news_info_5'] . "<br></font></p>\n"; echo " <p>" . $langvars['l_news_for'] . " " . htmlentities($startdate, ENT_QUOTES | ENT_HTML5, 'UTF-8') . "</p>\n"; echo " </td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td height=\"22\" width=\"27%\" bgcolor=\"#00001A\"> </td>\n"; echo " <td height=\"22\" width=\"73%\" bgcolor=\"#00001A\" align=\"right\"><a href=\"news.php?startdate={$previousday}\">" . $langvars['l_news_prev'] . "</a> - <a href=\"news.php?startdate={$nextday}\">" . $langvars['l_news_next'] . "</a></td>\n"; echo " </tr>\n"; // SQL call that selects all of the news items between the start date beginning of day, and the end of day. $news_gateway = new \Tki\News\NewsGateway($pdo_db); // Build a scheduler gateway object to handle the SQL calls $row = $news_gateway->selectNewsByDay($startdate); $news_ticker = array(); if (count($row) == 0) { // Nope none found. echo " <tr>\n"; echo " <td bgcolor=\"#00001A\" align=\"center\">" . $langvars['l_news_flash'] . "</td>\n"; echo " <td bgcolor=\"#00001A\" align=\"right\">" . $langvars['l_news_none'] . "</td>\n"; echo " </tr>\n"; } else { foreach ($row as $item) { echo " <tr>\n"; echo " <td bgcolor=\"#003\" align=\"center\" style=\"vertical-align:text-top;\">" . $item['headline'] . "</td>\n"; echo " <td bgcolor=\"#003\" style=\"vertical-align:text-top;\"><p align=\"justify\">" . $item['newstext'] . "</p><br></td>\n"; echo " </tr>\n";
$sf_logo_height = "40"; } else { $sf_logo_type = '11'; $sf_logo_width = "120"; $sf_logo_height = "30"; } if ($news_ticker_active === true) { // Database driven language entries $langvars_temp = Tki\Translate::load($pdo_db, $lang, array('news', 'common', 'footer', 'global_includes', 'logout')); // Use array merge so that we do not clobber the langvars array, and only add to it the items needed for footer $langvars = array_merge($langvars, $langvars_temp); // Use array unique so that we don't end up with duplicate lang array entries // This is resulting in an array with blank values for specific keys, so array_unique isn't entirely what we want // $langvars = array_unique ($langvars); // SQL call that selects all of the news items between the start date beginning of day, and the end of day. $news_gateway = new \Tki\News\NewsGateway($pdo_db); // Build a scheduler gateway object to handle the SQL calls $row = $news_gateway->selectNewsByDay(date('Y-m-d')); $news_ticker = array(); if (count($row) == 0) { array_push($news_ticker, array('url' => null, 'text' => $langvars['l_news_none'], 'type' => null, 'delay' => 5)); } else { foreach ($row as $item) { array_push($news_ticker, array('url' => "news.php", 'text' => $item['headline'], 'type' => $item['news_type'], 'delay' => 5)); } array_push($news_ticker, array('url' => null, 'text' => "End of News", 'type' => null, 'delay' => 5)); } $news_ticker['container'] = "article"; $template->addVariables("news", $news_ticker); } else { $sf_logo_type++;