if (!isset($_PATH['id'])) { jsRedirect('index.php'); } $id = $_PATH['id']; if (!is_numeric($id)) { jsRedirect(script_path . 'index.php'); } $data = $db->getArray(' # Get one news post SELECT t1.blog_id, t1.author_id, t1.date, t1.subject, t1.body, t1.access, t1.custom AS custom_text, t1.comments, t1.html, t1.smiles, t1.bb, t2.username AS author, t2.custom AS custom_title FROM ' . db_blogs . ' AS t1, ' . db_users . ' AS t2 WHERE t1.blog_id = "' . $id . '" AND t1.author_id = t2.user_id LIMIT 1;'); $b->setDate($config->get('news_date_format')); $ets->news[0] = $b->format($data, $user, $l['edit']); // get comments. $ets->list_comments = $b->getComments($id, $config->get('comment_date_format'), $l['guest'], $user, $l['edit']); // form to add comment $name = $user->isLogedIn ? $user->get('username') : $l['guest']; $submit_text = sprintf($l['comment_submit'], $name); $ets->add_comment = ' <script type="text/javascript"> function insertWindow( gotopage ) { window.open( gotopage, \'newwindow\',\'toolbar=0,location=0,directories=0,menuBar=0,resizable=1,scrollbars=yes,width=400,height=500,left=20,top=20\'); } </script> <form method="post" action="' . script_path . 'addcomment.php" name="new_entry"> <input type="hidden" name="parent" value="' . $data['blog_id'] . '"> <textarea name="body" class="nlb_add_comment"></textarea> <br> <input class="nlb_add_comment" type="submit" value="' . $submit_text . '"> </form>'; $ets->link_smiles = $l['link_smiles'];