/
index.php
243 lines (203 loc) · 9.84 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
<?php
include_once( '../config.php' );
include_once( '../lib/include.php' );
include_once( '../lib/pre.php' );
/*
if ( $location != 'local' ) {
$memcache = new Memcache;
}
$seti = new RPC;
$goodReads = new goodReads( $goodreads_token, $goodreads_user_id, $goodreadsOptions, true);
$books = $goodReads->getShelf();
$twitter = new TwitterAPIExchange( $twitterSettings );
$flickr = new phpFlickr( FLICKR_API );
$elsewhere = new Outside;
*/
$template = new Template;
// First output our page header
$template->outputHTML( "<html xmlns='http://www.w3.org/1999/xhtml' xmlns:fb='http://ogp.me/ns/fb#'><head>\n" );
$template->outputMeta( $template->meta );
$template->outputHTML( "<title>" );
$template->outputString( "Paul Weinstein" );
$template->outputHTML( "</title>" );
$template->outputlink( $template->link );
// Now we move onto the HTML body
$template->outputHTML( "</head><body>" );
$template->outputHTML("
<div class=\"desktop\">
<div class=\"icon\"><a href=\"https://www.weinstein.org/\"><img src='/media/png/hd.png' alt='Home'></a></div>
<div class=\"iconText\"><a href=\"https://www.weinstein.org/\">Home</div></a>
<br/>
<div class=\"icon adIcon\"><a href=\"#\"><img src='/media/png/floppy.png' alt='AfterDark'></a></div>
<div class=\"iconText adIcon\"><a href=\"#\">After Dark</div></a>
</div>
<div class=\"window ad\">
<div class=\"bar title\">
<h1>After Dark</h1>
<nav>
<ul>
<li class=\"close adc\"></li>
</ul>
</nav>
</div>
<div>
<div class=\"finder\">
<div class=\"row\">
<div class=\"col-sm-4 col-md-2\" >
<div class=\"icon afIcon\"><a href=\"after-dark/bouncing-ball.html\"><img src='/media/png/app.png' alt='Bouncing Ball'></a></div>
<div class=\"iconText afIcon\"><a href=\"after-dark/bouncing-ball.html\">Bouncing Ball</div></a>
</div>
<div class=\"col-sm-4 col-md-2 col-md-push-2\" >
<div class=\"icon afIcon\"><a href=\"after-dark/fade-out.html\"><img src='/media/png/app.png' alt='Fade Out'></a></div>
<div class=\"iconText afIcon\"><a href=\"after-dark/fade-out.html\">Fade Out</div></a>
</div>
<div class=\"col-sm-4 col-md-2 col-md-push-6\" >
<div class=\"icon afIcon\"><a href=\"after-dark/fish.html\"><img src='/media/png/app.png' alt='Fish'></a></div>
<div class=\"iconText afIcon\"><a href=\"after-dark/fish.html\">Fish</div></a>
</div>
<div class=\"col-sm-4 col-md-2 col-m d-pull-4\" >
<div class=\"icon afIcon\"><a href=\"after-dark/flying-toasters.html\"><img src='https://storage.googleapis.com/personal-dev-site.appspot.com/view/client/png/app.png' alt='Flying Toaster'></a></div>
<div class=\"iconText afIcon\"><a href=\"after-dark/flying-toasters.html\">Flying Toasters</div></a>
</div>
<div class=\"col-sm-4 col-md-2 col-md-pull-4\" >
<div class=\"icon afIcon\"><a href=\"after-dark/globe.html\"><img src='/media/png/app.png' alt='Globe'></a></div>
<div class=\"iconText afIcon\"><a href=\"after-dark/globe.html\">Globe</div></a>
</div>
<div class=\"col-sm-4 col-md-2\" >
<div class=\"icon afIcon\"><a href=\"after-dark/hard-rain.html\"><img src='/media/png/app.png' alt='Hard Rain'></a></div>
<div class=\"iconText afIcon\"><a href=\"after-dark/hard-rain.html\">Hard Rain</div></a>
</div>
</div>
<div class=\"row\">
<div class=\"col-sm-4 col-md-2\" >
<div class=\"icon afIcon\"><a href=\"after-dark/rainstorm.html\"><img src='/media/png/app.png' alt='Rainstorm'></a></div>
<div class=\"iconText afIcon\"><a href=\"after-dark/rainstorm.html\">Rainstorm</div></a>
</div>
<div class=\"col-sm-4 col-md-2 col-md-push-2\" >
<div class=\"icon afIcon\"><a href=\"after-dark/spotlight.html\"><img src='/media/png/app.png' alt='Spotlight'></a></div>
<div class=\"iconText afIcon\"><a href=\"after-dark/spotlight.html\">Spotlight</div></a>
</div>
<div class=\"col-sm-4 col-md-2 col-md-push-6\" >
<div class=\"icon afIcon\"><a href=\"after-dark/logo.html\"><img src='/media/png/app.png' alt='Logo'></a></div>
<div class=\"iconText afIcon\"><a href=\"after-dark/logo.html\">Logo</div></a>
</div>
<div class=\"col-sm-4 col-md-2 col-md-pull-4\" >
<div class=\"icon afIcon\"><a href=\"after-dark/messages.html\"><img src='/media/png/app.png' alt='Messages'></a></div>
<div class=\"iconText afIcon\"><a href=\"after-dark/messages.html\">Messages</div></a>
</div>
<div class=\"col-sm-4 col-md-2 col-md-pull-4\" >
<div class=\"icon afIcon\"><a href=\"after-dark/messages2.html\"><img src='/media/png/app.png' alt='Messages 2'></a></div>
<div class=\"iconText afIcon\"><a href=\"after-dark/messages2.html\">Messages 2</div></a>
</div>
<div class=\"col-sm-4 col-md-2\" >
<div class=\"icon afIcon\"><a href=\"after-dark/warp.html\"><img src='/media/png/app.png' alt='Warp'></a></div>
<div class=\"iconText afIcon\"><a href=\"after-dark/warp.html\">Warp</div></a>
</div>
</div>
</div>
</div>
</div>
<div class=\"window\">
<div class=\"bar title\">
<h1>WWW.WEINSTEIN.ORG</h1>
<nav>
<ul>
<li class=\"close\"></li>
</ul>
</nav>
</div>
<div class=\"msg\">
<p style=\"text-align:right\">$latestDate</p>
<p>Latest Post: " .ucfirst( $latest ). "</p>
");
if( $latest == 'flickr' ) {
$template->outputFlickr( $feed['flickr'] );
} elseif( $latest == 'twitter' ) {
$template->outputTweet( $feed['twitter'], 'main' );
} elseif( $latest == 'github' ) {
$template->outputGithub( $feed['github'], 'main' );
} elseif( $latest == 'instagram' ) {
$template->outputInstagram( $feed['instagram'], 'main' );
} elseif( $latest == 'blog' ) {
$template->outputBlog( $feed['blog'] );
} elseif( $latest == 'reddit' ) {
$template->outputReddit( $feed['reddit'], 'main' );
}
$template->outputHTML("
<p>Elsewhere:</p>
<p><ul>
<li><a href=\"/blog/\" alt\"Personal Blog\">Blog</a><ul><li><a href=\"" .$bPost->link['href']. "\">" .(string) $bPost->title. "</a></li></ul></li>
<!--- <li><a href=\"\">Boinc<ul><li> --->
");
$template->outputHTML("
<li><a href=\"https://www.github.com/pdweinstein\" alt\"GitHub\">GitHub</a>
");
$template->outputGithub( $feed['github'], 'list' );
$template->outputHTML("
<li><a href=\"https://www.goodreads.com/author/show/193451.Paul_Weinstein\" alt\"Goodreads\">Goodreads</a> <ul> <li> Currently reading
");
$template->outputHTML( "<a href='" .$book['link']. "' alt='" .$book['title']. "'> " .$book['title']. " </a>");
$template->outputHTML("
</li></ul>
<li><a href=\"https://www.facebook.com/pdweinstein\" alt\"Facebook\">Facebook</a></li>
");
/*
$postData = "";
$userPosts = $fb->get("/526081044/feed", $accessToken);
$postBody = $userPosts->getDecodedBody();
$postData = $postBody["data"];
if (! empty($postData)) {
foreach ($postData as $k => $v) {
$postDate = date("d F, Y", strtotime($postData[$k]["created_time"]));
if(!empty($postData[$k]["message"])) {
echo $postData[$k]["message"];
echo $postDate;
}
}
}
*/
$template->outputHTML("
<li><a href=\"https://www.flickr.com/photos/pdweinstein\" alt\"Flickr\">Flickr</a><ul><li>
");
$template->outputHTML( "<a href='https://www.flickr.com/photos/pdweinstein/" .$recent['photos']['photo'][0]['id']. "/in/photostream/' alt='" .$recent['photos']['photo'][0]['title']. "'>" .$recent['photos']['photo'][0]['title']. "</a>");
$template->outputHTML("
</li></ul>
<li><a href=\"https://www.instagram.com/pdweinstein\" alt\"Instagram\">Instagram</a>
");
$template->outputInstagram( $feed['instagram'], 'list' );
$template->outputHTML("
<li><a href=\"https://www.linkedin.com/in/pdweinstein\" alt\"LinkedIn\">LinkedIn</a></li>
<li><a href=\"https://www.reddit.com/user/pdweinstein\" alt\"Reddit\">Reddit</a></li>
");
$template->outputReddit( $feed['reddit'], 'list' );
$template->outputHTML("
<li><a href=\"https://twitter.com/pdweinstein\" alt\"Twitter\">Twitter</a><ul><li>
");
$template->outputTweet( $feed['twitter'], 'list' );
$template->outputHTML( "</li></ul>" );
$template->outputHTML("
<li><a href=\"https://www.youtube.com/user/pdweinstein\" alt\"YouTube\">YouTube</a></li>
</ul></p>
</div>
</div>
<nav class=\"navbar fixed-bottom navbar-light bg-light\">
<p>
]LOAD WWW.WEINSTEIN.ORG <br/> ]RUN <br/> COPYRIGHT PAUL WEINSTEIN (c) 1997 - 2022
</p>
</nav>
");
// Put JS load code at end of doc to keep everything quick for
// page load
$template->outputJS( $template->js );
// Local JS code
echo "
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src=\"https://www.googletagmanager.com/gtag/js?id=G-N49SV33M4E\"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '" .$gAnalyticsID. "');
</script>";
$template->outputHTML( "</body></html>" );
?>