/** Need to figure out which class student is in... */ $note = ''; } $table .= "\n <tr class=\"student attendanceStudentRow\">\n <td>\n <input type=hidden name=default_" . $student['user_id'] . "_Minutes id=default_" . $student['user_id'] . "_Minutes value=\"" . $minutes . "\" />\n <input type=hidden id=\"attend_" . $student['user_id'] . "_default\" name=\"attend_" . $student['user_id'] . "_default\" value=\"t\" />\n <span style=white-space:nowrap>\n <input type=\"CHECKBOX\" id=\"attend_" . $student['user_id'] . "_student\" onClick=\"attend_" . $student['user_id'] . "_default.value='f';\"\n name=\"attend_" . $student['user_id'] . "_student\" value=\"" . $student['user_id'] . "\""; if ($default) { $table .= " checked=true"; } $table .= " />"; $table .= $student['first_name'] . " " . stripslashes($student['last_name']) . " - {" . getSchoolNameForSTGUID($student['STGUID']) . "}</span></td>\n"; /** ======================== Begin CheckBox Selects ======================= */ $table .= "\n <td>" . make_attend_array($student['user_id'], $currentStatus) . "</td>"; /** ======================== End CheckBox Selects ======================= */ $table .= "\n <td colspan=2>\n Minutes: <input type=text size=3 class=\"attendMinutes validate[required,custom[integer]]\" name=\"attend_" . $student['user_id'] . "_minutes\"\n id=\"attend_" . $student['user_id'] . "_minutes\"\n onChange=\"attend_" . $student['user_id'] . "_student.checked=true; attend_" . $student['user_id'] . "_default.value='f';\"\n value=\"" . $minutes . "\" />\n </td>\n </tr>"; /** NOTE * */ if ($_SESSION[$_CONF['sess_name'] . '_isOffice'] && $_SESSION[$_CONF['sess_name'] . '_lev'] == 'office') { $select = makeNoteSelectList($student['user_id'], $noteSelect); $table .= "\n <tr>\n <td align=right>Note:</td>\n <td colspan=2><span style=white-space:nowrap>" . $select . "\n <input type=text size=60 id=\"attend_" . $student['user_id'] . "_note\" name=\"attend_" . $student['user_id'] . "_note\" value='" . htmlentities($note, ENT_QUOTES) . "' onkeyup=\"\">\n </td>\n </tr>"; } else { if ($note != '') { $table .= "\n <tr>\n <td align=right>Note:</td>\n <td colspan=2><span style=\"white-space:nowrap;color:red;\">\n " . htmlentities($note, ENT_QUOTES) . "</span>\n </td>\n </tr>"; } } $table .= "\n <tr>\n <td colspan=4 align=center>\n <input type=submit name=send id=send value=Send />\n <input type=hidden name=default value=" . true . " />\n </td>\n </tr>\n "; $b .= $table; } $b .= "\n </table>\n </form>"; if (isset($_POST['send'])) { include 'attendance.php'; } else { $main .= make_box($t, $b, $c); }
$note = ''; } $table .= "\n <tr class=\"student attendanceStudentRow\">\n <td>\n <input type=hidden name=default_" . $id . "_Minutes id=default_" . $id . "_Minutes value=\"" . $minutes . "\" />\n <input type=hidden id=\"attend_" . $id . "_default\" name=\"attend_" . $id . "_default\" value=\"t\" />\n <span style=white-space:nowrap><input class=\"selectedStudent\" type=\"CHECKBOX\" id=\"attend_" . $id . "_student\" name=\"attend_" . $id . "_student\" value=\"" . $id . "\""; if ($default) { $table .= " checked=true"; } $table .= " />"; $table .= $row['first_name'] . " " . stripslashes($row['last_name']) . " - {" . getSchoolNameForID($row['user_id']) . "}</span></td>\n"; $table .= "\n <td><span style=white-space:nowrap> </span></td>"; /** ======================== Begin CheckBox Selects ======================= */ $table .= "\n <td>" . make_attend_array($id, $currentStatus) . "</td>"; /** ======================== End CheckBox Selects ======================= */ $table .= "\n <td>\n Minutes: <input type=text size=3 class=\"attendMinutes validate[required,custom[number]]\" name=\"attend_" . $id . "_minutes\"\n id=\"attend_" . $id . "_minutes\"\n onChange=\"attend_" . $id . "_student.checked=true; attend_" . $id . "_default.value='f';\"\n value=\"" . $minutes . "\" />\n </td>\n </tr>"; /** NOTE **/ if ($_SESSION[$_CONF['sess_name'] . '_isOffice']) { $select = makeNoteSelectList($id, $noteSelect); $table .= "\n <tr>\n <td align=right>Note:</td>\n <td colspan=6><span style=white-space:nowrap>" . $select . "\n <input type=text size=40 name=\"attend_" . $id . "_note\" value='" . htmlentities($noteText, ENT_QUOTES) . "' onkeyup=\"\"></span>\n </td>\n </tr>"; } else { if ($note != '') { $table .= "\n <tr>\n <td align=right>Note:</td>\n <td colspan=5><span style=\"white-space:nowrap;color:red;\">\n " . htmlentities($note, ENT_QUOTES) . "</span>\n </td>\n </tr>"; } } } } else { /** ################################## Sue Strong's Way ############################## */ foreach ($myStudents_ID as $id => $row) { if (array_key_exists($id, $results)) { $default = false; $currentStatus = $results[$id]['status']; $minutes = $results[$id]['minutes']; $note = $results[$id]['note'];