From f472c60b18469ff8a06963708174dea1bfc08015 Mon Sep 17 00:00:00 2001 From: Evan O'Connell Date: Sun, 18 Aug 2013 18:29:07 -0400 Subject: Adds untracked changes --- admin/adjutant/functions.php | 55 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) (limited to 'admin/adjutant/functions.php') diff --git a/admin/adjutant/functions.php b/admin/adjutant/functions.php index 87bc4b4..b38400e 100644 --- a/admin/adjutant/functions.php +++ b/admin/adjutant/functions.php @@ -67,6 +67,59 @@ echo ""; } + +/****** NEW CODE ADDED LARRABEE 11-20-2012 ********/ + function EditPoints2(){ + + global $db; + + $result = $db->Query("SELECT * FROM `rudi_unit_members` JOIN `rudi_ranks` ON rudi_unit_members.rank_id=rudi_ranks.rank_id WHERE rudi_unit_members.status_id < 4 ORDER BY rudi_ranks.weight DESC , rudi_unit_members.date_promotion ASC , rudi_unit_members.date_enlisted ASC"); + $row = $db->Fetch($result); + + if(isset($_POST['processed'])){ + echo "Updating data... Please wait."; + foreach($row as $soldier){ + $mID = $soldier['member_id']; + $missed = $_POST[$mID.'missed']; + $attended = $_POST[$mID.'attended']; + $points = $_POST[$mID.'points']; + + if($missed !="" && $points != ""){ + $db->Query("UPDATE `rudi_unit_members` SET `points` = $points, `drillcount` = $missed, `attendcount` = $attended WHERE `member_id` = $mID LIMIT 1"); + }else{ + ReportError("Error updating points for soldier id# '$mID'. Please contact administrator."); + } + } + PageRedirect(1,"?op=adjutant&edit=pointsnew"); + return; + } +?> +
+ + + +"; + else + echo ""; + echo " + + + + + "; + + + echo "\n"; + } + CloseTable(); + echo ""; + + } +/****** END NEW CODE ADDED *******/ function EditLOAs($status_id = 1){ @@ -160,4 +213,4 @@ $num = 1; return $row['name']; } - ?> \ No newline at end of file + ?> -- cgit
RankSoldierStatusPointsDrills MissedDrills Attended
{$soldier['shortname']}{$soldier['first_name']} {$soldier['last_name']}".getStatus($soldier['status_id'])."/100/3/3