Пример #1
0
<?php

if (!isset($website)) {
    header('HTTP/1.1 404 Not Found');
    die;
}
if (!empty($_GET["common_games"]) and isset($_SESSION["bnet_username"])) {
    $HomeTitle = "Common Games";
    $HomeDesc = os_strip_quotes($lang["game_archive"]);
    $HomeKeywords = strtolower(os_strip_quotes($lang["game_archive"])) . ',' . $HomeKeywords;
    $MenuClass["games"] = "active";
    $User1 = strip_tags(trim($_SESSION["bnet_username"]));
    $User2 = safeEscape(trim($_GET["common_games"]));
    $sth = $db->prepare("SELECT COUNT(*) FROM " . OSDB_GAMES . " as g\n\tLEFT JOIN " . OSDB_GP . " as gp ON gp.gameid = g.id AND gp.name=:user1 \n\tLEFT JOIN " . OSDB_GP . " as gp2 ON gp2.gameid = gp.gameid AND gp2.name=:user2\n\tWHERE gp.name =:user1  AND gp2.name =:user2\n\tLIMIT 1");
    $sth->bindValue(':user1', $User1, PDO::PARAM_STR);
    $sth->bindValue(':user2', $User2, PDO::PARAM_STR);
    $result = $sth->execute();
    $r = $sth->fetch(PDO::FETCH_NUM);
    $numrows = $r[0];
    $result_per_page = $GamesPerPage;
    $draw_pagination = 0;
    include 'inc/pagination.php';
    $draw_pagination = 1;
    $sth = $db->prepare("SELECT g.gamename, g.id, g.map, g.datetime, g.duration, g.gamestate, dg.winner\n\tFROM " . OSDB_GAMES . " as g\n\tLEFT JOIN " . OSDB_GP . " as gp ON gp.gameid = g.id AND gp.name=:user1 \n\tLEFT JOIN " . OSDB_GP . " as gp2 ON gp2.gameid = gp.gameid AND gp2.name=:user2\n\tLEFT JOIN " . OSDB_DG . " as dg ON dg.gameid = g.id\n\tWHERE gp.name =:user1  AND gp2.name =:user2\n\tORDER BY g.id DESC\n\tLIMIT {$offset}, {$rowsperpage}");
    $sth->bindValue(':user1', $User1, PDO::PARAM_STR);
    $sth->bindValue(':user2', $User2, PDO::PARAM_STR);
    $result = $sth->execute();
    $CommonGames = array();
    $c = 0;
    while ($row = $sth->fetch(PDO::FETCH_ASSOC)) {
        $CommonGames[$c]["gamename"] = $row["gamename"];
Пример #2
0
<?php

if (!isset($website)) {
    header('HTTP/1.1 404 Not Found');
    die;
}
$HomeTitle = $lang["admins"];
$HomeDesc = $lang["admins"];
$HomeKeywords = strtolower(os_strip_quotes($lang["admins"])) . ',' . $HomeKeywords;
$MenuClass["admins"] = "active";
$sth = $db->prepare("SELECT COUNT(*) FROM " . OSDB_USERS . " WHERE user_level>=4 LIMIT 1");
$result = $sth->execute();
$r = $sth->fetch(PDO::FETCH_NUM);
$numrows = $r[0];
$result_per_page = $TopPlayersPerPage;
$draw_pagination = 0;
include 'inc/pagination.php';
$draw_pagination = 1;
$c = 0;
$AdminsData = array();
$sth = $db->prepare("SELECT u.user_id, u.user_name, u.admin_realm, u.user_level, u.user_last_login \n\tFROM " . OSDB_USERS . " as u\n\tWHERE u.user_level>=4 ORDER BY u.user_level DESC, LOWER(u.user_name) ASC LIMIT {$offset}, {$rowsperpage}");
$result = $sth->execute();
while ($row = $sth->fetch(PDO::FETCH_ASSOC)) {
    $AdminsData[$c]["id"] = (int) $row["user_id"];
    $AdminsData[$c]["name"] = $row["user_name"];
    $AdminsData[$c]["server"] = $row["admin_realm"];
    $AdminsData[$c]["level"] = $row["user_level"];
    $AdminsData[$c]["last_login"] = date(OS_DATE_FORMAT, $row["user_last_login"]);
    $c++;
}
Пример #3
0
function OS_DisplayHeroesData($original = "", $desc = "", $stats = "", $summary = "", $skills = "")
{
    ?>
	<div style="display:none;" id="hero<?php 
    echo $original;
    ?>
description"><?php 
    echo $desc;
    ?>
</div>
	<div style="display:none;" id="hero<?php 
    echo $original;
    ?>
stats"><?php 
    echo $stats;
    ?>
</div>
	<div style="display:none;" id="hero<?php 
    echo $original;
    ?>
summary"><?php 
    echo $summary;
    ?>
</div>
	<div style="display:none;" id="hero<?php 
    echo $original;
    ?>
skills"><?php 
    echo $skills;
    ?>
</div>
	
	<a href="<?php 
    echo OS_HOME;
    ?>
?hero=<?php 
    echo $original;
    ?>
"><img onmouseover="OS_HeroInfo('<?php 
    echo os_strip_quotes($original);
    ?>
')" width="40" height="40" src="<?php 
    echo OS_HOME;
    ?>
img/heroes/<?php 
    echo $original;
    ?>
.gif" alt="<?php 
    echo $original;
    ?>
" class="HeroInfoIconSmall heroIcon" /></a>
  <?php 
}
Пример #4
0
<?php

if (!isset($website)) {
    header('HTTP/1.1 404 Not Found');
    die;
}
$HomeTitle = $lang["safelist"];
$HomeDesc = $lang["safelist"];
$HomeKeywords = strtolower(os_strip_quotes($lang["safelist"])) . ',' . $HomeKeywords;
$MenuClass["bans"] = "safelist";
$sth = $db->prepare("SELECT COUNT(*) FROM  " . OSDB_SAFELIST . " WHERE id>=1 LIMIT 1");
$result = $sth->execute();
$r = $sth->fetch(PDO::FETCH_NUM);
$numrows = $r[0];
$result_per_page = $TopPlayersPerPage;
$draw_pagination = 0;
include 'inc/pagination.php';
$draw_pagination = 1;
$sth = $db->prepare("SELECT * FROM  " . OSDB_SAFELIST . " WHERE id>=1 LIMIT {$offset}, {$rowsperpage}");
$result = $sth->execute();
$c = 0;
$SafelistData = array();
while ($row = $sth->fetch(PDO::FETCH_ASSOC)) {
    $SafelistData[$c]["id"] = (int) $row["id"];
    $SafelistData[$c]["server"] = $row["server"];
    $SafelistData[$c]["name"] = $row["name"];
    $SafelistData[$c]["voucher"] = $row["voucher"];
    $c++;
}
Пример #5
0
 $sql = " ";
 //if (os_is_logged() AND $_SESSION["level"]>=9 ) $sql = " ";
 //else $sql = " AND botid = 1";
 if (isset($_POST["alias_id"]) and is_numeric($_POST["alias_id"])) {
     $sql .= " AND alias_id = '" . (int) $_POST["alias_id"] . "' OR alias_id>=200";
 }
 $sth = $db->prepare("SELECT * FROM " . OSDB_GAMESTATUS . " \n\tWHERE gamestatus<=2 \n\tAND gametime>=NOW()-INTERVAL 2 hour\n\t{$sql}\n\tGROUP BY gameid\n    ORDER BY gamestatus ASC, gametime DESC \n\t{$LIMIT}");
 $result = $sth->execute();
 $IDS = array();
 $c = 0;
 while ($row = $sth->fetch(PDO::FETCH_ASSOC)) {
     $botID = $row["botid"];
     $chatID = $row["gameid"];
     $GameStatus = $row["gamestatus"];
     $GameTime = $row["gametime"];
     $GameName = os_strip_quotes($row["gamename"]);
     if ($chatID >= 1) {
         $IDS[$c]["chatid"] = $chatID;
         if ($GameStatus <= 1) {
             $pr = "";
             $gamebutton = " LobbyButton";
         }
         if ($GameStatus == 2) {
             $pr = "G";
             $gamebutton = " GameButton";
         }
         $IDS[$c]["chatid"] = $chatID;
         $IDS[$c]["status"] = $pr;
         $IDS[$c]["button"] = $gamebutton;
         $IDS[$c]["gn"] = $GameName;
         $IDS[$c]["botid"] = $botID;
Пример #6
0
 //if (os_is_logged() AND $_SESSION["level"]>=9 ) $sql = " ";
 //else $sql = " AND botid = 1";
 $sth = $db->prepare("SELECT * FROM " . OSDB_GAMESTATUS . " WHERE gamestatus<=2 \n\t AND gametime>=NOW()-INTERVAL 2 hour\n\t {$sql}\n     ORDER BY gamestatus ASC, gametime DESC {$LIMIT}");
 $result = $sth->execute();
 $IDS = array();
 $c = 0;
 $GameName = "";
 $GameNameSelected = "";
 while ($row = $sth->fetch(PDO::FETCH_ASSOC)) {
     $botID = $row["botid"];
     $chatID = $row["gameid"];
     $GameStatus = $row["gamestatus"];
     $GameTime = $row["gametime"];
     $GameName = os_strip_quotes($row["gamename"]);
     if (isset($_GET["gameid"]) and is_numeric($_GET["gameid"]) and $chatID == $_GET["gameid"]) {
         $GameNameSelected = os_strip_quotes($row["gamename"]);
     }
     if ($chatID >= 1) {
         $IDS[$c]["chatid"] = $chatID;
         if ($GameStatus <= 1) {
             $pr = "Lobby";
             $gamebutton = " LobbyButton";
         }
         if ($GameStatus == 2) {
             $pr = "Game";
             $gamebutton = " GameButton";
         }
         $IDS[$c]["chatid"] = $chatID;
         $IDS[$c]["status"] = $pr;
         $IDS[$c]["button"] = $gamebutton;
         $IDS[$c]["gn"] = $GameName;
Пример #7
0
} else {
    $SelectedHero = '';
    $sql = '';
}
$sth = $db->prepare("SELECT * FROM " . OSDB_HEROES . " \n\tWHERE original!='' GROUP BY (description) ORDER BY (description) ASC ");
$result = $sth->execute();
$c = 0;
$ListHeroesData = array();
while ($row2 = $sth->fetch(PDO::FETCH_ASSOC)) {
    $ListHeroesData[$c]["hid"] = $row2["heroid"];
    $ListHeroesData[$c]["original"] = $row2["original"];
    $ListHeroesData[$c]["description"] = $row2["description"];
    if ($SelectedHero == $ListHeroesData[$c]["original"]) {
        $ListHeroesData[$c]["selected"] = 'selected="selected" style="background-color: yellow"';
        $HomeTitle = $lang["guides"] . " | " . $row2["description"];
        $HomeDesc = $lang["guides"] . " - " . os_strip_quotes($row2["description"]);
    } else {
        $ListHeroesData[$c]["selected"] = '';
    }
    $c++;
}
$sth = $db->prepare("SELECT COUNT(*) FROM " . OSDB_GUIDES . " as g WHERE g.id>=1 {$sql} LIMIT 1");
if (!empty($SelectedHero)) {
    $sth->bindValue(':hid', $SelectedHero, PDO::PARAM_STR);
}
$result = $sth->execute();
$r = $sth->fetch(PDO::FETCH_NUM);
$numrows = $r[0];
$result_per_page = $HeroesPerPage;
$draw_pagination = 0;
$total_comments = $numrows;
Пример #8
0
} else {
    //get hero data from database
    $sth = $db->prepare("SELECT * FROM " . OSDB_HEROES . " WHERE heroid = :heroid LIMIT 1");
    $sth->bindValue(':heroid', $heroid, PDO::PARAM_STR);
    $result = $sth->execute();
    $c = 0;
    $HeroData = array();
    $row = $sth->fetch(PDO::FETCH_ASSOC);
    $HeroData[$c]["id"] = (int) $row["heroid"];
    $HeroData[$c]["original"] = $row["original"];
    $HeroData[$c]["description"] = $row["description"];
    $HeroData[$c]["summary"] = convEnt($row["summary"]);
    $HeroData[$c]["stats"] = convEnt($row["stats"]);
    $HeroData[$c]["skills"] = convEnt($row["skills"]);
    $HomeTitle = $row["description"];
    $HomeDesc = os_strip_quotes($row["summary"]);
    $HomeKeywords = strtolower(os_strip_quotes($row["description"])) . ',' . $HomeKeywords;
}
if ($GuidesPage == 1) {
    $sth = $db->prepare("SELECT * FROM " . OSDB_GUIDES . " WHERE hid = :heroid ");
    $sth->bindValue(':heroid', $heroid, PDO::PARAM_STR);
    $result = $sth->execute();
    $c = 0;
    $HeroDataGuides = array();
    while ($row = $sth->fetch(PDO::FETCH_ASSOC)) {
        $HeroDataGuides[$c]["id"] = $row["id"];
        $HeroDataGuides[$c]["title"] = $row["title"];
        $HeroDataGuides[$c]["link"] = $row["link"];
        $c++;
    }
}
Пример #9
0
 $GameData[$c]["spoofedrealm"] = $row["spoofedrealm"];
 $GameData[$c]["level"] = $row["level"];
 $GameData[$c]["gold"] = $row["gold"];
 $GameData[$c]["item1"] = $row["item1"];
 $GameData[$c]["item2"] = $row["item2"];
 $GameData[$c]["item3"] = $row["item3"];
 $GameData[$c]["item4"] = $row["item4"];
 $GameData[$c]["item5"] = $row["item5"];
 $GameData[$c]["item6"] = $row["item6"];
 $GameData[$c]["itemname1"] = os_strip_quotes($row["itemname1"]);
 $GameData[$c]["itemname2"] = os_strip_quotes($row["itemname2"]);
 $GameData[$c]["itemname3"] = os_strip_quotes($row["itemname3"]);
 $GameData[$c]["itemname4"] = os_strip_quotes($row["itemname4"]);
 $GameData[$c]["itemname5"] = os_strip_quotes($row["itemname5"]);
 $GameData[$c]["itemname6"] = os_strip_quotes($row["itemname6"]);
 $GameData[$c]["description"] = os_strip_quotes($row["description"]);
 if (empty($row["name"])) {
     $row["name"] = '&nbsp;';
 }
 if (!isset($MostCD)) {
     $MostCD = $row["name"];
     $temp_cd = $row["creepdenies"];
     $PlayerCD = $row["creepdenies"];
     $MostCDID = $row["userid"];
 }
 if (!isset($MostCK)) {
     $MostCK = $row["name"];
     $temp_ck = $row["creepkills"];
     $PlayerCK = $row["creepkills"];
     $MostCKID = $row["userid"];
 }
Пример #10
0
<?php

if (!isset($website)) {
    header('HTTP/1.1 404 Not Found');
    die;
}
$MenuClass["misc"] = "active";
$itemID = safeEscape($_GET["item"]);
$sth = $db->prepare("SELECT * FROM " . OSDB_ITEMS . " WHERE itemid = :itemid ");
$sth->bindValue(':itemid', $itemID, PDO::PARAM_STR);
$result = $sth->execute();
$c = 0;
$ItemData = array();
$row = $sth->fetch(PDO::FETCH_ASSOC);
$ItemData[$c]["itemid"] = $row["itemid"];
$ItemData[$c]["name"] = $row["name"];
$ItemData[$c]["shortname"] = $row["shortname"];
$ItemData[$c]["item_info"] = convEnt($row["item_info"]);
$ItemData[$c]["itemid"] = $row["itemid"];
$ItemData[$c]["icon"] = $row["icon"];
$c++;
$HomeTitle = $row["shortname"];
$HomeDesc = strip_tags(os_strip_quotes($row["item_info"]));
$HomeDesc = str_replace("\n", " ", limit_words($HomeDesc, 42));
$HomeKeywords = strtolower(os_strip_quotes($row["shortname"])) . ',' . $HomeKeywords;
Пример #11
0
<?php

if (!isset($website)) {
    header('HTTP/1.1 404 Not Found');
    die;
}
$HomeTitle = $lang["warn"];
$HomeDesc = $lang["warn"];
$HomeKeywords = strtolower(os_strip_quotes($lang["warn"])) . ',' . $HomeKeywords;
$MenuClass["warn"] = "active";
if (isset($_GET["search_bans"]) and strlen($_GET["search_bans"]) >= 2) {
    $search_bans = safeEscape($_GET["search_bans"]);
    $sql = "AND (name) LIKE ? ";
} else {
    $sql = "";
}
$sth = $db->prepare("SELECT COUNT(*) FROM " . OSDB_BANS . " WHERE id>=1 AND warn = 1 {$sql} LIMIT 1");
if (!empty($sql)) {
    $sth->bindValue(1, "%" . strtolower($search_bans) . "%", PDO::PARAM_STR);
}
$result = $sth->execute();
$r = $sth->fetch(PDO::FETCH_NUM);
$numrows = $r[0];
$result_per_page = $TopPlayersPerPage;
$draw_pagination = 0;
include 'inc/pagination.php';
$draw_pagination = 1;
$sth = $db->prepare("SELECT * FROM " . OSDB_BANS . " WHERE id>=1 {$sql} AND warn = 1 LIMIT {$offset}, {$rowsperpage}");
if (!empty($sql)) {
    $sth->bindValue(1, "%" . strtolower($search_bans) . "%", PDO::PARAM_STR);
}