]>
Commit | Line | Data |
---|---|---|
9d9ed2b3 AD |
1 | <?php |
2 | require_once "functions.php"; | |
3 | require_once "sessions.php"; | |
4 | require_once "version.php"; | |
5 | require_once "db-prefs.php"; | |
6 | ||
7 | define('TTRSS_SESSION_NAME', 'ttrss_m_sid'); | |
8 | ||
9 | /* TODO replace with interface to db-prefs */ | |
10 | ||
a42c55f0 AD |
11 | function mobile_pref_toggled($id) { |
12 | if (get_pref("_MOBILE_$id")) | |
9d9ed2b3 AD |
13 | return "true"; |
14 | else | |
15 | return ""; | |
16 | } | |
17 | ||
a42c55f0 | 18 | function mobile_get_pref($id) { |
9d9ed2b3 | 19 | //return $_SESSION["mobile-prefs"][$id]; |
a42c55f0 | 20 | return get_pref("_MOBILE_$id"); |
9d9ed2b3 AD |
21 | } |
22 | ||
a42c55f0 | 23 | function mobile_set_pref($id, $value) { |
9d9ed2b3 | 24 | //$_SESSION["mobile-prefs"][$id] = $value; |
a42c55f0 | 25 | return set_pref("_MOBILE_$id", $value); |
9d9ed2b3 AD |
26 | } |
27 | ||
28 | function mobile_feed_has_icon($id) { | |
29 | return file_exists("../../".ICONS_DIR."/$id.ico"); | |
30 | } | |
31 | ||
a42c55f0 | 32 | function render_flat_feed_list($offset) { |
9d9ed2b3 AD |
33 | $owner_uid = $_SESSION["uid"]; |
34 | $limit = 0; | |
35 | ||
36 | if (!$offset) $offset = 0; | |
37 | ||
a42c55f0 | 38 | if (mobile_get_pref("SORT_FEEDS_UNREAD")) { |
9d9ed2b3 AD |
39 | $order_by = "unread DESC, title"; |
40 | } else { | |
41 | $order_by = "title"; | |
42 | } | |
43 | ||
44 | if ($limit > 0) { | |
45 | $limit_qpart = "LIMIT $limit OFFSET $offset"; | |
46 | } else { | |
47 | $limit_qpart = ""; | |
48 | } | |
49 | ||
a42c55f0 | 50 | $result = db_query("SELECT id, |
9d9ed2b3 AD |
51 | title, |
52 | (SELECT COUNT(id) FROM ttrss_entries,ttrss_user_entries | |
53 | WHERE feed_id = ttrss_feeds.id AND unread = true | |
54 | AND ttrss_user_entries.ref_id = ttrss_entries.id | |
55 | AND owner_uid = '$owner_uid') AS unread | |
56 | FROM ttrss_feeds | |
57 | WHERE | |
58 | ttrss_feeds.owner_uid = '$owner_uid' | |
59 | ORDER BY $order_by $limit_qpart"); | |
60 | ||
61 | if (!$offset) print '<ul id="home" title="'.__('Home').'" selected="true" | |
62 | myBackLabel="'.__('Logout').'" myBackHref="logout.php" myBackTarget="_self">'; | |
63 | ||
64 | ||
65 | // print "<li><a href='#cat-actions'>".__('Actions...')."</a></li>"; | |
66 | ||
67 | $num_feeds = 0; | |
68 | ||
69 | while ($line = db_fetch_assoc($result)) { | |
70 | $id = $line["id"]; | |
71 | $unread = $line["unread"]; | |
72 | ||
73 | // $unread = rand(0, 100); | |
74 | ||
75 | if ($unread > 0) { | |
76 | $line["title"] = $line["title"] . " ($unread)"; | |
77 | $class = ''; | |
78 | } else { | |
79 | $class = 'oldItem'; | |
80 | } | |
81 | ||
82 | if (mobile_feed_has_icon($id)) { | |
83 | $icon_url = "../../".ICONS_URL."/$id.ico"; | |
84 | } else { | |
85 | $icon_url = "../../images/blank_icon.gif"; | |
86 | } | |
87 | ||
a42c55f0 | 88 | if ($unread > 0 || !mobile_get_pref("HIDE_READ")) { |
9d9ed2b3 AD |
89 | print "<li class='$class'><a href='feed.php?id=$id'>" . |
90 | "<img class='tinyIcon' src='$icon_url'/>". | |
91 | $line["title"] . "</a></li>"; | |
92 | } | |
93 | ||
94 | ++$num_feeds; | |
95 | } | |
96 | ||
97 | /* $next_offset = $offset + $num_feeds; | |
98 | ||
99 | print "<li><a href=\"home.php?skip=$next_offset\" | |
100 | target=\"_replace\">Show more feeds...</a></li>"; */ | |
101 | ||
102 | if (!$offset) print "</ul>"; | |
103 | ||
104 | } | |
105 | ||
a42c55f0 | 106 | function render_category($cat_id, $offset) { |
9d9ed2b3 AD |
107 | $owner_uid = $_SESSION["uid"]; |
108 | ||
109 | if ($cat_id >= 0) { | |
110 | ||
111 | if ($cat_id != 0) { | |
112 | $cat_query = "cat_id = '$cat_id'"; | |
113 | } else { | |
114 | $cat_query = "cat_id IS NULL"; | |
115 | } | |
116 | ||
a42c55f0 | 117 | if (mobile_get_pref("SORT_FEEDS_UNREAD")) { |
9d9ed2b3 AD |
118 | $order_by = "unread DESC, title"; |
119 | } else { | |
120 | $order_by = "title"; | |
121 | } | |
122 | ||
a42c55f0 | 123 | $result = db_query("SELECT id, |
9d9ed2b3 AD |
124 | title, |
125 | (SELECT COUNT(id) FROM ttrss_entries,ttrss_user_entries | |
126 | WHERE feed_id = ttrss_feeds.id AND unread = true | |
127 | AND ttrss_user_entries.ref_id = ttrss_entries.id | |
128 | AND owner_uid = '$owner_uid') as unread | |
129 | FROM ttrss_feeds | |
130 | WHERE | |
131 | ttrss_feeds.owner_uid = '$owner_uid' AND | |
132 | $cat_query | |
133 | ORDER BY $order_by"); | |
134 | ||
a42c55f0 | 135 | $title = getCategoryTitle($cat_id); |
9d9ed2b3 AD |
136 | |
137 | print "<ul id='cat-$cat_id' title='$title' myBackLabel='".__("Home")."' | |
138 | myBackHref='home.php'>"; | |
139 | ||
140 | // print "<li><a href='#cat-actions'>".__('Actions...')."</a></li>"; | |
141 | ||
142 | while ($line = db_fetch_assoc($result)) { | |
143 | $id = $line["id"]; | |
144 | $unread = $line["unread"]; | |
145 | ||
146 | // $unread = rand(0, 100); | |
147 | ||
148 | if ($unread > 0) { | |
149 | $line["title"] = $line["title"] . " ($unread)"; | |
150 | $class = ''; | |
151 | } else { | |
152 | $class = 'oldItem'; | |
153 | } | |
154 | ||
155 | if (mobile_feed_has_icon($id)) { | |
156 | $icon_url = "../../".ICONS_URL."/$id.ico"; | |
157 | } else { | |
158 | $icon_url = "../../images/blank_icon.gif"; | |
159 | } | |
160 | ||
a42c55f0 | 161 | if ($unread > 0 || !mobile_get_pref("HIDE_READ")) { |
9d9ed2b3 AD |
162 | print "<li class='$class'><a href='feed.php?id=$id&cat=$cat_id'>" . |
163 | "<img class='tinyIcon' src='$icon_url'/>". | |
164 | $line["title"] . "</a></li>"; | |
165 | } | |
166 | } | |
167 | ||
168 | print "</ul>"; | |
169 | } else if ($cat_id == -1) { | |
170 | ||
171 | $title = __('Special'); | |
172 | ||
173 | print "<ul id='cat--1' title='$title' myBackLabel='".__("Home")."' | |
174 | myBackHref='home.php'>"; | |
175 | ||
176 | foreach (array(-4, -3, -1, -2, 0) as $id) { | |
a42c55f0 AD |
177 | $title = getFeedTitle($id); |
178 | $unread = getFeedUnread($id, false); | |
9d9ed2b3 AD |
179 | $icon = getFeedIcon($id); |
180 | ||
181 | if ($unread > 0) { | |
182 | $title = $title . " ($unread)"; | |
183 | $class = ''; | |
184 | } else { | |
185 | $class = 'oldItem'; | |
186 | } | |
187 | ||
a42c55f0 | 188 | if ($unread > 0 || !mobile_get_pref("HIDE_READ")) { |
9d9ed2b3 AD |
189 | print "<li class='$class'> |
190 | <a href='feed.php?id=$id&cat=-1'> | |
191 | <img class='tinyIcon' src='../$icon'/>$title</a></li>"; | |
192 | } | |
193 | } | |
194 | ||
195 | print "</ul>"; | |
196 | } else if ($cat_id == -2) { | |
197 | ||
198 | $title = __('Labels'); | |
199 | ||
200 | print "<ul id='cat--2' title='$title' myBackLabel='".__("Home")."' | |
201 | myBackHref='home.php'>"; | |
202 | ||
a42c55f0 | 203 | $result = db_query("SELECT id, caption FROM ttrss_labels2 |
9d9ed2b3 AD |
204 | WHERE owner_uid = '$owner_uid'"); |
205 | ||
206 | $label_data = array(); | |
207 | ||
208 | while ($line = db_fetch_assoc($result)) { | |
209 | ||
f822a8e5 | 210 | $id = label_to_feed_id($line["id"]); |
9d9ed2b3 | 211 | |
a42c55f0 | 212 | $unread = getFeedUnread($id); |
9d9ed2b3 AD |
213 | $title = $line["caption"]; |
214 | ||
215 | if ($unread > 0) { | |
216 | $title = $title . " ($unread)"; | |
217 | $class = ''; | |
218 | } else { | |
219 | $class = 'oldItem'; | |
220 | } | |
221 | ||
a42c55f0 | 222 | if ($unread > 0 || !mobile_get_pref("HIDE_READ")) { |
9d9ed2b3 AD |
223 | print "<li class='$class'> |
224 | <a href='feed.php?id=$id&cat=-2'>$title</a></li>"; | |
225 | } | |
226 | } | |
227 | print "</ul>"; | |
228 | } | |
229 | } | |
230 | ||
231 | function render_categories_list($link) { | |
232 | $owner_uid = $_SESSION["uid"]; | |
233 | ||
a42c55f0 | 234 | $cat_browse = mobile_get_pref("BROWSE_CATS"); |
9d9ed2b3 AD |
235 | |
236 | print '<ul id="home" title="'.__('Home').'" selected="true" | |
237 | myBackLabel="'.__('Logout').'" myBackHref="logout.php" myBackTarget="_self">'; | |
238 | ||
239 | // print "<li><a href='#searchForm'>Search...</a></li>"; | |
240 | ||
241 | foreach (array(-1, -2) as $id) { | |
a42c55f0 AD |
242 | $title = getCategoryTitle($id); |
243 | $unread = getFeedUnread($id, true); | |
9d9ed2b3 AD |
244 | if ($unread > 0) { |
245 | $title = $title . " ($unread)"; | |
246 | $class = ''; | |
247 | } else { | |
248 | $class = 'oldItem'; | |
249 | } | |
250 | ||
251 | if ($cat_browse) | |
252 | print "<li class='$class'><a href='cat.php?id=$id'>$title</a></li>"; | |
253 | else | |
254 | print "<li class='$class'><a href='feed.php?id=$id&is_cat=true'>$title</a></li>"; | |
255 | } | |
256 | ||
a42c55f0 | 257 | $result = db_query("SELECT |
9d9ed2b3 AD |
258 | ttrss_feed_categories.id, |
259 | ttrss_feed_categories.title, | |
260 | COUNT(ttrss_feeds.id) AS num_feeds | |
261 | FROM ttrss_feed_categories, ttrss_feeds | |
262 | WHERE ttrss_feed_categories.owner_uid = $owner_uid | |
263 | AND ttrss_feed_categories.id = cat_id | |
264 | GROUP BY ttrss_feed_categories.id, | |
265 | ttrss_feed_categories.title | |
266 | ORDER BY ttrss_feed_categories.title"); | |
267 | ||
268 | while ($line = db_fetch_assoc($result)) { | |
269 | ||
270 | if ($line["num_feeds"] > 0) { | |
271 | ||
a42c55f0 | 272 | $unread = getFeedUnread($line["id"], true); |
9d9ed2b3 AD |
273 | $id = $line["id"]; |
274 | ||
275 | if ($unread > 0) { | |
276 | $line["title"] = $line["title"] . " ($unread)"; | |
277 | $class = ''; | |
278 | } else { | |
279 | $class = 'oldItem'; | |
280 | } | |
281 | ||
a42c55f0 | 282 | if ($unread > 0 || !mobile_get_pref("HIDE_READ")) { |
9d9ed2b3 AD |
283 | |
284 | if ($cat_browse) | |
285 | print "<li class='$class'><a href='cat.php?id=$id'>" . | |
286 | $line["title"] . "</a></li>"; | |
287 | else | |
288 | print "<li class='$class'><a href='feed.php?id=$id&is_cat=true'>". | |
289 | $line["title"] . "</a></li>"; | |
290 | } | |
291 | } | |
292 | } | |
293 | ||
294 | ||
a42c55f0 | 295 | $result = db_query("SELECT COUNT(*) AS nf FROM ttrss_feeds WHERE |
9d9ed2b3 AD |
296 | cat_id IS NULL and owner_uid = '$owner_uid'"); |
297 | ||
298 | $num_feeds = db_fetch_result($result, 0, "nf"); | |
299 | ||
300 | if ($num_feeds > 0) { | |
a42c55f0 | 301 | $unread = getFeedUnread(0, true); |
9d9ed2b3 AD |
302 | $title = "Uncategorized"; |
303 | ||
304 | if ($unread > 0) { | |
305 | $title = "$title ($unread)"; | |
306 | $class = ''; | |
307 | } else { | |
308 | $class = 'oldItem'; | |
309 | } | |
310 | ||
a42c55f0 | 311 | if ($unread > 0 || !mobile_get_pref("HIDE_READ")) { |
9d9ed2b3 AD |
312 | if ($cat_browse) |
313 | print "<li class='$class'><a href='cat.php?id=0'>$title</a></li>"; | |
314 | else | |
315 | print "<li class='$class'><a href='feed.php?id=0&is_cat=true'>$title</a></li>"; | |
316 | ||
317 | } | |
318 | } | |
319 | ||
320 | print "</ul>"; | |
321 | } | |
322 | ||
a42c55f0 | 323 | function render_headlines_list($feed_id, $cat_id, $offset, $search, |
9d9ed2b3 AD |
324 | $is_cat = false) { |
325 | ||
326 | $feed_id = $feed_id; | |
327 | $limit = 15; | |
328 | $filter = ''; | |
329 | ||
a42c55f0 | 330 | if (!mobile_get_pref("HIDE_READ")) |
9d9ed2b3 AD |
331 | $view_mode = "all_articles"; |
332 | else | |
333 | $view_mode = 'adaptive'; | |
334 | ||
335 | if ($search) { | |
336 | $search_mode = 'this_feed'; | |
337 | } else { | |
338 | $search_mode = ''; | |
339 | } | |
340 | ||
a42c55f0 | 341 | $qfh_ret = queryFeedHeadlines($feed_id, $limit, |
9d9ed2b3 | 342 | $view_mode, $is_cat, $search, $search_mode, |
a42c55f0 | 343 | "score DESC, date_entered ".(mobile_get_pref('REVERSE_HEADLINES') ? 'ASC' : 'DESC'), $offset); |
9d9ed2b3 AD |
344 | |
345 | $result = $qfh_ret[0]; | |
346 | $feed_title = $qfh_ret[1]; | |
347 | ||
348 | if (!$offset) { | |
349 | ||
350 | print "<form id=\"searchForm-$feed_id-$cat_id\" class=\"dialog\" method=\"POST\" | |
351 | action=\"feed.php\"> | |
352 | ||
353 | <input type=\"hidden\" name=\"id\" value=\"$feed_id\"> | |
354 | <input type=\"hidden\" name=\"cat\" value=\"$cat_id\"> | |
355 | ||
356 | <fieldset> | |
357 | <h1>Search</h1> | |
358 | <a class=\"button leftButton\" type=\"cancel\">Cancel</a> | |
359 | <a class=\"button blueButton\" type=\"submit\">Search</a> | |
360 | ||
361 | <label>Search:</label> | |
362 | <input id=\"search\" type=\"text\" name=\"search\"/> | |
363 | </fieldset> | |
364 | </form>"; | |
365 | ||
366 | if ($cat_id) { | |
a42c55f0 | 367 | $cat_title = getCategoryTitle($cat_id); |
9d9ed2b3 AD |
368 | |
369 | print "<ul id=\"feed-$feed_id\" title=\"$feed_title\" selected=\"true\" | |
370 | myBackLabel='$cat_title' myBackHref='cat.php?id=$cat_id'>"; | |
371 | } else { | |
372 | print "<ul id=\"feed-$feed_id\" title=\"$feed_title\" selected=\"true\" | |
373 | myBackLabel='".__("Home")."' myBackHref='home.php'>"; | |
374 | } | |
375 | ||
376 | print "<li><a href='#searchForm-$feed_id-$cat_id'>Search...</a></li>"; | |
377 | } | |
378 | ||
379 | $num_headlines = 0; | |
380 | ||
381 | while ($line = db_fetch_assoc($result)) { | |
382 | $id = $line["id"]; | |
383 | $real_feed_id = $line["feed_id"]; | |
384 | ||
385 | if (sql_bool_to_bool($line["unread"])) { | |
386 | $class = ''; | |
387 | } else { | |
388 | $class = 'oldItem'; | |
389 | } | |
390 | ||
391 | if (mobile_feed_has_icon($real_feed_id)) { | |
392 | $icon_url = "../../".ICONS_URL."/$real_feed_id.ico"; | |
393 | } else { | |
394 | $icon_url = "../../images/blank_icon.gif"; | |
395 | } | |
396 | ||
397 | print "<li class='$class'><a href='article.php?id=$id&feed=$feed_id&cat=$cat_id&is_cat=$is_cat'> | |
398 | <img class='tinyIcon' src='$icon_url'>"; | |
399 | print $line["title"]; | |
400 | print "</a></li>"; | |
401 | ||
402 | ++$num_headlines; | |
403 | ||
404 | } | |
405 | ||
406 | if ($num_headlines == 0 && $search) { | |
407 | $articles_url = "feed.php?id=$feed_id&cat=$cat_id&skip=$next_offset"; | |
408 | ||
409 | print "<li><a href=\"$articles_url\">" . __("Nothing found (click to reload feed).") . "</a></li>"; | |
410 | ||
411 | } | |
412 | ||
413 | // print "<a target='_replace' href='feed.php?id=$feed_id&cat=$cat_id&skip=0'>Next $limit articles...</a>"; | |
414 | ||
415 | $next_offset = $offset + $num_headlines; | |
a42c55f0 | 416 | $num_unread = getFeedUnread($feed_id, $is_cat); |
9d9ed2b3 AD |
417 | |
418 | /* FIXME needs normal implementation */ | |
419 | ||
420 | if ($num_headlines > 0 && ($num_unread == 0 || $num_unread > $next_offset)) { | |
421 | ||
422 | if ($is_cat) { | |
423 | $articles_url = "feed.php?id=$feed_id&skip=$next_offset". | |
424 | "&search=$search&is_cat=true"; | |
425 | } else { | |
426 | $articles_url = "feed.php?id=$feed_id&cat=$cat_id&skip=$next_offset". | |
427 | "&search=$search"; | |
428 | } | |
429 | ||
430 | print "<li><a href=\"$articles_url\" | |
431 | target=\"_replace\">Get more articles...</a></li>"; | |
432 | } | |
433 | ||
434 | if (!$offset) print "</ul>"; | |
435 | ||
436 | } | |
437 | ||
a42c55f0 | 438 | function render_article($id, $feed_id, $cat_id, $is_cat) { |
9d9ed2b3 AD |
439 | |
440 | $query = "SELECT title,link,content,feed_id,comments,int_id, | |
441 | marked,unread,published, | |
442 | ".SUBSTRING_FOR_DATE."(updated,1,16) as updated, | |
443 | author | |
444 | FROM ttrss_entries,ttrss_user_entries | |
445 | WHERE id = '$id' AND ref_id = id AND owner_uid = " . | |
446 | $_SESSION["uid"] ; | |
447 | ||
a42c55f0 | 448 | $result = db_query($query); |
9d9ed2b3 AD |
449 | |
450 | if (db_num_rows($result) != 0) { | |
451 | ||
452 | $line = db_fetch_assoc($result); | |
453 | ||
a42c55f0 | 454 | $tmp_result = db_query("UPDATE ttrss_user_entries |
9d9ed2b3 AD |
455 | SET unread = false,last_read = NOW() |
456 | WHERE ref_id = '$id' | |
457 | AND owner_uid = " . $_SESSION["uid"]); | |
458 | ||
a42c55f0 | 459 | $updated_fmt = make_local_datetime($line['updated'], false); |
9d9ed2b3 AD |
460 | |
461 | $title = $line["title"]; | |
462 | $article_link = $line["link"]; | |
463 | ||
464 | if (!$is_cat) | |
a42c55f0 | 465 | $feed_title = getFeedTitle($feed_id); |
9d9ed2b3 | 466 | else |
a42c55f0 | 467 | $feed_title = getCategoryTitle($feed_id); |
9d9ed2b3 AD |
468 | |
469 | print "<div class=\"panel\" id=\"article-$id\" title=\"$title\" | |
470 | selected=\"true\" | |
471 | myBackLabel='$feed_title' myBackHref='feed.php?id=$feed_id&cat=$cat_id&is_cat=$is_cat'>"; | |
472 | ||
473 | if ($line['feed_id'] != $feed_id) { | |
a42c55f0 | 474 | $real_feed_title = getFeedTitle($line['feed_id']); |
9d9ed2b3 AD |
475 | $real_feed_id = $line['feed_id']; |
476 | $feed_link = "(<a href=\"feed.php?id=$real_feed_id\">$real_feed_title</a>)"; | |
477 | } | |
478 | // print "<fieldset>"; | |
479 | ||
480 | print "<div style='float : right'>($updated_fmt)</div>"; | |
481 | ||
482 | print "<h2><a target='_blank' href='$article_link'>$title</a> $feed_link</h2>"; | |
483 | ||
484 | print "<hr>"; | |
485 | ||
486 | /* print "<div class=\"row\">"; | |
487 | print "<label id='title'><a target='_blank' href='$article_link'>$title</a></label>"; | |
488 | print "</div>"; */ | |
489 | ||
490 | $is_starred = (sql_bool_to_bool($line["marked"])) ? "true" : "false"; | |
491 | $is_published = (sql_bool_to_bool($line["published"])) ? "true" : "false"; | |
492 | ||
493 | //print "<div class=\"row\">"; | |
494 | //print "<label id='updated'>Updated:</label>"; | |
495 | //print "<input type='text' enabled='false' name='updated' disabled value='$updated_fmt'/>"; | |
496 | //print "</div>"; | |
497 | ||
498 | // print "</fieldset>"; | |
499 | ||
a42c55f0 | 500 | $content = sanitize($line["content"]); |
9d9ed2b3 AD |
501 | $content = preg_replace("/href=/i", "target=\"_blank\" href=", $content); |
502 | ||
a42c55f0 | 503 | if (!mobile_get_pref("SHOW_IMAGES")) { |
9d9ed2b3 AD |
504 | $content = preg_replace('/<img[^>]+>/is', '', $content); |
505 | } | |
506 | ||
507 | print "<p>$content</p>"; | |
508 | ||
509 | print "<div class='nav'> | |
510 | <label>Navigation</label> | |
511 | <div class='button left' onclick='goPrev($id, $feed_id, this)'>Prev</div> | |
512 | <div class='button right' onclick='goNext($id, $feed_id, this)'>Next</div> | |
513 | </div>"; | |
514 | ||
515 | print "<fieldset>"; | |
516 | ||
517 | print "<div class=\"row\"> | |
518 | <label>Starred</label> | |
519 | <div class=\"toggle\" onclick=\"toggleMarked($id, this)\" toggled=\"$is_starred\"><span class=\"thumb\"></span><span class=\"toggleOn\">ON</span><span class=\"toggleOff\">OFF</span></div> | |
520 | </div>"; | |
521 | ||
522 | print "<div class=\"row\"> | |
523 | <label>Published</label> | |
524 | <div class=\"toggle\" onclick=\"togglePublished($id, this)\" toggled=\"$is_published\"><span class=\"thumb\"></span><span class=\"toggleOn\">ON</span><span class=\"toggleOff\">OFF</span></div> | |
525 | </div>"; | |
526 | ||
527 | print "<div class=\"row\"> | |
528 | <label>Unread</label> | |
529 | <div class=\"toggle\" onclick=\"toggleUnread($id, this)\" toggled=\"$is_unread\"><span class=\"thumb\"></span><span class=\"toggleOn\">ON</span><span class=\"toggleOff\">OFF</span></div> | |
530 | </div>"; | |
531 | ||
532 | ||
533 | print "</fieldset>"; | |
534 | ||
535 | print "</div>"; | |
536 | ||
537 | } | |
538 | } | |
539 | ?> |