thehacker
Anhänger der Apachen
Hallo,
ich habe ein PM Script runtergeladen als Erweiterung für ein Tutorial.
Leider ein Problem es wird nichts angezeigt ? Wenn ich die inbox.php aufrufe!
Hier mal das script
inbox.php:
Danke schon mal für Hilfen
ich habe ein PM Script runtergeladen als Erweiterung für ein Tutorial.
Leider ein Problem es wird nichts angezeigt ? Wenn ich die inbox.php aufrufe!
Hier mal das script
inbox.php:
PHP:
<?php require('scripts/top.php'); ?>
<title>Info Box</title>
<div id='full'>
<?php
if ($username){
echo "<a href='create_message.php'>Create Message</a>
<div id='box'>
<b class='corners'>
<b class='corners1'><b></b></b>
<b class='corners2'><b></b></b>
<b class='corners3'></b>
<b class='corners4'></b>
<b class='corners5'></b></b>
<div class='cornersfg'>
<div id='top'>Inbox for $username</div>
<div id='bottom' style='padding: 10px;'>";
////////////////////////////////////////////////////////////////////////
require('scripts/connect.php');
$query = mysql_query("SELECT * FROM messages WHERE to_user='$username' ORDER BY id DESC");
$numrows = mysql_num_rows($query);
if ($numrows > 0){
echo "<form action='delete_message.php' method='POST'>";
echo "<div id='messages'>
<div id='leftside'><input type='checkbox' name='selectall'><input type='submit' name='deleteinbox' value='Delete' class='button'></div>
<div id='rightside'>Date</div>
<div id='center'>Subject and Message</div>
<div style='clear: both;'></div>
</div>";
while($row = mysql_fetch_assoc($query)){
$msg_id = $row['id'];
$msg_to_user = $row['to_user'];
$msg_to_id = $row['to_id'];
$msg_from_user = $row['from_user'];
$msg_from_id = $row['from_id'];
$msg_subject = $row['subject'];
$msg_content = $row['content'];
$msg_date = $row['date'];
$msg_from_delete = $row['from_delete'];
$msg_to_delete = $row['to_delete'];
if (!$msg_to_delete){
echo "<div id='messages'>";
echo "<div id='leftside'>
<input type='checkbox' name='cb$msg_id' value='$msg_id'>
<a href='profile.php?id=$msg_from_id' target='_blank'>$msg_from_user</a>
</div>";
echo "<div id='rightside'>$msg_date</div>";
echo "<div id='center'>
<span class='toggle'><a href='#'>$msg_subject</a></span>
<div class='hiddenDiv'>
<br>$msg_content<br><br>
<span class='toggle'><a href='#'>REPLY</a></span>
<div class='hiddenDiv'>
<form action='reply.php' method='POST'>
<input type='hidden' value='$msg_id' name='replyid'>
<input type='text' name='replysubject' style='width: 300px;' class='text-box' value='RE: $msg_subject'><br>
<textarea name='replycontent' style='width: 298px;' rows='5'></textarea><br><br>
<input type='submit' name='replybutton' class='button' value='Reply'>
</form>
</div>
</div>
</div>";
echo "<div style='clear: both;'></div>";
echo "</div>";
$num += 1;
}
}
if ($num == 0){
echo "You have no messages in your inbox.";
}
echo "</form>";
}
else
echo "You have no messages in your inbox.";
////////////////////////////////////////////////////////////////////////
echo "</div>
</div>
<b class='corners'>
<b class='corners5'></b>
<b class='corners4'></b>
<b class='corners3'></b>
<b class='corners2'><b></b></b>
<b class='corners1'><b></b></b></b>
</div>";
/////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////
echo "<div id='box'>
<b class='corners'>
<b class='corners1'><b></b></b>
<b class='corners2'><b></b></b>
<b class='corners3'></b>
<b class='corners4'></b>
<b class='corners5'></b></b>
<div class='cornersfg'>
<div id='top'>Outbox for $username</div>
<div id='bottom' style='padding: 10px;'>";
////////////////////////////////////////////////////////////////////////
require('scripts/connect.php');
$query = mysql_query("SELECT * FROM messages WHERE from_user='$username' ORDER BY id DESC");
$numrows = mysql_num_rows($query);
if ($numrows > 0){
echo "<form action='delete_message.php' method='POST'>";
echo "<div id='messages'>
<div id='leftside'><input type='checkbox' name='selectall'><input type='submit' name='deleteoutbox' value='Delete' class='button'></div>
<div id='rightside'>Date</div>
<div id='center'>Subject and Message</div>
<div style='clear: both;'></div>
</div>";
while($row = mysql_fetch_assoc($query)){
$msg_id = $row['id'];
$msg_to_user = $row['to_user'];
$msg_to_id = $row['to_id'];
$msg_from_user = $row['from_user'];
$msg_from_id = $row['from_id'];
$msg_subject = $row['subject'];
$msg_content = $row['content'];
$msg_date = $row['date'];
$msg_from_delete = $row['from_delete'];
$msg_to_delete = $row['to_delete'];
if (!$msg_from_delete){
echo "<div id='messages'>";
echo "<div id='leftside'>
<input type='checkbox' name='cb$msg_id' value='$msg_id'>
<a href='profile.php?id=$msg_from_id' target='_blank'>$msg_from_user</a>
</div>";
echo "<div id='rightside'>$msg_date</div>";
echo "<div id='center'>
<span class='toggle'><a href='#'>$msg_subject</a></span>
<div class='hiddenDiv'>
<br>$msg_content<br><br>
</div>
</div>";
echo "<div style='clear: both;'></div>";
echo "</div>";
$num += 1;
}
}
if ($num == 0){
echo "You have no messages in your outbox.";
}
echo "</form>";
}
else
echo "You have no messages in your outbox.";
////////////////////////////////////////////////////////////////////////
echo "</div>
</div>
<b class='corners'>
<b class='corners5'></b>
<b class='corners4'></b>
<b class='corners3'></b>
<b class='corners2'><b></b></b>
<b class='corners1'><b></b></b></b>
</div>";
echo "</div>";
}
else
echo "<center><h2><font color='red'>You must be logged in to view this page.</font></h2></center>";
require('scripts/bottom.php'); ?>
Danke schon mal für Hilfen