From 2d17c8c21ae0275fda90c9eaad4b8e1e38fe76a8 Mon Sep 17 00:00:00 2001 From: james Date: Tue, 2 Jan 2007 23:38:53 +0000 Subject: [PATCH] Add new participnt registration type: openorinvite - allows you to use the system as if it was OPEN or INVITE however limits cannot be imposed in the inviter since when its reached in the inviter it could easily be bypassed by registering through the 'open' way. --- db/db.update.33.sql | 2 +- register_participants.php | 5 +- register_participants_students.php | 2 +- schoolaccess.php | 2 +- schoolinvite.php | 102 ++++++++++++++++++----------- 5 files changed, 70 insertions(+), 43 deletions(-) diff --git a/db/db.update.33.sql b/db/db.update.33.sql index e1e9cc1..109405d 100644 --- a/db/db.update.33.sql +++ b/db/db.update.33.sql @@ -1,3 +1,3 @@ INSERT INTO `config` (category,ord,var,val,description,year) VALUES ('Participant Registration','1160','participant_project_table','yes','Ask if the project requires a table (yes/no)',-1); INSERT INTO `config` (category,ord,var,val,description,year) VALUES ('Participant Registration','1170','participant_project_electricity','yes','Ask if the project requires electricity (yes/no)',-1); - +UPDATE `config` SET description = 'The type of Participant Registration to use: open | singlepassword | schoolpassword | invite | openorinvite' WHERE `var` = 'participant_registration_type' diff --git a/register_participants.php b/register_participants.php index 97dd3d1..8f5c78e 100644 --- a/register_participants.php +++ b/register_participants.php @@ -285,7 +285,10 @@ else if($config['participant_registration_type']=="open") { //thats fine, continue on and create them the account. - + } + else if($config['participant_registration_type']=="openorinvite") + { + //thats fine too, continue on and create them the account. } else { diff --git a/register_participants_students.php b/register_participants_students.php index c918c35..a8525e4 100644 --- a/register_participants_students.php +++ b/register_participants_students.php @@ -381,7 +381,7 @@ if($config['participant_student_personal']=="yes") echo "\n"; echo " ".i18n("School").""; - if( $config['participant_registration_type']=="open" || $config['participant_registration_type']=="singlepassword" || ($studentinfo && !$studentinfo->schools_id) ) + if( $config['participant_registration_type']=="open" || $config['participant_registration_type']=="singlepassword" || $config['participant_registration_type']=="openorinvite" || ($studentinfo && !$studentinfo->schools_id) ) { $schoolq=mysql_query("SELECT id,school FROM schools WHERE year='".$config['FAIRYEAR']."' ORDER by school"); echo "