First Commit
This commit is contained in:
1 parent
5eb9dd037d
commit
2e62c0e60b
11877 files changed
+2035312
No files matched your search
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
$commands[] = "<a href='#' class='view-students' rnum='%d' title='View Students'>$students_icon</a>";
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
$query = "SELECT allergen_num, count(*) AS num FROM allergies WHERE school_num = $school_num GROUP BY 1";
|
||||
$results = db_query($query);
|
||||
while ($row = db_fetch_assoc($results)) {
|
||||
extract($row);
|
||||
if (isset($allergen_num) && intval($allergen_num) > 0) {
|
||||
$query = "UPDATE allergens SET member_count = $num WHERE school_num = $school_num AND record_num = $allergen_num";
|
||||
db_query($query);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
$(document).on('click touch', '.view-students', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var anum = $(this).attr('rnum');
|
||||
var member_count = $("#member-count-data-span-id-"+anum).html();
|
||||
|
||||
if (member_count == '' || member_count == '0') {
|
||||
alert('<?php displayLanguageText('ERRORMSG-NO-STUDENTS-FOUND'); ?>');
|
||||
return;
|
||||
}
|
||||
|
||||
$.getJSON("ajax.DataTable.Fetch.php",
|
||||
{
|
||||
table_name: 'people',
|
||||
action: 'student-allergies',
|
||||
sequence_flag: 'N',
|
||||
allergen: anum
|
||||
},
|
||||
function(results) {
|
||||
var display_data = '';
|
||||
display_data += "<center><table><tr><td class='ltext'>" +
|
||||
results.content +
|
||||
"</td></tr></table></center>";
|
||||
|
||||
$("#info-dialog-data-div").html(display_data);
|
||||
$("#info-dialog").dialog('open');
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
$query = "SELECT class_program, count(*) AS num FROM classes WHERE school_num = $school_num AND entry_type = 'Class' GROUP BY 1";
|
||||
$results = db_query($query);
|
||||
while ($row = db_fetch_assoc($results)) {
|
||||
extract($row);
|
||||
if (isset($class_program) && intval($class_program) > 0) {
|
||||
$query = "UPDATE class_programs SET member_count = $num WHERE school_num = $school_num AND record_num = $class_program";
|
||||
db_query($query);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,41 @@
|
||||
|
||||
|
||||
$(document).on('click touch', '.default-price-category-data-span', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var value = $(this).html();
|
||||
var rnum = $(this).attr('rnum');
|
||||
var fid = 'default-price-category-'+rnum;
|
||||
|
||||
switch (value) {
|
||||
case 'Regular':
|
||||
value = 'Special 1';
|
||||
break;
|
||||
|
||||
case 'Special 1':
|
||||
value = 'Special 2';
|
||||
break;
|
||||
|
||||
case 'Special 2':
|
||||
value = 'Special 3';
|
||||
break;
|
||||
|
||||
case 'Special 3':
|
||||
value = 'Regular';
|
||||
break;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: 'ajax.UpdateDBField.php',
|
||||
data: {
|
||||
table_name: 'classes',
|
||||
field_name: 'default_price_category',
|
||||
field_value: value,
|
||||
field_type: 'text',
|
||||
record_num: rnum
|
||||
},
|
||||
dataType: 'json'
|
||||
}).done(function(results) {
|
||||
$("#"+fid).html(value);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,18 @@
|
||||
|
||||
updateDialogCustom();
|
||||
|
||||
function updateDialogCustom() {
|
||||
<?php if ($school_record['max_teachers_per_class'] < 2) { ?>
|
||||
$(".teacher-number2").hide();
|
||||
<?php } ?>
|
||||
<?php if ($school_record['max_teachers_per_class'] < 1) { ?>
|
||||
$(".teacher-number1").hide();
|
||||
<?php } ?>
|
||||
<?php if ($school_record['p_display_division'] == 'N' && $school_record['i_display_division'] == 'N') { ?>
|
||||
$(".division-field").hide();
|
||||
<?php } ?>
|
||||
<?php if ($school_record['p_display_grade'] == 'N' && $school_record['i_display_grade'] == 'N') { ?>
|
||||
$(".grade-field").hide();
|
||||
<?php } ?>
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
|
||||
$(document).on('click touch', '.execute-action', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var action_num = $(this).attr('rnum');
|
||||
window.open('/?action=exec-action&action_num='+action_num);
|
||||
});
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
$(document).on('click touch', '.action-fields-report-sequence-data-span', function() {
|
||||
var value = $(this).html();
|
||||
var rnum = $(this).attr('rnum');
|
||||
var spanid = $(this).attr('id');
|
||||
|
||||
value = Math.abs(value) + 1;
|
||||
if (value > 9) value = 0;
|
||||
|
||||
$.ajax({
|
||||
url: 'ajax.UpdateDBField.php',
|
||||
data: {
|
||||
table_name: '_form_fields',
|
||||
field_name: 'action_fields_report_sequence',
|
||||
field_value: value,
|
||||
field_type: 'numeric',
|
||||
record_num: rnum
|
||||
},
|
||||
dataType: "json"
|
||||
}).done(function(results) {
|
||||
$('#'+spanid).html(value);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
$query = "SELECT staff_category, count(*) AS num FROM people WHERE school_num = $school_num AND people_type = 'Staff' GROUP BY 1";
|
||||
$results = db_query($query);
|
||||
while ($row = db_fetch_assoc($results)) {
|
||||
extract($row);
|
||||
$query = "UPDATE staff_categories SET member_count = $num WHERE school_num = $school_num AND record_num = $staff_category";
|
||||
db_query($query);
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
|
||||
$DialogCustomization['user_num.action_fields_required_field_flag'] = 'N';
|
||||
$DialogCustomization['user_num.action_fields_additional_message'] = getLanguageText('TEXT-LEAVE-USER-ID-BLANK');
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,44 @@
|
||||
|
||||
|
||||
$(document).on('click touch', '.menu-price-category-data-span', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var value = $(this).html();
|
||||
var rnum = $(this).attr('rnum');
|
||||
var fid = $(this).attr('id');
|
||||
|
||||
switch (value) {
|
||||
case 'Regular':
|
||||
value = 'Special 1';
|
||||
break;
|
||||
|
||||
case 'Special 1':
|
||||
value = 'Special 2';
|
||||
break;
|
||||
|
||||
case 'Special 2':
|
||||
value = 'Special 3';
|
||||
break;
|
||||
|
||||
case 'Special 3':
|
||||
value = 'Regular';
|
||||
break;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: 'ajax.UpdateDBField.php',
|
||||
data: {
|
||||
table_name: 'people',
|
||||
field_name: 'menu_price_category',
|
||||
field_value: value,
|
||||
field_type: 'text',
|
||||
record_num: rnum
|
||||
},
|
||||
dataType: 'json'
|
||||
}).done(function(results) {
|
||||
$("#"+fid).html(value);
|
||||
if (value == 'Regular') $("#mpc-span-"+rnum).removeClass('warning');
|
||||
else $("#mpc-span-"+rnum).addClass('warning');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
$commands[] = "<a href='#' class='allergy-info' rnum='%d' title='Allergy Info'>$info_icon</a>";
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,143 @@
|
||||
<?php
|
||||
// Get classes for dropdown lists
|
||||
$query = "SELECT * FROM classes WHERE school_num = $school_num AND entry_type = 'Class' ORDER BY sequence";
|
||||
$classes = db_query($query);
|
||||
|
||||
$ClassesSelect = "";
|
||||
while ($row = db_fetch_assoc($classes)) {
|
||||
$cnum = $row['record_num'];
|
||||
$info = getClassInfo($cnum, 'dropdown');
|
||||
$ClassesSelect .= "<option value='$cnum'>$info</option>\n";
|
||||
}
|
||||
|
||||
// Get locations for dropdown lists
|
||||
$LocationsSelect = "";
|
||||
$optgroup_started = false;
|
||||
if ($school_record['implement_meal_locations'] != 'N') {
|
||||
foreach ($MealLocationsLookup AS $value => $option) {
|
||||
$otext = $option;
|
||||
if (strpos($otext, 'TEXT-') === 0 || strpos($otext, 'CODE-') === 0) $otext = getLanguageText('TEXT-'.str_replace(' ','-',$otext));
|
||||
if (strpos($otext, 'GlobalText.') === 0) {
|
||||
$pindex = str_replace('GlobalText.','',$otext);
|
||||
$otext = $GlobalText[$pindex];
|
||||
}
|
||||
|
||||
if (strstr($value, 'OPTGROUP-') !== false) {
|
||||
if ($optgroup_started) $LocationsSelect .= " </optgroup>\n";
|
||||
$LocationsSelect .= " <optgroup label='$otext'>\n";
|
||||
$optgroup_started = true;
|
||||
}
|
||||
else {
|
||||
$LocationsSelect .= " <option value='$value'>$otext</option>\n";
|
||||
}
|
||||
}
|
||||
if ($optgroup_started) $LocationsSelect .= " </optgroup>\n";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div id='menu-category-dialog' title='<?php displayLanguageText('TEXT-UPDATE-MENU-CATEGORY'); ?>'>
|
||||
<center>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<p><b><?php displayLanguageText('TEXT-MENU-PRICE-CATEGORY'); ?>:</b><br>
|
||||
<select id='selected-menu-price-category'>
|
||||
<option value=''><?php displayLanguageText('TEXT-SELECT-A-CATEGORY'); ?></option>
|
||||
<option value='Regular'><?php displayLanguageText('TEXT-REGULAR'); ?></option>
|
||||
<option value='Special 1'><?php displayLanguageText('TEXT-SPECIAL-1'); ?></option>
|
||||
<option value='Special 1'><?php displayLanguageText('TEXT-SPECIAL-2'); ?></option>
|
||||
<option value='Special 1'><?php displayLanguageText('TEXT-SPECIAL-3'); ?></option>
|
||||
</select></p>
|
||||
<p><b><?php echo($GlobalText['Class']) ?>:</b><br>
|
||||
<select id='selected-menu-price-class'>
|
||||
<option value='0'><?php displayLanguageText('TEXT-ALL-CLASSES'); ?></option>
|
||||
<?php echo($ClassesSelect) ?>
|
||||
</select></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<button id='update-menu-category-btn'><?php displayLanguageText('TEXT-UPDATE-MENU-CATEGORY'); ?></button>
|
||||
<button class='close-dialog' dialog-name='menu-category-dialog'><?php displayLanguageText('TEXT-CLOSE'); ?></button>
|
||||
<br>
|
||||
</center>
|
||||
</div>
|
||||
|
||||
<div id='flex-access-dialog' title='<?php displayLanguageText('TEXT-UPDATE-FLEX-PRICE-ACCESS'); ?>'>
|
||||
<center>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<p><b><?php displayLanguageText('TEXT-ACCESS-TO-FLEX-PRICES'); ?>:</b><br>
|
||||
<select id='selected-flex-access-flag'>
|
||||
<option value='Y'><?php displayLanguageText('TEXT-YES'); ?></option>
|
||||
<option value='N'><?php displayLanguageText('TEXT-NO'); ?></option>
|
||||
</select></p>
|
||||
<p><b><?php echo($GlobalText['Class']) ?>:</b><br>
|
||||
<select id='selected-flex-access-class'>
|
||||
<option value='0'><?php displayLanguageText('TEXT-ALL-CLASSES'); ?></option>
|
||||
<?php echo($ClassesSelect) ?>
|
||||
</select></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<button id='update-flex-flag-btn'><?php displayLanguageText('TEXT-UPDATE-FLEX-PRICE-ACCESS'); ?></button>
|
||||
<button class='close-dialog' dialog-name='flex-access-dialog'><?php displayLanguageText('TEXT-CLOSE'); ?></button>
|
||||
<br>
|
||||
</center>
|
||||
</div>
|
||||
|
||||
<div id='student-status-dialog' title='<?php displayLanguageText('TEXT-UPDATE-STATUS'); ?>'>
|
||||
<center>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<p><b><?php displayLanguageText('TEXT-STATUS'); ?>:</b><br>
|
||||
<select id='selected-status-value'>
|
||||
<option value='Verified'><?php displayLanguageText('TEXT-VERIFIED'); ?></option>
|
||||
<option value='Unverified'><?php displayLanguageText('TEXT-UNVERIFIED'); ?></option>
|
||||
<option value='Inactive'><?php displayLanguageText('TEXT-INACTIVE'); ?></option>
|
||||
</select></p>
|
||||
<p><b><?php echo($GlobalText['Class']) ?>:</b><br>
|
||||
<select id='selected-status-class'>
|
||||
<option value='0'><?php displayLanguageText('TEXT-ALL-CLASSES'); ?></option>
|
||||
<?php echo($ClassesSelect) ?>
|
||||
</select></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<button id='update-student-status-btn'><?php displayLanguageText('TEXT-UPDATE-STATUS'); ?></button>
|
||||
<button class='close-dialog' dialog-name='student-status-dialog'><?php displayLanguageText('TEXT-CLOSE'); ?></button>
|
||||
<br>
|
||||
</center>
|
||||
</div>
|
||||
|
||||
<div id='student-delivery-locations-dialog' title='<?php displayLanguageText('TEXT-UPDATE-DELIVERY-LOCATIONS'); ?>'>
|
||||
<center>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<p><b><?php displayLanguageText('TEXT-DELIVERY-LOCATION'); ?>:</b><br>
|
||||
<select id='selected-delivery-location'>
|
||||
<option value=''><?php displayLanguageText('TEXT-LOCATION-SELECT'); ?></option>
|
||||
<?php echo($LocationsSelect) ?>
|
||||
</select></p>
|
||||
<p><b><?php echo($GlobalText['Class']) ?>:</b><br>
|
||||
<select id='selected-status-class'>
|
||||
<option value='0'><?php displayLanguageText('TEXT-ALL-CLASSES'); ?></option>
|
||||
<?php echo($ClassesSelect) ?>
|
||||
</select></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<button id='update-student-delivery-locations-btn'><?php displayLanguageText('TEXT-UPDATE-DELIVERY-LOCATIONS'); ?></button>
|
||||
<button class='close-dialog' dialog-name='student-delivery-locations-dialog'><?php displayLanguageText('TEXT-CLOSE'); ?></button>
|
||||
<br>
|
||||
</center>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<br>
|
||||
<button id='update-student-status'><?php displayLanguageText('TEXT-UPDATE-STATUS'); ?></button>
|
||||
</td>
|
||||
<?php if ($school_record['special_item_prices'] != 'N') { ?>
|
||||
<td>
|
||||
<br>
|
||||
<button id='update-student-price-category'><?php displayLanguageText('TEXT-UPDATE-MENU-CATEGORY'); ?></button>
|
||||
</td>
|
||||
<?php } ?>
|
||||
<?php if ($school_record['implement_multiple_item_prices'] != 'N') { ?>
|
||||
<td>
|
||||
<br>
|
||||
<button id='update-student-flex-flag'><?php displayLanguageText('TEXT-UPDATE-FLEX-PRICE-ACCESS'); ?></button>
|
||||
</td>
|
||||
<?php } ?>
|
||||
<?php if ($school_record['implement_meal_locations'] != 'N') { ?>
|
||||
<td>
|
||||
<br>
|
||||
<button id='update-student-delivery-location'><?php displayLanguageText('TEXT-UPDATE-DELIVERY-LOCATIONS'); ?></button>
|
||||
</td>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<table>
|
||||
<tr>
|
||||
<?php
|
||||
$cresults = db_query("SELECT * FROM classes WHERE school_num = $base_school_num ORDER BY sequence");
|
||||
if (db_num_rows($cresults) > 0) {
|
||||
|
||||
$Classes = array();
|
||||
while ($row = db_fetch_assoc($cresults)) {
|
||||
$cnum = $row['record_num'];
|
||||
$class_info = getClassInfo($cnum, 'dropdown');
|
||||
$Classes[] = array($cnum, $class_info);
|
||||
}
|
||||
?>
|
||||
<td align='left'>
|
||||
<b><?php echo($GlobalText['Classes']) ?>:</b><br>
|
||||
<select id='selected-class-num'>
|
||||
<option value='0'><?php displayLanguageText('TEXT-VIEW-ALL'); ?></option>
|
||||
<?php
|
||||
for ($i = 0; $i < count($Classes); $i++) {
|
||||
$class = $Classes[$i];
|
||||
$cnum = $class[0];
|
||||
$info = $class[1];
|
||||
echo(" <option value='$cnum'>$info</option>\n");
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
<?php } ?>
|
||||
<td>
|
||||
<br>
|
||||
<button id='view-selected-records'><?php displayLanguageText('TEXT-VIEW'); ?></button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id='student-people-message-div'></div>
|
||||
@@ -0,0 +1,122 @@
|
||||
<?php
|
||||
|
||||
$account_num = 0;
|
||||
if (array_key_exists('account_num', $_GET)) $account_num = intval($_GET['account_num']);
|
||||
if (!in_array($_SESSION['UserInfo']['type'], array('SuperUser', 'System Administrator', 'Application Administrator', 'Financial', 'Communications Administrator'))) {
|
||||
$account_num = $_SESSION['UserInfo']['record_num'];
|
||||
}
|
||||
|
||||
|
||||
// Process allergens if required
|
||||
$numAllergens = db_getVal("SELECT count(*) FROM allergens WHERE school_num = $school_num");
|
||||
if ($numAllergens > 0) {
|
||||
$query = "SELECT people_num, count(*) AS num FROM allergies WHERE school_num = $school_num GROUP BY 1";
|
||||
$results = db_query($query);
|
||||
while ($row = db_fetch_assoc($results)) {
|
||||
$pnum = $row['people_num'];
|
||||
$count = intval($row['num']);
|
||||
$query = "UPDATE people SET num_allergies = $count WHERE school_num = $school_num AND record_num = $pnum";
|
||||
db_query($query);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($account_num > 0) {
|
||||
$templatePageTitle = $GlobalText['ManageStudents'];
|
||||
$SearchFlag = 'N';
|
||||
}
|
||||
else {
|
||||
?>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<br>
|
||||
<button id='update-student-status'><?php displayLanguageText('TEXT-UPDATE-STATUS'); ?></button>
|
||||
</td>
|
||||
<?php if ($school_record['special_item_prices'] != 'N') { ?>
|
||||
<td>
|
||||
<br>
|
||||
<button id='update-student-price-category'><?php displayLanguageText('TEXT-UPDATE-MENU-CATEGORY'); ?></button>
|
||||
</td>
|
||||
<?php } ?>
|
||||
<?php if ($school_record['implement_multiple_item_prices'] != 'N') { ?>
|
||||
<td>
|
||||
<br>
|
||||
<button id='update-student-flex-flag'><?php displayLanguageText('TEXT-UPDATE-FLEX-PRICE-ACCESS'); ?></button>
|
||||
</td>
|
||||
<?php } ?>
|
||||
<?php if ($school_record['implement_meal_locations'] != 'N') { ?>
|
||||
<td>
|
||||
<br>
|
||||
<button id='update-student-delivery-location'><?php displayLanguageText('TEXT-UPDATE-DELIVERY-LOCATIONS'); ?></button>
|
||||
</td>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
$cresults = db_query("SELECT * FROM classes WHERE school_num = $base_school_num ORDER BY sequence");
|
||||
$numClass = db_num_rows($cresults);
|
||||
|
||||
if ($numClass > 0 || $school_record['special_item_prices'] == 'Y') {
|
||||
?>
|
||||
<br>
|
||||
<table>
|
||||
<tr>
|
||||
<?php
|
||||
if ($numClass > 0) {
|
||||
|
||||
$Classes = array();
|
||||
while ($row = db_fetch_assoc($cresults)) {
|
||||
$cnum = $row['record_num'];
|
||||
$class_info = getClassInfo($cnum, 'dropdown');
|
||||
$Classes[] = array($cnum, $class_info);
|
||||
}
|
||||
?>
|
||||
<td align='left'>
|
||||
<b><?php echo($GlobalText['Classes']) ?>:</b><br>
|
||||
<select id='selected-class-num'>
|
||||
<option value='0'><?php displayLanguageText('TEXT-VIEW-ALL'); ?></option>
|
||||
<?php
|
||||
for ($i = 0; $i < count($Classes); $i++) {
|
||||
$class = $Classes[$i];
|
||||
$cnum = $class[0];
|
||||
$info = $class[1];
|
||||
echo(" <option value='$cnum'>$info</option>\n");
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($school_record['special_item_prices'] == 'Y') {
|
||||
?>
|
||||
<td> </td>
|
||||
<td align='left'>
|
||||
<b><?php displayLanguageText('TEXT-PRICE-CATEGORY'); ?>:</b><br>
|
||||
<select id='selected-menu-category'>
|
||||
<option value='0'><?php displayLanguageText('TEXT-VIEW-ALL'); ?></option>
|
||||
<option value='Regular'><?php displayLanguageText('TEXT-REGULAR'); ?></option>
|
||||
<option value='Special 1'><?php displayLanguageText('TEXT-SPECIAL-1'); ?></option>
|
||||
<option value='Special 2'><?php displayLanguageText('TEXT-SPECIAL-2'); ?></option>
|
||||
<option value='Special 3'><?php displayLanguageText('TEXT-SPECIAL-3'); ?></option>
|
||||
</select>
|
||||
</td>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<td>
|
||||
<br>
|
||||
<button id='view-selected-records'><?php displayLanguageText('TEXT-VIEW'); ?></button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<span id='student-people-message-div' style='padding: 5 5 5 5; margin: 15px 0 0 0; background-color: #FCF3BA;'></span>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,338 @@
|
||||
|
||||
|
||||
$("#student-status-dialog").dialog({
|
||||
autoOpen: false,
|
||||
minWidth: 400,
|
||||
minHeight: 400,
|
||||
modal: true,
|
||||
position: { my: 'center', at: 'center' }
|
||||
});
|
||||
|
||||
$("#menu-category-dialog").dialog({
|
||||
autoOpen: false,
|
||||
minWidth: 400,
|
||||
minHeight: 400,
|
||||
modal: true,
|
||||
position: { my: 'center', at: 'center' }
|
||||
});
|
||||
|
||||
$("#flex-access-dialog").dialog({
|
||||
autoOpen: false,
|
||||
minWidth: 400,
|
||||
minHeight: 400,
|
||||
modal: true,
|
||||
position: { my: 'center', at: 'center' }
|
||||
});
|
||||
|
||||
$("#student-delivery-locations-dialog").dialog({
|
||||
autoOpen: false,
|
||||
minWidth: 400,
|
||||
minHeight: 400,
|
||||
modal: true,
|
||||
position: { my: 'center', at: 'center' }
|
||||
});
|
||||
|
||||
|
||||
$(document).on('click touch', '.menu-price-category-data-span', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var value = $(this).html();
|
||||
var rnum = $(this).attr('rnum');
|
||||
var fid = $(this).attr('id');
|
||||
|
||||
switch (value) {
|
||||
case 'Regular':
|
||||
value = 'Special 1';
|
||||
break;
|
||||
|
||||
case 'Special 1':
|
||||
value = 'Special 2';
|
||||
break;
|
||||
|
||||
case 'Special 2':
|
||||
value = 'Special 3';
|
||||
break;
|
||||
|
||||
case 'Special 3':
|
||||
value = 'Regular';
|
||||
break;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: 'ajax.UpdateDBField.php',
|
||||
data: {
|
||||
table_name: 'people',
|
||||
field_name: 'menu_price_category',
|
||||
field_value: value,
|
||||
field_type: 'text',
|
||||
record_num: rnum
|
||||
},
|
||||
dataType: 'json'
|
||||
}).done(function(results) {
|
||||
$("#"+fid).html(value);
|
||||
if (value == 'Regular') $("#mpc-span-"+rnum).removeClass('warning');
|
||||
else $("#mpc-span-"+rnum).addClass('warning');
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click touch', '.status-data-span', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var value = $(this).html();
|
||||
var rnum = $(this).attr('rnum');
|
||||
var fid = $(this).attr('id');
|
||||
|
||||
switch (value) {
|
||||
case 'Unverified':
|
||||
value = 'Verified';
|
||||
break;
|
||||
|
||||
case 'Verified':
|
||||
value = 'Inactive';
|
||||
break;
|
||||
|
||||
case 'Inactive':
|
||||
value = 'Unverified';
|
||||
break;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: 'ajax.UpdateDBField.php',
|
||||
data: {
|
||||
table_name: 'people',
|
||||
field_name: 'status',
|
||||
field_value: value,
|
||||
field_type: 'text',
|
||||
record_num: rnum
|
||||
},
|
||||
dataType: 'json'
|
||||
}).done(function(results) {
|
||||
$("#"+fid).html(value);
|
||||
});
|
||||
});
|
||||
|
||||
$("#view-selected-records").on('click touch', function(e) {
|
||||
e.preventDefault();
|
||||
loadSelected();
|
||||
});
|
||||
|
||||
function loadSelected() {
|
||||
var cnum = $("#selected-class-num").val();
|
||||
var mcat = $("#selected-menu-category").val();
|
||||
var title = '';
|
||||
var where = '';
|
||||
var text;
|
||||
|
||||
if (cnum > 0) {
|
||||
where += "AND class_num = "+cnum+" ";
|
||||
if (title.length) title += ' - ';
|
||||
title += $("#selected-class-num option:selected").text();
|
||||
}
|
||||
|
||||
if (mcat != undefined && mcat != 0) {
|
||||
where += "AND menu_price_category = '"+mcat+"' ";
|
||||
if (title.length) title += ' - ';
|
||||
title += $("#selected-menu-category option:selected").text();
|
||||
}
|
||||
|
||||
$("#custom-where").val(where);
|
||||
|
||||
$("#student-people-message-div").html('<b>'+title+'</b>');
|
||||
loadRecords();
|
||||
}
|
||||
|
||||
$(document).on('click touch', '.class-num-data-span', function() {
|
||||
var cnum = $(this).attr('ref-num');
|
||||
cnum = Math.abs(cnum);
|
||||
if (cnum > 0) {
|
||||
$("#custom-where").val("AND class_num = "+cnum+" ");
|
||||
}
|
||||
loadRecords();
|
||||
});
|
||||
|
||||
$("#update-student-price-category").on('click touch', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$("#selected-menu-price-category").val('');
|
||||
$("#selected-menu-price-class").val(0);
|
||||
|
||||
$("#selected-menu-price-category").removeClass('missing-data');
|
||||
|
||||
$("#menu-category-dialog").dialog('open');
|
||||
});
|
||||
|
||||
$("#update-menu-category-btn").on('click touch', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var category = $("#selected-menu-price-category").val();
|
||||
var class_num = $("#selected-menu-price-class").val();
|
||||
|
||||
if (category == '') {
|
||||
$("#selected-menu-price-category").addClass('missing-data');
|
||||
return;
|
||||
}
|
||||
|
||||
if (class_num == 0) {
|
||||
var ans = confirm('<?php displayLanguageText('TEXT-CONFIRM-UPDATE-ALL-STUDENTS'); ?>');
|
||||
if (!ans) return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: 'ajax.UpdateDatabase.php',
|
||||
data: {
|
||||
table_name: 'student-people',
|
||||
dataset: 'menu-price-category',
|
||||
price_category: category,
|
||||
class_num: class_num
|
||||
},
|
||||
dataType: 'json'
|
||||
}).done(function(results) {
|
||||
$("#menu-category-dialog").dialog('close');
|
||||
loadRecords();
|
||||
});
|
||||
});
|
||||
|
||||
$("#selected-menu-price-category").change(function() {
|
||||
$("#selected-menu-price-category").removeClass('missing-data');
|
||||
});
|
||||
|
||||
|
||||
$("#update-student-flex-flag").on('click touch', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$("#flex-access-dialog").dialog('open');
|
||||
});
|
||||
|
||||
$("#update-flex-flag-btn").on('click touch', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var flex_flag = $("#selected-flex-access-flag").val();
|
||||
var class_num = $("#selected-flex-access-class").val();
|
||||
|
||||
if (class_num == 0) {
|
||||
var ans = confirm('<?php displayLanguageText('TEXT-CONFIRM-UPDATE-ALL-STUDENTS'); ?>');
|
||||
if (!ans) return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: 'ajax.UpdateDatabase.php',
|
||||
data: {
|
||||
table_name: 'student-people',
|
||||
dataset: 'flex-access-flag',
|
||||
flex_flag: flex_flag,
|
||||
class_num: class_num
|
||||
},
|
||||
dataType: 'json'
|
||||
}).done(function(results) {
|
||||
$("#flex-access-dialog").dialog('close');
|
||||
loadRecords();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$("#update-student-status").on('click touch', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$("#selected-status-value").val('Verified');
|
||||
$("#student-status-dialog").dialog('open');
|
||||
});
|
||||
|
||||
$("#update-student-status-btn").on('click touch', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var student_status = $("#selected-status-value").val();
|
||||
var class_num = $("#selected-status-class").val();
|
||||
|
||||
if (class_num == 0) {
|
||||
var ans = confirm('<?php displayLanguageText('TEXT-CONFIRM-UPDATE-ALL-STUDENTS'); ?>');
|
||||
if (!ans) return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: 'ajax.UpdateDatabase.php',
|
||||
data: {
|
||||
table_name: 'student-people',
|
||||
dataset: 'student-status',
|
||||
student_status: student_status,
|
||||
class_num: class_num
|
||||
},
|
||||
dataType: 'json'
|
||||
}).done(function(results) {
|
||||
$("#student-status-dialog").dialog('close');
|
||||
loadRecords();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$("#update-student-delivery-location").on('click touch', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$("#selected-delivery-location").val('');
|
||||
$("#student-delivery-locations-dialog").dialog('open');
|
||||
});
|
||||
|
||||
$("#update-student-delivery-locations-btn").on('click touch', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var delivery_location = $("#selected-delivery-location").val();
|
||||
var class_num = $("#selected-status-class").val();
|
||||
|
||||
if (class_num == 0) {
|
||||
var ans = confirm('<?php displayLanguageText('TEXT-CONFIRM-UPDATE-ALL-STUDENTS'); ?>');
|
||||
if (!ans) return;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: 'ajax.UpdateDatabase.php',
|
||||
data: {
|
||||
table_name: 'student-people',
|
||||
dataset: 'student-delivery-locations',
|
||||
delivery_location: delivery_location,
|
||||
class_num: class_num
|
||||
},
|
||||
dataType: 'json'
|
||||
}).done(function(results) {
|
||||
$("#student-delivery-locations-dialog").dialog('close');
|
||||
loadRecords();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(document).on('click touch', '.num-allergies-data-span, .allergy-info', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var num = $(this).html();
|
||||
var rnum = $(this).attr('rnum');
|
||||
if (num == '' || num == '0') return;
|
||||
|
||||
$.getJSON("ajax.DataTable.Fetch.php",
|
||||
{
|
||||
table_name: 'people',
|
||||
action: 'student-allergy-info',
|
||||
sequence_flag: 'N',
|
||||
person: rnum
|
||||
},
|
||||
function(results) {
|
||||
var display_data = '';
|
||||
display_data += "<center><table><tr><td class='ltext'>" +
|
||||
results.content +
|
||||
"</td></tr></table></center>";
|
||||
|
||||
$("#small-info-dialog-data-div").html(display_data);
|
||||
$("#small-info-dialog").dialog('open');
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
$(".close-dialog").on('click touch', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var dialog_name = $(this).attr('dialog-name');
|
||||
if (dialog_name == undefined) {
|
||||
alert('dialog-name not defined');
|
||||
return;
|
||||
}
|
||||
$("#"+dialog_name).dialog('close');
|
||||
});
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
|
||||
<?php if ($school_record['collect_student_grade'] == 'N') { ?>
|
||||
$("#school_grade_p").hide();
|
||||
<?php } ?>
|
||||
<?php if ($school_record['collect_student_number'] == 'N') { ?>
|
||||
$("#student_number_p").hide();
|
||||
<?php } ?>
|
||||
<?php if ($school_record['implement_meal_locations'] == 'N') { ?>
|
||||
$("#meal_location_p").hide();
|
||||
<?php } ?>
|
||||
<?php if ($school_record['special_item_prices'] == 'N') { ?>
|
||||
$("#menu_price_category_p").hide();
|
||||
<?php } ?>
|
||||
<?php if ($school_record['implement_multiple_item_prices'] == 'N') { ?>
|
||||
$("#access_to_multiple_item_prices_p").hide();
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
if (array_key_exists('account_num', $_GET)) $account_num = intval($_GET['account_num']);
|
||||
if (isset($account_num) && $account_num > 0) {
|
||||
?>
|
||||
$("#user_num_default").val(<?php echo($account_num) ?>);
|
||||
<?php } ?>
|
||||
<?php
|
||||
$numAllergens = db_getVal("SELECT count(*) FROM allergens WHERE school_num = $school_num");
|
||||
if ($numAllergens == 0) {
|
||||
?>
|
||||
$("#num_allergies_p").hide();
|
||||
<?php } ?>
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
|
||||
<link href="summernote/summernote-lite.min.css" rel="stylesheet">
|
||||
<script language="JavaScript" type="text/javascript" src="summernote/summernote-lite.min.js"></script>
|
||||
<script src="summernote/summernote-image-attributes.js"></script>
|
||||
<script src="summernote/lang/en-us.js"></script>
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
$students_icon = "<img src='images/icons/groupofusers16.png' alt='View Students' border='0'>";
|
||||
$contacts_icon = "<img src='images/icons/userid16.png' alt='View Contact Information' border='0'>";
|
||||
$reminder_icon = "<img src='images/icons/mailsend16.png' alt='Send Account Login Reminder Email' border='0'>";
|
||||
$weekly_reminder_icon = "<img src='images/icons/mailsend16.png' alt='Send Weekly Menu Reminder Email' border='0'>";
|
||||
$money_icon = "<img src='images/icons/money16.png' alt='Post to User Account' border='0'>";
|
||||
$moneypost_icon = "<img src='images/icons/money-post16.png' alt='Post Account Balance to Zero' border='0'>";
|
||||
|
||||
|
||||
$commands[] = "<a href='#' class='user-students' rnum='%d' title='View User Students'>$students_icon</a>";
|
||||
// $commands[] = "<a href='#' class='user-contact-info' rnum='%d' title='View User Contact Info'>$contacts_icon</a>";
|
||||
$commands[] = "<a href='#' class='send-login-reminder' rnum='%d' title='Send Account Login Reminder Email'>$reminder_icon</a>";
|
||||
$commands[] = "<a href='#' class='send-menu-reminder' rnum='%d' title='Send Weekly Menu Reminder Reminder Email'>$weekly_reminder_icon</a>";
|
||||
$commands[] = "<a href='#' class='user-info' rnum='%d' title='User Info'>$info_icon</a>";
|
||||
$commands[] = "<a href='?action=user-account&naction=add&user_num=%d' title='Post to User Account'>$money_icon</a>";
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
$numStaff = db_getVal("SELECT count(*) FROM users WHERE school_num = $base_school_num AND type = 'Staff'");
|
||||
$numParents = db_getVal("SELECT count(*) FROM users WHERE school_num = $base_school_num AND type = 'Parent'");
|
||||
$numGuests = db_getVal("SELECT count(*) FROM users WHERE school_num = $base_school_num AND type = 'Guest'");
|
||||
$numSuppliers = db_getVal("SELECT count(*) FROM users WHERE school_num = $base_school_num AND type = 'Supplier'");
|
||||
|
||||
?>
|
||||
<br>
|
||||
<button id='users-view-all'> <?php displayLanguageText('TEXT-VIEW-ALL'); ?> </button>
|
||||
<button id='users-view-admin'> <?php displayLanguageText('TEXT-ADMIN-USERS'); ?> </button>
|
||||
<?php if ($numStaff > 0) { ?>
|
||||
<button id='users-view-staff'> <?php echo($school_record['group_leaders']); ?> </button>
|
||||
<?php } ?>
|
||||
<?php if ($numParents > 0) { ?>
|
||||
<button id='users-view-registrants'> <?php echo($school_record['registrants_are']) ?> </button>
|
||||
<?php } ?>
|
||||
<?php if ($numGuests > 0) { ?>
|
||||
<button id='users-view-guests'> <?php displayLanguageText('TEXT-GUESTS'); ?> </button>
|
||||
<?php } ?>
|
||||
<?php if ($numSuppliers > 0) { ?>
|
||||
<button id='users-view-suppliers'> <?php displayLanguageText('TEXT-SUPPLIERS'); ?> </button>
|
||||
<?php } ?>
|
||||
<button id='users-csv-file'> <?php displayLanguageText('TEXT-GENERATE-CSV'); ?> </button>
|
||||
@@ -0,0 +1,264 @@
|
||||
|
||||
$(document).on('click touch', '#users-view-all', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$("#custom-where").val("");
|
||||
loadRecords();
|
||||
});
|
||||
|
||||
$(document).on('click touch', '#users-view-admin', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$("#custom-where").val("AND type NOT IN ('Parent','Guest','Staff','Supplier')");
|
||||
loadRecords();
|
||||
});
|
||||
|
||||
$(document).on('click touch', '#users-view-staff', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$("#custom-where").val("AND type IN ('Staff')");
|
||||
loadRecords();
|
||||
});
|
||||
|
||||
$(document).on('click touch', '#users-view-registrants', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$("#custom-where").val("AND type IN ('Parent')");
|
||||
loadRecords();
|
||||
});
|
||||
|
||||
$(document).on('click touch', '#users-view-guests', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$("#custom-where").val("AND type IN ('Guest')");
|
||||
loadRecords();
|
||||
});
|
||||
|
||||
$(document).on('click touch', '#users-view-suppliers', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
$("#custom-where").val("AND type IN ('Supplier')");
|
||||
loadRecords();
|
||||
});
|
||||
|
||||
$(document).on('click touch', '#users-csv-file', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
window.location = "?action=users-csv";
|
||||
});
|
||||
|
||||
$(document).on('click touch', '.insert-new', function() {
|
||||
$('.notype').hide();
|
||||
});
|
||||
|
||||
$(document).on('change', '#edit-form #type', function() {
|
||||
adjustFormFields();
|
||||
});
|
||||
|
||||
function adjustFormFields() {
|
||||
var type = $('#edit-form #type').val();
|
||||
|
||||
$('.notype').hide();
|
||||
|
||||
switch (type) {
|
||||
case 'Parent':
|
||||
case 'Guest':
|
||||
$('.parent').show();
|
||||
$("#can_order").val('Y');
|
||||
$("#email_reminders").val('Y');
|
||||
$("#receive_emails").val('Y');
|
||||
$("#email_flag").val('Y');
|
||||
$("#available_to_volunteer").val('Y');
|
||||
$("#school_directory").val('Y');
|
||||
$("#email_list").val('Y');
|
||||
break;
|
||||
|
||||
case 'Supplier':
|
||||
$('.supplier').show();
|
||||
$("#can_order").val('N');
|
||||
$("#email_reminders").val('N');
|
||||
$("#receive_emails").val('N');
|
||||
$("#email_flag").val('N');
|
||||
$("#available_to_volunteer").val('N');
|
||||
$("#school_directory").val('N');
|
||||
$("#email_list").val('N');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$(document).on('click touch', '.status-data-span', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var value = $(this).html();
|
||||
var rnum = $(this).attr('rnum');
|
||||
var fid = $(this).attr('id');
|
||||
var new_value = '';
|
||||
var new_index = 0;
|
||||
|
||||
const options = ['Pending', 'Active', 'Inactive', 'Suspended', 'Deleted'];
|
||||
var num_options = options.length;
|
||||
|
||||
for (let i = 0; i < num_options; i++) {
|
||||
if (new_value == '' && new_index == 0) {
|
||||
if (value == options[i]) {
|
||||
new_index = i + 1;
|
||||
if (new_index == num_options) new_index = 0;
|
||||
new_value = options[new_index];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: 'ajax.UpdateDBField.php',
|
||||
data: {
|
||||
table_name: 'users',
|
||||
field_name: 'status',
|
||||
field_value: new_value,
|
||||
field_type: 'text',
|
||||
record_num: rnum
|
||||
},
|
||||
dataType: 'json'
|
||||
}).done(function(results) {
|
||||
$("#"+fid).html(new_value);
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click touch', '.can-order-data-span', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var value = $(this).html();
|
||||
var rnum = $(this).attr('rnum');
|
||||
var fid = $(this).attr('id');
|
||||
var new_value = '';
|
||||
var display = '';
|
||||
var new_index = 0;
|
||||
|
||||
const options = ['Y', 'N', 'B'];
|
||||
const dvalues = ['Yes', 'No', 'Balance'];
|
||||
var num_options = options.length;
|
||||
|
||||
for (let i = 0; i < num_options; i++) {
|
||||
if (new_value == '' && new_index == 0) {
|
||||
if (value == dvalues[i]) {
|
||||
new_index = i + 1;
|
||||
if (new_index == num_options) new_index = 0;
|
||||
new_value = options[new_index];
|
||||
display = dvalues[new_index];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: 'ajax.UpdateDBField.php',
|
||||
data: {
|
||||
table_name: 'users',
|
||||
field_name: 'can_order',
|
||||
field_value: new_value,
|
||||
field_type: 'text',
|
||||
record_num: rnum
|
||||
},
|
||||
dataType: 'json'
|
||||
}).done(function(results) {
|
||||
$("#"+fid).html(display);
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click touch', '.user-students', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var unum = $(this).attr('rnum');
|
||||
var num_students = $("#linked-to-num-data-span-id-"+unum).html();
|
||||
|
||||
if (num_students == '' || num_students == '0') {
|
||||
alert('<?php displayLanguageText('ERRORMSG-NO-STUDENTS-WITH-ACCOUNT'); ?>');
|
||||
return;
|
||||
}
|
||||
|
||||
location.href = '/?action=table.student-people&account_num='+unum;
|
||||
});
|
||||
|
||||
$(document).on('click touch', '.send-login-reminder', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var unum = $(this).attr('rnum');
|
||||
|
||||
$.ajax({
|
||||
url: "ajax.DataRecord.Fetch.php",
|
||||
data: {
|
||||
table_name: "users",
|
||||
record_num: unum,
|
||||
},
|
||||
dataType: "json",
|
||||
error:
|
||||
function(jqXHR, exception) {
|
||||
alert("Exception: "+jqXHR.status+' '+jqXHR.statusText);
|
||||
}
|
||||
}).done(
|
||||
function(results) {
|
||||
var email = results['email'];
|
||||
if (email == '') {
|
||||
msg = '<?php displayLanguageText('ERRORMSG-UNABLE-TO-SEND-EMAIL'); ?>\n'+
|
||||
'<?php displayLanguageText('TEXT-NO-EMAIL-ADDRESS'); ?>';
|
||||
alert(msg);
|
||||
return;
|
||||
}
|
||||
alert('Email to: '+email);
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
$(document).on('click touch', '.send-menu-reminder', function(e) {
|
||||
alert('send-menu-reminder');
|
||||
});
|
||||
|
||||
$(document).on('click touch', '.user-info', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var unum = $(this).attr('rnum');
|
||||
|
||||
$.getJSON("ajax.DataTable.Fetch.php",
|
||||
{
|
||||
table_name: 'users',
|
||||
action: 'user-info',
|
||||
sequence_flag: 'N',
|
||||
user_num: unum,
|
||||
exclude: 'Exclude School'
|
||||
},
|
||||
function(results) {
|
||||
var display_data = '';
|
||||
display_data += "<center><table><tr><td class='ltext'>" +
|
||||
results.content +
|
||||
"</td></tr></table></center>";
|
||||
|
||||
$("#info-dialog-data-div").html(display_data);
|
||||
$("#info-dialog").dialog('open');
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
$(document).on('click touch', '#reset-user-password', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var user_num = $(this).attr('unum');
|
||||
var school_num = $(this).attr('snum');
|
||||
var userid = $(this).attr('userid');
|
||||
var last_login = $(this).attr('last');
|
||||
|
||||
$("#user-id").val(userid);
|
||||
$("#user-id").select();
|
||||
document.execCommand("copy");
|
||||
|
||||
var ans = confirm("Reset User Password?\n\nUser ID: "+userid+"\nNew Password: "+userid+"\n\nLast Login: "+last_login);
|
||||
if (ans) {
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: "ajax.UserPassword.Update.php",
|
||||
data: { school_num: school_num, record_num: user_num }
|
||||
}).done(function() {
|
||||
alert("User Password Updated");
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user