From 72b65b574b3e9a0b822d04cf0ba0cdd62b2c5009 Mon Sep 17 00:00:00 2001 From: Respirant Date: Sun, 13 Dec 2020 10:10:31 +0100 Subject: [PATCH] Change with the including of libraries and copyright --- image/feed.php | 146 ------------------------------------------------- 1 file changed, 146 deletions(-) delete mode 100644 image/feed.php diff --git a/image/feed.php b/image/feed.php deleted file mode 100644 index bd4b2f1..0000000 --- a/image/feed.php +++ /dev/null @@ -1,146 +0,0 @@ -"; - } - return $value; - } -function parseHeader($block) -{ -return 'data->level.'>'. $block->data->text .'data->level.'>'; -} -function parseCode($block) -{ -return '
'.$block->data->code   .'
'; -} -function parseParagraph($block) -{ -return '

'.$block->data->text .'

'; -} -function parseTable($block) -{ -unset($return, $line, $cell); -$return = '
- -'; -foreach ($block->data->content as $line) { -$return .= ''; -foreach ($line as $cell) { -$return .= ''; -} -$return .= ''; -} -$return .= '
'; -$return .= $cell; -$return .= '
'; -return $return; -} -function parseList($block) -{ -unset($tag, $return, $item); -if ($block->data->style == 'ordered'){ -$tag = 'ol'; -}elseif ($block->data->style == 'unordered'){ -$tag = 'ul'; -} -$return = '<'.$tag.'>'; -foreach ($block->data->items as $item) { -$return .= '
  • '.$item.'
  • '; -} -$return .= ''; -return $return; -} -function parseImage($block) -{ -unset($captiontitle, $captionalt); -if ($block->data->caption){ -$captiontitle = '

    '.$block->data->caption.'

    '; -$captionalt = $block->data->caption; -} -return '
    -'.$captionalt.''.$captiontitle.' -
    '; -} -function echofeeddata($resultfeedmysqli, $returnfirstupdated){ -unset($return, $publishing_date); -$author_id = $resultfeedmysqli['author_id']; -$sqlfeed_author = mysqli_query($conn, "SELECT `fullname` FROM `authors` WHERE `id` = '.$author_id.'"); -$resultfeed_author = mysqli_fetch_assoc($sqlfeed_author); -//date -$publishing_date = date("r", strtotime($resultfeedmysqli['publishing_date'])); -//date -if ($returnfirstupdated === true){ -$return .= ''.$publishing_date.''; -} -$return .= ' - - -'.valueToXML($resultfeedmysqli['article_title']).' - - -https://'.$_SERVER[HTTP_HOST].'/'.$resultfeedmysqli['nameaddress'].''; -if ($resultfeed_author['fullname']){ -$return .= ' - -'.valueToXML($resultfeed_author['fullname']).' - -'; -} -$content_array_feed = json_decode($resultfeedmysqli['content']); -if (is_object($content_array_feed)){ -foreach ($content_array_feed->blocks as $block) { -switch ($block->type) { -case 'code': -$content_feed .= parseCode($block); -break; -case 'paragraph': -$content_feed .= parseParagraph($block); -break; -case 'header': -$content_feed .= parseHeader($block); -break; -case 'image': -$content_feed .= parseImage($block); -break; -case 'list': -$content_feed .= parseList($block); -break; -case 'table': -$content_feed .= parseTable($block); -break; -default: -// code... -break; -} -} -} -$content_feed = html_entity_decode($content_feed); -$return .= ' -'.valueToXML($content_feed).' - -'.$publishing_date.' -'; -return $return; -} -echo ' - - https://'.$_SERVER[HTTP_HOST].'/feed - - - <![CDATA[ The Unreal Blog ]]> - - - '; ?> - 0){ -$resultfeed_posts = mysqli_fetch_assoc($sqlfeed_posts); -echo echofeeddata($resultfeed_posts, true); -while($resultfeed_posts = mysqli_fetch_assoc($sqlfeed_posts)){ -echo echofeeddata($resultfeed_posts, false); -} -} -} -?> -