]>
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= \" javascript:selectPrefRows('fcat', true) \" >" . __ ( 'All' ). "</a>,
84 <a href= \" javascript:selectPrefRows('fcat', false) \" >" . __ ( '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='toggleSelectPrefRow(this, \" fcat \" );'
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='toggleSelectPrefRow(this, \" fcat \" );'
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 if (! get_pref ( $link , "_PREFS_PUBLISH_KEY" ))
167 set_pref ( $link , "_PREFS_PUBLISH_KEY" ,
168 sha1 ( uniqid ( rand (), true )));
170 $url_path = opml_publish_url ( $link );
172 print __ ( "Your Public OPML URL is:" );
174 print "<div class= \" tagCloudContainer \" >" ;
175 print "<a id='pub_opml_url' href=' $url_path ' target='_blank'> $url_path </a>" ;
178 print "<div align='center'>" ;
180 print "<button onclick= \" return opmlRegenKey() \" >" .
181 __ ( 'Generate new URL' ). "</button> " ;
183 print "<input class= \" button \"
184 type= \" submit \" onclick= \" return closeInfoBox() \"
185 value= \" " . __ ( 'Close this window' ). " \" >" ;
187 print "</div></div>" ;
192 if ( $id == "explainError" ) {
194 print "<div id= \" infoBoxTitle \" >" . __ ( 'Notice' ). "</div>" ;
195 print "<div class= \" infoBoxContents \" >" ;
197 print "<div class= \" errorExplained \" >" ;
200 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." );
202 $stamp = ( int ) file_get_contents ( LOCK_DIRECTORY
. "/update_daemon.stamp" );
204 print "<p>" . __ ( "Last update:" ) . " " . date ( "Y.m.d, G:i" , $stamp );
209 $msg = check_for_update ( $link );
212 print __ ( "You are running the latest version of Tiny Tiny RSS. The fact that you are seeing this dialog is probably a bug." );
220 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." );
222 $stamp = ( int ) file_get_contents ( LOCK_DIRECTORY
. "/update_daemon.stamp" );
224 print "<p>" . __ ( "Last update:" ) . " " . date ( "Y.m.d, G:i" , $stamp );
230 print "<div align='center'>" ;
232 print "<input class= \" button \"
233 type= \" submit \" onclick= \" return closeInfoBox() \"
234 value= \" " . __ ( 'Close this window' ). " \" >" ;
236 print "</div></div>" ;
241 if ( $id == "quickAddFeed" ) {
243 print "<div id= \" infoBoxTitle \" >" . __ ( 'Subscribe to Feed' ). "</div>" ;
244 print "<div class= \" infoBoxContents \" >" ;
246 print "<form id='feed_add_form' onsubmit='return false'>" ;
248 print "<input type= \" hidden \" name= \" op \" value= \" rpc \" >" ;
249 print "<input type= \" hidden \" name= \" subop \" value= \" addfeed \" >" ;
250 //print "<input type=\"hidden\" name=\"from\" value=\"tt-rss\">";
252 print "<div class= \" dlgSec \" >" . __ ( "Feed" ). "</div>" ;
253 print "<div class= \" dlgSecCont \" >" ;
255 print __ ( "URL:" ) . " " ;
257 print "<input size= \" 40 \"
258 onkeypress= \" return filterCR(event, subscribeToFeed) \"
259 name= \" feed \" id= \" feed_url \" >" ;
263 if ( get_pref ( $link , 'ENABLE_FEED_CATS' )) {
264 print __ ( 'Place in category:' ) . " " ;
265 print_feed_cat_select ( $link , "cat" );
270 print "<div id='fadd_login_container' style='display:none'>
272 <div class= \" dlgSec \" >" . __ ( "Authentication" ). "</div>
273 <div class= \" dlgSecCont \" >" .
275 __ ( 'Login:' ) . " <input name='login' size= \" 20 \"
276 onkeypress= \" return filterCR(event, subscribeToFeed) \" > " .
277 __ ( 'Password:' ) . "<input type='password'
278 name='pass' size= \" 20 \"
279 onkeypress= \" return filterCR(event, subscribeToFeed) \" >
283 print "<div style= \" clear : both \" >
284 <input type= \" checkbox \" id= \" fadd_login_check \"
285 onclick='checkboxToggleElement(this, \" fadd_login_container \" )'>
286 <label for= \" fadd_login_check \" >" .
287 __ ( 'This feed requires authentication.' ). "</div>" ;
291 print "<div class= \" dlgButtons \" >
292 <button class= \" button \" id= \" fadd_submit_btn \"
293 onclick= \" return subscribeToFeed() \" >" . __ ( 'Subscribe' ). "</button>
294 <button onclick= \" return displayDlg('feedBrowser') \" >" . __ ( 'More feeds' ). "</button>
295 <button onclick= \" return closeInfoBox() \" >" . __ ( 'Cancel' ). "</button></div>" ;
300 if ( $id == "feedBrowser" ) {
302 print "<div id= \" infoBoxTitle \" >" . __ ( 'Feed Browser' ). "</div>" ;
304 print "<div class= \" infoBoxContents \" >" ;
306 $browser_search = db_escape_string ( $_REQUEST [ "search" ]);
308 print "<form onsubmit='return false;' display='inline'
309 name='feed_browser' id='feed_browser'>" ;
311 print "<input type= \" hidden \" name= \" op \" value= \" rpc \" >" ;
312 print "<input type= \" hidden \" name= \" subop \" value= \" updateFeedBrowser \" >" ;
315 <div style='float : right'>
316 <img style='display : none'
317 id='feed_browser_spinner' src='" .
318 theme_image ( $link , 'images/indicator_white.gif' ). "'>
319 <input name= \" search \" size= \" 20 \" type= \" search \"
320 onchange= \" javascript:updateFeedBrowser() \" value= \" $browser_search\" >
321 <button onclick= \" javascript:updateFeedBrowser() \" >" . __ ( 'Search' ). "</button>
324 print " <select name= \" mode \" onchange= \" updateFeedBrowser() \" >
325 <option value='1'>" . __ ( 'Popular feeds' ) . "</option>
326 <option value='2'>" . __ ( 'Feed archive' ) . "</option>
331 print " <select name= \" limit \" onchange='updateFeedBrowser()'>" ;
333 foreach ( array ( 25 , 50 , 100 , 200 ) as $l ) {
334 $issel = ( $l == $limit ) ?
"selected" : "" ;
335 print "<option $issel > $l </option>" ;
342 $owner_uid = $_SESSION [ "uid" ];
344 /* print __('Select:')."
345 <a href=\"javascript:selectPrefRows('fbrowse', true)\">".__('All')."</a>,
346 <a href=\"javascript:selectPrefRows('fbrowse', false)\">".__('None')."</a>"; */
348 print "<ul class='browseFeedList' id='browseFeedList'>" ;
349 print_feed_browser ( $link , $search , 25 );
352 print "<div align='center'>
353 <button onclick= \" feedBrowserSubscribe() \" >" . __ ( 'Subscribe' ). "</button>
354 <button style='display : none' id='feed_archive_remove' onclick= \" feedArchiveRemove() \" >" . __ ( 'Remove' ). "</button>
355 <button onclick= \" closeInfoBox() \" >" . __ ( 'Cancel' ). "</button></div>" ;
361 if ( $id == "search" ) {
363 print "<div id= \" infoBoxTitle \" >" . __ ( 'Search' ). "</div>" ;
364 print "<div class= \" infoBoxContents \" >" ;
366 print "<form id='search_form' onsubmit='return false'>" ;
368 #$active_feed_id = db_escape_string($_REQUEST["param"]);
370 $params = split ( ":" , db_escape_string ( $_REQUEST [ "param" ]));
372 $active_feed_id = sprintf ( " %d " , $params [ 0 ]);
373 $is_cat = $params [ 1 ] == "true" ;
375 print "<div class= \" dlgSec \" >" . __ ( 'Look for' ). "</div>" ;
377 print "<div class= \" dlgSecCont \" >" ;
379 print "<input onkeypress= \" return filterCR(event, search) \"
380 name= \" query \" size= \" 20 \" type= \" search \" value=''>" ;
382 print " " . __ ( 'match on' ). " " ;
384 $search_fields = array (
385 "title" => __ ( "Title" ),
386 "content" => __ ( "Content" ),
387 "both" => __ ( "Title or content" ));
389 print_select_hash ( "match_on" , 3 , $search_fields );
392 print "<br/>" . __ ( 'Limit search to:' ). " " ;
394 print "<select name= \" search_mode \" >
395 <option value= \" all_feeds \" >" . __ ( 'All feeds' ). "</option>" ;
397 $feed_title = getFeedTitle ( $link , $active_feed_id );
400 $feed_cat_title = getFeedCatTitle ( $link , $active_feed_id );
402 $feed_cat_title = getCategoryTitle ( $link , $active_feed_id );
405 if ( $active_feed_id && ! $is_cat ) {
406 print "<option selected value= \" this_feed \" > $feed_title </option>" ;
408 print "<option disabled>" . __ ( 'This feed' ). "</option>" ;
412 $cat_preselected = "selected" ;
415 if ( get_pref ( $link , 'ENABLE_FEED_CATS' ) && ( $active_feed_id > 0 ||
$is_cat )) {
416 print "<option $cat_preselected value= \" this_cat \" > $feed_cat_title </option>" ;
418 //print "<option disabled>".__('This category')."</option>";
427 print "<div class= \" dlgButtons \" >
428 <button onclick= \" javascript:search() \" >" . __ ( 'Search' ). "</button>
429 <button onclick= \" javascript:closeInfoBox(true) \" >" . __ ( 'Cancel' ). "</button>
438 if ( $id == "quickAddFilter" ) {
440 $active_feed_id = db_escape_string ( $_REQUEST [ "param" ]);
442 print "<div id= \" infoBoxTitle \" >" . __ ( 'Create Filter' ). "</div>" ;
443 print "<div class= \" infoBoxContents \" >" ;
445 print "<form id= \" filter_add_form \" onsubmit='return false'>" ;
447 print "<input type= \" hidden \" name= \" op \" value= \" pref-filters \" >" ;
448 print "<input type= \" hidden \" name= \" quiet \" value= \" 1 \" >" ;
449 print "<input type= \" hidden \" name= \" subop \" value= \" add \" >" ;
451 $result = db_query ( $link , "SELECT id,description
452 FROM ttrss_filter_types ORDER BY description" );
454 $filter_types = array ();
456 while ( $line = db_fetch_assoc ( $result )) {
457 //array_push($filter_types, $line["description"]);
458 $filter_types [ $line [ "id" ]] = __ ( $line [ "description" ]);
461 print "<div class= \" dlgSec \" >" . __ ( "Match" ). "</div>" ;
463 print "<div class= \" dlgSecCont \" >" ;
465 print "<span id= \" filter_dlg_date_mod_box \" style= \" display : none \" >" ;
466 print __ ( "Date" ) . " " ;
468 $filter_params = array (
469 "before" => __ ( "before" ),
470 "after" => __ ( "after" ));
472 print_select_hash ( "filter_date_modifier" , "before" , $filter_params );
474 print " </span>" ;
476 print "<input onkeypress= \" return filterCR(event, createFilter) \"
477 name= \" reg_exp \" size= \" 30 \" value= \" $reg_exp\" >" ;
479 print "<span id= \" filter_dlg_date_chk_box \" style= \" display : none \" >" ;
480 print " <input class= \" button \"
481 type= \" submit \" onclick= \" return filterDlgCheckDate() \"
482 value= \" " . __ ( 'Check it' ). " \" >" ;
485 print "<br/> " . __ ( "on field" ) . " " ;
486 print_select_hash ( "filter_type" , 1 , $filter_types ,
487 'onchange="filterDlgCheckType(this)"' );
491 print __ ( "in" ) . " " ;
492 print_feed_select ( $link , "feed_id" , $active_feed_id );
496 print "<div class= \" dlgSec \" >" . __ ( "Perform Action" ). "</div>" ;
498 print "<div class= \" dlgSecCont \" >" ;
500 print "<select name= \" action_id \"
501 onchange= \" filterDlgCheckAction(this) \" >" ;
503 $result = db_query ( $link , "SELECT id,description FROM ttrss_filter_actions
506 while ( $line = db_fetch_assoc ( $result )) {
507 printf ( "<option value=' %d '> %s </option>" , $line [ "id" ], __ ( $line [ "description" ]));
512 print "<span id= \" filter_dlg_param_box \" style= \" display : none \" >" ;
513 print " " . __ ( "with parameters:" ) . " " ;
514 print "<input size= \" 20 \"
515 onkeypress= \" return filterCR(event, createFilter) \"
516 name= \" action_param \" >" ;
518 print_label_select ( $link , "action_param_label" , $action_param );
522 print " " ; // tiny layout hack
526 print "<div class= \" dlgSec \" >" . __ ( "Options" ). "</div>" ;
527 print "<div class= \" dlgSecCont \" >" ;
529 print "<div style= \" line-height : 100% \" >" ;
531 print "<input type= \" checkbox \" name= \" enabled \" id= \" enabled \" checked= \" 1 \" >
532 <label for= \" enabled \" >" . __ ( 'Enabled' ). "</label><br/>" ;
534 print "<input type= \" checkbox \" name= \" inverse \" id= \" inverse \" >
535 <label for= \" inverse \" >" . __ ( 'Inverse match' ). "</label>" ;
542 print "<div class= \" dlgButtons \" >" ;
544 print "<button onclick= \" return createFilter() \" >" .
545 __ ( 'Create' ). "</button> " ;
547 print "<button onclick= \" return closeInfoBox() \" >" . __ ( 'Cancel' ).
552 // print "</td></tr></table>";
557 if ( $id == "feedUpdateErrors" ) {
559 print "<div id= \" infoBoxTitle \" >" . __ ( 'Update Errors' ). "</div>" ;
560 print "<div class= \" infoBoxContents \" >" ;
562 print __ ( "These feeds have not been updated because of errors:" );
564 $result = db_query ( $link , "SELECT id,title,feed_url,last_error
565 FROM ttrss_feeds WHERE last_error != '' AND owner_uid = " . $_SESSION [ "uid" ]);
567 print "<ul class='feedErrorsList'>" ;
569 while ( $line = db_fetch_assoc ( $result )) {
570 print "<li><b>" . $line [ "title" ] . "</b> (" . $line [ "feed_url" ] . "): " .
571 "<em>" . $line [ "last_error" ] . "</em>" ;
576 print "<div align='center'>" ;
578 print "<button onclick= \" return closeInfoBox() \" >" .
579 __ ( 'Close this window' ). "</button>" ;
586 if ( $id == "editArticleTags" ) {
588 print "<div id= \" infoBoxTitle \" >" . __ ( 'Edit Tags' ). "</div>" ;
589 print "<div class= \" infoBoxContents \" >" ;
591 print "<form id= \" tag_edit_form \" onsubmit='return false'>" ;
593 print __ ( "Tags for this article (separated by commas):" ). "<br>" ;
595 $tags = get_article_tags ( $link , $param );
597 $tags_str = join ( ", " , $tags );
599 print "<table width='100%'>" ;
601 print "<tr><td colspan='2'><input type= \" hidden \" name= \" id \" value= \" $param\" ></td></tr>" ;
603 print "<tr><td colspan='2'><textarea rows='4' class='iedit' id='tags_str'
604 name='tags_str'> $tags_str </textarea>
605 <div class= \" autocomplete \" id= \" tags_choices \"
606 style= \" display:none \" ></div>
613 print "<div align='right'>" ;
615 print "<button onclick= \" return editTagsSave() \" >" . __ ( 'Save' ). "</button> " ;
616 print "<button onclick= \" return closeInfoBox() \" >" . __ ( 'Cancel' ). "</button>" ;
623 if ( $id == "printTagCloud" ) {
624 print "<div id= \" infoBoxTitle \" >" . __ ( 'Tag Cloud' ). "</div>" ;
625 print "<div class= \" infoBoxContents \" >" ;
627 print __ ( "Showing most popular tags " ). " (<a
628 href='javascript:toggleTags(true)'>" . __ ( 'more tags' ). "</a>):<br/>" ;
630 print "<div class= \" tagCloudContainer \" >" ;
632 printTagCloud ( $link );
636 print "<div align='center'>" ;
637 print "<button onclick= \" return closeInfoBox() \" >" .
638 __ ( 'Close this window' ). "</button>" ;
646 if ( $id == "emailArticle" ) {
648 print "<div id= \" infoBoxTitle \" >" . __ ( 'Forward article by email' ). "</div>" ;
649 print "<div class= \" infoBoxContents \" >" ;
651 print "<form id= \" article_email_form \" onsubmit='return false'>" ;
653 $secretkey = sha1 ( uniqid ( rand (), true ));
655 $_SESSION [ 'email_secretkey' ] = $secretkey ;
657 print "<input type= \" hidden \" name= \" secretkey \" value= \" $secretkey\" >" ;
658 print "<input type= \" hidden \" name= \" op \" value= \" rpc \" >" ;
659 print "<input type= \" hidden \" name= \" subop \" value= \" sendEmail \" >" ;
661 $result = db_query ( $link , "SELECT email, full_name FROM ttrss_users WHERE
662 id = " . $_SESSION [ "uid" ]);
664 $user_email = htmlspecialchars ( db_fetch_result ( $result , 0 , "email" ));
665 $user_name = htmlspecialchars ( db_fetch_result ( $result , 0 , "full_name" ));
667 if (! $user_name ) $user_name = $_SESSION [ 'name' ];
669 $_SESSION [ 'email_replyto' ] = $user_email ;
670 $_SESSION [ 'email_fromname' ] = $user_name ;
672 require_once "lib/MiniTemplator.class.php" ;
674 $tpl = new MiniTemplator
;
675 $tpl_t = new MiniTemplator
;
677 $tpl -> readTemplateFromFile ( "templates/email_article_template.txt" );
679 $tpl -> setVariable ( 'USER_NAME' , $_SESSION [ "name" ]);
680 $tpl -> setVariable ( 'USER_EMAIL' , $user_email );
681 $tpl -> setVariable ( 'TTRSS_HOST' , $_SERVER [ "HTTP_HOST" ]);
683 // $tpl->addBlock('header');
685 $result = db_query ( $link , "SELECT link, content, title
686 FROM ttrss_user_entries, ttrss_entries WHERE id = ref_id AND
687 id IN ( $param ) AND owner_uid = " . $_SESSION [ "uid" ]);
689 if ( db_num_rows ( $result ) > 1 ) {
690 $subject = __ ( "[Forwarded]" ) . " " . __ ( "Multiple articles" );
693 while ( $line = db_fetch_assoc ( $result )) {
696 $subject = __ ( "[Forwarded]" ) . " " . htmlspecialchars ( $line [ "title" ]);
698 $tpl -> setVariable ( 'ARTICLE_TITLE' , strip_tags ( $line [ "title" ]));
699 $tpl -> setVariable ( 'ARTICLE_URL' , strip_tags ( $line [ "link" ]));
701 $tpl -> addBlock ( 'article' );
704 $tpl -> addBlock ( 'email' );
707 $tpl -> generateOutputToString ( $content );
709 print "<table width='100%'><tr><td>" ;
715 print "<input size= \" 40 \" disabled
716 onkeypress= \" return filterCR(event, false) \"
717 value= \" $user_name < $user_email > \" >" ;
719 print "</td></tr><tr><td>" ;
725 print "<input size= \" 40 \"
726 onkeypress= \" return filterCR(event, false) \"
727 name= \" destination \" id= \" destination \" >" ;
729 print "<div class= \" autocomplete \" id= \" destination_choices \"
730 style= \" display:none \" ></div>" ;
732 print "</td></tr><tr><td>" ;
734 print __ ( 'Subject:' );
738 print "<input size= \" 60 \" class= \" iedit \"
739 onkeypress= \" return filterCR(event, false) \"
740 name= \" subject \" value= \" $subject\" id= \" subject \" >" ;
742 print "</td></tr></table>" ;
744 print "<textarea rows='10' class='iedit' style='font-size : small'
745 name='content'> $content </textarea>" ;
749 print "<div class='dlgButtons'>" ;
751 print "<button onclick= \" return emailArticleDo() \" >" . __ ( 'Send e-mail' ). "</button> " ;
752 print "<button onclick= \" return closeInfoBox() \" >" . __ ( 'Cancel' ). "</button>" ;
759 if ( $id == "generatedFeed" ) {
761 print "<div id= \" infoBoxTitle \" >" . __ ( 'View as RSS' ). "</div>" ;
762 print "<div class= \" infoBoxContents \" >" ;
764 $params = explode ( ":" , $param , 3 );
765 $feed_id = db_escape_string ( $params [ 0 ]);
766 $is_cat = ( bool ) $params [ 1 ];
768 $key = get_feed_access_key ( $link , $feed_id , $is_cat );
770 $url_path = htmlspecialchars ( $params [ 2 ]) . "&key=" . $key ;
772 print __ ( "You can view this feed as RSS using the following URL:" );
774 print "<div class= \" tagCloudContainer \" >" ;
775 print "<a id='gen_feed_url' href=' $url_path ' target='_blank'> $url_path </a>" ;
778 print "<div align='center'>" ;
780 print "<button onclick= \" return genUrlChangeKey(' $feed_id ', ' $is_cat ') \" >" .
781 __ ( 'Generate new URL' ). "</button> " ;
783 print "<input class= \" button \"
784 type= \" submit \" onclick= \" return closeInfoBox() \"
785 value= \" " . __ ( 'Close this window' ). " \" >" ;
787 print "</div></div>" ;
792 print "<div id='infoBoxTitle'>Internal Error</div>
793 <div id='infoBoxContents'>
794 <p>Unknown dialog <b> $id </b></p>