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


PHP SmrSession::retrieveVar方法代码示例

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


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

示例1: get_file_loc

 // *
 // * g e t   S e s s i o n
 // *
 // ********************************
 $sn = $_REQUEST['sn'];
 // check if we got a sn number with our url
 if (empty($sn)) {
     if (!USING_AJAX) {
         require_once get_file_loc('smr.inc');
         create_error('Your browser lost the SN. Try to reload the page!');
     } else {
         exit;
     }
 }
 // do we have such a container object in the db?
 if (!($var = SmrSession::retrieveVar($sn))) {
     if (!USING_AJAX) {
         require_once get_file_loc('smr.inc');
         create_error('Please avoid using the back button!');
     } else {
         exit;
     }
 }
 //used for include if we need a spec game script outside of the game
 $overrideGameID = 0;
 if (isset($var['game_id']) && is_numeric($var['game_id'])) {
     $overrideGameID = $var['game_id'];
 }
 if ($overrideGameID == 0 && isset($var['GameID']) && is_numeric($var['GameID'])) {
     $overrideGameID = $var['GameID'];
 }
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:loader.php

示例2:

                        $template->assign('MoveMessage', 'You have just checkmated your opponent, congratulations!');
                        break;
                    case 2:
                        $template->assign('MoveMessage', 'There is no piece in that square.');
                        break;
                    case 3:
                        $template->assign('MoveMessage', 'You cannot end your turn in check.');
                        break;
                    case 4:
                        $template->assign('MoveMessage', 'It is not your turn to move.');
                        break;
                    case 5:
                        $template->assign('MoveMessage', 'The game is over.');
                        break;
                }
            } else {
                //				this.logger.error('Player tried to move from an empty tile: username = ' + username + ', x = ' + xIn + ', y = ' + yIn + ', toX = ' + toXIn + ', toY = ' + toYIn);
            }
        } else {
            //			this.logger.error('Player tried to move in an ended game');
            $template->assign('MoveMessage', 'It is not your turn to move.');
        }
    } else {
        $template->assign('MoveMessage', 'This game is over.');
        //		this.logger.error('Player tried to move when it was not their turn: x = ' + xIn + ', y = ' + yIn + ', toX = ' + toXIn + ', toY = ' + toYIn);
    }
} else {
    //	this.logger.error('Player supplied an invalid number: x = ' + xIn + ', y = ' + yIn + ', toX = ' + toXIn + ', toY = ' + toYIn);
}
$var = SmrSession::retrieveVar(SmrSession::$lastSN);
do_voodoo();
开发者ID:smrealms,项目名称:smrv2.0,代码行数:31,代码来源:chess_move_processing.php


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