plugins/PrivateMessages.php
changeset 1280 871f17a0d27d
parent 1227 bdac73ed481e
child 1348 2e635e51deb0
equal deleted inserted replaced
1279:0bc945385d74 1280:871f17a0d27d
   273 			}
   273 			}
   274 			else
   274 			else
   275 			{
   275 			{
   276 				if ( ( $argv[1]=='to' || $argv[1]=='To' ) && $argv[2] )
   276 				if ( ( $argv[1]=='to' || $argv[1]=='To' ) && $argv[2] )
   277 				{
   277 				{
   278 					$to = htmlspecialchars($argv[2]);
   278 					$to = htmlspecialchars(str_replace('_', ' ', dirtify_page_id($argv[2])));
   279 				}
   279 				}
   280 				else
   280 				else
   281 				{
   281 				{
   282 					$to = '';
   282 					$to = '';
   283 				}
   283 				}
   751 				{
   751 				{
   752 					$allbuds = '';
   752 					$allbuds = '';
   753 					echo '<br /><div class="tblholder"><table border="0" width="100%" cellspacing="1" cellpadding="4"><tr><th colspan="3">' . $lang->get('privmsgs_th_buddy_list', array('username' => htmlspecialchars($session->username))) . '</th></tr>';
   753 					echo '<br /><div class="tblholder"><table border="0" width="100%" cellspacing="1" cellpadding="4"><tr><th colspan="3">' . $lang->get('privmsgs_th_buddy_list', array('username' => htmlspecialchars($session->username))) . '</th></tr>';
   754 					if($db->numrows() < 1) echo '<tr><td class="row3">' . $lang->get('privmsgs_msg_no_buddies') . '</td></tr>';
   754 					if($db->numrows() < 1) echo '<tr><td class="row3">' . $lang->get('privmsgs_msg_no_buddies') . '</td></tr>';
   755 					$cls = 'row2';
   755 					$cls = 'row2';
   756 					while ( $row = $db->fetchrow() )
   756 					while ( $row = $db->fetchrow($q) )
   757 					{
   757 					{
   758 						if($cls=='row2') $cls = 'row1';
   758 						if($cls=='row2') $cls = 'row1';
   759 						else $cls = 'row2';
   759 						else $cls = 'row2';
   760 						echo '<tr><td class="'.$cls.'"><a href="'.makeUrlNS('User', str_replace(' ', '_', $row['username'])).'" '. ( isPage($paths->nslist['User'].str_replace(' ', '_', $row['username'])) ? '' : 'class="wikilink-nonexistent" ' ) .'>'.$row['username'].'</a></td><td class="'.$cls.'"><a href="'.makeUrlNS('Special', 'PrivateMessages/Compose/to/'.str_replace(' ', '_', $row['username'])).'">' . $lang->get('privmsgs_btn_buddy_send_pm') . '</a></td><td class="'.$cls.'"><a href="'.makeUrlNS('Special', 'PrivateMessages/FriendList/Remove/'.$row['buddy_id']).'">' . $lang->get('privmsgs_btn_buddy_remove') . '</a></td></tr>';
   760 						echo '<tr><td class="'.$cls.'"><a href="'.makeUrlNS('User', str_replace(' ', '_', $row['username'])).'" '. ( isPage($paths->nslist['User'].str_replace(' ', '_', $row['username'])) ? '' : 'class="wikilink-nonexistent" ' ) .'>'.$row['username'].'</a></td><td class="'.$cls.'"><a href="'.makeUrlNS('Special', 'PrivateMessages/Compose/to/'.str_replace(' ', '_', $row['username'])).'">' . $lang->get('privmsgs_btn_buddy_send_pm') . '</a></td><td class="'.$cls.'"><a href="'.makeUrlNS('Special', 'PrivateMessages/FriendList/Remove/'.$row['buddy_id']).'">' . $lang->get('privmsgs_btn_buddy_remove') . '</a></td></tr>';
   761 						$allbuds .= str_replace(' ', '_', $row['username']).',';
   761 						$allbuds .= str_replace(' ', '_', $row['username']).',';
   823 				{
   823 				{
   824 					$allbuds = '';
   824 					$allbuds = '';
   825 					echo '<br /><div class="tblholder"><table border="0" width="100%" cellspacing="1" cellpadding="4"><tr><th colspan="3">' . $lang->get('privmsgs_th_foe_list', array('username' => htmlspecialchars($session->username))) . '</th></tr>';
   825 					echo '<br /><div class="tblholder"><table border="0" width="100%" cellspacing="1" cellpadding="4"><tr><th colspan="3">' . $lang->get('privmsgs_th_foe_list', array('username' => htmlspecialchars($session->username))) . '</th></tr>';
   826 					if($db->numrows() < 1) echo '<tr><td class="row3">' . $lang->get('privmsgs_msg_no_foes') . '</td></tr>';
   826 					if($db->numrows() < 1) echo '<tr><td class="row3">' . $lang->get('privmsgs_msg_no_foes') . '</td></tr>';
   827 					$cls = 'row2';
   827 					$cls = 'row2';
   828 					while ( $row = $db->fetchrow() )
   828 					while ( $row = $db->fetchrow($q) )
   829 					{
   829 					{
   830 						if($cls=='row2') $cls = 'row1';
   830 						if($cls=='row2') $cls = 'row1';
   831 						else $cls = 'row2';
   831 						else $cls = 'row2';
   832 						echo '<tr><td class="'.$cls.'"><a href="'.makeUrlNS('User', str_replace(' ', '_', $row['username'])).'" '. ( isPage($paths->nslist['User'].str_replace(' ', '_', $row['username'])) ? '' : 'class="wikilink-nonexistent" ' ) .'>'.$row['username'].'</a></td><td class="'.$cls.'"><a href="'.makeUrlNS('Special', 'PrivateMessages/Compose/to/'.str_replace(' ', '_', $row['username'])).'">' . $lang->get('privmsgs_btn_buddy_send_pm') . '</a></td><td class="'.$cls.'"><a href="'.makeUrlNS('Special', 'PrivateMessages/FoeList/Remove/'.$row['buddy_id']).'">' . $lang->get('privmsgs_btn_buddy_remove') . '</a></td></tr>';
   832 						echo '<tr><td class="'.$cls.'"><a href="'.makeUrlNS('User', str_replace(' ', '_', $row['username'])).'" '. ( isPage($paths->nslist['User'].str_replace(' ', '_', $row['username'])) ? '' : 'class="wikilink-nonexistent" ' ) .'>'.$row['username'].'</a></td><td class="'.$cls.'"><a href="'.makeUrlNS('Special', 'PrivateMessages/Compose/to/'.str_replace(' ', '_', $row['username'])).'">' . $lang->get('privmsgs_btn_buddy_send_pm') . '</a></td><td class="'.$cls.'"><a href="'.makeUrlNS('Special', 'PrivateMessages/FoeList/Remove/'.$row['buddy_id']).'">' . $lang->get('privmsgs_btn_buddy_remove') . '</a></td></tr>';
   833 						$allbuds .= str_replace(' ', '_', $row['username']).',';
   833 						$allbuds .= str_replace(' ', '_', $row['username']).',';