#!/usr/bin/perl -w
# Starburst CMS | Perl Content Management System by Kirsle #
# -------------------------------------------------------- #
# This is a stripped-down edition of index.cgi meant to be #
# used as an RSS feed script for the SB-Blog plugin. #
use strict;
use warnings;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
use URI::Escape;
use Digest::MD5 qw(md5_hex);
use Data::Dumper;
use lib "./lib";
use Time::Format qw(time_format);
use Time::Local;
use Time::Zone;
our $root = {
# Base for pvt data. If you change this, also change it below at the
# require statements.
base => "./sb-pvt",
version => '0.01',
header => 0, # 1 = the HTTP headers were already sent
conf => {}, # Main configuration data.
me => 'guest', # Our username (default=guest)
auth => 0, # 1 = we're logged in, 0 = otherwise
users => {}, # Loaded user(s) information.
cookie => {}, # Loaded cookies.
meta => {}, # Header fields on pages.
content => '', # Eventual page contents.
perl => '', # Any embedded Perl code in the pages.
};
our $cgi = new CGI;
our $query = {
p => 'index',
};
# Define a fallback CGI::Carp failure page.
sub panic {
my $msg = shift;
if ($root->{header} == 0) {
print "Content-Type: text/html\n\n";
}
print "\n"
. "\n"
. "