# Installfest Webpage - a php4/postgresql/apache instant Linux
# installfest web page and database.
# Copyright (C) 2001 Michael Davies (michaeld@senet.com.au) & Phil Hutton (phil@hutton.sh)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
include "vars.inc";
include "colours.inc";
include "common.inc";
include "fest.inc";
include "festtemplate.inc";
include "../connmgr.inc";
function installeeEntry() {
?>
The Installfest has already happened... Sorry if you had missed it.
Please fill in the following information if you wish to have
Linux or FreeBSD installed or configured on your PC as part of the
installfest. Your name and email address are compulsory, as is the
question at the end. All information provided will be kept
confidential, and email addresses provided will not be given to
any third party. You needn't worry about SPAM, because we hate it
more than you!
If you have trouble filling in this form, please contact one of the
people listed here.
While registration is not compulsory, registering will ensure that you
get priority at an install.
}
function registerInstallee() {
global $firstname;
global $lastname;
global $emailaddress;
global $AcceptRightsWaiver;
global $dowhat;
global $whatinfo;
global $computer;
global $ram;
global $floppy;
global $cdrom;
global $networkcard;
global $zipdrive;
global $vga;
global $printer;
global $modem;
global $registerinstallee;
$firstname=$_POST["firstname"];
$lastname=$_POST["lastname"];
$emailaddress=$_POST["emailaddress"];
$AcceptRightsWaiver=$_POST["AcceptRightsWaiver"];
$dowhat=$_POST["dowhat"];
$computer=$_POST["computer"];
$ram=$_POST["ram"];
$floppyr=$_POST["floppy"];
$cdrom=$_POST["cdrom"];
$networkcard=$_POST["networkcard"];
$zipdrive=$_POST["zipdrive"];
$vga=$_POST["vga"];
$printer=$_POST["printer"];
$modem=$_POST["modem"];
$registerinstallee=$_POST["registerinstallee"];
#$ram=$_POST["ram"];
if ((!$firstname) || (!$lastname) || (!$emailaddress) || ($AcceptRightsWaiver != "yes")) {
echo "Sorry Unacceptable -
\n";
echo "
\n";
if (!$firstname)
echo "You need to supply your first name
\n";
if (!$lastname)
echo "You need to supply your last name
\n";
if (!$emailaddress)
echo "You need to supply your email address
\n";
if ($AcceptRightsWaiver != "yes")
echo "You need to accept the waiver to be part of installfest.
\n";
echo "If this isn't acceptable, sorry, we can't help you.
\n";
echo "
\n";
echo "Hit back on your browser window to re-enter data.\n";
} else {
# Required fields have been entered
global $DEBUG_LEVEL;
if ($DEBUG_LEVEL >= 8) {
echo "Installee debug information
\n";
echo " firstname : $firstname
\n";
echo " lastname : $lastname
\n";
echo " emailaddress : $emailaddress
\n";
echo " dowhat : $dowhat
\n";
echo " whatinfo : $whatinfo
\n";
echo " computer : $computer
\n";
echo " ram : $ram
\n";
echo " floppy : $floppy
\n";
echo " cdrom : $cdrom
\n";
echo " networkcard : $networkcard
\n";
echo " zipdrive : $zipdrive
\n";
echo " vga : $vga
\n";
echo " printer : $printer
\n";
echo " modem : $modem
\n";
echo " AcceptRightsWaiver : $AcceptRightsWaiver
\n";
echo " registerinstallee : $registerinstallee
\n";
}
# Now put this in the database
@$connection = getdbconn();
if (!$connection) {
echo "Whoops! an error occured. Sorry.\n";
}
$firstname = addslashes($firstname);
$lastname = addslashes($lastname);
$emailaddress = addslashes($emailaddress);
$AcceptRightsWaiver = addslashes($AcceptRightsWaiver);
$dowhat = addslashes($dowhat);
$whatinfo = addslashes($whatinfo);
$computer = addslashes($computer);
$ram = addslashes($ram);
$floppy = addslashes($floppy);
$cdrom = addslashes($cdrom);
$networkcard = addslashes($networkcard);
$zipdrive = addslashes($zipdrive);
$vga = addslashes($vga);
$printer = addslashes($printer);
$modem = addslashes($modem);
$sql = "INSERT INTO installees (firstname, lastname, email, ewaiver, paperwaiver, description) VALUES ('$firstname', '$lastname', '$emailaddress', '$AcceptRightsWaiver', 'FALSE', '$dowhat ( $whatinfo ) $computer $ram $floppy $cdrom $networkcard $zipdrive $vga $printer $modem');";
#@$result = pg_exec ($connection, $sql);
$result= mysql_query ($sql) or die ("BAD QUERY-> ".mysql_error() );
if (!$result) {
echo "Error - Could not register installee";
echo " - data lost.
";
echo "Please click ";
echo "here";
echo " to reload this page, or your browser's Back key to try again.";
} else {
echo "
Congratulations... You have now been registered as an installee for Installfest 2002: Unplugged
";
echo "You may be emailed to confirm your registration
\n";
echo "Please click ";
echo "here";
echo " to return to the installfest web page.
";
}
closedbconn();
}
}
function registerpage() {
// echo "\n";
echo "Installfest Registration
\n";
global $registerinstallee;
$registerinstallee=$_POST["registerinstallee"];
if ($registerinstallee) {
registerInstallee();
} else {
installeeEntry();
}
}
display("sidebar", "registerpage");
?>