]>
git.wh0rd.org - tt-rss.git/blob - modules/pref-instances.php
2 function module_pref_instances ( $link ) {
4 $subop = $_REQUEST [ 'subop' ];
6 if ( $subop == "edit" ) {
8 print "TODO: function not implemented." ;
14 print "<div id= \" pref-instance-wrap \" dojoType= \" dijit.layout.BorderContainer \" gutters= \" false \" >" ;
15 print "<div id= \" pref-instance-header \" dojoType= \" dijit.layout.ContentPane \" region= \" top \" >" ;
17 print "<div id= \" pref-instance-toolbar \" dojoType= \" dijit.Toolbar \" >" ;
19 $sort = db_escape_string ( $_REQUEST [ "sort" ]);
21 if (! $sort ||
$sort == "undefined" ) {
25 print "<div dojoType= \" dijit.form.DropDownButton \" >" .
26 "<span>" . __ ( 'Select' ). "</span>" ;
27 print "<div dojoType= \" dijit.Menu \" style= \" display: none; \" >" ;
28 print "<div onclick= \" selectTableRows('prefInstanceList', 'all') \"
29 dojoType= \" dijit.MenuItem \" >" . __ ( 'All' ). "</div>" ;
30 print "<div onclick= \" selectTableRows('prefInstanceList', 'none') \"
31 dojoType= \" dijit.MenuItem \" >" . __ ( 'None' ). "</div>" ;
34 print "<button dojoType= \" dijit.form.Button \" onclick= \" addInstance() \" >" . __ ( 'Link instance' ). "</button>" ;
35 print "<button dojoType= \" dijit.form.Button \" onclick= \" editSelectedInstance() \" >" . __ ( 'Edit' ). "</button>" ;
36 print "<button dojoType= \" dijit.form.Button \" onclick= \" removeSelectedInstances() \" >" . __ ( 'Remove' ). "</button>" ;
38 print "</div>" ; #toolbar
40 $result = db_query ( $link , "SELECT * FROM ttrss_linked_instances
43 print "<p class= \" insensitive \" style='margin-left : 1em;'>" . __ ( "You can connect other instances of Tiny Tiny RSS to this one to share Popular feeds. Link to this instance of Tiny Tiny RSS by using this URL:" );
45 print " <a href= \" # \" onclick= \" alert('" . htmlspecialchars ( get_self_url_prefix ()). "') \" >(display url)</a>" ;
47 print "<p><table width='100%' id='prefInstanceList' class='prefInstanceList' cellspacing='0'>" ;
49 print "<tr class= \" title \" >
50 <td align='center' width= \" 5% \" > </td>
51 <td width=''><a href= \" # \" onclick= \" updateInstanceList('access_url') \" >" . __ ( 'Instance URL' ). "</a></td>
52 <td width='20%'><a href= \" # \" onclick= \" updateUsersList('last_connected') \" >" . __ ( 'Last connected' ). "</a></td>
57 while ( $line = db_fetch_assoc ( $result )) {
58 $class = ( $lnum %
2 ) ?
"even" : "odd" ;
61 $this_row_id = "id= \" LIRR- $id\" " ;
63 $line [ "last_connected" ] = make_local_datetime ( $link , $line [ "last_connected" ], false );
65 print "<tr class= \" $class\" $this_row_id >" ;
67 print "<td align='center'><input onclick='toggleSelectRow(this);'
68 type= \" checkbox \" id= \" LICHK- $id\" ></td>" ;
70 $onclick = "onclick='editInstance( $id , event)' title='" . __ ( 'Click to edit' ). "'" ;
72 print "<td $onclick >" . htmlspecialchars ( $line [ 'access_url' ]) . "</td>" ;
73 print "<td $onclick >" . htmlspecialchars ( $line [ 'last_connected' ]) . "</td>" ;
83 print "</div>" ; #container