You are unauthorised to enter this site.\n"; exit; } else { if (($PHP_AUTH_USER != "installfest") || ($PHP_AUTH_PW != "december")) { Header("HTTP/1.0 401 Unauthorized"); echo "\n"; echo "

You are unauthorised to enter this site.

\n"; exit; } } ?> Error - Problem deleting data in"; echo " helper table

"; echo "Please click "; echo "here"; echo " to reload this page, or your browser's Bacl key to try again."; } closedbconn(); } else { if (isset($delete_installee) and ereg("^[0-9]+$", $delete_installee)) { $sql = "DELETE FROM installees WHERE id = $delete_installee;"; # Now put this in the database $connection = getdbconn(); if (!$connection) { echo "Whoops! an error occured connecting to the "; echo "LinuxSA database (for table installees). Sorry.\n"; closedbconn(); exit; } #@$result = pg_exec ($connection, $sql); $result = mysql_query ( $sql); if (!$result) { echo "

Error - Cannot delete data in"; echo " installees table

"; echo "Please click "; echo "here"; echo " to reload this page, or your browser's Back key to try again."; } closedbconn(); } else { if (isset($delete_todo) and ereg("^[0-9]+$", $delete_todo)) { $sql = "DELETE FROM todo WHERE id = $delete_todo;"; # Now put this in the database @$connection = getdbconn(); if (!$connection) { echo "Whoops! an error occured connecting to the "; echo "LinuxSA database (for table todo). Sorry.\n"; closedbconn(); exit; } #@$result = pg_exec ($connection, $sql); $result = mysql_query ( $sql ); if (!$result) { echo "

Error - Cannot delete data in"; echo " todo table

"; echo "Please click "; echo "here"; echo " to reload this page, or your browser's Back key to try again."; } closedbconn(); } else { $completed_todo=$_POST["completed_todo"]; $uncompleted_todo=$_POST["uncompleted_todo"]; if ((isset($completed_todo) && ereg("^[0-9]+$", $completed_todo)) || (isset($uncompleted_todo) && ereg("^[0-9]+$", $uncompleted_todo))) { if (isset($completed_todo)) { $sql = "UPDATE todo SET completed = 'TRUE' where id = $completed_todo"; } else { $sql = "UPDATE todo SET completed = 'FALSE' where id = $uncompleted_todo"; } # Now put this in the database @$connection = getdbconn(); if (!$connection) { echo "Whoops! an error occured connecting to the "; echo "LinuxSA database (for table todo). Sorry.\n"; closedbconn(); exit; } #@$result = pg_exec ($connection, $sql); $result = mysql_query ($sql); if (!$result) { echo "

Error - Cannot delete data in"; echo " todo table

"; echo "Please click "; echo "here"; echo " to reload this page, or your browser's Back key to try again."; } closedbconn(); } else { if (isset($delete_minutes) and ereg("^[0-9]+$", $delete_minutes)) { $sql = "DELETE FROM minutes WHERE id = $delete_minutes;"; @$connection = getdbconn(); if (!$connection) { echo "Whoops! an error occured connecting to the "; echo "LinuxSA database (for table minutes). Sorry.\n"; closedbconn(); exit; } @$result = pg_exec ($connection, $sql); $result = mysql_query($sql); if (!$result) { echo "

Error - Cannot delete data in"; echo " minutes table

"; echo "Please click "; echo "here"; echo " to reload this page, or your browser's Back key to try again."; } closedbconn(); } else { if (isset($_POST["addtodo"]) || isset($_POST["addminutes"])) { global $name; global $email; global $text; global $info; global $title; echo "

Adding todo or minutes item

\n"; if (((!$_POST["name"]) || (!$_POST["email"]) || (!$_POST["text"])) && ((!$_POST["title"]) || (!$_POST["info"]))) { echo "

Sorry Unacceptable -

\n"; echo "
\n"; if (!$_POST["name"]) echo "You need to supply your name
\n"; if (!$_POST["email"]) echo "You need to supply your email
\n"; if (!$_POST["text"]) echo "You need to supply your todo item
\n"; if (!$_POST["title"]) echo "You need to supply your title item
\n"; if (!$_POST["info"]) echo "You need to supply your info item
\n"; echo "
\n"; echo "
\n"; echo "Hit back on your browser window to re-enter data.\n"; } else { # Now put this in the database $connection = getdbconn(); if (!$connection) { echo "Whoops! an error occured. Sorry.\n"; closedbconn(); } if (isset($_POST["addtodo"])) { $name = addslashes($_POST["name"]); $email = addslashes($_POST["email"]); $text = addslashes($_POST["text"]); $sql = "INSERT INTO todo (name, email, text, completed) VALUES ('$name', '$email', '$text', 'FALSE')"; } else { if (isset($_POST["addminutes"])) { $title = addslashes($_POST["title"]); $info = addslashes($_POST["info"]); $sql = "INSERT INTO minutes (title, info) VALUES ('$title', '$info')"; } } #$result = pg_exec ($connection, $sql); $result = mysql_query( $sql); if (!$result) { echo "

Error - Could not add ToDo/Minutes item"; echo " - data lost.

"; echo "Please click "; echo "here"; echo " to reload this page, or your browser's Back key to try again."; } closedbconn(); } } } } } } } } function dumpInstalleeDB() { $connection = getdbconn(); if (!$connection) { echo "Whoops! an error occured. Sorry.\n"; } $sql = "select * from installees"; //@$result = pg_exec ($connection, $sql); //@$rows = pg_NumRows($result); $result = mysql_query ($sql); $rows = mysql_num_rows($result); echo "

Installees Database ($rows"; if ($rows == 1) { echo " person registered).

\n"; } else { echo " people registered).\n"; } if (!$result) { echo "

Error - no installees registered!?!

\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "


\n"; echo "\n"; echo "\n"; echo "\n"; closedbconn(); exit; } if ($rows > 0) { if (!isset($dumptext)) { echo "
\n"; echo ""; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } else { echo "Id\n"; echo " "; echo "First Name\n"; echo " "; echo "Last Name\n"; echo " "; echo "Email\n"; echo " "; echo "E-Waiver\n"; echo " "; echo "Paper Waiver
\n"; } //for ($i=0; $i < $rows; $i++) { while ( $row=mysql_fetch_assoc($result) ) { if (!isset($dumptext)) { $id = $row["id"]; $firstname=$row["firstname"]; $lastname=$row["lastname"]; $email=$row["email"]; $lastname=$row["lastname"]; $ewaiver=$row["ewaiver"]; $paperwaiver=$row["paperwaiver"]; $description=$row["description"]; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } else { $row=mysql_fetch_assoc($result); $id = $row["id"]; $firstname=$row["firstname"]; $lastname=$row["lastname"]; $email=$row["email"]; $lastname=$row["lastname"]; $ewaiver=$row["ewaiver"]; $paperwaiver=$row["paperwaiver"]; echo $id; echo " "; echo $firstname; echo " "; echo $lastname; echo " "; echo $email; echo " "; echo $ewaiver; echo " "; echo $paperwaiver; echo "
\n"; } } closedbconn(); echo "
Delete?IdFirst NameLast NameEmailE-WaiverPaper WaiverDescription
\n"; echo "\n"; echo "\n"; echo $id; echo "\n"; echo $firstname; echo "\n"; echo $lastname; echo "\n"; echo ""; echo $email; echo "\n"; echo "\n"; echo $ewaiver; echo "\n"; echo $paperwaiver; echo "\n"; echo "$description<\font>"; echo "
\n"; echo "
\n"; } } function dumpMinutes() { $connection = getdbconn(); if (!$connection) { echo "Whoops! an error occured. Sorry.\n"; closedbconn(); } $sql = "select * from minutes"; //$result = pg_exec ($connection, $sql); //$rows = pg_NumRows($result); $result = mysql_query($sql); $rows = mysql_num_rows($result); echo "


Minutes Database ($rows"; if ($rows == 1) { echo " item registered).

\n"; } else { echo " items registered).\n"; } if (!$result) { echo "

Error - no minutes registered!?!

\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "


\n"; echo "\n"; echo "\n"; echo "\n"; exit; } if ($rows > 0) { if (!isset($dumptext)) { echo "
\n"; echo ""; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } else { echo "Id\n"; echo " "; echo "Title\n"; echo " "; echo "Info\n"; echo "
\n"; } while ($row=mysql_fetch_assoc($result) ) { $id = $row["id"]; $title = $row["title"]; $info = $row["info"]; if (!isset($dumptext)) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } else { echo $id; echo " "; echo $title; echo " "; echo pg_info; echo "
"; } } closedbconn(); echo "
Delete?IdTitleInfo
\n"; echo "\n"; echo "\n"; echo $id; echo "\n"; echo $title; echo "
\n";
				echo $info;
				echo "
\n"; echo "
\n"; } } function dumpHelpersDB() { $connection = getdbconn(); if (!$connection) { echo "Whoops! an error occured. Sorry.\n"; closedbconn(); } $sql = "select * from helpers"; //@$result = pg_exec ($connection, $sql); //@$rows = pg_NumRows($result); $result = mysql_query ($sql); $rows = mysql_num_rows($result); echo "


Helpers Database ($rows"; if ($rows == 1) { echo " person registered).

\n"; } else { echo " people registered).\n"; } if (!$result) { echo "

Error - no helpers registered!?!

\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "


\n"; echo "\n"; echo "\n"; echo "\n"; exit; } if ($rows > 0) { if (!isset($dumptext)) { echo "
\n"; echo ""; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } else { echo "Id\n"; echo " "; echo "First Name\n"; echo " "; echo "Last Name\n"; echo " "; echo "Email\n"; echo " "; echo "Offering\n"; echo "
\n"; } //for ($i=0; $i < $rows; $i++) { while ($row=mysql_fetch_assoc($result)) { $id = $row["id"]; $firstname = $row["firstname"]; $lastname = $row["lastname"]; $email = $row["email"]; $configure = $row["configure"]; $offering = $row["offering"]; if (!isset($dumptext)) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } else { echo $id; echo " "; echo $firstname; echo " "; echo $lastname; echo " "; echo $email; echo " "; echo $offering; echo "
"; } } closedbconn(); echo "
Delete?IdFirst NameLast NameEmailOfferingInstallConfigure
\n"; echo "\n"; echo "\n"; echo $id; echo "\n"; echo $firstname; echo "\n"; echo $lastname; echo "\n"; echo ""; echo $email; echo "\n"; echo "\n"; echo $offering; echo "\n"; $temp = $row["install"]; if ($temp == "") { echo "none\n"; } else { echo $temp; } echo "\n"; $temp = $configure; if ($temp == "") { echo "none\n"; } else { echo $temp; } echo "
\n"; echo "
\n"; } } function dumpToDoDB() { $connection = getdbconn(); if (!$connection) { echo "Whoops! an error occured. Sorry.\n"; closedbconn(); } $sql = "select * from todo"; #@$result = pg_exec ($connection, $sql); #@$rows = pg_NumRows($result); $result = mysql_query ( $sql); $rows = mysql_num_rows($result); echo "


ToDo Database ($rows"; if ($rows==1){ echo " item).

"; } else { echo " items)."; } if (!$result) { echo "

Error - no todo items registered!?!

\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "


\n"; echo "\n"; echo "\n"; echo "\n"; exit; } if ($rows > 0) { if (!isset($dumptext)) { echo "
\n"; echo ""; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } else { echo "Id\n"; echo " "; echo "Name\n"; echo " "; echo "Email\n"; echo " "; echo "Text\n"; echo " "; echo "Completed\n"; echo "
\n"; } #for ($i=0; $i < $rows; $i++) { while ($row=mysql_fetch_assoc($result)) { $id=$row["id"]; $name=$row["name"]; $email=$row["email"]; $text=$row["text"]; $completed=$row["completed"]; if (!isset($dumptext)) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; } else { echo $id; echo " "; echo $name; echo " "; echo $email; echo " "; echo $text; echo " "; echo $completed; echo "
"; } } closedbconn(); echo "
Delete?IdSubmitterSubmitter EmailTextCompleted
\n"; echo "\n"; echo "\n"; echo $id; echo "\n"; echo $name; echo "\n"; echo ""; echo $email; echo "\n"; echo "\n"; echo $text; echo "\n"; if ($completed == "FALSE") { $completed = "uncompleted"; echo "Currently $completed, toggle \n"; } else { $completed = "completed"; echo "Currently $completed, toggle \n"; } echo "
\n"; echo "
\n"; } } function minutesEntry() { echo "


Minutes Entry

\n"; echo "
\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "
\n"; echo " Title:\n"; echo " \n"; echo " \n"; echo " (compulsory)
\n"; echo " Info:\n"; echo " \n"; echo " \n"; echo " (compulsory)
\n"; echo " \n"; echo "
\n"; echo "
\n"; } function actionEntry() { echo "


ToDo Action Entry

\n"; echo "
\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "
\n"; echo " Submitter:\n"; echo " \n"; echo " \n"; echo " (compulsory)
\n"; echo " Submitter Email:\n"; echo " \n"; echo " \n"; echo " (compulsory)
\n"; echo " Text:\n"; echo " \n"; echo " \n"; echo " (compulsory)
\n"; echo " \n"; echo "
\n"; echo "
\n"; } #added by George Patterson 23-09-2002 display("sidebar", "adminpage"); processAdminRequests(); echo "
\n"; dumpInstalleeDB(); dumpHelpersDB(); dumpToDoDB(); dumpMinutes(); if (!isset($dumptext)) { echo "
\n"; } actionEntry(); minutesEntry(); ?>