示例#1
0
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
require_once "p/libs/BazaDanych.class.php";
require_once "p/__config.php";
$DB = new BazaDanych($__dbHost, $__dbName, $__dbUser, $__dbPass);
$nick = mysql_real_escape_string($_REQUEST['q']);
if (strlen($nick) < 2) {
    exit;
}
$dane = $DB->pobierz_tabele_wynikow("SELECT id,nick FROM fs_players WHERE nick like '%{$nick}%' AND respect>25 AND respect<=1000 LIMIT 10");
foreach ($dane as $d) {
    print $d['nick'] . "|" . $d['id'] . "\n";
}
// EOF
示例#2
0
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

require_once("/home/fullserv/public_html/fsutil.i32.pl/checkin/__libs/BazaDanych.class.php");
require_once("/home/fullserv/public_html/fsutil.i32.pl/checkin/__libs/__config.php");
$RDB=new BazaDanych($__dbHost,$__dbName,$__dbUser,$__dbPass);

$donagrodzenia=$RDB->pobierz_tabele_wynikow("SELECT po.polecil,p2.nick polecil_nick,po.polecona,p1.nick polecona_nick,p1.active_server polecona_active,p2.active_server polecil_active
         FROM fs_polecenia po JOIN fs_players p1 ON p1.id=po.polecona JOIN fs_players p2 ON p2.id=po.polecil WHERE p1.respect>=2000 AND uniewazniony=0 AND rewarded=0");
	 
foreach ($donagrodzenia as $d){ 
	print "\n";
	print "Polecona: " . $d['polecona_nick'] . " ".  $d['polecona']." a: ".$d['polecona_active']."\n";
	print "Polecil: " . $d['polecil_nick'] . " " . $d['polecil']." a: ".$d['polecil_active']."\n";


	if (intval($d['polecona_active'])==0 && intval($d['polecil_active'])==0) {
	    $q1="UPDATE fs_players SET respect=respect+1000,vip=IF(vip>NOW(),vip,NOW())+INTERVAL 11 DAY WHERE id IN (".intval($d['polecil']).",".intval($d['polecona']).")";
		$RDB->zapytanie($q1);
	    print $q1."\n";

	    $q2="UPDATE fs_polecenia SET rewarded=1,reward_date=NOW() WHERE polecona=".intval($d['polecona'])." LIMIT 1";
		$RDB->zapytanie($q2);
		
示例#3
0
        $txt = print_r($_POST, 1) . "\r\n" . print_r($_REQUEST, 1) . "\r\n" . print_r($_SERVER, 1) . "\r\n" . print_r($_SESSION, 1) . "\r\n" . mysql_error() . "\r\n";
        sendmail("*****@*****.**", "[FSADM] fail at step 2", $txt);
        @session_destroy();
        die("Podano nieprawidlowy token uwietrzylniania! Wroc do strony glownej i zaloguj sie ponownie.");
    }
}
if (!isset($_SESSION['authkey'])) {
    Header("Location: /auth.html");
    exit;
} elseif (!isset($_SESSION['gakey'])) {
    Header("Location: /gauth.html");
    exit;
} else {
    $autentykacja = $RDB->wynik("SELECT level FROM fs_players WHERE level>=1 AND md5(CONCAT(nick,UPPER(password)))='" . $RDB->e($_SESSION['authkey']) . "'");
    if (!(intval($autentykacja) >= 1)) {
        @session_destroy();
        die("Wewnetrzny blad bezpieczenstwa! Zaloguj sie ponownie.");
    }
    $LVL = intval($autentykacja);
}
require_once "./p/libs/Smarty.class.php";
$smarty = new Smarty();
$smarty->template_dir = './p/tpl/';
$smarty->compile_dir = './p/tpl_c/';
$smarty->plugins_dir = './p/libs/plugins/';
if ($LVL < 1) {
    die("Nieprawidlowy poziom dostepu.");
}
$smarty->assign('LVL', $LVL);
$admini = $RDB->pobierz_tabele_wynikow("select id,nick,level from fs_players WHERE level>0 order by nick ASC", "id");
// EOF
示例#4
0
    $result = $RDB->pobierz_wyniki("select p.id,p.nick,p.last_skin,p.respect,p.skill,p.gamep,p.datetime_last,p.datetime_registered,p.ban_count,p.kick_count,p.login_count,p.kill_count,p.teamkill_count,p.death_count,p.suicide_count,p.bank_money,p.wallet_money,p.hitman_prize,IF(p.level>4,0,p.level) level,(p.vip>=NOW()) vip, (select id from fs_houses where ownerid={$pid} and paidTo>=DATE(NOW())) dom, (select g.id from fs_players_in_gangs pig JOIN fs_gangs g ON g.id=pig.id_gang where id_player={$pid}) gang_id, (select g.color from fs_players_in_gangs pig JOIN fs_gangs g ON g.id=pig.id_gang where id_player={$pid}) gang_color, (select g.name from fs_players_in_gangs pig JOIN fs_gangs g ON g.id=pig.id_gang where id_player={$pid}) gang_name, (select g.tag from fs_players_in_gangs pig JOIN fs_gangs g ON g.id=pig.id_gang where id_player={$pid}) gang_tag, (select pig.rank from fs_players_in_gangs pig JOIN fs_gangs g ON g.id=pig.id_gang where id_player={$pid}) gang_rank, (SELECT date_end FROM fs_bans WHERE player_banned = {$pid} AND date_end > NOW() AND date_created < NOW() LIMIT 1) ban_datetime FROM fs_players p WHERE p.id={$pid}");
    if ($_POST['opt'] == 'json' || !isset($_POST['opt'])) {
        print json_encode($result);
        exit;
    } else {
        if ($_POST['opt'] == 'xml') {
            /*header('Content-type: application/xml; charset="utf-8"');*/
            print "ERR: NOT IMPLEMENTED";
            exit;
        }
    }
} else {
    if ($_POST['action'] == 'gang') {
        $gid = intval($_POST['prm']);
        if ($gid > 20) {
            header("HTTP/1.0 420 Method Failure");
            exit;
        }
        $result = $RDB->pobierz_tabele_wynikow("SELECT p.id,p.nick,p.respect,p.skill,p.datetime_last,pig.rank,pig.join_date FROM fs_players_in_gangs pig JOIN fs_players p ON p.id=pig.id_player WHERE pig.id_gang={$gid} ORDER  BY pig.rank DESC");
        if ($_POST['opt'] == 'json' || !isset($_POST['opt'])) {
            print json_encode($result);
            exit;
        } else {
            if ($_POST['opt'] == 'xml') {
                /*header('Content-type: application/xml; charset="utf-8"');*/
                print "ERR: NOT IMPLEMENTED";
                exit;
            }
        }
    }
}