71 lines
1.9 KiB
PHP
71 lines
1.9 KiB
PHP
<?php
|
|
require_once("include/globals.php");
|
|
|
|
if (SessionActive() != 1 || ! UserLoggedIn()) {
|
|
header("Location: /");
|
|
exit();
|
|
}
|
|
|
|
|
|
//
|
|
// Process all actions to list and edit records
|
|
//
|
|
$CurrentTable = "people";
|
|
$FormFile = "students.dialog.php";
|
|
$JQueryFile = "parent-students.js.php";
|
|
$CustomLoadData = "N";
|
|
$DialogWidth = 400;
|
|
$DialogHeight = 500;
|
|
$TitleText = $GlobalText['Students'];
|
|
$SequenceFlag = 'N';
|
|
$tableAction = "parent-student-list";
|
|
$RequiredFields = array('first_name','last_name');
|
|
$LoadInitialData = 'Y';
|
|
|
|
$InsertButtonText = $GlobalText['AddStudents'];
|
|
|
|
if ($school_record['allow_parents_to_edit_students'] == 'N') $InsertNewRecord = 'N';
|
|
if ($school_record['collect_student_birthdate'] == 'Y') $RequiredFields[] = 'birthdate';
|
|
|
|
|
|
startTemplate();
|
|
$templatePageTitle = $GlobalText['Students'];
|
|
|
|
|
|
//
|
|
// Get set of students for a parent
|
|
//
|
|
if (!in_array($_SESSION['UserInfo']['type'], array('Parent','Staff','Administration Team','Guest'))) {
|
|
$form_message = '';
|
|
$error_message = getLanguageText('TEXT-INVALID-ACCESS');
|
|
header("Location: /?form_message=" . urlencode($form_message) . "&error_message=" . urlencode($error_message));
|
|
}
|
|
|
|
$user_num = $_SESSION['UserInfo']['record_num'];
|
|
$results = db_query("SELECT * FROM users WHERE school_num = $base_school_num AND record_num = $user_num");
|
|
$user = db_fetch_assoc($results);
|
|
$userAccount = $user['first_name'].' '.$user['last_name'].' - '.$user['userid'];
|
|
|
|
$CustomData = "&user_num=$user_num";
|
|
$JScustomInsertCode = " $('#dialog_user_num').val($user_num);\n";
|
|
|
|
$JSinitForm = "
|
|
$('#dialog_class_num').prop('disabled', false);\n";
|
|
|
|
if ($school_record['allow_parents_to_edit_grade'] == 'N') {
|
|
$JSeditData = "
|
|
$('#dialog_class_num').prop('disabled', true);\n";
|
|
}
|
|
|
|
|
|
include "form.js.php";
|
|
|
|
?>
|
|
<br>
|
|
<div id='student-orders-display-div'></div>
|
|
<br>
|
|
|
|
<?php
|
|
endTemplate();
|
|
?>
|