} $onlyTags = FALSE; if (isset($_GET['onlytags'])) { $onlyTags = intval($_GET['onlytags']) != 0; } $sortOrder = 'size'; if (isset($_GET['sortorder'])) { $sortOrder = stripMaliciousSql($_GET['sortorder']); if ($sortOrder != 'time') { $sortOrder = 'size'; } } //Define a story object to populate $story = array('storyID' => $storyID); if (!$onlyTags) { $story = get_story_content($storyID, $sortOrder, $db_conn); //This replaces the story array object } // Category tags $categoryTagsResult = mysql_query("select Category, InfoCategoryID\nfrom StoryInfoCategoryTag natural join InfoCategory\nwhere StoryID = {$storyID}", $db_conn); $story['categoryCount'] = mysql_num_rows($categoryTagsResult); if (mysql_num_rows($categoryTagsResult) > 0) { $story['categories'] = array(); while ($row = mysql_fetch_array($categoryTagsResult)) { $tag = array(); $tag['id'] = $row['InfoCategoryID']; $tag['name'] = htmlspecialchars($row['Category']); $story['categories'][] = $tag; } } // Entity tags
?> " /> <input type="hidden" name="storyid2" value="<?php echo $storyID2; ?> " /> <input type="button" value="Cancel" onclick="history.back();" /> <input type="submit" value="Merge the stories" /> </form> </div> </div> <?php //Fetch and print tweets in story $story1 = get_story_content($storyID1, 'size', $db_conn, false); $story2 = get_story_content($storyID2, 'size', $db_conn, false); include 'api/close_db.php'; ?> <div class="left-column-half"> <div class="gui-panel"> <div class="gui-subpanel story-summary"> <h1><?php echo $story1['title']; ?> </h1> <ol> <?php foreach ($story1['topTweets'] as $tweet) { echo '<li><div class="story-list-item">'; echo '<div class="info">';