aboutsummaryrefslogtreecommitdiff
path: root/admin/adjutant
diff options
context:
space:
mode:
authorjhunkeler <jhunkeler@c5b2fb0a-d05d-0410-98c8-828840a80ff6>2010-01-26 21:52:17 -0500
committerjhunkeler <jhunkeler@c5b2fb0a-d05d-0410-98c8-828840a80ff6>2010-01-26 21:52:17 -0500
commita0701d581dfa39113c1af68637118d99d5a0822a (patch)
tree17858862321c09316dbbeb9038695a8815406e2a /admin/adjutant
parent6d28ed7cd510621e571da1d5a20848d58d079f53 (diff)
downloadbayonetcms-a0701d581dfa39113c1af68637118d99d5a0822a.tar.gz
commit just prior to some pure insanity.
implementing theme system git-svn-id: http://svn.3rd-infantry-division.org/testing/branches/Bayonet CMS v2@463 c5b2fb0a-d05d-0410-98c8-828840a80ff6
Diffstat (limited to 'admin/adjutant')
-rw-r--r--admin/adjutant/functions.php21
1 files changed, 14 insertions, 7 deletions
diff --git a/admin/adjutant/functions.php b/admin/adjutant/functions.php
index 261c122..57e9fe8 100644
--- a/admin/adjutant/functions.php
+++ b/admin/adjutant/functions.php
@@ -66,7 +66,7 @@
}
- function editLOAs($status_id = 1){
+ function EditLOAs($status_id = 1){
global $db;
@@ -116,28 +116,35 @@ $num = 1;
function EditStatus($member_id){
global $db;
- $form = new BayonetForm($_SERVER['PHP_SELF'], "POST");
+ $form = new BayonetForm("", "POST");
if($form->VerifySubmit('processed')){
-
+ echo "Please wait while your information is being processed...";
+ $status_id = $form->request['status'];
+ $db->query("UPDATE `rudi_unit_members` SET `status_id` = '$status_id' WHERE `member_id` = '$member_id' LIMIT 1");
+ PageRedirect(1, "?op=adjutant&edit=loas&member={$member_id}");
return;
}
$result = $db->Query("SELECT * FROM `rudi_unit_members` JOIN `rudi_ranks` ON rudi_unit_members.rank_id=rudi_ranks.rank_id WHERE `member_id` = '$member_id' LIMIT 1");
$row = $db->FetchRow($result);
?>
- <table width="100%" style="text-align:center;">
+ <center>
+ <table width="50%" style="text-align:center;">
<tr><th>Rank</th><th>Soldier</th><th>Status</th></tr>
<tr>
<td><?php echo $row['shortname']; ?></td>
<td><?php echo $row['first_name']." ".$row['last_name']; ?></td>
<td style="text-align:left;">
- <?php $form->radioButton('status', 1, true); ?>Active<br />
- <?php $form->radioButton('status', 2); ?>On Leave<br />
- <?php $form->radioButton('status', 3); ?>On Extended Leave
+ <?php $form->radioButton('status', 1, $row['status_id'] == 1 ? true : false); ?>Active<br />
+ <?php $form->radioButton('status', 2, $row['status_id'] == 2 ? true : false); ?>On Leave<br />
+ <?php $form->radioButton('status', 3, $row['status_id'] == 3 ? true : false); ?>On Extended Leave
</td>
</tr>
+ <tr><td colspan="3"><?php $form->submitButton('processed'); ?></td></tr>
</table>
+ </center>
<?php
+
$form->__destruct();
}