当前位置: 首页>>代码示例>>PHP>>正文


PHP CR3DCQuery::v2IsUserPrimaryPlayer方法代码示例

本文整理汇总了PHP中CR3DCQuery::v2IsUserPrimaryPlayer方法的典型用法代码示例。如果您正苦于以下问题:PHP CR3DCQuery::v2IsUserPrimaryPlayer方法的具体用法?PHP CR3DCQuery::v2IsUserPrimaryPlayer怎么用?PHP CR3DCQuery::v2IsUserPrimaryPlayer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CR3DCQuery的用法示例。


在下文中一共展示了CR3DCQuery::v2IsUserPrimaryPlayer方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Array

// Manage the online players list
var aPlayerList = new Array();

<?php 
if (isset($_SESSION['sid'])) {
    $oR3DCQuery->v2OTMTimeOutOfflinePlayers($type, $tid);
    echo $oR3DCQuery->v2OTMGetOnlinePlayerListJAVA($type, $tid, $_SESSION['id']);
}
?>

try{

<?php 
// Manage the move processing
$strxmove = $oR3DCQuery->v2MakeTournamentGameMove_Vote($tgc, $type, $tid);
if ($strxmove != "" && $oR3DCQuery->v2IsUserPrimaryPlayer($_SESSION['id'], $type, $tid) == false) {
    list($from, $to, $xgameid) = explode(",", $strxmove, 3);
    echo "var browserVer=parseInt(navigator.appVersion);\n";
    echo "if(navigator.appName == \"Microsoft Internet Explorer\"){\n";
    ///////////////////
    // IE
    echo "top.frGameList.document." . $xgameid . ".document.frmMoveVote.txtmovefrom.value = '" . trim($from) . "';\n";
    echo "top.frGameList.document." . $xgameid . ".document.frmMoveVote.txtmoveto.value = '" . trim($to) . "';\n";
    echo "top.frGameList.document." . $xgameid . ".document.frmMoveVote.cmdMovexx.value = 'cmdMovexx';\n";
    echo "top.frGameList.document." . $xgameid . ".document.frmMoveVote.submit();\n";
    echo "}else{\n";
    ///////////////////
    // other
    echo "top.frGameList.document.getElementById(\"" . $xgameid . "\").contentDocument.frmMoveVote.txtmovefrom.value = '" . trim($from) . "';\n";
    echo "top.frGameList.document.getElementById(\"" . $xgameid . "\").contentDocument.frmMoveVote.txtmoveto.value = '" . trim($to) . "';\n";
    echo "top.frGameList.document.getElementById(\"" . $xgameid . "\").contentDocument.frmMoveVote.cmdMovexx.value = 'cmdMovexx';\n";
开发者ID:robertohernando,项目名称:phpchess,代码行数:31,代码来源:tv2p_handler.php

示例2: elseif

require $Root_Path . "includes/language.php";
////////////////////////////////////////////////////
//Instantiate the Classes
$oR3DCQuery = new CR3DCQuery($config);
////////////////////////////////////////////////////
$tgc = $_GET['tgc'];
$tid = $_GET['tid'];
$type = $_GET['type'];
$tzn = $_GET['tzn'];
$bPlayerHasAccess = false;
$bPrimaryPlayerHasAccess = false;
// Check if the user is logged in and has access to the man player tournament console
if (isset($_SESSION['sid']) && isset($_SESSION['user']) && isset($_SESSION['id'])) {
    if (is_numeric($_SESSION['id'])) {
        if ($oR3DCQuery->v2IsUserPlayer($tgc, $_SESSION['id'], $type, $tid)) {
            if ($oR3DCQuery->v2IsUserPrimaryPlayer($_SESSION['id'], $type, $tid) == false) {
                $oR3DCQuery->v2ClearTournamentGameQueue($_SESSION['id'], $type, $tid);
                $bPlayerHasAccess = true;
            } elseif ($oR3DCQuery->v2IsUserPrimaryPlayer($_SESSION['id'], $type, $tid)) {
                $oR3DCQuery->v2ClearTournamentGameQueue($_SESSION['id'], $type, $tid);
                $bPrimaryPlayerHasAccess = true;
            }
        }
    }
}
$strStatus = $oR3DCQuery->v2GetTournamentGameTimeoutStatus($type, $tid, $tgc);
?>
<html>
<head>
<title></title>
<link rel="stylesheet" href="<?php 
开发者ID:robertohernando,项目名称:phpchess,代码行数:31,代码来源:tv2p_index.php


注:本文中的CR3DCQuery::v2IsUserPrimaryPlayer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。