Beispiel #1
0
<?php

error_reporting(E_ALL);
if (isset($_GET['classSchedId'])) {
    $classSchedId = $_GET['classSchedId'];
}
if (isset($_GET['contactId'])) {
    $contactId = $_GET['contactId'];
}
require_once 'connectdb.php';
$trainer = getSingleContact($dbconn, $contactId);
$students = getStudents($dbconn, $classSchedId);
while ($row = $students->fetch_assoc()) {
    $eadd[] = $row['email'];
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Email All Registered Students</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <link href="css/tr.css" rel="stylesheet" type="text/css" />
    <link href='http://fonts.googleapis.com/css?family=Quicksand:300,400|Oleo+Script' rel='stylesheet' type='text/css'>
    <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
</head>

<body>
    <div id="topbanner">
        <?php 
Beispiel #2
0
<?php

error_reporting(E_ALL);
$errors = array();
if (isset($_GET['contactId'])) {
    $contactId = $_GET['contactId'];
}
$chooseState = getAllState($dbconn);
$allTrClasses = getAllTrClasses($dbconn, $contactId);
$allTrLocate = getAllTrLocations($dbconn, $contactId);
$contact = getSingleContact($dbconn, $contactId);
$trainer = getSingleTrainer($dbconn, $contactId);
$trId = $trainer['trId'];
$woSubCat = getTrWOs($dbconn, $trId);
$tzip = $contact['zip'];
$ll = getZipLL($dbconn, $tzip);
try {
    if (isset($_POST['addSched'])) {
        //Class Validators
        if ($_POST['classId'] == 0) {
            if ($_POST['woSubCatId'] == "") {
                $errors['woSubCatId'] = "Please select a work out type";
            }
            if ($_POST['level'] == "") {
                $errors['level'] = "Please select a skill level";
            }
            $desc = trim($_POST['classdescription']);
            //eliminate accidental space
            if (empty($desc)) {
                $errors['classdescription'] = "Please give a brief description";
            }