]>
git.wh0rd.org - tt-rss.git/blob - modules/popup-dialog.php
2 function module_popup_dialog ( $link ) {
4 $param = db_escape_string ( $_REQUEST [ "param" ]);
6 if ( $id == "importOpml" ) {
7 print "<div id= \" infoBoxTitle \" >" . __ ( 'OPML Import' ). "</div>" ;
8 print "<div class= \" infoBoxContents \" >" ;
10 print "<div class= \" prefFeedCatHolder \" >" ;
12 $owner_uid = $_SESSION [ "uid" ];
14 db_query ( $link , "BEGIN" );
16 /* create Imported feeds category just in case */
18 $result = db_query ( $link , "SELECT id FROM
19 ttrss_feed_categories WHERE title = 'Imported feeds' AND
20 owner_uid = ' $owner_uid ' LIMIT 1" );
22 if ( db_num_rows ( $result ) == 0 ) {
23 db_query ( $link , "INSERT INTO ttrss_feed_categories
25 VALUES ('Imported feeds', ' $owner_uid ')" );
28 db_query ( $link , "COMMIT" );
30 /* Handle OPML import by DOMXML/DOMDocument */
32 if ( function_exists ( 'domxml_open_file' )) {
33 print "<ul class='nomarks'>" ;
34 print "<li>" . __ ( "Importing using DOMXML." ). "</li>" ;
35 require_once "opml_domxml.php" ;
36 opml_import_domxml ( $link , $owner_uid );
38 } else if ( PHP_VERSION
>= 5 ) {
39 print "<ul class='nomarks'>" ;
40 print "<li>" . __ ( "Importing using DOMDocument." ). "</li>" ;
41 require_once "opml_domdoc.php" ;
42 opml_import_domdoc ( $link , $owner_uid );
45 print_error ( __ ( "DOMXML extension is not found. It is required for PHP versions below 5." ));
50 print "<div align='center'>" ;
52 print "<button onclick= \" return opmlImportDone() \" >" .
53 __ ( 'Close this window' ). "</button>" ;
57 print "<script type= \" text/javascript \" >" ;
58 print "parent.opmlImportHandler(this)" ;
66 if ( $id == "editPrefProfiles" ) {
68 print "<div id= \" infoBoxTitle \" >" . __ ( 'Settings Profiles' ). "</div>" ;
69 print "<div class= \" infoBoxContents \" >" ;
71 print "<div><input id= \" fadd_profile \"
72 onkeypress= \" return filterCR(event, addPrefProfile) \"
74 <button onclick= \" javascript:addPrefProfile() \" >" .
75 __ ( 'Create profile' ). "</button></div>" ;
79 $result = db_query ( $link , "SELECT title,id FROM ttrss_settings_profiles
80 WHERE owner_uid = " . $_SESSION [ "uid" ]. " ORDER BY title" );
83 <a href= \" # \" onclick= \" selectTableRows('prefFeedCatList', 'all') \" >" . __ ( 'All' ). "</a>,
84 <a href= \" # \" onclick= \" selectTableRows('prefFeedCatList', 'none') \" >" . __ ( 'None' ). "</a>" ;
86 print "<div class= \" prefFeedCatHolder \" >" ;
88 print "<form id= \" profile_edit_form \" onsubmit= \" return false \" >" ;
90 print "<table width= \" 100% \" class= \" prefFeedCatList \"
91 cellspacing= \" 0 \" id= \" prefFeedCatList \" >" ;
93 print "<tr class= \" odd \" id= \" FCATR-0 \" >" ;
95 print "<td width='5%' align='center'><input
96 onclick='toggleSelectRow(this);'
97 type= \" checkbox \" id= \" FCCHK-0 \" ></td>" ;
99 if (! $_SESSION [ "profile" ]) {
100 $is_active = __ ( "(active)" );
105 print "<td><span id= \" FCATT-0 \" >" .
106 __ ( "Default profile" ) . " $is_active </span></td>" ;
112 while ( $line = db_fetch_assoc ( $result )) {
114 $class = ( $lnum %
2 ) ?
"even" : "odd" ;
116 $cat_id = $line [ "id" ];
117 $this_row_id = "id= \" FCATR- $cat_id\" " ;
119 print "<tr class= \" $class\" $this_row_id >" ;
121 $edit_title = htmlspecialchars ( $line [ "title" ]);
123 print "<td width='5%' align='center'><input
124 onclick='toggleSelectRow(this);'
125 type= \" checkbox \" id= \" FCCHK- $cat_id\" ></td>" ;
127 if ( $_SESSION [ "profile" ] == $line [ "id" ]) {
128 $is_active = __ ( "(active)" );
133 print "<td><span id= \" FCATT- $cat_id\" >" .
134 $edit_title . "</span> $is_active </td>" ;
145 print "<div class='dlgButtons'>
146 <div style='float : left'>
147 <button onclick= \" return removeSelectedPrefProfiles() \" >" .
148 __ ( 'Remove' ). "</button>
149 <button onclick= \" return activatePrefProfile() \" >" .
150 __ ( 'Activate' ). "</button>
153 print "<button onclick= \" return closeInfoBox() \" >" .
154 __ ( 'Close this window' ). "</button>" ;
156 print "</div></div>" ;
161 if ( $id == "pubOPMLUrl" ) {
163 print "<div id= \" infoBoxTitle \" >" . __ ( 'Public OPML URL' ). "</div>" ;
164 print "<div class= \" infoBoxContents \" >" ;
166 $url_path = opml_publish_url ( $link );
168 print __ ( "Your Public OPML URL is:" );
170 print "<div class= \" tagCloudContainer \" >" ;
171 print "<a id='pub_opml_url' href=' $url_path ' target='_blank'> $url_path </a>" ;
174 print "<div align='center'>" ;
176 print "<button onclick= \" return opmlRegenKey() \" >" .
177 __ ( 'Generate new URL' ). "</button> " ;
179 print "<button onclick= \" return closeInfoBox() \" >" .
180 __ ( 'Close this window' ). "</button>" ;
182 print "</div></div>" ;
187 if ( $id == "explainError" ) {
189 print "<div id= \" infoBoxTitle \" >" . __ ( 'Notice' ). "</div>" ;
190 print "<div class= \" infoBoxContents \" >" ;
192 print "<div class= \" errorExplained \" >" ;
195 print __ ( "Update daemon is enabled in configuration, but daemon process is not running, which prevents all feeds from updating. Please start the daemon process or contact instance owner." );
197 $stamp = ( int ) file_get_contents ( LOCK_DIRECTORY
. "/update_daemon.stamp" );
199 print "<p>" . __ ( "Last update:" ) . " " . date ( "Y.m.d, G:i" , $stamp );
204 $msg = check_for_update ( $link );
207 print __ ( "You are running the latest version of Tiny Tiny RSS. The fact that you are seeing this dialog is probably a bug." );
215 print __ ( "Update daemon is taking too long to perform a feed update. This could indicate a problem like crash or a hang. Please check the daemon process or contact instance owner." );
217 $stamp = ( int ) file_get_contents ( LOCK_DIRECTORY
. "/update_daemon.stamp" );
219 print "<p>" . __ ( "Last update:" ) . " " . date ( "Y.m.d, G:i" , $stamp );
225 print "<div align='center'>" ;
227 print "<button onclick= \" return closeInfoBox() \" " .
228 __ ( 'Close this window' ). "</button>" ;
230 print "</div></div>" ;
235 if ( $id == "quickAddFeed" ) {
237 print "<div id= \" infoBoxTitle \" >" . __ ( 'Subscribe to Feed' ). "</div>" ;
238 print "<div class= \" infoBoxContents \" >" ;
240 print "<form id='feed_add_form' onsubmit='return false'>" ;
242 print "<input type= \" hidden \" name= \" op \" value= \" rpc \" >" ;
243 print "<input type= \" hidden \" name= \" subop \" value= \" addfeed \" >" ;
244 //print "<input type=\"hidden\" name=\"from\" value=\"tt-rss\">";
246 print "<div class= \" dlgSec \" >" . __ ( "Feed" ). "</div>" ;
247 print "<div class= \" dlgSecCont \" >" ;
249 print __ ( "URL:" ) . " " ;
251 print "<input size= \" 40 \"
252 onkeypress= \" return filterCR(event, subscribeToFeed) \"
253 name= \" feed \" id= \" feed_url \" >" ;
257 if ( get_pref ( $link , 'ENABLE_FEED_CATS' )) {
258 print __ ( 'Place in category:' ) . " " ;
259 print_feed_cat_select ( $link , "cat" );
264 print '<div id="fadd_feeds_container" style="display:none">
266 <div class="dlgSec">' . __ ( 'Available feeds' ) . '</div>
267 <div class="dlgSecCont">'
269 . ' <select name="feed" id="faad_feeds_container_select" size="3"></select>'
272 print "<div id='fadd_login_container' style='display:none'>
274 <div class= \" dlgSec \" >" . __ ( "Authentication" ). "</div>
275 <div class= \" dlgSecCont \" >" .
277 __ ( 'Login:' ) . " <input name='login' size= \" 20 \"
278 onkeypress= \" return filterCR(event, subscribeToFeed) \" > " .
279 __ ( 'Password:' ) . "<input type='password'
280 name='pass' size= \" 20 \"
281 onkeypress= \" return filterCR(event, subscribeToFeed) \" >
285 print "<div style= \" clear : both \" >
286 <input type= \" checkbox \" id= \" fadd_login_check \"
287 onclick='checkboxToggleElement(this, \" fadd_login_container \" )'>
288 <label for= \" fadd_login_check \" >" .
289 __ ( 'This feed requires authentication.' ). "</div>" ;
293 print "<div class= \" dlgButtons \" >
294 <button class= \" button \" id= \" fadd_submit_btn \"
295 onclick= \" return subscribeToFeed() \" >" . __ ( 'Subscribe' ). "</button>
296 <button onclick= \" return displayDlg('feedBrowser') \" >" . __ ( 'More feeds' ). "</button>
297 <button onclick= \" return closeInfoBox() \" >" . __ ( 'Cancel' ). "</button></div>" ;
302 if ( $id == "feedBrowser" ) {
304 print "<div id= \" infoBoxTitle \" >" . __ ( 'Feed Browser' ). "</div>" ;
306 print "<div class= \" infoBoxContents \" >" ;
308 $browser_search = db_escape_string ( $_REQUEST [ "search" ]);
310 print "<form onsubmit='return false;' display='inline'
311 name='feed_browser' id='feed_browser'>" ;
313 print "<input type= \" hidden \" name= \" op \" value= \" rpc \" >" ;
314 print "<input type= \" hidden \" name= \" subop \" value= \" updateFeedBrowser \" >" ;
317 <div style='float : right'>
318 <img style='display : none'
319 id='feed_browser_spinner' src='" .
320 theme_image ( $link , 'images/indicator_white.gif' ). "'>
321 <input name= \" search \" size= \" 20 \" type= \" search \"
322 onchange= \" javascript:updateFeedBrowser() \" value= \" $browser_search\" >
323 <button onclick= \" javascript:updateFeedBrowser() \" >" . __ ( 'Search' ). "</button>
326 print " <select name= \" mode \" onchange= \" updateFeedBrowser() \" >
327 <option value='1'>" . __ ( 'Popular feeds' ) . "</option>
328 <option value='2'>" . __ ( 'Feed archive' ) . "</option>
333 print " <select name= \" limit \" onchange='updateFeedBrowser()'>" ;
335 foreach ( array ( 25 , 50 , 100 , 200 ) as $l ) {
336 $issel = ( $l == $limit ) ?
"selected" : "" ;
337 print "<option $issel > $l </option>" ;
344 $owner_uid = $_SESSION [ "uid" ];
346 print "<ul class='browseFeedList' id='browseFeedList'>" ;
347 print_feed_browser ( $link , $search , 25 );
350 print "<div align='center'>
351 <button onclick= \" feedBrowserSubscribe() \" >" . __ ( 'Subscribe' ). "</button>
352 <button style='display : none' id='feed_archive_remove' onclick= \" feedArchiveRemove() \" >" . __ ( 'Remove' ). "</button>
353 <button onclick= \" closeInfoBox() \" >" . __ ( 'Cancel' ). "</button></div>" ;
359 if ( $id == "search" ) {
361 print "<div id= \" infoBoxTitle \" >" . __ ( 'Search' ). "</div>" ;
362 print "<div class= \" infoBoxContents \" >" ;
364 print "<form id='search_form' onsubmit='return false'>" ;
366 #$active_feed_id = db_escape_string($_REQUEST["param"]);
368 $params = explode ( ":" , db_escape_string ( $_REQUEST [ "param" ]), 2 );
370 $active_feed_id = sprintf ( " %d " , $params [ 0 ]);
371 $is_cat = ( bool ) $params [ 1 ];
373 print "<div class= \" dlgSec \" >" . __ ( 'Look for' ). "</div>" ;
375 print "<div class= \" dlgSecCont \" >" ;
377 print "<input onkeypress= \" return filterCR(event, search) \"
378 name= \" query \" size= \" 20 \" type= \" search \" value=''>" ;
380 print " " . __ ( 'match on' ). " " ;
382 $search_fields = array (
383 "title" => __ ( "Title" ),
384 "content" => __ ( "Content" ),
385 "both" => __ ( "Title or content" ));
387 print_select_hash ( "match_on" , 3 , $search_fields );
390 print "<br/>" . __ ( 'Limit search to:' ). " " ;
392 print "<select name= \" search_mode \" >
393 <option value= \" all_feeds \" >" . __ ( 'All feeds' ). "</option>" ;
395 $feed_title = getFeedTitle ( $link , $active_feed_id );
398 $feed_cat_title = getFeedCatTitle ( $link , $active_feed_id );
400 $feed_cat_title = getCategoryTitle ( $link , $active_feed_id );
403 if ( $active_feed_id && ! $is_cat ) {
404 print "<option selected value= \" this_feed \" > $feed_title </option>" ;
406 print "<option disabled>" . __ ( 'This feed' ). "</option>" ;
410 $cat_preselected = "selected" ;
413 if ( get_pref ( $link , 'ENABLE_FEED_CATS' ) && ( $active_feed_id > 0 ||
$is_cat )) {
414 print "<option $cat_preselected value= \" this_cat \" > $feed_cat_title </option>" ;
416 //print "<option disabled>".__('This category')."</option>";
425 print "<div class= \" dlgButtons \" >
426 <button onclick= \" javascript:search() \" >" . __ ( 'Search' ). "</button>
427 <button onclick= \" javascript:closeInfoBox(true) \" >" . __ ( 'Cancel' ). "</button>
436 if ( $id == "quickAddFilter" ) {
438 $active_feed_id = db_escape_string ( $_REQUEST [ "param" ]);
440 print "<div id= \" infoBoxTitle \" >" . __ ( 'Create Filter' ). "</div>" ;
441 print "<div class= \" infoBoxContents \" >" ;
443 print "<form id= \" filter_add_form \" onsubmit='return false'>" ;
445 print "<input type= \" hidden \" name= \" op \" value= \" pref-filters \" >" ;
446 print "<input type= \" hidden \" name= \" quiet \" value= \" 1 \" >" ;
447 print "<input type= \" hidden \" name= \" subop \" value= \" add \" >" ;
449 $result = db_query ( $link , "SELECT id,description
450 FROM ttrss_filter_types ORDER BY description" );
452 $filter_types = array ();
454 while ( $line = db_fetch_assoc ( $result )) {
455 //array_push($filter_types, $line["description"]);
456 $filter_types [ $line [ "id" ]] = __ ( $line [ "description" ]);
459 print "<div class= \" dlgSec \" >" . __ ( "Match" ). "</div>" ;
461 print "<div class= \" dlgSecCont \" >" ;
463 print "<span id= \" filter_dlg_date_mod_box \" style= \" display : none \" >" ;
464 print __ ( "Date" ) . " " ;
466 $filter_params = array (
467 "before" => __ ( "before" ),
468 "after" => __ ( "after" ));
470 print_select_hash ( "filter_date_modifier" , "before" , $filter_params );
472 print " </span>" ;
474 print "<input onkeypress= \" return filterCR(event, createFilter) \"
475 name= \" reg_exp \" size= \" 30 \" value= \" $reg_exp\" >" ;
477 print "<span id= \" filter_dlg_date_chk_box \" style= \" display : none \" >" ;
478 print " <button onclick= \" return filterDlgCheckDate() \" >" .
479 __ ( 'Check it' ). "</button>" ;
482 print "<br/> " . __ ( "on field" ) . " " ;
483 print_select_hash ( "filter_type" , 1 , $filter_types ,
484 'onchange="filterDlgCheckType(this)"' );
488 print __ ( "in" ) . " " ;
489 print_feed_select ( $link , "feed_id" , $active_feed_id );
493 print "<div class= \" dlgSec \" >" . __ ( "Perform Action" ). "</div>" ;
495 print "<div class= \" dlgSecCont \" >" ;
497 print "<select name= \" action_id \"
498 onchange= \" filterDlgCheckAction(this) \" >" ;
500 $result = db_query ( $link , "SELECT id,description FROM ttrss_filter_actions
503 while ( $line = db_fetch_assoc ( $result )) {
504 printf ( "<option value=' %d '> %s </option>" , $line [ "id" ], __ ( $line [ "description" ]));
509 print "<span id= \" filter_dlg_param_box \" style= \" display : none \" >" ;
510 print " " . __ ( "with parameters:" ) . " " ;
511 print "<input size= \" 20 \"
512 onkeypress= \" return filterCR(event, createFilter) \"
513 name= \" action_param \" >" ;
515 print_label_select ( $link , "action_param_label" , $action_param );
519 print " " ; // tiny layout hack
523 print "<div class= \" dlgSec \" >" . __ ( "Options" ). "</div>" ;
524 print "<div class= \" dlgSecCont \" >" ;
526 print "<div style= \" line-height : 100% \" >" ;
528 print "<input type= \" checkbox \" name= \" enabled \" id= \" enabled \" checked= \" 1 \" >
529 <label for= \" enabled \" >" . __ ( 'Enabled' ). "</label><br/>" ;
531 print "<input type= \" checkbox \" name= \" inverse \" id= \" inverse \" >
532 <label for= \" inverse \" >" . __ ( 'Inverse match' ). "</label>" ;
539 print "<div class= \" dlgButtons \" >" ;
541 print "<button onclick= \" return createFilter() \" >" .
542 __ ( 'Create' ). "</button> " ;
544 print "<button onclick= \" return closeInfoBox() \" >" . __ ( 'Cancel' ).
549 // print "</td></tr></table>";
554 if ( $id == "feedUpdateErrors" ) {
556 print "<div id= \" infoBoxTitle \" >" . __ ( 'Update Errors' ). "</div>" ;
557 print "<div class= \" infoBoxContents \" >" ;
559 print __ ( "These feeds have not been updated because of errors:" );
561 $result = db_query ( $link , "SELECT id,title,feed_url,last_error
562 FROM ttrss_feeds WHERE last_error != '' AND owner_uid = " . $_SESSION [ "uid" ]);
564 print "<ul class='feedErrorsList'>" ;
566 while ( $line = db_fetch_assoc ( $result )) {
567 print "<li><b>" . $line [ "title" ] . "</b> (" . $line [ "feed_url" ] . "): " .
568 "<em>" . $line [ "last_error" ] . "</em>" ;
573 print "<div align='center'>" ;
575 print "<button onclick= \" return closeInfoBox() \" >" .
576 __ ( 'Close this window' ). "</button>" ;
583 if ( $id == "editArticleTags" ) {
585 print "<div id= \" infoBoxTitle \" >" . __ ( 'Edit Tags' ). "</div>" ;
586 print "<div class= \" infoBoxContents \" >" ;
588 print "<form id= \" tag_edit_form \" onsubmit='return false'>" ;
590 print __ ( "Tags for this article (separated by commas):" ). "<br>" ;
592 $tags = get_article_tags ( $link , $param );
594 $tags_str = join ( ", " , $tags );
596 print "<table width='100%'>" ;
598 print "<tr><td colspan='2'><input type= \" hidden \" name= \" id \" value= \" $param\" ></td></tr>" ;
600 print "<tr><td colspan='2'><textarea rows='4' class='iedit' id='tags_str'
601 name='tags_str'> $tags_str </textarea>
602 <div class= \" autocomplete \" id= \" tags_choices \"
603 style= \" display:none \" ></div>
610 print "<div align='right'>" ;
612 print "<button onclick= \" return editTagsSave() \" >" . __ ( 'Save' ). "</button> " ;
613 print "<button onclick= \" return closeInfoBox() \" >" . __ ( 'Cancel' ). "</button>" ;
620 if ( $id == "printTagCloud" ) {
621 print "<div id= \" infoBoxTitle \" >" . __ ( 'Tag Cloud' ). "</div>" ;
622 print "<div class= \" infoBoxContents \" >" ;
624 print __ ( "Showing most popular tags " ). " (<a
625 href='javascript:toggleTags(true)'>" . __ ( 'more tags' ). "</a>):<br/>" ;
627 print "<div class= \" tagCloudContainer \" >" ;
629 printTagCloud ( $link );
633 print "<div align='center'>" ;
634 print "<button onclick= \" return closeInfoBox() \" >" .
635 __ ( 'Close this window' ). "</button>" ;
643 if ( $id == "emailArticle" ) {
645 print "<div id= \" infoBoxTitle \" >" . __ ( 'Forward article by email' ). "</div>" ;
646 print "<div class= \" infoBoxContents \" >" ;
648 print "<form id= \" article_email_form \" onsubmit='return false'>" ;
650 $secretkey = sha1 ( uniqid ( rand (), true ));
652 $_SESSION [ 'email_secretkey' ] = $secretkey ;
654 print "<input type= \" hidden \" name= \" secretkey \" value= \" $secretkey\" >" ;
655 print "<input type= \" hidden \" name= \" op \" value= \" rpc \" >" ;
656 print "<input type= \" hidden \" name= \" subop \" value= \" sendEmail \" >" ;
658 $result = db_query ( $link , "SELECT email, full_name FROM ttrss_users WHERE
659 id = " . $_SESSION [ "uid" ]);
661 $user_email = htmlspecialchars ( db_fetch_result ( $result , 0 , "email" ));
662 $user_name = htmlspecialchars ( db_fetch_result ( $result , 0 , "full_name" ));
664 if (! $user_name ) $user_name = $_SESSION [ 'name' ];
666 $_SESSION [ 'email_replyto' ] = $user_email ;
667 $_SESSION [ 'email_fromname' ] = $user_name ;
669 require_once "lib/MiniTemplator.class.php" ;
671 $tpl = new MiniTemplator
;
672 $tpl_t = new MiniTemplator
;
674 $tpl -> readTemplateFromFile ( "templates/email_article_template.txt" );
676 $tpl -> setVariable ( 'USER_NAME' , $_SESSION [ "name" ]);
677 $tpl -> setVariable ( 'USER_EMAIL' , $user_email );
678 $tpl -> setVariable ( 'TTRSS_HOST' , $_SERVER [ "HTTP_HOST" ]);
680 // $tpl->addBlock('header');
682 $result = db_query ( $link , "SELECT link, content, title
683 FROM ttrss_user_entries, ttrss_entries WHERE id = ref_id AND
684 id IN ( $param ) AND owner_uid = " . $_SESSION [ "uid" ]);
686 if ( db_num_rows ( $result ) > 1 ) {
687 $subject = __ ( "[Forwarded]" ) . " " . __ ( "Multiple articles" );
690 while ( $line = db_fetch_assoc ( $result )) {
693 $subject = __ ( "[Forwarded]" ) . " " . htmlspecialchars ( $line [ "title" ]);
695 $tpl -> setVariable ( 'ARTICLE_TITLE' , strip_tags ( $line [ "title" ]));
696 $tpl -> setVariable ( 'ARTICLE_URL' , strip_tags ( $line [ "link" ]));
698 $tpl -> addBlock ( 'article' );
701 $tpl -> addBlock ( 'email' );
704 $tpl -> generateOutputToString ( $content );
706 print "<table width='100%'><tr><td>" ;
712 print "<input size= \" 40 \" disabled
713 onkeypress= \" return filterCR(event, false) \"
714 value= \" $user_name < $user_email > \" >" ;
716 print "</td></tr><tr><td>" ;
722 print "<input size= \" 40 \"
723 onkeypress= \" return filterCR(event, false) \"
724 name= \" destination \" id= \" destination \" >" ;
726 print "<div class= \" autocomplete \" id= \" destination_choices \"
727 style= \" display:none \" ></div>" ;
729 print "</td></tr><tr><td>" ;
731 print __ ( 'Subject:' );
735 print "<input size= \" 60 \" class= \" iedit \"
736 onkeypress= \" return filterCR(event, false) \"
737 name= \" subject \" value= \" $subject\" id= \" subject \" >" ;
739 print "</td></tr></table>" ;
741 print "<textarea rows='10' class='iedit' style='font-size : small'
742 name='content'> $content </textarea>" ;
746 print "<div class='dlgButtons'>" ;
748 print "<button onclick= \" return emailArticleDo() \" >" . __ ( 'Send e-mail' ). "</button> " ;
749 print "<button onclick= \" return closeInfoBox() \" >" . __ ( 'Cancel' ). "</button>" ;
756 if ( $id == "generatedFeed" ) {
758 print "<div id= \" infoBoxTitle \" >" . __ ( 'View as RSS' ). "</div>" ;
759 print "<div class= \" infoBoxContents \" >" ;
761 $params = explode ( ":" , $param , 3 );
762 $feed_id = db_escape_string ( $params [ 0 ]);
763 $is_cat = ( bool ) $params [ 1 ];
765 $key = get_feed_access_key ( $link , $feed_id , $is_cat );
767 $url_path = htmlspecialchars ( $params [ 2 ]) . "&key=" . $key ;
769 print __ ( "You can view this feed as RSS using the following URL:" );
771 print "<div class= \" tagCloudContainer \" >" ;
772 print "<a id='gen_feed_url' href=' $url_path ' target='_blank'> $url_path </a>" ;
775 print "<div align='center'>" ;
777 print "<button onclick= \" return genUrlChangeKey(' $feed_id ', ' $is_cat ') \" >" .
778 __ ( 'Generate new URL' ). "</button> " ;
780 print "<button onclick= \" return closeInfoBox() \" >" .
781 __ ( 'Close this window' ). "</button>" ;
783 print "</div></div>" ;
788 print "<div id='infoBoxTitle'>Internal Error</div>
789 <div id='infoBoxContents'>
790 <p>Unknown dialog <b> $id </b></p>