Example #1
0
			<div class="alignleft"><?php 
        next_posts_link('&laquo; Previous Entries');
        ?>
</div>
			<div class="alignright"><?php 
        previous_posts_link('Next Entries &raquo;');
        ?>
</div>
		</div>
		<?php 
    }
    ?>

	<?php 
} else {
    // Show 404 message
    if (function_exists('bb_404')) {
        bb_404();
    }
}
?>

	</div><!-- end #content-main -->
	<div id="content-sub">
		<?php 
get_sidebar();
?>
	</div> <!-- end #content-sub -->
</div><!-- end #content -->
<?php 
get_footer();
Example #2
0
/**
 * do a 404 header and check file types
 * if bad file type then die properly else continue and print 404 message
 */
function bb_404Response()
{
    header('HTTP/1.1 404 Not Found');
    if (!empty($_SERVER['REQUEST_URI'])) {
        $fileExtension = strtolower(pathinfo($_SERVER['REQUEST_URI'], PATHINFO_EXTENSION));
    } else {
        $fileExtension = '';
    }
    $badFileTypes = array('css', 'txt', 'jpg', 'gif', 'rar', 'zip', 'png', 'bmp', 'tar', 'doc', 'xml', 'js');
    $badFileTypes = apply_filters('bb_404BadFileTypes', $badFileTypes);
    if (in_array($fileExtension, $badFileTypes)) {
        bb_404();
        die;
    }
}