function loadTrendingThreads() { require './config.php'; $arrayToPrint = array(); $emoticons = getEmoticonList(); $sql = $connect->query("SELECT `id`, `title`, `viewCount`, `description`,(SELECT count(`posts` . `id`) FROM `posts` WHERE `topicId` = `topics` . `id`) AS `count` FROM `topics` ORDER BY `count` desc LIMIT 5"); while ($rows = $sql->fetch_object()) { $title = $rows->title; $threadId = $rows->id; $count = $rows->count; $viewCount = $rows->viewCount; for ($i = 0; $i < count($emoticons); $i++) { $search = $emoticons[$i][0]; $img = "<img src='http://tvstalkers.com/images/" . $emoticons[$i][1] . "'></img>"; $title = str_replace($search, $img, $title); } array_push($arrayToPrint, array('title' => $title, 'count' => $count, 'threadId' => $threadId, 'viewCount' => $viewCount)); } printThreads($arrayToPrint); }
?> " method="POST"> Title:<br> <input type="text" name="title" ><br> Description:<br> <input type="text" name="description"> <br><br> <input type="submit" value="Submit"> </article> <article id="article2"> <!-- group similar information -- articles can have headers and footers--> <?php if (isset($_GET['showTitle'])) { $input = urldecode($_GET['showTitle']); $id = getShowId($input); $result = getTopics($id); printThreads($result); } else { header('Location: error.php'); } ?> </article> </section> <aside id="trendingNow" class="sideRight side_news twitter feed trendingNow general"><!-- id was side_news--> <!-- More informaiton -- feeds ect--> <h4>News Story</h4> <?php $arr = getTwitterInfo(); //print_r($arr); $handle = $arr[0]; $twitter_id = $arr[1];