Upload files to "/"
This commit is contained in:
parent
ebb776db0d
commit
b1c7e3ae59
3 changed files with 196 additions and 0 deletions
67
msg-read.php
Normal file
67
msg-read.php
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
<HTML><HEAD>
|
||||
<TITLE>Frontier II</TITLE>
|
||||
</HEAD><BODY BGCOLOR="#000000" TEXT="#f0f0f0">
|
||||
|
||||
<?php
|
||||
|
||||
session_start();
|
||||
require($_SERVER['DOCUMENT_ROOT'].'/include.php');
|
||||
|
||||
if ($_SESSION['cid'] != '')
|
||||
{ // Logged in
|
||||
|
||||
echo "<TABLE ALIGN=\"CENTER\" VALIGN=\"CENTER\" WIDTH=\"90%\" HEIGHT=\"90%\" BORDER=\"0\">
|
||||
<TR><TD><H2 ALIGN=\"CENTER\">CommLink</H2></TD></TR>";
|
||||
|
||||
$show = $_POST['SHOW'];
|
||||
$character_id = $_SESSION['cid'];
|
||||
|
||||
if ($show == 'ALL') { // Display all messages
|
||||
|
||||
$sql = "SELECT * FROM `message` WHERE
|
||||
`to` = '$character_id'";
|
||||
|
||||
} else { // This should not happen...
|
||||
|
||||
$sql = "SELECT * FROM `message` WHERE `id` = '0'";
|
||||
|
||||
}
|
||||
|
||||
$result = mysqli_query($mysqli, $sql) or die($gameerror . "MR-Q01");
|
||||
$num = mysqli_num_rows($result);
|
||||
|
||||
$i = 0;
|
||||
|
||||
while ($i < $num) {
|
||||
|
||||
$row = mysqli_fetch_assoc($result);
|
||||
|
||||
$from_id = $row['from'];
|
||||
$time = $row['time'];
|
||||
$body = $row['body'];
|
||||
|
||||
$sql = "SELECT `name` FROM `character` WHERE `id` = '$from_id'";
|
||||
$resultchar = mysqli_query($mysqli, $sql) or die($gameerror . "MR-Q02");
|
||||
$rowchar = mysqli_fetch_assoc($resultchar);
|
||||
$from_name = $rowchar['name'];
|
||||
|
||||
echo "<TR><TD><P><B>Message from $from_name:</B> ($time)<BR>
|
||||
$body
|
||||
</TD></TR>
|
||||
<TR><TD><P> </TD></TR>";
|
||||
|
||||
$i++;
|
||||
|
||||
}
|
||||
|
||||
echo "</TABLE>";
|
||||
|
||||
} else { echo $gameseserr; } // Not logged in
|
||||
|
||||
mysqli_close($mysqli);
|
||||
|
||||
echo $footer;
|
||||
|
||||
?>
|
||||
|
||||
</BODY></HTML>
|
||||
Loading…
Add table
Add a link
Reference in a new issue