5 function viewsrc_content(App $a) {
8 notice( t('Access denied.') . EOL);
12 $item_id = (($a->argc > 1) ? intval($a->argv[1]) : 0);
16 notice( t('Item not found.') . EOL);
20 $r = q("SELECT `item`.`body` FROM `item`
21 WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0
22 and `item`.`moderated` = 0
23 AND `item`.`id` = '%s' LIMIT 1",
28 if (dbm::is_result($r))
30 echo str_replace("\n",'<br />',$r[0]['body']);
33 $o .= str_replace("\n",'<br />',$r[0]['body']);