Ejemplo n.º 1
0
//----------------------------------------------------------------------------
// This software is licensed under the MIT license. Use as you wish but give
// and take credit where due.
//
// Author: Paul Lemmons
//----------------------------------------------------------------------------
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">
<?php 
include 'include/RegFunctions.php';
if (isset($_POST['Confirm'])) {
    $db->query("delete from {$EventCoordTable}          where CoordID=" . $_REQUEST['CoordID']) or die("Unable to delete Coordinator record: " . sqlError());
    $db->query("update {$EventsTable}  set CoordID=NULL where CoordID=" . $_REQUEST['CoordID']) or die("Unable to delete registration record: " . sqlError());
    WriteToLog("Coordinator " . $_REQUEST['CoordID'] . " was deleted");
    ?>
      <head>
         <title>
            Coordinator Deleted
         </title>
      </head>
      <body style="background-color: rgb(217, 217, 255);">
         <h1 align=center>
            Coordinator <?php 
    print $_REQUEST['CoordName'];
    ?>
 Deleted!
         </h1>
         <?php 
    footer("Return to Coordinator List", "Coordinators.php");
Ejemplo n.º 2
0
            if ($Amount <= 0) {
                $errorMsg = "Amount must be greater than zero";
            } else {
                if ($Annotation == "") {
                    $errorMsg = "Please describe Transaction";
                } else {
                    //==================================================================================
                    // We were POSTed and the form validates. So process the information.
                    //==================================================================================
                    $errorMsg = "";
                    $TxType = $_POST['TxType'];
                    if ($TxType != 'Refund') {
                        $Amount *= -1;
                    }
                    $db->query("insert into {$MoneyTable}\n                         (Date,\n                          Amount,\n                          Annotation,\n                          ChurchID)\n                   values(now(),\n                          {$Amount},\n                          '{$Annotation}',\n                          {$ChurchID})\n                 ") or die("Unable to insert into Money table: " . sqlError());
                    WriteToLog(ChurchName($ChurchID) . " account updated by: \${$Amount}");
                    unset($_POST['Amount']);
                    unset($Amount);
                    unset($_POST['Annotation']);
                    unset($Annotation);
                    unset($_POST['TxType']);
                    unset($TxType);
                }
            }
        }
    }
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">
Ejemplo n.º 3
0
  // Age up or out all of the particpants
  //=========================================================================================
  $ParticipantList = $db->query("select ParticipantID,\n                                          Grade\n                                   from   {$ParticipantsTable}") or die("Unable to obtain participant List" . sqlError());
  while ($row = $ParticipantList->fetch(PDO::FETCH_ASSOC)) {
      $grade = $row['Grade'] + 1;
      $PID = $row['ParticipantID'];
      if ($grade > 12) {
          $db->query("delete from {$ParticipantsTable} where ParticipantID={$PID}") or die("Unable to delete aged out participant: {$PID}: " . sqlError());
      } else {
          $db->query("update {$ParticipantsTable} set Grade={$grade},Comments='' where ParticipantID={$PID}") or die("Unable to age up participant: {$PID}: " . sqlError());
      }
  }
  //=========================================================================================
  // Record what we did in the log
  //=========================================================================================
  WriteToLog("Database reinitalized");
  ?>
    <head>
       <title>
          Database prepared
       </title>
    </head>
    <body style="background-color: rgb(217, 217, 255);">
       <h1 align=center>
          Database has been cleared of previous year's data
       </h1>
       <?php 
  footer("", "");
  ?>
    </body>
 </html>
Ejemplo n.º 4
0
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    if ($ErrorMsg == "") {
        ereg_replace("'", "''", $EventName);
        if ($mode == 'update') {
            $sql = "update {$EventsTable}\n                    set EventName        = '{$EventName}'        ,\n                        TeamEvent        = '{$TeamEvent}'        ,\n                        ConvEvent        = '{$ConvEvent}'        ,\n                        MinGrade         = '{$MinGrade}'         ,\n                        MaxGrade         = '{$MaxGrade}'         ,\n                        MinSize          = '{$MinSize}'          ,\n                        MaxSize          = '{$MaxSize}'          ,\n                        Sex              = '{$Sex}'              ,\n                        JudgesNeeded     = '{$JudgesNeeded}'     ,\n                        MaxRooms         = '{$MaxRooms}'         ,\n                        MaxEventSlots    = '{$MaxEventSlots}'    ,\n                        MaxWebSlots      = '{$MaxWebSlots}'      ,\n                        Duration         = '{$Duration}'         ,\n                        JudgeTrained     = '{$JudgeTrained}'     ,\n                        TeenCoord        = '{$TeenCoord}'        ,\n                        EventAttended    = '{$EventAttended}'    ,\n                        JudgingCatagory  = '{$JudgingCatagory}'  ,\n                        IndividualAwards = '{$IndividualAwards}' ,\n                        CoordID          = '{$CoordID}'\n                  where EventId          = {$EventID}\n                  ";
            WriteToLog("Event {$EventName} Updated");
        } else {
            $sql = "insert into {$EventsTable}\n                        (EventName       ,\n                         TeamEvent       ,\n                         ConvEvent       ,\n                         MinGrade        ,\n                         MaxGrade        ,\n                         MinSize         ,\n                         MaxSize         ,\n                         Sex             ,\n                         JudgesNeeded    ,\n                         MaxRooms        ,\n                         MaxEventSlots   ,\n                         MaxWebSlots     ,\n                         Duration        ,\n                         JudgeTrained    ,\n                         TeenCoord       ,\n                         EventAttended   ,\n                         JudgingCatagory ,\n                         IndividualAwards,\n                         CoordID\n                         )\n                 values ('{$EventName}'       ,\n                         '{$TeamEvent}'       ,\n                         '{$ConvEvent}'       ,\n                         '{$MinGrade}'        ,\n                         '{$MaxGrade}'        ,\n                         '{$MinSize}'         ,\n                         '{$MaxSize}'         ,\n                         '{$Sex}'             ,\n                         '{$JudgesNeeded}'    ,\n                         '{$MaxRooms}'        ,\n                         '{$MaxEventSlots}'   ,\n                         '{$MaxWebSlots}'     ,\n                         '{$Duration}'        ,\n                         '{$JudgeTrained}'    ,\n                         '{$TeenCoord}'       ,\n                         '{$EventAttended}'   ,\n                         '{$JudgingCatagory}' ,\n                         '{$IndividualAwards}',\n                         {$CoordID}\n                         )";
            WriteToLog("Event {$EventName} Added");
        }
        $results = $db->query($sql) or die("Unable to process update: " . sqlError() . "<br>{$sql}<br>");
        ?>
<html lang="en">

   <body style="background-color: rgb(217, 217, 255);">

   <?php 
        if ($mode == 'update') {
            ?>
         <center>
            <h1>Event</h1>
            <h2>&quot;<?php 
            print $EventName;
            ?>
Ejemplo n.º 5
0
<?php

//----------------------------------------------------------------------------
// This software is licensed under the MIT license. Use as you wish but give
// and take credit where due.
//
// Author: Paul Lemmons
//----------------------------------------------------------------------------
include 'include/RegFunctions.php';
if ($Admin != 'Y') {
    header("refresh: 0; URL=Admin.php");
    die;
}
if (isset($_POST['Update'])) {
    WriteToLog("Changed Church from " . $_SESSION['ChurchID'] . " to " . $_POST['ChurchID']);
    $_SESSION['ChurchID'] = $_POST['ChurchID'];
    header("refresh: 0; URL=Admin.php");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>Change Church</title>

</head>

<body style="background-color: rgb(217, 217, 255);">
<h1 align="center">Change Church</h1>
<form method="post" action=ChangeChurch.php>
Ejemplo n.º 6
0
<?php

//----------------------------------------------------------------------------
// This software is licensed under the MIT license. Use as you wish but give
// and take credit where due.
//
// Author: Paul Lemmons
//----------------------------------------------------------------------------
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">
<?php 
include 'include/RegFunctions.php';
if (isset($_POST['Confirm'])) {
    $db->query("delete from {$UsersTable} where Userid='" . $_REQUEST['Userid'] . "'") or die("Unable to delete userid record: " . sqlError());
    WriteToLog("User " . $_REQUEST['Userid'] . " Deleted");
    ?>
      <head>
         <title>
            Userid Deleted
         </title>
      </head>
      <body style="background-color: rgb(217, 217, 255);">
         <h1 align=center>
            Userid <?php 
    print $_REQUEST['Userid'];
    ?>
 Deleted!
         </h1>
         <?php 
    footer("Return to Userid List", "Users.php");
Ejemplo n.º 7
0
//----------------------------------------------------------------------------
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">
<?php 
include 'include/RegFunctions.php';
if (isset($_POST['Confirm'])) {
    $db->query("delete from {$EventsTable}        where EventID=" . $_REQUEST['EventID']) or die("Unable to delete event record: " . sqlError());
    $db->query("delete from {$RegistrationTable}  where EventID=" . $_REQUEST['EventID']) or die("Unable to delete registration record: " . sqlError());
    $db->query("delete from {$EventScheduleTable} where EventID=" . $_REQUEST['EventID']) or die("Unable to delete schedule record: " . sqlError());
    $TeamList = $db->query("select TeamID from {$TeamsTable} where EventID=" . $_REQUEST['EventID']) or die("Unable to delete Team records: " . sqlError());
    while ($row = $TeamList->fetch(PDO::FETCH_ASSOC)) {
        $db->query("delete from {$TeamMembersTable} where TeamID=" . $row['TeamID']) or die("Unable to delete Team Member record: " . sqlError());
    }
    $db->query("delete from {$TeamsTable}        where EventID=" . $_REQUEST['EventID']) or die("Unable to delete Team records: " . sqlError());
    WriteToLog("Event " . $_REQUEST['EventID'] . " was deleted");
    ?>
      <head>
         <title>
            Event Deleted
         </title>
      </head>
      <body style="background-color: rgb(217, 217, 255);">
         <h1 align=center>
            Event <?php 
    print $_REQUEST['EventName'];
    ?>
 Deleted!
         </h1>
         <?php 
    footer("Return to Event List", "Events.php");
Ejemplo n.º 8
0
<?php

//----------------------------------------------------------------------------
// This software is licensed under the MIT license. Use as you wish but give
// and take credit where due.
//
// Author: Paul Lemmons
//----------------------------------------------------------------------------
include 'include/RegFunctions.php';
if ($Admin != 'Y') {
    header("refresh: 0; URL=Admin.php");
    die;
}
WriteToLog("Entered Tally System");
$prevTime = "";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">
   <script language="JavaScript" src="include/jscriptFunctions.js"></script>

    <head>
       <title>
          Assign Awards
       </title>
    </head>

   <body style="background-color: rgb(217, 217, 255);">
    <h1 align="center">Select Event to Assign Awards</h1>
    <hr>
    <?php 
//--------------------------------------------------------------------
Ejemplo n.º 9
0
            $_SESSION['logged-in'] = 1;
            $UserID = $row['Userid'];
            WriteToLog("Successful Login");
            $results = $db->query("update {$UsersTable}\n                                set lastLogin  = now(),\n                                    loginCount = loginCount+1\n                                where Userid   = '{$UserID}'\n                                ") or die("Unable to update Users information!" . sqlError());
            if (isset($_POST['redirect'])) {
                header("Refresh: 0; URL=" . $_POST['redirect'] . "");
            } else {
                header("Refresh: 0; URL=Admin.php");
            }
        } else {
            $_SESSION['logged-in'] = 0;
            header("Refresh: 0; URL=Admin.php");
        }
    } else {
        $_SESSION['Userid'] = $_POST['userid'];
        WriteToLog("Login Failed");
        $badPass = 1;
        $results = $db->query("select count(*) as Count\n                              from   {$UsersTable}\n                              where  Userid   = '" . $_POST['userid'] . "'\n                             ") or die("Unable to validate Userid and Password!" . sqlError());
        $row = $results->fetch(PDO::FETCH_ASSOC);
        if ($row['Count'] == 1) {
            $results = $db->query("update {$UsersTable}\n                                 set failedLoginCount = failedLoginCount+1\n                                 where Userid   = '" . $_POST['userid'] . "'\n                                ") or die("Unable to update Users information!" . sqlError());
        }
    }
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">
   <head>
      <title>LTCSW Registration Sign In</title>
   </head>
Ejemplo n.º 10
0
        }
    }
    if ($ErrorMsg == "") {
        ereg_replace("'", "''", $CoordName);
        ereg_replace("'", "''", $CoordAddr);
        ereg_replace("'", "''", $CoordCity);
        ereg_replace("'", "''", $CoordState);
        ereg_replace("'", "''", $CoordZip);
        ereg_replace("'", "''", $CoordPhone);
        ereg_replace("'", "''", $CoordEmail);
        if ($mode == 'update') {
            $sql = "update {$EventCoordTable}\n                    set Name        = '{$CoordName}'        ,\n                        Address     = '{$CoordAddr}'        ,\n                        City        = '{$CoordCity}'        ,\n                        State       = '{$CoordState}'       ,\n                        Zip         = '{$CoordZip}'         ,\n                        Phone       = '{$CoordPhone}'       ,\n                        Email       = '{$CoordEmail}'\n                  where CoordId     = '{$CoordID}'\n                  ";
            WriteToLog("Coordinator {$CoordName} Updated");
        } else {
            $sql = "insert into {$EventCoordTable}\n                        (Name       ,\n                         Address    ,\n                         City       ,\n                         State      ,\n                         Zip        ,\n                         Phone      ,\n                         Email\n                         )\n                 values ('{$CoordName}'       ,\n                         '{$CoordAddr}'       ,\n                         '{$CoordCity}'       ,\n                         '{$CoordState}'      ,\n                         '{$CoordZip}'        ,\n                         '{$CoordPhone}'      ,\n                         '{$CoordEmail}'\n                         )";
            WriteToLog("Coordinator {$CoordName} Added");
        }
        $results = $db->query($sql) or die("Unable to process update: " . sqlError());
        ?>
   <body style="background-color: rgb(217, 217, 255);">

   <?php 
        if ($mode == 'update') {
            ?>
         <center>
            <h1>Coordinator</h1>
            <h2>&quot;<?php 
            print $CoordName;
            ?>
&quot;<br>
            Updated!</h2>
Ejemplo n.º 11
0
    header("refresh: 0; URL=Admin.php");
    die;
}
if (isset($_POST['Confirm'])) {
    $ChurchID = $_REQUEST['ChurchID'];
    $db->query("delete from {$ChurchesTable}         where ChurchID={$ChurchID}") or die("Unable to delete church record: " . sqlError());
    $db->query("delete from {$UsersTable}            where ChurchID={$ChurchID}") or die("Unable to delete user records: " . sqlError());
    $db->query("delete from {$RegistrationTable}     where ChurchID={$ChurchID}") or die("Unable to delete registration records: " . sqlError());
    $db->query("delete from {$ParticipantsTable}     where ChurchID={$ChurchID}") or die("Unable to delete participants records: " . sqlError());
    $db->query("delete from {$TeamsTable}            where ChurchID={$ChurchID}") or die("Unable to delete team records: " . sqlError());
    $db->query("delete from {$TeamMembersTable}      where ChurchID={$ChurchID}") or die("Unable to delete team members records: " . sqlError());
    $db->query("delete from {$ExtraOrdersTable}      where ChurchID={$ChurchID}") or die("Unable to delete extra orders records: " . sqlError());
    $db->query("delete from {$NonParticipantsTable}  where ChurchID={$ChurchID}") or die("Unable to delete Non-Participant records: " . sqlError());
    $db->query("delete from {$JudgeAssignmentsTable} where ChurchID={$ChurchID}") or die("Unable to delete Judging Assignmrnts records: " . sqlError());
    $db->query("delete from {$JudgesTable}           where ChurchID={$ChurchID}") or die("Unable to delete Judges records: " . sqlError());
    WriteToLog("Church " . $_REQUEST['ChurchID'] . " was deleted");
    ?>
      <head>
         <title>
            Church Deleted
         </title>
      </head>
      <body style="background-color: rgb(217, 217, 255);">
         <h1 align=center>
            Church <?php 
    print $_REQUEST['ChurchName'];
    ?>
 Deleted!
         </h1>
         <?php 
    footer("Return to Church List", "Churches.php");