diff options
Diffstat (limited to 'modules/rudi/views')
-rw-r--r-- | modules/rudi/views/view.awards.php | 83 | ||||
-rw-r--r-- | modules/rudi/views/view.current.php | 134 | ||||
-rw-r--r-- | modules/rudi/views/view.current.php.gz | bin | 0 -> 1107 bytes | |||
-rw-r--r-- | modules/rudi/views/view.drills.php | 99 | ||||
-rw-r--r-- | modules/rudi/views/view.profile.php | 188 | ||||
-rw-r--r-- | modules/rudi/views/view.ranks.php | 39 |
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} </td> + <td align=\"left\" class=\"rudi\" style=\"text-align:left;\">{$award->description} </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> </td> + <td align='center' class="rudi"><?php //echo $award->name; ?> </td> + <td align='left'><?php //echo wordwrap($award->description,80,"<br/>"); ?> </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&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 ' '; + } + 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 Binary files differnew file mode 100644 index 0000000..c41a55a --- /dev/null +++ b/modules/rudi/views/view.current.php.gz 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&show=drills\">Back</a>"; + return; +} + +echo "<tr> +<th class=\"header\"> </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&show=drills&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; ?>" /> </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 ?>" /> </center></td> + </tr> + <tr> + <td><center><img src="<?php echo $this->images_path ?>/flags/<?php echo $member->country_image?>" /> </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) ?> </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> "; + ?> + </td> + </tr> + <tr> + <th class="header" scope="row">Status</th> + <td><?php echo $this->evalData($member->status) ?> </td> + <th class="header">Position</th> + <td><?php echo $this->evalData($member->position) ?> </td> + </tr> + <tr> + <th class="header" scope="row">Unit</th> + <td><?php echo $this->evalData($member->unit_name) ?> </td> + <th class="header">Weapon</th> + <td><?php echo $this->evalData($member->weapon_name) ?> </td> + </tr> + <tr> + <th class="header" scope="row">Platoon</th> + <td><?php echo $this->evalData($member->platoon_name) ?> </td> + <th class="header" scope="row">Enlisted</th> + <td><?php echo $this->evalData($member->enlist_date) ?> </td> + </tr> + <tr> + <th class="header" scope="row">Squad</th> + <td><?php echo $this->evalData($member->squad_name) ?> </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)?> </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) ?> </td> + <th class="header">Time In Grade</th> + <td><?php echo $this->getDiffTime($member->promo_date_st) ?> </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) ?> </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 ?> </td> + </tr> + </table> + + + + <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 </td> + <?php else:?> + <?php foreach($member->service_record as $record): ?> + <tr> + <th class="header" width="25%"><?php echo $record->date_added ?> </th> + <td><?php echo $record->record_note ?> </td> + </tr> + <?php endforeach; ?> + <?php endif; ?> + </tr> + </table> + + + + <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 </td> + <?php else:?> + <?php foreach($member->award_record as $record): ?> + <tr> + <th class="header" width="25%"><?php echo $record->date_added?> </th> + <td ><?php echo $this->evalData($record->award_name); ?> </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 ?> </td> + </tr> + <?php endforeach; ?> + <?php endif; ?> + </tr> + </table> + + + + <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 </td> + <?php else:?> + <?php foreach($member->combat_record as $record): ?> + <tr> + <th class="header" width="25%"><?php echo $record->date ?> </th> + <td><a href="<?php echo $record->website ?>"><?php echo $record->name ?></a> </td> + <td><?php echo $record->status ?> </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> </td> + <td align='center' class="rudi"><?php echo $rank->longname; ?> </td> + </tr> + <?php endforeach; ?> + + </table> + +</body> +</html>
\ No newline at end of file |