Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Torrent Strike
Reply
  #1  
Old 14th February 2009, 08:32
torrentfreak's Avatar
torrentfreak torrentfreak is offline
Member
 
Join Date: Dec 2008
Default
Posts: 12
Default 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.
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' ? 0 : $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:<br>
  <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();
?>
Reply With Quote
  #2  
Old 20th January 2010, 21:03
stall20080's Avatar
stall20080 stall20080 is offline
Senior Member
 
Join Date: Nov 2009
P2P
Posts: 22
Default
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

  <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="16">
             </td>
             <td style="border: 0">Power User</td>
             
             <td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="22">
             </td>
             <td style="border: 0">VIP</td>
Hope that helps
Reply With Quote
Reply

Tags
pm , work

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[FIX] FTS 1.1 make poll work benjaminbih Free Torrent Source 2 8th January 2010 12:15
Make leftmenu work right benjaminbih Mods & Themes 0 25th December 2009 02:00
Help making a mod work with ajax instead! Viperia Torrent Trader 0 19th August 2009 15:58
XBT tracker will work on ysn?? Azurious Yuna Scatari Edition (YSE) 1 30th January 2009 16:36
the [img][/img] tag doesn't work? roland1000 TBDev 4 23rd July 2008 22:43



All times are GMT +2. The time now is 21:56. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2022, vBulletin Solutions Inc.