forked from science-ation/science-ation
Resolved errors in participant registration.
This commit is contained in:
parent
4a7912a718
commit
db3819d11d
@ -3432,7 +3432,7 @@ CREATE TABLE `users` (
|
||||
LOCK TABLES `users` WRITE;
|
||||
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
|
||||
INSERT INTO `users` VALUES
|
||||
(1,1,'fair','','','',NULL,'kvGbxRTM','$2y$10$OYeIx.U53utmuzyZkVTqtukGB0ELi5piz62KtbaYj0uEPN7fD6NtS','0000-00-00','','',2025,'','','','','','0000-00-00','','2009-10-22 12:56:09','0000-00-00 00:00:00','','','','','','no','no','no',NULL),
|
||||
(1,1,'fair','','','',NULL,'fair@science-ation.ca','$2y$10$xCsYhiUwTT/DCwkCFBPzXuH5ZBt0xt0boy3zj8FkdoktbwkmEk7Ta','0000-00-00','','',2025,'','','','','','0000-00-00','','2009-10-22 12:56:09','0000-00-00 00:00:00','','','','','','no','no','no',NULL),
|
||||
(2,2,'committee','','Superuser','Account',NULL,'contact@science-ation.ca','$2y$10$ZekjuaS8eV8DrTfMR1ak7OxiFMDEzCEUtm04OiISLcx6uGyx.4TMm','2024-10-16','','contact@science-ation.ca',2025,'','','','','','0000-00-00','','2024-10-16 04:38:47','0000-00-00 00:00:00','','','','','','no','no','no',NULL);
|
||||
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
@ -3488,7 +3488,7 @@ CREATE TABLE `users_committee` (
|
||||
LOCK TABLES `users_committee` WRITE;
|
||||
/*!40000 ALTER TABLE `users_committee` DISABLE KEYS */;
|
||||
INSERT INTO `users_committee` VALUES
|
||||
(3,'yes','no','contact@science-ation.ca',0,'no','yes','yes','yes');
|
||||
(2,'yes','no','contact@science-ation.ca',0,'no','yes','yes','yes');
|
||||
/*!40000 ALTER TABLE `users_committee` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
@ -3515,8 +3515,7 @@ CREATE TABLE `users_fair` (
|
||||
LOCK TABLES `users_fair` WRITE;
|
||||
/*!40000 ALTER TABLE `users_fair` DISABLE KEYS */;
|
||||
INSERT INTO `users_fair` VALUES
|
||||
(1,'yes','no',1),
|
||||
(2,'yes','no',2);
|
||||
(1,'yes','no',1);
|
||||
/*!40000 ALTER TABLE `users_fair` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
|
||||
|
3796
.devcontainer/science-ation-test.sql
Normal file
3796
.devcontainer/science-ation-test.sql
Normal file
File diff suppressed because it is too large
Load Diff
@ -46,6 +46,7 @@ $q = $pdo->prepare('SELECT registrations.id AS regid, students.id AS studentid,
|
||||
. 'AND students.registrations_id=registrations.id '
|
||||
. 'AND registrations.year=' . $config['FAIRYEAR'] . ' '
|
||||
. 'AND students.year=' . $config['FAIRYEAR']);
|
||||
$q->execute();
|
||||
show_pdo_errors_if_any($pdo);
|
||||
|
||||
if ($q->rowCount() == 0) {
|
||||
|
@ -40,6 +40,7 @@ if (!$_SESSION['registration_number']) {
|
||||
global $pdo;
|
||||
|
||||
$q = $pdo->prepare("SELECT * FROM students WHERE registrations_id='{$_SESSION['registration_id']}'");
|
||||
$q->execute();
|
||||
show_pdo_errors_if_any($pdo);
|
||||
|
||||
if ($q->rowCount() == 0) {
|
||||
|
@ -62,8 +62,7 @@ echo '<a href="register_participants_main.php"><< ' . i18n('Back to Partic
|
||||
echo '<br />';
|
||||
|
||||
$regfee_items = array();
|
||||
$items_q = $pdo->prepare("SELECT * FROM regfee_items
|
||||
\t\t\t\tWHERE year='{$config['FAIRYEAR']}'");
|
||||
$items_q = $pdo->prepare("SELECT * FROM regfee_items WHERE year='{$config['FAIRYEAR']}'");
|
||||
$items_q->execute();
|
||||
while ($items_i = $items_q->fetch(PDO::FETCH_ASSOC)) {
|
||||
$regfee_items[] = $items_i;
|
||||
@ -149,6 +148,7 @@ if (get_value_from_array($_POST, 'action') == 'save') {
|
||||
. "teacheremail='" . stripslashes($_POST['teacheremail'][$x]) . "', "
|
||||
. "tshirt='" . stripslashes($_POST['tshirt'][$x]) . "' "
|
||||
. "WHERE id='$students_id'");
|
||||
$stmt->execute();
|
||||
echo notice(i18n('%1 %2 successfully updated', array($_POST['firstname'][$x], $_POST['lastname'][$x])));
|
||||
}
|
||||
/* Update the regfee items link */
|
||||
@ -461,7 +461,7 @@ for ($x = 1; $x <= $numtoshow; $x++) {
|
||||
|
||||
echo "<tr>\n";
|
||||
echo ' <td>' . i18n('Teacher Name') . "</td><td><input type=\"text\" name=\"teachername[$x]\" value=\"" . get_value_property_or_default($studentinfo, 'teachername') . "\" /></td>\n";
|
||||
echo ' <td>' . i18n('Teacher Email') . "</td><td><input type=\"text\" name=\"teacheremail[$x]\" value=\"" . get_value_property_or_default($studentinfo, 'teacheremail') . "\" /></td>\n";
|
||||
echo ' <td>' . i18n('TeacherEmail') . "</td><td><input type=\"text\" name=\"teacheremail[$x]\" value=\"" . get_value_property_or_default($studentinfo, 'teacheremail') . "\" /></td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
if ($config['participant_regfee_items_enable'] == 'yes') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user