diff options
author | 3rd Infantry Division <thirdid@3rd-infantry-division.org> | 2011-04-18 16:29:05 -0400 |
---|---|---|
committer | 3rd Infantry Division <thirdid@3rd-infantry-division.org> | 2011-04-18 16:29:05 -0400 |
commit | ea0080efe5a38a470d4f745ca589e923efc35e5c (patch) | |
tree | c6604647d51c0e81168e7dbaba9f73385edc02ee /admin/rudi/views/view.battles.php | |
parent | fa1cde8684c1a481dd251398d1c2faa27d147a43 (diff) | |
parent | 0077cb99704fe863cf731fc5cab792af2ede96c2 (diff) | |
download | bayonetcms-ea0080efe5a38a470d4f745ca589e923efc35e5c.tar.gz |
Merge branch 'master' of ssh://3rd-infantry-division.org/~/git/bayonet
Diffstat (limited to 'admin/rudi/views/view.battles.php')
-rw-r--r-- | admin/rudi/views/view.battles.php | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/admin/rudi/views/view.battles.php b/admin/rudi/views/view.battles.php new file mode 100644 index 0000000..d00452e --- /dev/null +++ b/admin/rudi/views/view.battles.php @@ -0,0 +1,36 @@ +<?php + + // list all battles + // -> click one to view who was attending (lists everyone in the unit and those attending) + // buttons to add/edit/delete battles + + // definitely gonna use ajax for this... + + include $basedir.'rudi/includes/functions.battles.php'; + + if(isset($_GET['id'])){ + $war_id = $_GET['id']; + include 'view.battles.list.php'; + }else if(isset($_GET['service'])){ + $member_id = $_GET['service']; + include 'view.members.service.php'; + }else{ + + // list all battles + $battles = getAllBattles(); + decho($battles); + +?> + <h3>Unit Engagement:</h3> + <table width="100%" style="text-align:center;"> + <tr><th>Title</th><th>Opponent</th><th>Result</th><th>Date</th></tr> +<?php + foreach($battles as $battle){ + echo "<tr><td><a href=\"?op=rudi&show=battles&id={$battle['war_id']}\">{$battle['title']}</a></td><td>vs {$battle['name']}</td><td>{$battle['status']} {$battle['home_score']}-{$battle['visit_score']}</td><td>"; + echo date("M j Y", strtotime($battle['date'])); + echo "</td><tr>"; + + } + CloseTable(); + } +?>
\ No newline at end of file |