本文整理汇总了PHP中game::selectTotal方法的典型用法代码示例。如果您正苦于以下问题:PHP game::selectTotal方法的具体用法?PHP game::selectTotal怎么用?PHP game::selectTotal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类game
的用法示例。
在下文中一共展示了game::selectTotal方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: game
//引用用户功能
require_once "../event/game.php";
// 初始化
$game = new game();
$key = $request['key'];
if (isset($request['_'])) {
$key = $request['_'];
}
if ($key == 'get_select') {
$info = $game->selectStatus();
$start = $info['start_time'];
$end = $info['end_time'];
$time = $end - $start;
$value = array('status' => $info['status'], 'time' => $info['end_time'], 'interval' => $end - time(), 'go' => array(), 'res' => array());
for ($i = 0; $i <= 9; $i++) {
$value['res'][$i] = $game->selectTotal($i, $time);
}
$total = $game->selectTotal($info['selected'], $time);
$number = 0;
if ($total) {
$number = ceil($game->getTotal($time) / $total);
}
$value['go'] = array('selected' => $info['selected'], 'right' => $game->selectTotal($info['selected'], $time, $request['uid']), 'income' => $number);
echo json_encode($value);
}
// 添加选择
if ($key == 'set_user_select') {
$user = $request['uid'];
$tag = $request['tag'];
$selected = $request['select'];
if ($tag && $user && $selected) {