Пример #1
0
    $result = mysql_query($qry);
    $matchid = mysql_insert_id();
    if (!$result) {
        logError($qry . " - " . mysql_error());
    }
    for ($i = 0; $i < count($_POST['player']); $i++) {
        $playerid = $_POST['player'][$i];
        $qry = "INSERT INTO {$_SESSION['DB_PREFIX']}matchplayerdetails \n\t\t\t\t\t(\n\t\t\t\t\t\tmatchid, playerid, metacreateduserid, metamodifieduserid, \n\t\t\t\t\t\tmetacreateddate, metamodifieddate\n\t\t\t\t\t)\n\t\t\t\t\tVALUES\n\t\t\t\t\t(\n\t\t\t\t\t\t{$matchid}, {$playerid}, {$memberid}, {$memberid}, \n\t\t\t\t\t\tNOW(), NOW()\n\t\t\t\t\t)";
        $result = mysql_query($qry);
        if (!$result) {
            logError($qry . " - " . mysql_error());
        }
    }
    $details = "Match report attached for match on " . $_POST['matchdate'];
    $file = "uploads/matchcard{$id}" . session_id() . ".pdf";
    $report = new MatchCardReport('P', 'mm', 'A4', $matchid);
    $report->Output($file, "F");
    sendTeamMessage($teamid, "Match Report Confirmed", $details, "", array($file));
    sendRoleMessage("LEAGUE", "Match Report Confirmed", $details, "", array($file));
    if ($_POST['refereescore'] < 50 && $_POST['refereescore'] > 0) {
        $refname = GetRefereeName($refereeid);
        $refdetails = "Referee {$refname} has scored {$refereescore}<br><br>Report:<br>" . $_POST['refereeremarks'];
        smtpmailer(getSiteConfigData()->refereereportemail, "*****@*****.**", $_SESSION['SESS_TEAM_EMAIL'], "Referee Report", $refdetails);
    }
} catch (Exception $e) {
    logError("Signing image: " . $e->getMessage());
}
mysql_query("COMMIT");
header("location: matchconfirm.php?id={$matchid}");
?>
		
Пример #2
0
<?php

require_once 'matchcardreport.php';
$report = new MatchCardReport('P', 'mm', 'A4', $_GET['id']);
$report->Output();