本文整理汇总了PHP中Match::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Match::delete方法的具体用法?PHP Match::delete怎么用?PHP Match::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Match
的用法示例。
在下文中一共展示了Match::delete方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: matchActions
public static function matchActions($IS_LOCAL_ADMIN)
{
// Admin actions made?
if (isset($_GET['action']) && $IS_LOCAL_ADMIN) {
$match = new Match((int) $_GET['mid']);
switch ($_GET['action']) {
case 'lock':
status($match->setLocked(true));
break;
case 'unlock':
status($match->setLocked(false));
break;
case 'delete':
status($match->delete());
break;
case 'reset':
status($match->reset());
break;
}
} else {
if (isset($_GET['action'])) {
status(false, 'Sorry, you do not have permission to do that.');
}
}
}
示例2: intval
require_once e_PLUGIN . "ebattles/include/main.php";
require_once e_PLUGIN . "ebattles/include/match.php";
require_once e_PLUGIN . "ebattles/include/event.php";
/*******************************************************************
********************************************************************/
require_once HEADERF;
global $sql;
$text = '';
/* Event Name */
$event_id = intval($_GET['eventid']);
if (!$event_id) {
header("Location: ./events.php");
exit;
}
if (!isset($_POST['deletematch'])) {
$text .= '<br />' . EB_MATCHDEL_L2 . '<br />';
} else {
$event = new Event($event_id);
$match_id = $_POST['matchid'];
$match = new Match($match_id);
$match->delete();
if ($event->getField('FixturesEnable') == TRUE) {
$event->brackets(true);
}
$text .= '<br />' . EB_MATCHDEL_L3 . '<br />';
header("Location: eventinfo.php?eventid={$event_id}");
}
$text .= '<br />' . EB_MATCHDEL_L4 . ' [<a href="' . e_PLUGIN . 'ebattles/eventinfo.php?eventid=' . $event_id . '">' . EB_MATCHDEL_L5 . '</a>]<br />';
$ns->tablerender(EB_MATCHDEL_L1, $text);
require_once FOOTERF;
exit;
示例3: deleteTeamMatches
function deleteTeamMatches($team_id)
{
global $sql;
$q = "SELECT " . TBL_MATCHS . ".*, " . TBL_SCORES . ".*" . " FROM " . TBL_MATCHS . ", " . TBL_SCORES . " WHERE (" . TBL_SCORES . ".MatchID = " . TBL_MATCHS . ".MatchID)" . " AND (" . TBL_SCORES . ".Team = '{$team_id}')";
$result = $sql->db_Query($q);
$num_matches = mysql_numrows($result);
echo "<br>team_id {$team_id}";
echo "<br>num_matches {$num_matches}";
if ($num_matches != 0) {
for ($j = 0; $j < $num_matches; $j++) {
set_time_limit(10);
$match_id = mysql_result($result, $j, TBL_MATCHS . ".MatchID");
$match = new Match($match_id);
$match->delete();
}
}
}