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) { ";