</strong><?php } ?> </a><span> </span><a href="<?php echo $path; ?> /sort?order=time&from=<?php echo urlencode($_SERVER['REQUEST_URI']); ?> " class="last<?php if ($isTime) { ?> selected<?php } ?> "><?php if ($isTime) { ?> <strong><?php } ?> Time<?php if ($isTime) { ?> </strong><?php } ?> </a></div> <?php echo $tooShort ? "<div class=\"notweets\">Search query too short. Please type at least " . number_format($search->minWordLength) . " characters.</div>" : tweetsHTML($results, "search"); require "inc/footer.php";
<?php // PONGSOCKET TWEET ARCHIVE // Day page require "inc/preheader.php"; $m = ltrim($_GET['m'], "0"); $d = ltrim($_GET['d'], "0"); if (!is_numeric($d) || !is_numeric($m) || !is_numeric($_GET['y']) || is_numeric($d) && ($d > 31 || $d < 1) || is_numeric($m) && ($m > 12 || $m < 1) || is_numeric($_GET['y']) && $_GET['y'] < 2000) { errorPage("Invalid year, month or day. Please specify a valid date."); } $q = $db->query("SELECT `" . DTP . "tweets`.*, `" . DTP . "tweetusers`.`screenname`, `" . DTP . "tweetusers`.`realname`, `" . DTP . "tweetusers`.`profileimage` FROM `" . DTP . "tweets` LEFT JOIN `" . DTP . "tweetusers` ON `" . DTP . "tweets`.`userid` = `" . DTP . "tweetusers`.`userid` WHERE YEAR(FROM_UNIXTIME(`time`" . DB_OFFSET . ")) = '" . s($_GET['y']) . "' AND MONTH(FROM_UNIXTIME(`time`" . DB_OFFSET . ")) = '" . s($m) . "' AND DAY(FROM_UNIXTIME(`time`" . DB_OFFSET . ")) = '" . s($d) . "' ORDER BY `" . DTP . "tweets`.`time` DESC"); $selectedDate = array("y" => $_GET['y'], "m" => $m, "d" => $d); $pageTitle = date("F jS, Y", mktime(1, 0, 0, $m, $d, $_GET['y'])); $preBody = displayDays($_GET['y'], $m); require "inc/header.php"; echo tweetsHTML($q, "day"); require "inc/footer.php";
<?php // PONGSOCKET TWEET ARCHIVE // Favorites page require "inc/preheader.php"; $filterMode = "favorites"; $month = false; if (!empty($_GET['m']) && !empty($_GET['y'])) { $m = ltrim($_GET['m'], "0"); if (is_numeric($m) && $m >= 1 && $m <= 12 && is_numeric($_GET['y']) && $_GET['y'] >= 2000) { $month = true; $selectedDate = array("y" => $_GET['y'], "m" => $m, "d" => 0); } } $mq = $db->query("SELECT MONTH(FROM_UNIXTIME(`time`" . DB_OFFSET . ")) AS m, YEAR(FROM_UNIXTIME(`time`" . DB_OFFSET . ")) AS y, COUNT(*) as c FROM `" . DTP . "tweets` WHERE `" . DTP . "tweets`.`favorite` > 0 GROUP BY y, m ORDER BY y DESC, m DESC"); while ($d = $db->fetch($mq)) { $highlightedMonths[$d['y'] . "-" . $d['m']] = $d['c']; } $q = $db->query("SELECT `" . DTP . "tweets`.*, `" . DTP . "tweetusers`.`screenname`, `" . DTP . "tweetusers`.`realname`, `" . DTP . "tweetusers`.`profileimage` FROM `" . DTP . "tweets` LEFT JOIN `" . DTP . "tweetusers` ON `" . DTP . "tweets`.`userid` = `" . DTP . "tweetusers`.`userid` WHERE `" . DTP . "tweets`.`favorite` > 0" . ($month ? " AND YEAR(FROM_UNIXTIME(`time`" . DB_OFFSET . ")) = '" . $db->s($_GET['y']) . "' AND MONTH(FROM_UNIXTIME(`time`" . DB_OFFSET . ")) = '" . $db->s($m) . "'" : "") . " ORDER BY `" . DTP . "tweets`.`time` DESC"); $pageHeader = "Favorite tweets" . ($month ? " from " . date("F Y", mktime(1, 0, 0, $m, 1, $_GET['y'])) : ""); require "inc/header.php"; echo tweetsHTML($q); require "inc/footer.php";
<?php // PONGSOCKET TWEET ARCHIVE // Month page require "inc/preheader.php"; $m = ltrim($_GET['m'], "0"); if (!is_numeric($m) || !is_numeric($_GET['y']) || is_numeric($m) && ($m > 12 || $m < 1) || is_numeric($_GET['y']) && $_GET['y'] < 2000) { errorPage("Invalid year or month"); } $q = $db->query("SELECT `" . DTP . "tweets`.*, `" . DTP . "tweetusers`.`screenname`, `" . DTP . "tweetusers`.`realname`, `" . DTP . "tweetusers`.`profileimage` FROM `" . DTP . "tweets` LEFT JOIN `" . DTP . "tweetusers` ON `" . DTP . "tweets`.`userid` = `" . DTP . "tweetusers`.`userid` WHERE YEAR(FROM_UNIXTIME(`time`" . DB_OFFSET . ")) = '" . $db->s($_GET['y']) . "' AND MONTH(FROM_UNIXTIME(`time`" . DB_OFFSET . ")) = '" . $db->s($m) . "' ORDER BY `" . DTP . "tweets`.`time` DESC"); $selectedDate = array("y" => $_GET['y'], "m" => $m, "d" => 0); $pageTitle = date("F Y", mktime(1, 0, 0, $m, 1, $_GET['y'])); $preBody = displayDays($_GET['y'], $m); require "inc/header.php"; echo tweetsHTML($q, "month"); require "inc/footer.php";