From: Katie R. <ky...@us...> - 2010-08-01 19:53:21
|
Update of /cvsroot/arianne/stendhal_website/scripts In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv9614/scripts Modified Files: account.php Log Message: Show messages for all the player's characters and add a 'to' column. Make unseen ones bold and remove that column. Make player messages get a URL to the character page, and support messages orange and with a URL, and remove messageType column Index: account.php =================================================================== RCS file: /cvsroot/arianne/stendhal_website/scripts/account.php,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** account.php 1 Aug 2010 18:10:37 -0000 1.27 --- account.php 1 Aug 2010 19:53:14 -0000 1.28 *************** *** 354,361 **** * gets a list of recent messages for that player */ ! function getStoredMessages($name) { ! $sql = "SELECT source, timedate, message, messageType, delivered FROM " ! . " postman WHERE target='".mysql_real_escape_string($name) ! . "' ORDER BY timedate DESC LIMIT 100;"; $result = mysql_query($sql, getGameDB()); --- 354,361 ---- * gets a list of recent messages for that player */ ! function getStoredMessages($playerId) { ! $sql = "SELECT postman.source, postman.target, postman.timedate, postman.message, postman.messageType, postman.delivered FROM " ! . " postman JOIN characters ON characters.charname = postman.target WHERE characters.player_id=".mysql_real_escape_string($playerId) ! . " ORDER BY postman.timedate DESC LIMIT 100;"; $result = mysql_query($sql, getGameDB()); *************** *** 363,367 **** while($row = mysql_fetch_assoc($result)) { ! $list[] = new StoredMessage($row['source'], $row['timedate'], $row['message'], $row['messageType'], $row['delivered']); } --- 363,367 ---- while($row = mysql_fetch_assoc($result)) { ! $list[] = new StoredMessage($row['source'], $row['target'], $row['timedate'], $row['message'], $row['messageType'], $row['delivered']); } *************** *** 379,382 **** --- 379,384 ---- /* source of message (who sent it) */ public $source; + /* target of message (who it was sent to) */ + public $target; /* date and time of event */ public $timedate; *************** *** 388,393 **** public $delivered; ! function __construct($source, $timedate, $message, $messageType, $delivered) { $this->source = $source; $this->timedate = $timedate; $this->message = $message; --- 390,396 ---- public $delivered; ! function __construct($source, $target, $timedate, $message, $messageType, $delivered) { $this->source = $source; + $this->target = $target; $this->timedate = $timedate; $this->message = $message; |