Exemplo n.º 1
0
function check_status($host, $port = 80)
{
    $waitTimeoutInSeconds = 1;
    $fp = @fsockopen($host, $port, $errCode, $errStr, $waitTimeoutInSeconds);
    if ($fp) {
        handle_success($host . $port);
        fclose($fp);
    } else {
        handle_failure($host . $port);
    }
}
Exemplo n.º 2
0
define('PAGE_ACCESS_LEVEL', 2);
define('PAGE_TYPE', 'ADMIN');
// Set for every page
require 'engine/common.php';
$smarty->assign('PAGE_NAME', 'Edit Payments');
$id = 0;
if ($_GET) {
    if (isset($_GET['id']) && $_GET['id'] > 0 && idCheck_paymentDB($_GET['id'], 4)) {
        $id = $_GET['id'];
    } else {
        header("Location: paymentmanager.php");
    }
    if (isset($_GET['success']) && $_GET['success'] == 'yes') {
        $success = array();
        $success[] = 'You have successfully updated payments for current person.';
        handle_success($success);
    }
}
if ($_POST) {
    if (isset($_POST['id']) && $_POST['id'] > 0) {
        $id = $_POST['id'];
    } else {
        header("Location: paymentmanager.php");
    }
}
$P4_AUDIT = $_SESSION['userid'];
$P4_NAME = get_registrant_name($id);
$P4_ID = $id;
$P4_PAY1_PROCESS = '';
$P4_PAY1_DATE = '';
$P4_PAY1_DATE_DB = '';
Exemplo n.º 3
0
                    $team->formReposts($smarty);
                } else {
                    handle_success($team->get_teamFormSuccess());
                }
            }
        }
    }
}
// if GET request to Delete team
if (isset($_GET['teamID']) && $_GET['teamID'] > 0 && $_GET['delete'] == 1) {
    $team = new Team($_GET['teamID']);
    if ($team->formProcessDelete()) {
        handle_errors($team->get_teamFormErrors());
        $team->formReposts($smarty);
    } else {
        handle_success($team->get_teamFormSuccess());
    }
}
// Build list of teams
$Teams = new Teams();
$TeamsArray = $Teams->get_TeamArray(0);
if (count($TeamsArray) > 0) {
    $count = 0;
    $smarty->assign('teamID', array());
    $smarty->assign('teamName', array());
    $smarty->assign('teamShortName', array());
    $smarty->assign('teamFGColor', array());
    $smarty->assign('teamBGColor', array());
    $smarty->assign('teamSeasons', array());
    $smarty->assign('teamCanDelete', array());
    $smarty->assign('teamFGColorSelect', array());
Exemplo n.º 4
0
} else {
    if (isset($_POST['action']) && $_POST['action'] == "Edit Registration") {
        $registration = new Registration($_POST['id']);
        $smarty->assign('id', $registration->get_registrationID());
        // If form does not validate, we need to return with errors.
        if ($registration->formValidation()) {
            handle_errors($registration->get_formErrors());
            $registration->formReposts($smarty);
        } else {
            // If errors occur while trying to create user, we need to return with errors.
            if ($registration->formProcessUpdate()) {
                handle_errors($registration->get_formErrors());
                $registration->formReposts($smarty);
            } else {
                $registration->formPreLoad($smarty);
                handle_success($registration->get_formSuccess());
            }
        }
    } else {
        header("Location: manageregistrations.php");
    }
}
$smarty->assign('page_name', 'Edit ' . $registration->get_fName() . ' ' . $registration->get_lName() . '\'s Season Registration');
$smarty->assign('type', 'EDIT');
// Build the page
require 'global_begin.php';
$smarty->display('admin/editregistration.tpl');
require 'global_end.php';
/*
* ********************************************************************************
* ********************************************************************************
Exemplo n.º 5
0
                    $boardMember->formReposts($smarty);
                } else {
                    handle_success($boardMember->get_boardMemberFormSuccess());
                }
            }
        }
    }
}
// if GET request to Delete board member
if (isset($_GET['boardMemberID']) && $_GET['boardMemberID'] > 0 && $_GET['delete'] == 1) {
    $boardMember = new BoardMember($_GET['boardMemberID']);
    if ($boardMember->formProcessDelete()) {
        handle_errors($boardMember->get_boardMemberFormErrors());
        $boardMember->formReposts($smarty);
    } else {
        handle_success($boardMember->get_boardMemberFormSuccess());
    }
}
// Build list of board members
$BoardMembers = new BoardMembers();
$BoardMembersArray = $BoardMembers->get_BoardMemberArray(0);
if (count($BoardMembersArray) > 0) {
    $count = 0;
    $smarty->assign('boardMemberID', array());
    $smarty->assign('boardMemberName', array());
    $smarty->assign('boardMemberFirstName', array());
    $smarty->assign('boardMemberLastName', array());
    $smarty->assign('boardMemberEmail', array());
    $smarty->assign('boardMemberHomePhone', array());
    $smarty->assign('boardMemberWorkPhone', array());
    $smarty->assign('boardMemberCellPhone', array());