';
echo '| '.$place_description.' |
';
$tenant = getInfo(tenant,rooms,"WHERE id='$id'");
$tenant = getInfo(username,users,"WHERE id='$tenant'");
$owner = getInfo(owner,places,"WHERE id='$place_id'");
if ($tenant) echo '| Tenant : '.$tenant.' |
';
echo '| Users currently inside : '.$users_inside.' ['.$users_count.'] |
';
echo '| NPCs currently inside : '.$npcs_inside.' ['.$npcs_count.'] |
';
if (getInfo(health,places,"WHERE id='$buildingId'")) echo '| Fortification : '.getInfo(health,places,"WHERE id='$buildingId'").' points |
';
if ($owner) {
$employees = getInfo(employees,places,"WHERE id='$buildingId'");
$employees = explode('.',$employees);
$max = count($employees);
for ($i=0;$i<$max;$i++) {
$employee = $employees[$i];
$employeeName = getInfo(username,users,"WHERE id='$employee'");
$employees[$i] = "".$employeeName."";
}
$employees = implode(', ',$employees);
if ($place_type == "station") {
if (getInfo(id,travel_routes,"WHERE station='$buildingId'")) {
$station = getInfo(station2,travel_routes,"WHERE station='$buildingId'");
}
if (getInfo(id,travel_routes,"WHERE station2='$buildingId'")) {
$station = getInfo(station,travel_routes,"WHERE station2='$buildingId'");
}
$stationName = getInfo(name,places,"WHERE id='$station'");
$stationtown = getInfo(town,places,"WHERE id='$station'");
$stationtownName = getInfo(name,towns,"WHERE id='$stationtown'");
if ($stationtownName) echo '| Connects to '.$stationName.', '.$stationtownName.' |
';
else echo '| This station does not have any associated travel route. |
';
}
if (($place_type == "restaurant") || ($place_type == "shop")) {
echo '| Catalogue/Menu |
';
}
echo '| Employees : '.$employees.' [Apply for a Job] |
';
$employees_echo = $employees;
if (getInfo(id,forges,"WHERE place='$buildingId'")) {
$employees = getInfo(employees,places,"WHERE id='$buildingId'");
$employees = explode('.',$employees);
$owner = getInfo(owner,places,"WHERE id='$buildingId'");
$allow_refine = getInfo(refine,forges,"WHERE place='$buildingId'");
$allow_arms = getInfo(arms,forges,"WHERE place='$buildingId'");
$allow_doors = getInfo(doors,forges,"WHERE place='$buildingId'");
$allow_repair = getInfo(repair,forges,"WHERE place='$buildingId'");
if (((inArray($userId,$employees)) || ($allow_refine) || ($allow_arms) || ($allow_doors) || ($allow_repair)) || ($owner == $userId)) echo ' |
';
}
if (($place_type == "caravan") || ($place_type == "ship")) {
$captain = getInfo(captain,transport,"WHERE place='$buildingId'");
$captainName = getInfo(username,users,"WHERE id='$captain'");
echo 'Captain : '.$captainName.' Crew : '.$employees_echo.' [Apply for a Job]';
$control = false;
if (getInfo(captain,transport,"WHERE place='$buildingId'") == $userId) $control = true;
if (getInfo(owner,places,"WHERE id='$buildingId'") == $userId) $control = true;
$result = getRows(users,"WHERE location='$buildingId'");
$employees = explode('.',getInfo(employees,places,"WHERE id='$buildingId'"));
if (inArray($userId,$employees)) $control = true;
$employee = false;
while ($row = mysql_fetch_array($result)) {
if (inArray($row['id'],$employees)) $employee = true;
if (getInfo(owner,places,"WHERE id='$buildingId'") == $row['id']) $employee = true;
}
echo ' |
';
if (!$employee) $control = true;
if (getInfo(location,users,"WHERE id='$userId'") != $buildingId) $control = false;
if (getInfo(status,users,"WHERE id='$userId'") != 'conscious') $control = false;
if ($control) echo '| ';
echo ' |
';
}
}
if (numRowsConditions(posts,"WHERE thread_id='$id' and archived!=''") > 0) echo '| View Archived Posts for this Room |
';
echo '| View '.$user_name.'\'s Memories for this Room |
';
echo '