-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
93 lines (79 loc) · 2.95 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?php
/*
* Created on Jul 27, 2008 by Jason Grosman
* This work is licensed under the Creative Commons Attribution-Noncommercial 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
*
*/
require_once "settings.inc";
require_once "navigation.inc";
require_once "twitterDisplay.inc";
$feed = getFeedFromQuery();
?>
<html>
<head>
<title>All Tweets Considered</title>
<style type="text/css" media="screen">@import "/alltweets/css/nprtwitter.css";</style>
<script type="text/javascript">
var apiKey = '<?php echo $apiKey; ?>';
</script>
<script type="text/javascript" src="/alltweets/js/jquery-1.2.6.min.js"></script>
<script type="text/javascript" src="/alltweets/js/nprtwitter.js"></script>
</head>
<body>
<div id="header">
<h1> All Tweets Considered : An NPR Twitter Browser </h1>
<p>Developed using the <a href="http://www.npr.org/api">NPR API</a> and <a href="http://search.twitter.com">Twitter Search</a>.
You can see what NPR stories people on twitter are talking about, or search by NPR Program, Topic, Music Topic, or Person. This is definitely a work in progress, so expect things to improve over time.</p>
<p>Technical details can be found <a href="http://www.jgrosman.com/jblog/?p=14">here</a>.</p>
<form id="mainForm">
<input type="hidden" id="searchField" name="search"></input>
<input type="hidden" id="searchTypeField" name="searchType"></input>
</form>
</div>
<div id="main">
<div id="bottom">
<div id="leftcol">
<ul id="menu">
<h2 class="nav"><a href="" onclick="doSearch('NPR', '');return false;">Search all NPR</a></h2>
<?php printNPRPrograms(); ?>
<?php printNPRTopics(); ?>
<?php printNPRPeople(); ?>
</ul>
<h4>Latest NPR News</h4>
<script type="text/javascript" src="http://api.npr.org/query?id=1001&output=JS&apiKey=MDAwMTAwMDcwMDEyMTQ5MTAzNzAwOWI0Mw001"></script>
</div>
<div id="middlecol">
<div class="resultsNav">
<?php
$newerUrl = getNewerUrl();
$olderUrl = getOlderUrl();
?>
<?php
if ($newerUrl != null)
{
?>
<span class="newer"><a href="<?php echo $newerUrl; ?>"><< Newer</a></span>
<?php
}
?>
<span class="older"><a href="<?php echo $olderUrl; ?>">Older >></a></span>
</div>
<?php
displayResultSet($feed);
?>
<div class="resultsNav">
<?php
if ($newerUrl != null)
{
?>
<span class="newer"><a href="<?php echo $newerUrl; ?>"><< Newer</a></span>
<?php
}
?>
<span class="older"><a href="<?php echo $olderUrl; ?>">Older >></a></span>
</div>
</div>
</div>
</div>
</body>
</html>