-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmanifest.php
More file actions
262 lines (240 loc) · 14.8 KB
/
manifest.php
File metadata and controls
262 lines (240 loc) · 14.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
<?php /*
* File Name: Manifest.php
*
* Purpose: to show the manifest of the RPG
*
* Author: Dan Taylor
*
* Date Created: 01/03/04
*
* Status: Alpha Code
*
*/
/* Developement Information */ /* Position Type Key
*
* 0 = Position Available [Available]
* 1 = Player Position [Not Available]
* 2 = Owned Non Player Character [Not Available]
* 3 = Non Player Character [Available]
* 4 = LOA Player Character [Not Available]
* 5 = ELOA Player Character [Not Available] / [Not Currently Used By SPMS]
*
*/ ?> <!-- BEGIN PAGE TITLE --> <!-- div style="position:absolute; left:0px; top:0px; width:300px; height:60px;"> <span class="TopicTitle" align="center">CREW MANIFEST</span><br> <span class="t1">[ <a
href="javascript:history.go(-1)">BACK</a> | <a href="javascript:history.go(+1)">NEXT</a> ]</span> </div --> <br><br><br><br> <!-- END PAGE TITLE --> <!-- BEGIN EDITABLE AREA --> <!-- BEGIN EDITABLE AREA --> <table align="center"
width="90%" border="0"> <tr> <td> <p align="center" style="text-align: center"><font face="Tahoma" size="3">This page is graphic intensive. Please be patient and wait for it to fully load!</font></p> <p align="center"
style="text-align: center"><font face="Tahoma" size="3">All NPC character positions are considered open unless they are protected NPCs. NPCs are characters created for everyone to use and interact with. A new player may take the
position held by most NPCs at any time. If the character name is <font color="#4C6EFF"><b>this colour</b></font> then the NPC position is not available to apply for unless you speak with the CO first.</font></p> <p align="center"
style="text-align: center">Normal Players are coloured <b> <font color="#FFFFFF">White </font></b><br> Protected NPCs are coloured <b> <font color="#4C6EFF"> Blue</font> </b> <br>Open NPCs are coloured in <b> <font
color="#FFA500">Orange</font></b></p> <p align="center" style="text-align: center"><font face="Tahoma" size="3">Don't see a position that interests you? Please <a href="mailto:<?php echo $COemail; ?>">email the CO</a>.</font></p>
</td> </tr> </table> <br clear="all">
<?php // Get sections first
$sql = "SELECT id, clrtext, class FROM ".$prefix."_colors WHERE ".$prefix."_colors.viewid>0 ORDER BY ".$prefix."_colors.viewid ASC;"; $deptResult =
mysql_query($sql) or die ("Error 1: ".mysql_error()." Query: ".$sql); $numdepts = mysql_num_rows($deptResult); while($dept = mysql_fetch_array($deptResult)) {
echo "
<table borderColor='#000000' border='0' width='510px' cellspacing='0' align='center'>
<tr>
<td class='".$dept["class"]."'>".$dept["clrtext"]."</td>
</tr>
<tr>
<td>";
// get crew from DB and display them
echo "<table width='510px' border='0'>";
// Get crew for this section
$sql = "SELECT ".$prefix."_crewposition.crewid, ".$prefix."_crewposition.posid, ".$prefix."_crewposition.type FROM ".$prefix."_crewposition
LEFT JOIN ".$prefix."_position ON ".$prefix."_position.posid=".$prefix."_crewposition.posid
WHERE ".$prefix."_crewposition.colorid=".$dept["id"]."
AND ".$prefix."_position.viewid>0
ORDER BY ".$prefix."_position.viewid ASC;";
$posResult = mysql_query($sql) or die("Error: ".mysql_error());
if ($debug)
{
print "Developement Hack to show number of crew in each section: ".mysql_num_rows($posResult)."<br />";
}
if (!mysql_num_rows($posResult))
{
echo "<tr><th colspan='4'>No Positions</th></tr>";
}
else
{
echo "
<tr>
<td class='t0' width='115'>RANK/RATE</td>
<td class='t0' width='323'>NAME/POSITION</td>
<td class='t0' width='36'>BIO</td>
<td class='t0' width='36'>HAIL</td>
</tr>";
while($pos = mysql_fetch_assoc($posResult))
{
switch ($pos["type"])
{
case 5:
// ELOA
$sql = "SELECT ".$prefix."_rank.rankdesc, ".$prefix."_crew.firstname, ".$prefix."_crew.lastname,
".$prefix."_rank.image, ".$prefix."_position.data as position,
".$prefix."_crew.email, ".$prefix."_position.posid, ".$prefix."_position.viewid FROM ".$prefix."_crewposition
RIGHT JOIN ".$prefix."_crew ON ".$prefix."_crewposition.crewid=".$prefix."_crew.crewid
RIGHT JOIN ".$prefix."_rank ON ".$prefix."_rank.rankid=".$prefix."_crew.rank
LEFT JOIN ".$prefix."_position ON ".$prefix."_position.posid=".$prefix."_crewposition.posid
WHERE ".$prefix."_crew.crewid=".$pos["crewid"]." AND ".$prefix."_position.posid=".$pos["posid"];
$crewResult = mysql_query($sql) or die("Crew Error: ".mysql_error());
$crew = mysql_fetch_assoc($crewResult);
echo "
<tr>
<td class='t1' height='30'><img src='images/".$crew["image"]."' /></td>
<td class='t0' height='30'><strong>".stripslashes($crew["firstname"])." ".stripslashes($crew["lastname"])."</strong><br /><a href=\"javascript:
PopupWindow('job.php?posid=".$crew["posid"]."')\" class='manifestpos'>".stripslashes($crew["position"])."</a></td>
<td class='t1' height='30'><a href='main.php?pageref=bio&crewid=".$pos["crewid"]."' class='manifest'><img src='images/loa.gif' border='0' width='34' height='22'></a></td>
<td class='t1' height='30'><a href='mailto:".$crew["email"]."' class='manifest'><img src='images/hailon.gif' border='0' width='28' height='30'></a></td>
</tr>
";
break;
case 4:
// Loa
$sql = "SELECT ".$prefix."_crew.firstname, ".$prefix."_crew.lastname, ".$prefix."_rank.image, ".$prefix."_position.data as position,
".$prefix."_crew.email, ".$prefix."_position.posid, ".$prefix."_position.viewid FROM ".$prefix."_crewposition
RIGHT JOIN ".$prefix."_crew ON ".$prefix."_crewposition.crewid=".$prefix."_crew.crewid
RIGHT JOIN ".$prefix."_rank ON ".$prefix."_rank.rankid=".$prefix."_crew.rank
LEFT JOIN ".$prefix."_position ON ".$prefix."_position.posid=".$prefix."_crewposition.posid
WHERE ".$prefix."_crew.crewid=".$pos["crewid"]." AND ".$prefix."_position.posid=".$pos["posid"];
$crewResult = mysql_query($sql) or die("Crew Error: ".mysql_error());
$crew = mysql_fetch_assoc($crewResult);
echo "
<tr>
<td class='t1' height='30'><img src='images/".$crew["image"]."' /></td>
<td class='t0' height='30'><strong>".stripslashes($crew["firstname"])." ".stripslashes($crew["lastname"])."</a></span></strong><br /><a href=\"javascript:
PopupWindow('job.php?posid=".$crew["posid"]."')\" class='manifestpos'>".stripslashes($crew["position"])."</a></td>
<td class='t1' height='30'><a href='main.php?pageref=bio&crewid=".$pos["crewid"]."' class='manifestloa'><img src='images/loa.gif' border='0' width='34' height='22'></a></td>
<td class='t1' height='30'><a href='mailto:".$crew["email"]."' class='manifest'><img src='images/hailon.gif' border='0' width='28' height='30'></a></td>
</tr>
";
break;
case 3:
// NPC - Applyable Job
$sql = "SELECT ".$prefix."_crew.firstname, ".$prefix."_crew.lastname, ".$prefix."_rank.image, ".$prefix."_position.data as position,
".$prefix."_crew.email, ".$prefix."_position.posid, ".$prefix."_position.viewid FROM ".$prefix."_crewposition
RIGHT JOIN ".$prefix."_crew ON ".$prefix."_crewposition.crewid=".$prefix."_crew.crewid
RIGHT JOIN ".$prefix."_rank ON ".$prefix."_rank.rankid=".$prefix."_crew.rank
LEFT JOIN ".$prefix."_position ON ".$prefix."_position.posid=".$prefix."_crewposition.posid
WHERE ".$prefix."_crew.crewid=".$pos["crewid"]." AND ".$prefix."_position.posid=".$pos["posid"];
$crewResult = mysql_query($sql) or die("Crew Error: ".mysql_error());
$crew = mysql_fetch_assoc($crewResult);
echo "
<tr>
<td class='t1' height='30'><img src='images/".$crew["image"]."' /></td>
<td class='t0' height='30'><strong><a href='main.php?pageref=apply&posid=".$pos["posid"]."'>".stripslashes($crew["firstname"])." ".stripslashes($crew["lastname"])."</a></span></strong><br
/><a href=\"javascript: PopupWindow('job.php?posid=".$crew["posid"]."')\" class='manifestpos'>".stripslashes($crew["position"])."</a></td>
<td class='t1' height='30'><a href='main.php?pageref=bio&crewid=".$pos["crewid"]."' class='manifestnpc'><img src='images/npc.gif' border='0' width='34' height='22'></a></td>
<td class='t1' height='30'><img src='images/hailoff.gif' border='0' width='28' height='30'></td>
</tr>
";
break;
case 2:
// Owned NPC
$sql = "SELECT ".$prefix."_crew.firstname, ".$prefix."_crew.lastname, ".$prefix."_rank.image, ".$prefix."_position.data as position,
".$prefix."_crew.email, ".$prefix."_position.posid, ".$prefix."_position.viewid FROM ".$prefix."_crewposition
RIGHT JOIN ".$prefix."_crew ON ".$prefix."_crewposition.crewid=".$prefix."_crew.crewid
RIGHT JOIN ".$prefix."_rank ON ".$prefix."_rank.rankid=".$prefix."_crew.rank
LEFT JOIN ".$prefix."_position ON ".$prefix."_position.posid=".$prefix."_crewposition.posid
WHERE ".$prefix."_crew.crewid=".$pos["crewid"]." AND ".$prefix."_position.posid=".$pos["posid"];
$crewResult = mysql_query($sql) or die("Crew Error: ".mysql_error());
$crew = mysql_fetch_assoc($crewResult);
echo "
<tr>
<td class='t1' height='30'><img src='images/".$crew["image"]."' /></td>
<td class='t0' height='30'><strong><font color='#4C6EFF'>".stripslashes($crew["firstname"])." ".stripslashes($crew["lastname"])."</a></font></strong><br /><a href=\"javascript:
PopupWindow('job.php?posid=".$crew["posid"]."')\" class='manifestpos'>".stripslashes($crew["position"])."</a></td>
<td class='t1' height='30'><a href='main.php?pageref=bio&crewid=".$pos["crewid"]."' class='manifestnpc'><img src='images/npc.gif' border='0' width='34' height='22'></a></td>
<td class='t1' height='30'><img border='0' src='../images/hailoff.gif' width='28' height='30' onMouseOver='window.status='Hail this Crewmember';return true;' onMouseOut='window.status='USS
Farragut';return true;'></td>
</tr>
";
break;
case 1:
if ($pos["posid"] != $secoff)
{
// Valid Player, Display player information
$sql = "SELECT ".$prefix."_crew.firstname, ".$prefix."_crew.lastname, ".$prefix."_rank.image, ".$prefix."_position.data as position,
".$prefix."_crew.email, ".$prefix."_position.posid, ".$prefix."_position.viewid FROM ".$prefix."_crewposition
RIGHT JOIN ".$prefix."_crew ON ".$prefix."_crewposition.crewid=".$prefix."_crew.crewid
RIGHT JOIN ".$prefix."_rank ON ".$prefix."_rank.rankid=".$prefix."_crew.rank
LEFT JOIN ".$prefix."_position ON ".$prefix."_position.posid=".$prefix."_crewposition.posid
WHERE ".$prefix."_crew.crewid=".$pos["crewid"]." AND ".$prefix."_position.posid=".$pos["posid"];
$crewResult = mysql_query($sql) or die("Crew Error: ".mysql_error());
$crew = mysql_fetch_assoc($crewResult);
echo "
<tr>
<td class='t1' height='30'><img src='images/".$crew["image"]."' /></td>
<td class='t0' height='30'><strong>".stripslashes($crew["firstname"])." ".stripslashes($crew["lastname"])."</a></strong><br /><a href=\"javascript:
PopupWindow('job.php?posid=".$crew["posid"]."')\" class='manifestpos'>".stripslashes($crew["position"])."</a></td>
<td class='t1' height='30'><a href='main.php?pageref=bio&crewid=".$pos["crewid"]."' class='manifest'><img src='images/bioon.gif' border='0' width='34' height='22'></a></td>
<td class='t1' height='30'><a href='mailto:".$crew["email"]."' class='manifest'><img src='images/hailon.gif' border='0' width='28' height='30'></a></td>
</tr>
";
}
else
{
// Get User marked as second officer
$sql = "SELECT ".$prefix."_crew.crewid, ".$prefix."_crew.firstname, ".$prefix."_crew.middlename, ".$prefix."_crew.lastname,
".$prefix."_crew.email, ".$prefix."_rank.image, ".$prefix."_position.data as position
FROM ".$prefix."_crew
RIGHT JOIN ".$prefix."_rank ON ".$prefix."_rank.rankid=".$prefix."_crew.rank
LEFT JOIN ".$prefix."_position ON ".$prefix."_position.posid=$secoff
WHERE ".$prefix."_crew.secondofficer=1";
$secondOfficerResult = mysql_query($sql) or die ("Could not query for second officer because mysql said: ".mysql_error());
if (mysql_num_rows($secondOfficerResult))
{
$sec = mysql_fetch_assoc($secondOfficerResult);
echo "
<tr>
<td class='t1' height='30'><img src='images/".$sec["image"]."' /></td>
<td class='t0' height='30'><strong>".stripslashes($sec["firstname"])." ".stripslashes($sec["lastname"])."</a></strong><br /><a href=\"javascript:
PopupWindow('job.php?posid=".$pos["posid"]."')\" class='manifestpos'>".stripslashes($sec["position"])."</a></td>
<td class='t1' height='30'><a href='main.php?pageref=bio&crewid=".$sec["crewid"]."' class='manifest'><img src='images/bioon.gif' border='0' width='34' height='22'></a></td>
<td class='t1' height='30'><a href='mailto:".$sec["email"]."'><img src='images/hailon.gif' border='0' width='28' height='30'></a></td>
</tr>
";
mysql_free_result($secondOfficerResult);
$sec = NULL;
}
else
{
// Show position not taken info
$sql = "SELECT data as position, viewid FROM ".$prefix."_position WHERE ".$prefix."_position.posid=".$pos["posid"]." ORDER BY ".$prefix."_position.viewid ASC;";
$crewResult = mysql_query($sql) or die("Error: ".mysql_error());
$crew = mysql_fetch_assoc($crewResult);
echo "
<tr>
<td class='t1' height='30'><img src='images/ranks/generic/blank.jpg' /></td>
<td class='t0' height='30'><strong><a href='main.php?pageref=apply&posid=".$pos["posid"].">Position Available - Apply Today!</a></strong><br><a href=\"javascript:
PopupWindow('job.php?posid=".$pos["posid"]."')\" class='manifestpos'>".stripslashes($crew["position"])."</a></td>
<td class='t1' height='30'><img src='images/biooff.gif' border='0' width='34' height='22'></td>
<td class='t1' height='30'><img src='images/hailoff.gif' border='0' width='28 height='30></td>
</tr>";
}
}
break;
default:
// 0 or an invalid selection, show position available
$sql = "SELECT data as position, viewid FROM ".$prefix."_position WHERE ".$prefix."_position.posid=".$pos["posid"]." ORDER BY ".$prefix."_position.viewid ASC;";
$crewResult = mysql_query($sql) or die("Error: ".mysql_error());
$crew = mysql_fetch_assoc($crewResult);
echo "
<tr>
<td class='t1' height='30'><img src='images/ranks/generic/blank.jpg' /></td>
<td class='t0' height='30'><strong><a href='main.php?pageref=apply&posid=".$pos["posid"]."'>Position Available - Apply Today!</a></strong><br><a href=\"javascript:
PopupWindow('job.php?posid=".$pos["posid"]."')\" class='manifestpos'>".stripslashes($crew["position"])."</a></td>
<td class='t1' height='30'><img src='images/biooff.gif' border='0' width='34' height='22'></td>
<td class='t1' height='30'><img src='images/hailoff.gif' border='0' width='28 height='30></td>
</tr>";
break;
}
}
}
echo "</table>
</td>
</tr>
</table>
<br />
";
}
?>