aboutsummaryrefslogtreecommitdiff
path: root/admin
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
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')
-rw-r--r--admin/adjutant/functions.php21
-rw-r--r--admin/index.php1
-rw-r--r--admin/navigation/functions.php56
-rw-r--r--admin/style.css8
4 files changed, 77 insertions, 9 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();
}
diff --git a/admin/index.php b/admin/index.php
index 511418f..8801978 100644
--- a/admin/index.php
+++ b/admin/index.php
@@ -31,6 +31,7 @@ $db->Connect(
$config['sql']['password']
);
$db->Select_db($config['sql']['database']);
+
//$config['logs']['dir'] = "../logs/";
include 'header.php';
diff --git a/admin/navigation/functions.php b/admin/navigation/functions.php
index 2287944..68ab7c3 100644
--- a/admin/navigation/functions.php
+++ b/admin/navigation/functions.php
@@ -1,3 +1,41 @@
+<style>
+
+ul {
+ margin: 0;
+}
+
+#contentLeft {
+ width: 400px;
+}
+
+#contentLeft li {
+ list-style: none;
+ margin: 0 0 4px 0;
+ padding: 10px;
+ background-color:#a1a1a1;
+ border: #CCCCCC solid 1px;
+ color:#fff;
+ text-align:center;
+ cursor:move;
+}
+
+</style>
+<script type="text/javascript" src="scripts/jquery-ui-1.7.1.custom.min.js"></script>
+<script type="text/javascript">
+$(document).ready(function(){
+
+ $(function() {
+ $("#contentLeft ul").sortable({ opacity: 0.6, cursor: 'move', update: function() {
+ var order = $(this).sortable("serialize") + '&action=updateOrder';
+ $.post("navigation/updateDB.php", order, function(theResponse){
+ $("#updateStatus").html(theResponse);
+ });
+ }
+ });
+ });
+
+});
+</script>
<?php
/**
* Bayonet Content Management System
@@ -28,12 +66,26 @@ function ListNavigation(){
$result = $db->Query("SELECT `nav_id`, `title`, `weight` FROM `bayonet_navigation` ORDER BY `weight`");
$data = $db->Fetch($result);
- echo "|0|Home|0|<br />";
+ ?>
+ <div id="contentLeft">
+ <table>
+ <tr>
+ <th>News Reel Order</th>
+ <td id="updateStatus"></td>
+ </tr>
+ </table>
+ <ul>
+ <?php
foreach($data as $nav){
- echo "|{$nav['nav_id']}|{$nav['title']}|{$nav['weight']}|<br />";
+ echo "<li id=\"recordsArray_{$nav['nav_id']}\">{$nav['title']}</li>";
}
+ ?>
+ </ul>
+ Click and drag on a slide to change the order. Wait for confirmation indicating the changes have been saved.
+ </div>
+ <?php
}
?> \ No newline at end of file
diff --git a/admin/style.css b/admin/style.css
index 281e0b2..686276b 100644
--- a/admin/style.css
+++ b/admin/style.css
@@ -108,6 +108,7 @@ fieldset {
padding:0px;
border: 1px solid #a1a1a1;
}
+
/*********************************
** Content Styles **
*********************************/
@@ -132,4 +133,11 @@ fieldset {
padding:10px;
color:#333333;
}
+
+.left{
+ text-align:left;
+}
+.right{
+ text-align:right;
+}
\ No newline at end of file