 |
Low Rate eCommerce & Retail Plans
Click Here for
fast and easy setup |
|
| Recent
Articles |
A Ps Problem With BBX
Someone recently asked me about increasing command width for 'ps' on SCO Unix.
Perl 'Eval' for Data Validation
I recently did a little web based Service Schedule.
This is something that gets its data from another
program: in other words, the details...
Rounding Time
It was a long, hard day. Up early to clean a room of furniture so that new carpet can be put in later this week, off to...
Controlling Concurrent Runs with Perl
Sometimes you have a program that can't be run by
more than one person, or one that must run frequently...
|
|
|
03.07.06
Simple
Schedule
By
A.P. Lawrence
I often get asked for web-based scheduling programs. I've
done quite a few of them over the years, sometimes using scripts
available from the web, but more often writing my own simply
because I don't like modifying other people's code.
All of the calendar based schedules I've done start with the
very simple files presented here. This base version doesn't
have much flexibility: it lets you put in one note per day,
and anyone who can access the schedule can overwrite that
with new information. Obviously most businesses need additional
features like multiple items, control of access, and probably
much more. But this is the starting point we can build from.
As shown here, your web server needs to support SSI (Server
Side Includes). Nowadays most of us would do this with php
instead, but I still use the Perl methods because I'm old
and stuck in my ways. Maybe I'll show a php version later.
The entire scheduling program consists of one web page. You
can call it whatever you want, but the cgi-bin perl script
needs to know where it can find it in your filesystem. The
cgi script uses a Perl database to store scheduled events;
that can be located anywhere also but of course has to be
accessible by the user Apache is running as.
Low Rate eCommerce & Retail Plans
Click Here for
fast and easy setup |
|
Note that the script serves two purposes: it is called to
add items to the schedule and as a server side include to
display scheduled events. In this version we have no pretty
formatting or other niceties that almost certainly would be
needed in a production version.
The script reads the web page and displays it when it is called
for a specific day; this could have been done differently
with a basically empty web page depending on a cgi script
to provide the contents. However, this design lets unskilled
people edit the web page without affecting the script.
The web page and associated script follow:
Click
to read the rest of the article.
|