67 lines
2.0 KiB
PHP
67 lines
2.0 KiB
PHP
<?php
|
|
require_once("include/globals.php");
|
|
|
|
if (SessionActive() != 1 || ! UserLoggedIn()) {
|
|
header("Location: /");
|
|
exit();
|
|
}
|
|
|
|
|
|
//
|
|
// Process all actions to list and edit records
|
|
//
|
|
$CurrentTable = "school_contact_list";
|
|
$DeleteField = "contact_name,contact_email";
|
|
$dSeparator = "<br>";
|
|
$FormFile = "application_contacts.form.php";
|
|
$TitleText = getLanguageText('TEXT-CONTACT');
|
|
$OrderBy = "sequence";
|
|
$Sequence = 'Y';
|
|
|
|
|
|
// Start the template and output buffering
|
|
startTemplate();
|
|
$templatePageTitle = getLanguageText('TEXT-CONTACT-ADMIN-TITLE');
|
|
|
|
|
|
// Ensure that only valid user types have access to this module
|
|
$AllowedUserTypes = array('SuperUser','System Administrator','Communications Administrator');
|
|
if (checkPermission($AllowedUserTypes) != 1) {
|
|
$error_message = getLanguageText('ERRORMSG-ACCESS-DENIED');
|
|
include "form.messages.php";
|
|
endTemplate();
|
|
exit();
|
|
}
|
|
|
|
|
|
//
|
|
// Setup generic table processing
|
|
//
|
|
$TableName = "school_contact_list";
|
|
$ListTableName = "school_contact_list";
|
|
$SequenceFlag = 'Y';
|
|
$DialogTitle = getLanguageText('TEXT-CONTACT-ADMIN-TITLE');
|
|
$SearchField = 'none';
|
|
$CustomData = "";
|
|
|
|
$ContactPositions = array('Application Contact', 'Organization President', 'Financial Contact', 'Other');
|
|
$YN = array(array('Y','Yes'),array('N','No'));
|
|
|
|
$FormFields = array(
|
|
array('contact_name','TEXT-NAME','text',50,'required'),
|
|
array('contact_email','TEXT-EMAIL-ADDRESS','text',60,'required'),
|
|
array('contact_phone','TEXT-PHONE','text',20,'required'),
|
|
array('contact_cell','TEXT-CELL-PHONE','text',20,'optional'),
|
|
array('contact_position','TEXT-POSITION','select',$ContactPositions,'required'),
|
|
array('active','TEXT-ACTIVE','select-records',$YN,'required'),
|
|
);
|
|
$FormDefaults = array(array('contact_position','Application Contact'),
|
|
array('active','Y'));
|
|
|
|
include "table-edit.php";
|
|
|
|
BuildDialogForm($DialogTitle, $FormFields);
|
|
|
|
endTemplate();
|
|
?>
|