First Commit
This commit is contained in:
1 parent
5eb9dd037d
commit
2e62c0e60b
11877 files changed
+2035312
No files matched your search
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
require_once("include/globals.php");
|
||||
|
||||
if (SessionActive() != 1 || ! UserLoggedIn()) {
|
||||
header("Location: /");
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
// Ensure that only valid user types have access to this module
|
||||
$AllowedUserTypes = array('SuperUser','System Administrator','Application Administrator','Administration Team','Schedule Team');
|
||||
if (checkPermission($AllowedUserTypes) != 1) {
|
||||
echo("<br>\n");
|
||||
$error_message = getLanguageText('ERRORMSG-ACCESS-DENIED');
|
||||
include "form.messages.php";
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Get set of staff records
|
||||
$query = "SELECT * FROM people " .
|
||||
"WHERE school_num = $base_school_num " .
|
||||
"AND people_type = 'Staff' " .
|
||||
"ORDER BY last_name,first_name";
|
||||
$results = db_query($query);
|
||||
|
||||
$data = array();
|
||||
while ($row = db_fetch_assoc($results)) {
|
||||
extract($row);
|
||||
$staff_category = intval($staff_category);
|
||||
$category = db_getVal("SELECT category_title FROM staff_categories WHERE school_num = $school_num AND record_num = $staff_category");
|
||||
$userid = db_getVal("SELECT userid FROM users WHERE school_num = $base_school_num AND record_num = $user_num");
|
||||
$data[] = array($first_name,$last_name,$email,$label_note,$category,$userid,$staff_description);
|
||||
}
|
||||
|
||||
|
||||
$column_headers = array(
|
||||
getLanguageText('TEXT-FIRST-NAME'),
|
||||
getLanguageText('TEXT-LAST-NAME'),
|
||||
getLanguageText('TEXT-EMAIL'),
|
||||
getLanguageText('TEXT-LABEL-NOTE'),
|
||||
getLanguageText('TEXT-CATEGORY'),
|
||||
getLanguageText('TEXT-USER-ID'),
|
||||
);
|
||||
$fname = genFileName("staff.csv");
|
||||
xlsData($data,$column_headers,$fname);
|
||||
|
||||
exit();
|
||||
?>
|
||||
Reference in new issue
Block a user