本文整理汇总了PHP中Game::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Game::delete方法的具体用法?PHP Game::delete怎么用?PHP Game::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Game
的用法示例。
在下文中一共展示了Game::delete方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: test_token
Flash::store('Admin Update FAILED !', true);
// redirect kills form resubmission
}
}
if (isset($_POST['game_action'])) {
test_token();
try {
switch ($_POST['game_action']) {
case 'pause':
Game::pause($_POST['ids']);
break;
case 'unpause':
Game::pause($_POST['ids'], false);
break;
case 'delete':
Game::delete($_POST['ids']);
break;
default:
break;
}
Flash::store('Admin Update Successfull', true);
// redirect kills form resubmission
} catch (MyException $e) {
Flash::store('Admin Update FAILED !', true);
// redirect kills form resubmission
}
}
if (isset($_POST['submit'])) {
test_token();
try {
// clear the submit and token fields
示例2: Game
$gameType = $_POST['gameType'];
$year = $_POST['year'];
$rating = $_POST['rating'];
$company = $_POST['company'];
try {
$game = new Game(null, $gameType, $name, $rating, $year, $company);
$game->save();
} catch (PDOException $exception) {
$return = false;
}
break;
case ActionType::ACTION_DELETE:
$id = $_POST['id'];
try {
$game = new Game($id, null, null, null, null, null);
$game->delete();
} catch (PDOException $exception) {
$return = false;
}
break;
case ActionType::ACTION_MODIFY:
$name = $_POST['name'];
$gameType = $_POST['gameType'];
$year = $_POST['year'];
$rating = $_POST['rating'];
$company = $_POST['company'];
$gameTable = new GameTable();
$game = $gameTable->getById($_POST['id']);
$game->modify($gameType, $name, $rating, $year, $company);
$game->save();
break;
示例3: Member
* License: http://www.bluethrust.com/license.php
*
*/
include_once "../../../../_setup.php";
include_once "../../../../classes/member.php";
include_once "../../../../classes/rank.php";
include_once "../../../../classes/consoleoption.php";
include_once "../../../../classes/game.php";
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
$gameObj = new Game($mysqli);
$consoleObj = new ConsoleOption($mysqli);
$cID = $consoleObj->findConsoleIDByName("Manage Games Played");
$consoleObj->select($cID);
$_GET['cID'] = $cID;
if ($member->authorizeLogin($_SESSION['btPassword'])) {
$memberInfo = $member->get_info_filtered();
if ($member->hasAccess($consoleObj) && $gameObj->select($_POST['gID'])) {
define("MEMBERRANK_ID", $memberInfo['rank_id']);
if ($_POST['confirm'] == 1) {
$gameObj->delete();
//$gameObj->resortOrder();
include "main.php";
} else {
$gameName = $gameObj->get_info_filtered("name");
echo "<p align='center'>Are you sure you want to delete the game <b>" . $gameName . "</b>?</p>";
}
} elseif (!$gameObj->select($_POST['gID'])) {
echo "<p align='center'>Unable find the selected game. Please try again or contact the website administrator.</p>";
}
}
示例4: testDeleteInvalidPlayer
/**
* test deleting a Player that does not exist
*
* @expectedException PDOException
**/
public function testDeleteInvalidPlayer()
{
// Create a player and try to delete it without actually inserting it
$player = new Game(null, $this->player->getPlayerId());
$player->delete($this->getPDO());
}
示例5: Chat
$_SESSION['game_id'] = 0;
}
$Chat = new Chat((int) $_SESSION['player_id'], (int) $_SESSION['game_id']);
$Chat->send_message($_POST['chat'], isset($_POST['private']), isset($_POST['lobby']));
$return = $Chat->get_box_list(1);
$return = $return[0];
} catch (MyException $e) {
$return['error'] = 'ERROR: ' . $e->outputMessage();
}
echo json_encode($return);
exit;
}
// run the invites stuff
if (isset($_POST['action']) && 'delete' == $_POST['action']) {
try {
Game::delete($_POST['game_id']);
echo 'Game Deleted';
} catch (MyEception $e) {
echo 'ERROR: Could not delete game';
}
exit;
}
// init our game
$Game = new Game((int) $_SESSION['game_id']);
// run the game refresh check
if (isset($_POST['refresh'])) {
echo $Game->last_move;
exit;
}
// do some more validity checking for the rest of the functions
if (empty($DEBUG) && empty($_POST['notoken'])) {