Esempio n. 1
0
    $data = stripslashes($data);
    $data = htmlspecialchars($data);
    return $data;
}
//update forum_post table
if (isset($_POST['submit'])) {
    $new_forum_topic = new ForumPost();
    $new_forum_topic->createNew(array('post_title' => $topic, 'post_description' => $description, 'posted_user' => $name, 'posted_date' => $date));
    $new_forum_topic->register();
    header('Location: forum_p.php');
    exit;
}
ob_flush();
//Get details from forum_post table
echo "<div class='datagrid'><table>\n    <thead><tr><th>Discussion</th><th>Posted by</th><th>Date</th></tr></thead>";
$allposts = ForumPost::getallForum();
foreach ($allposts as $key => $value) {
    $id = $value->get_id();
    $title = $value->get_Title();
    #$des=$value->get_Description();
    $pst_usr = $value->get_Posteduser();
    $pst_date = $value->get_Postdate();
    //echo "<a href='forum_view_posts.php?cid=".$id."' class='cat_links'>  <b>$title</b>:  <br> Posted By <i>$pst_usr</i> </a>  ";
    echo "\n        <tbody><tr><td><a href='forum_view_posts.php?cid=" . $id . "' style='text-decoration: none; color:#0912cb;'>{$title}</a></td><td>{$pst_usr}</td><td>{$pst_date}</td></tr>\n        <tr class=\"alt\">\n        </tr>\n        </tbody>\n        ";
}
echo "</table></div>";
?>

        </div>
        </div>