]>
git.wh0rd.org - tt-rss.git/blob - classes/backend.php
2 class Backend
extends Handler
{
4 header("Content-type: text/html");
5 print __("Loading, please wait...") . " " .
6 "<img src='images/indicator_tiny.gif'>";
9 function digestTest() {
10 header("Content-type: text/html");
12 $rv = Digest
::prepare_headlines_digest($_SESSION['uid'], 1, 1000);
14 $rv[3] = "<pre>" . $rv[3] . "</pre>";
19 private function display_main_help() {
20 $info = get_hotkeys_info();
21 $imap = get_hotkeys_map();
24 foreach ($imap[1] as $sequence => $action) {
25 if (!isset($omap[$action])) $omap[$action] = array();
27 array_push($omap[$action], $sequence);
30 print_notice("<a target=\"_blank\" href=\"http://tt-rss.org/wiki/InterfaceTips\">".
31 __("Other interface tips are available in the Tiny Tiny RSS wiki.") .
34 print "<ul class='helpKbList' id='helpKbList'>";
36 print "<h2>" . __("Keyboard Shortcuts") . "</h2>";
38 foreach ($info as $section => $hotkeys) {
40 print "<li><h3>" . $section . "</h3></li>";
42 foreach ($hotkeys as $action => $description) {
44 if (is_array($omap[$action])) {
45 foreach ($omap[$action] as $sequence) {
46 if (strpos($sequence, "|") !== FALSE) {
47 $sequence = substr($sequence,
48 strpos($sequence, "|")+
1,
51 $keys = explode(" ", $sequence);
53 for ($i = 0; $i < count($keys); $i++
) {
54 if (strlen($keys[$i]) > 1) {
56 foreach (str_split($keys[$i]) as $c) {
59 $tmp .= __('Shift') . '+';
62 $tmp .= __('Ctrl') . '+';
71 $sequence = join(" ", $keys);
75 print "<span class='hksequence'>$sequence</span>";
87 $topic = basename(clean($_REQUEST["topic"]));
91 $this->display_main_help();
94 //$this->display_prefs_help();
97 print "<p>".__("Help topic not found.")."</p>";
100 print "<div align='center'>";
101 print "<button dojoType=\"dijit.form.Button\"
102 onclick=\"return dijit.byId('helpDlg').hide()\">".
103 __('Close this window')."</button>";
106 /* if (file_exists("help/$topic.php")) {
107 include("help/$topic.php");
109 print "<p>".__("Help topic not found.")."</p>";
111 /* print "<div align='center'>
112 <button onclick=\"javascript:window.close()\">".
113 __('Close this window')."</button></div>"; */