#!/usr/bin/perl # # Calendar Admin Script # # Matt Kruse # http://www.mattkruse.com/ # $|=1; print "Content-type: text/html\n\n"; # $base_dir = ""; ##################################################################### # # SPLASH() # # Splash Screen # ##################################################################### sub SPLASH { print <<"END"; Calendar Administration

Calendar Administration
Author: Matt Kruse
Web Site: http://www.mattkruse.com/scripts/calendar/

THIS PROGRAM IS FREE SOFTWARE
    However...
  • It may not be re-distributed
  • It may not be sold
THE POSTCARD INITIATIVE
This program is free, but I would appreciate receiving a postcard from you as a Thank-You for my time. If used for company purposes, a \$50 donation is appreciated. Actually, any donation at all is appreciated! :)

Matt Kruse
5510 31st Ave Ct.
Moline, IL 61265

      Login: 
   Password: 
Config File: 

END exit(0); } ##################################################################### # # ADMIN() # # Main Admin page # ##################################################################### sub ADMIN { if ($vars{html_heading} eq "yes") { $html_heading = " CHECKED "; } if ($vars{html_description} eq "yes") { $html_description= " CHECKED "; } $monsunweek{$vars{monsunweek}} = " CHECKED "; unless ($vars{calendarurl} =~ /http/) { $vars{calendarurl} = "http://" . $ENV{SERVER_NAME} . $vars{cgi}; $vars{calendarurl} =~ s|_admin||; $vars{message} .= "\\n\\nYour calendar URL needs to be entered. A URL has been entered for you based on this admin utility.\\n\\nYou must Save Options before this takes effect."; } opendir(DIR,$vars{template_dir}); $calendar_template_options = ""; $viewday_template_options = ""; while ($file = readdir(DIR)) { $selected = ""; if ($file =~ /^calendar.*\.html/) { $title = $file; $title =~ m|^calendar_?(.*)\.html|i; $title = $1; $title =~ s|_| |g; if ($vars{calendar_html} =~ /$file/) { $selected = " SELECTED "; } $calendar_template_options .= "