[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Booking System



Here is a (first) upload from me to the MacPerl list.

This is a complete internet booking system.

A little background why I produced this (btw. with the VERY
fine help of Alan Fry (ajf@afco.demon.co.uk) !!
I have never seen or spoken to him, but his advices/tips/tricks
where GREAT !!) :

We here use 3 locations where several researchers do their
experiments/research etc. At these 3 locations (called factors,
don't ask me why, it's just called that way), the U-, Y- and
Z-factors, there are a number of (test)rooms each.
On the U-factor there are 3 rooms, the Y has 4 rooms etc.
Until now we planned everything by means of agendas. At the
end there was hardly an overview, of who is doing what, when.
So I had the idea to create this.
I can tell you it's a big success here !
It runs now for a couple of months without any great
problems (there were a few bugs -of course- in the script,
but these are fixed). The bookingfiles contain now hundreds
of lines (one line is a booking), and the performance
(responsetime) is good. The server is a PowerMac 6100/60.

Everyone can make a booking. At that moment that date/time is
fixed. Only the booker can delete it. Because we didn't want a
system with username/password (many people use their first
name, or wife/husbands/dogs-name, so what means security ??).
And because we have the situation here that everyone has (more
or less) its own computer, I used the bookers IP-address
as his/her 'signature' of the booking made. That address is
saved with the booking, and checked if an attempt is made to
delete it.
Until now there have bin no problems with that.
Another gift of this system is that it produces files.
Database-files. Now it is very easy, to perform
some calculations at the finishing of a project. How many
time (hours) was spend on this project ?
What are the peak-times, who worked on it ?
And more questions.

There are (in our situation) 3 booking-files, for every factor
one: InFileU.txt, InFileY.txt and InFileZ.txt.
And 3 files where the deleted bookings go to:
InFileDelU.txt, InFileDelY.txt and InFileDelZ.txt.
I created the deleted-bookings files, because sometimes someone
says, 'I booked that and that day/time, and now it's gone !!'.
Than I can look in these files, and answer, 'Sorry, you didn't
book that moment, it's NOT deleted !'.
So nothing leaves this system.


Included are a number of Perl CGI's:

TstBookGB.cgi     Adds a booking to a booking (text)-database
TstBookDayGB.cgi  Shows what bookings a user made -today-
TstDelGB.cgi      Deletes a booking from the database
TstDelDayGB.cgi   Shows what booking have been deleted -today-
TstSrchGB.cgi     Produces a search/report -nicely formatted-
                  over a -user-definable- period

The database is in the simple form of a tab-delimited text file.
They can be viewed with every common wordprocessor.
If viewed with, lets say, Excel, realize that the leading
zero's of time and dates are essential !


Included are also a number of forms (html):

TstBookGB.html    Formpage to add a booking (green)
TstDelGB.html     Formpage to delete a booking (blue)
TstSrchGB.html    Formpage to perform a search (yellow)

The forms contain JavaScripts that will show the current
-today's- date at startup. That's easy, because you don't
book in the past. (actually it's impossible, the booking
CGI will send an error-message).


Also included are 4 images (gifs) to produce nice buttons.

add.gif           Add-button
delete.gif        Delete-button
help.gif          Help-button (means: what did I today ?)
search.gif        Search-button

These gifs are compacted (Compact Pro), and BinHexed.

Install everything on your web-server, and that's it.
That means, you have to edit in the Perl-scripts the path
(and name if you like) to your database, and -eventually-
change the path to the images in the html-files.
Also create files with the name of your database(s) at a
safe place on your web-server.


I know this was a long message, but I just wanted to
explain things in a correct way.

Greetings from Holland !!


# You can use this system for free ONLY for       #
# non-commercial use. Otherwise I own you $50 US. #
# (but a free gift is always welcome, it's a step #
# closer to my new PowerMac)                      #

# Nico Rozendaal,                                 #
# University of Maastricht,                       #
# Dept. of Psychiatry & Neuropsychology,          #
# Maastricht, The Netherlands.                    #
# e-mail: nico.rozendaal@np.unimaas.nl            #


Content-type: application/octet-stream;
              name="Images.cpt.Hqx"
Content-Disposition: attachment; filename="Images.cpt.Hqx"

Attachment converted: PowerPudge:Images.cpt.Hqx (????/----) (0003C0E8)
Content-type: application/octet-stream;
              name="TstBookGB.html"
Content-Disposition: attachment; filename="TstBookGB.html"

Attachment converted: PowerPudge:TstBookGB.html (????/----) (0003C0E9)
Content-type: application/octet-stream;
              name="TstDelGB.html"
Content-Disposition: attachment; filename="TstDelGB.html"

Attachment converted: PowerPudge:TstDelGB.html (????/----) (0003C0EA)
Content-type: application/octet-stream;
              name="TstSrchGB.html"
Content-Disposition: attachment; filename="TstSrchGB.html"

Attachment converted: PowerPudge:TstSrchGB.html (????/----) (0003C0EB)
Content-type: application/octet-stream;
              name="TstBookGB.pl"
Content-Disposition: attachment; filename="TstBookGB.pl"

Attachment converted: PowerPudge:TstBookGB.pl (????/----) (0003C0EC)
Content-type: application/octet-stream;
              name="TstBookDayGB.pl"
Content-Disposition: attachment; filename="TstBookDayGB.pl"

Attachment converted: PowerPudge:TstBookDayGB.pl (????/----) (0003C0ED)
Content-type: application/octet-stream;
              name="TstDelGB.pl"
Content-Disposition: attachment; filename="TstDelGB.pl"

Attachment converted: PowerPudge:TstDelGB.pl (????/----) (0003C0EE)
Content-type: application/octet-stream;
              name="TstDelDayGB.pl"
Content-Disposition: attachment; filename="TstDelDayGB.pl"

Attachment converted: PowerPudge:TstDelDayGB.pl (????/----) (0003C0EF)
Content-type: application/octet-stream;
              name="TstSrchGB.pl"
Content-Disposition: attachment; filename="TstSrchGB.pl"

Attachment converted: PowerPudge:TstSrchGB.pl (????/----) (0003C0F0)