canCreateMatch($_POST['gameID'], $_POST['opponentID'], $_POST['eventID']) ) { $sql = "INSERT IGNORE INTO s_matches SET gameID = ". intval($_POST['gameID']) .", date = ". $sdb->quote_smart("{$_POST['year']}-{$_POST['month']}-{$_POST['day']}") .", opponentID = ". intval($_POST['opponentID']) .", eventID = ". intval($_POST['eventID']) .", map = ". $sdb->quote_smart($_POST['map']) .", details = ". $sdb->quote_smart($_POST['details']) .", played = ". intval($_POST['played']) .", score1 = ". intval($_POST['score1']) .", score2 = ". intval($_POST['score2']); $sdb->get_query($sql); if (!mysql_affected_rows()) { ?>
Such match already exists.
Match saved.
saveImg('image', UPLOAD_DIR .'matches_'. mysql_insert_id(), MATCHES_IMG_WIDTH, MATCHES_IMG_HEIGHT, 3); // zapis udany if ($status[0]) { $sql = "UPDATE s_matches SET img_type='{$status[1]}' WHERE matchID=". mysql_insert_id() ." LIMIT 1"; $sdb->get_query($sql); } else { ?>
canCreateMatch($_POST['gameID'], $_POST['opponentID'], $_POST['eventID'])) { ?>
Please fill all required fields (game, date, opponent, event), and make sure date is correct.
canCreateMatch($_POST['gameID'], $_POST['opponentID'], $_POST['eventID'])) { ?>
Please fill all required fields (game, date, opponent, event), and make sure date is correct.
Opponent and Event must match the game.
get_query("SELECT img_type FROM s_matches WHERE matchID=". intval($_GET['matchID'])),0); if (file_exists($file)) { @unlink($file); } $sql = "DELETE FROM s_matches WHERE matchID=". intval($_GET['matchID']) ." LIMIT 1"; $sdb->get_query($sql); ?>
Match was removed.
Matches
>
get_query($sql); if (mysql_num_rows($res)) { ?>
Matches List
Event Category Date Played Modify Delete
Modify Delete