Project:
stupidCMS
Code Location:
https://stupidcms.svn.sourceforge.net/svnroot/stupidcms
post.php
<?php /* Copyright (C) 2011 Jacopo Cascioli This file is part of stupidCMS This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ require "layout.php"; require "format.php"; require "settings.php"; $con = mysql_connect($server, $user, $password); mysql_select_db($database, $con); $query = mysql_query("SELECT * FROM general"); $general = mysql_fetch_array($query); $title = $general[1]; $description = $general[2]; $sentence = $general[3]; $license = $general[4]; $version = $general[5]; $lastupdate = date("l j F Y", $general[6]); $post_catid = $post[0][3]; $post_langid = $post[0][4]; $header = sprintf($header, $title, $description, ''); $footer = sprintf($footer, $lastupdate, $version, $license); $postid = $_GET["post"]; $query = mysql_query("SELECT * FROM posts WHERE id='$postid'"); $post = fetch_all($query); $main_content = format_posts($post); printf($html_base, $title, $header, $main_content, $footer); ?>
