Exemplo n.º 1
0
        if (isset($_POST['updEmail']) and $_POST['updEmail'] == 'on') {
            print 'checked';
        }
        ?>
> Update Email</td>
                  <?php 
    }
    ?>
               </td>
            </tr>
            <tr>
               <td width="12%">Church</td>
               <td width="85%" colspan="5">
               <?php 
    if ($mode == 'view') {
        $ChurchName = ChurchName($row['ChurchID']);
        print $ChurchName;
    } else {
        ?>
                  <select size="1" name="ChurchID">
                  <option value="0">Select Church</option>
                  <?php 
        $results = $db->query("select   ChurchName,\n                                                      ChurchID\n                                             from     {$ChurchesTable}\n                                             order by ChurchName\n                                          ") or die("Not found:" . sqlError());
        while ($row = $results->fetch(PDO::FETCH_ASSOC)) {
            $selected = $NewChurchID == $row['ChurchID'] ? "selected" : "";
            print "<option value=\"" . $row['ChurchID'] . "\" " . $selected . ">" . $row['ChurchName'] . "</option>";
        }
        ?>
                  </select>
                  <?php 
    }
Exemplo n.º 2
0
function PrintReport($ChurchID)
{
    $ChurchName = ChurchName($ChurchID);
    $costDetail = ChurchExpenses($ChurchID);
    //-----------------------------------------------------------------------
    // Get the cost for various items
    //-----------------------------------------------------------------------
    $price = GetPrices();
    $RegCost = $price["Registration"];
    $ShirtCost = $price["Shirt"];
    $AdultMealCost = $price["AdultMeal"];
    $ChildMealCost = $price["ChildMeal"];
    //-----------------------------------------------------------------------
    // Get the Counts for various items purchased
    //-----------------------------------------------------------------------
    $ParticipantCount = $costDetail["ParticipantCount"];
    $ExtraAdultMealCount = $costDetail["ExtraAdultMealCount"];
    $ExtraChildMealCount = $costDetail["ExtraChildMealCount"];
    $ExtraShirtCount = $costDetail["ExtraShirtCount"];
    //-----------------------------------------------------------------------
    // Get the cost for various items Purchased
    //-----------------------------------------------------------------------
    $costParticipant = $costDetail["Participant"];
    $costExtraAdultMeals = $costDetail["ExtraAdultMeals"];
    $costExtraChildMeals = $costDetail["ExtraChildMeals"];
    $costExtraShirts = $costDetail["ExtraShirts"];
    $costTotal = $costDetail["Total"];
    $costBalance = $costDetail["Balance"];
    $MoneyInOut = $costDetail["MoneyInOut"];
    if ($costBalance > 0) {
        $balanceCarity = 'Due';
    } else {
        if ($costBalance < 0) {
            $balanceCarity = 'Credit';
        } else {
            $balanceCarity = '';
        }
    }
    //-----------------------------------------------------------------------
    // Display to the user
    //-----------------------------------------------------------------------
    ?>
      <h1 align="center">Expense Report</h1>
      <h1 align="center">For: <?php 
    print "{$ChurchName}";
    ?>
</h1>

      <table border="1" width="100%">
         <tr>
            <td width="25%">Registered Participants</td>
            <td width="25%" align="center"><?php 
    print $ParticipantCount;
    ?>
</td>
            <td width="25%" align="center">x <?php 
    print FormatMoney($RegCost);
    ?>
</td>
            <td width="25%" align="right"><?php 
    print FormatMoney($costParticipant);
    ?>
</td>
         </tr>
         <tr>
            <td width="25%">Extra Adult Meal Tickets</td>
            <td width="25%" align="center"><?php 
    print $ExtraAdultMealCount;
    ?>
</td>
            <td width="25%" align="center">x <?php 
    print FormatMoney($AdultMealCost);
    ?>
</td>
            <td width="25%" align="right"><?php 
    print FormatMoney($costExtraAdultMeals);
    ?>
</td>
         </tr>
         <tr>
            <td width="25%">Extra Child Meal Tickets</td>
            <td width="25%" align="center"><?php 
    print $ExtraChildMealCount;
    ?>
</td>
            <td width="25%" align="center">x <?php 
    print FormatMoney($ChildMealCost);
    ?>
</td>
            <td width="25%" align="right"><?php 
    print FormatMoney($costExtraChildMeals);
    ?>
</td>
         </tr>
         <tr>
            <td width="25%">Extra T-Shirts</td>
            <td width="25%" align="center"><?php 
    print $ExtraShirtCount;
    ?>
</td>
            <td width="25%" align="center">x <?php 
    print FormatMoney($ShirtCost);
    ?>
</td>
            <td width="25%" align="right"><?php 
    print FormatMoney($costExtraShirts);
    ?>
</td>
         </tr>
         <tr>
            <td width="50%" colspan=2>&nbsp;</td>
            <td width="25%" align="right">Total:</td>
            <td width="25%" align="right"><?php 
    print FormatMoney($costTotal);
    ?>
</td>
         </tr>
         <tr>
            <td width="50%" colspan=2>&nbsp;</td>
            <td width="25%" align="right">Monies Received:</td>
            <td width="25%" align="right"><?php 
    print FormatMoney($MoneyInOut);
    ?>
</td>
         </tr>
         <tr>
            <td width="50%" colspan=2>&nbsp;</td>
            <td width="25%" align="right">Balance <?php 
    print $balanceCarity;
    ?>
:</td>
            <td width="25%" align="right"><?php 
    print FormatMoney($costBalance);
    ?>
</td>
         </tr>
      </table>
      <?php 
}
Exemplo n.º 3
0
        ?>
"><?php 
        print $ChurchName;
        ?>
</option>
                     <?php 
    }
    ?>
               </select>
            </p>
            <?php 
} else {
    //==================================================================================
    // Church was selected so give opportunity to add a transaction
    //==================================================================================
    $ChurchName = ChurchName($ChurchID);
    //==================================================================================
    // First show current transaction history
    //==================================================================================
    ?>
            <h2 align="center">for<br><?php 
    print "{$ChurchName}</h2>";
    ?>

            <input type=hidden name=ChurchID <?php 
    print "value={$ChurchID}";
    ?>
>
            <table border=1 width=100%>
               <tr>
                  <td colspan=4 bgcolor=#000000 align=center><font color=#FFFF00>History</font></td>
Exemplo n.º 4
0
        }
        ?>
            </table>
            <?php 
    } else {
        ?>
               <p align="center"><i>No Judges Assigned</i></p>
            <?php 
    }
}
if ($AdminReport) {
    $ChuchList = ChurchesRegistered();
    if (count($ChuchList) > 0) {
        foreach ($ChuchList as $ChurchID => $ChurchName) {
            PrintRoster($ChurchID, $ChurchName);
        }
    } else {
        ?>
               <center>
                  <h1>No churches with participating registrants have been defined</h1>
                  <h2>Judges report is empty</h2>
               </center>
            <?php 
    }
} else {
    PrintRoster($ChurchID, ChurchName($ChurchID));
}
?>
   </body>

</html>