Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Free Torrent Source
Reply
  #1  
Old 2nd March 2010, 10:42
Edgein's Avatar
Edgein Edgein is offline
Senior Member
 
Join Date: Sep 2008
Netherlands
Posts: 154
Smile [FIX] FTS 1.1 remove expired warnings
When a user is warned and the warned time is over
the system does not remove the warning automatic

go to /include/libs/cron/cron_class.php
and find

PHP Code:
    public function deadtime()
    { 
above add

PHP Code:
//remove expired warnings
  
$res mysql_query("SELECT id FROM users WHERE warned='yes' AND warneduntil < NOW() AND warneduntil <> '0000-00-00 00:00:00'") or sqlerr(__FILE____LINE__);
  if (
mysql_num_rows($res) > 0)
  {
    
$dt sqlesc(get_date_time());
    
$msg sqlesc("Your warning has been removed. Please keep in your best behaviour from now on.\n");
    while (
$arr mysql_fetch_assoc($res))
    {
      
mysql_query("UPDATE users SET warned = 'no', warneduntil = '0000-00-00 00:00:00' WHERE id = $arr[id]") or sqlerr(__FILE____LINE__);
      
mysql_query("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES(0, $arr[id]$dt$msg, 0)") or sqlerr(__FILE____LINE__);
    }
  }
//end remove expired warnings 
grtzz Edgein
Reply With Quote
The Following User Says Thank You to Edgein For This Useful Post:
Phogo (4th March 2010)
  #2  
Old 2nd March 2010, 21:04
yordanov2010 yordanov2010 is offline
Member
 
Join Date: Feb 2010
P2P
Posts: 4
Default
what is fts? copied/modified version of xam 1.3/3/4/5 series?

btw do you really know anything about coding? if yes please let me know what does following lines means;

PHP Code:
$dt sqlesc(get_date_time());
$msg sqlesc("Your warning has been removed. Please keep in your best behaviour from now on.\n"); 
Reply With Quote
  #3  
Old 3rd March 2010, 10:09
Edgein's Avatar
Edgein Edgein is offline
Senior Member
 
Join Date: Sep 2008
Netherlands
Posts: 154
Default
lol what a questionto test or skills there are other sites

and what if there are people who love the FTS source
while I find it a hobby to help people whether I am a coder or not
Reply With Quote
  #4  
Old 3rd March 2010, 14:08
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default
Quote:
Originally Posted by yordanov2010 View Post
what is fts? copied/modified version of xam 1.3/3/4/5 series?

btw do you really know anything about coding? if yes please let me know what does following lines means;

PHP Code:
$dt sqlesc(get_date_time());
$msg sqlesc("Your warning has been removed. Please keep in your best behaviour from now on.\n"); 


Code:
$dt = sqlesc(get_date_time());
is a call to 2 functions to generate a time stamp and set it as a variable {$dt}!
Code:
$msg = sqlesc("Your warning has been removed. Please keep in your best behaviour from now on.\n");
is all call to a function to clean up a message and add forward slashes to all {" ' and &quot;} to help stop sql injections
and to set that message as a variable {$msg}

if you want to test a coder you well need to try harder then that
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
  #5  
Old 3rd March 2010, 14:24
yordanov2010 yordanov2010 is offline
Member
 
Join Date: Feb 2010
P2P
Posts: 4
Default
Quote:
Originally Posted by joeroberts View Post
is a call to 2 functions to generate a time stamp and set it as a variable {$dt}!
You don't need any protection for those both lines. That's why I asked this basic question. get_date_time() should be NOW()

and the second one must be: $msg = "Your warning has been removed.

Please keep in your best behaviour from now on.\n";
Reply With Quote
  #6  
Old 3rd March 2010, 14:41
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default
some data bases servers run a different time then the php server and using
because some hosts well use a external database server in a different location
[if you do not use localhost you use a
Code:
blabla.ru.co
for your $db_host = "localhost";]
sqlesc() is just a standerd.
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
Reply

Tags
11 , expired , fix , fts , remove , warnings

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
Remove notice lovebeer Torrent Trader 2 29th August 2012 14:52
How to remove ? franky2008 TBDev 0 11th February 2010 15:31
Problem with warnings YSE v2.2 PRE7 by kp380lv cop1976 Yuna Scatari Edition (YSE) 8 30th September 2009 22:14
How To Remove ShoutBox GauravJ123 xBTiT 1 9th August 2009 16:42
How to remove!! Buu Community Cafe 8 12th March 2009 15:52



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