Bravo List
Go Back   > Bravo List > Source Code > Archived Trackers > Torrent Strike
Old 14th February 2009, 08:32
torrentfreak's Avatar
torrentfreak torrentfreak is offline
Join Date: Dec 2008
Posts: 12
Default PM does not work
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";

 stderr("Error", "damn cheater");


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'];
stderr("Error","please check 1 or more classes");
$query = mysql_query("SELECT id FROM users WHERE class IN (".implode(",", $updateset).")");

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:
require "include/bittorrent.php";

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>
<td>Send to:<br>
  <table style="border: 0" width="100%" cellpadding="0" cellspacing="0">
             <td style="border: 0" width="20"><input type="checkbox" name="clases[]" value="0">
             <td style="border: 0">User</td>

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

NOTA: Do not use BB codes. (NO HTML)
Reply With Quote
Old 20th January 2010, 21:03
stall20080's Avatar
stall20080 stall20080 is offline
Senior Member
Join Date: Nov 2009
Posts: 22
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 :

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 style="border: 0">User</td>

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

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.