#!/usr/bin/perl ############################################################################## # Weekly Holiday Home Booking Calendar Version 2.50 # # Copyright 2001 John Plaxton john@availcheck.com # # First Created June 2001 Last Modified 15 November 2003 # # Scripts Archive at: http://www.availcheck.com # ############################################################################## # COPYRIGHT NOTICE # # Copyright 2001 John H K Plaxton All Rights Reserved. # # # # Availcheck Weekly Availability Calendar may NOT be used or modified or # # changed by anyone without my expressed permission. The coding should # # remain intact and unchanged. # # # # Selling the code for this program without prior written consent is # # expressly forbidden. In other words, please ask first before you try and # # make money off my program. This coding has taken hundreds of man hours. # # # ############################################################################## use CGI qw(:standard);use CGI::Carp qw(fatalsToBrowser);$q = new CGI;use Time::localtime;use Time::Local;print $q->header; require "/home/gar10848/public_html/calendars/cal1/config.pl"; require "/home/gar10848/public_html/calendars/cal1/codebank.pl"; $Bin = &getpath; @fields = $q->param(); foreach $field (@fields) { ${$field} = $q->param($field); ${$field} =~ s/[\|]//g; # removes pipes #print"$field - ${$field}
"; } my $headerdata = &get_header_details(); my ($contactname,$propname,$userid,$pword,$propaddr,$proptel,$propemail,$headertext,$curr,$currphrase,$lastupdated,$showhist,$showpricecol,$pcounter,$showavail) = split(/\|/, $headerdata); $mainbakfile="bak".$htable; $subbakfile="bak".$datatable; $ret_menu_text = "
Return to menu
"; if ($lost == 1){&print_lost_screen('bgcolor=palegreen',2,$propname);} elsif ($lost == 2){if (($u eq $userid)||($u eq $propemail)){&send_pwemail(&get_header_details());&print_pwrd_screen('bgcolor=palegreen',3,$propname);}else{&print_pwrd_screen('bgcolor=red',4,$propname);}} elsif (($u eq '')||($p eq '')){&print_pwrd_screen('bgcolor=lightblue',0,$propname);} elsif (($u ne $userid)||($p ne $pword)) {&print_pwrd_screen('bgcolor=red',1,$propname);} else { if ($action eq 'update_cal'){&print_dates_viewer($headerdata);} elsif ($action eq "autoupdatecal"){&autoupdatecal;&savelastupdate($headerdata);$message="Calendar Auto Updated.";&print_message($message);} elsif ($action eq 'edit'){&print_modify_screen($headerdata, $aut)} elsif ($action eq 'Save Updates'){&edit_records; &savelastupdate($headerdata);&print_dates_viewer($headerdata);} elsif ($action eq 'update_head'){&print_modify_page($headerdata);} elsif($action =~ /Save Settings/i){&edit_record;$message="Calendar Details Updated";&print_message($message);} elsif ($action eq 'rep1'){&print_report1($headerdata);} elsif ($action eq 'rep2'){&print_report2($headerdata);} elsif ($action eq 'add_opt'){&addscreen;} elsif ($action eq 'Add Time'){&addtime;$message="Time Added to Calendar";&print_message($message);} elsif ($action eq 'del_opt'){&delete_form} elsif ($action eq 'Delete All Historic Data'){&del_hist_data;$message="Historic Data Removed from Database";&print_message($message);} elsif ($action eq 'Delete Weeks from Calendar'){&del_end_data;$message="Data Removed from Database";&print_message($message);} elsif ($action eq 'backup'){&backupscreen;} elsif ($action eq 'Backup Calendar Data'){&backup_file($mainbakfile,$htable);&backup_file($subbakfile,$datatable);$message="Data Backed Up";&print_message($message);} elsif ($action =~ /Restore/){&restore_file($mainbakfile,$htable);&restore_file($subbakfile,$datatable);$message="Old Data Restored";&print_message($message);} elsif ($view ne 'on'){&print_dates_viewer($headerdata);} else {&print_menu;} } sub print_menu { my @menuicons = ($ancilldir."thumbnailcalendar.gif",$ancilldir."thumbnailbrochures.gif",$ancilldir."thumbnailstats.gif",$ancilldir."addcalendar.gif",$ancilldir."deletecalendar.gif",$ancilldir."thumbnailbackup.gif",$ancilldir."maincal.jpg",$ancilldir."help.gif"); print" $propname Calendar Admin Page

$propname Calendar Admin Page



Update Calendar

 


Update Your Details

Available Dates Report

Bookings Summary Report

Add Options

Delete Options

Data Backup / Restore

To Main Calendar
© 2000-2003 Availcheck $VERSION View Help
Help

$endaddtext

"; }