<script>

        var height = winH()-450;

        if (height < 400)

            height = 400;

        $('#dialog').css('max-height', height);

        chatScroll('dialog');

    </script>



    <div class="chatInput">

        <input id="msg" class="chatMsg" type="text" autocomplete="off" maxlength="1000">

        <div class="chatSubmit" onclick="<?php 
echo ajaxLoad(url('chat', 'send'), 'chat_get', '#msg|#pid!', 'ajaxFocus');
?>
">{L:INDEX_SEND}</div>

    </div>

</div>
 public function banAction()
 {
     if (empty($_SERVER['HTTP_X_REQUESTED_WITH'])) {
         error404();
     }
     $model = new AdminModel();
     $user = $model->getUserByID(post('id', 'int'));
     if ($user->id && ($user->role == 'user' or $user->role == 'claim')) {
         $popup['winH'] = post('height', 'int');
         $popup['winW'] = post('width', 'int');
         $popup['popupH'] = 450;
         $popup['popupW'] = 450;
         $html = '<div>' . '<div class="usersImage"><a href="' . url($user->id) . '" target="_blank"><img src="' . getAvatar($user->id, 'm') . '"></a></div>' . '<div class="usersInfo">' . '<div class="usersName"><a href="' . url($user->id) . '">' . $user->nickname . '</a><span class="level-icon">' . $user->level . '</span> <span>ID:' . $user->id . '</span></div>' . '</div>' . '<div class="usersBanBody">' . '<div id="status"></div>' . '<div>' . '<span class="inputText">' . Lang::translate('USERS_RANGE') . ':</span> ' . '<select id="banRange">' . '<option value="1800">' . Lang::translate('BAN_HALF_HOUR') . '</option>' . '<option value="3600">' . Lang::translate('BAN_HOUR') . '</option>' . '<option value="43200">' . Lang::translate('BAN_TWELVE_HOUR') . '</option>' . '<option value="86400">' . Lang::translate('BAN_DAY') . '</option>' . '<option value="518400">' . Lang::translate('BAN_SIX_DAYS') . '</option>' . '<option value="1036800">' . Lang::translate('BAN_TWELVE_DAYS') . '</option>' . '<option value="2592000">' . Lang::translate('BAN_MONTH') . '</option>' . '<option value="0">' . Lang::translate('BAN_FULL') . '</option>' . '</select>' . '</div>' . '<div>' . '<div>' . Lang::translate('USERS_COMMENT') . ':</div>' . '<textarea id="banComment" style="height: 230px; width: 100%;"></textarea>' . '</div>' . '<div>' . '<div class="btn" onclick="' . ajaxLoad(url('admin', 'set_ban'), 'process', '#banRange!|#banComment!|id:' . $user->id) . '">' . Lang::translate('USERS_PROCESS') . '</div>' . '</div>' . '</div>' . '</div>';
         $response['target_h']['#popup'] = PopupInc::SimplePopup($html, $popup);
     }
     $response['error'] = 0;
     echo json_encode($response);
     exit;
 }
Example #3
0
 public function syncAction()
 {
     $response = array('error' => 0, 'target_h' => array('#myAssets' => '', '#myReady' => '', '#themAssets' => '', '#themReady' => '', '#battle' => ''));
     if (Request::getUri()[0]) {
         $mid = Request::getUri()[0];
         $model = new ProfileModel();
         $match = $model->getMatchByID($mid);
         if ($match) {
             // TODO True Deposit Value
             if ($match->uid == Request::getParam('user')->id) {
                 $response['target_h']['#usum'] = 'Current deposit value: $' . $match->usum;
                 $response['target_h']['#psum'] = 'Current deposit value: $' . $match->psum;
             } else {
                 $response['target_h']['#usum'] = 'Current deposit value: $' . $match->psum;
                 $response['target_h']['#psum'] = 'Current deposit value: $' . $match->usum;
             }
             if ($match->status == 0 && $match->pid == Request::getParam('user')->id) {
                 $response['target_h']['#battle'] = '<div id="status_action">' . ' <a onclick="' . ajaxLoad(url('matchaccept'), 'match_action', 'mid:' . $match->id, 'reloadInventory|!exception') . '">' . Lang::translate("MATCH_ACCEPT") . '</a> ' . ' <a onclick="' . ajaxLoad(url('matchreject'), 'match_action', 'mid:' . $match->id, 'reloadInventory|!exception') . '">' . Lang::translate("MATCH_REJECT") . '</a></div>';
             }
             if ($match->status == 1 || $match->status == 2 && $match->blocked) {
                 if ($match->status == 2) {
                     $resp = $this->getlock($match, $model, null);
                     if (!is_null($resp) && $resp != '' && !(strpos($resp, 'Error') > 0)) {
                         $response['target_h']['#map_note'] = $resp;
                     } else {
                         $servers = $model->getServersList();
                         foreach ($servers as $server) {
                             $resp = $this->getlock($match, $model, $server);
                             if (!is_null($resp) && $resp != '') {
                                 if (!strpos($resp, 'Error') > 0) {
                                     $model->setMatchServer($match->id, $server->id);
                                     //update matches with server id
                                     break;
                                 }
                                 $response['target_h']['#map_note'] = $resp;
                             }
                             /*								$addr = explode(':', $server->addr);
                             								try
                             								{
                             									$Query->Connect($addr[0], $addr[1], 1, SourceQuery::SOURCE);
                             									$info = $Query->GetInfo();
                             									$players = $info['Players'];
                             									$serverLock = $model->getServerLock($match->id, $server->id, INTERVAL_LOCK);
                             									if (($players == 0) && is_null($serverLock)) {
                             										//$response['target_h']['#map_note'] = '<div class="profile-menu"><div id="challenge"><a href="steam://connect/' . ($server->addr) . '" title="Go to our server : ' . ($server->addr) . '">Join</a></div></div>';
                             										$response['target_h']['#map_note'] = 'Go to our server : ' . ($server->addr) . ' <a href="steam://connect/' . ($server->addr) . '" id="join" title="Join">Join</a>';
                             										$model->setMatchServer($match->id, $server->id); //update matches with server id
                             										break;
                             									}
                             								} catch (Exception $e) {
                             									$response['target_h']['#map_note'] = 'error: ' . $e->getMessage();
                             									//echo $e->getMessage();
                             								} finally {
                             									$Query->Disconnect();
                             								}*/
                         }
                     }
                     //$response['target_h']['#map_note'] = 'Go to our <a href="' . url('servers') . '" target="_blank">servers page</a> to find a server to play on';
                 } else {
                     $response['target_h']['#map_note'] = '';
                 }
                 if (Request::getParam('user')->id == $match->uid) {
                     //if userId is UID
                     $assets = $model->getMatchAssets($match->uid, $match->id);
                     $myReady = $match->uready;
                     $myWin = !$match->uwin || $match->uwin == null ? 0 : $match->uwin;
                     $oppositeAssets = $model->getMatchAssets($match->pid, $match->id);
                     $oppositeReady = $match->pready;
                     $oppositeWin = !$match->pwin || $match->pwin == null ? 0 : $match->pwin;
                 } else {
                     //else if userId is PID
                     $assets = $model->getMatchAssets($match->pid, $match->id);
                     $myReady = $match->pready;
                     $myWin = !$match->pwin || $match->pwin == null ? 0 : $match->pwin;
                     $oppositeAssets = $model->getMatchAssets($match->uid, $match->id);
                     $oppositeReady = $match->uready;
                     $oppositeWin = !$match->uwin || $match->uwin == null ? 0 : $match->uwin;
                 }
                 //current user's data
                 if ($myWin == 0) {
                     if ($myReady) {
                         if ($oppositeReady && $match->blocked) {
                             $response['target_h']['#myReady'] = Lang::translate("MATCH_READY");
                         } else {
                             $response['target_h']['#myReady'] = '<button id="readyBtn" onclick="' . ajaxLoad(url('profile', 'setReady', $match->id), 'ready', '', 'sync|reloadInventory|!exception') . ';">' . Lang::translate("MATCH_CANCEL_READY") . '</button>';
                         }
                     } else {
                         if ($assets && count($assets) > 0) {
                             $response['target_h']['#myReady'] = '<button id="readyBtn" onclick="' . ajaxLoad(url('profile', 'setReady', $match->id), 'ready', '', 'sync|reloadInventory|!exception') . ';">' . Lang::translate("MATCH_READY") . '</button>';
                         } else {
                             $response['target_h']['#myReady'] = '<button id="readyBtn" disabled>' . Lang::translate("MATCH_CANT_READY") . '</button>';
                         }
                     }
                 }
                 if ($assets && count($assets) > 0) {
                     foreach ($assets as $asset) {
                         $response['target_h']['#myAssets'] .= '<div class="assetsItem" id="my' . $asset->oldAssetId . '" ';
                         if (!$match->blocked && $myWin == 0) {
                             $response['target_h']['#myAssets'] .= 'ondblclick="removeAsset(' . $asset->oldAssetId . ');"';
                         }
                         $response['target_h']['#myAssets'] .= '><img src="http://steamcommunity-a.akamaihd.net/economy/image/' . $asset->icon_url . '" alt="icon">' . '<div class="none" id="myAssetNo' . $asset->oldAssetId . '">' . $asset->id . '</div>' . '</div>' . '<div class="assetsInfo none" id="help_my' . $asset->oldAssetId . '">' . '<div class="text">' . $asset->name . '<br/>' . "\n" . 'Price: ' . $asset->price . '<br/>' . "\n" . '' . $asset->status . '<br/>' . "\n" . '</div>' . '</div>';
                     }
                 }
                 //opposite user data
                 if ($oppositeWin == 0) {
                     if ($oppositeReady) {
                         $response['target_h']['#themReady'] = Lang::translate("MATCH_THEM_READY");
                     } else {
                         if ($oppositeAssets && count($oppositeAssets) > 0) {
                             $response['target_h']['#themReady'] = Lang::translate("MATCH_THEM_NOT_READY");
                         } else {
                             $response['target_h']['#themReady'] = Lang::translate("MATCH_THEM_NOT_READY_EMPTY");
                         }
                     }
                 }
                 if ($oppositeAssets && count($oppositeAssets) > 0) {
                     foreach ($oppositeAssets as $asset) {
                         $response['target_h']['#themAssets'] .= '<div class="assetsItem" id="them' . $asset->oldAssetId . '" >' . '<img src="http://steamcommunity-a.akamaihd.net/economy/image/' . $asset->icon_url . '" alt="icon">' . '</div>' . '<div class="assetsInfo none" id="help_them' . $asset->oldAssetId . '">' . '<div class="text">' . $asset->name . '<br/>' . "\n" . 'Price: ' . $asset->price . '<br/>' . "\n" . '' . $asset->status . '<br/>' . "\n" . '</div>' . '</div>';
                     }
                 }
                 //match battle status
                 if ($match->blocked) {
                     $count = $model->getCountMatchAssets($match->id);
                     $countRequested = $model->getCountRequestedMatchAssets($match->id);
                     if ($countRequested < $count) {
                         $response['target_h']['#battle'] = Lang::translate("MATCH_BATTLE_WAIT_FOR_REQUEST") . ' ' . $countRequested . '/' . $count;
                     } else {
                         $countReceived = $model->getCountReceivedMatchAssets($match->id);
                         if ($count > $countReceived) {
                             $response['target_h']['#battle'] = Lang::translate("MATCH_BATTLE_WAIT_FOR_RECEIVE") . ' ' . $countReceived . '/' . $count;
                         } else {
                             $response['target_h']['#battle'] = '<div>';
                             if ($myWin == 1 && $oppositeWin == 2 || $myWin == 2 && $oppositeWin == 1) {
                                 $response['target_h']['#battle'] = Lang::translate("MATCH_ENDED");
                             } else {
                                 $response['target_h']['#battle'] .= '<div>';
                                 if ($myWin > 0) {
                                     if ($myWin == 1) {
                                         $response['target_h']['#battle'] .= Lang::translate("MATCH_WIN") . '<input type="button" id="loseBttn" value="' . Lang::translate('MATCH_LOSE_CHANGE') . '" onclick="' . ajaxLoad(url('profile', 'setLose'), '', 'mid:' . $match->id, 'sync|!exception') . '"/>';
                                     }
                                     if ($myWin == 2) {
                                         $response['target_h']['#battle'] .= Lang::translate("MATCH_LOSE") . '<input type="button" id="winBttn" value="' . Lang::translate('MATCH_WIN_CHANGE') . '" onclick="' . ajaxLoad(url('profile', 'setWin'), '', 'mid:' . $match->id, 'sync|!exception') . '"/>';
                                     }
                                 } else {
                                     $response['target_h']['#battle'] .= '<input type="button" id="winBttn" value="' . Lang::translate('MATCH_SET_WIN') . '" onclick="' . ajaxLoad(url('profile', 'setWin'), '', 'mid:' . $match->id, 'sync|!exception') . '"/>';
                                     $response['target_h']['#battle'] .= '<input type="button" id="loseBttn" value="' . Lang::translate('MATCH_SET_LOSE') . '" onclick="' . ajaxLoad(url('profile', 'setLose'), '', 'mid:' . $match->id, 'sync|!exception') . '"/>';
                                 }
                                 $response['target_h']['#battle'] .= '</div>';
                                 $response['target_h']['#battle'] .= '</div>';
                                 if ($oppositeWin > 0) {
                                     if ($oppositeWin == 1) {
                                         $response['target_h']['#battle'] .= Lang::translate("MATCH_THEM_WIN");
                                     }
                                     if ($oppositeWin == 2) {
                                         $response['target_h']['#battle'] .= Lang::translate("MATCH_THEM_LOSE");
                                     }
                                 } else {
                                     $response['target_h']['#battle'] .= Lang::translate("MATCH_THEM_BATTLE_THINK");
                                 }
                                 $response['target_h']['#battle'] .= '</div>';
                             }
                             $response['target_h']['#battle'] .= '</div>';
                         }
                     }
                 }
             }
         } else {
             $response['error'] = Lang::translate("MATCH_ACCESS_DENIED");
         }
     } else {
         $response['error'] = Lang::translate("MATCH_ACCESS_DENIED");
     }
     echo json_encode($response);
     exit;
 }
Example #4
0
        <div class="formRowTitle">
            <?php 
echo Lang::translate('FAVORITES_SPORT');
?>
:
        </div>
        <div class="formRowField">
            <textarea id="iSport"><?php 
echo Request::getParam('user')->iSport;
?>
</textarea>
        </div>
    </div>

    <div class="formRow">
        <div class="formRowTitle">

        </div>
        <div class="formRowField">
            <button onclick="<?php 
echo ajaxLoad(url('settings', 'favorites_save'), 'favorites', '#iPlayer!|#iTeam!|#iGame!|#iRole!|#iMusic!|#iFood!|#iSport!');
?>
">
                <?php 
echo Lang::translate('FAVORITES_BUTTON_SAVE');
?>
            </button>
        </div>
    </div>

</div>
Example #5
0
echo Request::getParam('countRequests') > 0 ? '(+' . Request::getParam('countRequests') . ')' : '';
?>
</a></li>
    <li><a href="{URL:friends/blacklist}">{L:BLACKLIST_TITLE}</a></li>
</ul>

<?php 
if (getCookie('error')) {
    echo getCookie('error');
}
echo '<div class="inbox clearfix">';
if (count($this->friends) > 0) {
    foreach ($this->friends as $friend) {
        $id = $friend->uid == Request::getParam('user')->id ? $friend->pid : $friend->uid;
        echo '<div class="tile">';
        echo '<div class="tileImg">';
        echo '<img src="' . getAvatar($id) . '">';
        echo '<a href="' . url($id) . '"></a>';
        echo '</div>';
        echo '<div class="tileInfo">';
        echo '<div><a class="tileName" href="' . url($id) . '">' . $friend->name . '</a></div>';
        echo '<div>' . getRank($friend->elo) . '</div>';
        echo '<a class="mailBtn" href="{URL:mail' . $id . '}" title="{L:INDEX_SEND_MAIL}"></a>';
        echo '<a class="challengeBtn" onclick="' . ajaxLoad(url('profile', 'challenge'), 'challenge', 'pid:' . $id) . '">{L:INDEX_CHALLENGE}</a>';
        echo '</div>';
        echo '<div id="challenge' . $id . '"></div>';
        echo '</div>';
    }
}
echo '</div>';
echo '<div class="pagin">' . Pagination::printPagination() . '</div>';
 public function syncAction()
 {
     $response = array('error' => 0, 'target_h' => array('#myAssets' => '', '#myReady' => '', '#themAssets' => '', '#themReady' => '', '#battle' => ''));
     if (Request::getUri()[0]) {
         $mid = Request::getUri()[0];
         $model = new ProfileModel();
         $match = $model->getMatchByID($mid);
         if ($match) {
             // TODO True Deposit Value
             if ($match->uid == Request::getParam('user')->id) {
                 $response['target_h']['#usum'] = 'Current deposit value: $' . $match->usum;
                 $response['target_h']['#psum'] = 'Current deposit value: $' . $match->psum;
             } else {
                 $response['target_h']['#usum'] = 'Current deposit value: $' . $match->psum;
                 $response['target_h']['#psum'] = 'Current deposit value: $' . $match->usum;
             }
             if ($match->status == 0 && $match->pid == Request::getParam('user')->id) {
                 $response['target_h']['#battle'] = '<div id="status_action">' . ' <a onclick="' . ajaxLoad(url('matchaccept'), 'match_action', 'mid:' . $match->id, 'reloadInventory|!exception') . '">' . Lang::translate("MATCH_ACCEPT") . '</a> ' . ' <a onclick="' . ajaxLoad(url('matchreject'), 'match_action', 'mid:' . $match->id, 'reloadInventory|!exception') . '">' . Lang::translate("MATCH_REJECT") . '</a></div>';
             }
             if ($match->status == 1 || $match->status == 2 && $match->blocked) {
                 if ($match->status == 1) {
                     $response['target_h']['#map_note'] = 'Go to our <a href="' . url('servers') . '" target="_blank">servers page</a> to find a server to play on';
                 } else {
                     $response['target_h']['#map_note'] = '';
                 }
                 if (Request::getParam('user')->id == $match->uid) {
                     //if userId is UID
                     $assets = $model->getMatchAssets($match->uid, $match->id);
                     $myReady = $match->uready;
                     $myWin = !$match->uwin || $match->uwin == null ? 0 : $match->uwin;
                     $oppositeAssets = $model->getMatchAssets($match->pid, $match->id);
                     $oppositeReady = $match->pready;
                     $oppositeWin = !$match->pwin || $match->pwin == null ? 0 : $match->pwin;
                 } else {
                     //else if userId is PID
                     $assets = $model->getMatchAssets($match->pid, $match->id);
                     $myReady = $match->pready;
                     $myWin = !$match->pwin || $match->pwin == null ? 0 : $match->pwin;
                     $oppositeAssets = $model->getMatchAssets($match->uid, $match->id);
                     $oppositeReady = $match->uready;
                     $oppositeWin = !$match->uwin || $match->uwin == null ? 0 : $match->uwin;
                 }
                 //current user's data
                 if ($myWin == 0) {
                     if ($myReady) {
                         if ($oppositeReady && $match->blocked) {
                             $response['target_h']['#myReady'] = Lang::translate("MATCH_READY");
                         } else {
                             $response['target_h']['#myReady'] = '<button id="readyBtn" onclick="' . ajaxLoad(url('profile', 'setReady', $match->id), 'ready', '', 'sync|reloadInventory|!exception') . ';">' . Lang::translate("MATCH_CANCEL_READY") . '</button>';
                         }
                     } else {
                         if ($assets && count($assets) > 0) {
                             $response['target_h']['#myReady'] = '<button id="readyBtn" onclick="' . ajaxLoad(url('profile', 'setReady', $match->id), 'ready', '', 'sync|reloadInventory|!exception') . ';">' . Lang::translate("MATCH_READY") . '</button>';
                         } else {
                             $response['target_h']['#myReady'] = '<button id="readyBtn" disabled>' . Lang::translate("MATCH_CANT_READY") . '</button>';
                         }
                     }
                 }
                 if ($assets && count($assets) > 0) {
                     foreach ($assets as $asset) {
                         $response['target_h']['#myAssets'] .= '<div class="assetsItem" id="my' . $asset->oldAssetId . '" ';
                         if (!$match->blocked && $myWin == 0) {
                             $response['target_h']['#myAssets'] .= 'ondblclick="removeAsset(' . $asset->oldAssetId . ');"';
                         }
                         $response['target_h']['#myAssets'] .= '><img src="http://steamcommunity-a.akamaihd.net/economy/image/' . $asset->icon_url . '" alt="icon">' . '<div class="none" id="myAssetNo' . $asset->oldAssetId . '">' . $asset->id . '</div>' . '</div>' . '<div class="assetsInfo none" id="help_my' . $asset->oldAssetId . '">' . '<div class="text">' . $asset->name . '<br/>' . "\n" . 'Price: ' . $asset->price . '<br/>' . "\n" . '' . $asset->status . '<br/>' . "\n" . '</div>' . '</div>';
                     }
                 }
                 //opposite user data
                 if ($oppositeWin == 0) {
                     if ($oppositeReady) {
                         $response['target_h']['#themReady'] = Lang::translate("MATCH_THEM_READY");
                     } else {
                         if ($oppositeAssets && count($oppositeAssets) > 0) {
                             $response['target_h']['#themReady'] = Lang::translate("MATCH_THEM_NOT_READY");
                         } else {
                             $response['target_h']['#themReady'] = Lang::translate("MATCH_THEM_NOT_READY_EMPTY");
                         }
                     }
                 }
                 if ($oppositeAssets && count($oppositeAssets) > 0) {
                     foreach ($oppositeAssets as $asset) {
                         $response['target_h']['#themAssets'] .= '<div class="assetsItem" id="them' . $asset->oldAssetId . '" >' . '<img src="http://steamcommunity-a.akamaihd.net/economy/image/' . $asset->icon_url . '" alt="icon">' . '</div>' . '<div class="assetsInfo none" id="help_them' . $asset->oldAssetId . '">' . '<div class="text">' . $asset->name . '<br/>' . "\n" . 'Price: ' . $asset->price . '<br/>' . "\n" . '' . $asset->status . '<br/>' . "\n" . '</div>' . '</div>';
                     }
                 }
                 //match battle status
                 if ($match->blocked) {
                     $count = $model->getCountMatchAssets($match->id);
                     $countRequested = $model->getCountRequestedMatchAssets($match->id);
                     if ($countRequested < $count) {
                         $response['target_h']['#battle'] = Lang::translate("MATCH_BATTLE_WAIT_FOR_REQUEST") . ' ' . $countRequested . '/' . $count;
                     } else {
                         $countReceived = $model->getCountReceivedMatchAssets($match->id);
                         if ($count > $countReceived) {
                             $response['target_h']['#battle'] = Lang::translate("MATCH_BATTLE_WAIT_FOR_RECEIVE") . ' ' . $countReceived . '/' . $count;
                         } else {
                             $response['target_h']['#battle'] = '<div>';
                             if ($myWin == 1 && $oppositeWin == 2 || $myWin == 2 && $oppositeWin == 1) {
                                 $response['target_h']['#battle'] = Lang::translate("MATCH_ENDED");
                             } else {
                                 $response['target_h']['#battle'] .= '<div>';
                                 if ($myWin > 0) {
                                     if ($myWin == 1) {
                                         $response['target_h']['#battle'] .= Lang::translate("MATCH_WIN") . '<input type="button" id="loseBttn" value="' . Lang::translate('MATCH_LOSE_CHANGE') . '" onclick="' . ajaxLoad(url('profile', 'setLose'), '', 'mid:' . $match->id, 'sync|!exception') . '"/>';
                                     }
                                     if ($myWin == 2) {
                                         $response['target_h']['#battle'] .= Lang::translate("MATCH_LOSE") . '<input type="button" id="winBttn" value="' . Lang::translate('MATCH_WIN_CHANGE') . '" onclick="' . ajaxLoad(url('profile', 'setWin'), '', 'mid:' . $match->id, 'sync|!exception') . '"/>';
                                     }
                                 } else {
                                     $response['target_h']['#battle'] .= '<input type="button" id="winBttn" value="' . Lang::translate('MATCH_SET_WIN') . '" onclick="' . ajaxLoad(url('profile', 'setWin'), '', 'mid:' . $match->id, 'sync|!exception') . '"/>';
                                     $response['target_h']['#battle'] .= '<input type="button" id="loseBttn" value="' . Lang::translate('MATCH_SET_LOSE') . '" onclick="' . ajaxLoad(url('profile', 'setLose'), '', 'mid:' . $match->id, 'sync|!exception') . '"/>';
                                 }
                                 $response['target_h']['#battle'] .= '</div>';
                                 $response['target_h']['#battle'] .= '</div>';
                                 if ($oppositeWin > 0) {
                                     if ($oppositeWin == 1) {
                                         $response['target_h']['#battle'] .= Lang::translate("MATCH_THEM_WIN");
                                     }
                                     if ($oppositeWin == 2) {
                                         $response['target_h']['#battle'] .= Lang::translate("MATCH_THEM_LOSE");
                                     }
                                 } else {
                                     $response['target_h']['#battle'] .= Lang::translate("MATCH_THEM_BATTLE_THINK");
                                 }
                                 $response['target_h']['#battle'] .= '</div>';
                             }
                             $response['target_h']['#battle'] .= '</div>';
                         }
                     }
                 }
             }
         } else {
             $response['error'] = Lang::translate("MATCH_ACCESS_DENIED");
         }
     } else {
         $response['error'] = Lang::translate("MATCH_ACCESS_DENIED");
     }
     echo json_encode($response);
     exit;
 }
Example #7
0
        <div class="formRowTitle">
            <?php 
echo Lang::translate('RIG_CASE');
?>
:
        </div>
        <div class="formRowField">
            <input type="text" id="iCase" value="<?php 
echo Request::getParam('user')->iCase;
?>
">
        </div>
    </div>

    <div class="formRow">
        <div class="formRowTitle">

        </div>
        <div class="formRowField">
            <button onclick="<?php 
echo ajaxLoad(url('settings', 'rig_save'), 'rig', '#videoCard!|#soundCard!|#cpu!|#ram!|#hardDrive!|#os!|#headset!|#mouse!|#mousepad!|#keyboard!|#monitor!|#iCase!');
?>
">
                <?php 
echo Lang::translate('RIG_BUTTON_SAVE');
?>
            </button>
        </div>
    </div>

</div>
Example #8
0
}
if ($this->profile->iFood) {
    echo '<div class="profileRowInfo">' . Lang::translate('INDEX_FAVORITES_FOOD') . ': ' . $this->profile->iFood . '</div>';
}
if ($this->profile->iSport) {
    echo '<div class="profileRowInfo">' . Lang::translate('INDEX_FAVORITES_SPORT') . ': ' . $this->profile->iSport . '</div>';
}
echo '</div>';
echo '<div class="pHr"></div>';
echo '<div class="pr_block left">';
// Referral
echo '<div class="pTitle">' . Lang::translate('INDEX_INVITE') . '</div>';
echo '<div class="profileRowInfo">' . Lang::translate('INDEX_REFERRAL') . ': ' . $this->ref_count . '</div>';
// Reg code
if (Request::getParam('user')->id && Request::getParam('user')->id == $this->profile->id) {
    echo '<div><a onclick="' . ajaxLoad(url('profile', 'regcode'), 'reg_code') . '">' . Lang::translate('INDEX_GET_REG_CODE') . '</a>: <span id="reg_code"></span></div>';
}
echo '</div>';
echo '<div class="pr_block right">';
// Info
echo '<div class="pTitle">' . Lang::translate('INDEX_INFO') . '</div>';
echo '<div class="profileRowInfo">' . Lang::translate('INDEX_LAST_VISIT') . ': ' . printTime($this->profile->dateLast) . '</div>';
echo '<div class="profileRowInfo">' . Lang::translate('INDEX_DATE_REG') . ': ' . printTime($this->profile->dateReg) . '</div>';
echo '</div>';
echo '<div class="pHr"></div>';
echo '<div class="merits">';
if ($this->profile->steamid) {
    echo '<div><img src="' . _SITEDIR_ . 'public/images/img/steamverie.jpg" title=""></div>';
}
if ($this->profile->role != 'guest' && $this->profile->role != 'claim') {
    echo '<div><img src="' . _SITEDIR_ . 'public/images/img/verifieduser.jpg" title=""></div>';
Example #9
0
    <div id="status"></div>

    <?php 
if (Request::getRole() == 'admin') {
    echo '<div class="formRow">' . '<input type="hidden" id="nid" value="0">' . '<div class="formRowTitle w350"><input class="w350" type="text" id="name" placeholder="{L:NEWS_NAME}"></div>' . '<div class="formRowField m380"><div class="btn" onclick="' . ajaxLoad(url('admin', 'add_news'), 'add_news', '#name!|#nid!') . '">{L:NEWS_ADD}</div></div>' . '</div>';
}
?>

    <div><legend>{L:NEWS_LIST}:</legend></div>
    <?php 
echo '<div id="news_list" class="drop_list">';
if ($this->list) {
    foreach ($this->list as $value) {
        if ($value->status == 1) {
            $status = '<span class="c_green">{L:NEWS_SHOWN}</span>';
        } else {
            $status = '<span class="c_red">{L:NEWS_HIDDEN}</span>';
        }
        echo '<div id="n_' . $value->id . '">' . '<a href="' . url('admin', 'lang_news', $value->id) . '">' . $value->name . ' (ID:' . $value->id . ')</a>' . ' (' . $status . ')';
        if (Request::getRole() == 'admin') {
            echo ' - <a onclick="' . ajaxLoad(url('admin', 'act_news'), 'act_news', 'act:approve|id:' . $value->id) . '">{L:NEWS_APPROVE_' . $value->status . '}</a>';
            if (Request::getParam('user')->id == 1) {
                echo ' | <a onclick="' . ajaxLoad(url('admin', 'act_news'), 'act_news', 'act:delete|id:' . $value->id) . '">{L:NEWS_DELETE}</a>';
            }
        }
        echo '</div>';
    }
}
echo '</div>';
?>
</div>
Example #10
0
        <div id="dialog" class="matchChatBody">
            <?php 
    while ($list = mysqli_fetch_object($this->list)) {
        $value = (array) $list;
        echo '<div class="chat_message">' . '<div class="chat_img"><a href="' . url($value['uid']) . '" target="_blank"><img src="' . getAvatar($value['uid'], 's') . '" alt="avatar"/></a></div>' . '<div class="chat_text">' . '<div><span class="chat_nickname" onclick="chatNickname(\'' . $value['uName'] . '\');">' . $value['uName'] . '</span> <span class="chat_time">' . printTime($value['time']) . '</span></div>' . '<div>' . $value['message'] . '</div>' . '</div>' . '</div>';
        setSession('match_chat_lid' . $list->mid, $list->id);
    }
    ?>
        </div>

        <script>
            chatScroll('dialog');
        </script>

        <div class="chatInput">
            <input id="msg" class="chatMsg" type="text" autocomplete="off" maxlength="1000">
            <div class="chatSubmit" onclick="<?php 
    echo ajaxLoad(url('matchsendchat'), 'chat_get', '#msg|mid:' . $this->match->id, 'ajaxFocus');
    ?>
">{L:MATCH_CHAT_SEND}</div>
        </div>
    </div>

    <!-- END CHAT -->

    <div class="clear"></div>

<?php 
}
?>
<!-- END CONTENT -->
Example #11
0
        <?php 
$list = array_reverse((array) $this->list);
if ($list) {
    foreach ($list as $value) {
        echo '<div class="chat_message">' . '<div class="chat_img"><a href="' . url($value['uid']) . '" target="_blank"><img src="' . getAvatar($value['uid'], 's') . '"></a></div>' . '<div class="chat_text">' . '<div><span class="chat_nickname">' . $value['name'] . '</span> <span class="chat_time">' . printTime($value['time']) . '</span></div>' . '<div>' . $value['message'] . '</div>' . '</div>' . '</div>';
        setSession('mail_last_message' . $value['did'], $value['id']);
    }
}
?>
    </div>

    <script>
        var height = winH()-450;
        if (height < 400)
            height = 400;
        $('#dialog, #userList').css('max-height', height);
        chatScroll('dialog');
    </script>

    <div class="chatInput">
        <input type="hidden" id="hash" value="<?php 
echo $this->hash;
?>
">
        <input id="msg" class="chatMsg" type="text" autocomplete="off" maxlength="1000">
        <div class="chatSubmit" onclick="<?php 
echo ajaxLoad(url('mail', 'send'), 'mail_send', '#msg|#hash!', 'ajaxScroll|ajaxFocus');
?>
">{L:MAIL_SEND}</div>
    </div>
</div>
<h1>{L:INDEX_VERIFY_USERS}</h1>

<?php 
while ($list = mysqli_fetch_object($this->list)) {
    echo '<div>';
    echo '<a href="' . url($list->id) . '">' . $list->nickname . '</a>';
    echo ' <span id="verify' . $list->id . '">(';
    echo '<a onclick="' . ajaxLoad(url('admin', 'verify_users_submit'), 'verifys', 'id:' . $list->id) . '">' . Lang::translate('VERIFY_USERS_SUBMIT') . '</a> | ';
    echo '<a onclick="' . ajaxLoad(url('admin', 'verify_users_reject'), 'verifyr', 'id:' . $list->id) . '">' . Lang::translate('VERIFY_USERS_REJECT') . '</a>';
    echo ')</span>';
    echo ' / Steam ';
    if ($list->steamid) {
        echo '<span class="c_green">&#10004;</span>';
    } else {
        echo '<span class="c_red">&#10006;</span>';
    }
    echo '</div>';
}
Example #13
0
    <li><a href="{URL:friends/incoming}">{L:REQUESTS_LINK} <?php 
echo Request::getParam('countRequests') > 0 ? '(+' . Request::getParam('countRequests') . ')' : '';
?>
</a></li>
    <li><a class="active" href="{URL:friends/blacklist}">{L:BLACKLIST_TITLE}</a></li>
</ul>

<?php 
if (getCookie('error')) {
    echo getCookie('error');
}
echo '<div class="inbox clearfix">';
if (count($this->blacklist) > 0) {
    foreach ($this->blacklist as $friend) {
        $id = $friend->uid == Request::getParam('user')->id ? $friend->pid : $friend->uid;
        echo '<div class="tile">';
        echo '<div class="tileImg">';
        echo '<img src="' . getAvatar($id) . '">';
        echo '<a href="' . url($id) . '"></a>';
        echo '</div>';
        echo '<div class="tileInfo">';
        echo '<div><a class="tileName" href="' . url($id) . '">' . $friend->name . '</a></div>';
        echo '<div>' . getRank($friend->elo) . '</div>';
        echo '<a class="mailBtn" href="{URL:mail' . $id . '}" title="{L:INDEX_SEND_MAIL}"></a>';
        echo '<a class="challengeBtn" onclick="' . ajaxLoad(url('friends', 'cancelBan'), 'reqest', 'pid:' . $id) . '">{L:BLACKLIST_BAN_CANCEL}</a>';
        echo '</div>';
        echo '</div>';
    }
}
echo '</div>';
echo '<div class="pagin">' . Pagination::printPagination() . '</div>';
Example #14
0
<script>
    function searchUsers() {
        <?php 
echo ajaxLoad(url('admin', 'search_users'), 'process', '#uid!|#nickname!|#steamid!|#role!|page:1');
?>
    }
</script>

<div class="box">
    <h1>{L:USERS_TITLE}</h1>

    <div class="usersSearch">
        <input type="text" id="uid" placeholder="{L:USERS_ID}" style="width: 90px;"/>
        <input type="text" id="nickname" placeholder="{L:USERS_NICKNAME}" style="width: 150px;"/>
        <input type="text" id="steamid" placeholder="{L:USERS_STEAMID}" style="width: 150px;"/>
        <select id="role" onchange="searchUsers();">
            <option value="">{L:USERS_ALL}</option>
            <option value="claim">{L:USERS_CLAIM}</option>
            <option value="user">{L:USERS_USER}</option>
            <option value="moder">{L:USERS_MODER}</option>
            <option value="admin">{L:USERS_ADMIN}</option>
            <option value="ban">{L:USERS_BANNED}</option>
        </select>
        <button class="btn" onclick="searchUsers();">{L:USERS_SEARCH}</button>
    </div>

    <div id="listing"></div>
</div>
Example #15
0
<a class="btn" href="{URL:profile/read_all_notice}" style="float: right;">{L:NOTICE_READ_ALL}</a>
<h1>{L:NOTICE_TITLE}</h1>

<table class="case-table">
    <tr>
        <th style="width: 150px;">{L:NOTICE_TIME}</th>
        <th>{L:NOTICE_MESSAGE}</th>
        <th style="width: 150px;">{L:NOTICE_ACTION}</th>
    </tr>

    <?php 
while ($list = mysqli_fetch_object($this->list)) {
    echo '<tr ' . ($list->read == 0 ? 'class="gray"' : '') . '>' . '<td style="font-size: 12px;">' . printTime($list->time, "H:i / m.d.Y") . '</td>' . '<td style="font-size: 12px;">' . reFilter($list->text) . '</td>' . '<td>';
    if ($list->read == 0) {
        echo '<div id="nt' . $list->id . '"><div class="btn" onclick="' . ajaxLoad(url('profile', 'read_notice'), 'read_notice', 'id:' . $list->id) . ' delClass(this);">{L:NOTICE_READ}</div></div>';
    } else {
        echo '-';
    }
    echo '</td>';
    echo '</tr>';
}
?>
</table>
<?php 
echo '<div class="pagin">' . Pagination::printPagination() . '</div>';
Example #16
0
        <?php 
echo ajaxLoad(url('admin', 'servers', 'edit', "' + id + '"), 'edit', '', 'editForm');
?>
;
    }

    function getServers(){
        <?php 
echo ajaxLoad(url('admin', 'servers', 'get'), 'get');
?>
;
    }

    function delServer(sid) {
        <?php 
echo ajaxLoad(url('admin', 'servers', 'delete', "' + sid + '"), 'delete', '', 'getServers');
?>
;
    }

    $(function(){
        getServers();
        hideForm();
    });
</script>

<div>
    <h1>{L:SERVERS_HEAD}</h1>

    <div>
        <div id="form">
Example #17
0
 public static function ajaxPagination($count = 2, $separate = 'span', $data = array())
 {
     $html = null;
     if (self::$page > 1) {
         $html .= '<' . $separate . '><a href="' . $data['href'] . '" onclick="' . ajaxLoad($data['url'], $data['permit'], $data['fields'] . 'page:' . (self::$page - 1)) . '" title="' . Lang::translate('PAGINATION_PREV') . '">' . Lang::translate('PAGINATION_PREV') . '</a></' . $separate . '>';
     }
     if (self::$page > $count) {
         $from = self::$page - $count;
     } else {
         $from = 1;
     }
     if (self::$countPage - self::$page >= $count) {
         $to = self::$page + $count;
     } else {
         $to = self::$countPage;
     }
     if (self::$page > $count + 1) {
         $html .= '<' . $separate . '><a href="' . $data['href'] . '" onclick="' . ajaxLoad($data['url'], $data['permit'], $data['fields'] . 'page:1') . '">1</a></' . $separate . '>';
     }
     if (self::$page > $count + 2) {
         $html .= '<' . $separate . '><a class="interspace">...</a></' . $separate . '>';
     }
     for ($from; $from <= $to; $from++) {
         if (self::$page == $from) {
             $html .= '<' . $separate . '><a class="active">' . $from . '</a></' . $separate . '>';
         } else {
             $html .= '<' . $separate . '><a href="' . $data['href'] . '" onclick="' . ajaxLoad($data['url'], $data['permit'], $data['fields'] . 'page:' . $from) . '">' . $from . '</a></' . $separate . '>';
         }
     }
     if (self::$page + $count < self::$countPage - 1) {
         $html .= '<' . $separate . '><a class="interspace">...</a></' . $separate . '>';
     }
     if (self::$page + $count < self::$countPage) {
         $html .= '<' . $separate . '><a href="' . $data['href'] . '" onclick="' . ajaxLoad($data['url'], $data['permit'], $data['fields'] . 'page:' . self::$countPage) . '">' . self::$countPage . '</a></' . $separate . '>';
     }
     if (self::$page < self::$countPage) {
         $html .= '<' . $separate . '><a href="' . $data['href'] . '" onclick="' . ajaxLoad($data['url'], $data['permit'], $data['fields'] . 'page:' . (self::$page + 1)) . '" title="' . Lang::translate('PAGINATION_NEXT') . '">' . Lang::translate('PAGINATION_NEXT') . '</a></' . $separate . '>';
     }
     return $html;
 }
Example #18
0
</div>



<?php 
if (getCookie('error')) {
    echo getCookie('error');
}
echo '<div class="inbox clearfix">';
if (count($this->incoming) > 0) {
    foreach ($this->incoming as $friend) {
        $id = $friend->uid == Request::getParam('user')->id ? $friend->pid : $friend->uid;
        echo '<div class="tile">';
        echo '<div class="tileImg">';
        echo '<img src="' . getAvatar($id) . '">';
        echo '<a href="' . url($id) . '"></a>';
        echo '</div>';
        echo '<div class="tileInfo">';
        echo '<div><a class="tileName" href="' . url($id) . '">' . $friend->name . '</a></div>';
        echo '<div>' . getRank($friend->elo) . '</div>';
        echo '<div class="yes">';
        echo '<a href="" class="due" onclick="' . ajaxLoad(url('friends', 'acceptRequest'), 'reqest', 'pid:' . $id) . '">{L:INCOMING_REQEST_SENT_TO_ACCEPT}</a>';
        echo '<a href="" class="due1" onclick="' . ajaxLoad(url('friends', 'declineRequest'), 'reqest', 'pid:' . $id) . '">{L:INCOMING_REQEST_SENT_TO_DECLINE}</a>';
        echo '</div>';
        echo '</div>';
        echo '</div>';
    }
}
echo '</div>';
echo '<div class="pagin">' . Pagination::printPagination() . '</div>';