Example #1
0
# Check if we're installed
if (!isset($host)) {
    $Install = new Install();
    if (isset($_GET['install'])) {
        $pass = safe($_POST['pass']);
        if ($pass == "SQL Pass") {
            $pass = '';
        }
        $Install->Generate(safe($_POST['host']), safe($_POST['user']), $pass, safe($_POST['name']));
        $Install->Done();
    }
    $Install->HTML();
    $Install->Done();
    die;
} else {
    # HardCore Code
    # General Functions
    # Get Setting from DB
    # HTML & PHP Include
    include_once dirname(__FILE__) . "/Header.index.php";
}
if (isset($_GET['category']) && GetCategories::categoryExists($_GET['category'])) {
    include_once dirname(__FILE__) . "/Posts.index.php";
} else {
    if (isset($_GET['post']) && count(GetPosts::getPostId($_GET['post'])) > 1) {
        include_once dirname(__FILE__) . "/Post.index.php";
    } else {
        include_once dirname(__FILE__) . "/Categories.index.php";
    }
}
include_once dirname(__FILE__) . "/Footer.index.php";
Example #2
0
<div id="main" class="grid_8 alpha">
<?php 
$post = GetPosts::getPostId($_GET['post']);
$cat = GetCategories::nameForId($post['category_id']);
?>
	<article class="post">
    
        <h2><a href="#"><?php 
echo $post['title'];
?>
</a></h2>
        
        <a href="#"><img src="<?php 
echo full_upload_path($post['image']);
?>
" alt="" class="thumbnail alignleft" /></a>
        
        <p>
			<?php 
echo $post['content'];
?>
        </p>
        <div class="clear"></div>  
        
        <footer class="postmeta">
            <span class="btn alignleft">
            	In <a href="?category=<?php 
echo $_GET['category'];
?>
"><?php 
echo $cat;