* @license Unlicense * @since 1.6.0-fork * @since 2.7.1-fork Functional refactoring */ namespace Lwt\Interface\Do_Feeds; require_once 'inc/session_utility.php'; function dummy_function_1(): array { global $tbpref; $edit_text = 0; $message = ''; $marked_items = implode(',', $_REQUEST['marked_items']); $res = do_mysqli_query( "SELECT * FROM ( SELECT * FROM {$tbpref}feedlinks WHERE FlID IN ($marked_items) ORDER BY FlNfID ) A left join {$tbpref}newsfeeds ON NfID=FlNfID" ); $count=$message1=$message2=$message3=$message4=0; while ($row = mysqli_fetch_assoc($res)) { if (get_nf_option($row['NfOptions'], 'edit_text') == 1) { if ($edit_text==1) { $count++; } else { echo '
'; $edit_text=1; } } $doc = array(); $doc[0] = array( 'link' => empty($row['FlLink'])?('#'.$row['FlID']):$row['FlLink'], 'title' => $row['FlTitle'], 'audio' => $row['FlAudio'], 'text' => $row['FlText'] ); $NfName = (string) $row['NfName']; $nf_id = (int) $row['NfID']; $nf_options = $row['NfOptions']; if (!$nf_tag_name = get_nf_option($nf_options, 'tag')) { $nf_tag_name = mb_substr($NfName, 0, 20, "utf-8"); } if (!$nf_max_texts = (int)get_nf_option($nf_options, 'max_texts')) { $nf_max_texts = (int)getSettingWithDefault('set-max-texts-per-feed'); } $texts = get_text_from_rsslink( $doc, $row['NfArticleSectionTags'], $row['NfFilterTags'], get_nf_option($nf_options, 'charset') ); if (isset($texts['error'])) { echo $texts['error']['message']; foreach ($texts['error']['link'] as $err_links) { runsql( 'UPDATE ' . $tbpref . 'feedlinks SET FlLink=CONCAT(" ",FlLink) where FlLink in ('.convert_string_to_sqlsyntax($err_links).')', "" ); } unset($texts['error']); } if (get_nf_option($nf_options, 'edit_text')==1) { foreach ($texts as $text) { ?>
      Title: Field must not be empty
Language:
Text: Field must not be empty
Source URI:
Tags:
Audio-URI:

+++ "' . $text['TxTitle']. '" added! +++

'; do_mysqli_query( 'INSERT INTO ' . $tbpref . 'texts ( TxLgID,TxTitle,TxText,TxAudioURI,TxSourceURI ) VALUES ( '.$row['NfLgID'].',' . convert_string_to_sqlsyntax($text['TxTitle']) .','. convert_string_to_sqlsyntax($text['TxText']) .','. convert_string_to_sqlsyntax($text['TxAudioURI']) .','. convert_string_to_sqlsyntax($text['TxSourceURI']) .' )' ); $id = get_last_key(); splitCheckText( get_first_value( 'select TxText as value from ' . $tbpref . 'texts where TxID = ' . $id ), get_first_value( 'select TxLgID as value from ' . $tbpref . 'texts where TxID = ' . $id ), $id ); runsql( 'insert into ' . $tbpref . 'texttags (TtTxID, TtT2ID) select ' . $id . ', T2ID from ' . $tbpref . 'tags2 where T2Text = "' . $nf_tag_name .'"', "" ); } get_texttags(1); $result = do_mysqli_query( "SELECT TtTxID FROM " . $tbpref . "texttags join " . $tbpref . "tags2 on TtT2ID=T2ID WHERE T2Text='". $nf_tag_name ."'" ); $text_count=0; $text_item = array(); while ($row = mysqli_fetch_assoc($result)) { $text_item[$text_count++] = $row['TtTxID']; } mysqli_free_result($result); if (!empty($text_item)) { sort($text_item, SORT_NUMERIC); if ($text_count>$nf_max_texts) { $text_item=array_slice($text_item, 0, $text_count-$nf_max_texts); foreach ($text_item as $text_ID) { $temp = runsql( 'delete from ' . $tbpref . 'textitems2 where Ti2TxID = ' . $text_ID, "" ); if (is_numeric($temp)) { $message3 += (int) $temp; } $temp = runsql( 'delete from ' . $tbpref . 'sentences where SeTxID = ' . $text_ID, "" ); if (is_numeric($temp)) { $message2 += (int) $temp; } $temp = runsql( 'INSERT INTO ' . $tbpref . 'archivedtexts ( AtLgID, AtTitle, AtText, AtAnnotatedText, AtAudioURI, AtSourceURI ) SELECT TxLgID, TxTitle, TxText, TxAnnotatedText, TxAudioURI, TxSourceURI FROM ' . $tbpref . 'texts WHERE TxID = ' . $text_ID, "" ); if (is_numeric($temp)) { $message4 += (int) $temp; } $id = get_last_key(); runsql( 'INSERT INTO ' . $tbpref . 'archtexttags (AgAtID, AgT2ID) SELECT ' . $id . ', TtT2ID FROM ' . $tbpref . 'texttags WHERE TtTxID = ' . $text_ID, "" ); $temp = runsql( 'DELETE FROM ' . $tbpref . 'texts WHERE TxID = ' . $text_ID, "" ); if (is_numeric($temp)) { $message1 += (int) $temp; } adjust_autoincr('texts', 'TxID'); adjust_autoincr('sentences', 'SeID'); runsql( "DELETE " . $tbpref . "texttags FROM (" . $tbpref . "texttags LEFT JOIN " . $tbpref . "texts ON TtTxID = TxID ) WHERE TxID IS NULL", '' ); } } } } } mysqli_free_result($res); if ($message4>0 || $message1>0) { $message = "Texts archived: $message1 / Sentences deleted: $message2" . " / Text items deleted: $message3"; } if ($edit_text==1) { ?>
'; } ?>

"; } else { echo "\n

"; } echo "+++ ",$lf," +++

"; } ?> +++ Warning: Invalid Search +++

'; } } } } else { $wh_query = ''; } $currentpage = (int) processSessParam("page", "currentrsspage", '1', true); $currentsort = (int) processDBParam("sort", 'currentrsssort', '2', true); ?>
New Feed
manage feeds Manage Feeds
Active Texts
Archived Texts
Filter Filter 
Language:     
'; } if (mysqli_data_seek($result, 0)) { ?>Newsfeed: '; if ($currentfeed == 0 || $currentfeed == '' || strpos($feeds_list, $currentfeed) === false) { $currentfeed = substr($feeds_list, 1); // explode(',', $feeds_list)[0] may work as well (2.8.0) } if (strpos($currentfeed, ',')===false) { echo ' -'; } else { echo ' update multiple feeds'; } if ($time) { $diff = time() - (int) $time; print_last_feed_update($diff); } echo ''; $sql = "SELECT count(*) AS value FROM {$tbpref}feedlinks WHERE FlNfID in ($currentfeed)$wh_query"; $recno = (int)get_first_value($sql); if ($debug) { echo $sql . ' ===> ' . $recno; } if ($recno) { $maxperpage = (int)getSettingWithDefault('set-articles-per-page'); $pages = $recno == 0 ? 0 : (intval(($recno-1) / $maxperpage) + 1); if ($currentpage < 1) { $currentpage = 1; } if ($currentpage > $pages) { $currentpage = $pages; } $limit = 'LIMIT ' . (($currentpage-1) * $maxperpage) . ',' . $maxperpage; $sorts = array('FlTitle','FlDate DESC','FlDate ASC'); $lsorts = count($sorts); if ($currentsort < 1) { $currentsort = 1; } if ($currentsort > $lsorts) { $currentsort = $lsorts; } echo ' '. $total=$recno .' articles ';/// echo ''; makePager($currentpage, $pages, 'do_feeds.php', 'form1'); ?> Sort Order:
Multi Actions Multi Actions
Marked Texts:    
'; if ($row['TxID']) { echo ''; } mysqli_free_result($result); echo '
Mark Articles Link Date
-'; } elseif ($row['AtID']) { echo '-'; } elseif (!empty($row['FlLink']) && str_starts_with((string) $row['FlLink'], ' ')) { echo ' -'; } else { echo ''; } echo ' ' . $row['FlTitle'] . ''; if ($row['FlAudio']) { echo ' -'; } echo ' '; if ( !empty($row['FlLink']) && !str_starts_with(trim((string) $row['FlLink']), '#') ) { echo ' -'; } echo '' . $row['FlDate'] . '
'; echo '
'; if ($pages > 1) { echo '
'; echo $total; echo ''; makePager($currentpage, $pages, 'do_feeds.php', 'form3'); echo '
'; } } else { echo ''; } } ?>