From 974eb738f38e9393bdeca60f1ffe9ca7ad431b4a Mon Sep 17 00:00:00 2001 From: Armanveer Gill Date: Tue, 17 Dec 2024 01:34:35 -0500 Subject: [PATCH] errors --- admin/award_awards.php | 2 +- admin/committees.php | 31 +++--- admin/donors.php | 6 +- admin/donors_search.php | 4 +- admin/fundraising.php | 17 ++-- admin/fundraising_common.inc.php | 2 +- admin/fundraising_setup.php | 2 +- admin/index.php | 4 +- admin/judges.inc.php | 16 +-- admin/judges_timeslots.php | 6 +- admin/registration_list.php | 7 +- admin/registration_receivedforms.php | 8 +- admin/registration_stats.php | 12 +-- admin/rerollprizes.php | 2 +- admin/user_list.php | 8 +- admin/winners.php | 3 +- committees.php | 16 +-- common.inc.php | 51 +++++----- config/backuprestore.php | 4 +- config/categories.php | 29 +++--- config/dates.php | 7 +- config/divisions.php | 30 +++--- config/divisions_cwsf.php | 3 +- config/images.php | 4 +- config/languagepacks.php | 6 +- config/rollover.php | 140 +++++++++++++++------------ config/safetyquestions.php | 16 +-- config/signaturepage.php | 20 ++-- config/subdivisions.php | 28 +++--- config/variables.php | 8 +- config/versionchecker.php | 4 +- config_editor.inc.php | 37 ++++--- confirmed_participants.php | 33 +++++-- helper.inc.php | 12 +++ register_participants.php | 16 +-- user.inc.php | 28 +++--- user_activate.php | 10 +- user_invite.php | 6 +- user_password.php | 6 +- user_personal.php | 11 ++- winners.php | 9 +- 41 files changed, 368 insertions(+), 296 deletions(-) diff --git a/admin/award_awards.php b/admin/award_awards.php index 0aafc3b..1833788 100644 --- a/admin/award_awards.php +++ b/admin/award_awards.php @@ -27,7 +27,7 @@ user_auth_required('committee', 'admin'); require_once('awards.inc.php'); - switch($_GET['action']) { + switch(get_value_from_array($_GET, 'action')) { case 'awardinfo_load': $id = intval($_GET['id']); diff --git a/admin/committees.php b/admin/committees.php index db8abbb..317c5c3 100644 --- a/admin/committees.php +++ b/admin/committees.php @@ -28,7 +28,7 @@ user_auth_required('committee', 'admin'); -if($_POST['users_uid']) +if(get_value_from_array($_POST,'users_uid')) $uid = intval($_POST['users_uid']); @@ -95,7 +95,7 @@ function actionChanged() } function actionSubmit() -{ +{ if(document.forms.memberaction.action.selectedIndex==0) { alert('You must choose an action'); @@ -124,8 +124,8 @@ function actionSubmit() //--> prepare("SELECT * FROM committees_link WHERE committees_id='$cid' AND users_uid='$uid'"); $q->execute(); @@ -191,7 +191,7 @@ if($_POST['action']=="assign") echo error(("You must choose both a member and a committee")); } -if($_GET['deletecommittee']) { +if(get_value_from_array($_GET, 'deletecommittee')) { $del = intval($_GET['deletecommittee']); $q = $pdo->prepare("DELETE FROM committees WHERE id='$del'"); @@ -199,13 +199,13 @@ if($_GET['deletecommittee']) { echo happy(i18n("Committee removed")); } -if($_POST['action']=="remove") { +if(get_value_from_array($_POST, 'action',"remove")) { /* user_delete takes care of unlinking the user in other tables */ user_delete($uid, 'committee'); echo happy(i18n("Committee member deleted")); } -if($_GET['unlinkmember'] && $_GET['unlinkcommittee']) { +if(get_value_from_array($_GET, 'unlinkmember') && get_value_from_array($_GET,'unlinkcommittee')) { $mem = intval($_GET['unlinkmember']); $com = intval($_GET['unlinkcommittee']); //unlink the member from the committee @@ -304,7 +304,7 @@ if($_GET['unlinkmember'] && $_GET['unlinkcommittee']) { $q = $pdo->prepare("SELECT * FROM committees ORDER BY ord,name"); $q->execute(); - if($q->rowCout()) + if($q->rowCount()) { echo "

".i18n("Committees")."

"; echo "
\n"; @@ -359,14 +359,15 @@ if($_GET['unlinkmember'] && $_GET['unlinkcommittee']) { echo ""; - if($u['email']) { - list($b,$a)=split("@",$u['email']); + if(get_value_from_array($u, 'email')) { + print_r($u["email"]); + list($b,$a)=explode("@",$u['email']); echo ""; } - if($u['emailprivate']) { + if(get_value_from_array($u, 'emailprivate')) { if($u['email']) echo " / "; - list($b,$a)=split("@",$u['emailprivate']); + list($b,$a)=explode("@",$u['emailprivate']); echo ""; } diff --git a/admin/donors.php b/admin/donors.php index 6f93e9f..d49620f 100644 --- a/admin/donors.php +++ b/admin/donors.php @@ -28,7 +28,7 @@ user_auth_required('committee', 'admin'); require_once("fundraising_common.inc.php"); -switch($_GET['action']) { +switch(get_value_from_array($_GET, 'action')) { case 'organizationinfo_load': $id=intval($_GET['id']); $q=$pdo->prepare("SELECT * FROM sponsors WHERE id='$id'"); @@ -1189,7 +1189,7 @@ function removedonation(donationid,sponsorid) { ";