wxlg1117 |
3rd July 2010 22:01 |
1 Attachment(s)
I refer to this : http://my-trac.assembla.com/freetosu...le.php?rev=115,
then i find this by google : http://www.koders.com/php/fid4C12125...7.aspx?s=image
By contrast, found that the code is almost, but the English version;
then i fix it and upload this file to my server, it working;
http://img.virsrv.com/images/70057701187829017773.png
list Unconnectable Users normal ,and send PM normal ,but i can't understand ,the Date all was zero? elapsed was 2113 week ago?
http://img.virsrv.com/images/07675874656825383858.png
first add in this sql to database:
Code:
--
-- Table structure for table `notconnectablepmlog`
--
CREATE TABLE `notconnectablepmlog` (
`id` int(10) unsigned NOT NULL auto_increment,
`user` int(10) unsigned NOT NULL default '0',
`date` datetime default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
--
-- Dumping data for table `notconnectablepmlog`
--
then upload findnotconnectable.php to your WWW root ,
findnotconnectable.php
Code:
/*
// +--------------------------------------------------------------------------+
// | Project: TBDevYSE - TBDev Yuna Scatari Edition |
// +--------------------------------------------------------------------------+
// | This file is part of TBDevYSE. TBDevYSE is based on TBDev, |
// | originally by RedBeard of TorrentBits, extensively modified by |
// | Gartenzwerg. |
// | |
// | TBDevYSE is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | TBDevYSE is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with TBDevYSE; if not, write to the Free Software Foundation, |
// | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +--------------------------------------------------------------------------+
// | Do not remove above lines! |
// +--------------------------------------------------------------------------+
*/
require_once("include/bittorrent.php");
dbconn(false);
loggedinorreturn();
if (get_user_class() < UC_UPLOADER)
stderr($tracker_lang['error'], $tracker_lang['access_denied']);
if ($_GET['action'] == "list") {
$res2 = sql_query("SELECT userid, seeder, torrent, agent FROM peers WHERE connectable='no' ORDER BY userid DESC") or sqlerr(__FILE__, __LINE__);
stdhead("Peers that are unconnectable");
print("Послать всем несоединябельным пирам массовое ПМ");
print("Просмотреть лог (Проверьте это прежде чем отправлять ЛС пользователям)");
print("Пиры с которыми нельзя соединиться");
print("Это только те пользователи которые сейчас активны на торрентах.");
print("* означает что пользователь сидирует.");
$result = sql_query("SELECT DISTINCT userid FROM peers WHERE connectable = 'no'");
$count = mysql_num_rows($result);
print ("$count уникальных пиров с которыми нельзя соединиться.");
@mysql_free_result($result);
if (mysql_num_rows($res2) == 0)
print(" Со всеми пирами можно соединится! \n");
else
{
print("\n");
}
}
if ($HTTP_SERVER_VARS["REQUEST_METHOD"] == "POST"){
$dt = sqlesc(get_date_time());
$msg = $_POST['msg'];
if (!$msg)
stderr($tracker_lang['error'],"Введите текст сообщения");
$query = sql_query("SELECT distinct userid FROM peers WHERE connectable='no'");
while($dat=mysql_fetch_assoc($query)){
$subject = sqlesc("Трекер определил вас несоединябельного");
send_pm(0, $dat['userid'], get_date_time(), $subject, $msg);
//sql_query("INSERT INTO messages (sender, receiver, added, msg, subject) VALUES (0,$dat[userid] , '" . get_date_time() . "', " . sqlesc($msg) . ", " . $subject .")") or sqlerr(__FILE__,__LINE__);
}
sql_query("INSERT INTO notconnectablepmlog ( user , date ) VALUES ( $CURUSER[id], $dt)") or sqlerr(__FILE__,__LINE__);
header("Refresh: 0; url=findnotconnectable.php");
}
if ($_GET['action'] == "sendpm") {
stdhead("Пиры с которыми нельзя соединиться");
?>
Общее сообщение для пользователей с которыми нельзя соединиться
|
}
if ($_GET['action'] == ""){
stdhead("Лог общих сообщений для файрволеных");
$getlog = sql_query("SELECT * FROM `notconnectablepmlog` LIMIT 10");
print("Лог общих сообщений для файрволеных");
print("Послать общее сообщение для пользователей с которыми нельзя соединиться");
print("Показать пользователей с которыми нельзя соединиться");
print("Пожалуста не отправляйте ЛС слишком часто. Мы не хотим спамить пользователей, только дадим знать что с ними нельзя соединиться.");
print("Каждую неделю будет нормально. ");
print(" \n");
print("Пользователь | Дата | Прошло | ");
while($arr2 = mysql_fetch_assoc($getlog)){
$r2 = sql_query("SELECT username FROM users WHERE id=$arr2[user]") or sqlerr(__FILE__, __LINE__);
$a2 = mysql_fetch_assoc($r2);
$elapsed = get_elapsed_time(sql_timestamp_to_unix_timestamp($arr2[date]));
print("$a2[username] | $arr2[date] | $elapsed назад | ");
}
print(" ");
}
stdfoot();
?>
What is the meaning of the phrase in Russian ?I can not translation it into english
Code:
$subject = sqlesc("Трекер определил вас несоединябельного");
|