Пример #1
0
function send_bcc_email($emailto_array = array(), $subject = "", $message = "")
{
    $from = TCSHL_EMAIL;
    $replyTo = $_SESSION['email'];
    //Send email - one email per email in $emailto_array
    for ($i = 0; $i < count($emailto_array); $i++) {
        $headers = 'From: ' . $from . "\r\n" . 'Reply-To: ' . $replyTo . "\r\n" . 'Bcc: ' . $emailto_array[$i] . "\r\n" . 'Return-Path: ' . $from . "\r\n" . 'X-Mailer: PHP/' . phpversion();
        # Send email
        $emailSent = mail('', $subject, $message, $headers);
        /*
         * DEBUG CODE
         */
        // Debug - If email does not send, need to send webmaster an email so they can debug it.
        if (!$emailSent || get_site_variable_value("DEBUG_EMAIL") == 1) {
            $debugSubject = "EmailManager tcshl.com - debug info";
            $debugFrom = TCSHL_EMAIL;
            $debugReplyTo = WEBMASTER_EMAIL;
            $debugHeaders = "From: " . $debugFrom . "\r\n";
            $debugHeaders .= "Reply-To: " . $debugReplyTo . "\r\n";
            $debugHeaders .= "X-Mailer: PHP/" . phpversion();
            $debugDate = date("m-d-Y H:i e", time());
            $debugMessage = "Message attempt by: " . $replyTo . "\r\n";
            $debugMessage .= "Message attempt date: " . $debugDate . "\r\n";
            $debugMessage .= "Message headers: \n" . $headers . "\r\n";
            $debugMessage .= "Message subject: " . $subject . "\r\n";
            $debugMessage .= "Message body: \n";
            $debugMessage .= $message . "\r\n";
            // Send debug mail to webmaster
            mail(WEBMASTER_EMAIL, $debugSubject, $debugMessage, $debugHeaders);
        }
    }
}
Пример #2
0
function site_under_maintenance()
{
    global $Link;
    $maintenance = get_site_variable_value("MAINTENANCE");
    if ($maintenance > 0) {
        return true;
    } else {
        return false;
    }
}
Пример #3
0
 function __construct($registrationID)
 {
     $this->registrationID = (int) $registrationID;
     $this->seasonID = (int) get_site_variable_value('SEASON');
     $this->playerID = (int) 0;
     $this->fName = (string) '';
     $this->lName = (string) '';
     $this->addressOne = (string) '';
     $this->addressTwo = (string) '';
     $this->city = (string) '';
     $this->state = (string) '';
     $this->postalCode = (string) '';
     $this->eMail = (string) '';
     $this->position = (string) '';
     $this->jerseySize = (string) '';
     $this->jerseyNumberOne = (int) 0;
     $this->jerseyNumberTwo = (int) 0;
     $this->jerseyNumberThree = (int) 0;
     $this->homePhone = (string) '';
     $this->workPhone = (string) '';
     $this->cellPhone = (string) '';
     $this->skillLevel = (int) 0;
     $this->wantToSub = (int) 0;
     $this->subSunday = (int) 0;
     $this->subMonday = (int) 0;
     $this->subTuesday = (int) 0;
     $this->subWednesday = (int) 0;
     $this->subThursday = (int) 0;
     $this->subFriday = (int) 0;
     $this->subSaturday = (int) 0;
     $this->travelingWithWho = (string) '';
     $this->wantToBeATeamRep = (int) 0;
     $this->wantToBeARef = (int) 0;
     $this->paymentPlan = (int) 0;
     $this->notes = (string) '';
     $this->registrationApproved = (int) 0;
     $this->drilLeague = (int) 0;
     $this->payToday = (int) 0;
     $this->usaHockeyMembership = (string) '';
     $this->formErrors = array();
     $this->formSuccess = array();
     if ($this->registrationID != 0) {
         $this->load_registration();
     }
 }
Пример #4
0
define('LOGIN_REQUIRED', false);
define('PAGE_ACCESS_LEVEL', 0);
define('PAGE_TYPE', 'PUBLIC');
// Set for every page
require 'engine/common.php';
$smarty->assign('page_name', get_season_name($SEASON) . ' Season Registration');
$smarty->assign('registrationPage', 'TRUE');
$smarty->assign('ns', 'CHECKED');
// Will sub = no
$smarty->assign('nt', 'CHECKED');
// No Team Rep
$smarty->assign('nr', 'CHECKED');
// Will not ref
$smarty->assign('p1', 'CHECKED');
// Payment Plan 1
$smarty->assign('OPEN_REGISTRATION', get_site_variable_value("REGISTRATION"));
if (isset($_POST['action']) && $_POST['action'] == "Register") {
    // If form does not validate, we need to return with errors.
    if ($errors = validate_seasonregistration_form()) {
        handle_errors($errors);
        handle_reposts();
    } else {
        // If errors occur while trying to create user, we need to return with errors.
        if ($errors = process_seasonregistration_form($smarty)) {
            handle_errors($errors);
            handle_reposts();
        } else {
            header("Location: seasonregistrationok.php");
        }
    }
} else {
Пример #5
0
<?php

/*
 * Created on Aug 15, 2008
 *
 * Sets the season for everypage.  Just refer to $SEASON as a global variable.
 */
if (isset($_POST['season']) && $_POST['season'] > 0) {
    $SEASON = $_POST['season'];
} else {
    if (isset($_GET['season']) && $_GET['season'] > 0) {
        $SEASON = $_GET['season'];
    } else {
        $SEASON = get_site_variable_value("SEASON");
    }
}
$smarty->assign('SEASON', $SEASON);
Пример #6
0
<?php

/*
 * Created on Sep 8, 2008
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
if (get_site_variable_value("MARQUEE") == 1) {
    $marquee = get_site_marquee();
    $smarty->assign('MARQUEE', $marquee);
}
Пример #7
0
<?php

$subQuery = 'SELECT teamID FROM ' . TEAMSOFSEASONS . ' WHERE seasonID=' . get_site_variable_value("SEASON") . ' AND teamID != 7 AND teamID != 14';
$select = 'SELECT teamID,teamName FROM ' . TEAMS . ' WHERE teamID IN (' . $subQuery . ')';
$result = mysql_query($select, $Link) or die("sp_clubs (Line " . __LINE__ . "): " . mysql_errno() . ": " . mysql_error());
if ($result && mysql_num_rows($result) > 0) {
    $smarty->assign('menuSelectSeasonHasTeams', true);
    $smarty->assign('teamMenuSelectID', array());
    $smarty->assign('teamMenuSelectName', array());
    while ($team = mysql_fetch_array($result, MYSQL_ASSOC)) {
        $teamId = $team['teamID'];
        $teamName = $team['teamName'];
        $smarty->append('teamMenuSelectID', $teamId);
        $smarty->append('teamMenuSelectName', $teamName);
    }
} else {
    $smarty->assign('menuSelectSeasonHasTeams', false);
}
Пример #8
0
function email_message($emailAddresses = "", $subject = "", $message = "")
{
    // Note these emails need to be Blind Carbon Coby
    $from = TCSHL_EMAIL;
    $replyTo = $_SESSION['email'];
    //$headers = "From: ".$from. "\r\n";
    //$headers .= "Reply-To: ".$replyTo. "\r\n";
    //$headers .= "Bcc: ".$emailAddresses. "\r\n";
    //$headers .= "X-Mailer: PHP/".phpversion();
    $headers = 'From: ' . $from . "\r\n" . 'Reply-To: ' . $replyTo . "\r\n" . 'Bcc: ' . $emailAddresses . "\r\n" . 'Return-Path: ' . $from . "\r\n" . 'X-Mailer: PHP/' . phpversion();
    //Send email
    $emailSent = mail('', $subject, $message, $headers);
    // If email does not send, need to send webmaster an email so he can debug it.
    if (!$emailSent || get_site_variable_value("DEBUG_EMAIL") == 1) {
        $debugSubject = "EmailManager tcshl.com - debug info";
        $debugFrom = TCSHL_EMAIL;
        $debugReplyTo = WEBMASTER_EMAIL;
        $debugHeaders = "From: " . $debugFrom . "\r\n";
        $debugHeaders .= "Reply-To: " . $debugReplyTo . "\r\n";
        $debugHeaders .= "X-Mailer: PHP/" . phpversion();
        $debugDate = date("m-d-Y H:i e", time());
        $debugMessage = "Message attempt by: " . $replyTo . "\r\n";
        $debugMessage .= "Message attempt date: " . $debugDate . "\r\n";
        $debugMessage .= "Message headers: \n" . $headers . "\r\n";
        $debugMessage .= "Message subject: " . $subject . "\r\n";
        $debugMessage .= "Message body: \n";
        $debugMessage .= $message . "\r\n";
        // Send mail to webmaster
        mail(WEBMASTER_EMAIL, $debugSubject, $debugMessage, $debugHeaders);
    }
}
Пример #9
0
<?php

/*
 * Created on Sep 10, 2007
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
// Page requirements
define('LOGIN_REQUIRED', false);
define('PAGE_ACCESS_LEVEL', 0);
define('PAGE_TYPE', 'PUBLIC');
// Set for every page
require 'engine/common.php';
//Set meta refresh on this page
$smarty->assign('metaRefresh', get_site_variable_value("DRAFT"));
// Setup draft information
$setCurrentRound = 0;
require 'includes/inc_draftstatus.php';
require 'includes/inc_draftresults.php';
// Build the page
//require ('global_begin.php');
$smarty->display('global/includes/inc_draftstatus.tpl');
$smarty->display('global/includes/inc_draftresults.tpl');
//require ('global_end.php');