Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Torrent Strike (http://www.bvlist.com/forumdisplay.php?f=21)
-   -   PM does not work (http://www.bvlist.com/showthread.php?t=2006)

torrentfreak 14th February 2009 08:32

PM does not work
 
HI
I use torrentstrike fully modded source. But when i PM to all users+power users+admin+VIPs+everyone i mean only users get the mssg not every one. I m posting the code of takestaffmess.php. Please help me out.:sos:
PHP Code:

<?
require "include/bittorrent.php";

if (
$HTTP_SERVER_VARS["REQUEST_METHOD"] != "POST")
 
stderr("Error""damn cheater");



dbconn();
loggedinorreturn();                                                    

if (
get_user_class() < UC_MODERATOR)
stderr("Sorry""but your just a little bitch on this tracker");

$sender_id = ($_POST['sender'] == 'system' $CURUSER['id']);
$dt sqlesc(get_date_time());
$msg $_POST['msg'];
if (!
$msg)
stderr("Error","Please, enter a message!");

$subject $_POST['subject'];
if (!
$subject)
stderr("Error","Please, enter a subject!");

$updateset $_POST['clases'];
if(!
$_POST['clases'])
stderr("Error","please check 1 or more classes");
$query mysql_query("SELECT id FROM users WHERE class IN (".implode(","$updateset).")");

while(
$dat=mysql_fetch_assoc($query))
{
mysql_query("INSERT INTO messages (sender, receiver, added, msg,subject) VALUES ($sender_id$dat[id], '" get_date_time() . "', " sqlesc($msg) .", " sqlesc($subject) .")") or sqlerr(__FILE__,__LINE__);
}

header("Refresh: 4; url=staffmess.php");


?>

And I m posting the staffmess.php code also

PHP Code:

<?php
require "include/bittorrent.php";
dbconn(false);
loggedinorreturn();

stdhead("Mass Message"false);
?>
<table class=main width=750 border=0 cellspacing=0 cellpadding=0><tr><td class=embedded>
<div align=center>
<h1>Mass Message to all Staff members and users:</a></h1>
<form method=post action=takestaffmess.php>
<?

if ($_GET["returnto"] || $_SERVER["HTTP_REFERER"])
{
?>
<input type=hidden name=returnto value=<?=$_GET["returnto"] ? $_GET["returnto"] : $_SERVER["HTTP_REFERER"]?>>
<?
}
?>
<table cellspacing=0 cellpadding=5>
<tr>
<td>Send to:
  <table style="border: 0" width="100%" cellpadding="0" cellspacing="0">
    <tr>
             <td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="0">
             </td>
             <td style="border: 0">User</td>

             <td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="1">
             </td>
             <td style="border: 0">Power User</td>
             <td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="2">
             </td>
             <td style="border: 0">VIP</td>
             <td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="3">
             </td>
             <td style="border: 0">Uploader</td>
      </tr>
    <tr>
             <td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="4">
             </td>
             <td style="border: 0">Moderator</td>
             <td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="5">
             </td>
             <td style="border: 0">Administrator</td>
             <td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="6">
             </td>
             <td style="border: 0">SysOp</td>
       <td style="border: 0">&nbsp;</td>
       <td style="border: 0">&nbsp;</td>
      </tr>
    </table>
  </td>
</tr>
<TD colspan="2">Subject:
   <INPUT name="subject" type="text" size="76"></TD>
</TR>
<tr><td><textarea name=msg cols=80 rows=15><?=$body?></textarea></td></tr>
<tr>
<td colspan=2><div align="center"><b>Sender:&nbsp;&nbsp;</b>
<?=$CURUSER['username']?>
<input name="sender" type="radio" value="self" checked>
&nbsp; System
<input name="sender" type="radio" value="system">
</div></td></tr>
<tr><td colspan=2 align=center><input type=submit value="Send!" class=btn></td></tr>
</table>
<input type=hidden name=receiver value=<?=$receiver?>>
</form>

 </div></td></tr></table>
<br/>
NOTA: Do not use BB codes. (NO HTML)
<?
stdfoot
();
?>



           

           
           
           
           
           
Hope that helps
stall20080 20th January 2010 21:03

you will need to chnage the value="4" for each class e.g (admin,sysop,mod)

if you open include/global.php and serach for define ('UC_ ) you will have a list like below :

Code:

define ('UC_USER', 0);
define ('UC_POWER_USER', 16);
define ('UC_VIP', 32);
define ('UC_BOT', 33);
define ('UC_SUPER_VIP', 34);
define ('UC_UPLOADER', 48);

you will need to match the end numbers to your staffmess.php so it looks like this

 

           
User
           
Power User
           
VIP


All times are GMT +2. The time now is 02:14.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.