# Installfest Webpage - a php/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 helperEntry() {
?>
Help Others Installing or Configuring Linux.
Please fill in the following information if you wish to help
out at the installfest either installing or configuring
Linux/FreeBSD on other people's PCs.
Note that we expect you to be just as careful with other people's
machines as you would be with your own.
If you have trouble filling in this form, please contact one of the
people listed here.
}
function registerHelper() {
global $firstname;
global $lastname;
global $emailaddress;
global $offering;
global $install;
global $configure;
global $registerhelper;
# Now check the compulsory fields
if ((!$firstname) || (!$lastname) || (!$emailaddress)) {
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";
echo "If this isn't acceptable, sorry, you can't help s :-(
\n";
echo "
\n";
echo "Hit back on your browser window to re-enter data.\n";
} else {
#echo "We're handling an installer
\n";
#echo " firstname : $firstname
\n";
#echo " lastname : $lastname
\n";
#echo " emailaddress : $emailaddress
\n";
#echo " offering : $offering
\n";
#echo " install : $install
\n";
#echo " configure : $configure
\n";
#echo " installer : $installer
\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);
$offering = addslashes($offering);
$install = addslashes($install);
$configure = addslashes($configure);
$sql = "insert into helpers (firstname, lastname, email, offering, install, configure, confirmed, installer_here) VALUES ('$firstname', '$lastname', '$emailaddress', '$offering', '$install', '$configure', 'FALSE', 'FALSE');";
#@$result = pg_exec ($connection, $sql);
$result = mysql_query($sql) or die ( "Bad Query-> ".mysql_error() );
if (!$result) {
echo "Error - Could not register helper";
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 a helper for installfest 2001
";
echo "You may be emailed to confirm your registration
\n";
echo "Please click ";
echo "here";
echo " to reload the installfest web page.";
}
closedbconn();
}
}
function helperspage() {
global $registerhelper;
if ($registerhelper) {
registerHelper();
} else {
helperEntry();
}
}
display("sidebar", "helperspage");
//phpinfo();
?>