diff --git a/admin/award_awards.php b/admin/award_awards.php index 8c214013..f8922e29 100644 --- a/admin/award_awards.php +++ b/admin/award_awards.php @@ -27,14 +27,14 @@ user_auth_required('committee', 'admin'); require_once('awards.inc.php'); - switch(get_value_from_array($_GET, 'action', 'awardinfo_load')) { - + switch(get_value_from_array($_GET, 'action')) { + case 'awardinfo_load': $id = intval(get_value_from_array($_GET, 'id')); - $q = $pdo->prepare("SELECT * FROM award_awards WHERE id='$id'"); $q->execute(); $ret = $q->fetch(PDO::FETCH_ASSOC); + //json_encode NEEDS UTF8 DATA, but we store it in the database as ISO :( foreach($ret AS $k=>$v) {print('sdfs'); $ret[$k]=iconv("ISO-8859-1","UTF-8",$v); @@ -54,7 +54,7 @@ if($id == -1) { - $q = $prepare("INSERT INTO award_awards (year,self_nominate,schedule_judges) + $q = $pdo->prepare("INSERT INTO award_awards (year,self_nominate,schedule_judges) VALUES ('{$config['FAIRYEAR']}','yes','yes')"); $q->execute(); $id = $pdo->lastInsertId(); @@ -177,7 +177,7 @@ $q->execute(); } else { - $q = $prepare("SELECT * FROM award_prizes WHERE award_awards_id='$id' ORDER BY `order`"); + $q = $pdo->prepare("SELECT * FROM award_prizes WHERE award_awards_id='$id' ORDER BY `order`"); $q->execute(); } while($r=$q->fetch(PDO::FETCH_ASSOC)) { @@ -254,8 +254,8 @@ } $q = $pdo->prepare("SELECT * FROM award_awards WHERE id='$id'"); - $q -> execute(); - $a = fetch(PDO::FETCH_ASSOC) + $q->execute(); + $a = $q->fetch(PDO::FETCH_ASSOC) ?>

diff --git a/admin/communication.php b/admin/communication.php index 947183e7..6b5456e1 100644 --- a/admin/communication.php +++ b/admin/communication.php @@ -65,7 +65,7 @@ case 'dialog_choose':