Собственный перевод HLXL:CE 1.6.19

Тема в разделе "HLstatsX:CE", создана пользователем Danyas, 3 сен 2014.

  1. Danyas

    Danyas Спасибо, браток © yand3xmail Модератор

    Сообщения:
    1.712
    Симпатии:
    451
    В шапке я буду вылаживать собственный перевод HLX
    Жду корректировок, когда закончу всё делать то положу в архив, а пока-что либо заменяйте по одному либо ждите.

    PHP:
    <?php
        
    if ( !defined('IN_HLSTATS') )
    {
        die(
    'Do not access this file directly.');
    }
        
        
    $action =  valid_request($_GET['action'], 0)
            or 
    error('ID действия не указан.');

        
    $action_escaped=$db->escape($action);
        
    $game_escaped=$db->escape($game);
        
        
    $db->query("
            SELECT
                for_PlayerActions,for_PlayerPlayerActions, description
            FROM
                hlstats_Actions
            WHERE
                code='
    {$action_escaped}'
                AND game='
    {$game_escaped}'
        "
    );
        
        if (
    $db->num_rows() != 1)
        {
            
    $act_name ucfirst($action);
            
    $actiondata['for_PlayerActions']=1// dummy these out, this should never happen?
            
    $actiondata['for_PlayerPlayerActions']=0;
        }
        else
        {
            
    $actiondata $db->fetch_array();
            
    $db->free_result();
            
    $act_name $actiondata['description'];
        }
        
        
    $db->query("SELECT name FROM hlstats_Games WHERE code='{$game_escaped}'");
        if (
    $db->num_rows() != 1)
            
    error('Invalid or no game specified.');
        else
            list(
    $gamename) = $db->fetch_row();
            
        
    pageHeader(
            array(
    $gamename'Информация о событии'$act_name),
            array(
                
    $gamename=>$g_options['scripturl'] . "?game=$game",
                
    'Action Statistics'=>$g_options['scripturl'] . "?mode=actions&game=$game",
                
    'Информация о событии'=>''
            
    ),
            
    $act_name
        
    );
        

        
    $table = new Table(
            array(
                new 
    TableColumn(
                    
    'playerName',
                    
    'Игрок',
                    
    'width=45&align=left&flag=1&link=' urlencode('mode=playerinfo&amp;player=%k'
                ),
                new 
    TableColumn(
                    
    'obj_count',
                    
    'Получено',
                    
    'width=25&align=right'
                
    ),
                new 
    TableColumn(
                    
    'obj_bonus',
                    
    'Общий бонус к очкам',
                    
    'width=25&align=right&sort=no'
                
    )
            ),
            
    'playerId',
            
    'obj_count',
            
    'playerName',
            
    true,
            
    40
        
    );

        if (
    $actiondata['for_PlayerActions']==1)
        {    
            
    $result $db->query("
                SELECT
                    hlstats_Events_PlayerActions.playerId,
                    hlstats_Players.lastName AS playerName,
                    hlstats_Players.flag as flag,
                    COUNT(hlstats_Events_PlayerActions.id) AS obj_count,
                    COUNT(hlstats_Events_PlayerActions.id) * hlstats_Actions.reward_player AS obj_bonus
                FROM
                    hlstats_Events_PlayerActions, hlstats_Players, hlstats_Actions
                WHERE
                    hlstats_Actions.code = '
    {$action_escaped}' AND
                    hlstats_Players.game = '
    {$game_escaped}' AND
                    hlstats_Players.playerId = hlstats_Events_PlayerActions.playerId AND
                    hlstats_Events_PlayerActions.actionId = hlstats_Actions.id AND
                    hlstats_Players.hideranking = '0'
                GROUP BY
                    hlstats_Events_PlayerActions.playerId
                ORDER BY
                    
    $table->sort $table->sortorder,
                    
    $table->sort2 $table->sortorder
                LIMIT 
    $table->startitem,$table->numperpage
            "
    );
            
            
    $resultCount $db->query("
                SELECT
                    COUNT(DISTINCT hlstats_Events_PlayerActions.playerId),
                    COUNT(hlstats_Events_PlayerActions.Id)
                FROM
                    hlstats_Events_PlayerActions, hlstats_Players, hlstats_Actions
                WHERE
                    hlstats_Actions.code = '
    {$action_escaped}' AND
                    hlstats_Players.game = '
    {$game_escaped}' AND
                    hlstats_Players.playerId = hlstats_Events_PlayerActions.playerId AND
                    hlstats_Events_PlayerActions.actionId = hlstats_Actions.id AND
                    hlstats_Players.hideranking = '0'
            "
    );
        }
        if(
    $actiondata['for_PlayerPlayerActions']==1)
        {
            
    $result $db->query("
                SELECT
                    hlstats_Events_PlayerPlayerActions.playerId,
                    hlstats_Players.lastName AS playerName,
                    hlstats_Players.flag as flag,
                    COUNT(hlstats_Events_PlayerPlayerActions.id) AS obj_count,
                    COUNT(hlstats_Events_PlayerPlayerActions.id) * hlstats_Actions.reward_player AS obj_bonus
                FROM
                    hlstats_Events_PlayerPlayerActions, hlstats_Players, hlstats_Actions
                WHERE
                    hlstats_Actions.code = '
    {$action_escaped}' AND
                    hlstats_Players.game = '
    {$game_escaped}' AND
                    hlstats_Players.playerId = hlstats_Events_PlayerPlayerActions.playerId AND
                    hlstats_Events_PlayerPlayerActions.actionId = hlstats_Actions.id AND
                    hlstats_Players.hideranking = '0'
                GROUP BY
                    hlstats_Events_PlayerPlayerActions.playerId
                ORDER BY
                    
    $table->sort $table->sortorder,
                    
    $table->sort2 $table->sortorder
                LIMIT 
    $table->startitem,$table->numperpage
            "
    );
        
            
    $resultCount $db->query("
                SELECT
                    COUNT(DISTINCT hlstats_Events_PlayerPlayerActions.playerId),
                    COUNT(hlstats_Events_PlayerPlayerActions.Id)
                FROM
                    hlstats_Events_PlayerPlayerActions, hlstats_Players, hlstats_Actions
                WHERE
                    hlstats_Actions.code = '
    {$action_escaped}' AND
                    hlstats_Players.game = '
    {$game_escaped}' AND
                    hlstats_Players.playerId = hlstats_Events_PlayerPlayerActions.playerId AND
                    hlstats_Events_PlayerPlayerActions.actionId = hlstats_Actions.id AND
                    hlstats_Players.hideranking = '0'
            "
    );
        }    
            
        list(
    $numitems$totalact) = $db->fetch_row($resultCount);
      
        if (
    $totalact == 0)
        {
            
    $result $db->query("
                SELECT
                    hlstats_Events_TeamBonuses.playerId,
                    hlstats_Players.lastName AS playerName,
                    hlstats_Players.flag as flag,
                    COUNT(hlstats_Events_TeamBonuses.id) AS obj_count,
                    COUNT(hlstats_Events_TeamBonuses.id) * hlstats_Actions.reward_player AS obj_bonus
                FROM
                    hlstats_Events_TeamBonuses, hlstats_Players, hlstats_Actions
                WHERE
                    hlstats_Actions.code = '
    {$action_escaped}' AND
                    hlstats_Players.game = '
    {$game_escaped}' AND
                    hlstats_Players.playerId = hlstats_Events_TeamBonuses.playerId AND
                    hlstats_Events_TeamBonuses.actionId = hlstats_Actions.id AND
                    hlstats_Players.hideranking = '0'
                GROUP BY
                    hlstats_Events_TeamBonuses.playerId
                ORDER BY
                    
    $table->sort $table->sortorder,
                    
    $table->sort2 $table->sortorder
                LIMIT 
    $table->startitem,$table->numperpage
            "
    );
        
            
    $resultCount $db->query("
                SELECT
                    COUNT(DISTINCT hlstats_Events_TeamBonuses.playerId),
                    COUNT(hlstats_Events_TeamBonuses.Id)
                FROM
                    hlstats_Events_TeamBonuses, hlstats_Players, hlstats_Actions
                WHERE
                    hlstats_Actions.code = '
    {$action_escaped}' AND
                    hlstats_Players.game = '
    {$game_escaped}' AND
                    hlstats_Players.playerId = hlstats_Events_TeamBonuses.playerId AND
                    hlstats_Events_TeamBonuses.actionId = hlstats_Actions.id AND
                    hlstats_Players.hideranking = '0'
            "
    );
            list(
    $numitems$totalact) = $db->fetch_row($resultCount);    
        }
    ?>
    <div class="block">
        <?php printSectionTitle('Информация о событии'); ?>

        <div class="subblock">
            <div style="float:left;">
                Общее количество <strong><?php echo $act_name?><?php echo number_format(intval($totalact)); ?></strong> (За последние <?php echo $g_options['DeleteDays']; ?> дней)
            </div>
            <div style="float:right;">
                Вернуться к  <a href="<?php echo $g_options['scripturl'] . "?mode=actions&amp;game=$game"?>">Статистике событий</a>
            </div>
        </div>
        <div style="clear:both;padding:2px;"></div>
    </div>
    <?php
        $table
    ->draw($result$numitems95'center');

        if (
    $actiondata['for_PlayerPlayerActions'] == 1)
        {
            
    $table = new Table(
            array(
                new 
    TableColumn(
                    
    'playerName',
                    
    'Игрок',
                    
    'width=45&align=left&flag=1&link=' urlencode('mode=playerinfo&amp;player=%k'
                ),
                new 
    TableColumn(
                    
    'obj_count',
                    
    'Стали жертвами',
                    
    'width=25&align=right'
                
    ),
                new 
    TableColumn(
                    
    'obj_bonus',
                    
    'Общий бонус к очкам',
                    
    'width=25&align=right&sort=no'
                
    )
            ),
            
    'victimId',
            
    'obj_count',
            
    'playerName',
            
    true,
            
    40,
            
    'vpage'
            
    );
        
            
    $result $db->query("
                SELECT
                    hlstats_Events_PlayerPlayerActions.victimId,
                    hlstats_Players.lastName AS playerName,
                    hlstats_Players.flag as flag,
                    COUNT(hlstats_Events_PlayerPlayerActions.id) AS obj_count,
                    COUNT(hlstats_Events_PlayerPlayerActions.id) * hlstats_Actions.reward_player * -1 AS obj_bonus
                FROM
                    hlstats_Events_PlayerPlayerActions, hlstats_Players, hlstats_Actions
                WHERE
                    hlstats_Actions.code = '
    {$action_escaped}' AND
                    hlstats_Players.game = '
    {$game_escaped}' AND
                    hlstats_Players.playerId = hlstats_Events_PlayerPlayerActions.victimId AND
                    hlstats_Events_PlayerPlayerActions.actionId = hlstats_Actions.id AND
                    hlstats_Players.hideranking = '0'
                GROUP BY
                    hlstats_Events_PlayerPlayerActions.victimId
                ORDER BY
                    
    $table->sort $table->sortorder,
                    
    $table->sort2 $table->sortorder
                LIMIT 
    $table->startitem,$table->numperpage
            "
    );
        
            
    $resultCount $db->query("
                SELECT
                    COUNT(DISTINCT hlstats_Events_PlayerPlayerActions.victimId),
                    COUNT(hlstats_Events_PlayerPlayerActions.Id)
                FROM
                    hlstats_Events_PlayerPlayerActions, hlstats_Players, hlstats_Actions
                WHERE
                    hlstats_Actions.code = '
    {$action_escaped}' AND
                    hlstats_Players.game = '
    {$game_escaped}' AND
                    hlstats_Players.playerId = hlstats_Events_PlayerPlayerActions.victimId AND
                    hlstats_Events_PlayerPlayerActions.actionId = hlstats_Actions.id AND
                    hlstats_Players.hideranking = '0'
            "
    );
        
            list(
    $numitems$totalact) = $db->fetch_row($resultCount);
    ?>
    <div class="block">
        <a name="victims"><?php printSectionTitle("Жертвы"); ?></a>
        <div class="subblock">
            <div style="float:left;">
                <strong>Жертвы <?php echo $act_name?></strong> (за последние <?php echo $g_options['DeleteDays']; ?> дней)
            </div>
        </div>
        <div style="clear:both;padding:2px;"></div>
    </div>
    <?php        
            $table
    ->draw($result$numitems95'center');
        }
    ?>
    </div>
    PHP:
    <?php
        
    if ( !defined('IN_HLSTATS') )
        {
            die(
    'Do not access this file directly.');
        }
        
    $db->query
        
    ("
            SELECT
                hlstats_Games.name
            FROM
                hlstats_Games
            WHERE
                hlstats_Games.code = '
    $game'
        "
    );
        if (
    $db->num_rows() < 1error("Не найдено игры '$game'.");
        list(
    $gamename) = $db->fetch_row();
        
    $db->free_result();
        
    pageHeader
        
    (
            array (
    $gamename'Статистика событий'),
            array (
    $gamename=>"%s?game=$game"'Статистика событий'=>'')
        );
        
    $tblPlayerActions = new Table
        
    (
            array
            (
                new 
    TableColumn
                
    (
                    
    'description',
                    
    'Действие',
                    
    'width=45&link=' urlencode('mode=actioninfo&amp;action=%k&amp;game='.$game)
                ),
                new 
    TableColumn
                
    (
                    
    'obj_count',
                    
    'Получено',
                    
    'width=25&align=right&append=+раз'
                
    ),
                new 
    TableColumn
                
    (
                    
    'obj_bonus',
                    
    'Награда',
                    
    'width=25&align=right'
                
    )
            ),
            
    'code',
            
    'obj_count',
            
    'description',
            
    true,
            
    9999,
            
    'obj_page',
            
    'obj_sort',
            
    'obj_sortorder'
        
    );
        
    $result $db->query
        
    ("
            SELECT
                hlstats_Actions.code,
                hlstats_Actions.description,
                hlstats_Actions.count AS obj_count,
                hlstats_Actions.reward_player AS obj_bonus
            FROM
                hlstats_Actions
            WHERE
                hlstats_Actions.game = '
    $game'
                AND hlstats_Actions.count > 0
            GROUP BY
                hlstats_Actions.id
            ORDER BY
                
    $tblPlayerActions->sort $tblPlayerActions->sortorder,
                
    $tblPlayerActions->sort2 $tblPlayerActions->sortorder
        "
    );
    ?>
    <div class="block">
        <?php printSectionTitle('Статистика событий'); ?>
        <div class="subblock">
            <?php
                $db
    ->query
                
    ("
                    SELECT
                        SUM(count)
                    FROM
                        hlstats_Actions
                    WHERE
                        hlstats_Actions.game = '
    $game'
                "
    );
                list(
    $totalactions) = $db->fetch_row();
                
    ?>Общее количество событий: <strong><?php echo number_format($totalactions); ?></strong>
        </div><br /><br />
        <?php
            $tblPlayerActions
    ->draw($result$db->num_rows($result), 95);
        
    ?><br /><br />
        <div class="subblock">
            <div style="float:right;">
                Перейти к: <a href="<?php echo $g_options['scripturl'] . "?game=$game"?>"><?php echo $gamename?></a>
            </div>
        </div>
    </div>
    не перевожу за ненадобностью
    PHP:
    <?php
        
    if ( !defined('IN_HLSTATS') ) { die('Do not access this file directly.'); }
        
    pageHeader(array('Админ'), array('Админ' => ''));
    ?>
    <div class="block">
        <?php printSectionTitle('Требуется авторизация'); ?>
        <div class="subblock">
        <?php
        
    if ($this->error)
        {
    ?>
        <img src="<?php echo IMAGE_PATH?>/warning.gif" style="padding-right:5px;">
        <?php
            
    echo "<span class=\"fTitle\" style=\"font-weight:bold;\">$this->error</span><br /><br />";
        }
    ?>
            <div style="float:left;margin-left:40px;">
            <form method="post" name="auth">
        
                <table class="data-table">
                    <tr style="vertical-align:middle;">
                        <td class="bg1" style="width:45%;border:0;">Логин:</td>
                        <td class="bg1" style="width:55%;border:0;"><input type="text" name="authusername" size="20" maxlength="16" value="<?php echo $this->username?>" class="textbox"></td>
                    </tr>
                    <tr style="vertical-align:middle;">
                        <td class="bg1" style="width:45%;border:0;">Пароль:</td>
                        <td class="bg1" style="width:55%;border:0;"><input type="password" name="authpassword" size="20" maxlength="16" value="<?php echo $this->password?>" class="textbox"></td>
                    </tr>
                    <tr>
                        <td class="bg1" style="border:0;">&nbsp;</td>
                        <td class="bg1" style="border:0;"><input type="submit" value=" Login " id="authsubmit" class="submit"></td>
                    </tr>
                
                </table><br />
                    
                Пожалуйста, убедитесь, что файлы cookie включен в настройках безопасности браузера.<br />
                <!-- <strong>Note</strong> Do not select "Save my password" if other people will use this computer.</span>    <br /><br /> -->
            </form>
            </div>
        </div>
    </div>
    PHP:
    <?php
        
        
    if ( !defined('IN_HLSTATS') )
        {
            die(
    'Do not access this file directly.');
        }
        
        
    // Awards Info Page
        
        
    $db->query("SELECT name FROM hlstats_Games WHERE code='$game'");
        if (
    $db->num_rows() < 1error("No such game '$game'.");
        
        list(
    $gamename) = $db->fetch_row();
        
    $db->free_result();
        
        
    $type valid_request($_GET['type']);
        
    $tab valid_request($_GET['tab']);
        
        if (
    $type == 'ajax' )
        {
            
    $tabs explode('|'preg_replace('[^a-z]'''$tab));
            
            foreach ( 
    $tabs as $tab )
            {
                if ( 
    file_exists(PAGE_PATH '/awards_' $tab '.php') )
                {
                    @include(
    PAGE_PATH '/awards_' $tab '.php');
                }
            }
            exit;
        }
        
    pageHeader(
            array(
    $gamename'Информация о наградах'),
            array(
    $gamename=>"%s?game=$game"'Информация о наградах'=>'')
        );
    ?>

    <?php if ($g_options['playerinfo_tabs']=='1') { ?>

    <div id="main">
        <ul class="subsection_tabs" id="tabs_submenu">
            <li><a href="#" id="tab_daily">Ежедневные награды</a></li>
            <li><a href="#" id="tab_global">Глобальные награды</a></li>
            <li><a href="#" id="tab_ranks">Уровни</a></li>
            <li><a href="#" id="tab_ribbons">Медали</a></li>
        </ul>
    <br />
    <div id="main_content"></div>
    <?php
    if ($tab)
    {
        
    $defaulttab $tab;
    }
    else
    {
        
    $defaulttab 'daily';
    }
    echo 
    "<script type=\"text/javascript\">
        new Tabs($('main_content'), $$('#main ul.subsection_tabs a'), {
            'mode': 'awards',
            'game': '
    $game',
            'loadingImage': '"
    .IMAGE_PATH."/ajax.gif',
            'defaultTab': '
    $defaulttab'
        });"
    ?>
    </script>

    </div>


    <?php } else {

        echo 
    "\n<div id=\"daily\">\n";
        include 
    PAGE_PATH.'/awards_daily.php';
        echo 
    "\n</div>\n";

        echo 
    "\n<div id=\"global\">\n";
        include 
    PAGE_PATH.'/awards_global.php'
        echo 
    "\n</div>\n";

        echo 
    "\n<div id=\"ranks\">\n";
        include 
    PAGE_PATH.'/awards_ranks.php';
        echo 
    "\n</div>\n";

        echo 
    "\n<div id=\"ribbons\">\n";
        include 
    PAGE_PATH.'/awards_ribbons.php';
        echo 
    "\n</div>\n";

    }
    ?>
    PHP:
    <?php

    if ( !defined('IN_HLSTATS') )
    {
        die(
    'Do not access this file directly.');
    }

        
    $resultAwards $db->query("
            SELECT
                hlstats_Awards.awardId,
                hlstats_Awards.awardType,
                hlstats_Awards.code,
                hlstats_Awards.name,
                hlstats_Awards.verb,
                hlstats_Awards.d_winner_id,
                hlstats_Awards.d_winner_count,
                hlstats_Players.lastName AS d_winner_name,
                hlstats_Players.flag AS flag,
                hlstats_Players.country AS country
            FROM
                hlstats_Awards
            LEFT JOIN hlstats_Players ON
                hlstats_Players.playerId = hlstats_Awards.d_winner_id
            WHERE
                hlstats_Awards.game='
    $game'
            ORDER BY
                hlstats_Awards.name
        "
    );
        
        
    $result $db->query("
            SELECT
                IFNULL(value, 1)
            FROM
                hlstats_Options
            WHERE
                keyname='awards_numdays'
        "
    );

        if (
    $db->num_rows($result) == 1)
            list(
    $awards_numdays) = $db->fetch_row($result);
        else
            
    $awards_numdays 1;

        
    $result $db->query("
            SELECT
                DATE_FORMAT(value, '%W %e %b'),
                DATE_FORMAT( DATE_SUB( value, INTERVAL 
    $awards_numdays DAY ) , '%W %e %b' )
            FROM
                hlstats_Options
            WHERE
                keyname='awards_d_date'
        "
    );
        list(
    $awards_d_date$awards_s_date) = $db->fetch_row($result);

    ?>
    <div class="block">
        <?php printSectionTitle((($awards_numdays == 1) ? 'Ежедневные' $awards_numdays.'Day')." Награды ($awards_d_date)"); ?>
        <div class="subblock">
            <table class="data-table">

    <?php
        $i 
    0;
        
    $cols $g_options['awarddailycols'];
        if (
    $cols || $cols 10)
        {
            
    $cols 5;
        }
        
    $colwidth round(100 $cols);
        while (
    $r $db->fetch_array($resultAwards))
        {
            if (
    $i == $cols)
            {
                echo 
    '</tr>';
                
    $i 0;
            }
            if (
    $i==0)
            {
                echo 
    '<tr class="bg1">';
            }

            if (
    $image getImage("/games/$game/dawards/".strtolower($r['awardType'].'_'.$r['code'])))
            {
                
    $img $image['url'];
            }
            elseif (
    $image getImage("/games/$realgame/dawards/".strtolower($r['awardType'].'_'.$r['code'])))
            {
                
    $img $image['url'];
            }
            else
            {
                
    $img IMAGE_PATH.'/award.png';
            }
            
    $weapon '<a href="hlstats.php?mode=dailyawardinfo&amp;award='.$r['awardId']."&amp;game=$game\"><img src=\"$img\" alt=\"".$r['code'].'" /></a>';
            if (
    $r['d_winner_id'] > 0) {
                if (
    $g_options['countrydata'] == 1)    {
                    
    $imagestring '<img src="'.getFlag($r['flag']).'" alt="'.$r['flag'].'" />&nbsp;&nbsp;';
                } else {
                    
    $imagestring '';
                }
                
    $winnerstring '<strong>'.htmlspecialchars($r['d_winner_name'], ENT_COMPAT).'</strong>';
                
    $achvd "{$imagestring} <a href=\"hlstats.php?mode=playerinfo&amp;player={$r['d_winner_id']}&amp;game={$game}\">{$winnerstring}</a>";
                
    $wincount $r['d_winner_count'];
            } else {
                
    $achvd "<em>Нет победителя</em>";
                
    $wincount"0";
            }
                
            echo 
    "<td style=\"text-align:center;vertical-align:top;width:$colwidth%;\">
                <strong>"
    .$r['name'].'</strong><br /><br />'
                
    ."$weapon<br /><br />"
                
    ."$achvd<br />"
                
    .'<span class="fSmall">'.$wincount' ' htmlspecialchars($r['verb']).'</span>
                </td>'
    ;
            
    $i++;
        }
        if (
    $i != 0)
        {
            for (
    $i $i$i $cols$i++)
            {
                echo 
    '<td class="bg1">&nbsp;</td>';
            }
            echo 
    '</tr>';
        } 
      
    ?>
            </table>
        </div>
    </div>
    PHP:
    <?php

        
    if ( !defined('IN_HLSTATS') )
        {
            die(
    'Do not access this file directly.');
        }
        
    $result $db->query("
            SELECT
                rankName,
                minKills,
                rankId,
                count(playerId) AS obj_count
            FROM
                hlstats_Ranks
            INNER JOIN
                hlstats_Players
            ON (
               hlstats_Ranks.game=hlstats_Players.game
               )    
            WHERE
                kills>=minKills
                AND kills<=maxKills
                AND hlstats_Ranks.game='
    $game'
            GROUP BY
                rankName,
                minKills
        "
    );
        
        while (
    $r $db->fetch_array())
        {
            
    $ranks[$r['rankId']] = $r['obj_count'];
        }

        
    // select the available ranks
        
    $result $db->query("
            SELECT
                rankName,
                minKills,
                maxKills,
                rankId,
                image
            FROM
                hlstats_Ranks
            WHERE
                hlstats_Ranks.game='
    $game'    
            ORDER BY
                minKills
        "
    );
    ?>

    <div class="block">
        <?php printSectionTitle('Уровни'); ?>
        <div class="subblock">
            <table class="data-table">
    <?php
        $i 
    0;

        
    $cols $g_options['awardrankscols'];
        if (
    $cols || $cols 10$cols 5;
        {
            
    $colwidth round(100 $cols);
        }

        while (
    $r $db->fetch_array())
        {
            if (
    $i == $cols)
            {
                echo 
    "</tr>";
                
    $i 0;
            }
            if (
    $i == 0)
            {
                echo 
    "<tr class='bg1'>";
            }
       
            
    $image getImage('/ranks/'.$r['image'].'_small');
            
    $link '<a href="hlstats.php?mode=rankinfo&amp;rank='.$r['rankId']."&amp;game=$game\">";
            if (
    $image)
            {
                
    $imagestring '<img src="'.$image['url'].'" alt="'.$r['image'].'" />';
            }
            else
            {
                
    $imagestring 'Список игроков';
            }
            
    $achvd '';
            if (
    $ranks[$r['rankId']] > 0)
            {
                
    $imagestring "$link$imagestring</a>";
                
    $achvd 'Получило '.$ranks[$r['rankId']].' человек';
            }    
       
            echo 
    "<td style=\"text-align:center;vertical-align:top;width:$colwidth%;\">"
                
    .'<strong>'.$r['rankName'].'</strong><br />'
                
    .'<span class="fSmall">('.$r['minKills'].'-'.$r['maxKills'].'&nbsp;убийств)'.'<br />'
                
    ."$achvd<br /></span>"
                
    .$imagestring.'
                </td>'
    ;
            
    $i++;
        }
        if (
    $i != 0)
        {
            for (
    $i $i$i $cols$i++)
            {
                echo 
    '<td class="bg1">&nbsp;</td>';
            }
            echo 
    '</tr>';
        }
    ?>
            </table>
        </div>
    </div>
    PHP:
    <?php
    if ( !defined('IN_HLSTATS') )
    {
        die(
    'Do not access this file directly.');
    }

        
    $result $db->query("
            SELECT
                hlstats_Ribbons.ribbonId,
                ribbonName,
                image,
                name as awardName,
                awardCount,
                count(playerId) as achievedcount
            FROM
                hlstats_Ribbons    
            INNER JOIN
                hlstats_Awards 
            ON (
                awardCode=code
                AND hlstats_Ribbons.game=hlstats_Awards.game                
                )
            LEFT JOIN
                hlstats_Players_Ribbons
            ON (
                hlstats_Ribbons.ribbonId=hlstats_Players_Ribbons.ribbonId
                )        
            WHERE
                hlstats_Ribbons.game='
    $game'
                AND hlstats_Ribbons.special=0
            GROUP BY
                hlstats_Ribbons.ribbonId
            ORDER BY
                awardCount,
                ribbonName,
                awardCode
        "
    );
    ?>

    <div class="block">
        <?php printSectionTitle('Медали'); ?>
        <div class="subblock">
            <table class="data-table">
    <?php
        $i 
    0;
        
    $i1 0;
        
    $cnt = -1;
     
        
    $cols $g_options['awardribbonscols'];
        if (
    $cols || $cols 10)
        {
            
    $cols 5;
        }
        
    $colwidth round(100 $cols);
     
        while (
    $r $db->fetch_array())
        {
            if (
    $cnt != $r['awardCount'])
            {
                
    $cnt $r['awardCount'];
                
    $i1++;
                if (
    $i == $cols)
                {
                    echo 
    '</tr>';
                }
                
    $i 0;
                echo 
    "<tr class=\"head\"><td colspan=\"5\"><strong>Медали класса #$i1 (Получено наград: $cnt)</strong></td></tr>";
            }

            if (
    $i == $cols)
            {
                echo 
    '</tr>';
                
    $i 0;
            }
            if (
    $i == 0)
            {
                echo 
    '<tr class="bg1">';
            }
       
            
    $link '<a href="hlstats.php?mode=ribboninfo&amp;ribbon='.$r['ribbonId']."&amp;game=$game\">";
            if (
    file_exists(IMAGE_PATH."/games/$game/ribbons/".$r['image']))
            {
                
    $image IMAGE_PATH."/games/$game/ribbons/".$r['image'];
            }
            elseif (
    file_exists(IMAGE_PATH."/games/$realgame/ribbons/".$r['image']))
            {
                
    $image IMAGE_PATH."/games/$realgame/ribbons/".$r['image'];
            }
            else
            {
                
    $image IMAGE_PATH."/award.png";
            }
            
    $image '<img src="'.$image.'" alt="'.$r['ribbonName'].'" />';
            
    $achvd '';
            if (
    $r['achievedcount'] > 0)
            {
                
    $image "$link$image</a>";
                
    $achvd 'Получено '.$r['achievedcount'].' человек';
            }

            echo 
    "<td style=\"text-align:center;vertical-align:top;width:$colwidth%;\">
                <strong>"
    .$r['ribbonName'].'</strong><br /><br /><span class="fSmall">'
                
    ."$achvd</span><br />$image
                </td>"
    ;
            
    $i++;
        }
        if (
    $i != 0)
        {
            for (
    $i $i$i $cols$i++)
            {
                echo 
    '<td class="bg1">&nbsp;</td>';
            }
            echo 
    '</tr>';
        }
    ?>
            </table>
        </div>
    </div>
     
    Последнее редактирование: 3 сен 2014
    ★$$StOk$$★ нравится это.
  2. Danyas

    Danyas Спасибо, браток © yand3xmail Модератор

    Сообщения:
    1.712
    Симпатии:
    451
    PHP:
    <?php
        
    if ( !defined('IN_HLSTATS') )
        {
            die(
    'Do not access this file directly.');
        }
        
    $db->query
        
    ("
            SELECT
                hlstats_Games.name
            FROM
                hlstats_Games
            WHERE
                hlstats_Games.code = '
    $game'
        "
    );
        if (
    $db->num_rows() < 1error("No such game '$game'.");
        list(
    $gamename) = $db->fetch_row();
        
    $db->free_result();
        if (isset(
    $_GET['minkills']))
        {
            
    $minkills valid_request(intval($_GET['minkills']),1);
        }
        else
        {
            
    $minkills 0;
        }
        
    pageHeader
        
    (
            array (
    $gamename'Читеры &amp; Забаненные игроки'),
            array (
    $gamename=>"%s?game=$game"'Читеры &amp; Забаненные игроки'=>'')
        );
        
    $table = new Table
        
    (
            array(
                new 
    TableColumn
                
    (
                    
    'lastName',
                    
    'Игрок',
                    
    'width=26&flag=1&link=' urlencode('mode=playerinfo&amp;player=%k')
                ),
                new 
    TableColumn
                
    (
                    
    'ban_date',
                    
    'Бан получен',
                    
    'width=15&align=right'
                
    ),
                new 
    TableColumn
                
    (
                    
    'skill',
                    
    'Очков',
                    
    'width=6&align=right'
                
    ),
                new 
    TableColumn
                
    (
                    
    'activity',
                    
    'Активность',
                    
    'width=10&sort=no&type=bargraph'
                
    ),
                new 
    TableColumn
                
    (
                    
    'kills',
                    
    'Убийств',
                    
    'width=5&align=right'
                
    ),
                new 
    TableColumn
                
    (
                    
    'deaths',
                    
    'Смертей',
                    
    'width=5&align=right'
                
    ),
                new 
    TableColumn
                
    (
                    
    'headshots',
                    
    'Хедшотов',
                    
    'width=7&align=right'
                
    ),
                new 
    TableColumn
                
    (
                    
    'kpd',
                    
    'K:D',
                    
    'width=10&align=right'
                
    ),
                new 
    TableColumn
                
    (
                    
    'hpk',
                    
    'HS:K',
                    
    'width=5&align=right'
                
    ),
                new 
    TableColumn
                
    (
                    
    'acc',
                    
    'Аккуратность',
                    
    'width=6&align=right&append=' urlencode('%')
                )
            ),
            
    'playerId',
            
    'last_event',
            
    'skill',
            
    true
        
    );
        
    $day_interval 28;
        
    $resultCount $db->query
        
    ("
            SELECT
                COUNT(*)
            FROM
                hlstats_Players
            WHERE
                hlstats_Players.game = '
    $game'
                AND hlstats_Players.hideranking = 2
                AND hlstats_Players.kills >= 
    $minkills
        "
    );
        list(
    $numitems) = $db->fetch_row($resultCount);
        
    $result $db->query
        
    ("
            SELECT
                hlstats_Players.playerId,
                FROM_UNIXTIME(last_event,'%Y.%m.%d %T') as ban_date,
                hlstats_Players.flag,
                            unhex(replace(hex(hlstats_Players.lastName), 'E280AE', '')) as lastName,
                hlstats_Players.skill,
                hlstats_Players.kills,
                hlstats_Players.deaths,
                IFNULL(ROUND(hlstats_Players.kills / IF(hlstats_Players.deaths = 0, 1, hlstats_Players.deaths), 2), '-') AS kpd,
                hlstats_Players.headshots,
                IFNULL(ROUND(hlstats_Players.headshots / hlstats_Players.kills, 2), '-') AS hpk,
                IFNULL(ROUND((hlstats_Players.hits / hlstats_Players.shots * 100), 0), 0) AS acc,
                activity
            FROM
                hlstats_Players
            WHERE
                hlstats_Players.game = '
    $game'
                AND hlstats_Players.hideranking = 2
                AND hlstats_Players.kills >= 
    $minkills
            ORDER BY
                
    $table->sort $table->sortorder,
                
    $table->sort2 $table->sortorder,
                hlstats_Players.lastName ASC
            LIMIT
                
    $table->startitem,
                
    $table->numperpage
        "
    );
    ?>

    <div class="block">
        <?php printSectionTitle('Читеры &amp; Забаненные игроки'); ?>
            <div class="subblock">
                <div style="float:left;">
                    <form method="get" action="<?php echo $g_options['scripturl']; ?>">
                        <input type="hidden" name="mode" value="search" />
                        <input type="hidden" name="game" value="<?php echo $game?>" />
                        <input type="hidden" name="st" value="player" />
                        <strong>•</strong> Найти игрока:
                        <input type="text" name="q" size="20" maxlength="64" class="textbox" />
                        <input type="submit" value="Search" class="smallsubmit" />
                    </form>
                </div>
            </div><br /><br />
            <div style="clear:both;padding-top:4px;"></div>
            <?php $table->draw($result$numitems95); ?><br /><br />
            <div class="subblock">
                <div style="float:left;">
                    <form method="get" action="<?php echo $g_options['scripturl']; ?>">
                        <?php
                            
    foreach ($_GET as $k=>$v)
                            {
                                
    $v valid_request($v0); 
                                if (
    $k != "minkills")
                                {
                                    echo 
    "<input type=\"hidden\" name=\"" htmlspecialchars($k) . "\" value=\"" htmlspecialchars($v) . "\" />\n";
                                }
                            }
                        
    ?>
                        <strong>•</strong> Показать только игроков с
                        <input type="text" name="minkills" size="4" maxlength="2" value="<?php echo $minkills?>" class="textbox" /> или более убийствами из <strong><?php echo number_format($numitems); ?></strong> забаненых
                        <input type="submit" value="Apply" class="smallsubmit" />
                    </form>
                </div>
                <div style="float:right;">
                    Перейти к: <a href="<?php echo $g_options["scripturl"] . "?game=$game"?>"><?php echo $gamename?></a>
                </div>
        </div>
    </div>

    Внимание!
    В данном коде добавлен чат фильтр, так что может не работать.
    PHP:
    <?php
        
    if ( !defined('IN_HLSTATS') )
        {
            die(
    'Do not access this file directly.');
        }
        
    $showserver=0;
        if (isset(
    $_GET['server_id']))
        {
            
    $showserver valid_request(strval($_GET['server_id']), true);
        }
        if (
    $showserver == 0)
        {
            
    $whereclause "hlstats_Servers.game='$game'";
        }
        else
        {
            
    $whereclause "hlstats_Servers.game='$game' AND hlstats_Events_Chat.serverId=$showserver";
        }
        
    $db->query
        
    ("
            SELECT
                hlstats_Games.name
            FROM
                hlstats_Games
            WHERE
                hlstats_Games.code = '
    $game'
        "
    );
        if (
    $db->num_rows() < 1error("No such game '$game'.");
        list(
    $gamename) = $db->fetch_row();
        
    $db->free_result();
        
    pageHeader
        
    (
            array (
    $gamename'Статистика чата серверов'),
            array (
    $gamename=>"%s?game=$game"'Чат сервера'=>'')
        );
        
    flush();
        
    $servername "(All Servers)";
        
        if (
    $showserver != 0)
        {
            
    $result=$db->fetch_array
            
    (
                
    $db->query
                
    ("
                    SELECT
                        hlstats_Servers.name
                    FROM
                        hlstats_Servers
                    WHERE
                        hlstats_Servers.serverId = "
    .$db->escape($showserver)."
                "
    )
            );
            
    $servername "(" $result['name'] . ")";
        }
    ?>

    <div class="block">
        <?php printSectionTitle("$gamename $servername Лог чата за последние ".$g_options['DeleteDays'].' дней'); ?>
        <div class="subblock">
            <div style="float:left;">
                <span>
                <form method="get" action="<?php echo $g_options['scripturl']; ?>" style="margin:0px;padding:0px;">
                    <input type="hidden" name="mode" value="chat" />
                    <input type="hidden" name="game" value="<?php echo $game?>" />
                    <strong>•</strong> Показать чат с
                    <?php
    /*
                        $result = $db->query
                        ("
                            SELECT
                                DISTINCT hlstats_Events_Chat.serverId,
                                hlstats_Servers.name
                            FROM
                                hlstats_Events_Chat
                            INNER JOIN
                                hlstats_Servers
                            ON
                                hlstats_Events_Chat.serverId = hlstats_Servers.serverId
                                AND hlstats_Servers.game='$game'
                            ORDER BY
                                hlstats_Servers.sortorder,
                                hlstats_Servers.name,
                                hlstats_Events_Chat.serverId ASC
                            LIMIT
                                0,
                                50
                        ");
    */

                        
    $result $db->query
                        
    ("
                            SELECT
                                hlstats_Servers.serverId,
                                hlstats_Servers.name
                            FROM
                                hlstats_Servers
                            WHERE
                                hlstats_Servers.game='
    $game'
                            ORDER BY
                                hlstats_Servers.sortorder,
                                hlstats_Servers.name,
                                hlstats_Servers.serverId ASC
                            LIMIT
                                0,
                                50
                        "
    );

                        echo 
    '<select name="server_id"><option value="0">Все сервера</option>';
                        
    $dates = array ();
                        
    $serverids = array();
                        while (
    $rowdata $db->fetch_array())
                        {
                            
    $serverids[] = $rowdata['serverId'];
                            
    $dates[] = $rowdata
                            if (
    $showserver == $rowdata['serverId'])
                                echo 
    '<option value="'.$rowdata['serverId'].'" selected>'.$rowdata['name'].'</option>';
                            else
                                echo 
    '<option value="'.$rowdata['serverId'].'">'.$rowdata['name'].'</option>';
                        }
                        echo 
    '</select>';
                        
    $filter=isset($_REQUEST['filter'])?$_REQUEST['filter']:"";
                    
    ?>
                    Фильтровать: <input type="text" name="filter" value="<?php echo htmlentities($filter); ?>" /> 
                    <input type="submit" value="View" class="smallsubmit" />
                </form>
                </span>
            </div>
        </div>
        <div style="clear:both;padding-top:20px;"></div>
            <?php
                
    if ($showserver == 0)
                {
                    
    $table = new Table(
                        array
                        (
                            new 
    TableColumn
                            
    (
                                
    'eventTime',
                                
    'Дата',
                                
    'width=16'
                            
    ),
                            new 
    TableColumn
                            
    (
                                
    'lastName',
                                
    'Игрок',
                                
    'width=17&sort=no&flag=1&link=' urlencode('mode=playerinfo&amp;player=%k')
                            ),
                            new 
    TableColumn
                            
    (
                                
    'message',
                                
    'Сообщение',
                                
    'width=34&sort=no&embedlink=yes'
                            
    ),
                            new 
    TableColumn
                            
    (
                                
    'serverName',
                                
    'Сервер',
                                
    'width=23&sort=no'
                            
    ),
                            new 
    TableColumn
                            
    (
                                
    'map',
                                
    'Карта',
                                
    'width=10&sort=no'
                            
    )
                        ),
                        
    'playerId',
                        
    'eventTime',
                        
    'lastName',
                        
    false,
                        
    50,
                        
    "page",
                        
    "sort",
                        
    "sortorder"
                    
    );
                }
                else
                {
                    
    $table = new Table(
                        array
                        (
                            new 
    TableColumn
                            
    (
                                
    'eventTime',
                                
    'Дата',
                                
    'width=16'
                            
    ),
                            new 
    TableColumn
                            
    (
                                
    'lastName',
                                
    'Игрок',
                                
    'width=24&sort=no&flag=1&link=' urlencode('mode=playerinfo&amp;player=%k')
                            ),
                            new 
    TableColumn
                            
    (
                                
    'message',
                                
    'Сообщение',
                                
    'width=44&sort=no&embedlink=yes'
                            
    ),
                            new 
    TableColumn
                            
    (
                                
    'map',
                                
    'Карта',
                                
    'width=16&sort=no'
                            
    )
                        ),
                        
    'playerId',
                        
    'eventTime',
                        
    'lastName',
                        
    false,
                        
    50,
                        
    "page",
                        
    "sort",
                        
    "sortorder"
                    
    );
                }
                
    $whereclause2='';
                if(!empty(
    $filter))
                {
                    
    $whereclause2="AND MATCH (hlstats_Events_Chat.message) AGAINST ('" $db->escape($filter) . "' in BOOLEAN MODE)";
                }
                
    $surl $g_options['scripturl'];
        
    $chatfilter='1';
        
    $db->query("SELECT value FROM `hlstats_AddonsOptions` WHERE keyname='chatfilter_words'");
        
    $rowdata $db->fetch_array();
        if (
    $rowdata['value']!='') {
        
    $a=explode("\n",$rowdata['value']);
        foreach (
    $a as $v) {
        if (
    trim($v)!=''$chatfilter.=" AND hlstats_Events_Chat.message!='".trim($v)."'";
        }
        }
                
    $result $db->query
                
    ("
                    SELECT SQL_NO_CACHE 
                        hlstats_Events_Chat.eventTime,
                        unhex(replace(hex(hlstats_Players.lastName), 'E280AE', '')) as lastName,
                        IF(hlstats_Events_Chat.message_mode=2, CONCAT('(Team) ', hlstats_Events_Chat.message), IF(hlstats_Events_Chat.message_mode=3, CONCAT('(Squad) ', hlstats_Events_Chat.message), hlstats_Events_Chat.message)) AS message,
                        hlstats_Servers.name AS serverName,
                        hlstats_Events_Chat.playerId,
                        hlstats_Players.flag,
                        hlstats_Events_Chat.map
                        
                    FROM
                        hlstats_Events_Chat
                    INNER JOIN
                        hlstats_Players
                    ON
                        hlstats_Players.playerId = hlstats_Events_Chat.playerId
                    INNER JOIN 
                        hlstats_Servers
                    ON
                        hlstats_Servers.serverId = hlstats_Events_Chat.serverId
                    WHERE
                        
    $whereclause $whereclause2 AND $chatfilter
                    ORDER BY
                        hlstats_Events_Chat.id 
    $table->sortorder
                    LIMIT
                        
    $table->startitem,
                        
    $table->numperpage;
                "
    truefalse);
    /*
                    $whereclause = "hlstats_Events_Chat.serverId ";

                if($showserver == 0) {
                    $whereclause .= "in (".implode($serverids,',').")";
                } else {
                    $whereclause .= "= $showserver";
                }
    */

                
    $db->query
                
    ("
                    SELECT
                         count(*)
                    FROM
                        hlstats_Events_Chat
                    INNER JOIN
                        hlstats_Players
                    ON
                        hlstats_Players.playerId = hlstats_Events_Chat.playerId
                    INNER JOIN 
                        hlstats_Servers
                    ON
                        hlstats_Servers.serverId = hlstats_Events_Chat.serverId
                    WHERE
                        
    $whereclause $whereclause2 AND $chatfilter
                "
    );
                if (
    $db->num_rows() < 1$numitems 0;
                else 
                {
                    list(
    $numitems) = $db->fetch_row();
                }
                
    $db->free_result();    

                
    $table->draw($result$numitems95);
            
    ?><br /><br />
        <div class="subblock">
            <div style="float:right;">
                Перейти к: <a href="<?php echo $g_options["scripturl"] . "?game=$game"?>"><?php echo $gamename?></a>
            </div>
        </div>
    </div>


    Внимание!
    В данном коде добавлен чат фильтр, так что может не работать.
    PHP:
    <?php
        
    if ( !defined('IN_HLSTATS') )
        {
            die(
    'Do not access this file directly.');
        }
        
    $player valid_request(intval($_GET['player']), 1)
            or 
    error('No player ID specified.');
        
    $db->query
        
    ("
            SELECT
                unhex(replace(hex(hlstats_Players.lastName), 'E280AE', '')) as lastName,
                hlstats_Players.game
            FROM
                hlstats_Players
            WHERE
                hlstats_Players.playerId = 
    $player
        "
    );
        if (
    $db->num_rows() != 1)
        {
            
    error("No such player '$player'.");
        }
        
    $playerdata $db->fetch_array();
        
    $pl_name $playerdata['lastName'];
        if (
    strlen($pl_name) > 10)
        {
            
    $pl_shortname substr($pl_name08) . '...';
        }
        else
        {
            
    $pl_shortname $pl_name;
        }
        
    $pl_name htmlspecialchars($pl_nameENT_COMPAT);
        
    $pl_shortname htmlspecialchars($pl_shortnameENT_COMPAT);
        
    $game $playerdata['game'];
        
    $db->query
        
    ("
            SELECT
                hlstats_Games.name
            FROM
                hlstats_Games
            WHERE
                hlstats_Games.code = '
    $game'
        "
    );
        if (
    $db->num_rows() != 1)
        {
            
    $gamename ucfirst($game);
        }
        else
        {
            list(
    $gamename) = $db->fetch_row();
        }
        
    pageHeader
        
    (
            array (
    $gamename'История Чата'$pl_name),
            array
            (
                
    $gamename=>$g_options['scripturl'] . "?game=$game",
                
    'Player Rankings'=>$g_options['scripturl'] . "?mode=players&game=$game",
                
    'Player Details'=>$g_options['scripturl'] . "?mode=playerinfo&player=$player",
                
    'Chat History'=>''
            
    ),
            
    $playername
        
    );
        
    flush();
        
    $table = new Table
        
    (
            array
            (
                new 
    TableColumn
                
    (
                    
    'eventTime',
                    
    'Дата',
                    
    'width=16'
                
    ),

                new 
    TableColumn
                
    (
                    
    'message',
                    
    'Сообщение',
                    
    'width=44&sort=no&append=.&embedlink=yes'
                
    ),
                new 
    TableColumn
                
    (
                    
    'serverName',
                    
    'Сервер',
                    
    'width=24'
                
    ),
                new 
    TableColumn
                
    (
                    
    'map',
                    
    'Карта',
                    
    'width=16'
                
    )
            ),
            
    'eventTime',
            
    'eventTime',
            
    'serverName',
            
    false,
            
    50,
            
    'page',
            
    'sort',
            
    'sortorder'
        
    );
        
    $surl $g_options['scripturl'];
        
        
    $whereclause="hlstats_Events_Chat.playerId = $player ";
        
    $filter=isset($_REQUEST['filter'])?$_REQUEST['filter']:"";
        if(!empty(
    $filter))
        {
                    
    $whereclause.="AND MATCH (hlstats_Events_Chat.message) AGAINST ('" $db->escape($filter) . "' in BOOLEAN MODE)";
        }
        
    $chatfilter='1';
        
    $db->query("SELECT value FROM `hlstats_AddonsOptions` WHERE keyname='chatfilter_words'");
        
    $rowdata $db->fetch_array();
        if (
    $rowdata['value']!='') {
        
    $a=explode("\n",$rowdata['value']);
        foreach (
    $a as $v) {
        if (
    trim($v)!=''$chatfilter.=" AND hlstats_Events_Chat.message!='".trim($v)."'";
        }
        }
        
    $result $db->query
        
    ("
            SELECT
                hlstats_Events_Chat.eventTime,
                IF(hlstats_Events_Chat.message_mode=2, CONCAT('(Team) ', hlstats_Events_Chat.message), IF(hlstats_Events_Chat.message_mode=3, CONCAT('(Squad) ', hlstats_Events_Chat.message), hlstats_Events_Chat.message)) AS message,
                hlstats_Servers.name AS serverName,
                hlstats_Events_Chat.map
            FROM
                hlstats_Events_Chat
            LEFT JOIN 
                hlstats_Servers
            ON
                hlstats_Events_Chat.serverId = hlstats_Servers.serverId
            WHERE
                
    $whereclause AND $chatfilter
            ORDER BY
                
    $table->sort $table->sortorder,
                
    $table->sort2 $table->sortorder
            LIMIT
                
    $table->startitem,
                
    $table->numperpage
        "
    );
        
        
    $resultCount $db->query
        
    ("
            SELECT
                COUNT(*)
            FROM
                hlstats_Events_Chat
            LEFT JOIN 
                hlstats_Servers
            ON
                hlstats_Events_Chat.serverId = hlstats_Servers.serverId
            WHERE
                
    $whereclause AND $chatfilter
        "
    );
                
        list(
    $numitems) = $db->fetch_row($resultCount);
        
    ?>
    <div class="block">
    <?php
        printSectionTitle
    ('История чата игрока (За последние '.$g_options['DeleteDays'].' дней)');
    ?>
        <div class="subblock">
            <div style="float:left;">
                <span>
                <form method="get" action="<?php echo $g_options['scripturl']; ?>" style="margin:0px;padding:0px;">
                    <input type="hidden" name="mode" value="chathistory" />
                    <input type="hidden" name="player" value="<?php echo $player?>" />
                    <strong>•</strong>
                    Фильтр: <input type="text" name="filter" value="<?php echo htmlentities($filter); ?>" /> 
                    <input type="submit" value="View" class="smallsubmit" />
                </form>
                </span>
            </div>
        </div>
        <div style="clear: both; padding-top: 20px;"></div>
    <?php
        
    if ($numitems 0)
        {
            
    $table->draw($result$numitems95);
        }
    ?><br /><br />
        <div class="subblock">
            <div style="float:right;">
                Перейти к: <a href="<?php echo $g_options['scripturl'] . "?mode=playerinfo&amp;player=$player"?>"><?php echo $pl_name?> Статистика</a>
            </div>
        </div>
    </div>


    PHP:
    <?php

        
    if ( !defined('IN_HLSTATS') )
        {
            die(
    'Do not access this file directly.');
        }
        
        
    $clan valid_request(intval($_GET["clan"]), 1)
            or 
    error("Не выбран ID клана");

        
    $db->query("
            SELECT
                hlstats_Clans.tag,
                hlstats_Clans.name,
                hlstats_Clans.homepage,
                hlstats_Clans.game,
                hlstats_Clans.mapregion,
                SUM(hlstats_Players.kills) AS kills,
                SUM(hlstats_Players.deaths) AS deaths,
                SUM(hlstats_Players.headshots) AS headshots,
                SUM(hlstats_Players.connection_time) AS connection_time,
                COUNT(hlstats_Players.playerId) AS nummembers,
                ROUND(AVG(hlstats_Players.skill)) AS avgskill,
                TRUNCATE(AVG(activity),2) as activity
            FROM
                hlstats_Clans
            LEFT JOIN
                hlstats_Players
            ON
                hlstats_Players.clan = hlstats_Clans.clanId
            WHERE
                hlstats_Clans.clanId=
    $clan
                AND hlstats_Players.hideranking = 0
            GROUP BY
                hlstats_Clans.clanId
        "
    );
        if (
    $db->num_rows() != 1)
        {
            
    error("No such clan '$clan'.");
        }
        
        
    $clandata $db->fetch_array();

        
    $realkills = ($clandata['kills'] == 0) ? $clandata['kills'];
        
    $realheadshots = ($clandata['headshots'] == 0) ? $clandata['headshots'];


        
    $db->query("
            SELECT
                count(playerId)
            FROM
                hlstats_Players
            WHERE
                clan=
    $clan
            GROUP BY
                clan
        "
    );    
        list(
    $totalclanplayers) = $db->fetch_array();

        
    $db->free_result();
        
        
    $cl_name preg_replace('/\s/''&nbsp;'htmlspecialchars($clandata['name']));
        
    $cl_tag  preg_replace('/\s/''&nbsp;'htmlspecialchars($clandata['tag']));
        
    $cl_full "$cl_tag $cl_name";
        
        
    $game $clandata['game'];
        
    $db->query("SELECT name FROM hlstats_Games WHERE code='$game'");
        if (
    $db->num_rows() != 1)
        {
            
    $gamename ucfirst($game);
        }
        else
        {
            list(
    $gamename) = $db->fetch_row();
        }    
        
        if ( 
    $_GET['type'] == 'ajax' )
        {
            unset(
    $_GET['type']);
            
    $tabs explode('|'preg_replace('[^a-z]'''$_GET['tab']));
            
            foreach ( 
    $tabs as $tab )
            {
                if ( 
    file_exists(PAGE_PATH '/claninfo_' $tab '.php') )
                {
                    @include(
    PAGE_PATH '/claninfo_' $tab '.php');
                }
            }
            exit;
        }
        
    pageHeader(
            array(
    $gamename'Информация о клане'$cl_full),
            array(
                
    $gamename=>$g_options['scripturl'] . "?game=$game",
                
    'Кланы'=>$g_options['scripturl'] . "?mode=clans&game=$game",
                
    'Информация о клане'=>''
            
    ),
            
    $clandata['name']
        );

        if ( 
    $g_options['show_google_map'] == ) {
            echo (
    '<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>');
        }
    ?>

    <div class="block" id="main">

    <?php
        
    // insert details pages here
        
    if ($g_options['playerinfo_tabs'] == '1')
        {
    ?>
        <ul class="subsection_tabs" id="tabs_claninfo">
            <li>
                <a href="#" id="tab_general" id="general">Общая</a>
            </li>
            <li>
                <a href="#" id="tab_actions|teams">Команды &amp; События</a>
            </li>
            <li>
                <a href="#" id="tab_weapons">Оружие</a>
            </li>
            <li>
                <a href="#" id="tab_mapperformance">Карты</a>
            </li>
        </ul><br />
        <div id="main_content"></div>
        <script type="text/javascript">
        var Tabs = new Tabs($('main_content'), $$('#main ul.subsection_tabs a'), {
            'mode': 'claninfo',
            'game': '<?php echo $game?>',
            'loadingImage': '<?php echo IMAGE_PATH?>/ajax.gif',
            'defaultTab': 'general',
            'extra': {'clan': '<?php echo $clan?>','members_page': '<?php echo valid_request($_GET['members_page'], true); ?>'}
        });
        </script>
    <?php
        
    } else {
            echo 
    "\n<div id=\"tabgeneral\">\n";
            require_once 
    PAGE_PATH.'/claninfo_general.php';
            echo 
    '</div>';
        
            echo 
    "\n<div id=\"tabteams\">\n";
            require_once 
    PAGE_PATH.'/claninfo_actions.php';
            require_once 
    PAGE_PATH.'/claninfo_teams.php';
            echo 
    '</div>';

            echo 
    "\n<div id=\"tabweapons\">\n";
            require_once 
    PAGE_PATH.'/claninfo_weapons.php';
            echo 
    '</div>';
     
            echo 
    "\n<div id=\"tabmaps\">\n";
            require_once 
    PAGE_PATH.'/claninfo_mapperformance.php';
            echo 
    '</div>';
        }
    ?>

    <div class="block" style="clear:both;padding-top:12px;">
        <div class="subblock">
            <div style="float:left;">
                Поля, отмеченные "*", сгенерированы с учетом статистики за последние <?php echo $g_options['DeleteDays']; ?> дней.
            </div>
            <div style="float:right;">
                <?php
                    
    if (isset($_SESSION['loggedin']))
                    {
                        echo 
    'Admin Options: <a href="'.$g_options['scripturl']."?mode=admin&amp;task=tools_editdetails_clan&amp;id=$clan\">Edit Clan Details</a><br />";
                    }
                
    ?>
                Перейти к: <a href="<?php echo $g_options['scripturl'] . "?mode=players&amp;game=$game"?>">Кланы</a>
            </div>
        </div>
    </div>


    Добавлено через 47 секунд
    Ждите апдейта, наверное всё в архиве будет
     
    Последнее редактирование: 3 сен 2014
  3. PASHTET

    PASHTET

    Сообщения:
    213
    Симпатии:
    16
    Danyas, какой перевод? Ты в самой теме пишешь неграмотно!!!
     
  4. Danyas

    Danyas Спасибо, браток © yand3xmail Модератор

    Сообщения:
    1.712
    Симпатии:
    451
    Ты так уверено пишешь (!!!), а где же я неграмотно пишу? (???)
     
  5. ★$$StOk$$★

    ★$$StOk$$★

    Сообщения:
    648
    Симпатии:
    178
    Я думаю он имеет ввиду
    по идее он прав, такого слова в русской речи не существует.
     
  6. Sam_Fisher

    Sam_Fisher

    Сообщения:
    703
    Симпатии:
    202
    Ох... Я тоже собирался опубликовать нормальный перевод. Доделываю админ-часть, ну а посмотреть, что уже готово можно тут
     
  7. PASHTET

    PASHTET

    Сообщения:
    213
    Симпатии:
    16
    Danyas, Оффтоп
     
  8. Danyas

    Danyas Спасибо, браток © yand3xmail Модератор

    Сообщения:
    1.712
    Симпатии:
    451
    Ладно, вы правы.
    Такого слова не существует, есть слово выкладывать

    Добавлено через 46 секунд
    Может вдвоем перевод сделаем?
    Быстрее получится
    P.S.http://danyas.pp.ua/hlx/hlstats.php
     
    Последнее редактирование: 3 сен 2014
  9. Sam_Fisher

    Sam_Fisher

    Сообщения:
    703
    Симпатии:
    202
    Danyas, спасибо, но как я сказал, мне осталось перевести лишь админ-панель.
     
  10. Danyas

    Danyas Спасибо, браток © yand3xmail Модератор

    Сообщения:
    1.712
    Симпатии:
    451
    а плагин, ивенты?
    Ладно, не буду навязываться, но если что - обращайся
     
  11. SAZONISCHE

    SAZONISCHE

    Сообщения:
    114
    Симпатии:
    28
    Сделал полный перевод так же скоро мултиязычность и перевод картинок потом уже в паблике окажется ждите! http://mmcs.pro/stats/hlstats.php
     
  12. Danyas

    Danyas Спасибо, браток © yand3xmail Модератор

    Сообщения:
    1.712
    Симпатии:
    451
    Верю, надеюсь, жду...

    Добавлено через 6 минут
    Аналогично...
     
    Последнее редактирование: 26 янв 2015
  13. ASTIN

    ASTIN

    Сообщения:
    1
    Симпатии:
    0
    А нет ли случайно перевода сообщений в чат и т.д.? Нигде найти не могу. И, может кто-то выложит полностью готовый перевод самой статы? Заранее благодарен.
     
  14. zanoza73

    zanoza73

    Сообщения:
    348
    Симпатии:
    74
    когда будет полный перевод?