'.$room.'
'; echo ''.$place_description.''; if (numRowsConditions(archives,"WHERE thread_id='$id'") > 0) echo '
View Archived Posts for this Room
'; echo '
'; } $records = explode('.',getInfo(records,users,"WHERE id='$userId'")); $countMax = count($records); for ($i = 0;$i < $countMax;$i++) { $record = explode(':',$records[$i]); if ((!$id) || ($record[1] == $id)) { if (getInfo(post,posts,"WHERE id='".$record[0]."'")) $posts[] = $record[0]; } } $max = count($posts); if (!implode('.',$posts)) $max = 0; $page = $_GET['page']; if (!$page) $page = truncate(($max - 1) / 10) + 1; if ($page * 10 > $max) { $page = truncate(($max - 1) / 10) + 1; } $offset = (10 * ($page - 1)); $stop = $offset + 10; if ($stop > $max) $stop = $max; for ($i = $offset;$i < $stop;$i++) { $ii = $posts[$i]; $intox = ''; $dex = 0; $row = getRow('*',posts,"WHERE id='$ii'"); $username = $row['username']; $conditions = "WHERE id='$ii'"; $profile_id = getInfo(username,posts,$conditions); $username = getInfo(username,users,"WHERE id='$profile_id'"); $thread_id = getInfo(thread_id,posts,$conditions); $date = $row['date']; $ooc = $row['ooc']; $whisper = getInfo(whisper,posts,$conditions); if (($whisper) && (($whisper != $userId) && ($profile_id != $userId))) $ooc = "ooc"; if (!$ooc) { $user_id = $row['id']; $post = $row['post']; if (!$post) { $row = getRow('*',archives,"WHERE id='$ii'"); $post = $row['post']; } if ($post) { $health = $row['health']; $mana = $row['mana']; $dex = $row['dex']; $stretch = $row['stretch']; $money = $row['money']; $nationality = $row['nationality']; $conditions = "WHERE id='$nationality'"; $nationality = getInfo(name,kingdoms,$conditions); $master = $row['master']; $statmax = $row['statmax']; $rank = $row['rank']; $status = $row['status']; $conditions = "WHERE username='$username'"; $sex = getInfo(sex,users,$conditions); $conditions = "WHERE level='$rank'"; if ($sex == "f") $rank = getInfo(female,ranks,$conditions); else $rank = getInfo(male,ranks,$conditions); if ($rank == "Knight") { if ($sex == "f") $rank = "Dame"; if ($sex == "m") $rank = "Sir"; } $intox = ''; if ($dex > 0) $intox = "Barely Intoxicated"; if ($dex > 10) $intox = "Slightly Intoxicated"; if ($dex > 20) $intox = "Moderately Intoxicated"; if ($dex > 30) $intox = "Very Intoxicated"; if ($dex > 40) $intox = "Extremely Intoxicated"; if ($dex >= 50) $intox = "Passed Out"; $fatigue = $row['fatigue']; if ($fatigue <= 20) $warning = "Weary"; if ($fatigue <= 15) $warning = "Tired"; if ($fatigue <= 10) $warning = "Very Tired"; if ($fatigue <= 5) $warning = "Exhausted"; $hunger = $row['hunger']; if ($hunger <= 20) $hungry = "Peckish"; if ($hunger <= 15) $hungry = "Hungry"; if ($hunger <= 10) $hungry = "Famished"; if ($hunger <= 5) $hungry = "Starving"; echo '

'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo '
'; if ($rank != "Peasant") echo $rank; echo ' '.$username.''; if ($nationality) echo ' of '.$nationality; echo ''; echo $date; echo '
'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo '
'; $wounds = getInfo(wounds,users,"WHERE username='$user_name'"); echo ''; echo ''; echo '
'; echo ' Profile
Send Message
Trade
Offer Job'; if (admin($user_name)) echo '
View Record'; echo '
'; echo '
'; echo '

'; $users = $row['users']; $usersArray = explode('.',$users); if ($users) { $users = explode('.',$users); $max = count($users); for ($iii = 0;$iii < $max;$iii++) { $users[$iii] = getInfo(username,users,"WHERE id='$users[$iii]'"); } $roomname = getInfo(name,rooms,"WHERE id='$thread_id'"); $place = getInfo(place,rooms,"WHERE id='$thread_id'"); $placename = getInfo(name,places,"WHERE id='$place'"); $users = implode(', ',$users); if (!inArray($userId,$usersArray)) echo "You were not in this room; this was seen from a guard tower, a town wall, or a room in the same building designated to be able to watch this room.
"; echo "Currently in the room ($roomname, $placename): $users."; echo "

"; } echo stripslashes($post); echo '
'; echo '
'; if ($status == "unconscious") echo "Unconscious
"; if ($status == "immobilized") echo "Tied Up
"; echo $health.' Health Points
'; echo $mana.' Mana Points
'; echo $intox.'
'; if ($warning) echo $warning.'
'; if ($hungry) echo $hungry.'
'; if ((admin($user_name)) || (last($ii,$id,$user_name)) || (moderator($user_name))) echo '
'; if ((admin($user_name)) || (last($ii,$id,$user_name)) || (moderator($user_name))) echo '
'; echo '[Report this Post]'; echo '
'; unset($dex); unset($intox); unset($warning); } } else { $user_id = $row['id']; $post = $row['post']; if (!$post) { $row = getRow('*',archives,"WHERE id='$ii'"); $post = $row['post']; } if ($post) { $whispername = getInfo(username,users,"WHERE id='$whisper'"); $nationality = $row['nationality']; $conditions = "WHERE id='$nationality'"; $nationality = getInfo(name,kingdoms,$conditions); $rank = $row['rank']; $rankLevel = $rank; $conditions = "WHERE username='$username'"; $sex = getInfo(sex,users,$conditions); $conditions = "WHERE level='$rank'"; if ($sex == "f") $rank = getInfo(female,ranks,$conditions); else $rank = getInfo(male,ranks,$conditions); if ($rank == "Knight") { if ($sex == "f") $rank = "Dame"; if ($sex == "m") $rank = "Sir"; } echo '

'; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo '
['; if (!$whisper) { if ($ooc == "ooc") echo "OOC"; else echo "Failed Counter"; } else { echo "Whisper"; } echo '] '; if (($username != "God") && ($rankLevel > 10)) echo $rank; echo ' '.$username.''; if ($nationality) echo ' of '.$nationality; echo ''; echo $date; echo 'Show/Hide
'; echo ''; echo ''; echo ''; echo '
'; if (!$whisper) { echo str_replace("\\'","'",str_replace('\\"','"',stripslashes($post))); } else { echo "$username whispered to $whispername."; } echo '
[Report this Post]'; if (admin($user_name)) echo '
'; if ((admin($user_name)) || (last($ii,$id,$user_name))) echo '
'; echo '
'; } } } $max = count($posts); if ($max > 10) { echo '
'; echo ''; echo ''; echo '
Pages
'; $pages = truncate(($max - 1)/ 10) + 1; $pstart = $page - 3; if ($pstart < 1) $pstart = 1; if ($pstart != 1) echo '1, '; $pend = $page + 3; if ($pend > $pages) $pend = $pages; if ($pstart > 2) echo '..'; for ($p = $pstart;$p <= $pend;$p++) { if ($p == $page && $page != $pend) echo $p.', '; elseif ($p == $pages) echo ''; else echo ''.$p.', '; } if ($pend < $pages - 1) echo '..'; if ($page != $pend) echo ''.$pages.''; if ($page == $pend) echo $pages; echo '
'; } ?>