[Openfirst-cvscommit] messenger inbox.php,1.1.1.1,1.2 index.php,1.1,1.2 messenger.php,1.1.1.1,1.2 ne
Brought to you by:
xtimg
|
From: <xt...@us...> - 2003-06-21 13:03:54
|
Update of /cvsroot/openfirst/messenger
In directory sc8-pr-cvs1:/tmp/cvs-serv5422
Modified Files:
inbox.php index.php messenger.php newmsg.php viewmsg.php
Log Message:
Fix links, numerous spelling mistakes, die()'ing without showing footers and SQL scripts
Index: inbox.php
===================================================================
RCS file: /cvsroot/openfirst/messenger/inbox.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** inbox.php 6 Jun 2003 21:15:33 -0000 1.1.1.1
--- inbox.php 21 Jun 2003 13:03:51 -0000 1.2
***************
*** 32,43 ****
// If querystring delete is set with a value then delete the specified recordset
if (ISSET($_GET['DELETE'])){
! mysql_query("DELETE FROM ofirst_Messeges WHERE ID='".$_GET['DELETE']."'") or die(mysql_error());
! die("<br><br><br><center>Messege has been removed, thank you! [ <a href='inbox.php'>Inbox</a> ]");
}
?>
! <h1>Visitor Inbox for Messeging</h1>
! <p>[ <a href="inbox.php">Current Messeges For You </a>] [ <a href="viewLog.php">Members
! Login </a>] [ <a href="newmsg.php">Compose Messege </a>] [ <a href="usersonline.php">Online
Users </a>] <br><br><br><center><?php echo $usersonline."<br>".$usersonpage; ?><br>
<br></center>
--- 32,42 ----
// If querystring delete is set with a value then delete the specified recordset
if (ISSET($_GET['DELETE'])){
! mysql_query("DELETE FROM ofirst_messages WHERE ID='".$_GET['DELETE']."'") or die(mysql_error());
! die("<br><br><br><center>Message has been removed, thank you! [ <a href='inbox.php'>Inbox</a> ]");
}
?>
! <h1>Visitor Inbox for Messaging</h1>
! <p>[ <a href="inbox.php">Current Messages For You </a>] [ <a href="newmsg.php">Compose Message </a>] [ <a href="./">Online
Users </a>] <br><br><br><center><?php echo $usersonline."<br>".$usersonpage; ?><br>
<br></center>
***************
*** 51,78 ****
</tr>
<?php
! // Retrieve Messeges relating to the users IP address then loop through them
! $query = mysql_query("SELECT * FROM ofirst_Messeges WHERE Receiver = '$IP'");
! while($Messeges = mysql_fetch_object($query)){
! $queryuser = mysql_query("SELECT * FROM ofirst_usersonline WHERE IPAddress = '".$Messeges->Sender."'");
$senderinfo = mysql_fetch_object($queryuser);
?>
<tr>
! <td><img src="msg.png" alt="Messege"></td>
! <td><a href='viewmsg.php?ID=<?php echo $Messeges->ID; ?>'>
<?php
! if (empty($Messeges->Subject)){
echo "< No Subject >";
}else{
! echo $Messeges->Subject;
}
?>
</a></td>
! <td><?php echo date("F j, Y, g:i a",$Messeges->Date); ?></td>
<td>Visitor #<?php echo $senderinfo->ID; ?></td>
! <td>[ <a href='inbox.php?DELETE=<?php echo $Messeges->ID; ?>'> Delete </a> ]
! [ <a href="newmsg.php?REPLY=<?php echo $senderinfo->ID; ?>&SUBJECT=Re: <?php echo $Messeges->Subject; ?>">Reply</a> ]</td>
</tr>
<?php } ?>
--- 50,77 ----
</tr>
<?php
! // Retrieve Messages relating to the users IP address then loop through them
! $query = mysql_query("SELECT * FROM ofirst_messages WHERE Receiver = '$IP'");
! while($Messages = mysql_fetch_object($query)){
! $queryuser = mysql_query("SELECT * FROM ofirst_usersonline WHERE IPAddress = '".$Messages->Sender."'");
$senderinfo = mysql_fetch_object($queryuser);
?>
<tr>
! <td><img src="msg.png" alt="Message"></td>
! <td><a href='viewmsg.php?ID=<?php echo $Messages->ID; ?>'>
<?php
! if (empty($Messages->Subject)){
echo "< No Subject >";
}else{
! echo $Messages->Subject;
}
?>
</a></td>
! <td><?php echo date("F j, Y, g:i a",$Messages->Date); ?></td>
<td>Visitor #<?php echo $senderinfo->ID; ?></td>
! <td>[ <a href='inbox.php?DELETE=<?php echo $Messages->ID; ?>'> Delete </a> ]
! [ <a href="newmsg.php?REPLY=<?php echo $senderinfo->ID; ?>&SUBJECT=Re: <?php echo $Messages->Subject; ?>">Reply</a> ]</td>
</tr>
<?php } ?>
Index: index.php
===================================================================
RCS file: /cvsroot/openfirst/messenger/index.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** index.php 8 Jun 2003 02:35:30 -0000 1.1
--- index.php 21 Jun 2003 13:03:51 -0000 1.2
***************
*** 31,35 ****
?>
<h1>Current Online Users</h1>
! <p>[ <a href="inbox.php">Current Messeges For You </a>] [ <a href="viewLog.php">Members Login </a>] [ <a href="newmsg.php">Compose Messege </a>] [ <a href="usersonline.php">Online Users </a>]
<br><br>
<center><?php echo $usersonline."<br>".$usersonpage; ?></center>
--- 31,35 ----
?>
<h1>Current Online Users</h1>
! <p>[ <a href="inbox.php">Current Messages For You </a>] [ <a href="newmsg.php">Compose Message </a>] [ <a href="./">Online Users </a>]
<br><br>
<center><?php echo $usersonline."<br>".$usersonpage; ?></center>
***************
*** 52,56 ****
<td><?php if ($user->Member = "none"){ echo "Visiting Guest #".$user->ID; }else{ echo $user->Member; } ?></td>
<td><?php echo $user->Location; ?></td>
! <td>[ <a href="newmsg.php?REPLY=<?php echo $user->ID; ?>"> Messege User</a>
]</td>
</tr>
--- 52,56 ----
<td><?php if ($user->Member = "none"){ echo "Visiting Guest #".$user->ID; }else{ echo $user->Member; } ?></td>
<td><?php echo $user->Location; ?></td>
! <td>[ <a href="newmsg.php?REPLY=<?php echo $user->ID; ?>"> Message User</a>
]</td>
</tr>
Index: messenger.php
===================================================================
RCS file: /cvsroot/openfirst/messenger/messenger.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** messenger.php 6 Jun 2003 21:15:38 -0000 1.1.1.1
--- messenger.php 21 Jun 2003 13:03:51 -0000 1.2
***************
*** 55,59 ****
$query = mysql_query("SELECT * FROM ofirst_usersonline");
! $usersonline = "There are currently <b>".mysql_num_rows($query)."</b> persons on this website! [ <a href='usersonline.php'>View List</a> ]";
// Check how many people are previewing the same exact script location and put in user usable variable
--- 55,59 ----
$query = mysql_query("SELECT * FROM ofirst_usersonline");
! $usersonline = "There are currently <b>".mysql_num_rows($query)."</b> persons on this website! [ <a href='./'>View List</a> ]";
// Check how many people are previewing the same exact script location and put in user usable variable
***************
*** 62,86 ****
$usersonpage = "There are currently <b>".mysql_num_rows($page_query)."</b> viewing this page!";
! // Check if the user has any new Messeges
! $query = mysql_query("SELECT * FROM ofirst_Messeges WHERE Status = 'New' AND Receiver = '".$IP."'") or die(mysql_error());
! $Messeges = mysql_num_rows($query);
! // Update Messege status so they don't show after the person requests the next page
! mysql_query("UPDATE ofirst_Messeges SET Status = 'Read' WHERE Receiver = '".$IP."'") or die(mysql_error());
! // If there are one ore more then one Messeges then preview the Messege box
! if($Messeges >= 1){
?>
<table style="position: absolute; left: 306px; top: 64px; width: 384px; height: 19px" width="400" border="1" cellpadding="4" cellspacing="0" bordercolor="#666666" bgcolor="#CCCCCC">
<tr>
<td height="25" bgcolor="#999999"><div align="center"><font color="#FFFFFF">Private
! Messeging System Alert</font></div></td>
</tr>
<tr>
<td height="25"><p align="center"><br>
! <img src="<?php echo $home; ?>/messenger/msg.png" alt="Messege" width="28" height="25"> <br>
! You have <b><?php echo $Messeges; ?></b> new Messeges(s) in your visitor
inbox!<br>
<br>
--- 62,86 ----
$usersonpage = "There are currently <b>".mysql_num_rows($page_query)."</b> viewing this page!";
! // Check if the user has any new Messages
! $query = mysql_query("SELECT * FROM ofirst_messages WHERE Status = 'New' AND Receiver = '".$IP."'") or die(mysql_error());
! $Messages = mysql_num_rows($query);
! // Update Message status so they don't show after the person requests the next page
! mysql_query("UPDATE ofirst_messages SET Status = 'Read' WHERE Receiver = '".$IP."'") or die(mysql_error());
! // If there are one ore more then one Messages then preview the Message box
! if($Messages >= 1){
?>
<table style="position: absolute; left: 306px; top: 64px; width: 384px; height: 19px" width="400" border="1" cellpadding="4" cellspacing="0" bordercolor="#666666" bgcolor="#CCCCCC">
<tr>
<td height="25" bgcolor="#999999"><div align="center"><font color="#FFFFFF">Private
! Messaging System Alert</font></div></td>
</tr>
<tr>
<td height="25"><p align="center"><br>
! <img src="<?php echo $home; ?>/messenger/msg.png" alt="Message" width="28" height="25"> <br>
! You have <b><?php echo $Messages; ?></b> new Messages(s) in your visitor
inbox!<br>
<br>
Index: newmsg.php
===================================================================
RCS file: /cvsroot/openfirst/messenger/newmsg.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** newmsg.php 6 Jun 2003 21:15:32 -0000 1.1.1.1
--- newmsg.php 21 Jun 2003 13:03:51 -0000 1.2
***************
*** 30,37 ****
mysql_select_db($sqldatabase,$sqlconnection);
! // If the user has posted a send command then insert the Messege into the database
if (ISSET($_POST['send'])){
! mysql_query("INSERT INTO ofirst_messeges (Sender,Receiver,Subject,Body, Status, Date) values(
'".$IP."'
,'".$_POST['recip']."'
--- 30,37 ----
mysql_select_db($sqldatabase,$sqlconnection);
! // If the user has posted a send command then insert the Message into the database
if (ISSET($_POST['send'])){
! mysql_query("INSERT INTO ofirst_messages (Sender,Receiver,Subject,Body, Status, Date) values(
'".$IP."'
,'".$_POST['recip']."'
***************
*** 41,51 ****
,'".time()."')") or die("INSERT ERROR: ".mysql_error());
! die("<br><br><br><center>Messege has been sent! [ <a href='inbox.php'>Inbox</a> ]");
}
?>
<form method="POST" action="newmsg.php">
! <h1>Visitor Inbox for Messeging</h1>
! <p>[ <a href="inbox.php">Current Messeges For You </a>] [ <a href="viewLog.php">Members
! Login </a>] [ <a href="newmsg.php">Compose Messege </a>] [ <a href="usersonline.php">Online
Users </a>] <br>
<br>
--- 41,51 ----
,'".time()."')") or die("INSERT ERROR: ".mysql_error());
! echo("<br><br><br><center>Message has been sent! [ <a href='inbox.php'>Inbox</a> ]");
! die(include($footer));
}
?>
<form method="POST" action="newmsg.php">
! <h1>Visitor Inbox for Messaging</h1>
! <p>[ <a href="inbox.php">Current Messages For You </a>] [ <a href="newmsg.php">Compose Message </a>] [ <a href="./">Online
Users </a>] <br>
<br>
***************
*** 93,101 ****
<textarea name="body" cols="50" rows="10" id="body"></textarea>
<br>
! <font size="2">(HTML Messeges enabled)</font></td>
</tr>
<tr>
<td></td>
! <td><input name="send" type="submit" value="Send Messege"></td>
</tr>
</table>
--- 93,101 ----
<textarea name="body" cols="50" rows="10" id="body"></textarea>
<br>
! <font size="2">(HTML Messages enabled)</font></td>
</tr>
<tr>
<td></td>
! <td><input name="send" type="submit" value="Send Message"></td>
</tr>
</table>
Index: viewmsg.php
===================================================================
RCS file: /cvsroot/openfirst/messenger/viewmsg.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** viewmsg.php 6 Jun 2003 21:15:36 -0000 1.1.1.1
--- viewmsg.php 21 Jun 2003 13:03:51 -0000 1.2
***************
*** 32,46 ****
// Retrieve recordset based on querystring ID data, then preview the information
! $query = mysql_query("SELECT * FROM ofirst_Messeges WHERE ID='".$_GET['ID']."'") or die("SELECT: ".mysql_error());
$msg = mysql_fetch_object($query);
! // Retrieve user information based Messege information
$qsend = mysql_query("SELECT * FROM ofirst_usersonline WHERE IPAddress='".$msg->Sender."'") or die("SELECT: ".mysql_error());
$sender = mysql_fetch_object($qsend);
?>
! <h1>Viewing Messege</h1>
! <p>[ <a href="inbox.php">Current Messeges For You </a>] [ <a href="viewLog.php">Members
! Login </a>] [ <a href="newmsg.php">Compose Messege </a>] [ <a href="usersonline.php">Online
Users </a>] <br><br><br><center><?php echo $usersonline; ?><br>
<br></center>
--- 32,45 ----
// Retrieve recordset based on querystring ID data, then preview the information
! $query = mysql_query("SELECT * FROM ofirst_messages WHERE ID='".$_GET['ID']."'") or die("SELECT: ".mysql_error());
$msg = mysql_fetch_object($query);
! // Retrieve user information based Message information
$qsend = mysql_query("SELECT * FROM ofirst_usersonline WHERE IPAddress='".$msg->Sender."'") or die("SELECT: ".mysql_error());
$sender = mysql_fetch_object($qsend);
?>
! <h1>Viewing Message</h1>
! <p>[ <a href="inbox.php">Current Messages For You </a>] [ <a href="newmsg.php">Compose Message </a>] [ <a href="./">Online
Users </a>] <br><br><br><center><?php echo $usersonline; ?><br>
<br></center>
***************
*** 48,52 ****
<tr bgcolor="#999999">
<td width="25%"> </td>
! <td width="75%"><font color="#FFFFFF">Current Messege</font></td>
</tr>
<tr>
--- 47,51 ----
<tr bgcolor="#999999">
<td width="25%"> </td>
! <td width="75%"><font color="#FFFFFF">Current Message</font></td>
</tr>
<tr>
|