aboutsummaryrefslogtreecommitdiff
path: root/modules/rudi/views
diff options
context:
space:
mode:
Diffstat (limited to 'modules/rudi/views')
-rw-r--r--modules/rudi/views/view.awards.php83
-rw-r--r--modules/rudi/views/view.current.php134
-rw-r--r--modules/rudi/views/view.current.php.gzbin0 -> 1107 bytes
-rw-r--r--modules/rudi/views/view.drills.php99
-rw-r--r--modules/rudi/views/view.profile.php188
-rw-r--r--modules/rudi/views/view.ranks.php39
6 files changed, 543 insertions, 0 deletions
diff --git a/modules/rudi/views/view.awards.php b/modules/rudi/views/view.awards.php
new file mode 100644
index 0000000..6a60536
--- /dev/null
+++ b/modules/rudi/views/view.awards.php
@@ -0,0 +1,83 @@
+<?php define('BLOCK_RIGHT_DISABLE','block_right_disable'); ?>
+<?php $medals_path = $this->images_path . "/medals/"; ?>
+
+<html>
+<head>
+ <title>Awards and Medals</title>
+
+<style type="text/css">
+p {color: white; }
+body {background-color: black; }
+th.header {
+ width:175px;
+ background:#333;
+}
+
+td.rudi {
+ text-align: center;
+ vertical-align: middle;
+}
+</style>
+
+</head>
+<body>
+
+<?php $classes = $this->getAwardClasses(); ?>
+<table align="center" style="width: 100%;">
+
+ <?php
+ $i = 0;
+ $cl = 0;
+ while($cl != count($classes))
+ {
+ echo "<tr>";
+ echo "<th colspan=\"3\">{$classes[$cl]->name}s</th>";
+ echo "</tr>";
+ echo '<th scope="col" class="header" style="width:1px;">Image</th>';
+ echo '<th scope="col" class="header" style="width:1px;">Award</th>';
+ echo '<th scope="col" class="header" style="width:85%;">Description</th>';
+
+ foreach($this->awards as $award)
+ {
+ if($classes[$cl]->class_id == $award->class_id)
+ {
+ echo "
+ <tr>
+ <td align=\"center\" class=\"rudi\"><img src=\"{$medals_path}{$award->image}\" alt=\"{$award->image}\"/></td>
+ <td align=\"center\" class=\"rudi\">{$award->name}&nbsp;</td>
+ <td align=\"left\" class=\"rudi\" style=\"text-align:left;\">{$award->description}&nbsp;</td>
+ </tr>";
+ }
+
+ }
+
+ ++$cl;
+ }
+ ?>
+
+</table>
+
+<!-- grr wtf
+ <table align="center" style="width: 100%;">
+ <tr>
+ <th scope="col" class="header" style="width:1px;">Image</th>
+ <th scope="col" class="header" style="width:1px;">Award</th>
+ <th scope="col" class="header">Description</th>
+ </tr>
+
+
+ <?php //foreach($this->awards as $award): ?>
+
+ <tr>
+ <td align='center' class="rudi"><img src="/rudi/images/medals/<?php //echo $award->image; ?>"></img>&nbsp;</td>
+ <td align='center' class="rudi"><?php //echo $award->name; ?>&nbsp;</td>
+ <td align='left'><?php //echo wordwrap($award->description,80,"<br/>"); ?>&nbsp;</td>
+ </tr>
+
+ <?php //endforeach; ?>
+
+
+ </table>
+-->
+</body>
+</html> \ No newline at end of file
diff --git a/modules/rudi/views/view.current.php b/modules/rudi/views/view.current.php
new file mode 100644
index 0000000..b0e1316
--- /dev/null
+++ b/modules/rudi/views/view.current.php
@@ -0,0 +1,134 @@
+<?php
+ $platoon_temp_count = 0; $squad_temp_count = 0;
+
+?>
+
+<html>
+<head>
+ <title>Roster Current</title>
+
+<style type="text/css">
+p {color: white; }
+body {background-color: black; }
+th.header {
+ width:175px;
+ background:#333;
+}
+
+td.rudi {
+ text-align: center;
+ vertical-align: middle;
+}
+</style>
+
+</head>
+<body>
+
+ <?php
+ /*
+ echo "<table align=\"center\">";
+
+ echo "<tr>
+ <th>Rank</th>
+ <th>Name</th>
+ <th>Weapon</th>
+ <th>Status</th>
+ </tr>";
+
+ $p = 1;
+ $s = 1;
+ $u = 1;
+ $members = $this->data;
+ while($u != count($members))
+ {
+ while($p != $stats['platoon'])
+ {
+ echo "<tr>
+ <th>a platoon</th>
+ </tr>";
+
+ while($s != $stats['squad'])
+ {
+ if($members[$u]->squad_id)
+ echo "<tr>
+ <td>{$members[$u]->rank_short}</td>
+ <td>{$members[$u]->name}</td>
+ <td>{$members[$u]->weapon_name}</td>
+ <td>{$members[$u]->status}</td>
+ </tr>";
+
+ echo "<tr>
+ <th>a squad</th>
+ </tr>";
+
+ ++$s;
+ }
+
+ ++$p;
+ }
+
+ ++$u;
+ }
+ echo "</table>";
+ */
+ ?>
+
+ <table align="center">
+
+ <?php for($platoon_count = 0; $platoon_count <= $stats['platoon']; ++$platoon_count): ?>
+
+ <?php if($this->getMembersOfPlatoon($platoon_count) > 0): ?>
+ <?php if($platoon_count):?>
+ <tr>
+ <!-- Platoon table marker -->
+ <th class="header" colspan="5"><?php echo $platoon_count . ' Platoon'; ?></th></tr>
+ <?php endif; ?>
+
+ <tr>
+ <!-- Table header -->
+ <th class="header">Rank</th>
+ <th class="header">Name</th>
+ <th class="header">Role</th>
+ <th class="header">Weapon</th>
+ <th class="header">Status</th>
+ </tr>
+ <?php foreach($this->data as $member): ?>
+ <?php if($member->platoon_id == $platoon_count && $member->status_id < 2): ?>
+ <tr>
+ <!-- Rank -->
+ <td class="rudi"><img src="<?php echo "{$this->images_path}/ranks/small/{$member->rank_short}.png"; ?>" alt="<?php echo $member->rank_short; ?>" /></td>
+ <!-- Name -->
+ <td class="rudi"><a href="?load=rudi&amp;profile=<?php echo $member->member_id ?>"><?php echo $member->last_name . ', ' . $member->first_name; ?></a></td>
+ <!-- Roles -->
+ <td class="rudi">
+ <?php
+ decho(count($member->Roles) . ' roles attached to: ' . $member->last_name);
+ for($role = 0; $role < count($member->Roles); ++$role)
+ {
+ if($member->Roles[$role]->role_name)
+ {
+ decho($role . " = (" . $member->Roles[$role]->role_name . ")");
+ echo $member->Roles[$role]->role_name;
+ echo '&nbsp;';
+ }
+ else
+ {
+ echo "Soldier";
+ }
+ }
+ ?>
+ </td>
+ <!-- Weapon -->
+ <td class="rudi"><?php echo $member->weapon_manufacturer . ' ' . $member->weapon_model; ?></td>
+ <!-- Status -->
+ <td class="rudi"><?php echo $member->status; ?></td>
+ </tr>
+ <?php endif; ?>
+
+ <?php endforeach; ?>
+ <?php endif; ?>
+ <?php endfor; ?>
+
+ </table>
+</body>
+</html>
diff --git a/modules/rudi/views/view.current.php.gz b/modules/rudi/views/view.current.php.gz
new file mode 100644
index 0000000..c41a55a
--- /dev/null
+++ b/modules/rudi/views/view.current.php.gz
Binary files differ
diff --git a/modules/rudi/views/view.drills.php b/modules/rudi/views/view.drills.php
new file mode 100644
index 0000000..084be97
--- /dev/null
+++ b/modules/rudi/views/view.drills.php
@@ -0,0 +1,99 @@
+<html>
+<head>
+ <title>Drills</title>
+
+<style type="text/css">
+p {color: white; }
+body {background-color: black; }
+th.header {
+ width:175px;
+ background:#333;
+}
+
+td.rudi {
+ text-align: center;
+ vertical-align: middle;
+}
+</style>
+
+</head>
+<body>
+
+<?php
+
+function Rating($val)
+{
+ define(EXCELLENT,100);
+ define(GOOD, 75);
+ define(FAIR, 50);
+ define(POOR, 25);
+ define(TERRIBLE, 0);
+
+ if($val == EXCELLENT)
+ return "Excellent";
+ elseif($val < EXCELLENT && $val >= GOOD)
+ return "Good";
+ elseif($val < GOOD && $val >= POOR)
+ return "Poor";
+ elseif($val < POOR && $val >= TERRIBLE)
+ return "Terrible";
+ else
+ return "Bad Value";
+}
+
+OpenTable("Drills");
+
+if(isset($_GET['id']))
+{
+
+ foreach($this->drills as $drill)
+ {
+ $name = $drill->last_name . ', ' . $drill->first_name;
+ $pRating = Rating($drill->performance);
+ $iRating = Rating($drill->initiative);
+
+ echo "<tr>
+ <th class=\"header\">Soldier</th>
+ <th class=\"header\">Performance Rating</th>
+ <th class=\"header\">Initiative Rating</th>
+ <th class=\"header\">Early Excusal</th>
+ <th class=\"header\">Excusal Reason</th>
+
+ </tr>";
+
+ echo "<tr>
+ <td class=\"rudi\">{$name}</td>
+ <td class=\"rudi\">{$pRating}</td>
+ <td class=\"rudi\">{$iRating}</td>
+ <td class=\"rudi\">{$drill->excusal}</td>
+ <td class=\"rudi\">{$drill->excusal_reason}</td>
+
+ </tr>";
+ }
+ CloseTable();
+ echo "<a href=\"?load=rudi&amp;show=drills\">Back</a>";
+ return;
+}
+
+echo "<tr>
+<th class=\"header\">&nbsp;</th>
+<th class=\"header\">Date</th>
+<!-- <th class=\"header\">News</th> -->
+<th class=\"header\">Notes</th>
+</tr>";
+
+foreach($this->drills as $drill)
+{
+ echo "<tr>
+ <td class=\"rudi\"><a href=\"?load=rudi&amp;show=drills&amp;id={$drill->drill_id}\">View</a></td>
+ <td class=\"rudi\">{$drill->date}</td>
+ <!-- <td class=\"rudi\">{$drill->news}</td> -->
+ <td class=\"rudi\">{$drill->notes}</td>
+ </tr>";
+}
+
+CloseTable();
+?>
+
+</body>
+</html> \ No newline at end of file
diff --git a/modules/rudi/views/view.profile.php b/modules/rudi/views/view.profile.php
new file mode 100644
index 0000000..877fab0
--- /dev/null
+++ b/modules/rudi/views/view.profile.php
@@ -0,0 +1,188 @@
+<?php
+define('BLOCK_RIGHT_DISABLE','block_right_disable');
+$member =& $this->data[$_GET['profile']];
+$uniform_image = strtolower($member->first_name[0] . $member->last_name . ".png");
+$uniform_image[0] = strtoupper($uniform_image[0]);
+$uniform_image[1] = strtoupper($uniform_image[1]);
+?>
+
+<html>
+<head>
+<title>Profile page of, <?php echo $member->last_name ?></title>
+<style type="text/css">
+
+p {color: white; }
+body {background-color: black; }
+th.header {
+ width:100px;
+ background:#333;
+}
+
+td {
+ vertical-align: middle;
+}
+
+#thin {
+ border:1px outset #333;
+}
+</style>
+</head>
+<body>
+<table width="100%" border="1" align="center" cellpadding="1" cellspacing="0">
+ <tr>
+ <th>Viewing Profile of: <?php echo $member->rank_long . " " . $member->first_name . " " . $member->last_name; ?></th>
+ </tr>
+ <tr>
+ <td><center><img src="<?php echo $this->images_path ?>/uniform/<?php echo $uniform_image; ?>" />&nbsp;</center></td>
+ </tr>
+ <tr>
+ <td><table width="100%" border="0" cellpadding="1">
+ <tr>
+ <td width="20%">
+ <table width="100%" border="0" cellpadding="5" align="center" style="border: 0px;">
+ <tr>
+ <td><center><img src="<?php echo $this->images_path ?>/ranks/large/<?php echo $member->rank_image ?>" />&nbsp;</center></td>
+ </tr>
+ <tr>
+ <td><center><img src="<?php echo $this->images_path ?>/flags/<?php echo $member->country_image?>" />&nbsp;</center></td>
+ </tr>
+ </table>
+ </td>
+ <td width="100%">
+ <table width="100%" border="0" cellpadding="5">
+ <tr>
+ <th class="header" scope="row">Location</th>
+ <td ><?php echo $this->evalData($member->location) ?>&nbsp;</td>
+ <th class="header">Superior</th>
+ <td><?php
+ if(!is_null($member->superior_next->leader_id))
+ echo "<a href=\"?load=rudi&profile={$member->superior_next->leader_id}\">";
+
+ echo $this->evalData($member->superior_next->name);
+ echo "</a>&nbsp;";
+ ?>
+ </td>
+ </tr>
+ <tr>
+ <th class="header" scope="row">Status</th>
+ <td><?php echo $this->evalData($member->status) ?>&nbsp;</td>
+ <th class="header">Position</th>
+ <td><?php echo $this->evalData($member->position) ?>&nbsp;</td>
+ </tr>
+ <tr>
+ <th class="header" scope="row">Unit</th>
+ <td><?php echo $this->evalData($member->unit_name) ?>&nbsp;</td>
+ <th class="header">Weapon</th>
+ <td><?php echo $this->evalData($member->weapon_name) ?>&nbsp;</td>
+ </tr>
+ <tr>
+ <th class="header" scope="row">Platoon</th>
+ <td><?php echo $this->evalData($member->platoon_name) ?>&nbsp;</td>
+ <th class="header" scope="row">Enlisted</th>
+ <td><?php echo $this->evalData($member->enlist_date) ?>&nbsp;</td>
+ </tr>
+ <tr>
+ <th class="header" scope="row">Squad</th>
+ <td><?php echo $this->evalData($member->squad_name) ?>&nbsp;</td>
+ <th class="header">Time In Service</th>
+ <?php if($member->discharge_date): ?>
+ <td><?php echo $this->getDiffTime($member->enlist_date_st, $member->discharge_date)?>&nbsp;</td>
+ <?php else: ?>
+ <td><?php echo $this->getDiffTime($member->enlist_date_st)?></td>
+ <?php endif; ?>
+
+ </tr>
+ <tr>
+ <th class="header">Team</th>
+ <td><?php echo $this->evalData($member->team_name) ?>&nbsp;</td>
+ <th class="header">Time In Grade</th>
+ <td><?php echo $this->getDiffTime($member->promo_date_st) ?>&nbsp;</td>
+ </tr>
+ <tr>
+ <?php if($member->discharge_date): ?>
+ <td colspan="2"></td>
+ <th class="header" scope="row">Separated</th>
+ <td><?php echo $this->evalData($member->discharge_date) ?>&nbsp;</td>
+ <?php endif; ?>
+ </tr>
+
+ </table></td>
+ </tr>
+ </table></td>
+ </tr>
+ <tr>
+ <td><table width="100%" border="0" cellpadding="1" id="thin">
+ <tr>
+ <th class="header" scope="col">Biography</th>
+ </tr>
+ <tr >
+ <td style="text-align:left;"><?php echo $member->bio ?>&nbsp;</td>
+ </tr>
+ </table>
+
+ &nbsp;
+
+ <table width="100%" border="0" cellpadding="1" id="thin">
+ <tr>
+ <th class="header" scope="col" colspan="3">Service Record</th>
+ </tr>
+ <tr>
+ <?php if(is_null($member->service_record)):?>
+ <td>No service record available&nbsp;</td>
+ <?php else:?>
+ <?php foreach($member->service_record as $record): ?>
+ <tr>
+ <th class="header" width="25%"><?php echo $record->date_added ?>&nbsp;</th>
+ <td><?php echo $record->record_note ?>&nbsp;</td>
+ </tr>
+ <?php endforeach; ?>
+ <?php endif; ?>
+ </tr>
+ </table>
+
+ &nbsp;
+
+ <table width="100%" border="0" cellpadding="1" id="thin">
+ <tr>
+ <th class="header" scope="col" colspan="4">Award Record</th>
+ </tr>
+ <tr>
+ <?php if(is_null($member->award_record)):?>
+ <td>No award record available&nbsp;</td>
+ <?php else:?>
+ <?php foreach($member->award_record as $record): ?>
+ <tr>
+ <th class="header" width="25%"><?php echo $record->date_added?>&nbsp;</th>
+ <td ><?php echo $this->evalData($record->award_name); ?>&nbsp;</td>
+ <td style="vertical-align:middle;"><center><img src="<?php echo $this->images_path; ?>/medals/<?php echo $record->image; ?>"/></center></td>
+ <td width="40%"><?php echo $record->record_note ?>&nbsp;</td>
+ </tr>
+ <?php endforeach; ?>
+ <?php endif; ?>
+ </tr>
+ </table>
+
+ &nbsp;
+
+ <table width="100%" border="0" cellpadding="1" id="thin">
+ <tr>
+ <th class="header" scope="col" colspan="3">Combat Record</th>
+ </tr>
+ <tr>
+ <?php if(is_null($member->combat_record)):?>
+ <td>No combat record available&nbsp;</td>
+ <?php else:?>
+ <?php foreach($member->combat_record as $record): ?>
+ <tr>
+ <th class="header" width="25%"><?php echo $record->date ?>&nbsp;</th>
+ <td><a href="<?php echo $record->website ?>"><?php echo $record->name ?></a>&nbsp;</td>
+ <td><?php echo $record->status ?>&nbsp;</td>
+ </tr>
+ <?php endforeach; ?>
+ <?php endif; ?>
+ </tr>
+ </table></td>
+ </tr>
+</table>
+</body>
+</html> \ No newline at end of file
diff --git a/modules/rudi/views/view.ranks.php b/modules/rudi/views/view.ranks.php
new file mode 100644
index 0000000..2bb1823
--- /dev/null
+++ b/modules/rudi/views/view.ranks.php
@@ -0,0 +1,39 @@
+<?php define('BLOCK_RIGHT_DISABLE','block_right_disable'); ?>
+
+<html>
+<head>
+ <title>Awards and Medals</title>
+
+<style type="text/css">
+p {color: white; }
+body {background-color: black; }
+th.header {
+ width:175px;
+ background:#333;
+}
+
+td.rudi {
+ text-align: center;
+ vertical-align: middle;
+}
+</style>
+
+</head>
+<body>
+
+ <table align="center" style="width: 100%;">
+ <tr>
+ <th scope="col" class="header">Image</th>
+ <th scope="col" class="header">Rank</th>
+ </tr>
+ <?php foreach($this->ranks as $rank): ?>
+ <tr>
+ <td align='center' class="rudi"><img src="<?php echo "{$this->images_path}/ranks/small/{$rank->image}"; ?>"></img>&nbsp;</td>
+ <td align='center' class="rudi"><?php echo $rank->longname; ?>&nbsp;</td>
+ </tr>
+ <?php endforeach; ?>
+
+ </table>
+
+</body>
+</html> \ No newline at end of file