コード例 #1
0
function CalculateScoreForOne($badgeid)
{
    $lastday = GetLastDayForAttendance();
    $ac = EventCounts($lastday);
    $meetingtable = GetSqlTable("EventTimes", "ORDER BY StartTime");
    $c = $ac[0] + $ac[1];
    // Count of manditory and Regular meetings.
    $s = CalculateAttendanceScore($badgeid, $meetingtable, $lastday, $c);
    $score["LastDay"] = $lastday;
    $score["Counts"] = $ac;
    return array_merge($score, $s);
}
コード例 #2
0
ファイル: SignupSoloEvents.php プロジェクト: poetimp/ltcsw
      <?php 
$results = $db->query("select FirstName,\n                                        LastName,\n                                        ParticipantID,\n                                        Grade\n                                 from   {$ParticipantsTable}\n                                 where  ChurchID = {$ChurchID}\n                                 order  by LastName\n                                ") or die("Can not get Participant List:" . sqlError());
$count = 0;
?>
         <table border="1" width="100%">
            <tr>
               <td width="70" align=center bgcolor="#000000"><font color="#FFFF00">Team</font></td>
               <td width="70" align=center bgcolor="#000000"><font color="#FFFF00">Individual</font></td>
               <td width="70" align=center bgcolor="#000000"><font color="#FFFF00">Grade</font></td>
               <td width="70" align=center bgcolor="#000000"><font color="#FFFF00">ID Number</font></td>
               <td align="left" bgcolor="#000000"><font color="#FFFF00">Participant</font></td>
            </tr>
         <?php 
while ($row = $results->fetch(PDO::FETCH_ASSOC)) {
    $ParticipantID = $row['ParticipantID'];
    $EventCounts = EventCounts($ParticipantID);
    $TeamEvents = $EventCounts['Team'];
    $IndivEvents = $EventCounts['Solo'];
    ?>
            <tr>
               <td width="70" align="center"> <?php 
    print $TeamEvents;
    ?>
</td>
               <td width="70" align="center"> <?php 
    print $IndivEvents;
    ?>
</td>
               <td width="70" align="center"> <?php 
    print $row['Grade'];
    ?>
コード例 #3
0
ファイル: RptSeniors.php プロジェクト: poetimp/ltcsw
          Seniors
       </title>
    </head>

    <body bgcolor="White">
    <h1 align="center">All Seniors</h1>
    <hr>
    <?php 
$results = $db->query("select   p.ParticipantID,\n                                          p.FirstName,\n                                          p.LastName,\n                                          p.Email,\n                                          p.Phone,\n                                          p.Grade,\n                                          p.Comments,\n                                          p.Address,\n                                          p.City,\n                                          p.State,\n                                          p.Zip,\n                                          c.ChurchName\n                                 from     {$ParticipantsTable} p,\n                                          {$ChurchesTable}     c\n                                 where    p.ChurchID = c.ChurchID\n                                 and      p.Grade    = 12\n                                 order by LastName,\n                                          FirstName") or die("Not found:" . sqlError());
$first = 1;
?>
         <table border="1" width="100%">
         <?php 
while ($row = $results->fetch(PDO::FETCH_ASSOC)) {
    $ParticipantID = $row['ParticipantID'];
    $eventTypeCount = EventCounts($ParticipantID);
    $eventCount = $eventTypeCount['Team'] + $eventTypeCount['Solo'];
    if ($eventCount > 0) {
        $Name = $row['LastName'] . ", " . $row['FirstName'];
        $Email = $row['Email'];
        $Phone = $row['Phone'];
        $Grade = $row['Grade'];
        $Comment = $row['Comments'];
        $Address = $row['Address'];
        $City = $row['City'];
        $State = $row['State'];
        $Zip = $row['Zip'];
        $Church = $row['ChurchName'];
        if ($Comment == '') {
            $Comment = "&nbsp;";
        }