3 * @file mod/viewsrc.php
6 use Friendica\Core\L10n;
7 use Friendica\Database\DBM;
9 function viewsrc_content(App $a) {
12 notice(L10n::t('Access denied.') . EOL);
17 $item_id = (($a->argc > 1) ? intval($a->argv[1]) : 0);
21 notice(L10n::t('Item not found.') . EOL);
25 $r = q("SELECT `item`.`body` FROM `item`
26 WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0
27 and `item`.`moderated` = 0
28 AND `item`.`id` = '%s' LIMIT 1",
33 if (DBM::is_result($r))
35 echo str_replace("\n",'<br />',$r[0]['body']);
38 $o .= str_replace("\n",'<br />',$r[0]['body']);